Skip to content

fix(intake): state the auto-mode Stage P answer form (#766) - #773

Open
MendixMau wants to merge 2 commits into
masterfrom
triage/766-auto-mode-marker
Open

MendixMau wants to merge 2 commits into
masterfrom
triage/766-auto-mode-marker

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Fixes #766

Direct lane

What changed and why (one paragraph): Under Interview mode: auto, an agent filling intake.md had nothing showing the answer form that Stage P accepts:

  • The intake preamble listed only Answered (CONFIRMED): and Unverified — how to verify:.
  • skills/interview-protocol.md said "recorded ASSUMED as above". That points at the register shape (status: ASSUMED, consentBy: auto-mode), which the intake gate rejects.

The field run wrote Assumed (Interview mode auto) answers, FAILed Stage P, and learned the accepted form only from the FAIL message.

This PR:

  • adds a third form, Assumed (auto-mode): ..., to the preamble in bin/lib/intake-template.sh (auto mode only; the full record still goes in PROJECT.md);
  • replaces the "as above" in interview-protocol.md with the literal line, one example, and the colon-less form that fails.

The gate matcher (gate-check.sh:861 already accepts assumed (...):) and Q9's body are unchanged, as triage scoped.

Impact

Row Answer
Process none. No gate, verdict or question changes. The preamble is only written at scaffold time. sync-project.sh appends missing questions only and never rewrites the preamble, so existing intakes don't change.
Dependencies bin/lib/intake-template.sh (sourced by init-project.sh and sync-project.sh). Only preamble text changed. Q9's body, which --repair-intake byte-matches, is untouched. No new tools or artifact reads.
Context cost interview-protocol.md is baseline. From bin/render-routing.sh --check: baseline 66,196 → 66,227 words (+31) of 80,000. Per role at stage 5: lead 27,279 → 27,310, ba 26,806 → 26,837, architect 24,896 → 24,927; mdl/gate/test/review unchanged. Stages 4, 6 and 7 move by the same +31 for lead/ba/architect. It's needed at the trigger moment: the agent is writing intake answers under auto and reads this paragraph ("No question stays 'Not yet asked' under auto").
Behaviour NOT RUN: a two-line text addition that names a form the gate already accepts. No A/B fixture exists for intake authoring under auto mode. Maintainer to accept or request A/B.
Runtime n/a. Text only. It saves about one gate-check round trip plus a 16-answer rewrite per auto-mode kickoff (est. 2–5 min, triage estimate).

Time cost: none · 0 s (fixture case only, no run-time check added) · can force rework: n · offset: removes a guaranteed Stage P FAIL round trip per auto-mode kickoff

Field evidence: a greenfield build under Interview mode: auto (2026-11-13, relayed by the maintainer, anonymised). Stage P failed on Assumed (Interview mode auto) answers and passed only after the answers were rewritten into the parsed form.

Proof: new case T12 in tests/wave2/test-stage-p.sh. It reads the template from bin/lib/ beside the gate under test. It asserts that the preamble (the text before the first ## ) names Assumed (auto-mode):, and that a section answered that way PASSES while Assumed (auto) — none. (no colon) still FAILs.

  • master's intake-template.sh: PASS=15 FAIL=1 (FAIL intake preamble does not name the 'Assumed (auto-mode):' form)
  • this branch: PASS=16 FAIL=0

Other checks:

  • bin/check-scripts.sh: 137/137 parse.

  • Leak guard: clean.

  • bin/check-portability.sh: clean.

  • bin/render-routing.sh --check: in sync.

  • tests/wave2/test-question-block.sh also reads interview-protocol.md. Checked by inspection, not run: it greps only the #### Asking from a subagent section and the ```question blocks, and this diff touches neither.

  • No client data anywhere in the diff

  • Size cap: 4 files, 32 insertions / 4 deletions

  • Test tier reached: T1. Scoped fixture test-stage-p.sh on master's template vs the branch.

  • For a new/changed instrument: n/a (text only; the fixture case reads the real template, no hand-written golden capture needed)

  • For a new skill: n/a

  • CHANGELOG.md line appended, crediting the field report

  • New bug entries: none

Review: pending independent review


Generated by Claude Code

The intake preamble listed only `Answered (CONFIRMED):` and `Unverified — how
to verify:`, and interview-protocol.md said "recorded ASSUMED as above",
pointing at the register shape the intake gate rejects. An Interview mode: auto
kickoff learned the accepted form only from gate-check's FAIL message.

Add the third form `Assumed (auto-mode): ...` to the preamble, and spell out the
literal line plus an example (and the colon-less form that fails) in
interview-protocol.md. Gate matcher and Q9 unchanged.

Proof: tests/wave2/test-stage-p.sh T12 — 15/16 on master's template, 16/16 here.
Baseline words 66196 -> 66227 (budget 80000).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSjXefSNicGGqP4aiSC
@MendixMau

Copy link
Copy Markdown
Owner Author

Review: MERGE-AFTER-FIX. The new worked example in the baseline file, Assumed (auto-mode): POC — rejected: production build, teaches the one default auto mode is forbidden to pick. Q16 says Interview mode: auto never picks poc (bin/lib/intake-template.sh:183, skills/poc-build.md:8).

Value: Fixes #766 as triaged.

  • The intake preamble now names a third form, Assumed (auto-mode): ... (bin/lib/intake-template.sh:33-36).
  • skills/interview-protocol.md:74-75 gives the literal line and the colon-less form that FAILs.
  • The gate matcher (bin/gate-check.sh:861) and Q9's body are unchanged, as scoped.
  • Small, not overbuilt.

Regression risk:

  • The preamble is written only at scaffold time, and sync-project.sh never rewrites it, so existing intakes are unchanged.
  • The preamble sits above the first ## , which the Stage P awk skips (insec is 0), so the new "Interview mode: auto" text in it is not graded.
  • No script reads Interview mode from intake.md.
  • No verdict or exit code changes.

Correctness:

  • The example contradicts Q16 and poc-build: an agent under auto that copies it records the exact answer the rules forbid.
  • Fixture T12 (tests/wave2/test-stage-p.sh:198-219) reads the real template beside the gate under test and checks it against the real gate. Run in the detached worktree: PASS=16 FAIL=0. Positive control with master's intake-template.sh: PASS=15 FAIL=1, exactly the new preamble check.
  • Minor: the reflowed preamble line (intake-template.sh:36) is about 130 characters, against the template's roughly 100-character wrap.
  • No conflict with origin/master.

Context cost: 66196 → 66227 always-loaded words (+31, measured). It is read at the trigger moment, while answering intake questions under auto.

Time cost: none per build row. It removes one Stage P FAIL round trip per auto-mode kickoff.

Exact fixes required:

  1. skills/interview-protocol.md:75: replace the example with a default auto can actually pick, e.g. Assumed (auto-mode): greenfield — rejected: requirements-driven (the fixture's own) or the Marketplace default. Change the colon-less FAIL example to match: Assumed (auto) — greenfield.
  2. Optional: rewrap intake-template.sh:36 to the template's width.

Generated by Claude Code

… rewrap preamble line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXpQSjXefSNicGGqP4aiSC
@MendixMau

Copy link
Copy Markdown
Owner Author

Review fixes pushed in a73f346:

  1. The example now uses Assumed (auto-mode): greenfield — rejected: requirements-driven, and the colon-less FAIL example is Assumed (auto) — greenfield.
  2. The long preamble line is rewrapped.

Baseline is now 66,226 words. Needs a re-review before merge.


Generated by Claude Code

@MendixMau

Copy link
Copy Markdown
Owner Author

Review: MERGE. Re-review: the example now uses a default that auto mode can pick, Assumed (auto-mode): greenfield — rejected: requirements-driven, and the colon-less FAIL form is Assumed (auto) — greenfield. The preamble line is rewrapped.

Value: Fix 1 is at skills/interview-protocol.md:75. Greenfield is Q1's own fallback default (bin/lib/intake-template.sh:57), so auto can record it, which it cannot do for poc (:184). Fix 2 is at intake-template.sh:36-37. It leaves one short ragged line, which is cosmetic only.

Regression risk: The fix commit changes only preamble text and the example. The preamble is written at scaffold time only. sync-project.sh never rewrites it, and --repair-intake byte-matches only Q9's body, which is untouched. Stage P does not grade the text above the first ## . Merges cleanly onto origin/master.

Correctness: tests/wave2/test-stage-p.sh bin/gate-check.sh in a detached worktree of a73f346 gives PASS=16 FAIL=0. T12's preamble grep still matches after the rewrap.

Context cost: 66196 → 66226 always-loaded words (+30, measured). It is read at the trigger moment.

Time cost: none per build row. It removes one Stage P FAIL round trip per auto-mode kickoff.


Generated by Claude Code

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.

[bug] Auto interview mode: the required form of an assumed intake answer is hard to find, costing a gate-check round trip

2 participants