Skills / harden

/sdlc:harden

Turn a pipeline failure into a rule that catches the same class of failure earlier in the next run.

Run it in Claude Code

/sdlc:harden
Starts from
With /sdlc:harden and one input: --failure-text, --from-issue or --from-learnings. Other skills start it after a failure.
Ends with
After Step 8 runs the instruction list, or after Step 7 writes the learnings entry when no list runs. It ends earlier on an argument error, on a config error, on a bad orchestrator result, on a halt, or when the user cancels.
Asks you
At each proposal in Step 5, at each validation failure, at the ambiguous upstream-report offer, and at the error-report offer in Step 6. With --auto it skips these prompts. An instruction asks only when its question flags allow it.
After a stop
none

What it does, step by step

  • You act
  • Always runs
  • Optional or conditional

/sdlc:harden

Turn a pipeline failure into a rule that catches the same class of failure earlier in the next run.

Why use it

A pipeline step fails. You fix the symptom, and the same mistake comes back in a later run. /sdlc:harden reads the failure and proposes edits to your plan guardrails, execute guardrails, review dimensions or Copilot instructions. You approve each edit, and the next run catches that class of failure earlier.

Example

A /sdlc:plan run failed in its reviewer loop. Give the failure text and the name of the skill:

/sdlc:harden --failure-text "Step 5 reviewer loop exceeded max retries without converging" --skill plan --step "Step 5" --operation "reviewer-loop"

/sdlc:harden classifies the failure as user-code, plugin-defect or ambiguous. For a user-code or ambiguous failure, it shows each proposal with its target file, its rationale and a preview of the patch. You answer apply, skip or cancel for each proposal. /sdlc:harden checks each edit before and after the write, and reverts a bad edit. For a plugin-defect failure, it offers to file an issue with /sdlc:error-report.

What you get

  • Stop a failure from coming back. Each new rule names a class of failure, not one file or one tool.
  • Keep control of your rules. You see a preview of each edit, and you apply, skip or cancel it. Only --auto skips the prompt.
  • Rules only get stricter. No rule is relaxed, and a rule is removed in three cases only: a dead reference, a covering rule, or the split of an oversize rule.
  • Lessons become rules. --from-learnings triages the learnings of earlier runs and proposes guardrail edits. A lesson that recurs 3 times becomes a skill recommendation with a priority.
  • A record of each run. In a /sdlc:ship run, each harden run keeps one record of its hardening in the ship state, and the dashboard shows it.

More examples

Analyze a failure that is already a GitHub issue:

/sdlc:harden --from-issue 42 --skill execute

/sdlc:harden reads the issue body. An issue with the mcp-failure label is a plugin defect, so the run goes directly to the error-report offer.

Triage the lessons of earlier runs:

/sdlc:harden --from-learnings

/sdlc:harden reads the learnings log and makes one pass for each entry that it did not write. You approve each proposal, and an entry with an applied proposal is removed from the log.

Replay the rule edits that an --auto run left pending:

/sdlc:harden --failure-text "Pending rule edits: harden-pending-plan" --skill deferred

/sdlc:harden drafts each edit of the deferred item harden-pending-plan again. Each edit goes through the normal approval prompt. /sdlc:deferred prints this command for you.

Reference

  • Flags and rule edits: each flag, what --auto applies and what it holds back, what harden can remove, how each edit is checked, and the follow-up instructions.
  • Custom instructions: project guidance for the proposals, in .sdlc-v2/config.toml.
  • Follow-up instructions: the [instructions] config, the merge rule, the question rules and the summary line.
  • Learnings: the learnings triage, the learnings stats and the skill recommendations.
  • Ship state record: the record that a /sdlc:ship run keeps of each harden run.
  • /sdlc:ship: its optional harden step runs /sdlc:harden one time for each cluster of review findings.
  • /sdlc:received-review: its Step 11.6 runs /sdlc:harden for clusters of review findings when the harden step of /sdlc:ship is not configured.
  • /sdlc:error-report: files the issue for a failure that /sdlc:harden classifies as a plugin defect.
  • /sdlc:deferred: lists the pending rule edits that /sdlc:harden --auto stores, and prints the command that replays them.
  • /sdlc:setup: writes the first guardrails and review dimensions, which /sdlc:harden later strengthens.
  • /sdlc:review: its review dimensions are one of the surfaces that /sdlc:harden edits.
  • /sdlc:plan: its guardrails are one of the surfaces that /sdlc:harden edits.
  • /sdlc:execute: its guardrails are one of the surfaces that /sdlc:harden edits.