@aidemd-mcp/server 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.aide/todo.aide CHANGED
@@ -1,47 +1,38 @@
1
1
  ---
2
+ description: >
3
+ QA findings for the README.md rewrite — tracks the missing @latest on the Quick Start npx command.
2
4
  intent: >
3
- Canonical docs updated in c32e887 (orchestrator, synthesize phase, plan.aide
4
- spec, todo.aide spec, expanded file-type table, seven-doc hub) but downstream
5
- .aide intent specs still reference the pre-commit state: four file types
6
- instead of five, six pipeline commands instead of seven-plus, five canonical
7
- docs instead of seven, and todo.aide described as a "QA queue" instead of a
8
- re-alignment document. The specs no longer faithfully reflect the methodology
9
- they are supposed to deliver.
5
+ README.md rewrite against readme.aide spec. One outcome violated: the Quick
6
+ Start block omits @latest from the npx command, which can serve a stale
7
+ cached version of the CLI init subcommand to users who have previously
8
+ installed any version of the package.
10
9
  misalignment:
11
- - implementation-drift
10
+ - plan-gap
12
11
  ---
13
12
 
14
13
  ## Issues
15
14
 
16
- - [x] **src/.aide:21** — Teaches "the four file types" in tool descriptions; canonical `aide-spec.md` now defines five file types (`.aide`, `intent.aide`, `research.aide`, `plan.aide`, `todo.aide`).
17
- Traces to: `outcomes.desired[2]` | Misalignment: `implementation-drift`
18
-
19
- - [x] **src/.aide:149-152** — Good example describes `todo.aide` as "a QA queue". Canonical docs redefine it as a "QA re-alignment document" with misalignment tags and a `## Retro` section.
20
- Traces to: `outcomes.desired[2]` | Misalignment: `implementation-drift`
21
-
22
- - [x] **src/tools/init/.aide:33-34** — References "six pipeline slash commands (research, spec, plan, build, qa, fix)". Canonical pipeline now includes a synthesize phase (`/aide:synthesize`) and an orchestrator entry point (`/aide`).
23
- Traces to: `outcomes.desired[3]` | Misalignment: `implementation-drift`
24
-
25
- - [x] **src/tools/init/.aide:194-209** — Good examples list exactly six scaffolded commands and six "already present" lines. Missing synthesize phase; summary shape no longer matches what init actually produces after the doc update.
26
- Traces to: `outcomes.desired[2]` | Misalignment: `implementation-drift`
27
-
28
- - [x] **src/tools/init/scaffoldCommands/.aide:1-4** — Intent says "six AIDE pipeline slash commands (research, spec, plan, build, qa, fix)" and enforces a six-cap throughout. The canonical pipeline now has seven phase commands (adding synthesize). The "six-cap" language on lines 20, 81, 114, 116 is all stale.
29
- Traces to: `outcomes.desired[3]` | Misalignment: `implementation-drift`
30
-
31
- - [x] **src/tools/init/installMethodologyDocs/.aide:101** — Context says "five canonical files under `docs/`". The hub index now lists seven docs (added `plan-aide.md` and `todo-aide.md`). The number "five" also appears in the bad-examples section (line 255) and good-examples section (line 198).
32
- Traces to: `outcomes.desired[1]` | Misalignment: `implementation-drift`
33
-
34
- - [x] **src/tools/discover/.aide:23** — Type tags listed as `[intent]`, `[research]`, `[todo]`. Missing `[plan]` tag for the new `plan.aide` file type.
35
- Traces to: `outcomes.desired[2]` | Misalignment: `implementation-drift`
36
-
37
- - [x] **src/tools/scaffold/.aide:1-28** — Supports types: intent, research, both, todo. Does not support `type=plan` for creating `plan.aide` files. The canonical `aide-spec.md` file-type table now includes `plan.aide` as a first-class file type that scaffold should know how to create.
38
- Traces to: `outcomes.desired[1]` | Misalignment: `implementation-drift`
15
+ - [ ] **README.md:25** — Quick Start block uses `npx @aidemd-mcp/server init` without `@latest`. The spec requires `@latest` on all npx invocations ("use `npx -y @aidemd-mcp/server@latest` rather than a bare package name. The bare name uses a locally cached version if one exists"). The plan carried this omission forward (plan.aide line 34 shows `npx @aidemd-mcp/server init` without `@latest`), meaning the gap originated at planning, not implementation.
16
+ Traces to: `outcomes.undesired[4]` ("A config block using a bare package name without @latest, which silently serves a stale cached version to users who have previously installed any version") | Misalignment: `plan-gap`
39
17
 
40
18
  ## Retro
41
19
 
