myshell-tools 1.0.0 → 2.0.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.
Files changed (153) hide show
  1. package/CHANGELOG.md +44 -69
  2. package/LICENSE +21 -21
  3. package/README.md +178 -318
  4. package/dist/cli.d.ts +8 -0
  5. package/dist/cli.js +130 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands/cost.d.ts +36 -0
  8. package/dist/commands/cost.js +103 -0
  9. package/dist/commands/cost.js.map +1 -0
  10. package/dist/commands/doctor.d.ts +36 -0
  11. package/dist/commands/doctor.js +115 -0
  12. package/dist/commands/doctor.js.map +1 -0
  13. package/dist/commands/login.d.ts +20 -0
  14. package/dist/commands/login.js +60 -0
  15. package/dist/commands/login.js.map +1 -0
  16. package/dist/core/assess.d.ts +25 -0
  17. package/dist/core/assess.js +142 -0
  18. package/dist/core/assess.js.map +1 -0
  19. package/dist/core/classify.d.ts +19 -0
  20. package/dist/core/classify.js +80 -0
  21. package/dist/core/classify.js.map +1 -0
  22. package/dist/core/escalate.d.ts +32 -0
  23. package/dist/core/escalate.js +57 -0
  24. package/dist/core/escalate.js.map +1 -0
  25. package/dist/core/index.d.ts +13 -0
  26. package/dist/core/index.js +12 -0
  27. package/dist/core/index.js.map +1 -0
  28. package/dist/core/orchestrate.d.ts +42 -0
  29. package/dist/core/orchestrate.js +439 -0
  30. package/dist/core/orchestrate.js.map +1 -0
  31. package/dist/core/policy.d.ts +9 -0
  32. package/dist/core/policy.js +27 -0
  33. package/dist/core/policy.js.map +1 -0
  34. package/dist/core/prompt.d.ts +26 -0
  35. package/dist/core/prompt.js +125 -0
  36. package/dist/core/prompt.js.map +1 -0
  37. package/dist/core/review.d.ts +46 -0
  38. package/dist/core/review.js +148 -0
  39. package/dist/core/review.js.map +1 -0
  40. package/dist/core/route.d.ts +28 -0
  41. package/dist/core/route.js +52 -0
  42. package/dist/core/route.js.map +1 -0
  43. package/dist/core/types.d.ts +141 -0
  44. package/dist/core/types.js +14 -0
  45. package/dist/core/types.js.map +1 -0
  46. package/dist/infra/atomic.d.ts +53 -0
  47. package/dist/infra/atomic.js +171 -0
  48. package/dist/infra/atomic.js.map +1 -0
  49. package/dist/infra/clock.d.ts +9 -0
  50. package/dist/infra/clock.js +15 -0
  51. package/dist/infra/clock.js.map +1 -0
  52. package/dist/infra/index.d.ts +9 -0
  53. package/dist/infra/index.js +7 -0
  54. package/dist/infra/index.js.map +1 -0
  55. package/dist/infra/ledger.d.ts +49 -0
  56. package/dist/infra/ledger.js +90 -0
  57. package/dist/infra/ledger.js.map +1 -0
  58. package/dist/infra/paths.d.ts +28 -0
  59. package/dist/infra/paths.js +38 -0
  60. package/dist/infra/paths.js.map +1 -0
  61. package/dist/infra/pricing.d.ts +47 -0
  62. package/dist/infra/pricing.js +151 -0
  63. package/dist/infra/pricing.js.map +1 -0
  64. package/dist/infra/session.d.ts +28 -0
  65. package/dist/infra/session.js +61 -0
  66. package/dist/infra/session.js.map +1 -0
  67. package/dist/interface/render.d.ts +27 -0
  68. package/dist/interface/render.js +134 -0
  69. package/dist/interface/render.js.map +1 -0
  70. package/dist/interface/repl.d.ts +23 -0
  71. package/dist/interface/repl.js +90 -0
  72. package/dist/interface/repl.js.map +1 -0
  73. package/dist/interface/run.d.ts +20 -0
  74. package/dist/interface/run.js +31 -0
  75. package/dist/interface/run.js.map +1 -0
  76. package/dist/providers/claude-parse.d.ts +24 -0
  77. package/dist/providers/claude-parse.js +113 -0
  78. package/dist/providers/claude-parse.js.map +1 -0
  79. package/dist/providers/claude.d.ts +45 -0
  80. package/dist/providers/claude.js +122 -0
  81. package/dist/providers/claude.js.map +1 -0
  82. package/dist/providers/codex-parse.d.ts +32 -0
  83. package/dist/providers/codex-parse.js +145 -0
  84. package/dist/providers/codex-parse.js.map +1 -0
  85. package/dist/providers/codex.d.ts +44 -0
  86. package/dist/providers/codex.js +124 -0
  87. package/dist/providers/codex.js.map +1 -0
  88. package/dist/providers/detect.d.ts +49 -0
  89. package/dist/providers/detect.js +125 -0
  90. package/dist/providers/detect.js.map +1 -0
  91. package/dist/providers/errors.d.ts +49 -0
  92. package/dist/providers/errors.js +189 -0
  93. package/dist/providers/errors.js.map +1 -0
  94. package/dist/providers/index.d.ts +9 -0
  95. package/dist/providers/index.js +7 -0
  96. package/dist/providers/index.js.map +1 -0
  97. package/dist/providers/port.d.ts +74 -0
  98. package/dist/providers/port.js +16 -0
  99. package/dist/providers/port.js.map +1 -0
  100. package/dist/providers/registry.d.ts +21 -0
  101. package/dist/providers/registry.js +34 -0
  102. package/dist/providers/registry.js.map +1 -0
  103. package/dist/ui/banner.d.ts +19 -0
  104. package/dist/ui/banner.js +32 -0
  105. package/dist/ui/banner.js.map +1 -0
  106. package/dist/ui/spinner.d.ts +27 -0
  107. package/dist/ui/spinner.js +67 -0
  108. package/dist/ui/spinner.js.map +1 -0
  109. package/dist/ui/theme.d.ts +32 -0
  110. package/dist/ui/theme.js +56 -0
  111. package/dist/ui/theme.js.map +1 -0
  112. package/package.json +55 -49
  113. package/data/orchestrator.json +0 -113
  114. package/src/auth/recovery.mjs +0 -328
  115. package/src/auth/refresh.mjs +0 -373
  116. package/src/chef.mjs +0 -348
  117. package/src/cli/doctor.mjs +0 -568
  118. package/src/cli/reset.mjs +0 -447
  119. package/src/cli/status.mjs +0 -379
  120. package/src/cli.mjs +0 -429
  121. package/src/commands/doctor.mjs +0 -375
  122. package/src/commands/help.mjs +0 -324
  123. package/src/commands/status.mjs +0 -331
  124. package/src/monitor/health.mjs +0 -486
  125. package/src/monitor/performance.mjs +0 -442
  126. package/src/monitor/report.mjs +0 -535
  127. package/src/orchestrator/classify.mjs +0 -391
  128. package/src/orchestrator/confidence.mjs +0 -151
  129. package/src/orchestrator/handoffs.mjs +0 -231
  130. package/src/orchestrator/review.mjs +0 -222
  131. package/src/providers/balance.mjs +0 -201
  132. package/src/providers/claude.mjs +0 -236
  133. package/src/providers/codex.mjs +0 -255
  134. package/src/providers/detect.mjs +0 -185
  135. package/src/providers/errors.mjs +0 -373
  136. package/src/providers/select.mjs +0 -162
  137. package/src/repl-enhanced.mjs +0 -417
  138. package/src/repl.mjs +0 -321
  139. package/src/state/archive.mjs +0 -366
  140. package/src/state/atomic.mjs +0 -116
  141. package/src/state/cleanup.mjs +0 -440
  142. package/src/state/recovery.mjs +0 -461
  143. package/src/state/session.mjs +0 -147
  144. package/src/ui/errors.mjs +0 -456
  145. package/src/ui/formatter.mjs +0 -327
  146. package/src/ui/icons.mjs +0 -318
  147. package/src/ui/progress.mjs +0 -468
  148. package/templates/prompts/confidence-format.txt +0 -14
  149. package/templates/prompts/ic-with-feedback.txt +0 -41
  150. package/templates/prompts/ic.txt +0 -13
  151. package/templates/prompts/manager-review.txt +0 -40
  152. package/templates/prompts/manager.txt +0 -14
  153. package/templates/prompts/worker.txt +0 -12
