kendex / hooks
AGENTS.md76 starsChanged 2 months agoMITView on GitHub
Catalog hooks, one bash script per hook, each with its suite under tests/<name>.test.sh.
In this repository38 other files it gives its agents.
- AGENTS.mdAGENTS.md
- crates/AGENTS.mdAGENTS.md
- .github/AGENTS.mdAGENTS.md
- pi-extensions/AGENTS.mdAGENTS.md
- skills/AGENTS.mdAGENTS.md
- tools/AGENTS.mdAGENTS.md
- ui/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- crates/CLAUDE.mdCLAUDE.md
- .github/CLAUDE.mdCLAUDE.md
- hooks/CLAUDE.mdCLAUDE.md
- pi-extensions/CLAUDE.mdCLAUDE.md
- skills/CLAUDE.mdCLAUDE.md
- tools/CLAUDE.mdCLAUDE.md
- ui/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- app-deploySkill
- bot-instructionsSkill
- code-qualitySkill
- commit-guardsSkill
- deciderSkill
- deep-researchSkill
- dep-radarSkill
- devSkill
- doc-limitsSkill
- docs-writingSkill
- githubSkill
- iced-rsSkill
- kendex-issuesSkill
- linearSkill
- orchSkill
- preflightSkill
- price-handlingSkill
- project-managementSkill
- reviewerSkill
- review-gateSkill
- second-opinionSkill
- worktreeSkill
The file
Files
hooks/
Catalog hooks, one bash script per hook, each with its suite under tests/<name>.test.sh.
- A hook opens with a commented frontmatter block between
# ---lines:name,event(a name fromcrates/core/src/hook.rs::EVENTS),matcher,description,summary,safety,timeout(seconds) and an optionalharnesses: [..]restricting delivery (Antigravity is reached only when named there, because its payload istoolCall.args, nottool_input);crates/core/src/hook/spec.rsreads it. descriptionis the constraint, for the agent.summaryis one or two plain sentences for the person browsing: what the hook stops and what it costs them. It is what a catalog row, a Library row and the package page show, and a hook that writes none is shown itsdescriptioninstead. Both are one line — the header is read line by line, not as YAML.- Exit 0 allows; exit 2 refuses with the reason on stderr; a payload that cannot be read is a refusal, never a pass.
- A refusal states what it refused, why, and the preferred remedy first, before any exemption path.
- The first line of a refusal or a notice is
<hook-name>: <key>=<value>; the rule it follows — a stable key, the value acted on, English below it, the text in one place, and what a suite may assert about it — is../skills/code-quality/SKILL.md. Nothing precedes it: where a command the hook runs writes its own words, capture them at the site and hand them to the message function, which prints the keyed line, then the English, then that cause. A suite asserts the keyed line at position 1 and the cause below it. - There is no exception for text a person or a model reads. A format is exempt only where a named program parses that exact whole output; none does here, so what a suite would have read out of prose — which base
doc-drift-checkcompared against, which armsession-drift-check's exit code chose — is emitted as a value and pinned as one. What the hook relays under its keyed lines, such askendex check's report, is preserved exactly and asserted only as present. - The one thing a hook cannot put under its keyed line is output it never invoked: a diagnostic from shell startup, before the script runs. Everything the hook itself runs is captured at the site and replayed.
- Two hooks have their keys fixed by what reads them, and they do not move.
block-bare-cd:missing-tools=<comma list, in check order jq,cat,grep,sed>,payload=invalid-json,refused=bare-cd, each exit 2; a command with no bare cd exits 0 saying nothing.pre-commit-check:missing-tools=<comma list, in check order jq,cat,grep>,payload=invalid-json,bypass=<the matched word, verbatim>,unarmed=<the directory judged>, each exit 2;judged=<the directory judged>at exit 0 for the repository-moving notice; an armed repository with no bypass word exits 0 saying nothing. - A change to
hooks/<n>lands the copies under.claude/hooks,.codex/hooksand.pi/kendex/hooksonly where those already track the file, judged per file by atools/guardlane;tests/*renders nowhere. - Shell stays Bash 3.2 compatible;
tools/bash32-lintnames Bash 4+ constructs in the guard's commit lane, andtools/bash32-parseparses this tree with a real Bash 3.2 undertools/guard --fulland the guards shard.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

