Repository navigation
Description
Finding
PR #582 adds .agents/skills/feature-plan/scripts/plan_check.py, the mechanical gate the rewritten feature-plan skill runs before the fresh-context validator (SKILL.md step 11; references/validation.md §1: "Fix everything it prints before launching the validator"). Its parse() stores steps in a dict keyed by step number with no duplicate guard:
# .agents/skills/feature-plan/scripts/plan_check.py:37 (PR #582 head d6d5c7a17e39d606ad7f1f73c7ac63afdbe8ca68)
steps[step] = {"wave": wave, "parallel": bool(found[2]), "text": ""}A second step with the same number silently overwrites the first, so the overwritten step is never checked at all — and two same-numbered steps in one wave defeat the same-wave file-collision check, because both steps collapse into one dict entry.
Evidence
Reproduced against PR #582's head (d6d5c7a1) with a plan containing two complete steps, both numbered 1, both in Wave 1, both writing scripts/shared.py:
$ python3 -I .agents/skills/feature-plan/scripts/plan_check.py plan.md
ok: 1 steps in 1 waves (exit 0)
Expected: a duplicate-step-number diagnostic (exit 1), and/or wave 1: scripts/shared.py written by steps 1, 1. Instead the checker reports one step and ok. A cross-wave variant (step 1 in Wave 1 and again in Wave 2) likewise produces no duplicate diagnostic — the Wave 1 step simply disappears from every check (fields, requires, files).
Step numbers are load-bearing in this format, which is why the silent overwrite matters:
references/plan-outline.md§4 (PR docs(repo): rewrite feature-plan and implementation-orchestrate skills #582): "Numbering. One sequence across the whole plan… Once issues exist, numbers never change."references/issues.md§1 (PR docs(repo): rewrite feature-plan and implementation-orchestrate skills #582): implement-issue markers carry the step number ("step":"3"), andblockedBylinks are built fromRequires:step numbers — a duplicated number makes two steps indistinguishable downstream.references/validation.md§1 lists the file-collision and missing-field checks as whatplan_check.pyguarantees before the validator runs; both are void for an overwritten step.
Why it matters
plan_check.py is the only mechanical check in the S7 flow; everything after it (validator, zero-context readers, issue creation) trusts its ok. A plan author who renumbers or copy-pastes a step — the exact accident a mechanical checker exists to catch — gets a green ok while one step escapes every field, wave and file-collision check, and two colliding writers can be scheduled into the same wave.
Acceptance criteria
-
plan_check.pyexits 1 and prints a clear diagnostic (e.g.step 1: duplicate step number) when a plan reuses a step number, in the same wave or across waves. - The same-wave/same-file repro above no longer prints
ok. - A regression test or fixture covers duplicate step numbers (same-wave and cross-wave).
- Existing behaviour is unchanged for well-formed plans (the PR body's sample outputs still reproduce).
Found by the pr-diff-review sweep reviewing PR #582 (open, head d6d5c7a17e39d606ad7f1f73c7ac63afdbe8ca68). plan_check.py does not exist on main yet — this is a defect in the PR's new code, filed so it is not lost if the PR merges as-is.
Activity
dezren39 commentedon Oct 26, 2026
Intake review
Still live (verified this run, fleet monitor): on current code main,
.agents/skills/feature-plan/scripts/plan_check.pystill stores steps in a plain dict (steps = {}, populated per step with no duplicate guard visible in the parser), so a duplicated step number still silently overwrites the earlier step exactly as the issue's reproduction shows.Related: filed by pr-diff-review from PR #582 (the feature-plan skill rewrite that added
plan_check.py). No other open issue covers the plan checker.Notes / risks: step numbers are load-bearing downstream (implement-issue markers and
blockedBylinks are built from them), so a duplicate is not a cosmetic problem — the overwritten step escapes the field, wave and same-wave file-collision checks while the checker reportsok. The fix must diagnose the duplicate itself (exit 1), not merely dedupe, or the collision check stays void.Suggested approach: track seen step numbers in
parse()and emit a duplicate-step-number diagnostic (exit 1) naming both waves; add a regression case with two same-numbered steps writing the same file in one wave, expecting the collision diagnostic as well.Labels normalized by the fleet monitor: kind/bug, source/pr-diff-review, status/needs-triage, priority/normal, effort/s.
dezren39 commentedon Nov 1, 2026
Picked up: OpenChamber scheduled lane claimed triage task 2173; checking current implementation and ownership.
dezren39 commentedon Nov 1, 2026
Triage verdict (task 2173): confirmed; route to a scoped fix. At main
cf1b243f8b72a102573492340623efc2dbf692b3,.agents/skills/feature-plan/scripts/plan_check.py:28-39keys steps by number and overwrites duplicates; lines 40-84 validate only surviving entries and lines 96-105 can report success. Add a duplicate-number diagnostic with nonzero exit and regression cases for duplicates in the same and different waves, including a same-file collision example. No runtime reproduction was run; this verdict is based on current code inspection. No related implementation PR found.1 remaining item
dezren39 commentedon Nov 1, 2026
Triage done: task 2173 completed; scoped implementation follow-up task 4840 is queued. Issue remains open; evidence and tests are in the preceding verdict.
dezren39 commentedon Nov 1, 2026
Picked up: OpenChamber scheduled lane claimed implementation task 4840; validating issue #585 and working the scoped duplicate-step-number fix.
dezren39 commentedon Nov 1, 2026
Handed off: Implementation is available for review in PR #3780; duplicate step numbers now fail validation while collision diagnostics remain intact.
dezren39 commentedon Nov 1, 2026
Done: Task 4840 merged via PR #3780 (merge
9770e5579b87129017c6da0de83da340527b408f); issue #585 is closed. Focused and workflow tests passed.