gate-p4

gate-p4 is a command for Claude Code from jonase47/ccpr. It costs 0 tokens per session (2,504 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: disable-model-invocation in frontmatter. Also seen: reads .claude/ paths; mentions CLAUDE.md.

Good fit Use it before coding to verify that ready work items, project documents, and answers to likely developer questions are in place.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/jonase47/ccpr/gate-p4
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.

Clone the repo
git clone --depth 1 https://github.com/jonase47/ccpr

Made for: Claude Code.

Wrote 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.

agentmods badge for gate-p4

README.md
[![agentmods](https://agentmods.dev/badge/commands/jonase47/ccpr/gate-p4/github.svg)](https://agentmods.dev/commands/jonase47/ccpr/gate-p4)
Your own site
<a href="https://agentmods.dev/commands/jonase47/ccpr/gate-p4"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/gate-p4/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gate-p4

Your own site · 80×15
<a href="https://agentmods.dev/commands/jonase47/ccpr/gate-p4"><img src="https://agentmods.dev/badge/commands/jonase47/ccpr/gate-p4.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,504 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00000 $0.02504
Opus 5.5 $0.00000 $0.01002
Sonnet 5.5 $0.00000 $0.00501
Haiku 4.5 $0.00000 $0.00250

Measured 26d ago against content hash 073cb9a183df, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 26d 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 · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 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 docs/adr/ADR-0002-workitem-backend-contract.md for the adoption-guard rationale and the status vocabulary.

Read the full file on GitHub · 174 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. 26d ago Changed 073cb9a183df
  2. 1mo ago Changed 7068a2f5244d
  3. 1mo ago Changed · +3 lines 7f3f614739bf
  4. 1mo 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 26d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,504 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.