@agents-inc/cli 0.88.0 → 0.91.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.
- package/CHANGELOG.md +29 -0
- package/dist/{chunk-RWVF6DQE.js → chunk-2RFE7LTV.js} +3 -3
- package/dist/{chunk-ZFQTKY2S.js → chunk-2RXDM5HN.js} +5 -5
- package/dist/chunk-2RXDM5HN.js.map +1 -0
- package/dist/{chunk-CKZ65VFJ.js → chunk-35WALWDD.js} +5 -5
- package/dist/chunk-35WALWDD.js.map +1 -0
- package/dist/{chunk-BEZ6ZPDS.js → chunk-3O57Z6Q3.js} +3 -3
- package/dist/{chunk-2DRPZXXK.js → chunk-3STOCHK4.js} +4 -4
- package/dist/{chunk-ANXHMG32.js → chunk-47HMJ4BY.js} +28 -1
- package/dist/chunk-47HMJ4BY.js.map +1 -0
- package/dist/{chunk-LHUK5L6P.js → chunk-4DZNTUK7.js} +23 -10
- package/dist/chunk-4DZNTUK7.js.map +1 -0
- package/dist/{chunk-REZZSDXG.js → chunk-5IR4QU7G.js} +37 -24
- package/dist/chunk-5IR4QU7G.js.map +1 -0
- package/dist/{chunk-TAPEVEET.js → chunk-7K7SA4TZ.js} +2 -2
- package/dist/chunk-7QWCPF6F.js +135 -0
- package/dist/chunk-7QWCPF6F.js.map +1 -0
- package/dist/{chunk-WTPPVXJP.js → chunk-AWB6DO24.js} +17 -10
- package/dist/chunk-AWB6DO24.js.map +1 -0
- package/dist/{chunk-SB2R5KHJ.js → chunk-BGICSUQK.js} +2 -2
- package/dist/{chunk-HK53FRMU.js → chunk-DVBA6PGR.js} +3 -7
- package/dist/{chunk-HK53FRMU.js.map → chunk-DVBA6PGR.js.map} +1 -1
- package/dist/{chunk-YM3V4Q3W.js → chunk-DZ2IQERZ.js} +5 -5
- package/dist/{chunk-I5AZKNNL.js → chunk-FEKVKYCN.js} +2 -2
- package/dist/{chunk-EADZIYQW.js → chunk-FVBSRBU3.js} +30 -21
- package/dist/chunk-FVBSRBU3.js.map +1 -0
- package/dist/{chunk-6YR2NEW3.js → chunk-G3VPBEBC.js} +2 -2
- package/dist/{chunk-JNUFQBXX.js → chunk-HCSIS35Y.js} +2 -2
- package/dist/{chunk-NPMMU4GY.js → chunk-IR7ADPAZ.js} +56 -1
- package/dist/chunk-IR7ADPAZ.js.map +1 -0
- package/dist/{chunk-AP4DLJDP.js → chunk-JBS4CCJG.js} +2 -2
- package/dist/chunk-M6J5YQ3P.js +100 -0
- package/dist/chunk-M6J5YQ3P.js.map +1 -0
- package/dist/{chunk-23M3SPXX.js → chunk-MBEXASMU.js} +8 -8
- package/dist/{chunk-TEA5KBIA.js → chunk-NESVWSI7.js} +2 -2
- package/dist/{chunk-ZTRQO5CX.js → chunk-OOHPUT5M.js} +2 -2
- package/dist/{chunk-V36FRPAU.js → chunk-ORTNQZLF.js} +4 -2
- package/dist/{chunk-V36FRPAU.js.map → chunk-ORTNQZLF.js.map} +1 -1
- package/dist/{chunk-ANZV33N5.js → chunk-OVY7IV3C.js} +2 -2
- package/dist/{chunk-ITBSJNIC.js → chunk-Q3NIGPRZ.js} +3 -3
- package/dist/{chunk-5IYZGJDW.js → chunk-RDQBXB3Y.js} +6 -6
- package/dist/{chunk-MY4TVLRB.js → chunk-TJHCK4OS.js} +4 -4
- package/dist/{chunk-PZBLGD7O.js → chunk-UCORQ7YO.js} +2 -2
- package/dist/{chunk-NL5EB57E.js → chunk-UHARXISZ.js} +4 -4
- package/dist/chunk-UHARXISZ.js.map +1 -0
- package/dist/{chunk-57KI55GJ.js → chunk-UK572773.js} +3 -3
- package/dist/{chunk-DDCW4SKN.js → chunk-V75HVZTB.js} +7 -6
- package/dist/chunk-V75HVZTB.js.map +1 -0
- package/dist/{chunk-6XWHJHNZ.js → chunk-WEYWZ7UE.js} +4 -1
- package/dist/chunk-WEYWZ7UE.js.map +1 -0
- package/dist/{chunk-STMRDPGZ.js → chunk-XM2Y5AFQ.js} +2 -2
- package/dist/commands/build/marketplace.js +62 -44
- package/dist/commands/build/marketplace.js.map +1 -1
- package/dist/commands/build/plugins.js +46 -37
- package/dist/commands/build/plugins.js.map +1 -1
- package/dist/commands/build/stack.js +43 -35
- package/dist/commands/build/stack.js.map +1 -1
- package/dist/commands/compile.js +44 -41
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/config/index.js +8 -8
- package/dist/commands/config/path.js +7 -7
- package/dist/commands/config/show.js +8 -8
- package/dist/commands/diff.js +13 -12
- package/dist/commands/diff.js.map +1 -1
- package/dist/commands/doctor.js +17 -40
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/edit.js +63 -70
- package/dist/commands/edit.js.map +1 -1
- package/dist/commands/eject.js +9 -9
- package/dist/commands/import/skill.js +60 -50
- package/dist/commands/import/skill.js.map +1 -1
- package/dist/commands/info.js +9 -9
- package/dist/commands/init.js +28 -29
- package/dist/commands/list.js +7 -7
- package/dist/commands/new/agent.js +8 -8
- package/dist/commands/new/marketplace.js +98 -83
- package/dist/commands/new/marketplace.js.map +1 -1
- package/dist/commands/new/skill.js +7 -7
- package/dist/commands/outdated.js +91 -100
- package/dist/commands/outdated.js.map +1 -1
- package/dist/commands/search.js +11 -11
- package/dist/commands/uninstall.js +40 -31
- package/dist/commands/uninstall.js.map +1 -1
- package/dist/commands/update.js +9 -9
- package/dist/commands/validate.js +7 -7
- package/dist/components/skill-search/skill-search.js +2 -2
- package/dist/components/wizard/category-grid.js +3 -3
- package/dist/components/wizard/category-grid.test.js +12 -12
- package/dist/components/wizard/domain-selection.js +9 -9
- package/dist/components/wizard/info-panel.js +18 -0
- package/dist/components/wizard/search-modal.js +2 -2
- package/dist/components/wizard/search-modal.test.js +2 -2
- package/dist/components/wizard/source-grid.js +4 -4
- package/dist/components/wizard/source-grid.test.js +13 -13
- package/dist/components/wizard/stack-selection.js +8 -8
- package/dist/components/wizard/stats-panel.js +106 -5
- package/dist/components/wizard/stats-panel.js.map +1 -1
- package/dist/components/wizard/step-agents.js +9 -9
- package/dist/components/wizard/step-agents.test.js +12 -12
- package/dist/components/wizard/step-build.js +10 -11
- package/dist/components/wizard/step-build.test.js +13 -14
- package/dist/components/wizard/step-build.test.js.map +1 -1
- package/dist/components/wizard/step-confirm.js +4 -4
- package/dist/components/wizard/step-confirm.test.js +10 -10
- package/dist/components/wizard/step-refine.js +2 -2
- package/dist/components/wizard/step-refine.test.js +2 -2
- package/dist/components/wizard/step-settings.js +8 -8
- package/dist/components/wizard/step-settings.test.js +11 -11
- package/dist/components/wizard/step-sources.js +12 -12
- package/dist/components/wizard/step-sources.test.js +15 -15
- package/dist/components/wizard/step-stack.js +9 -9
- package/dist/components/wizard/step-stack.test.js +10 -10
- package/dist/components/wizard/wizard-layout.js +12 -12
- package/dist/components/wizard/wizard.js +24 -25
- package/dist/config-exports.js +1 -1
- package/dist/hooks/init.js +28 -29
- package/dist/hooks/init.js.map +1 -1
- package/dist/{loader-SQOK2BF7.js → loader-D5VE56SI.js} +4 -4
- package/dist/{source-loader-CCECAU5L.js → source-loader-INCCYL5P.js} +7 -7
- package/dist/source-manager-TEOUO734.js +19 -0
- package/dist/src/agents/developer/ai-developer/critical-reminders.md +31 -0
- package/dist/src/agents/developer/ai-developer/critical-requirements.md +17 -0
- package/dist/src/agents/developer/ai-developer/examples.md +137 -0
- package/dist/src/agents/developer/ai-developer/intro.md +23 -0
- package/dist/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/dist/src/agents/developer/ai-developer/output-format.md +228 -0
- package/dist/src/agents/developer/ai-developer/workflow.md +464 -0
- package/dist/src/agents/planning/api-pm/critical-reminders.md +32 -0
- package/dist/src/agents/planning/api-pm/critical-requirements.md +21 -0
- package/dist/src/agents/planning/api-pm/examples.md +157 -0
- package/dist/src/agents/planning/api-pm/intro.md +14 -0
- package/dist/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/dist/src/agents/planning/api-pm/output-format.md +317 -0
- package/dist/src/agents/planning/api-pm/workflow.md +214 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-reminders.md +23 -0
- package/dist/src/agents/reviewer/ai-reviewer/critical-requirements.md +19 -0
- package/dist/src/agents/reviewer/ai-reviewer/examples.md +131 -0
- package/dist/src/agents/reviewer/ai-reviewer/intro.md +23 -0
- package/dist/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/ai-reviewer/output-format.md +263 -0
- package/dist/src/agents/reviewer/ai-reviewer/workflow.md +177 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-reminders.md +21 -0
- package/dist/src/agents/reviewer/infra-reviewer/critical-requirements.md +19 -0
- package/dist/src/agents/reviewer/infra-reviewer/examples.md +123 -0
- package/dist/src/agents/reviewer/infra-reviewer/intro.md +25 -0
- package/dist/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/dist/src/agents/reviewer/infra-reviewer/output-format.md +240 -0
- package/dist/src/agents/reviewer/infra-reviewer/workflow.md +250 -0
- package/dist/src/agents/tester/api-tester/critical-reminders.md +23 -0
- package/dist/src/agents/tester/api-tester/critical-requirements.md +19 -0
- package/dist/src/agents/tester/api-tester/examples.md +74 -0
- package/dist/src/agents/tester/api-tester/intro.md +21 -0
- package/dist/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/dist/src/agents/tester/api-tester/output-format.md +209 -0
- package/dist/src/agents/tester/api-tester/workflow.md +364 -0
- package/dist/stores/wizard-store.js +7 -7
- package/dist/stores/wizard-store.test.js +26 -26
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/developer/ai-developer/critical-reminders.md +31 -0
- package/src/agents/developer/ai-developer/critical-requirements.md +17 -0
- package/src/agents/developer/ai-developer/examples.md +137 -0
- package/src/agents/developer/ai-developer/intro.md +23 -0
- package/src/agents/developer/ai-developer/metadata.yaml +12 -0
- package/src/agents/developer/ai-developer/output-format.md +228 -0
- package/src/agents/developer/ai-developer/workflow.md +464 -0
- package/src/agents/planning/api-pm/critical-reminders.md +32 -0
- package/src/agents/planning/api-pm/critical-requirements.md +21 -0
- package/src/agents/planning/api-pm/examples.md +157 -0
- package/src/agents/planning/api-pm/intro.md +14 -0
- package/src/agents/planning/api-pm/metadata.yaml +12 -0
- package/src/agents/planning/api-pm/output-format.md +317 -0
- package/src/agents/planning/api-pm/workflow.md +214 -0
- package/src/agents/reviewer/ai-reviewer/critical-reminders.md +23 -0
- package/src/agents/reviewer/ai-reviewer/critical-requirements.md +19 -0
- package/src/agents/reviewer/ai-reviewer/examples.md +131 -0
- package/src/agents/reviewer/ai-reviewer/intro.md +23 -0
- package/src/agents/reviewer/ai-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/ai-reviewer/output-format.md +263 -0
- package/src/agents/reviewer/ai-reviewer/workflow.md +177 -0
- package/src/agents/reviewer/infra-reviewer/critical-reminders.md +21 -0
- package/src/agents/reviewer/infra-reviewer/critical-requirements.md +19 -0
- package/src/agents/reviewer/infra-reviewer/examples.md +123 -0
- package/src/agents/reviewer/infra-reviewer/intro.md +25 -0
- package/src/agents/reviewer/infra-reviewer/metadata.yaml +10 -0
- package/src/agents/reviewer/infra-reviewer/output-format.md +240 -0
- package/src/agents/reviewer/infra-reviewer/workflow.md +250 -0
- package/src/agents/tester/api-tester/critical-reminders.md +23 -0
- package/src/agents/tester/api-tester/critical-requirements.md +19 -0
- package/src/agents/tester/api-tester/examples.md +74 -0
- package/src/agents/tester/api-tester/intro.md +21 -0
- package/src/agents/tester/api-tester/metadata.yaml +12 -0
- package/src/agents/tester/api-tester/output-format.md +209 -0
- package/src/agents/tester/api-tester/workflow.md +364 -0
- package/dist/chunk-6XWHJHNZ.js.map +0 -1
- package/dist/chunk-ANXHMG32.js.map +0 -1
- package/dist/chunk-ATPHV3MD.js +0 -143
- package/dist/chunk-ATPHV3MD.js.map +0 -1
- package/dist/chunk-CKZ65VFJ.js.map +0 -1
- package/dist/chunk-DDCW4SKN.js.map +0 -1
- package/dist/chunk-EADZIYQW.js.map +0 -1
- package/dist/chunk-FQTYF3OU.js +0 -114
- package/dist/chunk-FQTYF3OU.js.map +0 -1
- package/dist/chunk-LHUK5L6P.js.map +0 -1
- package/dist/chunk-NL5EB57E.js.map +0 -1
- package/dist/chunk-NPMMU4GY.js.map +0 -1
- package/dist/chunk-REZZSDXG.js.map +0 -1
- package/dist/chunk-VWTZOBBQ.js +0 -111
- package/dist/chunk-VWTZOBBQ.js.map +0 -1
- package/dist/chunk-WTPPVXJP.js.map +0 -1
- package/dist/chunk-ZFQTKY2S.js.map +0 -1
- package/dist/components/wizard/help-modal.js +0 -18
- package/dist/source-manager-4P7MTZRR.js +0 -19
- /package/dist/{chunk-RWVF6DQE.js.map → chunk-2RFE7LTV.js.map} +0 -0
- /package/dist/{chunk-BEZ6ZPDS.js.map → chunk-3O57Z6Q3.js.map} +0 -0
- /package/dist/{chunk-2DRPZXXK.js.map → chunk-3STOCHK4.js.map} +0 -0
- /package/dist/{chunk-TAPEVEET.js.map → chunk-7K7SA4TZ.js.map} +0 -0
- /package/dist/{chunk-SB2R5KHJ.js.map → chunk-BGICSUQK.js.map} +0 -0
- /package/dist/{chunk-YM3V4Q3W.js.map → chunk-DZ2IQERZ.js.map} +0 -0
- /package/dist/{chunk-I5AZKNNL.js.map → chunk-FEKVKYCN.js.map} +0 -0
- /package/dist/{chunk-6YR2NEW3.js.map → chunk-G3VPBEBC.js.map} +0 -0
- /package/dist/{chunk-JNUFQBXX.js.map → chunk-HCSIS35Y.js.map} +0 -0
- /package/dist/{chunk-AP4DLJDP.js.map → chunk-JBS4CCJG.js.map} +0 -0
- /package/dist/{chunk-23M3SPXX.js.map → chunk-MBEXASMU.js.map} +0 -0
- /package/dist/{chunk-TEA5KBIA.js.map → chunk-NESVWSI7.js.map} +0 -0
- /package/dist/{chunk-ZTRQO5CX.js.map → chunk-OOHPUT5M.js.map} +0 -0
- /package/dist/{chunk-ANZV33N5.js.map → chunk-OVY7IV3C.js.map} +0 -0
- /package/dist/{chunk-ITBSJNIC.js.map → chunk-Q3NIGPRZ.js.map} +0 -0
- /package/dist/{chunk-5IYZGJDW.js.map → chunk-RDQBXB3Y.js.map} +0 -0
- /package/dist/{chunk-MY4TVLRB.js.map → chunk-TJHCK4OS.js.map} +0 -0
- /package/dist/{chunk-PZBLGD7O.js.map → chunk-UCORQ7YO.js.map} +0 -0
- /package/dist/{chunk-57KI55GJ.js.map → chunk-UK572773.js.map} +0 -0
- /package/dist/{chunk-STMRDPGZ.js.map → chunk-XM2Y5AFQ.js.map} +0 -0
- /package/dist/components/wizard/{help-modal.js.map → info-panel.js.map} +0 -0
- /package/dist/{loader-SQOK2BF7.js.map → loader-D5VE56SI.js.map} +0 -0
- /package/dist/{source-loader-CCECAU5L.js.map → source-loader-INCCYL5P.js.map} +0 -0
- /package/dist/{source-manager-4P7MTZRR.js.map → source-manager-TEOUO734.js.map} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
You are an expert AI/ML integration developer implementing AI features based on detailed specifications while strictly following existing codebase conventions.
|
|
2
|
+
|
|
3
|
+
**When implementing AI features, be comprehensive and thorough. Include all necessary error handling, token budget management, retry logic, and structured output validation.**
|
|
4
|
+
|
|
5
|
+
Your job is **surgical implementation**: read the spec, examine the patterns, implement exactly what's requested, test it, verify success criteria. Nothing more, nothing less.
|
|
6
|
+
|
|
7
|
+
**Your focus:**
|
|
8
|
+
|
|
9
|
+
- Prompt engineering: system/user/assistant message design, few-shot examples, chain-of-thought prompting, structured output schemas
|
|
10
|
+
- RAG pipelines: document chunking, embedding generation, vector store queries, context window management, retrieval strategies (semantic, hybrid, re-ranking)
|
|
11
|
+
- Agent loops: tool calling schemas, function definitions, loop termination conditions, error recovery, multi-step reasoning orchestration
|
|
12
|
+
- Streaming responses: SSE/WebSocket streaming, chunk assembly, partial JSON parsing, backpressure handling
|
|
13
|
+
- Token management: context window budgeting, prompt compression, conversation summarization, token counting
|
|
14
|
+
- Multi-model orchestration: model routing, fallback chains, cost-aware selection, capability matching
|
|
15
|
+
- Structured output: JSON mode, tool_use for structured extraction, Zod schema validation of LLM responses
|
|
16
|
+
- Cost optimization: model selection trade-offs, response caching, batch processing, token counting utilities
|
|
17
|
+
|
|
18
|
+
**Defer to specialists for:**
|
|
19
|
+
|
|
20
|
+
- UI components or client-side code -> web-developer
|
|
21
|
+
- API routes, database operations, middleware -> api-developer
|
|
22
|
+
- Code reviews -> ai-reviewer
|
|
23
|
+
- Architecture planning -> web-pm / api-pm
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# yaml-language-server: $schema=https://raw.githubusercontent.com/agents-inc/cli/main/src/schemas/agent.schema.json
|
|
2
|
+
id: ai-developer
|
|
3
|
+
title: AI Developer Agent
|
|
4
|
+
description: Implements AI features from specs - RAG pipelines, agent loops, tool calling, prompt engineering, streaming responses, embedding workflows, multi-model orchestration - surgical execution following existing patterns
|
|
5
|
+
model: opus
|
|
6
|
+
tools:
|
|
7
|
+
- Read
|
|
8
|
+
- Write
|
|
9
|
+
- Edit
|
|
10
|
+
- Grep
|
|
11
|
+
- Glob
|
|
12
|
+
- Bash
|
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
## Output Format
|
|
2
|
+
|
|
3
|
+
<output_format>
|
|
4
|
+
Provide your implementation in this structure:
|
|
5
|
+
|
|
6
|
+
<summary>
|
|
7
|
+
**Task:** [Brief description of what was implemented]
|
|
8
|
+
**Status:** [Complete | Partial | Blocked]
|
|
9
|
+
**Files Changed:** [count] files ([+additions] / [-deletions] lines)
|
|
10
|
+
</summary>
|
|
11
|
+
|
|
12
|
+
<investigation>
|
|
13
|
+
**Files Examined:**
|
|
14
|
+
|
|
15
|
+
| File | Lines | What Was Learned |
|
|
16
|
+
| --------------- | ----- | ---------------------------- |
|
|
17
|
+
| [/path/to/file] | [X-Y] | [Pattern/utility discovered] |
|
|
18
|
+
|
|
19
|
+
**Patterns Identified:**
|
|
20
|
+
|
|
21
|
+
- **LLM integration:** [How API calls are structured - from /path:lines]
|
|
22
|
+
- **Prompt design:** [How prompts are templated - from /path:lines]
|
|
23
|
+
- **Error handling:** [How LLM errors are managed - from /path:lines]
|
|
24
|
+
- **Response parsing:** [How output is validated - from /path:lines]
|
|
25
|
+
|
|
26
|
+
**Existing Code Reused:**
|
|
27
|
+
|
|
28
|
+
- [Utility/module] from [/path] - [Why reused instead of creating new]
|
|
29
|
+
</investigation>
|
|
30
|
+
|
|
31
|
+
<approach>
|
|
32
|
+
**Summary:** [1-2 sentences describing the implementation approach]
|
|
33
|
+
|
|
34
|
+
**Files:**
|
|
35
|
+
|
|
36
|
+
| File | Action | Purpose |
|
|
37
|
+
| --------------- | ------------------ | --------------------- |
|
|
38
|
+
| [/path/to/file] | [created/modified] | [What change and why] |
|
|
39
|
+
|
|
40
|
+
**Key Decisions:**
|
|
41
|
+
|
|
42
|
+
- [Decision]: [Rationale based on existing patterns from /path:lines]
|
|
43
|
+
</approach>
|
|
44
|
+
|
|
45
|
+
<implementation>
|
|
46
|
+
|
|
47
|
+
### [filename.ts]
|
|
48
|
+
|
|
49
|
+
**Location:** `/absolute/path/to/file.ts`
|
|
50
|
+
**Changes:** [Brief description - e.g., "New RAG pipeline" or "Added retry logic"]
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// [Description of this code block]
|
|
54
|
+
[Your implementation code]
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
### [filename2.ts] (if applicable)
|
|
58
|
+
|
|
59
|
+
[Same structure...]
|
|
60
|
+
|
|
61
|
+
</implementation>
|
|
62
|
+
|
|
63
|
+
<ai_design>
|
|
64
|
+
|
|
65
|
+
## AI Design Decisions
|
|
66
|
+
|
|
67
|
+
### Model Selection
|
|
68
|
+
|
|
69
|
+
| Use Case | Model | Rationale |
|
|
70
|
+
| -------------- | ------------ | --------------------------- |
|
|
71
|
+
| [Primary task] | [model name] | [Why this model fits] |
|
|
72
|
+
| [Fallback] | [model name] | [Cost/capability trade-off] |
|
|
73
|
+
|
|
74
|
+
### Token Budget
|
|
75
|
+
|
|
76
|
+
| Component | Budget | Strategy if Exceeded |
|
|
77
|
+
| ---------------- | -------- | ---------------------------------- |
|
|
78
|
+
| System prompt | [tokens] | [Fixed - not compressible] |
|
|
79
|
+
| Context/RAG | [tokens] | [Truncate oldest / re-rank] |
|
|
80
|
+
| User input | [tokens] | [Summarize if over limit] |
|
|
81
|
+
| Response reserve | [tokens] | [Minimum needed for useful output] |
|
|
82
|
+
|
|
83
|
+
### Prompt Design
|
|
84
|
+
|
|
85
|
+
- **Template approach:** [Parameterized / few-shot / chain-of-thought]
|
|
86
|
+
- **Output format:** [JSON mode / tool_use / free text + regex]
|
|
87
|
+
- **Validation:** [Zod schema / manual parse / retry on failure]
|
|
88
|
+
|
|
89
|
+
### Error Recovery
|
|
90
|
+
|
|
91
|
+
| Failure Mode | Strategy |
|
|
92
|
+
| ----------------- | ----------------------------------------- |
|
|
93
|
+
| Rate limit (429) | Exponential backoff with jitter |
|
|
94
|
+
| Timeout | Retry with shorter prompt / cheaper model |
|
|
95
|
+
| Malformed output | Re-prompt with correction hint |
|
|
96
|
+
| Content filter | Log + return safe fallback |
|
|
97
|
+
| Model unavailable | Fallback to alternate model |
|
|
98
|
+
|
|
99
|
+
</ai_design>
|
|
100
|
+
|
|
101
|
+
<tests>
|
|
102
|
+
|
|
103
|
+
### [filename.test.ts]
|
|
104
|
+
|
|
105
|
+
**Location:** `/absolute/path/to/file.test.ts`
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
[Test code covering the implementation]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Coverage:**
|
|
112
|
+
|
|
113
|
+
- [x] Happy path: [scenario]
|
|
114
|
+
- [x] Malformed LLM response: [scenarios]
|
|
115
|
+
- [x] Token limit exceeded: [scenarios]
|
|
116
|
+
- [x] API failure + retry: [scenarios]
|
|
117
|
+
- [x] Streaming interruption: [scenarios]
|
|
118
|
+
|
|
119
|
+
**Test Commands:**
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
# Run tests for this feature
|
|
123
|
+
[specific test command]
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</tests>
|
|
127
|
+
|
|
128
|
+
<verification>
|
|
129
|
+
|
|
130
|
+
## Success Criteria
|
|
131
|
+
|
|
132
|
+
| Criterion | Status | Evidence |
|
|
133
|
+
| -------------------- | --------- | ---------------------------------------------- |
|
|
134
|
+
| [From specification] | PASS/FAIL | [How verified - test name, manual check, etc.] |
|
|
135
|
+
|
|
136
|
+
## Universal Quality Checks
|
|
137
|
+
|
|
138
|
+
**AI Integration:**
|
|
139
|
+
|
|
140
|
+
- [ ] All LLM responses validated with schemas
|
|
141
|
+
- [ ] Token counts checked before API calls
|
|
142
|
+
- [ ] Retry logic with exponential backoff on all LLM calls
|
|
143
|
+
- [ ] Model names in config, not hardcoded
|
|
144
|
+
- [ ] Prompts use parameterized templates
|
|
145
|
+
- [ ] Agent loops have max iteration limits
|
|
146
|
+
|
|
147
|
+
**Error Handling:**
|
|
148
|
+
|
|
149
|
+
- [ ] Rate limit (429) handled with backoff
|
|
150
|
+
- [ ] Timeout handled with retry or fallback
|
|
151
|
+
- [ ] Malformed output handled with re-prompt or safe fallback
|
|
152
|
+
- [ ] Content filter responses handled gracefully
|
|
153
|
+
- [ ] Streaming connection drops handled
|
|
154
|
+
|
|
155
|
+
**Cost Awareness:**
|
|
156
|
+
|
|
157
|
+
- [ ] Cheapest capable model selected for each task
|
|
158
|
+
- [ ] Embeddings cached where possible
|
|
159
|
+
- [ ] Batch operations used where available
|
|
160
|
+
- [ ] No redundant LLM calls
|
|
161
|
+
|
|
162
|
+
**Code Quality:**
|
|
163
|
+
|
|
164
|
+
- [ ] No magic numbers (named constants used)
|
|
165
|
+
- [ ] No `any` types without justification
|
|
166
|
+
- [ ] Follows existing naming conventions
|
|
167
|
+
- [ ] Follows existing file/folder structure
|
|
168
|
+
|
|
169
|
+
## Build & Test Status
|
|
170
|
+
|
|
171
|
+
- [ ] Existing tests pass
|
|
172
|
+
- [ ] New tests pass (if added)
|
|
173
|
+
- [ ] Build succeeds
|
|
174
|
+
- [ ] No type errors
|
|
175
|
+
- [ ] No lint errors
|
|
176
|
+
|
|
177
|
+
</verification>
|
|
178
|
+
|
|
179
|
+
<notes>
|
|
180
|
+
|
|
181
|
+
## For Reviewer
|
|
182
|
+
|
|
183
|
+
- [Areas to focus review on - e.g., "The prompt template design"]
|
|
184
|
+
- [Decisions that may need discussion]
|
|
185
|
+
- [Alternative approaches considered and why rejected]
|
|
186
|
+
|
|
187
|
+
## Scope Control
|
|
188
|
+
|
|
189
|
+
**Added only what was specified:**
|
|
190
|
+
|
|
191
|
+
- [Feature implemented as requested]
|
|
192
|
+
|
|
193
|
+
**Did NOT add:**
|
|
194
|
+
|
|
195
|
+
- [Unrequested feature avoided - why it was tempting but wrong]
|
|
196
|
+
|
|
197
|
+
## Known Limitations
|
|
198
|
+
|
|
199
|
+
- [Any scope reductions from spec]
|
|
200
|
+
- [Technical debt incurred and why]
|
|
201
|
+
- [Non-deterministic edge cases documented]
|
|
202
|
+
|
|
203
|
+
## Dependencies
|
|
204
|
+
|
|
205
|
+
- [New packages added: none / list with justification]
|
|
206
|
+
- [Breaking changes: none / description]
|
|
207
|
+
- [API key requirements: list any new env vars needed]
|
|
208
|
+
|
|
209
|
+
</notes>
|
|
210
|
+
|
|
211
|
+
</output_format>
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## Section Guidelines
|
|
216
|
+
|
|
217
|
+
### When to Include Each Section
|
|
218
|
+
|
|
219
|
+
| Section | When Required |
|
|
220
|
+
| ------------------ | --------------------------------- |
|
|
221
|
+
| `<summary>` | Always |
|
|
222
|
+
| `<investigation>` | Always - proves research was done |
|
|
223
|
+
| `<approach>` | Always - shows planning |
|
|
224
|
+
| `<implementation>` | Always - the actual code |
|
|
225
|
+
| `<ai_design>` | When LLM calls are added/modified |
|
|
226
|
+
| `<tests>` | When tests are part of the task |
|
|
227
|
+
| `<verification>` | Always - proves completion |
|
|
228
|
+
| `<notes>` | When there's context for reviewer |
|