specialist-agent 1.6.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 (176) hide show
  1. package/.claude-plugin/marketplace.json +77 -0
  2. package/.claude-plugin/plugin.json +43 -0
  3. package/.codex/INSTALL.md +113 -0
  4. package/.cursor-plugin/marketplace.json +9 -0
  5. package/.cursor-plugin/plugin.json +35 -0
  6. package/.opencode/INSTALL.md +123 -0
  7. package/README.md +204 -263
  8. package/agents/analyst-lite.md +48 -0
  9. package/agents/analyst.md +391 -0
  10. package/agents/api-lite.md +43 -0
  11. package/agents/api.md +145 -0
  12. package/agents/cloud-lite.md +1 -1
  13. package/agents/cloud.md +1 -1
  14. package/agents/data-lite.md +1 -1
  15. package/agents/data.md +1 -1
  16. package/agents/debugger-lite.md +46 -0
  17. package/agents/debugger.md +406 -0
  18. package/agents/deps-lite.md +41 -0
  19. package/agents/deps.md +206 -0
  20. package/agents/designer-lite.md +1 -1
  21. package/agents/designer.md +1 -1
  22. package/agents/devops-lite.md +1 -1
  23. package/agents/devops.md +1 -1
  24. package/agents/docs-lite.md +42 -0
  25. package/agents/docs.md +197 -0
  26. package/agents/executor-lite.md +61 -0
  27. package/agents/executor.md +456 -0
  28. package/agents/explorer-lite.md +1 -1
  29. package/agents/explorer.md +1 -1
  30. package/agents/finance-lite.md +1 -1
  31. package/agents/finance.md +1 -1
  32. package/agents/i18n-lite.md +44 -0
  33. package/agents/i18n.md +198 -0
  34. package/agents/legal-lite.md +1 -1
  35. package/agents/legal.md +1 -1
  36. package/agents/memory.md +240 -0
  37. package/agents/orchestrator-lite.md +40 -0
  38. package/agents/orchestrator.md +387 -0
  39. package/agents/pair-lite.md +38 -0
  40. package/agents/pair.md +308 -0
  41. package/agents/perf-lite.md +42 -0
  42. package/agents/perf.md +141 -0
  43. package/agents/planner-lite.md +59 -0
  44. package/agents/planner.md +265 -0
  45. package/agents/refactor-lite.md +42 -0
  46. package/agents/refactor.md +178 -0
  47. package/agents/scout-lite.md +37 -0
  48. package/agents/scout.md +222 -0
  49. package/agents/security-lite.md +1 -1
  50. package/agents/security.md +1 -1
  51. package/agents/starter-lite.md +1 -1
  52. package/agents/starter.md +1 -1
  53. package/agents/tdd-lite.md +43 -0
  54. package/agents/tdd.md +317 -0
  55. package/agents/tester-lite.md +1 -1
  56. package/agents/tester.md +1 -1
  57. package/cli/index.mjs +636 -15
  58. package/hooks/after-review.mjs +130 -0
  59. package/hooks/after-task.mjs +117 -0
  60. package/hooks/before-plan.mjs +155 -0
  61. package/hooks/before-review.mjs +139 -0
  62. package/hooks/hooks.json +81 -0
  63. package/hooks/native/auto-dispatch.mjs +197 -0
  64. package/hooks/native/auto-format.mjs +193 -0
  65. package/hooks/native/security-config.json +31 -0
  66. package/hooks/native/security-guard.mjs +267 -0
  67. package/hooks/native/session-context.mjs +136 -0
  68. package/hooks/native/settings-template.json +50 -0
  69. package/hooks/native/utils.mjs +62 -0
  70. package/hooks/on-error.mjs +129 -0
  71. package/hooks/session-end.mjs +185 -0
  72. package/hooks/session-start.mjs +154 -0
  73. package/package.json +16 -3
  74. package/packs/nextjs/agents/builder.md +24 -1
  75. package/packs/nextjs/agents/doctor.md +70 -4
  76. package/packs/nextjs/agents/migrator.md +24 -1
  77. package/packs/nextjs/agents/reviewer.md +93 -3
  78. package/packs/nextjs/agents-lite/builder.md +1 -1
  79. package/packs/nextjs/agents-lite/doctor.md +1 -1
  80. package/packs/nextjs/agents-lite/migrator.md +1 -1
  81. package/packs/nextjs/agents-lite/reviewer.md +1 -1
  82. package/packs/nextjs/skills/dev-create-component/SKILL.md +1 -1
  83. package/packs/nextjs/skills/dev-create-hook/SKILL.md +1 -1
  84. package/packs/nextjs/skills/dev-create-module/SKILL.md +1 -1
  85. package/packs/nextjs/skills/dev-create-service/SKILL.md +1 -1
  86. package/packs/nextjs/skills/dev-create-test/SKILL.md +1 -1
  87. package/packs/nextjs/skills/dev-generate-types/SKILL.md +1 -1
  88. package/packs/nextjs/skills/docs-onboard/SKILL.md +1 -1
  89. package/packs/nextjs/skills/migration-migrate-component/SKILL.md +1 -1
  90. package/packs/nextjs/skills/migration-migrate-module/SKILL.md +1 -1
  91. package/packs/nextjs/skills/review-check-architecture/SKILL.md +1 -1
  92. package/packs/nextjs/skills/review-fix-violations/SKILL.md +1 -1
  93. package/packs/nextjs/skills/review-review/SKILL.md +1 -1
  94. package/packs/react/agents/builder.md +24 -1
  95. package/packs/react/agents/doctor.md +107 -13
  96. package/packs/react/agents/migrator.md +24 -1
  97. package/packs/react/agents/reviewer.md +113 -9
  98. package/packs/react/agents-lite/builder.md +1 -1
  99. package/packs/react/agents-lite/doctor.md +1 -1
  100. package/packs/react/agents-lite/migrator.md +1 -1
  101. package/packs/react/agents-lite/reviewer.md +1 -1
  102. package/packs/react/skills/dev-create-component/SKILL.md +1 -1
  103. package/packs/react/skills/dev-create-hook/SKILL.md +1 -1
  104. package/packs/react/skills/dev-create-module/SKILL.md +1 -1
  105. package/packs/react/skills/dev-create-service/SKILL.md +1 -1
  106. package/packs/react/skills/dev-create-test/SKILL.md +1 -1
  107. package/packs/react/skills/dev-generate-types/SKILL.md +1 -1
  108. package/packs/react/skills/docs-onboard/SKILL.md +1 -1
  109. package/packs/react/skills/migration-migrate-component/SKILL.md +1 -1
  110. package/packs/react/skills/migration-migrate-module/SKILL.md +1 -1
  111. package/packs/react/skills/review-check-architecture/SKILL.md +1 -1
  112. package/packs/react/skills/review-fix-violations/SKILL.md +1 -1
  113. package/packs/react/skills/review-review/SKILL.md +1 -1
  114. package/packs/svelte/agents/builder.md +24 -1
  115. package/packs/svelte/agents/doctor.md +70 -4
  116. package/packs/svelte/agents/migrator.md +24 -1
  117. package/packs/svelte/agents/reviewer.md +93 -3
  118. package/packs/svelte/agents-lite/builder.md +1 -1
  119. package/packs/svelte/agents-lite/doctor.md +1 -1
  120. package/packs/svelte/agents-lite/migrator.md +1 -1
  121. package/packs/svelte/agents-lite/reviewer.md +1 -1
  122. package/packs/svelte/skills/dev-create-component/SKILL.md +1 -1
  123. package/packs/svelte/skills/dev-create-module/SKILL.md +1 -1
  124. package/packs/svelte/skills/dev-create-service/SKILL.md +1 -1
  125. package/packs/svelte/skills/dev-create-store/SKILL.md +1 -1
  126. package/packs/svelte/skills/dev-create-test/SKILL.md +1 -1
  127. package/packs/svelte/skills/dev-generate-types/SKILL.md +1 -1
  128. package/packs/svelte/skills/docs-onboard/SKILL.md +1 -1
  129. package/packs/svelte/skills/migration-migrate-component/SKILL.md +1 -1
  130. package/packs/svelte/skills/migration-migrate-module/SKILL.md +1 -1
  131. package/packs/svelte/skills/review-check-architecture/SKILL.md +1 -1
  132. package/packs/svelte/skills/review-fix-violations/SKILL.md +1 -1
  133. package/packs/svelte/skills/review-review/SKILL.md +1 -1
  134. package/packs/vue/agents/builder.md +24 -1
  135. package/packs/vue/agents/doctor.md +107 -13
  136. package/packs/vue/agents/migrator.md +24 -1
  137. package/packs/vue/agents/reviewer.md +113 -9
  138. package/packs/vue/agents-lite/builder.md +1 -1
  139. package/packs/vue/agents-lite/doctor.md +1 -1
  140. package/packs/vue/agents-lite/migrator.md +1 -1
  141. package/packs/vue/agents-lite/reviewer.md +1 -1
  142. package/packs/vue/skills/dev-create-component/SKILL.md +1 -1
  143. package/packs/vue/skills/dev-create-composable/SKILL.md +1 -1
  144. package/packs/vue/skills/dev-create-module/SKILL.md +1 -1
  145. package/packs/vue/skills/dev-create-service/SKILL.md +1 -1
  146. package/packs/vue/skills/dev-create-test/SKILL.md +1 -1
  147. package/packs/vue/skills/dev-generate-types/SKILL.md +1 -1
  148. package/packs/vue/skills/docs-onboard/SKILL.md +1 -1
  149. package/packs/vue/skills/migration-migrate-component/SKILL.md +1 -1
  150. package/packs/vue/skills/migration-migrate-module/SKILL.md +1 -1
  151. package/packs/vue/skills/review-check-architecture/SKILL.md +1 -1
  152. package/packs/vue/skills/review-fix-violations/SKILL.md +1 -1
  153. package/packs/vue/skills/review-review/SKILL.md +1 -1
  154. package/skills/audit/SKILL.md +169 -0
  155. package/skills/brainstorm/SKILL.md +245 -0
  156. package/skills/checkpoint/SKILL.md +209 -0
  157. package/skills/debug/SKILL.md +210 -0
  158. package/skills/estimate/SKILL.md +145 -0
  159. package/skills/finish/SKILL.md +211 -0
  160. package/skills/health/SKILL.md +242 -0
  161. package/skills/learn/SKILL.md +260 -0
  162. package/skills/migrate-framework/SKILL.md +172 -0
  163. package/skills/onboard/SKILL.md +168 -0
  164. package/skills/plan/SKILL.md +132 -0
  165. package/skills/recall/SKILL.md +150 -0
  166. package/skills/remember/SKILL.md +158 -0
  167. package/skills/tdd/SKILL.md +156 -0
  168. package/skills/tutorial/SKILL.md +346 -0
  169. package/skills/verify/SKILL.md +168 -0
  170. package/skills/worktree/SKILL.md +168 -0
  171. package/skills/write-skill/SKILL.md +213 -0
  172. package/templates/industry/ecommerce.md +127 -0
  173. package/templates/industry/fintech.md +161 -0
  174. package/templates/industry/saas.md +134 -0
  175. package/templates/session-memory.json +48 -0
  176. package/templates/skill-template/SKILL.md +90 -0
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-generate-types
3
- description: "Generate types, contracts and adapter from an API endpoint or JSON example"
3
+ description: "Use when integrating with an API endpoint and need TypeScript types, contracts, and adapters generated automatically."
4
4
  user-invocable: true
5
5
  argument-hint: "[endpoint-or-json]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docs-onboard
3
- description: "Create a quick module summary for onboarding new developers"
3
+ description: "Use when onboarding onto a module and need a quick summary of its structure, patterns, and key files."
4
4
  user-invocable: true
5
5
  argument-hint: "[module-name]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-migrate-component
3
- description: "Migrate a React class component to a functional component with TypeScript and hooks"
3
+ description: "Use when a component needs migration to the target architecture or framework version."
4
4
  user-invocable: true
5
5
  argument-hint: "[component-file]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-migrate-module
3
- description: "Migrate an entire module to the target architecture in 6 phases"
3
+ description: "Use when a complete module needs migration to the target architecture — runs 6 phases with approval gates."
4
4
  user-invocable: true
5
5
  argument-hint: "[module-path]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-check-architecture
3
- description: "Validate project conformance against ARCHITECTURE.md with automated checks"
3
+ description: "Use when checking if code follows ARCHITECTURE.md patterns — runs automated conformance checks."
4
4
  user-invocable: true
5
5
  argument-hint: "[module]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-fix-violations
3
- description: "Find and auto-fix ARCHITECTURE.md violations in a module"
3
+ description: "Use when architecture violations were found and need automated fixing by priority."
4
4
  user-invocable: true
