fix(quick-dev): persist review loop counter
Store the review loop counter in spec frontmatter so loopbacks cannot reset it by re-reading the review step file.
This commit is contained in:
parent
71a2f1e0c5
commit
bcca8da31f
|
|
@ -3,6 +3,7 @@ title: '{title}'
|
||||||
type: 'feature' # feature | bugfix | refactor | chore
|
type: 'feature' # feature | bugfix | refactor | chore
|
||||||
created: '{date}'
|
created: '{date}'
|
||||||
status: 'draft' # draft | ready-for-dev | in-progress | in-review | done
|
status: 'draft' # draft | ready-for-dev | in-progress | in-review | done
|
||||||
|
review_loop_iteration: 0 # incremented by step-04 before each review loopback
|
||||||
context: [] # optional: `{project-root}/`-prefixed paths to project-wide standards/docs the implementation agent should load. Keep short — only what isn't already distilled into the spec body.
|
context: [] # optional: `{project-root}/`-prefixed paths to project-wide standards/docs the implementation agent should load. Keep short — only what isn't already distilled into the spec body.
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
---
|
---
|
||||||
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
deferred_work_file: '{implementation_artifacts}/deferred-work.md'
|
||||||
specLoopIteration: 1
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# Step 4: Review
|
# Step 4: Review
|
||||||
|
|
@ -37,7 +36,7 @@ Launch two subagents without conversation context. If no sub-agents are availabl
|
||||||
- **patch** — caused by the change; trivially fixable without human input. Just part of the diff.
|
- **patch** — caused by the change; trivially fixable without human input. Just part of the diff.
|
||||||
- **defer** — pre-existing issue not caused by this story, surfaced incidentally by the review. Collect for later focused attention.
|
- **defer** — pre-existing issue not caused by this story, surfaced incidentally by the review. Collect for later focused attention.
|
||||||
- **reject** — noise. Drop silently. When unsure between defer and reject, prefer reject — only defer findings you are confident are real.
|
- **reject** — noise. Drop silently. When unsure between defer and reject, prefer reject — only defer findings you are confident are real.
|
||||||
3. Process findings in cascading order. If intent_gap or bad_spec findings exist, they trigger a loopback — lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Increment `{specLoopIteration}` on each loopback. If it exceeds 5, HALT and escalate to the human.
|
3. Process findings in cascading order. If intent_gap or bad_spec findings exist, they trigger a loopback — lower findings are moot since code will be re-derived. If neither exists, process patch and defer normally. Before each loopback, read `{spec_file}` frontmatter `review_loop_iteration` (missing means `0`), increment it by 1, and write it back. If it exceeds 5, HALT and escalate to the human.
|
||||||
- **intent_gap** — Root cause is inside `<frozen-after-approval>`. Revert code changes. Loop back to the human to resolve. Once resolved, read fully and follow `./step-02-plan.md` to re-run steps 2–4.
|
- **intent_gap** — Root cause is inside `<frozen-after-approval>`. Revert code changes. Loop back to the human to resolve. Once resolved, read fully and follow `./step-02-plan.md` to re-run steps 2–4.
|
||||||
- **bad_spec** — Root cause is outside `<frozen-after-approval>`. Before reverting code: extract KEEP instructions for positive preservation (what worked well and must survive re-derivation). Revert code changes. Read the `## Spec Change Log` in `{spec_file}` and strictly respect all logged constraints when amending the non-frozen sections that contain the root cause. Append a new change-log entry recording: the triggering finding, what was amended, the known-bad state avoided, and the KEEP instructions. Read fully and follow `./step-03-implement.md` to re-derive the code, then this step will run again.
|
- **bad_spec** — Root cause is outside `<frozen-after-approval>`. Before reverting code: extract KEEP instructions for positive preservation (what worked well and must survive re-derivation). Revert code changes. Read the `## Spec Change Log` in `{spec_file}` and strictly respect all logged constraints when amending the non-frozen sections that contain the root cause. Append a new change-log entry recording: the triggering finding, what was amended, the known-bad state avoided, and the KEEP instructions. Read fully and follow `./step-03-implement.md` to re-derive the code, then this step will run again.
|
||||||
- **patch** — Auto-fix. These are the only findings that survive loopbacks.
|
- **patch** — Auto-fix. These are the only findings that survive loopbacks.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue