policy

A command for inspecting the rules that control an automated development workflow. Policy-as-code means keeping those rules in configuration files so tools can apply them consistently.

In plain words
What is it for?
Use it to view the effective policy, explain what applies to a workflow state, or validate the project’s policy configuration.
Why use it?
It makes hidden or combined rules easier to understand and checks whether the project’s policy file is valid.

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/agentic-swe/agentic-swe/policy
Clone the repo
git clone --depth 1 https://github.com/agentic-swe/agentic-swe
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 299 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.00299
Opus 5 $0.00000 $0.00150
Sonnet 5 $0.00000 $0.00060
Haiku 4.5 $0.00000 $0.00030

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

Security

Grade A, and why

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 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/policy.md · 38 lines

What it actually says

/policy

Inspect and explain the active Policy-as-Code configuration.

Subcommands

/policy show

Display the effective merged policy (pack default + repo .agentic-swe/policy.json + org AGENTIC_SWE_POLICY).

/policy explain <state>

Show what the policy enforces for a specific pipeline state:

  • Minimum track (from track_rules matching the current diff)
  • Mandatory subagents (from mandatory_subagents matching touched files)
  • Banned tools
  • Additional required artifacts
  • Budget overrides

/policy check

Validate the repo's .agentic-swe/policy.json against ${CLAUDE_PLUGIN_ROOT}/schemas/agentic-swe-policy.schema.json. Report errors if the policy is malformed.

Behavior

  1. Resolve the effective policy via ${CLAUDE_PLUGIN_ROOT}/scripts/lib/policy/merge.cjs.
  2. For show: pretty-print the merged result.
  3. For explain <state>: filter rules relevant to the given state and current diff.
  4. For check: validate schema and report.

Integration

The policy is evaluated during:

  • lean-track-checktrack_rules may force a minimum track
  • Phase delegation — mandatory_subagents are enforced
  • Tool invocations — banned_tools are checked pre-execution
  • Artifact validation — required_artifacts are merged with pack defaults
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 · 38 lines · 0 tokens per session scan A 635fb90d2233

Subscribe to this mod's changes

policy is a command published in the GitHub repository agentic-swe/agentic-swe (5 stars, last pushed 3mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 299 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.