@@ -1,468 +0,0 @@
1
- /**
2
- * progress.mjs — Progress indicators and loading animations
3
- */
4
-
5
- import { colors, fmt } from './formatter.mjs';
6
- import { progress as progressIcons, getSpinnerFrame } from './icons.mjs';
7
-
8
- /**
9
- * Spinner class for animated loading indicators
10
- */
11
- export class Spinner {
12
- constructor(options = {}) {
13
- this.frames = options.frames || progressIcons.spinner;
14
- this.interval = options.interval || 100;
15
- this.text = options.text || '';
16
- this.color = options.color || colors.blue;
17
-
18
- this.currentFrame = 0;
19
- this.timer = null;
20
- this.isSpinning = false;
21
- }
22
-
23
- start(text) {
24
- if (text) this.text = text;
25
- this.isSpinning = true;
26
- this.currentFrame = 0;
27
-
28
- this.timer = setInterval(() => {
29
- this.render();
30
- this.currentFrame = (this.currentFrame + 1) % this.frames.length;
31
- }, this.interval);
32
-
33
- // Initial render
34
- this.render();
35
- return this;
36
- }
37
-
38
- stop(finalText = null) {
39
- if (this.timer) {
40
- clearInterval(this.timer);
41
- this.timer = null;
42
- }
43
- this.isSpinning = false;
44
-
45
- // Clear the line and show final message
46
- process.stdout.write('\r\x1b[K');
47
- if (finalText !== null) {
48
- process.stdout.write(finalText + '\n');
49
- }
50
-
51
- return this;
52
- }
53
-
54
- updateText(text) {
55
- this.text = text;
56
- if (this.isSpinning) {
57
- this.render();
58
- }
59
- return this;
60
- }
61
-
62
- render() {
63
- const frame = this.frames[this.currentFrame];
64
- const coloredFrame = `${this.color}${frame}${colors.reset}`;
65
- const line = `\r${coloredFrame} ${this.text}`;
66
- process.stdout.write(line);
67
- }
68
-
69
- success(text) {
70
- return this.stop(fmt.green(`✅ ${text || this.text}`));
71
- }
72
-
73
- error(text) {
74
- return this.stop(fmt.red(`❌ ${text || this.text}`));
75
- }
76
-
77
- warning(text) {
78
- return this.stop(fmt.yellow(`⚠️ ${text || this.text}`));
79
- }
80
-
81
- info(text) {
82
- return this.stop(fmt.blue(`💡 ${text || this.text}`));
83
- }
84
- }
85
-
86
- /**
87
- * Progress bar for deterministic progress
88
- */
89
- export class ProgressBar {
90
- constructor(options = {}) {
91
- this.total = options.total || 100;
92
- this.width = options.width || 30;
93
- this.format = options.format || ':bar :current/:total (:percent)';
94
- this.complete = options.complete || '█';
95
- this.incomplete = options.incomplete || '░';
96
- this.color = options.color || colors.green;
97
- this.clear = options.clear !== false;
98
-
99
- this.current = 0;
100
- this.startTime = Date.now();
101
- }
102
-
103
- tick(delta = 1, tokens = {}) {
104
- this.current = Math.min(this.current + delta, this.total);
105
- this.render(tokens);
106
-
107
- if (this.current >= this.total && this.clear) {
108
- this.complete();
109
- }
110
- }
111
-
112
- update(current, tokens = {}) {
113
- this.current = Math.min(current, this.total);
114
- this.render(tokens);
115
-
116
- if (this.current >= this.total && this.clear) {
117
- this.complete();
118
- }
119
- }
120
-
121
- render(tokens = {}) {
122
- const percent = Math.round((this.current / this.total) * 100);
123
- const completed = Math.round((this.current / this.total) * this.width);
124
- const remaining = this.width - completed;
125
-
126
- const completedBar = this.complete.repeat(completed);
127
- const remainingBar = this.incomplete.repeat(remaining);
128
- const bar = `${this.color}${completedBar}${colors.dim}${remainingBar}${colors.reset}`;
129
-
130
- const elapsed = Date.now() - this.startTime;
131
- const rate = this.current / (elapsed / 1000);
132
- const eta = this.current > 0 ? (this.total - this.current) / rate : 0;
133
-
134
- const formatTokens = {
135
- ':bar': bar,
136
- ':current': this.current,
137
- ':total': this.total,
138
- ':percent': `${percent}%`,
139
- ':elapsed': this.formatTime(elapsed / 1000),
140
- ':eta': this.formatTime(eta),
141
- ':rate': rate.toFixed(1),
142
- ...tokens
143
- };
144
-
145
- let output = this.format;
146
- for (const [token, value] of Object.entries(formatTokens)) {
147
- output = output.replace(new RegExp(token.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'), 'g'), value);
148
- }
149
-
150
- process.stdout.write(`\r${output}`);
151
- }
152
-
153
- complete() {
154
- process.stdout.write('\n');
155
- }
156
-
157
- formatTime(seconds) {
158
- if (seconds < 60) return `${Math.round(seconds)}s`;
159
- if (seconds < 3600) return `${Math.round(seconds / 60)}m`;
160
- return `${Math.round(seconds / 3600)}h`;
161
- }
162
- }
163
-
164
- /**
165
- * Multi-line progress tracker for complex operations
166
- */
167
- export class MultiProgress {
168
- constructor() {
169
- this.items = new Map();
170
- this.isRendering = false;
171
- this.renderTimer = null;
172
- }
173
-
174
- add(id, options = {}) {
175
- const item = {
176
- id,
177
- text: options.text || id,
178
- status: options.status || 'pending', // pending, running, success, error
179
- progress: options.progress || 0,
180
- total: options.total || 100,
181
- color: options.color || colors.blue,
182
- showProgress: options.showProgress !== false
183
- };
184
-
185
- this.items.set(id, item);
186
- this.render();
187
- return item;
188
- }
189
-
190
- update(id, updates) {
191
- const item = this.items.get(id);
192
- if (!item) return;
193
-
194
- Object.assign(item, updates);
195
- this.render();
196
- return item;
197
- }
198
-
199
- success(id, text) {
200
- return this.update(id, { status: 'success', text: text || this.items.get(id)?.text });
201
- }
202
-
203
- error(id, text) {
204
- return this.update(id, { status: 'error', text: text || this.items.get(id)?.text });
205
- }
206
-
207
- start(id, text) {
208
- return this.update(id, { status: 'running', text: text || this.items.get(id)?.text });
209
- }
210
-
211
- complete() {
212
- if (this.renderTimer) {
213
- clearInterval(this.renderTimer);
214
- this.renderTimer = null;
215
- }
216
- this.isRendering = false;
217
- process.stdout.write('\n');
218
- }
219
-
220
- render() {
221
- if (this.items.size === 0) return;
222
-
223
- // Move cursor to beginning of our section
224
- const lineCount = this.items.size;
225
- if (this.isRendering) {
226
- process.stdout.write(`\x1b[${lineCount}A`);
227
- }
228
- this.isRendering = true;
229
-
230
- for (const item of this.items.values()) {
231
- const statusIcon = this.getStatusIcon(item.status);
232
- const progressText = item.showProgress && item.total > 0
233
- ? this.formatProgress(item.progress, item.total)
234
- : '';
235
-
236
- const line = `${statusIcon} ${item.text}${progressText}`;
237
- process.stdout.write(`\r\x1b[K${line}\n`);
238
- }
239
-
240
- // Move cursor back up to the end of our section
241
- process.stdout.write(`\x1b[${lineCount}A`);
242
- }
243
-
244
- getStatusIcon(status) {
245
- switch (status) {
246
- case 'pending': return fmt.dim('○');
247
- case 'running': return fmt.blue('●');
248
- case 'success': return fmt.green('✅');
249
- case 'error': return fmt.red('❌');
250
- default: return fmt.dim('○');
251
- }
252
- }
253
-
254
- formatProgress(current, total) {
255
- if (total <= 0) return '';
256
- const percent = Math.round((current / total) * 100);
257
- return fmt.dim(` (${percent}%)`);
258
- }
259
- }
260
-
261
- /**
262
- * Simple loading dots animation
263
- */
264
- export class LoadingDots {
265
- constructor(text = 'Loading', maxDots = 3) {
266
- this.baseText = text;
267
- this.maxDots = maxDots;
268
- this.currentDots = 0;
269
- this.timer = null;
270
- }
271
-
272
- start() {
273
- this.timer = setInterval(() => {
274
- this.render();
275
- this.currentDots = (this.currentDots + 1) % (this.maxDots + 1);
276
- }, 500);
277
-
278
- this.render();
279
- return this;
280
- }
281
-
282
- stop(finalText = null) {
283
- if (this.timer) {
284
- clearInterval(this.timer);
285
- this.timer = null;
286
- }
287
-
288
- process.stdout.write('\r\x1b[K');
289
- if (finalText !== null) {
290
- process.stdout.write(finalText + '\n');
291
- }
292
-
293
- return this;
294
- }
295
-
296
- render() {
297
- const dots = '.'.repeat(this.currentDots);
298
- const spaces = ' '.repeat(this.maxDots - this.currentDots);
299
- process.stdout.write(`\r${this.baseText}${dots}${spaces}`);
300
- }
301
- }
302
-
303
- /**
304
- * Hierarchical progress display for AI orchestration
305
- */
306
- export class HierarchicalProgress {
307
- constructor() {
308
- this.agents = new Map(); // id -> { tier, status, text, confidence, model }
309
- this.isActive = false;
310
- }
311
-
312
- addAgent(id, options = {}) {
313
- const agent = {
314
- id,
315
- tier: options.tier || 'worker',
316
- status: 'starting',
317
- text: options.text || `${options.tier} agent`,
318
- confidence: options.confidence || null,
319
- model: options.model || null,
320
- startTime: Date.now(),
321
- ...options
322
- };
323
-
324
- this.agents.set(id, agent);
325
- this.render();
326
- return agent;
327
- }
328
-
329
- updateAgent(id, updates) {
330
- const agent = this.agents.get(id);
331
- if (!agent) return;
332
-
333
- Object.assign(agent, updates);
334
- this.render();
335
- return agent;
336
- }
337
-
338
- escalate(fromId, toId, toTier, reason) {
339
- this.updateAgent(fromId, { status: 'escalating' });
340
-
341
- this.addAgent(toId, {
342
- tier: toTier,
343
- text: `${toTier.toUpperCase()}: ${reason}`,
344
- status: 'thinking'
345
- });
346
-
347
- this.render();
348
- }
349
-
350
- delegate(fromId, toId, toTier, task) {
351
- this.addAgent(toId, {
352
- tier: toTier,
353
- text: `${toTier.toUpperCase()}: ${task}`,
354
- status: 'working'
355
- });
356
-
357
- this.render();
358
- }
359
-
360
- complete(id, result = null) {
361
- const agent = this.agents.get(id);
362
- if (!agent) return;
363
-
364
- this.updateAgent(id, {
365
- status: 'completed',
366
- text: result || agent.text,
367
- endTime: Date.now()
368
- });
369
-
370
- // Show final summary
371
- setTimeout(() => this.finish(), 1000);
372
- }
373
-
374
- fail(id, error) {
375
- this.updateAgent(id, {
376
- status: 'failed',
377
- text: `${error}`,
378
- endTime: Date.now()
379
- });
380
- }
381
-
382
- render() {
383
- if (this.agents.size === 0) return;
384
-
385
- console.log('\n' + fmt.bold('🔄 AI Orchestration Active:'));
386
-
387
- // Group by tier for hierarchical display
388
- const tiers = ['manager', 'ic', 'worker'];
389
- const tierColors = {
390
- manager: colors.red,
391
- ic: colors.yellow,
392
- worker: colors.blue
393
- };
394
-
395
- for (const tier of tiers) {
396
- const tierAgents = Array.from(this.agents.values()).filter(a => a.tier === tier);
397
- if (tierAgents.length === 0) continue;
398
-
399
- const tierColor = tierColors[tier];
400
- const tierIcon = tier === 'manager' ? '👔' : tier === 'ic' ? '👨‍💻' : '🏗️';
401
-
402
- console.log(` ${tierColor}${tierIcon} ${tier.toUpperCase()}${colors.reset}`);
403
-
404
- for (const agent of tierAgents) {
405
- const statusIcon = this.getAgentStatusIcon(agent.status);
406
- const confidenceText = agent.confidence
407
- ? ` • confidence: ${fmt.dim((agent.confidence * 100).toFixed(0) + '%')}`
408
- : '';
409
-
410
- console.log(` ${statusIcon} ${agent.text}${confidenceText}`);
411
-
412
- if (agent.model) {
413
- console.log(` ${fmt.dim(`└─ ${agent.model}`)}`);
414
- }
415
- }
416
- }
417
- }
418
-
419
- getAgentStatusIcon(status) {
420
- switch (status) {
421
- case 'starting': return fmt.blue('🔄');
422
- case 'thinking': return fmt.blue('🧠');
423
- case 'working': return fmt.yellow('⚡');
424
- case 'escalating': return fmt.orange('↗️');
425
- case 'completed': return fmt.green('✅');
426
- case 'failed': return fmt.red('❌');
427
- default: return fmt.dim('○');
428
- }
429
- }
430
-
431
- finish() {
432
- console.log('');
433
- this.agents.clear();
434
- this.isActive = false;
435
- }
436
- }
437
-
438
- /**
439
- * Create a simple spinner with common presets
440
- */
441
- export function createSpinner(text, preset = 'default') {
442
- const presets = {
443
- default: { frames: progressIcons.spinner, color: colors.blue },
444
- dots: { frames: progressIcons.dots, color: colors.green },
445
- clock: { frames: progressIcons.clock, color: colors.yellow },
446
- arrow: { frames: progressIcons.arrow, color: colors.cyan }
447
- };
448
-
449
- const options = presets[preset] || presets.default;
450
- return new Spinner({ text, ...options });
451
- }
452
-
453
- /**
454
- * Show a loading animation for a promise
455
- */
456
- export async function withSpinner(promise, text, options = {}) {
457
- const spinner = createSpinner(text, options.preset);
458
- spinner.start();
459
-
460
- try {
461
- const result = await promise;
462
- spinner.success(options.successText || `${text} completed`);
463
- return result;
464
- } catch (error) {
465
- spinner.error(options.errorText || `${text} failed`);
466
- throw error;
467
- }
468
- }
@@ -1,14 +0,0 @@
1
- IMPORTANT: All responses MUST end with structured confidence information:
2
-
3
- {"confidence": 0.0-1.0, "escalate": true|false, "reason": "brief explanation", "needs_review": true|false}
4
-
5
- Where:
6
- - confidence: Your certainty level (0.0 = very uncertain, 1.0 = completely certain)
7
- - escalate: Whether this should go to a higher tier (true/false)
8
- - reason: Brief explanation of your confidence level or escalation need
9
- - needs_review: Whether this work should be reviewed by a manager (true/false)
10
-
11
- Examples:
12
- {"confidence": 0.9, "escalate": false, "reason": "straightforward implementation", "needs_review": false}
13
- {"confidence": 0.3, "escalate": true, "reason": "complex security implications", "needs_review": true}
14
- {"confidence": 0.7, "escalate": false, "reason": "solid approach but edge cases exist", "needs_review": true}
@@ -1,41 +0,0 @@
1
- You are an IC (Individual Contributor) in an AI organization. You handle most of the implementation work:
2
-
3
- TASK: {{task}}
4
-
5
- {{#if manager_notes}}
6
- MANAGER FEEDBACK (from previous attempt):
7
- ═══════════════════════════════════════
8
- {{manager_notes}}
9
- ═══════════════════════════════════════
10
-
11
- Your manager has reviewed your previous work and wants you to address the above issues.
12
- Focus on fixing exactly what they pointed out.
13
- {{/if}}
14
-
15
- You are the primary workhorse - most tasks should be completed at your level. Focus on:
16
- - Code implementation and editing
17
- - Refactoring and improvements
18
- - Running tests and debugging
19
- - Git operations and file management
20
-
21
- {{#if attempt}}
22
- This is attempt #{{attempt}}. Apply the manager's feedback carefully.
23
- {{/if}}
24
-
25
- If you encounter something that needs architectural decisions, security review, or complex debugging, escalate to your manager.
26
-
27
- End your response with: {"confidence": 0.0-1.0, "escalate": true|false, "reason": "brief explanation"}
28
-
29
- {{#if files}}
30
- Relevant files:
31
- {{#each files}}
32
- - {{this}}
33
- {{/each}}
34
- {{/if}}
35
-
36
- {{#if constraints}}
37
- Constraints:
38
- {{#each constraints}}
39
- - {{this}}
40
- {{/each}}
41
- {{/if}}
@@ -1,13 +0,0 @@
1
- You are an IC (Individual Contributor) in an AI organization. You handle most of the implementation work:
2
-
3
- TASK: {{task}}
4
-
5
- You are the primary workhorse - most tasks should be completed at your level. Focus on:
6
- - Code implementation and editing
7
- - Refactoring and improvements
8
- - Running tests and debugging
9
- - Git operations and file management
10
-
11
- If you encounter something that needs architectural decisions, security review, or complex debugging, escalate to your manager.
12
-
13
- End your response with: {"confidence": 0.0-1.0, "escalate": true|false, "reason": "brief explanation"}
@@ -1,40 +0,0 @@
1
- You are a MANAGER reviewing work completed by an IC (Individual Contributor).
2
-
3
- ORIGINAL TASK: {{task}}
4
-
5
- IC'S WORK RESULT:
6
- ─────────────────
7
- {{ic_output}}
8
- ─────────────────
9
- IC Confidence: {{ic_confidence}}
10
- Duration: {{duration_ms}}ms
11
- Model: {{ic_model}}
12
- {{#if attempt}}
13
- NOTE: This is attempt #{{attempt}}. Previous manager feedback was addressed.
14
- {{/if}}
15
- {{#if manager_notes}}
16
-
17
- PREVIOUS MANAGER FEEDBACK:
18
- {{manager_notes}}
19
- {{/if}}
20
-
21
- Your job is to review this work and decide:
22
-
23
- REVIEW CRITERIA:
24
- 1. CORRECTNESS: Did the IC actually complete the task as requested?
25
- 2. QUALITY: Is the implementation solid, or are there obvious issues?
26
- 3. SECURITY: Any security concerns or risky patterns?
27
- 4. COMPLETENESS: Are there missing pieces or edge cases not handled?
28
- 5. EDGE CASES: What could break under unusual conditions?
29
-
30
- POSSIBLE VERDICTS:
31
- - APPROVE: Work is good, ship it
32
- - BOUNCE: IC should fix issues and retry (provide specific feedback)
33
- - ESCALATE: Manager should take over this task directly
34
- - REFRAME: Task needs to be broken down or approached differently
35
-
36
- Your response MUST end with structured output:
37
- {"verdict": "approve|bounce|escalate|reframe", "notes": "specific feedback", "confidence": 0.0-1.0, "risk_level": "low|medium|high|critical"}
38
-
39
- If bouncing, be specific about what needs to be fixed.
40
- If approving, note any minor concerns for future reference.
@@ -1,14 +0,0 @@
1
- You are a MANAGER in an AI organization. Handle high-level decisions and review complex problems:
2
-
3
- TASK: {{task}}
4
-
5
- You handle:
6
- - Architecture decisions
7
- - Security reviews
8
- - Complex debugging that requires deep reasoning
9
- - Code reviews and quality decisions
10
- - Escalated issues from ICs
11
-
12
- Either solve the problem completely or provide specific guidance for your team to implement.
13
-
14
- End your response with: {"confidence": 0.0-1.0, "escalate": false, "reason": "solution approach"}
@@ -1,12 +0,0 @@
1
- You are a WORKER in an AI organization hierarchy. Handle this specific, simple task efficiently:
2
-
3
- TASK: {{task}}
4
-
5
- You are the cheapest, fastest model in the org chart. Focus on:
6
- - File lookups, grep operations, simple reads
7
- - Quick information gathering
8
- - Basic operations that don't require complex reasoning
9
-
10
- Work efficiently and honestly. If the task is more complex than you can handle confidently, be honest about it.
11
-
12
- End your response with: {"confidence": 0.0-1.0, "escalate": true|false, "reason": "brief explanation"}