@vpxa/aikit 0.1.75 → 0.1.76
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/package.json +1 -2
- package/scaffold/definitions/agents.mjs +266 -0
- package/scaffold/definitions/bodies.mjs +735 -0
- package/scaffold/definitions/exclusions.mjs +58 -0
- package/scaffold/definitions/hooks.mjs +43 -0
- package/scaffold/definitions/models.mjs +84 -0
- package/scaffold/definitions/plugins.mjs +147 -0
- package/scaffold/definitions/prompts.mjs +365 -0
- package/scaffold/definitions/protocols.mjs +863 -0
- package/scaffold/definitions/tools.mjs +250 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vpxa/aikit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.76",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Local-first AI developer toolkit — knowledge base, code analysis, context management, and developer tools for LLM agents",
|
|
6
6
|
"license": "MIT",
|
|
@@ -36,7 +36,6 @@
|
|
|
36
36
|
"!scaffold/generate.mjs",
|
|
37
37
|
"!scaffold/adapters/",
|
|
38
38
|
"!scaffold/compiled/",
|
|
39
|
-
"!scaffold/definitions/",
|
|
40
39
|
"README.md",
|
|
41
40
|
"LICENSE"
|
|
42
41
|
],
|
|
@@ -0,0 +1,266 @@
|
|
|
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
|
+
};
|