server: Command for Claude Code

.claude/commands/aide/spec.md

spec is a command for Claude Code from aidemd-mcp/server. It costs 0 tokens per session (889 once invoked), scanned A, original, MIT.

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

Written for Claude Code: installed under .claude/.

This is aidemd-mcp/server's own configuration. It tells Claude Code how to work on server itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything server configures →

Reuse

Borrowing it

Nothing to install: this file belongs to aidemd-mcp/server. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/aidemd-mcp/server/main/.claude/commands/aide/spec.md
Clone the repo
git clone --depth 1 https://github.com/aidemd-mcp/server

Made for: Claude Code.

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 spec

README.md
[![agentmods](https://agentmods.dev/badge/commands/aidemd-mcp/server/spec/github.svg)](https://agentmods.dev/commands/aidemd-mcp/server/spec)
Your own site
<a href="https://agentmods.dev/commands/aidemd-mcp/server/spec"><img src="https://agentmods.dev/badge/commands/aidemd-mcp/server/spec/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 spec

Your own site · 80×15
<a href="https://agentmods.dev/commands/aidemd-mcp/server/spec"><img src="https://agentmods.dev/badge/commands/aidemd-mcp/server/spec.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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 889 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.00000 $0.00889
Opus 5.5 $0.00000 $0.00356
Sonnet 5.5 $0.00000 $0.00178
Haiku 4.5 $0.00000 $0.00089

Measured 4d ago against content hash 0656ad268941, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 4d 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 · 36 lines

How it starts

The opening of the file, as written. The whole thing — 36 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
  • For a spec below the project root, take its folder from the approved project tree the orchestrator passes (the structure gate). If the delegation names no approved place for the module, do not pick one — return to the orchestrator saying the tree is not settled
  • Read the AIDE template before writing — copy the fenced template block from the canonical template doc into the new file
  • Create the file with aide_scaffold({ directory, type: "intent" }); it decides the filename, so never pick one:
    • The project root intent spec is always .aide/intent.aide (pass directory .aide)
    • A module spec is .aide if no research.aide exists in the target folder
    • It is 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 independent routing signals to the orchestrator:
    • Research needed: yes/no — is the domain genuinely unknown territory?
    • Strategy needed: yes/no — is the feature a pipeline: several modules each doing one specific thing in a specific order, handing off through calls, events, a clock or state changes? (The pipeline test in .aide/docs/aide-spec.md.) Self-contained modules are NO. Never answer NO because hand-offs are settled in session.aide or brief.aide.

Read the full file on GitHub · 36 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. 4d ago Changed · +2 lines 0656ad268941
  2. 20d ago Changed · +5 lines ed52adb8c694
  3. 2mo 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 (4 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 889 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.