specialist-agent 2.9.0 → 2.11.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 (111) hide show
  1. package/.claude-plugin/marketplace.json +5 -5
  2. package/.claude-plugin/plugin.json +2 -2
  3. package/.cursor-plugin/marketplace.json +1 -1
  4. package/.cursor-plugin/plugin.json +2 -2
  5. package/.opencode/INSTALL.md +74 -79
  6. package/.opencode/opencode.json +141 -0
  7. package/README.md +128 -250
  8. package/agents/analyst.md +1 -0
  9. package/agents/api.md +4 -4
  10. package/agents/architect-lite.md +2 -2
  11. package/agents/architect.md +29 -20
  12. package/agents/cloud-lite.md +1 -1
  13. package/agents/cloud.md +4 -4
  14. package/agents/data-lite.md +1 -1
  15. package/agents/data.md +4 -4
  16. package/agents/debugger.md +1 -0
  17. package/agents/deps.md +4 -4
  18. package/agents/designer-lite.md +1 -1
  19. package/agents/designer.md +4 -4
  20. package/agents/devops-lite.md +1 -1
  21. package/agents/devops.md +4 -4
  22. package/agents/docs.md +4 -4
  23. package/agents/executor.md +95 -0
  24. package/agents/explorer-lite.md +1 -1
  25. package/agents/explorer.md +4 -4
  26. package/agents/finance-lite.md +1 -1
  27. package/agents/finance.md +4 -4
  28. package/agents/i18n.md +4 -4
  29. package/agents/legal-lite.md +1 -1
  30. package/agents/legal.md +4 -4
  31. package/agents/marketing-lite.md +25 -0
  32. package/agents/marketing.md +179 -0
  33. package/agents/memory.md +13 -12
  34. package/agents/orchestrator.md +102 -0
  35. package/agents/pair.md +1 -0
  36. package/agents/perf.md +4 -4
  37. package/agents/planner.md +1 -0
  38. package/agents/product-lite.md +25 -0
  39. package/agents/product.md +186 -0
  40. package/agents/refactor.md +4 -4
  41. package/agents/ripple.md +1 -0
  42. package/agents/scout.md +1 -0
  43. package/agents/security-lite.md +1 -1
  44. package/agents/security.md +4 -4
  45. package/agents/sentry-triage-lite.md +54 -0
  46. package/agents/sentry-triage.md +214 -0
  47. package/agents/starter-lite.md +4 -4
  48. package/agents/starter.md +8 -8
  49. package/agents/support-lite.md +24 -0
  50. package/agents/support.md +190 -0
  51. package/agents/tdd.md +1 -0
  52. package/agents/tester-lite.md +1 -1
  53. package/agents/tester.md +43 -10
  54. package/cli/architectures.mjs +713 -0
  55. package/cli/detect-architecture.mjs +752 -0
  56. package/cli/generate-architecture.mjs +1096 -0
  57. package/cli/index.mjs +681 -179
  58. package/cli/recommend-architecture.mjs +870 -0
  59. package/hooks/native/auto-dispatch.mjs +22 -23
  60. package/hooks/native/auto-format.mjs +5 -25
  61. package/hooks/native/mcp-discovery.mjs +168 -0
  62. package/hooks/native/security-config.json +7 -0
  63. package/hooks/native/security-guard.mjs +77 -27
  64. package/hooks/native/session-context.mjs +61 -18
  65. package/hooks/native/settings-template.json +9 -0
  66. package/package.json +1 -1
  67. package/packs/angular/agents/builder.md +10 -54
  68. package/packs/angular/agents/doctor.md +7 -61
  69. package/packs/angular/agents/migrator.md +7 -101
  70. package/packs/angular/agents/reviewer.md +22 -33
  71. package/packs/angular/skills/review-check-architecture/SKILL.md +7 -7
  72. package/packs/angular/skills/review-review/SKILL.md +1 -0
  73. package/packs/astro/agents/builder.md +10 -79
  74. package/packs/astro/agents/doctor.md +7 -61
  75. package/packs/astro/agents/migrator.md +7 -111
  76. package/packs/astro/agents/reviewer.md +22 -32
  77. package/packs/astro/skills/review-check-architecture/SKILL.md +9 -9
  78. package/packs/astro/skills/review-review/SKILL.md +1 -0
  79. package/packs/nextjs/agents/builder.md +11 -108
  80. package/packs/nextjs/agents/doctor.md +7 -62
  81. package/packs/nextjs/agents/migrator.md +6 -194
  82. package/packs/nextjs/agents/reviewer.md +22 -76
  83. package/packs/nextjs/skills/review-check-architecture/SKILL.md +15 -15
  84. package/packs/nextjs/skills/review-review/SKILL.md +1 -0
  85. package/packs/nuxt/agents/builder.md +10 -55
  86. package/packs/nuxt/agents/doctor.md +7 -61
  87. package/packs/nuxt/agents/migrator.md +7 -109
  88. package/packs/nuxt/agents/reviewer.md +22 -42
  89. package/packs/nuxt/skills/review-check-architecture/SKILL.md +11 -11
  90. package/packs/nuxt/skills/review-review/SKILL.md +1 -0
  91. package/packs/react/agents/builder.md +10 -55
  92. package/packs/react/agents/doctor.md +7 -61
  93. package/packs/react/agents/migrator.md +7 -106
  94. package/packs/react/agents/reviewer.md +22 -55
  95. package/packs/react/skills/review-check-architecture/SKILL.md +10 -10
  96. package/packs/react/skills/review-review/SKILL.md +1 -0
  97. package/packs/svelte/agents/builder.md +10 -58
  98. package/packs/svelte/agents/doctor.md +7 -60
  99. package/packs/svelte/agents/migrator.md +7 -118
  100. package/packs/svelte/agents/reviewer.md +22 -42
  101. package/packs/svelte/skills/review-check-architecture/SKILL.md +12 -12
  102. package/packs/svelte/skills/review-review/SKILL.md +1 -0
  103. package/packs/vue/agents/builder.md +10 -55
  104. package/packs/vue/agents/doctor.md +7 -61
  105. package/packs/vue/agents/migrator.md +7 -93
  106. package/packs/vue/agents/reviewer.md +20 -32
  107. package/packs/vue/skills/review-check-architecture/SKILL.md +10 -10
  108. package/packs/vue/skills/review-review/SKILL.md +1 -0
  109. package/skills/autofix/SKILL.md +166 -0
  110. package/skills/discovery/SKILL.md +218 -0
  111. package/skills/migrate-architecture/SKILL.md +242 -0
@@ -14,28 +14,11 @@ Read `docs/ARCHITECTURE.md`.
14
14
 
15
15
  ## Core Principles
16
16
 
17
- ### Security First (Mandatory)
18
- - NEVER trust user input - validate and sanitize ALL inputs on server side
19
- - ALWAYS use parameterized queries - never string concatenation for SQL/NoSQL
20
- - NEVER expose sensitive data (tokens, passwords, PII) in logs, URLs, or error messages
21
- - ALWAYS implement rate limiting on public endpoints
22
- - Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
23
- - Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
24
- - Secrets in environment variables only - never hardcode
25
-
26
- ### Performance First (Mandatory)
27
- - ALWAYS use useFetch/useAsyncData for server state with built-in caching
28
- - Set appropriate `watch` triggers and `key` for reactive data refetching
29
- - Use `lazy: true` for non-critical data to avoid blocking navigation
30
- - Use `getCachedData` option for custom caching strategies
31
- - Use proper cache invalidation (`refreshNuxtData`) - stale UI is a bug
32
- - Lazy load components with `<LazyComponent>` prefix (auto-generated by Nuxt)
33
- - Avoid N+1 queries - batch requests, use proper data loading patterns
34
-
35
- ### Code Language (Mandatory)
36
- - ALWAYS write code (variables, functions, comments, commits) in English
37
- - Only use other languages if explicitly requested by the user
38
- - User-facing text (UI labels, messages) should match project's i18n strategy
17
+ Refer to the pack CLAUDE.md for full stack details and key patterns.
18
+
19
+ - **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
20
+ - **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
21
+ - **Code Language**: All code in English. User-facing text follows project i18n strategy
39
22
 
40
23
  ## Scope Detection
41
24
  - **Module**: user wants to migrate an entire module/directory -> Module mode (6 phases)
@@ -44,49 +27,7 @@ Read `docs/ARCHITECTURE.md`.
44
27
  ---
45
28
 
46
29
  ## Module Mode (6 Phases)
47
-
48
- ### Phase 0: Analysis
49
- - Map current state: count files, identify Options vs setup, JS vs TS, Vuex, @nuxtjs/ modules, cross-module imports
50
- - List API endpoints used (asyncData, fetch, $axios calls)
51
- - Report to user before proceeding
52
-
53
- ### Phase 1: Structure
54
- - Create target directories: components/, composables/, services/, adapters/, types/, __tests__/
55
- - Move existing files to correct locations
56
- - Validate: `nuxi build`
57
-
58
- ### Phase 2: Types & Adapters
59
- - Create `.types.ts` (exact API response, snake_case)
60
- - Create `.contracts.ts` (app contract, camelCase)
61
- - Create adapter with bidirectional parsing
62
- - Validate: `nuxi typecheck`
63
-
64
- ### Phase 3: Services
65
- - Extract HTTP calls to pure service using $fetch (no try/catch, no transformation)
66
- - Replace `$axios` / `@nuxtjs/axios` with `$fetch`
67
- - One file per resource
68
- - Validate: `nuxi build`
69
-
70
- ### Phase 4: State
71
- - Server state -> `useAsyncData` / `useFetch` (composables)
72
- - Simple client state -> `useState` (SSR-safe)
73
- - Complex client state -> Pinia (setup syntax, readonly, storeToRefs)
74
- - Remove Vuex store modules
75
- - Validate: `nuxi build`
76
-
77
- ### Phase 5: Components
78
- - Convert each component to `<script setup lang="ts">`
79
- - Type all props and emits
80
- - Replace explicit imports with auto-imports
81
- - Extract mixins to composables
82
- - Eliminate prop drilling (slots + provide/inject)
83
- - Decompose if > 200 lines
84
- - Validate after each component
85
-
86
- ### Phase 6: Review
87
- - Run pattern checks (same as @reviewer review mode)
88
- - Report remaining issues
89
- - Get user approval
30
+ Run `/migration-migrate-module $PATH`. This skill contains the full 6-phase migration workflow -- do NOT duplicate it here.
90
31
 
