CLI reference
tama adaptive repair
Drafts or accepts a candidate hook script, validates it against the hook's evidence corpus, and stages a repair proposal without changing the live hook.
Drafts or accepts a candidate hook script, validates it against the hook's evidence corpus, and stages a repair proposal without changing the live hook.
#Invocation
tama adaptive repair <hook-id> [--patch-file <path>]
<hook-id> is required. --patch-file validates an operator-supplied candidate; without it, Tama asks the local claude CLI to draft one.
#Output and state
Tama prints a JSON report. A valid candidate is copied into a timestamped proposal directory with proposed.diff, report.json, and a summary; the live and archived hook files remain unchanged. The report's ok controls exit status: true exits 0, false exits 1.
#Refusals and failures
- Missing hook id, an id beginning with
--, or--patch-filewithout a value prints adaptive usage and exits2. - Unknown or unmapped hook:
unknown hook or no script path: <hook-id>. - Missing candidate:
patch file not found: <path>. - When drafting is disabled:
LLM drafting disabled (HOOKS_ADAPTIVE_NO_LLM); pass --patch-file. - Unavailable local Claude:
local claude CLI unavailable; pass --patch-file; empty or unsuccessful output:claude draft did not produce content. - A failed corpus check reports
validation did not pass; artifacts left in <tmp-dir>.
Return to the adaptive command group or the complete CLI tree.