1.8 KiB
1.8 KiB
name, description
| name | description |
|---|---|
| repair | Repair failed hook wiring by delegating diagnosis to installed AI agent CLIs as subagents, patching the hooks repo, syncing manifests, and opening a PR against develop. Use when hooks-install or report-error.sh reports a failed hook, or when a hook keeps failing after rewiring; not for routine wiring or unrelated work. |
repair — repair a failed hook
Single source of guidelines: ../../references/guidelines.md.
Flow
- Read the failure context from
ERROR_{HASH}throughjsc-gitea:wikior from the failedstatus=line, then confirm the target repo ishooksand the PR base branch isdevelop. Completion condition: the failure context and target branch are explicit. - Detect installed AI CLIs with
../cli/tools/detect-clis.sh, then delegate diagnosis to one subagent per available CLI. Each subagent must receive the failure context and the/jsc-shared:spec-outputrules, must stay read-only, and must return one structured repair proposal: root cause, changed files, and verification command. Completion condition: every available CLI has one returned proposal, or there are no CLIs and the main agent has noted that it must diagnose alone. - Pick the smallest repair that makes the wiring pass, then apply it in the
hooksrepo. If the fix touches wiring behavior, updatehooks/tools/wire-cli.sh,hooks/skills/hooks-install/SKILL.md, andhooks/README.mdtogether. Run the relevant verification command before moving on. Completion condition: the fix is on disk and the verification command passes. - Run
../meta/tools/sync-skill-manifest.sh .. Completion condition: the README skill list and all three manifests show the same new version. - Commit, push, and open a PR with
jsc-git:pr develop. Completion condition: a PR URL comes back and the repair is ready for review.