fix(atlas): gate final-wave approval on real plan state

Ignore nested plan checkboxes and track parallel final-wave approvals so Atlas only pauses for user approval when the real top-level review wave is complete.

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
YeonGyu-Kim
2026-03-14 13:47:40 +09:00
parent 1ad5db4e8b
commit 16b0d9eb77
10 changed files with 336 additions and 46 deletions
+13
View File
@@ -130,4 +130,17 @@ describe("Atlas prompts plan path consistency", () => {
expect(prompt).toMatch(/read[\s\S]*?\.sisyphus\/plans\//)
}
})
test("all variants should distinguish top-level plan tasks from nested checkboxes", () => {
// given
const prompts = [ATLAS_SYSTEM_PROMPT, ATLAS_GPT_SYSTEM_PROMPT, ATLAS_GEMINI_SYSTEM_PROMPT]
// when / then
for (const prompt of prompts) {
const lowerPrompt = prompt.toLowerCase()
expect(lowerPrompt).toMatch(/top-level.*checkbox/)
expect(lowerPrompt).toMatch(/ignore nested.*checkbox/)
expect(lowerPrompt).toMatch(/final verification wave/)
}
})
})
+4 -2
View File
@@ -140,7 +140,8 @@ TodoWrite([
## Step 1: Analyze Plan
1. Read the todo list file
2. Parse incomplete checkboxes \`- [ ]\`
2. Parse actionable **top-level** task checkboxes in \`## TODOs\` and \`## Final Verification Wave\`
- Ignore nested checkboxes under Acceptance Criteria, Evidence, Definition of Done, and Final Checklist sections.
3. Extract parallelizability info from each task
4. Build parallelization map:
- Which tasks can run simultaneously?
@@ -242,7 +243,7 @@ After verification, READ the plan file directly — every time, no exceptions:
\`\`\`
Read(".sisyphus/plans/{plan-name}.md")
\`\`\`
Count remaining \`- [ ]\` tasks. This is your ground truth for what comes next.
Count remaining **top-level task** checkboxes. Ignore nested verification/evidence checkboxes. This is your ground truth for what comes next.
**Checklist (ALL must be checked):**
\`\`\`
@@ -296,6 +297,7 @@ Repeat Step 3 until all implementation tasks complete. Then proceed to Step 4.
The plan's Final Wave tasks (F1-F4) are APPROVAL GATES — not regular tasks.
Each reviewer produces a VERDICT: APPROVE or REJECT.
Final-wave reviewers can finish in parallel before you update the plan file, so do NOT rely on raw unchecked-count alone.
1. Execute all Final Wave tasks in parallel
2. If ANY verdict is REJECT:
+4 -2
View File
@@ -157,7 +157,8 @@ TodoWrite([
## Step 1: Analyze Plan
1. Read the todo list file
2. Parse incomplete checkboxes \`- [ ]\`
2. Parse actionable **top-level** task checkboxes in \`## TODOs\` and \`## Final Verification Wave\`
- Ignore nested checkboxes under Acceptance Criteria, Evidence, Definition of Done, and Final Checklist sections.
3. Build parallelization map
Output format:
@@ -263,7 +264,7 @@ ALL three must be YES. "Probably" = NO. "I think so" = NO.
\`\`\`
Read(".sisyphus/plans/{plan-name}.md")
\`\`\`
Count remaining \`- [ ]\` tasks.
Count remaining **top-level task** checkboxes. Ignore nested verification/evidence checkboxes.
### 3.5 Handle Failures
@@ -284,6 +285,7 @@ Repeat Step 3 until all implementation tasks complete. Then proceed to Step 4.
The plan's Final Wave tasks (F1-F4) are APPROVAL GATES — not regular tasks.
Each reviewer produces a VERDICT: APPROVE or REJECT.
Final-wave reviewers can finish in parallel before you update the plan file, so do NOT rely on raw unchecked-count alone.
1. Execute all Final Wave tasks in parallel
2. If ANY verdict is REJECT:
+4 -2
View File
@@ -167,7 +167,8 @@ TodoWrite([
## Step 1: Analyze Plan
1. Read the todo list file
2. Parse incomplete checkboxes \`- [ ]\`
2. Parse actionable **top-level** task checkboxes in \`## TODOs\` and \`## Final Verification Wave\`
- Ignore nested checkboxes under Acceptance Criteria, Evidence, Definition of Done, and Final Checklist sections.
3. Build parallelization map
Output format:
@@ -268,7 +269,7 @@ Before moving to the next task, answer these THREE questions honestly:
\`\`\`
Read(".sisyphus/plans/{plan-name}.md")
\`\`\`
Count remaining \`- [ ]\` tasks. This is your ground truth.
Count remaining **top-level task** checkboxes. Ignore nested verification/evidence checkboxes. This is your ground truth.
### 3.5 Handle Failures
@@ -289,6 +290,7 @@ Repeat Step 3 until all implementation tasks complete. Then proceed to Step 4.
The plan's Final Wave tasks (F1-F4) are APPROVAL GATES — not regular tasks.
Each reviewer produces a VERDICT: APPROVE or REJECT.
Final-wave reviewers can finish in parallel before you update the plan file, so do NOT rely on raw unchecked-count alone.
1. Execute all Final Wave tasks in parallel
2. If ANY verdict is REJECT: