specialist-agent 2.0.0 → 2.7.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 (104) hide show
  1. package/.claude-plugin/marketplace.json +7 -7
  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/LICENSE +1 -1
  6. package/README.md +17 -7
  7. package/agents/api.md +374 -93
  8. package/agents/architect-lite.md +104 -0
  9. package/agents/architect.md +553 -0
  10. package/agents/data.md +108 -0
  11. package/agents/deps.md +323 -167
  12. package/agents/devops.md +12 -0
  13. package/agents/docs.md +381 -134
  14. package/agents/executor.md +117 -0
  15. package/agents/finance.md +85 -0
  16. package/agents/i18n.md +512 -117
  17. package/agents/memory.md +1 -1
  18. package/agents/perf.md +287 -109
  19. package/agents/refactor.md +380 -92
  20. package/agents/ripple-lite.md +106 -0
  21. package/agents/ripple.md +162 -0
  22. package/agents/scout-lite.md +1 -1
  23. package/agents/scout.md +1 -1
  24. package/agents/security.md +65 -0
  25. package/agents/tdd.md +11 -3
  26. package/cli/index.mjs +54 -36
  27. package/hooks/native/auto-dispatch.mjs +6 -0
  28. package/hooks/native/security-guard.mjs +3 -2
  29. package/hooks/native/settings-template.json +4 -4
  30. package/package.json +15 -2
  31. package/packs/angular/ARCHITECTURE.md +814 -0
  32. package/packs/angular/CLAUDE.md +105 -0
  33. package/packs/angular/agents/builder.md +157 -0
  34. package/packs/angular/agents/doctor.md +241 -0
  35. package/packs/angular/agents/migrator.md +195 -0
  36. package/packs/angular/agents/reviewer.md +263 -0
  37. package/packs/angular/agents-lite/builder.md +65 -0
  38. package/packs/angular/agents-lite/doctor.md +64 -0
  39. package/packs/angular/agents-lite/migrator.md +75 -0
  40. package/packs/angular/agents-lite/reviewer.md +69 -0
  41. package/packs/angular/skills/dev-create-component/SKILL.md +56 -0
  42. package/packs/angular/skills/dev-create-injectable/SKILL.md +60 -0
  43. package/packs/angular/skills/dev-create-module/SKILL.md +49 -0
  44. package/packs/angular/skills/dev-create-service/SKILL.md +34 -0
  45. package/packs/angular/skills/dev-create-test/SKILL.md +78 -0
  46. package/packs/angular/skills/dev-generate-types/SKILL.md +37 -0
  47. package/packs/angular/skills/docs-onboard/SKILL.md +42 -0
  48. package/packs/angular/skills/migration-migrate-component/SKILL.md +42 -0
  49. package/packs/angular/skills/migration-migrate-module/SKILL.md +25 -0
  50. package/packs/angular/skills/review-check-architecture/SKILL.md +67 -0
  51. package/packs/angular/skills/review-fix-violations/SKILL.md +43 -0
  52. package/packs/angular/skills/review-review/SKILL.md +42 -0
  53. package/packs/astro/ARCHITECTURE.md +718 -0
  54. package/packs/astro/CLAUDE.md +106 -0
  55. package/packs/astro/agents/builder.md +192 -0
  56. package/packs/astro/agents/doctor.md +254 -0
  57. package/packs/astro/agents/migrator.md +209 -0
  58. package/packs/astro/agents/reviewer.md +263 -0
  59. package/packs/astro/agents-lite/builder.md +71 -0
  60. package/packs/astro/agents-lite/doctor.md +66 -0
  61. package/packs/astro/agents-lite/migrator.md +71 -0
  62. package/packs/astro/agents-lite/reviewer.md +70 -0
  63. package/packs/astro/skills/dev-create-component/SKILL.md +50 -0
  64. package/packs/astro/skills/dev-create-island/SKILL.md +63 -0
  65. package/packs/astro/skills/dev-create-module/SKILL.md +49 -0
  66. package/packs/astro/skills/dev-create-service/SKILL.md +34 -0
  67. package/packs/astro/skills/dev-create-test/SKILL.md +76 -0
  68. package/packs/astro/skills/dev-generate-types/SKILL.md +37 -0
  69. package/packs/astro/skills/docs-onboard/SKILL.md +51 -0
  70. package/packs/astro/skills/migration-migrate-component/SKILL.md +48 -0
  71. package/packs/astro/skills/migration-migrate-module/SKILL.md +25 -0
  72. package/packs/astro/skills/review-check-architecture/SKILL.md +72 -0
  73. package/packs/astro/skills/review-fix-violations/SKILL.md +43 -0
  74. package/packs/astro/skills/review-review/SKILL.md +44 -0
  75. package/packs/nuxt/ARCHITECTURE.md +831 -0
  76. package/packs/nuxt/CLAUDE.md +111 -0
  77. package/packs/nuxt/agents/builder.md +165 -0
  78. package/packs/nuxt/agents/doctor.md +252 -0
  79. package/packs/nuxt/agents/migrator.md +203 -0
  80. package/packs/nuxt/agents/reviewer.md +275 -0
  81. package/packs/nuxt/agents-lite/builder.md +67 -0
  82. package/packs/nuxt/agents-lite/doctor.md +67 -0
  83. package/packs/nuxt/agents-lite/migrator.md +80 -0
  84. package/packs/nuxt/agents-lite/reviewer.md +71 -0
  85. package/packs/nuxt/skills/dev-create-component/SKILL.md +60 -0
  86. package/packs/nuxt/skills/dev-create-composable/SKILL.md +33 -0
  87. package/packs/nuxt/skills/dev-create-module/SKILL.md +49 -0
  88. package/packs/nuxt/skills/dev-create-service/SKILL.md +34 -0
  89. package/packs/nuxt/skills/dev-create-test/SKILL.md +61 -0
  90. package/packs/nuxt/skills/dev-generate-types/SKILL.md +37 -0
  91. package/packs/nuxt/skills/docs-onboard/SKILL.md +49 -0
  92. package/packs/nuxt/skills/migration-migrate-component/SKILL.md +48 -0
  93. package/packs/nuxt/skills/migration-migrate-module/SKILL.md +25 -0
  94. package/packs/nuxt/skills/review-check-architecture/SKILL.md +71 -0
  95. package/packs/nuxt/skills/review-fix-violations/SKILL.md +43 -0
  96. package/packs/nuxt/skills/review-review/SKILL.md +44 -0
  97. package/skills/checkpoint/SKILL.md +8 -0
  98. package/skills/codereview/SKILL.md +255 -0
  99. package/skills/commit/SKILL.md +150 -0
  100. package/skills/estimate/SKILL.md +9 -0
  101. package/skills/finish/SKILL.md +9 -0
  102. package/skills/health/SKILL.md +9 -0
  103. package/skills/lint/SKILL.md +126 -0
  104. package/skills/plan/SKILL.md +9 -0
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: reviewer
3
+ description: "Use when code changes need review before merge — validates architecture conformance, code quality, and spec compliance."
4
+ model: haiku
5
+ tools: Read, Glob, Grep
6
+ ---
7
+
8
+ # Reviewer (Lite)
9
+
10
+ ## Mission
11
+ Analyze code against architecture conventions. Detect scope: review | explore | performance.
12
+
13
+ ## Core Principles
14
+ - **Security**: Validate ALL inputs server-side, parameterized queries, no secrets in code, OWASP Top 10 compliance
15
+ - **Performance**: Use useFetch/useAsyncData for caching (watch triggers, refreshNuxtData), lazy loading, avoid N+1
16
+ - **Code Language**: Write code in English (variables, functions, comments). Other languages only on user request
17
+
18
+ ## Review Mode
19
+ Check these patterns:
20
+ - Services: HTTP only using $fetch, no try/catch, no transformation
21
+ - Adapters: pure functions, bidirectional
22
+ - Types: .types.ts (API) separated from .contracts.ts (app)
23
+ - Composables: service -> adapter -> useAsyncData, watch triggers set
24
+ - State: useState for simple, Pinia for complex, never server state in stores
25
+ - Components: script setup, auto-imports, typed props/emits, < 200 lines, no prop drilling
26
+ - Server routes: Zod validation, createError() for errors
27
+ - No cross-module imports, no `any`, no v-html, no console.log/debugger
28
+ - No explicit imports where auto-imports should work
29
+
30
+ ### Classification
31
+ - VIOLATION — breaks conventions
32
+ - ATTENTION — partial pattern
33
+ - COMPLIANT — correct
34
+ - HIGHLIGHT — above expectations
35
+
36
+ ### Output
37
+
38
+ Include a scorecard (Architecture, Type Safety, Security, Maintainability — grades A-F), then violations, attention items, highlights, and verdict (Approved/Caveats/Requires Changes).
39
+
40
+ ## Explore Mode
41
+ 1. Inventory files by type (components, services, composables, pages, server routes)
42
+ 2. Detect: Options vs setup, JS vs TS, explicit vs auto-imports, Nuxt 2 patterns
43
+ 3. Map dependencies: fan-in / fan-out
44
+ 4. Produce read-only report with facts and numbers
45
+
46
+ ## Performance Mode
47
+ 1. Check lazy loading: components should use `<Lazy>` prefix for non-critical rendering
48
+ 2. Find useAsyncData/useFetch without lazy option for non-critical data
49
+ 3. Find deep watchers `{ deep: true }`, inline objects in templates
50
+ 4. Check for unnecessary client-side rendering (`<ClientOnly>` overuse)
51
+ 5. Report bottlenecks sorted by user impact
52
+
53
+ ## Rules
54
+ - Read-only. Never modify files.
55
+ - Always include positive highlights — good code deserves recognition.
56
+ - Reference file:line in findings.
57
+ - Scorecard grades: A (excellent) B (good) C (adequate) D (needs work) F (critical).
58
+
59
+ ## Execution Summary
60
+
61
+ At the end of every task, you **MUST** include a brief summary of agent and skill usage:
62
+
63
+ ```text
64
+ ──── Specialist Agent: 2 agents (@builder, @reviewer) · 1 skill (/dev-create-module)
65
+ ```
66
+
67
+ Rules:
68
+
69
+ - Only show agents/skills that were actually invoked during the execution
70
+ - If no agents or skills were used, omit the summary entirely
71
+ - Use the exact format above — single line, separated by `·`
@@ -0,0 +1,60 @@
1
+ ---
2
+ name: dev-create-component
3
+ description: "Use when adding a new UI component to an existing module — handles templates, props, and test scaffolding."
4
+ user-invocable: true
5
+ argument-hint: "[ComponentName]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create a Nuxt component following `docs/ARCHITECTURE.md` section 5.
10
+
11
+ Component: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` section 5.
16
+
17
+ 2. Determine the type:
18
+ - **Feature component** -> `modules/[module]/components/ComponentName.vue`
19
+ - **Shared component** -> `components/ComponentName.vue` (auto-imported)
20
+ - **Page** -> `pages/[route]/index.vue` (file-based routing)
21
+
22
+ 3. Create the component with the standard template:
23
+
24
+ ```vue
25
+ <script setup lang="ts">
26
+ // In Nuxt, Vue APIs and composables are auto-imported
27
+ // NO import statements needed for ref, computed, watch, etc.
28
+
29
+ interface Props {
30
+ // type all props
31
+ }
32
+
33
+ interface Emits {
34
+ // type all emits
35
+ }
36
+
37
+ const props = defineProps<Props>()
38
+ const emit = defineEmits<Emits>()
39
+
40
+ // composables, state, computed, handlers...
41
+ </script>
42
+
43
+ <template>
44
+ <!-- clean template, < 100 lines -->
45
+ </template>
46
+
47
+ <style scoped>
48
+ /* styles */
49
+ </style>
50
+ ```
51
+
52
+ 4. Checklist:
53
+ - `<script setup lang="ts">` ✅
54
+ - Type-based props ✅
55
+ - Type-based emits ✅
56
+ - Auto-imports (no explicit Vue/composable imports) ✅
57
+ - < 200 lines ✅
58
+ - PascalCase.vue ✅
59
+
60
+ 5. Validate: `nuxi typecheck`
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: dev-create-composable
3
+ description: "Use when adding server state management or shared logic — creates an auto-imported composable with useFetch/useAsyncData."
4
+ user-invocable: true
5
+ argument-hint: "[composable-name]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create an auto-imported composable following `docs/ARCHITECTURE.md` section 4.4.
10
+
11
+ Composable: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` section 4.4.
16
+
17
+ 2. Determine the type:
18
+ - **Query** (data reading) -> `useAsyncData` + service + adapter
19
+ - **Mutation** (write/delete) -> function + service + refreshNuxtData
20
+ - **Pure logic** (no API) -> refs + computed + lifecycle
21
+ - **Shared state** (SSR-safe) -> `useState` for simple, Pinia for complex
22
+
23
+ 3. Create the composable in `composables/use[Name].ts` (auto-imported) or `modules/[feature]/composables/use[Name].ts`:
24
+ - Required `use` prefix
25
+ - Parameters with `Ref<T>` for reactivity
26
+ - Reactive key for useAsyncData
27
+ - `watch` option for auto-refetch
28
+ - Adapter in `transform` option
29
+ - Return type with refs/computed
30
+
31
+ 4. Connect the layers: service -> adapter -> useAsyncData
32
+
33
+ 5. Validate: `nuxi typecheck`
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: dev-create-module
3
+ description: "Use when creating a new feature module with all layers — service, adapter, types, state, components, and tests."
4
+ user-invocable: true
5
+ argument-hint: "[module-name]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create a new complete feature module following `docs/ARCHITECTURE.md`.
10
+
11
+ Module name: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` sections 2, 3 and 4.
16
+
17
+ 2. Create the directory structure:
18
+
19
+ ```text
20
+ modules/[kebab-case-name]/
21
+ ├── components/
22
+ ├── composables/
23
+ ├── services/
24
+ ├── adapters/
25
+ ├── types/
26
+ ├── __tests__/
27
+ └── index.ts
28
+ ```
29
+
30
+ 3. Create `index.ts` with empty barrel export:
31
+
32
+ ```typescript
33
+ // modules/[name]/index.ts
34
+ // Public API for this module
35
+ ```
36
+
37
+ 4. Ask the user:
38
+ - Which API endpoints does this module consume?
39
+ - What UI type? (list with CRUD, dashboard, form, detail)
40
+
41
+ 5. Use `@builder` to create bottom-up:
42
+ - Types + contracts + adapter + service (using $fetch)
43
+ - Composables with useAsyncData/useFetch
44
+ - Components with script setup and auto-imports
45
+ - Page in pages/ directory (file-based routing)
46
+
47
+ 6. Create server API routes if needed (server/api/[resource]/).
48
+
49
+ 7. Validate: `nuxi typecheck && nuxi build`
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: dev-create-service
3
+ description: "Use when adding API integration to a module — creates types, contracts, adapter, and service layer."
4
+ user-invocable: true
5
+ argument-hint: "[resource-name]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create the complete data layer for a resource following `docs/ARCHITECTURE.md` sections 4.1-4.3.
10
+
11
+ Resource: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` sections 4.1 (Services), 4.2 (Adapters), 4.3 (Types).
16
+
17
+ 2. Ask the user:
18
+ - What is the endpoint base URL? (e.g. `/api/marketplace`)
19
+ - What is the response JSON format? (ask for an example or describe the fields)
20
+ - Which operations? (GET list, GET by ID, POST, PATCH, DELETE)
21
+
22
+ 3. Create in order:
23
+
24
+ a. `types/[resource].types.ts` — mirrors API exactly (snake_case)
25
+ b. `types/[resource].contracts.ts` — app contract (camelCase, correct types)
26
+ c. `adapters/[resource]-adapter.ts` — inbound (API->App) + outbound (App->API)
27
+ d. `services/[resource]-service.ts` — HTTP only using $fetch, no try/catch, no transformation
28
+
29
+ 4. Required rules:
30
+ - Service: **NO try/catch**, **NO .map()/.filter()/new Date()**, use `$fetch`
31
+ - Adapter: **pure functions**, no side effects
32
+ - Types separated: .types.ts (API) != .contracts.ts (App)
33
+
34
+ 5. Validate: `nuxi typecheck`
@@ -0,0 +1,61 @@
1
+ ---
2
+ name: dev-create-test
3
+ description: "Use when a module needs test coverage — creates tests for adapters, composables, and components."
4
+ user-invocable: true
5
+ argument-hint: "[file-path]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create tests for the specified file or module.
10
+
11
+ Target: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Analyze the file to understand what to test.
16
+
17
+ 2. Determine the test type:
18
+
19
+ ### Adapter (high priority — pure functions, easy to test)
20
+ ```typescript
21
+ import { describe, it, expect } from 'vitest'
22
+ import { xxxAdapter } from '../adapters/xxx-adapter'
23
+
24
+ describe('xxxAdapter', () => {
25
+ describe('toXxx', () => {
26
+ it('should convert API response to app contract', () => {
27
+ const response = { uuid: '123', field_name: 'test', created_at: '2024-01-01T00:00:00Z' }
28
+ const result = xxxAdapter.toXxx(response)
29
+ expect(result.id).toBe('123')
30
+ expect(result.fieldName).toBe('test')
31
+ expect(result.createdAt).toBeInstanceOf(Date)
32
+ })
33
+ })
34
+ })
35
+ ```
36
+
37
+ ### Composable (medium priority)
38
+ ```typescript
39
+ import { describe, it, expect, vi } from 'vitest'
40
+ import { mountSuspended } from '@nuxt/test-utils/runtime'
41
+ // Mock service
42
+ vi.mock('../services/xxx-service')
43
+ ```
44
+
45
+ ### Component (medium-low priority)
46
+ ```typescript
47
+ import { describe, it, expect } from 'vitest'
48
+ import { mountSuspended } from '@nuxt/test-utils/runtime'
49
+ import XxxComponent from '../components/XxxComponent.vue'
50
+
51
+ describe('XxxComponent', () => {
52
+ it('should render', async () => {
53
+ const wrapper = await mountSuspended(XxxComponent, { props: { /* ... */ } })
54
+ expect(wrapper.exists()).toBe(true)
55
+ })
56
+ })
57
+ ```
58
+
59
+ 3. Create the test in `__tests__/OriginalName.spec.ts`.
60
+
61
+ 4. Run: `npx vitest run --reporter=verbose`
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: dev-generate-types
3
+ description: "Use when integrating with an API endpoint and need TypeScript types, contracts, and adapters generated automatically."
4
+ user-invocable: true
5
+ argument-hint: "[endpoint-or-json]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Generate types, contracts and adapter for an API endpoint following `docs/ARCHITECTURE.md` sections 4.2-4.3.
10
+
11
+ Endpoint or example JSON: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` sections 4.2 and 4.3.
16
+
17
+ 2. If the user provided an example JSON, use it. If they provided an endpoint:
18
+ - Search existing code for calls to that endpoint
19
+ - Ask the user for an example response JSON
20
+
21
+ 3. From the JSON, create:
22
+
23
+ a. **`[resource].types.ts`** — types that mirror the API exactly:
24
+ - snake_case, string dates, IDs as string
25
+ - Include request payloads and list response (with pagination)
26
+
27
+ b. **`[resource].contracts.ts`** — clean app contracts:
28
+ - camelCase, Date objects, derived booleans
29
+ - No internal API fields (tokens, metadata)
30
+
31
+ c. **`[resource]-adapter.ts`** — pure functions:
32
+ - `toXxx(response)` — inbound (API -> App)
33
+ - `toXxxList(response)` — inbound for list
34
+ - `toCreatePayload(input)` — outbound (App -> API)
35
+ - Conversions: snake->camel, string->Date, cents->decimal
36
+
37
+ 4. Validate: `nuxi typecheck`
@@ -0,0 +1,49 @@
1
+ ---
2
+ name: docs-onboard
3
+ description: "Use when onboarding onto a module and need a quick summary of its structure, patterns, and key files."
4
+ user-invocable: true
5
+ argument-hint: "[module-name]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ Create a quick summary of a module for onboarding.
10
+
11
+ Module: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Map the structure:
16
+ ```bash
17
+ find modules/$ARGUMENTS -type f | head -40
18
+ find pages/ -path "*$ARGUMENTS*" -type f 2>/dev/null
19
+ find server/api/$ARGUMENTS -type f 2>/dev/null
20
+ ```
21
+
22
+ 2. Summarize in quick format:
23
+
24
+ ### Endpoints
25
+ List the consumed endpoints (grep in services and server/api/).
26
+
27
+ ### Main Components
28
+ List components and their responsibilities (1 line each).
29
+
30
+ ### State
31
+ - What is in useState? (simple shared state)
32
+ - What is in Pinia? (complex client state)
33
+ - What is in useAsyncData/useFetch? (server state)
34
+
35
+ ### Data Flow
36
+ ```
37
+ Service ($fetch) -> Adapter (parse) -> Composable (useAsyncData) -> Component (UI)
38
+ ```
39
+
40
+ ### Server API Routes
41
+ List Nitro routes in server/api/ (1 line each).
42
+
43
+ ### Points of Attention
44
+ - Anything outside the ARCHITECTURE.md pattern?
45
+ - Components > 200 lines?
46
+ - Legacy code not yet migrated?
47
+ - Explicit imports where auto-imports should work?
48
+
49
+ 3. Output: concise summary that a new developer can understand the module in 2 minutes.
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: migration-migrate-component
3
+ description: "Use when a component needs migration to the target architecture or framework version."
4
+ user-invocable: true
5
+ argument-hint: "[component-file]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Migrate a Nuxt component from Nuxt 2 / Options API to Nuxt 3 `<script setup lang="ts">` following `docs/ARCHITECTURE.md` section 5.
10
+
11
+ Component: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Read `docs/ARCHITECTURE.md` section 5.
16
+
17
+ 2. Analyze the component:
18
+ - Count lines (template, script, style)
19
+ - List: props, emits, data, computed, watch, methods, mixins, asyncData, fetch
20
+ - Map who imports this component
21
+
22
+ 3. Convert to `<script setup lang="ts">`:
23
+ - `props` -> `defineProps<T>()`
24
+ - `emits` -> `defineEmits<T>()`
25
+ - `data()` -> `ref()` / `reactive()`
26
+ - `computed:` -> `computed()`
27
+ - `watch:` -> `watch()`
28
+ - `methods:` -> `function`
29
+ - `mounted()` -> `onMounted()`
30
+ - `mixins: []` -> extract to composable `useXxx()`
31
+ - `asyncData()` -> `useAsyncData()`
32
+ - `fetch()` -> `useFetch()`
33
+ - `$axios` -> `$fetch`
34
+ - `this.$route` -> `useRoute()`
35
+ - `this.$router` -> `useRouter()`
36
+ - `this.$store` -> `useState()` / Pinia
37
+ - Remove explicit imports (use auto-imports)
38
+
39
+ 4. Apply composition pattern if there is prop drilling.
40
+
41
+ 5. Decompose if > 200 lines.
42
+
43
+ 6. Validate:
44
+ ```bash
45
+ nuxi typecheck
46
+ nuxi build
47
+ npx vitest run --passWithNoTests
48
+ ```
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: migration-migrate-module
3
+ description: "Use when a complete module needs migration to the target architecture — runs 6 phases with approval gates."
4
+ user-invocable: true
5
+ argument-hint: "[module-path]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Migrate an entire module to the target architecture from `docs/ARCHITECTURE.md`.
10
+
11
+ Module/Path: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ Use `@migrator` to coordinate the full migration in phases:
16
+
17
+ 1. **Phase 0 -- Analysis**: Map the module (files, patterns, dependencies, Nuxt 2 patterns)
18
+ 2. **Phase 1 -- Structure**: Create `modules/[name]/` and move files
19
+ 3. **Phase 2 -- Types**: Create `.types.ts` + `.contracts.ts` + adapter
20
+ 4. **Phase 3 -- Services**: Migrate to pure service using $fetch (no try/catch, replace $axios)
21
+ 5. **Phase 4 -- State**: Server state -> useAsyncData/useFetch, simple client -> useState, complex -> Pinia
22
+ 6. **Phase 5 -- Components**: Options -> script setup + auto-imports + composition
23
+ 7. **Phase 6 -- Review**: Validate conformance
24
+
25
+ Validate build/typecheck/tests after each phase. Ask for approval before each phase.
@@ -0,0 +1,71 @@
1
+ ---
2
+ name: review-check-architecture
3
+ description: "Use when checking if code follows ARCHITECTURE.md patterns — runs automated conformance checks."
4
+ user-invocable: true
5
+ argument-hint: "[module]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ Validate the entire project (or a specific module) against `docs/ARCHITECTURE.md`.
10
+
11
+ Scope: $ARGUMENTS (if empty, validate all modules/)
12
+
13
+ ## Automated Checks
14
+
15
+ Run all checks and report a summary:
16
+
17
+ ```bash
18
+ echo "=== 1. Services with try/catch ==="
19
+ grep -rn "try {" modules/*/services/ --include="*.ts" 2>/dev/null || echo "None found"
20
+
21
+ echo "=== 2. Services with transformation ==="
22
+ grep -rn "\.map(\|\.filter(\|new Date\|\.reduce(" modules/*/services/ --include="*.ts" 2>/dev/null || echo "None found"
23
+
24
+ echo "=== 3. Components without script setup ==="
25
+ grep -rL "script setup" modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "All ok"
26
+
27
+ echo "=== 4. Components without TypeScript ==="
28
+ grep -rL 'lang="ts"' modules/*/components/*.vue pages/*.vue 2>/dev/null || echo "All ok"
29
+
30
+ echo "=== 5. Options API ==="
31
+ grep -rn "defineComponent\|export default {" modules/ pages/ --include="*.vue" 2>/dev/null || echo "None found"
32
+
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"
35
+
36
+ echo "=== 7. Server state in Pinia ==="
37
+ grep -rn "\$fetch\|useFetch\|useAsyncData" modules/*/stores/ --include="*.ts" 2>/dev/null || echo "None found"
38
+
39
+ echo "=== 8. any types ==="
40
+ grep -rn ": any\| any;\|as any\|<any>" modules/ --include="*.ts" --include="*.vue" 2>/dev/null | wc -l
41
+
42
+ echo "=== 9. Cross-module imports ==="
43
+ for module in modules/*/; do
44
+ name=$(basename "$module")
45
+ grep -rn "from.*modules/" "$module" --include="*.ts" --include="*.vue" 2>/dev/null | grep -v "modules/${name}" || true
46
+ done
47
+
48
+ echo "=== 10. v-html ==="
49
+ grep -rn "v-html" --include="*.vue" 2>/dev/null || echo "None found"
50
+
51
+ echo "=== 11. Debug artifacts ==="
52
+ grep -rn "console\.\|debugger" modules/ --include="*.ts" --include="*.vue" 2>/dev/null | wc -l
53
+
54
+ echo "=== 12. Server routes without Zod validation ==="
55
+ grep -rL "readValidatedBody\|getValidatedQuery\|getValidatedRouterParams" server/api/**/*.ts 2>/dev/null || echo "All ok"
56
+
57
+ echo "=== 13. Components > 200 lines ==="
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
+
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"
62
+ ```
63
+
64
+ Produce a summary table:
65
+
66
+ | Check | Status | Occurrences |
67
+ |-------|--------|-------------|
68
+ | Services without try/catch | OK/FAIL | X |
69
+ | ... | ... | ... |
70
+
71
+ Overall score: X/14 checks passing.
@@ -0,0 +1,43 @@
1
+ ---
2
+ name: review-fix-violations
3
+ description: "Use when architecture violations were found and need automated fixing by priority."
4
+ user-invocable: true
5
+ argument-hint: "[module]"
6
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep
7
+ ---
8
+
9
+ Identify and fix `docs/ARCHITECTURE.md` violations in the specified module.
10
+
11
+ Module: $ARGUMENTS
12
+
13
+ ## Steps
14
+
15
+ 1. Run `/review-check-architecture` to find violations.
16
+
17
+ 2. For each violation found, fix in priority order:
18
+
19
+ **Critical (fix first):**
20
+ - try/catch in services -> remove, move error handling to composable
21
+ - Transformation in services -> move to adapter
22
+ - v-html without sanitization -> remove or sanitize
23
+ - Hardcoded secrets -> move to env vars / runtimeConfig
24
+ - Server routes without Zod validation -> add validation
25
+
26
+ **Important:**
27
+ - Options API -> migrate to script setup (`/migration-migrate-component`)
28
+ - Server state in Pinia -> migrate to useAsyncData/useFetch
29
+ - Explicit Vue imports -> remove (use auto-imports)
30
+ - any types -> type correctly
31
+ - Nuxt 2 patterns ($axios, asyncData, this.$store) -> Nuxt 3 equivalents
32
+
33
+ **Improvements:**
34
+ - Components > 200 lines -> decompose
35
+ - Console.log -> remove
36
+ - TODO/FIXME -> resolve or create issue
37
+
38
+ 3. Validate after each fix:
39
+ ```bash
40
+ nuxi typecheck && nuxi build && npx vitest run --passWithNoTests
41
+ ```
42
+
43
+ 4. Report what was fixed and what remains.
@@ -0,0 +1,44 @@
1
+ ---
2
+ name: review-review
3
+ description: "Use when code changes need review before merge — validates architecture, types, security, and test coverage."
4
+ user-invocable: true
5
+ argument-hint: "[scope]"
6
+ allowed-tools: Read, Bash, Glob, Grep
7
+ ---
8
+
9
+ Perform a full code review of changed files, validating against `docs/ARCHITECTURE.md`.
10
+
11
+ Scope: $ARGUMENTS (if empty, review files changed in git)
12
+
13
+ ## Steps
14
+
15
+ 1. Identify changed files:
16
+ ```bash
17
+ git diff --name-only HEAD~1 2>/dev/null || git diff --name-only --cached 2>/dev/null || echo "Please specify the files"
18
+ ```
19
+
20
+ 2. Run automated checks:
21
+ ```bash
22
+ nuxi typecheck
23
+ npx eslint . --max-warnings 0
24
+ npx vitest run --passWithNoTests
25
+ ```
26
+
27
+ 3. Check ARCHITECTURE.md patterns:
28
+ - Services: no try/catch, no transformation, use $fetch
29
+ - Adapters: pure functions
30
+ - Composables: use service+adapter, useAsyncData with watch triggers
31
+ - State: useState for simple, Pinia for complex, no server state in stores
32
+ - Components: script setup, auto-imports, typed props/emits, < 200 lines
33
+ - Server routes: Zod validation, createError() for errors
34
+ - Naming: correct conventions
35
+ - Boundaries: no cross-module imports
36
+ - Auto-imports: no explicit imports where Nuxt handles them
37
+
38
+ 4. Classify:
39
+ - VIOLATION — ARCHITECTURE.md violation
40
+ - ATTENTION — Recommended improvement
41
+ - COMPLIANT — Correct
42
+ - HIGHLIGHT — Positive highlight
43
+
44
+ 5. Produce report with verdict: Approved | With caveats | Requires changes
@@ -201,6 +201,14 @@ Operation: [create|restore|list|clean]
201
201
  [Operation details]
202
202
  ```
203
203
 
204
+ ## Anti-Rationalization
205
+
206
+ | Excuse | Reality |
207
+ |--------|---------|
208
+ | "I don't need a checkpoint, it's a small change" | Small changes break things too. A checkpoint takes 2 seconds, a rollback without one takes hours. |
209
+ | "Git history is enough" | Checkpoints are labeled save points — faster than hunting through `git reflog`. |
210
+ | "I'll just undo if something goes wrong" | You can't undo what you can't identify. Checkpoints mark the exact safe state. |
211
+
204
212
  ## Rules
205
213
 
206
214
  1. **Always confirm before restore** — Destructive operation