42
- Every issue traces to a single cause: the canonical docs were updated in one commit but the downstream `.aide` specs that encode the same facts were not updated in the same commit. The commit changed the source of truth; the renderers of that truth were left behind.
20
+ The spec's `@latest` requirement was written with config blocks in mind and the
21
+ strategy section explicitly mentions "config blocks" as the scope ("all config
22
+ blocks"). The plan correctly applied `@latest` to every JSON config block under
23
+ Manual Configuration, but silently dropped it from the Quick Start CLI command,
24
+ treating the CLI invocation as exempt from the rule.
25
+
26
+ The gap is plan-level: the planner read the `@latest` requirement as scoped
27
+ only to JSON config blocks and did not apply it to the `npx @aidemd-mcp/server
28
+ init` CLI command. The spec's good examples show `npx -y
29
+ @aidemd-mcp/server@latest` consistently, including for CLI invocations, but
30
+ the spec's strategy text says "config blocks" — the ambiguity created a
31
+ loophole that the plan exploited.
43
32
 
44
33
  What would have caught this earlier:
45
- - A pre-commit check (or a QA pass scoped to `.aide` files) that runs `aide_validate` and flags specs whose file-type counts, command counts, or doc counts disagree with the canonical docs.
46
- - A convention that any commit touching `.aide/docs/` also touches every downstream `.aide` that references the changed facts enforced by review checklist, not tooling, until tooling can do it.
47
- - The orchestrator `/aide` could have been used to drive the doc change itself, which would have surfaced the propagation gap at the plan stage before code was written.
34
+ - The plan step for the Quick Start block should have explicitly cross-checked
35
+ the `@latest` and `-y` conventions from the spec's strategy section and
36
+ applied them to the CLI command, not just to the JSON blocks.
37
+ - A QA checklist item "verify every `npx` invocation in the README (not just
38
+ JSON blocks) uses `@latest`" would have caught this mechanically.
package/.claude/.aide CHANGED
@@ -23,12 +23,12 @@ outcomes:
23
23
  - The aligner walks the tree top-down using the discover tool's ancestor
24
24
  chain, compares outcomes at each level, and produces a todo.aide at
25
25
  each misaligned node listing concrete realignment items.
26
- - The aligner sets status: misaligned on specs where it finds drift and
26
+ - "The aligner sets status: misaligned on specs where it finds drift and
27
27
  status: aligned on specs it has verified. It is the only agent that
28
- can confirm alignment through a deliberate full-tree walk.
29
- - The QA agent can set status: misaligned incidentally while reviewing
28
+ can confirm alignment through a deliberate full-tree walk."
29
+ - "The QA agent can set status: misaligned incidentally while reviewing
30
30
  code-vs-spec, but cannot set aligned — only the aligner confirms
31
- alignment.
31
+ alignment."
32
32
  - A /aide:align command exists that invokes the aligner agent, callable
33
33
  by the user or suggestable by the orchestrator when drift is suspected.
34
34
  - Agent definitions across the harness no longer contain verbose
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: aide-explorer
3
+ description: "Use this agent for read-only investigation of the AIDE codebase — finding code, tracing bugs, answering questions about how modules work, or understanding the cascading intent tree. This agent understands the AIDE methodology, uses aide_discover for .aide file lookups, and navigates code using progressive disclosure. It does NOT write code, edit files, or delegate to other agents.\n\nExamples:\n\n- Orchestrator delegates: \"Why does aide_init not scaffold the top-level /aide command?\"\n [Explorer runs aide_discover, reads the scaffolding module's .aide and orchestrator, traces the issue, returns findings]\n\n- Orchestrator delegates: \"What does the scoring module's pipeline look like?\"\n [Explorer runs aide_discover to find the module, reads .aide spec, reads orchestrator imports, returns a summary]\n\n- Orchestrator delegates: \"Find where command templates are registered and check if aide.md is in the list\"\n [Explorer uses discover + targeted code reads to trace the registration flow and report back]"
4
+ model: sonnet
5
+ color: cyan
6
+ memory: user
7
+ mcpServers:
8
+ - aide
9
+ ---
10
+
11
+ You are the AIDE-aware codebase explorer — a read-only investigator that understands the AIDE methodology and uses its tools to navigate codebases efficiently. You trace bugs, answer questions about how modules work, and find code — but you never modify anything.
12
+
13
+ ## Your Role
14
+
15
+ You receive a delegation from the orchestrator with a question or investigation task, along with the current `aide_discover` output (the cascading intent tree). You use this context to navigate the codebase intelligently, then return your findings to the caller.
16
+
17
+ **You do NOT write code, edit files, or delegate to other agents.** You investigate and report.
18
+
19
+ ## Cascading Intent — What It Means
20
+
21
+ AIDE projects organize code into a tree of `.aide` spec files. Each spec declares the *intent* of its module — what it's supposed to do, what success looks like, what to avoid. Intent **cascades**: a child module's intent must align with its parent's intent, which must align with the root's intent. This ancestor chain is the "why" behind every module.
22
+
23
+ When you investigate code, you are not looking at isolated files. You are looking at nodes in an intent tree. Understanding *why* a module exists (its cascading intent) comes before understanding *how* it works (its code).
24
+
25
+ ## Mandatory First Action
26
+
27
+ **Your very first tool call MUST be `aide_discover` with the target module's path.** This returns:
28
+
29
+ - The **ancestor chain** — every `.aide` spec from root down to the target, with descriptions and alignment status. This is the cascading intent context.
30
+ - The **detailed subtree** — summaries of specs and files in the target directory, plus anomaly warnings.
31
+
32
+ If the orchestrator already passed you rich discover output (with ancestor chain), you may skip this call. But if you only received a lightweight map (paths and types), you MUST call `aide_discover(path)` yourself before reading any code.
33
+
34
+ **Never use Glob, Grep, find, or Bash to search for `.aide` files.** `aide_discover` is the only tool for `.aide` navigation.
35
+
36
+ ## How You Navigate Code
37
+
38
+ After you have the cascading intent context:
39
+
40
+ ### Progressive Disclosure
41
+
42
+ 1. **Folder structure first.** Every service module is a folder named after its default export. An `ls` of a service directory tells you what it does. Start here.
43
+ 2. **Orchestrator imports + JSDoc.** If folder names aren't enough, open the orchestrator's `index.ts`. The import list + JSDoc gives you the data flow.
44
+ 3. **Function bodies.** Only drill into a helper's implementation when your task requires understanding *how* it works, not just *what* it does.
45
+
46
+ ### .aide Specs — Read Before Code
47
+
48
+ If a module has a `.aide` spec, read it before reading the code. The spec captures domain context the code alone doesn't show — strategy, intent, implementation contracts.
49
+
50
+ ## Investigation Process
51
+
52
+ 1. **Understand cascading intent.** Use the `aide_discover(path)` output to understand the ancestor chain — why this module exists in the context of the larger system.
53
+ 2. **Read the .aide spec** for the target module to understand its specific intent, outcomes, and contracts.
54
+ 3. **Read the orchestrator** (`index.ts`) to understand the module's structure and data flow.
55
+ 4. **Drill into specific helpers** only as needed to answer the question.
56
+ 5. **Return findings** with file paths, line numbers, and a clear explanation.
57
+
58
+ ## What You Return
59
+
60
+ Your response to the orchestrator should include:
61
+ - **The answer** to the question or investigation
62
+ - **Evidence** — file paths and relevant code snippets that support your finding
63
+ - **Recommendations** (if applicable) — what should be done next, phrased as suggestions for the orchestrator to act on
@@ -30,12 +30,14 @@ The orchestrator owns the user conversation. Your job is to take the context it
30
30
  - Use `intent.aide` if `research.aide` exists (co-located research triggers the rename)
31
31
  3. Fill the frontmatter ONLY:
32
32
  - `scope` — the module path this spec governs
33
+ - `description` — one-line purpose statement, used by `aide_discover` ancestor chains so agents understand what this spec governs without opening it
33
34
  - `intent` — one paragraph, plain language, ten-second north star
34
35
  - `outcomes.desired` — concrete, falsifiable success criteria (2-5 bullets)
35
36
  - `outcomes.undesired` — failure modes, especially the almost-right-but-wrong kind
36
37
  4. Leave body sections (`## Context`, `## Strategy`, `## Good examples`, `## Bad examples`) as empty placeholders
37
38
  5. No code in the spec — no file paths, no type signatures, no function names
38
39
  6. Every `outcomes` entry must trace back to the `intent` paragraph
40
+ 7. **Quote outcomes that contain colons.** Multi-line YAML list items whose continuation lines contain `key: value` patterns (e.g., `status: aligned`, `scope: src/tools`) break the YAML parser — it reads the colon as a map key delimiter. Wrap any outcome item that contains a colon-space (`: `) in its text in double quotes: `- "The aligner sets status: aligned on verified specs"`. Single-line items without colons don't need quoting.
39
41
 
40
42
  ## Return Format
41
43
 
@@ -1,5 +1,7 @@
1
1
  ---
2
2
  scope: .claude/skills/brain
3
+ description: >
4
+ Spec for the /brain skill — a thin dispatcher that reads the vault CLAUDE.md and defers all navigation to it, giving agents general-purpose vault access.
3
5
  intent: >
4
6
  The /brain skill gives agents in host projects a general-purpose interface
5
7
  to the user's Obsidian vault. The skill prompt is deliberately minimal: it
@@ -26,11 +28,11 @@ outcomes:
26
28
  installSkills pipeline — registered in DOC_PATHS and SKILL_DOCS,
27
29
  installed to the host's skill directory, subject to the same
28
30
  idempotency and upgrade contracts as study-playbook.
29
- - The skill prompt distinguishes itself from study-playbook by scope:
31
+ - "The skill prompt distinguishes itself from study-playbook by scope:
30
32
  study-playbook is limited to the coding playbook hub, while /brain
31
33
  is the general-purpose entry point for any vault query — research,
32
34
  project context, environment, identity, references, or any other
33
- vault content the user has organized.
35
+ vault content the user has organized."
34
36
  undesired:
35
37
  - A skill prompt that hardcodes vault navigation rules, directory
36
38
  paths, hub locations, or routing tables. This creates two sources
@@ -1,4 +1,6 @@
1
1
  ---
2
+ description: >
3
+ Plan to ship the /brain skill — create the SKILL.md template, register it in initContent, update the doc hub, and add a regression test.
2
4
  intent: >
3
5
  Ship the /brain skill — a thin-dispatcher SKILL.md template that tells
4
6
  agents to read the vault's root CLAUDE.md via the Obsidian MCP and follow
package/README.md CHANGED
@@ -1,41 +1,130 @@
1
1
  # @aidemd-mcp/server
2
2
 
3
- MCP server that teaches any agent the AIDE (Autonomous Intel-Driven Engineering) methodology. When an agent connects, the tool descriptions themselves teach the convention — no config or documentation injection needed.
3
+ [![npm version](https://img.shields.io/npm/v/@aidemd-mcp/server.svg)](https://www.npmjs.com/package/@aidemd-mcp/server)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
4
5
 
5
- ## What is AIDE?
6
+ MCP server that brings intent-driven development to any AI-powered IDE.
7
+ Manage `.aide` spec files that live next to your code — the domain context
8
+ that architects plan from, implementors build from, and QA validates against.
6
9
 
7
- AIDE specs are `.aide` files that live next to orchestrator code as progressive disclosure specs. They capture the domain context that code alone doesn't — strategy, research, implementation contracts, and anti-patterns.
10
+ ## Features
8
11
 
9
- | File | Purpose |
10
- |------|---------|
11
- | `.aide` | Intent spec (default). Strategy, contracts, anti-patterns. |
12
- | `intent.aide` | Same as `.aide` used only when `research.aide` exists in the same folder. |
13
- | `research.aide` | Raw research. Sources, data points, pattern synthesis. |
14
- | `todo.aide` | QA checklist. Issues found by audit agents. |
12
+ - **Project-wide spec discovery** with a progressive disclosure tree that surfaces intent, research, and QA specs at every level of your codebase
13
+ - **One-command project bootstrap** via `aide_init` — wires methodology docs, pipeline commands, and this MCP server into your project in a single guided flow
14
+ - **Automatic naming convention enforcement** — `aide_scaffold` handles the `.aide` / `intent.aide` rename rules so you never create conflicting specs
15
+ - **Health-check validation** via `aide_validate` detects orphaned specs, missing descriptions, broken links, and naming conflicts before they cause drift
16
+ - **Upgrade drift detection** via `aide_upgrade` compares your project's AIDE methodology artifacts against canonical versions and writes updates per-category
15
17
 
16
18
  ## Installation
17
19
 
18
- Add to your MCP client config:
20
+ ### Quick Start (Claude Code)
21
+
22
+ The fastest path is a single npx command that wires everything up automatically:
23
+
24
+ ```bash
25
+ npx @aidemd-mcp/server@latest init
26
+ ```
27
+
28
+ This command:
29
+ - Merges the AIDE MCP server entry into `.mcp.json` (creates the file or skips the entry if already present)
30
+ - Writes the `/aide:init` slash command to `.claude/commands/aide/init.md` (skips if exists)
31
+ - Writes the `aide-tree` launcher to `.aide/bin/aide-tree.mjs` (skips if exists)
32
+
33
+ All operations are idempotent — safe to re-run at any time.
34
+
35
+ After running, open Claude Code and run `/aide:init` to complete setup.
36
+
37
+ ### Manual Configuration
38
+
39
+ If you use a client other than Claude Code, or prefer to configure manually, add the server entry to your client's MCP config file.
40
+
41
+ #### Claude Code
42
+
43
+ ```bash
44
+ claude mcp add aide npx -- -y @aidemd-mcp/server@latest
45
+ ```
46
+
47
+ Or add to your project's `.mcp.json`:
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "aide": {
53
+ "command": "npx",
54
+ "args": ["-y", "@aidemd-mcp/server@latest"]
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ > [!NOTE]
61
+ > The Quick Start command above handles this automatically for Claude Code users.
62
+
63
+ #### Claude Desktop
64
+
65
+ Config file locations:
66
+ - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
67
+ - **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
19
68
 
20
69
  ```json
21
70
  {
22
71
  "mcpServers": {
23
72
  "aide": {
24
73
  "command": "npx",
25
- "args": ["@aidemd-mcp/server"]
74
+ "args": ["-y", "@aidemd-mcp/server@latest"]
26
75
  }
27
76
  }
28
77
  }
29
78
  ```
30
79
 
31
- Or with a custom project root:
80
+ > [!NOTE]
81
+ > Claude Desktop does not inherit the terminal PATH. If you use nvm or Homebrew to manage Node, `npx` may not be found. Run `which npx` in your terminal to get the absolute path and replace `"npx"` with it in the config above.
82
+
83
+ Claude Desktop requires a full quit-and-reopen after any config change.
84
+
85
+ #### Cursor
86
+
87
+ Add to `~/.cursor/mcp.json`:
32
88
 
33
89
  ```json
34
90
  {
35
91
  "mcpServers": {
36
92
  "aide": {
37
93
  "command": "npx",
38
- "args": ["@aidemd-mcp/server", "--root", "/path/to/project"]
94
+ "args": ["-y", "@aidemd-mcp/server@latest"]
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ #### VS Code / Copilot
101
+
102
+ Add to `.vscode/mcp.json`:
103
+
104
+ ```json
105
+ {
106
+ "servers": {
107
+ "aide": {
108
+ "command": "npx",
109
+ "args": ["-y", "@aidemd-mcp/server@latest"]
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ > [!NOTE]
116
+ > VS Code / Copilot uses `"servers"` as the root key, not `"mcpServers"`. Using the wrong root key causes the server to silently fail to load.
117
+
118
+ #### Windsurf
119
+
120
+ Add to `~/.windsurf/mcp.json`:
121
+
122
+ ```json
123
+ {
124
+ "mcpServers": {
125
+ "aide": {
126
+ "command": "npx",
127
+ "args": ["-y", "@aidemd-mcp/server@latest"]
39
128
  }
40
129
  }
41
130
  }
@@ -43,41 +132,59 @@ Or with a custom project root:
43
132
 
44
133
  ## Tools
45
134
 
46
- ### `aide_discover`
135
+ ### aide_discover
136
+
137
+ Scan the project for `.aide` spec files and return a progressive disclosure tree map showing each spec's type, location, and summary.
138
+
139
+ **Inputs:**
140
+ - `path` (string, optional): Subdirectory to drill into. When provided, the response opens with the ancestor chain — the cascading intent lineage from root to target, each ancestor showing its description and alignment status — followed by the detailed subtree with summaries and warnings. When omitted, returns a shallow project-wide map (locations and types only).
47
141
 
48
- Scans the project for all `.aide` files and returns a progressive disclosure tree map. This is the flagship tool — it teaches the agent the entire module architecture at a glance.
142
+ ### aide_read
49
143
 
50
- **Input:** optional `path` (subdirectory to scan)
144
+ Read an `.aide` spec file with full context, returning the file content, its classified type (intent/research/plan/todo), related specs in the same directory, and links found in the content.
51
145
 
52
- **Output:** Tree showing each spec's type, location, and summary.
146
+ **Inputs:**
147
+ - `path` (string, required): Path to the `.aide` file to read.
53
148
 
54
- ### `aide_read`
149
+ ### aide_scaffold
55
150
 
56
- Reads an `.aide` file with context awareness. Returns the file content, classified type, sibling specs in the same directory, and links found in the content (wikilinks, relative paths, URLs).
151
+ Create new `.aide` spec files with automatic naming convention enforcement. Handles the rename rules: intent specs are `.aide` by default but become `intent.aide` when `research.aide` exists in the same folder; creating a `research.aide` auto-renames any existing `.aide` to `intent.aide`.
57
152
 
58
- **Input:** `path` (required)
153
+ **Inputs:**
154
+ - `directory` (string, required): Directory where the `.aide` file(s) will be created.
155
+ - `type` (string, required): Type of `.aide` file to create. One of: `intent`, `research`, `both`, `todo`, `plan`.
59
156
 
60
- ### `aide_scaffold`
157
+ ### aide_validate
61
158
 
62
- Creates new `.aide` files with automatic naming convention enforcement. Handles auto-rename logic creating a `research.aide` will rename an existing `.aide` to `intent.aide`.
159
+ Run a health check on `.aide` spec files in the project. Detects orphaned specs, missing specs, naming conflicts (`.aide` and `intent.aide` in the same folder), broken links, orphaned research files, and missing frontmatter descriptions.
63
160
 
64
- **Input:** `directory` (required), `type` (required: `intent` | `research` | `both` | `todo`)
161
+ **Inputs:**
162
+ - `path` (string, optional): Subdirectory to validate. Defaults to the entire project when omitted.
65
163
 
66
- ### `aide_validate`
164
+ ### aide_init
67
165
 
68
- Health check for `.aide` spec files. Detects orphaned specs, missing specs, naming conflicts, broken links, and orphaned research files.
166
+ Bootstrap the AIDE development environment into a project using a guided one-at-a-time wizard. On the first call (no `category`), returns a summary of every step with status and detected framework. On subsequent calls (with `category`), writes all pending files for that category to disk and returns a manifest.
69
167
 
70
- **Input:** optional `path` (subdirectory to validate)
168
+ **Inputs:**
169
+ - `framework` (string, optional): Force a specific framework instead of auto-detecting. One of: `claude`, `cursor`, `windsurf`, `copilot`.
170
+ - `path` (string, optional): Custom project root path. Defaults to the server working directory.
171
+ - `category` (string, optional): Write all `would-create` files for this category and return a manifest. One of: `framework`, `methodology`, `commands`, `agents`, `skills`, `mcp`, `brain`, `ide`. Omit on the first call to get a metadata-only summary.
172
+ - `brainPath` (string, optional): Resolved brain vault path. Required when `category=brain`.
71
173
 
72
- ### `aide_init`
174
+ ### aide_upgrade
73
175
 
74
- Bootstrap the AIDE development environment into a project with one command. Detects the agent framework, writes the AIDE methodology into the agent's config file, scaffolds slash commands for every pipeline phase (`/aide-research`, `/aide-spec`, `/aide-synthesize`, `/aide-plan`, `/aide-build`, `/aide-qa`, `/aide-fix`, `/aide-refactor`), and wires this MCP server into the project's MCP config.
176
+ Compare the AIDE methodology artifacts in this project against canonical versions and return a structured diff grouped by category. On the first call (no `category`), returns a lightweight summary of every category with drift status. On subsequent calls (with `category`), writes all diffed or missing files for that category to disk and returns a manifest.
75
177
 
76
- Supports Claude Code, Cursor, Windsurf, and Copilot. Auto-detects from marker files or accepts an override.
178
+ **Inputs:**
179
+ - `framework` (string, optional): Force a specific framework instead of auto-detecting. One of: `claude`, `cursor`, `windsurf`, `copilot`.
180
+ - `path` (string, optional): Custom project root path. Defaults to the server working directory.
181
+ - `category` (string, optional): Write all drifted or missing files for this category and return a manifest. One of: `pointer-stub`, `methodology-docs`, `version-metadata`, `commands`, `agents`, `skills`, `mcp`, `ide`. Omit on the first call to get a metadata-only summary.
77
182
 
78
- **Input:** optional `framework` (`claude` | `cursor` | `windsurf` | `copilot`), optional `path` (project root)
183
+ ## Getting Started
79
184
 
80
- Each step is idempotent running on an already-initialized project reports what's present without overwriting.
185
+ After adding the server to your MCP client, ask your agent to run `aide_init` to bootstrap the AIDE methodology into your project. This installs the methodology docs, scaffolds pipeline commands, and wires everything up.
186
+
187
+ Then try: "Scaffold an intent spec for my authentication module" — the agent will use `aide_discover` to map your project and `aide_scaffold` to create the spec in the right place with the right naming conventions.
81
188
 
82
189
  ## Development
83
190
 
@@ -86,3 +193,7 @@ npm install
86
193
  npm run build
87
194
  npm test
88
195
  ```
196
+
197
+ ## License
198
+
199
+ [MIT](https://github.com/aidemd-mcp/server/blob/main/LICENSE)
@@ -38,15 +38,17 @@ export default function App({ root, initialNodes }) {
38
38
  const [drillCache] = useState(new Map());
39
39
  // Single expanded section in drill-in mode; Tab cycles through sections.
40
40
  const [expandedSection, setExpandedSection] = useState(null);
41
- // --- Detail panel frontmatter (for currently selected file) ---
41
+ // --- Detail panel frontmatter + body (for currently selected file) ---
42
42
  const [selectedFrontmatter, setSelectedFrontmatter] = useState(null);
43
+ const [selectedBody, setSelectedBody] = useState("");
43
44
  const [fmCache] = useState(new Map());
44
45
  /** Returns true if any file descendant of node matches the search filter. */
45
46
  function hasMatchingDescendant(node, filter) {
46
47
  if (node.kind === "file") {
47
48
  const lower = filter.toLowerCase();
48
49
  return (node.file.relativePath.toLowerCase().includes(lower) ||
49
- (node.file.summary ?? "").toLowerCase().includes(lower));
50
+ (node.file.summary ?? "").toLowerCase().includes(lower) ||
51
+ (node.file.description ?? "").toLowerCase().includes(lower));
50
52
  }
51
53
  return node.children.some((child) => hasMatchingDescendant(child, filter));
52
54
  }
@@ -58,8 +60,10 @@ export default function App({ root, initialNodes }) {
58
60
  if (fn.node.kind === "dir") {
59
61
  return hasMatchingDescendant(fn.node, searchFilter);
60
62
  }
61
- return (fn.node.file.relativePath.toLowerCase().includes(searchFilter.toLowerCase()) ||
62
- (fn.node.file.summary ?? "").toLowerCase().includes(searchFilter.toLowerCase()));
63
+ const lower = searchFilter.toLowerCase();
64
+ return (fn.node.file.relativePath.toLowerCase().includes(lower) ||
65
+ (fn.node.file.summary ?? "").toLowerCase().includes(lower) ||
66
+ (fn.node.file.description ?? "").toLowerCase().includes(lower));
63
67
  })
64
68
  : flatNodes;
65
69
  // Clamp cursor within visible range.
@@ -75,25 +79,30 @@ export default function App({ root, initialNodes }) {
75
79
  // Computed booleans for the cursor's current position.
76
80
  const cursorOnDir = cursorNode?.node.kind === "dir";
77
81
  const cursorDirExpanded = cursorOnDir && cursorNode.node.kind === "dir" && expandedDirs.has(cursorNode.node.path);
78
- // Load frontmatter for the detail panel whenever selectedFile changes.
82
+ // Load frontmatter + body for the detail panel whenever selectedFile changes.
79
83
  useEffect(() => {
80
84
  if (!selectedFile) {
81
85
  setSelectedFrontmatter(null);
86
+ setSelectedBody("");
82
87
  return;
83
88
  }
84
89
  if (fmCache.has(selectedFile.path)) {
85
- setSelectedFrontmatter(fmCache.get(selectedFile.path) ?? null);
90
+ const cached = fmCache.get(selectedFile.path);
91
+ setSelectedFrontmatter(cached.frontmatter);
92
+ setSelectedBody(cached.body);
86
93
  return;
87
94
  }
88
95
  readFile(selectedFile.path, "utf-8")
89
96
  .then((content) => {
90
- const { frontmatter } = parseFrontmatter(content);
91
- fmCache.set(selectedFile.path, frontmatter);
97
+ const { frontmatter, body } = parseFrontmatter(content);
98
+ fmCache.set(selectedFile.path, { frontmatter, body });
92
99
  setSelectedFrontmatter(frontmatter);
100
+ setSelectedBody(body);
93
101
  })
94
102
  .catch(() => {
95
- fmCache.set(selectedFile.path, null);
103
+ fmCache.set(selectedFile.path, { frontmatter: null, body: "" });
96
104
  setSelectedFrontmatter(null);
105
+ setSelectedBody("");
97
106
  });
98
107
  }, [selectedFile?.path]);
99
108
  /** Load and parse a file for drill-in view. */
@@ -109,12 +118,12 @@ export default function App({ root, initialNodes }) {
109
118
  const content = await readFile(file.path, "utf-8");
110
119
  const { frontmatter, body } = parseFrontmatter(content);
111
120
  const sections = parseBody(body);
112
- const data = { frontmatter, sections };
121
+ const data = { frontmatter, body, sections };
113
122
  drillCache.set(file.path, data);
114
123
  setDrillData(data);
115
124
  }
116
125
  catch {
117
- setDrillData({ frontmatter: null, sections: [] });
126
+ setDrillData({ frontmatter: null, body: "", sections: [] });
118
127
  }
119
128
  }, [drillCache]);
120
129
  /** Toggle deep view on/off, caching shallow results for instant restore. */
@@ -277,6 +286,6 @@ export default function App({ root, initialNodes }) {
277
286
  // Enter is a no-op in drill-in mode.
278
287
  });
279
288
  // --- Layout ---
280
- const treeWidth = Math.floor(columns * 0.38);
281
- return (_jsxs(Box, { flexDirection: "row", width: columns, children: [_jsxs(Box, { flexDirection: "column", width: treeWidth, borderStyle: "single", borderColor: "white", children: [_jsx(Text, { bold: true, children: " Intent Tree" }), deepLoading && _jsx(Text, { color: "yellow", children: " Loading summaries..." }), _jsx(TreePanel, { visibleNodes: visibleNodes, cursorIndex: clampedCursor, searchFilter: searchFilter, isDeepView: isDeepView, expandedDirs: expandedDirs, cursorOnDir: cursorOnDir, cursorDirExpanded: cursorDirExpanded, width: treeWidth - 2 })] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, borderStyle: "single", borderColor: "white", children: [_jsx(Text, { bold: true, children: " Detail" }), _jsx(DetailPanel, { file: selectedFile, frontmatter: mode === "drill-in" ? (drillData?.frontmatter ?? null) : selectedFrontmatter, mode: mode === "drill-in" ? "drill-in" : "preview", sections: drillData?.sections ?? [], expandedSection: expandedSection, drilledFilePath: drilledFile?.relativePath ?? null })] })] }));
289
+ const treeWidth = Math.floor(columns * 0.57);
290
+ return (_jsxs(Box, { flexDirection: "row", width: columns, children: [_jsxs(Box, { flexDirection: "column", width: treeWidth, borderStyle: "single", borderColor: "white", children: [_jsx(Text, { bold: true, children: " Intent Tree" }), deepLoading && _jsx(Text, { color: "yellow", children: " Loading summaries..." }), _jsx(TreePanel, { visibleNodes: visibleNodes, cursorIndex: clampedCursor, searchFilter: searchFilter, isDeepView: isDeepView, expandedDirs: expandedDirs, cursorOnDir: cursorOnDir, cursorDirExpanded: cursorDirExpanded, width: treeWidth - 2 })] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, borderStyle: "single", borderColor: "white", children: [_jsx(Text, { bold: true, children: " Detail" }), _jsx(DetailPanel, { file: selectedFile, frontmatter: mode === "drill-in" ? (drillData?.frontmatter ?? null) : selectedFrontmatter, body: mode === "drill-in" ? (drillData?.body ?? "") : selectedBody, mode: mode === "drill-in" ? "drill-in" : "preview", sections: drillData?.sections ?? [], expandedSection: expandedSection, drilledFilePath: drilledFile?.relativePath ?? null })] })] }));
282
291
  }
@@ -3,6 +3,8 @@ import type { AideFile, AideFrontmatter, BodySection } from "../../types/index.j
3
3
  interface DetailPanelProps {
4
4
  file: AideFile | null;
5
5
  frontmatter: AideFrontmatter | null;
6
+ /** Raw body content of the selected or drilled-in file. Used by plan/todo renderers. */
7
+ body: string;
6
8
  /** Controls which rendering mode is active in the right panel. */
7
9
  mode: "preview" | "drill-in";
8
10
  /** Body sections from the drilled-in file. */
@@ -16,9 +18,11 @@ interface DetailPanelProps {
16
18
  * Right-panel component that handles both preview mode (tree navigation) and
17
19
  * drill-in mode (formatted frontmatter card with expandable body sections).
18
20
  *
19
- * In preview mode: scope, truncated intent, and outcome counts.
20
- * In drill-in mode: full frontmatter card (scope heading, full intent, side-by-side
21
- * outcomes) plus expandable body sections cycled with Tab.
21
+ * Delegates to RenderPlanDetail for plan files and RenderTodoDetail for todo files.
22
+ * Intent and research files use the intent-card layout (scope, intent, outcomes).
23
+ *
24
+ * In preview mode: scope, truncated intent, and outcome counts (or plan/todo summary).
25
+ * In drill-in mode: full frontmatter card or plan/todo detail view.
22
26
  */
23
- export default function DetailPanel({ file, frontmatter, mode, sections, expandedSection, drilledFilePath, }: DetailPanelProps): React.ReactElement;
27
+ export default function DetailPanel({ file, frontmatter, body, mode, sections, expandedSection, drilledFilePath, }: DetailPanelProps): React.ReactElement;
24
28
  export {};
@@ -1,5 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text, useStdout } from "ink";
3
+ import RenderPlanDetail from "./renderPlanDetail/index.js";
4
+ import RenderTodoDetail from "./renderTodoDetail/index.js";
3
5
  /** Truncate a string to maxLen chars, appending "..." if trimmed. */
4
6
  function truncate(s, maxLen) {
5
7
  if (s.length <= maxLen)
@@ -21,11 +23,13 @@ function OutcomesDisplay({ desired, undesired, wide, }) {
21
23
  * Right-panel component that handles both preview mode (tree navigation) and
22
24
  * drill-in mode (formatted frontmatter card with expandable body sections).
23
25
  *
24
- * In preview mode: scope, truncated intent, and outcome counts.
25
- * In drill-in mode: full frontmatter card (scope heading, full intent, side-by-side
26
- * outcomes) plus expandable body sections cycled with Tab.
26
+ * Delegates to RenderPlanDetail for plan files and RenderTodoDetail for todo files.
27
+ * Intent and research files use the intent-card layout (scope, intent, outcomes).
28
+ *
29
+ * In preview mode: scope, truncated intent, and outcome counts (or plan/todo summary).
30
+ * In drill-in mode: full frontmatter card or plan/todo detail view.
27
31
  */
28
- export default function DetailPanel({ file, frontmatter, mode, sections, expandedSection, drilledFilePath, }) {
32
+ export default function DetailPanel({ file, frontmatter, body, mode, sections, expandedSection, drilledFilePath, }) {
29
33
  const { stdout } = useStdout();
30
34
  const columns = stdout?.columns ?? 80;
31
35
  const wide = columns >= 80;
@@ -34,6 +38,14 @@ export default function DetailPanel({ file, frontmatter, mode, sections, expande
34
38
  if (!file) {
35
39
  return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsx(Text, { color: "gray", children: "Select a file to preview" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "Type to search, [tab] for deep view" }) })] }));
36
40
  }
41
+ // Delegate to type-specific renderers for plan and todo files.
42
+ if (file.type === "plan") {
43
+ return _jsx(RenderPlanDetail, { file: file, frontmatter: frontmatter, mode: "preview", body: body, drilledFilePath: null });
44
+ }
45
+ if (file.type === "todo") {
46
+ const description = frontmatter?.description ?? file.description ?? "";
47
+ return _jsx(RenderTodoDetail, { description: description, body: body, mode: "preview", filePath: file.relativePath });
48
+ }
37
49
  if (!frontmatter) {
38
50
  return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsx(Text, { color: "red", children: "[FAILED TO PARSE]" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: file.relativePath }) })] }));
