[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77GX9WSZ36EYBTHTMDQRX6T":3,"skill-same:01M77GX9WSZ36EYBTHTMDQRX6T":53},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":31,"commitSha":32,"skillDirectory":33,"forksCount":34,"repositoryHtmlUrl":35,"repositoryHomepageUrl":36,"ownerHtmlUrl":37,"ownerBlogUrl":38,"ownerDescription":6,"updatedAt":39,"install":40,"resources":52},"01M77GX9WSZ36EYBTHTMDQRX6T","ci-repair",null,"Diagnose, isolate, and repair broken CI\u002FCD 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. Call when CI turns red, when `fak sync push` or `fak commit --push` is blocked by `COMMITTED_RED`\u002F`CI_BASE_RED`, or when dual-repo synchronization is wedged.","anthony-chaudhary\u002Ffak","anthony-chaudhary","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F18080164?v=4","01M77GSKCAEKV3JS07J40B94DY","Anthony Chaudhary","01M77GSKD26Z7F4FQQD4VA30VX",48,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fci-repair\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ci-repair\ndescription: Diagnose, isolate, and repair broken CI\u002FCD 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. Call when CI turns red, when `fak sync push` or `fak commit --push` is blocked by `COMMITTED_RED`\u002F`CI_BASE_RED`, or when dual-repo synchronization is wedged.\ndisable-model-invocation: false\nuser-invocable: true\nallowed-tools: Read, Bash, Write, Edit, Grep, Glob, Task\nargument-hint: \"[--run \u003Crun_id>] [--workflow \u003Cname>] [--diagnose-only] [--push]\"\nmetadata:\n  generated-by: fak project-assets sync\n  canonical: ..\u002F..\u002F..\u002F.claude\u002Fskills\u002Fci-repair\u002FSKILL.md\n  opencode: agent-permission\n---\n\n# \u002Fci-repair — Triage, Isolate & Repair Red CI\u002FCD Workflows on Trunk\n\nDeterministic, evidence-backed protocol for rapidly converting red CI\u002FCD 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.\n\n---\n\n## When to Invoke\n\n1. **GitHub Actions Red Alert**:\n   Any core CI workflow (`spine-invariance`, `ci-fast`, `ci`, `garden`, `build-matrix`, `security-audit`) fails on `main` or in an active PR.\n2. **Push & Synchronization Blockers**:\n   - `fak commit --push` or `fak sync push` fails with `COMMITTED_RED`, `CI_BASE_RED`, `TRUNK_CLOSED`, or pre-push hook rejection.\n   - `fak sync drain` becomes stuck in exponential backoff because the upstream trunk has a broken commit.\n3. **Dual-Repository Wedges (`fak-private`)**:\n   `fak-sync repo` fails fast-forward verification because public `fak` does not compile, has broken tests, or fails boundary checks (`fak-boundary check`).\n4. **Automated Loop Escalation**:\n   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.\n\n---\n\n## Non-Negotiable Invariants\n\n1. **One Root Cause, One Issue, One Commit**:\n   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 \u003Cleaf>)`.\n2. **Witness-First Verification**:\n   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.\n3. **Tree-Disjoint Worker Boundaries**:\n   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.\n4. **Preserve Architectural Invariants**:\n   - 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.\n   - Never suppress policy rules without structural AST deciders; ensure remedy text does not self-refute by matching its own deny regex.\n   - Never silently delete non-secret env reads without updating `admittedPostFreeze` or moving them to the config surface.\n5. **Safe Synchronization**:\n   Always land commits using `fak commit --path` or `fak sweep --apply`. Always push using `fak sync push` (which safely retries transient non-fast-forward races and refuses destructive merges).\n\n---\n\n## Systematic Failure Taxonomy & Remedies\n\nWhen diagnosing failed runs from `gh run list` and `gh run view \u003Cid> --log-failed`, classify errors into one of six canonical categories:\n\n### Category A: Architest & Layered-DAG Violations (`internal\u002Farchitest`)\n- **Upward Import (`TestNoUpwardImports`)**:\n  - *Symptom*: `layered-DAG import rule violated: \u003CpkgA> -> \u003CpkgB>. Rule: tier(A) >= tier(B)`.\n  - *Remedy*: Invert the dependency. Define an interface or function type in the lower tier (e.g. `type ContentScreener func(body []byte) bool` in `internal\u002Fmcpbroker`), provide a `Register...` hook, and wire it from a higher-tier package (e.g. `internal\u002Fheadroom\u002Fadmit.go`).\n- **Unregistered Engine ID (`TestSingleEngineDriverPerID`)**:\n  - *Symptom*: `engine id \"X\" is registered by [P] in non-test code but is not a declared id in engineDriverRole`.\n  - *Remedy*: Add `\"X\": {\"P\": \"role description\"}` to `engineDriverRole` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Off-List Self-Registration (`TestRequestPathLeavesRegistered`)**:\n  - *Symptom*: `leaf P self-registers (init() -> abi.Register*) but is neither blank-imported in internal\u002Fregistrations nor on regOffList`.\n  - *Remedy*: Add `\"P\": true` to `regOffList` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Non-Literal Subprocess Exec (`TestRequestPathInterpreterFree`)**:\n  - *Symptom*: `request-path package P calls exec with a non-literal program argument...`.\n  - *Remedy*: Add `\"P\": \"justification\"` to `interpreterExecAllow` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Missing Third-Party Tool Inventory (`TestThirdPartyEffectsRegisterCoversTree`)**:\n  - *Symptom*: `the tree pulls in subprocess_tool \"X\" and docs\u002Fsbom\u002Fthird-party-effects.json has neither a row nor an exclusion`.\n  - *Remedy*: Add `\"X\"` under `class: \"subprocess_tool\"` in alphabetical order in `docs\u002Fsbom\u002Fthird-party-effects.json` with `\"pin\": \"host_provided\"`.\n- **Declared Reason Missing Code Emitter (`TestEveryDeclaredReasonHasAnEmitter`)**:\n  - *Symptom*: `dos.toml declares [reasons.X] but no non-test source contains the token`.\n  - *Remedy*: Define `const ReasonX = \"X\"` in the declaring package and wire it into the producer's refusal\u002Fstatus path.\n- **Brittle Test Sleeps (`TestNoBrittleSleepsInAuditedPackages`)**:\n  - *Symptom*: `brittle time.Sleep synchronization in test; use channels, sync.WaitGroup, or bounded retry\u002Fpolling loops`.\n  - *Remedy*: Replace `time.Sleep(...)` with channel synchronization or `select { case \u003C-time.After(...): }`.\n\n### Category B: Policy & Structural Surface Rules (`internal\u002Fadjudicator`, `internal\u002Fpolicy`)\n- **Unrecognised Structural Rule (`TestEveryShippedStructuralRuleIsRecognised`)**:\n  - *Symptom*: `tool \"X\" arg \"command\" ships a deny_regex with no structural decider and no inventory entry`.\n  - *Remedy*: Implement a structural AST\u002Fcommand parser in `internal\u002Fadjudicator\u002F\u003Crule>.go` (e.g. `isGitPushArgRule`, `commandExecutesGitPush`), wire it in `decide_argpredicates.go`, and register it in `policy_structural_surface_test.go` under `families`.\n- **Self-Refuting Remedy Text (`TestEveryShippedDenyRuleNamesARemedy`)**:\n  - *Symptom*: `the fix text for regex MATCHES its own deny_regex, and this rule has NO structural decider`.\n  - *Remedy*: Add the structural decider to the `decided` boolean in `policy_structural_surface_test.go` so inert mentions in commit messages, greps, or quoted text are admitted without re-tripping the rule.\n\n### Category C: Generated Artifact & Scorecard Freshness (`concept freshness`, `docs\u002F`)\n- **Disambiguation Scorecard Drift**:\n  - *Symptom*: `concept generated-artifact freshness` fails with `{\"verdict\":\"stale\",\"stale_paths\":[\"docs\u002Fconcept-disambiguation-scorecard\u002FREADME.md\"]}`.\n  - *Remedy*: Regenerate via `go run .\u002Fcmd\u002Ffak concept generate`, then verify with `go run .\u002Fcmd\u002Ffak concept freshness --check --json`. Commit under lane `(fak docs)`.\n\n### Category D: Uncommitted Companion WIP \u002F Compiler Breakages (`COMMITTED_RED`)\n- **Missing Struct Field \u002F Method**:\n  - *Symptom*: `X undefined (type T has no field or method X)`.\n  - *Remedy*: Check the working tree for uncommitted companion edits from peer sessions, or implement the missing exported field\u002Fmethod with appropriate doc comments and tests.\n\n### Category E: Ratchet & Debt Ledgers (`internal\u002Fenvconfiglint`, `CONFIG_NOT_ENV`)\n- **Unrecorded Non-Secret Env Read**:\n  - *Symptom*: `env read X is not a declared secret; move it to the config surface (CONFIG_NOT_ENV)`.\n  - *Remedy*: If the read landed during an unmonitored window, record `\"X\"` in `admittedPostFreeze` in `internal\u002Fenvconfiglint\u002Fadmitted.go` and verify with `go test .\u002Finternal\u002Fenvconfiglint`.\n\n### Category F: Formatting & Line Hygiene (`gofmt`)\n- **Unformatted Go Source**:\n  - *Symptom*: `gofmt: N file(s) not formatted (run 'gofmt -w .' from fak\u002F)`.\n  - *Remedy*: Format the specific affected files with `gofmt -w \u003Cpaths>`, verify with `gofmt -l \u003Cpaths>`, and commit via `fak commit --path`.\n\n---\n\n## Step-by-Step Execution Workflow\n\n### Phase 1: Triage & Failure Capture\n1. **List recent workflow runs**:\n   ```bash\n   gh run list --limit 15\n   ```\n2. **Inspect failed workflow jobs**:\n   ```bash\n   gh run view \u003Crun_id> --log-failed\n   ```\n   Or examine specific failed job logs:\n   ```bash\n   gh run view --job=\u003Cjob_id> --log\n   ```\n3. **Partition failures**: Group failures into distinct, non-overlapping concerns (Category A through F).\n\n### Phase 2: Advance Ticketing & Arbitration\n1. **Create dedicated GitHub issues**:\n   For each distinct failure category:\n   ```bash\n   gh issue create --title \"fix(\u003Csubsystem>): \u003Cconcise summary>\" --body \"Problem: ... Intended outcome: ... Witness: ...\"\n   ```\n2. **Arbitrate lane leases**:\n   Verify lane availability with `dos arbitrate`:\n   ```bash\n   dos arbitrate --lane \u003Clane> --mode exclusive\n   ```\n\n### Phase 3: Parallel Subagent Delegation\n1. **Assign disjoint write sets**:\n   Launch concurrent `worker` subagents for independent failure components.\n   - Worker 1: e.g. `internal\u002Fmcpbroker\u002F...`, `internal\u002Fheadroom\u002Fadmit.go`\n   - Worker 2: e.g. `internal\u002Fadjudicator\u002Fgit_push.go`, `internal\u002Fadjudicator\u002F...`\n   - Worker 3: e.g. `docs\u002Fconcept-disambiguation-scorecard\u002FREADME.md`\n2. **Execute on-device witness commands**:\n   Each worker must execute and return clean witness command output (e.g. `go test -v .\u002Finternal\u002Farchitest -run TestNoUpwardImports`).\n\n### Phase 4: Independent Cross-Validation\n1. Dispatch a `cross-validator` or `tester` subagent to execute the full affected test matrix independently before landing.\n2. Confirm zero regressions on related packages.\n\n### Phase 5: Atomic Staging, Commit & Push\n1. **Lint subject before commit**:\n   ```bash\n   fak commit --preview --path \u003Cp1> --path \u003Cp2> -m \"fix(\u003Clane>): \u003Cmsg> #\u003Cissue> (fak \u003Clane>)\"\n   ```\n2. **Commit explicit paths**:\n   ```bash\n   fak commit --path \u003Cp1> --path \u003Cp2> -m \"fix(\u003Clane>): \u003Cmsg> #\u003Cissue> (fak \u003Clane>)\"\n   ```\n3. **Safe sync and push**:\n   ```bash\n   fak sync push\n   ```\n   If racing against peer commits, `fak sync push` automatically retries fast-forward rebases up to the budget.\n\n### Phase 6: Post-Push CI Verification\n1. Monitor new workflow runs triggered by the push:\n   ```bash\n   gh run list --limit 5\n   ```\n2. Watch until `spine-invariance`, `ci-fast`, and `ci` complete green.\n\n---\n\n## Integration with Automated Processes & Loops\n\nTo keep unattended fleets moving when CI breaks, other processes interact with `\u002Fci-repair` as follows:\n\n### 1. The `fak sync drain` Recovery Hook\n`fak sync drain` queues commits stranded when the upstream trunk is red. Instead of passive exponential backoff that deadlocks on a permanent trunk break:\n- On attempt 2 (`attempts >= 2`), `fak sync drain` inspects `gh run list --workflow ci-fast`.\n- If the failure is a known deterministic break (e.g., stale concept scorecard or unformatted files), it automatically triggers the deterministic healing pass (`fak concept generate` \u002F `gofmt -w`), commits the fix, and flushes the drain queue.\n\n### 2. `fak recover COMMITTED_RED`\nWhen `fak commit` or preflight encounters `COMMITTED_RED`:\n- `fak recover COMMITTED_RED` provides executable recovery:\n  ```bash\n  fak recover COMMITTED_RED --execute\n  ```\n  which invokes the `\u002Fci-repair` diagnostics and suggests the exact remediation command.\n- A red can be pre-existing: test step only, identical on the landing base, and witnessed per [`commit-clean`](..\u002Fcommit-clean\u002FSKILL.md) \"Pre-existing red\". In that case, land first under that rule without asking (operator policy 2026-09-26), then triage or file the trunk red separately.\n\n### 3. Dual-Repo Sync (`fak-sync repo` in `fak-private`)\nWhen `fak-sync repo` is wedged by public trunk compilation errors:\n- `fak-sync repo` automatically runs boundary and compilation probes (`fak validate --mine`, `go work sync`).\n- If public `fak` is red, it suggests or triggers `\u002Fci-repair` on the public checkout before attempting to fast-forward the private mirror.\n\n### 4. Headless Super-Loops (`run-it-all-night`, `fleet-wave`, `super-loop`)\nWhen a headless coordinator catches an `EXIT_TRUNK_RED` error:\n- It checks `dos arbitrate --lane ci`.\n- If free, it acquires the `ci` lane lease, executes the bounded `\u002Fci-repair` packet, verifies trunk health, and resumes the overnight issue wave without terminating.\n","# \u002Fci-repair — Triage, Isolate & Repair Red CI\u002FCD Workflows on Trunk\n\nDeterministic, evidence-backed protocol for rapidly converting red CI\u002FCD 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.\n\n---\n\n## When to Invoke\n\n1. **GitHub Actions Red Alert**:\n   Any core CI workflow (`spine-invariance`, `ci-fast`, `ci`, `garden`, `build-matrix`, `security-audit`) fails on `main` or in an active PR.\n2. **Push & Synchronization Blockers**:\n   - `fak commit --push` or `fak sync push` fails with `COMMITTED_RED`, `CI_BASE_RED`, `TRUNK_CLOSED`, or pre-push hook rejection.\n   - `fak sync drain` becomes stuck in exponential backoff because the upstream trunk has a broken commit.\n3. **Dual-Repository Wedges (`fak-private`)**:\n   `fak-sync repo` fails fast-forward verification because public `fak` does not compile, has broken tests, or fails boundary checks (`fak-boundary check`).\n4. **Automated Loop Escalation**:\n   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.\n\n---\n\n## Non-Negotiable Invariants\n\n1. **One Root Cause, One Issue, One Commit**:\n   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 \u003Cleaf>)`.\n2. **Witness-First Verification**:\n   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.\n3. **Tree-Disjoint Worker Boundaries**:\n   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.\n4. **Preserve Architectural Invariants**:\n   - 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.\n   - Never suppress policy rules without structural AST deciders; ensure remedy text does not self-refute by matching its own deny regex.\n   - Never silently delete non-secret env reads without updating `admittedPostFreeze` or moving them to the config surface.\n5. **Safe Synchronization**:\n   Always land commits using `fak commit --path` or `fak sweep --apply`. Always push using `fak sync push` (which safely retries transient non-fast-forward races and refuses destructive merges).\n\n---\n\n## Systematic Failure Taxonomy & Remedies\n\nWhen diagnosing failed runs from `gh run list` and `gh run view \u003Cid> --log-failed`, classify errors into one of six canonical categories:\n\n### Category A: Architest & Layered-DAG Violations (`internal\u002Farchitest`)\n- **Upward Import (`TestNoUpwardImports`)**:\n  - *Symptom*: `layered-DAG import rule violated: \u003CpkgA> -> \u003CpkgB>. Rule: tier(A) >= tier(B)`.\n  - *Remedy*: Invert the dependency. Define an interface or function type in the lower tier (e.g. `type ContentScreener func(body []byte) bool` in `internal\u002Fmcpbroker`), provide a `Register...` hook, and wire it from a higher-tier package (e.g. `internal\u002Fheadroom\u002Fadmit.go`).\n- **Unregistered Engine ID (`TestSingleEngineDriverPerID`)**:\n  - *Symptom*: `engine id \"X\" is registered by [P] in non-test code but is not a declared id in engineDriverRole`.\n  - *Remedy*: Add `\"X\": {\"P\": \"role description\"}` to `engineDriverRole` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Off-List Self-Registration (`TestRequestPathLeavesRegistered`)**:\n  - *Symptom*: `leaf P self-registers (init() -> abi.Register*) but is neither blank-imported in internal\u002Fregistrations nor on regOffList`.\n  - *Remedy*: Add `\"P\": true` to `regOffList` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Non-Literal Subprocess Exec (`TestRequestPathInterpreterFree`)**:\n  - *Symptom*: `request-path package P calls exec with a non-literal program argument...`.\n  - *Remedy*: Add `\"P\": \"justification\"` to `interpreterExecAllow` in `internal\u002Farchitest\u002Farchitest_test.go`.\n- **Missing Third-Party Tool Inventory (`TestThirdPartyEffectsRegisterCoversTree`)**:\n  - *Symptom*: `the tree pulls in subprocess_tool \"X\" and docs\u002Fsbom\u002Fthird-party-effects.json has neither a row nor an exclusion`.\n  - *Remedy*: Add `\"X\"` under `class: \"subprocess_tool\"` in alphabetical order in `docs\u002Fsbom\u002Fthird-party-effects.json` with `\"pin\": \"host_provided\"`.\n- **Declared Reason Missing Code Emitter (`TestEveryDeclaredReasonHasAnEmitter`)**:\n  - *Symptom*: `dos.toml declares [reasons.X] but no non-test source contains the token`.\n  - *Remedy*: Define `const ReasonX = \"X\"` in the declaring package and wire it into the producer's refusal\u002Fstatus path.\n- **Brittle Test Sleeps (`TestNoBrittleSleepsInAuditedPackages`)**:\n  - *Symptom*: `brittle time.Sleep synchronization in test; use channels, sync.WaitGroup, or bounded retry\u002Fpolling loops`.\n  - *Remedy*: Replace `time.Sleep(...)` with channel synchronization or `select { case \u003C-time.After(...): }`.\n\n### Category B: Policy & Structural Surface Rules (`internal\u002Fadjudicator`, `internal\u002Fpolicy`)\n- **Unrecognised Structural Rule (`TestEveryShippedStructuralRuleIsRecognised`)**:\n  - *Symptom*: `tool \"X\" arg \"command\" ships a deny_regex with no structural decider and no inventory entry`.\n  - *Remedy*: Implement a structural AST\u002Fcommand parser in `internal\u002Fadjudicator\u002F\u003Crule>.go` (e.g. `isGitPushArgRule`, `commandExecutesGitPush`), wire it in `decide_argpredicates.go`, and register it in `policy_structural_surface_test.go` under `families`.\n- **Self-Refuting Remedy Text (`TestEveryShippedDenyRuleNamesARemedy`)**:\n  - *Symptom*: `the fix text for regex MATCHES its own deny_regex, and this rule has NO structural decider`.\n  - *Remedy*: Add the structural decider to the `decided` boolean in `policy_structural_surface_test.go` so inert mentions in commit messages, greps, or quoted text are admitted without re-tripping the rule.\n\n### Category C: Generated Artifact & Scorecard Freshness (`concept freshness`, `docs\u002F`)\n- **Disambiguation Scorecard Drift**:\n  - *Symptom*: `concept generated-artifact freshness` fails with `{\"verdict\":\"stale\",\"stale_paths\":[\"docs\u002Fconcept-disambiguation-scorecard\u002FREADME.md\"]}`.\n  - *Remedy*: Regenerate via `go run .\u002Fcmd\u002Ffak concept generate`, then verify with `go run .\u002Fcmd\u002Ffak concept freshness --check --json`. Commit under lane `(fak docs)`.\n\n### Category D: Uncommitted Companion WIP \u002F Compiler Breakages (`COMMITTED_RED`)\n- **Missing Struct Field \u002F Method**:\n  - *Symptom*: `X undefined (type T has no field or method X)`.\n  - *Remedy*: Check the working tree for uncommitted companion edits from peer sessions, or implement the missing exported field\u002Fmethod with appropriate doc comments and tests.\n\n### Category E: Ratchet & Debt Ledgers (`internal\u002Fenvconfiglint`, `CONFIG_NOT_ENV`)\n- **Unrecorded Non-Secret Env Read**:\n  - *Symptom*: `env read X is not a declared secret; move it to the config surface (CONFIG_NOT_ENV)`.\n  - *Remedy*: If the read landed during an unmonitored window, record `\"X\"` in `admittedPostFreeze` in `internal\u002Fenvconfiglint\u002Fadmitted.go` and verify with `go test .\u002Finternal\u002Fenvconfiglint`.\n\n### Category F: Formatting & Line Hygiene (`gofmt`)\n- **Unformatted Go Source**:\n  - *Symptom*: `gofmt: N file(s) not formatted (run 'gofmt -w .' from fak\u002F)`.\n  - *Remedy*: Format the specific affected files with `gofmt -w \u003Cpaths>`, verify with `gofmt -l \u003Cpaths>`, and commit via `fak commit --path`.\n\n---\n\n## Step-by-Step Execution Workflow\n\n### Phase 1: Triage & Failure Capture\n1. **List recent workflow runs**:\n   ```bash\n   gh run list --limit 15\n   ```\n2. **Inspect failed workflow jobs**:\n   ```bash\n   gh run view \u003Crun_id> --log-failed\n   ```\n   Or examine specific failed job logs:\n   ```bash\n   gh run view --job=\u003Cjob_id> --log\n   ```\n3. **Partition failures**: Group failures into distinct, non-overlapping concerns (Category A through F).\n\n### Phase 2: Advance Ticketing & Arbitration\n1. **Create dedicated GitHub issues**:\n   For each distinct failure category:\n   ```bash\n   gh issue create --title \"fix(\u003Csubsystem>): \u003Cconcise summary>\" --body \"Problem: ... Intended outcome: ... Witness: ...\"\n   ```\n2. **Arbitrate lane leases**:\n   Verify lane availability with `dos arbitrate`:\n   ```bash\n   dos arbitrate --lane \u003Clane> --mode exclusive\n   ```\n\n### Phase 3: Parallel Subagent Delegation\n1. **Assign disjoint write sets**:\n   Launch concurrent `worker` subagents for independent failure components.\n   - Worker 1: e.g. `internal\u002Fmcpbroker\u002F...`, `internal\u002Fheadroom\u002Fadmit.go`\n   - Worker 2: e.g. `internal\u002Fadjudicator\u002Fgit_push.go`, `internal\u002Fadjudicator\u002F...`\n   - Worker 3: e.g. `docs\u002Fconcept-disambiguation-scorecard\u002FREADME.md`\n2. **Execute on-device witness commands**:\n   Each worker must execute and return clean witness command output (e.g. `go test -v .\u002Finternal\u002Farchitest -run TestNoUpwardImports`).\n\n### Phase 4: Independent Cross-Validation\n1. Dispatch a `cross-validator` or `tester` subagent to execute the full affected test matrix independently before landing.\n2. Confirm zero regressions on related packages.\n\n### Phase 5: Atomic Staging, Commit & Push\n1. **Lint subject before commit**:\n   ```bash\n   fak commit --preview --path \u003Cp1> --path \u003Cp2> -m \"fix(\u003Clane>): \u003Cmsg> #\u003Cissue> (fak \u003Clane>)\"\n   ```\n2. **Commit explicit paths**:\n   ```bash\n   fak commit --path \u003Cp1> --path \u003Cp2> -m \"fix(\u003Clane>): \u003Cmsg> #\u003Cissue> (fak \u003Clane>)\"\n   ```\n3. **Safe sync and push**:\n   ```bash\n   fak sync push\n   ```\n   If racing against peer commits, `fak sync push` automatically retries fast-forward rebases up to the budget.\n\n### Phase 6: Post-Push CI Verification\n1. Monitor new workflow runs triggered by the push:\n   ```bash\n   gh run list --limit 5\n   ```\n2. Watch until `spine-invariance`, `ci-fast`, and `ci` complete green.\n\n---\n\n## Integration with Automated Processes & Loops\n\nTo keep unattended fleets moving when CI breaks, other processes interact with `\u002Fci-repair` as follows:\n\n### 1. The `fak sync drain` Recovery Hook\n`fak sync drain` queues commits stranded when the upstream trunk is red. Instead of passive exponential backoff that deadlocks on a permanent trunk break:\n- On attempt 2 (`attempts >= 2`), `fak sync drain` inspects `gh run list --workflow ci-fast`.\n- If the failure is a known deterministic break (e.g., stale concept scorecard or unformatted files), it automatically triggers the deterministic healing pass (`fak concept generate` \u002F `gofmt -w`), commits the fix, and flushes the drain queue.\n\n### 2. `fak recover COMMITTED_RED`\nWhen `fak commit` or preflight encounters `COMMITTED_RED`:\n- `fak recover COMMITTED_RED` provides executable recovery:\n  ```bash\n  fak recover COMMITTED_RED --execute\n  ```\n  which invokes the `\u002Fci-repair` diagnostics and suggests the exact remediation command.\n- A red can be pre-existing: test step only, identical on the landing base, and witnessed per [`commit-clean`](..\u002Fcommit-clean\u002FSKILL.md) \"Pre-existing red\". In that case, land first under that rule without asking (operator policy 2026-09-26), then triage or file the trunk red separately.\n\n### 3. Dual-Repo Sync (`fak-sync repo` in `fak-private`)\nWhen `fak-sync repo` is wedged by public trunk compilation errors:\n- `fak-sync repo` automatically runs boundary and compilation probes (`fak validate --mine`, `go work sync`).\n- If public `fak` is red, it suggests or triggers `\u002Fci-repair` on the public checkout before attempting to fast-forward the private mirror.\n\n### 4. Headless Super-Loops (`run-it-all-night`, `fleet-wave`, `super-loop`)\nWhen a headless coordinator catches an `EXIT_TRUNK_RED` error:\n- It checks `dos arbitrate --lane ci`.\n- If free, it acquires the `ci` lane lease, executes the bounded `\u002Fci-repair` packet, verifies trunk health, and resumes the overnight issue wave without terminating.\n",{"name":5,"metadata":24,"description":7,"allowed-tools":28,"argument-hint":29,"user-invocable":30,"disable-model-invocation":20},{"opencode":25,"canonical":26,"generated-by":27},"agent-permission","..\u002F..\u002F..\u002F.claude\u002Fskills\u002Fci-repair\u002FSKILL.md","fak project-assets sync","Read, Bash, Write, Edit, Grep, Glob, Task","[--run \u003Crun_id>] [--workflow \u003Cname>] [--diagnose-only] [--push]",true,"main","f565b7b7db63e79649f3a02c08108132a86c5d05",".agents\u002Fskills\u002Fci-repair",16,"https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak","https:\u002F\u002Fanthony-chaudhary.github.io\u002Ffak\u002Fshowcase.html","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary","https:\u002F\u002Flinkedin.com\u002Fin\u002Fanthonychaudhary","2026-11-15 03:06:00",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":30},[42,45,48],{"tool":43,"command":44},"npx","npx skills add anthony-chaudhary\u002Ffak --skill ci-repair",{"tool":46,"command":47},"bunx","bunx skills add anthony-chaudhary\u002Ffak --skill ci-repair",{"tool":49,"command":50},"pnpm","pnpm dlx skills add anthony-chaudhary\u002Ffak --skill ci-repair","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fci-repair\u002FSKILL.md",[],[54,61,70,77,84,89],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M78V4059KRP2T88YR6Z05MJQ","serve-receipt","On-demand research protocol + deterministic receipt for serving a Hugging Face model on a concrete GPU target — fan out research lanes (model facts\u002Ffiles, engine support matrix, serving recipes, KV\u002Fstate memory math), compute the tiered feasibility verdict with `fak serve-receipt` (never narrated math), and emit a witnessed launch receipt. Use when asked for an \"initial config\", \"serving receipt\", or \"how do I serve \u003Cmodel> on \u003CGPUs>\".","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fserve-receipt\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":65,"licenseFileUrl":66,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M77HRGKQV2CJ2K6ZFN4YQ32K","caveman","Ultra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels: lite, full (default), ultra, wenyan-lite, wenyan-full, wenyan-ultra. Use when user says \"caveman mode\", \"talk like caveman\", \"use caveman\", \"less tokens\", \"be brief\", or invokes \u002Fcaveman. Also auto-triggers when token efficiency is requested.","MIT","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fsyspromptmmu\u002Fthird_party\u002Fcaveman\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fsyspromptmmu\u002Fthird_party\u002Fcaveman\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M77HRAY3Y3BE7APN5PVJF7NV","quality-report","Score the repo quality and emit a report card.","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fctxplans\u002Ftestdata\u002Frepo\u002F.claude\u002Fskills\u002Fquality-report\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M77HR9807KHAX13DG9PW2K2Q","ctx-overlay","Compact the context window and prune the memory store when a session grows too long.","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fctxplans\u002Ftestdata\u002Frepo\u002F.claude\u002Fskills\u002Fctx-overlay\u002FSKILL.md",[],[],{"skillNo":85,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M77HR7XQ9X8F2CY9Z4F2ZEZ3","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fctxplanlint\u002Ftestdata\u002Frepo\u002F.claude\u002Fskills\u002Fquality-report\u002FSKILL.md",[],[],{"skillNo":90,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":91,"categories":92,"keywords":93,"publishedAt":19},"01M77HR5BVKCTR1WNJGRBSDNX7","https:\u002F\u002Fgithub.com\u002Fanthony-chaudhary\u002Ffak\u002Fblob\u002Fmain\u002Finternal\u002Fctxplanlint\u002Ftestdata\u002Frepo\u002F.claude\u002Fskills\u002Fctx-overlay\u002FSKILL.md",[],[]]