execution-policy

execution-policy is a cursor rule for Claude Code, Cursor from hmj1026/dhpk. It costs 6 tokens per session (13,769 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 CodeCursor

Written for Claude Code and Cursor: PreToolUse hook event, but also a Cursor rule (.mdc). Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit 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.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/hmj1026/dhpk/execution-policy
View source ↗ hmj1026/dhpk
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/hmj1026/dhpk

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

Your own site · 80×15
<a href="https://agentmods.dev/rules/hmj1026/dhpk/execution-policy"><img src="https://agentmods.dev/badge/rules/hmj1026/dhpk/execution-policy.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 6 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 13,769 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.00006 $0.13769
Opus 5.5 $0.00002 $0.05508
Sonnet 5.5 $0.00001 $0.02754
Haiku 4.5 $0.00001 $0.01377

Measured yesterday against content hash 3e9e6998630f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 yesterday.

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 · 774 lines

How it starts

The opening of the file, as written. The whole thing — 774 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 (${POLICY_BUNDLE_ROOT}/rules/execution-policy-kernel.md), then load the conditional sections below as the selected route requires. Resource-layer markdown is selected explicitly by the caller. The selected policy file has the shape <bundle-root>/rules/execution-policy.md. Resolve its real path, then derive POLICY_BUNDLE_ROOT as the real parent of that file's containing rules directory (equivalently, the file's real grandparent): the repository root for the canonical policy, or the Skill's references/execution-bundle directory for a raw Skill. Resolve required references beneath that base and fail closed with BLOCKED_RESOURCE_MISSING for missing, absolute, traversal, or symlink escaping paths. Do not infer the base from an active Skill, environment variable, checkout search, or fallback chain.

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 reviewer trigger paths, project-specific hot tables for performance reviewer, hook profile choice. Avoid copying the body wholesale; cross-link instead.

The project policy is an input delta: it may extend the selected base policy with project-specific triggers or tables, but it cannot supply a missing base resource. Keep the local copy short and cross-link rather than copying this body wholesale.

The consumer project's Project Convention supplies its branching, changelog, OpenSpec adoption, delivery, merge, and shell practices. Public Workflows follow that convention within their own authority; this portable policy does not supply a repository-specific delivery sequence.

Glossary (inline)

  • reviewer trigger: a file-path/extension pattern (built-in defaults, active-module triggers, or userConfig.review_trigger_extra_paths) that identifies which reviewer role(s) apply to a diff. Trigger matching is AI judgment at dispatch time — there is no hook-armed marker file; see "Post-implementation agent gate" and the trigger table under "Reviewer dispatch."
  • back-stop: a trigger pattern did not obviously match but the AI semantically recognises the review should still fire → AI proactively invokes the matching reviewer.
  • 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 reviewer roles are triggered, triage out false positives → dispatch the rest in parallel → code-reviewer merges/dedups (see "Reviewer dispatch").
  • applicable review wave: the one consolidated review pass for a contiguous implementation wave, covering each independent risk domain that the changed scope actually triggers.
  • review evidence: an external or prior review result that identifies its scope, conclusion, supporting observations, and remaining gaps; its producer, filename, and headings do not make it sufficient by themselves.
  • 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 that benefits from consistent content judgment and has an exact file scope and verification contract; unresolved design and unknown root cause are excluded. The number of files is context, not a routing threshold.
  • Provider-neutral: a dispatch request that keeps Host, Provider, Model, Role, Effort, and Transport as separate fields before an adapter executes it.
  • Dispatch Engine: the side-effect-free decision seam that resolves a dispatch request; adapters consume its result, and it does not own orchestration state.
  • Host Profile: the active host's native Provider/Model defaults and policy settings used when no explicit Provider-scoped target is supplied.

Read the full file on GitHub · 774 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. yesterday Changed · +28 lines · +4 tokens per session 3e9e6998630f
  2. 6d ago Changed · -47 lines b5251c07ae5f
  3. 19d ago Changed · +35 lines 1135ef856609
  4. 28d ago Changed · +143 lines 6df54948a62f
  5. 1mo ago Changed · +30 lines 3633bcd2865f
  6. 1mo ago Changed b6cee4356162
  7. 1mo ago Changed · +14 lines d5d831f50ddb
  8. 1mo ago Changed · +64 lines c231f9edeb98
  9. 1mo ago Changed · +35 lines 618e6c18f91a
  10. 1mo ago 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 6 tokens to every session and 13,769 once invoked, about $0.0000 per session on Opus 5.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.