p8-enforcement

p8-enforcement is a cursor rule for Cursor from Aquifer-sea/pattern8. It costs 513 tokens per session, scanned C, original, MIT.

A set of rules injected into every coding-agent conversation to enforce a required workflow called Pattern 8.

In plain words
What is it for?
Use it to govern task execution with skill checklists, command permissions, review submissions, retry handling, and other Pattern 8 requirements.
Why use it?
It requires the agent to discover applicable skills, check commands before running them, and submit completed skill-based work for review.

Cursor rule for Cursor

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 rules/aquifer-sea/pattern8/p8-enforcement
Clone the repo
git clone --depth 1 https://github.com/Aquifer-sea/pattern8

Made for: Cursor.

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 p8-enforcement

README.md
[![agentmods](https://agentmods.dev/badge/rules/aquifer-sea/pattern8/p8-enforcement.svg)](https://agentmods.dev/rules/aquifer-sea/pattern8/p8-enforcement)
Your own site
<a href="https://agentmods.dev/rules/aquifer-sea/pattern8/p8-enforcement"><img src="https://agentmods.dev/badge/rules/aquifer-sea/pattern8/p8-enforcement.svg" alt="Measured on agentmods" height="20"></a>
Per session 513 This file is loaded in full into every session.
When invoked 513 The same file — it is already loaded in full.
Security scan C 1 finding. 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.00513 $0.00513
Opus 5 $0.00257 $0.00257
Sonnet 5 $0.00103 $0.00103
Haiku 4.5 $0.00051 $0.00051

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

Security

Grade C, and why

p8-enforcement scanned grade C 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.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

<!-- SecurityGuard fence — intercepts dangerous commands like rm -rf, sudo, etc. -->
.cursor/rules/p8-enforcement.mdc · 58 lines

How it starts

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

P8 Enforcement Rules

You are working in a project governed by Pattern 8 (P8). Follow these rules.

1. SKILL Discovery

Before starting any task, read MCP Resource skill://index to find a matching SKILL. If a SKILL matches, read its checklist and template Resources. If no SKILL matches, work normally without P8 constraints.

2. execute_tool — Before Running Commands

Before executing any OS command, call:

execute_tool({ command: "your command", skill: "matched_skill_name" })

If it returns allowed: false, you MUST stop. Do NOT attempt to bypass.

3. submit_review — After Completing a SKILL Pipeline

After completing a task that uses a SKILL pipeline, call:

submit_review({ content: "your output", skill: "matched_skill_name" })

If it returns passed: true → deliver the output to the user. If it returns P8_AUDIT_FAILED:

  1. Read the violations list
  2. Fix each violation in your output
  3. Call submit_review again
  4. Repeat up to 3 times
  5. If still failing after 3 retries, inform the user with the violations

4. Absolute Prohibitions

  • Do NOT skip execute_tool and run OS commands directly
  • Do NOT modify files under skills/ unless the user explicitly asks
  • Do NOT modify AGENTS.md
  • Do NOT attempt to read references/guidelines.yaml or references/security.yaml directly — these are loaded internally by the P8 engine

Read the full file on GitHub · 58 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. 3d ago First seen · 58 lines · 513 tokens per session scan C f767fb13f3e2

Subscribe to this mod's changes

p8-enforcement is a cursor rule published in the GitHub repository Aquifer-sea/pattern8 (49 stars, last pushed 5mo ago), licensed MIT. It adds 513 tokens to every session, about $0.0026 per session on Opus 5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.