5
5
  argument-hint: "[module]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-review
3
- description: "Perform a full code review validating against ARCHITECTURE.md"
3
+ description: "Use when code changes need review before merge — validates architecture, types, security, and test coverage."
4
4
  user-invocable: true
5
5
  argument-hint: "[scope]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: builder
3
- description: "MUST BE USED when creating new modules, components, services, stores, or tests. Use PROACTIVELY when the user wants to build any new code."
3
+ description: "Use when creating new modules, components, services, hooks, or pages in an existing project."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
6
 
@@ -92,6 +92,28 @@ Read `docs/ARCHITECTURE.md`.
92
92
  3. Create in `__tests__/[OriginalName].spec.ts`
93
93
  4. Run: `npx vitest run [file]`
94
94
 
95
+ ## Verification Protocol
96
+
97
+ **Before claiming ANY module/component is complete:**
98
+
99
+ ```
100
+ 1. RUN `npx tsc --noEmit` — No TypeScript errors
101
+ 2. RUN `npm test` — All tests pass
102
+ 3. RUN `npm run lint` — No lint errors
103
+ 4. VERIFY files exist as specified
104
+ 5. ONLY THEN claim "complete" WITH evidence
105
+ ```
106
+
107
+ ## Anti-Rationalization
108
+
109
+ | Excuse | Reality |
110
+ |--------|---------|
111
+ | "It compiles, so it works" | Compiling is not testing. Run the tests. |
112
+ | "I'll add tests later" | Later never comes. Tests are part of "complete." |
113
+ | "It's just boilerplate" | Boilerplate has typos. Verify. |
114
+ | "The pattern is proven" | Proven patterns with wrong inputs still fail. |
115
+ | "Types are enough validation" | Types catch type errors, not logic errors. Test. |
116
+
95
117
  ## Rules
