diff --git a/.ai/ideas/implemented/002-self-correcting-auto-merge.md b/.ai/ideas/implemented/002-self-correcting-auto-merge.md new file mode 100644 index 0000000..068731a --- /dev/null +++ b/.ai/ideas/implemented/002-self-correcting-auto-merge.md @@ -0,0 +1,60 @@ +# Self-correcting auto-merge + +## Status + +implemented + +## Problem + +Self-correcting review mode (idea 001) skipped human CR for eligible work but +still required a human to merge. Folding merge into the same +`self-correcting-review` comment mixed “skip CR” with “agent merges” and made +the safer opt-in harder to choose deliberately. + +## Goal + +Add an explicit optional suffix `auto-merge` so owners can authorize squash +merge separately: + +- `/execute-goal self-correcting-review` — skip human CR when eligible; human + merges +- `/execute-goal self-correcting-review auto-merge` — same + Goal Executor + squash-merges when eligible +- `/execute-project self-correcting-review` — same CR-skip for delegated goals; + human merges +- `/execute-project self-correcting-review auto-merge` — same + Goal Executor + squash-merges eligible delegated PRs + +Keep material-decision, dangerous-action, and high/security-sensitive stops. +Default `/execute-goal` / `/execute-project` still stop before merge. + +## Scope + +Documentation and policy only: + +- Autonomy policy: separate self-correcting vs `auto-merge` authorization +- Self-correcting loop, Done, execute-goal, full workflow, git PR procedure +- Goal Executor / Project Executor runtimes, comment-filter regexes, production + setup +- Issue templates, adapters, and idea/decision memory + +## Non-goals + +- GitHub auto-merge queue enablement +- Force push, history rewrite, or branch-protection bypass +- Relaxing material / dangerous / high-risk stops +- Changing default-mode behavior +- Making bare `self-correcting-review` merge by itself + +## Supersedes + +Idea 001 open question “Human merge still mandatory in v1; auto-merge out of +scope” — superseded by this optional `auto-merge` flag. + +## Related + +- `.ai/policies/autonomy-and-authorization.md` +- `.ai/git/branch-and-pr-workflow.md` (Authorized self-correcting merge) +- `.ai/review/self-correcting-review-loop.md` +- `.ai/automation/goal-executor.md` +- `.ai/automation/project-executor.md` diff --git a/CHANGELOG.md b/CHANGELOG.md index e3152d2..a075f6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Track `.ai/ideas/implemented/` docs referenced by `decisions.md` + ## [1.1.1] - 2026-08-09 ### Fixed diff --git a/docs/ai-workflow-setup.md b/docs/ai-workflow-setup.md index 5c84ce8..2c51c9b 100644 --- a/docs/ai-workflow-setup.md +++ b/docs/ai-workflow-setup.md @@ -22,7 +22,8 @@ git submodule update --init --recursive .ai-template After setup, `.ai/` is a local merge of the private template plus committed diffrat product files under `.ai/project/`, `.ai/docs/project-requirements.md`, -and related paths. +and related paths. Tracked `.ai/ideas/` overlays product entries; template +`implemented/` wins on rematerialize. ## Full workflow validation (local) diff --git a/scripts/setup-ai-workflow.sh b/scripts/setup-ai-workflow.sh index e0f9a36..97fc354 100755 --- a/scripts/setup-ai-workflow.sh +++ b/scripts/setup-ai-workflow.sh @@ -35,7 +35,13 @@ rsync -a --delete "${TEMPLATE}/.ai/" "${AI}/" cp -a "${OVERLAY}/project" "${AI}/" if [[ -d "${OVERLAY}/.ai/ideas" ]]; then mkdir -p "${AI}/ideas" - cp -a "${OVERLAY}/.ai/ideas/." "${AI}/ideas/" + # Product ideas overlay; template keeps implemented/* (--ignore-existing fills gaps). + rsync -a --exclude 'implemented/' "${OVERLAY}/.ai/ideas/" "${AI}/ideas/" + if [[ -d "${OVERLAY}/.ai/ideas/implemented" ]]; then + mkdir -p "${AI}/ideas/implemented" + rsync -a --ignore-existing \ + "${OVERLAY}/.ai/ideas/implemented/" "${AI}/ideas/implemented/" + fi fi mkdir -p "${AI}/stack-profiles" "${AI}/architecture" "${AI}/docs" cp "${OVERLAY}/diffrat-cli.md" "${AI}/stack-profiles/"