server: Command for Claude Code

.claude/commands/aide/align.md

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

A specification-review command that checks whether specifications agree with their parent and sibling specifications and whether they stay within set length and structure limits. It is not a code test.

In plain words
What is it for?
Use it to review an intent tree, compare child and ancestor outcomes, check brevity rules, and create a todo.aide file for each problem found.
Why use it?
It helps catch contradictions, missing requirements, repeated content, and overly long specifications before implementation begins.

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/align.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 align

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

Your own site · 80×15
<a href="https://agentmods.dev/commands/aidemd-mcp/server/align"><img src="https://agentmods.dev/badge/commands/aidemd-mcp/server/align.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 674 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.00674
Opus 5.5 $0.00000 $0.00270
Sonnet 5.5 $0.00000 $0.00135
Haiku 4.5 $0.00000 $0.00067

Measured 4d ago against content hash d76424520371, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

align 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/align.md · 25 lines

How it starts

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

/aide:align — Alignment Phase

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

Verify spec-vs-spec alignment and brevity across the intent tree. This is NOT QA — QA checks code against a spec; alignment checks whether specs are consistent with their ancestors and internally tight against the Brevity Contract. The aligner runs three passes per walk:

  • Cascade pass — child outcomes vs. every ancestor's outcomes; flags contradictions, undermining, omissions
  • Brevity pass — every spec measured against the caps (description ≤ 200 chars, intent ≤ 100 words, 3-4 outcomes per list with ≤ 2 sentences each, body sections under cap, no forbidden content)
  • Sibling-redundancy pass — content duplicated across siblings under a common parent; that content belongs in the parent

The aligner produces todo.aide at every misaligned node with concrete items tagged by misalignment type. Cascade and sibling-redundancy use Misalignment: spec-gap; brevity uses Misalignment: spec-bloat. The aligner never rewrites specs — it flags only.

Checklist

  • Call aide_discover on the target path to get the full ancestor chain
  • Read each spec in the ancestor chain top-down via aide_read — load description, intent, outcomes, and body sections at every level
  • Cascade pass: compare each child's outcomes.desired and outcomes.undesired against every ancestor's outcomes — look for contradictions, undermining, and critical omissions. Tag findings Misalignment: spec-gap.
  • Brevity pass: measure every spec against the Brevity Contract caps and scan for forbidden content (type signatures, file paths, exact strings, function names, argument indexes, implementation contracts, migration history). Tag findings Misalignment: spec-bloat.
  • Sibling-redundancy pass: at every parent with multiple children specs, compare children's content for material that appears in two or more. Flag the children (not the parent) with Misalignment: spec-gap, naming the duplicated content and where it should live (parent).
  • For misaligned specs: move the leaf spec's alignment to misaligned with aide_frontmatter and produce todo.aide at the leaf with items from any pass that found drift
  • For aligned specs (no drift across all three passes): move the spec's alignment to aligned with aide_frontmatter
  • Report results with verdict (ALIGNED/MISALIGNED), count of specs checked, total drift count broken down by pass (cascade / brevity / sibling-redundancy), and todo.aide paths created
  • Recommended next step depends on the dominant category: cascade or sibling-redundancy → /aide:spec to revise the flagged specs; brevity → /aide:refactor --specs <path> for a batched cascade-aware sweep
  • Do NOT rewrite specs — flag only

Read the full file on GitHub · 25 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 d76424520371
  2. 2mo ago First seen · 25 lines · 0 tokens per session scan A 987bc993bb8d

Subscribe to this mod's changes

align 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 674 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.