Provides comprehensive technology stack auditing with LIVE RESEARCH capability...
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.
This is THE consultant for framework-specific audits - whether Laravel, React, Vue, Symfony, or any other technology. It combines:
Before ANY research, execute:
date +%Y-%m-%d
# Store as CURRENT_DATE
# Extract year as CURRENT_YEAR
Use {CURRENT_YEAR} in ALL WebSearch queries. Never hardcode a year.
Use this consultant when:
/audit-stack commandDetect the technology stack by reading config files:
composer.json ā Backend framework & packages
- Laravel? Symfony? Slim? CakePHP? Pure PHP?
package.json ā Frontend framework & packages
- React? Vue? Svelte? Angular? Solid?
- What state management? What UI library?
Config files ā Additional technologies
- tsconfig.json ā TypeScript
- tailwind.config.* / uno.config.* ā CSS framework
- vite.config.* / webpack.config.* ā Build tool
- next.config.* / nuxt.config.* ā Meta-framework
Build the dependency tree based on what's detected:
Example A (Laravel/React):
āāā Backend: Laravel 11.x
āāā Frontend: React 19.x
ā āāā Inertia.js (bridge)
āāā Types: TypeScript 5.x
āāā Styling: Tailwind CSS 4.x
āāā Build: Vite 6.x
Example B (Symfony/Vue):
āāā Backend: Symfony 7.x
āāā Frontend: Vue 3.x
ā āāā Pinia (state)
āāā Styling: UnoCSS
āāā Build: Vite 6.x
Example C (Next.js Full Stack):
āāā Framework: Next.js 15.x
ā āāā React 19.x (included)
āāā Types: TypeScript 5.x
āāā Styling: Tailwind CSS 4.x
āāā ORM: Prisma 6.x
For each detected package, execute WebSearch WITH CURRENT_YEAR:
Research Pattern:
1. "{package} {version} best practices {CURRENT_YEAR}"
2. "{package} official documentation"
3. "{package} {version} deprecated features {CURRENT_YEAR}"
4. "{package} security advisories {CURRENT_YEAR}"
5. "{package} {installed_version} to {latest_version} migration"
Compare actual code against researched best practices:
Every recommendation MUST include:
CURRENT_DATE=$(date +%Y-%m-%d)
CURRENT_YEAR=$(date +%Y)
1. Read composer.json / package.json
2. Identify core frameworks
3. Identify significant packages (high usage)
4. Build dependency hierarchy
For each detected package:
1. Read installed version from lock file
2. WebSearch: "{package} latest stable version {CURRENT_YEAR}"
3. WebSearch: "{package} LTS version" (if applicable)
4. Determine: patch needed, minor update, major migration
For each significant package:
1. WebSearch: "{package} {version} best practices {CURRENT_YEAR}"
2. WebFetch: Official documentation URL
3. WebSearch: "{package} common mistakes {CURRENT_YEAR}"
4. WebSearch: "{package} performance best practices"
For each package:
1. WebSearch: "{package} {version} deprecated {CURRENT_YEAR}"
2. WebSearch: "{package} breaking changes changelog"
3. Cross-reference with codebase usage
For each package:
1. WebSearch: "{package} CVE {CURRENT_YEAR}"
2. WebSearch: "{package} security advisory {CURRENT_YEAR}"
3. Check for known vulnerabilities
For each framework, audit actual code usage:
Laravel:
- Eloquent patterns (eager loading, scopes, casts)
- Service container / dependency injection
- Route organization and middleware
- Form requests and validation
- Event/listener patterns
- Queue job structure
- First-party package utilization
React:
- Hook patterns (useEffect cleanup, deps)
- Component organization
- State management patterns
- Memoization usage
- Error boundaries
- TypeScript integration
Inertia.js:
- Partial reloads usage
- Shared data patterns
- Form helper utilization
- Link prefetching
TypeScript:
- Strict mode configuration
- Type safety (no `any` abuse)
- Generic patterns
- Utility type usage
Tailwind CSS:
- Design token usage
- Custom utility patterns
- Dark mode implementation
- v4 migration readiness
Whatever is detected as the primary:
Based on usage frequency in codebase:
# Technology Stack Audit Report
Generated: {CURRENT_DATE}
Research Date: {CURRENT_DATE} (CURRENT - all searches used this date)
## Detected Stack
[Hierarchy tree of detected technologies]
## Executive Summary
- Stack Health Score: X/10
- Packages Audited: N
- Outdated Packages: X
- Deprecated Patterns: Y
- Security Issues: Z
## Version Matrix
| Package | Installed | Latest | Status | Action |
|---------|-----------|--------|--------|--------|
| [detected] | x.y.z | a.b.c | [status] | [action] |
## Package Assessments
[Individual package sections follow]
## {Package Name}
### Version Status
- **Installed:** {version}
- **Latest Stable:** {version} (researched {CURRENT_DATE})
- **Status:** {Current|Patch Behind|Minor Behind|Major Behind}
- **Action:** {None|Update|Migrate}
### Research Sources (with dates)
- [{source_name}]({url}) - accessed {CURRENT_DATE}
- [{source_name}]({url}) - accessed {CURRENT_DATE}
### Best Practices Audit
#### ā
Following Best Practices
- [Practice 1] - Evidence: {file:line}
#### ā ļø Missing Recommended Practices
- [Practice 1]
- **Source:** {url} (accessed {CURRENT_DATE})
- **Recommendation:** {what to do}
#### ā Anti-Patterns Found
- [Anti-pattern 1]
- **Location:** {file:line}
- **Current:** {code snippet}
- **Should Be:** {code snippet}
- **Source:** {url}
### Deprecated Features in Use
| Feature | Location | Replacement | Source |
|---------|----------|-------------|--------|
### Security Status
- Searched: "{package} CVE {CURRENT_YEAR}"
- Result: [findings]
### Upgrade Path
[If behind, step-by-step guide with source links]
Step 0: Get Date
ā Bash: date +%Y-%m-%d
ā Result: 2026-01-06
ā CURRENT_YEAR = 2026
Step 1: Detect Stack
ā Read composer.json: laravel/framework ^11.0
ā Read package.json: react ^19.0, @inertiajs/react ^2.0
ā Detected: Laravel 11, React 19, Inertia 2
Step 2: Version Check
ā WebSearch: "laravel latest stable version 2026"
ā WebSearch: "react latest stable version 2026"
ā WebSearch: "inertiajs latest version 2026"
Step 3: Best Practices (for React)
ā WebSearch: "react 19 best practices 2026"
ā WebFetch: https://react.dev/learn
ā WebSearch: "react 19 new features"
ā WebSearch: "react hooks best practices 2026"
Step 4: Codebase Analysis
ā Grep for patterns mentioned in research
ā Compare against best practices found
ā Note file:line for violations
Step 5: Generate Report
ā Cite all sources with URLs and dates
ā Include specific file:line references
ā Provide code examples for fixes
This consultant focuses on framework/package best practices. It complements:
security-consultant - Deeper security analysisperformance-consultant - Deeper performance analysiscode-quality-consultant - General code patternsWhen running as part of /audit-full, focus on package-specific concerns and defer general concerns to specialized consultants.
When invoked by /plan-* commands, switch from assessment to design:
Instead of: "Are we using the framework correctly?" Focus on: "What technologies and patterns should we use for this feature?"
Use the same live research methodology:
1. WebSearch: "{framework} {version} best approach for {feature-type} {CURRENT_YEAR}"
2. WebFetch: Official documentation for relevant patterns
3. WebSearch: "{framework} {feature-type} examples {CURRENT_YEAR}"
Save to: planning-docs/{feature-slug}/06-tech-recommendations.md
# Technology Recommendations: {Feature Name}
## Research Date
{CURRENT_DATE}
## Recommended Technologies
| Component | Technology | Version | Rationale | Source |
|-----------|------------|---------|-----------|--------|
## Framework Patterns to Use
{Patterns from official docs with source links}
## Integration Approach
{How to integrate with existing codebase}
## Version Notes
{Any version constraints or considerations}
## Sources
{URLs with access dates}
This skill can be invoked via:
/stack-consultant - Full skill with methodology/audit-stack - Quick assessment mode/plan-stack - Design/planning modeultrathink - Invoke the stack-consultant subagent for comprehensive, research-driven technology stack evaluation.
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.
Before ANY research, get today's date:
date +%Y-%m-%d
# or on Windows: powershell -c "Get-Date -Format 'yyyy-MM-dd'"
Use this date in ALL search queries. Never hardcode a year.
Full Stack Audit (no arguments):
/audit-stack
Auto-detects and audits entire stack top-down based on what's installed.
Single Package Deep Dive (with argument):
/audit-stack [package-name]
Examples: /audit-stack react, /audit-stack laravel, /audit-stack inertia
$ARGUMENTS
Full Stack Audit: ./audit-reports/stack-audit-{timestamp}/
Single Package: ./audit-reports/stack-{package}/
CURRENT_DATE=$(date +%Y-%m-%d)
CURRENT_YEAR=$(date +%Y)
Read config files to discover what's actually installed:
composer.json ā Backend framework & PHP packages
- Laravel? Symfony? Slim? Pure PHP?
- What first-party/third-party packages?
package.json ā Frontend framework & Node packages
- React? Vue? Svelte? Angular?
- What UI libraries, state management?
Config files ā Additional technologies
- tsconfig.json ā TypeScript
- tailwind.config.* ā Tailwind CSS
- vite.config.* / webpack.config.* ā Build tool
- next.config.* ā Next.js
- nuxt.config.* ā Nuxt
Based on detection, build the dependency tree. Example for a Laravel/React stack:
Detected Stack:
āāā Backend: Laravel 11.x
ā āāā laravel/sanctum
ā āāā laravel/horizon
ā āāā laravel/scout
āāā Frontend: React 19.x
ā āāā @inertiajs/react
ā āāā @radix-ui/*
āāā Types: TypeScript 5.x
āāā Styling: Tailwind CSS 4.x
āāā Build: Vite 6.x
Or for a different stack:
Detected Stack:
āāā Backend: Symfony 7.x
āāā Frontend: Vue 3.x
ā āāā Pinia (state)
āāā Styling: UnoCSS
āāā Build: Vite 6.x
For EACH detected package, execute searches WITH CURRENT YEAR:
WebSearch: "{package} {version} best practices {CURRENT_YEAR}"
WebSearch: "{package} {version} migration guide {CURRENT_YEAR}"
WebSearch: "{package} deprecated patterns {CURRENT_YEAR}"
WebSearch: "{package} security advisories {CURRENT_YEAR}"
Research Focus Areas:
For each package, compare codebase against researched best practices:
| Check | Example |
|---|---|
| Version Currency | React 18.2 installed, 19.0 available |
| Deprecated Patterns | Using removed/deprecated APIs |
| Missing Best Practices | Not following current recommendations |
| Security Issues | Outdated package with CVE |
| Performance Patterns | Missing optimization opportunities |
When no argument provided, audit in dependency order (top-down):
Detect and audit the primary backend and frontend frameworks first.
Audit packages that connect frameworks.
When argument provided (e.g., /audit-stack react):
Use CURRENT_YEAR in all searches:
WebSearch: "React {version} best practices {CURRENT_YEAR}"
WebSearch: "React hooks patterns {CURRENT_YEAR}"
WebSearch: "React performance optimization {CURRENT_YEAR}"
WebSearch: "React Server Components {CURRENT_YEAR}"
WebSearch: "React 19 new features"
Based on research findings, generate a checklist specific to:
audit-reports/stack-audit-{timestamp}/
āāā 00-stack-summary.md # Executive summary
āāā 00-version-matrix.md # All versions vs latest
āāā 01-{backend-framework}.md # e.g., laravel, symfony
āāā 02-{frontend-framework}.md # e.g., react, vue
āāā 03-{bridge-layer}.md # e.g., inertia, livewire
āāā 04-typescript.md # If detected
āāā 05-{css-framework}.md # e.g., tailwind, unocss
āāā 06-{build-tool}.md # e.g., vite, webpack
āāā 07-packages-assessment.md # Other significant packages
Version Status
Best Practices Audit (with sources and dates)
Deprecated Pattern Detection
Security Status
Upgrade Path
CRITICAL: Every recommendation must cite a source with access date.
### Recommendation: Use React Server Components
**Source:** [React Documentation - Server Components](https://react.dev/reference/rsc/server-components)
**Researched:** {CURRENT_DATE}
Current pattern (file.tsx:42):
// Client-side data fetching
Recommended pattern:
// Server Component with async data
**Why:** [Explanation based on current docs]
When invoked as part of /audit-full:
ā Stack Audit Complete
Saved to: {filepath}
Stack: {detected frameworks}
Outdated: X packages | Deprecated: Y patterns | Security: Z issues
Key finding: {one-line summary}
/audit-full - All 15 domain consultants/audit-backend - Backend bundle (API, Database, Security)/audit-frontend - Frontend bundle (UI, UX, Copy, Performance)Invoke the stack-consultant in Design Mode for technology selection with live research.
$ARGUMENTS
Save to: planning-docs/{feature-slug}/06-tech-recommendations.md
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.
date +%Y-%m-%d # or on Windows: powershell -c "Get-Date -Format 'yyyy-MM-dd'"
For each technology decision:
WebSearch: "{framework} {version} best approach for {feature-type} {CURRENT_YEAR}"
WebFetch: Official documentation for relevant patterns
WebSearch: "{framework} {feature-type} examples {CURRENT_YEAR}"
WebSearch: "{package} security advisories {CURRENT_YEAR}"
Deliver technology recommendations document with:
All recommendations must cite sources with access dates.
Write full design to file, return only:
ā Design complete. Saved to {filepath}
Key decisions: {1-2 sentence summary}
Sources: {count} researched