Repair
qp repair reruns guard checks and produces structured remediation context designed for fast fixes and agent handoff.
What Repair Does
For a guard run, repair collects:
- overall guard status
- failing steps
- parsed diagnostics (when available)
- scope metadata for failing tasks
- current git diff snippet (full mode)
- suggested next action text
Basic Usage
qp repair
qp repair ciIf no guard name is provided, repair targets the default guard flow.
Output Modes
Full markdown report
qp repair ciIncludes guard status table, per-failure details, truncated git diff, and next-action guidance.
Brief handoff mode
qp repair ci --briefProduces concise failure-centric output for quick copy/paste into issue comments or agent prompts.
JSON mode
qp repair ci --jsonReturns structured fields:
guard,overall,exit_code,ran_atfailures[](task, status, scope, parsed errors, stderr)git_diffsuggested_next_action- rendered
markdown
Clipboard mode
qp repair ci --copyCopies markdown output directly to clipboard.
Unsafe Task Handling
If repair guard steps include destructive/external tasks:
qp repair ci --allow-unsafeThis mirrors guard safety behavior and keeps risky execution explicit.
Worked Example
tasks:
lint:
desc: Lint code
cmd: golangci-lint run
scope: backend
test:
desc: Run tests
cmd: go test ./...
error_format: go_test
scope: backend
guards:
ci:
steps: [lint, test]qp repair ci --briefBrief output highlights failing task names, scope paths, and parsed error entries so fixes can start immediately.
Repair + Planning Loop
A practical loop:
qp repair ci --json- extract failing files/scopes
qp agent-brief --file ...orqp diff-plan- apply fix
- rerun
qp repair ci
This keeps remediation grounded in observed failures and bounded change areas.
Next Step
For end-to-end collaboration patterns with coding agents, continue to Agent Integration.