aide_upgrade
Compare AIDE methodology artifacts with canonical versions, report drift by category, then apply confirmed category updates to sync commands, agents, skills, MCP, IDE, and brain config.
Instructions
Compare the AIDE methodology artifacts in this project against the canonical versions and return structured JSON results grouped by category. Use this when the user asks to update AIDE, sync AIDE, refresh AIDE, check for AIDE updates, or bring AIDE up to date. This is NOT for editing user .aide specs — it inspects methodology infrastructure only.
The tool uses a two-call pattern for progressive disclosure:
First call (no category param): Returns a lightweight summary — every category with file names, statuses, and counts, but NO file content. Use this to understand what has drifted and present a summary to the user. Ask which categories they want to apply.
Second call (with category param): The tool writes all differs/missing files directly to disk itself and returns a manifest — file results with filePath, status ("updated", "created", or "unchanged"), and name, but NO canonicalContent. The agent never sees file content and never uses the Write tool for methodology files.
Repeat the second call for each category the user confirms.
As the calling agent, you must:
Call without
categoryfirst to get the summaryPresent each drifted category (differs/missing) and ask the user which to apply
For each confirmed category, call again with
category=X— the tool writes the files and returns a manifest. Report what was updated/created to the user.For the
mcpcategory, the manifest still includesprescriptiondata — merge the entry into the existing MCP config yourself (read → merge → write). Ifmalformed, tell the user — do not overwrite.For
ide, the manifest may includeinstructionsfor VS Code extension install — execute that command for the user. Zed config is written directly by the tool.For
brain, the summary reportsmissingSections, outdated section text asstaleSectionsand a legacy brain launcher aslegacyLauncher(its reasons), each named separately. The brain category then works through three calls, each one decision at a time: a.category: "brain"(after the user's yes) inserts every missing section from the latest bundled template — byte-identical, in the file's line endings — only when the config launches the template's own brain server. It returns{ outcome: "inserted", inserted }(markers only; empty when nothing is missing) or{ outcome: "adapt", adapt, instructions }naming the sections the user must write for their backend. b.category: "brain"withbrainChange: <marker | "launcher">returns one{ outcome: "change", target, before, after, beforeHash }diff to show the user. It is read-only. For a non-template config it returnsmissingwith the template's version of an absent section instead. c. The same call plus thatbeforeHash, only on the user's yes to that one diff, returnsapplied, or arefusedre-fetch instruction when the bytes changed since the preview. Never batch changes under one yes. Every refusal'sinstructionsnames the next step.
IMPORTANT — one-at-a-time wizard pattern using AskUserQuestion: Do NOT present all categories at once. Walk the user through ONE category at a time using AskUserQuestion with Yes/Skip options. Stop after each question and wait for confirmation before calling with that category.
Categories: pointer-stub, methodology-docs, version-metadata, commands, agents, skills, mcp, ide, readme, brain.
Upgrade surface (user code and user .aide specs are never touched):
AIDE pointer stub in the agent config file
Canonical methodology docs under .aide/docs/
versions.json metadata under .aide/docs/
Slash commands for all pipeline phases
Pipeline agent files, skill templates
MCP server entry in the project's MCP config
IDE file association config (Zed settings, VS Code extension)
The user-owned brain config, only through the brain category: missing sections and confirmed migrations, one consented change at a time
Supports Claude Code, Cursor, Windsurf, and Copilot. Auto-detects the framework or accepts an override.
MCP step: only AIDE's own launch forms for the aide entry are judged, and a prescription never switches the mode. An npx entry matches only when it is npx -y pinned to this server's version, so a differs there is how the pin moves forward deliberately. An aidemd-mcp entry matches as the bare command or an absolute-path shim of it; a path-launched one may carry tip, an informational remark to mention once — never drift, never a merge question. Any other (custom) command under the aide key is left alone and reports matches. The brain entry is not part of the mcp step; a legacy brain launcher is changed only through the brain category's brainChange: "launcher" preview and apply, on the user's yes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Custom project root path (defaults to server working directory) | |
| category | No | When provided, applies that category. For package-owned categories the call writes all differs/missing files to disk and returns a manifest (no canonicalContent). For `brain` it inserts missing sections (no `brainChange`), previews one change (`brainChange` alone), or applies it (`brainChange` + `beforeHash`); it never rewrites an existing section outside an applied change. When omitted, return all categories as metadata-only summaries (no canonicalContent fields). | |
| framework | No | Force a specific framework instead of auto-detecting. Auto-detection checks for framework-specific files/directories and defaults to Claude Code. | |
| beforeHash | No | The `beforeHash` a `brainChange` preview returned. Turns the call into the guarded apply: the change is written only if the current bytes still hash to this value. | |
| brainChange | No | Brain-category-only selector for one stale section (its marker) or the legacy launcher (`launcher`). Without `beforeHash` the call previews that one change read-only; with `beforeHash` it applies it. |