execution-policy

execution-policy is a cursor rule for Claude Code, Codex, Cursor from hmj1026/dhpk. It costs 2 tokens per session (10,577 once invoked), scanned A, original, MIT.

A written execution policy for coding agents working in a repository. It defines how agents load project guidance, classify changes, choose a workflow, and resolve local rules versus shared rules.

In plain words
What is it for?
Use it to organise repository rules, route changes through the right workflow, and document project-specific overrides. It is intended for projects using files such as CLAUDE.md or .claude rules.
Why use it?
It reduces inconsistent agent behaviour when a project has several instruction files or different procedures for different kinds of work. It also gives the team a common order for deciding which guidance applies.

Cursor rule for Claude CodeCodexCursor

Written for Claude Code and Codex and Cursor: PreToolUse hook event, but also runs codex exec. Also seen: mentions CLAUDE.md; mentions subagents; mentions Claude Code.

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/hmj1026/dhpk/execution-policy
Clone the repo
git clone --depth 1 https://github.com/hmj1026/dhpk

Made for: Claude Code, Codex, 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 execution-policy

README.md
[![agentmods](https://agentmods.dev/badge/rules/hmj1026/dhpk/execution-policy.svg)](https://agentmods.dev/rules/hmj1026/dhpk/execution-policy)
Your own site
<a href="https://agentmods.dev/rules/hmj1026/dhpk/execution-policy"><img src="https://agentmods.dev/badge/rules/hmj1026/dhpk/execution-policy.svg" alt="Measured on agentmods" height="20"></a>
Per session 2 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 10,577 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.1 $0.00002 $0.10577
Opus 5 $0.00001 $0.05289
Sonnet 5 $0.00000 $0.02115
Haiku 4.5 $0.00000 $0.01058

Measured today against content hash 9dc374a7ee06, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

execution-policy 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 today.

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.

cursor/rules/execution-policy.mdc · 472 lines

How it starts

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

Execution Policy

dhpk's default execution policy for projects that adopt the harness. Read the always-visible kernel first (.cursor/rules/execution-policy-kernel.mdc), then load the conditional sections below as the selected route requires. Resource-layer markdown — referenced from the flow-guide skill and consumable directly by a project's own CLAUDE.md via the .cursor/dhpk/policies/execution-policy.md path. Not auto-loaded; opt-in.

Project overrides: projects that adopt this policy should keep their own short .claude/rules/execution-policy.md (or CLAUDE.md section) that only encodes deltas — e.g. extra sentinels, project-specific hot tables for performance reviewer, hook profile choice. Avoid copying the body wholesale; cross-link instead.

Resolution order for any reference to this file: use the project's .claude/rules/execution-policy.md first if present (it carries only deltas — extra sentinels, hot tables, hook profile), otherwise resolve to .cursor/dhpk/policies/execution-policy.md (the plugin SSOT). Projects should keep their local copy short and cross-link rather than copying the body wholesale.

Glossary (inline)

  • back-stop: hook pattern did not match but the AI semantically recognises the trigger should fire → AI proactively invokes the matching reviewer (and still clears the sentinel if present).
  • append-only exemption: pure additions may skip gitnexus_impact only when they add a new function/method/class, change no existing body/signature/docblock/typehint, and change no module-level state (imports or top-level constants); label the change append-only — gitnexus_impact skipped.
  • reviewer dispatch: when multiple sentinels coexist, triage out false positives → dispatch the rest in parallelcode-reviewer merges/dedups (see "Reviewer dispatch").
  • resumed review obligation: a session-scoped record created before reusing an existing sentinel-backed reviewer through SendMessage; it binds the final result to one generated reviewer slot, exact sentinel basename, session, dispatch, and freshness baseline.
  • lifecycle clearance: reconciliation and removal of a review sentinel after its lifecycle evidence is satisfied; it is not reviewer approval or completion.
  • Parallel Dispatch: two or more workers operating in one checkout under explicit, non-overlapping assigned scopes.
  • Assigned Scope: the exact repo-relative file list a worker may write, diff, and verify; it is not the whole working tree and cannot be expanded by the worker.
  • Worker-Owned Edit: a change within the assigned scope attributable to that worker's dispatch.
  • Out-of-Scope Observation: a sibling or unrelated change outside assigned scope that the worker reports but does not modify or clean.
  • Shared-State Reconciliation: the single sequential orchestrator pass that validates and updates shared ratchet/configuration state (a monotonic baseline file, e.g. a coverage or size-budget allowlist) after all parallel workers finish.
  • Judgment-Dense Standardizable Batch: a bounded, repeatable implementation step touching at least three files that requires consistent content judgment but has an exact file scope and verification contract; unresolved design and unknown root cause are excluded.

Read the full file on GitHub · 472 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. today First seen · 472 lines · 2 tokens per session scan A 9dc374a7ee06

Subscribe to this mod's changes

execution-policy is a cursor rule published in the GitHub repository hmj1026/dhpk (2 stars, last pushed yesterday), licensed MIT. It adds 2 tokens to every session and 10,577 once invoked, about $0.0000 per session on Opus 5. 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-09-05.