Skip to content

fix(gate-check): Stage 4 FAILs a build plan without its closing rows - #192

Open
MendixMau wants to merge 1 commit into
masterfrom
feat/look-enforced
Open

MendixMau wants to merge 1 commit into
masterfrom
feat/look-enforced

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Direct lane

What changed and why (one paragraph):
check_stage_4 only checked that build-plan.md existed and that a Stage-4 decision was CONFIRMED. A plan missing the three closing rows brd-to-build-plan.md requires (a verify-module.sh <Module> row per module, ⌈N/3⌉ coherence-pass rows when N ≥ 2, and a final gate-check.sh … 5 row) passed the gate — and nothing that walks the plan performs a step the plan does not list, so per-module verification and the LOOK never ran. The gate now counts those rows against the module denominator (brief dirs under modules/ plus ## Module brief — X headings; if neither exists, the modules named by close rows, with at least one owed). Only numbered step rows count, and when any row carries a Kind cell (BRIEF/BUILD/PROVE/RUN/HARNESS) only Kind rows count, so numbered question tables are not mistaken for steps. A plan with no numbered rows reports "not counted" and passes as before. The skill gains one paragraph saying the gate now checks this.

Supersedes #189 — this implements the fix #189 proposed. Please close #189 rather than merging it (its branch history carries a commit that should not land on master; closing keeps master clean).

Field evidence: the #189 field report — an unattended requirements-driven build whose approved 137-row plan covered 7 modules and had no closing rows; Stage 4 passed it, and the build declared modules done that were never verified or looked at. Re-run against that plan shape (module dirs, no closing rows), the new gate FAILs and names the missing modules, the missing coherence rows and the missing final gate row.

  • No client data anywhere in the diff (leak guard: "no client data detected in 718 tracked files"; private-name grep clean on added lines)
  • Size cap: 4 files, +103/−4
  • Test tier: T0 — probe runs against seven plan shapes (field shape → FAIL with gaps named; complete plan → PASS 3/3; no dirs + close rows for 2 → PASS 2/2; no dirs, no close rows → FAIL; no numbered rows → PASS "not counted"; brief section → PASS 1/1; last row a stage-3 gate → FAIL). New fixture block T16 in tests/wave2/test-bug03-gates.sh encodes four of them. T1 (bash tests/wave2/test-bug03-gates.sh bin/gate-check.sh) pending maintainer OK; T3 runs in CI. Existing fixtures that use plans with no numbered rows (T13, test-bug02-register) stay PASS by construction.
  • Instrument rules: input is a plan markdown file, no tool output parsed; pure bash/grep/sed, no platform-specific tools; layout-independent (plan path is resolved by the existing check_stage_4 lookup)
  • CHANGELOG.md line appended under ## Unreleased, credited to the inbox: stage-4 gate passes a build plan without the mandatory closing rows (#163 unenforced) #189 field report

Note: a plan approved before this rule FAILs Stage 4 until the rows are added — intended, and stated in the skill.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw


Generated by Claude Code

check_stage_4 only checked that build-plan.md existed and a Stage-4 decision
was CONFIRMED. A plan missing the three closing rows from brd-to-build-plan.md
(verify-module.sh per module, coherence passes, final gate-check 5 row) passed,
and nothing that walks the plan does a step it does not list.

Now counts the rows against the module denominator (brief dirs + "Module
brief" headings, else modules named by close rows). Plans with no numbered
step rows are "not counted" and pass as before. Fixture T16 added.

Implements the fix proposed in #189.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VJgWP5vEoAsNsJYqCDMGNw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants