snap-squad 0.4.0 → 0.6.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/README.md +9 -0
- package/dist/cli.js +15 -6
- package/dist/cli.js.map +1 -1
- package/dist/generator/index.d.ts +8 -1
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +609 -52
- package/dist/generator/index.js.map +1 -1
- package/package.json +1 -1
- package/src/registry/presets/neighbors.yaml +4 -4
package/README.md
CHANGED
|
@@ -36,6 +36,15 @@ npx snap-squad init # → Neighbors (default)
|
|
|
36
36
|
npx snap-squad init --type dash # → pick directly
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
### Regenerate safely
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npx snap-squad init --force # refresh structural templates, keep JOURNAL.md + .squad/decisions.md
|
|
43
|
+
npx snap-squad init --reset-all # overwrite every generated file for a true clean slate
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
When `--force` preserves a content file, Snap Squad prints a warning so you know it left your journal or decisions log alone.
|
|
47
|
+
|
|
39
48
|
---
|
|
40
49
|
|
|
41
50
|
## What Is Squad?
|
package/dist/cli.js
CHANGED
|
@@ -24,14 +24,16 @@ program
|
|
|
24
24
|
.option('-d, --dir <directory>', 'target directory', '.')
|
|
25
25
|
.option('-n, --name <name>', 'project name')
|
|
26
26
|
.option('-o, --owner <owner>', 'project owner')
|
|
27
|
-
.option('-f, --force', 'overwrite
|
|
27
|
+
.option('-f, --force', 'overwrite structural files but preserve JOURNAL.md and .squad/decisions.md', false)
|
|
28
|
+
.option('--reset-all', 'overwrite every generated file, including JOURNAL.md and .squad/decisions.md', false)
|
|
28
29
|
.option('--explain', 'show why a preset was chosen')
|
|
29
30
|
.option('--dry-run', 'show what would be created without writing files')
|
|
30
31
|
.action((descriptionWords, opts) => {
|
|
31
32
|
const targetDir = resolve(opts.dir);
|
|
32
33
|
const squadDir = resolve(targetDir, '.squad');
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const canRegenerate = opts.force || opts.resetAll;
|
|
35
|
+
if (existsSync(squadDir) && !canRegenerate) {
|
|
36
|
+
console.error(chalk.red('✗ .squad/ already exists. Use --force to refresh templates or --reset-all for a clean slate.'));
|
|
35
37
|
process.exit(1);
|
|
36
38
|
}
|
|
37
39
|
// Resolve preset: explicit --type wins, otherwise match from description
|
|
@@ -72,15 +74,22 @@ program
|
|
|
72
74
|
return;
|
|
73
75
|
}
|
|
74
76
|
console.log(chalk.blue(`⚡ Snapping in ${chalk.bold(preset.displayName)}...`));
|
|
75
|
-
const
|
|
77
|
+
const { written, skipped } = generateSquad({
|
|
76
78
|
targetDir,
|
|
77
79
|
preset,
|
|
78
80
|
projectName: opts.name,
|
|
79
81
|
owner: opts.owner,
|
|
82
|
+
overwriteMode: opts.resetAll ? 'all' : opts.force ? 'structural' : 'all',
|
|
80
83
|
});
|
|
84
|
+
if (skipped.length > 0) {
|
|
85
|
+
console.log();
|
|
86
|
+
for (const file of skipped) {
|
|
87
|
+
console.log(chalk.yellow(`⚠ Skipping ${file} (contains user content)`));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
81
90
|
console.log(chalk.green(`\n✓ Squad ready! (${preset.displayName})\n`));
|
|
82
|
-
console.log(chalk.dim('
|
|
83
|
-
for (const file of
|
|
91
|
+
console.log(chalk.dim('Written:'));
|
|
92
|
+
for (const file of written) {
|
|
84
93
|
console.log(chalk.dim(` ${file}`));
|
|
85
94
|
}
|
|
86
95
|
console.log(`\n${chalk.yellow('Next:')} Open ${chalk.bold('Copilot CLI')} or ${chalk.bold('VS Code')} in this folder — your AI is already squad-aware.\n`);
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,YA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;IACD,OAAO,CAAC,GAAG,EAAE,CAAC;AAChB,CAAC,CAAC,CAAC;AAEL,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import type { Preset } from '../registry/loader.js';
|
|
2
|
+
type OverwriteMode = 'all' | 'structural';
|
|
2
3
|
export interface GenerateOptions {
|
|
3
4
|
targetDir: string;
|
|
4
5
|
preset: Preset;
|
|
5
6
|
projectName?: string;
|
|
6
7
|
owner?: string;
|
|
8
|
+
overwriteMode?: OverwriteMode;
|
|
7
9
|
}
|
|
8
|
-
export
|
|
10
|
+
export interface GenerateResult {
|
|
11
|
+
written: string[];
|
|
12
|
+
skipped: string[];
|
|
13
|
+
}
|
|
14
|
+
export declare function generateSquad(options: GenerateOptions): GenerateResult;
|
|
15
|
+
export {};
|
|
9
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAS,MAAM,uBAAuB,CAAC;AAI3D,KAAK,aAAa,GAAG,KAAK,GAAG,YAAY,CAAC;AAS1C,MAAM,WAAW,eAAe;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAOD,wBAAgB,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,cAAc,CAiGtE"}
|
package/dist/generator/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
1
|
+
import { mkdirSync, writeFileSync, rmSync, existsSync, readFileSync } from 'node:fs';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { listPresets } from '../registry/loader.js';
|
|
4
4
|
// Sanitize user input for markdown templates
|
|
@@ -6,57 +6,94 @@ function sanitize(input) {
|
|
|
6
6
|
return input.replace(/[[\](){}|`*_~<>#]/g, '\\$&');
|
|
7
7
|
}
|
|
8
8
|
export function generateSquad(options) {
|
|
9
|
-
const { targetDir, preset, projectName, owner } = options;
|
|
9
|
+
const { targetDir, preset, projectName, owner, overwriteMode = 'all' } = options;
|
|
10
10
|
const safeName = projectName ? sanitize(projectName) : undefined;
|
|
11
11
|
const safeOwner = owner ? sanitize(owner) : undefined;
|
|
12
12
|
const squadDir = join(targetDir, '.squad');
|
|
13
13
|
const githubDir = join(targetDir, '.github');
|
|
14
14
|
// Phase 1: Generate all content in memory (no I/O)
|
|
15
15
|
const files = [];
|
|
16
|
-
files.push({ path: join(squadDir, 'team.md'), content: generateTeamMd(preset, safeName, safeOwner), label: '.squad/team.md' });
|
|
17
|
-
files.push({ path: join(squadDir, 'routing.md'), content: generateRoutingMd(preset), label: '.squad/routing.md' });
|
|
16
|
+
files.push({ path: join(squadDir, 'team.md'), content: generateTeamMd(preset, safeName, safeOwner), label: '.squad/team.md', kind: 'structural' });
|
|
17
|
+
files.push({ path: join(squadDir, 'routing.md'), content: generateRoutingMd(preset), label: '.squad/routing.md', kind: 'structural' });
|
|
18
18
|
for (const agent of preset.agents) {
|
|
19
19
|
files.push({
|
|
20
20
|
path: join(squadDir, 'agents', agent.name.toLowerCase(), 'charter.md'),
|
|
21
21
|
content: generateCharter(agent),
|
|
22
22
|
label: `.squad/agents/${agent.name.toLowerCase()}/charter.md`,
|
|
23
|
+
kind: 'structural',
|
|
23
24
|
});
|
|
24
25
|
}
|
|
25
|
-
files.push({ path: join(squadDir, 'decisions.md'), content: generateDecisionsMd(preset), label: '.squad/decisions.md' });
|
|
26
|
-
files.push({ path: join(squadDir, 'mcp-config.md'), content: generateMcpConfigMd(preset), label: '.squad/mcp-config.md' });
|
|
27
|
-
files.push({ path: join(targetDir, 'AGENTS.md'), content: generateAgentsMd(preset, safeName), label: 'AGENTS.md' });
|
|
28
|
-
files.push({ path: join(targetDir, 'CLAUDE.md'), content: generateClaudeMd(preset, safeName, safeOwner), label: 'CLAUDE.md' });
|
|
29
|
-
files.push({ path: join(githubDir, 'copilot-instructions.md'), content: generateCopilotInstructions(preset), label: '.github/copilot-instructions.md' });
|
|
30
|
-
files.push({ path: join(targetDir, 'JOURNAL.md'), content: generateJournalMd(preset, safeName), label: 'JOURNAL.md' });
|
|
26
|
+
files.push({ path: join(squadDir, 'decisions.md'), content: generateDecisionsMd(preset), label: '.squad/decisions.md', kind: 'content' });
|
|
27
|
+
files.push({ path: join(squadDir, 'mcp-config.md'), content: generateMcpConfigMd(preset), label: '.squad/mcp-config.md', kind: 'structural' });
|
|
28
|
+
files.push({ path: join(targetDir, 'AGENTS.md'), content: generateAgentsMd(preset, safeName), label: 'AGENTS.md', kind: 'structural' });
|
|
29
|
+
files.push({ path: join(targetDir, 'CLAUDE.md'), content: generateClaudeMd(preset, safeName, safeOwner), label: 'CLAUDE.md', kind: 'structural' });
|
|
30
|
+
files.push({ path: join(githubDir, 'copilot-instructions.md'), content: generateCopilotInstructions(preset), label: '.github/copilot-instructions.md', kind: 'structural' });
|
|
31
|
+
files.push({ path: join(targetDir, 'JOURNAL.md'), content: generateJournalMd(preset, safeName), label: 'JOURNAL.md', kind: 'content' });
|
|
32
|
+
const skipped = new Set(files
|
|
33
|
+
.filter(({ kind, path }) => overwriteMode === 'structural' && kind === 'content' && existsSync(path))
|
|
34
|
+
.map(({ label }) => label));
|
|
35
|
+
const filesToWrite = files.filter(({ label }) => !skipped.has(label));
|
|
31
36
|
// Phase 2: Create directories
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
37
|
+
const createdDirs = [];
|
|
38
|
+
const dirs = [...new Set(filesToWrite.map((file) => dirname(file.path)))];
|
|
39
|
+
let currentDir = '';
|
|
40
|
+
try {
|
|
41
|
+
for (const dir of dirs) {
|
|
42
|
+
currentDir = dir;
|
|
43
|
+
if (existsSync(dir)) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
35
46
|
mkdirSync(dir, { recursive: true });
|
|
47
|
+
createdDirs.push(dir);
|
|
36
48
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
}
|
|
50
|
+
catch (err) {
|
|
51
|
+
for (const createdDir of [...createdDirs].reverse()) {
|
|
52
|
+
try {
|
|
53
|
+
rmSync(createdDir, { recursive: true, force: true });
|
|
54
|
+
}
|
|
55
|
+
catch { }
|
|
40
56
|
}
|
|
57
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
58
|
+
throw new Error(`Failed to create directory "${currentDir}": ${message}`);
|
|
41
59
|
}
|
|
42
|
-
// Phase 3: Write all files (with
|
|
60
|
+
// Phase 3: Write all files (with rollback for overwritten content)
|
|
43
61
|
const written = [];
|
|
62
|
+
const writtenFiles = [];
|
|
63
|
+
const previousContents = new Map();
|
|
44
64
|
try {
|
|
45
|
-
for (const
|
|
46
|
-
|
|
47
|
-
|
|
65
|
+
for (const file of filesToWrite) {
|
|
66
|
+
if (existsSync(file.path)) {
|
|
67
|
+
previousContents.set(file.path, readFileSync(file.path, 'utf-8'));
|
|
68
|
+
}
|
|
69
|
+
writeFileSync(file.path, file.content);
|
|
70
|
+
written.push(file.label);
|
|
71
|
+
writtenFiles.push(file);
|
|
48
72
|
}
|
|
49
73
|
}
|
|
50
74
|
catch (err) {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
75
|
+
for (const file of [...writtenFiles].reverse()) {
|
|
76
|
+
try {
|
|
77
|
+
const previous = previousContents.get(file.path);
|
|
78
|
+
if (previous !== undefined) {
|
|
79
|
+
writeFileSync(file.path, previous);
|
|
80
|
+
}
|
|
81
|
+
else {
|
|
82
|
+
rmSync(file.path, { force: true });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
catch { }
|
|
86
|
+
}
|
|
87
|
+
for (const createdDir of [...createdDirs].reverse()) {
|
|
88
|
+
try {
|
|
89
|
+
rmSync(createdDir, { recursive: true, force: true });
|
|
90
|
+
}
|
|
91
|
+
catch { }
|
|
54
92
|
}
|
|
55
|
-
catch { }
|
|
56
93
|
const message = err instanceof Error ? err.message : String(err);
|
|
57
|
-
throw new Error(`Squad generation failed after writing ${written.length}/${
|
|
94
|
+
throw new Error(`Squad generation failed after writing ${written.length}/${filesToWrite.length} files: ${message}`);
|
|
58
95
|
}
|
|
59
|
-
return written;
|
|
96
|
+
return { written, skipped: [...skipped] };
|
|
60
97
|
}
|
|
61
98
|
function generateTeamMd(arch, projectName, owner) {
|
|
62
99
|
const name = projectName || arch.team.name;
|
|
@@ -116,9 +153,27 @@ ${rows}
|
|
|
116
153
|
3. **Quick facts → coordinator answers directly.** Don't spawn for trivial questions.
|
|
117
154
|
4. **Two agents could handle it** → pick the one whose domain is the primary concern.
|
|
118
155
|
5. **Anticipate downstream.** Feature being built? Spawn tester simultaneously.
|
|
156
|
+
|
|
157
|
+
## Automatic Secondary Routing
|
|
158
|
+
|
|
159
|
+
These triggers fire every session, regardless of user request:
|
|
160
|
+
|
|
161
|
+
| When this happens... | Also activate... |
|
|
162
|
+
|---------------------|-----------------|
|
|
163
|
+
| Implementation work | Testing review (Lens/equivalent) |
|
|
164
|
+
| User-visible behavior changes | Documentation update (Quill/equivalent) |
|
|
165
|
+
| Prompt or agent changes | Eval baseline check (Val/equivalent) |
|
|
166
|
+
| Significant trade-off or decision | Decision logging (any agent) |
|
|
167
|
+
| Meaningful milestone reached | Journal update (Ledger/equivalent) |
|
|
168
|
+
|
|
169
|
+
## Completion Routing Check
|
|
170
|
+
|
|
171
|
+
Before finishing, ask: **"Which squad roles should have touched this work but haven't?"**
|
|
172
|
+
Resolve those gaps or explicitly report them before ending the session.
|
|
119
173
|
`;
|
|
120
174
|
}
|
|
121
175
|
function generateCharter(agent) {
|
|
176
|
+
const roleSections = getRoleSpecificSections(agent);
|
|
122
177
|
return `# ${agent.name} — ${agent.role}
|
|
123
178
|
|
|
124
179
|
> ${agent.description}
|
|
@@ -136,7 +191,7 @@ function generateCharter(agent) {
|
|
|
136
191
|
- Check \`.squad/decisions.md\` before starting work
|
|
137
192
|
- Log decisions after completing work
|
|
138
193
|
- If unsure, say so and suggest who might know
|
|
139
|
-
|
|
194
|
+
${roleSections}
|
|
140
195
|
## Voice
|
|
141
196
|
|
|
142
197
|
${agent.voice}
|
|
@@ -153,6 +208,366 @@ After making a decision others should know, log it to \`.squad/decisions.md\`.
|
|
|
153
208
|
If I need another team member's input, say so — the coordinator will bring them in.
|
|
154
209
|
`;
|
|
155
210
|
}
|
|
211
|
+
function getRoleSpecificSections(agent) {
|
|
212
|
+
const name = agent.name.toLowerCase();
|
|
213
|
+
const role = agent.role.toLowerCase();
|
|
214
|
+
// Historian / Build Journalist
|
|
215
|
+
if (name === 'ledger' || role.includes('historian') || role.includes('journalist')) {
|
|
216
|
+
return `
|
|
217
|
+
## How I Journal
|
|
218
|
+
|
|
219
|
+
My job is to write the **"How Was This Built?"** story. Not a changelog — a steering log.
|
|
220
|
+
|
|
221
|
+
### The Format
|
|
222
|
+
|
|
223
|
+
Use timestamped tables with these columns:
|
|
224
|
+
|
|
225
|
+
| Time | Steering Command | What Happened | Level-Up 🆙 |
|
|
226
|
+
|------|-----------------|---------------|-------------|
|
|
227
|
+
| When | *"What the human said"* | What the AI did in response | 🆙 **The insight or lesson** |
|
|
228
|
+
|
|
229
|
+
### What to Capture
|
|
230
|
+
|
|
231
|
+
- **Steering moments** — when the human redirected the AI ("no, more like *this*")
|
|
232
|
+
- **Pivots** — when something didn't work and the approach changed
|
|
233
|
+
- **Mistakes** — hallucinated commands, bugs, wrong assumptions. Be honest.
|
|
234
|
+
- **Level-Ups** — the moment something clicked or a capability unlocked
|
|
235
|
+
- **The meta-lesson** — how the project used its own tools to build itself
|
|
236
|
+
|
|
237
|
+
### Sources
|
|
238
|
+
|
|
239
|
+
- \`git log --oneline --reverse\` — the commits are the backbone
|
|
240
|
+
- Session history — the human's actual prompts
|
|
241
|
+
- \`.squad/decisions.md\` — trade-offs that were made
|
|
242
|
+
|
|
243
|
+
### Where It Goes
|
|
244
|
+
|
|
245
|
+
- **\`JOURNAL.md\`** — the full steering log with timestamps, Level-Up moments, and lessons learned
|
|
246
|
+
|
|
247
|
+
### Rules
|
|
248
|
+
|
|
249
|
+
1. **Timestamps matter.** Commits have them. Use them.
|
|
250
|
+
2. **Quote the human.** Their exact steering commands are the story.
|
|
251
|
+
3. **Be honest about failures.** The best journals include "we tried X, it didn't work."
|
|
252
|
+
4. **Level-Up moments are the payoff.** Every entry should have one.
|
|
253
|
+
5. **The git log is your source of truth.** Run it. Read it. Tell its story.
|
|
254
|
+
`;
|
|
255
|
+
}
|
|
256
|
+
// Evals / Quality
|
|
257
|
+
if (name === 'val' || name === 'caliber' || name === 'measure' || name === 'waza' || role.includes('eval') || role.includes('quality baseline')) {
|
|
258
|
+
return `
|
|
259
|
+
## How I Eval
|
|
260
|
+
|
|
261
|
+
### Always-On Duties
|
|
262
|
+
|
|
263
|
+
- After code changes: verify tests still pass, flag gaps
|
|
264
|
+
- After behavior changes: check if eval baselines need updating
|
|
265
|
+
- Maintain \`docs/evals.md\` with current baselines
|
|
266
|
+
|
|
267
|
+
### What I Track
|
|
268
|
+
|
|
269
|
+
- Test count and pass rate
|
|
270
|
+
- Speed baselines (init time per preset)
|
|
271
|
+
- Accuracy matrix (keyword→preset mapping correctness)
|
|
272
|
+
- Validation coverage (schema, charter quality, input sanitization)
|
|
273
|
+
|
|
274
|
+
### Quality Gates
|
|
275
|
+
|
|
276
|
+
Nothing ships unless: all tests green, no open P0s, baselines documented.
|
|
277
|
+
`;
|
|
278
|
+
}
|
|
279
|
+
// Docs / DevRel / Knowledge Manager (check tester first — Flash is "Tester + DevRel")
|
|
280
|
+
if ((name === 'quill' || name === 'herald' || name === 'chronicle' || role.includes('doc') || role.includes('devrel') || role.includes('knowledge')) && !role.includes('tester') && !role.includes('qa')) {
|
|
281
|
+
return `
|
|
282
|
+
## How I Write
|
|
283
|
+
|
|
284
|
+
### Always-On Duties
|
|
285
|
+
|
|
286
|
+
- After behavior changes: update README, docs, and examples
|
|
287
|
+
- After new features: add to CONTRIBUTING.md if it affects contributors
|
|
288
|
+
- Every command referenced in docs must be tested first — **no hallucinated commands**
|
|
289
|
+
|
|
290
|
+
### Honesty Rule
|
|
291
|
+
|
|
292
|
+
Never write a CLI command, flag, or tool reference without testing it first. Run the command. Check --help. If it doesn't exist, don't write it.
|
|
293
|
+
`;
|
|
294
|
+
}
|
|
295
|
+
// Architect / Lead
|
|
296
|
+
if (name === 'blueprint' || name === 'turbo' || name === 'oracle' || name === 'forge' || role.includes('architect') || role.includes('lead')) {
|
|
297
|
+
return `
|
|
298
|
+
## How I Architect
|
|
299
|
+
|
|
300
|
+
### Always-On Duties
|
|
301
|
+
|
|
302
|
+
- Before implementation: define scope, identify trade-offs, document the decision
|
|
303
|
+
- After significant changes: update \`docs/architecture.md\` with Mermaid diagrams
|
|
304
|
+
- Flag scope creep — if a task is growing beyond its boundaries, say so
|
|
305
|
+
|
|
306
|
+
### Architecture Docs
|
|
307
|
+
|
|
308
|
+
Maintain \`docs/architecture.md\` with:
|
|
309
|
+
- System flow diagrams (Mermaid \`graph TD\` or \`graph LR\`)
|
|
310
|
+
- Component relationships
|
|
311
|
+
- File generation pipeline
|
|
312
|
+
- Directory structure
|
|
313
|
+
|
|
314
|
+
### Design Decisions
|
|
315
|
+
|
|
316
|
+
Every architectural choice gets logged to \`.squad/decisions.md\` with:
|
|
317
|
+
- Context (what problem are we solving?)
|
|
318
|
+
- Decision (what did we choose?)
|
|
319
|
+
- Alternatives considered (what else could we have done?)
|
|
320
|
+
- Trade-offs (what are we giving up?)
|
|
321
|
+
`;
|
|
322
|
+
}
|
|
323
|
+
// Core Dev / Implementation
|
|
324
|
+
if (name === 'wrench' || name === 'bolt' || name === 'scriptor' || name === 'anvil' || role.includes('core dev') || role.includes('full-stack') || role.includes('backend')) {
|
|
325
|
+
return `
|
|
326
|
+
## How I Build
|
|
327
|
+
|
|
328
|
+
### Always-On Duties
|
|
329
|
+
|
|
330
|
+
- Before writing code: check \`.squad/decisions.md\` for architectural constraints
|
|
331
|
+
- After implementation: run the test suite and fix what breaks
|
|
332
|
+
- Flag technical debt — if a shortcut is taken, document why
|
|
333
|
+
|
|
334
|
+
### Code Standards
|
|
335
|
+
|
|
336
|
+
- Build must pass before pushing (\`npx tsc\`)
|
|
337
|
+
- All tests must pass (\`npx vitest run\`)
|
|
338
|
+
- No \`require()\` — ESM-only with \`import\`
|
|
339
|
+
- Sanitize user input before template injection
|
|
340
|
+
- Prefer atomic operations with rollback on failure
|
|
341
|
+
|
|
342
|
+
### When I'm Done
|
|
343
|
+
|
|
344
|
+
- Tests green
|
|
345
|
+
- No regressions introduced
|
|
346
|
+
- If behavior changed, flag for docs update
|
|
347
|
+
`;
|
|
348
|
+
}
|
|
349
|
+
// Tester / QA
|
|
350
|
+
if (name === 'lens' || name === 'flash' || name === 'proof' || role.includes('tester') || role.includes('qa')) {
|
|
351
|
+
return `
|
|
352
|
+
## How I Test
|
|
353
|
+
|
|
354
|
+
### Always-On Duties
|
|
355
|
+
|
|
356
|
+
- After code changes: verify existing tests pass, identify gaps
|
|
357
|
+
- After new features: write tests covering happy path, edge cases, and error paths
|
|
358
|
+
- Maintain speed baselines — no regressions in init time
|
|
359
|
+
|
|
360
|
+
### Test Categories
|
|
361
|
+
|
|
362
|
+
- **E2E tests** — full CLI lifecycle (init, list, force, plain English)
|
|
363
|
+
- **Unit tests** — matcher accuracy, registry loading, generator output
|
|
364
|
+
- **Validation tests** — schema correctness, charter quality, input sanitization
|
|
365
|
+
- **Speed tests** — performance budgets, regression guards
|
|
366
|
+
|
|
367
|
+
### Quality Bar
|
|
368
|
+
|
|
369
|
+
- All tests must pass before any push
|
|
370
|
+
- New features need at least happy-path coverage
|
|
371
|
+
- Speed regressions are bugs — treat them as P0
|
|
372
|
+
`;
|
|
373
|
+
}
|
|
374
|
+
// Prompt Engineer
|
|
375
|
+
if (name === 'mosaic' || name === 'pattern' || role.includes('prompt')) {
|
|
376
|
+
return `
|
|
377
|
+
## How I Design Prompts
|
|
378
|
+
|
|
379
|
+
### Always-On Duties
|
|
380
|
+
|
|
381
|
+
- Review agent charters for clarity, specificity, and actionability
|
|
382
|
+
- Ensure charters include operational instructions, not just identity
|
|
383
|
+
- Test that generated prompts actually change agent behavior
|
|
384
|
+
|
|
385
|
+
### Charter Quality Checks
|
|
386
|
+
|
|
387
|
+
Every charter must have:
|
|
388
|
+
- Clear role boundaries (what I do vs. what I defer)
|
|
389
|
+
- Operational "How I Work" sections with specific actions
|
|
390
|
+
- Voice that is distinctive and consistent
|
|
391
|
+
- No vague instructions ("be helpful") — be specific ("run tests after code changes")
|
|
392
|
+
|
|
393
|
+
### Prompt Anti-Patterns
|
|
394
|
+
|
|
395
|
+
- ❌ "Be a good architect" → ✅ "Before implementation, define scope and log the decision"
|
|
396
|
+
- ❌ "Help with testing" → ✅ "After code changes, run the test suite and flag gaps"
|
|
397
|
+
- ❌ "Update docs when needed" → ✅ "After behavior changes, update README sections X and Y"
|
|
398
|
+
`;
|
|
399
|
+
}
|
|
400
|
+
// GitOps / Release / DevOps
|
|
401
|
+
if (name === 'relay' || name === 'loom' || role.includes('gitops') || role.includes('release') || role.includes('devops') || role.includes('infra')) {
|
|
402
|
+
return `
|
|
403
|
+
## How I Ship
|
|
404
|
+
|
|
405
|
+
### Always-On Duties
|
|
406
|
+
|
|
407
|
+
- Before push: verify build passes, tests green, no secrets in code
|
|
408
|
+
- Before publish: bump version, tag, update changelog
|
|
409
|
+
- After publish: verify package is live, smoke test the published version
|
|
410
|
+
|
|
411
|
+
### Release Checklist
|
|
412
|
+
|
|
413
|
+
1. All tests green (no exceptions)
|
|
414
|
+
2. Version bumped in package.json
|
|
415
|
+
3. Git tag created (\`v0.X.0\`)
|
|
416
|
+
4. Published to registry (\`npm publish\`)
|
|
417
|
+
5. Tag pushed to remote
|
|
418
|
+
6. Smoke test: \`npx snap-squad@latest init\` in a clean directory
|
|
419
|
+
7. Credentials cleaned up (no tokens in repo)
|
|
420
|
+
|
|
421
|
+
### Git Hygiene
|
|
422
|
+
|
|
423
|
+
- Commit messages use conventional style (feat:, fix:, docs:)
|
|
424
|
+
- Include Co-authored-by trailer for AI commits
|
|
425
|
+
- Push frequently — main should always be deployable
|
|
426
|
+
`;
|
|
427
|
+
}
|
|
428
|
+
// Researcher / Scout / Recon
|
|
429
|
+
if (name === 'scout' || name === 'recon' || role.includes('research') || role.includes('opportunity')) {
|
|
430
|
+
return `
|
|
431
|
+
## How I Research
|
|
432
|
+
|
|
433
|
+
### Always-On Duties
|
|
434
|
+
|
|
435
|
+
- Track upstream changes in dependencies and related projects
|
|
436
|
+
- Identify opportunities for integration or contribution
|
|
437
|
+
- Report findings with actionable recommendations, not just observations
|
|
438
|
+
|
|
439
|
+
### Research Format
|
|
440
|
+
|
|
441
|
+
Every research report should include:
|
|
442
|
+
- **What I found** — the factual discovery
|
|
443
|
+
- **Why it matters** — how it affects this project
|
|
444
|
+
- **Recommended action** — specific next steps
|
|
445
|
+
- **Effort estimate** — small/medium/large
|
|
446
|
+
|
|
447
|
+
### Sources
|
|
448
|
+
|
|
449
|
+
- GitHub PRs and issues on upstream repos
|
|
450
|
+
- Changelog and release notes
|
|
451
|
+
- Competing projects and alternatives
|
|
452
|
+
- Community discussions and RFCs
|
|
453
|
+
`;
|
|
454
|
+
}
|
|
455
|
+
// Troubleshooter / Debugger
|
|
456
|
+
if (name === 'chuck' || role.includes('troubleshoot') || role.includes('debug')) {
|
|
457
|
+
return `
|
|
458
|
+
## How I Debug
|
|
459
|
+
|
|
460
|
+
### Always-On Duties
|
|
461
|
+
|
|
462
|
+
- When errors surface: get the full stack trace before theorizing
|
|
463
|
+
- Reproduce first, fix second — never guess
|
|
464
|
+
- After fixing: add a test that would have caught it
|
|
465
|
+
|
|
466
|
+
### Debugging Protocol
|
|
467
|
+
|
|
468
|
+
1. **Read the error.** The whole error. Not just the first line.
|
|
469
|
+
2. **Reproduce it.** If you can't reproduce it, you can't fix it.
|
|
470
|
+
3. **Isolate the cause.** Binary search: what's the smallest change that triggers it?
|
|
471
|
+
4. **Fix the root cause.** Not the symptom.
|
|
472
|
+
5. **Add a regression test.** The same bug never ships twice.
|
|
473
|
+
|
|
474
|
+
### Escalation
|
|
475
|
+
|
|
476
|
+
If I can't solve it in 3 attempts, I say so and recommend bringing in the architect or the specialist who owns that domain.
|
|
477
|
+
`;
|
|
478
|
+
}
|
|
479
|
+
// Security
|
|
480
|
+
if (name === 'chisel' || role.includes('security') || role.includes('hardening')) {
|
|
481
|
+
return `
|
|
482
|
+
## How I Harden
|
|
483
|
+
|
|
484
|
+
### Always-On Duties
|
|
485
|
+
|
|
486
|
+
- Review all user input paths for injection risks
|
|
487
|
+
- Verify no secrets or tokens in source code
|
|
488
|
+
- Check dependencies for known vulnerabilities
|
|
489
|
+
|
|
490
|
+
### Security Checks
|
|
491
|
+
|
|
492
|
+
- Input sanitization on all user-provided strings
|
|
493
|
+
- No eval(), no dynamic require(), no unsanitized template injection
|
|
494
|
+
- Credentials never committed — use env vars or credential helpers
|
|
495
|
+
- File operations use safe paths (no path traversal)
|
|
496
|
+
|
|
497
|
+
### Before Shipping
|
|
498
|
+
|
|
499
|
+
- Run \`npm audit\` and address critical/high findings
|
|
500
|
+
- Verify .gitignore covers sensitive files (.npmrc, .env, credentials)
|
|
501
|
+
- Review generated output for accidental secret inclusion
|
|
502
|
+
`;
|
|
503
|
+
}
|
|
504
|
+
// UI/UX / Frontend
|
|
505
|
+
if (name === 'prism' || role.includes('ui') || role.includes('ux') || role.includes('frontend')) {
|
|
506
|
+
return `
|
|
507
|
+
## How I Design
|
|
508
|
+
|
|
509
|
+
### Always-On Duties
|
|
510
|
+
|
|
511
|
+
- CLI output should be clear, scannable, and actionable
|
|
512
|
+
- Error messages must tell the user what went wrong AND what to do next
|
|
513
|
+
- Progress indicators for anything that takes more than 1 second
|
|
514
|
+
|
|
515
|
+
### CLI UX Principles
|
|
516
|
+
|
|
517
|
+
- **Show, don't tell.** List created files, don't say "files were created."
|
|
518
|
+
- **Errors are guidance.** Bad: "Invalid preset." Good: "Preset 'xyz' not found. Available: dash, neighbors, sages, specialists"
|
|
519
|
+
- **Celebrate success.** A checkmark and "Squad ready!" beats a silent exit.
|
|
520
|
+
- **Respect the terminal.** No walls of text. Use tables, bullets, and whitespace.
|
|
521
|
+
`;
|
|
522
|
+
}
|
|
523
|
+
// Mass Ops / Blitz
|
|
524
|
+
if (name === 'blitz' || role.includes('mass ops') || role.includes('campaign')) {
|
|
525
|
+
return `
|
|
526
|
+
## How I Blitz
|
|
527
|
+
|
|
528
|
+
### Operating Rules
|
|
529
|
+
|
|
530
|
+
1. **Audit first.** Understand what needs to change before changing anything.
|
|
531
|
+
2. **Plan the waves.** Group related changes. Independent items run in parallel.
|
|
532
|
+
3. **Review before execute.** Every wave gets a sanity check.
|
|
533
|
+
4. **Atomic rollback.** If a wave fails, undo it cleanly.
|
|
534
|
+
|
|
535
|
+
### Blitz Format
|
|
536
|
+
|
|
537
|
+
| Wave | Items | Status | Notes |
|
|
538
|
+
|------|-------|--------|-------|
|
|
539
|
+
| 1 | Source changes (independent) | ⬜ | Parallel safe |
|
|
540
|
+
| 2 | Tests + dependent changes | ⬜ | Depends on Wave 1 |
|
|
541
|
+
| 3 | Docs + strategic | ⬜ | Depends on Wave 2 |
|
|
542
|
+
|
|
543
|
+
### Guardrails
|
|
544
|
+
|
|
545
|
+
- Never run mass operations without a plan
|
|
546
|
+
- Always verify tests pass after each wave
|
|
547
|
+
- Document what changed and why in the journal
|
|
548
|
+
`;
|
|
549
|
+
}
|
|
550
|
+
// Skill Audit
|
|
551
|
+
if (name === 'sensei' || role.includes('skill') && role.includes('audit')) {
|
|
552
|
+
return `
|
|
553
|
+
## How I Audit
|
|
554
|
+
|
|
555
|
+
### Always-On Duties
|
|
556
|
+
|
|
557
|
+
- Review agent charters for completeness and operational clarity
|
|
558
|
+
- Verify that every agent has: clear role, specific expertise, operational instructions
|
|
559
|
+
- Flag agents that are identity-only (no "how I work" specifics)
|
|
560
|
+
|
|
561
|
+
### Audit Criteria
|
|
562
|
+
|
|
563
|
+
- Does the charter tell the agent WHAT to do, not just WHO they are?
|
|
564
|
+
- Are there specific triggers (code changed → run tests)?
|
|
565
|
+
- Is the voice distinctive enough to guide behavior?
|
|
566
|
+
- Do operational instructions match the role's actual domain?
|
|
567
|
+
`;
|
|
568
|
+
}
|
|
569
|
+
return '';
|
|
570
|
+
}
|
|
156
571
|
function generateDecisionsMd(arch) {
|
|
157
572
|
return `# Decisions — ${arch.team.name}
|
|
158
573
|
|
|
@@ -186,25 +601,74 @@ ${skillSection}
|
|
|
186
601
|
}
|
|
187
602
|
function generateAgentsMd(arch, projectName) {
|
|
188
603
|
const name = projectName || arch.team.name;
|
|
604
|
+
const presetKey = arch.name?.toLowerCase() || '';
|
|
605
|
+
const isNeighborsPlus = presetKey !== 'dash';
|
|
189
606
|
const agentTable = arch.agents
|
|
190
607
|
.map((a) => `| ${a.name} | ${a.role} | ${a.expertise.slice(0, 2).join(', ')} |`)
|
|
191
608
|
.join('\n');
|
|
609
|
+
const neighborsPlus = isNeighborsPlus ? `
|
|
610
|
+
|
|
611
|
+
## Shorthand
|
|
612
|
+
|
|
613
|
+
When the builder says **"neighbors+"** they mean all presets at the neighbors level and above (currently: neighbors, sages, specialists — everything except dash). Apply the instruction to all matching presets.
|
|
614
|
+
|
|
615
|
+
## Reviewing Discussions & Source Docs
|
|
616
|
+
|
|
617
|
+
When asked to review a file or discussion, the full workflow is implicit: read it, create a branch, make edits, open a PR. The user should only need to say:
|
|
618
|
+
|
|
619
|
+
> Review \`https://github.com/org/repo/blob/main/path/to/file.md\`
|
|
620
|
+
|
|
621
|
+
If given a discussion URL instead of a file URL, find the source markdown (check for \`<!-- source: URL -->\` or a visible footer) and review that.
|
|
622
|
+
|
|
623
|
+
## Backend Development
|
|
624
|
+
|
|
625
|
+
This squad builds backends. Know these patterns:
|
|
626
|
+
|
|
627
|
+
- **Azure Functions** — the default compute for API and event-driven backends. Use the Functions programming model v4 for TypeScript/JavaScript, or the isolated worker model for .NET.
|
|
628
|
+
- **Event-driven patterns** — triggers (HTTP, Timer, Queue, Blob, Event Grid, Service Bus, Cosmos DB change feed) are first-class. Pick the right trigger for the workload.
|
|
629
|
+
- **API patterns** — HTTP triggers for REST APIs, Durable Functions for orchestration, SignalR bindings for real-time.
|
|
630
|
+
- **Azure skills bootstrap** — when the project needs Azure services (databases, storage, messaging, AI), use [aka.ms/azure-skills](https://aka.ms/azure-skills) to activate the relevant Copilot skills. Don't guess at Azure config — let the skills handle provisioning and deployment.
|
|
631
|
+
- **Infrastructure** — prefer \`azd\` (Azure Developer CLI) with Bicep for infrastructure-as-code. Use \`azd init\`, \`azd up\`, \`azd deploy\`.
|
|
632
|
+
` : '';
|
|
192
633
|
return `# AGENTS.md — ${name} Operating Instructions
|
|
193
634
|
|
|
194
635
|
> This file is read by AI agents working in this repository.
|
|
636
|
+
> **You are not just aware of the squad. You ARE the squad. Act accordingly.**
|
|
195
637
|
|
|
196
638
|
## You Are Part of a Squad
|
|
197
639
|
|
|
198
640
|
This repository uses [Squad](https://github.com/bradygaster/squad).
|
|
199
|
-
|
|
641
|
+
|
|
642
|
+
## Session Start — Do This First
|
|
643
|
+
|
|
644
|
+
Before responding to the user, complete this checklist:
|
|
200
645
|
|
|
201
646
|
1. **Read \`.squad/team.md\`** — Know the team and project context
|
|
202
647
|
2. **Read \`.squad/routing.md\`** — Route work to the right agent
|
|
203
|
-
3. **Read
|
|
204
|
-
4. **
|
|
205
|
-
5. **
|
|
206
|
-
6. **Update \`JOURNAL.md\`** after milestones — capture steering moments and key decisions
|
|
648
|
+
3. **Read \`.squad/decisions.md\`** — Respect existing decisions
|
|
649
|
+
4. **Identify your role** — Which squad member leads this task? Adopt their expertise, voice, and boundaries.
|
|
650
|
+
5. **Anticipate downstream** — Will this work need tests? Docs? Evals? Journal entry? Plan for those NOW, not as cleanup.
|
|
207
651
|
|
|
652
|
+
## Always-On Duties
|
|
653
|
+
|
|
654
|
+
These are not suggestions. They are standing orders for every session:
|
|
655
|
+
|
|
656
|
+
- **Code changed → check tests.** If implementation changed, testing must be considered.
|
|
657
|
+
- **Behavior changed → check docs.** If user-visible behavior shifted, docs must reflect it.
|
|
658
|
+
- **Decision made → log it.** Any trade-off or design choice goes in \`.squad/decisions.md\`.
|
|
659
|
+
- **Milestone reached → journal it.** Update \`JOURNAL.md\` with what happened and why.
|
|
660
|
+
- **Another role needed → activate it.** Don't wait to be asked. If docs need updating, be Quill. If tests are missing, be Lens.
|
|
661
|
+
|
|
662
|
+
## Before You Say "Done"
|
|
663
|
+
|
|
664
|
+
Do not end the session without verifying:
|
|
665
|
+
|
|
666
|
+
- [ ] \`.squad/decisions.md\` updated if any decisions were made
|
|
667
|
+
- [ ] \`JOURNAL.md\` updated if a milestone was reached
|
|
668
|
+
- [ ] Docs updated if user-visible behavior changed
|
|
669
|
+
- [ ] Tests considered if code changed
|
|
670
|
+
- [ ] Open risks or follow-ups explicitly stated
|
|
671
|
+
${neighborsPlus}
|
|
208
672
|
## Quick Reference
|
|
209
673
|
|
|
210
674
|
| Agent | Role | Ask them about... |
|
|
@@ -234,18 +698,41 @@ You are working in a repository using the **${arch.displayName}** squad preset.
|
|
|
234
698
|
- **Squad:** ${arch.displayName} (${arch.vibe})
|
|
235
699
|
- **Theme:** ${arch.theme}
|
|
236
700
|
|
|
237
|
-
##
|
|
701
|
+
## Session Start Protocol
|
|
702
|
+
|
|
703
|
+
Immediately after reading this file, before responding to the user:
|
|
704
|
+
|
|
705
|
+
1. Read \`.squad/team.md\`, \`.squad/routing.md\`, and \`.squad/decisions.md\`
|
|
706
|
+
2. Determine which squad member should lead this task
|
|
707
|
+
3. Check whether \`JOURNAL.md\` has recent entries — if stale, plan to update it
|
|
708
|
+
4. Identify downstream needs: will this work require tests? docs? evals? decisions? Include them in your plan.
|
|
709
|
+
|
|
710
|
+
## Non-Optional Operating Behaviors
|
|
711
|
+
|
|
712
|
+
These apply in **every session**, whether or not the user asks:
|
|
713
|
+
|
|
714
|
+
- **Code changed → tests reviewed.** Don't skip testing because it wasn't mentioned.
|
|
715
|
+
- **Behavior changed → docs updated.** If what the user sees changed, docs must change too.
|
|
716
|
+
- **Trade-off made → decision logged.** Record it in \`.squad/decisions.md\` with context and reasoning.
|
|
717
|
+
- **Milestone reached → journal updated.** \`JOURNAL.md\` captures the story, not just the code.
|
|
718
|
+
- **Another role's domain touched → activate that role.** Don't wait to be asked.
|
|
719
|
+
|
|
720
|
+
## Session Completion Gate
|
|
721
|
+
|
|
722
|
+
Before ending the session, verify:
|
|
238
723
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
4. Identify which agent you're acting as for this task
|
|
724
|
+
1. \`.squad/decisions.md\` — Updated if any decisions were made
|
|
725
|
+
2. \`JOURNAL.md\` — Updated if a milestone was reached
|
|
726
|
+
3. Relevant docs — Updated if user-visible behavior changed
|
|
727
|
+
4. Open risks or follow-ups — Explicitly called out, not silently dropped
|
|
244
728
|
|
|
245
|
-
After
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
729
|
+
## First Session After Init
|
|
730
|
+
|
|
731
|
+
If this is the first working session after squad initialization:
|
|
732
|
+
|
|
733
|
+
1. Update project context above (Owner, Stack, Description)
|
|
734
|
+
2. Record the first real decision in \`.squad/decisions.md\`
|
|
735
|
+
3. Start the build story in \`JOURNAL.md\` — capture what's being built and why
|
|
249
736
|
`;
|
|
250
737
|
}
|
|
251
738
|
function generateCopilotInstructions(arch) {
|
|
@@ -269,6 +756,23 @@ function generateCopilotInstructions(arch) {
|
|
|
269
756
|
- Adopt their expertise, voice, and boundaries
|
|
270
757
|
- Log significant decisions to \`.squad/decisions.md\` after completing work
|
|
271
758
|
|
|
759
|
+
## Proactive Quality Triggers
|
|
760
|
+
|
|
761
|
+
These fire automatically — they are not optional:
|
|
762
|
+
|
|
763
|
+
| Trigger | Action |
|
|
764
|
+
|---------|--------|
|
|
765
|
+
| Code changed | Review tests — are they still correct and sufficient? |
|
|
766
|
+
| User-visible behavior changed | Update docs and README if affected |
|
|
767
|
+
| Prompt or agent behavior changed | Review eval baselines |
|
|
768
|
+
| Important trade-off made | Log decision to \`.squad/decisions.md\` |
|
|
769
|
+
| Meaningful milestone reached | Update \`JOURNAL.md\` with what happened and why |
|
|
770
|
+
| Another role's expertise needed | Activate that role — don't wait to be asked |
|
|
771
|
+
|
|
772
|
+
## Before You Respond With "Done"
|
|
773
|
+
|
|
774
|
+
Verify that all triggered duties above were handled or explicitly called out as deferred. Do not silently skip them.
|
|
775
|
+
|
|
272
776
|
## Managing This Squad
|
|
273
777
|
|
|
274
778
|
This squad was created with [snap-squad](https://github.com/paulyuk/snap-squad).
|
|
@@ -285,33 +789,86 @@ Available presets: ${presetList}
|
|
|
285
789
|
function generateJournalMd(arch, projectName) {
|
|
286
790
|
const name = projectName || arch.team.name;
|
|
287
791
|
const date = new Date().toISOString().split('T')[0];
|
|
792
|
+
const agentNames = arch.agents.map(a => a.name).join(', ');
|
|
288
793
|
return `# JOURNAL.md — Build Story
|
|
289
794
|
|
|
290
795
|
> How this project was built, the steering moments that shaped it, and why things are the way they are.
|
|
291
|
-
> Maintained by
|
|
796
|
+
> Maintained by **Ledger** (Historian / Build Journalist). Update after milestones.
|
|
292
797
|
|
|
293
798
|
---
|
|
294
799
|
|
|
295
800
|
## ${date} — Project Bootstrapped
|
|
296
801
|
|
|
297
|
-
|
|
802
|
+
**Squad:** ${arch.displayName} · **Vibe:** ${arch.vibe} · **Theme:** ${arch.theme}
|
|
298
803
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
- **Created with:** \`npx snap-squad init\`
|
|
804
|
+
### The Team
|
|
805
|
+
|
|
806
|
+
${agentNames}
|
|
303
807
|
|
|
304
808
|
### What Happened
|
|
305
809
|
|
|
306
|
-
Project initialized with the
|
|
810
|
+
Project initialized with the **${arch.displayName}** squad preset via \`npx snap-squad init\`. The full \`.squad/\` directory, hook chain (AGENTS.md, CLAUDE.md, copilot-instructions.md), and this journal were generated automatically.
|
|
811
|
+
|
|
812
|
+
### Steering Moment
|
|
813
|
+
|
|
814
|
+
The builder chose **${arch.name}** — ${arch.description.toLowerCase().replace(/\.\s*$/, '')}. This shapes everything that follows: who reviews code, how decisions get made, what gets tested first.
|
|
815
|
+
|
|
816
|
+
### What's Next
|
|
817
|
+
|
|
818
|
+
- [ ] First real feature or task
|
|
819
|
+
- [ ] Builder configures project context in \`.squad/team.md\`
|
|
820
|
+
- [ ] First decision logged to \`.squad/decisions.md\`
|
|
821
|
+
|
|
822
|
+
---
|
|
823
|
+
|
|
824
|
+
## How to Use This Journal
|
|
825
|
+
|
|
826
|
+
> *Ledger's guide for the builder and future contributors.*
|
|
827
|
+
|
|
828
|
+
This isn't a changelog. It's the **story of how the project was built** — the decisions, the pivots, the moments where the builder steered the squad in a new direction.
|
|
829
|
+
|
|
830
|
+
### What to capture
|
|
831
|
+
|
|
832
|
+
| Entry Type | When | Example |
|
|
833
|
+
|-----------|------|---------|
|
|
834
|
+
| **Steering Moment** | Builder redirects the squad | "Switched from REST to GraphQL after seeing the query complexity" |
|
|
835
|
+
| **Key Decision** | Trade-off was made | "Chose SQLite over Postgres — this is a CLI tool, not a service" |
|
|
836
|
+
| **Evolution** | Architecture shifted | "Split monolith into 3 modules after hitting circular deps" |
|
|
837
|
+
| **Milestone** | Something shipped | "v0.1.0 published to npm — first public release" |
|
|
838
|
+
| **Lesson Learned** | Something surprised you | "Vitest runs 10x faster than Jest for this project — switching permanently" |
|
|
839
|
+
|
|
840
|
+
### Template for new entries
|
|
841
|
+
|
|
842
|
+
\`\`\`markdown
|
|
843
|
+
## YYYY-MM-DD — Title
|
|
844
|
+
|
|
845
|
+
### What Happened
|
|
846
|
+
|
|
847
|
+
(What was built, changed, or decided)
|
|
848
|
+
|
|
849
|
+
### Why
|
|
850
|
+
|
|
851
|
+
(The reasoning — what alternatives existed, what trade-offs were made)
|
|
852
|
+
|
|
853
|
+
### Steering Moment
|
|
854
|
+
|
|
855
|
+
(How the builder directed the work — what prompt, feedback, or redirection shaped the outcome)
|
|
856
|
+
|
|
857
|
+
### Impact
|
|
858
|
+
|
|
859
|
+
(What this changes going forward)
|
|
860
|
+
\`\`\`
|
|
307
861
|
|
|
308
|
-
###
|
|
862
|
+
### Rules
|
|
309
863
|
|
|
310
|
-
|
|
864
|
+
1. **Write for future-you.** Six months from now, this journal explains *why* the code looks the way it does.
|
|
865
|
+
2. **Capture the steering, not the typing.** The git log shows what changed. The journal shows *why it changed*.
|
|
866
|
+
3. **Be honest about pivots.** The best journals include "we tried X, it didn't work, here's why we switched to Y."
|
|
867
|
+
4. **Update after milestones, not after every commit.** Quality over quantity.
|
|
311
868
|
|
|
312
869
|
---
|
|
313
870
|
|
|
314
|
-
*
|
|
871
|
+
*The code shows what was built. The journal shows why.*
|
|
315
872
|
`;
|
|
316
873
|
}
|
|
317
874
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAE1C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AASpD,6CAA6C;AAC7C,SAAS,QAAQ,CAAC,KA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AW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,qCAAqC,CAAC;IAE3G,OAAO,4BAA4B,IAAI,CAAC,IAAI,CAAC,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA6C9B,UAAU;CAC9B,CAAC;AACF,CAAC;AAED,SAAS,iBAAiB,CAAC,IAAY,EAAE,WAAoB;IAC3D,MAAM,IAAI,GAAG,WAAW,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC3C,MAAM,IAAI,GAAG,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,UAAU,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE3D,OAAO;;;;;;;KAOJ,IAAI;;aAEI,IAAI,CAAC,WAAW,gBAAgB,IAAI,CAAC,IAAI,iBAAiB,IAAI,CAAC,KAAK;;;;EAI/E,UAAU;;;;iCAIqB,IAAI,CAAC,WAAW;;;;sBAI3B,IAAI,CAAC,IAAI,QAAQ,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0D1F,CAAC;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -70,10 +70,10 @@ agents:
|
|
|
70
70
|
|
|
71
71
|
- name: Ledger
|
|
72
72
|
role: Historian / Build Journalist
|
|
73
|
-
description:
|
|
74
|
-
expertise: [build journals, decision history,
|
|
75
|
-
style: Narrative,
|
|
76
|
-
voice: "Every project has a story. The commits tell what happened, but only the journal tells why. If nobody writes it down, the reasoning dies with the session."
|
|
73
|
+
description: "Writes the 'How Was This Built?' story: timestamped steering logs, human commands, AI responses, Level-Up moments, and pivots. Uses git log as source of truth."
|
|
74
|
+
expertise: [build journals, steering logs, decision history, git log archaeology, commit storytelling, timestamped session reconstruction, JOURNAL.md]
|
|
75
|
+
style: "Narrative journalist — timestamps, real quotes, honest about mistakes. Uses tables with columns: Time | Steering Command | What Happened | Level-Up"
|
|
76
|
+
voice: "Every project has a story. The commits tell what happened, but only the journal tells why. I write timestamped steering logs — the human's exact commands, what the AI did, and the Level-Up moment that made it matter. If nobody writes it down, the reasoning dies with the session."
|
|
77
77
|
|
|
78
78
|
routing:
|
|
79
79
|
rules:
|