@aidemd-mcp/server 0.2.2 → 0.2.4

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.
@@ -0,0 +1,64 @@
1
+ ---
2
+ name: aide-spec-writer
3
+ description: "Use this agent when you need to write the .aide intent spec frontmatter from a user interview. This agent captures intent — scope, outcomes, failure modes — and produces the frontmatter contract that every downstream phase works from. It does NOT fill body sections, write code, or delegate to other agents.\n\nExamples:\n\n- Orchestrator delegates: \"Interview the user about the new scoring module and write the .aide frontmatter\"\n [Spec writer interviews, captures intent, writes frontmatter, presents for confirmation]\n\n- Orchestrator delegates: \"The user wants to add email templates. Capture the intent as a .aide spec\"\n [Spec writer asks about purpose, consumers, success/failure criteria, writes frontmatter]"
4
+ model: opus
5
+ color: purple
6
+ memory: user
7
+ ---
8
+
9
+ You are the intent capture specialist for the AIDE pipeline — the agent that distills the orchestrator's delegation context into the precise contract every downstream agent works from. You take the intent context the orchestrator gathered from the user and produce `.aide` frontmatter that is specific enough to be falsifiable and broad enough to survive implementation changes. Your output is the north star the architect plans against, the implementor builds toward, and the QA agent validates against.
10
+
11
+ ## Your Role
12
+
13
+ You receive a delegation from the orchestrator containing the intent context it gathered from its interview with the user. You distill that context into `.aide` frontmatter. You do NOT fill body sections (Context, Strategy, examples) — those come from the strategist after research.
14
+
15
+ **You do NOT delegate to other agents.** You write the frontmatter and return results to the caller.
16
+
17
+ ## Input Expectations
18
+
19
+ You will be given:
20
+ - A target module or directory where the `.aide` file should live
21
+ - Intent context gathered by the orchestrator from its conversation with the user: what the module is for, what success looks like, what failure looks like, and whether domain knowledge is available
22
+
23
+ The orchestrator owns the user conversation. Your job is to take the context it provides and structure it into falsifiable frontmatter. If the delegation context is insufficient to write specific outcomes, return to the orchestrator listing what's missing — it will gather more context from the user and re-delegate.
24
+
25
+ ## Writing Protocol
26
+
27
+ 1. Read the AIDE template from the methodology docs before writing — copy the fenced template block into the new file
28
+ 2. Decide the filename:
29
+ - Use `.aide` if no `research.aide` exists in the target folder
30
+ - Use `intent.aide` if `research.aide` exists (co-located research triggers the rename)
31
+ 3. Fill the frontmatter ONLY:
32
+ - `scope` — the module path this spec governs
33
+ - `intent` — one paragraph, plain language, ten-second north star
34
+ - `outcomes.desired` — concrete, falsifiable success criteria (2-5 bullets)
35
+ - `outcomes.undesired` — failure modes, especially the almost-right-but-wrong kind
36
+ 4. Leave body sections (`## Context`, `## Strategy`, `## Good examples`, `## Bad examples`) as empty placeholders
37
+ 5. No code in the spec — no file paths, no type signatures, no function names
38
+ 6. Every `outcomes` entry must trace back to the `intent` paragraph
39
+
40
+ ## Return Format
41
+
42
+ When you finish, return:
43
+ - **File created**: path to the `.aide` file
44
+ - **Frontmatter summary**: the scope, intent, and outcome count
45
+ - **Research needed**: yes/no — whether the domain requires research before synthesis
46
+ - **Recommended next step**: `/aide:research` or `/aide:synthesize`
47
+
48
+ Present the frontmatter to the user for confirmation before finalizing.
49
+
50
+ ## What You Do NOT Do
51
+
52
+ - You do not fill body sections (Context, Strategy, examples). That is the strategist's job after research.
53
+ - You do not write code, type signatures, or file paths in the spec.
54
+ - You do not make architectural decisions. You capture intent; the architect decides how.
55
+ - You do not expand scope. One spec, one scope.
56
+ - You do not interview the user. The orchestrator owns the user conversation and passes context to you via the delegation prompt.
57
+ - You do not delegate to other agents. You return results to the caller.
58
+
59
+ ## Update your agent memory
60
+
61
+ As you write specs, record useful patterns about:
62
+ - Intent phrasings that produced clear, falsifiable outcomes
63
+ - Common gaps in delegation context that required returning to the orchestrator
64
+ - Domain areas where research is typically needed vs already known
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: aide-strategist
3
+ description: "Use this agent when the .aide frontmatter is complete and the brain has research — this agent synthesizes that research into the spec's body sections (Context, Strategy, Good/Bad examples, References). It reads from the brain, not the web. It does NOT delegate to other agents.\n\nExamples:\n\n- Orchestrator delegates: \"Synthesize the research into the outreach module's .aide body sections\"\n [Strategist reads brain research, fills Context/Strategy/examples, presents for review]\n\n- Orchestrator delegates: \"The scoring spec frontmatter is done and brain has research — fill the body\"\n [Strategist reads spec frontmatter + brain research, writes body sections]"
4
+ model: opus
5
+ color: purple
6
+ memory: user
7
+ mcpServers:
8
+ - obsidian
9
+ ---
10
+
11
+ You are the strategist for the AIDE pipeline — the agent that bridges raw research and the intent spec's body sections. You read the brain's research notes, cross-reference them against the spec's frontmatter, and produce the Context, Strategy, examples, and References that give the architect everything needed to plan. You think in decisions, not descriptions — every paragraph you write names a choice and justifies it.
12
+
13
+ ## Your Role
14
+
15
+ You receive a delegation to fill the body sections of a `.aide` spec whose frontmatter is already complete. You read the brain's research, synthesize it, and write the body. This is a fresh session — you did not run the research phase and carry no prior context.
16
+
17
+ **You do NOT delegate to other agents.** You do your synthesis and return results to the caller.
18
+
19
+ ## Input Expectations
20
+
21
+ - The target `.aide` file must have complete frontmatter (scope, intent, outcomes.desired, outcomes.undesired)
22
+ - The brain must have research notes filed under the relevant domain
23
+ - If either is missing, stop and escalate
24
+
25
+ ## Synthesis Process
26
+
27
+ 1. **Read the frontmatter.** The intent paragraph and outcomes are your compass — every body section must serve them.
28
+
29
+ 2. **Search the brain.** Use `mcp__obsidian__search_notes` to find research notes filed under the relevant domain (e.g., `research/cold-email/`). Read all relevant notes. If no brain is available, check for a co-located `research.aide`.
30
+
31
+ 3. **Fill `## Context`.** Why this module exists, the domain-level problem, constraints that shape it. Write for a generalist engineer who does not know this domain. No code. Do not restate context carried by a parent `.aide`.
32
+
33
+ 4. **Fill `## Strategy`.** Distill research into decisions. Each paragraph names a concrete choice — a tactic, threshold, structural decision, sequencing rule — and the reasoning or data that justifies it. Cite sources inline, compressed. Write in decision form, not description form. No code.
34
+
35
+ 5. **Fill `## Good examples`.** Concrete domain output that illustrates success. Real output, not code. Pattern material for the QA agent.
36
+
37
+ 6. **Fill `## Bad examples`.** The almost-right failures. Output that looks valid but violates intent. Recognizable failure modes the QA agent should watch for.
38
+
39
+ 7. **Fill `## References`.** Log every brain note you actually used during steps 2–4. For each note, write one bullet: the note's path, then ` -- `, then a one-line description of what specific finding or data point you drew from it for the Strategy. Do not list notes you opened but did not use — a padded list destroys the signal between each reference and the decision it supports. Descriptions are breadcrumbs: name the source and the finding, not a summary of the note.
40
+
41
+ 8. **Verify traceability.** Every strategy decision must trace back to an `outcomes.desired` entry or guard against an `outcomes.undesired` entry. Cut anything that doesn't serve the intent.
42
+
43
+ ## Return Format
44
+
45
+ When you finish, return:
46
+ - **File modified**: path to the `.aide` file
47
+ - **Sections filled**: which body sections were written
48
+ - **Research sources used**: which brain notes informed the synthesis — this is the same data as the spec's `## References` section, surfaced here for the caller and in the spec for the reviewer
49
+ - **Traceability check**: confirm every strategy traces to an outcome
50
+ - **Recommended next step**: `/aide:plan` for the architect
51
+
52
+ Present the completed spec to the user for review before finalizing.
53
+
54
+ ## What You Do NOT Do
55
+
56
+ - You do not do external research. You read the brain. If the brain is insufficient, escalate back to `/aide:research`.
57
+ - You do not write code, file paths, type signatures, or function names in the spec.
58
+ - You do not make architectural decisions. You provide the what and why; the architect provides the how.
59
+ - You do not modify the frontmatter. That was locked in during the spec phase.
60
+ - You do not delegate to other agents. You return results to the caller.
61
+
62
+ ## Update your agent memory
63
+
64
+ As you synthesize research into specs, record useful context about:
65
+ - Synthesis patterns that produced clear, actionable strategy sections
66
+ - Domain areas where research was insufficient and needed more coverage
67
+ - Spec structures that worked well for specific types of modules
@@ -0,0 +1,229 @@
1
+ ---
2
+ scope: .claude/skills/brain
3
+ intent: >
4
+ The /brain skill gives agents in host projects a general-purpose interface
5
+ to the user's Obsidian vault. The skill prompt is deliberately minimal: it
6
+ tells the agent to use the Obsidian MCP and read the vault's own CLAUDE.md
7
+ for navigation instructions, then execute whatever the user asked. All
8
+ vault-specific structure — directory layout, hub locations, routing tables,
9
+ crawling rules — lives in the vault's CLAUDE.md (already provisioned by
10
+ provisionBrain), never in the skill prompt. This separation means every
11
+ user gets the same shipped skill while their vault teaches the agent their
12
+ specific organization.
13
+ outcomes:
14
+ desired:
15
+ - The skill prompt's only structural assumption is that the vault has a
16
+ CLAUDE.md at its root. It reads that file first, then follows whatever
17
+ navigation instructions the vault CLAUDE.md provides to fulfill the
18
+ user's request. No other vault paths, directory names, or hub locations
19
+ appear in the skill prompt.
20
+ - The skill works for any vault organization without modification. A user
21
+ who structures their vault differently from the AIDE defaults gets
22
+ correct agent behavior as long as their vault CLAUDE.md describes their
23
+ structure — the skill never contradicts or overrides vault-level
24
+ navigation instructions.
25
+ - The skill template ships through the existing initContent registry and
26
+ installSkills pipeline — registered in DOC_PATHS and SKILL_DOCS,
27
+ installed to the host's skill directory, subject to the same
28
+ idempotency and upgrade contracts as study-playbook.
29
+ - The skill prompt distinguishes itself from study-playbook by scope:
30
+ study-playbook is limited to the coding playbook hub, while /brain
31
+ is the general-purpose entry point for any vault query — research,
32
+ project context, environment, identity, references, or any other
33
+ vault content the user has organized.
34
+ undesired:
35
+ - A skill prompt that hardcodes vault navigation rules, directory
36
+ paths, hub locations, or routing tables. This creates two sources
37
+ of truth — the skill and the vault CLAUDE.md — and they drift apart
38
+ the moment the user reorganizes their vault. The vault CLAUDE.md
39
+ is the single source of truth for vault structure; the skill is a
40
+ thin dispatcher that defers to it.
41
+ - A skill prompt that duplicates the wikilink crawling protocol,
42
+ decision protocol, or "where to find things" table that already
43
+ lives in the vault CLAUDE.md. Restating these rules in the skill
44
+ means updating two files on every protocol change, and the copy
45
+ in the skill will be the one that goes stale first.
46
+ - A skill that assumes the Obsidian MCP server is named a specific
47
+ key or that vault content follows AIDE's default scaffold structure.
48
+ Users who provisioned their vault before AIDE or who customized
49
+ the scaffold must not get broken behavior from a skill that
50
+ expected the defaults.
51
+ - A skill prompt that blurs the boundary with study-playbook by
52
+ including coding-playbook-specific navigation logic. The two
53
+ skills have distinct scopes; /brain should not subsume or
54
+ duplicate study-playbook's domain.
55
+ ---
56
+
57
+ ## Context
58
+
59
+ The AIDE pipeline gives agents access to the user's Obsidian vault through
60
+ two complementary skills. The first — study-playbook — is a specialist: it
61
+ navigates the coding-playbook hub top-down to load conventions relevant to
62
+ a coding task. But agents also need to reach vault content that has nothing
63
+ to do with coding conventions — research notes, project context, environment
64
+ details, identity, references, kanban boards, session logs. Without a
65
+ general-purpose entry point, those agents either call the Obsidian MCP
66
+ tools with no guidance on how the vault is organized (producing random
67
+ searches that miss the structure) or the user manually teaches each agent
68
+ the vault layout in every session.
69
+
70
+ The vault CLAUDE.md — already provisioned by provisionBrain — solves this
71
+ by encoding the vault's navigation intelligence in one place: the crawling
72
+ protocol, the decision protocol, the where-to-find-things table. Any agent
73
+ that reads the vault CLAUDE.md before doing anything else gets the full
74
+ navigation playbook. The missing piece is a skill that tells agents to do
75
+ exactly that: read the vault CLAUDE.md first, then execute the user's
76
+ request using whatever navigation rules the vault provides.
77
+
78
+ The design constraint is separation of concerns. The vault CLAUDE.md is
79
+ the single source of truth for vault structure. The skill is a thin
80
+ dispatcher that defers to it. If the skill restates any navigation rules,
81
+ two sources of truth exist and the skill's copy will be the one that goes
82
+ stale first — because users customize their vault CLAUDE.md but never
83
+ modify shipped skills.
84
+
85
+ ## Strategy
86
+
87
+ **The skill prompt is a three-step dispatcher, not a navigation guide.**
88
+ The prompt tells the agent: (1) use the Obsidian MCP to read the vault's
89
+ root CLAUDE.md, (2) follow whatever navigation instructions that file
90
+ provides, (3) fulfill the user's request. No additional structure is
91
+ needed. This mirrors the study-playbook pattern — study-playbook says
92
+ "read the playbook hub, follow the structure top-down" without embedding
93
+ the hub's content. The /brain skill says "read the vault CLAUDE.md, follow
94
+ its rules" without embedding the vault's navigation tables. Both skills
95
+ are generic dispatchers; all domain-specific intelligence lives in the
96
+ vault itself. (Source: study-playbook SKILL.md pattern; provisionBrain
97
+ vault CLAUDE.md template.)
98
+
99
+ **No vault paths, directory names, or hub locations appear in the skill
100
+ prompt.** The only structural assumption is that the vault has a CLAUDE.md
101
+ at its root. provisionBrain already provisions this file with the crawling
102
+ protocol, decision protocol, and where-to-find-things table. The skill
103
+ trusts that content to be correct and complete — it never supplements,
104
+ overrides, or paraphrases it. This means a user who reorganizes their vault
105
+ updates their vault CLAUDE.md once and every agent session using /brain
106
+ immediately reflects the change, with zero modifications to the shipped
107
+ skill. (Source: provisionBrain spec, desired outcome on vault CLAUDE.md
108
+ scoped to navigation only.)
109
+
110
+ **The skill does not name the Obsidian MCP server key.** Different users
111
+ may have different MCP server names depending on when they provisioned or
112
+ whether they use a custom setup. The skill prompt refers to Obsidian MCP
113
+ capabilities generically — "use the Obsidian MCP" — without assuming the
114
+ server is registered under a specific key like "obsidian". The agent
115
+ discovers the available MCP tools from its tool list at session start.
116
+ (Source: undesired outcome on assuming specific MCP server key names.)
117
+
118
+ **Scope boundary with study-playbook is enforced by omission.** The skill
119
+ prompt contains no reference to the coding playbook, no mention of
120
+ hub-first navigation specific to playbook sections, and no task routing
121
+ logic. study-playbook owns the coding-playbook domain exclusively. /brain
122
+ is the catch-all for everything else in the vault. If a user asks a
123
+ /brain-invoked agent about coding conventions, the vault CLAUDE.md's
124
+ decision protocol will route it to the study-playbook skill — the /brain
125
+ skill does not need to handle that redirect itself because the vault
126
+ CLAUDE.md already does. (Source: scaffoldCommands spec on skill scope
127
+ separation; study-playbook SKILL.md scope restriction.)
128
+
129
+ **The skill template ships through the existing initContent and
130
+ installSkills pipeline.** It is registered in DOC_PATHS under a canonical
131
+ name and in SKILL_DOCS with a host path, then installed to the host's
132
+ skill directory by installSkills using the same idempotency contract as
133
+ study-playbook: existing files are left untouched and reported as
134
+ "exists", new files are created from the canonical template read through
135
+ initContent. Adding the /brain skill is a two-line registration in
136
+ initContent — one entry in DOC_PATHS, one entry in SKILL_DOCS — plus
137
+ the template file itself. No new installation machinery is needed.
138
+ (Source: initContent DOC_PATHS and SKILL_DOCS registries; installSkills
139
+ planner-only contract.)
140
+
141
+ **The skill template follows the SKILL.md format established by
142
+ study-playbook.** It has a frontmatter block with name and description,
143
+ a title heading, a brief purpose statement, and numbered steps. The
144
+ steps are deliberately fewer and simpler than study-playbook's because
145
+ the /brain skill delegates all navigation complexity to the vault
146
+ CLAUDE.md rather than encoding its own multi-step crawling protocol.
147
+ (Source: study-playbook SKILL.md structure.)
148
+
149
+ ## Good examples
150
+
151
+ A developer types `/brain` and asks "what research do we have on cold
152
+ email deliverability?" The agent reads the vault's root CLAUDE.md, finds
153
+ the where-to-find-things table pointing research to the `research/`
154
+ directory, uses `search_notes` scoped to `research/` with the query
155
+ "cold email deliverability", reads the matching notes, and returns a
156
+ synthesis. The skill prompt contributed exactly three instructions — read
157
+ the vault CLAUDE.md, follow its rules, do what the user asked. Everything
158
+ else came from the vault itself.
159
+
160
+ A user has reorganized their vault so research lives under `domains/`
161
+ instead of `research/`. They updated their vault CLAUDE.md's
162
+ where-to-find-things table accordingly. The next time an agent uses
163
+ /brain to look up research, it reads the updated table and searches
164
+ `domains/` correctly. The shipped skill template was never modified.
165
+
166
+ The skill prompt reads:
167
+
168
+ > Read the vault's root CLAUDE.md using the Obsidian MCP. Follow the
169
+ > navigation instructions it provides — crawling protocol, decision
170
+ > protocol, lookup tables — to find and read the vault content relevant
171
+ > to the user's request. Return what you found.
172
+
173
+ No vault paths. No directory names. No crawling rules. No routing tables.
174
+ Three sentences, full generality.
175
+
176
+ A host project runs `aide_init` for the first time. The init summary
177
+ shows `skills/brain/SKILL.md: created` alongside
178
+ `skills/study-playbook/SKILL.md: exists`. The brain skill installed
179
+ through the same pipeline as study-playbook with no special handling.
180
+
181
+ ## Bad examples
182
+
183
+ A skill prompt that says "Read `research/` for research notes, read
184
+ `projects/` for project context, read `kanban/board.md` for tasks."
185
+ This duplicates the where-to-find-things table from the vault CLAUDE.md.
186
+ The moment the user renames `kanban/` to `tasks/` and updates their
187
+ vault CLAUDE.md, the skill prompt contradicts it — and the agent sees
188
+ two conflicting sets of instructions in the same session.
189
+
190
+ A skill prompt that includes the wikilink crawling protocol: "Hub notes
191
+ are navigation, not content. Depth starts at content notes. Follow links
192
+ 1-2 levels deep." This is a verbatim copy of rules already in the vault
193
+ CLAUDE.md. When provisionBrain updates the crawling protocol (for
194
+ instance, changing the depth recommendation from 1-2 to 2-3), the skill
195
+ still says 1-2. Two copies, one stale.
196
+
197
+ A skill prompt that says "Use `mcp__obsidian__read_note` to read the
198
+ vault CLAUDE.md." This hardcodes the MCP tool name, which assumes the
199
+ Obsidian server is registered as "obsidian" in the host's MCP config.
200
+ A user who registered it under a different key gets a broken tool
201
+ reference. The skill should refer to the Obsidian MCP generically and
202
+ let the agent discover the tool names from its available tool list.
203
+
204
+ A skill prompt that includes "For coding conventions, use the
205
+ study-playbook skill instead." This is coding-playbook-specific routing
206
+ logic that belongs in the vault CLAUDE.md's decision protocol, not in
207
+ the /brain skill. The skill should have no awareness of study-playbook's
208
+ existence or domain — the vault CLAUDE.md handles the routing.
209
+
210
+ A skill prompt that is 80 lines long with detailed step-by-step
211
+ instructions for navigating different vault areas. This defeats the
212
+ thin-dispatcher pattern. The study-playbook skill is longer because it
213
+ encodes a generic crawling protocol the playbook hub does not carry.
214
+ The /brain skill should be shorter because the vault CLAUDE.md already
215
+ carries all the navigation intelligence — the skill just points to it.
216
+
217
+ ## References
218
+
219
+ All domain knowledge for this spec was sourced from codebase files, not
220
+ from external brain notes. The sources that informed strategy decisions:
221
+
222
+ - `.claude/skills/study-playbook/SKILL.md` -- The thin-dispatcher pattern: a skill that says "read the hub, follow its structure" without embedding domain-specific content, establishing the template /brain follows.
223
+ - `src/tools/init/provisionBrain/.aide` -- The vault CLAUDE.md template content and scoping rules (navigation only, no project instructions), confirming what the /brain skill can assume exists at the vault root.
224
+ - `src/tools/init/provisionBrain/index.ts` -- The exact VAULT_CLAUDE_MD_TEMPLATE text provisioned into the vault, confirming it contains the crawling protocol, decision protocol, and where-to-find-things table the /brain skill defers to.
225
+ - `src/tools/init/initContent/index.ts` -- The DOC_PATHS and SKILL_DOCS registries showing how study-playbook is registered, establishing the pattern for registering /brain as a second skill.
226
+ - `src/tools/init/initContent/.aide` -- The single-reader invariant and enumeration rules confirming skill templates ship through initContent, not through direct filesystem reads.
227
+ - `src/tools/init/scaffoldCommands/.aide` -- The study-playbook scope boundary: the skill is a generic crawling protocol with no environment-specific content, confirming /brain must maintain the same separation.
228
+ - `.aide/intent.aide` -- The root spec's two-delivery-channel rule and progressive-disclosure-at-the-delivery-layer principle, confirming skills must be thin pointers to deep content, not content carriers themselves.
229
+
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: brain
3
+ description: >
4
+ General-purpose interface to the user's Obsidian vault. Reads the vault's
5
+ root CLAUDE.md and follows its navigation instructions to find and return
6
+ vault content relevant to the user's request — research, project context,
7
+ environment, identity, references, or any other vault content. Use this
8
+ skill for any vault query that is not specifically about coding conventions.
9
+ ---
10
+
11
+ # /brain — Access Vault Knowledge
12
+
13
+ Read the user's Obsidian vault and return the content relevant to their request.
14
+
15
+ ---
16
+
17
+ ## Step 1: Read the Vault CLAUDE.md
18
+
19
+ Use the Obsidian MCP to read the vault's root CLAUDE.md.
20
+
21
+ This file contains all navigation intelligence for the vault — crawling
22
+ protocol, decision protocol, and a table of where to find different types
23
+ of content. Read it before doing anything else.
24
+
25
+ ---
26
+
27
+ ## Step 2: Follow the Navigation Instructions
28
+
29
+ Execute the navigation steps the vault CLAUDE.md provides to find the content
30
+ relevant to the user's request. Do not supplement, override, or paraphrase
31
+ the vault's navigation rules — defer to them entirely.
32
+
33
+ ---
34
+
35
+ ## Step 3: Fulfill the User's Request
36
+
37
+ Return what you found from the vault, synthesized in response to what the
38
+ user asked.
39
+
40
+ ---
41
+
42
+ ## Navigation Rules
43
+
44
+ - **Read the vault CLAUDE.md first.** Do not search, list directories, or
45
+ read any other file before reading the vault's root CLAUDE.md.
46
+ - **Defer to the vault CLAUDE.md's navigation rules.** Do not supplement,
47
+ override, or paraphrase them. The vault CLAUDE.md is the single source
48
+ of truth for how this vault is organized.
@@ -0,0 +1,115 @@
1
+ ---
2
+ intent: >
3
+ Ship the /brain skill — a thin-dispatcher SKILL.md template that tells
4
+ agents to read the vault's root CLAUDE.md via the Obsidian MCP and follow
5
+ its navigation instructions — through the existing initContent/installSkills
6
+ pipeline, with the doc hub updated to reflect the new skill count.
7
+ ---
8
+
9
+ ## Plan
10
+
11
+ ### 1. Create the canonical SKILL.md template
12
+
13
+ - [x] Create `.claude/skills/brain/SKILL.md` following the same structural
14
+ pattern as `.claude/skills/study-playbook/SKILL.md`: YAML frontmatter with
15
+ `name` and `description`, a title heading, a brief purpose statement, and
16
+ numbered steps.
17
+ - [x] The frontmatter `name` field is `brain`. The `description` field is a
18
+ one-line summary scoped to general-purpose vault access — contrast with
19
+ study-playbook's coding-playbook-only scope.
20
+ - [x] The prompt body is a three-step dispatcher (per the spec's Strategy
21
+ section): (1) use the Obsidian MCP to read the vault's root CLAUDE.md,
22
+ (2) follow whatever navigation instructions that file provides, (3) fulfill
23
+ the user's request. No additional structure beyond these three steps.
24
+ - [x] The prompt must NOT contain: vault directory paths, hub locations,
25
+ routing tables, the wikilink crawling protocol, MCP tool names (like
26
+ `mcp__obsidian__read_note`), references to study-playbook, or
27
+ coding-playbook-specific navigation logic. Refer to the Obsidian MCP
28
+ generically — "use the Obsidian MCP" — so the agent discovers tool names
29
+ from its available tool list.
30
+ - [x] The only structural assumption is that the vault has a CLAUDE.md at its
31
+ root. The spec's good-example prompt is the reference:
32
+ "Read the vault's root CLAUDE.md using the Obsidian MCP. Follow the
33
+ navigation instructions it provides — crawling protocol, decision protocol,
34
+ lookup tables — to find and read the vault content relevant to the user's
35
+ request. Return what you found."
36
+ - [x] Add a Navigation Rules section (like study-playbook has) with just two
37
+ rules: (a) read the vault CLAUDE.md first, before doing anything else, and
38
+ (b) defer to whatever navigation rules the CLAUDE.md provides — do not
39
+ supplement, override, or paraphrase them.
40
+ - [x] The total prompt should be significantly shorter than study-playbook's
41
+ (~80 lines). Target under 40 lines. The vault CLAUDE.md carries all
42
+ navigation intelligence; the skill is a thin pointer.
43
+
44
+ ### 2. Register the skill in initContent and verify the pipeline
45
+
46
+ - [x] 2a. In `src/tools/init/initContent/index.ts`, add `"skills/brain"` to
47
+ the `DOC_PATHS` registry, mapping to `".claude/skills/brain/SKILL.md"`.
48
+ Place it after the existing `"skills/study-playbook"` entry.
49
+ - [x] 2b. In the same file, add a second entry to the `SKILL_DOCS` array:
50
+ `{ canonical: "skills/brain", hostPath: "brain/SKILL.md" }`. Place it after
51
+ the study-playbook entry.
52
+ - [x] 2c. Run `rtk vitest run src/tools/init/initContent/index.test.ts` to
53
+ confirm the existing tests still pass — the new registry entry should not
54
+ break anything since it just adds a new key that resolves to a real file.
55
+ - [x] 2d. Run `rtk vitest run src/tools/upgrade/index.test.ts` to confirm the
56
+ upgrade pipeline's skill iteration still works. The `listSkills` mock in
57
+ those tests returns an empty array, so the new entry should not affect them.
58
+
59
+ ### 3. Update the doc hub skill count
60
+
61
+ - [x] In `.aide/docs/index.md`, update the Skills section to reflect two
62
+ shipped skills instead of one. Add a row for `brain` to the skill table
63
+ with purpose: "General-purpose vault access — read the vault CLAUDE.md,
64
+ follow its navigation rules, fulfill the user's request".
65
+ - [x] Update the prose line above the table from "one canonical skill" to
66
+ "two canonical skills".
67
+
68
+ ### 4. Add a regression test for the new skill's canonical content
69
+
70
+ - [x] In `src/tools/init/initContent/index.test.ts`, add a test that calls
71
+ `readCanonicalDoc("skills/brain")` and asserts the result equals the bytes
72
+ read directly from `.claude/skills/brain/SKILL.md` via `readFileSync`. This
73
+ follows the exact pattern of the existing `"returns disk bytes verbatim for
74
+ aide-spec"` test.
75
+ - [x] Run `rtk vitest run src/tools/init/initContent/index.test.ts` to confirm
76
+ the new test passes.
77
+
78
+ ### 5. Verify end-to-end installation and build
79
+
80
+ - [x] Run `rtk tsc` to confirm the TypeScript build passes with the new
81
+ registry entries.
82
+ - [x] Run `rtk vitest run` to confirm all tests pass project-wide.
83
+
84
+ ## Decisions
85
+
86
+ **Thin dispatcher over navigation guide.** The spec is explicit: the skill
87
+ prompt is three sentences, not eighty lines. The vault CLAUDE.md (provisioned
88
+ by provisionBrain) already carries the crawling protocol, decision protocol,
89
+ and where-to-find-things table. Duplicating any of that in the skill creates
90
+ two sources of truth that drift. The skill's entire job is "read CLAUDE.md,
91
+ do what it says."
92
+
93
+ **Generic MCP reference over hardcoded tool names.** The spec's undesired
94
+ outcomes explicitly forbid naming `mcp__obsidian__read_note` or assuming a
95
+ specific server key. The prompt says "use the Obsidian MCP" and the agent
96
+ discovers the actual tool names from its tool list at session start. This
97
+ accommodates users who registered the MCP under a non-default key.
98
+
99
+ **No scope boundary enforcement in the skill.** The spec says the scope
100
+ boundary with study-playbook is "enforced by omission" — the /brain skill
101
+ contains no reference to the coding playbook or study-playbook. If a user
102
+ asks /brain about coding conventions, the vault CLAUDE.md's decision protocol
103
+ handles the routing. The skill does not need redirect logic.
104
+
105
+ **Two-line registration, no new machinery.** The initContent registry
106
+ (DOC_PATHS + SKILL_DOCS) and installSkills planner already handle N skills.
107
+ Adding /brain is one DOC_PATHS entry and one SKILL_DOCS entry. installSkills
108
+ iterates `listSkills()` and handles the new entry identically to
109
+ study-playbook. The upgrade pipeline also iterates `listSkills()` and picks
110
+ up the new entry automatically. No new installation code is needed.
111
+
112
+ **Doc hub update for accuracy.** The doc hub at `.aide/docs/index.md` states
113
+ "one canonical skill". This becomes stale the moment /brain ships. Updating
114
+ the count and adding a table row is a documentation-accuracy fix, not scope
115
+ creep — the hub is the entry point agents read to understand what AIDE ships.
@@ -0,0 +1,79 @@
1
+ ---
2
+ name: study-playbook
3
+ description: >
4
+ Load relevant coding-playbook sections from the Obsidian vault for the current task.
5
+ Navigates the playbook hub top-down: reads the index, identifies which sections apply,
6
+ drills into section hubs, then reads the specific child notes needed. Use this skill
7
+ whenever you need to look up coding conventions, patterns, or architecture decisions
8
+ before writing or reviewing code. Do NOT trigger for non-coding vault work.
9
+ ---
10
+
11
+ # /study-playbook — Load Coding Playbook Context
12
+
13
+ Navigate the coding playbook hub and load only the sections relevant to the current task.
14
+
15
+ ---
16
+
17
+ ## Step 1: Read the Playbook Hub
18
+
19
+ Read `coding-playbook/coding-playbook.md` via `mcp__obsidian__read_note`.
20
+
21
+ The hub lists sections with descriptions. Match your current task domain against
22
+ those descriptions to identify which sections apply. Do NOT read all sections —
23
+ only the ones whose descriptions overlap with the work at hand.
24
+
25
+ ---
26
+
27
+ ## Step 2: Read the Relevant Section Hubs
28
+
29
+ For each matching section, read its hub note (e.g. `<section>/<section>.md`).
30
+
31
+ Section hubs list their child notes with keywords. Scan the list and identify which
32
+ specific child notes overlap with the task. Do NOT read every child — only the ones
33
+ whose keywords match the work.
34
+
35
+ ---
36
+
37
+ ## Step 3: Read the Specific Child Notes
38
+
39
+ Read the child notes identified in Step 2 (e.g. `<section>/<child-note>.md`).
40
+ These contain the concrete patterns and code examples to follow.
41
+
42
+ ---
43
+
44
+ ## Navigation Rules
45
+
46
+ - **Use the hub's link structure, not search.** Do NOT use `mcp__obsidian__search_notes`
47
+ to find playbook content. Searching produces fragments without context; the hub
48
+ structure gives you the full picture.
49
+ - **Read top-down.** Hub → section hub → child note. Never skip levels.
50
+ - **Follow wikilinks 1–2 levels deep from content notes.** Hub notes (tagged `hub` or
51
+ acting as section indexes) are navigation — they don't count as depth. Depth starts
52
+ at the first content note you land on. Example:
53
+ - `coding-playbook.md` (root hub) → depth 0 (navigation)
54
+ - `foundations/foundations.md` (section hub) → depth 0 (navigation)
55
+ - `foundations/conventions.md` (content note) → depth 0 (first real content)
56
+ - wikilink from `conventions.md` → depth 1
57
+ - wikilink from *that* note → depth 2
58
+
59
+ When reading any content note, look for `[[wikilinks]]`. If a linked note looks
60
+ relevant to the task, read it — then check *that* note's links too. Go at least
61
+ 1–2 levels deep from the first content note in any direction where the information
62
+ could apply. Playbook notes cross-reference each other (e.g. a services note may
63
+ link to error-handling patterns, which links to API response conventions). Following
64
+ these links is how you build the full picture, not just a fragment.
65
+ - **Never re-read notes.** Before reading any note, check whether it already appears
66
+ in your conversation context from a prior tool call. This skill may be invoked
67
+ multiple times in a single workflow — do NOT re-read the playbook hub, section hubs,
68
+ or child notes you have already loaded. The same applies when following wikilinks:
69
+ skip any link whose target you have already read in this session.
70
+ - **Invoke incrementally, not all at once.** Multi-step work (e.g. planning an
71
+ end-to-end feature) crosses multiple domains — types, then services, then API, then
72
+ client. Do NOT try to load every section upfront. Load what you need for the current
73
+ step. When you move to the next step and realize you're in a new domain without the
74
+ relevant playbook context, invoke this skill again. The "never re-read" rule keeps
75
+ repeated invocations cheap — you'll skip the hub and any notes already loaded, and
76
+ only read the new sections you actually need.
77
+ - **Stop when you have enough.** Within a single invocation, if the step only touches
78
+ one domain (e.g. just API routes), you only need that one section's notes plus
79
+ whatever they link to. Don't load unrelated sections "just in case."