snap-squad 0.1.0 → 0.4.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.
@@ -1,162 +1,170 @@
1
- import { mkdirSync, writeFileSync } from 'node:fs';
2
- import { join } from 'node:path';
1
+ import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
2
+ import { join, dirname } from 'node:path';
3
+ import { listPresets } from '../registry/loader.js';
4
+ // Sanitize user input for markdown templates
5
+ function sanitize(input) {
6
+ return input.replace(/[[\](){}|`*_~<>#]/g, '\\$&');
7
+ }
3
8
  export function generateSquad(options) {
4
9
  const { targetDir, preset, projectName, owner } = options;
10
+ const safeName = projectName ? sanitize(projectName) : undefined;
11
+ const safeOwner = owner ? sanitize(owner) : undefined;
5
12
  const squadDir = join(targetDir, '.squad');
6
13
  const githubDir = join(targetDir, '.github');
7
- const created = [];
8
- // Create directories
9
- mkdirSync(squadDir, { recursive: true });
10
- mkdirSync(githubDir, { recursive: true });
14
+ // Phase 1: Generate all content in memory (no I/O)
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' });
11
18
  for (const agent of preset.agents) {
12
- mkdirSync(join(squadDir, 'agents', agent.name.toLowerCase()), { recursive: true });
19
+ files.push({
20
+ path: join(squadDir, 'agents', agent.name.toLowerCase(), 'charter.md'),
21
+ content: generateCharter(agent),
22
+ label: `.squad/agents/${agent.name.toLowerCase()}/charter.md`,
23
+ });
13
24
  }
14
- // Generate team.md
15
- const teamMd = generateTeamMd(preset, projectName, owner);
16
- writeFileSync(join(squadDir, 'team.md'), teamMd);
17
- created.push('.squad/team.md');
18
- // Generate routing.md
19
- const routingMd = generateRoutingMd(preset);
20
- writeFileSync(join(squadDir, 'routing.md'), routingMd);
21
- created.push('.squad/routing.md');
22
- // Generate agent charters
23
- for (const agent of preset.agents) {
24
- const charter = generateCharter(agent);
25
- const charterPath = join(squadDir, 'agents', agent.name.toLowerCase(), 'charter.md');
26
- writeFileSync(charterPath, charter);
27
- created.push(`.squad/agents/${agent.name.toLowerCase()}/charter.md`);
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' });
31
+ // Phase 2: Create directories
32
+ const dirs = new Set(files.map(f => dirname(f.path)));
33
+ for (const dir of dirs) {
34
+ try {
35
+ mkdirSync(dir, { recursive: true });
36
+ }
37
+ catch (err) {
38
+ const message = err instanceof Error ? err.message : String(err);
39
+ throw new Error(`Failed to create directory "${dir}": ${message}`);
40
+ }
41
+ }
42
+ // Phase 3: Write all files (with error context)
43
+ const written = [];
44
+ try {
45
+ for (const { path, content, label } of files) {
46
+ writeFileSync(path, content);
47
+ written.push(label);
48
+ }
49
+ }
50
+ catch (err) {
51
+ // Rollback: remove .squad/ if we created it
52
+ try {
53
+ rmSync(squadDir, { recursive: true, force: true });
54
+ }
55
+ catch { }
56
+ const message = err instanceof Error ? err.message : String(err);
57
+ throw new Error(`Squad generation failed after writing ${written.length}/${files.length} files: ${message}`);
28
58
  }
29
- // Generate decisions.md
30
- const decisionsMd = generateDecisionsMd(preset);
31
- writeFileSync(join(squadDir, 'decisions.md'), decisionsMd);
32
- created.push('.squad/decisions.md');
33
- // Generate mcp-config.md
34
- const mcpMd = generateMcpConfigMd(preset);
35
- writeFileSync(join(squadDir, 'mcp-config.md'), mcpMd);
36
- created.push('.squad/mcp-config.md');
37
- // Generate hook chain: AGENTS.md, CLAUDE.md, .github/copilot-instructions.md
38
- const agentsMd = generateAgentsMd(preset, projectName);
39
- writeFileSync(join(targetDir, 'AGENTS.md'), agentsMd);
40
- created.push('AGENTS.md');
41
- const claudeMd = generateClaudeMd(preset, projectName, owner);
42
- writeFileSync(join(targetDir, 'CLAUDE.md'), claudeMd);
43
- created.push('CLAUDE.md');
44
- const copilotMd = generateCopilotInstructions(preset);
45
- writeFileSync(join(githubDir, 'copilot-instructions.md'), copilotMd);
46
- created.push('.github/copilot-instructions.md');
47
- // Generate JOURNAL.md (Ledger's home)
48
- const journalMd = generateJournalMd(preset, projectName);
49
- writeFileSync(join(targetDir, 'JOURNAL.md'), journalMd);
50
- created.push('JOURNAL.md');
51
- return created;
59
+ return written;
52
60
  }
53
61
  function generateTeamMd(arch, projectName, owner) {
54
62
  const name = projectName || arch.team.name;
55
63
  const agentRows = arch.agents
56
64
  .map((a) => `| ${a.name} | ${a.role} | \`.squad/agents/${a.name.toLowerCase()}/charter.md\` | ✅ Active |`)
57
65
  .join('\n');
58
- return `# ${arch.team.name} — ${name}
59
-
60
- > ${arch.team.description}
61
-
62
- ## Coordinator
63
-
64
- | Name | Role | Notes |
65
- |------|------|-------|
66
- | Squad | Coordinator | Routes work, enforces handoffs and reviewer gates. Does not generate domain artifacts. |
67
-
68
- ## Members
69
-
70
- | Name | Role | Charter | Status |
71
- |------|------|---------|--------|
72
- ${agentRows}
73
- | Scribe | Session Logger | \`.squad/agents/scribe/charter.md\` | 📋 Silent |
74
-
75
- ## Coding Agent
76
-
77
- <!-- copilot-auto-assign: false -->
78
-
79
- | Name | Role | Charter | Status |
80
- |------|------|---------|--------|
81
- | @copilot | Coding Agent | — | 🤖 Coding Agent |
82
-
83
- ## Project Context
84
-
85
- - **Owner:** ${owner || 'unknown'}
86
- - **Stack:** (configure after init)
87
- - **Description:** ${arch.description}
88
- - **Universe:** ${arch.theme}
89
- - **Created:** ${new Date().toISOString().split('T')[0]}
66
+ return `# ${arch.team.name} — ${name}
67
+
68
+ > ${arch.team.description}
69
+
70
+ ## Coordinator
71
+
72
+ | Name | Role | Notes |
73
+ |------|------|-------|
74
+ | Squad | Coordinator | Routes work, enforces handoffs and reviewer gates. Does not generate domain artifacts. |
75
+
76
+ ## Members
77
+
78
+ | Name | Role | Charter | Status |
79
+ |------|------|---------|--------|
80
+ ${agentRows}
81
+ | Scribe | Session Logger | \`.squad/agents/scribe/charter.md\` | 📋 Silent |
82
+
83
+ ## Coding Agent
84
+
85
+ <!-- copilot-auto-assign: false -->
86
+
87
+ | Name | Role | Charter | Status |
88
+ |------|------|---------|--------|
89
+ | @copilot | Coding Agent | — | 🤖 Coding Agent |
90
+
91
+ ## Project Context
92
+
93
+ - **Owner:** ${owner || 'unknown'}
94
+ - **Stack:** (configure after init)
95
+ - **Description:** ${arch.description}
96
+ - **Universe:** ${arch.theme}
97
+ - **Created:** ${new Date().toISOString().split('T')[0]}
90
98
  `;
91
99
  }
92
100
  function generateRoutingMd(arch) {
93
101
  const rows = arch.routing.rules
94
102
  .map((r) => `| ${r.pattern} | ${r.agent} | ${r.description} |`)
95
103
  .join('\n');
96
- return `# Routing Rules — ${arch.team.name}
97
-
98
- ## Work Type → Agent
99
-
100
- | Work Type | Agent | Examples |
101
- |-----------|-------|---------|
102
- ${rows}
103
-
104
- ## Routing Principles
105
-
106
- 1. **Eager by default** — spawn agents who could usefully start work.
107
- 2. **Scribe always runs** after substantial work, in background. Never blocks.
108
- 3. **Quick facts → coordinator answers directly.** Don't spawn for trivial questions.
109
- 4. **Two agents could handle it** → pick the one whose domain is the primary concern.
110
- 5. **Anticipate downstream.** Feature being built? Spawn tester simultaneously.
104
+ return `# Routing Rules — ${arch.team.name}
105
+
106
+ ## Work Type → Agent
107
+
108
+ | Work Type | Agent | Examples |
109
+ |-----------|-------|---------|
110
+ ${rows}
111
+
112
+ ## Routing Principles
113
+
114
+ 1. **Eager by default** — spawn agents who could usefully start work.
115
+ 2. **Scribe always runs** after substantial work, in background. Never blocks.
116
+ 3. **Quick facts → coordinator answers directly.** Don't spawn for trivial questions.
117
+ 4. **Two agents could handle it** → pick the one whose domain is the primary concern.
118
+ 5. **Anticipate downstream.** Feature being built? Spawn tester simultaneously.
111
119
  `;
112
120
  }
113
121
  function generateCharter(agent) {
114
- return `# ${agent.name} — ${agent.role}
115
-
116
- > ${agent.description}
117
-
118
- ## Identity
119
-
120
- - **Name:** ${agent.name}
121
- - **Role:** ${agent.role}
122
- - **Expertise:** ${agent.expertise.join(', ')}
123
- - **Style:** ${agent.style}
124
-
125
- ## How I Work
126
-
127
- - Follow routing rules — handle my domain, defer others
128
- - Check \`.squad/decisions.md\` before starting work
129
- - Log decisions after completing work
130
- - If unsure, say so and suggest who might know
131
-
132
- ## Voice
133
-
134
- ${agent.voice}
135
-
136
- ## Model
137
-
138
- - **Preferred:** auto
139
- - **Fallback:** Standard chain
140
-
141
- ## Collaboration
142
-
143
- Before starting work, read \`.squad/decisions.md\` for team decisions that affect me.
144
- After making a decision others should know, log it to \`.squad/decisions.md\`.
145
- If I need another team member's input, say so — the coordinator will bring them in.
122
+ return `# ${agent.name} — ${agent.role}
123
+
124
+ > ${agent.description}
125
+
126
+ ## Identity
127
+
128
+ - **Name:** ${agent.name}
129
+ - **Role:** ${agent.role}
130
+ - **Expertise:** ${agent.expertise.join(', ')}
131
+ - **Style:** ${agent.style}
132
+
133
+ ## How I Work
134
+
135
+ - Follow routing rules — handle my domain, defer others
136
+ - Check \`.squad/decisions.md\` before starting work
137
+ - Log decisions after completing work
138
+ - If unsure, say so and suggest who might know
139
+
140
+ ## Voice
141
+
142
+ ${agent.voice}
143
+
144
+ ## Model
145
+
146
+ - **Preferred:** auto
147
+ - **Fallback:** Standard chain
148
+
149
+ ## Collaboration
150
+
151
+ Before starting work, read \`.squad/decisions.md\` for team decisions that affect me.
152
+ After making a decision others should know, log it to \`.squad/decisions.md\`.
153
+ If I need another team member's input, say so — the coordinator will bring them in.
146
154
  `;
147
155
  }
148
156
  function generateDecisionsMd(arch) {
149
- return `# Decisions — ${arch.team.name}
150
-
151
- > Significant decisions made during development. Check before starting work.
152
-
153
- ## Active Decisions
154
-
155
- ### D-001: Squad initialized with ${arch.displayName} preset
156
- - **By:** snap-squad
157
- - **Date:** ${new Date().toISOString().split('T')[0]}
158
- - **Context:** Project initialized using snap-squad warm-start
159
- - **Decision:** Using the "${arch.name}" preset (${arch.vibe} vibe, ${arch.theme} theme)
157
+ return `# Decisions — ${arch.team.name}
158
+
159
+ > Significant decisions made during development. Check before starting work.
160
+
161
+ ## Active Decisions
162
+
163
+ ### D-001: Squad initialized with ${arch.displayName} preset
164
+ - **By:** snap-squad
165
+ - **Date:** ${new Date().toISOString().split('T')[0]}
166
+ - **Context:** Project initialized using snap-squad warm-start
167
+ - **Decision:** Using the "${arch.name}" preset (${arch.vibe} vibe, ${arch.theme} theme)
160
168
  `;
161
169
  }
162
170
  function generateMcpConfigMd(arch) {
@@ -165,15 +173,15 @@ function generateMcpConfigMd(arch) {
165
173
  const skillList = arch.skills.map((s) => `- **${s.name}** — ${s.description}`).join('\n');
166
174
  skillSection = `\n## Available Skills\n\n${skillList}\n`;
167
175
  }
168
- return `# MCP Integration — ${arch.team.name}
169
-
170
- MCP (Model Context Protocol) servers extend the squad with external tools.
171
- ${skillSection}
172
- ## Config Locations
173
-
174
- 1. **Repository-level:** \`.copilot/mcp-config.json\`
175
- 2. **Workspace-level:** \`.vscode/mcp.json\`
176
- 3. **User-level:** \`~/.copilot/mcp-config.json\`
176
+ return `# MCP Integration — ${arch.team.name}
177
+
178
+ MCP (Model Context Protocol) servers extend the squad with external tools.
179
+ ${skillSection}
180
+ ## Config Locations
181
+
182
+ 1. **Repository-level:** \`.copilot/mcp-config.json\`
183
+ 2. **Workspace-level:** \`.vscode/mcp.json\`
184
+ 3. **User-level:** \`~/.copilot/mcp-config.json\`
177
185
  `;
178
186
  }