39
51
  }
@@ -44,6 +56,14 @@ export default function DetailPanel({ file, frontmatter, mode, sections, expande
44
56
  return (_jsxs(Box, { flexDirection: "column", paddingX: 2, paddingY: 1, children: [_jsxs(Text, { bold: true, children: ["scope: ", scope] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { wrap: "wrap", children: intent }) }), (desiredCount > 0 || undesiredCount > 0) && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { color: "green", children: ["\u2713 desired (", desiredCount, ")"] }), _jsxs(Text, { color: "red", children: ["\u2717 undesired (", undesiredCount, ")"] })] })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "gray", children: "[\u2191\u2193] navigate [enter] drill in [tab] deep view" }) })] }));
45
57
  }
46
58
  // --- Drill-in mode ---
59
+ // Delegate to type-specific renderers for plan and todo files.
60
+ if (file?.type === "plan") {
61
+ return _jsx(RenderPlanDetail, { file: file, frontmatter: frontmatter, mode: "drill-in", body: body, drilledFilePath: drilledFilePath });
62
+ }
63
+ if (file?.type === "todo") {
64
+ const description = frontmatter?.description ?? file?.description ?? "";
65
+ return _jsx(RenderTodoDetail, { description: description, body: body, mode: "drill-in", filePath: drilledFilePath ?? file?.relativePath ?? "" });
66
+ }
47
67
  const title = drilledFilePath ?? "[unknown]";
48
68
  const scope = frontmatter?.scope ?? "[FAILED TO PARSE]";
49
69
  const intent = frontmatter?.intent ?? "[FAILED TO PARSE]";