@vpxa/aikit 0.1.74 → 0.1.75

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.
Files changed (134) hide show
  1. package/package.json +6 -1
  2. package/packages/cli/dist/index.js +2 -2
  3. package/packages/cli/dist/{init-DQkar6Es.js → init-CuRXmyD9.js} +1 -1
  4. package/packages/cli/dist/scaffold-WMQ2uQ48.js +2 -0
  5. package/packages/cli/dist/{user-CopNWxHP.js → user-vbJwa7x2.js} +1 -1
  6. package/scaffold/dist/adapters/claude-code.mjs +4 -0
  7. package/scaffold/dist/adapters/copilot.mjs +75 -0
  8. package/scaffold/dist/adapters/flows.mjs +1 -0
  9. package/scaffold/dist/adapters/skills.mjs +1 -0
  10. package/scaffold/{compiled → dist/compiled}/flows-data.mjs +304 -446
  11. package/scaffold/{compiled → dist/compiled}/skills-data.mjs +554 -2281
  12. package/scaffold/dist/definitions/agents.mjs +9 -0
  13. package/scaffold/{definitions → dist/definitions}/bodies.mjs +6 -229
  14. package/scaffold/dist/definitions/exclusions.mjs +1 -0
  15. package/scaffold/dist/definitions/hooks.mjs +1 -0
  16. package/scaffold/dist/definitions/models.mjs +1 -0
  17. package/scaffold/dist/definitions/plugins.mjs +1 -0
  18. package/scaffold/{definitions → dist/definitions}/prompts.mjs +9 -149
  19. package/scaffold/{definitions → dist/definitions}/protocols.mjs +9 -37
  20. package/scaffold/dist/definitions/tools.mjs +1 -0
  21. package/packages/cli/dist/scaffold-ukCDW3wQ.js +0 -2
  22. package/scaffold/_preview/agents/Architect-Reviewer-Alpha.agent.md +0 -132
  23. package/scaffold/_preview/agents/Architect-Reviewer-Beta.agent.md +0 -132
  24. package/scaffold/_preview/agents/Code-Reviewer-Alpha.agent.md +0 -112
  25. package/scaffold/_preview/agents/Code-Reviewer-Beta.agent.md +0 -112
  26. package/scaffold/_preview/agents/Debugger.agent.md +0 -412
  27. package/scaffold/_preview/agents/Documenter.agent.md +0 -468
  28. package/scaffold/_preview/agents/Explorer.agent.md +0 -76
  29. package/scaffold/_preview/agents/Frontend.agent.md +0 -440
  30. package/scaffold/_preview/agents/Implementer.agent.md +0 -425
  31. package/scaffold/_preview/agents/Orchestrator.agent.md +0 -452
  32. package/scaffold/_preview/agents/Planner.agent.md +0 -481
  33. package/scaffold/_preview/agents/README.md +0 -57
  34. package/scaffold/_preview/agents/Refactor.agent.md +0 -435
  35. package/scaffold/_preview/agents/Researcher-Alpha.agent.md +0 -151
  36. package/scaffold/_preview/agents/Researcher-Beta.agent.md +0 -152
  37. package/scaffold/_preview/agents/Researcher-Delta.agent.md +0 -153
  38. package/scaffold/_preview/agents/Researcher-Gamma.agent.md +0 -152
  39. package/scaffold/_preview/agents/Security.agent.md +0 -433
  40. package/scaffold/_preview/agents/_shared/architect-reviewer-base.md +0 -104
  41. package/scaffold/_preview/agents/_shared/code-agent-base.md +0 -366
  42. package/scaffold/_preview/agents/_shared/code-reviewer-base.md +0 -87
  43. package/scaffold/_preview/agents/_shared/decision-protocol.md +0 -27
  44. package/scaffold/_preview/agents/_shared/forge-protocol.md +0 -90
  45. package/scaffold/_preview/agents/_shared/researcher-base.md +0 -114
  46. package/scaffold/_preview/agents/templates/adr-template.md +0 -28
  47. package/scaffold/_preview/agents/templates/execution-state.md +0 -26
  48. package/scaffold/_preview/flows/_epilogue/steps/docs-sync/README.md +0 -120
  49. package/scaffold/_preview/flows/aikit-advanced/README.md +0 -70
  50. package/scaffold/_preview/flows/aikit-advanced/steps/design/README.md +0 -178
  51. package/scaffold/_preview/flows/aikit-advanced/steps/execute/README.md +0 -145
  52. package/scaffold/_preview/flows/aikit-advanced/steps/plan/README.md +0 -122
  53. package/scaffold/_preview/flows/aikit-advanced/steps/spec/README.md +0 -121
  54. package/scaffold/_preview/flows/aikit-advanced/steps/task/README.md +0 -119
  55. package/scaffold/_preview/flows/aikit-advanced/steps/verify/README.md +0 -145
  56. package/scaffold/_preview/flows/aikit-basic/README.md +0 -51
  57. package/scaffold/_preview/flows/aikit-basic/steps/assess/README.md +0 -109
  58. package/scaffold/_preview/flows/aikit-basic/steps/design/README.md +0 -116
  59. package/scaffold/_preview/flows/aikit-basic/steps/implement/README.md +0 -131
  60. package/scaffold/_preview/flows/aikit-basic/steps/verify/README.md +0 -123
  61. package/scaffold/_preview/prompts/aikit-ask.prompt.md +0 -13
  62. package/scaffold/_preview/prompts/aikit-debug.prompt.md +0 -15
  63. package/scaffold/_preview/prompts/aikit-design.prompt.md +0 -15
  64. package/scaffold/_preview/prompts/aikit-flow-add.prompt.md +0 -84
  65. package/scaffold/_preview/prompts/aikit-flow-create.prompt.md +0 -80
  66. package/scaffold/_preview/prompts/aikit-flow-manage.prompt.md +0 -24
  67. package/scaffold/_preview/prompts/aikit-implement.prompt.md +0 -17
  68. package/scaffold/_preview/prompts/aikit-plan.prompt.md +0 -15
  69. package/scaffold/_preview/prompts/aikit-review.prompt.md +0 -24
  70. package/scaffold/_preview/skills/adr-skill/SKILL.md +0 -335
  71. package/scaffold/_preview/skills/adr-skill/assets/templates/adr-madr.md +0 -89
  72. package/scaffold/_preview/skills/adr-skill/assets/templates/adr-readme.md +0 -20
  73. package/scaffold/_preview/skills/adr-skill/assets/templates/adr-simple.md +0 -46
  74. package/scaffold/_preview/skills/adr-skill/references/adr-conventions.md +0 -95
  75. package/scaffold/_preview/skills/adr-skill/references/examples.md +0 -193
  76. package/scaffold/_preview/skills/adr-skill/references/review-checklist.md +0 -77
  77. package/scaffold/_preview/skills/adr-skill/references/template-variants.md +0 -52
  78. package/scaffold/_preview/skills/adr-skill/scripts/bootstrap_adr.js +0 -259
  79. package/scaffold/_preview/skills/adr-skill/scripts/new_adr.js +0 -391
  80. package/scaffold/_preview/skills/adr-skill/scripts/set_adr_status.js +0 -169
  81. package/scaffold/_preview/skills/aikit/SKILL.md +0 -754
  82. package/scaffold/_preview/skills/brainstorming/SKILL.md +0 -265
  83. package/scaffold/_preview/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
  84. package/scaffold/_preview/skills/c4-architecture/SKILL.md +0 -389
  85. package/scaffold/_preview/skills/c4-architecture/references/advanced-patterns.md +0 -552
  86. package/scaffold/_preview/skills/c4-architecture/references/c4-syntax.md +0 -510
  87. package/scaffold/_preview/skills/c4-architecture/references/common-mistakes.md +0 -437
  88. package/scaffold/_preview/skills/c4-architecture/references/html-design-system.md +0 -337
  89. package/scaffold/_preview/skills/c4-architecture/references/html-template.html +0 -627
  90. package/scaffold/_preview/skills/docs/SKILL.md +0 -553
  91. package/scaffold/_preview/skills/docs/references/diataxis-anti-patterns.md +0 -147
  92. package/scaffold/_preview/skills/docs/references/diataxis-compass.md +0 -123
  93. package/scaffold/_preview/skills/docs/references/diataxis-quadrants.md +0 -192
  94. package/scaffold/_preview/skills/docs/references/diataxis-quality.md +0 -76
  95. package/scaffold/_preview/skills/docs/references/diataxis-templates.md +0 -120
  96. package/scaffold/_preview/skills/docs/references/flow-artifacts-guide.md +0 -70
  97. package/scaffold/_preview/skills/docs/references/project-knowledge-gotchas.md +0 -32
  98. package/scaffold/_preview/skills/docs/references/project-knowledge-templates.md +0 -281
  99. package/scaffold/_preview/skills/docs/references/project-knowledge-workflow.md +0 -80
  100. package/scaffold/_preview/skills/frontend-design/SKILL.md +0 -237
  101. package/scaffold/_preview/skills/lesson-learned/SKILL.md +0 -113
  102. package/scaffold/_preview/skills/lesson-learned/references/anti-patterns.md +0 -55
  103. package/scaffold/_preview/skills/lesson-learned/references/se-principles.md +0 -109
  104. package/scaffold/_preview/skills/multi-agents-development/SKILL.md +0 -448
  105. package/scaffold/_preview/skills/multi-agents-development/architecture-review-prompt.md +0 -81
  106. package/scaffold/_preview/skills/multi-agents-development/code-quality-review-prompt.md +0 -91
  107. package/scaffold/_preview/skills/multi-agents-development/implementer-prompt.md +0 -93
  108. package/scaffold/_preview/skills/multi-agents-development/parallel-dispatch-example.md +0 -167
  109. package/scaffold/_preview/skills/multi-agents-development/spec-review-prompt.md +0 -81
  110. package/scaffold/_preview/skills/present/SKILL.md +0 -616
  111. package/scaffold/_preview/skills/react/SKILL.md +0 -309
  112. package/scaffold/_preview/skills/repo-access/SKILL.md +0 -178
  113. package/scaffold/_preview/skills/repo-access/references/error-patterns.md +0 -116
  114. package/scaffold/_preview/skills/repo-access/references/platform-matrix.md +0 -142
  115. package/scaffold/_preview/skills/requirements-clarity/SKILL.md +0 -333
  116. package/scaffold/_preview/skills/session-handoff/SKILL.md +0 -199
  117. package/scaffold/_preview/skills/session-handoff/references/handoff-template.md +0 -139
  118. package/scaffold/_preview/skills/session-handoff/references/resume-checklist.md +0 -80
  119. package/scaffold/_preview/skills/session-handoff/scripts/check_staleness.js +0 -269
  120. package/scaffold/_preview/skills/session-handoff/scripts/create_handoff.js +0 -299
  121. package/scaffold/_preview/skills/session-handoff/scripts/list_handoffs.js +0 -113
  122. package/scaffold/_preview/skills/session-handoff/scripts/validate_handoff.js +0 -241
  123. package/scaffold/_preview/skills/typescript/SKILL.md +0 -405
  124. package/scaffold/adapters/claude-code.mjs +0 -73
  125. package/scaffold/adapters/copilot.mjs +0 -292
  126. package/scaffold/adapters/flows.mjs +0 -27
  127. package/scaffold/adapters/skills.mjs +0 -25
  128. package/scaffold/definitions/agents.mjs +0 -266
  129. package/scaffold/definitions/exclusions.mjs +0 -58
  130. package/scaffold/definitions/hooks.mjs +0 -43
  131. package/scaffold/definitions/models.mjs +0 -84
  132. package/scaffold/definitions/plugins.mjs +0 -147
  133. package/scaffold/definitions/tools.mjs +0 -250
  134. package/scaffold/generate.mjs +0 -92
