Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .ai/ideas/implemented/002-self-correcting-auto-merge.md
Original file line number Diff line number Diff line change
@@ -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`
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion docs/ai-workflow-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
8 changes: 7 additions & 1 deletion scripts/setup-ai-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
Loading