96
118
  - Follow ARCHITECTURE.md strictly
97
119
  - Modules don't import from each other (use shared/)
@@ -101,6 +123,7 @@ Read `docs/ARCHITECTURE.md`.
101
123
  - Components: Svelte 5 runes, typed $props, < 200 lines
102
124
  - Use Svelte 5 syntax: $state, $derived, $effect, $props, {@render}, snippets
103
125
  - Do NOT use Svelte 4 patterns: export let, $: reactive, createEventDispatcher, <slot>
126
+ - **Verify before claiming complete** — Tests pass = complete
104
127
 
105
128
  ## Output
106
129
 
@@ -1,17 +1,61 @@
1
1
  ---
2
2
  name: doctor
3
- description: "MUST BE USED to investigate bugs, unexpected behavior, console errors, or broken features. Traces through architecture layers to find root causes."
4
- tools: Read, Bash, Glob, Grep
3
+ description: "Use when encountering bugs, unexpected behavior, console errors, or test failures that need systematic investigation."
4
+ tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
6
 
7
- # Doctor
7
+ # Doctor — Systematic 4-Phase Debugging
8
8
 
9
9
  ## Mission
10
- Investigate bugs by tracing through architecture layers. Find root causes, not workarounds.
10
+ Investigate bugs using systematic 4-phase methodology. Never guess — build hypotheses from evidence and prove them before fixing.
11
11
 
12
12
  ## First Action
13
13
  Read `docs/ARCHITECTURE.md` to understand the expected data flow.
14
14
 
15
+ ## 4-Phase Methodology
16
+
17
+ ```
18
+ ┌──────────────────────────────────────────────────────────────────┐
19
+ │ Phase 1 Phase 2 Phase 3 Phase 4 │
20
+ │ ┌─────────┐ ┌──────────┐ ┌───────────┐ ┌───────────┐ │
21
+ │ │ GATHER │ ─► │ ANALYZE │ ─► │ FORMULATE │ ─► │ IMPLEMENT │ │
22
+ │ │ Evidence│ │ Patterns │ │ Hypothesis│ │ & Prove │ │
23
+ │ └─────────┘ └──────────┘ └───────────┘ └───────────┘ │
24
+ └──────────────────────────────────────────────────────────────────┘
25
+ ```
26
+
27
+ ### Phase 1: GATHER EVIDENCE
28
+ - Read the COMPLETE error message and stack trace
29
+ - Reproduce consistently (document exact steps)
30
+ - Identify: Server-side (load function) or client-side (component)?
31
+ - Check recent changes: `git log --oneline -10`
32
+
33
+ **⛔ BLOCKED** until evidence collected.
34
+
35
+ ### Phase 2: ANALYZE PATTERNS
36
+ - Trace execution path: entry → error location
37
+ - Check rune usage ($state, $derived, $effect)
38
+ - Compare with working code
39
+ - Identify: consistent or intermittent? data-dependent?
40
+
41
+ **⛔ BLOCKED** until patterns identified.
42
+
43
+ ### Phase 3: FORMULATE HYPOTHESIS
44
+ - Generate MULTIPLE hypotheses (not just one)
45
+ - Rank by probability
46
+ - Design test for each
47
+
48
+ **⛔ BLOCKED** until hypotheses formulated.
49
+
50
+ ### Phase 4: IMPLEMENT & PROVE
51
+ - Test primary hypothesis
52
+ - If confirmed → Write test that reproduces bug → Fix → Verify
53
+ - If rejected → Test next hypothesis
54
+ - Create checkpoint after fix
55
+
56
+ ### Three-Strike Rule
57
+ After 3 failed hypotheses → Stop and rethink understanding of the system.
58
+
15
59
  ## Core Principles
