Corcava logoLe seul outil métier dont vous avez besoinCorcava
Menu

Commits vers tâches avec MCP : transformer une liste de commits en mises à jour

Map your git commits to Corcava tasks and automatically draft progress comments. This workflow takes a list of commits, identifies related tasks, and creates summary comments—with review and approval steps to ensure accuracy before posting.

Ce que ce workflow permet

Commits to tasks with MCP creates a bridge between code and project management:

Résultats clés

  • Commit mapping: Link commits to related tasks automatically
  • Change summaries: Draft clear summaries of what changed
  • Progress tracking: Keep tasks updated with code changes
  • Review workflow: Preview all comments before posting
  • Batch processing: Handle multiple commits at once

Prérequis

Before using this workflow, ensure you have:

Workflow pas à pas

Step 1: Provide Commit List

Start by providing your commit list:

Commit List Prompt

"Here are my recent commits: [Paste commit list with hashes, messages, and files changed] Map these commits to tasks in Corcava: - Identify which tasks each commit relates to - Look for task IDs in commit messages or infer from changes - Show me: commit → task mapping with task IDs and titles Only analyze, don't post comments yet."

What the AI does:

  1. Parses commit list
  2. Extracts task IDs from commit messages (if present)
  3. Searches for related tasks using commit messages
  4. Creates commit-to-task mapping

Step 2: Verify Task Mapping

Review and verify the task mapping:

Verify Mapping Prompt

"For the commit-to-task mapping, verify each task exists: - Get task details for each mapped task ID - Confirm task titles match the commit work - Show me: verified mapping with task details If a task doesn't exist or doesn't match, flag it for review."

What the AI does:

  1. Calls get_task for each mapped task
  2. Verifies tasks exist and match commits
  3. Flags any mismatches or missing tasks
  4. Presents verified mapping

Step 3: Draft Summary Comments

Create summary comments for each commit-task pair:

Draft Comments Prompt

"For each commit-task pair, draft a summary comment: - Format: 'Code changes: [commit hash] - [commit message]. Files changed: [list]. Summary: [what was done].' - Keep comments concise but informative - Group multiple commits to the same task into one comment - Show me: all draft comments before posting Present all comments in a clear list for review."

What the AI does:

  1. Drafts comment for each commit-task pair
  2. Groups commits to same task
  3. Formats comments consistently
  4. Presents all draft comments for review

Step 4: Review and Approve

Review all comments before posting:

Review and Post Prompt (Requires Approval)

"Post all the draft comments to their respective tasks: - Add each comment to the correct task - Use the draft comments we reviewed - Show me confirmation after each comment is posted I must type 'CONFIRM' or 'YES, POST COMMENTS' before you post any comments."

What the AI does:

  1. Waits for confirmation token
  2. Calls add_task_comment for each task
  3. Posts summary comments
  4. Confirms each comment was posted

Complete Workflow Prompts

Here are complete, copy-paste ready prompts:

Full Commit-to-Task Workflow

"Map my commits to tasks and post summary comments: 1. Here are my commits: [paste commit list] 2. Map each commit to a task (look for task IDs in messages or infer from changes) 3. Verify each task exists and matches the commit work 4. Draft summary comments: 'Code changes: [hash] - [message]. Files: [list]. Summary: [what was done].' 5. Show me all draft comments for review 6. Wait for my 'CONFIRM' or 'YES, POST COMMENTS' before posting Important: Always review comments before posting, and only post after explicit confirmation."

Use this when: You want to map multiple commits to tasks

Single Commit Update

"Map commit [hash] '[message]' to task #[ID]. Draft a summary comment, show it to me, then wait for my 'CONFIRM' before posting."

Use this when: You want to update a single task with one commit

Batch Commits for Project

"Map all commits from [branch/date range] to tasks in [project]. Draft comments for each, group by task, preview all, then post after I confirm with 'YES, POST COMMENTS'."

Use this when: You want to update all tasks in a project with recent commits

Workflow Variants

Variant 1: Task ID in Commit Messages

When commits include task IDs in messages:

"Map commits with task IDs in messages: - Extract task IDs from commit messages (e.g., 'Fix bug #123' or '[TASK-456]') - Verify each task exists - Draft comments summarizing changes - Group multiple commits to same task Show me mapping and draft comments before posting."

