@aidemd-mcp/server 0.2.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/docs/.aide +128 -0
- package/.aide/docs/agent-readable-code.md +74 -0
- package/.aide/docs/aide-spec.md +201 -0
- package/.aide/docs/aide-template.md +110 -0
- package/.aide/docs/automated-qa.md +111 -0
- package/.aide/docs/cascading-alignment.md +107 -0
- package/.aide/docs/index.md +38 -0
- package/.aide/docs/plan-aide.md +77 -0
- package/.aide/docs/plan.aide +60 -0
- package/.aide/docs/progressive-disclosure.md +72 -0
- package/.aide/docs/todo-aide.md +77 -0
- package/.aide/intent.aide +256 -0
- package/.aide/plan.aide +169 -0
- package/.aide/todo.aide +47 -0
- package/.claude/.aide +246 -0
- package/.claude/commands/aide/align.md +15 -0
- package/.claude/commands/aide/build.md +17 -0
- package/.claude/commands/aide/fix.md +20 -0
- package/.claude/commands/aide/init.md +171 -0
- package/.claude/commands/aide/plan.md +25 -0
- package/.claude/commands/aide/qa.md +25 -0
- package/.claude/commands/aide/refactor.md +29 -0
- package/.claude/commands/aide/research.md +21 -0
- package/.claude/commands/aide/spec.md +24 -0
- package/.claude/commands/aide/synthesize.md +20 -0
- package/.claude/commands/aide/update-playbook.md +18 -0
- package/.claude/commands/aide/upgrade.md +91 -0
- package/LICENSE +21 -0
- package/README.md +88 -0
- package/dist/cli/App/index.d.ts +14 -0
- package/dist/cli/App/index.js +282 -0
- package/dist/cli/DetailPanel/index.d.ts +24 -0
- package/dist/cli/DetailPanel/index.js +57 -0
- package/dist/cli/TreePanel/index.d.ts +24 -0
- package/dist/cli/TreePanel/index.js +65 -0
- package/dist/cli/buildTreeData/index.d.ts +7 -0
- package/dist/cli/buildTreeData/index.js +51 -0
- package/dist/cli/findPrimaryIntent/index.d.ts +12 -0
- package/dist/cli/findPrimaryIntent/index.js +20 -0
- package/dist/cli/flattenTree/index.d.ts +16 -0
- package/dist/cli/flattenTree/index.js +20 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +15 -0
- package/dist/cli/init/index.d.ts +2 -0
- package/dist/cli/init/index.js +33 -0
- package/dist/cli/init/writeInitCommand/index.d.ts +13 -0
- package/dist/cli/init/writeInitCommand/index.js +25 -0
- package/dist/cli/init/writeMcpEntry/index.d.ts +12 -0
- package/dist/cli/init/writeMcpEntry/index.js +51 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +228 -0
- package/dist/tools/discover/buildAncestorChain/index.d.ts +17 -0
- package/dist/tools/discover/buildAncestorChain/index.js +98 -0
- package/dist/tools/discover/buildTree/index.d.ts +9 -0
- package/dist/tools/discover/buildTree/index.js +57 -0
- package/dist/tools/discover/index.d.ts +20 -0
- package/dist/tools/discover/index.js +49 -0
- package/dist/tools/init/applySteps/index.d.ts +30 -0
- package/dist/tools/init/applySteps/index.js +76 -0
- package/dist/tools/init/configureIde/index.d.ts +21 -0
- package/dist/tools/init/configureIde/index.js +135 -0
- package/dist/tools/init/detectFramework/index.d.ts +11 -0
- package/dist/tools/init/detectFramework/index.js +53 -0
- package/dist/tools/init/index.d.ts +46 -0
- package/dist/tools/init/index.js +99 -0
- package/dist/tools/init/initContent/index.d.ts +99 -0
- package/dist/tools/init/initContent/index.js +162 -0
- package/dist/tools/init/installAgents/index.d.ts +12 -0
- package/dist/tools/init/installAgents/index.js +60 -0
- package/dist/tools/init/installMethodologyDocs/index.d.ts +14 -0
- package/dist/tools/init/installMethodologyDocs/index.js +62 -0
- package/dist/tools/init/installSkills/index.d.ts +12 -0
- package/dist/tools/init/installSkills/index.js +60 -0
- package/dist/tools/init/provisionBrain/index.d.ts +23 -0
- package/dist/tools/init/provisionBrain/index.js +239 -0
- package/dist/tools/init/resolveBrainHints/index.d.ts +17 -0
- package/dist/tools/init/resolveBrainHints/index.js +44 -0
- package/dist/tools/init/scaffoldCommands/index.d.ts +38 -0
- package/dist/tools/init/scaffoldCommands/index.js +94 -0
- package/dist/tools/init/wireMcp/index.d.ts +16 -0
- package/dist/tools/init/wireMcp/index.js +72 -0
- package/dist/tools/init/writeMethodology/index.d.ts +20 -0
- package/dist/tools/init/writeMethodology/index.js +94 -0
- package/dist/tools/read/index.d.ts +15 -0
- package/dist/tools/read/index.js +79 -0
- package/dist/tools/scaffold/index.d.ts +22 -0
- package/dist/tools/scaffold/index.js +128 -0
- package/dist/tools/upgrade/applyFiles/index.d.ts +33 -0
- package/dist/tools/upgrade/applyFiles/index.js +65 -0
- package/dist/tools/upgrade/buildVersionsMeta/index.d.ts +20 -0
- package/dist/tools/upgrade/buildVersionsMeta/index.js +51 -0
- package/dist/tools/upgrade/checkIdeConfig/index.d.ts +24 -0
- package/dist/tools/upgrade/checkIdeConfig/index.js +134 -0
- package/dist/tools/upgrade/checkMcpConfig/index.d.ts +17 -0
- package/dist/tools/upgrade/checkMcpConfig/index.js +81 -0
- package/dist/tools/upgrade/compareFile/index.d.ts +12 -0
- package/dist/tools/upgrade/compareFile/index.js +24 -0
- package/dist/tools/upgrade/index.d.ts +24 -0
- package/dist/tools/upgrade/index.js +139 -0
- package/dist/tools/upgrade/spliceStub/index.d.ts +13 -0
- package/dist/tools/upgrade/spliceStub/index.js +91 -0
- package/dist/tools/validate/index.d.ts +18 -0
- package/dist/tools/validate/index.js +65 -0
- package/dist/types/index.d.ts +277 -0
- package/dist/types/index.js +10 -0
- package/dist/util/classify/index.d.ts +17 -0
- package/dist/util/classify/index.js +134 -0
- package/dist/util/parseBody/index.d.ts +7 -0
- package/dist/util/parseBody/index.js +43 -0
- package/dist/util/parseFrontmatter/index.d.ts +12 -0
- package/dist/util/parseFrontmatter/index.js +64 -0
- package/dist/util/scan/index.d.ts +7 -0
- package/dist/util/scan/index.js +82 -0
- package/package.json +59 -0
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
---
|
|
2
|
+
scope: .
|
|
3
|
+
intent: >
|
|
4
|
+
This repository is the canonical home of the AIDE methodology — Autonomous
|
|
5
|
+
Intent-Driven Engineering, with a deliberate second reading as AI Domain
|
|
6
|
+
Expert — and the MCP server that delivers it to agents in host projects.
|
|
7
|
+
Intent is the primary driver: a `.aide` intent doc governs the code, and a
|
|
8
|
+
research agent plays the role of the human domain expert an engineering
|
|
9
|
+
team would otherwise need to hire. The repo has two jobs: author the
|
|
10
|
+
canonical docs, and ship them through the MCP handshake and aide_init.
|
|
11
|
+
Success is an agent in a brand-new host project receiving the full
|
|
12
|
+
methodology via tooling alone, then working intent-first — describing what
|
|
13
|
+
it wants in cascading layers of abstraction and letting the agent turn
|
|
14
|
+
those layers into code. Full autonomy through intent-driven development,
|
|
15
|
+
with AI domain experts filling the expertise gap, is the north star every
|
|
16
|
+
other decision in this repo must serve.
|
|
17
|
+
outcomes:
|
|
18
|
+
desired:
|
|
19
|
+
- >-
|
|
20
|
+
The canonical AIDE methodology — spec, template, progressive disclosure,
|
|
21
|
+
agent-readable code, automated QA — lives in this repo as editable doc
|
|
22
|
+
files and is the single source of truth. Editing those files is the
|
|
23
|
+
only way to change what downstream host projects receive.
|
|
24
|
+
- >-
|
|
25
|
+
Two delivery channels, each with one clear job: MCP tool descriptions
|
|
26
|
+
teach AIDE at handshake time; aide_init installs a short pointer stub
|
|
27
|
+
into the host's config file, lands the progressively-disclosed
|
|
28
|
+
methodology doc hub onto the host's disk, scaffolds pipeline slash
|
|
29
|
+
commands, wires the MCP server into the host project, and configures
|
|
30
|
+
IDE preview. Together they cover the full lifecycle from handshake
|
|
31
|
+
to steady-state work. The stub-plus-hub shape of the methodology
|
|
32
|
+
delivery is load-bearing: every session in the host pays the stub
|
|
33
|
+
cost on every read of the config file, but pays the full doctrine
|
|
34
|
+
cost only when the task actually touches `.aide` files. Progressive
|
|
35
|
+
disclosure applies at the delivery layer, not just inside the docs.
|
|
36
|
+
- >-
|
|
37
|
+
Every downstream artifact the server ships — tool descriptions,
|
|
38
|
+
host-installed pointer stubs, host-installed methodology docs,
|
|
39
|
+
slash command templates — is composed from the canonical doc
|
|
40
|
+
files at build or init time, never duplicated as an inline string
|
|
41
|
+
or hardcoded template.
|
|
42
|
+
- >-
|
|
43
|
+
A host project that runs aide_init once is AIDE-ready: the installing
|
|
44
|
+
agent did not have to paraphrase, remember, or quote any AIDE rules to
|
|
45
|
+
get there, because the tooling carried the full methodology into the
|
|
46
|
+
project.
|
|
47
|
+
- >-
|
|
48
|
+
The repo itself exemplifies AIDE because the server is written using
|
|
49
|
+
it: progressive disclosure in the folder tree, agent-readable names,
|
|
50
|
+
`.aide` specs next to orchestrators, decisions-not-descriptions in
|
|
51
|
+
every spec. Cascading intent at every level, so a contributor can
|
|
52
|
+
write a new submodule spec by inheritance without re-deriving the
|
|
53
|
+
rules.
|
|
54
|
+
undesired:
|
|
55
|
+
- >-
|
|
56
|
+
A rule, convention, or doctrine that lives anywhere other than the
|
|
57
|
+
canonical doc files — a commit message, a README, a code comment, a
|
|
58
|
+
per-project CLAUDE.md edit. If the change is not in the canonical
|
|
59
|
+
docs, it is not shipped, and it will drift away from whatever the
|
|
60
|
+
server actually delivers.
|
|
61
|
+
- >-
|
|
62
|
+
Dual sources of truth: the same doctrine appearing in both this repo
|
|
63
|
+
and the original brain notes without one being marked authoritative
|
|
64
|
+
and the other deleted. Migration from the brain is a one-way move on
|
|
65
|
+
the same commit.
|
|
66
|
+
- >-
|
|
67
|
+
A delivery channel other than MCP tool descriptions and aide_init —
|
|
68
|
+
a sixth tool that "also explains things," a server-side prompt, a
|
|
69
|
+
standalone CLI that teaches. Every additional channel fragments the
|
|
70
|
+
teaching surface and forces agents to guess where to look.
|
|
71
|
+
- >-
|
|
72
|
+
A canonical doc that describes behavior the server does not actually
|
|
73
|
+
deliver. Aspirational docs are worse than missing docs, because
|
|
74
|
+
missing docs do not lie.
|
|
75
|
+
- >-
|
|
76
|
+
A change that makes the cascading-intent model less faithful, less
|
|
77
|
+
complete, or less teachable — a child spec restating its parent, a
|
|
78
|
+
parent so narrow that its children have nothing to inherit, a helper
|
|
79
|
+
with a `.aide` file, an orchestrator without one. These are
|
|
80
|
+
regressions even when they add features.
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Context
|
|
84
|
+
|
|
85
|
+
Before this repo existed, the AIDE methodology lived in a personal Obsidian
|
|
86
|
+
vault. That worked for one maintainer but could not ship: every new project,
|
|
87
|
+
every new contributor, every new agent framework had to rediscover the rules
|
|
88
|
+
from a vault they did not have access to, and any CLAUDE.md snippet that
|
|
89
|
+
tried to carry the rules forward went stale the moment the canonical vault
|
|
90
|
+
notes changed.
|
|
91
|
+
|
|
92
|
+
The MCP handshake is the only documentation surface a compliant MCP client
|
|
93
|
+
is required to present to the model verbatim, in every session, in every
|
|
94
|
+
project, without user action. aide_init is the only command needed to turn
|
|
95
|
+
a cold host project into one that knows AIDE. Together those two channels
|
|
96
|
+
give the methodology a delivery path that does not depend on the agent
|
|
97
|
+
remembering anything across sessions or the user editing any file by hand.
|
|
98
|
+
|
|
99
|
+
This repo's job is to author the methodology once, hold it as the single
|
|
100
|
+
source of truth, and ship it through those two channels. Nothing else.
|
|
101
|
+
|
|
102
|
+
## Strategy
|
|
103
|
+
|
|
104
|
+
**Canonical docs are editable files, not compiled output.** The doc set
|
|
105
|
+
lives in this repo as plain Markdown the maintainer can read, diff, and
|
|
106
|
+
edit. Every downstream artifact — tool descriptions, methodology blocks,
|
|
107
|
+
slash command templates — is composed from those files at build or init
|
|
108
|
+
time. A doctrine change is one edit in one file; propagation to every
|
|
109
|
+
downstream host project is automatic on their next init. If a maintainer
|
|
110
|
+
ever has to edit two places to ship one change, the source-of-truth
|
|
111
|
+
invariant has been broken and must be repaired, not worked around.
|
|
112
|
+
|
|
113
|
+
**Two delivery channels, no third.** MCP tool descriptions teach AIDE at
|
|
114
|
+
handshake time: what `.aide` files are, where they live, the naming rules,
|
|
115
|
+
the read-before-code workflow. aide_init installs the rest: a short
|
|
116
|
+
pointer stub into the host's config file, the full canonical methodology
|
|
117
|
+
doc set into a dedicated host-side doc hub the stub points at, the slash
|
|
118
|
+
commands that run the pipeline, the MCP wiring, and the IDE preview. The
|
|
119
|
+
two channels are cleanly partitioned — handshake teaches concepts, init
|
|
120
|
+
installs artifacts — and between them they cover the lifecycle an agent
|
|
121
|
+
in a host project actually walks. Any proposal to add a third channel
|
|
122
|
+
should be rejected and redirected into improving one of the existing two.
|
|
123
|
+
|
|
124
|
+
**Methodology delivery honors progressive disclosure at the delivery
|
|
125
|
+
layer.** The agent reads the host's config file on every session, so
|
|
126
|
+
that surface carries only a short stub that names the installed doc hub
|
|
127
|
+
and teaches the crawl trigger. The full canonical methodology lands as
|
|
128
|
+
files on the host's disk, read on demand by sessions that actually touch
|
|
129
|
+
`.aide` material. This mirrors what the user's global `study-playbook`
|
|
130
|
+
skill does against the brain — a shallow pointer surface naming a deep
|
|
131
|
+
content surface, with the agent crawling only when the task requires it.
|
|
132
|
+
Shipping the full methodology body inside the stub region violates the
|
|
133
|
+
pattern the methodology itself teaches, which is exactly the regression
|
|
134
|
+
this architecture exists to prevent.
|
|
135
|
+
|
|
136
|
+
**The repo eats its own dog food.** The MCP server is written using AIDE.
|
|
137
|
+
Progressive disclosure in the folder tree, folders named after their
|
|
138
|
+
default exports, JSDoc on every function, inline narration only on
|
|
139
|
+
orchestrators, `.aide` specs next to orchestrators and nowhere else,
|
|
140
|
+
decisions-not-descriptions in every spec. This is not stylistic — it is
|
|
141
|
+
the forcing function. A rule that is wrong or unworkable shows up as
|
|
142
|
+
pain in this repo before it ships to a host project. If a rule can't
|
|
143
|
+
survive being lived under here, it doesn't belong in the canonical docs.
|
|
144
|
+
|
|
145
|
+
**Migration from the brain is one-way.** Every doc that lands in this
|
|
146
|
+
repo is deleted or archived from the brain on the same commit. Drift
|
|
147
|
+
between two copies of a canonical doc is the worst kind of drift,
|
|
148
|
+
because it silently propagates to every host project on its next init
|
|
149
|
+
and no one notices which copy is authoritative.
|
|
150
|
+
|
|
151
|
+
**Intent-driven development is the measurement.** Every change to this
|
|
152
|
+
repo — a new doc, a new tool, a revised description, a refactored helper
|
|
153
|
+
— is evaluated against one question: does this make "describe what you
|
|
154
|
+
want in cascading layers of abstraction, let the agent build the code"
|
|
155
|
+
more real or less real? A feature that adds surface but doesn't move that
|
|
156
|
+
needle is a regression in disguise. A change that tightens the cascading
|
|
157
|
+
intent model is load-bearing even when it looks like cleanup.
|
|
158
|
+
|
|
159
|
+
## Good examples
|
|
160
|
+
|
|
161
|
+
A maintainer edits `docs/aide-spec.md` to clarify how outcomes cascade
|
|
162
|
+
from parent to child specs. They commit. On the next release, every
|
|
163
|
+
host project that runs `aide_init` sees the updated text land inside
|
|
164
|
+
its own `.aide/aide-spec.md` — the host-side doc hub contains a
|
|
165
|
+
byte-faithful copy of the canonical doc, so the edit reaches every
|
|
166
|
+
host project on its next init with no duplication anywhere in between.
|
|
167
|
+
Every agent that connects to the MCP server also sees the updated tool
|
|
168
|
+
descriptions (in whichever tools the rule touched), because those
|
|
169
|
+
descriptions were composed from the same doc file at build time. One
|
|
170
|
+
edit in one file, full propagation, zero paraphrasing, and the stub
|
|
171
|
+
inside each host's config file keeps pointing at the same hub path it
|
|
172
|
+
always did.
|
|
173
|
+
|
|
174
|
+
An agent in a cold host project is told only "run aide_init." It does,
|
|
175
|
+
reads back a summary naming the pointer stub in the config file, the
|
|
176
|
+
installed host-side doc hub with every canonical methodology doc by
|
|
177
|
+
name, the pipeline slash commands, the MCP registration, and the
|
|
178
|
+
IDE configuration, and then starts the pipeline with `/aide:research`.
|
|
179
|
+
At no point in that sequence did a human tell the agent what AIDE is,
|
|
180
|
+
what a `.aide` file is, or how the phases fit together — every piece
|
|
181
|
+
came through the tooling.
|
|
182
|
+
|
|
183
|
+
An agent opens a host project to implement a new feature unrelated to
|
|
184
|
+
AIDE. Its first read is the host's config file, which contains a short
|
|
185
|
+
pointer stub saying AIDE exists, naming the doc-hub path, and telling
|
|
186
|
+
the agent to crawl the hub before writing or acting on any `.aide`
|
|
187
|
+
file. The agent notes this, skips the hub for now because the task
|
|
188
|
+
touches no specs, and proceeds with the feature work carrying only a
|
|
189
|
+
handful of lines of AIDE context. An hour later, the same agent picks
|
|
190
|
+
up a task that does touch a `.aide` file; it follows the stub's
|
|
191
|
+
pointer into the hub, reads the hub index, drills into `aide-spec.md`
|
|
192
|
+
and `aide-template.md`, and leaves the three canonical docs its task
|
|
193
|
+
does not need unread. The delivery layer practiced the same
|
|
194
|
+
progressive disclosure the methodology teaches — exactly the way the
|
|
195
|
+
user's global `study-playbook` skill crawls the brain on demand
|
|
196
|
+
instead of hoisting it into every session.
|
|
197
|
+
|
|
198
|
+
A contributor adds a new tool to the MCP server. They read `/.aide`,
|
|
199
|
+
narrow to `src/.aide`, narrow to their new submodule spec, and know
|
|
200
|
+
exactly which invariants their addition must honor: five-tool cap, client
|
|
201
|
+
parity, idempotency, progressive disclosure in the code, cascading intent
|
|
202
|
+
in the spec. Three reads, full contract, no source files opened.
|
|
203
|
+
|
|
204
|
+
## Bad examples
|
|
205
|
+
|
|
206
|
+
A doctrine change that lands as a one-liner in a host project's CLAUDE.md
|
|
207
|
+
after a maintainer "noticed something while using AIDE in production."
|
|
208
|
+
The host project is correct for a week. The canonical docs in this repo
|
|
209
|
+
still reflect the old rule. The next host project that runs aide_init
|
|
210
|
+
receives the old rule because aide_init reads from the canonical docs,
|
|
211
|
+
and the two projects now diverge invisibly. The fix is to land the
|
|
212
|
+
change in this repo first and let it flow outward, not to patch the edge
|
|
213
|
+
and forget to come back.
|
|
214
|
+
|
|
215
|
+
A `writeMethodology/` helper that builds its output by concatenating
|
|
216
|
+
hardcoded string literals instead of reading `docs/aide-spec.md`. The
|
|
217
|
+
canonical doc and the shipped methodology drift apart on the first edit
|
|
218
|
+
to either one, and a maintainer updating the doc has no way to know
|
|
219
|
+
their change did not ship. The repo has two sources of truth and
|
|
220
|
+
neither is marked authoritative.
|
|
221
|
+
|
|
222
|
+
An `aide_init` that skips the doc-hub step and dumps the full
|
|
223
|
+
concatenated methodology body inside the host's config file, the way
|
|
224
|
+
it used to before this architecture was locked in. The agent pays the
|
|
225
|
+
full doctrine cost on every read of the config file, the doctrine
|
|
226
|
+
crowds out the host's own content, and the methodology's own
|
|
227
|
+
progressive-disclosure rule is violated by the very tool whose job
|
|
228
|
+
is to install it. The refactor passed its tests and broke the
|
|
229
|
+
invariant it was supposed to enforce.
|
|
230
|
+
|
|
231
|
+
A pointer stub that names a host-side doc-hub path at `.aide/` while
|
|
232
|
+
the installer writes the hub into `aide/` (or any other mismatch of
|
|
233
|
+
the same shape). The agent reads the stub, follows the pointer, and
|
|
234
|
+
lands on a missing directory. The two sides were coincident string
|
|
235
|
+
literals instead of a single shared path source, and the refactor
|
|
236
|
+
shipped with its most load-bearing invariant broken at compile time.
|
|
237
|
+
|
|
238
|
+
A proposal for `aide_explain`, a sixth tool that "walks an agent through
|
|
239
|
+
the methodology interactively." The teaching surface now has three
|
|
240
|
+
channels — handshake, init, explain — and an agent calling explain is an
|
|
241
|
+
agent the tool descriptions failed to teach. The correct response is to
|
|
242
|
+
fix the tool descriptions, not to add a channel that papers over their
|
|
243
|
+
weakness.
|
|
244
|
+
|
|
245
|
+
A canonical doc that introduces a new pipeline phase — say, "review" —
|
|
246
|
+
without aide_init scaffolding an `/aide:review` slash command to match.
|
|
247
|
+
Agents read the methodology, look for the command, can't find it, and
|
|
248
|
+
conclude the system is incomplete. The doc was aspirational; the tooling
|
|
249
|
+
was real; they disagreed; the agent trusted the tooling and lost trust
|
|
250
|
+
in the doc.
|
|
251
|
+
|
|
252
|
+
A child `.aide` that opens with "this repo is the canonical home of
|
|
253
|
+
AIDE…" — a verbatim restatement of this spec's intent paragraph. The
|
|
254
|
+
child has earned nothing by copying; every token spent restating is a
|
|
255
|
+
token the child could have used to say what only it can say. Cascading
|
|
256
|
+
intent failed because the child didn't cascade.
|
package/.aide/plan.aide
ADDED
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
---
|
|
2
|
+
intent: >
|
|
3
|
+
Bring the aidemd-mcp codebase into alignment with the canonical docs updated
|
|
4
|
+
in c32e887: five file types (adding plan), seven phase commands (adding
|
|
5
|
+
synthesize) plus the /aide orchestrator, seven canonical docs plus index
|
|
6
|
+
(adding plan-aide.md and todo-aide.md), todo.aide redefined as a QA
|
|
7
|
+
re-alignment document, and discover tags including [plan].
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Plan
|
|
11
|
+
|
|
12
|
+
- [x] **Step 1 — src/types/index.ts line 2: expand AideFileType union.**
|
|
13
|
+
Change `"intent" | "research" | "todo"` to `"intent" | "research" | "todo" | "plan"`.
|
|
14
|
+
Update the JSDoc comment on line 1 from "The three spec types plus QA checklist"
|
|
15
|
+
to "The four spec types plus QA re-alignment document" (or equivalent wording
|
|
16
|
+
that reflects five file types total with plan included). No other changes in
|
|
17
|
+
this file.
|
|
18
|
+
|
|
19
|
+
- [x] **Step 2 — src/util/classify/index.ts line 12-17: add plan.aide classification branch.**
|
|
20
|
+
Add a branch `if (base === "plan.aide") return "plan";` before the final
|
|
21
|
+
`return "intent"` fallback. Update the JSDoc on the function (lines 7-11) to
|
|
22
|
+
list all five patterns: `.aide` or `intent.aide` -> "intent", `research.aide` ->
|
|
23
|
+
"research", `todo.aide` -> "todo", `plan.aide` -> "plan". Order the branches
|
|
24
|
+
so the specific named files are checked before the catch-all intent return:
|
|
25
|
+
research, todo, plan, then fallback to intent.
|
|
26
|
+
|
|
27
|
+
- [x] **Step 3 — src/tools/discover/buildTree/index.ts line 5: add plan to TYPE_ORDER.**
|
|
28
|
+
Change `{ intent: 0, research: 1, todo: 2 }` to
|
|
29
|
+
`{ intent: 0, research: 1, plan: 2, todo: 3 }`. Plan sorts after research
|
|
30
|
+
(it is the architect's artifact derived from the intent) and before todo
|
|
31
|
+
(which is the QA artifact). Update the JSDoc on line 4 to read:
|
|
32
|
+
"Sort priority for file types: intent first, then research, plan, then todo."
|
|
33
|
+
Also update the tree-rendering JSDoc on buildTree (line 34) to include `[plan]`
|
|
34
|
+
in the tag list: `[intent]`, `[research]`, `[plan]`, `[todo]`.
|
|
35
|
+
|
|
36
|
+
- [x] **Step 4 — src/tools/scaffold/index.ts: add plan type and template.**
|
|
37
|
+
4a. Line 8: change the Zod enum from `["intent", "research", "both", "todo"]` to
|
|
38
|
+
`["intent", "research", "both", "todo", "plan"]`. Update the `.describe()` text
|
|
39
|
+
to mention plan.
|
|
40
|
+
4b. Add a `PLAN_TEMPLATE` constant after the existing `TODO_TEMPLATE` (after
|
|
41
|
+
line 43). Content should match the plan.aide spec format from
|
|
42
|
+
`.aide/docs/plan-aide.md` — a minimal scaffold with frontmatter `intent` field
|
|
43
|
+
and `## Plan` / `## Decisions` body sections:
|
|
44
|
+
```
|
|
45
|
+
---
|
|
46
|
+
intent: >
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Plan
|
|
51
|
+
|
|
52
|
+
- [ ]
|
|
53
|
+
|
|
54
|
+
## Decisions
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
4c. Line 67: change the `type` parameter signature from
|
|
58
|
+
`"intent" | "research" | "both" | "todo"` to
|
|
59
|
+
`"intent" | "research" | "both" | "todo" | "plan"`.
|
|
60
|
+
4d. Add a `plan` branch in the `if/else` chain (after the `todo` branch,
|
|
61
|
+
before `intent`). It should mirror the todo branch exactly in structure:
|
|
62
|
+
create `plan.aide` in the target directory using `PLAN_TEMPLATE`, push
|
|
63
|
+
action "Created plan.aide". Plan is orthogonal to intent/research naming
|
|
64
|
+
— no rename logic needed.
|
|
65
|
+
4e. Update the function-level JSDoc (lines 56-63) to document the new
|
|
66
|
+
`type=plan` branch: "type=plan -> creates plan.aide".
|
|
67
|
+
|
|
68
|
+
- [x] **Step 5 — src/tools/init/initContent/index.ts: add plan-aide, todo-aide docs
|
|
69
|
+
and synthesize + aide orchestrator command entries.**
|
|
70
|
+
5a. DOC_PATHS (lines 34-47): add two methodology doc entries:
|
|
71
|
+
`"plan-aide": ".aide/docs/plan-aide.md"` and
|
|
72
|
+
`"todo-aide": ".aide/docs/todo-aide.md"`.
|
|
73
|
+
Add two command entries:
|
|
74
|
+
`"commands/aide/synthesize": ".claude/commands/aide/synthesize.md"` and
|
|
75
|
+
`"commands/aide/aide": ".claude/commands/aide.md"` (the orchestrator lives
|
|
76
|
+
at the commands root as `aide.md`, not inside the `aide/` subfolder — check
|
|
77
|
+
that the path `.claude/commands/aide.md` resolves correctly relative to
|
|
78
|
+
REPO_ROOT).
|
|
79
|
+
Note: the orchestrator canonical template is at `.claude/commands/aide.md`
|
|
80
|
+
which is a peer of the `aide/` folder, not inside it.
|
|
81
|
+
5b. METHODOLOGY_DOCS (lines 71-78): append two entries to the array:
|
|
82
|
+
`{ canonical: "plan-aide", hostFilename: "plan-aide.md" }` and
|
|
83
|
+
`{ canonical: "todo-aide", hostFilename: "todo-aide.md" }`.
|
|
84
|
+
These go after the existing `automated-qa` entry and before the closing
|
|
85
|
+
bracket. Keep insertion order matching the hub index reading order.
|
|
86
|
+
|
|
87
|
+
- [x] **Step 6 — src/tools/init/scaffoldCommands/index.ts: add synthesize command
|
|
88
|
+
and /aide orchestrator.**
|
|
89
|
+
6a. COMMANDS array (lines 30-37): add the synthesize phase command entry:
|
|
90
|
+
`{ canonical: "commands/aide/synthesize", hostPath: "aide/synthesize.md", displayName: "aide:synthesize" }`.
|
|
91
|
+
Insert it between the `spec` entry and the `plan` entry to match pipeline
|
|
92
|
+
order: research, spec, synthesize, plan, build, qa, fix.
|
|
93
|
+
6b. Add the `/aide` orchestrator command entry:
|
|
94
|
+
`{ canonical: "commands/aide/aide", hostPath: "aide.md", displayName: "aide" }`.
|
|
95
|
+
**Important**: the orchestrator's `hostPath` is `"aide.md"` (at the command
|
|
96
|
+
directory root), NOT `"aide/aide.md"` (inside the subfolder). It is a peer
|
|
97
|
+
of the `aide/` subfolder. Place it as the first entry in the COMMANDS array
|
|
98
|
+
so it is installed and reported before the seven phase commands.
|
|
99
|
+
6c. Update the JSDoc comment on lines 9-25: change "six AIDE pipeline slash
|
|
100
|
+
commands" to "seven AIDE pipeline phase commands plus the /aide orchestrator
|
|
101
|
+
entry point". Explain that the orchestrator is installed as `aide.md` at
|
|
102
|
+
the command directory root (a peer of `aide/`), while phase commands go
|
|
103
|
+
inside `aide/`. Update any references to "six" or "six-phase cap" to
|
|
104
|
+
reflect the new count.
|
|
105
|
+
|
|
106
|
+
- [x] **Step 7 — src/index.ts: update stale tool description strings.**
|
|
107
|
+
7a. `aide_discover` description (lines 34-35): where it lists file types,
|
|
108
|
+
add the plan.aide type. The current text lists four types (.aide, intent.aide,
|
|
109
|
+
research.aide, todo.aide). Add between research.aide and todo.aide:
|
|
110
|
+
`- plan.aide -- Architect's implementation plan. Checkboxed steps for the implementor.`
|
|
111
|
+
Also update the count text from "File types:" (which implies four) to
|
|
112
|
+
explicitly name all five. Update the description of todo.aide from
|
|
113
|
+
"QA checklist. Issues found by audit agents." to
|
|
114
|
+
"QA re-alignment document. Captures where implementation drifted from intent."
|
|
115
|
+
7b. `aide_read` description (line 50): change the parenthetical
|
|
116
|
+
`(intent/research/todo)` to `(intent/research/plan/todo)`.
|
|
117
|
+
7c. `aide_scaffold` description (lines 64-65): add `plan` to the Types list.
|
|
118
|
+
Add a line: `- plan -- Architect's implementation plan (no naming interaction
|
|
119
|
+
with intent/research)`. Also update the todo description from
|
|
120
|
+
"QA checklist for audit agents" to
|
|
121
|
+
"QA re-alignment document for QA agents".
|
|
122
|
+
Update the Zod enum in the inputSchema (line 75) from
|
|
123
|
+
`["intent", "research", "both", "todo"]` to
|
|
124
|
+
`["intent", "research", "both", "todo", "plan"]`.
|
|
125
|
+
7d. `aide_init` description (lines 98-99): update the text that says
|
|
126
|
+
"scaffolds slash commands for every pipeline phase (research, spec, plan,
|
|
127
|
+
build, QA, fix)" to include synthesize:
|
|
128
|
+
"scaffolds slash commands for every pipeline phase (research, spec,
|
|
129
|
+
synthesize, plan, build, QA, fix) plus the /aide orchestrator entry point".
|
|
130
|
+
Also ensure the methodology doc hub description mentions "seven canonical
|
|
131
|
+
methodology docs" (not five or six). Update "six pipeline slash commands"
|
|
132
|
+
references to "seven pipeline phase commands plus the /aide orchestrator".
|
|
133
|
+
|
|
134
|
+
## Decisions
|
|
135
|
+
|
|
136
|
+
**plan sorts between research and todo in TYPE_ORDER.** Plan is the architect's
|
|
137
|
+
artifact that follows research synthesis and precedes implementation + QA. This
|
|
138
|
+
matches the pipeline ordering: research -> synthesize -> plan -> build -> qa.
|
|
139
|
+
Todo is the QA output that comes last in the lifecycle.
|
|
140
|
+
|
|
141
|
+
**The orchestrator /aide is a COMMANDS entry, not a separate mechanism.** The
|
|
142
|
+
scaffoldCommands helper already handles idempotent command installation. The
|
|
143
|
+
orchestrator is just another command file with a different hostPath (command
|
|
144
|
+
directory root instead of aide/ subfolder). Adding it to the same COMMANDS array
|
|
145
|
+
avoids a second installation path and keeps reporting consistent.
|
|
146
|
+
|
|
147
|
+
**The orchestrator entry goes first in the COMMANDS array.** Pipeline reporting
|
|
148
|
+
order should show the entry point before the phases it routes to. This matches
|
|
149
|
+
the init spec's good-example output where `aide:` appears before `aide/research:`.
|
|
150
|
+
|
|
151
|
+
**PLAN_TEMPLATE follows the plan.aide spec format, not the intent template format.**
|
|
152
|
+
The plan.aide canonical spec defines frontmatter with `intent` only, plus
|
|
153
|
+
`## Plan` and `## Decisions` body sections. The scaffold template mirrors this
|
|
154
|
+
structure with empty placeholders, same as the TODO_TEMPLATE mirrors the todo
|
|
155
|
+
format.
|
|
156
|
+
|
|
157
|
+
**No changes to aide_validate or aide_read.** Both tools work off the
|
|
158
|
+
AideFileType union and classifyFile, which are being updated in steps 1-2.
|
|
159
|
+
They will automatically handle plan.aide files once the type system includes
|
|
160
|
+
"plan". No tool-specific changes needed.
|
|
161
|
+
|
|
162
|
+
**The "commands/aide/aide" canonical name uses `aide` as both namespace and
|
|
163
|
+
basename.** This looks redundant but is mechanically correct: the canonical
|
|
164
|
+
name prefix `commands/aide/` means "lives under .claude/commands/aide/" in
|
|
165
|
+
the repo, and `aide` is the bare filename. The hostPath `aide.md` (without
|
|
166
|
+
the `aide/` prefix) is what places it at the command directory root on the
|
|
167
|
+
host side. The asymmetry between canonical path and host path is intentional
|
|
168
|
+
— the canonical source lives inside the aide/ folder in the repo, but the
|
|
169
|
+
host install places it as a peer of that folder.
|
package/.aide/todo.aide
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
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.
|
|
10
|
+
misalignment:
|
|
11
|
+
- implementation-drift
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Issues
|
|
15
|
+
|
|
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`
|
|
39
|
+
|
|
40
|
+
## Retro
|
|
41
|
+
|
|
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.
|
|
43
|
+
|
|
44
|
+
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.
|