gate-p3

A review gate for architecture and design decisions before detailed planning begins. Architecture describes how a system is structured, while design explains how its parts should work.

In plain words
What is it for?
Use it to check architecture documents, diagrams, data flows, security considerations, trade-offs, testing, and deployment planning.
Why use it?
It catches undocumented decisions, unresolved risks, and weak technical plans before they shape implementation.

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-p3
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,389 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.02389
Opus 5 $0.00000 $0.01195
Sonnet 5 $0.00000 $0.00478
Haiku 4.5 $0.00000 $0.00239

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

Security

Grade A, and why

gate-p3 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-p3.md · 153 lines

How it starts

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

/gate-p3 – Quality Gate 3: Architecture & Design → Planning

Checks whether all architecture and design decisions are completely documented and robust before transitioning into the planning and implementation phase. No argument – this gate always checks the complete checklist.

No Argument ($ARGUMENTS not applicable)

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

Execution

1. Read Preflight Report

Read docs/.gate-preflight-p3.md as the primary information source. This report contains:

  • Artifact existence and required sections (mechanically checked)
  • Content check (regex-based: diagrams, data flows, trade-offs, ERD, STRIDE, CI/CD, coverage)
  • Document summaries (via Ollama, if available)

If the preflight report does not exist or is older than 10 minutes, read the architecture documents directly instead — always start with the phase index, then the sub-indexes, then detail files only as needed:

  1. docs/architecture/ARCHITECTURE.md (phase index) — gives you the detail-file table, key decisions, open risks, gate notes.
  2. The three sub-indexes called out in the phase index:
    • docs/architecture/SECURITY.md (sub-index for /p3-sec-*)
    • docs/architecture/UX_CONCEPT.md (sub-index for /p3-ux-*)
    • docs/architecture/INFRA.md (sub-index for /p3-infra-*)
  3. Direct phase-level detail files only when content checks demand them:
    • COMPONENTS.md, TECH_STACK.md, NFR.md, DATA_MODEL.md, API_SPEC.md, COST_ESTIMATION.md, ADR/*.md
  4. Sub-index detail files only when the relevant sub-index flags an open question:
    • Security: THREATS.md, AUTH.md, DATA_SECURITY.md, API_SECURITY.md, CHECKLIST.md
    • UX: NAVIGATION.md, WIREFRAMES.md, DARKMODE.md, A11Y.md
    • Infra: HOSTING.md, CICD.md, MONITORING.md, TESTSTRATEGY.md

1a. Constitution Inviolables (mandatory pre-gate)

If docs/CONSTITUTION.md exists, the preflight report (docs/.gate-preflight-p3.md) includes a section "Constitution Inviolables (Required Read)" with the project's non-negotiable rules.

Read the full file on GitHub · 153 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 · 153 lines · 0 tokens per session scan A 9ecc580b7b6f

Subscribe to this mod's changes

gate-p3 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,389 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.