Coding-delegate suites (development graph)
Goal
Make MechaHarness a reliable handoff surface for expensive coding: Cursor (or
another driver) answers short guidance; a local guided_coding /
project_coding graph owns the token-heavy edits under stable contracts,
verify/repair, and resumable sequential arcs.
Live Completer is the gate. Static coding_writes / cassette greens are
provisional mirrors until the same suite passes under
MECHA_STORY_BACKEND=live + MECHA_BASE_URL, or MECHA_LIVE_OPENAI=1
with a cloud key and no local base URL (see OpenAI setup).
Suite map (minimize suites)
Three sequential coding-delegate suites — no more for the current roadmap:
Suite |
Stories |
What it proves |
|---|---|---|
|
|
Single-file CLI growth, |
|
|
Multi-file package + pytest verify + CLI |
|
|
List-mode coding, guidance, red-green, refactoring, MCP replay and verified reopening |
Mechanism / transport stay in existing parallel suites (not new coding suites):
Gap |
Where it lives |
|---|---|
Plan classify / list mode (no coding) |
|
Guidance yield smoke (NoOp local work) |
|
MCP |
Same |
CI diagnose → repair → local verify |
|
Gastronomic late-stage offline e2e |
|
Gastronomic calc arm B |
|
Live comparison recording |
Arm A from |
StopContract / graph budgets |
Soft point |
Workspace grants / escape |
|
delegate_pkg stages (concrete stories)
fangore_delegate_list_bootstrap—instruction_mode: listwith two todos (package + test); assertmode=listand pytest green.fangore_delegate_guidance_thorough— answer soft pointthorough; must writeinc()andREADME.mdwith Usage.fangore_delegate_red_green— addtest_double+ implementdouble()until pytest green under verify/repair.fangore_delegate_refactor— renameWidget→Gadgetacross package, tests, README; forbid leftoverclass Widget.fangore_delegate_mcp_repairreproduces a label bug in the refactored package, resumes through a rebuilt MCP server and replays the answer. The story applies the resulting Git diff to a fresh copy of the starting tree and reruns pytest there.fangore_delegate_verified_noopreopens that checkpoint, reruns the label and Gadget checks and requires an empty change list.
Coding stories can declare environment.filesystem.seed for the starting files.
The host materializes this tree in both static and live runs. For project coding,
filesystem.contents supplies the static Completer’s scripted edits. Stage 050
keeps the failing test in the seed and the proposed fix in the scripted answer.
Release-contract stories are grouped by the behavior they exercise. The
fangore_guided_coding stages beginning at 170 cover rollback, overlapping runs,
path and tool permissions, completion evidence, and bounded repair. The
fangore_gastronomic_offline_e2e stages beginning at 090 cover matched budgets
and trial accounting. Stage 260 also drives the production MCP host against a dirty Git checkout
and replays a concurrent resume.
Authoring: suites/delegate_pkg/suite.yaml + stages/*.yaml (+ optional
sources/ / materialize-stage-files).
# Static (provisional)
pytest -s -q tests/stories/test_user_story_suites.py -k delegate_pkg
# Live gate (required before trusting stubs)
MECHA_STORY_BACKEND=live MECHA_BASE_URL=<openai-compat-base-url> \
MECHA_MODEL=<served-model-id> \
pytest -s -q tests/stories/test_user_story_suites.py -k delegate_pkg
What earlier suites already cover
Capability |
Suite |
|---|---|
Sequential shared workspace + stage order |
|
Live Completer (ignore coding stubs) |
both |
|
both |
Suite run id / snapshot / |
both |
Single-file API contract |
|
Multi-file package + pytest |
|
Driver graph (product)
Cursor / MCP client
→ generator_start(guided_coding, goal|instructions, verify_runs, …)
→ advice_requested (external_guidance)
→ generator_resume(choice) # minimal | thorough
→ ProjectCodingLocalWork (tools + Completer + verify_repair*)
→ completed | failed(verify_runs_failed)
Story suites keep that graph honest whether pytest or MCP drives them.
Non-goals (yet)
Replacing Cursor’s agent with MechaHarness for all edits
Hosting Comfy / media lanes inside coding suites
Auto-promoting live suites into default CI (live stays opt-in)
A dedicated MCP-only story suite (transport parity, not a new arc)