What happens: AI extracts task IDs directly from commit messages

Variant 2: Infer Tasks from Changes

When commits don't have task IDs:

"Map commits to tasks by inferring from changes: - Analyze commit messages and file changes - Search for related tasks by keyword - Match commits to tasks based on work described - Show me: inferred mapping with confidence level Review the mapping before drafting comments."

What happens: AI searches for tasks matching commit content

Variant 3: Group Commits by Task

When multiple commits relate to one task:

"Group commits by task and create one summary comment per task: - Map all commits to their tasks - Group commits that belong to the same task - Create one comprehensive comment per task covering all commits - Format: 'Code changes: [N commits]. Commits: [list]. Files: [all files]. Summary: [overall changes].' Show me grouped comments before posting."

What happens: AI groups commits and creates one comment per task

Example: Complete Commit-to-Task Session

Here's a real example of how a commit-to-task session flows:

User Prompt

"Map these commits to tasks and post summary comments: abc123 Fix authentication bug #123 def456 Add OAuth support for task #145 ghi789 Update API docs jkl012 Refactor auth controller"

AI Response (Mapping)

Commit-to-Task Mapping:

  • abc123 → Task #123: "Fix authentication bug" (explicit in commit)
  • def456 → Task #145: "Add OAuth 2.0 support" (explicit in commit)
  • ghi789 → Task #189: "Write API documentation" (inferred from changes)
  • jkl012 → Task #123: "Fix authentication bug" (related to auth work)

Verification: All tasks exist and match commits.

AI Draft Comments

Draft Comments (Ready to Post):

Task #123:

"Code changes: abc123, jkl012 - Fix authentication bug, Refactor auth controller. Files changed: AuthController.php, auth.php. Summary: Fixed authentication bug and refactored auth controller for better maintainability."

Task #145:

"Code changes: def456 - Add OAuth support. Files changed: OAuthController.php, routes.php. Summary: Implemented OAuth 2.0 authentication support."

Task #189:

"Code changes: ghi789 - Update API docs. Files changed: api-docs.md. Summary: Updated API documentation with latest endpoints."

Type 'CONFIRM' or 'YES, POST COMMENTS' to post these comments.

User Approval

"YES, POST COMMENTS"

AI Action (After Approval)

✅ Posted summary comment to task #123

✅ Posted summary comment to task #145

✅ Posted summary comment to task #189

All commit summaries have been posted to their tasks.

Safety Patterns

✅ Review Before Posting

This workflow uses review and approval for all write operations:

  • Verify mapping: Confirm tasks exist before drafting comments
  • Draft first: Create all comments before posting any
  • Preview all: Show complete list of comments for review
  • Confirmation tokens: Require "CONFIRM" or "YES, POST COMMENTS" before posting
  • Batch review: Review all comments together for consistency

Troubleshooting

Cannot Map Commits to Tasks

Symptom: AI can't identify which tasks commits relate to

Possible causes:

  • No task IDs in commit messages
  • Commit messages too vague
  • Tasks don't exist or are in different workspace

Fix: Include task IDs in commit messages (e.g., "Fix #123") or provide task IDs manually: "Map commit [hash] to task #[ID]"

Wrong Task Mapped

Symptom: Commit mapped to incorrect task

Possible causes:

  • Inference from commit message was wrong
  • Multiple tasks match commit content

Fix: Review mapping before posting. Correct manually: "Map commit [hash] to task #[ID] instead"

Comments Not Being Posted

Symptom: AI doesn't post comments even after approval

Possible causes:

  • Confirmation token not recognized
  • API key lacks write permissions
  • Task ID incorrect

Fix: Use exact confirmation: "CONFIRM" or "YES, POST COMMENTS". Verify API key has write access.

Related Tools

This workflow uses these Corcava MCP tools:

Related Use Cases

Map Commits to Tasks

Connect your AI assistant to Corcava and keep tasks updated with code changes

Continue Reading

Progress updates with MCP

Routine that prompts the user for updates, then posts standardized progress comments to a curated list of tasks. Include...

Weekly planning with MCP

Workflow playbook for generating weekly plans from Corcava tasks using MCP. Includes prompts for listing tasks due this...