179
187
  function generateAgentsMd(arch, projectName) {
@@ -181,127 +189,129 @@ function generateAgentsMd(arch, projectName) {
181
189
  const agentTable = arch.agents
182
190
  .map((a) => `| ${a.name} | ${a.role} | ${a.expertise.slice(0, 2).join(', ')} |`)
183
191
  .join('\n');
184
- return `# AGENTS.md — ${name} Operating Instructions
185
-
186
- > This file is read by AI agents working in this repository.
187
-
188
- ## You Are Part of a Squad
189
-
190
- This repository uses [Squad](https://github.com/bradygaster/squad).
191
- Before doing any work, read and follow the squad configuration:
192
-
193
- 1. **Read \`.squad/team.md\`** — Know the team and project context
194
- 2. **Read \`.squad/routing.md\`** — Route work to the right agent
195
- 3. **Read agent charters in \`.squad/agents/*/charter.md\`** — Understand expertise and boundaries
196
- 4. **Check \`.squad/decisions.md\`** — Review existing decisions
197
- 5. **Check \`.squad/mcp-config.md\`** — Know available tools
198
- 6. **Update \`JOURNAL.md\`** after milestones — capture steering moments and key decisions
199
-
200
- ## Quick Reference
201
-
202
- | Agent | Role | Ask them about... |
203
- |-------|------|-------------------|
204
- ${agentTable}
205
-
206
- ## Preset: ${arch.displayName}
207
-
208
- ${arch.description}
192
+ return `# AGENTS.md — ${name} Operating Instructions
193
+
194
+ > This file is read by AI agents working in this repository.
195
+
196
+ ## You Are Part of a Squad
197
+
198
+ This repository uses [Squad](https://github.com/bradygaster/squad).
199
+ Before doing any work, read and follow the squad configuration:
200
+
201
+ 1. **Read \`.squad/team.md\`** — Know the team and project context
202
+ 2. **Read \`.squad/routing.md\`** — Route work to the right agent
203
+ 3. **Read agent charters in \`.squad/agents/*/charter.md\`** — Understand expertise and boundaries
204
+ 4. **Check \`.squad/decisions.md\`** — Review existing decisions
205
+ 5. **Check \`.squad/mcp-config.md\`** — Know available tools
206
+ 6. **Update \`JOURNAL.md\`** after milestones — capture steering moments and key decisions
207
+
208
+ ## Quick Reference
209
+
210
+ | Agent | Role | Ask them about... |
211
+ |-------|------|-------------------|
212
+ ${agentTable}
213
+
214
+ ## Preset: ${arch.displayName}
215
+
216
+ ${arch.description}
209
217
  `;
210
218
  }
211
219
  function generateClaudeMd(arch, projectName, owner) {
212
220
  const name = projectName || arch.team.name;
213
- return `# CLAUDE.md — ${name} Session Memory
214
-
215
- > Read this at the start of every session. Update when context changes.
216
-
217
- ## Identity
218
-
219
- You are working in a repository using the **${arch.displayName}** squad preset.
220
-
221
- **You are part of a squad.** Read \`.squad/team.md\` for the full roster.
222
-
223
- ## Project Context
224
-
225
- - **Owner:** ${owner || 'unknown'}
226
- - **Squad:** ${arch.displayName} (${arch.vibe})
227
- - **Theme:** ${arch.theme}
228
-
229
- ## Squad Operating Rules
230
-
231
- Before starting work:
232
- 1. Read \`.squad/team.md\` — know the team
233
- 2. Read \`.squad/routing.md\` — route work correctly
234
- 3. Check \`.squad/decisions.md\` — respect existing decisions
235
- 4. Identify which agent you're acting as for this task
236
-
237
- After completing work:
238
- 1. Log decisions to \`.squad/decisions.md\`
239
- 2. Update \`JOURNAL.md\` with what happened and why
240
- 3. Update relevant docs if behavior changed
221
+ return `# CLAUDE.md — ${name} Session Memory
222
+
223
+ > Read this at the start of every session. Update when context changes.
224
+
225
+ ## Identity
226
+
227
+ You are working in a repository using the **${arch.displayName}** squad preset.
228
+
229
+ **You are part of a squad.** Read \`.squad/team.md\` for the full roster.
230
+
231
+ ## Project Context
232
+
233
+ - **Owner:** ${owner || 'unknown'}
234
+ - **Squad:** ${arch.displayName} (${arch.vibe})
235
+ - **Theme:** ${arch.theme}
236
+
237
+ ## Squad Operating Rules
238
+
239
+ Before starting work:
240
+ 1. Read \`.squad/team.md\` — know the team
241
+ 2. Read \`.squad/routing.md\` — route work correctly
242
+ 3. Check \`.squad/decisions.md\` — respect existing decisions
243
+ 4. Identify which agent you're acting as for this task
244
+
245
+ After completing work:
246
+ 1. Log decisions to \`.squad/decisions.md\`
247
+ 2. Update \`JOURNAL.md\` with what happened and why
248
+ 3. Update relevant docs if behavior changed
241
249
  `;
242
250
  }
243
251
  function generateCopilotInstructions(arch) {
244
- return `# Copilot Instructions — ${arch.team.name}
245
-
246
- > **You are part of a squad.** This repository uses multi-agent team coordination.
247
-
248
- ## On Every Session
249
-
250
- 1. Read \`AGENTS.md\` at repo root for universal squad instructions
251
- 2. Read \`CLAUDE.md\` at repo root for session memory and project context
252
- 3. Read \`.squad/team.md\` for the full team roster
253
- 4. Read \`.squad/routing.md\` for work routing rules
254
- 5. Check \`.squad/decisions.md\` before starting work
255
-
256
- ## Squad-Aware Behavior
257
-
258
- - Identify which squad member is best suited for the current task
259
- - Adopt their expertise, voice, and boundaries
260
- - Log significant decisions to \`.squad/decisions.md\` after completing work
261
-
262
- ## Managing This Squad
263
-
264
- This squad was created with [snap-squad](https://github.com/paulyuk/snap-squad).
265
- If the user asks to change, reset, or switch their squad:
266
-
267
- \`\`\`bash
268
- npx snap-squad init --type <preset> --force # switch to a different preset
269
- npx snap-squad list # see available presets
270
- \`\`\`
271
-
272
- Available presets: neighbors (general), dash (speed), sages (mentor), artisans (specialists)
252
+ const presetNames = listPresets();
253
+ const presetList = presetNames.length > 0 ? presetNames.join(', ') : 'neighbors, dash, sages, specialists';
254
+ return `# Copilot Instructions ${arch.team.name}
255
+
256
+ > **You are part of a squad.** This repository uses multi-agent team coordination.
257
+
258
+ ## On Every Session
259
+
260
+ 1. Read \`AGENTS.md\` at repo root for universal squad instructions
261
+ 2. Read \`CLAUDE.md\` at repo root for session memory and project context
262
+ 3. Read \`.squad/team.md\` for the full team roster
263
+ 4. Read \`.squad/routing.md\` for work routing rules
264
+ 5. Check \`.squad/decisions.md\` before starting work
265
+
266
+ ## Squad-Aware Behavior
267
+
268
+ - Identify which squad member is best suited for the current task
269
+ - Adopt their expertise, voice, and boundaries
270
+ - Log significant decisions to \`.squad/decisions.md\` after completing work
271
+
272
+ ## Managing This Squad
273
+
274
+ This squad was created with [snap-squad](https://github.com/paulyuk/snap-squad).
275
+ If the user asks to change, reset, or switch their squad:
276
+
277
+ \`\`\`bash
278
+ npx snap-squad init --type <preset> --force # switch to a different preset
279
+ npx snap-squad list # see available presets
280
+ \`\`\`
281
+
282
+ Available presets: ${presetList}
273
283
  `;
274
284
  }
275
285
  function generateJournalMd(arch, projectName) {
276
286
  const name = projectName || arch.team.name;
277
287
  const date = new Date().toISOString().split('T')[0];
278
- return `# JOURNAL.md — Build Story
279
-
280
- > How this project was built, the steering moments that shaped it, and why things are the way they are.
281
- > Maintained by the Historian / Build Journalist. Update after milestones.
282
-
283
- ---
284
-
285
- ## ${date} — Project Bootstrapped
286
-
287
- ### Setup
288
-
289
- - **Squad:** ${arch.displayName} (${arch.vibe})
290
- - **Preset:** ${arch.name}
291
- - **Theme:** ${arch.theme}
292
- - **Created with:** \`npx snap-squad init\`
293
-
294
- ### What Happened
295
-
296
- Project initialized with the ${arch.displayName} squad preset. The full \`.squad/\` directory, hook chain (AGENTS.md, CLAUDE.md, copilot-instructions.md), and this journal were generated automatically.
297
-
298
- ### Next
299
-
300
- Start building. Update this journal as the project evolves — capture steering moments, key decisions, and the reasoning behind changes.
301
-
302
- ---
303
-
304
- *Keep this journal alive. The code shows what was built. The journal shows why.*
288
+ return `# JOURNAL.md — Build Story
289
+
290
+ > How this project was built, the steering moments that shaped it, and why things are the way they are.
291
+ > Maintained by the Historian / Build Journalist. Update after milestones.
292
+
293
+ ---
294
+
295
+ ## ${date} — Project Bootstrapped
296
+
297
+ ### Setup
298
+
299
+ - **Squad:** ${arch.displayName} (${arch.vibe})
300
+ - **Preset:** ${arch.name}
301
+ - **Theme:** ${arch.theme}
302
+ - **Created with:** \`npx snap-squad init\`
303
+
304
+ ### What Happened
305
+
306
+ Project initialized with the ${arch.displayName} squad preset. The full \`.squad/\` directory, hook chain (AGENTS.md, CLAUDE.md, copilot-instructions.md), and this journal were generated automatically.
307
+
308
+ ### Next
309
+
310
+ Start building. Update this journal as the project evolves — capture steering moments, key decisions, and the reasoning behind changes.
311
+
312
+ ---
313
+
314
+ *Keep this journal alive. The code shows what was built. The journal shows why.*
305
315
  `;
306
316
  }
307
317
  //# 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,SAAS,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAUjC,MAAM,UAAU,aAAa,CAAC,OAAwB;IACpD,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,OAAO,CAAC;IAC1D,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAa,EAAE,CAAC;IAE7B,qBAAqB;IACrB,SAAS,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACzC,SAAS,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC1C,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IACrF,CAAC;IAED,mBAAmB;IACnB,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,CAAC;IAC1D,aAAa,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,MAAM,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;IAE/B,sBAAsB;IACtB,MAAM,SAAS,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IA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;eAM/C,KAAK,IAAI,SAAS;eAClB,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI;eAC9B,IAAI,CAAC,KAAK;;;;;;;;;;;;;;CAcxB,CAAC;AACF,CAAC;AAED,SAAS,2BAA2B,CAAC,IAAY;IAC/C,MAAM,WAAW,GAAG,WAAW,EAAE,CAAC;IAClC,MAAM,UAAU,GAAG,WAAW,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA4B9B,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;IAEpD,OAAO;;;;;;;KAOJ,IAAI;;;;eAIM,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI;gBAC7B,IAAI,CAAC,IAAI;eACV,IAAI,CAAC,KAAK;;;;;+BAKM,IAAI,CAAC,WAAW;;;;;;;;;CAS9C,CAAC;AACF,CAAC"}
package/dist/matcher.d.ts CHANGED
@@ -1,8 +1,13 @@
1
- interface PresetMatch {
1
+ export interface KeywordMatch {
2
+ keyword: string;
3
+ preset: string;
4
+ weight: number;
5
+ }
6
+ export interface PresetMatch {
2
7
  preset: string;
3
8
  score: number;
4
9
  why: string;
10
+ matchedKeywords: KeywordMatch[];
5
11
  }
6
12
  export declare function matchPreset(description: string): PresetMatch;
7
- export {};
8
13
  //# sourceMappingURL=matcher.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../src/matcher.ts"],"names":[],"mappings":"AAAA,UAAU,WAAW;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAwDD,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAuC5D"}
1
+ {"version":3,"file":"matcher.d.ts","sourceRoot":"","sources":["../src/matcher.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,eAAe,EAAE,YAAY,EAAE,CAAC;CACjC;AA0FD,wBAAgB,WAAW,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,CAoC5D"}