91
32
  ## Verification Protocol
92
33
 
@@ -119,50 +60,7 @@ Read `docs/ARCHITECTURE.md`.
119
60
  ---
120
61
 
121
62
  ## Component Mode
122
-
123
- ### Nuxt 2 -> 3 Conversion Table
124
- | Nuxt 2 | Nuxt 3 |
125
- |--------|--------|
126
- | `asyncData()` | `useAsyncData()` |
127
- | `fetch()` | `useFetch()` |
128
- | `$axios` | `$fetch` |
129
- | `this.$route` | `useRoute()` |
130
- | `this.$router` | `useRouter()` |
131
- | `this.$store` | `useState()` / Pinia |
132
- | `this.$refs` | `useTemplateRef()` |
133
- | `props` | `defineProps<T>()` |
134
- | `emits` | `defineEmits<T>()` |
135
- | `data()` | `ref()` / `reactive()` |
136
- | `computed` | `computed()` |
137
- | `methods` | functions |
138
- | `watch` | `watch()` / `watchEffect()` |
139
- | mixins | composables |
140
- | `this.$emit` | `emit()` |
141
- | `nuxtServerInit` | `server/plugins/` |
142
- | `middleware (context)` | `middleware (to, from)` + `navigateTo()` |
143
- | `plugins (context, inject)` | `plugins` + `defineNuxtPlugin()` |
144
-
145
- ### Workflow
146
- 1. Read the component and list: props, emits, data, computed, methods, watchers, mixins, lifecycle hooks, asyncData/fetch usage
147
- 2. Map consumers (who uses this component) - note if props/emits API changes
148
- 3. Convert to `<script setup lang="ts">`
149
- 4. Type all props and emits
150
- 5. Replace asyncData/fetch with useAsyncData/useFetch
151
- 6. Replace $axios with $fetch
152
- 7. Replace Vuex access with useState/Pinia
153
- 8. Remove explicit imports (use auto-imports)
154
- 9. Extract mixins to composables in same module
155
- 10. Eliminate prop drilling if found
156
- 11. Decompose if > 200 lines
157
- 12. Validate: `nuxi typecheck`
158
- 13. Update consumers if API changed
159
-
160
- ### Rules
161
- - Keep public API (props/emits/slots) stable when possible
162
- - If API changes, update all consumers
163
- - One component per commit
164
- - Report bugs found during migration (don't silently fix)
165
- - **Verify each phase** - Partial migration is worse than none
63
+ Run `/migration-migrate-component $FILE`. This skill contains the full component migration workflow -- do NOT duplicate it here.
166
64
 
167
65
  ## Output
168
66
 
@@ -52,28 +52,11 @@ Unlike competitors that use separate agents for spec review and code review (dou
52
52
 
53
53
  ## Core Principles
54
54
 
55
- ### Security First (Mandatory)
56
- - NEVER trust user input - validate and sanitize ALL inputs on server side
57
- - ALWAYS use parameterized queries - never string concatenation for SQL/NoSQL
58
- - NEVER expose sensitive data (tokens, passwords, PII) in logs, URLs, or error messages
59
- - ALWAYS implement rate limiting on public endpoints
60
- - Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
61
- - Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
62
- - Secrets in environment variables only - never hardcode
63
-
64
- ### Performance First (Mandatory)
65
- - ALWAYS use useFetch/useAsyncData for server state with built-in caching
66
- - Set appropriate `watch` triggers and `key` for reactive data refetching
67
- - Use `lazy: true` for non-critical data to avoid blocking navigation
68
- - Use `getCachedData` option for custom caching strategies
69
- - Use proper cache invalidation (`refreshNuxtData`) - stale UI is a bug
70
- - Lazy load components with `<LazyComponent>` prefix (auto-generated by Nuxt)
71
- - Avoid N+1 queries - batch requests, use proper data loading patterns
72
-
73
- ### Code Language (Mandatory)
74
- - ALWAYS write code (variables, functions, comments, commits) in English
75
- - Only use other languages if explicitly requested by the user
76
- - User-facing text (UI labels, messages) should match project's i18n strategy
55
+ Refer to the pack CLAUDE.md for full stack details and key patterns.
56
+
57
+ - **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
58
+ - **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
59
+ - **Code Language**: All code in English. User-facing text follows project i18n strategy
77
60
 
78
61
  ## Scope Detection
79
62
  - **Review**: user wants code review, PR validation, or violation fixing -> Review mode
@@ -93,26 +76,9 @@ npx vitest run --passWithNoTests
93
76
  ```
94
77
 
95
78
  ### 2. Pattern Checks
96
- ```bash
97
- # Explicit imports where auto-import exists
98
- grep -rn "from 'vue'" composables/ components/ pages/ --include="*.vue" --include="*.ts" 2>/dev/null && echo "VIOLATION: explicit Vue imports (use auto-imports)"
99
- # try/catch in services
100
- grep -rn "try {" modules/*/services/ --include="*.ts" 2>/dev/null && echo "VIOLATION: try/catch in service"
101
- # Transformation in services
102
- grep -rn "\.map(\|new Date" modules/*/services/ --include="*.ts" 2>/dev/null && echo "VIOLATION: transformation in service"
103
- # Missing script setup
104
- grep -rL "script setup" modules/*/components/*.vue pages/*.vue 2>/dev/null && echo "VIOLATION: missing script setup"
105
- # Options API
106
- grep -rn "defineComponent\|export default {" modules/ --include="*.vue" 2>/dev/null && echo "VIOLATION: Options API"
107
- # any types
108
- grep -rn ": any\|as any" modules/ --include="*.ts" --include="*.vue" 2>/dev/null && echo "WARNING: any types"
109
- # Debug artifacts
110
- grep -rn "console\.\|debugger" modules/ --include="*.ts" --include="*.vue" 2>/dev/null && echo "WARNING: debug artifacts"
111
- # v-html
112
- grep -rn "v-html" --include="*.vue" 2>/dev/null && echo "VIOLATION: v-html"
113
- # useState vs Pinia misuse (server state in Pinia)
114
- grep -rn "\$fetch\|useFetch\|useAsyncData" modules/*/stores/ --include="*.ts" 2>/dev/null && echo "VIOLATION: server state in Pinia store"
115
- ```
79
+ Run `/review-check-architecture $SCOPE` and include the results in the review.
80
+ This skill contains all framework-specific automated checks
81
+ -- do NOT duplicate them here.
116
82
 
117
83
  ### 3. Manual Review
118
84
  - Services: HTTP only using $fetch, no try/catch, no transformation
@@ -193,6 +159,20 @@ grep -rn "\$fetch\|useFetch\|useAsyncData" modules/*/stores/ --include="*.ts" 2>
193
159
  5. Rendering: find deep watchers (`{ deep: true }`), inline objects in templates, heavy computed
194
160
  6. Report bottlenecks sorted by user impact
195
161
 
162
+ ## Automatic Fail Triggers
163
+
164
+ The following conditions result in an **AUTOMATIC FAIL** verdict -- no exceptions:
165
+
166
+ | Trigger | Why |
167
+ |---------|-----|
168
+ | "Zero issues found" | Every codebase has improvement areas. Zero findings = insufficient review. |
169
+ | "LGTM" or "Looks good to me" without specifics | Lazy. Explain what you verified and how. |
170
+ | Approval without running `tsc`, `eslint`, `build`, or `tests` | No automated check output = no review. |
171
+ | "Minor issues only" when violations exist | A violation is blocking. Do not minimize. |
172
+ | Praising code that violates ARCHITECTURE.md | Architecture compliance is non-negotiable. |
173
+ | Reviewing without reading ARCHITECTURE.md first | Context-free review is worthless. |
174
+ | Approving code with `any` types in business logic | Type safety is not optional. |
175
+
196
176
  ## Anti-Sycophancy Protocol
197
177
 
198
178
  ### For the Reviewer (Giving Feedback)
@@ -16,25 +16,25 @@ Run all checks and report a summary:
16
16
 
17
17
  ```bash
18
18
  echo "=== 1. Services with try/catch ==="
19
- grep -rn "try {" modules/*/services/ --include="*.ts" 2>/dev/null || echo "None found"
19
+ grep -rn "try {" modules/*/services/ --include="*.ts" 2>/dev/null || echo "PASS: None"
20
20
 
21
21
  echo "=== 2. Services with transformation ==="
22
- grep -rn "\.map(\|\.filter(\|new Date\|\.reduce(" modules/*/services/ --include="*.ts" 2>/dev/null || echo "None found"
22
+ grep -rn "\.map(\|\.filter(\|new Date\|\.reduce(" modules/*/services/ --include="*.ts" 2>/dev/null || echo "PASS: None"
23
23
 
24
24
  echo "=== 3. Components without script setup ==="
25
- grep -rL "script setup" modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "All ok"
25
+ grep -rL "script setup" modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "PASS: All ok"
26
26
 
27
27
  echo "=== 4. Components without TypeScript ==="
28
- grep -rL 'lang="ts"' modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "All ok"
28
+ grep -rL 'lang="ts"' modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "PASS: All ok"
29
29
 
30
30
  echo "=== 5. Options API ==="
31
- grep -rn "defineComponent\|export default {" modules/ pages/ --include="*.vue" 2>/dev/null || echo "None found"
31
+ grep -rn "defineComponent\|export default {" modules/ pages/ --include="*.vue" 2>/dev/null || echo "PASS: None"
32
32
 
33
33
  echo "=== 6. Explicit Vue imports (should use auto-imports) ==="
34
- grep -rn "from 'vue'" composables/ components/ pages/ --include="*.vue" --include="*.ts" 2>/dev/null || echo "None found"
34
+ grep -rn "from 'vue'" composables/ components/ pages/ --include="*.vue" --include="*.ts" 2>/dev/null || echo "PASS: None"
35
35
 
36
36
  echo "=== 7. Server state in Pinia ==="
37
- grep -rn "\$fetch\|useFetch\|useAsyncData" modules/*/stores/ --include="*.ts" 2>/dev/null || echo "None found"
37
+ grep -rn "\$fetch\|useFetch\|useAsyncData" modules/*/stores/ --include="*.ts" 2>/dev/null || echo "PASS: None"
38
38
 
39
39
  echo "=== 8. any types ==="
40
40
  grep -rn ": any\| any;\|as any\|<any>" modules/ --include="*.ts" --include="*.vue" 2>/dev/null | wc -l
@@ -46,26 +46,26 @@ for module in modules/*/; do
46
46
  done
47
47
 
48
48
  echo "=== 10. v-html ==="
49
- grep -rn "v-html" --include="*.vue" 2>/dev/null || echo "None found"
49
+ grep -rn "v-html" --include="*.vue" 2>/dev/null || echo "PASS: None"
50
50
 
51
51
  echo "=== 11. Debug artifacts ==="
52
52
  grep -rn "console\.\|debugger" modules/ --include="*.ts" --include="*.vue" 2>/dev/null | wc -l
53
53
 
54
54
  echo "=== 12. Server routes without Zod validation ==="
55
- grep -rL "readValidatedBody\|getValidatedQuery\|getValidatedRouterParams" server/api/**/*.ts 2>/dev/null || echo "All ok"
55
+ grep -rL "readValidatedBody\|getValidatedQuery\|getValidatedRouterParams" server/api/**/*.ts 2>/dev/null || echo "PASS: All ok"
56
56
 
57
57
  echo "=== 13. Components > 200 lines ==="
58
58
  find modules pages components -name "*.vue" -exec sh -c 'lines=$(wc -l < "$1"); [ "$lines" -gt 200 ] && echo "$1: $lines lines"' _ {} \; 2>/dev/null
59
59
 
60
60
  echo "=== 14. Nuxt 2 patterns ==="
61
- grep -rn "asyncData\|nuxtServerInit\|\$axios\|this\.\$store\|this\.\$route\|this\.\$router" --include="*.vue" --include="*.ts" 2>/dev/null || echo "None found"
61
+ grep -rn "asyncData\|nuxtServerInit\|\$axios\|this\.\$store\|this\.\$route\|this\.\$router" --include="*.vue" --include="*.ts" 2>/dev/null || echo "PASS: None"
62
62
  ```
63
63
 
64
64
  Produce a summary table:
65
65
 
66
66
  | Check | Status | Occurrences |
67
67
  |-------|--------|-------------|
68
- | Services without try/catch | OK/FAIL | X |
68
+ | Services without try/catch | PASS/FAIL | X |
69
69
  | ... | ... | ... |
70
70
 
71
71
  Overall score: X/14 checks passing.
@@ -24,6 +24,7 @@ npx eslint . --max-warnings 0
24
24
  npx vitest run --passWithNoTests
25
25
  ```
26
26
 
27
+ 2b. Run `/review-check-architecture $SCOPE` for automated pattern validation.
27
28
  3. Check ARCHITECTURE.md patterns:
28
29
  - Services: no try/catch, no transformation, use $fetch
29
30
  - Adapters: pure functions
@@ -14,28 +14,11 @@ Read `docs/ARCHITECTURE.md`.
14
14
 
15
15
  ## Core Principles
16
16
 
17
- ### Security First (Mandatory)
18
- - NEVER trust user input - validate and sanitize ALL inputs on server side
19
- - ALWAYS use parameterized queries - never string concatenation for SQL/NoSQL
20
- - NEVER expose sensitive data (tokens, passwords, PII) in logs, URLs, or error messages
21
- - ALWAYS implement rate limiting on public endpoints
22
- - Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
23
- - Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
24
- - Secrets in environment variables only - never hardcode
25
-
26
- ### Performance First (Mandatory)
27
- - ALWAYS use TanStack Query (React Query) for server state caching
28
- - Set appropriate `staleTime` and `gcTime` for each query based on data freshness needs
29
- - Use `keepPreviousData` for pagination to avoid loading flickers
30
- - Implement optimistic updates for mutations when UX benefits
31
- - Use proper cache invalidation (`invalidateQueries`) - stale UI is a bug
32
- - Lazy load routes, components, and heavy dependencies
33
- - Avoid N+1 queries - batch requests, use proper data loading patterns
34
-
35
- ### Code Language (Mandatory)
36
- - ALWAYS write code (variables, functions, comments, commits) in English
37
- - Only use other languages if explicitly requested by the user
38
- - User-facing text (UI labels, messages) should match project's i18n strategy
17
+ Refer to the pack CLAUDE.md for full stack details and key patterns.
18
+
19
+ - **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
20
+ - **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
21
+ - **Code Language**: All code in English. User-facing text follows project i18n strategy
39
22
 
40
23
  ## Scope Detection
41
24
  - **Module**: user wants a full feature (CRUD, page, multiple endpoints) -> Module mode
@@ -47,47 +30,19 @@ Read `docs/ARCHITECTURE.md`.
47
30
  ---
48
31
 
49
32
  ## Module Mode
50
- 1. Ask: resource name, endpoints, UI type (list/detail/CRUD), client state needs
51
- 2. Scaffold `src/modules/[kebab-name]/` with: components/, hooks/, services/, adapters/, stores/, types/, pages/, __tests__/, index.ts
52
- 3. Create bottom-up:
53
- - `types/[name].types.ts` -- exact API response (snake_case)
54
- - `types/[name].contracts.ts` -- app contract (camelCase, Date objects)
55
- - `adapters/[name]-adapter.ts` -- pure functions: inbound (API->App) + outbound (App->API)
56
- - `services/[name]-service.ts` -- HTTP only: `{ list, getById, create, update, delete }`. No try/catch, no transformation
57
- - `stores/[name]-store.ts` -- client state only (filters, UI). Zustand create with typed state/actions
58
- - `hooks/useXxxList.ts` -- orchestrate service->adapter->React Query. Set staleTime, queryKey array
59
- - Components -- functional TSX, typed props interface, < 200 lines, useCallback for handlers
60
- - Page -- compose components with children/render props, provide context if needed
61
- 4. Register lazy route in router using React.lazy() + Suspense
62
- 5. Create barrel export (index.ts): pages + contracts only
63
- 6. Validate: `npx tsc --noEmit`
33
+ Run `/dev-create-module $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
64
34
 
65
35
  ## Component Mode
66
- 1. Determine placement: feature -> `src/modules/[feature]/components/`, shared -> `src/shared/components/`
67
- 2. Use functional component template: imports -> Props interface -> destructure props -> stores (selectors) -> hooks -> local state (useState) -> derived (useMemo) -> handlers (useCallback) -> JSX
68
- 3. Rules: < 200 lines, PascalCase.tsx, no prop drilling (use composition/context), handle loading/error/empty states
69
- 4. Extract logic > 20 lines to custom hook
36
+ Run `/dev-create-component $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
70
37
 
71
38
  ## Service Mode
72
- 1. Ask: endpoint URL, HTTP method, response format (ask for JSON example)
73
- 2. Create 4 files:
74
- - `types/[name].types.ts` -- exact API (snake_case, string dates)
75
- - `types/[name].contracts.ts` -- app contract (camelCase, Date, computed booleans)
76
- - `adapters/[name]-adapter.ts` -- pure functions, bidirectional. Rename snake->camel, convert string->Date, cents->currency
77
- - `services/[name]-service.ts` -- HTTP only. No try/catch, no transformation, no logic. Export as object with methods
78
- 3. Validate: `npx tsc --noEmit`
39
+ Run `/dev-create-service $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
79
40
 
80
41
  ## Hook Mode
81
- 1. **Query** (reading): `useQuery` with queryKey array, explicit staleTime, keepPreviousData. Call service in queryFn, pass through adapter. Return typed data
82
- 2. **Mutation** (writing): `useMutation` with invalidateQueries on success. Use adapter for payload. Return { mutate, isPending, error }
83
- 3. **Shared logic** (no API): useState/useMemo/useEffect with typed return
84
- 4. Rules: prefix `use`, return typed values, use service (never direct API), use adapter (never inline transform), always staleTime
42
+ Run `/dev-create-hook $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
85
43
 
86
44
  ## Test Mode
87
- 1. Read the target file
88
- 2. Priority: adapters (pure functions, easy) > hooks (mock service, renderHook) > components (React Testing Library)
89
- 3. Create in `__tests__/[OriginalName].spec.ts(x)`
90
- 4. Run: `npx vitest run [file]`
45
+ Run `/dev-create-test $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
91
46
 
92
47
  ## Verification Protocol
93
48
 
@@ -14,71 +14,17 @@ Read `docs/ARCHITECTURE.md` to understand the expected data flow.
14
14
 
15
15
  ## 4-Phase Methodology
16
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
- - Check recent changes: `git log --oneline -10`
31
- - Search for related code
32
-
33
- **⛔ BLOCKED** until evidence collected.
34
-
35
- ### Phase 2: ANALYZE PATTERNS
36
- - Trace execution path: entry → error location
37
- - Compare with working code
38
- - Identify: consistent or intermittent? data-dependent?
17
+ Follow the @debugger agent's 4-phase protocol: GATHER EVIDENCE → ANALYZE PATTERNS → FORMULATE HYPOTHESIS → IMPLEMENT & PROVE. Each phase has blocking rules -- do NOT skip phases.
39
18
 
40
- **⛔ BLOCKED** until patterns identified.
41
-
42
- ### Phase 3: FORMULATE HYPOTHESIS
43
- - Generate MULTIPLE hypotheses (not just one)
44
- - Rank by probability
45
- - Design test for each
46
-
47
- **⛔ BLOCKED** until hypotheses formulated.
48
-
49
- ### Phase 4: IMPLEMENT & PROVE
50
- - Test primary hypothesis
51
- - If confirmed → Write test that reproduces bug → Fix → Verify
52
- - If rejected → Test next hypothesis
53
- - Create checkpoint after fix
54
-
55
- ### Three-Strike Rule
56
- After 3 failed hypotheses → Stop and rethink understanding of the system.
19
+ Three-Strike Rule: After 3 failed hypotheses, stop and rethink understanding of the system.
57
20
 
58
21
  ## Core Principles
59
22
 
60
- ### Security First (Mandatory)
61
- - NEVER trust user input - validate and sanitize ALL inputs on server side
62
- - ALWAYS use parameterized queries - never string concatenation for SQL/NoSQL
63
- - NEVER expose sensitive data (tokens, passwords, PII) in logs, URLs, or error messages
64
- - ALWAYS implement rate limiting on public endpoints
65
- - Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
66
- - Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
67
- - Secrets in environment variables only - never hardcode
68
-
69
- ### Performance First (Mandatory)
70
- - ALWAYS use TanStack Query (React Query) for server state caching
71
- - Set appropriate `staleTime` and `gcTime` for each query based on data freshness needs
72
- - Use `keepPreviousData` for pagination to avoid loading flickers
73
- - Implement optimistic updates for mutations when UX benefits
74
- - Use proper cache invalidation (`invalidateQueries`) - stale UI is a bug
75
- - Lazy load routes, components, and heavy dependencies
76
- - Avoid N+1 queries - batch requests, use proper data loading patterns
77
-
78
- ### Code Language (Mandatory)
79
- - ALWAYS write code (variables, functions, comments, commits) in English
80
- - Only use other languages if explicitly requested by the user
81
- - User-facing text (UI labels, messages) should match project's i18n strategy
23
+ Refer to the pack CLAUDE.md for full stack details and key patterns.
24
+
25
+ - **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
26
+ - **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
27
+ - **Code Language**: All code in English. User-facing text follows project i18n strategy
82
28
 
83
29
  ## Workflow
84
30
 
@@ -14,28 +14,11 @@ Read `docs/ARCHITECTURE.md`.
14
14
 
15
15
  ## Core Principles
16
16
 
17
- ### Security First (Mandatory)
18
- - NEVER trust user input - validate and sanitize ALL inputs on server side
19
- - ALWAYS use parameterized queries - never string concatenation for SQL/NoSQL
20
- - NEVER expose sensitive data (tokens, passwords, PII) in logs, URLs, or error messages
21
- - ALWAYS implement rate limiting on public endpoints
22
- - Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
23
- - Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
24
- - Secrets in environment variables only - never hardcode
25
-
26
- ### Performance First (Mandatory)
27
- - ALWAYS use TanStack Query (React Query) for server state caching
28
- - Set appropriate `staleTime` and `gcTime` for each query based on data freshness needs
29
- - Use `keepPreviousData` for pagination to avoid loading flickers
30
- - Implement optimistic updates for mutations when UX benefits
31
- - Use proper cache invalidation (`invalidateQueries`) - stale UI is a bug
32
- - Lazy load routes, components, and heavy dependencies
33
- - Avoid N+1 queries - batch requests, use proper data loading patterns
34
-
35
- ### Code Language (Mandatory)
36
- - ALWAYS write code (variables, functions, comments, commits) in English
37
- - Only use other languages if explicitly requested by the user
38
- - User-facing text (UI labels, messages) should match project's i18n strategy
17
+ Refer to the pack CLAUDE.md for full stack details and key patterns.
18
+
19
+ - **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
20
+ - **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
21
+ - **Code Language**: All code in English. User-facing text follows project i18n strategy
39
22
 
40
23
  ## Scope Detection
41
24
  - **Module**: user wants to migrate an entire module/directory -> Module mode (6 phases)
@@ -44,49 +27,7 @@ Read `docs/ARCHITECTURE.md`.
44
27
  ---
45
28
 
46
29
  ## Module Mode (6 Phases)
47
-
48
- ### Phase 0: Analysis
49
- - Map current state: count files, identify class vs functional, JS vs TS, PropTypes, Redux, HOCs, cross-module imports
50
- - List API endpoints used
51
- - Report to user before proceeding
52
-
53
- ### Phase 1: Structure
54
- - Create target directories: components/, hooks/, services/, adapters/, stores/, types/, pages/, __tests__/
55
- - Move existing files to correct locations
56
- - Validate: `npx vite build`
57
-
58
- ### Phase 2: Types & Adapters
59
- - Create `.types.ts` (exact API response, snake_case)
60
- - Create `.contracts.ts` (app contract, camelCase)
61
- - Create adapter with bidirectional parsing
62
- - Validate: `npx tsc --noEmit`
63
-
64
- ### Phase 3: Services
65
- - Extract HTTP calls to pure service (no try/catch, no transformation)
66
- - One file per resource
67
- - Validate: `npx vite build`
68
-
69
- ### Phase 4: State
70
- - Server state -> React Query (hooks with staleTime)
71
- - Client state -> Zustand (typed create, selectors)
72
- - Remove Redux store slices / reducers / actions
73
- - Remove server state from Zustand stores
74
- - Validate: `npx vite build`
75
-
76
- ### Phase 5: Components
77
- - Convert each class component to functional
78
- - Type props via interface (remove PropTypes)
79
- - Extract HOCs to custom hooks
80
- - Extract mixins/shared logic to hooks
81
- - Eliminate prop drilling (composition + context)
82
- - Decompose if > 200 lines
83
- - Add useCallback for handlers, useMemo for expensive computations
84
- - Validate after each component
85
-
86
- ### Phase 6: Review
87
- - Run pattern checks (same as @reviewer review mode)
88
- - Report remaining issues
89
- - Get user approval
30
+ Run `/migration-migrate-module $PATH`. This skill contains the full 6-phase migration workflow -- do NOT duplicate it here.
90
31
 
91
32
  ## Verification Protocol
92
33
 
@@ -119,47 +60,7 @@ Read `docs/ARCHITECTURE.md`.
119
60
  ---
120
61
 
121
62
  ## Component Mode
122
-
123
- ### Conversion Table
124
- | Legacy Pattern | Modern Pattern |
125
- |---------------|---------------|
126
- | `class X extends Component` | `function X(props: XProps)` |
127
- | `this.state` / `this.setState` | `useState()` |
128
- | `this.props` | Destructured props parameter |
129
- | `PropTypes` | TypeScript interface |
130
- | `componentDidMount` | `useEffect(() => {}, [])` |
131
- | `componentDidUpdate` | `useEffect(() => {}, [deps])` |
132
- | `componentWillUnmount` | `useEffect(() => { return cleanup }, [])` |
133
- | `shouldComponentUpdate` | `React.memo()` |
134
- | `getDerivedStateFromProps` | `useMemo()` or state in render |
135
- | `render()` | Return JSX directly |
136
- | `this.handleX = this.handleX.bind(this)` | `const handleX = useCallback(...)` |
137
- | HOC (`withRouter`, `connect`) | Custom hook (`useNavigate`, `useStore`) |
138
- | `connect(mapState, mapDispatch)` | `useStore(selector)` (Zustand) |
139
- | `mapStateToProps` | Zustand selector |
140
- | `mapDispatchToProps` | Zustand actions |
141
- | `createSlice` / `createReducer` | `create()` (Zustand) |
142
- | Render props (legacy) | Custom hook or children |
143
-
144
- ### Workflow
145
- 1. Read the component and list: props, state, lifecycle methods, handlers, HOCs, Redux connections
146
- 2. Map consumers (who uses this component) -- note if props API changes
147
- 3. Convert to functional component with TypeScript
148
- 4. Type all props via interface
149
- 5. Replace lifecycle methods with hooks (useEffect, useMemo, useCallback)
150
- 6. Extract HOCs to custom hooks
151
- 7. Replace Redux with Zustand store + selectors
152
- 8. Eliminate prop drilling if found
153
- 9. Decompose if > 200 lines
154
- 10. Validate: `npx tsc --noEmit`
155
- 11. Update consumers if API changed
156
-
157
- ### Rules
158
- - Keep public API (props) stable when possible
159
- - If API changes, update all consumers
160
- - One component per commit
161
- - Report bugs found during migration (don't silently fix)
162
- - **Verify each phase** - Partial migration is worse than none
63
+ Run `/migration-migrate-component $FILE`. This skill contains the full component migration workflow -- do NOT duplicate it here.
163
64
 
164
65
  ## Output
165
66