gate-p5

A sprint-end checklist that reviews the current sprint’s code and tasks against quality standards. A sprint is a planned period of development work.

In plain words
What is it for?
Use it to review all current sprint tasks, confirm the whole-sprint code review is up to date, and decide whether the sprint can be marked successful.
Why use it?
It shows whether the sprint is actually complete and identifies quality issues before work moves on.

Command

Install

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.

agentmods
npx agentmods add commands/jonase47/ccpr/gate-p5
Clone the repo
git clone --depth 1 https://github.com/jonase47/ccpr
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,050 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03050
Opus 5 $0.00000 $0.01525
Sonnet 5 $0.00000 $0.00610
Haiku 4.5 $0.00000 $0.00305

Measured 2d ago against content hash 6c516f89ce20, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

gate-p5 scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/gate-p5.md · 197 lines

How it starts

The opening of the file, as written. The whole thing — 197 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/gate-p5 – Sprint Gate: Check Implementation Quality

Checks at the end of each sprint whether all tasks meet quality standards and the sprint can be considered successfully completed. Called repeatedly after each sprint. No argument – this gate always checks the complete current sprint status.

No Argument ($ARGUMENTS not applicable)

Gate commands do not accept arguments. They always check the complete current sprint status.

Execution

0. Holistic sprint review (runs automatically, opus)

Before evaluating the gate, ensure the whole-sprint code review exists and is current, then feed its findings into the gate.

Resolve scope + freshness guard:

  1. Determine the current sprint number <n> from docs/planning/SPRINT.md's frontmatter field sprint: <n> (or the active sprint/SPRINT-NN.md's sprint: NN field, if SPRINT.md is a sub-index) — the same file the base_commit below already comes from. Also read base_commit from that same frontmatter.
  2. A report docs/reviews/SPRINT-<n>-review.md is current if it exists AND its recorded reviewed_head equals the current git rev-parse HEAD.
  3. Current → reuse it; do not re-run (opus is not spent again).
  4. Missing or stale (HEAD moved since it was written, e.g. after a /p5-bugfix) → run /p5-review-sprint now. That command invokes the code-reviewer agent on opus — the agent default is sonnet, so the opus model is passed explicitly via the command's **Model**: opus — scoped to git diff <base_commit>..HEAD, and writes/refreshes the report. Invoked as a sub-step here: use its findings; ignore its standalone next-step recommendations (we are already in the gate).

Use the result: the holistic review feeds the "Code review" criterion (§2.4). Any unresolved CRITICAL/HIGH finding is a gate blocker → /p5-bugfix, then re-run the gate (the guard re-runs the review against the new HEAD).

0a. Work-item adoption guard (ADR-0002 §8)

Run python3 ~/.claude/scripts/workitems.py list and explicitly check whether the docs/workitems/ directory exists (e.g. ls docs/workitems/). Both signals are required — list returns the identical [] for an adopted-but-empty store and a never-adopted project; only the directory's existence tells them apart, and getting this wrong lets the gate falsely pass a sprint with zero actually-tracked story status.

  • Non-empty list → the project uses the structured store. Use the CLI for all story-status data below (the "Story status" criterion in step 2 and the write-back in step 3), instead of reading it from BACKLOG.md prose.
  • Empty list, but docs/workitems/ exists → the store is adopted, just empty for this query (e.g. every story already archived/migrated). This is a genuine finding for the "Story status" criterion — NOT an exemption to fall back to prose. Evaluate it as "no stories tracked", not as "still on prose".
  • Empty list and no docs/workitems/ directory → not adopted, still on prose. Read SPRINT.md/BACKLOG.md for story status, as before. Emit one line: "Tip: run lift to adopt the structured work-item store."

Read the full file on GitHub · 197 lines

Changes

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.

  1. 2d ago First seen · 197 lines · 0 tokens per session scan A 6c516f89ce20

Subscribe to this mod's changes

gate-p5 is a command published in the GitHub repository jonase47/ccpr (1 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,050 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.