writethevision 7.0.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/README.md +382 -0
- package/bin/wtv.js +8 -0
- package/package.json +51 -0
- package/src/cli.js +4452 -0
- package/templates/VISION_TEMPLATE.md +22 -0
- package/templates/WTV.md +37 -0
- package/templates/agents/aholiab.md +58 -0
- package/templates/agents/bezaleel.md +58 -0
- package/templates/agents/david.md +60 -0
- package/templates/agents/ezra.md +57 -0
- package/templates/agents/hiram.md +59 -0
- package/templates/agents/moses.md +57 -0
- package/templates/agents/nehemiah.md +59 -0
- package/templates/agents/paul.md +360 -0
- package/templates/agents/solomon.md +57 -0
- package/templates/agents/zerubbabel.md +57 -0
- package/templates/skills/aholiab-seo/SKILL.md +456 -0
- package/templates/skills/aholiab-ui/SKILL.md +377 -0
- package/templates/skills/aholiab-ux/SKILL.md +393 -0
- package/templates/skills/bezaleel-architect/SKILL.md +395 -0
- package/templates/skills/bezaleel-stack/SKILL.md +782 -0
- package/templates/skills/david-copy/SKILL.md +423 -0
- package/templates/skills/ezra-docs/SKILL.md +391 -0
- package/templates/skills/ezra-qa/SKILL.md +407 -0
- package/templates/skills/hiram-backend/SKILL.md +383 -0
- package/templates/skills/hiram-performance/SKILL.md +404 -0
- package/templates/skills/moses-product/SKILL.md +413 -0
- package/templates/skills/moses-user-testing/SKILL.md +215 -0
- package/templates/skills/nehemiah-compliance/SKILL.md +450 -0
- package/templates/skills/nehemiah-security/SKILL.md +352 -0
- package/templates/skills/paul-artisan-contract/SKILL.md +179 -0
- package/templates/skills/paul-quality/SKILL.md +410 -0
- package/templates/skills/solomon-database/SKILL.md +390 -0
- package/templates/skills/wtv/SKILL.md +397 -0
- package/templates/skills/zerubbabel-cost/SKILL.md +389 -0
- package/templates/skills/zerubbabel-devops/SKILL.md +389 -0
- package/templates/skills/zerubbabel-observability/SKILL.md +483 -0
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: bezaleel-stack
|
|
3
|
+
description: Provides comprehensive technology stack auditing with LIVE RESEARCH capability. Analyzes version currency, code patterns, conventions, anti-patterns, and security advisories for ANY framework (Laravel, React, Vue, Symfony, etc.). Use this skill when the user needs technology stack audit, framework best practices review, or package analysis. Produces detailed consultant-style reports with findings and prioritized recommendations — does NOT write implementation code.
|
|
4
|
+
aliases: [audit-stack, plan-stack]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stack Consultant
|
|
8
|
+
|
|
9
|
+
Technology stack best practices consultant with LIVE RESEARCH capability. Audits your codebase against current-day best practices by actively researching official documentation and community recommendations.
|
|
10
|
+
|
|
11
|
+
**This is THE consultant for framework-specific audits** - whether Laravel, React, Vue, Symfony, or any other technology. It combines:
|
|
12
|
+
1. **Version Currency Analysis** - Is your stack up-to-date?
|
|
13
|
+
2. **Code Pattern Audit** - Are you using the framework correctly?
|
|
14
|
+
3. **Live Research** - Current best practices from official sources
|
|
15
|
+
|
|
16
|
+
## Core Principles
|
|
17
|
+
|
|
18
|
+
1. **Never rely on cached knowledge for best practices.** Technology evolves daily.
|
|
19
|
+
2. **Always get the current date first.** Use it in all search queries.
|
|
20
|
+
3. **Framework-agnostic detection.** Don't assume any specific stack - detect what's installed.
|
|
21
|
+
4. **Every recommendation needs a source.** No advice without a URL and access date.
|
|
22
|
+
|
|
23
|
+
## CRITICAL: Get Current Date First
|
|
24
|
+
|
|
25
|
+
Before ANY research, execute:
|
|
26
|
+
```bash
|
|
27
|
+
date +%Y-%m-%d
|
|
28
|
+
# Store as CURRENT_DATE
|
|
29
|
+
# Extract year as CURRENT_YEAR
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Use `{CURRENT_YEAR}` in ALL WebSearch queries. Never hardcode a year.
|
|
33
|
+
|
|
34
|
+
## Trigger
|
|
35
|
+
|
|
36
|
+
Use this consultant when:
|
|
37
|
+
- Running `/audit-stack` command
|
|
38
|
+
- Need to verify framework/package best practices
|
|
39
|
+
- Preparing for major version upgrades
|
|
40
|
+
- Checking for deprecated patterns
|
|
41
|
+
- Ensuring security compliance with latest advisories
|
|
42
|
+
|
|
43
|
+
## Capabilities
|
|
44
|
+
|
|
45
|
+
### 1. Stack Detection (Framework-Agnostic)
|
|
46
|
+
|
|
47
|
+
Detect the technology stack by reading config files:
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
composer.json → Backend framework & packages
|
|
51
|
+
- Laravel? Symfony? Slim? CakePHP? Pure PHP?
|
|
52
|
+
|
|
53
|
+
package.json → Frontend framework & packages
|
|
54
|
+
- React? Vue? Svelte? Angular? Solid?
|
|
55
|
+
- What state management? What UI library?
|
|
56
|
+
|
|
57
|
+
Config files → Additional technologies
|
|
58
|
+
- tsconfig.json → TypeScript
|
|
59
|
+
- tailwind.config.* / uno.config.* → CSS framework
|
|
60
|
+
- vite.config.* / webpack.config.* → Build tool
|
|
61
|
+
- next.config.* / nuxt.config.* → Meta-framework
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 2. Dynamic Hierarchy Building
|
|
65
|
+
|
|
66
|
+
Build the dependency tree based on what's detected:
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Example A (Laravel/React):
|
|
70
|
+
├── Backend: Laravel 11.x
|
|
71
|
+
├── Frontend: React 19.x
|
|
72
|
+
│ └── Inertia.js (bridge)
|
|
73
|
+
├── Types: TypeScript 5.x
|
|
74
|
+
├── Styling: Tailwind CSS 4.x
|
|
75
|
+
└── Build: Vite 6.x
|
|
76
|
+
|
|
77
|
+
Example B (Symfony/Vue):
|
|
78
|
+
├── Backend: Symfony 7.x
|
|
79
|
+
├── Frontend: Vue 3.x
|
|
80
|
+
│ └── Pinia (state)
|
|
81
|
+
├── Styling: UnoCSS
|
|
82
|
+
└── Build: Vite 6.x
|
|
83
|
+
|
|
84
|
+
Example C (Next.js Full Stack):
|
|
85
|
+
├── Framework: Next.js 15.x
|
|
86
|
+
│ └── React 19.x (included)
|
|
87
|
+
├── Types: TypeScript 5.x
|
|
88
|
+
├── Styling: Tailwind CSS 4.x
|
|
89
|
+
└── ORM: Prisma 6.x
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### 3. Live Research (CRITICAL)
|
|
93
|
+
|
|
94
|
+
For each detected package, execute WebSearch WITH CURRENT_YEAR:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
Research Pattern:
|
|
98
|
+
1. "{package} {version} best practices {CURRENT_YEAR}"
|
|
99
|
+
2. "{package} official documentation"
|
|
100
|
+
3. "{package} {version} deprecated features {CURRENT_YEAR}"
|
|
101
|
+
4. "{package} security advisories {CURRENT_YEAR}"
|
|
102
|
+
5. "{package} {installed_version} to {latest_version} migration"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### 4. Codebase Audit
|
|
106
|
+
|
|
107
|
+
Compare actual code against researched best practices:
|
|
108
|
+
- Pattern matching for anti-patterns
|
|
109
|
+
- Configuration validation
|
|
110
|
+
- Usage pattern analysis
|
|
111
|
+
- Security practice verification
|
|
112
|
+
|
|
113
|
+
### 5. Recommendation Generation
|
|
114
|
+
|
|
115
|
+
Every recommendation MUST include:
|
|
116
|
+
- Source URL
|
|
117
|
+
- Research date (CURRENT_DATE)
|
|
118
|
+
- Current code example with file:line
|
|
119
|
+
- Recommended code example
|
|
120
|
+
- Rationale from source
|
|
121
|
+
|
|
122
|
+
## Research Methodology
|
|
123
|
+
|
|
124
|
+
### Phase 0: Get Current Date
|
|
125
|
+
```bash
|
|
126
|
+
CURRENT_DATE=$(date +%Y-%m-%d)
|
|
127
|
+
CURRENT_YEAR=$(date +%Y)
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Phase 1: Stack Detection
|
|
131
|
+
```
|
|
132
|
+
1. Read composer.json / package.json
|
|
133
|
+
2. Identify core frameworks
|
|
134
|
+
3. Identify significant packages (high usage)
|
|
135
|
+
4. Build dependency hierarchy
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Phase 2: Version Discovery
|
|
139
|
+
```
|
|
140
|
+
For each detected package:
|
|
141
|
+
1. Read installed version from lock file
|
|
142
|
+
2. WebSearch: "{package} latest stable version {CURRENT_YEAR}"
|
|
143
|
+
3. WebSearch: "{package} LTS version" (if applicable)
|
|
144
|
+
4. Determine: patch needed, minor update, major migration
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Phase 3: Best Practices Research
|
|
148
|
+
```
|
|
149
|
+
For each significant package:
|
|
150
|
+
1. WebSearch: "{package} {version} best practices {CURRENT_YEAR}"
|
|
151
|
+
2. WebFetch: Official documentation URL
|
|
152
|
+
3. WebSearch: "{package} common mistakes {CURRENT_YEAR}"
|
|
153
|
+
4. WebSearch: "{package} performance best practices"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Phase 4: Deprecation Research
|
|
157
|
+
```
|
|
158
|
+
For each package:
|
|
159
|
+
1. WebSearch: "{package} {version} deprecated {CURRENT_YEAR}"
|
|
160
|
+
2. WebSearch: "{package} breaking changes changelog"
|
|
161
|
+
3. Cross-reference with codebase usage
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Phase 5: Security Research
|
|
165
|
+
```
|
|
166
|
+
For each package:
|
|
167
|
+
1. WebSearch: "{package} CVE {CURRENT_YEAR}"
|
|
168
|
+
2. WebSearch: "{package} security advisory {CURRENT_YEAR}"
|
|
169
|
+
3. Check for known vulnerabilities
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Phase 6: Code Pattern Analysis
|
|
173
|
+
```
|
|
174
|
+
For each framework, audit actual code usage:
|
|
175
|
+
|
|
176
|
+
Laravel:
|
|
177
|
+
- Eloquent patterns (eager loading, scopes, casts)
|
|
178
|
+
- Service container / dependency injection
|
|
179
|
+
- Route organization and middleware
|
|
180
|
+
- Form requests and validation
|
|
181
|
+
- Event/listener patterns
|
|
182
|
+
- Queue job structure
|
|
183
|
+
- First-party package utilization
|
|
184
|
+
|
|
185
|
+
React:
|
|
186
|
+
- Hook patterns (useEffect cleanup, deps)
|
|
187
|
+
- Component organization
|
|
188
|
+
- State management patterns
|
|
189
|
+
- Memoization usage
|
|
190
|
+
- Error boundaries
|
|
191
|
+
- TypeScript integration
|
|
192
|
+
|
|
193
|
+
Inertia.js:
|
|
194
|
+
- Partial reloads usage
|
|
195
|
+
- Shared data patterns
|
|
196
|
+
- Form helper utilization
|
|
197
|
+
- Link prefetching
|
|
198
|
+
|
|
199
|
+
TypeScript:
|
|
200
|
+
- Strict mode configuration
|
|
201
|
+
- Type safety (no `any` abuse)
|
|
202
|
+
- Generic patterns
|
|
203
|
+
- Utility type usage
|
|
204
|
+
|
|
205
|
+
Tailwind CSS:
|
|
206
|
+
- Design token usage
|
|
207
|
+
- Custom utility patterns
|
|
208
|
+
- Dark mode implementation
|
|
209
|
+
- v4 migration readiness
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
## Package Priority Tiers
|
|
213
|
+
|
|
214
|
+
### Tier 1: Core Frameworks (Always Audit)
|
|
215
|
+
Whatever is detected as the primary:
|
|
216
|
+
- Backend framework (Laravel, Symfony, Express, etc.)
|
|
217
|
+
- Frontend framework (React, Vue, Svelte, etc.)
|
|
218
|
+
|
|
219
|
+
### Tier 2: Bridge & Integration (Always Audit)
|
|
220
|
+
- SPA bridges (Inertia.js, Livewire)
|
|
221
|
+
- Type systems (TypeScript)
|
|
222
|
+
- Meta-frameworks (Next.js, Nuxt)
|
|
223
|
+
|
|
224
|
+
### Tier 3: Infrastructure (Always Audit)
|
|
225
|
+
- CSS frameworks (Tailwind, UnoCSS)
|
|
226
|
+
- Build tools (Vite, Webpack, esbuild)
|
|
227
|
+
|
|
228
|
+
### Tier 4: Significant Packages (Audit if Present)
|
|
229
|
+
Based on usage frequency in codebase:
|
|
230
|
+
- Auth packages
|
|
231
|
+
- State management
|
|
232
|
+
- UI component libraries
|
|
233
|
+
- Form handling
|
|
234
|
+
- Data fetching
|
|
235
|
+
- Validation libraries
|
|
236
|
+
|
|
237
|
+
### Tier 5: Supporting Packages (Mention if Outdated)
|
|
238
|
+
- Everything else with notable usage
|
|
239
|
+
|
|
240
|
+
## Output Structure
|
|
241
|
+
|
|
242
|
+
### Full Stack Audit
|
|
243
|
+
```markdown
|
|
244
|
+
# Technology Stack Audit Report
|
|
245
|
+
Generated: {CURRENT_DATE}
|
|
246
|
+
Research Date: {CURRENT_DATE} (CURRENT - all searches used this date)
|
|
247
|
+
|
|
248
|
+
## Detected Stack
|
|
249
|
+
[Hierarchy tree of detected technologies]
|
|
250
|
+
|
|
251
|
+
## Executive Summary
|
|
252
|
+
- Stack Health Score: X/10
|
|
253
|
+
- Packages Audited: N
|
|
254
|
+
- Outdated Packages: X
|
|
255
|
+
- Deprecated Patterns: Y
|
|
256
|
+
- Security Issues: Z
|
|
257
|
+
|
|
258
|
+
## Version Matrix
|
|
259
|
+
| Package | Installed | Latest | Status | Action |
|
|
260
|
+
|---------|-----------|--------|--------|--------|
|
|
261
|
+
| [detected] | x.y.z | a.b.c | [status] | [action] |
|
|
262
|
+
|
|
263
|
+
## Package Assessments
|
|
264
|
+
[Individual package sections follow]
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
### Per-Package Section
|
|
268
|
+
```markdown
|
|
269
|
+
## {Package Name}
|
|
270
|
+
|
|
271
|
+
### Version Status
|
|
272
|
+
- **Installed:** {version}
|
|
273
|
+
- **Latest Stable:** {version} (researched {CURRENT_DATE})
|
|
274
|
+
- **Status:** {Current|Patch Behind|Minor Behind|Major Behind}
|
|
275
|
+
- **Action:** {None|Update|Migrate}
|
|
276
|
+
|
|
277
|
+
### Research Sources (with dates)
|
|
278
|
+
- [{source_name}]({url}) - accessed {CURRENT_DATE}
|
|
279
|
+
- [{source_name}]({url}) - accessed {CURRENT_DATE}
|
|
280
|
+
|
|
281
|
+
### Best Practices Audit
|
|
282
|
+
|
|
283
|
+
#### ✅ Following Best Practices
|
|
284
|
+
- [Practice 1] - Evidence: {file:line}
|
|
285
|
+
|
|
286
|
+
#### ⚠️ Missing Recommended Practices
|
|
287
|
+
- [Practice 1]
|
|
288
|
+
- **Source:** {url} (accessed {CURRENT_DATE})
|
|
289
|
+
- **Recommendation:** {what to do}
|
|
290
|
+
|
|
291
|
+
#### ❌ Anti-Patterns Found
|
|
292
|
+
- [Anti-pattern 1]
|
|
293
|
+
- **Location:** {file:line}
|
|
294
|
+
- **Current:** {code snippet}
|
|
295
|
+
- **Should Be:** {code snippet}
|
|
296
|
+
- **Source:** {url}
|
|
297
|
+
|
|
298
|
+
### Deprecated Features in Use
|
|
299
|
+
| Feature | Location | Replacement | Source |
|
|
300
|
+
|---------|----------|-------------|--------|
|
|
301
|
+
|
|
302
|
+
### Security Status
|
|
303
|
+
- Searched: "{package} CVE {CURRENT_YEAR}"
|
|
304
|
+
- Result: [findings]
|
|
305
|
+
|
|
306
|
+
### Upgrade Path
|
|
307
|
+
[If behind, step-by-step guide with source links]
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
## Research Quality Rules
|
|
311
|
+
|
|
312
|
+
1. **ALWAYS get current date first** - Use Bash to get today's date
|
|
313
|
+
2. **ALWAYS use current year in searches** - Never hardcode a year
|
|
314
|
+
3. **ALWAYS cite sources** - No recommendation without a URL
|
|
315
|
+
4. **ALWAYS include access date** - When was this researched?
|
|
316
|
+
5. **PREFER official documentation** - Over blog posts or Stack Overflow
|
|
317
|
+
6. **CHECK multiple sources** - Cross-reference recommendations
|
|
318
|
+
7. **NOTE conflicting advice** - If sources disagree, mention it
|
|
319
|
+
|
|
320
|
+
## Example Research Flow
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Step 0: Get Date
|
|
324
|
+
→ Bash: date +%Y-%m-%d
|
|
325
|
+
→ Result: 2026-01-06
|
|
326
|
+
→ CURRENT_YEAR = 2026
|
|
327
|
+
|
|
328
|
+
Step 1: Detect Stack
|
|
329
|
+
→ Read composer.json: laravel/framework ^11.0
|
|
330
|
+
→ Read package.json: react ^19.0, @inertiajs/react ^2.0
|
|
331
|
+
→ Detected: Laravel 11, React 19, Inertia 2
|
|
332
|
+
|
|
333
|
+
Step 2: Version Check
|
|
334
|
+
→ WebSearch: "laravel latest stable version 2026"
|
|
335
|
+
→ WebSearch: "react latest stable version 2026"
|
|
336
|
+
→ WebSearch: "inertiajs latest version 2026"
|
|
337
|
+
|
|
338
|
+
Step 3: Best Practices (for React)
|
|
339
|
+
→ WebSearch: "react 19 best practices 2026"
|
|
340
|
+
→ WebFetch: https://react.dev/learn
|
|
341
|
+
→ WebSearch: "react 19 new features"
|
|
342
|
+
→ WebSearch: "react hooks best practices 2026"
|
|
343
|
+
|
|
344
|
+
Step 4: Codebase Analysis
|
|
345
|
+
→ Grep for patterns mentioned in research
|
|
346
|
+
→ Compare against best practices found
|
|
347
|
+
→ Note file:line for violations
|
|
348
|
+
|
|
349
|
+
Step 5: Generate Report
|
|
350
|
+
→ Cite all sources with URLs and dates
|
|
351
|
+
→ Include specific file:line references
|
|
352
|
+
→ Provide code examples for fixes
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
## Integration with Other Consultants
|
|
356
|
+
|
|
357
|
+
This consultant focuses on **framework/package best practices**. It complements:
|
|
358
|
+
- `security-consultant` - Deeper security analysis
|
|
359
|
+
- `performance-consultant` - Deeper performance analysis
|
|
360
|
+
- `code-quality-consultant` - General code patterns
|
|
361
|
+
|
|
362
|
+
When running as part of `/audit-full`, focus on package-specific concerns and defer general concerns to specialized consultants.
|
|
363
|
+
|
|
364
|
+
---
|
|
365
|
+
|
|
366
|
+
## Design Mode (Planning)
|
|
367
|
+
|
|
368
|
+
When invoked by `/plan-*` commands, switch from assessment to design:
|
|
369
|
+
|
|
370
|
+
**Instead of:** "Are we using the framework correctly?"
|
|
371
|
+
**Focus on:** "What technologies and patterns should we use for this feature?"
|
|
372
|
+
|
|
373
|
+
### Design Deliverables
|
|
374
|
+
|
|
375
|
+
1. **Technology Selection** - Which packages/libraries to use (with live research)
|
|
376
|
+
2. **Framework Patterns** - Which framework patterns fit this feature
|
|
377
|
+
3. **Integration Approach** - How new code integrates with existing stack
|
|
378
|
+
4. **Version Considerations** - Any version constraints or upgrade needs
|
|
379
|
+
5. **Best Practice Application** - Specific patterns to follow from official docs
|
|
380
|
+
|
|
381
|
+
### Research for Design Mode
|
|
382
|
+
|
|
383
|
+
Use the same live research methodology:
|
|
384
|
+
```
|
|
385
|
+
1. WebSearch: "{framework} {version} best approach for {feature-type} {CURRENT_YEAR}"
|
|
386
|
+
2. WebFetch: Official documentation for relevant patterns
|
|
387
|
+
3. WebSearch: "{framework} {feature-type} examples {CURRENT_YEAR}"
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
### Design Output Format
|
|
391
|
+
|
|
392
|
+
Save to: `planning-docs/{feature-slug}/06-tech-recommendations.md`
|
|
393
|
+
|
|
394
|
+
```markdown
|
|
395
|
+
# Technology Recommendations: {Feature Name}
|
|
396
|
+
|
|
397
|
+
## Research Date
|
|
398
|
+
{CURRENT_DATE}
|
|
399
|
+
|
|
400
|
+
## Recommended Technologies
|
|
401
|
+
| Component | Technology | Version | Rationale | Source |
|
|
402
|
+
|-----------|------------|---------|-----------|--------|
|
|
403
|
+
|
|
404
|
+
## Framework Patterns to Use
|
|
405
|
+
{Patterns from official docs with source links}
|
|
406
|
+
|
|
407
|
+
## Integration Approach
|
|
408
|
+
{How to integrate with existing codebase}
|
|
409
|
+
|
|
410
|
+
## Version Notes
|
|
411
|
+
{Any version constraints or considerations}
|
|
412
|
+
|
|
413
|
+
## Sources
|
|
414
|
+
{URLs with access dates}
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Slash Command Invocation
|
|
420
|
+
|
|
421
|
+
This skill can be invoked via:
|
|
422
|
+
- `/stack-consultant` - Full skill with methodology
|
|
423
|
+
- `/audit-stack` - Quick assessment mode
|
|
424
|
+
- `/plan-stack` - Design/planning mode
|
|
425
|
+
|
|
426
|
+
### Assessment Mode (/audit-stack)
|
|
427
|
+
|
|
428
|
+
---name: audit-stackdescription: 🔬 ULTRATHINK Stack Audit - Live research-driven best practices audit for your entire technology stack or specific packages
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
# ULTRATHINK: Technology Stack Audit
|
|
432
|
+
|
|
433
|
+
ultrathink - Invoke the **stack-consultant** subagent for comprehensive, research-driven technology stack evaluation.
|
|
434
|
+
|
|
435
|
+
## What Makes This Different
|
|
436
|
+
|
|
437
|
+
**LIVE RESEARCH REQUIRED.** This audit uses WebSearch to fetch CURRENT best practices, not cached knowledge. Technology evolves daily - this audit ensures you're following today's recommendations, not last year's.
|
|
438
|
+
|
|
439
|
+
## CRITICAL: Get Current Date First
|
|
440
|
+
|
|
441
|
+
Before ANY research, get today's date:
|
|
442
|
+
```bash
|
|
443
|
+
date +%Y-%m-%d
|
|
444
|
+
# or on Windows: powershell -c "Get-Date -Format 'yyyy-MM-dd'"
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
Use this date in ALL search queries. Never hardcode a year.
|
|
448
|
+
|
|
449
|
+
## Usage
|
|
450
|
+
|
|
451
|
+
**Full Stack Audit (no arguments):**
|
|
452
|
+
```
|
|
453
|
+
/audit-stack
|
|
454
|
+
```
|
|
455
|
+
Auto-detects and audits entire stack top-down based on what's installed.
|
|
456
|
+
|
|
457
|
+
**Single Package Deep Dive (with argument):**
|
|
458
|
+
```
|
|
459
|
+
/audit-stack [package-name]
|
|
460
|
+
```
|
|
461
|
+
Examples: `/audit-stack react`, `/audit-stack laravel`, `/audit-stack inertia`
|
|
462
|
+
|
|
463
|
+
## Target
|
|
464
|
+
$ARGUMENTS
|
|
465
|
+
|
|
466
|
+
## Output Location
|
|
467
|
+
|
|
468
|
+
**Full Stack Audit:** `./audit-reports/stack-audit-{timestamp}/`
|
|
469
|
+
**Single Package:** `./audit-reports/stack-{package}/`
|
|
470
|
+
|
|
471
|
+
## How It Works
|
|
472
|
+
|
|
473
|
+
### Step 1: Get Current Date
|
|
474
|
+
```bash
|
|
475
|
+
CURRENT_DATE=$(date +%Y-%m-%d)
|
|
476
|
+
CURRENT_YEAR=$(date +%Y)
|
|
477
|
+
```
|
|
478
|
+
|
|
479
|
+
### Step 2: Detect Stack (Framework-Agnostic)
|
|
480
|
+
|
|
481
|
+
Read config files to discover what's actually installed:
|
|
482
|
+
|
|
483
|
+
```
|
|
484
|
+
composer.json → Backend framework & PHP packages
|
|
485
|
+
- Laravel? Symfony? Slim? Pure PHP?
|
|
486
|
+
- What first-party/third-party packages?
|
|
487
|
+
|
|
488
|
+
package.json → Frontend framework & Node packages
|
|
489
|
+
- React? Vue? Svelte? Angular?
|
|
490
|
+
- What UI libraries, state management?
|
|
491
|
+
|
|
492
|
+
Config files → Additional technologies
|
|
493
|
+
- tsconfig.json → TypeScript
|
|
494
|
+
- tailwind.config.* → Tailwind CSS
|
|
495
|
+
- vite.config.* / webpack.config.* → Build tool
|
|
496
|
+
- next.config.* → Next.js
|
|
497
|
+
- nuxt.config.* → Nuxt
|
|
498
|
+
```
|
|
499
|
+
|
|
500
|
+
### Step 3: Build Dynamic Hierarchy
|
|
501
|
+
|
|
502
|
+
Based on detection, build the dependency tree. Example for a Laravel/React stack:
|
|
503
|
+
|
|
504
|
+
```
|
|
505
|
+
Detected Stack:
|
|
506
|
+
├── Backend: Laravel 11.x
|
|
507
|
+
│ ├── laravel/sanctum
|
|
508
|
+
│ ├── laravel/horizon
|
|
509
|
+
│ └── laravel/scout
|
|
510
|
+
├── Frontend: React 19.x
|
|
511
|
+
│ ├── @inertiajs/react
|
|
512
|
+
│ └── @radix-ui/*
|
|
513
|
+
├── Types: TypeScript 5.x
|
|
514
|
+
├── Styling: Tailwind CSS 4.x
|
|
515
|
+
└── Build: Vite 6.x
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
Or for a different stack:
|
|
519
|
+
```
|
|
520
|
+
Detected Stack:
|
|
521
|
+
├── Backend: Symfony 7.x
|
|
522
|
+
├── Frontend: Vue 3.x
|
|
523
|
+
│ └── Pinia (state)
|
|
524
|
+
├── Styling: UnoCSS
|
|
525
|
+
└── Build: Vite 6.x
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
### Step 4: Live Research (CRITICAL)
|
|
529
|
+
|
|
530
|
+
For EACH detected package, execute searches WITH CURRENT YEAR:
|
|
531
|
+
|
|
532
|
+
```
|
|
533
|
+
WebSearch: "{package} {version} best practices {CURRENT_YEAR}"
|
|
534
|
+
WebSearch: "{package} {version} migration guide {CURRENT_YEAR}"
|
|
535
|
+
WebSearch: "{package} deprecated patterns {CURRENT_YEAR}"
|
|
536
|
+
WebSearch: "{package} security advisories {CURRENT_YEAR}"
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**Research Focus Areas:**
|
|
540
|
+
- Official documentation (ALWAYS primary source)
|
|
541
|
+
- New recommended patterns
|
|
542
|
+
- Deprecated APIs/patterns
|
|
543
|
+
- Security advisories
|
|
544
|
+
- Performance best practices
|
|
545
|
+
- Breaking changes in recent versions
|
|
546
|
+
|
|
547
|
+
### Step 5: Audit Against Research
|
|
548
|
+
|
|
549
|
+
For each package, compare codebase against researched best practices:
|
|
550
|
+
|
|
551
|
+
| Check | Example |
|
|
552
|
+
|-------|---------|
|
|
553
|
+
| Version Currency | React 18.2 installed, 19.0 available |
|
|
554
|
+
| Deprecated Patterns | Using removed/deprecated APIs |
|
|
555
|
+
| Missing Best Practices | Not following current recommendations |
|
|
556
|
+
| Security Issues | Outdated package with CVE |
|
|
557
|
+
| Performance Patterns | Missing optimization opportunities |
|
|
558
|
+
|
|
559
|
+
## Full Stack Audit Order
|
|
560
|
+
|
|
561
|
+
When no argument provided, audit in dependency order (top-down):
|
|
562
|
+
|
|
563
|
+
### Tier 1: Core Frameworks
|
|
564
|
+
Detect and audit the primary backend and frontend frameworks first.
|
|
565
|
+
- Whatever backend framework is detected (Laravel, Symfony, Express, etc.)
|
|
566
|
+
- Whatever frontend framework is detected (React, Vue, Svelte, etc.)
|
|
567
|
+
|
|
568
|
+
### Tier 2: Bridge & Integration Layer
|
|
569
|
+
Audit packages that connect frameworks.
|
|
570
|
+
- Inertia.js, Livewire, or similar bridges
|
|
571
|
+
- API clients, GraphQL layers
|
|
572
|
+
|
|
573
|
+
### Tier 3: Type & Language Layer
|
|
574
|
+
- TypeScript configuration and patterns
|
|
575
|
+
- PHP static analysis (PHPStan, Psalm)
|
|
576
|
+
|
|
577
|
+
### Tier 4: Styling & UI
|
|
578
|
+
- CSS framework (Tailwind, UnoCSS, etc.)
|
|
579
|
+
- UI component libraries (Radix, Headless UI, etc.)
|
|
580
|
+
|
|
581
|
+
### Tier 5: Build & Tooling
|
|
582
|
+
- Build tool (Vite, Webpack, esbuild, etc.)
|
|
583
|
+
- Dev tooling
|
|
584
|
+
|
|
585
|
+
### Tier 6: Significant Packages
|
|
586
|
+
- State management
|
|
587
|
+
- Form handling
|
|
588
|
+
- Data fetching
|
|
589
|
+
- Authentication packages
|
|
590
|
+
- Other high-usage packages
|
|
591
|
+
|
|
592
|
+
## Single Package Deep Dive
|
|
593
|
+
|
|
594
|
+
When argument provided (e.g., `/audit-stack react`):
|
|
595
|
+
|
|
596
|
+
### Research Phase (EXTENSIVE)
|
|
597
|
+
Use CURRENT_YEAR in all searches:
|
|
598
|
+
```
|
|
599
|
+
WebSearch: "React {version} best practices {CURRENT_YEAR}"
|
|
600
|
+
WebSearch: "React hooks patterns {CURRENT_YEAR}"
|
|
601
|
+
WebSearch: "React performance optimization {CURRENT_YEAR}"
|
|
602
|
+
WebSearch: "React Server Components {CURRENT_YEAR}"
|
|
603
|
+
WebSearch: "React 19 new features"
|
|
604
|
+
```
|
|
605
|
+
|
|
606
|
+
### Dynamic Checklist Generation
|
|
607
|
+
Based on research findings, generate a checklist specific to:
|
|
608
|
+
- The installed version
|
|
609
|
+
- Current best practices (as of today)
|
|
610
|
+
- Known issues and their solutions
|
|
611
|
+
|
|
612
|
+
## Output Format
|
|
613
|
+
|
|
614
|
+
### Full Stack Report Structure
|
|
615
|
+
```
|
|
616
|
+
audit-reports/stack-audit-{timestamp}/
|
|
617
|
+
├── 00-stack-summary.md # Executive summary
|
|
618
|
+
├── 00-version-matrix.md # All versions vs latest
|
|
619
|
+
├── 01-{backend-framework}.md # e.g., laravel, symfony
|
|
620
|
+
├── 02-{frontend-framework}.md # e.g., react, vue
|
|
621
|
+
├── 03-{bridge-layer}.md # e.g., inertia, livewire
|
|
622
|
+
├── 04-typescript.md # If detected
|
|
623
|
+
├── 05-{css-framework}.md # e.g., tailwind, unocss
|
|
624
|
+
├── 06-{build-tool}.md # e.g., vite, webpack
|
|
625
|
+
└── 07-packages-assessment.md # Other significant packages
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
### Report Sections (Per Package)
|
|
629
|
+
1. **Version Status**
|
|
630
|
+
- Installed version
|
|
631
|
+
- Latest stable version
|
|
632
|
+
- Recommended action (update/stay/migrate)
|
|
633
|
+
|
|
634
|
+
2. **Best Practices Audit** (with sources and dates)
|
|
635
|
+
- Following: [list with evidence]
|
|
636
|
+
- Missing: [recommendations with source URLs]
|
|
637
|
+
- Violations: [anti-patterns with file:line]
|
|
638
|
+
|
|
639
|
+
3. **Deprecated Pattern Detection**
|
|
640
|
+
- Pattern found → Recommended replacement
|
|
641
|
+
- Source URL for migration guide
|
|
642
|
+
|
|
643
|
+
4. **Security Status**
|
|
644
|
+
- Known CVEs (searched with current date)
|
|
645
|
+
- Security best practices adherence
|
|
646
|
+
|
|
647
|
+
5. **Upgrade Path**
|
|
648
|
+
- Step-by-step guide if behind
|
|
649
|
+
- Breaking changes to address
|
|
650
|
+
|
|
651
|
+
## Research Quality Standards
|
|
652
|
+
|
|
653
|
+
**CRITICAL: Every recommendation must cite a source with access date.**
|
|
654
|
+
|
|
655
|
+
```markdown
|
|
656
|
+
### Recommendation: Use React Server Components
|
|
657
|
+
|
|
658
|
+
**Source:** [React Documentation - Server Components](https://react.dev/reference/rsc/server-components)
|
|
659
|
+
**Researched:** {CURRENT_DATE}
|
|
660
|
+
|
|
661
|
+
Current pattern (file.tsx:42):
|
|
662
|
+
// Client-side data fetching
|
|
663
|
+
|
|
664
|
+
Recommended pattern:
|
|
665
|
+
// Server Component with async data
|
|
666
|
+
|
|
667
|
+
**Why:** [Explanation based on current docs]
|
|
668
|
+
```
|
|
669
|
+
|
|
670
|
+
## Minimal Return Pattern (for batch audits)
|
|
671
|
+
|
|
672
|
+
When invoked as part of `/audit-full`:
|
|
673
|
+
```
|
|
674
|
+
✓ Stack Audit Complete
|
|
675
|
+
Saved to: {filepath}
|
|
676
|
+
Stack: {detected frameworks}
|
|
677
|
+
Outdated: X packages | Deprecated: Y patterns | Security: Z issues
|
|
678
|
+
Key finding: {one-line summary}
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
## Related Commands
|
|
682
|
+
|
|
683
|
+
- `/audit-full` - All 15 domain consultants
|
|
684
|
+
- `/audit-backend` - Backend bundle (API, Database, Security)
|
|
685
|
+
- `/audit-frontend` - Frontend bundle (UI, UX, Copy, Performance)
|
|
686
|
+
|
|
687
|
+
### Design Mode (/plan-stack)
|
|
688
|
+
|
|
689
|
+
---name: plan-stackdescription: 🔷 ULTRATHINK Stack Design - Technology recommendations with live research
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
# Stack Design
|
|
693
|
+
|
|
694
|
+
Invoke the **stack-consultant** in Design Mode for technology selection with live research.
|
|
695
|
+
|
|
696
|
+
## Target Feature
|
|
697
|
+
|
|
698
|
+
$ARGUMENTS
|
|
699
|
+
|
|
700
|
+
## Output Location
|
|
701
|
+
|
|
702
|
+
Save to: `planning-docs/{feature-slug}/06-tech-recommendations.md`
|
|
703
|
+
|
|
704
|
+
## CRITICAL: Live Research Required
|
|
705
|
+
|
|
706
|
+
This consultant performs LIVE research using WebSearch to get current best practices. Before any research, get today's date and use it in all search queries.
|
|
707
|
+
|
|
708
|
+
```bash
|
|
709
|
+
date +%Y-%m-%d # or on Windows: powershell -c "Get-Date -Format 'yyyy-MM-dd'"
|
|
710
|
+
```
|
|
711
|
+
|
|
712
|
+
## Design Considerations
|
|
713
|
+
|
|
714
|
+
### Technology Selection
|
|
715
|
+
- Which packages/libraries to use
|
|
716
|
+
- Version requirements
|
|
717
|
+
- License compatibility
|
|
718
|
+
- Community support/maintenance status
|
|
719
|
+
- Security track record
|
|
720
|
+
|
|
721
|
+
### Framework Patterns
|
|
722
|
+
- Which patterns fit this feature type
|
|
723
|
+
- Official documentation recommendations
|
|
724
|
+
- Current best practices (researched)
|
|
725
|
+
- Deprecated patterns to avoid
|
|
726
|
+
|
|
727
|
+
### Integration Approach
|
|
728
|
+
- How new code integrates with existing stack
|
|
729
|
+
- Compatibility considerations
|
|
730
|
+
- Migration path if updating versions
|
|
731
|
+
- Breaking changes to handle
|
|
732
|
+
|
|
733
|
+
### Version Considerations
|
|
734
|
+
- Current vs. latest stable versions
|
|
735
|
+
- Upgrade requirements
|
|
736
|
+
- Security patches needed
|
|
737
|
+
- Deprecation timelines
|
|
738
|
+
|
|
739
|
+
### Best Practice Application
|
|
740
|
+
- Official documentation patterns
|
|
741
|
+
- Framework-specific recommendations
|
|
742
|
+
- Community conventions
|
|
743
|
+
- Performance best practices
|
|
744
|
+
|
|
745
|
+
### Research Methodology
|
|
746
|
+
|
|
747
|
+
For each technology decision:
|
|
748
|
+
```
|
|
749
|
+
WebSearch: "{framework} {version} best approach for {feature-type} {CURRENT_YEAR}"
|
|
750
|
+
WebFetch: Official documentation for relevant patterns
|
|
751
|
+
WebSearch: "{framework} {feature-type} examples {CURRENT_YEAR}"
|
|
752
|
+
WebSearch: "{package} security advisories {CURRENT_YEAR}"
|
|
753
|
+
```
|
|
754
|
+
|
|
755
|
+
## Design Deliverables
|
|
756
|
+
|
|
757
|
+
1. **Technology Selection** - Which packages/libraries to use (with live research)
|
|
758
|
+
2. **Framework Patterns** - Which framework patterns fit this feature
|
|
759
|
+
3. **Integration Approach** - How new code integrates with existing stack
|
|
760
|
+
4. **Version Considerations** - Any version constraints or upgrade needs
|
|
761
|
+
5. **Best Practice Application** - Specific patterns to follow from official docs
|
|
762
|
+
|
|
763
|
+
## Output Format
|
|
764
|
+
|
|
765
|
+
Deliver technology recommendations document with:
|
|
766
|
+
- **Technology Decision Matrix** (option, pros, cons, recommendation)
|
|
767
|
+
- **Package List** (name, version, purpose, license)
|
|
768
|
+
- **Pattern Recommendations** (with source URLs and dates)
|
|
769
|
+
- **Integration Guide**
|
|
770
|
+
- **Migration Notes** (if version updates needed)
|
|
771
|
+
- **Security Considerations**
|
|
772
|
+
|
|
773
|
+
**All recommendations must cite sources with access dates.**
|
|
774
|
+
|
|
775
|
+
## Minimal Return Pattern
|
|
776
|
+
|
|
777
|
+
Write full design to file, return only:
|
|
778
|
+
```
|
|
779
|
+
✓ Design complete. Saved to {filepath}
|
|
780
|
+
Key decisions: {1-2 sentence summary}
|
|
781
|
+
Sources: {count} researched
|
|
782
|
+
```
|