/engineer:hardenfrom engineer
After acceptance tests pass, proves tests catch bugs and formally checks invariants via introversion scan, mutation testing, and opt-in TLA+/Lean verification. Runs refinement-advisor to pick tools.
Ships in engineer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Checkpoint 8. Acceptance tests show the feature works. Harden checks whether the tests would notice if it stopped working, and, for code with a real invariant, whether that invariant can be broken at all.
Tool choice comes from /engineer.refinement-advisor, not from a fixed list.
Formal verification is worth its cost on a retry loop, and a waste on a CRUD
endpoint.
/engineer.fix Step 7. Scope = the fix diff. Skip the
Step 0 feature gate, write results into the fix record's harden_results, and
write no CP8 handoff (fix owns its own close).Step 0 — Entry gate (feature mode). Run
${CLAUDE_PLUGIN_ROOT}/scripts/dae_handoff.py <feature-dir> --through 7. On a
non-zero exit, stop and show the gap to the human. Then run
${CLAUDE_PLUGIN_ROOT}/scripts/dae_branch.py <feature-dir>. On a non-zero exit,
stop. After both pass, show the breadcrumb
(${CLAUDE_PLUGIN_ROOT}/scripts/dae_progress.py <feature-dir>, advisory) and
create one TodoWrite todo per step. See
${CLAUDE_PLUGIN_ROOT}/references/progress-indicator.md.
Verification independence: CP8 runs on a non-implementer agent
(agent_id ≠ CP5's and CP6's; enforced by dae_handoff.py gate()).
Resolve + scope. Resolve the root and manifest via
${CLAUDE_PLUGIN_ROOT}/scripts/dae_resolve.py. Scope = changed code. Load
acs.md, spec.md, CHARTER.md, and the CP7 handoff's crap_results
block (arch-check records crap-analyzer's output there). In fix mode, or if
the block is missing, run crap-analyzer on the scope first.
Advise. Run /engineer.refinement-advisor with stage: harden over the
scope, passing it crap_results. Effective autonomy decides who picks the
checks (see the advisor's Who decides: autonomy):
high, the advisor decides alonehigh, it asksmanifest.harden.required: true makes every recommended check mandatory{skipped: <the advisor's reason, or "not selected">} in its
harden_results field, so the decision is visible, not silent.Record the table, what was selected, and who decided (decided_by: advisor | human) in harden_results.advisor.
Introversion pre-scan (if selected). Run
${CLAUDE_PLUGIN_ROOT}/scripts/dae_introvert.py <methodology-root>. It flags
tests that can pass without asserting on SUT output. The script defers to
manifest.introversion.backend when set. Any non-ok status is advisory.
Dispatch an agent to confirm each finding. For each confirmed vacuous test,
write a real assertion and re-run. Record harden_results.introversion.
Mutation (if selected). Run atdd:atdd-mutate on the touched files, then
atdd:kill-mutants on the survivors. If a test was flagged in Step 3 and
carries a surviving mutant, it is almost certainly vacuous. Record
harden_results.mutation_score.
Formal checks (selected TLA+/Lean rows only). Dispatch one plain subagent
(default isolation, not a fork) per pick, subagent_type: engineer:formal-verifier (or the project override): /engineer.tlaplus for
interleaving/state-machine targets, /engineer.lean for all-inputs targets. Each
brief gives:
Picks for different targets are independent, so dispatch them in parallel. Handle each result as follows:
sorry and clean #print axioms is./engineer.feature-edit. Harden does not rewrite the contract.provisional and do not fix the code.Record harden_results.formal[]:
{tool, target, invariant, verdict: holds|violated|provisional, bound_or_proof, finding}.
Arch re-check. Harden may have changed code, so re-run
${CLAUDE_PLUGIN_ROOT}/scripts/dae_arch.py <methodology-root>. Record
harden_results.arch_check.
Handoff (feature mode). Emit per
${CLAUDE_PLUGIN_ROOT}/references/handoff-summary.md with checkpoint: 8.
The exit_criteria block asserts:
quality_thresholds.mutation_score_min
(verified_by: tool). Both are percentages, 0–100.holds, or its counterexample is fixed and
pinned by a test that fails on the old coderecommended_next: "open PR / /engineer.progress-log".
Ship commit (feature mode, once the exit criteria above pass). Make the
done state the branch's LAST commit before the PR opens, so status: done
reaches main exactly when the PR merges (a PR closed unmerged leaves main
untouched). Run ${CLAUDE_PLUGIN_ROOT}/scripts/dae_ship.py <feature-dir>; it
refuses without complete CP7 and CP8 handoffs (the merged-unverified check now
happens here, not after merge) and writes feature.md status: done,
progress.md (CP8 row done + CURRENT header "awaiting merge"; run
/engineer.progress-log for the rest of the handoff-derived rows) and the
local roadmap shipped mark. Also stage the verify-app feature-map row
(references/verify-app-skill.md, if the feature added a user-facing
surface) and the session-summary entry if session-log.md is in the repo.
Commit them together as ship: <slug>. Never write merged_at here (unknown
before merge; the external tracker sync adds it). Review follow-up commits
after this one are fine; do not squash it away or revert it in a rebase.
harden_results:
advisor: {decided_by: advisor, rows: [{tool, verdict, target, why, invariant, selected}]}
introversion: {status, flagged, confirmed_vacuous, fixed}
mutation_score: 87 # percent, 0–100; or {skipped: "config-only change"}
formal:
- {tool: tlaplus, target: "ResidentialProxyHttpClient::get", invariant: "attempt ≤ 3; every path exits",
verdict: holds, bound_or_proof: "TLC exhaustive, 16 states", finding: "post-loop throw unreachable (advisory)"}
arch_check: {status: clean}
fix mode adds bug_line_mutation_confirmed in fix's own Step 7. That
bug-line gate always runs, whatever the advisor picked. It is how fix proves
its regression test is tied to the bug. A skipped mutation_score
({skipped: …}) still counts as recorded for dae_fix.py's close check.
Formal subagents run toolchains and re-run their own output, which is not
fork-safe. Use plain subagents, and no detached/background Bash runs inside
them. See ${CLAUDE_PLUGIN_ROOT}/references/parallelism.md (Fork safety).
/engineer.refinement-advisor: picks the tools/engineer.tlaplus, /engineer.lean: the formal-verification skills; each has a "Verifying real code" workflowatdd:atdd-mutate, atdd:kill-mutants: mutation testing${CLAUDE_PLUGIN_ROOT}/references/handoff-dispatch.md: autonomy keying and brief templateWhat SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub swingerman/engineer --plugin engineer25 skills in this plugin
/arch-checkUse to check a feature's code against the charter's architecture rules — dependency layering, cycles, forbidden patterns, file naming, file size. Triggers — "/engineer.arch-check", "architecture check", "check architecture fitness", "does this follow the charter", "check layering"./atddUse to write a feature's acceptance specs and generate its test pipeline — Checkpoint 3 of the DAE pipeline. The engineer-namespace entry point into the atdd plugin's acceptance workflow. Triggers — "/engineer.atdd", "write the spec", "Checkpoint 3", "formalize the ACs as specs", "generate the test pipeline"./clarifyUse when a single DAE artifact has ambiguities to resolve. Triggers — "/engineer.clarify", "clarify this spec", "resolve ambiguities", "this is vague — tighten it".Other plugins' skills for the same job