agent-spawning

A set of rules for defining clear contracts for each step in an agent workflow. Each step states what it accepts, what it returns, when it stops, and how many resources it may use; steps exposed as MCP tools also describe their side effects.

In plain words
What is it for?
Use it when designing agent pipelines or exposing pipeline steps as MCP tools. It helps specify schemas, exit conditions, budgets, and whether an operation can change data, be retried safely, or access outside information.
Why use it?
It prevents agent steps from having unclear behavior or misleading safety claims. Clear contracts make failures, retries, routing, and resource use easier to reason about.

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/onesimplecode/agent-engineering-standards/agent-spawning
Clone the repo
git clone --depth 1 https://github.com/onesimplecode/agent-engineering-standards

Made for: Cursor.

Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,329 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.00078 $0.01329
Opus 5 $0.00039 $0.00665
Sonnet 5 $0.00016 $0.00266
Haiku 4.5 $0.00008 $0.00133

Measured yesterday against content hash 8ae790d6b6cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-spawning 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.

examples/cursor-rules/.cursor/rules/agent-spawning.mdc · 49 lines

How it starts

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

Agent Spawning

TR-AGT-003 — Agentic node loop contracts

Every agent pipeline node declares input schema, output schema, exit condition, and resource budget before implementation. Nodes exposed as MCP tools additionally declare four tool annotation hints (readOnlyHint, destructiveHint, idempotentHint, openWorldHint) describing blast radius — required only for MCP-exposed nodes. Annotations must be earned, not merely asserted: each hint names a property the implementation actually has, and the test suite must demonstrate it (e.g. idempotentHint requires a real no-op path). Declaring a hint without the property is a protocol violation — callers that retry on a false idempotentHint will amplify damage. A triage or gate node's output schema may additionally include a disposition field drawn from a closed vocabulary (e.g. query / think / report) naming what happens to its output next, derived from the node's own verdict — never set independently of it, so the two cannot disagree. Optional: only nodes whose output routes to more than one next step need to declare it.

TR-AGT-002 — Deterministic operations use scripts not agents

Operations that require repeatable results should be implemented in scripts, code, queries, tests, or validators. Agents may call those deterministic tools, but should not replace them.

TR-AGT-004 — Agent trigger type classified at design time

Each agent invocation is classified as event-driven, scheduled, or user-initiated. Undocumented triggers are non-compliant unmanaged side effects.

TR-AGT-005 — Behavioral mode declaration

A behavioral mode is a named, trigger-activated instruction set that changes how an agent approaches a task, orthogonal to process-intensity gate strictness. Each mode declares a trigger, activated behavior, exit condition, and precedence (safety and process-intensity rules always win on conflict).

Read the full file on GitHub · 49 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 First seen · 49 lines · 78 tokens per session scan A 8ae790d6b6cc

Subscribe to this mod's changes

agent-spawning is a cursor rule published in the GitHub repository onesimplecode/agent-engineering-standards (3 stars, last pushed 3d ago), licensed MIT. It adds 78 tokens to every session and 1,329 once invoked, about $0.0004 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-08-31.