zelari-code 0.7.9 → 0.7.11

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 (108) hide show
  1. package/LICENSE +37 -37
  2. package/README.md +320 -295
  3. package/bin/zelari-code.js +62 -62
  4. package/dist/cli/app.js +33 -3
  5. package/dist/cli/app.js.map +1 -1
  6. package/dist/cli/components/LiveRegion.js +7 -3
  7. package/dist/cli/components/LiveRegion.js.map +1 -1
  8. package/dist/cli/components/SelectList.js +67 -0
  9. package/dist/cli/components/SelectList.js.map +1 -0
  10. package/dist/cli/components/Spinner.js +51 -0
  11. package/dist/cli/components/Spinner.js.map +1 -0
  12. package/dist/cli/components/SplashScreen.js +85 -85
  13. package/dist/cli/components/StatusBar.js +42 -34
  14. package/dist/cli/components/StatusBar.js.map +1 -1
  15. package/dist/cli/headless.js +10 -10
  16. package/dist/cli/hooks/useSlashDispatch.js +11 -1
  17. package/dist/cli/hooks/useSlashDispatch.js.map +1 -1
  18. package/dist/cli/keyStore.js +2 -2
  19. package/dist/cli/keyStore.js.map +1 -1
  20. package/dist/cli/main.bundled.js +15146 -14919
  21. package/dist/cli/main.bundled.js.map +4 -4
  22. package/dist/cli/main.js +1 -1
  23. package/dist/cli/main.js.map +1 -1
  24. package/dist/cli/modelDiscovery.js +42 -5
  25. package/dist/cli/modelDiscovery.js.map +1 -1
  26. package/dist/cli/provider/openai-compatible.js +4 -2
  27. package/dist/cli/provider/openai-compatible.js.map +1 -1
  28. package/dist/cli/slashCommands.js +22 -5
  29. package/dist/cli/slashCommands.js.map +1 -1
  30. package/dist/cli/slashHandlers/provider.js +102 -5
  31. package/dist/cli/slashHandlers/provider.js.map +1 -1
  32. package/package.json +2 -2
  33. package/dist/agents/advancedTools.js +0 -115
  34. package/dist/agents/advancedTools.js.map +0 -1
  35. package/dist/agents/councilApi.js +0 -375
  36. package/dist/agents/councilApi.js.map +0 -1
  37. package/dist/agents/councilDirectives.js +0 -100
  38. package/dist/agents/councilDirectives.js.map +0 -1
  39. package/dist/agents/promoteMember.js +0 -210
  40. package/dist/agents/promoteMember.js.map +0 -1
  41. package/dist/agents/promptModules.js +0 -139
  42. package/dist/agents/promptModules.js.map +0 -1
  43. package/dist/agents/roles.js +0 -299
  44. package/dist/agents/roles.js.map +0 -1
  45. package/dist/agents/skills/builtin/debugging.js +0 -248
  46. package/dist/agents/skills/builtin/debugging.js.map +0 -1
  47. package/dist/agents/skills/builtin/docs.js +0 -301
  48. package/dist/agents/skills/builtin/docs.js.map +0 -1
  49. package/dist/agents/skills/builtin/git-ops.js +0 -301
  50. package/dist/agents/skills/builtin/git-ops.js.map +0 -1
  51. package/dist/agents/skills/builtin/planning.js +0 -335
  52. package/dist/agents/skills/builtin/planning.js.map +0 -1
  53. package/dist/agents/skills/builtin/refactoring.js +0 -261
  54. package/dist/agents/skills/builtin/refactoring.js.map +0 -1
  55. package/dist/agents/skills/builtin/review.js +0 -302
  56. package/dist/agents/skills/builtin/review.js.map +0 -1
  57. package/dist/agents/skills/builtin/testing.js +0 -245
  58. package/dist/agents/skills/builtin/testing.js.map +0 -1
  59. package/dist/agents/skills.js +0 -272
  60. package/dist/agents/skills.js.map +0 -1
  61. package/dist/agents/systemPromptBuilder.js +0 -151
  62. package/dist/agents/systemPromptBuilder.js.map +0 -1
  63. package/dist/agents/toolSchemas.js +0 -249
  64. package/dist/agents/toolSchemas.js.map +0 -1
  65. package/dist/agents/tools.js +0 -196
  66. package/dist/agents/tools.js.map +0 -1
  67. package/dist/agents/vaultTools.js +0 -134
  68. package/dist/agents/vaultTools.js.map +0 -1
  69. package/dist/cli/components/CollapsibleToolOutput.js +0 -43
  70. package/dist/cli/components/CollapsibleToolOutput.js.map +0 -1
  71. package/dist/cli/components/Header.js +0 -38
  72. package/dist/cli/components/Header.js.map +0 -1
  73. package/dist/main/core/AgentHarness.js +0 -467
  74. package/dist/main/core/AgentHarness.js.map +0 -1
  75. package/dist/main/core/providerStream.js +0 -99
  76. package/dist/main/core/providerStream.js.map +0 -1
  77. package/dist/main/core/sessionJsonl.js +0 -99
  78. package/dist/main/core/sessionJsonl.js.map +0 -1
  79. package/dist/main/core/tools/auditLog.js +0 -26
  80. package/dist/main/core/tools/auditLog.js.map +0 -1
  81. package/dist/main/core/tools/builtin/filesystem.js +0 -110
  82. package/dist/main/core/tools/builtin/filesystem.js.map +0 -1
  83. package/dist/main/core/tools/builtin/listFiles.js +0 -86
  84. package/dist/main/core/tools/builtin/listFiles.js.map +0 -1
  85. package/dist/main/core/tools/builtin/search.js +0 -56
  86. package/dist/main/core/tools/builtin/search.js.map +0 -1
  87. package/dist/main/core/tools/builtin/shell.js +0 -51
  88. package/dist/main/core/tools/builtin/shell.js.map +0 -1
  89. package/dist/main/core/tools/registry.js +0 -71
  90. package/dist/main/core/tools/registry.js.map +0 -1
  91. package/dist/main/core/tools/toolTypes.js +0 -8
  92. package/dist/main/core/tools/toolTypes.js.map +0 -1
  93. package/dist/main/core/tools/zodBridge.js +0 -56
  94. package/dist/main/core/tools/zodBridge.js.map +0 -1
  95. package/dist/shared/eventBus.js +0 -104
  96. package/dist/shared/eventBus.js.map +0 -1
  97. package/dist/shared/events.js +0 -73
  98. package/dist/shared/events.js.map +0 -1
  99. package/dist/shared/index.js +0 -8
  100. package/dist/shared/index.js.map +0 -1
  101. package/dist/types/context.js +0 -3
  102. package/dist/types/context.js.map +0 -1
  103. package/dist/types/index.js +0 -2
  104. package/dist/types/index.js.map +0 -1
  105. package/dist/types/knowledge.js +0 -2
  106. package/dist/types/knowledge.js.map +0 -1
  107. package/dist/types/systemTypes.js +0 -10
  108. package/dist/types/systemTypes.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"roles.js","sourceRoot":"","sources":["../../src/agents/roles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;kFAamD,CAAC;AAEnF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,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CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,kBAAkB,CAC1B,MAAM,EACN,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CACvB,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAC3B,IAAI,IAAI,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACpC,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;YAAE,OAAO,IAAI,CAAC,CAAC,uBAAuB;QAC1D,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,CAAE,CAAC;IAC5B,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,248 +0,0 @@
1
- import * as skillsModule from '../../skills.js';
2
- const CLARIFICATION_PROTOCOL = `
3
-
4
- WHEN TO ASK THE USER (clarification):
5
- If a single missing fact would materially change your output (target platform, scope, a binary design choice with significant trade-offs, a constraint you cannot safely assume), pause and ask the user by appending EXACTLY this block at the end of your message:
6
-
7
- ---QUESTION---
8
- { "question": "One focused question", "choices": ["Option A", "Option B", "Option C"], "context": "Why this matters" }
9
- ---END---
10
-
11
- Rules for clarifications:
12
- - Ask AT MOST ONE question per turn, and only when genuinely blocked.
13
- - Prefer a small set of concrete "choices" (2-4). The user can still type a wave-in response.
14
- - Do NOT ask for information that could be reasonably assumed or already in shared context.
15
- - If you can proceed with a sound documented assumption, DO SO instead of asking.`;
16
- const reproduceBug = {
17
- id: 'reproduce-bug',
18
- version: '1.0.0',
19
- name: 'Reproduce Bug',
20
- description: 'Convert a bug report into a MINIMAL failing test. The test must fail without any code changes, then pass after the fix.',
21
- category: 'debug',
22
- requiredRoles: ['oracle', 'atlas'],
23
- requiredTools: ['read_file', 'write_file'],
24
- estimatedCost: 'medium',
25
- enabledByDefault: true,
26
- builtin: true,
27
- triggers: [
28
- 'Bug report without a minimal reproduction',
29
- 'Bug that only happens in production (not in tests)',
30
- 'Bug that happens "sometimes" (intermittent)',
31
- 'Bug reported via screenshot or video, not repro steps',
32
- 'A complex multi-agent state race condition that is hard to verify without a test',
33
- ],
34
- antiPatterns: [
35
- 'Bug is in production AND has minimal repro steps already — skip to fix',
36
- 'Bug is in test code itself — fix the test, not the production code',
37
- 'Bug requires special hardware/network state — use a mock instead',
38
- ],
39
- requires: [],
40
- relatedSkills: ['debug-with-rag', 'root-cause-five-whys'],
41
- tags: ['debug', 'reproduction', 'test', 'minimal-example'],
42
- examples: [
43
- {
44
- input: 'Bug report: "Council sometimes shows duplicate messages at the start of a session"',
45
- output: {
46
- minimalRepro: `// tests/regression/duplicate-messages.test.ts
47
- import { runCouncilPure } from '../agents/councilApi';
48
-
49
- describe('council duplicate message bug', () => {
50
- it('does not emit duplicate user message when session resumes', async () => {
51
- const mockProvider = async function* () {
52
- yield { kind: 'text', delta: 'first' };
53
- yield { kind: 'finish', reason: 'stop' };
54
- };
55
- const harness = new AgentHarness({
56
- model: 'test', provider: 'test',
57
- messages: [
58
- { role: 'user', content: 'hi' },
59
- { role: 'user', content: 'hi' }, // duplicate from session resume
60
- ],
61
- tools: [],
62
- providerStream: mockProvider,
63
- });
64
- const events = [];
65
- for await (const e of harness.run()) events.push(e);
66
- const userMessages = events.filter(e => e.type === 'message_delta').length;
67
- expect(userMessages).toBeGreaterThan(0); // sanity
68
- // The actual bug: duplicate is rendered twice
69
- // After fix, expect exactly 1 user message rendered
70
- });
71
- });`,
72
- reproSteps: [
73
- '1. Set up session with duplicate user message in transcript',
74
- '2. Run runCouncilPure',
75
- '3. Observe duplicate message in output',
76
- ],
77
- whyMinimal: 'Removed all agents except the first specialist (was: sisyphus+prometheus+hephaestus+oracle+chairman). Removed RAG context, workspace context. Kept only the duplication pattern.',
78
- },
79
- },
80
- ],
81
- outputSchema: '{ minimalRepro: string; reproSteps: string[]; whyMinimal: string }',
82
- systemPromptFragment: `You are converting a bug report into a minimal failing test.
83
-
84
- ## Methodology
85
- 1. **Read the bug report** carefully: what's the exact symptom? When does it happen?
86
- 2. **Strip to essentials**: remove every agent, tool, env var, user state that isn't strictly required.
87
- 3. **Identify the trigger**: what ONE input causes the bug?
88
- 4. **Write the failing test**: it must FAIL on the current (buggy) code.
89
- 5. **Verify it fails**: the test must fail without any code changes.
90
- 6. **After the fix lands**, the test must PASS.
91
-
92
- ## Output format (JSON-typed)
93
- - minimalRepro: string (the test code, runnable as-is)
94
- - reproSteps: string[] (3-7 numbered steps to reproduce manually)
95
- - whyMinimal: string (what you stripped + why)
96
-
97
- ## Minimal-repro principles
98
- - **One assertion per test** — easier to debug when the test fails
99
- - **Deterministic** — no flaky timing, no random data
100
- - **No external dependencies** — use mocks for network/DB
101
- - **Fast** — under 100ms if possible
102
- - **Independent** — doesn't depend on other tests' state
103
-
104
- Stay under 300 words.${CLARIFICATION_PROTOCOL}`,
105
- };
106
- const debugWithRag = {
107
- id: 'debug-with-rag',
108
- version: '1.0.0',
109
- name: 'Debug With RAG',
110
- description: 'Search the knowledge base for similar past bugs, read the stack trace, propose the most likely root cause and a concrete fix.',
111
- category: 'debug',
112
- requiredRoles: ['oracle', 'atlas'],
113
- requiredTools: ['searchRAG', 'grep_content', 'read_file'],
114
- estimatedCost: 'medium',
115
- enabledByDefault: true,
116
- builtin: true,
117
- triggers: [
118
- 'A bug report with a stack trace or error message',
119
- 'A regression: feature worked before, now broken',
120
- 'A flaky test that fails intermittently',
121
- 'Performance regression: response time > 5s where it used to be < 500ms',
122
- 'A memory leak causing out-of-memory crashes',
123
- ],
124
- antiPatterns: [
125
- 'Bug is obvious from the error message (e.g. TypeError: cannot read property of undefined — fix directly)',
126
- 'No stack trace or repro steps — first ask the user for a minimal repro',
127
- 'A test is failing because the test itself is wrong — debug the test, not the code',
128
- ],
129
- requires: ['reproduce-bug'],
130
- relatedSkills: ['root-cause-five-whys', 'reproduce-bug'],
131
- tags: ['debug', 'rag', 'stack-trace', 'root-cause', 'regression'],
132
- examples: [
133
- {
134
- input: 'TypeError: Cannot read properties of undefined (reading "map") at Council.tsx:847',
135
- output: {
136
- ragSearch: 'searchRAG(query="Council.tsx undefined map error") returned 2 prior incidents: similar bug fixed in commit a3f9d by adding optional chaining; another similar issue in Council.tsx:612.',
137
- stackTraceAnalysis: 'Line 847 is inside `renderMessages()`. The most likely cause: `messages` is undefined when `runCouncilPure()` returns early on the first iteration before any agent has produced output.',
138
- rootCause: 'race condition: messages array is set after the first agent completes, but renderMessages() is called during the loading state when messages is still undefined.',
139
- proposedFix: `function renderMessages() {
140
- const messages = session.messages ?? [];
141
- return messages.map(m => <Message key={m.id} {...m} />);
142
- }`,
143
- verification: 'Add a unit test that calls renderMessages() with messages=undefined and expects [] (not crash). Manual: trigger the bug scenario, confirm no crash.',
144
- },
145
- },
146
- ],
147
- outputSchema: '{ ragSearch: string; stackTraceAnalysis: string; rootCause: string; proposedFix: string; verification: string }',
148
- systemPromptFragment: `You are debugging a bug using the knowledge base.
149
-
150
- ## Methodology
151
- 1. **Extract key terms** from the error message + stack trace (file names, function names, error type).
152
- 2. **Search the knowledge base**: searchRAG(query="<key terms>")
153
- 3. **Read the relevant files**: use read_file with line ranges from the stack trace.
154
- 4. **Identify the root cause**: what's the actual logic error? Don't just fix the symptom.
155
- 5. **Propose a minimal fix**: the SMALLEST change that addresses the root cause.
156
- 6. **Specify verification**: how to confirm the fix works (test case + manual steps).
157
-
158
- ## Output format (JSON-typed)
159
- - ragSearch: string (what you searched + what you found)
160
- - stackTraceAnalysis: string (which line + what's likely happening)
161
- - rootCause: string (the actual bug, not the symptom)
162
- - proposedFix: string (code snippet)
163
- - verification: string (test + manual steps)
164
-
165
- ## Debugging principles
166
- - **Fix the cause, not the symptom** (e.g. don't add a try/catch to silence an error)
167
- - **Minimal change** — don't refactor surrounding code while debugging
168
- - **One hypothesis at a time** — don't list 5 possible causes
169
- - **Verify the fix actually fixes** — write a failing test BEFORE the fix
170
-
171
- Stay under 400 words.${CLARIFICATION_PROTOCOL}`,
172
- };
173
- const rootCauseFiveWhys = {
174
- id: 'root-cause-five-whys',
175
- version: '1.0.0',
176
- name: 'Root Cause Five Whys',
177
- description: 'Apply iterative 5-whys analysis with council consensus. Drill down through 5 levels of "why" to find the systemic root cause, not just the proximate trigger.',
178
- category: 'debug',
179
- requiredRoles: ['sisyphus', 'oracle', 'chairman'],
180
- requiredTools: ['searchRAG', 'read_file'],
181
- estimatedCost: 'high',
182
- enabledByDefault: true,
183
- builtin: true,
184
- triggers: [
185
- 'A bug that keeps recurring after fixes ("whack-a-mole" symptom)',
186
- 'A systemic issue affecting multiple files/modules',
187
- 'A post-mortem on a production incident',
188
- 'Process issues (not just code) — why does the team keep making the same mistake?',
189
- 'Frequent merge failures or regression patterns in a single week',
190
- ],
191
- antiPatterns: [
192
- 'A trivial bug with obvious cause — just fix it directly',
193
- 'A user error (bad input) — the system should validate, not the user change behavior',
194
- 'A flaky test — fix the test, not the underlying system',
195
- ],
196
- requires: ['debug-with-rag'],
197
- relatedSkills: ['debug-with-rag', 'reproduce-bug'],
198
- tags: ['debug', 'root-cause', 'systemic', 'postmortem', 'five-whys'],
199
- examples: [
200
- {
201
- input: 'Production incident: 3 outages in 2 weeks, all caused by the same API rate limit hit',
202
- output: {
203
- whys: [
204
- { level: 1, question: 'Why did the service go down?', answer: 'The MiniMax API returned 429 Too Many Requests at peak load.' },
205
- { level: 2, question: 'Why did we hit the rate limit?', answer: 'We made 200 requests/minute; the limit is 100/minute.' },
206
- { level: 3, question: 'Why did we exceed the rate limit?', answer: 'A single user request triggered 200 sub-requests for parallel tool calls.' },
207
- { level: 4, question: 'Why did one request trigger 200 sub-requests?', answer: 'The agent loop calls all tools in parallel without batching.' },
208
- { level: 5, question: 'Why don\'t we batch tool calls?', answer: 'No rate limiter in the agent loop. The team assumed the API limit was high enough.' },
209
- ],
210
- rootCause: 'No client-side rate limiting. The agent loop fires parallel tool calls without backoff or batching.',
211
- systemicFix: 'Add a token-bucket rate limiter (100 req/min) before the API client. Implement batching for independent tool calls. Add a circuit breaker that pauses on 429 responses.',
212
- processFix: 'Add a pre-deploy load test that runs 1000 concurrent requests and verifies rate-limit handling.',
213
- councilConsensus: 'Chairman: "All three council members agree on the systemic root cause. The process fix is as important as the code fix — load tests should be CI-required."',
214
- },
215
- },
216
- ],
217
- outputSchema: '{ whys: Array<{ level: number; question: string; answer: string }>; rootCause: string; systemicFix: string; processFix: string; councilConsensus: string }',
218
- systemPromptFragment: `You are applying the 5-whys technique with council consensus.
219
-
220
- ## Methodology
221
- 1. **State the symptom** as the starting point for "why?"
222
- 2. **Ask "why?" 5 times**, drilling down through layers of cause
223
- 3. **Each answer must be FACTUAL**, not speculative
224
- 4. **At the 5th why**, you've reached the systemic root cause
225
- 5. **Propose TWO fixes**: systemic (code/architecture) + process (team/workflow)
226
- 6. **Get council consensus**: chairman summarizes agreement from sisyphus (orchestrator) and oracle (analyst)
227
-
228
- ## Output format (JSON-typed)
229
- - whys: Array<{ level: number; question: string; answer: string }>
230
- - rootCause: string (the deepest why)
231
- - systemicFix: string (code/architecture change)
232
- - processFix: string (team/workflow change)
233
- - councilConsensus: string (chairman's summary of agreement)
234
-
235
- ## Anti-patterns to avoid
236
- - **"Human error"** is NEVER the root cause — the system should make the error impossible
237
- - **"Lack of training"** is NEVER the root cause — automation + checklists > training
238
- - **"Not enough time"** is NEVER the root cause — find the constraint, not the excuse
239
- - Stop at the FIRST level if it's a trivial bug — don't overthink simple cases
240
-
241
- Stay under 500 words.${CLARIFICATION_PROTOCOL}`,
242
- };
243
- // prettier-ignore
244
- const registerCodingSkill = skillsModule['register' + 'Coding' + 'Skill'];
245
- registerCodingSkill(reproduceBug);
246
- registerCodingSkill(debugWithRag);
247
- registerCodingSkill(rootCauseFiveWhys);
248
- //# sourceMappingURL=debugging.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"debugging.js","sourceRoot":"","sources":["../../../../src/agents/skills/builtin/debugging.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAC;AAEhD,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;kFAamD,CAAC;AAEnF,MAAM,YAAY,GAA0B;IAC1C,EAAE,EAAE,eAAe;IACnB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,yHAAyH;IACtI,QAAQ,EAAE,OAAO;IACjB,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC;IAClC,aAAa,EAAE,CAAC,WAAW,EAAE,YAAY,CAAC;IAC1C,aAAa,EAAE,QAAQ;IACvB,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACR,2CAA2C;QAC3C,oDAAoD;QACpD,6CAA6C;QAC7C,uDAAuD;QACvD,kFAAkF;KACnF;IACD,YAAY,EAAE;QACZ,wEAAwE;QACxE,oEAAoE;QACpE,kEAAkE;KACnE;IACD,QAAQ,EAAE,EAAE;IACZ,aAAa,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IACzD,IAAI,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,iBAAiB,CAAC;IAC1D,QAAQ,EAAE;QACR;YACE,KAAK,EAAE,oFAAoF;YAC3F,MAAM,EAAE;gBACN,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;IAyBlB;gBACI,UAAU,EAAE;oBACV,6DAA6D;oBAC7D,uBAAuB;oBACvB,wCAAwC;iBACzC;gBACD,UAAU,EAAE,kLAAkL;aAC/L;SACF;KACF;IACD,YAAY,EAAE,oEAAoE;IAClF,oBAAoB,EAAE;;;;;;;;;;;;;;;;;;;;;;uBAsBD,sBAAsB,EAAE;CAC9C,CAAC;AAEF,MAAM,YAAY,GAA0B;IAC1C,EAAE,EAAE,gBAAg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,mBAAmB,GAAI,YAAwC,CAAC,UAAU,GAAG,QAAQ,GAAG,OAAO,CAA2C,CAAC;AAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;AACpL,mBAAmB,CAAC,YAAY,CAAC,CAAC;AAClC,mBAAmB,CAAC,iBAAiB,CAAC,CAAC"}
@@ -1,301 +0,0 @@
1
- import { registerCodingSkill } from '../../skills.js';
2
- const CLARIFICATION_PROTOCOL = `
3
-
4
- WHEN TO ASK THE USER (clarification):
5
- If a single missing fact would materially change your output (target platform, scope, a binary design choice with significant trade-offs, a constraint you cannot safely assume), pause and ask the user by appending EXACTLY this block at the end of your message:
6
-
7
- ---QUESTION---
8
- { "question": "One focused question", "choices": ["Option A", "Option B", "Option C"], "context": "Why this matters" }
9
- ---END---
10
-
11
- Rules for clarifications:
12
- - Ask AT MOST ONE question per turn, and only when genuinely blocked.
13
- - Prefer a small set of concrete "choices" (2-4). The user can still type a custom answer.
14
- - Do NOT ask for information that could be reasonably assumed or already in shared context.
15
- - If you can proceed with a sound documented assumption, DO SO instead of asking.`;
16
- const writeReadme = {
17
- id: 'write-readme',
18
- version: '1.0.0',
19
- name: 'Write README',
20
- description: 'Generate a project README from the codebase. Sections: Title, Badges, Description, Quick Start, Architecture, Development, Testing, Deployment, Contributing, License.',
21
- category: 'docs',
22
- requiredRoles: ['prometheus', 'atlas'],
23
- requiredTools: ['read_file', 'grep_content'],
24
- estimatedCost: 'medium',
25
- enabledByDefault: true,
26
- builtin: true,
27
- triggers: [
28
- 'A new project is being created',
29
- 'Existing README is missing or stale',
30
- 'A project is being open-sourced',
31
- 'Onboarding new team members (they read the README first)',
32
- ],
33
- antiPatterns: [
34
- 'README exists and is recent — update instead of regenerate',
35
- 'Personal/internal project (README rarely matters)',
36
- 'Library with auto-generated docs from source code comments',
37
- ],
38
- requires: [],
39
- relatedSkills: ['write-tsdoc', 'write-changelog'],
40
- tags: ['docs', 'readme', 'onboarding', 'open-source'],
41
- examples: [
42
- {
43
- input: 'Generate README for AnathemaBrain (Electron + React + TypeScript AI agent platform)',
44
- output: {
45
- readme: `# AnathemaBrain
46
-
47
- > An educational Python project for learning how coding agents are built.
48
-
49
- AnathemaBrain is an Electron desktop app... (truncated)
50
-
51
- ## Quick Start
52
-
53
- \`\`\`bash
54
- npm install
55
- npm run dev
56
- \`\`\`
57
-
58
- ## Architecture
59
-
60
- - **Main process** (electron/main/): Node.js, IPC handlers, LLM streaming
61
- - **Renderer** (src/): React 19 UI, Zustand stores
62
- - **Agent system** (src/agents/): Council multi-agent orchestration
63
-
64
- ## Development
65
-
66
- \`\`\`bash
67
- npm run typecheck
68
- npm run test
69
- npm run lint
70
- \`\`\`
71
-
72
- ## Testing
73
-
74
- 96+ tests via Vitest + jsdom.
75
-
76
- ## Deployment
77
-
78
- \`\`\`bash
79
- npm run build
80
- npm run electron:build
81
- \`\`\`
82
-
83
- ## Contributing
84
-
85
- See docs/plans/ for active roadmaps. Pull requests welcome.
86
-
87
- ## License
88
-
89
- Apache 2.0
90
- `,
91
- sections: ['Title + tagline', 'Badges', 'Description', 'Quick Start', 'Architecture diagram', 'Development commands', 'Testing', 'Deployment', 'Contributing link', 'License'],
92
- },
93
- },
94
- ],
95
- outputSchema: '{ readme: string; sections: string[] }',
96
- systemPromptFragment: `You are writing a project README.md.
97
-
98
- ## Required sections (in order)
99
- 1. **Title + tagline** (1 sentence): what is this project?
100
- 2. **Badges** (optional): CI status, npm version, license
101
- 3. **Description** (2-3 paragraphs): what does it do, who is it for
102
- 4. **Quick Start** (5-10 lines): install + run + see something working
103
- 5. **Architecture** (1-2 paragraphs + diagram): high-level structure
104
- 6. **Development** (commands): how to run tests, typecheck, lint
105
- 7. **Testing**: what kind of tests exist, how to run them
106
- 8. **Deployment** (if applicable): how to build + ship
107
- 9. **Contributing**: link to CONTRIBUTING.md or describe PR process
108
- 10. **License**: license type
109
-
110
- ## Output format (JSON-typed)
111
- - readme: string (the full README content in markdown)
112
- - sections: string[] (the sections you included)
113
-
114
- ## README principles
115
- - **Show, don't tell**: code examples for non-trivial concepts
116
- - **Up-to-date**: don't include commands that don't work
117
- - **Scannable**: use headers, bullets, code blocks
118
- - **One page max**: link to deeper docs rather than nesting everything
119
-
120
- Stay under 600 words.${CLARIFICATION_PROTOCOL}`,
121
- };
122
- const writeTsdoc = {
123
- id: 'write-tsdoc',
124
- version: '1.0.0',
125
- name: 'Write TSDoc',
126
- description: 'Generate TSDoc/JSDoc comments for undocumented exports. Output: docstrings with @param, @returns, @throws, @example tags following the TSDoc standard.',
127
- category: 'docs',
128
- requiredRoles: ['atlas'],
129
- requiredTools: ['read_file'],
130
- estimatedCost: 'low',
131
- enabledByDefault: true,
132
- builtin: true,
133
- triggers: [
134
- 'A function or class lacks documentation',
135
- 'A public API is exported without TSDoc',
136
- 'IDE intellisense shows "any" or missing info for a function',
137
- 'A new utility is added to a shared library',
138
- ],
139
- antiPatterns: [
140
- 'The function is private/internal — no need for TSDoc',
141
- 'Auto-generated docs already exist (typedoc, etc.)',
142
- 'The function is self-explanatory (getName → returns name)',
143
- ],
144
- requires: [],
145
- relatedSkills: ['write-readme'],
146
- tags: ['docs', 'tsdoc', 'jsdoc', 'intellisense', 'api-docs'],
147
- examples: [
148
- {
149
- input: 'Add TSDoc to src/lib/formatDuration.ts',
150
- output: {
151
- documented: `/**
152
- * Formats a duration in milliseconds as a human-readable string.
153
- *
154
- * @param ms - Duration in milliseconds. Must be a non-negative finite number.
155
- * @param opts - Formatting options.
156
- * @param opts.style - 'compact' (1h 23m), 'full' (1:23:45), or 'minimal' (23m).
157
- * Defaults to 'compact'.
158
- * @returns The formatted duration string.
159
- * @throws {RangeError} If ms is negative.
160
- * @throws {TypeError} If ms is NaN or Infinity.
161
- *
162
- * @example
163
- * formatDuration(4980000); // '1h 23m'
164
- * formatDuration(4980000, { style: 'full' }); // '1:23:45'
165
- * formatDuration(60000, { style: 'minimal' }); // '1m'
166
- */
167
- export function formatDuration(ms: number, opts?: { style?: 'compact' | 'full' | 'minimal' }): string {
168
- // ... existing implementation
169
- }`,
170
- tagsAdded: ['@param', '@param (nested)', '@returns', '@throws x2', '@example'],
171
- },
172
- },
173
- ],
174
- outputSchema: '{ documented: string; tagsAdded: string[] }',
175
- systemPromptFragment: `You are writing TSDoc comments for a TypeScript function or class.
176
-
177
- ## TSDoc tags (use these)
178
- - \`@param {type} name - description\` — for each parameter
179
- - \`@returns description\` (or \`@return\` legacy alias)
180
- - \`@throws {ErrorType} condition\` — for each throw path
181
- - \`@example\` followed by code block (for non-trivial usage)
182
- - \`@deprecated reason\` — if the function is being phased out
183
- - \`@see FunctionName\` — for cross-references
184
- - \`@remarks\` — additional context
185
- - \`@internal\` — for internal helpers (suppresses from public docs)
186
-
187
- ## Output format (JSON-typed)
188
- - documented: string (the full code block with TSDoc added)
189
- - tagsAdded: string[] (which tags you included)
190
-
191
- ## TSDoc principles
192
- - **First sentence is the summary**: ends with a period, capital letter
193
- - **One @param per parameter**: don't omit even if obvious
194
- - **@throws for EVERY throw path**: callers need to know
195
- - **@example for non-trivial usage**: best way to communicate intent
196
- - **No marketing language**: just describe what the function does
197
- - **No implementation details**: TSDoc is for the API contract, not internals
198
-
199
- Stay under 400 words.${CLARIFICATION_PROTOCOL}`,
200
- };
201
- const writeChangelog = {
202
- id: 'write-changelog',
203
- version: '1.0.0',
204
- name: 'Write Changelog',
205
- description: 'Generate a CHANGELOG.md entry from git history. Follows Keep a Changelog format with sections: Added, Changed, Deprecated, Removed, Fixed, Security. Groups commits by category, deduplicates, writes user-facing descriptions.',
206
- category: 'docs',
207
- requiredRoles: ['atlas'],
208
- requiredTools: [],
209
- estimatedCost: 'low',
210
- enabledByDefault: true,
211
- builtin: true,
212
- triggers: [
213
- 'A release is being prepared',
214
- 'A sprint/iteration ends',
215
- 'Significant changes have accumulated since the last entry',
216
- 'A user-visible breaking change happened',
217
- ],
218
- antiPatterns: [
219
- 'No commits since the last changelog entry — skip',
220
- 'Internal refactors with no user impact — exclude',
221
- 'Doc-only changes — mention briefly in "Changed" or skip',
222
- ],
223
- requires: [],
224
- relatedSkills: ['write-readme', 'write-tsdoc'],
225
- tags: ['docs', 'changelog', 'release-notes', 'keep-a-changelog'],
226
- examples: [
227
- {
228
- input: 'Generate changelog for v0.2.0 from commits since v0.1.0 (last 30 commits)',
229
- output: {
230
- changelog: `# Changelog
231
-
232
- All notable changes to AnathemaBrain are documented in this file.
233
-
234
- ## [0.2.0] - 2026-06-28
235
-
236
- ### Added
237
- - **BrainEvent provider-neutral types** (Phase 11): 12 discriminated union events for agent lifecycle, message streaming, tool execution, errors
238
- - **EventBus**: typed in-memory pub/sub with error isolation
239
- - **AgentHarness**: pure agent loop yielding AsyncIterable<BrainEvent>
240
- - **runCouncilPure()**: council orchestration without window.electronAPI dependency
241
- - **5 built-in coding tools**: read_file, write_file, edit_file, bash, grep_content
242
- - **14 senior-grade coding skills** across 4 categories (Planning, Refactoring, Debugging, Review)
243
-
244
- ### Changed
245
- - LLM streaming now emits BrainEvents alongside the IPC bridge (renderer unchanged)
246
- - Agent system refactored to use AgentHarness as the loop driver
247
-
248
- ### Fixed
249
- - Council event timing: agent_start/agent_end now emit at correct boundaries
250
- - Tool execution start events fire when provider yields tool_call deltas
251
-
252
- ### Security
253
- - Grok OAuth token refresh now respects rate limits (fixed race condition)
254
-
255
- [0.1.0] - 2026-06-01
256
- ... (previous entries)
257
- `,
258
- sectionsUsed: ['Added', 'Changed', 'Fixed', 'Security'],
259
- commitsProcessed: 30,
260
- },
261
- },
262
- ],
263
- outputSchema: '{ changelog: string; sectionsUsed: string[]; commitsProcessed: number }',
264
- systemPromptFragment: `You are writing a CHANGELOG.md entry from git history.
265
-
266
- ## Keep a Changelog format
267
- Sections (use only those with content):
268
- - **Added** — new features
269
- - **Changed** — changes in existing functionality
270
- - **Deprecated** — soon-to-be removed features
271
- - **Removed** — now removed features
272
- - **Fixed** — bug fixes
273
- - **Security** — vulnerability fixes
274
-
275
- ## Methodology
276
- 1. **List commits since the last release** (use git log).
277
- 2. **Categorize each commit** into the right section.
278
- 3. **Translate to user-facing language**: "feat: add event bus" → "EventBus: typed in-memory pub/sub".
279
- 4. **Group related commits**: if 5 commits all touch the event system, write ONE entry.
280
- 5. **Skip internal-only changes**: refactors that don't change behavior.
281
- 6. **Add version + date**: top of the entry.
282
-
283
- ## Output format (JSON-typed)
284
- - changelog: string (the full CHANGELOG.md content)
285
- - sectionsUsed: string[] (which sections you wrote)
286
- - commitsProcessed: number
287
-
288
- ## Changelog principles
289
- - **User-facing language**: write for end-users, not developers
290
- - **Group, don't list**: 1 entry per feature, not 1 per commit
291
- - **Highlight breaking changes**: bold or callout
292
- - **Link to issues/PRs**: reference #123, fixes #456
293
- - **Date format**: ISO 8601 (YYYY-MM-DD)
294
-
295
- Stay under 500 words.${CLARIFICATION_PROTOCOL}`,
296
- };
297
- // Register all skills
298
- registerCodingSkill(writeReadme);
299
- registerCodingSkill(writeTsdoc);
300
- registerCodingSkill(writeChangelog);
301
- //# sourceMappingURL=docs.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../../../../src/agents/skills/builtin/docs.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;kFAamD,CAAC;AAEnF,MAAM,WAAW,GAA0B;IACzC,EAAE,EAAE,cAAc;IAClB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,wKAAwK;IACrL,QAAQ,EAAE,MAAM;IAChB,aAAa,EAAE,CAAC,YAAY,EAAE,OAAO,CAAC;IACtC,aAAa,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC;IAC5C,aAAa,EAAE,QAAQ;IACvB,gBAAgB,EAAE,IAAI;IACtB,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE;QACR,gCAAgC;QAChC,qCAAqC;QACrC,iCAAiC;QACjC,0DAA0D;KAC3D;IACD,YAAY,EAAE;QACZ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