@@ -1,292 +0,0 @@
1
- /**
2
- * Copilot adapter — generates GitHub Copilot agent files from definitions.
3
- *
4
- * Output format:
5
- * agents/{Name}.agent.md — YAML frontmatter + markdown body
6
- * agents/_shared/{name}.md — Shared protocol files
7
- * agents/templates/execution-state.md
8
- * agents/README.md
9
- * prompts/{name}.prompt.md — YAML frontmatter + markdown body
10
- *
11
- * Copilot-specific conventions:
12
- * - model field appends " (copilot)" suffix
13
- * - tools are listed as YAML array in frontmatter
14
- * - prompts target a specific agent via `agent:` field
15
- * - hooks are embedded in copilot-instructions.md (not separate files)
16
- * - plugins/skills are SKILL.md files in .github/skills/
17
- */
18
-
19
- import { AGENTS } from '../definitions/agents.mjs';
20
- import { AGENT_BODIES } from '../definitions/bodies.mjs';
21
- import { COPILOT_MODELS, VARIANT_GROUPS } from '../definitions/models.mjs';
22
- import { PROMPTS } from '../definitions/prompts.mjs';
23
- import { PROTOCOLS, TEMPLATES } from '../definitions/protocols.mjs';
24
- import { IDE_CAPABILITIES } from '../definitions/tools.mjs';
25
-
26
- // ─── Copilot tool mapping ─────────────────────────────────────────────────
27
-
28
- /** Map abstract IDE capability names to Copilot tool identifiers */
29
- const COPILOT_TOOL_MAP = {
30
- terminal: 'execute/runInTerminal',
31
- problems: 'read/problems',
32
- readFile: 'read/readFile',
33
- lastCommand: 'read/terminalLastCommand',
34
- subagent: 'agent/runSubagent',
35
- createFile: 'edit/createFile',
36
- editFiles: 'edit/editFiles',
37
- rename: 'edit/rename',
38
- createDirectory: 'edit/createDirectory',
39
- search: 'search/changes, search/codebase, search/usages',
40
- web: 'web/fetch, web/githubRepo',
41
- todo: 'todo',
42
- memory: 'vscode/memory',
43
- newWorkspace: 'vscode/newWorkspace',
44
- reviewPlan: 'vscode/reviewPlan',
45
- askQuestions: 'vscode/askQuestions',
46
- resolveMemoryFileUri: 'vscode/resolveMemoryFileUri',
47
- runCommand: 'vscode/runCommand',
48
- switchAgent: 'vscode/switchAgent',
49
- killTerminal: 'execute/killTerminal',
50
- createTask: 'execute/createAndRunTask',
51
- terminalSel: 'read/terminalSelection',
52
- fileSearch: 'search/fileSearch',
53
- listDir: 'search/listDirectory',
54
- textSearch: 'search/textSearch',
55
- searchSubagent: 'search/searchSubagent',
56
- browser:
57
- 'browser/openBrowserPage, browser/readPage, browser/screenshotPage, browser/navigatePage, browser/clickElement, browser/dragElement, browser/hoverElement, browser/typeInPage, browser/runPlaywrightCode, browser/handleDialog',
58
- };
59
-
60
- function buildToolsYaml(toolRole) {
61
- const capabilities = IDE_CAPABILITIES[toolRole] || [];
62
- const copilotTools = capabilities.map((cap) => COPILOT_TOOL_MAP[cap]).filter(Boolean);
63
- // Use server wildcard instead of listing all 67 tools individually.
64
- // VS Code expands `<server-name>/*` to all tools from that MCP server.
65
- return `[${[...copilotTools, 'aikit/*'].join(', ')}]`;
66
- }
67
-
68
- function copilotModel(agentName) {
69
- const models = COPILOT_MODELS[agentName];
70
- if (!models) return 'Auto (copilot)';
71
- // NOTE: Model array syntax (e.g. [model1, model2]) is experimental and
72
- // requires a VS Code experiment flag to be enabled. For now, we always
73
- // emit the primary (first) model as a plain string.
74
- if (Array.isArray(models)) {
75
- return models[0] || 'Auto (copilot)';
76
- }
77
- return models;
78
- }
79
-
80
- const FLOWS_SECTION = [
81
- '## Flows',
82
- '',
83
- "This project uses aikit's pluggable flow system. Check flow status with the `flow_status` MCP tool.",
84
- "If a flow is active, follow the current step's skill instructions. Advance with `flow_step({ action: 'next' })`.",
85
- 'Use `flow_list` to see available flows and `flow_start` to begin one.',
86
- ].join('\n');
87
-
88
- // ─── Agent file generators ────────────────────────────────────────────────
89
-
90
- function buildAgentTable() {
91
- const rows = [];
92
- for (const [name, def] of Object.entries(AGENTS)) {
93
- if (def.variants) {
94
- for (const suffix of VARIANT_GROUPS[name] || []) {
95
- const fullName = `${name}-${suffix}`;
96
- const models = COPILOT_MODELS[fullName] || COPILOT_MODELS[name];
97
- const model = Array.isArray(models) ? models[0] : models || 'Unknown';
98
- const varDef = def.variants[suffix] || {};
99
- const desc = varDef.description || def.description;
100
- rows.push(`| **${fullName}** | ${desc} | ${model} | ${def.category} |`);
101
- }
102
- } else {
103
- const models = COPILOT_MODELS[name];
104
- const model = Array.isArray(models) ? models[0] : models || 'Unknown';
105
- rows.push(`| **${name}** | ${def.description} | ${model} | ${def.category} |`);
106
- }
107
- }
108
- return `| Agent | Purpose | Model | Category |\n|-------|---------|-------|----------|\n${rows.join('\n')}`;
109
- }
110
-
111
- function generateVariantAgent(roleName, suffix, def) {
112
- const fullName = `${roleName}-${suffix}`;
113
- const varDef = def.variants[suffix] || {};
114
- const model = copilotModel(fullName);
115
- const desc = varDef.description || def.description;
116
- const identity =
117
- varDef.identity ||
118
- (suffix === VARIANT_GROUPS[roleName]?.[0]
119
- ? `, the primary ${roleName} agent.`
120
- : `, a variant of ${roleName}. Same responsibilities, different model perspective.`);
121
-
122
- const sharedContent =
123
- def.sharedBase && PROTOCOLS[def.sharedBase] ? `\n\n${PROTOCOLS[def.sharedBase]}` : '';
124
-
125
- const extra = def.extraBody ? `\n\n${def.extraBody}` : '';
126
- const variantAddendum = varDef.bodyAddendum ? `\n\n${varDef.bodyAddendum}` : '';
127
-
128
- const skillsSection = def.skills?.length
129
- ? `\n\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${def.skills.map(([s, w]) => `| ${s} | ${w} |`).join('\n')}`
130
- : '';
131
-
132
- const title = def.title || roleName;
133
-
134
- return `---
135
- description: '${desc}'
136
- ${def.argumentHint ? `argument-hint: "${def.argumentHint}"\n` : ''}tools: ${buildToolsYaml(def.toolRole)}
137
- model: ${model}
138
- ---
139
-
140
- # ${fullName} - ${title}
141
-
142
- You are **${fullName}**${identity}${extra}
143
- ${sharedContent}${variantAddendum}${skillsSection}
144
-
145
- ${FLOWS_SECTION}
146
- `;
147
- }
148
-
149
- function generateSingleAgent(name, def) {
150
- const model = copilotModel(name);
151
- const body =
152
- typeof AGENT_BODIES[name] === 'function'
153
- ? AGENT_BODIES[name](buildAgentTable())
154
- : AGENT_BODIES[name] || '';
155
-
156
- const sharedContent =
157
- def.sharedBase && PROTOCOLS[def.sharedBase] ? `\n\n${PROTOCOLS[def.sharedBase]}` : '';
158
-
159
- const additionalContent = (def.sharedProtocols || [])
160
- .map((key) => (PROTOCOLS[key] ? `\n\n${PROTOCOLS[key]}` : ''))
161
- .join('');
162
-
163
- const title = def.title || name;
164
- const skillsSection = def.skills?.length
165
- ? `\n## Skills (load on demand)\n\n| Skill | When to load |\n|-------|--------------|\n${def.skills.map(([s, w]) => `| ${s} | ${w} |`).join('\n')}\n`
166
- : '';
167
-
168
- return `---
169
- description: '${def.description}'
170
- ${def.argumentHint ? `argument-hint: "${def.argumentHint}"\n` : ''}tools: ${buildToolsYaml(def.toolRole)}
171
- model: ${model}
172
- ---
173
-
174
- # ${name} - ${title}
175
-
176
- You are the **${name}**, ${def.description.toLowerCase().replace(/^./, (c) => c.toLowerCase())}
177
-
178
- ${body}${sharedContent}${additionalContent}${skillsSection}
179
-
180
- ${FLOWS_SECTION}
181
- `;
182
- }
183
-
184
- // ─── Prompt file generator ────────────────────────────────────────────────
185
-
186
- function generatePrompt(_name, def) {
187
- // NOTE: Do NOT emit a `tools:` field in prompt files.
188
- // Prompt `tools:` is an exclusive allowlist in VS Code — it replaces the
189
- // agent's tools entirely. Since prompts only list aikit/* MCP tools (which
190
- // are all deferred), the API rejects with "All tools cannot be deferred."
191
- // Omitting `tools:` lets the prompt inherit the full tool set from `agent:`.
192
- return `---
193
- description: "${def.description}"
194
- agent: "${def.agent}"
195
- ---
196
-
197
- ${def.content}
198
- `;
199
- }
200
-
201
- // ─── README generator ─────────────────────────────────────────────────────
202
-
203
- function generateReadme() {
204
- return `# Agents
205
-
206
- This directory contains AI agent definitions generated by \`@vpxa/aikit init\`.
207
-
208
- ## Agent Roster
209
-
210
- ${buildAgentTable()}
211
-
212
- ## Multi-Model Pattern
213
-
214
- Variant agents (Researcher-Alpha/Beta/Gamma/Delta, Code-Reviewer-Alpha/Beta, Architect-Reviewer-Alpha/Beta) share the same methodology via files in \`_shared/\`. They differ only in which LLM model backs them — enabling multi-model decision analysis and dual-review workflows.
215
-
216
- **Agent names are model-agnostic.** The model behind Alpha/Beta/Gamma/Delta can be changed in \`scaffold/definitions/models.mjs\` without renaming any agent files.
217
-
218
- ## Structure
219
-
220
- \`\`\`
221
- agents/
222
- {Name}.agent.md — Agent definition (YAML frontmatter + instructions)
223
- _shared/ — Shared protocols referenced by multiple agents
224
- code-agent-base.md — Base for all code-modifying agents
225
- researcher-base.md — Base for all Researcher variants
226
- code-reviewer-base.md — Base for all Code-Reviewer variants
227
- architect-reviewer-base.md — Base for all Architect-Reviewer variants
228
- decision-protocol.md — Multi-model decision protocol rules
229
- forge-protocol.md — FORGE quality gate protocol
230
- templates/
231
- execution-state.md — Orchestrator state tracking template
232
- adr-template.md — Architecture Decision Record template
233
- \`\`\`
234
-
235
- ## Regenerating
236
-
237
- To regenerate after changing models or agent definitions:
238
-
239
- \`\`\`bash
240
- cd knowledge-base
241
- node scaffold/generate.mjs
242
- \`\`\`
243
- `;
244
- }
245
-
246
- // ─── Public API ───────────────────────────────────────────────────────────
247
-
248
- /**
249
- * Generate all Copilot scaffold files.
250
- * Returns an array of { path, content } objects.
251
- * The caller (generate.mjs) is responsible for writing them to disk.
252
- */
253
- export function generateCopilot() {
254
- const files = [];
255
-
256
- // Agent files
257
- for (const [name, def] of Object.entries(AGENTS)) {
258
- if (def.variants) {
259
- for (const suffix of VARIANT_GROUPS[name] || []) {
260
- files.push({
261
- path: `agents/${name}-${suffix}.agent.md`,
262
- content: generateVariantAgent(name, suffix, def),
263
- });
264
- }
265
- } else {
266
- files.push({
267
- path: `agents/${name}.agent.md`,
268
- content: generateSingleAgent(name, def),
269
- });
270
- }
271
- }
272
-
273
- // Shared protocols
274
- for (const [name, content] of Object.entries(PROTOCOLS)) {
275
- files.push({ path: `agents/_shared/${name}.md`, content: `${content}\n` });
276
- }
277
-
278
- // Templates
279
- for (const [name, content] of Object.entries(TEMPLATES)) {
280
- files.push({ path: `agents/templates/${name}.md`, content: `${content}\n` });
281
- }
282
-
283
- // README
284
- files.push({ path: 'agents/README.md', content: generateReadme() });
285
-
286
- // Prompts
287
- for (const [name, def] of Object.entries(PROMPTS)) {
288
- files.push({ path: `prompts/aikit-${name}.prompt.md`, content: generatePrompt(name, def) });
289
- }
290
-
291
- return files;
292
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Flows adapter - generates flow instruction files from compiled definitions.
3
- *
4
- * Flow content is compiled into ../compiled/flows-data.mjs by compile.mjs.
5
- * This adapter provides the generateFlows() function used by the init command.
6
- * Note: flow.json files are NOT included - they are structural metadata
7
- * handled by the flow system.
8
- */
9
-
10
- import { FLOWS } from '../compiled/flows-data.mjs';
11
-
12
- /**
13
- * Generate all flow instruction files for deployment.
14
- * @returns {Array<{path: string, content: string}>}
15
- */
16
- export function generateFlows() {
17
- const output = [];
18
- for (const [flowName, files] of Object.entries(FLOWS)) {
19
- for (const { file, content } of files) {
20
- output.push({
21
- path: `${flowName}/${file}`,
22
- content,
23
- });
24
- }
25
- }
26
- return output;
27
- }
@@ -1,25 +0,0 @@
1
- /**
2
- * Skills adapter - generates skill files from compiled definitions.
3
- *
4
- * Skill content is compiled into ../compiled/skills-data.mjs by compile.mjs.
5
- * This adapter provides the generateSkills() function used by the init command.
6
- */
7
-
8
- import { SKILLS } from '../compiled/skills-data.mjs';
9
-
10
- /**
11
- * Generate all skill files for deployment.
12
- * @returns {Array<{path: string, content: string}>}
13
- */
14
- export function generateSkills() {
15
- const output = [];
16
- for (const [skillName, files] of Object.entries(SKILLS)) {
17
- for (const { file, content } of files) {
18
- output.push({
19
- path: `${skillName}/${file}`,
20
- content,
21
- });
22
- }
23
- }
24
- return output;
25
- }
@@ -1,266 +0,0 @@
1
- /**
2
- * Agent definitions — role, description, capabilities, and variant configuration.
3
- *
4
- * These are IDE-agnostic. Each IDE adapter reads these definitions and
5
- * produces its own file format (.agent.md, .mdc, CLAUDE.md sections, etc.).
6
- *
7
- * `toolRole` maps to a key in tools.mjs IDE_CAPABILITIES.
8
- * `variants` (if present) means this role has multiple model variants.
9
- * `sharedBase` points to a shared protocol file the agent should reference.
10
- */
11
-
12
- export const AGENTS = {
13
- // ─── Orchestration ────────────────────────────────────────────────────
14
-
15
- Orchestrator: {
16
- title: 'The Master Conductor',
17
- description:
18
- 'Master conductor that orchestrates the full development lifecycle: Planning → Implementation → Review → Recovery → Commit',
19
- argumentHint: null,
20
- toolRole: 'orchestrator',
21
- sharedBase: null, // Orchestrator has inline instructions
22
- sharedProtocols: ['decision-protocol', 'forge-protocol'],
23
- category: 'orchestration',
24
- skills: [],
25
- },
26
-
27
- Planner: {
28
- title: 'The Strategic Architect',
29
- description:
30
- 'Autonomous planner that researches codebases and writes comprehensive TDD implementation plans',
31
- argumentHint: null,
32
- toolRole: 'planner',
33
- sharedBase: 'code-agent-base',
34
- category: 'orchestration',
35
- },
36
-
37
- // ─── Implementation ───────────────────────────────────────────────────
38
-
39
- Implementer: {
40
- title: 'The Code Builder',
41
- description:
42
- 'Persistent implementation agent that writes code following TDD practices until all tasks are complete',
43
- argumentHint: 'Implementation task, feature, or phase from plan',
44
- toolRole: 'codeAgent',
45
- sharedBase: 'code-agent-base',
46
- category: 'implementation',
47
- skills: [
48
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
49
- ['typescript', 'When writing TypeScript code — type patterns, generics, utility types'],
50
- ],
51
- },
52
-
53
- Frontend: {
54
- title: 'The UI Specialist',
55
- description:
56
- 'UI/UX specialist for React, styling, responsive design, and frontend implementation',
57
- argumentHint: 'UI component, styling task, or frontend feature',
58
- toolRole: 'codeAgent',
59
- sharedBase: 'code-agent-base',
60
- category: 'implementation',
61
- skills: [
62
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
63
- ['react', 'When building React components — hooks, patterns, Server Components'],
64
- ['typescript', 'When writing TypeScript code — type patterns, generics, utility types'],
65
- [
66
- 'frontend-design',
67
- 'When implementing UI/UX — design systems, accessibility, responsive patterns',
68
- ],
69
- ],
70
- },
71
-
72
- Refactor: {
73
- title: 'The Code Sculptor',
74
- description:
75
- 'Code refactoring specialist that improves structure, readability, and maintainability',
76
- argumentHint: 'Code, component, or pattern to refactor',
77
- toolRole: 'refactor',
78
- sharedBase: 'code-agent-base',
79
- category: 'implementation',
80
- skills: [['aikit', '**Always** — AI Kit tool signatures, search, analysis']],
81
- },
82
-
83
- // ─── Diagnostics ──────────────────────────────────────────────────────
84
-
85
- Debugger: {
86
- title: 'The Problem Solver',
87
- description: 'Expert debugger that diagnoses issues, traces errors, and provides solutions',
88
- argumentHint: 'Error message, stack trace, or description of issue',
89
- toolRole: 'debugger',
90
- sharedBase: 'code-agent-base',
91
- category: 'diagnostics',
92
- skills: [
93
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
94
- ['typescript', 'When writing TypeScript code — type patterns, generics, utility types'],
95
- ],
96
- },
97
-
98
- Security: {
99
- title: 'The Vulnerability Hunter',
100
- description: 'Security specialist that analyzes code for vulnerabilities and compliance',
101
- argumentHint: 'Code, feature, or component to security review',
102
- toolRole: 'security',
103
- sharedBase: 'code-agent-base',
104
- category: 'diagnostics',
105
- skills: [
106
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
107
- ['typescript', 'When reviewing code — security patterns, type safety'],
108
- ],
109
- },
110
-
111
- // ─── Documentation ────────────────────────────────────────────────────
112
-
113
- Documenter: {
114
- title: 'The Knowledge Keeper',
115
- description:
116
- 'Documentation specialist that creates and maintains comprehensive project documentation',
117
- argumentHint: 'Component, API, feature, or area to document',
118
- toolRole: 'documenter',
119
- sharedBase: 'code-agent-base',
120
- category: 'documentation',
121
- skills: [
122
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
123
- ['present', 'When presenting documentation previews or architecture visuals to the user'],
124
- [
125
- 'docs',
126
- 'When creating or updating project documentation — docs/ convention, architecture blueprints, Diátaxis framework',
127
- ],
128
- ],
129
- },
130
-
131
- Explorer: {
132
- title: 'The Rapid Scout',
133
- description:
134
- 'Rapid codebase exploration to find files, usages, dependencies, and structural context',
135
- argumentHint: 'Find files, usages, and context related to: {topic or goal}',
136
- toolRole: 'explorer',
137
- sharedBase: null,
138
- category: 'exploration',
139
- skills: [['aikit', '**Always** — AI Kit tool signatures, search, analysis']],
140
- },
141
-
142
- // ─── Multi-variant roles ──────────────────────────────────────────────
143
-
144
- Researcher: {
145
- title: 'The Context Gatherer',
146
- description:
147
- 'Deep analysis, architecture review, and multi-model decision protocol participant',
148
- argumentHint: 'Research question, problem statement, or subsystem to investigate',
149
- toolRole: 'researcher',
150
- sharedBase: 'researcher-base',
151
- category: 'research',
152
- skills: [
153
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
154
- ['lesson-learned', 'When analyzing past changes to extract engineering principles'],
155
- ['c4-architecture', 'When researching system architecture \u2014 produce C4 diagrams'],
156
- ['adr-skill', 'When the research involves a technical decision \u2014 draft an ADR'],
157
- ],
158
- variants: {
159
- Alpha: {
160
- description: 'Primary deep research agent — also serves as default Researcher',
161
- identity:
162
- ', the primary deep research agent. During multi-model decision sessions, you provide deep reasoning and nuanced system design.',
163
- bodyAddendum: `## Required Output Section — \`## Depth Analysis\`
164
-
165
- Your final report MUST contain a \`## Depth Analysis\` section with:
166
- - Deep-dive into ONE chosen subsystem (most structurally central to the question)
167
- - Full evidence chain: file:line citations for every structural claim
168
- - At least 2 \`compact\`/\`file_summary\` extracts woven into the narrative
169
-
170
- You are the DEFAULT researcher. When the Orchestrator needs breadth + depth, they
171
- dispatch you alone. Your lens: thorough, evidence-first, exhaustive.`,
172
- },
173
- Beta: {
174
- description:
175
- 'Research variant — pragmatic analysis with focus on trade-offs and edge cases',
176
- identity:
177
- ', a variant of the Researcher agent optimized for **pragmatic analysis**. Focus on trade-offs, edge cases, and practical constraints. Challenge assumptions and highlight risks the primary researcher may overlook.',
178
- bodyAddendum: `## Required Output Section — \`## Failure Modes & Counter-Evidence\`
179
-
180
- Your final report MUST contain a \`## Failure Modes & Counter-Evidence\` section with:
181
- - At least 3 adversarial claims challenging your own primary finding
182
- - For each counter-claim: the condition under which it would be TRUE, and the
183
- evidence (file:line or search receipt) that currently falsifies it
184
- - Any unresolved counter-evidence flagged as \`⚠ UNRESOLVED\`
185
-
186
- Your lens: pragmatic skepticism. Mark competing claims as \`A\` (Assumed) by default;
187
- challenge before promoting to \`V\`.`,
188
- },
189
- Gamma: {
190
- description: 'Research variant — broad pattern matching across domains and technologies',
191
- identity:
192
- ', a variant of the Researcher agent optimized for **cross-domain pattern matching**. Draw connections from other domains, frameworks, and industries. Bring breadth where Alpha brings depth.',
193
- bodyAddendum: `## Required Output Section — \`## Cross-Domain Analogies\`
194
-
195
- Your final report MUST contain a \`## Cross-Domain Analogies\` section with:
196
- - At least 2 patterns from other tools/frameworks/domains that apply to the question
197
- - For each: the external source (cite via \`web_search\` or \`web_fetch\` receipt) and
198
- how it maps to our codebase
199
- - One "missing pattern we should adopt" recommendation
200
-
201
- Your lens: cross-domain pattern matching. Weight \`web_search\` + \`web_fetch\` higher
202
- than peers. Assume the LLM's training data is stale — verify with fresh searches.`,
203
- },
204
- Delta: {
205
- description: 'Research variant — implementation feasibility and performance implications',
206
- identity:
207
- ', a variant of the Researcher agent optimized for **implementation feasibility**. Focus on performance implications, scaling concerns, and concrete implementation paths. Ground theoretical proposals in practical reality.',
208
- bodyAddendum: `## Required Output Section — \`## Implementation Cost & Feasibility\`
209
-
210
- Your final report MUST contain a \`## Implementation Cost & Feasibility\` section with:
211
- - Complexity snapshot: you MUST call \`measure({ path })\` on any file ≥ 50 LOC in the
212
- target subsystem at least once and quote the \`cognitiveComplexity\` result
213
- - Blast radius estimate: \`blast_radius({ changed_files })\` on the proposed edits
214
- - Time/risk table: | Change | Lines | Risk | Effort |
215
- - Feasibility verdict: SAFE / RISKY / INFEASIBLE with one-line justification
216
-
217
- Your lens: implementation feasibility. Prefer \`measure\` + \`blast_radius\` + \`analyze_patterns\`
218
- over abstract reasoning.`,
219
- },
220
- },
221
- },
222
-
223
- 'Code-Reviewer': {
224
- title: 'The Quality Guardian',
225
- description:
226
- 'Code review specialist analyzing code for quality, security, performance, and maintainability',
227
- argumentHint: 'File path, PR, or code to review',
228
- toolRole: 'reviewer',
229
- sharedBase: 'code-reviewer-base',
230
- category: 'review',
231
- skills: [
232
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
233
- ['typescript', 'When reviewing TypeScript code — type patterns, best practices'],
234
- ],
235
- variants: {
236
- Alpha: { description: 'Primary code reviewer' },
237
- Beta: { description: 'Code reviewer variant — different LLM perspective for dual review' },
238
- },
239
- },
240
-
241
- 'Architect-Reviewer': {
242
- title: 'The Structural Guardian',
243
- description:
244
- 'Reviews architecture for pattern adherence, SOLID compliance, dependency direction, and structural integrity',
245
- argumentHint: 'Files, PR, or subsystem to architecture-review',
246
- toolRole: 'reviewer',
247
- sharedBase: 'architect-reviewer-base',
248
- category: 'review',
249
- skills: [
250
- ['aikit', '**Always** — AI Kit tool signatures, search, analysis'],
251
- ['c4-architecture', 'When reviewing architectural diagrams or boundary changes'],
252
- [
253
- 'adr-skill',
254
- 'When the review involves architecture decisions \u2014 reference or create ADRs',
255
- ],
256
- ],
257
- extraBody:
258
- 'You are **not** the Code-Reviewer agent. Code-Reviewer handles correctness, testing, security, and code quality. You handle the big picture: service boundaries, dependency direction, pattern adherence, and structural health.',
259
- variants: {
260
- Alpha: { description: 'Primary architecture reviewer' },
261
- Beta: {
262
- description: 'Architecture reviewer variant — different LLM perspective for dual review',
263
- },
264
- },
265
- },
266
- };
@@ -1,58 +0,0 @@
1
- /**
2
- * Permanent Exclusions — things aikit intentionally will NOT do.
3
- *
4
- * Each exclusion includes rationale grounded in the Bitter Lesson:
5
- * systems should leverage computation over hand-crafted features.
6
- * These exclusions are injected into copilot-instructions.md.
7
- */
8
-
9
- export const PERMANENT_EXCLUSIONS = [
10
- {
11
- name: 'Hard-coded lint rules',
12
- rationale:
13
- 'Project-specific linting belongs in ESLint or Biome config, not baked into agent instructions. Configurable tooling and automated checks scale better than hand-crafted rules embedded in prompts.',
14
- bitterLessonSafe: true,
15
- },
16
-
17
- {
18
- name: 'Framework-specific boilerplate generation',
19
- rationale:
20
- 'Framework CLIs and IDE scaffolds already generate boilerplate from evolving upstream knowledge. Delegating to those computational systems is safer than freezing hand-written templates into aikit instructions.',
21
- bitterLessonSafe: true,
22
- },
23
-
24
- {
25
- name: 'Git workflow enforcement',
26
- rationale:
27
- 'Branch policies, commit formatting, and merge gates belong in git hooks and CI where they can be enforced automatically. Reliable computation beats informal agent-side reminders and hand-crafted behavior rules.',
28
- bitterLessonSafe: true,
29
- },
30
-
31
- {
32
- name: 'IDE-specific keybinding and config guidance',
33
- rationale:
34
- 'Editor shortcuts, panel layouts, and workspace settings are IDE concerns that change across clients and teams. Runtime tooling and local editor config are the right computational layer, not static agent instructions.',
35
- bitterLessonSafe: true,
36
- },
37
-
38
- {
39
- name: 'Package manager lock file manipulation',
40
- rationale:
41
- 'Lock files should be produced by the package manager and verified in CI or release pipelines, not manually curated by agent policy. Deterministic tool execution is more robust than hand-crafted lockfile guidance.',
42
- bitterLessonSafe: true,
43
- },
44
-
45
- {
46
- name: 'Hard-coded file naming conventions',
47
- rationale:
48
- 'Naming rules vary by repository and should live in project generators, linters, or review automation. Letting configurable computation enforce conventions scales better than embedding brittle file-name doctrine in prompts.',
49
- bitterLessonSafe: true,
50
- },
51
-
52
- {
53
- name: 'Runtime environment variable validation',
54
- rationale:
55
- 'Environment validation belongs in application startup code, schemas, and deployment checks where real runtime state is available. Computed validation with executable code outperforms hand-crafted agent assumptions about env shape.',
56
- bitterLessonSafe: true,
57
- },
58
- ];