@agents-inc/cli 0.75.1 → 0.76.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 +12 -0
- package/dist/{chunk-SXGBPQY6.js → chunk-2I5SXGXR.js} +2 -2
- package/dist/{chunk-CUCF5LM4.js → chunk-36YW5E7G.js} +5 -5
- package/dist/{chunk-T5DJCIUP.js → chunk-3REKTRAN.js} +2 -2
- package/dist/{chunk-UQKCYLOA.js → chunk-6F3CZLD6.js} +9 -9
- package/dist/chunk-6F3CZLD6.js.map +1 -0
- package/dist/{chunk-JOTAIMTC.js → chunk-7NACNRFG.js} +4 -4
- package/dist/{chunk-SPATQKH6.js → chunk-7PMFIL5L.js} +3 -3
- package/dist/{chunk-GMUOEQOY.js → chunk-7PZFDI46.js} +4 -4
- package/dist/{chunk-PSU42CXK.js → chunk-7XUKTYVD.js} +182 -294
- package/dist/chunk-7XUKTYVD.js.map +1 -0
- package/dist/{chunk-WXC2Y5TF.js → chunk-AE2QHAFO.js} +7 -7
- package/dist/{chunk-ZZJ6H6VB.js → chunk-CBJTSEI2.js} +5 -5
- package/dist/{chunk-AOZBHMYL.js → chunk-CCSU4R65.js} +3 -3
- package/dist/{chunk-XZ57QYVI.js → chunk-CKU7FJNV.js} +4 -4
- package/dist/{chunk-QN3V3ES7.js → chunk-EEZSCHS2.js} +9 -9
- package/dist/{chunk-CBXMOWQY.js → chunk-ERHTXNIF.js} +3 -3
- package/dist/{chunk-GCT7LSYW.js → chunk-EWBNSS5Y.js} +6 -6
- package/dist/{chunk-TQLDQ3XZ.js → chunk-EYFBODHL.js} +2 -2
- package/dist/{chunk-AUNBGZS4.js → chunk-FFMWFEUH.js} +2 -2
- package/dist/{chunk-EGMQ3SXN.js → chunk-FMYAYX6W.js} +1 -1
- package/dist/chunk-FMYAYX6W.js.map +1 -0
- package/dist/{chunk-W22IYRZV.js → chunk-I2SUTL7S.js} +5 -5
- package/dist/{chunk-XHTN56UT.js → chunk-I534EWJQ.js} +3 -3
- package/dist/{chunk-2PZ7LBFT.js → chunk-IDN2OZJY.js} +2 -2
- package/dist/{chunk-HKIQA4F6.js → chunk-JWMYAJHD.js} +637 -2179
- package/dist/chunk-JWMYAJHD.js.map +1 -0
- package/dist/{chunk-MWGDG4QN.js → chunk-K63OEZW7.js} +2 -2
- package/dist/{chunk-Q72ZBA4X.js → chunk-KPRCP3MZ.js} +3 -3
- package/dist/{chunk-FYYIRFYT.js → chunk-LO5QGAP2.js} +5 -5
- package/dist/{chunk-TYM4D3OF.js → chunk-M4ZDKHJV.js} +3 -3
- package/dist/{chunk-TYM4D3OF.js.map → chunk-M4ZDKHJV.js.map} +1 -1
- package/dist/{chunk-CXRVM7BA.js → chunk-M76LNKMY.js} +2 -2
- package/dist/{chunk-WF5PMBIR.js → chunk-MLXAZODL.js} +2 -2
- package/dist/{chunk-UFKDY45I.js → chunk-NWW3OJH5.js} +3 -3
- package/dist/{chunk-U5R4M7MA.js → chunk-O5CPXIC4.js} +5 -5
- package/dist/{chunk-7QAVO7VN.js → chunk-ODVQXXEO.js} +14 -14
- package/dist/{chunk-BVSWWBPE.js → chunk-PRG7PKZM.js} +5 -5
- package/dist/{chunk-SYGXJBG6.js → chunk-Q4PJSAMP.js} +20 -11
- package/dist/chunk-Q4PJSAMP.js.map +1 -0
- package/dist/{chunk-Q3F36QZZ.js → chunk-R7F5YQMI.js} +2 -2
- package/dist/{chunk-FHHTDPMW.js → chunk-S6DKM6MJ.js} +6 -6
- package/dist/{chunk-XMLCXRTS.js → chunk-SQ7WINEU.js} +3 -3
- package/dist/{chunk-U6A4YFOF.js → chunk-UBNHVBSV.js} +4 -4
- package/dist/{chunk-VU4ZCRZS.js → chunk-VQV3DSHD.js} +6 -6
- package/dist/{chunk-JGSPESM3.js → chunk-WMMU5FOO.js} +15 -12
- package/dist/chunk-WMMU5FOO.js.map +1 -0
- package/dist/{chunk-6C66NL4X.js → chunk-WN2TUP4M.js} +4 -4
- package/dist/chunk-WN2TUP4M.js.map +1 -0
- package/dist/{chunk-5BGBH3KD.js → chunk-WS3TL2AO.js} +8 -8
- package/dist/{chunk-DFKNFZI2.js → chunk-WZ5S4LGX.js} +6 -6
- package/dist/{chunk-KDYE3AGL.js → chunk-XYZ7B5BY.js} +2 -2
- package/dist/commands/build/marketplace.js +5 -5
- package/dist/commands/build/plugins.js +9 -9
- package/dist/commands/build/stack.js +9 -9
- package/dist/commands/compile.js +10 -10
- package/dist/commands/config/index.js +9 -9
- package/dist/commands/config/path.js +8 -8
- package/dist/commands/config/show.js +9 -9
- package/dist/commands/diff.js +8 -8
- package/dist/commands/doctor.js +8 -8
- package/dist/commands/edit.js +33 -33
- package/dist/commands/eject.js +8 -8
- package/dist/commands/import/skill.js +9 -9
- package/dist/commands/info.js +9 -9
- package/dist/commands/init.js +33 -33
- package/dist/commands/list.js +8 -8
- package/dist/commands/new/agent.js +9 -9
- package/dist/commands/new/marketplace.js +10 -10
- package/dist/commands/new/skill.js +9 -9
- package/dist/commands/outdated.js +8 -8
- package/dist/commands/search.js +11 -11
- package/dist/commands/uninstall.js +9 -9
- package/dist/commands/update.js +10 -10
- package/dist/commands/validate.js +9 -9
- package/dist/components/common/select-list.js +2 -2
- package/dist/components/skill-search/skill-search.js +3 -3
- package/dist/components/wizard/category-grid.js +4 -4
- package/dist/components/wizard/category-grid.test.js +13 -13
- package/dist/components/wizard/checkbox-grid.js +4 -4
- package/dist/components/wizard/checkbox-grid.test.js +4 -4
- package/dist/components/wizard/domain-selection.js +13 -13
- package/dist/components/wizard/help-modal.js +2 -2
- package/dist/components/wizard/menu-item.js +1 -1
- package/dist/components/wizard/search-modal.js +3 -3
- package/dist/components/wizard/search-modal.test.js +3 -3
- package/dist/components/wizard/section-progress.js +2 -2
- package/dist/components/wizard/section-progress.test.js +2 -2
- package/dist/components/wizard/selection-card.js +2 -2
- package/dist/components/wizard/source-grid.js +6 -6
- package/dist/components/wizard/source-grid.test.js +15 -15
- package/dist/components/wizard/stack-selection.js +11 -11
- package/dist/components/wizard/step-agents.js +12 -12
- package/dist/components/wizard/step-agents.test.js +15 -15
- package/dist/components/wizard/step-build.js +12 -12
- package/dist/components/wizard/step-build.test.js +14 -14
- package/dist/components/wizard/step-confirm.js +5 -5
- package/dist/components/wizard/step-confirm.test.js +11 -11
- 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 +10 -10
- package/dist/components/wizard/step-settings.test.js +13 -13
- package/dist/components/wizard/step-sources.js +14 -14
- package/dist/components/wizard/step-sources.test.js +17 -17
- package/dist/components/wizard/step-stack.js +16 -16
- package/dist/components/wizard/step-stack.test.js +17 -17
- package/dist/components/wizard/wizard-layout.js +11 -11
- package/dist/components/wizard/wizard-tabs.js +2 -2
- package/dist/components/wizard/wizard-tabs.test.js +2 -2
- package/dist/components/wizard/wizard.js +30 -30
- package/dist/config-exports.js +1 -1
- package/dist/hooks/init.js +33 -33
- package/dist/{loader-TK7YS2I5.js → loader-7RQ4G4TH.js} +5 -5
- package/dist/{source-loader-UQXJVVSO.js → source-loader-CXCIDGWV.js} +8 -8
- package/dist/source-manager-TPLO2DVS.js +19 -0
- package/dist/src/agents/_templates/agent.liquid +24 -0
- package/dist/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/dist/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/dist/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/dist/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/dist/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/dist/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/dist/src/agents/meta/agent-summoner/workflow.md +2 -2
- package/dist/src/agents/meta/skill-summoner/workflow.md +48 -3
- package/dist/stores/wizard-store.js +8 -8
- package/dist/stores/wizard-store.test.js +36 -36
- package/dist/stores/wizard-store.test.js.map +1 -1
- package/package.json +1 -1
- package/src/agents/_templates/agent.liquid +24 -0
- package/src/agents/_templates/methodologies/anti-over-engineering.liquid +121 -0
- package/src/agents/_templates/methodologies/context-management.liquid +162 -0
- package/src/agents/_templates/methodologies/improvement-protocol.liquid +150 -0
- package/src/agents/_templates/methodologies/investigation-requirements.liquid +49 -0
- package/src/agents/_templates/methodologies/success-criteria.liquid +111 -0
- package/src/agents/_templates/methodologies/write-verification.liquid +43 -0
- package/src/agents/meta/agent-summoner/workflow.md +2 -2
- package/src/agents/meta/skill-summoner/workflow.md +48 -3
- package/dist/chunk-6C66NL4X.js.map +0 -1
- package/dist/chunk-EGMQ3SXN.js.map +0 -1
- package/dist/chunk-HKIQA4F6.js.map +0 -1
- package/dist/chunk-JGSPESM3.js.map +0 -1
- package/dist/chunk-PSU42CXK.js.map +0 -1
- package/dist/chunk-SYGXJBG6.js.map +0 -1
- package/dist/chunk-UQKCYLOA.js.map +0 -1
- package/dist/source-manager-HS2ZT4XE.js +0 -19
- /package/dist/{chunk-SXGBPQY6.js.map → chunk-2I5SXGXR.js.map} +0 -0
- /package/dist/{chunk-CUCF5LM4.js.map → chunk-36YW5E7G.js.map} +0 -0
- /package/dist/{chunk-T5DJCIUP.js.map → chunk-3REKTRAN.js.map} +0 -0
- /package/dist/{chunk-JOTAIMTC.js.map → chunk-7NACNRFG.js.map} +0 -0
- /package/dist/{chunk-SPATQKH6.js.map → chunk-7PMFIL5L.js.map} +0 -0
- /package/dist/{chunk-GMUOEQOY.js.map → chunk-7PZFDI46.js.map} +0 -0
- /package/dist/{chunk-WXC2Y5TF.js.map → chunk-AE2QHAFO.js.map} +0 -0
- /package/dist/{chunk-ZZJ6H6VB.js.map → chunk-CBJTSEI2.js.map} +0 -0
- /package/dist/{chunk-AOZBHMYL.js.map → chunk-CCSU4R65.js.map} +0 -0
- /package/dist/{chunk-XZ57QYVI.js.map → chunk-CKU7FJNV.js.map} +0 -0
- /package/dist/{chunk-QN3V3ES7.js.map → chunk-EEZSCHS2.js.map} +0 -0
- /package/dist/{chunk-CBXMOWQY.js.map → chunk-ERHTXNIF.js.map} +0 -0
- /package/dist/{chunk-GCT7LSYW.js.map → chunk-EWBNSS5Y.js.map} +0 -0
- /package/dist/{chunk-TQLDQ3XZ.js.map → chunk-EYFBODHL.js.map} +0 -0
- /package/dist/{chunk-AUNBGZS4.js.map → chunk-FFMWFEUH.js.map} +0 -0
- /package/dist/{chunk-W22IYRZV.js.map → chunk-I2SUTL7S.js.map} +0 -0
- /package/dist/{chunk-XHTN56UT.js.map → chunk-I534EWJQ.js.map} +0 -0
- /package/dist/{chunk-2PZ7LBFT.js.map → chunk-IDN2OZJY.js.map} +0 -0
- /package/dist/{chunk-MWGDG4QN.js.map → chunk-K63OEZW7.js.map} +0 -0
- /package/dist/{chunk-Q72ZBA4X.js.map → chunk-KPRCP3MZ.js.map} +0 -0
- /package/dist/{chunk-FYYIRFYT.js.map → chunk-LO5QGAP2.js.map} +0 -0
- /package/dist/{chunk-CXRVM7BA.js.map → chunk-M76LNKMY.js.map} +0 -0
- /package/dist/{chunk-WF5PMBIR.js.map → chunk-MLXAZODL.js.map} +0 -0
- /package/dist/{chunk-UFKDY45I.js.map → chunk-NWW3OJH5.js.map} +0 -0
- /package/dist/{chunk-U5R4M7MA.js.map → chunk-O5CPXIC4.js.map} +0 -0
- /package/dist/{chunk-7QAVO7VN.js.map → chunk-ODVQXXEO.js.map} +0 -0
- /package/dist/{chunk-BVSWWBPE.js.map → chunk-PRG7PKZM.js.map} +0 -0
- /package/dist/{chunk-Q3F36QZZ.js.map → chunk-R7F5YQMI.js.map} +0 -0
- /package/dist/{chunk-FHHTDPMW.js.map → chunk-S6DKM6MJ.js.map} +0 -0
- /package/dist/{chunk-XMLCXRTS.js.map → chunk-SQ7WINEU.js.map} +0 -0
- /package/dist/{chunk-U6A4YFOF.js.map → chunk-UBNHVBSV.js.map} +0 -0
- /package/dist/{chunk-VU4ZCRZS.js.map → chunk-VQV3DSHD.js.map} +0 -0
- /package/dist/{chunk-5BGBH3KD.js.map → chunk-WS3TL2AO.js.map} +0 -0
- /package/dist/{chunk-DFKNFZI2.js.map → chunk-WZ5S4LGX.js.map} +0 -0
- /package/dist/{chunk-KDYE3AGL.js.map → chunk-XYZ7B5BY.js.map} +0 -0
- /package/dist/{loader-TK7YS2I5.js.map → loader-7RQ4G4TH.js.map} +0 -0
- /package/dist/{source-loader-UQXJVVSO.js.map → source-loader-CXCIDGWV.js.map} +0 -0
- /package/dist/{source-manager-HS2ZT4XE.js.map → source-manager-TPLO2DVS.js.map} +0 -0
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
<context_management>
|
|
2
|
+
|
|
3
|
+
## Long-Term Context Management Protocol
|
|
4
|
+
|
|
5
|
+
Maintain project continuity across sessions through systematic documentation.
|
|
6
|
+
|
|
7
|
+
**File Structure:**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
.claude/
|
|
11
|
+
progress.md # Current state, what's done, what's next
|
|
12
|
+
decisions.md # Architectural decisions and rationale
|
|
13
|
+
insights.md # Lessons learned, gotchas discovered
|
|
14
|
+
tests.json # Structured test tracking (NEVER remove tests)
|
|
15
|
+
patterns.md # Codebase conventions being followed
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Your Responsibilities:**
|
|
19
|
+
|
|
20
|
+
### At Session Start
|
|
21
|
+
|
|
22
|
+
```xml
|
|
23
|
+
<session_start>
|
|
24
|
+
1. Call pwd to verify working directory
|
|
25
|
+
2. Read all context files in .claude/ directory:
|
|
26
|
+
- progress.md: What's been accomplished, what's next
|
|
27
|
+
- decisions.md: Past architectural choices and why
|
|
28
|
+
- insights.md: Important learnings from previous sessions
|
|
29
|
+
- tests.json: Test status (never modify test data)
|
|
30
|
+
3. Review git logs for recent changes
|
|
31
|
+
4. Understand current state from filesystem, not just chat history
|
|
32
|
+
</session_start>
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### During Work
|
|
36
|
+
|
|
37
|
+
```xml
|
|
38
|
+
<during_work>
|
|
39
|
+
After each significant change or decision:
|
|
40
|
+
|
|
41
|
+
1. Update progress.md:
|
|
42
|
+
- What you just accomplished
|
|
43
|
+
- Current status of the task
|
|
44
|
+
- Next steps to take
|
|
45
|
+
- Any blockers or questions
|
|
46
|
+
|
|
47
|
+
2. Log decisions in decisions.md:
|
|
48
|
+
- What choice was made
|
|
49
|
+
- Why (rationale)
|
|
50
|
+
- Alternatives considered
|
|
51
|
+
- Implications for future work
|
|
52
|
+
|
|
53
|
+
3. Document insights in insights.md:
|
|
54
|
+
- Gotchas discovered
|
|
55
|
+
- Patterns that work well
|
|
56
|
+
- Things to avoid
|
|
57
|
+
- Non-obvious behaviors
|
|
58
|
+
|
|
59
|
+
Format:
|
|
60
|
+
## [Date] - [Brief Title]
|
|
61
|
+
|
|
62
|
+
**Decision/Insight:**
|
|
63
|
+
[What happened or what you learned]
|
|
64
|
+
|
|
65
|
+
**Context:**
|
|
66
|
+
[Why this matters]
|
|
67
|
+
|
|
68
|
+
**Impact:**
|
|
69
|
+
[What this means going forward]
|
|
70
|
+
</during_work>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### At Session End
|
|
74
|
+
|
|
75
|
+
```xml
|
|
76
|
+
<session_end>
|
|
77
|
+
Before finishing, ensure:
|
|
78
|
+
|
|
79
|
+
1. progress.md reflects current state accurately
|
|
80
|
+
2. All decisions are logged with rationale
|
|
81
|
+
3. Any discoveries are documented in insights.md
|
|
82
|
+
4. tests.json is updated (never remove test entries)
|
|
83
|
+
5. Git commits have descriptive messages
|
|
84
|
+
|
|
85
|
+
Leave the project in a state where the next session can start immediately without context loss.
|
|
86
|
+
</session_end>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</context_management>
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
<context_overload_prevention>
|
|
94
|
+
|
|
95
|
+
### Context Overload Prevention
|
|
96
|
+
|
|
97
|
+
**CRITICAL:** Don't try to load everything into context at once.
|
|
98
|
+
|
|
99
|
+
**Instead:**
|
|
100
|
+
|
|
101
|
+
- Provide high-level summaries in progress.md
|
|
102
|
+
- Link to specific files for details
|
|
103
|
+
- Use git log for historical changes
|
|
104
|
+
- Request specific files as needed during work
|
|
105
|
+
|
|
106
|
+
**Example progress.md:**
|
|
107
|
+
|
|
108
|
+
```markdown
|
|
109
|
+
# Current Status
|
|
110
|
+
|
|
111
|
+
## Completed
|
|
112
|
+
|
|
113
|
+
- User profile editing UI (see ProfileEditor.tsx)
|
|
114
|
+
- Form validation (see validation.ts)
|
|
115
|
+
- Tests for happy path (see profile-editor.test.ts)
|
|
116
|
+
|
|
117
|
+
## In Progress
|
|
118
|
+
|
|
119
|
+
- Error handling for network failures
|
|
120
|
+
- Next: Add retry logic following pattern in api-client.ts
|
|
121
|
+
- Tests: Need to add network error scenarios
|
|
122
|
+
|
|
123
|
+
## Blocked
|
|
124
|
+
|
|
125
|
+
- Avatar upload feature
|
|
126
|
+
- Reason: Waiting for S3 configuration from DevOps
|
|
127
|
+
- Tracking: Issue #456
|
|
128
|
+
|
|
129
|
+
## Next Session
|
|
130
|
+
|
|
131
|
+
Start with: Implementing retry logic in ProfileEditor.tsx
|
|
132
|
+
Reference: api-client.ts lines 89-112 for the retry pattern
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
This approach lets you maintain continuity without context bloat.
|
|
136
|
+
|
|
137
|
+
</context_overload_prevention>
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
<fresh_start_approach>
|
|
142
|
+
|
|
143
|
+
## Fresh Start Approach
|
|
144
|
+
|
|
145
|
+
Start each session as if it's the first:
|
|
146
|
+
|
|
147
|
+
1. Read .claude/ context files to understand state
|
|
148
|
+
2. Use git log to see recent changes
|
|
149
|
+
3. Examine filesystem to discover what exists
|
|
150
|
+
4. Run integration tests to verify current behavior
|
|
151
|
+
|
|
152
|
+
This "fresh start" approach works better than trying to maintain long chat history.
|
|
153
|
+
|
|
154
|
+
**Give the RIGHT context, not MORE context.**
|
|
155
|
+
|
|
156
|
+
- For a React component task: Provide that component + immediate dependencies
|
|
157
|
+
- For a store update: Provide the store + related stores
|
|
158
|
+
- For API work: Provide the endpoint + client utilities
|
|
159
|
+
|
|
160
|
+
Don't dump the entire codebase - focus context on what's relevant for the specific task.
|
|
161
|
+
|
|
162
|
+
</fresh_start_approach>
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<improvement_protocol>
|
|
2
|
+
|
|
3
|
+
When a task involves improving your own prompt/configuration:
|
|
4
|
+
|
|
5
|
+
### Recognition
|
|
6
|
+
|
|
7
|
+
**You're in self-improvement mode when:**
|
|
8
|
+
|
|
9
|
+
- Task mentions "improve your prompt" or "update your configuration"
|
|
10
|
+
- You're asked to review your own instruction file
|
|
11
|
+
- Task references `.claude/agents/[your-name].md`
|
|
12
|
+
- "based on this work, you should add..."
|
|
13
|
+
- "review your own instructions"
|
|
14
|
+
|
|
15
|
+
### Process
|
|
16
|
+
|
|
17
|
+
```xml
|
|
18
|
+
<self_improvement_workflow>
|
|
19
|
+
1. **Read Current Configuration**
|
|
20
|
+
- Load `.claude/agents/[your-name].md`
|
|
21
|
+
- Understand your current instructions completely
|
|
22
|
+
- Identify areas for improvement
|
|
23
|
+
|
|
24
|
+
2. **Apply Evidence-Based Improvements**
|
|
25
|
+
- Use proven patterns from successful systems
|
|
26
|
+
- Reference specific PRs, issues, or implementations
|
|
27
|
+
- Base changes on empirical results, not speculation
|
|
28
|
+
|
|
29
|
+
3. **Structure Changes**
|
|
30
|
+
Follow these improvement patterns:
|
|
31
|
+
|
|
32
|
+
**For Better Instruction Following:**
|
|
33
|
+
- Add emphatic repetition for critical rules
|
|
34
|
+
- Use XML tags for semantic boundaries
|
|
35
|
+
- Place most important content at start and end
|
|
36
|
+
- Add self-reminder loops (repeat key principles)
|
|
37
|
+
|
|
38
|
+
**For Reducing Over-Engineering:**
|
|
39
|
+
- Add explicit anti-patterns section
|
|
40
|
+
- Emphasize "use existing utilities"
|
|
41
|
+
- Include complexity check decision framework
|
|
42
|
+
- Provide concrete "when NOT to" examples
|
|
43
|
+
|
|
44
|
+
**For Better Investigation:**
|
|
45
|
+
- Require explicit file listing before work
|
|
46
|
+
- Add "what good investigation looks like" examples
|
|
47
|
+
- Mandate pattern file reading before implementation
|
|
48
|
+
- Include hallucination prevention reminders
|
|
49
|
+
|
|
50
|
+
**For Clearer Output:**
|
|
51
|
+
- Use XML structure for response format
|
|
52
|
+
- Provide template with all required sections
|
|
53
|
+
- Show good vs. bad examples
|
|
54
|
+
- Make verification checklists explicit
|
|
55
|
+
|
|
56
|
+
4. **Document Changes**
|
|
57
|
+
## Improvement Applied: [Brief Title]
|
|
58
|
+
|
|
59
|
+
**Date:** [YYYY-MM-DD]
|
|
60
|
+
|
|
61
|
+
**Problem:**
|
|
62
|
+
[What wasn't working well]
|
|
63
|
+
|
|
64
|
+
**Solution:**
|
|
65
|
+
[What you changed and why]
|
|
66
|
+
|
|
67
|
+
**Source:**
|
|
68
|
+
[Reference to PR, issue, or implementation that inspired this]
|
|
69
|
+
|
|
70
|
+
**Expected Impact:**
|
|
71
|
+
[How this should improve performance]
|
|
72
|
+
|
|
73
|
+
5. **Suggest, Don't Apply**
|
|
74
|
+
- Propose changes with clear rationale
|
|
75
|
+
- Show before/after sections
|
|
76
|
+
- Explain expected benefits
|
|
77
|
+
- Let the user approve before applying
|
|
78
|
+
</self_improvement_workflow>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
</improvement_protocol>
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
<improvement_categories>
|
|
86
|
+
|
|
87
|
+
## Improvement Categories
|
|
88
|
+
|
|
89
|
+
Every improvement must fit into one of these categories:
|
|
90
|
+
|
|
91
|
+
- **Investigation Enhancement**: Add specific files/patterns to check
|
|
92
|
+
- **Constraint Addition**: Add explicit "do not do X" rules
|
|
93
|
+
- **Pattern Reference**: Add concrete example from codebase
|
|
94
|
+
- **Workflow Step**: Add/modify a step in the process
|
|
95
|
+
- **Anti-Pattern**: Add something to actively avoid
|
|
96
|
+
- **Tool Usage**: Clarify how to use a specific tool
|
|
97
|
+
- **Success Criteria**: Add verification step
|
|
98
|
+
|
|
99
|
+
</improvement_categories>
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
<proven_patterns>
|
|
104
|
+
|
|
105
|
+
## Proven Patterns
|
|
106
|
+
|
|
107
|
+
All improvements must use established prompt engineering patterns:
|
|
108
|
+
|
|
109
|
+
**Pattern 1: Specific File References**
|
|
110
|
+
|
|
111
|
+
- Bad: "Check the auth patterns"
|
|
112
|
+
- Good: "Examine UserStore.ts lines 45-89 for the async flow pattern"
|
|
113
|
+
|
|
114
|
+
**Pattern 2: Concrete Examples**
|
|
115
|
+
|
|
116
|
+
- Bad: "Use MobX properly"
|
|
117
|
+
- Good: "Use `flow` from MobX for async actions (see UserStore.fetchUser())"
|
|
118
|
+
|
|
119
|
+
**Pattern 3: Explicit Constraints**
|
|
120
|
+
|
|
121
|
+
- Bad: "Don't over-engineer"
|
|
122
|
+
- Good: "Do not create new HTTP clients - use apiClient from lib/api-client.ts"
|
|
123
|
+
|
|
124
|
+
**Pattern 4: Verification Steps**
|
|
125
|
+
|
|
126
|
+
- Bad: "Make sure it works"
|
|
127
|
+
- Good: "Run `npm test` and verify UserStore.test.ts passes"
|
|
128
|
+
|
|
129
|
+
**Pattern 5: Emphatic for Critical Rules**
|
|
130
|
+
|
|
131
|
+
Use **bold** or CAPITALS for rules that are frequently violated:
|
|
132
|
+
"**NEVER modify files in /auth directory without explicit approval**"
|
|
133
|
+
|
|
134
|
+
</proven_patterns>
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
<red_flags>
|
|
139
|
+
|
|
140
|
+
## Red Flags
|
|
141
|
+
|
|
142
|
+
**Don't add improvements that:**
|
|
143
|
+
|
|
144
|
+
- Make instructions longer without clear benefit
|
|
145
|
+
- Introduce vague or ambiguous language
|
|
146
|
+
- Add complexity without evidence it helps
|
|
147
|
+
- Conflict with proven best practices
|
|
148
|
+
- Remove important existing content
|
|
149
|
+
|
|
150
|
+
</red_flags>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<investigation_requirement>
|
|
2
|
+
|
|
3
|
+
**CRITICAL: Never speculate about code you have not opened.**
|
|
4
|
+
|
|
5
|
+
Before making any claims or implementing anything:
|
|
6
|
+
|
|
7
|
+
1. **List the files you need to examine** - Be explicit about what you need to read
|
|
8
|
+
2. **Read each file completely** - Don't assume you know what's in a file
|
|
9
|
+
3. **Base analysis strictly on what you find** - No guessing or speculation
|
|
10
|
+
4. **If uncertain, ask** - Say "I need to investigate X" rather than making assumptions
|
|
11
|
+
|
|
12
|
+
If a specification references pattern files or existing code:
|
|
13
|
+
|
|
14
|
+
- You MUST read those files before implementing
|
|
15
|
+
- You MUST understand the established architecture
|
|
16
|
+
- You MUST base your work on actual code, not assumptions
|
|
17
|
+
|
|
18
|
+
If you don't have access to necessary files:
|
|
19
|
+
|
|
20
|
+
- Explicitly state what files you need
|
|
21
|
+
- Ask for them to be added to the conversation
|
|
22
|
+
- Do not proceed without proper investigation
|
|
23
|
+
|
|
24
|
+
**This prevents 80%+ of hallucination issues in coding agents.**
|
|
25
|
+
|
|
26
|
+
### What "Investigation" Means
|
|
27
|
+
|
|
28
|
+
**Good investigation:**
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
I need to examine these files to understand the pattern:
|
|
32
|
+
- auth.py (contains the authentication pattern to follow)
|
|
33
|
+
- user-service.ts (shows how we make API calls)
|
|
34
|
+
- SettingsForm.tsx (demonstrates our form handling approach)
|
|
35
|
+
|
|
36
|
+
[After reading files]
|
|
37
|
+
Based on auth.py lines 45-67, I can see the pattern uses...
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Bad "investigation":**
|
|
41
|
+
|
|
42
|
+
```
|
|
43
|
+
Based on standard authentication patterns, I'll implement...
|
|
44
|
+
[Proceeds without reading actual files]
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Always choose the good approach.
|
|
48
|
+
|
|
49
|
+
</investigation_requirement>
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
<success_criteria_template>
|
|
2
|
+
|
|
3
|
+
Every task needs explicit, measurable criteria that define "done." This prevents agents from stopping too early or continuing unnecessarily.
|
|
4
|
+
|
|
5
|
+
Success criteria must be:
|
|
6
|
+
|
|
7
|
+
1. **Specific** - No ambiguity about what "done" means
|
|
8
|
+
2. **Measurable** - Can verify with tests, checks, or observations
|
|
9
|
+
3. **Achievable** - Within scope of the task
|
|
10
|
+
4. **Verifiable** - Can provide evidence of completion
|
|
11
|
+
|
|
12
|
+
## Template Structure
|
|
13
|
+
|
|
14
|
+
Use this structure when defining success criteria:
|
|
15
|
+
|
|
16
|
+
```xml
|
|
17
|
+
<success_criteria>
|
|
18
|
+
Your implementation must meet these criteria:
|
|
19
|
+
|
|
20
|
+
**Functional Requirements:**
|
|
21
|
+
1. [Specific behavior that must work]
|
|
22
|
+
2. [Another specific behavior]
|
|
23
|
+
|
|
24
|
+
**Technical Requirements:**
|
|
25
|
+
3. All existing tests continue to pass
|
|
26
|
+
4. New functionality is covered by tests with >80% coverage
|
|
27
|
+
5. Code follows existing patterns in [specific files]
|
|
28
|
+
|
|
29
|
+
**Constraints:**
|
|
30
|
+
6. No new dependencies are introduced
|
|
31
|
+
7. Changes are limited to [specific files/modules]
|
|
32
|
+
8. Performance is equivalent to or better than [baseline]
|
|
33
|
+
|
|
34
|
+
**After Implementation:**
|
|
35
|
+
- Run the test suite and report results
|
|
36
|
+
- Verify each criterion is met
|
|
37
|
+
- Report any criteria that aren't met and explain why
|
|
38
|
+
</success_criteria>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
</success_criteria_template>
|
|
42
|
+
|
|
43
|
+
### Good vs. Bad Success Criteria
|
|
44
|
+
|
|
45
|
+
**Bad (vague, unmeasurable):**
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
- Feature works well
|
|
49
|
+
- Code is clean
|
|
50
|
+
- No bugs
|
|
51
|
+
- Good user experience
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Problem:** No specific, measurable targets. What does "works" mean? Which tests? How do you know it's "clean"?
|
|
55
|
+
|
|
56
|
+
**Good (specific, measurable):**
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
1. User can click "Edit Profile" button and modal appears
|
|
60
|
+
2. Modal displays current values (name, email, bio)
|
|
61
|
+
3. Email validation prevents invalid formats (test@test passes, test fails)
|
|
62
|
+
4. Form submission updates user record in database
|
|
63
|
+
5. Success message displays after save
|
|
64
|
+
6. All tests in profile-editor.test.ts pass
|
|
65
|
+
7. New tests cover: happy path, validation errors, network errors
|
|
66
|
+
8. No modifications to authentication system (auth.py unchanged)
|
|
67
|
+
9. Follows form pattern from SettingsForm.tsx (lines 45-89)
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
**Why better:** Each criterion can be verified with a simple yes/no check.
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
<verification_process>
|
|
75
|
+
|
|
76
|
+
### Verification Process
|
|
77
|
+
|
|
78
|
+
After completing work, systematically verify:
|
|
79
|
+
|
|
80
|
+
```xml
|
|
81
|
+
<verification_checklist>
|
|
82
|
+
For each success criterion:
|
|
83
|
+
1. State the criterion
|
|
84
|
+
2. Describe how you verified it
|
|
85
|
+
3. Provide evidence (test output, behavior observed, file comparison)
|
|
86
|
+
4. Mark as PASS (met) or FAIL (not met)
|
|
87
|
+
|
|
88
|
+
If any criterion is FAIL:
|
|
89
|
+
- Explain why it's not met
|
|
90
|
+
- Indicate if it's a blocker or acceptable deviation
|
|
91
|
+
- Suggest what's needed to meet it
|
|
92
|
+
</verification_checklist>
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
**Example Verification:**
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Criterion 1: User can click "Edit Profile" and see modal with current values
|
|
99
|
+
PASS Verified: Tested in browser, modal opens with user's current name, email, bio
|
|
100
|
+
Evidence: Screenshot attached, manual test passed
|
|
101
|
+
|
|
102
|
+
Criterion 5: All tests in profile-editor.test.ts pass
|
|
103
|
+
PASS Verified: Ran `npm test profile-editor.test.ts`
|
|
104
|
+
Evidence: All 12 tests passing, 0 failures
|
|
105
|
+
|
|
106
|
+
Criterion 7: No modifications to authentication system
|
|
107
|
+
PASS Verified: git diff shows no changes to auth.py or related files
|
|
108
|
+
Evidence: `git diff main...feature-branch -- auth.py` returns empty
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
</verification_process>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<write_verification_protocol>
|
|
2
|
+
|
|
3
|
+
**CRITICAL: Never report success without verifying your work was actually saved.**
|
|
4
|
+
|
|
5
|
+
### Why This Exists
|
|
6
|
+
|
|
7
|
+
Agents can:
|
|
8
|
+
|
|
9
|
+
1. Analyze what needs to change
|
|
10
|
+
2. Generate correct content
|
|
11
|
+
3. Plan the edits
|
|
12
|
+
4. **Fail to actually execute the Write/Edit operations**
|
|
13
|
+
5. **Report success based on the plan, not reality**
|
|
14
|
+
|
|
15
|
+
This causes downstream failures that are hard to debug because the agent reported success.
|
|
16
|
+
|
|
17
|
+
### Mandatory Verification Steps
|
|
18
|
+
|
|
19
|
+
**After completing ANY file edits, you MUST:**
|
|
20
|
+
|
|
21
|
+
1. **Re-read the file(s) you just edited** using the Read tool
|
|
22
|
+
2. **Verify your changes exist in the file:**
|
|
23
|
+
- For new content: Confirm the new text/code is present
|
|
24
|
+
- For edits: Confirm the old content was replaced
|
|
25
|
+
- For structural changes: Confirm the structure is correct
|
|
26
|
+
3. **If verification fails:**
|
|
27
|
+
- Report: "VERIFICATION FAILED: [what was expected] not found in [file]"
|
|
28
|
+
- Do NOT report success
|
|
29
|
+
- Re-attempt the edit operation
|
|
30
|
+
4. **Only report success AFTER verification passes**
|
|
31
|
+
|
|
32
|
+
### Verification Checklist
|
|
33
|
+
|
|
34
|
+
Include this in your final validation:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
**Write Verification:**
|
|
38
|
+
- [ ] Re-read file(s) after completing edits
|
|
39
|
+
- [ ] Verified expected changes exist in file
|
|
40
|
+
- [ ] Only reporting success after verification passed
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
</write_verification_protocol>
|
|
@@ -356,8 +356,8 @@ Skills use a three-file structure in domain-based directories:
|
|
|
356
356
|
|
|
357
357
|
- **Location:** `.claude/skills/{domain}-{category}-{technology}/`
|
|
358
358
|
- **Files:** `SKILL.md`, `metadata.yaml`, `reference.md` (optional)
|
|
359
|
-
- **Domains:** `web-`, `api-`, `cli-`, `
|
|
360
|
-
- **Examples:** `web-framework-react/`, `api-database-drizzle/`, `meta-
|
|
359
|
+
- **Domains:** `web-`, `api-`, `cli-`, `shared-`, `mobile-`
|
|
360
|
+
- **Examples:** `web-framework-react/`, `api-database-drizzle/`, `shared-meta-reviewing/`
|
|
361
361
|
|
|
362
362
|
---
|
|
363
363
|
|
|
@@ -762,8 +762,8 @@ For complex skill creation/improvement tasks spanning multiple conversation turn
|
|
|
762
762
|
- [ ] Has `<patterns>` section with Core Patterns with embedded good/bad examples
|
|
763
763
|
- [ ] Has `<performance>` section for optimization patterns (OPTIONAL - include if relevant)
|
|
764
764
|
- [ ] Has `<decision_framework>` section
|
|
765
|
-
- [ ] Has `<integration>` section
|
|
766
|
-
- [ ] Has `<red_flags>` section with "Gotchas & Edge Cases" subsection
|
|
765
|
+
- [ ] Has `<integration>` section ONLY if skill has its own ecosystem packages to list (OPTIONAL — must NOT name external tools from other domains per atomicity bible)
|
|
766
|
+
- [ ] Has `<red_flags>` section with "Gotchas & Edge Cases" subsection (REQUIRED in SKILL.md, not just reference.md)
|
|
767
767
|
|
|
768
768
|
**Example Quality:**
|
|
769
769
|
- [ ] Good/Bad pairs embedded in each Core Pattern
|
|
@@ -774,6 +774,26 @@ For complex skill creation/improvement tasks spanning multiple conversation turn
|
|
|
774
774
|
- [ ] Named exports used (no default exports)
|
|
775
775
|
- [ ] Patterns use `#### SubsectionName` headers as needed
|
|
776
776
|
|
|
777
|
+
**Atomicity (REQUIRED — most common source of skill defects):**
|
|
778
|
+
- [ ] Grep for `NEXT_PUBLIC_`, `@repo/`, `@/lib/` — replace with generic names
|
|
779
|
+
- [ ] Grep for external tool names from other domains (React Query, Zustand, SCSS, MSW, Vitest, lucide-react, Hono, Drizzle)
|
|
780
|
+
- [ ] `<integration>` section (if present) names ONLY the skill's own ecosystem packages, not external tools
|
|
781
|
+
- [ ] "When NOT to use" does NOT name specific competing tools by name
|
|
782
|
+
- [ ] Decision trees end within this skill's domain (no "→ Use React Query" exits)
|
|
783
|
+
- [ ] Critical requirements actually relate to THIS technology (no template contamination — e.g. `runInAction()` in a non-MobX skill)
|
|
784
|
+
|
|
785
|
+
**File Structure:**
|
|
786
|
+
- [ ] `examples/core.md` exists (ALWAYS required — rename the most fundamental file if needed)
|
|
787
|
+
- [ ] `<red_flags>` section exists in SKILL.md (not just in reference.md)
|
|
788
|
+
- [ ] SKILL.md is the decision layer (~500 lines max): brief 3-10 line snippets + links to example files, NOT full implementations
|
|
789
|
+
- [ ] No content duplicated between SKILL.md and example files
|
|
790
|
+
- [ ] No content duplicated between SKILL.md and reference.md
|
|
791
|
+
|
|
792
|
+
**API Accuracy:**
|
|
793
|
+
- [ ] For each code example's main API call, verified the function signature against official docs
|
|
794
|
+
- [ ] Verified which package an import comes from (not just the function name)
|
|
795
|
+
- [ ] Checked npm for the latest stable version — updated version claims if stale
|
|
796
|
+
|
|
777
797
|
**Write Verification:**
|
|
778
798
|
- [ ] Re-read the files after completing edits
|
|
779
799
|
- [ ] Verified all required files exist
|
|
@@ -818,6 +838,25 @@ For complex skill creation/improvement tasks spanning multiple conversation turn
|
|
|
818
838
|
- [ ] Any removed content was ONLY removed because it was redundant or violated conventions
|
|
819
839
|
- [ ] Added prompt-bible structure AROUND existing content, not replacing it
|
|
820
840
|
|
|
841
|
+
**Atomicity (REQUIRED — most common source of skill defects):**
|
|
842
|
+
- [ ] Grep for `NEXT_PUBLIC_`, `@repo/`, `@/lib/` — replace with generic names
|
|
843
|
+
- [ ] Grep for external tool names from other domains (React Query, Zustand, SCSS, MSW, Vitest, lucide-react, Hono, Drizzle)
|
|
844
|
+
- [ ] `<integration>` section (if present) names ONLY the skill's own ecosystem packages, not external tools
|
|
845
|
+
- [ ] "When NOT to use" does NOT name specific competing tools by name
|
|
846
|
+
- [ ] Decision trees end within this skill's domain
|
|
847
|
+
- [ ] Critical requirements actually relate to THIS technology (no template contamination)
|
|
848
|
+
|
|
849
|
+
**File Structure:**
|
|
850
|
+
- [ ] `examples/core.md` exists (ALWAYS required)
|
|
851
|
+
- [ ] `<red_flags>` section exists in SKILL.md
|
|
852
|
+
- [ ] SKILL.md serves as decision layer (~500 lines max): brief snippets + links, NOT full implementations
|
|
853
|
+
- [ ] No content duplicated between SKILL.md, reference.md, and example files
|
|
854
|
+
|
|
855
|
+
**API Accuracy:**
|
|
856
|
+
- [ ] For each code example's main API call, verified the function signature against official docs
|
|
857
|
+
- [ ] Verified which package an import comes from (not just the function name)
|
|
858
|
+
- [ ] Checked npm for the latest stable version — updated version claims if stale
|
|
859
|
+
|
|
821
860
|
**Write Verification:**
|
|
822
861
|
- [ ] Re-read the files after completing edits
|
|
823
862
|
- [ ] Verified changes were actually written
|
|
@@ -847,10 +886,16 @@ For complex skill creation/improvement tasks spanning multiple conversation turn
|
|
|
847
886
|
|
|
848
887
|
**Completeness:**
|
|
849
888
|
- [ ] All major patterns covered
|
|
850
|
-
- [ ] Integration guidance
|
|
889
|
+
- [ ] Integration guidance (if present) is generic — names only skill's own packages, not external tools
|
|
851
890
|
- [ ] Testing approaches included (if applicable)
|
|
852
891
|
- [ ] Performance section addresses optimization (if relevant)
|
|
853
892
|
|
|
893
|
+
**Content Ownership (no duplication):**
|
|
894
|
+
- [ ] SKILL.md owns: decisions, philosophy, red flags, brief pattern snippets
|
|
895
|
+
- [ ] Example files own: full code implementations (SKILL.md links to them, doesn't duplicate)
|
|
896
|
+
- [ ] reference.md owns: quick-lookup tables, checklists, API reference
|
|
897
|
+
- [ ] Anti-patterns appear in ONE location (SKILL.md red flags OR reference.md, not both)
|
|
898
|
+
|
|
854
899
|
**Currency:**
|
|
855
900
|
- [ ] No deprecated patterns recommended
|
|
856
901
|
- [ ] Version-specific content accurate
|