majordomus guard hook
Judge the edit a provider's pre-tool payload (on stdin) is about to make; exit 2 with the reason and the remedy when no claim covers it, 0 otherwise
majordomus guard hook
Usage
majordomus guard hook [OPTIONS]Arguments
| argument | value | default | description |
|---|---|---|---|
| --provider | <PROVIDER> | claude-code | The provider whose payload stdin carries; its session id on the mesh is `<provider>-<session_id>` |
| --repo | <PATH> | — | Where a relative path in the payload is resolved from (default: the current directory); the checkout judged is the one the written file belongs to |
Examples
-
Judge the edit a provider's pre-tool payload names
What a provider's pre-tool hook runs before an edit: the payload arrives on stdin, and the command exits 2 with the reason and the remedy when no claim covers the path it names, 0 otherwise. Here stdin is empty, so it names no path, and the command lets the tool run.
$ majordomus guard hook --provider claude-codeWhat it asserts: exits 0.
Tested by apps/majordomus-cli/tests/cli_examples.rs, which runs the command against the built executable and asserts what the page states.
Where this comes from
Declared once in apps/majordomus-cli/src/cli.rs: clap for the structure, typed Rust metadata beside it for the examples. This page, majordomus guard hook --help, docs/generated/cli.md and docs/generated/cli.json are projections of that one declaration.
The whole command line on one page: the registry's command-line page. The task lifecycle (init, start, finish, doctor, ...) belongs to the shell tool, a different program: Commands and its specification.