Skip to content

process(agents): three model tiers and a Haiku check-agent for mechanical runs - #853

Merged
MendixMau merged 5 commits into
masterfrom
claude/loving-gates-hauc1n-model-tiers
Dec 1, 2026
Merged

MendixMau merged 5 commits into
masterfrom
claude/loving-gates-hauc1n-model-tiers

Conversation

@MendixMau

Copy link
Copy Markdown
Owner

Maintainer decision: three model tiers, with the cheap tier made real as an installed agent.

What changes

  • Tiers, written once in skills/conversion-runbook.md §1c: lead = Opus (main session, architect-agent), worker = Sonnet (ba, mdl, gate, test, review), mechanical = Haiku (check-agent). Haiku does mechanical pass/fail only and escalates anything ambiguous. The bad example it prevents: a helper paraphrases "looks all green" and the lead records PASS while the gate printed FAIL. skills/dispatching.md and skills/agent-roles.md point there.
  • New stub agents/check-agent.md (model: haiku): runs exactly the command it is given (a gate stage, a named fixture, a grep or denominator check, a leak scan) and returns the lines verbatim with the exit code. A brief that names no command gets ESCALATE.
  • agents/gate-agent.md and agents/test-agent.md hand their "run and report" steps to check-agent and keep their judgment steps.
  • bin/lib/install-manifest.sh: init installs check-agent, and sync adds it to existing projects.
  • bin/gate-check.sh build-ready now expects 7 agents.
  • tests/wave2/test-bug03-gates.sh T18b: build-ready without check-agent FAILs, and the manifest must list it.
  • One CHANGELOG line.

Measured

  • Sync: a project scaffolded with master's init (6 agents), then synced from this branch, printed "Created: check-agent.md".
  • Baseline words: 62,768 → 63,040 (+272).
  • Field run (copy of a Mendix 11.12.0 test app): a Haiku agent briefed with the stub text ran a gate stage. Its output matched the direct run 75/75 lines, in 28 s against 4 s direct. It escalated a judgment brief ("is this MDL script good?") 5/5 times.

Not verified / open

  • Whether existing projects whose Stage 4/5 already passed see build-ready FAIL until they run sync-project.sh.
  • The installed stub carries no STUB-generated marker, so later template edits may not reach projects.
  • The mutation check of T18b is incomplete.
  • Windows and macOS were not tested.

Generated by Claude Code

…echanical) written once in runbook 1c

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…d wired

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

Copy link
Copy Markdown
Owner Author

Review: MERGE-AFTER-FIX — check-agent.md can never be refreshed by sync-project.sh. It has no STUB GENERATED marker and no slots, so is_pure_stub (bin/sync-project.sh:119-123) never matches it, and every later template change prints "Kept: … is completed" for a file nobody completed (reproduced).
Value: The tiers are written once (skills/conversion-runbook.md:347), and the aliases opus/sonnet/haiku are the ones the frontmatter accepts (agents/check-agent.md:4, :349 table). No existing stub's model: line changes. Adding a seventh installed agent and making build-ready require it is more than "Haiku runs mechanical briefs" needs. An ad-hoc Agent call with model: haiku and the same brief rules gets the same result without touching a gate. This is a process change: the build-ready gate now requires 7 agents (bin/gate-check.sh:2530). Issue #830 does not ask for it. The PR body names "maintainer decision", which I cannot see in any linked issue.
Regression risk: A project at Stage 5 or later that pulls without syncing now FAILs build-ready on the missing check-agent (gate-check.sh:2530-2532). That verdict flips from PASS to FAIL, and .build-ready-pass (:4790) is not rewritten. sync-project.sh adds the file (verified: master scaffold → "Created: .claude/agents/check-agent.md"). It refreshes the gate/test stubs only when they are untouched, and keeps filled stubs (sync-project.sh:688-695). Per #830, an agent added mid-session is not loaded until the session restarts. No layout-dependent paths. bash 3.2 and Git Bash were not tested; the diff adds no new shell constructs.
Correctness: (1) The refresh dead end above. (2) The text still says "six" in places: bin/init-agents.sh:87 ("all six scaffolded"), agents/README.md:3, and the "Stage-5 quartet" at agent-roles.md:21 (the build set now has five). (3) T18b (tests/wave2/test-bug03-gates.sh:382-386) does test what it claims: removing check-agent from the gate loop would fail it. Nothing tests the sync path. Fixture: 101 ok, 0 FAIL.
Haiku claims: The quality data is a measurement: 75/75 lines identical and 5/5 ESCALATE. The run is on "a copy of a Mendix 11.12.0 test app", not a named project (CLAUDE.md "Shipping", rule 4). No cost figure is measured anywhere. "Cheap" is assumed, and the measured runtime is 7× slower (28 s vs 4 s). The RELEASE-PROCESS §4a.4 behaviour-suite A/B is required for an agent-stub change and is missing.
Context cost: 62,768 → 63,040 (+272), measured with render-routing.sh --check, budget 80,000.
Time cost: Each gate or fixture handed to check-agent costs about +24 s (28 s vs 4 s direct), per run per build row. The hand-off is optional ("may go"), so nothing is forced onto the hot path.
Exact fixes required:

  1. Make check-agent refreshable. Give is_pure_stub a path for slotless toolkit-owned stubs, such as a marker plus an unchanged-body check. Add a sync fixture asserting "Refreshed" after a template change.
  2. Update the remaining "six"/"quartet" counts (init-agents.sh:87, agents/README.md:3, agent-roles.md:21).
  3. Run the §4a.4 behaviour A/B for the gate/test stub edits, or record NOT RUN with a reason. Cite the field-run project by name.
  4. Record the build-ready requirement change as a process change, linked to the maintainer's decision. If that decision does not exist, let build-ready WARN on a missing check-agent instead of FAILing.

Generated by Claude Code

…s, build-ready names the sync fix

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…without -i

Review findings on PR 853.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013jQvaonym9V1wKKfAEPmRr
…-hauc1n-model-tiers

# Conflicts:
#	CHANGELOG.md
@MendixMau
MendixMau merged commit 3f6c2eb into master Dec 1, 2026
2 checks passed
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