Repository navigation
new(ready, ci): READY only via bin/ready.sh, evidence in git, and a CI gate an agent cannot skip - #788
Merged
Conversation
bin/ready.sh runs gate-check Stage 5 (Stage 6 from the register's position), the look ledger, the must-have list when present and, under Interview mode auto, an independent reviewer's scored verdict file. K of N per check; exits non-zero unless all pass; writes the READY line itself and commits docs/progress/ready-<date>-<scope>.md with explicit paths. look-ledger.sh summary --write puts the git-ignored ledger into a tracked docs/progress/look-summary.tsv (ready.sh, close-task.sh); gate-check Stage 5 reads it when the ledger is absent, so a copy of the repo FAILs, not MANUAL. Field evidence: two unattended field runs, 2026-11 — READY hand-written with 0 of ~78 pages looked at; another kit marked ready 3 hours early, no review. Exercised against a project rebuilt from the captured lab-app pages and screenshots (tests/wave2/fixtures/look-shots), both layouts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
…rite bin/ci-gates.sh runs in the project's CI (templates/ci/toolkit-gates.yml, installed create-if-absent by init and sync) over the committed tree at the pinned toolkit commit. It fails on the claimed stage's gate FAIL, on a READY line bin/ready.sh did not write (bin/lib/ready-claims.sh, also a Stage 6 FAIL), on committed unseen pages under a done-claim, and on model work before Stage 4. It takes seconds and needs no Mendix runtime. ready.sh also writes a review packet (paths only, never images), reads T1's must-have mark on the tracked path docs/progress/must-haves/<Module>.md, and names every app of a multi-app project instead of checking nothing. Field evidence: the same two unattended field runs (2026-11). Exercised on fresh clones of projects built from the captured lab-app pages/screenshots. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
…ble look count ready.sh adds a position row: stages P and 0-4 must each be PASS, WAIVED (an --adopt point) or not owed by the entry mode, from one read-only full gate-check run. A field run wrote READY with Stage P never passed; a look accounted for in Stage 5 is not enough on its own. ready.sh also honours `Waived obligation must-haves[/<Module>]` and shows an ADVISORY obligation verdict without blocking. ci-gates.sh prints "look: K of N pages seen" on every look line, as a warning when it does not fail. Fixtures join at Build through gate-check's own --waive P / --adopt 5; new R8: Stage P not passed, every page seen -> NOT READY. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
… guard blocks email-shaped strings) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
…ps, per-app scripts From the parent's field run on a six-app copy: - ready-claims: READY as the first word counts whatever follows it, so "# READY FOR BENCH (fix round 6, ...)" (five times in a field status file) is a claim. Captured shape added to test-ci-gates C1. - ready.sh: every external step names itself on stderr, runs with stdin closed under a watchdog (MXTK_READY_STEP_TIMEOUT, default 120 s) and reports NOT MEASURED when killed; the step subshell clears the EXIT trap so a kill cannot delete $TMP. Not reproduced here (6 apps, 430 BUILD-LOG rows: 1.5 s); the progress lines will name the step on the re-run. R9. - ci-gates order: counts apps/<App>/mdlsource/ via mxtk_apps or the glob. C5. Look now WARNs when exec rows exist but no look summary is committed. - gate-check Stage 5: rows="" — unbound under set -u on a project with no ledger and no summary, which emptied the verdict (regression from 3e9302c). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
…ode for the review Field re-run on e10cf31 (ready.sh finished in 35 s; hang gone): - ready-claims scanned STATUS*.md only; the field claims sit in a lowercase root status.md. Root status*/progress*/resume .md now match in any case. C1d. - `- Interview mode: auto (gate questions go to questions.md ...)` resolves to steering in interview-mode.sh (unparseable -> ask more), which waived the independent review. ready.sh now owes the review when the raw line's first word is auto/unattended, and says so on one line. interview-mode.sh is not changed here. R10. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
… recorded passes, advisory sync
Independent review (MERGE-AFTER-FIX):
1. resume-template.sh and close-task.sh started a line with READY, which the
claim check matches: every fresh project was red on (b) and Stage 6 could
never pass (guard rule 7). Reworded ("Only bin/ready.sh writes READY").
New fixture C6: init -> commit -> ci-gates, (b) PASS, exit 0.
2. test-ci-gates.sh: C0 joins at Build with --adopt 5 (greenfield owes
Stage 0); C4 expects the "mdlsource/ dirs" wording.
3. Check (a) FAILs only on stages the register records as passed ("gates
passed: ..."), one full read-only gate-check run; the stage in progress
WARNs. C3 split into both cases.
4. MXTK_CI_ENFORCE: init installs "1", sync installs "0" with one notice; at
"0" (a) and (d) warn, (b) still fails. Fixtures C7 and I4.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
CI on 8e0a4e9 reaped six orphaned `sleep` processes after the fixture run: when a step finished first, killing the watchdog subshell left its bare `sleep 120` running. The sleep now runs as the watchdog's child and a TERM trap kills it. Timeouts unchanged (checked: a stalled step is still killed at MXTK_READY_STEP_TIMEOUT, rc 124; no sleep survives a normal run). That CI run otherwise: 227 of 228 fixtures pass, test-ready.sh 27/27; the one failure (test-ci-gates C0/C2/C4) is the review finding fixed in 3d30264. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y
# Conflicts: # CHANGELOG.md
6 of 7 tasks
MendixMau
pushed a commit
that referenced
this pull request
Nov 17, 2026
…eenfield waiving stages 1-4 test-ci-gates.sh C0/C2b built projects as `Entry mode: greenfield` and relied on its stage 1-4 waiver; they are requirements-driven now, C2b adopted at 5 (the reviewer's trial: 21/1 -> 22/0). Comments in bin/ci-gates.sh and the resume template's Q1 text name the two doors instead of greenfield. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
MendixMau
added a commit
that referenced
this pull request
Nov 17, 2026
…n rule, design front end (#790) With no declared entry mode or adoption, every exec.sh run, status.sh and the gate-check summary print one warn-only banner: the toolkit treats the project as Stage P, not started. In migration and requirements-driven projects, the first MDL write with no plan evidence is refused once per clone, before any lock, snapshot or write. It clears with an adoption at stage 5 or later, a reasoned stage-4 waiver (including the aggregate `Waived stages: … 4 — reason`), a Stage 5+ readout, or a build plan plus a brief. Never refused: a-la-carte (new), poc, existing-app, --patch and undeclared projects. Documentation adds the greenfield design front end (poc-build steps 1–4) and mapping a supplied prototype as the wireframe (design-artifacts Step 2a; the ui-preflight STOP accepts it). project-bin/_position.sh is the shared, process-free tokeniser. Field evidence: two unattended requirements-driven field runs built about 78 pages with no plan while every guard stayed silent. Review: MERGE — refuse-once plan rule and banner verified (46/46, bug06 64/0, 0 process starts added); composes with #787 and #788 (65,373 words); CI red once on unrelated flaky test-app-restart.sh (mktemp suffix vs "zqx"), green on re-run Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MendixMau
added a commit
that referenced
this pull request
Nov 17, 2026
…nts-driven) (#792) Greenfield is retired as an entry mode. A project goes through one of two doors: POC, which reads a requirements doc and builds a demo, or requirements-driven, which is the full stage pipeline for a real app. An existing register that still says greenfield keeps working: the token is read as retired and held to the same unattended plan rule as requirements-driven, so it can no longer bypass the build-ready refusal. The fixtures that covered greenfield, including #788's test-ci-gates, follow the retirement. Review: MERGE — retired greenfield held to the auto plan rule; fixtures (incl. #788's test-ci-gates) follow the retirement (head 8400aaf tree identical to reviewed 8dec9dc; CI green) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3 of 4 tasks
MendixMau
added a commit
that referenced
this pull request
Nov 17, 2026
…ion check (#793) The composition check of #787/#788/#790/#791/#792 found three ways an unattended agent could still get past the plan gate. This closes them: - Auto detection uses one first-word rule (mxtk_auto_word in project-bin/_position.sh) shared by exec.sh, gate-check.sh's --adopt check and ready.sh. `Interview mode: auto (…)` and `unattended — …` now count as auto, and the strictest of env, state file and register wins. - ready.sh reports NOT READY while any `consentBy: auto-mode` adoption row is unconfirmed, so an agent cannot approve its own plan skip and reach READY. - Under auto, an undeclared Entry mode is refused before build-ready. Attended behaviour is unchanged. - The checkpoint skills no longer describe greenfield as a live mode. Review: MERGE — no findings (the H/K/W/U order fix restores test-mode-contract to 28/0; the strictest-wins change is now in the CHANGELOG; CI green on d3c4ced) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
MendixMau
added a commit
that referenced
this pull request
Nov 17, 2026
This is the output of bin/cut-release.sh. The 24 entries under `## Unreleased` become `## v2026.11.17`. Included: #787, #788, #790, #791, #792 and #793. #789 is held. Review: MERGE — no findings (CHANGELOG heading only; the release section has no client names; CI green on 072e417) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Direct lane
What changed and why: Two unattended field runs (2026-11) show the same failure. In one, a build agent wrote READY by hand with 0 of about 78 pages ever looked at. The look ledger would have FAILed that, but nobody ran the gate. Because
.claude/loop/is git-ignored, a copy of the repo showed nothing. In the other, a different kit marked itself ready 3 hours early, with no review pass. Everything that runs inside the agent's session can be skipped by the agent. This PR does three things:3e9302cready.sh, the tracked look summary, Stage 5 reading itc186bf7e1a7ac615618fdt@t(the leak guard blocks email-shaped strings)e10cf31rows(my regression from3e9302c)8e0a4e9status.md; strict reading ofInterview modefor the review3d30264MXTK_CI_ENFORCE(synced projects start advisory);test-ci-gates.shC0/C4bin/ready.sh <root> [--module M | --app A] [--no-commit]Exit 0 means READY, 1 means NOT READY. Every row prints K of N. A row that measured nothing reports NOT MEASURED and fails.
--adoptpoint) or not owed by the entry mode, from one read-only full gate-check run. A field run wrote READY with Stage P never passed.--adopt 5waives 0–4 but not P.--modulescopes it throughMXTK_LOOK_MODULE.## Current stageis at Stage 6 or later.docs/progress/must-haves/<Module>.md. K = theTICKEDrows; N = line 1's first "N of M". A line 1 with no "N of M" is a FAULT.Waived obligation must-haves[/M]reads WAIVED. AnObligation must-haves ADVISORYverdict is shown but does not block. A missing mark blocks onceskills/must-haves.mdexists.interview-mode.shsays auto, or when the rawInterview mode:line's first word is auto/unattended; the stricter reading wins, and the script prints one line saying so. It readsdocs/progress/look-reviews/*.mdand requiresReviewer:≠Builder:. Every page needs a score of 4 or higher, given after its last build.Bounded time:
MXTK_READY_STEP_TIMEOUT(default 120 s), and its row then reads NOT MEASURED.The field copy took over 300 s on
c186bf7and 35 s one10cf31.Files it writes (all tracked, no images):
docs/progress/ready-<date>-<scope>.md: the evidence.docs/progress/ready.log: the READY line.docs/progress/review-packets/<scope>.html: per module, each page's screenshot beside its target with the reviewer's score, under the K-of-N lines. Image paths only. It sits in a subfolder becausereport-disposition-check.shreadsdocs/progress/*.htmlas reports.docs/progress/look-summary.tsv.It then commits them with an explicit pathspec.
A READY that ready.sh did not write is not READY (
bin/lib/ready-claims.sh)What counts as a claim: a line in a status file whose first word is READY (after heading, list, bold or quote markup, or a
Status:/State:/Verdict:label), whatever follows it, or a table cell that is exactly READY. Field shape:# READY FOR BENCH (fix round 6, …), eight times in a rootstatus.md.Which files are status files:
PROJECT.md;resume,status*andprogress*.mdfiles, in any letter case;.mdunderdocs/except ready.sh's own output.When a claim is backed: when it names a
docs/progress/ready-*.mdwhose verdict line says READY and whichready.loglists as READY. Each scope's latestready.logrow is held to the same test.Stage 6 FAILs on any unbacked claim. The toolkit's own text no longer starts a line with READY; fixture C6 runs init → commit → CI. The
RESUME.mdstarter and thereadyrouting row (in everyCLAUDE.local.mdand all six agent stubs) state the rule.The CI gate:
bin/ci-gates.sh+templates/ci/toolkit-gates.ymlinit-project.shandsync-project.shinstall.github/workflows/toolkit-gates.yml:It runs on every push and PR, using the toolkit at the commit
PROJECT.mdpins.Enforcement (owner policy).
initinstallsMXTK_CI_ENFORCE: "1".syncinstalls"0"with one notice, so in a project the toolkit reached mid-flight, (a) and (d) warn until the project switches them on. (b) fails the build either way.gates passed: P, 0, …) now FAILs its gate. The stage in progress only warns, so a fresh project at Stage P passes its first push.look: K of N pages seenas a warning.MXTK_CI_STRICT_LOOK=1fails always..mdlscripts inmdlsource/andapps/<App>/mdlsource/) while Stage 4 is not PASS or WAIVEDIt reads files only and needs no runtime; a run takes about 1.5 s. The template header lists what it cannot see.
Follow-ups (not in this PR)
interview-mode.shand annotated lines. It resolves- Interview mode: auto (gate questions go to questions.md …)to steering, because an unparseable line falls back to asking more. That is right for questioning, but every other reader of the mode inherits a relaxed gate. ready.sh works around it with the strict raw-line reading. The resolver should accept a trailing annotation, or every gate reader should take the stricter of the two readings.look-ledger.sh summary --writeafterowe, and add one line to the BUILD-LOG header saying READY is not recorded there.app:<A>NOT MEASURED rows go away once ready.sh switches to the per-app look ledger.Impact
ready.sh, including stages P–4 and, unattended, an independent reviewer file. An unbacked READY FAILs Stage 6 and CI. New projects are bound from their first push. Synced projects get the workflow advisory (a hand-written READY still fails), plus one notice saying how to enforce.gate-check.sh(Stage 5 summary fallback and module scope; Stage 6 claim check),look-ledger.sh,close-task.sh,init-project.sh,sync-project.sh(4a1),resume-template.sh,skill-routing.tsvplus its re-render. Addsbin/ready.sh,bin/ci-gates.sh,bin/lib/ready-claims.sh,bin/lib/ci-template.sh,templates/ci/toolkit-gates.yml. Composes with T1 #787 (mark path agreed), T4 #789 (mxtk_apps, per-app ledger) and T2 (exec.sh follow-ups).dispatching.mdparagraph.Field evidence: a field run on a real copy of a six-app field repo (tracked files only), three passes.
Defects the first two passes found, all fixed here:
status.mdnot scanned (both had passed by absence);ready.shrunning over 300 s;Final pass on
8e0a4e9: passes.CI
readyFAILs all 8 hand-written# READY FOR BENCH …lines in the rootstatus.md.CI
ordercounts 276 scripts and FAILs: model work before Stage 4.ready.shprints the review-owed note and reads NOT-READY, 0 of 10, with position listing P FAIL and 0–4 PENDING. The run ends in bounded time.No client data in the diff
Size cap: over (about 24 files; eight are generated re-renders, two are fixtures), because the owner's follow-ups landed here. I can split the CI half into a stacked PR if preferred.
Test tier: I did not run the fixtures locally; the sandbox blocked fixture runs. I replayed the new and changed cases by hand: C3 in-progress WARN and recorded-pass FAIL; C6 fresh init → commit → CI exit 0 with (b) PASS; C7 enforcement off. CI runs both suites. The reviewer found
test-ci-gates.sh3 of 17 red on8e0a4e9; C0 and C4 are fixed in3d30264, and C2 was a knock-on of C0. Reviewer: re-runtest-ready.sh,test-ci-gates.sh,test-look-ledger.sh,test-bug12-sync.shandtest-dryrun-writes-nothing.sh.Golden input from real producers (captured lab-app pages and PNGs, real
owe/seen/ready.sh, BUILD-LOG in exec.sh's shape, the field claim lines genericised, a realinit-project.shscaffold), both layouts plus multi-app. Bash 3.2 and BSDdatefallbacks in place; not run on macOS.Routing row added and re-rendered
CHANGELOG lines
Do not merge before an independent review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01HXpQSjAZQFu8tasj2BMz5Y