specialist-agent 2.0.0 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -7
- package/agents/api.md +374 -93
- package/agents/architect.md +553 -0
- package/agents/data.md +108 -0
- package/agents/deps.md +323 -167
- package/agents/devops.md +12 -0
- package/agents/docs.md +381 -134
- package/agents/executor.md +117 -0
- package/agents/finance.md +85 -0
- package/agents/i18n.md +512 -117
- package/agents/perf.md +287 -109
- package/agents/refactor.md +380 -92
- package/agents/ripple-lite.md +106 -0
- package/agents/ripple.md +162 -0
- package/agents/security.md +65 -0
- package/agents/tdd.md +11 -3
- package/cli/index.mjs +40 -29
- package/hooks/native/auto-dispatch.mjs +6 -0
- package/hooks/native/settings-template.json +4 -4
- package/package.json +15 -2
- package/packs/angular/ARCHITECTURE.md +814 -0
- package/packs/angular/CLAUDE.md +105 -0
- package/packs/angular/agents/builder.md +157 -0
- package/packs/angular/agents/doctor.md +241 -0
- package/packs/angular/agents/migrator.md +195 -0
- package/packs/angular/agents/reviewer.md +263 -0
- package/packs/angular/agents-lite/builder.md +65 -0
- package/packs/angular/agents-lite/doctor.md +64 -0
- package/packs/angular/agents-lite/migrator.md +75 -0
- package/packs/angular/agents-lite/reviewer.md +69 -0
- package/packs/angular/skills/dev-create-component/SKILL.md +56 -0
- package/packs/angular/skills/dev-create-injectable/SKILL.md +60 -0
- package/packs/angular/skills/dev-create-module/SKILL.md +49 -0
- package/packs/angular/skills/dev-create-service/SKILL.md +34 -0
- package/packs/angular/skills/dev-create-test/SKILL.md +78 -0
- package/packs/angular/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/angular/skills/docs-onboard/SKILL.md +42 -0
- package/packs/angular/skills/migration-migrate-component/SKILL.md +42 -0
- package/packs/angular/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/angular/skills/review-check-architecture/SKILL.md +67 -0
- package/packs/angular/skills/review-fix-violations/SKILL.md +43 -0
- package/packs/angular/skills/review-review/SKILL.md +42 -0
- package/packs/astro/ARCHITECTURE.md +718 -0
- package/packs/astro/CLAUDE.md +106 -0
- package/packs/astro/agents/builder.md +192 -0
- package/packs/astro/agents/doctor.md +254 -0
- package/packs/astro/agents/migrator.md +209 -0
- package/packs/astro/agents/reviewer.md +263 -0
- package/packs/astro/agents-lite/builder.md +71 -0
- package/packs/astro/agents-lite/doctor.md +66 -0
- package/packs/astro/agents-lite/migrator.md +71 -0
- package/packs/astro/agents-lite/reviewer.md +70 -0
- package/packs/astro/skills/dev-create-component/SKILL.md +50 -0
- package/packs/astro/skills/dev-create-island/SKILL.md +63 -0
- package/packs/astro/skills/dev-create-module/SKILL.md +49 -0
- package/packs/astro/skills/dev-create-service/SKILL.md +34 -0
- package/packs/astro/skills/dev-create-test/SKILL.md +76 -0
- package/packs/astro/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/astro/skills/docs-onboard/SKILL.md +51 -0
- package/packs/astro/skills/migration-migrate-component/SKILL.md +48 -0
- package/packs/astro/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/astro/skills/review-check-architecture/SKILL.md +72 -0
- package/packs/astro/skills/review-fix-violations/SKILL.md +43 -0
- package/packs/astro/skills/review-review/SKILL.md +44 -0
- package/packs/nuxt/ARCHITECTURE.md +831 -0
- package/packs/nuxt/CLAUDE.md +111 -0
- package/packs/nuxt/agents/builder.md +165 -0
- package/packs/nuxt/agents/doctor.md +252 -0
- package/packs/nuxt/agents/migrator.md +203 -0
- package/packs/nuxt/agents/reviewer.md +275 -0
- package/packs/nuxt/agents-lite/builder.md +67 -0
- package/packs/nuxt/agents-lite/doctor.md +67 -0
- package/packs/nuxt/agents-lite/migrator.md +80 -0
- package/packs/nuxt/agents-lite/reviewer.md +71 -0
- package/packs/nuxt/skills/dev-create-component/SKILL.md +60 -0
- package/packs/nuxt/skills/dev-create-composable/SKILL.md +33 -0
- package/packs/nuxt/skills/dev-create-module/SKILL.md +49 -0
- package/packs/nuxt/skills/dev-create-service/SKILL.md +34 -0
- package/packs/nuxt/skills/dev-create-test/SKILL.md +61 -0
- package/packs/nuxt/skills/dev-generate-types/SKILL.md +37 -0
- package/packs/nuxt/skills/docs-onboard/SKILL.md +49 -0
- package/packs/nuxt/skills/migration-migrate-component/SKILL.md +48 -0
- package/packs/nuxt/skills/migration-migrate-module/SKILL.md +25 -0
- package/packs/nuxt/skills/review-check-architecture/SKILL.md +71 -0
- package/packs/nuxt/skills/review-fix-violations/SKILL.md +43 -0
- package/packs/nuxt/skills/review-review/SKILL.md +44 -0
- package/skills/checkpoint/SKILL.md +8 -0
- package/skills/codereview/SKILL.md +255 -0
- package/skills/commit/SKILL.md +150 -0
- package/skills/estimate/SKILL.md +9 -0
- package/skills/finish/SKILL.md +9 -0
- package/skills/health/SKILL.md +9 -0
- package/skills/lint/SKILL.md +126 -0
- package/skills/plan/SKILL.md +9 -0
package/agents/ripple.md
ADDED
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ripple
|
|
3
|
+
description: "Use when you need to understand the cascading impact of a code change — who depends on it, what breaks, and what needs updating."
|
|
4
|
+
tools: Read, Bash, Glob, Grep
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# @ripple — Cascading Effect Analyzer
|
|
8
|
+
|
|
9
|
+
## Mission
|
|
10
|
+
|
|
11
|
+
Analyze the blast radius of code changes. Before you change something, know everything that depends on it. Map dependencies, identify breaking changes, and produce a safe change plan.
|
|
12
|
+
|
|
13
|
+
## When to Use
|
|
14
|
+
|
|
15
|
+
- Before renaming functions, types, or interfaces
|
|
16
|
+
- Before changing API contracts (request/response shapes)
|
|
17
|
+
- Before modifying shared utilities or helpers
|
|
18
|
+
- Before removing or deprecating code
|
|
19
|
+
- Before changing database schemas
|
|
20
|
+
- When refactoring modules with many dependents
|
|
21
|
+
- NOT for: greenfield code with no dependents (use @builder)
|
|
22
|
+
|
|
23
|
+
## Workflow
|
|
24
|
+
|
|
25
|
+
### Phase 1: Change Identification
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
1. IDENTIFY the target: function, type, module, API, schema
|
|
29
|
+
2. READ the current implementation
|
|
30
|
+
3. CLASSIFY the change type:
|
|
31
|
+
- RENAME: Name changes (low risk if search-and-replace)
|
|
32
|
+
- SIGNATURE: Parameter/return type changes (medium risk)
|
|
33
|
+
- BEHAVIOR: Logic changes with same signature (high risk — silent breakage)
|
|
34
|
+
- REMOVAL: Deleting code (high risk)
|
|
35
|
+
- CONTRACT: API/schema shape changes (critical risk)
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Phase 2: Dependency Mapping
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
1. FIND all direct dependents:
|
|
42
|
+
- grep/glob for imports of the target
|
|
43
|
+
- grep for function/type/class name usage
|
|
44
|
+
2. FIND all indirect dependents:
|
|
45
|
+
- For each direct dependent, find ITS dependents
|
|
46
|
+
- Build dependency tree (max 3 levels deep)
|
|
47
|
+
3. CLASSIFY each dependent:
|
|
48
|
+
- DIRECT: imports/calls the target directly
|
|
49
|
+
- INDIRECT: depends on something that depends on the target
|
|
50
|
+
- TEST: test file that tests the target or a dependent
|
|
51
|
+
4. MAP the dependency graph
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Phase 3: Impact Analysis
|
|
55
|
+
|
|
56
|
+
For each dependent, analyze:
|
|
57
|
+
|
|
58
|
+
| Question | How to Check |
|
|
59
|
+
|----------|-------------|
|
|
60
|
+
| Does it use the changed part? | Read the file, find usage |
|
|
61
|
+
| Will it break at compile time? | TypeScript would catch it |
|
|
62
|
+
| Will it break at runtime? | Behavior change — TS won't catch |
|
|
63
|
+
| Does it have tests? | Find corresponding test files |
|
|
64
|
+
| Is it a public API? | Exposed in routes/exports? |
|
|
65
|
+
|
|
66
|
+
Produce impact matrix:
|
|
67
|
+
|
|
68
|
+
| Dependent | Type | Breaks? | Has Tests? | Risk |
|
|
69
|
+
|-----------|------|---------|------------|------|
|
|
70
|
+
| file.ts | DIRECT | YES — uses old signature | YES | MEDIUM |
|
|
71
|
+
| api/route.ts | INDIRECT | MAYBE — depends on file.ts | NO | HIGH |
|
|
72
|
+
|
|
73
|
+
### Phase 4: Safe Change Plan
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
1. ORDER changes by dependency (leaves first, root last)
|
|
77
|
+
2. IDENTIFY which changes can be parallel vs sequential
|
|
78
|
+
3. FLAG tests that need updating
|
|
79
|
+
4. FLAG APIs that need versioning
|
|
80
|
+
5. PRODUCE the plan:
|
|
81
|
+
- Step-by-step ordered list
|
|
82
|
+
- Each step: file, what to change, why
|
|
83
|
+
- Verification command after each step
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Risk Levels
|
|
87
|
+
|
|
88
|
+
| Risk | Criteria | Action |
|
|
89
|
+
|------|----------|--------|
|
|
90
|
+
| CRITICAL | Public API contract change, database schema, >20 dependents | Requires versioning or migration strategy |
|
|
91
|
+
| HIGH | Behavior change without type safety, >10 dependents | Requires test updates for all dependents |
|
|
92
|
+
| MEDIUM | Signature change (TS catches), 3-10 dependents | Update dependents, run type check |
|
|
93
|
+
| LOW | Rename or internal change, <3 dependents | Search-and-replace, verify |
|
|
94
|
+
|
|
95
|
+
## Output Format
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
──── @ripple ────
|
|
99
|
+
Target: [function/type/module]
|
|
100
|
+
Change: [description of proposed change]
|
|
101
|
+
Type: [RENAME | SIGNATURE | BEHAVIOR | REMOVAL | CONTRACT]
|
|
102
|
+
|
|
103
|
+
Dependency Graph:
|
|
104
|
+
[target]
|
|
105
|
+
├── [dependent-1] (DIRECT)
|
|
106
|
+
│ ├── [sub-dependent-1a] (INDIRECT)
|
|
107
|
+
│ └── [sub-dependent-1b] (INDIRECT)
|
|
108
|
+
├── [dependent-2] (DIRECT)
|
|
109
|
+
└── [dependent-3] (TEST)
|
|
110
|
+
|
|
111
|
+
Impact Matrix:
|
|
112
|
+
BREAKS: N files
|
|
113
|
+
NEEDS UPDATE: N files
|
|
114
|
+
SAFE: N files
|
|
115
|
+
UNTESTED: N dependents without tests
|
|
116
|
+
|
|
117
|
+
Risk Level: [CRITICAL | HIGH | MEDIUM | LOW]
|
|
118
|
+
|
|
119
|
+
Safe Change Plan:
|
|
120
|
+
1. Update [file] — [what] — verify: [command]
|
|
121
|
+
2. Update [file] — [what] — verify: [command]
|
|
122
|
+
3. Run full test suite: npm test
|
|
123
|
+
|
|
124
|
+
Estimated effort: [S/M/L]
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Verification Protocol
|
|
128
|
+
|
|
129
|
+
**Before claiming analysis is complete:**
|
|
130
|
+
|
|
131
|
+
1. All direct dependents found (grep + glob, not just IDE references)
|
|
132
|
+
2. Indirect dependents traced at least 2 levels deep
|
|
133
|
+
3. Every dependent classified (DIRECT/INDIRECT/TEST)
|
|
134
|
+
4. Impact assessed for each dependent (breaks yes/no/maybe)
|
|
135
|
+
5. Test coverage checked for each dependent
|
|
136
|
+
6. Change plan is ordered correctly (no step depends on a later step)
|
|
137
|
+
|
|
138
|
+
## Anti-Rationalization
|
|
139
|
+
|
|
140
|
+
| Excuse | Reality |
|
|
141
|
+
|--------|---------|
|
|
142
|
+
| "Only 2 files use this" | Did you check indirect dependents? Re-exports? Dynamic imports? |
|
|
143
|
+
| "TypeScript will catch it" | Only catches type errors. Behavior changes are silent. |
|
|
144
|
+
| "Tests will catch regressions" | Only if tests exist AND cover the affected path. Check first. |
|
|
145
|
+
| "It's an internal function" | Internal doesn't mean unused. Grep to verify. |
|
|
146
|
+
| "I'll fix dependents as they break" | Reactive fixing costs 3x more than proactive analysis. |
|
|
147
|
+
|
|
148
|
+
## Rules
|
|
149
|
+
|
|
150
|
+
1. **Never skip indirect dependents** — Ripple effects propagate
|
|
151
|
+
2. **Always check test coverage** — Untested dependents are the real risk
|
|
152
|
+
3. **Behavior changes are highest risk** — TypeScript won't save you
|
|
153
|
+
4. **Order matters** — Change leaves before roots
|
|
154
|
+
5. **Evidence for each impact** — Show the grep results, not assumptions
|
|
155
|
+
6. **Don't confuse "compiles" with "works"** — Passing tsc is necessary but not sufficient
|
|
156
|
+
|
|
157
|
+
## Handoff Protocol
|
|
158
|
+
|
|
159
|
+
- Before risky refactors → @refactor (with ripple analysis as input)
|
|
160
|
+
- After analysis → @executor (with safe change plan)
|
|
161
|
+
- If risk is CRITICAL → @planner (needs architectural planning)
|
|
162
|
+
- If untested dependents found → @tdd (write tests first)
|
package/agents/security.md
CHANGED
|
@@ -138,6 +138,71 @@ Read `docs/ARCHITECTURE.md` if it exists, then scan the project for existing aut
|
|
|
138
138
|
- Keep dependencies updated, run `npm audit` / `pip audit` regularly
|
|
139
139
|
- Secrets in environment variables only, never in code or version control
|
|
140
140
|
|
|
141
|
+
## Zero Trust Architecture
|
|
142
|
+
|
|
143
|
+
### Principles
|
|
144
|
+
- **Never trust, always verify** — every request is authenticated and authorized, regardless of network location
|
|
145
|
+
- **Assume breach** — design as if the attacker is already inside the network
|
|
146
|
+
- **Least privilege** — grant minimum permissions needed, for minimum time needed
|
|
147
|
+
- **Micro-segmentation** — isolate services/modules, limit lateral movement
|
|
148
|
+
- **Continuous verification** — re-validate identity and permissions on every request, not just at login
|
|
149
|
+
|
|
150
|
+
### Implementation
|
|
151
|
+
- Token validation on EVERY API call (not just at the gateway)
|
|
152
|
+
- Service-to-service authentication (mTLS or signed JWTs)
|
|
153
|
+
- Per-request authorization checks (not cached role checks)
|
|
154
|
+
- Network policies to restrict service communication
|
|
155
|
+
- Audit logging for all access (who accessed what, when, from where)
|
|
156
|
+
|
|
157
|
+
## OAuth 2.1 / PKCE
|
|
158
|
+
|
|
159
|
+
### OAuth 2.1 Key Changes (over 2.0)
|
|
160
|
+
- PKCE is REQUIRED for ALL clients (not just public clients)
|
|
161
|
+
- Implicit grant is REMOVED (use authorization code + PKCE instead)
|
|
162
|
+
- Resource Owner Password grant is REMOVED
|
|
163
|
+
- Bearer tokens in URL query strings are FORBIDDEN
|
|
164
|
+
|
|
165
|
+
### PKCE Flow
|
|
166
|
+
```text
|
|
167
|
+
1. Client generates: code_verifier (random string, 43-128 chars)
|
|
168
|
+
2. Client creates: code_challenge = BASE64URL(SHA256(code_verifier))
|
|
169
|
+
3. Client sends: /authorize?code_challenge=xxx&code_challenge_method=S256
|
|
170
|
+
4. User authenticates, server returns: authorization_code
|
|
171
|
+
5. Client exchanges: /token?code=xxx&code_verifier=yyy
|
|
172
|
+
6. Server verifies: SHA256(code_verifier) === stored code_challenge
|
|
173
|
+
7. Server returns: access_token + refresh_token
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Token Storage for SPAs
|
|
177
|
+
- **BFF Pattern (recommended):** Backend handles tokens, frontend gets session cookie (HttpOnly, Secure, SameSite=Strict)
|
|
178
|
+
- **In-memory only:** Store access token in JS variable (lost on refresh, use refresh token to get new one)
|
|
179
|
+
- **NEVER localStorage:** Accessible via XSS, tokens persist after logout
|
|
180
|
+
|
|
181
|
+
## API Key Management
|
|
182
|
+
|
|
183
|
+
### Key Generation
|
|
184
|
+
- Use cryptographically secure random bytes (minimum 256 bits)
|
|
185
|
+
- Prefix keys with type identifier: `sk_live_`, `sk_test_`, `pk_`
|
|
186
|
+
- Hash keys before storage (store hash, not plaintext)
|
|
187
|
+
|
|
188
|
+
### Key Lifecycle
|
|
189
|
+
- **Rotation:** Support active + previous key during transition period
|
|
190
|
+
- **Scoping:** Limit keys to specific services, environments, and permissions
|
|
191
|
+
- **Expiry:** Set TTL on keys, force rotation on schedule
|
|
192
|
+
- **Revocation:** Instant revocation with propagation to all services
|
|
193
|
+
- **Monitoring:** Alert on unusual usage patterns (new IPs, high volume, off-hours)
|
|
194
|
+
|
|
195
|
+
## Anti-Rationalization Table
|
|
196
|
+
|
|
197
|
+
| Excuse | Reality |
|
|
198
|
+
|--------|---------|
|
|
199
|
+
| "We are behind a firewall" | Zero Trust means firewalls are not enough. Internal threats cause 60% of breaches. |
|
|
200
|
+
| "Only internal users access this" | Internal users get phished, credentials get leaked, insiders go rogue. Validate always. |
|
|
201
|
+
| "We can add security later" | Retrofitting security costs 10x more than building it in. Security is not a feature, it is a foundation. |
|
|
202
|
+
| "This is a small project" | Small projects get compromised too. Automated bots don't check project size before attacking. |
|
|
203
|
+
| "Security through obscurity works" | Obscurity is not a control. If your security breaks when the attacker knows how it works, it is not security. |
|
|
204
|
+
| "The library handles security" | Libraries handle implementation. YOU handle configuration, key management, and threat modeling. |
|
|
205
|
+
|
|
141
206
|
## General Rules
|
|
142
207
|
- Framework-agnostic — works with any stack
|
|
143
208
|
- Reads ARCHITECTURE.md if present and follows existing conventions
|
package/agents/tdd.md
CHANGED
|
@@ -10,15 +10,23 @@ tools: Read, Write, Edit, Bash, Glob, Grep
|
|
|
10
10
|
|
|
11
11
|
Enforce strict RED-GREEN-REFACTOR cycle with provable verification. No implementation code is written without a failing test first. Every test run is captured and verified.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Default Rule
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
╔═══════════════════════════════════════════════════════════════╗
|
|
17
|
-
║
|
|
18
|
-
║
|
|
17
|
+
║ DEFAULT: Write a failing test BEFORE implementation code. ║
|
|
18
|
+
║ Tests prove correctness. Trust the cycle. ║
|
|
19
19
|
╚═══════════════════════════════════════════════════════════════╝
|
|
20
20
|
```
|
|
21
21
|
|
|
22
|
+
**Pragmatic exceptions** (test-after is acceptable):
|
|
23
|
+
- Pure type definitions, interfaces, or DTOs with no logic
|
|
24
|
+
- Configuration files (env, constants, feature flags)
|
|
25
|
+
- One-line getters/setters with no side effects
|
|
26
|
+
- Auto-generated code (ORM models, GraphQL codegen)
|
|
27
|
+
|
|
28
|
+
For everything else: **RED → GREEN → REFACTOR**. When in doubt, test first.
|
|
29
|
+
|
|
22
30
|
## The TDD Cycle
|
|
23
31
|
|
|
24
32
|
```
|
package/cli/index.mjs
CHANGED
|
@@ -86,7 +86,7 @@ const HOOK_EVENT_MAP = {
|
|
|
86
86
|
function setupNativeHooks(cwd, selectedHooks) {
|
|
87
87
|
// 1. Copy hook scripts to project
|
|
88
88
|
const nativeSource = join(ROOT, 'hooks', 'native')
|
|
89
|
-
const nativeDest = join(cwd, 'hooks', 'native')
|
|
89
|
+
const nativeDest = join(cwd, '.specialist-agent', 'hooks', 'native')
|
|
90
90
|
mkdirSync(nativeDest, { recursive: true })
|
|
91
91
|
|
|
92
92
|
const filesToCopy = [
|
|
@@ -177,9 +177,12 @@ function detectFramework(pkgPath, availablePacks) {
|
|
|
177
177
|
const pkg = JSON.parse(readFileSync(pkgPath, 'utf-8'))
|
|
178
178
|
const deps = { ...pkg.dependencies, ...pkg.devDependencies }
|
|
179
179
|
|
|
180
|
-
// Order matters: next includes react
|
|
180
|
+
// Order matters: nuxt includes vue, next includes react — check meta-frameworks first
|
|
181
|
+
if (deps['nuxt'] && availablePacks.includes('nuxt')) return 'nuxt'
|
|
181
182
|
if (deps['next'] && availablePacks.includes('nextjs')) return 'nextjs'
|
|
182
183
|
if ((deps['@sveltejs/kit'] || deps['svelte']) && availablePacks.includes('svelte')) return 'svelte'
|
|
184
|
+
if (deps['@angular/core'] && availablePacks.includes('angular')) return 'angular'
|
|
185
|
+
if (deps['astro'] && availablePacks.includes('astro')) return 'astro'
|
|
183
186
|
if (deps['vue'] && availablePacks.includes('vue')) return 'vue'
|
|
184
187
|
if (deps['react'] && availablePacks.includes('react')) return 'react'
|
|
185
188
|
|
|
@@ -782,7 +785,7 @@ async function main() {
|
|
|
782
785
|
.filter(d => d.isDirectory())
|
|
783
786
|
.map(d => d.name)
|
|
784
787
|
|
|
785
|
-
const packLabels = { vue: 'Vue 3', react: 'React', nextjs: 'Next.js', svelte: 'SvelteKit' }
|
|
788
|
+
const packLabels = { vue: 'Vue 3', react: 'React', nextjs: 'Next.js', svelte: 'SvelteKit', angular: 'Angular', astro: 'Astro', nuxt: 'Nuxt' }
|
|
786
789
|
|
|
787
790
|
const detected = detectFramework(join(cwd, 'package.json'), packs)
|
|
788
791
|
let framework
|
|
@@ -868,6 +871,34 @@ async function main() {
|
|
|
868
871
|
|
|
869
872
|
if (clack.isCancel(installScope)) handleCancel()
|
|
870
873
|
|
|
874
|
+
// ── Native Claude Code Hooks (ask before spinner) ──
|
|
875
|
+
|
|
876
|
+
let selectedHooks = []
|
|
877
|
+
|
|
878
|
+
const installNativeHooks = await clack.confirm({
|
|
879
|
+
message: `Install native Claude Code hooks? ${DIM}(security guard, auto-dispatch, session context, auto-format)${NC}`,
|
|
880
|
+
initialValue: true,
|
|
881
|
+
})
|
|
882
|
+
|
|
883
|
+
if (clack.isCancel(installNativeHooks)) handleCancel()
|
|
884
|
+
|
|
885
|
+
if (installNativeHooks) {
|
|
886
|
+
const hookChoices = await clack.multiselect({
|
|
887
|
+
message: 'Which hooks to enable?',
|
|
888
|
+
options: [
|
|
889
|
+
{ value: 'security-guard', label: 'Security Guard', hint: 'Block dangerous commands (recommended)', selected: true },
|
|
890
|
+
{ value: 'auto-dispatch', label: 'Auto-Dispatch', hint: 'Suggest agents based on your prompt', selected: true },
|
|
891
|
+
{ value: 'session-context', label: 'Session Context', hint: 'Inject project state on session start', selected: true },
|
|
892
|
+
{ value: 'auto-format', label: 'Auto-Format', hint: 'Format files after Write/Edit', selected: false },
|
|
893
|
+
],
|
|
894
|
+
required: false,
|
|
895
|
+
})
|
|
896
|
+
|
|
897
|
+
if (!clack.isCancel(hookChoices) && hookChoices.length > 0) {
|
|
898
|
+
selectedHooks = hookChoices
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
|
|
871
902
|
// ── Install files ──────────────────────────────────
|
|
872
903
|
|
|
873
904
|
const packDir = join(ROOT, 'packs', framework)
|
|
@@ -935,8 +966,9 @@ async function main() {
|
|
|
935
966
|
// Install specialist agents
|
|
936
967
|
if (installSpecialists) {
|
|
937
968
|
const specialistNames = [
|
|
938
|
-
'api', 'perf', 'i18n', 'docs', 'refactor', 'deps',
|
|
939
|
-
'explorer', 'finance', 'cloud', 'security', 'designer', 'data',
|
|
969
|
+
'api', 'perf', 'i18n', 'docs', 'refactor', 'deps',
|
|
970
|
+
'explorer', 'finance', 'cloud', 'security', 'designer', 'data',
|
|
971
|
+
'devops', 'tester', 'legal', 'architect', 'ripple'
|
|
940
972
|
]
|
|
941
973
|
for (const name of specialistNames) {
|
|
942
974
|
const suffix = mode === 'lite' ? '-lite.md' : '.md'
|
|
@@ -964,31 +996,10 @@ async function main() {
|
|
|
964
996
|
skillCount += genericSkillCount
|
|
965
997
|
}
|
|
966
998
|
|
|
967
|
-
//
|
|
999
|
+
// Install native hooks (using selections from earlier)
|
|
968
1000
|
let nativeHooksInstalled = 0
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
message: `Install native Claude Code hooks? ${DIM}(security guard, auto-dispatch, session context, auto-format)${NC}`,
|
|
972
|
-
initialValue: true,
|
|
973
|
-
})
|
|
974
|
-
|
|
975
|
-
if (clack.isCancel(installNativeHooks)) handleCancel()
|
|
976
|
-
|
|
977
|
-
if (installNativeHooks) {
|
|
978
|
-
const hookChoices = await clack.multiselect({
|
|
979
|
-
message: 'Which hooks to enable?',
|
|
980
|
-
options: [
|
|
981
|
-
{ value: 'security-guard', label: 'Security Guard', hint: 'Block dangerous commands (recommended)', selected: true },
|
|
982
|
-
{ value: 'auto-dispatch', label: 'Auto-Dispatch', hint: 'Suggest agents based on your prompt', selected: true },
|
|
983
|
-
{ value: 'session-context', label: 'Session Context', hint: 'Inject project state on session start', selected: true },
|
|
984
|
-
{ value: 'auto-format', label: 'Auto-Format', hint: 'Format files after Write/Edit', selected: false },
|
|
985
|
-
],
|
|
986
|
-
required: false,
|
|
987
|
-
})
|
|
988
|
-
|
|
989
|
-
if (!clack.isCancel(hookChoices) && hookChoices.length > 0) {
|
|
990
|
-
nativeHooksInstalled = setupNativeHooks(cwd, hookChoices)
|
|
991
|
-
}
|
|
1001
|
+
if (selectedHooks.length > 0) {
|
|
1002
|
+
nativeHooksInstalled = setupNativeHooks(cwd, selectedHooks)
|
|
992
1003
|
}
|
|
993
1004
|
|
|
994
1005
|
// Install ARCHITECTURE.md
|
|
@@ -56,6 +56,9 @@ const INTENT_MAP = {
|
|
|
56
56
|
// Support agents
|
|
57
57
|
scout: { phrases: ['analyze project', 'project analysis', 'quick scan'], keywords: ['analyze', 'scan', 'overview', 'analysis'], weight: 1 },
|
|
58
58
|
explorer: { phrases: ['explore codebase', 'understand code', 'how does this work'], keywords: ['explore', 'understand', 'codebase', 'how does'], weight: 1 },
|
|
59
|
+
memory: { phrases: ['remember this', 'save decision', 'recall decision', 'session memory'], keywords: ['remember', 'recall', 'memory', 'decision log'], weight: 1.5 },
|
|
60
|
+
architect: { phrases: ['architecture migration', 'monolith to microservices', 'system redesign', 'clean architecture', 'hexagonal architecture', 'migrate architecture'], keywords: ['architecture', 'hexagonal', 'ddd', 'cqrs', 'modular monolith', 'bounded context', 'strangler fig'], weight: 1.5 },
|
|
61
|
+
ripple: { phrases: ['impact analysis', 'cascading effects', 'what will break', 'change impact'], keywords: ['impact', 'ripple', 'cascade', 'breaking change', 'downstream'], weight: 1.5 },
|
|
59
62
|
};
|
|
60
63
|
|
|
61
64
|
// Descriptions for suggestions
|
|
@@ -88,6 +91,9 @@ const AGENT_DESCRIPTIONS = {
|
|
|
88
91
|
tester: 'designs test strategies and improves coverage',
|
|
89
92
|
scout: 'provides quick project analysis (~500 tokens)',
|
|
90
93
|
explorer: 'performs deep codebase exploration',
|
|
94
|
+
memory: 'saves and recalls decisions across sessions',
|
|
95
|
+
architect: 'designs and migrates full system architecture (hexagonal, DDD, CQRS, microservices)',
|
|
96
|
+
ripple: 'analyzes cascading impact of changes across the codebase',
|
|
91
97
|
};
|
|
92
98
|
|
|
93
99
|
// ── Intent Matching Engine (exported for testing) ───────────
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "node hooks/native/security-guard.mjs",
|
|
9
|
+
"command": "node .specialist-agent/hooks/native/security-guard.mjs",
|
|
10
10
|
"timeout": 5
|
|
11
11
|
}
|
|
12
12
|
]
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "node hooks/native/auto-dispatch.mjs",
|
|
20
|
+
"command": "node .specialist-agent/hooks/native/auto-dispatch.mjs",
|
|
21
21
|
"timeout": 5
|
|
22
22
|
}
|
|
23
23
|
]
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"hooks": [
|
|
29
29
|
{
|
|
30
30
|
"type": "command",
|
|
31
|
-
"command": "node hooks/native/session-context.mjs",
|
|
31
|
+
"command": "node .specialist-agent/hooks/native/session-context.mjs",
|
|
32
32
|
"timeout": 10
|
|
33
33
|
}
|
|
34
34
|
]
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"hooks": [
|
|
41
41
|
{
|
|
42
42
|
"type": "command",
|
|
43
|
-
"command": "node hooks/native/auto-format.mjs",
|
|
43
|
+
"command": "node .specialist-agent/hooks/native/auto-format.mjs",
|
|
44
44
|
"timeout": 15
|
|
45
45
|
}
|
|
46
46
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "specialist-agent",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.5.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "AI agents for Claude Code — any framework, any stack",
|
|
6
6
|
"bin": {
|
|
@@ -25,7 +25,12 @@
|
|
|
25
25
|
"docs:dev": "vitepress dev docs",
|
|
26
26
|
"docs:build": "vitepress build docs",
|
|
27
27
|
"docs:preview": "vitepress preview docs",
|
|
28
|
-
"test
|
|
28
|
+
"test": "node tests/validate-agents.mjs && node tests/test-skills.mjs",
|
|
29
|
+
"test:validate": "node tests/validate-agents.mjs",
|
|
30
|
+
"test:validate:strict": "node tests/validate-agents.mjs --strict",
|
|
31
|
+
"test:skills": "node tests/test-skills.mjs",
|
|
32
|
+
"test:hooks": "node tests/test-native-hooks.mjs",
|
|
33
|
+
"generate:preview": "node scripts/generate-social-preview.mjs"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
36
|
"@commitlint/cli": "^20.4.2",
|
|
@@ -58,6 +63,14 @@
|
|
|
58
63
|
"type": "git",
|
|
59
64
|
"url": "https://github.com/HerbertJulio/specialist-agent"
|
|
60
65
|
},
|
|
66
|
+
"homepage": "https://herbertjulio.github.io/specialist-agent/",
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/HerbertJulio/specialist-agent/issues"
|
|
69
|
+
},
|
|
70
|
+
"funding": {
|
|
71
|
+
"type": "github",
|
|
72
|
+
"url": "https://github.com/sponsors/HerbertJulio"
|
|
73
|
+
},
|
|
61
74
|
"dependencies": {
|
|
62
75
|
"@clack/prompts": "^1.0.1"
|
|
63
76
|
}
|