spec

A command that writes only the front matter of an AIDE intent specification, a structured statement of what a module must achieve and how success or failure can be checked.

In plain words
What is it for?
Use it to turn delegation details into a precise intent contract and indicate whether a later synthesis phase is needed.
Why use it?
It separates defining the intended outcome from later writing context, examples, and an implementation plan.

Command for 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 commands/aidemd-mcp/server/spec
Clone the repo
git clone --depth 1 https://github.com/aidemd-mcp/server

Made for: Claude Code.

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 675 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.00675
Opus 5 $0.00000 $0.00338
Sonnet 5 $0.00000 $0.00135
Haiku 4.5 $0.00000 $0.00068

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

Security

Grade A, and why

spec 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.

.claude/commands/aide/spec.md · 29 lines

How it starts

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

/aide:spec — Spec Phase

Agent: This command is executed by the aide-spec-writer agent.

Produce the .aide intent spec frontmatter only. This is the spec-writing phase — the session that distills the orchestrator's delegation context into a falsifiable intent contract. The orchestrator owns the user conversation and passes the gathered context in the delegation prompt. Body sections (Context, Strategy, Good/Bad examples, References) are conditional — they exist only when the orchestrator routes through /aide:synthesize afterwards. Most modules are navigation stubs and skip synthesize entirely, going straight to /aide:plan. Signal whether synthesize is needed in your return.

Checklist

  • Read the delegation context from the orchestrator. If insufficient to write specific outcomes (missing: what the module is for, who consumes its output, what success looks like, what failure looks like), return to the orchestrator listing what's missing
  • Read the AIDE template before writing — copy the fenced template block from the canonical template doc into the new file
  • Decide filename:
    • Use .aide if no research.aide exists in the target folder
    • Use intent.aide if research.aide exists in the same folder (co-located research is an escape hatch — prefer the brain)
  • Fill the frontmatter ONLY against hard caps:
    • scope — the module path this spec governs
    • description — one sentence, ≤ 200 characters
    • intent — one paragraph, ≤ 100 words, ten-second north star
    • outcomes.desired — 3-6 items, ≤ 2 sentences each, falsifiable
    • outcomes.undesired — 3-6 items, ≤ 2 sentences each, the almost-right-but-wrong kind
  • Body sections are conditional. Default: produce a frontmatter-only file with NO body section headings. If the orchestrator's delegation prompt explicitly says synthesize will run, then preserve empty body section placeholders for the strategist; otherwise omit them entirely.
  • No code in the spec — no file paths, no type signatures, no function names, no argument indexes. Domain vocabulary IS allowed (entity names, status enums, field names that name a domain concept).
  • Every outcomes entry must trace back to the intent paragraph. Cut any outcome that doesn't
  • Present the frontmatter to the orchestrator for relay to the user
  • Run aide_validate to check the spec for structural issues
  • Return two routing signals to the orchestrator: Research needed: yes/no and Strategy needed: yes/no. Default both to NO unless the interview surfaces genuine domain complexity. The orchestrator decides next stage:
    • both NO → /aide:plan directly (orchestrator passes user implementation context)
    • Strategy YES, Research NO → /aide:synthesize (brain already has research)
    • both YES → /aide:research first, then /aide:synthesize, then /aide:plan

Read the full file on GitHub · 29 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. 2d ago First seen · 29 lines · 0 tokens per session scan A 9cbe99e59af9

Subscribe to this mod's changes

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