Implement a task through the reasoning-budget ladder — classify effort, run a low-effort implementer under constraints, verify with the harness, escalate only on repeated failure or ambiguity.
Install
npx skillscat add e1i/mikoshi-construct/implement Install via the SkillsCat registry.
SKILL.md
Run the reasoning-budget ladder for the task in $ARGUMENTS. The rules are in the Reasoning budget
section of architecture/principles.md; repo specifics (harness command, high-effort areas) are in the
repository's CLAUDE.md and construct.json.
- Classify the effort class and tell the user the class and the one-line reason before anything
else. Read the repository's CLAUDE.md for its harness command and its high-effort areas. A task
that names or must touch a high-effort area, the API contract, a composition model, the
dependency policy or the security invariants ishigh. A new endpoint, a new integration or a
change across several modules ismedium. Everything with an existing pattern to copy and a
contract already defined islow. - Write the acceptance criteria in two to four verifiable lines. If the task has no statable
criterion, say so and stop; the ladder is not for one-line edits or open-ended exploration.
When$ARGUMENTScarries anAcceptance:section (from the label up to a line or sentence
startingMutations:, or the end), its items are the acceptance: split it on;and copy each
item verbatim intoargs.acceptance, one item per element, in the agreed order. You may append
items of your own, but never rewrite, merge or drop an agreed one. - Before calling Workflow, check that the agreed acceptance reached the args: write
$ARGUMENTS
verbatim to.construct/implement-agreed.txtand theargsobject you are about to pass to.construct/implement-args.json(create the directory if needed; overwrite both), then runnode scripts/construct/check-acceptance.mjs --agreed .construct/implement-agreed.txt --args .construct/implement-args.json.
On any non-zero exit —1for an agreed item missing from the args,2for an unreadable file or
malformed args, or Node's own failure when the script is absent — stop: do not call Workflow, tell
the user which agreed item is missing by relaying the script's stderr verbatim, and write no line to.construct/runs.jsonl, because there is no Workflow run identifier and step 4 forbids inventing
one. On exit0, call the Workflow tool withscriptPathset toscripts/construct/implement.workflow.mjs(the ladder
script lives with the project's scripts, not under.claude/) andargsas
a JSON object:{ "task": ..., "acceptance": [...], "effort": "low|medium|high", "harness": { "command": ..., "extra": [...], "contractPaths": [...] } }
whereharness.commandcomes fromconstruct.json, or from.construct/attach.jsonwhenconstruct.jsonis absent (an attached repository),harness.extralists any area-specific
commands CLAUDE.md names for the files the task touches (usually empty), andharness.contractPathsis the contract paths you read from the repository yourself:contracts.pathandcontracts.typesfromconstruct.json
whencontractsis non-null, plus the comma-separated paths on aContract paths:line in the
repository's CLAUDE.md..construct/attach.jsonrecords no contract paths, so in an attached
repository only that CLAUDE.md line supplies them; absent both, the list is empty. The ladder
derives the result'scontractChangedfrom it: true only when a path in the harness'schangedFilesequals one of these exactly.retryLimitis optional
and defaults to0: a rejected response is not re-asked, and the run stops with the validator's
error so a person reads it. Each retry is a whole new agent call that repeats the agent's
exploration from scratch — measured at roughly three million billable tokens for an architect —
and it cannot fix a contradiction in the task, because the agent may not change the task. Raise it
only when a rejected response is expected to be a transient shape error rather than a bad brief.
The user's/implementinvocation is the opt-in the tool requires. Note the run identifier the
Workflow tool reports when it launches the run and again when it completes; step 4 records it.
The design step runs inside the ladder, not before it, and its outcome is one of theattempts
like any other. The statuses a run can return are:done— a rung passed the harness and every design step the run took completed.degraded— a rung passed the harness, but a design step was rejected by the schema and the
run continued without it. The result'seffortis the class that actually executed.design incomplete— a high-effort run whose architect was rejected by the schema. No
implementer ran without a spec; the result carries the validator's text invalidationErrorand
the way out inrecovery, which is a measured route rather than advice: re-running one class
lower with the design written into the brief produced the design on three of the three occasions
it has been tried on the construct's own repository.failed— every rung ran and the harness stayed red;lastFailurecarries the excerpt.blocked— the last rung stopped on a question;questioncarries it verbatim.base red— the harness was red on the base before any change, so no rung ran;lastFailure
carries the excerpt. Make the base green, or name what is red on purpose, before running again.base unverified— the harness's verdict on the base was rejected by the schema, so no rung
ran;validationErrorcarries the validator's text.stopped— the run was stopped from outside before it returned, so the runtime gave no result.
It is the one status the script never returns; you write it.
- Record the run: append one JSON line to
.construct/runs.jsonl(create the directory if needed)
with exactly these fields and no others:run— the Workflow run identifier from step 3. It is the keyconstruct costjoins the entry
to the runtime's session data on. Never invent one: an entry without it is reported as
unjoinable, which is the truth about it.at— the ISO timestamp.task— the task text, first 120 characters.effort— the class the run performed: the result'seffortwhen it carries one, and only
then the class you chose in step 1. A run whose design step did not complete is never written
down ashigh; the result has already degraded it.status— the result's status verbatim, one of the eight in step 3.rung— the effort of the rung that finished:effortfrom the result when it carries one,
otherwise theeffortof the last entry inattempts.attempts— the result'sattemptsarray verbatim; each entry carries itsrung,effort,outcomeand thereasonthat separates an invalid response shape from a red harness, from a
blocked report and from a design the schema rejected.cause— required whenstatusisstoppedorfailed, and absent otherwise. It says why
the run ended without passing, from the causes that status allows:stopped/environment— it was failing on something outside the task, such as the
machine, a tool the harness spawns or a file another writer left in the tree, and further
rungs would have spent money on it;stopped/human— a person stopped it for any other reason;failed/environment— every rung ran, and the harness stayed red on something outside the
task;failed/task— every rung ran, and the harness stayed red on the task itself.construct costreads a cause another status owns, a cause on any other status, or a stopped
entry with no cause as malformed. A failed entry with no cause reads asnot recorded: entries
written before the field existed are kept as they are, never repaired.
tokensSource— optional. Absent,tokensis the standard measure: the Workflow tool's own
accounting as it reported the run to you. Present, it names where the figure came from instead:runtime— the runtime's stored record of the run, read after the tool reported nothing, as
for a stopped run.
agents,tokens,toolUses,seconds— the Workflow tool's own accounting for the run,
exactly as it reported it. Write"unknown"for a token figure it did not report, never0.
The ledger carries counts and reasons only — never a prompt, a response or any other message
content. This log is what tunes the ladder later; workflow scripts have no filesystem access, so
it is written here, not by the script. Nothing enforces this step: the ledger is L0, andconstruct costreconciles it against the runtime instead of trusting it..construct/is
gitignored, or excluded through.git/info/excludein an attached repository.
- Relay the result: status, the effort rung that succeeded and how many attempts it took, the
files changed, and the harness tail. Put the result'sacceptance— the items the ladder received,
echoed verbatim — next to the agreed line, and name any agreed item missing from it. When the status isblocked, put the architect's or
implementer's question to the user verbatim. Whenfailedorbase red, give the last failure excerpt. Whendesign incomplete, say that the design step did not complete, givevalidationErroras the
runtime reported it, and relayrecoveryverbatim — a dead end that names no way out is how the
next person decides the ladder is broken rather than that this run needs re-running lower; whendegraded, say which design step was rejected and that the reported
class is the one that executed, not the one that was requested.
Unlessconstruct.jsonsetsreport.usagetofalse, end with one usage line for this run,
from the Workflow tool's own accounting: agents, subagent tokens, tool uses, wall time — so the
cost of the rung that succeeded is on record next to the result. Whenconstructis on the PATH,
add the per-agent split fromconstruct cost --last --json(implementer, harness, architect);
when it is not, the Workflow accounting alone is the line — never guess numbers.
Every figure in that line names what measured it: figures from the Workflow tool's own accounting
say so, and figures fromconstruct costcarry theversionthat command reports, which is the
version of the binary on the PATH and not necessarily the sources you are working in. A relayed
number that does not say what measured it is not written down. - Never commit. The user reviews the working tree first.