diff --git a/AGENTS.md b/AGENTS.md index 607d6649..1346a5a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -35,11 +35,12 @@ Untracked files in the main checkout can vanish between agent sessions. To preve When archiving a change, always perform the complete close-out sequence: -1. **Commit** any uncommitted implementation work in the agent worktree. -2. **Merge** the agent branch into the integration branch from the main checkout. -3. **Push** the integration branch to origin. -4. **Archive** the change artifacts (`mv openspec/changes/ openspec/changes/archive/YYYY-MM-DD-`). -5. **Remove the worktree and branch:** +1. **Sync specs.** Ensure OpenSpec artifacts (proposal, design, specs, tasks) reflect what was actually built — not just what was originally planned. Implementation always teaches things the spec didn't anticipate. +2. **Commit** any uncommitted implementation work in the agent worktree. +3. **Merge** the agent branch into the integration branch from the main checkout. +4. **Push** the integration branch to origin. +5. **Archive** the change artifacts (`mv openspec/changes/ openspec/changes/archive/YYYY-MM-DD-`). +6. **Remove the worktree and branch:** ```bash git worktree remove .worktree/ --force git branch -d agent/