Skip to main content
Glama

aide_upgrade

Compare your project's AIDE methodology files against canonical versions and sync drifted categories after you confirm each one.

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:

  1. Call without category first to get the summary

  2. Present each drifted category (differs/missing) and ask the user which to apply

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

  4. For the mcp category, a result that carries prescription is merged into the existing MCP config by you (read → merge → write). A result that carries pinMove or globalSwitch is never merged by hand: the tool writes it (see the MCP step). If malformed, tell the user — do not overwrite.

  5. For ide, the manifest may include instructions for VS Code extension install — execute that command for the user. Zed config is written directly by the tool.

  6. For brain, the summary reports missingSections, outdated section text as staleSections and a legacy brain launcher as legacyLauncher (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" with brainChange: <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 returns missing with the template's version of an absent section instead. c. The same call plus that beforeHash, only on the user's yes to that one diff, returns applied, or a refused re-fetch instruction when the bytes changed since the preview. Never batch changes under one yes. Every refusal's instructions names 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, reference, commands, agents, skills, mcp, ide, readme, brain, hooks.

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/

  • The tool and hook reference pages under .aide/reference/, through the reference category: its own category, apart from the methodology docs, applied as one unit

  • 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

  • AIDE's own Claude Code hooks (Claude Code projects only), through the hooks category: written only to this machine's uncommitted .claude/settings.local.json, each running the installed server directly with node and the session-end hook given a 10-second budget; AIDE's old entries in the shared .claude/settings.json are removed with every other byte unchanged; .claude/settings.local.json is added to .gitignore when git does not already ignore it; a malformed settings file stops the category with nothing written, and a missing global install returns install-first instructions

Supports Claude Code, Cursor, Windsurf, and Copilot. Auto-detects the framework or accepts an override.

MCP step: the canonical aide entry runs the global command aidemd-mcp. The entry is read under the aide key, or under aidemd-mcp when there is no aide key; the key is never renamed. Without targetVersion, an entry that launches through npx reports differs with globalSwitch: { key, name, installed, installCommand } and no prescription. Tell the user npx launches time out at session start and ask; on yes, run installCommand via Bash first unless installed is true (a failed install: say so and stop). Then category: "mcp" makes the tool rewrite only that entry's command and args to the global command, every other byte unchanged; it re-checks the global install and, while the package is missing, keeps differs and returns instructions naming the install command — install, then call again. A missing aide entry returns the global prescription plus globalPackage; when the package is not installed it also carries instructions — act on them: install first, then merge, and never merge after a failed install. An older server cannot switch itself, so a pinned project first moves its pin to a newer version with targetVersion (only under the aide key; an npx entry under aidemd-mcp gets instructions to call without targetVersion and switch instead) — an exact published x.y.z, normally aide_info's behind.latest, valid only with no category or with category: "mcp". With it, a local (npx) aide entry is judged by its version pin alone: an older, missing or non-exact pin reports differs with pinMove: { from, to } (from is null when unpinned) and no prescription; a pin at or ahead of the target matches and is never moved back. Install the target first (npx -y @aidemd-mcp/aidemd@{to} sync --help prints help starting Usage: and exits 2 by design; anything else means the install failed — then stop and move nothing). Then category: "mcp" with the same targetVersion makes the tool write the move itself, changing only the version inside the package argument — the command form, cmd /c, -y, other servers, formatting and line endings stay byte-identical — and returns status: "updated" with pinMove. A result that keeps status: "differs" with instructions means nothing was written (the pin changed since it was checked, the config cannot be edited byte-safely, or the entry is not a locatable @aidemd-mcp/aidemd spec): relay the instructions. A global entry is never moved; the target is ignored for it. A moved pin takes effect only in a new session — tell the user to start one. 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.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "aide_upgrade"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoCustom project root path (defaults to server working directory)
categoryNoWhen 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).
frameworkNoForce a specific framework instead of auto-detecting. Auto-detection checks for framework-specific files/directories and defaults to Claude Code.
beforeHashNoThe `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.
brainChangeNoBrain-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.
targetVersionNoExact published x.y.z version to judge the project's local aide entry's npx pin against (normally aide_info's behind.latest). With category "mcp" the tool moves the pin to it, changing only the version; with no category the move is shown read-only as pinMove. Not valid with any other category. A global entry is never moved.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.20.4
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "pointer-stub",
      -  "methodology-docs",
      -  "version-metadata",
      -  "commands",
      -  "agents",
      -  "skills",
      -  "mcp",
      -  "ide",
      -  "readme",
      -  "brain",
      -  "hooks"
      -]New value: +[
      +  "pointer-stub",
      +  "methodology-docs",
      +  "version-metadata",
      +  "reference",
      +  "commands",
      +  "agents",
      +  "skills",
      +  "mcp",
      +  "ide",
      +  "readme",
      +  "brain",
      +  "hooks"
      +]
  2. Changed1 schema field changedv0.17.1
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "pointer-stub",
      -  "methodology-docs",
      -  "version-metadata",
      -  "commands",
      -  "agents",
      -  "skills",
      -  "mcp",
      -  "ide",
      -  "readme",
      -  "brain"
      -]New value: +[
      +  "pointer-stub",
      +  "methodology-docs",
      +  "version-metadata",
      +  "commands",
      +  "agents",
      +  "skills",
      +  "mcp",
      +  "ide",
      +  "readme",
      +  "brain",
      +  "hooks"
      +]
  3. Changed1 schema field changedv0.15.0
    • addedInput schema / properties / targetVersion
      Added value: +{
      +  "description": "Exact published x.y.z version to judge the project's local aide entry's npx pin against (normally aide_info's behind.latest). With category \"mcp\" the tool moves the pin to it, changing only the version; with no category the move is shown read-only as pinMove. Not valid with any other category. A global entry is never moved.",
      +  "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
      +  "type": "string"
      +}
  4. Changed3 schema fields changedv0.11.1
    • addedInput schema / properties / beforeHash
      Added value: +{
      +  "description": "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.",
      +  "type": "string"
      +}
    • addedInput schema / properties / brainChange
      Added value: +{
      +  "description": "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.",
      +  "enum": [
      +    "orientation",
      +    "config",
      +    "playbook-index",
      +    "study-playbook",
      +    "update-playbook",
      +    "research-index",
      +    "kanban-index",
      +    "kanban-create",
      +    "kanban-work",
      +    "kanban-manage",
      +    "kanban-move",
      +    "kanban-complete",
      +    "kanban-stash",
      +    "kanban-review",
      +    "launcher"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / category / description
      Previous value: -"Write all differs/missing files for this category to disk and return a manifest. Omit on the first call to get a metadata-only summary of all categories."New value: +"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)."
  5. Changed1 schema field changedv0.6.1
    • changedInput schema / properties / category / enum
      Previous value: -[
      -  "pointer-stub",
      -  "methodology-docs",
      -  "version-metadata",
      -  "commands",
      -  "agents",
      -  "skills",
      -  "mcp",
      -  "ide",
      -  "readme"
      -]New value: +[
      +  "pointer-stub",
      +  "methodology-docs",
      +  "version-metadata",
      +  "commands",
      +  "agents",
      +  "skills",
      +  "mcp",
      +  "ide",
      +  "readme",
      +  "brain"
      +]
  6. First observedv0.3.15

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full burden and does so far beyond the norm: it discloses that category calls write files directly to disk, that the agent never sees canonicalContent, exactly which files and scopes are mutated (including .claude/settings.local.json plus a .gitignore edit), byte-identical preservation guarantees, hash-guarded refusal on concurrent change, and named failure modes such as malformed settings stopping the category with nothing written. It also defines return shapes (inserted/adapt/change/applied/refused) that an agent needs to branch on.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the two-call pattern are correctly front-loaded and bolded markers give a navigable skeleton. However, the MCP step is a single runaway paragraph of several hundred words of nested conditionals that an agent must parse linearly, and it repeats schema-level facts. Valuable content, but it would earn its place far better as a short bulleted state machine.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With six optional parameters, no annotations, and no output schema, the description must supply both mutation semantics and return-value semantics; it does both, enumerating manifest fields (filePath, status values updated/created/unchanged), brain outcomes, and refusal instructions. Nothing material an agent needs to call correctly or interpret results is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so baseline is 3; the description nonetheless adds meaning the schema cannot, notably the absence/presence of category as the summary-vs-apply switch and the three-call brain choreography (brainChange alone previews, brainChange plus beforeHash applies). The targetVersion validity rules (only with no category or category mcp) and the pinMove/globalSwitch outcomes are workflow semantics rather than field restatements. It falls short of 5 because the long MCP paragraph largely re-derives constraints already stated in the targetVersion and category schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource: compare AIDE methodology artifacts against canonical versions and return structured JSON grouped by category. It then explicitly excludes a nearby but different activity ("This is NOT for editing user .aide specs — it inspects methodology infrastructure only"), which an agent could otherwise confuse with this tool given siblings like aide_scaffold and aide_cleanup. The purpose is unmistakable without opening the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives trigger phrases ("update AIDE, sync AIDE, refresh AIDE..."), an exclusion, a mandatory two-call sequencing rule, and a one-at-a-time wizard pattern with AskUserQuestion. It names where an alternative is preferred, e.g. delegating version discovery to aide_info's behind.latest before passing targetVersion. An agent has a complete decision procedure for when and how to call.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.