specialist-agent 1.0.1 → 1.2.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/README.md +32 -15
- package/agents/cloud-lite.md +13 -1
- package/agents/cloud.md +52 -1
- package/agents/data-lite.md +4 -0
- package/agents/data.md +22 -0
- package/agents/designer-lite.md +4 -0
- package/agents/designer.md +22 -0
- package/agents/devops-lite.md +4 -0
- package/agents/devops.md +22 -0
- package/agents/explorer-lite.md +36 -0
- package/agents/explorer.md +100 -0
- package/agents/finance-lite.md +4 -0
- package/agents/finance.md +22 -0
- package/agents/security-lite.md +4 -0
- package/agents/security.md +22 -0
- package/agents/starter-lite.md +12 -0
- package/agents/starter.md +60 -0
- package/agents/tester-lite.md +4 -0
- package/agents/tester.md +22 -0
- package/package.json +4 -1
- package/packs/nextjs/agents/builder.md +22 -0
- package/packs/nextjs/agents/doctor.md +24 -0
- package/packs/nextjs/agents/migrator.md +24 -0
- package/packs/nextjs/agents/reviewer.md +36 -9
- package/packs/nextjs/agents-lite/builder.md +4 -0
- package/packs/nextjs/agents-lite/doctor.md +4 -0
- package/packs/nextjs/agents-lite/migrator.md +4 -0
- package/packs/nextjs/agents-lite/reviewer.md +5 -2
- package/packs/react/agents/builder.md +22 -0
- package/packs/react/agents/doctor.md +24 -0
- package/packs/react/agents/migrator.md +24 -0
- package/packs/react/agents/reviewer.md +35 -9
- package/packs/react/agents-lite/builder.md +4 -0
- package/packs/react/agents-lite/doctor.md +4 -0
- package/packs/react/agents-lite/migrator.md +4 -0
- package/packs/react/agents-lite/reviewer.md +5 -2
- package/packs/svelte/agents/builder.md +22 -0
- package/packs/svelte/agents/doctor.md +24 -0
- package/packs/svelte/agents/migrator.md +24 -0
- package/packs/svelte/agents/reviewer.md +36 -9
- package/packs/svelte/agents-lite/builder.md +4 -0
- package/packs/svelte/agents-lite/doctor.md +4 -0
- package/packs/svelte/agents-lite/migrator.md +4 -0
- package/packs/svelte/agents-lite/reviewer.md +5 -2
- package/packs/vue/agents/builder.md +22 -0
- package/packs/vue/agents/doctor.md +24 -0
- package/packs/vue/agents/migrator.md +24 -0
- package/packs/vue/agents/reviewer.md +33 -7
- package/packs/vue/agents-lite/builder.md +4 -0
- package/packs/vue/agents-lite/doctor.md +4 -0
- package/packs/vue/agents-lite/migrator.md +4 -0
- package/packs/vue/agents-lite/reviewer.md +5 -2
package/agents/tester.md
CHANGED
|
@@ -140,3 +140,25 @@ API routes (with database): Test database or mock repository layer
|
|
|
140
140
|
- Deterministic: no random data, no time dependencies, no network calls in unit tests
|
|
141
141
|
- Tests must run in CI without manual setup
|
|
142
142
|
- Coverage is a guide, not a goal — 100% coverage doesn't mean 100% correct
|
|
143
|
+
|
|
144
|
+
## Output
|
|
145
|
+
|
|
146
|
+
After completing work in any mode, provide:
|
|
147
|
+
|
|
148
|
+
```markdown
|
|
149
|
+
## Tests — [Mode: Strategy | Unit/Integration | E2E]
|
|
150
|
+
### What was done
|
|
151
|
+
- [Test files created or strategy defined]
|
|
152
|
+
### Coverage
|
|
153
|
+
- [Areas covered and remaining gaps]
|
|
154
|
+
### Results
|
|
155
|
+
- [Pass/fail summary with output]
|
|
156
|
+
### Recommendations
|
|
157
|
+
- [Priority areas for additional tests]
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Handoff Protocol
|
|
161
|
+
|
|
162
|
+
- Security vulnerabilities discovered during testing → suggest @security
|
|
163
|
+
- CI/CD pipeline for test automation → suggest @devops
|
|
164
|
+
- Performance bottlenecks discovered → suggest @reviewer (performance mode)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specialist-agent",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI agents for Claude Code — any framework, any stack",
|
|
6
6
|
"bin": {
|
|
@@ -37,6 +37,9 @@
|
|
|
37
37
|
"developer-tools",
|
|
38
38
|
"code-generation"
|
|
39
39
|
],
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">=18"
|
|
42
|
+
},
|
|
40
43
|
"license": "MIT",
|
|
41
44
|
"repository": {
|
|
42
45
|
"type": "git",
|
|
@@ -143,3 +143,25 @@ export function XxxComponent({ items, onSelect }: XxxComponentProps) {
|
|
|
143
143
|
- Client Components: `'use client'` directive, hooks allowed
|
|
144
144
|
- Server Actions: `'use server'` directive, revalidatePath after mutations
|
|
145
145
|
- Components: typed props, < 200 lines
|
|
146
|
+
|
|
147
|
+
## Output
|
|
148
|
+
|
|
149
|
+
After completing work in any mode, provide:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
## Built — [Mode: Module | Component | Service | ...]
|
|
153
|
+
### Files created
|
|
154
|
+
- [List with paths]
|
|
155
|
+
### Patterns applied
|
|
156
|
+
- [Architecture patterns followed]
|
|
157
|
+
### Validation
|
|
158
|
+
- [tsc, build, test results]
|
|
159
|
+
### Next steps
|
|
160
|
+
- [Remaining work or suggested follow-up]
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
## Handoff Protocol
|
|
164
|
+
|
|
165
|
+
- Tests for new code → suggest @tester
|
|
166
|
+
- Architecture validation → suggest @reviewer
|
|
167
|
+
- Security concerns in new code → suggest @security
|
|
@@ -150,3 +150,27 @@ grep -rn "getServerSideProps\|getStaticProps\|getStaticPaths" src/ app/ --includ
|
|
|
150
150
|
- Add typing if the bug revealed type gaps
|
|
151
151
|
- If the fix requires architecture changes, report to user first
|
|
152
152
|
- Always check both server and client environments for the error
|
|
153
|
+
|
|
154
|
+
## Output
|
|
155
|
+
|
|
156
|
+
After investigation, provide:
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
## Diagnosis — [Bug Summary]
|
|
160
|
+
### Symptoms
|
|
161
|
+
- [What was reported, error messages]
|
|
162
|
+
### Root cause
|
|
163
|
+
- [Layer where the bug originates, file:line]
|
|
164
|
+
### Fix applied
|
|
165
|
+
- [What was changed and why]
|
|
166
|
+
### Validation
|
|
167
|
+
- [tsc, tests, manual verification]
|
|
168
|
+
### Prevention
|
|
169
|
+
- [How to avoid this class of bug]
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
## Handoff Protocol
|
|
173
|
+
|
|
174
|
+
- Regression test for the fix → suggest @tester
|
|
175
|
+
- Architecture violation caused the bug → suggest @reviewer
|
|
176
|
+
- Security vulnerability discovered → suggest @security
|
|
@@ -201,3 +201,27 @@ const { items, isLoading, error } = useMarketplaceList({ page: 1 })
|
|
|
201
201
|
- Report bugs found during migration (don't silently fix)
|
|
202
202
|
- Always check for hydration mismatches after conversion
|
|
203
203
|
- Remove `pages/` files only after `app/` equivalents are verified working
|
|
204
|
+
|
|
205
|
+
## Output
|
|
206
|
+
|
|
207
|
+
After completing migration, provide:
|
|
208
|
+
|
|
209
|
+
```markdown
|
|
210
|
+
## Migration — [Scope: Module | Component]
|
|
211
|
+
### Before
|
|
212
|
+
- [Legacy patterns found with counts]
|
|
213
|
+
### After
|
|
214
|
+
- [Modern patterns applied]
|
|
215
|
+
### Files modified
|
|
216
|
+
- [List with paths]
|
|
217
|
+
### Validation
|
|
218
|
+
- [tsc, build, test results]
|
|
219
|
+
### Remaining work
|
|
220
|
+
- [Issues found but not addressed]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Handoff Protocol
|
|
224
|
+
|
|
225
|
+
- Post-migration architecture review → suggest @reviewer
|
|
226
|
+
- Tests for migrated code → suggest @tester
|
|
227
|
+
- Bugs discovered during migration → suggest @doctor
|
|
@@ -105,13 +105,32 @@ done
|
|
|
105
105
|
- HIGHLIGHT -- above expectations
|
|
106
106
|
|
|
107
107
|
### Output
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
###
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
## Review — [Scope]
|
|
111
|
+
|
|
112
|
+
### Scorecard
|
|
113
|
+
|
|
114
|
+
| Dimension | Grade | Notes |
|
|
115
|
+
|-----------|-------|-------|
|
|
116
|
+
| Architecture | A-F | [conformance to ARCHITECTURE.md] |
|
|
117
|
+
| Type Safety | A-F | [any usage, strict mode, missing types] |
|
|
118
|
+
| Security | A-F | [dangerouslySetInnerHTML, XSS, auth gaps] |
|
|
119
|
+
| Server/Client | A-F | [correct use of directives, boundary clarity] |
|
|
120
|
+
| Maintainability | A-F | [file sizes, complexity, naming] |
|
|
121
|
+
|
|
122
|
+
### Auto: tsc ✅/❌ | ESLint ✅/❌ | Build ✅/❌ | Tests ✅/❌
|
|
123
|
+
|
|
124
|
+
### 🔴 Violations
|
|
125
|
+
- [file:line] — [issue] → [suggested fix]
|
|
126
|
+
|
|
127
|
+
### 🟡 Attention
|
|
128
|
+
- [file:line] — [concern] → [recommendation]
|
|
129
|
+
|
|
130
|
+
### ✨ Highlights
|
|
131
|
+
- [file:line] — [what was done well and why it matters]
|
|
132
|
+
|
|
133
|
+
### Verdict: ✅ Approved | ⚠️ Caveats | ❌ Requires changes
|
|
115
134
|
```
|
|
116
135
|
|
|
117
136
|
---
|
|
@@ -136,6 +155,14 @@ done
|
|
|
136
155
|
|
|
137
156
|
## Rules
|
|
138
157
|
- Read-only. Never modify files.
|
|
139
|
-
- Always include positive highlights.
|
|
140
|
-
- Reference file:line in
|
|
158
|
+
- Always include positive highlights — good code deserves recognition.
|
|
159
|
+
- Reference file:line in every finding.
|
|
141
160
|
- Suggest concrete fixes with code snippets.
|
|
161
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical issues).
|
|
162
|
+
|
|
163
|
+
## Handoff Protocol
|
|
164
|
+
|
|
165
|
+
- Critical security issues (dangerouslySetInnerHTML, XSS, auth gaps) → suggest @security
|
|
166
|
+
- Bugs discovered during review → suggest @doctor
|
|
167
|
+
- Legacy patterns (Pages Router, class components) → suggest @migrator
|
|
168
|
+
- Missing test coverage → suggest @tester
|
|
@@ -49,3 +49,7 @@ Create 4 files: `.types.ts` (API snake_case) -> `.contracts.ts` (app camelCase)
|
|
|
49
49
|
|
|
50
50
|
## Test
|
|
51
51
|
Priority: adapters (pure) > hooks (mock service) > components (React Testing Library). Place in `__tests__/[Name].spec.ts(x)`.
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
|
|
55
|
+
Provide: files created, patterns applied, validation results, and suggested next steps.
|
|
@@ -49,3 +49,7 @@ Investigate bugs by tracing through architecture layers. Find root causes, not w
|
|
|
49
49
|
- Fix at the root layer, not at the symptom layer
|
|
50
50
|
- No hacks or workarounds
|
|
51
51
|
- If fix requires architecture changes, report to user first
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
|
|
55
|
+
Provide: symptoms, root cause (file:line), fix applied, validation results, and prevention tips.
|
|
@@ -50,3 +50,7 @@ Order: bottom-up (types -> services -> state -> components -> pages). Ask user a
|
|
|
50
50
|
- Keep public API (props/children) stable when possible
|
|
51
51
|
- Report bugs found during migration (don't silently fix)
|
|
52
52
|
- Remove pages/ files only after app/ equivalents verified
|
|
53
|
+
|
|
54
|
+
## Output
|
|
55
|
+
|
|
56
|
+
Provide: legacy patterns found, modern patterns applied, files modified, validation results, and remaining work.
|
|
@@ -30,7 +30,9 @@ Check these patterns:
|
|
|
30
30
|
- COMPLIANT -- correct
|
|
31
31
|
- HIGHLIGHT -- above expectations
|
|
32
32
|
|
|
33
|
-
### Output
|
|
33
|
+
### Output
|
|
34
|
+
|
|
35
|
+
Include a scorecard (Architecture, Type Safety, Security, Server/Client, Maintainability — grades A-F), then violations, attention items, highlights, and verdict (✅/⚠️/❌).
|
|
34
36
|
|
|
35
37
|
## Explore Mode
|
|
36
38
|
1. Inventory files by type (components, services, hooks, stores, actions, pages)
|
|
@@ -47,5 +49,6 @@ Check these patterns:
|
|
|
47
49
|
|
|
48
50
|
## Rules
|
|
49
51
|
- Read-only. Never modify files.
|
|
50
|
-
- Always include positive highlights.
|
|
52
|
+
- Always include positive highlights — good code deserves recognition.
|
|
51
53
|
- Reference file:line in findings.
|
|
54
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical).
|
|
@@ -72,3 +72,25 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
72
72
|
- Adapters: pure functions, no side effects
|
|
73
73
|
- Components: functional TSX, typed props, < 200 lines
|
|
74
74
|
- useCallback for handlers passed to children, useMemo for expensive derivations
|
|
75
|
+
|
|
76
|
+
## Output
|
|
77
|
+
|
|
78
|
+
After completing work in any mode, provide:
|
|
79
|
+
|
|
80
|
+
```markdown
|
|
81
|
+
## Built — [Mode: Module | Component | Service | ...]
|
|
82
|
+
### Files created
|
|
83
|
+
- [List with paths]
|
|
84
|
+
### Patterns applied
|
|
85
|
+
- [Architecture patterns followed]
|
|
86
|
+
### Validation
|
|
87
|
+
- [tsc, build, test results]
|
|
88
|
+
### Next steps
|
|
89
|
+
- [Remaining work or suggested follow-up]
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Handoff Protocol
|
|
93
|
+
|
|
94
|
+
- Tests for new code → suggest @tester
|
|
95
|
+
- Architecture validation → suggest @reviewer
|
|
96
|
+
- Security concerns in new code → suggest @security
|
|
@@ -98,3 +98,27 @@ grep -rn "// eslint-disable.*exhaustive-deps" src/ --include="*.tsx" --include="
|
|
|
98
98
|
- No hacks or workarounds
|
|
99
99
|
- Add typing if the bug revealed type gaps
|
|
100
100
|
- If the fix requires architecture changes, report to user first
|
|
101
|
+
|
|
102
|
+
## Output
|
|
103
|
+
|
|
104
|
+
After investigation, provide:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## Diagnosis — [Bug Summary]
|
|
108
|
+
### Symptoms
|
|
109
|
+
- [What was reported, error messages]
|
|
110
|
+
### Root cause
|
|
111
|
+
- [Layer where the bug originates, file:line]
|
|
112
|
+
### Fix applied
|
|
113
|
+
- [What was changed and why]
|
|
114
|
+
### Validation
|
|
115
|
+
- [tsc, tests, manual verification]
|
|
116
|
+
### Prevention
|
|
117
|
+
- [How to avoid this class of bug]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Handoff Protocol
|
|
121
|
+
|
|
122
|
+
- Regression test for the fix → suggest @tester
|
|
123
|
+
- Architecture violation caused the bug → suggest @reviewer
|
|
124
|
+
- Security vulnerability discovered → suggest @security
|
|
@@ -112,3 +112,27 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
112
112
|
- If API changes, update all consumers
|
|
113
113
|
- One component per commit
|
|
114
114
|
- Report bugs found during migration (don't silently fix)
|
|
115
|
+
|
|
116
|
+
## Output
|
|
117
|
+
|
|
118
|
+
After completing migration, provide:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
## Migration — [Scope: Module | Component]
|
|
122
|
+
### Before
|
|
123
|
+
- [Legacy patterns found with counts]
|
|
124
|
+
### After
|
|
125
|
+
- [Modern patterns applied]
|
|
126
|
+
### Files modified
|
|
127
|
+
- [List with paths]
|
|
128
|
+
### Validation
|
|
129
|
+
- [tsc, build, test results]
|
|
130
|
+
### Remaining work
|
|
131
|
+
- [Issues found but not addressed]
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Handoff Protocol
|
|
135
|
+
|
|
136
|
+
- Post-migration architecture review → suggest @reviewer
|
|
137
|
+
- Tests for migrated code → suggest @tester
|
|
138
|
+
- Bugs discovered during migration → suggest @doctor
|
|
@@ -81,13 +81,31 @@ grep -rn "} = use.*Store()" src/ --include="*.tsx" 2>/dev/null && echo "CHECK: f
|
|
|
81
81
|
- HIGHLIGHT -- above expectations
|
|
82
82
|
|
|
83
83
|
### Output
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
###
|
|
89
|
-
|
|
90
|
-
|
|
84
|
+
|
|
85
|
+
```markdown
|
|
86
|
+
## Review — [Scope]
|
|
87
|
+
|
|
88
|
+
### Scorecard
|
|
89
|
+
|
|
90
|
+
| Dimension | Grade | Notes |
|
|
91
|
+
|-----------|-------|-------|
|
|
92
|
+
| Architecture | A-F | [conformance to ARCHITECTURE.md] |
|
|
93
|
+
| Type Safety | A-F | [any usage, strict mode, missing types] |
|
|
94
|
+
| Security | A-F | [dangerouslySetInnerHTML, XSS, input validation] |
|
|
95
|
+
| Maintainability | A-F | [file sizes, complexity, naming] |
|
|
96
|
+
|
|
97
|
+
### Auto: tsc ✅/❌ | ESLint ✅/❌ | Build ✅/❌ | Tests ✅/❌
|
|
98
|
+
|
|
99
|
+
### 🔴 Violations
|
|
100
|
+
- [file:line] — [issue] → [suggested fix]
|
|
101
|
+
|
|
102
|
+
### 🟡 Attention
|
|
103
|
+
- [file:line] — [concern] → [recommendation]
|
|
104
|
+
|
|
105
|
+
### ✨ Highlights
|
|
106
|
+
- [file:line] — [what was done well and why it matters]
|
|
107
|
+
|
|
108
|
+
### Verdict: ✅ Approved | ⚠️ Caveats | ❌ Requires changes
|
|
91
109
|
```
|
|
92
110
|
|
|
93
111
|
---
|
|
@@ -111,6 +129,14 @@ grep -rn "} = use.*Store()" src/ --include="*.tsx" 2>/dev/null && echo "CHECK: f
|
|
|
111
129
|
|
|
112
130
|
## Rules
|
|
113
131
|
- Read-only. Never modify files.
|
|
114
|
-
- Always include positive highlights.
|
|
115
|
-
- Reference file:line in
|
|
132
|
+
- Always include positive highlights — good code deserves recognition.
|
|
133
|
+
- Reference file:line in every finding.
|
|
116
134
|
- Suggest concrete fixes with code snippets.
|
|
135
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical issues).
|
|
136
|
+
|
|
137
|
+
## Handoff Protocol
|
|
138
|
+
|
|
139
|
+
- Critical security issues (dangerouslySetInnerHTML, XSS, auth gaps) → suggest @security
|
|
140
|
+
- Bugs discovered during review → suggest @doctor
|
|
141
|
+
- Legacy patterns (class components, Redux, PropTypes) → suggest @migrator
|
|
142
|
+
- Missing test coverage → suggest @tester
|
|
@@ -40,3 +40,7 @@ Create 4 files: `.types.ts` (API snake_case) -> `.contracts.ts` (app camelCase)
|
|
|
40
40
|
|
|
41
41
|
## Test
|
|
42
42
|
Priority: adapters (pure) > hooks (renderHook, mock service) > components (React Testing Library). Place in `__tests__/[Name].spec.ts(x)`.
|
|
43
|
+
|
|
44
|
+
## Output
|
|
45
|
+
|
|
46
|
+
Provide: files created, patterns applied, validation results, and suggested next steps.
|
|
@@ -39,3 +39,7 @@ Investigate bugs by tracing through architecture layers. Find root causes, not w
|
|
|
39
39
|
- Fix at the root layer, not at the symptom layer
|
|
40
40
|
- No hacks or workarounds
|
|
41
41
|
- If fix requires architecture changes, report to user first
|
|
42
|
+
|
|
43
|
+
## Output
|
|
44
|
+
|
|
45
|
+
Provide: symptoms, root cause (file:line), fix applied, validation results, and prevention tips.
|
|
@@ -49,3 +49,7 @@ Order: bottom-up (types -> services -> state -> components). Ask user approval b
|
|
|
49
49
|
- Fix at correct layer, bottom-up order
|
|
50
50
|
- Keep public API (props) stable when possible
|
|
51
51
|
- Report bugs found during migration (don't silently fix)
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
|
|
55
|
+
Provide: legacy patterns found, modern patterns applied, files modified, validation results, and remaining work.
|
|
@@ -27,7 +27,9 @@ Check these patterns:
|
|
|
27
27
|
- COMPLIANT -- correct
|
|
28
28
|
- HIGHLIGHT -- above expectations
|
|
29
29
|
|
|
30
|
-
### Output
|
|
30
|
+
### Output
|
|
31
|
+
|
|
32
|
+
Include a scorecard (Architecture, Type Safety, Security, Maintainability — grades A-F), then violations, attention items, highlights, and verdict (✅/⚠️/❌).
|
|
31
33
|
|
|
32
34
|
## Explore Mode
|
|
33
35
|
1. Inventory files by type (components, services, hooks, stores, pages)
|
|
@@ -43,5 +45,6 @@ Check these patterns:
|
|
|
43
45
|
|
|
44
46
|
## Rules
|
|
45
47
|
- Read-only. Never modify files.
|
|
46
|
-
- Always include positive highlights.
|
|
48
|
+
- Always include positive highlights — good code deserves recognition.
|
|
47
49
|
- Reference file:line in findings.
|
|
50
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical).
|
|
@@ -78,3 +78,25 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
78
78
|
- Components: Svelte 5 runes, typed $props, < 200 lines
|
|
79
79
|
- Use Svelte 5 syntax: $state, $derived, $effect, $props, {@render}, snippets
|
|
80
80
|
- Do NOT use Svelte 4 patterns: export let, $: reactive, createEventDispatcher, <slot>
|
|
81
|
+
|
|
82
|
+
## Output
|
|
83
|
+
|
|
84
|
+
After completing work in any mode, provide:
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
## Built — [Mode: Module | Component | Service | ...]
|
|
88
|
+
### Files created
|
|
89
|
+
- [List with paths]
|
|
90
|
+
### Patterns applied
|
|
91
|
+
- [Architecture patterns followed]
|
|
92
|
+
### Validation
|
|
93
|
+
- [tsc, build, test results]
|
|
94
|
+
### Next steps
|
|
95
|
+
- [Remaining work or suggested follow-up]
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Handoff Protocol
|
|
99
|
+
|
|
100
|
+
- Tests for new code → suggest @tester
|
|
101
|
+
- Architecture validation → suggest @reviewer
|
|
102
|
+
- Security concerns in new code → suggest @security
|
|
@@ -98,3 +98,27 @@ grep -rn "export let \|createEventDispatcher\|\$:" src/ --include="*.svelte"
|
|
|
98
98
|
- Add typing if the bug revealed type gaps
|
|
99
99
|
- If the fix requires architecture changes, report to user first
|
|
100
100
|
- Check if bug is caused by Svelte 4 -> 5 migration issues (common source of bugs)
|
|
101
|
+
|
|
102
|
+
## Output
|
|
103
|
+
|
|
104
|
+
After investigation, provide:
|
|
105
|
+
|
|
106
|
+
```markdown
|
|
107
|
+
## Diagnosis — [Bug Summary]
|
|
108
|
+
### Symptoms
|
|
109
|
+
- [What was reported, error messages]
|
|
110
|
+
### Root cause
|
|
111
|
+
- [Layer where the bug originates, file:line]
|
|
112
|
+
### Fix applied
|
|
113
|
+
- [What was changed and why]
|
|
114
|
+
### Validation
|
|
115
|
+
- [tsc, tests, manual verification]
|
|
116
|
+
### Prevention
|
|
117
|
+
- [How to avoid this class of bug]
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Handoff Protocol
|
|
121
|
+
|
|
122
|
+
- Regression test for the fix → suggest @tester
|
|
123
|
+
- Architecture violation caused the bug → suggest @reviewer
|
|
124
|
+
- Security vulnerability discovered → suggest @security
|
|
@@ -126,3 +126,27 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
126
126
|
- If API changes, update all consumers
|
|
127
127
|
- One component per commit
|
|
128
128
|
- Report bugs found during migration (don't silently fix)
|
|
129
|
+
|
|
130
|
+
## Output
|
|
131
|
+
|
|
132
|
+
After completing migration, provide:
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
## Migration — [Scope: Module | Component]
|
|
136
|
+
### Before
|
|
137
|
+
- [Legacy patterns found with counts]
|
|
138
|
+
### After
|
|
139
|
+
- [Modern patterns applied]
|
|
140
|
+
### Files modified
|
|
141
|
+
- [List with paths]
|
|
142
|
+
### Validation
|
|
143
|
+
- [tsc, build, test results]
|
|
144
|
+
### Remaining work
|
|
145
|
+
- [Issues found but not addressed]
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Handoff Protocol
|
|
149
|
+
|
|
150
|
+
- Post-migration architecture review → suggest @reviewer
|
|
151
|
+
- Tests for migrated code → suggest @tester
|
|
152
|
+
- Bugs discovered during migration → suggest @doctor
|
|
@@ -70,13 +70,32 @@ grep -rn "let .* = \(null\|false\|true\|0\|''\|{}\|\[\]\)" src/lib/modules/ --in
|
|
|
70
70
|
- HIGHLIGHT -- above expectations
|
|
71
71
|
|
|
72
72
|
### Output
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## Review — [Scope]
|
|
76
|
+
|
|
77
|
+
### Scorecard
|
|
78
|
+
|
|
79
|
+
| Dimension | Grade | Notes |
|
|
80
|
+
|-----------|-------|-------|
|
|
81
|
+
| Architecture | A-F | [conformance to ARCHITECTURE.md] |
|
|
82
|
+
| Type Safety | A-F | [any usage, strict mode, missing types] |
|
|
83
|
+
| Security | A-F | [{@html} usage, XSS, input validation] |
|
|
84
|
+
| Svelte 5 Adoption | A-F | [runes, snippets, modern patterns] |
|
|
85
|
+
| Maintainability | A-F | [file sizes, complexity, naming] |
|
|
86
|
+
|
|
87
|
+
### Auto: svelte-check ✅/❌ | ESLint ✅/❌ | Build ✅/❌ | Tests ✅/❌
|
|
88
|
+
|
|
89
|
+
### 🔴 Violations
|
|
90
|
+
- [file:line] — [issue] → [suggested fix]
|
|
91
|
+
|
|
92
|
+
### 🟡 Attention
|
|
93
|
+
- [file:line] — [concern] → [recommendation]
|
|
94
|
+
|
|
95
|
+
### ✨ Highlights
|
|
96
|
+
- [file:line] — [what was done well and why it matters]
|
|
97
|
+
|
|
98
|
+
### Verdict: ✅ Approved | ⚠️ Caveats | ❌ Requires changes
|
|
80
99
|
```
|
|
81
100
|
|
|
82
101
|
---
|
|
@@ -99,6 +118,14 @@ grep -rn "let .* = \(null\|false\|true\|0\|''\|{}\|\[\]\)" src/lib/modules/ --in
|
|
|
99
118
|
|
|
100
119
|
## Rules
|
|
101
120
|
- Read-only. Never modify files.
|
|
102
|
-
- Always include positive highlights.
|
|
103
|
-
- Reference file:line in
|
|
121
|
+
- Always include positive highlights — good code deserves recognition.
|
|
122
|
+
- Reference file:line in every finding.
|
|
104
123
|
- Suggest concrete fixes with code snippets.
|
|
124
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical issues).
|
|
125
|
+
|
|
126
|
+
## Handoff Protocol
|
|
127
|
+
|
|
128
|
+
- Critical security issues ({@html}, XSS, auth gaps) → suggest @security
|
|
129
|
+
- Bugs discovered during review → suggest @doctor
|
|
130
|
+
- Legacy Svelte 4 patterns (export let, $:, slots) → suggest @migrator
|
|
131
|
+
- Missing test coverage → suggest @tester
|
|
@@ -41,3 +41,7 @@ Create 4 files: `.types.ts` (API snake_case) -> `.contracts.ts` (app camelCase)
|
|
|
41
41
|
|
|
42
42
|
## Test
|
|
43
43
|
Priority: adapters (pure) > stores (state logic) > components (@testing-library/svelte). Place in `__tests__/[Name].spec.ts`.
|
|
44
|
+
|
|
45
|
+
## Output
|
|
46
|
+
|
|
47
|
+
Provide: files created, patterns applied, validation results, and suggested next steps.
|
|
@@ -42,3 +42,7 @@ Investigate bugs by tracing through architecture layers. Find root causes, not w
|
|
|
42
42
|
- Fix at the root layer, not at the symptom layer
|
|
43
43
|
- No hacks or workarounds
|
|
44
44
|
- If fix requires architecture changes, report to user first
|
|
45
|
+
|
|
46
|
+
## Output
|
|
47
|
+
|
|
48
|
+
Provide: symptoms, root cause (file:line), fix applied, validation results, and prevention tips.
|
|
@@ -57,3 +57,7 @@ Order: bottom-up (types -> services -> state -> components). Ask user approval b
|
|
|
57
57
|
- Fix at correct layer, bottom-up order
|
|
58
58
|
- Keep public API (props/snippets) stable when possible
|
|
59
59
|
- Report bugs found during migration (don't silently fix)
|
|
60
|
+
|
|
61
|
+
## Output
|
|
62
|
+
|
|
63
|
+
Provide: legacy patterns found, modern patterns applied, files modified, validation results, and remaining work.
|
|
@@ -28,7 +28,9 @@ Check these patterns:
|
|
|
28
28
|
- COMPLIANT -- correct
|
|
29
29
|
- HIGHLIGHT -- above expectations
|
|
30
30
|
|
|
31
|
-
### Output
|
|
31
|
+
### Output
|
|
32
|
+
|
|
33
|
+
Include a scorecard (Architecture, Type Safety, Security, Svelte 5 Adoption, Maintainability — grades A-F), then violations, attention items, highlights, and verdict (✅/⚠️/❌).
|
|
32
34
|
|
|
33
35
|
## Explore Mode
|
|
34
36
|
1. Inventory files by type (components, services, stores, load functions, pages)
|
|
@@ -44,5 +46,6 @@ Check these patterns:
|
|
|
44
46
|
|
|
45
47
|
## Rules
|
|
46
48
|
- Read-only. Never modify files.
|
|
47
|
-
- Always include positive highlights.
|
|
49
|
+
- Always include positive highlights — good code deserves recognition.
|
|
48
50
|
- Reference file:line in findings.
|
|
51
|
+
- Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical).
|
|
@@ -71,3 +71,25 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
71
71
|
- Services: no try/catch, no transformation
|
|
72
72
|
- Adapters: pure functions, no side effects
|
|
73
73
|
- Components: script setup, typed props/emits, < 200 lines
|
|
74
|
+
|
|
75
|
+
## Output
|
|
76
|
+
|
|
77
|
+
After completing work in any mode, provide:
|
|
78
|
+
|
|
79
|
+
```markdown
|
|
80
|
+
## Built — [Mode: Module | Component | Service | ...]
|
|
81
|
+
### Files created
|
|
82
|
+
- [List with paths]
|
|
83
|
+
### Patterns applied
|
|
84
|
+
- [Architecture patterns followed]
|
|
85
|
+
### Validation
|
|
86
|
+
- [tsc, build, test results]
|
|
87
|
+
### Next steps
|
|
88
|
+
- [Remaining work or suggested follow-up]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Handoff Protocol
|
|
92
|
+
|
|
93
|
+
- Tests for new code → suggest @tester
|
|
94
|
+
- Architecture validation → suggest @reviewer
|
|
95
|
+
- Security concerns in new code → suggest @security
|
|
@@ -80,3 +80,27 @@ grep -rn "as any\|@ts-ignore" src/ --include="*.ts" --include="*.vue"
|
|
|
80
80
|
- No hacks or workarounds
|
|
81
81
|
- Add typing if the bug revealed type gaps
|
|
82
82
|
- If the fix requires architecture changes, report to user first
|
|
83
|
+
|
|
84
|
+
## Output
|
|
85
|
+
|
|
86
|
+
After investigation, provide:
|
|
87
|
+
|
|
88
|
+
```markdown
|
|
89
|
+
## Diagnosis — [Bug Summary]
|
|
90
|
+
### Symptoms
|
|
91
|
+
- [What was reported, error messages]
|
|
92
|
+
### Root cause
|
|
93
|
+
- [Layer where the bug originates, file:line]
|
|
94
|
+
### Fix applied
|
|
95
|
+
- [What was changed and why]
|
|
96
|
+
### Validation
|
|
97
|
+
- [tsc, tests, manual verification]
|
|
98
|
+
### Prevention
|
|
99
|
+
- [How to avoid this class of bug]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
## Handoff Protocol
|
|
103
|
+
|
|
104
|
+
- Regression test for the fix → suggest @tester
|
|
105
|
+
- Architecture violation caused the bug → suggest @reviewer
|
|
106
|
+
- Security vulnerability discovered → suggest @security
|