Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add agents/atebites-hub/pjtemplate/enforcement_matrixgit clone --depth 1 https://github.com/atebites-hub/PJTemplateWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/atebites-hub/pjtemplate/enforcement_matrix)<a href="https://agentmods.dev/agents/atebites-hub/pjtemplate/enforcement_matrix"><img src="https://agentmods.dev/badge/agents/atebites-hub/pjtemplate/enforcement_matrix.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.04251 |
| Opus 5 | $0.00000 | $0.02125 |
| Sonnet 5 | $0.00000 | $0.00850 |
| Haiku 4.5 | $0.00000 | $0.00425 |
Grade B, and why
enforcement_matrix scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Reads agent configuration directoriesmediumAgent snooping
.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.
| **Claude Code** | `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStop`, `SessionStart`, `SessionEnd`, `UserPromptSubmit`, `Notification`, `PreCompact`, and more. `Stop` fires "when Claude finishes responding." `SessionS How it starts
The opening of the file, as written. The whole thing — 139 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Enforcement Capability Matrix
1. The problem and the three-tier design
This template enforces process artifacts — task memories (docs/memories/), docs/code/ mirrors for every code file, and recorded reasoning — through a single script, scripts/check-task-compliance.sh. The script is the one source of truth for "is this change compliant?"; everything else is just a trigger that runs it.
The core constraint: there is no universal, cross-agent hook standard. Each coding harness (Claude Code, Cursor, Codex, Copilot CLI, Droid, etc.) ships its own hook schema, event names, and config location, and several popular tools (notably Google Antigravity at time of writing) have no stable, documented hook mechanism at all. Hook event names are even superficially similar across tools — PreToolUse/Stop appear in Claude Code, Codex, and Droid — but the JSON shapes, config paths, and exit-code semantics differ, and none is contractually stable. Building authoritative enforcement on any single harness's hooks would (a) break the moment a teammate uses a different agent, and (b) silently disappear if that harness changes or drops its hook API.
Because of this, enforcement is layered into three tiers, ordered by authority:
- Tier 1 — Authoritative, portable spine: a native committed git hook.
.githooks/pre-commit(activated per clone withgit config core.hooksPath .githooks) callsscripts/check-task-compliance.sh --staged. This depends only on git itself — no Python framework, no Node, no per-harness API — and runs identically regardless of which agent (or human) produced the commit. It is the layer we treat as definitive locally. - Tier 2 — Fast in-loop accelerators: optional per-harness adapters. Where a harness does expose a documented "the agent just finished" lifecycle event, we can wire that event to the same script (
--task) so the agent gets feedback during its loop instead of waiting forgit commit. These are conveniences, not guarantees; they are opt-in and harness-specific. We ship exactly one: the Claude CodeStophook. - Tier 3 — Non-bypassable backstop: CI. Any client-side git hook — native, husky, or pre-commit framework — is trivially skipped with
git commit --no-verify(git docs: githooks; Adam Johnson: Git skip hooks). The only enforcement a developer cannot locally bypass is a server-side / CI gate. CI re-runs the same script over the PR commit range (--range BASE..HEAD) and branch protection blocks the merge on failure.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago First seen · 139 lines · 0 tokens per session scan B f962f62de6a6
enforcement_matrix is an agent published in the GitHub repository atebites-hub/PJTemplate (2 stars, last pushed 11d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,251 tokens. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
Other agents, from other repositories
scrum-master
Scrum Master agent (Bob) — generates story files from Epic Manifest rows and the delivery file.
Orchestrator
Task coordination and agent delegation.
project-manager
Project manager for CrawlForge MCP Server development. Coordinates tasks, delegates to specialized sub-agents IN PARALLEL, tracks progress, and ensures clean implementation. Use PROACTIVELY for any multi-step project coordination.
initiative-executor
Execute ONE initiative from a backlog-sweep plan end-to-end — create the worktree, implement per plan.md, validate, open the PR, return a >> envelope. Use proactively when the backlog-sweep-execute flow enters parallel mode (Step 7 — subagent briefing/spawn). Orchestrator supplies initiative id, plan path, and tool…
issue-tracker
Issues and PRDs for this repo live as GitHub issues. Use the gh CLI for all operations.
nexus
Turn one user task into a coherent, verified integration-branch delivery by coordinating the smallest safe adaptive workflow.