Skip to main content
Glama

aide_upgrade

Compare project AIDE methodology files against canonical versions and return category-grouped JSON; apply confirmed categories to write updates directly without editing user specs.

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, 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: 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/server@{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/server 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.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"
      +}
  2. 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)."
  3. 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"
      +]
  4. First observedv0.3.15

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that the category call writes files directly to disk, that the agent never sees canonicalContent, that brain changes are guarded by beforeHash and refused when bytes drift, and that config edits are byte-preserving (line endings, formatting, 'every other byte unchanged'). Failure modes are also surfaced — failed installs must stop the flow, malformed results must not be overwritten, refused results carry instructions. This is unusually rich behavioral disclosure for a zero-annotation tool.

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?

Structure is genuinely good — purpose first, then the two-call pattern, a numbered agent checklist, then per-category notes — so it is front-loaded. But the 'MCP step' paragraph alone is a multi-hundred-word run-on covering exit code 2, npx timeouts, pinned-vs-global entries, and shim detection, far beyond what is needed to select and invoke the tool. Much of this is error-path guidance that belongs in tool responses, not the selection surface.

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?

For a 6-parameter, zero-annotation, no-output-schema tool, the description is complete: it names the manifest fields (filePath, status, name), the brain outcomes (inserted/adapt/change/applied/refused), the mcp result variants (prescription, pinMove, globalSwitch, malformed, instructions), and the ordering constraints among calls. An agent would not need to guess at any return shape before invoking.

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 coverage is 100%, so baseline is 3, and the description earns above it by explaining cross-parameter semantics: which calls are legal together (targetVersion only with no category or category 'mcp'), the brainChange preview-vs-apply pairing with beforeHash, and per-category effects of 'category'. Most of this is restated from the schema fields rather than added, and the added value is buried in dense prose rather than attached to the parameters.

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

Purpose4/5

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

The opening sentence is a specific verb+resource+output: 'Compare the AIDE methodology artifacts ... against the canonical versions and return structured JSON results grouped by category.' It also draws a hard boundary ('NOT for editing user .aide specs — it inspects methodology infrastructure only'). It does not differentiate against the many adjacent siblings (aide_info, aide_validate, aide_brain, aide_scaffold), and its own dual inspect/write nature is only reconciled deep in the body.

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

Usage Guidelines4/5

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

Trigger conditions are explicit and enumerated ('update AIDE, sync AIDE, refresh AIDE, check for AIDE updates'), and the when-not case is stated. The two-call progressive-disclosure protocol and the one-at-a-time AskUserQuestion wizard are spelled out step by step. What is missing is routing to alternatives: no sentence says 'use aide_info to just read the version' or 'use aide_brain for brain edits', so sibling selection is left to inference.

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