Skip to content

I3161 — The commit hook is one call of the executable that runs the commit subset of doctor, the worktree guard and pages current under a declared budget

Replace .githooks/pre-commit's sequence of bin/majordomus doctor, worktree guard, scripts/pages current and providers-check with one hook command of the executable that composes them and reports its own time against benchmark.budget.

BLOCKED wave 1 · p2 · implementation profile · parallel safe

Part of repository-automation-is-typed — Repository automation is typed capabilities that Rhai orchestrates, and domain-logic shell only shrinks.

Blocked. This issue cannot start until I3156 is done. The status is derived from that, not declared.

Objective

Replace .githooks/pre-commit's sequence of bin/majordomus doctor, worktree guard, scripts/pages current and providers-check with one hook command of the executable that composes them and reports its own time against benchmark.budget.

Why

The inventory records the hook's doctor as the shell tool's slow path ('up to 136s' noted); owner, 2026-10-07: hooks, .envrc and installer shrink to exec-the-binary adapters. It extends milestone automation. Sources: chatgpt-majordomus:c192#8.

Current state

.githooks/pre-commit runs four commands, one of them the shell doctor; I0828 bounds doctor's time advisorily.

Desired state

.githooks/pre-commit is one exec line; the hook's verdicts are unchanged.

Scope

  • .githooks/pre-commit
  • apps/majordomus-cli/src/cli.rs
  • share/commands.yaml
  • .ai/repo/automation/inventory.jsonl
  • apps/majordomus-cli/src/commands/guard.rs
  • apps/majordomus-cli/src/commands/worktree.rs
  • apps/majordomus-cli/src/commands/mod.rs
  • lib/doctor.sh
  • .ai/repo/benchmarks/rust/policy.yaml
  • docs/generated/cli.yaml
  • test/cases/26_ci_wiring.sh

Out of scope

  • The pre-push hook

Dependencies

Acceptance criteria

  • Each refusal the four commands produce today is still produced
  • The hook reports its wall time against a declared budget
  • Each new case named here takes its number from `scripts/case-numbers next` and is announced on the board before the file is written (ADR 0053); a case number written in this record before that is provisional

Validation

  • bash test/run.sh 26_ci_wiring 56_derived_current_gate

Evidence required

  • case_commit_hook_is_one_call

Evidence

None recorded. Every token above needs a command or an artifact behind it before this issue can be completed; narrative is refused.

Timeline

started
—
verified
—
completed
—

Those three fields, the evidence above and the state of the dependencies are all the status is made of. There is no status field to disagree with them.

Canonical record: .ai/repo/project/issues/I3161.yaml. Read it back with majordomus plan show I3161.

Searches the titles and descriptions of every page this site publishes.