specialist-agent 2.10.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +5 -5
- package/.claude-plugin/plugin.json +2 -2
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +2 -2
- package/README.md +128 -250
- package/agents/analyst.md +1 -0
- package/agents/api.md +4 -4
- package/agents/architect-lite.md +2 -2
- package/agents/architect.md +6 -6
- package/agents/cloud-lite.md +1 -1
- package/agents/cloud.md +4 -4
- package/agents/data-lite.md +1 -1
- package/agents/data.md +4 -4
- package/agents/debugger.md +1 -0
- package/agents/deps.md +4 -4
- package/agents/designer-lite.md +1 -1
- package/agents/designer.md +4 -4
- package/agents/devops-lite.md +1 -1
- package/agents/devops.md +4 -4
- package/agents/docs.md +4 -4
- package/agents/executor.md +95 -0
- package/agents/explorer-lite.md +1 -1
- package/agents/explorer.md +4 -4
- package/agents/finance-lite.md +1 -1
- package/agents/finance.md +4 -4
- package/agents/i18n.md +4 -4
- package/agents/legal-lite.md +1 -1
- package/agents/legal.md +4 -4
- package/agents/marketing-lite.md +25 -0
- package/agents/marketing.md +179 -0
- package/agents/memory.md +13 -12
- package/agents/orchestrator.md +102 -0
- package/agents/pair.md +1 -0
- package/agents/perf.md +4 -4
- package/agents/planner.md +1 -0
- package/agents/product-lite.md +25 -0
- package/agents/product.md +186 -0
- package/agents/refactor.md +4 -4
- package/agents/ripple.md +1 -0
- package/agents/scout.md +1 -0
- package/agents/security-lite.md +1 -1
- package/agents/security.md +4 -4
- package/agents/sentry-triage-lite.md +54 -0
- package/agents/sentry-triage.md +214 -0
- package/agents/starter-lite.md +4 -4
- package/agents/starter.md +8 -8
- package/agents/support-lite.md +24 -0
- package/agents/support.md +190 -0
- package/agents/tdd.md +1 -0
- package/agents/tester-lite.md +1 -1
- package/agents/tester.md +43 -10
- package/cli/index.mjs +466 -343
- package/hooks/native/auto-dispatch.mjs +19 -26
- package/hooks/native/auto-format.mjs +5 -25
- package/hooks/native/mcp-discovery.mjs +168 -0
- package/hooks/native/security-config.json +4 -0
- package/hooks/native/security-guard.mjs +37 -24
- package/hooks/native/session-context.mjs +61 -18
- package/hooks/native/settings-template.json +9 -0
- package/package.json +1 -1
- package/packs/angular/agents/builder.md +10 -54
- package/packs/angular/agents/doctor.md +7 -61
- package/packs/angular/agents/migrator.md +7 -101
- package/packs/angular/agents/reviewer.md +22 -33
- package/packs/angular/skills/review-check-architecture/SKILL.md +7 -7
- package/packs/angular/skills/review-review/SKILL.md +1 -0
- package/packs/astro/agents/builder.md +10 -79
- package/packs/astro/agents/doctor.md +7 -61
- package/packs/astro/agents/migrator.md +7 -111
- package/packs/astro/agents/reviewer.md +22 -32
- package/packs/astro/skills/review-check-architecture/SKILL.md +9 -9
- package/packs/astro/skills/review-review/SKILL.md +1 -0
- package/packs/nextjs/agents/builder.md +11 -108
- package/packs/nextjs/agents/doctor.md +7 -62
- package/packs/nextjs/agents/migrator.md +6 -194
- package/packs/nextjs/agents/reviewer.md +22 -76
- package/packs/nextjs/skills/review-check-architecture/SKILL.md +15 -15
- package/packs/nextjs/skills/review-review/SKILL.md +1 -0
- package/packs/nuxt/agents/builder.md +10 -55
- package/packs/nuxt/agents/doctor.md +7 -61
- package/packs/nuxt/agents/migrator.md +7 -109
- package/packs/nuxt/agents/reviewer.md +22 -42
- package/packs/nuxt/skills/review-check-architecture/SKILL.md +11 -11
- package/packs/nuxt/skills/review-review/SKILL.md +1 -0
- package/packs/react/agents/builder.md +10 -55
- package/packs/react/agents/doctor.md +7 -61
- package/packs/react/agents/migrator.md +7 -106
- package/packs/react/agents/reviewer.md +22 -55
- package/packs/react/skills/review-check-architecture/SKILL.md +10 -10
- package/packs/react/skills/review-review/SKILL.md +1 -0
- package/packs/svelte/agents/builder.md +10 -58
- package/packs/svelte/agents/doctor.md +7 -60
- package/packs/svelte/agents/migrator.md +7 -118
- package/packs/svelte/agents/reviewer.md +22 -42
- package/packs/svelte/skills/review-check-architecture/SKILL.md +12 -12
- package/packs/svelte/skills/review-review/SKILL.md +1 -0
- package/packs/vue/agents/builder.md +10 -55
- package/packs/vue/agents/doctor.md +7 -61
- package/packs/vue/agents/migrator.md +7 -93
- package/packs/vue/agents/reviewer.md +20 -32
- package/packs/vue/skills/review-check-architecture/SKILL.md +10 -10
- package/packs/vue/skills/review-review/SKILL.md +1 -0
- package/skills/autofix/SKILL.md +166 -0
- package/skills/discovery/SKILL.md +218 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
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 OnPush change detection for components
|
|
71
|
-
- Use Angular Signals (signal, computed, effect) for reactive state
|
|
72
|
-
- Lazy load routes and feature modules
|
|
73
|
-
- Use trackBy with @for to minimize DOM operations
|
|
74
|
-
- Avoid unnecessary subscriptions - prefer signals over RxJS where possible
|
|
75
|
-
- Use HttpClient with proper typing - no inline transformations
|
|
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
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
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 OnPush change detection for components
|
|
28
|
-
- Use Angular Signals (signal, computed, effect) for reactive state
|
|
29
|
-
- Lazy load routes and feature modules
|
|
30
|
-
- Use trackBy with @for to minimize DOM operations
|
|
31
|
-
- Avoid unnecessary subscriptions - prefer signals over RxJS where possible
|
|
32
|
-
- Use HttpClient with proper typing - no inline transformations
|
|
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,48 +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 NgModule vs standalone, @Input vs input(), constructor DI vs inject(), BehaviorSubject vs signal
|
|
50
|
-
- List API endpoints used
|
|
51
|
-
- Report to user before proceeding
|
|
52
|
-
|
|
53
|
-
### Phase 1: Structure
|
|
54
|
-
- Create target directories: components/, services/, adapters/, stores/, types/, pages/, __tests__/
|
|
55
|
-
- Move existing files to correct locations
|
|
56
|
-
- Validate: `ng 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 (HttpClient only, no try/catch, no transformation)
|
|
66
|
-
- One file per resource
|
|
67
|
-
- Replace constructor DI with inject(HttpClient)
|
|
68
|
-
- Validate: `ng build`
|
|
69
|
-
|
|
70
|
-
### Phase 4: State
|
|
71
|
-
- BehaviorSubject/ReplaySubject stores -> signal-based stores (WritableSignal + computed)
|
|
72
|
-
- Remove server state from stores (services handle API calls)
|
|
73
|
-
- Client state stays in stores with signal()
|
|
74
|
-
- Validate: `ng build`
|
|
75
|
-
|
|
76
|
-
### Phase 5: Components
|
|
77
|
-
- Convert each component to standalone
|
|
78
|
-
- Replace @Input()/@Output() with input()/output()
|
|
79
|
-
- Replace constructor DI with inject()
|
|
80
|
-
- Add OnPush change detection
|
|
81
|
-
- Replace *ngIf/*ngFor with @if/@for control flow
|
|
82
|
-
- Decompose if > 200 lines
|
|
83
|
-
- Validate after each component
|
|
84
|
-
|
|
85
|
-
### Phase 6: Review
|
|
86
|
-
- Run pattern checks (same as @reviewer review mode)
|
|
87
|
-
- Report remaining issues
|
|
88
|
-
- Get user approval
|
|
30
|
+
Run `/migration-migrate-module $PATH`. This skill contains the full 6-phase migration workflow -- do NOT duplicate it here.
|
|
89
31
|
|
|
90
32
|
## Verification Protocol
|
|
91
33
|
|
|
@@ -118,43 +60,7 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
118
60
|
---
|
|
119
61
|
|
|
120
62
|
## Component Mode
|
|
121
|
-
|
|
122
|
-
### Conversion Table
|
|
123
|
-
| Legacy Angular | Modern Angular |
|
|
124
|
-
|---------------|----------------|
|
|
125
|
-
| `@Input() prop: Type` | `readonly prop = input<Type>()` |
|
|
126
|
-
| `@Input({ required: true })` | `readonly prop = input.required<Type>()` |
|
|
127
|
-
| `@Output() event = new EventEmitter<T>()` | `readonly event = output<T>()` |
|
|
128
|
-
| `constructor(private svc: Service)` | `private readonly svc = inject(Service)` |
|
|
129
|
-
| `ngOnInit()` | `constructor` or `afterNextRender()` |
|
|
130
|
-
| `ngOnChanges()` | `effect()` watching input signals |
|
|
131
|
-
| `ngOnDestroy()` | `DestroyRef` with `inject(DestroyRef)` |
|
|
132
|
-
| `*ngIf="cond"` | `@if (cond) { }` |
|
|
133
|
-
| `*ngFor="let item of items"` | `@for (item of items; track item.id) { }` |
|
|
134
|
-
| `[ngSwitch]` | `@switch (value) { @case ... }` |
|
|
135
|
-
| `BehaviorSubject<T>` | `signal<T>(initial)` |
|
|
136
|
-
| `Observable` pipe `async` | `signal()` + `computed()` |
|
|
137
|
-
| `@NgModule({ declarations })` | `standalone: true` + `imports: [...]` |
|
|
138
|
-
| `ChangeDetectionStrategy.Default` | `ChangeDetectionStrategy.OnPush` |
|
|
139
|
-
|
|
140
|
-
### Workflow
|
|
141
|
-
1. Read the component and list: inputs, outputs, constructor deps, lifecycle hooks, NgModule declarations
|
|
142
|
-
2. Map consumers (who uses this component) - note if input/output API changes
|
|
143
|
-
3. Convert to standalone component
|
|
144
|
-
4. Replace @Input/@Output with input()/output() signals
|
|
145
|
-
5. Replace constructor DI with inject()
|
|
146
|
-
6. Replace structural directives with control flow (@if, @for, @switch)
|
|
147
|
-
7. Add OnPush change detection
|
|
148
|
-
8. Decompose if > 200 lines
|
|
149
|
-
9. Validate: `npx tsc --noEmit`
|
|
150
|
-
10. Update consumers if API changed
|
|
151
|
-
|
|
152
|
-
### Rules
|
|
153
|
-
- Keep public API (selectors, input/output names) stable when possible
|
|
154
|
-
- If API changes, update all consumers
|
|
155
|
-
- One component per commit
|
|
156
|
-
- Report bugs found during migration (don't silently fix)
|
|
157
|
-
- **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.
|
|
158
64
|
|
|
159
65
|
## Output
|
|
160
66
|
|
|
@@ -51,28 +51,11 @@ Unlike competitors that use separate agents for spec review and code review (dou
|
|
|
51
51
|
|
|
52
52
|
## Core Principles
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
- Use HTTPS everywhere, set secure headers (CSP, HSTS, X-Frame-Options)
|
|
60
|
-
- Follow OWASP Top 10 - prevent XSS, CSRF, injection, broken auth, etc.
|
|
61
|
-
- Secrets in environment variables only - never hardcode
|
|
62
|
-
|
|
63
|
-
### Performance First (Mandatory)
|
|
64
|
-
- ALWAYS use OnPush change detection for components
|
|
65
|
-
- Use Angular Signals (signal, computed, effect) for reactive state
|
|
66
|
-
- Lazy load routes and feature modules
|
|
67
|
-
- Use trackBy with @for to minimize DOM operations
|
|
68
|
-
- Avoid unnecessary subscriptions - prefer signals over RxJS where possible
|
|
69
|
-
- Use HttpClient with proper typing - no inline transformations
|
|
70
|
-
- Avoid N+1 queries - batch requests, use proper data loading patterns
|
|
71
|
-
|
|
72
|
-
### Code Language (Mandatory)
|
|
73
|
-
- ALWAYS write code (variables, functions, comments, commits) in English
|
|
74
|
-
- Only use other languages if explicitly requested by the user
|
|
75
|
-
- User-facing text (UI labels, messages) should match project's i18n strategy
|
|
54
|
+
Refer to the pack CLAUDE.md for full stack details and key patterns.
|
|
55
|
+
|
|
56
|
+
- **Security**: Validate all inputs server-side, parameterized queries only, no secrets in code, OWASP Top 10
|
|
57
|
+
- **Performance**: Use the framework's recommended server state caching, lazy load routes and components, no N+1 queries
|
|
58
|
+
- **Code Language**: All code in English. User-facing text follows project i18n strategy
|
|
76
59
|
|
|
77
60
|
## Scope Detection
|
|
78
61
|
- **Review**: user wants code review, PR validation, or violation fixing -> Review mode
|
|
@@ -92,17 +75,9 @@ ng test --watch=false
|
|
|
92
75
|
```
|
|
93
76
|
|
|
94
77
|
### 2. Pattern Checks
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
grep -rn "NgModule" src/modules/ --include="*.ts" 2>/dev/null && echo "VIOLATION: NgModule (should be standalone)"
|
|
99
|
-
grep -rn "constructor(" src/modules/ --include="*.ts" 2>/dev/null | grep -v "\.spec\.ts" && echo "WARNING: constructor DI (use inject())"
|
|
100
|
-
grep -rn "@Input()\|@Output()" src/modules/ --include="*.ts" 2>/dev/null && echo "WARNING: decorator I/O (use input()/output())"
|
|
101
|
-
grep -rn "BehaviorSubject\|ReplaySubject" src/modules/*/stores/ --include="*.ts" 2>/dev/null && echo "WARNING: RxJS in store (use signals)"
|
|
102
|
-
grep -rn ": any\|as any" src/modules/ --include="*.ts" 2>/dev/null && echo "WARNING: any types"
|
|
103
|
-
grep -rn "console\.\|debugger" src/modules/ --include="*.ts" 2>/dev/null && echo "WARNING: debug artifacts"
|
|
104
|
-
grep -rn "innerHTML\|\[innerHTML\]" src/ --include="*.ts" 2>/dev/null && echo "VIOLATION: innerHTML"
|
|
105
|
-
```
|
|
78
|
+
Run `/review-check-architecture $SCOPE` and include the results in the review.
|
|
79
|
+
This skill contains all framework-specific automated checks
|
|
80
|
+
-- do NOT duplicate them here.
|
|
106
81
|
|
|
107
82
|
### 3. Manual Review
|
|
108
83
|
- Services: HttpClient only, no try/catch, no transformation, inject(HttpClient)
|
|
@@ -181,6 +156,20 @@ grep -rn "innerHTML\|\[innerHTML\]" src/ --include="*.ts" 2>/dev/null && echo "V
|
|
|
181
156
|
5. Template: find heavy computation in templates without computed()
|
|
182
157
|
6. Report bottlenecks sorted by user impact
|
|
183
158
|
|
|
159
|
+
## Automatic Fail Triggers
|
|
160
|
+
|
|
161
|
+
The following conditions result in an **AUTOMATIC FAIL** verdict -- no exceptions:
|
|
162
|
+
|
|
163
|
+
| Trigger | Why |
|
|
164
|
+
|---------|-----|
|
|
165
|
+
| "Zero issues found" | Every codebase has improvement areas. Zero findings = insufficient review. |
|
|
166
|
+
| "LGTM" or "Looks good to me" without specifics | Lazy. Explain what you verified and how. |
|
|
167
|
+
| Approval without running `tsc`, `eslint`, `build`, or `tests` | No automated check output = no review. |
|
|
168
|
+
| "Minor issues only" when violations exist | A violation is blocking. Do not minimize. |
|
|
169
|
+
| Praising code that violates ARCHITECTURE.md | Architecture compliance is non-negotiable. |
|
|
170
|
+
| Reviewing without reading ARCHITECTURE.md first | Context-free review is worthless. |
|
|
171
|
+
| Approving code with `any` types in business logic | Type safety is not optional. |
|
|
172
|
+
|
|
184
173
|
## Anti-Sycophancy Protocol
|
|
185
174
|
|
|
186
175
|
### For the Reviewer (Giving Feedback)
|
|
@@ -16,22 +16,22 @@ Run all checks and report a summary:
|
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
echo "=== 1. Services with try/catch ==="
|
|
19
|
-
grep -rn "try {" src/modules/*/services/ --include="*.ts" 2>/dev/null || echo "None"
|
|
19
|
+
grep -rn "try {" src/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(" src/modules/*/services/ --include="*.ts" 2>/dev/null || echo "None"
|
|
22
|
+
grep -rn "\.map(\|\.filter(\|new Date\|\.reduce(" src/modules/*/services/ --include="*.ts" 2>/dev/null || echo "PASS: None"
|
|
23
23
|
|
|
24
24
|
echo "=== 3. NgModule usage ==="
|
|
25
|
-
grep -rn "NgModule\|declarations:" src/modules/ --include="*.ts" 2>/dev/null || echo "All standalone"
|
|
25
|
+
grep -rn "NgModule\|declarations:" src/modules/ --include="*.ts" 2>/dev/null || echo "PASS: All standalone"
|
|
26
26
|
|
|
27
27
|
echo "=== 4. Constructor DI ==="
|
|
28
|
-
grep -rn "constructor(" src/modules/ --include="*.ts" 2>/dev/null | grep -v "\.spec\.ts" || echo "All using inject()"
|
|
28
|
+
grep -rn "constructor(" src/modules/ --include="*.ts" 2>/dev/null | grep -v "\.spec\.ts" || echo "PASS: All using inject()"
|
|
29
29
|
|
|
30
30
|
echo "=== 5. Legacy @Input/@Output decorators ==="
|
|
31
|
-
grep -rn "@Input()\|@Output()" src/modules/ --include="*.ts" 2>/dev/null || echo "All using input()/output()"
|
|
31
|
+
grep -rn "@Input()\|@Output()" src/modules/ --include="*.ts" 2>/dev/null || echo "PASS: All using input()/output()"
|
|
32
32
|
|
|
33
33
|
echo "=== 6. BehaviorSubject in stores ==="
|
|
34
|
-
grep -rn "BehaviorSubject\|ReplaySubject" src/modules/*/stores/ --include="*.ts" 2>/dev/null || echo "All signal-based"
|
|
34
|
+
grep -rn "BehaviorSubject\|ReplaySubject" src/modules/*/stores/ --include="*.ts" 2>/dev/null || echo "PASS: All signal-based"
|
|
35
35
|
|
|
36
36
|
echo "=== 7. Missing OnPush ==="
|
|
37
37
|
grep -rn "@Component" src/modules/ --include="*.ts" -l 2>/dev/null | while read f; do
|
|
@@ -48,7 +48,7 @@ for module in src/modules/*/; do
|
|
|
48
48
|
done
|
|
49
49
|
|
|
50
50
|
echo "=== 10. innerHTML ==="
|
|
51
|
-
grep -rn "innerHTML\|\[innerHTML\]" src/ --include="*.ts" 2>/dev/null || echo "None"
|
|
51
|
+
grep -rn "innerHTML\|\[innerHTML\]" src/ --include="*.ts" 2>/dev/null || echo "PASS: None"
|
|
52
52
|
|
|
53
53
|
echo "=== 11. Debug artifacts ==="
|
|
54
54
|
grep -rn "console\.\|debugger" src/modules/ --include="*.ts" 2>/dev/null | wc -l
|
|
@@ -24,6 +24,7 @@ ng lint
|
|
|
24
24
|
ng test --watch=false
|
|
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: HttpClient only, no try/catch, no transformation, inject(HttpClient)
|
|
29
30
|
- Adapters: pure functions
|
|
@@ -14,28 +14,11 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
14
14
|
|
|
15
15
|
## Core Principles
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
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 server-side data fetching in frontmatter - no unnecessary client JS
|
|
28
|
-
- Choose the LEAST aggressive hydration strategy for islands (`client:visible` > `client:idle` > `client:load`)
|
|
29
|
-
- Use Content Collections for static content - type-safe and optimized at build time
|
|
30
|
-
- Lazy load islands and heavy dependencies
|
|
31
|
-
- Avoid shipping JavaScript unless interactivity is required
|
|
32
|
-
- Use `<Image />` from `astro:assets` for optimized images
|
|
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
|
|
@@ -48,65 +31,16 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
48
31
|
---
|
|
49
32
|
|
|
50
33
|
## Module Mode
|
|
51
|
-
|
|
52
|
-
2. Scaffold `src/modules/[kebab-name]/` with: services/, adapters/, types/, __tests__/, index.ts
|
|
53
|
-
3. Create bottom-up:
|
|
54
|
-
- `types/[name].types.ts` - exact API response (snake_case)
|
|
55
|
-
- `types/[name].contracts.ts` - app contract (camelCase, Date objects)
|
|
56
|
-
- `adapters/[name]-adapter.ts` - pure functions: inbound (API->App) + outbound (App->API)
|
|
57
|
-
- `services/[name]-service.ts` - fetch only: `{ list, getById, create, update, delete }`. No try/catch, no transformation
|
|
58
|
-
4. Create pages in `src/pages/`:
|
|
59
|
-
- List page: fetch in frontmatter, render with .astro components
|
|
60
|
-
- Detail page: `[slug].astro` or `[id].astro` with `getStaticPaths()` for SSG
|
|
61
|
-
- API endpoints: `src/pages/api/[name]/` for mutations
|
|
62
|
-
5. Create .astro components for presentational UI
|
|
63
|
-
6. Create islands for interactive parts only (forms, search, filters)
|
|
64
|
-
7. Validate: `npx astro check && npx astro build`
|
|
34
|
+
Run `/dev-create-module $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
|
|
65
35
|
|
|
66
36
|
## Component Mode
|
|
67
|
-
|
|
68
|
-
2. Determine type:
|
|
69
|
-
- **Astro component** (default): server-rendered, zero JS, `.astro` file
|
|
70
|
-
- **Island**: interactive, needs JS, framework component in `src/islands/`
|
|
71
|
-
3. Astro component template:
|
|
72
|
-
```astro
|
|
73
|
-
---
|
|
74
|
-
interface Props {
|
|
75
|
-
// type all props
|
|
76
|
-
}
|
|
77
|
-
const { prop1, prop2 } = Astro.props
|
|
78
|
-
---
|
|
79
|
-
<div class="component-name">
|
|
80
|
-
<!-- template -->
|
|
81
|
-
</div>
|
|
82
|
-
<style>
|
|
83
|
-
/* scoped styles */
|
|
84
|
-
</style>
|
|
85
|
-
```
|
|
86
|
-
4. Rules: PascalCase.astro, props via `Astro.props`, scoped `<style>`, no JS shipped
|
|
37
|
+
Run `/dev-create-component $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
|
|
87
38
|
|
|
88
39
|
## Service Mode
|
|
89
|
-
|
|
90
|
-
2. Create 4 files:
|
|
91
|
-
- `types/[name].types.ts` - exact API (snake_case, string dates)
|
|
92
|
-
- `types/[name].contracts.ts` - app contract (camelCase, Date, computed booleans)
|
|
93
|
-
- `adapters/[name]-adapter.ts` - pure functions, bidirectional. Rename snake->camel, convert string->Date, cents->currency
|
|
94
|
-
- `services/[name]-service.ts` - fetch only. No try/catch, no transformation, no logic. Export as object with methods
|
|
95
|
-
3. Validate: `npx astro check`
|
|
40
|
+
Run `/dev-create-service $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
|
|
96
41
|
|
|
97
42
|
## Island Mode
|
|
98
|
-
|
|
99
|
-
2. Choose framework: React (.tsx), Vue (.vue), or Svelte (.svelte) based on project preference
|
|
100
|
-
3. Choose hydration strategy:
|
|
101
|
-
- `client:load` - immediately needed (above the fold, critical interaction)
|
|
102
|
-
- `client:idle` - not urgent (sidebar, secondary features)
|
|
103
|
-
- `client:visible` - below the fold (comments, carousels)
|
|
104
|
-
- `client:media="..."` - viewport-specific (mobile menu)
|
|
105
|
-
- `client:only="react"` - skip SSR (auth, browser-API-dependent)
|
|
106
|
-
4. Create in `src/islands/` with typed props
|
|
107
|
-
5. Props must be serializable (no functions, no class instances)
|
|
108
|
-
6. Keep islands small - extract non-interactive parts to .astro components
|
|
109
|
-
7. Validate: `npx astro check && npx astro build`
|
|
43
|
+
Run `/dev-create-island $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
|
|
110
44
|
|
|
111
45
|
## Page Mode
|
|
112
46
|
1. Determine type: static (SSG) or dynamic (SSR)
|
|
@@ -118,10 +52,7 @@ Read `docs/ARCHITECTURE.md`.
|
|
|
118
52
|
7. Validate: `npx astro check && npx astro build`
|
|
119
53
|
|
|
120
54
|
## Test Mode
|
|
121
|
-
|
|
122
|
-
2. Priority: adapters (pure functions, easy) > services (mock fetch) > islands (framework test utils)
|
|
123
|
-
3. Create in `__tests__/[OriginalName].spec.ts`
|
|
124
|
-
4. Run: `npx vitest run [file]`
|
|
55
|
+
Run `/dev-create-test $NAME`. This skill contains the full scaffold workflow -- do NOT duplicate it here.
|
|
125
56
|
|
|
126
57
|
## Verification Protocol
|
|
127
58
|
|
|
@@ -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
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
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 server-side data fetching in frontmatter - no unnecessary client JS
|
|
71
|
-
- Choose the LEAST aggressive hydration strategy for islands (`client:visible` > `client:idle` > `client:load`)
|
|
72
|
-
- Use Content Collections for static content - type-safe and optimized at build time
|
|
73
|
-
- Lazy load islands and heavy dependencies
|
|
74
|
-
- Avoid shipping JavaScript unless interactivity is required
|
|
75
|
-
- Use `<Image />` from `astro:assets` for optimized images
|
|
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
|
|