16
60
 
17
61
  ### Security First (Mandatory)
@@ -114,6 +158,27 @@ grep -rn "export let \|createEventDispatcher\|\$:" src/ --include="*.svelte"
114
158
  - Add proper typing if the bug revealed type gaps
115
159
  - Validate: `npx svelte-check --tsconfig ./tsconfig.json && npx vitest run`
116
160
 
161
+ ## Verification Protocol
162
+
163
+ **Before claiming ANY bug is fixed:**
164
+
165
+ ```
166
+ 1. RUN the test that reproduces the bug
167
+ 2. VERIFY it passes (output must show PASS)
168
+ 3. RUN the full test suite
169
+ 4. VERIFY no regressions (0 failures)
170
+ 5. ONLY THEN claim "bug fixed" WITH evidence
171
+ ```
172
+
173
+ ## Anti-Rationalization
174
+
175
+ | Excuse | Reality |
176
+ |--------|---------|
177
+ | "I see the problem, let me fix it" | Seeing symptoms is not understanding root cause |
178
+ | "Quick fix for now" | Fix root cause. "Quick fixes" compound. |
179
+ | "It's probably X" | "Probably" is not evidence. Prove it. |
180
+ | "The fix is obvious" | Obvious fixes that skip investigation create new bugs. |
181
+
117
182
  ## Rules
118
183
  - Trace before fixing -- understand the full data flow first
119
184
  - Fix at the root layer, not at the symptom layer
@@ -121,6 +186,7 @@ grep -rn "export let \|createEventDispatcher\|\$:" src/ --include="*.svelte"
121
186
  - Add typing if the bug revealed type gaps
122
187
  - If the fix requires architecture changes, report to user first
123
188
  - Check if bug is caused by Svelte 4 -> 5 migration issues (common source of bugs)
189
+ - **Verify before claiming fixed** — Test output is proof
124
190
 
125
191
  ## Output
126
192
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrator
3
- description: "MUST BE USED when migrating legacy code to the target architecture. Use for Svelte 4 -> 5 conversion, SvelteKit 1 -> 2 migration, or full module modernization."
3
+ description: "Use when legacy code needs modernization to the target architecture — components, modules, or full codebase migration."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
6
 
@@ -87,11 +87,33 @@ Read `docs/ARCHITECTURE.md`.
87
87
  - Report remaining issues
88
88
  - Get user approval
89
89
 
90
+ ## Verification Protocol
91
+
92
+ **Before claiming ANY migration phase is complete:**
93
+
94
+ ```
95
+ 1. RUN `npx tsc --noEmit` — No TypeScript errors
96
+ 2. RUN `npm test` — All tests pass
97
+ 3. RUN `npm run build` — Build succeeds
98
+ 4. VERIFY migrated code matches target architecture
99
+ 5. ONLY THEN claim "phase complete" WITH evidence
100
+ ```
101
+
102
+ ## Anti-Rationalization
103
+
104
+ | Excuse | Reality |
105
+ |--------|---------|
106
+ | "Old tests still pass" | Old tests may not cover new patterns. Add new tests. |
107
+ | "It looks correct" | Looking is not running. Verify with commands. |
108
+ | "Partial migration is fine" | Partial migration = two patterns = confusion. Complete it. |
109
+ | "I'll fix the edge cases later" | Edge cases in migration = production bugs. Fix now. |
110
+
90
111
  ### Rules
91
112
  - Order matters: bottom-up (types -> services -> state -> components)
