diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 70c42f4db..732a38c9d 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -28,7 +28,7 @@ { "name": "aidd-vcs", "source": "./plugins/aidd-vcs", - "description": "External artifacts: commit, pull-request, release-tag, issue-create", + "description": "External artifacts: commit, pull-request, release-tag, issue-create, answer-comments", "strict": true, "metadata": { "recommended": true diff --git a/README.md b/README.md index 87e15899c..859dfb593 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ Unify **engineering teams** around **standardized workflows** and **shared best 🧱 **IDE agnostic** · 🏗️ **Legacy systems** · 🌱 **Token-optimized** · 🇫🇷 **Made in France**

- 9 plugins · 52 skills · 4 agents + 9 plugins · 53 skills · 4 agents

[![Open Source](https://img.shields.io/badge/Open_Source-Yes-yellow?logo=open-source-initiative&logoColor=white)](https://opensource.org/) @@ -149,7 +149,7 @@ Plan, build, review, test, debug stable

🌿 aidd-vcs

-6 skills
+7 skills
Commits, pull requests, release tags, issues
diff --git a/docs/CATALOG.md b/docs/CATALOG.md index 8add1ff7a..9e3a27d13 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -103,6 +103,7 @@ Version-control workflows: repo init, commit, pull/merge request, release tag, i | `03-release-tag` | Cut a semver release with annotated tag and notes | `01-release-tag` | | `04-issue-create` | Create an issue in the configured ticketing tool | `01-issue-create` | | `05-resolve-conflict` | Resolve deterministic conflicts or approved choices | `01-resolve` | +| `06-answer-comments` | Answer review comments, resolve settled threads, and propose learnings | `01-answer-comments`, `02-propose-learnings` | ## 🎼 aidd-orchestrator diff --git a/plugins/aidd-vcs/.claude-plugin/plugin.json b/plugins/aidd-vcs/.claude-plugin/plugin.json index 55ba5ff53..958b51f0d 100644 --- a/plugins/aidd-vcs/.claude-plugin/plugin.json +++ b/plugins/aidd-vcs/.claude-plugin/plugin.json @@ -2,7 +2,7 @@ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json", "name": "aidd-vcs", "version": "2.5.0", - "description": "External artifacts: repo-init, commit, pull-request, release-tag, issue-create, resolve-conflict", + "description": "External artifacts: repo-init, commit, pull-request, release-tag, issue-create, resolve-conflict, answer-comments", "author": { "name": "AI-Driven Dev", "url": "https://github.com/ai-driven-dev" @@ -13,7 +13,8 @@ "./skills/02-pull-request", "./skills/03-release-tag", "./skills/04-issue-create", - "./skills/05-resolve-conflict" + "./skills/05-resolve-conflict", + "./skills/06-answer-comments" ], "keywords": [ "git", diff --git a/plugins/aidd-vcs/CATALOG.md b/plugins/aidd-vcs/CATALOG.md index 62c38dfae..136841e0d 100644 --- a/plugins/aidd-vcs/CATALOG.md +++ b/plugins/aidd-vcs/CATALOG.md @@ -14,6 +14,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai - [`skills/03-release-tag`](#skills03-release-tag) - [`skills/04-issue-create`](#skills04-issue-create) - [`skills/05-resolve-conflict`](#skills05-resolve-conflict) + - [`skills/06-answer-comments`](#skills06-answer-comments) --- @@ -80,3 +81,14 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [resolution-table.md](skills/05-resolve-conflict/assets/resolution-table.md) | - | | `-` | [SKILL.md](skills/05-resolve-conflict/SKILL.md) | `Resolves deterministic Git conflicts or approved choices. Use when the user wants to resolve a merge, rebase, or cherry-pick conflict. Not for deciding between competing implementations or committing changes.` | +#### `skills/06-answer-comments` + +| Group | File | Description | +|-------|------|---| +| `actions` | [01-answer-comments.md](skills/06-answer-comments/actions/01-answer-comments.md) | - | +| `actions` | [02-propose-learnings.md](skills/06-answer-comments/actions/02-propose-learnings.md) | - | +| `assets` | [comments-summary-template.md](skills/06-answer-comments/assets/comments-summary-template.md) | - | +| `references` | [comment-kinds.md](skills/06-answer-comments/references/comment-kinds.md) | - | +| `references` | [learnings.md](skills/06-answer-comments/references/learnings.md) | - | +| `-` | [SKILL.md](skills/06-answer-comments/SKILL.md) | `Answers pull or merge request review comments, resolves settled threads, and proposes learnings. Use when the user wants review feedback answered or pending decisions summarized. Not for reviewing a diff or fixing code.` | + diff --git a/plugins/aidd-vcs/skills/06-answer-comments/SKILL.md b/plugins/aidd-vcs/skills/06-answer-comments/SKILL.md new file mode 100644 index 000000000..3fd0a389b --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/SKILL.md @@ -0,0 +1,27 @@ +--- +name: 06-answer-comments +description: Answers pull or merge request review comments, resolves settled threads, and proposes learnings. Use when the user wants review feedback answered or pending decisions summarized. Not for reviewing a diff or fixing code. +argument-hint: pull request | merge request +--- + +# Answer Comments + +```mermaid +flowchart LR + request([pull or merge request]) --> answer-comments --> propose-learnings --> summary([summary updated]) + summary -.->|new reply or pushed commit| request +``` + +## Actions + +Run the flow above. Read only the next action file. + +| Action | Does | +| --- | --- | +| answer-comments | answer open review threads and resolve the settled ones | +| propose-learnings | propose lasting feedback and update the summary | + +## Transversal rules + +- Reach the pull or merge request through the VCS tool `aidd_docs/memory/vcs.md` names, else the one the remote points to. +- Read code and history as evidence; never modify source, commit, push, or merge the request. diff --git a/plugins/aidd-vcs/skills/06-answer-comments/actions/01-answer-comments.md b/plugins/aidd-vcs/skills/06-answer-comments/actions/01-answer-comments.md new file mode 100644 index 000000000..dd54659e4 --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/actions/01-answer-comments.md @@ -0,0 +1,23 @@ +# 01 - Answer Comments + +Reply to each open review comment on a pull or merge request, and resolve the settled ones. + +## Input + +The pull or merge request, and the commits pushed since its comments. + +## Output + +Each open thread replied to, resolved or left open per its kind, and the `user-call` and `todo` threads named. + +## Process + +1. **Collect.** Read the open review threads, skipping those still waiting per [comment-kinds.md](../references/comment-kinds.md). +2. **Sort.** Give each comment one kind per `comment-kinds.md`. +3. **Reply.** Reply in each thread as its kind says. +4. **Resolve.** Resolve or leave open each thread as its kind says. +5. **Hand over.** Name all remaining `user-call` and `todo` threads with their links. + +## Rules + +- Include skipped waiting threads in the handover, even when no reply was posted. diff --git a/plugins/aidd-vcs/skills/06-answer-comments/actions/02-propose-learnings.md b/plugins/aidd-vcs/skills/06-answer-comments/actions/02-propose-learnings.md new file mode 100644 index 000000000..946ea0a1b --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/actions/02-propose-learnings.md @@ -0,0 +1,22 @@ +# 02 - Propose Learnings + +Propose the feedback that should outlive the pull or merge request, and post the summary. + +## Input + +The threads answer-comments replied to, and the ones it handed over. + +## Output + +One summary comment on the pull or merge request, shaped by [comments-summary-template.md](../assets/comments-summary-template.md) and kept up to date across runs. + +## Process + +1. **Keep.** Sort the feedback per [learnings.md](../references/learnings.md). +2. **Fill.** Fill `comments-summary-template.md`. +3. **Post.** Post it on the first run; on a later one, edit the comment opening with `## Review comments` instead. +4. **Offer.** If there are learnings, propose running the skill that captures durable project learnings with this summary as input. + +## Rules + +- Keep learnings as proposals; write no rule, memory or skill. diff --git a/plugins/aidd-vcs/skills/06-answer-comments/assets/comments-summary-template.md b/plugins/aidd-vcs/skills/06-answer-comments/assets/comments-summary-template.md new file mode 100644 index 000000000..4e7cab93a --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/assets/comments-summary-template.md @@ -0,0 +1,17 @@ +## Review comments + +Done: {{n}}{{ (short shas), when there are any}}. Answered: {{n}}. + +### FAQ: your call + +1. **{{question}}** ([thread]({{url}})): {{option a}} / {{option b}} + +### To do + +- {{change}} ([thread]({{url}})) + +### Learnings to keep + +- {{lesson}} ([thread]({{url}})) + + diff --git a/plugins/aidd-vcs/skills/06-answer-comments/references/comment-kinds.md b/plugins/aidd-vcs/skills/06-answer-comments/references/comment-kinds.md new file mode 100644 index 000000000..50062e288 --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/references/comment-kinds.md @@ -0,0 +1,22 @@ +# Comment kinds + +The kind each review comment gets, and what its thread receives. + +## Kinds + +| Kind | When | Reply | Thread | +| --- | --- | --- | --- | +| `done` | a change it asked for is in a commit pushed after it | what changed, and the short commit sha | resolved | +| `answer` | a question the code, docs, tests or history answer | the answer, and the file or commit it rests on | resolved | +| `user-call` | a choice only the user can settle: intent, trade-off, scope, taste | the question in one sentence and its options, ending `Answer here.` | open | +| `user-call`, answered | the user has stated their decision, even if implementation remains | `Decision:` and the user's choice | resolved | +| `todo` | a change asked for, not pushed yet | the change, ending `To do.` | open | + +## Rules + +| Rule | Why | +| --- | --- | +| Between `answer` and `user-call`, pick `user-call` | a guessed answer reads as decided | +| Reply in one or two lines, in the comment's language, never quoting it back | the thread stays readable | +| Keep `Answer here.` and `To do.` verbatim, in English | a later run reads them to know which threads still wait | +| Skip a thread ending `Answer here.`, or `To do.` with no commit pushed since | it still waits, whatever account posted it | diff --git a/plugins/aidd-vcs/skills/06-answer-comments/references/learnings.md b/plugins/aidd-vcs/skills/06-answer-comments/references/learnings.md new file mode 100644 index 000000000..1d74487ae --- /dev/null +++ b/plugins/aidd-vcs/skills/06-answer-comments/references/learnings.md @@ -0,0 +1,11 @@ +# Learnings + +Which review feedback outlives its pull or merge request. + +| Feedback | Becomes | +| --- | --- | +| a preference stated as a general one, such as "docs too long" | a learning | +| the same remark on several files | one learning, linking every thread | +| a decision another change would face again | a learning | +| what a project rule or memory already says | that rule named as not followed, no new learning | +| a one-off change | nothing | diff --git a/scripts/__tests__/architecture-rules.test.js b/scripts/__tests__/architecture-rules.test.js index 35d0a1ad9..ae25fe536 100644 --- a/scripts/__tests__/architecture-rules.test.js +++ b/scripts/__tests__/architecture-rules.test.js @@ -229,7 +229,7 @@ test("sweeping the repository's own plugins/ tree yields zero violations", () => assert.deepEqual(violations, []); // A sweep that never actually exercised a skill with action files would pass the same way — // this pins the sweep to the measured count so it cannot go vacuously green. - assert.equal(skillsWithActions, 49); + assert.equal(skillsWithActions, 50); }); test("a table that declares no action column cites nothing, whatever its cells read", () => {