gate-p4

A readiness checklist for moving from project planning into implementation. It checks that the team has a committed, clearly defined piece of work and the required technical and organizational preparation.

In plain words
What is it for?
Use it before coding to verify that ready work items, project documents, and answers to likely developer questions are in place.
Why use it?
It prevents developers from starting with missing decisions, unclear tasks, or no implementable work.

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-p4
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 2,493 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.02493
Opus 5 $0.00000 $0.01247
Sonnet 5 $0.00000 $0.00499
Haiku 4.5 $0.00000 $0.00249

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

Security

Grade A, and why

gate-p4 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-p4.md · 171 lines

How it starts

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

/gate-p4 – Quality Gate 4: Planning → Implementation

Checks whether all organizational and technical prerequisites are met to begin implementation. This is a readiness gate – all participants must know what to do first. No argument – this gate always checks the complete checklist.

No Argument ($ARGUMENTS not applicable)

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

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

Criterion 6 below ("can the developer start without asking questions?") needs a concrete answer for whether at least one story is actually committed and ready to implement — not just "the backlog looks precise".

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 project with zero committed work.

  • Non-empty list → the project uses the structured store. Check workitems list --status "Ready" for criterion 6: non-empty means /p4-sprint has committed at least one story (/p5-implement will find it); empty is a genuine Not Met finding for criterion 6.
  • Empty list, but docs/workitems/ exists → the store is adopted, just empty for this query. This is a genuine Not Met finding for criterion 6 — the developer has nothing to start on — NOT an exemption to fall back to prose. Do not treat this case the same as "never adopted".
  • Empty list and no docs/workitems/ directory → not adopted, still on prose. Fall back to reading BACKLOG.md/SPRINT.md prose for criterion 6, as before, and evaluate readiness from the prose story status. Emit one line: "Tip: run lift to adopt the structured work-item store."

See Manual/WORKITEMS.md §8 for the full guard rationale, the directory-check requirement, and the status-verb mapping.

Read the full file on GitHub · 171 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 · 171 lines · 0 tokens per session scan A 07b5ebadf40b

Subscribe to this mod's changes

gate-p4 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 2,493 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.