92
113
  - Validate build/svelte-check after each phase
93
114
  - One module at a time
94
115
  - Ask user approval between phases
116
+ - **Verify each phase** — Partial migration is worse than none
95
117
 
96
118
  ---
97
119
 
@@ -149,6 +171,7 @@ Read `docs/ARCHITECTURE.md`.
149
171
  - If API changes, update all consumers
150
172
  - One component per commit
151
173
  - Report bugs found during migration (don't silently fix)
174
+ - **Verify each phase** — Partial migration is worse than none
152
175
 
153
176
  ## Output
154
177
 
@@ -1,17 +1,54 @@
1
1
  ---
2
2
  name: reviewer
3
- description: "MUST BE USED to review code, check architecture conformance, explore modules, or analyze performance. Use PROACTIVELY before merging PRs."
3
+ description: "Use when code changes need review before merge — validates architecture conformance, code quality, and spec compliance."
4
4
  tools: Read, Bash, Glob, Grep
5
5
  ---
6
6
 
7
- # Reviewer
7
+ # Reviewer — Unified 3-in-1 Review
8
8
 
9
9
  ## Mission
10
- Analyze code against `docs/ARCHITECTURE.md`. Detect the scope from the user's request.
10
+ Analyze code against `docs/ARCHITECTURE.md` with unified 3-in-1 review: Spec Compliance + Code Quality + Architecture Fit in a single pass. 50% more efficient than separate reviews.
11
11
 
12
12
  ## First Action
13
13
  Read `docs/ARCHITECTURE.md`.
14
14
 
15
+ ## Unified 3-in-1 Review System
16
+
17
+ Unlike competitors that use separate agents for spec review and code review (doubling token cost), we perform everything in ONE pass:
18
+
19
+ ```
20
+ ┌─────────────────────────────────────────────────────────────────┐
21
+ │ UNIFIED 3-IN-1 REVIEW │
22
+ ├─────────────────┬─────────────────┬─────────────────────────────┤
23
+ │ Spec Compliance │ Code Quality │ Architecture Fit │
24
+ │ ────────────────│─────────────────│─────────────────────────────│
25
+ │ • Requirements │ • Clean code │ • Follows ARCHITECTURE.md │
26
+ │ • No extras │ • No smells │ • Svelte 5 runes correct │
27
+ │ • Acceptance │ • Tests exist │ • Load functions proper │
28
+ │ criteria │ • Types correct │ • Naming conventions │
29
+ └─────────────────┴─────────────────┴─────────────────────────────┘
30
+ ```
31
+
32
+ ### 1. Spec Compliance Check
33
+ - [ ] Implements ALL specified requirements?
34
+ - [ ] Does NOT add features not requested?
35
+ - [ ] Meets acceptance criteria from the plan?
36
+ - [ ] Edge cases from spec handled?
37
+
38
+ ### 2. Code Quality Check
39
+ - [ ] Clean, readable code?
40
+ - [ ] No code smells (long methods, deep nesting)?
41
+ - [ ] Proper error handling?
42
+ - [ ] Tests cover critical paths?
43
+ - [ ] TypeScript strict mode compliant?
44
+
45
+ ### 3. Architecture Fit Check
46
+ - [ ] Follows ARCHITECTURE.md patterns?
47
+ - [ ] Uses Svelte 5 runes correctly ($state, $derived, $effect)?
48
+ - [ ] Load functions used for server data?
49
+ - [ ] No circular imports?
50
+ - [ ] Naming follows conventions?
51
+
15
52
  ## Core Principles
16
53
 
17
54
  ### Security First (Mandatory)
@@ -139,6 +176,59 @@ grep -rn "let .* = \(null\|false\|true\|0\|''\|{}\|\[\]\)" src/lib/modules/ --in
139
176
  4. Rendering: find unnecessary $effect usage, large {#each} without keyed blocks, expensive $derived computations
140
177
  5. Report bottlenecks sorted by user impact
141
178
 
179
+ ## Anti-Sycophancy Protocol
180
+
181
+ ### For the Reviewer (Giving Feedback)
182
+
183
+ Never soften critical feedback. Bad code is bad code.
184
+
185
+ ```
186
+ WRONG: "This looks great! Just a small suggestion..."
187
+ RIGHT: "This has a security vulnerability at line 42. Fix required."
188
+
189
+ WRONG: "You might consider..."
190
+ RIGHT: "This violates ARCHITECTURE.md. Change required."
191
+
192
+ WRONG: "This is a minor thing but..."
193
+ RIGHT: "This will cause a production bug. Blocking."
194
+ ```
195
+
196
+ ### For the Reviewed Agent (Receiving Feedback)
197
+
198
+ When another agent receives review feedback:
199
+
200
+ ```
201
+ 1. EVALUATE technically — Is the feedback correct?
202
+ 2. CHECK against ARCHITECTURE.md — Does it align?
203
+ 3. YAGNI test — Is the suggestion actually needed?
204
+ - Does it solve a real problem?
205
+ - Or is it speculative improvement?
206
+ 4. IF valid → Implement the fix
207
+ 5. IF invalid → Push back with EVIDENCE:
208
+ "This suggestion conflicts with [specific pattern] because [reason]"
209
+ ```
210
+
211
+ ### YAGNI Checklist for Review Suggestions
212
+
213
+ Before accepting a reviewer suggestion:
214
+
215
+ | Question | If NO → |
216
+ |----------|---------|
217
+ | Does it fix a real bug? | Consider rejecting |
218
+ | Does ARCHITECTURE.md require it? | Consider rejecting |
219
+ | Will it break without this change? | Consider rejecting |
220
+ | Does the spec require it? | Consider rejecting |
221
+
222
+ ### Forbidden Phrases in Reviews
223
+
224
+ | Phrase | Problem |
225
+ |--------|---------|
226
+ | "Looks good to me!" | Non-specific. What looks good? |
227
+ | "LGTM" | Lazy. Explain what you verified. |
228
+ | "Just a few nits" | Either it matters or it doesn't. |
229
+ | "You're absolutely right" | Sycophancy. Evaluate technically. |
230
+ | "Great job overall" | Empty praise. Cite specifics. |
231
+
142
232
  ## Rules
143
233
  - Read-only. Never modify files.
144
234
  - Always include positive highlights — good code deserves recognition.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: builder
3
- description: "MUST BE USED when creating new modules, components, services, stores, or tests. Use PROACTIVELY when the user wants to build any new code."
3
+ description: "Use when creating new modules, components, services, hooks, or pages in an existing project."
4
4
  model: haiku
5
5
  tools: Read, Write, Edit, Glob, Grep
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: doctor
3
- description: "MUST BE USED to investigate bugs, unexpected behavior, console errors, or broken features. Traces through architecture layers to find root causes."
3
+ description: "Use when encountering bugs, unexpected behavior, console errors, or test failures that need systematic investigation."
4
4
  model: haiku
5
5
  tools: Read, Glob, Grep
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migrator
3
- description: "MUST BE USED when migrating legacy code to the target architecture. Use for Svelte 4 -> 5 conversion, SvelteKit 1 -> 2 migration, or full module modernization."
3
+ description: "Use when legacy code needs modernization to the target architecture — components, modules, or full codebase migration."
4
4
  model: haiku
5
5
  tools: Read, Write, Edit, Glob, Grep
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: reviewer
3
- description: "MUST BE USED to review code, check architecture conformance, explore modules, or analyze performance. Use PROACTIVELY before merging PRs."
3
+ description: "Use when code changes need review before merge — validates architecture conformance, code quality, and spec compliance."
4
4
  model: haiku
5
5
  tools: Read, Glob, Grep
6
6
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-create-component
3
- description: "Create a Svelte component with Svelte 5 runes following ARCHITECTURE.md"
3
+ description: "Use when adding a new UI component to an existing module — handles templates, props, and test scaffolding."
4
4
  user-invocable: true
5
5
  argument-hint: "[ComponentName]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-create-module
3
- description: "Create a new complete feature module with CRUD following ARCHITECTURE.md"
3
+ description: "Use when creating a new feature module with all layers — service, adapter, types, state, components, and tests."
4
4
  user-invocable: true
5
5
  argument-hint: "[module-name]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-create-service
3
- description: "Create the complete data layer (types + adapter + service) for a resource"
3
+ description: "Use when adding API integration to a module — creates types, contracts, adapter, and service layer."
4
4
  user-invocable: true
5
5
  argument-hint: "[resource-name]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-create-store
3
- description: "Create a Svelte store (writable/readable or rune-based class) following ARCHITECTURE.md"
3
+ description: "Use when adding state management to a module — creates Svelte store with server state integration."
4
4
  user-invocable: true
5
5
  argument-hint: "[store-name]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-create-test
3
- description: "Create tests for adapters, stores, or components using Vitest and @testing-library/svelte"
3
+ description: "Use when a module needs test coverage — creates tests for adapters, hooks/composables/stores, and components."
4
4
  user-invocable: true
5
5
  argument-hint: "[file-path]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dev-generate-types
3
- description: "Generate types, contracts and adapter from an API endpoint or JSON example"
3
+ description: "Use when integrating with an API endpoint and need TypeScript types, contracts, and adapters generated automatically."
4
4
  user-invocable: true
5
5
  argument-hint: "[endpoint-or-json]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docs-onboard
3
- description: "Create a quick module summary for onboarding new developers"
3
+ description: "Use when onboarding onto a module and need a quick summary of its structure, patterns, and key files."
4
4
  user-invocable: true
5
5
  argument-hint: "[module-name]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-migrate-component
3
- description: "Migrate a Svelte component from Svelte 4 to Svelte 5 runes"
3
+ description: "Use when a component needs migration to the target architecture or framework version."
4
4
  user-invocable: true
5
5
  argument-hint: "[component-file]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: migration-migrate-module
3
- description: "Migrate an entire module to the target architecture in 6 phases"
3
+ description: "Use when a complete module needs migration to the target architecture — runs 6 phases with approval gates."
4
4
  user-invocable: true
5
5
  argument-hint: "[module-path]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-check-architecture
3
- description: "Validate project conformance against ARCHITECTURE.md with automated checks"
3
+ description: "Use when checking if code follows ARCHITECTURE.md patterns — runs automated conformance checks."
4
4
  user-invocable: true
5
5
  argument-hint: "[module]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-fix-violations
3
- description: "Find and auto-fix ARCHITECTURE.md violations in a module"
3
+ description: "Use when architecture violations were found and need automated fixing by priority."
4
4
  user-invocable: true
5
5
  argument-hint: "[module]"
6
6
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: review-review
3
- description: "Perform a full code review validating against ARCHITECTURE.md"
3
+ description: "Use when code changes need review before merge — validates architecture, types, security, and test coverage."
4
4
  user-invocable: true
5
5
  argument-hint: "[scope]"
6
6
  allowed-tools: Read, Bash, Glob, Grep
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: builder
3
- description: "MUST BE USED when creating new modules, components, services, composables, or tests. Use PROACTIVELY when the user wants to build any new code."
3
+ description: "Use when creating new modules, components, services, hooks, or pages in an existing project."
4
4
  tools: Read, Write, Edit, Bash, Glob, Grep
5
5
  ---
6
6
 
@@ -89,6 +89,28 @@ Read `docs/ARCHITECTURE.md`.
89
89
  3. Create in `__tests__/[OriginalName].spec.ts`
90
90
  4. Run: `npx vitest run [file]`
91
91
 
92
+ ## Verification Protocol
93
+
94
+ **Before claiming ANY module/component is complete:**
95
+
96
+ ```
97
+ 1. RUN `npx tsc --noEmit` — No TypeScript errors
98
+ 2. RUN `npm test` — All tests pass
99
+ 3. RUN `npm run lint` — No lint errors
100
+ 4. VERIFY files exist as specified
101
+ 5. ONLY THEN claim "complete" WITH evidence
102
+ ```
103
+
104
+ ## Anti-Rationalization
105
+
106
+ | Excuse | Reality |
107
+ |--------|---------|
108
+ | "It compiles, so it works" | Compiling is not testing. Run the tests. |
109
+ | "I'll add tests later" | Later never comes. Tests are part of "complete." |
110
+ | "It's just boilerplate" | Boilerplate has typos. Verify. |
111
+ | "The pattern is proven" | Proven patterns with wrong inputs still fail. |
112
+ | "Types are enough validation" | Types catch type errors, not logic errors. Test. |
113
+
92
114
  ## Rules
93
115
  - Follow ARCHITECTURE.md strictly
94
116
  - Modules don't import from each other (use shared/)
@@ -96,6 +118,7 @@ Read `docs/ARCHITECTURE.md`.
96
118
  - Services: no try/catch, no transformation
97
119
  - Adapters: pure functions, no side effects
98
120
  - Components: script setup, typed props/emits, < 200 lines
121
+ - **Verify before claiming complete** — Tests pass = complete
99
122
 
100
123
  ## Output
101
124