@soleri/forge 5.4.0 → 5.5.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/dist/scaffolder.js +16 -1
- package/dist/scaffolder.js.map +1 -1
- package/dist/skills/brain-debrief.md +186 -0
- package/dist/skills/brainstorming.md +170 -0
- package/dist/skills/code-patrol.md +176 -0
- package/dist/skills/context-resume.md +143 -0
- package/dist/skills/executing-plans.md +201 -0
- package/dist/skills/fix-and-learn.md +164 -0
- package/dist/skills/health-check.md +225 -0
- package/dist/skills/knowledge-harvest.md +178 -0
- package/dist/skills/onboard-me.md +197 -0
- package/dist/skills/retrospective.md +189 -0
- package/dist/skills/second-opinion.md +142 -0
- package/dist/skills/systematic-debugging.md +230 -0
- package/dist/skills/test-driven-development.md +266 -0
- package/dist/skills/vault-capture.md +154 -0
- package/dist/skills/vault-navigator.md +129 -0
- package/dist/skills/verification-before-completion.md +170 -0
- package/dist/skills/writing-plans.md +207 -0
- package/dist/templates/readme.js +38 -0
- package/dist/templates/readme.js.map +1 -1
- package/dist/templates/setup-script.js +26 -0
- package/dist/templates/setup-script.js.map +1 -1
- package/dist/templates/skills.d.ts +16 -0
- package/dist/templates/skills.js +73 -0
- package/dist/templates/skills.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/scaffolder.test.ts +113 -0
- package/src/scaffolder.ts +18 -1
- package/src/skills/brain-debrief.md +186 -0
- package/src/skills/brainstorming.md +170 -0
- package/src/skills/code-patrol.md +176 -0
- package/src/skills/context-resume.md +143 -0
- package/src/skills/executing-plans.md +201 -0
- package/src/skills/fix-and-learn.md +164 -0
- package/src/skills/health-check.md +225 -0
- package/src/skills/knowledge-harvest.md +178 -0
- package/src/skills/onboard-me.md +197 -0
- package/src/skills/retrospective.md +189 -0
- package/src/skills/second-opinion.md +142 -0
- package/src/skills/systematic-debugging.md +230 -0
- package/src/skills/test-driven-development.md +266 -0
- package/src/skills/vault-capture.md +154 -0
- package/src/skills/vault-navigator.md +129 -0
- package/src/skills/verification-before-completion.md +170 -0
- package/src/skills/writing-plans.md +207 -0
- package/src/templates/readme.ts +38 -0
- package/src/templates/setup-script.ts +26 -0
- package/src/templates/skills.ts +82 -0
|
@@ -248,6 +248,119 @@ describe('Scaffolder', () => {
|
|
|
248
248
|
});
|
|
249
249
|
});
|
|
250
250
|
|
|
251
|
+
describe('skills', () => {
|
|
252
|
+
it('should create skills directory with 10 SKILL.md files', () => {
|
|
253
|
+
scaffold(testConfig);
|
|
254
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
255
|
+
|
|
256
|
+
expect(existsSync(skillsDir)).toBe(true);
|
|
257
|
+
|
|
258
|
+
const skillDirs = readdirSync(skillsDir, { withFileTypes: true })
|
|
259
|
+
.filter((e) => e.isDirectory())
|
|
260
|
+
.map((e) => e.name);
|
|
261
|
+
|
|
262
|
+
expect(skillDirs).toHaveLength(17);
|
|
263
|
+
|
|
264
|
+
// Verify each skill dir has a SKILL.md
|
|
265
|
+
for (const dir of skillDirs) {
|
|
266
|
+
expect(existsSync(join(skillsDir, dir, 'SKILL.md'))).toBe(true);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
it('should include all expected skill names', () => {
|
|
271
|
+
scaffold(testConfig);
|
|
272
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
273
|
+
const skillDirs = readdirSync(skillsDir).sort();
|
|
274
|
+
|
|
275
|
+
expect(skillDirs).toEqual([
|
|
276
|
+
'brain-debrief',
|
|
277
|
+
'brainstorming',
|
|
278
|
+
'code-patrol',
|
|
279
|
+
'context-resume',
|
|
280
|
+
'executing-plans',
|
|
281
|
+
'fix-and-learn',
|
|
282
|
+
'health-check',
|
|
283
|
+
'knowledge-harvest',
|
|
284
|
+
'onboard-me',
|
|
285
|
+
'retrospective',
|
|
286
|
+
'second-opinion',
|
|
287
|
+
'systematic-debugging',
|
|
288
|
+
'test-driven-development',
|
|
289
|
+
'vault-capture',
|
|
290
|
+
'vault-navigator',
|
|
291
|
+
'verification-before-completion',
|
|
292
|
+
'writing-plans',
|
|
293
|
+
]);
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
it('should have YAML frontmatter in all skills', () => {
|
|
297
|
+
scaffold(testConfig);
|
|
298
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
299
|
+
const skillDirs = readdirSync(skillsDir);
|
|
300
|
+
|
|
301
|
+
for (const dir of skillDirs) {
|
|
302
|
+
const content = readFileSync(join(skillsDir, dir, 'SKILL.md'), 'utf-8');
|
|
303
|
+
expect(content).toMatch(/^---\nname: /);
|
|
304
|
+
expect(content).toContain('description:');
|
|
305
|
+
}
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
it('should substitute YOUR_AGENT_core with agent ID in all skills', () => {
|
|
309
|
+
scaffold(testConfig);
|
|
310
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
311
|
+
const allSkills = readdirSync(skillsDir);
|
|
312
|
+
|
|
313
|
+
for (const name of allSkills) {
|
|
314
|
+
const content = readFileSync(join(skillsDir, name, 'SKILL.md'), 'utf-8');
|
|
315
|
+
expect(content).not.toContain('YOUR_AGENT_core');
|
|
316
|
+
// All skills that reference agent ops should have atlas_core
|
|
317
|
+
if (content.includes('_core')) {
|
|
318
|
+
expect(content).toContain('atlas_core');
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
});
|
|
322
|
+
|
|
323
|
+
it('should include MIT attribution in superpowers-adapted skills', () => {
|
|
324
|
+
scaffold(testConfig);
|
|
325
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
326
|
+
const superpowersSkills = [
|
|
327
|
+
'test-driven-development',
|
|
328
|
+
'systematic-debugging',
|
|
329
|
+
'verification-before-completion',
|
|
330
|
+
'brainstorming',
|
|
331
|
+
'writing-plans',
|
|
332
|
+
'executing-plans',
|
|
333
|
+
];
|
|
334
|
+
|
|
335
|
+
for (const name of superpowersSkills) {
|
|
336
|
+
const content = readFileSync(join(skillsDir, name, 'SKILL.md'), 'utf-8');
|
|
337
|
+
expect(content).toContain('MIT License');
|
|
338
|
+
}
|
|
339
|
+
});
|
|
340
|
+
|
|
341
|
+
it('should have no YOUR_AGENT_core placeholder remaining in any skill', () => {
|
|
342
|
+
scaffold(testConfig);
|
|
343
|
+
const skillsDir = join(tempDir, 'atlas', 'skills');
|
|
344
|
+
const allSkills = readdirSync(skillsDir);
|
|
345
|
+
|
|
346
|
+
for (const name of allSkills) {
|
|
347
|
+
const content = readFileSync(join(skillsDir, name, 'SKILL.md'), 'utf-8');
|
|
348
|
+
expect(content).not.toContain('YOUR_AGENT_core');
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
it('should include skills in preview', () => {
|
|
353
|
+
const preview = previewScaffold(testConfig);
|
|
354
|
+
const paths = preview.files.map((f) => f.path);
|
|
355
|
+
expect(paths).toContain('skills/');
|
|
356
|
+
});
|
|
357
|
+
|
|
358
|
+
it('should mention skills in scaffold summary', () => {
|
|
359
|
+
const result = scaffold(testConfig);
|
|
360
|
+
expect(result.summary).toContain('built-in skills');
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
|
|
251
364
|
describe('listAgents', () => {
|
|
252
365
|
it('should list scaffolded agents', () => {
|
|
253
366
|
scaffold(testConfig);
|
package/src/scaffolder.ts
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
readdirSync,
|
|
7
7
|
readFileSync,
|
|
8
8
|
} from 'node:fs';
|
|
9
|
-
import { join } from 'node:path';
|
|
9
|
+
import { join, dirname } from 'node:path';
|
|
10
10
|
import { homedir } from 'node:os';
|
|
11
11
|
import type { AgentConfig, ScaffoldResult, ScaffoldPreview, AgentInfo } from './types.js';
|
|
12
12
|
|
|
@@ -21,6 +21,7 @@ import { generateInjectClaudeMd } from './templates/inject-claude-md.js';
|
|
|
21
21
|
import { generateActivate } from './templates/activate.js';
|
|
22
22
|
import { generateReadme } from './templates/readme.js';
|
|
23
23
|
import { generateSetupScript } from './templates/setup-script.js';
|
|
24
|
+
import { generateSkills } from './templates/skills.js';
|
|
24
25
|
|
|
25
26
|
/**
|
|
26
27
|
* Preview what scaffold will create without writing anything.
|
|
@@ -75,6 +76,11 @@ export function previewScaffold(config: AgentConfig): ScaffoldPreview {
|
|
|
75
76
|
path: 'scripts/setup.sh',
|
|
76
77
|
description: 'Automated setup — Node.js check, build, Claude Code MCP registration',
|
|
77
78
|
},
|
|
79
|
+
{
|
|
80
|
+
path: 'skills/',
|
|
81
|
+
description:
|
|
82
|
+
'17 built-in skills — TDD, debugging, planning, vault, brain, code patrol, retrospective, onboarding',
|
|
83
|
+
},
|
|
78
84
|
];
|
|
79
85
|
|
|
80
86
|
if (config.hookPacks?.length) {
|
|
@@ -295,6 +301,7 @@ export function scaffold(config: AgentConfig): ScaffoldResult {
|
|
|
295
301
|
const dirs = [
|
|
296
302
|
'',
|
|
297
303
|
'scripts',
|
|
304
|
+
'skills',
|
|
298
305
|
'src',
|
|
299
306
|
'src/intelligence',
|
|
300
307
|
'src/intelligence/data',
|
|
@@ -358,6 +365,15 @@ export function scaffold(config: AgentConfig): ScaffoldResult {
|
|
|
358
365
|
filesCreated.push(path);
|
|
359
366
|
}
|
|
360
367
|
|
|
368
|
+
// Generate skill files
|
|
369
|
+
const skillFiles = generateSkills(config);
|
|
370
|
+
for (const [path, content] of skillFiles) {
|
|
371
|
+
const skillDir = join(agentDir, dirname(path));
|
|
372
|
+
mkdirSync(skillDir, { recursive: true });
|
|
373
|
+
writeFileSync(join(agentDir, path), content, 'utf-8');
|
|
374
|
+
filesCreated.push(path);
|
|
375
|
+
}
|
|
376
|
+
|
|
361
377
|
const totalOps = config.domains.length * 5 + 61; // 5 per domain + 56 core (from createCoreOps) + 5 agent-specific
|
|
362
378
|
|
|
363
379
|
// Register the agent as an MCP server in ~/.claude.json
|
|
@@ -370,6 +386,7 @@ export function scaffold(config: AgentConfig): ScaffoldResult {
|
|
|
370
386
|
`Intelligence layer (Brain) — TF-IDF scoring, auto-tagging, duplicate detection`,
|
|
371
387
|
`Activation system included — say "Hello, ${config.name}!" to activate`,
|
|
372
388
|
`1 test suite — facades (vault, brain, planner, llm tests provided by @soleri/core)`,
|
|
389
|
+
`${skillFiles.length} built-in skills (TDD, debugging, planning, vault, brain debrief)`,
|
|
373
390
|
];
|
|
374
391
|
|
|
375
392
|
if (config.hookPacks?.length) {
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brain-debrief
|
|
3
|
+
description: Use when the user asks "what have I learned", "brain stats", "pattern strengths", "cross-project insights", "intelligence report", "show me patterns", "what's working", "learning summary", or wants to explore accumulated knowledge and see what the brain has learned.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Brain Debrief — Intelligence Report
|
|
7
|
+
|
|
8
|
+
Surface what the brain has learned across sessions and projects. This turns raw vault data into actionable intelligence.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
When the user wants to understand what patterns have proven valuable, what anti-patterns keep recurring, how knowledge is distributed across projects, or wants a "state of intelligence" report.
|
|
13
|
+
|
|
14
|
+
## Orchestration by Query Type
|
|
15
|
+
|
|
16
|
+
### "What have I learned?" (General debrief)
|
|
17
|
+
|
|
18
|
+
1. Get the big picture:
|
|
19
|
+
```
|
|
20
|
+
YOUR_AGENT_core op:brain_stats
|
|
21
|
+
```
|
|
22
|
+
Total sessions, patterns captured, quality scores, coverage gaps.
|
|
23
|
+
|
|
24
|
+
2. Get patterns ranked by proven strength:
|
|
25
|
+
```
|
|
26
|
+
YOUR_AGENT_core op:brain_strengths
|
|
27
|
+
```
|
|
28
|
+
Focus on strength >= 70 and successRate >= 0.7.
|
|
29
|
+
|
|
30
|
+
3. Check memory landscape:
|
|
31
|
+
```
|
|
32
|
+
YOUR_AGENT_core op:memory_topics
|
|
33
|
+
```
|
|
34
|
+
Shows how knowledge clusters by topic.
|
|
35
|
+
|
|
36
|
+
4. Check for stale knowledge:
|
|
37
|
+
```
|
|
38
|
+
YOUR_AGENT_core op:vault_age_report
|
|
39
|
+
```
|
|
40
|
+
Find entries that haven't been updated recently — candidates for review.
|
|
41
|
+
|
|
42
|
+
5. Run a curator health audit:
|
|
43
|
+
```
|
|
44
|
+
YOUR_AGENT_core op:curator_health_audit
|
|
45
|
+
```
|
|
46
|
+
Vault quality score, tag normalization status, duplicate density.
|
|
47
|
+
|
|
48
|
+
6. Present: top 5 strongest patterns, top 3 recurring anti-patterns, stale entries needing refresh, and coverage gaps.
|
|
49
|
+
|
|
50
|
+
### "What's working across projects?" (Cross-project intelligence)
|
|
51
|
+
|
|
52
|
+
1. Get patterns promoted to the global pool:
|
|
53
|
+
```
|
|
54
|
+
YOUR_AGENT_core op:brain_global_patterns
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
2. Get recommendations based on project similarity:
|
|
58
|
+
```
|
|
59
|
+
YOUR_AGENT_core op:brain_recommend
|
|
60
|
+
params: { projectName: "<current project>" }
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
3. Check linked projects:
|
|
64
|
+
```
|
|
65
|
+
YOUR_AGENT_core op:project_linked_projects
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
4. Search across all projects for relevant patterns:
|
|
69
|
+
```
|
|
70
|
+
YOUR_AGENT_core op:memory_cross_project_search
|
|
71
|
+
params: { query: "<topic>", crossProject: true }
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
5. Present: patterns from other projects that would apply here, ranked by relevance.
|
|
75
|
+
|
|
76
|
+
### "Am I getting smarter?" (Learning velocity)
|
|
77
|
+
|
|
78
|
+
1. Recent stats:
|
|
79
|
+
```
|
|
80
|
+
YOUR_AGENT_core op:brain_stats
|
|
81
|
+
params: { since: "<7 days ago>" }
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
2. Longer period for comparison:
|
|
85
|
+
```
|
|
86
|
+
YOUR_AGENT_core op:brain_stats
|
|
87
|
+
params: { since: "<30 days ago>" }
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
3. Memory stats:
|
|
91
|
+
```
|
|
92
|
+
YOUR_AGENT_core op:memory_stats
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
4. Vault analytics:
|
|
96
|
+
```
|
|
97
|
+
YOUR_AGENT_core op:admin_vault_analytics
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
5. Search insights — what queries are people running, what's missing:
|
|
101
|
+
```
|
|
102
|
+
YOUR_AGENT_core op:admin_search_insights
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
6. Present: new patterns captured, strength changes, domains growing vs stagnant, search miss analysis.
|
|
106
|
+
|
|
107
|
+
### "Build fresh intelligence" (Rebuild)
|
|
108
|
+
|
|
109
|
+
1. Run the full pipeline:
|
|
110
|
+
```
|
|
111
|
+
YOUR_AGENT_core op:brain_build_intelligence
|
|
112
|
+
```
|
|
113
|
+
Compute strengths, update global registry, refresh project profiles.
|
|
114
|
+
|
|
115
|
+
2. Consolidate vault (curator cleanup):
|
|
116
|
+
```
|
|
117
|
+
YOUR_AGENT_core op:curator_consolidate
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
3. Show updated metrics:
|
|
121
|
+
```
|
|
122
|
+
YOUR_AGENT_core op:brain_stats
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
4. Present: what changed after the rebuild.
|
|
126
|
+
|
|
127
|
+
### "Export what I know" (Portability)
|
|
128
|
+
|
|
129
|
+
Export brain intelligence:
|
|
130
|
+
```
|
|
131
|
+
YOUR_AGENT_core op:brain_export
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Export memory:
|
|
135
|
+
```
|
|
136
|
+
YOUR_AGENT_core op:memory_export
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Export vault as backup:
|
|
140
|
+
```
|
|
141
|
+
YOUR_AGENT_core op:vault_backup
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
These can be imported into another vault:
|
|
145
|
+
```
|
|
146
|
+
YOUR_AGENT_core op:brain_import
|
|
147
|
+
YOUR_AGENT_core op:memory_import
|
|
148
|
+
YOUR_AGENT_core op:vault_import
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Presenting Intelligence
|
|
152
|
+
|
|
153
|
+
Format as a report:
|
|
154
|
+
- **Strengths**: Top patterns with strength scores and domains
|
|
155
|
+
- **Risks**: Recurring anti-patterns that keep appearing
|
|
156
|
+
- **Gaps**: Domains with low coverage or stale knowledge
|
|
157
|
+
- **Stale**: Entries needing refresh (from age report)
|
|
158
|
+
- **Quality**: Curator health audit score
|
|
159
|
+
- **Recommendations**: What to focus on learning next
|
|
160
|
+
- **Search Misses**: What people are looking for but not finding
|
|
161
|
+
|
|
162
|
+
## Exit Criteria
|
|
163
|
+
|
|
164
|
+
Debrief is complete when the user's specific question has been answered with data from the brain. For general debriefs, present stats + strengths + gaps + stale entries at minimum.
|
|
165
|
+
|
|
166
|
+
## Agent Tools Reference
|
|
167
|
+
|
|
168
|
+
| Op | When to Use |
|
|
169
|
+
|----|-------------|
|
|
170
|
+
| `brain_stats` | Aggregate metrics — sessions, patterns, quality |
|
|
171
|
+
| `brain_strengths` | Patterns ranked by proven strength |
|
|
172
|
+
| `brain_global_patterns` | Cross-project promoted patterns |
|
|
173
|
+
| `brain_recommend` | Project-similarity recommendations |
|
|
174
|
+
| `brain_build_intelligence` | Rebuild full intelligence pipeline |
|
|
175
|
+
| `brain_export` / `brain_import` | Portable intelligence transfer |
|
|
176
|
+
| `memory_topics` | Knowledge clusters by topic |
|
|
177
|
+
| `memory_stats` | Memory statistics |
|
|
178
|
+
| `memory_export` / `memory_import` | Memory portability |
|
|
179
|
+
| `memory_cross_project_search` | Search across linked projects |
|
|
180
|
+
| `vault_age_report` | Find stale entries needing refresh |
|
|
181
|
+
| `vault_backup` / `vault_import` | Vault backup and restore |
|
|
182
|
+
| `curator_health_audit` | Vault quality score and status |
|
|
183
|
+
| `curator_consolidate` | Full vault cleanup pipeline |
|
|
184
|
+
| `admin_vault_analytics` | Overall knowledge quality metrics |
|
|
185
|
+
| `admin_search_insights` | Search miss analysis — what's not found |
|
|
186
|
+
| `project_linked_projects` | See connected projects |
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: brainstorming
|
|
3
|
+
description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
<!-- Adapted from superpowers (MIT License) -->
|
|
7
|
+
|
|
8
|
+
# Brainstorming Ideas Into Designs
|
|
9
|
+
|
|
10
|
+
## Overview
|
|
11
|
+
|
|
12
|
+
Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
|
|
13
|
+
|
|
14
|
+
Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
|
|
15
|
+
|
|
16
|
+
<HARD-GATE>
|
|
17
|
+
Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
|
|
18
|
+
</HARD-GATE>
|
|
19
|
+
|
|
20
|
+
## Anti-Pattern: "This Is Too Simple To Need A Design"
|
|
21
|
+
|
|
22
|
+
Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
|
|
23
|
+
|
|
24
|
+
## Checklist
|
|
25
|
+
|
|
26
|
+
You MUST create a task for each of these items and complete them in order:
|
|
27
|
+
|
|
28
|
+
1. **Classify intent** — understand what type of work this is
|
|
29
|
+
2. **Search vault for prior art** — check if something similar was built, decided, or rejected before
|
|
30
|
+
3. **Search web for existing solutions** — don't build what already exists
|
|
31
|
+
4. **Explore project context** — check files, docs, recent commits
|
|
32
|
+
5. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
|
|
33
|
+
6. **Propose 2-3 approaches** — with trade-offs and your recommendation
|
|
34
|
+
7. **Present design** — in sections scaled to their complexity, get user approval after each section
|
|
35
|
+
8. **Capture design decision** — persist the decision to the vault
|
|
36
|
+
9. **Write design doc** — save to `docs/plans/YYYY-MM-DD-<topic>-design.md` and commit
|
|
37
|
+
10. **Transition to implementation** — invoke writing-plans skill to create implementation plan
|
|
38
|
+
|
|
39
|
+
## Step 0: Classify Intent
|
|
40
|
+
|
|
41
|
+
Before anything else, understand the type of work:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
YOUR_AGENT_core op:route_intent
|
|
45
|
+
params: { prompt: "<the user's request>" }
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This returns the intent type (BUILD, FIX, VALIDATE, DESIGN, IMPROVE, DELIVER) and routing guidance. Use this to focus the brainstorming — a FIX intent needs different questions than a BUILD intent.
|
|
49
|
+
|
|
50
|
+
## Step 1: Search Before Designing — Vault, Then Web
|
|
51
|
+
|
|
52
|
+
**BEFORE asking any questions or exploring code**, search for existing knowledge. Follow this order:
|
|
53
|
+
|
|
54
|
+
### Vault First
|
|
55
|
+
```
|
|
56
|
+
YOUR_AGENT_core op:search_intelligent
|
|
57
|
+
params: { query: "<the feature or idea the user described>" }
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Look for:
|
|
61
|
+
- **Previous designs** — was this discussed or attempted before?
|
|
62
|
+
- **Architectural decisions** — are there constraints from past decisions?
|
|
63
|
+
- **Patterns** — established approaches in this codebase
|
|
64
|
+
- **Anti-patterns** — approaches that were tried and failed
|
|
65
|
+
|
|
66
|
+
Browse the knowledge landscape for related context:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
YOUR_AGENT_core op:vault_tags
|
|
70
|
+
YOUR_AGENT_core op:vault_domains
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Check what the brain says about proven patterns in this domain:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
YOUR_AGENT_core op:brain_strengths
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Check if other linked projects have solved this:
|
|
80
|
+
|
|
81
|
+
```
|
|
82
|
+
YOUR_AGENT_core op:memory_cross_project_search
|
|
83
|
+
params: { query: "<the feature>", crossProject: true }
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Web Search Second
|
|
87
|
+
If the vault doesn't have prior art, search the web for:
|
|
88
|
+
- **Existing libraries/tools** that solve this problem (don't build what exists)
|
|
89
|
+
- **Reference implementations** in similar projects
|
|
90
|
+
- **Best practices** and established patterns for this type of feature
|
|
91
|
+
- **Known pitfalls** that others have documented
|
|
92
|
+
|
|
93
|
+
### Present Findings
|
|
94
|
+
Present vault + web findings to the user: "Before we design this, here's what I found..." This informs the design conversation and prevents reinventing solutions.
|
|
95
|
+
|
|
96
|
+
## The Process
|
|
97
|
+
|
|
98
|
+
**Understanding the idea:**
|
|
99
|
+
- Check out the current project state first (files, docs, recent commits)
|
|
100
|
+
- Ask questions one at a time to refine the idea
|
|
101
|
+
- Prefer multiple choice questions when possible, but open-ended is fine too
|
|
102
|
+
- Only one question per message
|
|
103
|
+
- Focus on understanding: purpose, constraints, success criteria
|
|
104
|
+
|
|
105
|
+
**Exploring approaches:**
|
|
106
|
+
- Propose 2-3 different approaches with trade-offs
|
|
107
|
+
- Present options conversationally with your recommendation and reasoning
|
|
108
|
+
- Lead with your recommended option and explain why
|
|
109
|
+
- **Reference vault patterns** — if the vault has a proven approach, lead with it
|
|
110
|
+
- **Reference web findings** — if an existing library solves this, recommend it over custom code
|
|
111
|
+
|
|
112
|
+
**Presenting the design:**
|
|
113
|
+
- Once you understand what you're building, present the design
|
|
114
|
+
- Scale each section to its complexity
|
|
115
|
+
- Ask after each section whether it looks right so far
|
|
116
|
+
- Cover: architecture, components, data flow, error handling, testing
|
|
117
|
+
|
|
118
|
+
## After the Design
|
|
119
|
+
|
|
120
|
+
**Capture the design decision to the vault:**
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
YOUR_AGENT_core op:capture_knowledge
|
|
124
|
+
params: {
|
|
125
|
+
title: "<feature name> — design decision",
|
|
126
|
+
description: "<chosen approach, rationale, rejected alternatives>",
|
|
127
|
+
type: "decision",
|
|
128
|
+
category: "<relevant domain>",
|
|
129
|
+
tags: ["<relevant>", "<tags>", "design-decision"]
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
This ensures future brainstorming sessions can reference what was decided and why.
|
|
134
|
+
|
|
135
|
+
**Documentation:**
|
|
136
|
+
- Write the validated design to `docs/plans/YYYY-MM-DD-<topic>-design.md`
|
|
137
|
+
- Commit the design document to git
|
|
138
|
+
|
|
139
|
+
**Implementation:**
|
|
140
|
+
- Invoke the writing-plans skill to create a detailed implementation plan
|
|
141
|
+
- Do NOT invoke any other skill. writing-plans is the next step.
|
|
142
|
+
|
|
143
|
+
## Process Flow
|
|
144
|
+
|
|
145
|
+
**The terminal state is invoking writing-plans.** Do NOT invoke any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
|
|
146
|
+
|
|
147
|
+
## Key Principles
|
|
148
|
+
|
|
149
|
+
- **Classify first** — understand intent before diving in
|
|
150
|
+
- **Vault first** — don't reinvent what's been decided or solved before
|
|
151
|
+
- **Web second** — don't build what already exists as a library
|
|
152
|
+
- **One question at a time** — don't overwhelm with multiple questions
|
|
153
|
+
- **Multiple choice preferred** — easier to answer than open-ended when possible
|
|
154
|
+
- **YAGNI ruthlessly** — remove unnecessary features from all designs
|
|
155
|
+
- **Explore alternatives** — always propose 2-3 approaches before settling
|
|
156
|
+
- **Incremental validation** — present design, get approval before moving on
|
|
157
|
+
- **Capture decisions** — every design decision gets persisted to the vault
|
|
158
|
+
- **Cross-project learning** — check if other projects solved this already
|
|
159
|
+
- **Be flexible** — go back and clarify when something doesn't make sense
|
|
160
|
+
|
|
161
|
+
## Agent Tools Reference
|
|
162
|
+
|
|
163
|
+
| Op | When to Use |
|
|
164
|
+
|----|-------------|
|
|
165
|
+
| `route_intent` | Classify the type of work (BUILD, FIX, etc.) |
|
|
166
|
+
| `search_intelligent` | Search vault for prior art |
|
|
167
|
+
| `vault_tags` / `vault_domains` | Browse knowledge landscape |
|
|
168
|
+
| `brain_strengths` | Check proven patterns |
|
|
169
|
+
| `memory_cross_project_search` | Check if other projects solved this |
|
|
170
|
+
| `capture_knowledge` | Persist design decision to vault |
|