ci-repair
Diagnose, isolate, and repair broken CI/CD workflows and red trunk gates across GitHub Actions, spine-invariance, ci-fast, architest DAG rules, structural…
by anthony-chaudhary★ 50 GitHub stars
Install ci-repair in Claude Code & Claude Desktop
Sign up to install this skill
Create a free account to reveal the install command and save the skill to your library.
- Reveal the one-line install command
- Save skills to your synced library
- Get notified when skills update
About this skill
/ci-repair — Triage, Isolate & Repair Red CI/CD Workflows on Trunk
Deterministic, evidence-backed protocol for rapidly converting red CI/CD workflows and broken trunk gates into verified green runs across both public fak and private fak-private. Decomposes compound CI failures into atomic root causes, arbitrates disjoint write sets, dispatches parallel subagents for implementation, verifies on-device test witnesses, and lands explicit-path commits without peer collision.
When to Invoke
- GitHub Actions Red Alert:
Any core CI workflow (
spine-invariance,ci-fast,ci,garden,build-matrix,security-audit) fails onmainor in an active PR. - Push & Synchronization Blockers:
fak commit --pushorfak sync pushfails withCOMMITTED_RED,CI_BASE_RED,TRUNK_CLOSED, or pre-push hook rejection.fak sync drainbecomes stuck in exponential backoff because the upstream trunk has a broken commit.
- Dual-Repository Wedges (
fak-private):fak-sync repofails fast-forward verification because publicfakdoes not compile, has broken tests, or fails boundary checks (fak-boundary check). - Automated Loop Escalation:
Headless super-loops (
super-loop,run-it-all-night,fleet-wave) encounter an unrecoverable red trunk and need to heal the mainline before continuing unattended waves.
Non-Negotiable Invariants
- One Root Cause, One Issue, One Commit:
Never batch unrelated CI fixes into a kitchen-sink commit. Decompose compound failures into distinct concerns (e.g., an architest upward import vs. an adjudicator structural policy vs. a stale scorecard README) and commit each under its own issue and leaf stamp
(fak <leaf>). - Witness-First Verification: Never assume a fix works because "the code looks clean." Reproduce the failure first using the exact command CI executes, implement the minimal remedy, verify on-device exit code 0, and cross-validate with an independent subagent before committing.
- Tree-Disjoint Worker Boundaries: When dispatching concurrent repair workers, assign each worker a mutually disjoint file set. No two workers may concurrently edit the same package or files on the shared trunk.
- Preserve Architectural Invariants:
- Never loosen the architest tier table to resolve an upward import; invert the dependency via a registration seam (
Register...) or push the shared type down a layer. - Never suppress policy rules without structural AST deciders; ensure remedy text does not self-refute by matching its own deny regex.
- Never silently delete non-secret env reads without updating
admittedPostFreezeor moving them to the config surface.
- Never loosen the architest tier table to resolve an upward import; invert the dependency via a registration seam (
- Safe Synchronization:
Always land commits using
fak commit --pathorfak sweep --apply. Always push usingfak sync push(which safely retries transient non-fast-forward races and refuses destructive merges).
Systematic Failure Taxonomy & Remedies
When diagnosing failed runs from gh run list and gh run view <id> --log-failed, classify errors into one of six canonical categories:
Category A: Architest & Layered-DAG Violations (internal/architest)
- Upward Import (
TestNoUpwardImports):- Symptom:
layered-DAG import rule violated: <pkgA> -> <pkgB>. Rule: tier(A) >= tier(B). - Remedy: Invert the dependency. Define an interface or function type in the lower tier (e.g.
type ContentScreener func(body []byte) boolininternal/mcpbroker), provide aRegister...hook, and wire it from a higher-tier package (e.g.internal/headroom/admit.go).
- Symptom:
- Unregistered Engine ID (
TestSingleEngineDriverPerID):- Symptom:
engine id "X" is registered by [P] in non-test code but is not a declared id in engineDriverRole. - Remedy: Add
"X": {"P": "role description"}toengineDriverRoleininternal/architest/architest_test.go.
- Symptom:
- Off-List Self-Registration (
TestRequestPathLeavesRegistered):- Symptom:
leaf P self-registers (init() -> abi.Register*) but is neither blank-imported in internal/registrations nor on regOffList. - Remedy: Add
"P": truetoregOffListininternal/architest/architest_test.go.
- Symptom:
- Non-Literal Subprocess Exec (
TestRequestPathInterpreterFree):- Symptom:
request-path package P calls exec with a non-literal program argument.... - Remedy: Add
"P": "justification"tointerpreterExecAllowininternal/architest/architest_test.go.
- Symptom:
- Missing Third-Party Tool Inventory (
TestThirdPartyEffectsRegisterCoversTree):- Symptom:
the tree pulls in subprocess_tool "X" and docs/sbom/third-party-effects.json has neither a row nor an exclusion. - Remedy: Add
"X"underclass: "subprocess_tool"in alphabetical order indocs/sbom/third-party-effects.jsonwith"pin": "host_provided".
- Symptom:
- Declared Reason Missing Code Emitter (
TestEveryDeclaredReasonHasAnEmitter):- Symptom: `dos.toml declares [reasons.X] but no non
Allowed tools
Tools this skill is permitted to call.
- 01
Read - 02
Bash - 03
Write - 04
Edit - 05
Grep - 06
Glob - 07
Task
FAQ
What does the ci-repair skill do?
Diagnose, isolate, and repair broken CI/CD workflows and red trunk gates across GitHub Actions, spine-invariance, ci-fast, architest DAG rules, structural policies, scorecard freshness, and build breakages. Uses parallel subagents for failure triage, isolated leaf implementation, on-device witness verification, and atomic commit landing. Use when CI turns red, when `fak sync push` or `fak commit --push` is blocked by `COMMITTED_RED`/`CI_BASE_RED`, or when dual-repo synchronization is wedged.
How do I install the ci-repair skill?
Copy the skill folder into ~/.claude/skills (the Claude Code tab above does this in one command), or install it as a plugin.
Does the ci-repair skill run scripts?
No, this skill is instructions only (SKILL.md) with no executable scripts.
Related skills
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…