Skip to content

process(entry modes): retire greenfield — two doors, sync mapping (stacked on #791) - #792

Merged
MendixMau merged 34 commits into
masterfrom
claude/retire-greenfield
Nov 17, 2026
Merged

MendixMau merged 34 commits into
masterfrom
claude/retire-greenfield

Conversation

@MendixMau

@MendixMau MendixMau commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Direct lane

Stack: #790 ← #791 ← this PR. Base is #791's branch.

What changed and why (one paragraph): This implements the owner's decision. Greenfield was the one mode that let stages 1–4 collapse into "whatever plan the user already has", and the field runs show what an agent does with that door. It is replaced by two doors:

  • an idea for a demo → Build type: poc (poc-build.md, unchanged apart from step 0);
  • an idea for a real app → requirements-driven, with the conversation as the source. Stages 1–2 run as a short interview that writes the BRDs (brd-generation.md already accepts BRDs by hand or from an SME), then 3–6 run as usual; small-project-tier.md and Pipeline mode: high-speed keep it light.

No mode skips design and planning any more. A POC that becomes a real app hands its hand-over to a requirements-driven build, or starts change-an-existing-app; this is stated once, in the runbook's Entry Modes rule 4, and poc-build.md step 9 points to it. poc-build.md gains step 0 "Inputs": read a supplied spec once and list its use cases, rules and must-haves, with no BRD generation; over POC size, recommend requirements-driven in the same message as the design questions.

Column values changed:

Tokeniser: a leftover greenfield register line tokenises to greenfield-retired, not to a mode. gate-check, status (including NEXT) and exec.sh print one line, "Entry mode greenfield is retired: run bin/sync-project.sh …". Nothing is excused by it: the artifact check owes every row, and gate-check's mode waiver has no greenfield case.

Existing projects after sync-project.sh:

  • A register line Entry mode: greenfield is mapped once to Entry mode: requirements-driven, keeping the old line as an HTML comment.
  • The project is adopted at the stage its ## Current stage readout shows, through the real gate-check.sh --adopt. That gives the register line, a TOOLKIT-ADOPTED-AT BUILD-LOG row, and under Interview mode: auto a ✋ human-pending Stage-4 row (Stage 6 FAILs until a person confirms it).
  • An ENTRY-MODE-MAPPED row lands in BUILD-LOG, and sync says it once. A readout at Stage P maps without adopting. An intake-only "greenfield" answer is not rewritten.
  • Who changes: every greenfield-registered project. Those past Stage 4 keep building (adopted); those before it now owe requirements-driven stages 1–4.

Impact

Row Answer
Process One mode fewer. A one-time mapping at sync (✋ row under auto). No new gate.
Dependencies _position.sh tokeniser, gate-check.sh, status.sh, exec.sh, sync-project.sh, artifact-check.sh, artifact-manifest.tsv (column 6 as above), progress-report.py, intake-template.sh (Q1 heading keeps ## 1. Entry mode), triage-template.sh, init-project.sh (generated README text). Docs: runbook, interview-protocol, README, toolkit-guide, CONVERSION-RUNBOOK.md, pipeline-walks.html, and 12 skills' mode lists. Left on purpose: BRD provenance: greenfield (existing BRD JSON field), and field-run histories. Pending: obligations.tsv column 10, after #787.
Context cost Baseline 65,322 (#791 head) → 65,393 words (+71; budget 80,000). Lead: P 27,337 → 27,408; 4 29,587 → 29,658; 5 27,668 → 27,739. From bin/render-routing.sh --check.
Behaviour NOT RUN: A/B suite not run for the runbook or interview-protocol edits.
Runtime n/a on the hot path (one string compare in exec.sh).

Field evidence: the owner's decision. Manual runs on a real init-project.sh scaffold, greenfield at a Stage 5 readout under auto: sync mapped the line, kept the old line, adopted at 5 and wrote the ✋ row and both BUILD-LOG rows. An unsynced register printed the retired line and excused no stage.

  • No client data
  • Size cap: over on file count, at 30 files, but only about +120 −100 lines excluding tests and CHANGELOG (mostly one-line mode-list edits). Splitting the doc sweep out is possible.
  • Test tier: tests/wave2/test-greenfield-retired.sh and the updated test-entry-mode-plan-rule.sh were not executed by the builder (fixtures not permitted). The reviewer should also run the sync, stage-P, test-wrong-verdicts.sh, test-sed-tab-bracket.sh bin/lib/entry-mode.sh and test-progress-report.sh fixtures.
  • CHANGELOG.md line appended

Do not merge before the independent review.

🤖 Generated with Claude Code

https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8

…n rule, design front end

With no Entry mode and no Adopted at stage line, status.sh, gate-check.sh's
summary and every exec.sh run print one banner. In Entry mode migration or
requirements-driven, the first MDL write with no plan evidence is refused
once (remedy: run stages 1-4, or gate-check.sh --adopt 5 --reason ...).
Outside evidence clears it; a-la-carte (new), greenfield, poc,
change-an-existing-app and --patch are never refused.

The entry-mode tokeniser moves to project-bin/_position.sh (pure bash, no
process starts) so the installed exec.sh can read it; bin/lib/entry-mode.sh
is a shim. Runbook greenfield row reuses poc-build steps 1-4 plus a short
plan; design-artifacts Step 2a maps supplied prototypes in PAGE-MAP.tsv and
ui-preflight-pages' wireframe STOP accepts a mapped prototype.

Field evidence: two field runs (2026-11), requirements-driven with a frozen
spec and clickable prototypes, built ~78 pages with no plan or target.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…ster skeleton

- artifact-manifest.tsv modes column is the per-mode step list (vocabulary
  migration, requirements-driven, poc, existing-app, a-la-carte, all);
  dropped rows read "not owed (mode ...)". Build type: poc mode-waives
  stages 0-4, 6, 7 in gate-check.
- Interview mode: auto: exec.sh refuses every pipeline-mode write until
  gate-check build-ready has passed (new .build-ready-pass record) or an
  adoption/stage-4 waiver exists; --adopt 4+ under auto writes an ASSUMED
  consentBy: auto-mode decision row (Stage 6 FAILs until confirmed).
- "Mode changes are decisions": one rule in the runbook; poc-build points.
- init/sync append missing register sections to a hand-written PROJECT.md
  (bin/lib/register-skeleton.sh, one template; fresh scaffold unchanged).
- CONVERSION-RUNBOOK.md "Running unattended": the one kick-off brief.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…ts-driven from a conversation)

An idea for a demo is Build type: poc; an idea for a real app is
requirements-driven with the conversation as the source. No mode skips
design and planning. sync-project.sh maps Entry mode: greenfield to
requirements-driven, adopted at the readout's stage via gate-check --adopt
(✋ human-pending under auto), with BUILD-LOG rows; unsynced registers get
one "run sync" line from gate-check/status/exec and excuse nothing.
poc-build.md gains step 0 Inputs; POC-to-real-app stated once (runbook).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…wn axis

Per the vocabulary correction: artifact-manifest.tsv column 6 keeps
migration,requirements,greenfield,existing-app-change (the tokens
entry_mode_token produces, copied by obligations.tsv column 10 in #787).
No poc or all token; Build type: poc is read by gate-check.sh only. Only
the N/A wording changes ("not owed (mode ...)").

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
# Conflicts:
#	CHANGELOG.md
#	bin/lib/artifact-check.sh
#	bin/lib/artifact-manifest.tsv
#	project-bin/progress-report.py
…tamp dir, rendered rules page

- mxtk_pos_read honours "Waived stages: ..., 4 — reason" as gate-check does
  (was a false refusal on a project gate-check reads WAIVED at stage 4).
- .mpr-snapshots/ is git-ignored before the refuse-once stamp is written,
  so "once per clone" cannot become once per repository; docs say plainly
  it is one refusal ever per clone.
- skills/generated/rules-page.md re-rendered (bin/mdl-rules.sh --render)
  after the ui-preflight-pages.md STOP-row edit; CI was DRIFTED.
- fixture: the status NEXT case accepts the intake-§1 needs-attention line
  that outranks the banner rule; aggregate-waiver and .gitignore cases.
- _position.sh header: the shared tokeniser plus exec.sh's reader, not the
  only register reader.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
# Conflicts:
#	project-bin/exec.sh
#	skills/conversion-runbook.md
# Conflicts:
#	skills/conversion-runbook.md
…D line stays first

CI (wave2, run 44013599260): test-bug06-freshness copies gate-check.sh
alone into a scratch toolkit, so the shim's banner text was never defined
and `set -u` aborted the summary with exit 1 (reproduced: master 0,
cb7c0fa 1, this 0). The banner is now an `if` with a defaulted variable.
status.sh guards the reader the same way and prints the banner after the
CWD line (test-status-session-cwd A: the CWD line must be first).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
# Conflicts:
#	bin/gate-check.sh
#	bin/status.sh
# Conflicts:
#	CHANGELOG.md
#	bin/init-project.sh
…ons.tsv column 10

Same drop as artifact-manifest.tsv column 6 (#792); both tables now list
migration,requirements,existing-app-change, which test-mode-contract.sh V
checks against what _art_entry_mode emits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
….) (check-portability rule 3, bash 3.2)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
… ignored, SIGPIPE, refusal cost

- gate-check fit-gap line: the poc branch runs before stage_waiver(3), and a
  mode reason "not owed (mode: m) — why" prints as "m entry mode — why"
  (was "not owed — not owed (mode: ...)"; test-fitgap-review F11a/F15a).
- build-ready PASS git-ignores .mpr-snapshots/ before writing its record,
  as exec.sh does for its stamp.
- test-mode-contract G: second init captured to a file, not piped into
  grep -q (SIGPIPE under pipefail).
- auto-mode refusal says the cost for a project past Stage 5: one
  build-ready pass per clone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…res follow the retirement

- exec.sh: under Interview mode: auto a retired, unsynced `Entry mode:
  greenfield` is held to the requirements-driven plan rule (it printed
  "run sync" and skipped the auto refusal). The remedy (sync / --adopt)
  is outside exec.sh. Fixture case added to test-entry-mode-plan-rule.sh.
- Fixtures that asserted greenfield as a mode now test the same thing
  through a live mode or the retired token: test-bug03-gates T23e
  (requirements-driven Stage 7), test-bug12-sync T10 (new Q1 heading),
  test-sed-tab-bracket T2b (<TAB>requirements), test-wrong-verdicts V4
  (greenfield -> greenfield-retired), test-progress-report (waived
  stages), test-obligation-quality-floor T9 (requirements-driven N/A;
  retired greenfield owes), test-fitgap-review F11 (a-la-carte).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…ges 1 and 3

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…sh now (test-file-bugs.sh:472)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSifRwo7EWWDP1hPps8
…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

Copy link
Copy Markdown
Owner Author

Review: MERGE-AFTER-FIX. CI is red (test-ci-gates.sh C2b). The sync mapping also adopts nothing for a typical mid-build greenfield project, whose readout is Stage 0 or P, so stages 0-4 become owed again.

Value: Retires greenfield as decided:

  • there are now two entry doors (runbook rule 4, CONVERSION-RUNBOOK.md, README, toolkit-guide);
  • a greenfield-retired token makes gate-check, status and exec say "run sync";
  • sync makes a one-time mapping of the register.

poc-build.md step 0 is a small, fitting addition.

Regression risk:

  • (a) Sync mapping. Greenfield only ever waived stages 1-4; Stage 0 stayed owed. So an unadopted greenfield project reads "Stage 0" or "P", never 5, but sync-project.sh only adopts for [1-7]. I reproduced it on a scaffold with readout Stage 0:
  • (b) Verdict flip. Auto-mode greenfield projects past Stage 4 get a ✋ Stage-4 row, so Stage 6 FAILs until a person confirms it. Intended, but a verdict flip for every such project.
  • (c) CI order gate. An unsynced register in CI now FAILs it. That is the C2b failure, and consumer CI on templates/ci/toolkit-gates.yml breaks the same way.
  • (d) Intake-only greenfield answer. The banner says "run sync", sync does nothing, so the banner loops.
  • (e) No conflict. Process starts per exec: 132 → 132.

Correctness: 11 targeted fixtures pass, including greenfield-retired 13/0. test-ci-gates fails 21/1 (C2b), reproduced locally, same as CI.

test-greenfield-retired.sh sets the readout to "Stage 5" by hand, which is exactly the case real gate-check output doesn't produce.

Stale greenfield text on the head:

  • CLAUDE.md:5,98
  • commands/toolkit-init.md:15
  • bin/lib/resume-template.sh:62 (generated into projects)
  • skills/checkpoints/checkpoint-scope.md:22, checkpoint-extraction.md:183, checkpoint-cutover.md:8
  • skills/source-triage.md:2, skills/build/mdl/oneshot-mdl-method.md:3
  • bin/ci-gates.sh:26, templates/ci/toolkit-gates.yml:10, gate-check.sh:543

Context cost: 65,497 → 65,568 (+71, measured). The behaviour A/B is NOT RUN, although it is required for this text (§4a.4).

Time cost: none per row.

Exact fixes required:

  1. Fix test-ci-gates.sh: its greenfield fixtures should use requirements-driven with --adopt 5, or a mapped register.
  2. Fix the sync mapping. When the readout is 0 or P and model work exists (BUILD-LOG exec rows or mdlsource scripts), adopt at 5. Otherwise print loudly that stages 0-4 are now owed, and drop the "not re-owed" wording when nothing was adopted. Add a fixture case whose readout comes from gate-check.
  3. Update the stale references above, CLAUDE.md first.
  4. Run the behaviour A/B, or record the maintainer's waiver.

CI on 0989b5f: checks failure, authoring-audit success.


Generated by Claude Code

@MendixMau
MendixMau changed the base branch from claude/mode-contract to master November 17, 2026 09:28
@MendixMau
MendixMau merged commit 1fbd5c0 into master Nov 17, 2026
2 checks passed
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>
@MendixMau MendixMau mentioned this pull request Nov 17, 2026
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>
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