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.
npx agentmods add commands/aidemd-mcp/server/upgradegit clone --depth 1 https://github.com/aidemd-mcp/serverWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.01079 |
| Opus 5 | $0.00000 | $0.00540 |
| Sonnet 5 | $0.00000 | $0.00216 |
| Haiku 4.5 | $0.00000 | $0.00108 |
Grade A, and why
upgrade 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.
How it starts
The opening of the file, as written. The whole thing — 104 lines — stays where its author put it; the contents beside it link to each section on GitHub.
/aide:upgrade — Interactive Methodology Upgrade
Agent: You are the orchestrator for this command. Do NOT delegate to a subagent.
CRITICAL — read this before doing anything: This is a step-by-step wizard. You show ONE category at a time, ask ONE question using the
AskUserQuestiontool with structured options, then STOP and wait.Rules:
- Never show all drifted categories at once and ask "which do you want?"
- Never offer "all" as an option
- Every pause point MUST use
AskUserQuestionwith defined options- After every
AskUserQuestion, STOP. Do not continue until the user responds.- The tool writes files to disk itself — you do NOT use the Write tool for file categories
Bring this project's AIDE methodology artifacts up to date with canonical by calling aide_upgrade and walking the user through each drifted category interactively.
Two-call pattern
The tool uses a two-call pattern. The first call (no category) returns a lightweight summary. The second call (with category) writes files to disk and returns a manifest — no file content.
Wizard flow
Step 1: Call aide_upgrade (summary)
Call aide_upgrade with no arguments. The response is JSON with framework and categories. Each category has files (metadata only — no canonicalContent) and a summary with counts.
If all categories have differs: 0 and missing: 0, tell the user everything is current and stop.
Otherwise, proceed to walk through drifted categories one at a time.
Step 2–N: Walk through drifted categories one at a time
For each category where differs > 0 or missing > 0 (or, for the brain category specifically, any file's status is "malformed" — which doesn't increment missing), present ONLY that category:
- Name the category
- List which files differ or are missing (use
~for differs,+for missing) - Call
AskUserQuestion:
question: "{Category} — {count} files need updating. Apply?"
header: "{Category}"
options:
- label: "Yes, update" / description: "Write the canonical versions to disk"
- label: "Skip" / description: "Keep current versions"
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.
- 2d ago First seen · 104 lines · 0 tokens per session scan A 8c0cd38ca106
upgrade 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 1,079 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.
Other commands, from other repositories
constitution
根据交互输入或已提供原则创建或更新项目章程,并确保相关模板保持同步。.
meta-theory-verify
Run the appropriate MetaKim verification path.
cross-research
Two-phase multi-model research. Phase A fans codex+gemini in parallel (benchmarks + citations angles); Phase B synthesises via fresh Claude session. Usage: /cross-research [--with | list | compare].
ijfw-audit
Run the IJFW audit gate for the current workflow phase. Usage: /ijfw-audit [phase name].
memory-why
Show why a memory recall returned what it did -- BM25 vs vector vs hybrid provenance.
ijfw-execute
Jump directly to the IJFW workflow Execute phase (Deep D4 / Quick Q3). Usage: /ijfw-execute [task or phase name].