From c8d59e247ede635e22f9a810e4a29919291f7539 Mon Sep 17 00:00:00 2001 From: alexsoyes Date: Thu, 3 Sep 2026 07:11:29 +0800 Subject: [PATCH 1/2] feat(aidd-vcs): add conflict resolution skill Keep ambiguous conflicts untouched and validate only resolved paths. --- README.md | 4 +-- .../review.md | 32 +++++++++++++++++++ docs/CATALOG.md | 1 + plugins/aidd-vcs/.claude-plugin/plugin.json | 8 +++-- plugins/aidd-vcs/CATALOG.md | 9 ++++++ plugins/aidd-vcs/README.md | 5 +-- .../skills/05-resolve-conflict/SKILL.md | 27 ++++++++++++++++ .../05-resolve-conflict/actions/01-resolve.md | 28 ++++++++++++++++ .../assets/resolution-table.md | 7 ++++ 9 files changed, 114 insertions(+), 7 deletions(-) create mode 100644 aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md create mode 100644 plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md create mode 100644 plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md create mode 100644 plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md diff --git a/README.md b/README.md index cfafe29fb..8acc299dd 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ ## Agentic framework for software engineers to produce 100% quality code with IA, agonistically.

- 7 plugins · 40 skills · 2 agents · MIT + 7 plugins · 41 skills · 2 agents · MIT

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) @@ -238,7 +238,7 @@ SDLC loop: plan, implement, assert, audit, review, test, refactor, debug. ### 🌿 [aidd-vcs](plugins/aidd-vcs/README.md) -`5 skills` · stable +`6 skills` · stable Repo init, commits, pull / merge requests, release tags, issues. diff --git a/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md b/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md new file mode 100644 index 000000000..f21d8a22a --- /dev/null +++ b/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md @@ -0,0 +1,32 @@ +# Review: Resolve conflict skill + +- **Verdict**: approve +- **Diff**: `main...working-tree` +- **Axes run**: code, functional, relevancy +- **Date**: 2026_09_03 +- **Findings**: 0 critical, 0 warning, 0 minor + +## Phases + +### Phase 1 — Requested conflict resolution behavior + +- [x] One VCS skill exposes one `resolve` action — `plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md:23` +- [x] Every conflicted hunk or non-text conflict receives a choice row — `plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md:5` +- [x] An uncertain choice emits an unapplied proposal and leaves all conflict files unchanged — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:17` +- [x] Only deterministic conflicts are applied; only resolved files are staged — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:16-18`, `plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md:27-28` +- [x] The skill is discoverable through the VCS plugin manifest and catalogs — `plugins/aidd-vcs/.claude-plugin/plugin.json:16`, `docs/CATALOG.md:87` +- [x] Validation scopes its staged whitespace check to resolved paths — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:19` + +## Findings + +| Sev | Kind | Phase | Location | Issue | Fix | +| --- | ---- | ----- | -------- | ----- | --- | + +## Verification + +| Metric | Value | +| ------ | ----- | +| Verified | 100% (6/6) | +| Files checked | `SKILL.md`, `actions/01-resolve.md`, `assets/resolution-table.md`, plugin manifest, plugin README, both catalogs | +| Unchecked | none | +| Unplanned | manifest and catalog registration are required for discovery; no scope drift | diff --git a/docs/CATALOG.md b/docs/CATALOG.md index dff6ad294..35f895b6e 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -84,6 +84,7 @@ Version-control workflows: repo init, commit, pull/merge request, release tag, i | `02-pull-request` | Create a draft pull or merge request | `01-pull-request` | | `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 Git conflicts or propose a per-conflict choice without changing files | `01-resolve` | ## 🎼 aidd-orchestrator diff --git a/plugins/aidd-vcs/.claude-plugin/plugin.json b/plugins/aidd-vcs/.claude-plugin/plugin.json index 222189e19..2039be4e3 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.2.1", - "description": "External artifacts: repo-init, commit, pull-request, release-tag, issue-create", + "description": "VCS workflows: repo init, commit, pull request, release tag, issue creation, and safe conflict resolution", "author": { "name": "AI-Driven Dev", "url": "https://github.com/ai-driven-dev" @@ -12,7 +12,8 @@ "./skills/01-commit", "./skills/02-pull-request", "./skills/03-release-tag", - "./skills/04-issue-create" + "./skills/04-issue-create", + "./skills/05-resolve-conflict" ], "keywords": [ "git", @@ -20,7 +21,8 @@ "commit", "pull-request", "release", - "version-control" + "version-control", + "conflict-resolution" ], "repository": "https://github.com/ai-driven-dev/framework", "homepage": "https://ai-driven.dev", diff --git a/plugins/aidd-vcs/CATALOG.md b/plugins/aidd-vcs/CATALOG.md index fed85e299..22a3bca3c 100644 --- a/plugins/aidd-vcs/CATALOG.md +++ b/plugins/aidd-vcs/CATALOG.md @@ -13,6 +13,7 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai - [`skills/02-pull-request`](#skills02-pull-request) - [`skills/03-release-tag`](#skills03-release-tag) - [`skills/04-issue-create`](#skills04-issue-create) + - [`skills/05-resolve-conflict`](#skills05-resolve-conflict) --- @@ -71,3 +72,11 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai | `assets` | [issue-template.md](skills/04-issue-create/assets/issue-template.md) | `VCS issue/ticket template` | | `-` | [SKILL.md](skills/04-issue-create/SKILL.md) | `Create an issue in the configured ticketing tool. Use when the user wants to file a bug, open an issue, or report a problem. Not for committing, opening a pull request, or commenting on an existing issue.` | +#### `skills/05-resolve-conflict` + +| Group | File | Description | +|-------|------|---| +| `actions` | [01-resolve.md](skills/05-resolve-conflict/actions/01-resolve.md) | - | +| `assets` | [resolution-table.md](skills/05-resolve-conflict/assets/resolution-table.md) | - | +| `-` | [SKILL.md](skills/05-resolve-conflict/SKILL.md) | `Resolves only deterministic Git conflicts and otherwise proposes choices without changing files. Use when the user wants to resolve a merge, rebase, or cherry-pick conflict. Not for deciding between competing implementations or committing changes.` | + diff --git a/plugins/aidd-vcs/README.md b/plugins/aidd-vcs/README.md index 75e4898df..a0eb7c061 100644 --- a/plugins/aidd-vcs/README.md +++ b/plugins/aidd-vcs/README.md @@ -8,9 +8,9 @@ VCS workflow plugin for the AI-Driven Development framework. First time? Install with `/plugin install aidd-vcs@aidd-framework`, then run `aidd-vcs:01-commit`. -Typical flow: `00-repo-init` once to set up the repo; `01-commit` after each unit of work; `02-pull-request` when the branch is ready; `03-release-tag` at release time; `04-issue-create` from anywhere. +Typical flow: `00-repo-init` once to set up the repo; `01-commit` after each unit of work; `02-pull-request` when the branch is ready; `03-release-tag` at release time; `04-issue-create` from anywhere; `05-resolve-conflict` when Git stops a merge, rebase, or cherry-pick. -Covers all external artifact creation: repo init, commits, pull/merge requests, release tags, and issue tracking. +Covers repository setup, commits, pull/merge requests, release tags, issue tracking, and safe Git conflict resolution. ## Skills @@ -21,6 +21,7 @@ Covers all external artifact creation: repo init, commits, pull/merge requests, | [3.2] | [pull-request](skills/02-pull-request/SKILL.md) | Create PR (GitHub) or MR (GitLab) with filled template. | | [3.3] | [release-tag](skills/03-release-tag/SKILL.md) | Create and push a semantic version git tag with release notes. | | [3.4] | [issue-create](skills/04-issue-create/SKILL.md) | Create issues in the configured ticketing tool. | +| [3.5] | [resolve-conflict](skills/05-resolve-conflict/SKILL.md) | Resolve deterministic Git conflicts, or propose a per-conflict choice without changing files. | ## Assets diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md b/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md new file mode 100644 index 000000000..4c2fb33c4 --- /dev/null +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md @@ -0,0 +1,27 @@ +--- +name: resolve-conflict +description: Resolves only deterministic Git conflicts and otherwise proposes choices without changing files. Use when the user wants to resolve a merge, rebase, or cherry-pick conflict. Not for deciding between competing implementations or committing changes. +--- + +# Resolve Conflict + +```mermaid +flowchart LR + start([active Git conflict]) --> resolve + resolve -->|no active conflict| none([report no conflict]) + resolve -->|all decisions deterministic| applied([resolve and report]) + resolve -->|any decision uncertain| proposal([propose and stop]) +``` + +## Actions + +Read only the next action file. + +| Action | Does | +| ------ | ---- | +| resolve | resolve safe conflicts or propose a choice | + +## Transversal rules + +- Never commit, discard, reset, or check out changes. +- Stage only files resolved by this skill, never unrelated files. diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md b/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md new file mode 100644 index 000000000..87451423f --- /dev/null +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md @@ -0,0 +1,28 @@ +# 01 - Resolve + +Resolve an active Git conflict only when its complete decision set is deterministic. + +## Input + +An active Git merge, rebase, or cherry-pick conflict. + +## Output + +A resolved working tree and decision table, or an unapplied proposal table, formatted with [resolution table](../assets/resolution-table.md). + +## Process + +1. **Inspect.** Read the active Git operation, every unmerged path, and the complete content of each conflicted hunk; when no unmerged path exists, report that no active conflict was found and stop. +2. **Classify.** Add one row per conflict to the [resolution table](../assets/resolution-table.md); mark a hunk deterministic only when both sides contain exactly the same content, and otherwise propose to keep ours, keep theirs, or combine both with concrete reasoning. +3. **Gate.** Continue only when every row is deterministic; otherwise present the table with `Proposed` status and stop without changing or staging files. +4. **Resolve.** Replace every deterministic conflict marker with its common content, then stage the resolved conflict files. +5. **Validate.** Confirm that Git reports no unmerged paths and that `git diff --cached --check -- ` succeeds; if either check fails, stop and report the failed check without touching unrelated files. + +## Test + +| Case | Pass | +| ---- | ---- | +| identical conflict sides | all conflict markers are removed, Git reports no unmerged paths, and every table row is `Applied` | +| divergent conflict sides | every conflicted file and index entry remain unchanged, and every table row is `Proposed` | +| unrelated staged whitespace error | validation of resolved paths passes and the unrelated staged file remains untouched | +| no active conflict | no file or index entry changes, and the run reports that no active conflict was found | diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md b/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md new file mode 100644 index 000000000..843d4d90b --- /dev/null +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md @@ -0,0 +1,7 @@ +# Conflict resolution decisions + +Replace the example row with one row per conflicted hunk or non-text conflict. Set `Status` to `Applied` only after the change and Git validation complete. Remove this instruction before presenting the table. + +| File | Conflict | Choice | Status | Reason | +| ---- | -------- | ------ | ------ | ------ | +| path | concise hunk or conflict description | keep common content, keep ours, keep theirs, or combine both | Applied or Proposed | concrete evidence for the choice | From 43a01186aa4ef8becb8a002e23d3a13807ae187a Mon Sep 17 00:00:00 2001 From: alexsoyes Date: Thu, 3 Sep 2026 10:51:02 +0800 Subject: [PATCH 2/2] fix(aidd-vcs): apply approved conflict choices --- README.md | 2 +- .../review.md | 16 ++++++------ docs/CATALOG.md | 2 +- plugins/aidd-vcs/.claude-plugin/plugin.json | 2 +- plugins/aidd-vcs/CATALOG.md | 2 +- plugins/aidd-vcs/README.md | 6 ++--- .../skills/05-resolve-conflict/SKILL.md | 9 ++++--- .../05-resolve-conflict/actions/01-resolve.md | 25 ++++++++++--------- .../assets/resolution-table.md | 4 +-- 9 files changed, 34 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 8acc299dd..6309c3dc4 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ SDLC loop: plan, implement, assert, audit, review, test, refactor, debug. `6 skills` · stable -Repo init, commits, pull / merge requests, release tags, issues. +Repo init, commits, pull / merge requests, release tags, issues, conflict resolution. diff --git a/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md b/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md index f21d8a22a..f37d27917 100644 --- a/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md +++ b/aidd_docs/tasks/2026_09/2026_09_02_resolve-conflict-skill/review.md @@ -8,14 +8,14 @@ ## Phases -### Phase 1 — Requested conflict resolution behavior +### Phase 1 — Conflict resolution - [x] One VCS skill exposes one `resolve` action — `plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md:23` -- [x] Every conflicted hunk or non-text conflict receives a choice row — `plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md:5` -- [x] An uncertain choice emits an unapplied proposal and leaves all conflict files unchanged — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:17` -- [x] Only deterministic conflicts are applied; only resolved files are staged — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:16-18`, `plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md:27-28` -- [x] The skill is discoverable through the VCS plugin manifest and catalogs — `plugins/aidd-vcs/.claude-plugin/plugin.json:16`, `docs/CATALOG.md:87` -- [x] Validation scopes its staged whitespace check to resolved paths — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:19` +- [x] Each hunk or non-text conflict gets a choice row — `plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md:5` +- [x] An unapproved proposal changes nothing — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:17` +- [x] Approved matching choices apply and stage resolved paths — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:16-18` +- [x] Validation checks only resolved paths — `plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md:19` +- [x] Manifest, catalogs, and root summary expose the skill — `plugins/aidd-vcs/.claude-plugin/plugin.json:16`, `docs/CATALOG.md:87`, `README.md:243` ## Findings @@ -27,6 +27,6 @@ | Metric | Value | | ------ | ----- | | Verified | 100% (6/6) | -| Files checked | `SKILL.md`, `actions/01-resolve.md`, `assets/resolution-table.md`, plugin manifest, plugin README, both catalogs | +| Files checked | `SKILL.md`, `actions/01-resolve.md`, `resolution-table.md`, plugin manifest, READMEs, catalogs | | Unchecked | none | -| Unplanned | manifest and catalog registration are required for discovery; no scope drift | +| Unplanned | none | diff --git a/docs/CATALOG.md b/docs/CATALOG.md index 35f895b6e..62c1af1bd 100644 --- a/docs/CATALOG.md +++ b/docs/CATALOG.md @@ -84,7 +84,7 @@ Version-control workflows: repo init, commit, pull/merge request, release tag, i | `02-pull-request` | Create a draft pull or merge request | `01-pull-request` | | `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 Git conflicts or propose a per-conflict choice without changing files | `01-resolve` | +| `05-resolve-conflict` | Resolve deterministic conflicts or approved choices | `01-resolve` | ## 🎼 aidd-orchestrator diff --git a/plugins/aidd-vcs/.claude-plugin/plugin.json b/plugins/aidd-vcs/.claude-plugin/plugin.json index 2039be4e3..949549436 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.2.1", - "description": "VCS workflows: repo init, commit, pull request, release tag, issue creation, and safe conflict resolution", + "description": "VCS: init, commit, pull request, release, issues, conflict resolution", "author": { "name": "AI-Driven Dev", "url": "https://github.com/ai-driven-dev" diff --git a/plugins/aidd-vcs/CATALOG.md b/plugins/aidd-vcs/CATALOG.md index 22a3bca3c..ec2b3490c 100644 --- a/plugins/aidd-vcs/CATALOG.md +++ b/plugins/aidd-vcs/CATALOG.md @@ -78,5 +78,5 @@ Auto-generated index of skills, agents, references and assets shipped by the `ai |-------|------|---| | `actions` | [01-resolve.md](skills/05-resolve-conflict/actions/01-resolve.md) | - | | `assets` | [resolution-table.md](skills/05-resolve-conflict/assets/resolution-table.md) | - | -| `-` | [SKILL.md](skills/05-resolve-conflict/SKILL.md) | `Resolves only deterministic Git conflicts and otherwise proposes choices without changing files. Use when the user wants to resolve a merge, rebase, or cherry-pick conflict. Not for deciding between competing implementations or committing changes.` | +| `-` | [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.` | diff --git a/plugins/aidd-vcs/README.md b/plugins/aidd-vcs/README.md index a0eb7c061..4b16f3a20 100644 --- a/plugins/aidd-vcs/README.md +++ b/plugins/aidd-vcs/README.md @@ -8,9 +8,7 @@ VCS workflow plugin for the AI-Driven Development framework. First time? Install with `/plugin install aidd-vcs@aidd-framework`, then run `aidd-vcs:01-commit`. -Typical flow: `00-repo-init` once to set up the repo; `01-commit` after each unit of work; `02-pull-request` when the branch is ready; `03-release-tag` at release time; `04-issue-create` from anywhere; `05-resolve-conflict` when Git stops a merge, rebase, or cherry-pick. - -Covers repository setup, commits, pull/merge requests, release tags, issue tracking, and safe Git conflict resolution. +Flow: init once; commit each change; open PRs when ready; tag releases; file issues anywhere; resolve conflicts when Git stops. ## Skills @@ -21,7 +19,7 @@ Covers repository setup, commits, pull/merge requests, release tags, issue track | [3.2] | [pull-request](skills/02-pull-request/SKILL.md) | Create PR (GitHub) or MR (GitLab) with filled template. | | [3.3] | [release-tag](skills/03-release-tag/SKILL.md) | Create and push a semantic version git tag with release notes. | | [3.4] | [issue-create](skills/04-issue-create/SKILL.md) | Create issues in the configured ticketing tool. | -| [3.5] | [resolve-conflict](skills/05-resolve-conflict/SKILL.md) | Resolve deterministic Git conflicts, or propose a per-conflict choice without changing files. | +| [3.5] | [resolve-conflict](skills/05-resolve-conflict/SKILL.md) | Resolve deterministic conflicts or approved choices. | ## Assets diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md b/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md index 4c2fb33c4..a40e0f567 100644 --- a/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/SKILL.md @@ -1,6 +1,6 @@ --- name: resolve-conflict -description: Resolves only deterministic Git conflicts and otherwise proposes choices without changing files. Use when the user wants to resolve a merge, rebase, or cherry-pick conflict. Not for deciding between competing implementations or committing changes. +description: 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. --- # Resolve Conflict @@ -9,8 +9,9 @@ description: Resolves only deterministic Git conflicts and otherwise proposes ch flowchart LR start([active Git conflict]) --> resolve resolve -->|no active conflict| none([report no conflict]) - resolve -->|all decisions deterministic| applied([resolve and report]) - resolve -->|any decision uncertain| proposal([propose and stop]) + resolve -->|all rows decided| applied([resolve and report]) + resolve -->|approval needed| proposal([propose and stop]) + proposal -->|approved table| resolve ``` ## Actions @@ -19,7 +20,7 @@ Read only the next action file. | Action | Does | | ------ | ---- | -| resolve | resolve safe conflicts or propose a choice | +| resolve | resolve conflicts or propose choices | ## Transversal rules diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md b/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md index 87451423f..98d0b96ba 100644 --- a/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/actions/01-resolve.md @@ -1,28 +1,29 @@ # 01 - Resolve -Resolve an active Git conflict only when its complete decision set is deterministic. +Resolve deterministic conflicts or approved proposals. ## Input -An active Git merge, rebase, or cherry-pick conflict. +An active conflict, optionally with its approved decision table. ## Output -A resolved working tree and decision table, or an unapplied proposal table, formatted with [resolution table](../assets/resolution-table.md). +A resolved working tree and decision table, or an unapplied proposal, formatted with [resolution table](../assets/resolution-table.md). ## Process -1. **Inspect.** Read the active Git operation, every unmerged path, and the complete content of each conflicted hunk; when no unmerged path exists, report that no active conflict was found and stop. -2. **Classify.** Add one row per conflict to the [resolution table](../assets/resolution-table.md); mark a hunk deterministic only when both sides contain exactly the same content, and otherwise propose to keep ours, keep theirs, or combine both with concrete reasoning. -3. **Gate.** Continue only when every row is deterministic; otherwise present the table with `Proposed` status and stop without changing or staging files. -4. **Resolve.** Replace every deterministic conflict marker with its common content, then stage the resolved conflict files. -5. **Validate.** Confirm that Git reports no unmerged paths and that `git diff --cached --check -- ` succeeds; if either check fails, stop and report the failed check without touching unrelated files. +1. **Inspect.** Read the operation, unmerged paths, and conflicted hunks; if none exist, report and stop. +2. **Decide.** Add one row per conflict to the [resolution table](../assets/resolution-table.md): matching approved rows keep their choice; identical sides keep common content; otherwise propose ours, theirs, or both with a reason. +3. **Gate.** If a proposal lacks approval, return the unchanged table and stop; otherwise confirm approved rows still match. +4. **Resolve.** Apply every decided row and stage the resolved paths. +5. **Validate.** Confirm no unmerged paths and a cached whitespace check limited to resolved paths; otherwise report the failed check. ## Test | Case | Pass | | ---- | ---- | -| identical conflict sides | all conflict markers are removed, Git reports no unmerged paths, and every table row is `Applied` | -| divergent conflict sides | every conflicted file and index entry remain unchanged, and every table row is `Proposed` | -| unrelated staged whitespace error | validation of resolved paths passes and the unrelated staged file remains untouched | -| no active conflict | no file or index entry changes, and the run reports that no active conflict was found | +| deterministic conflict | markers are removed, Git has no unmerged paths, and rows are `Applied` | +| unapproved proposal | conflicted files and index entries stay unchanged, and rows are `Proposed` | +| approved proposal | matching choices apply, Git has no unmerged paths, and rows are `Applied` | +| unrelated staged error | resolved-path validation passes and the unrelated file stays untouched | +| no active conflict | no file or index entry changes, and the run reports no conflict | diff --git a/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md b/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md index 843d4d90b..98199bea6 100644 --- a/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md +++ b/plugins/aidd-vcs/skills/05-resolve-conflict/assets/resolution-table.md @@ -1,7 +1,7 @@ # Conflict resolution decisions -Replace the example row with one row per conflicted hunk or non-text conflict. Set `Status` to `Applied` only after the change and Git validation complete. Remove this instruction before presenting the table. +Replace the example with one row per hunk or non-text conflict. Set `Applied` only after Git validation. Remove this instruction before presenting the table. | File | Conflict | Choice | Status | Reason | | ---- | -------- | ------ | ------ | ------ | -| path | concise hunk or conflict description | keep common content, keep ours, keep theirs, or combine both | Applied or Proposed | concrete evidence for the choice | +| path | exact hunk or conflict | common content, ours, theirs, or both | Applied or Proposed | choice evidence |