Generate comprehensive steering context documentation by analyzing your codebase with specialized AI agents
Generates comprehensive AI-readable documentation by analyzing your entire codebase with specialized parallel agents.
/plugin marketplace add varaku1012/aditi.code/plugin install steering-context-generator@aditi-code-pluginsAnalyze your entire codebase and generate comprehensive AI-readable documentation.
/steering-generate
That's it! The system will:
The following documents are created in .claude/steering/:
| Document | Purpose | Typical Size |
|---|---|---|
ARCHITECTURE.md | System architecture, components, data flow | 200-400 KB |
AI_CONTEXT.md | Bootstrap context for AI agents | 100-200 KB |
CODEBASE_GUIDE.md | Developer onboarding guide | 150-300 KB |
| Document | Generated When | Purpose |
|---|---|---|
DOMAIN_CONTEXT.md | Complex projects | Business logic and rules |
QUALITY_REPORT.md | Always | Security, performance analysis |
UI_DESIGN_SYSTEM.md | Frontend detected | Component catalog, design tokens |
TESTING_GUIDE.md | Tests found | Testing patterns, coverage |
DATABASE_CONTEXT.md | Database detected | Schema, DAL patterns |
MESSAGING_GUIDE.md | Queues/events found | Event catalog, pub/sub |
API_DESIGN_GUIDE.md | API endpoints found | REST standards, error handling |
STRIPE_PAYMENT_CONTEXT.md | Stripe integration found | Payment flows, webhook handlers, PCI compliance |
AUTH0_OAUTH_CONTEXT.md | Auth0 integration found | OAuth flows, configuration, security assessment |
PAYLOAD_CMS_CONTEXT.md | Payload CMS detected | CMS architecture, content models, API configuration |
PAYLOAD_CMS_CONFIG.md | Payload CMS detected | Configuration analysis, security audit, compliance |
DESIGN_SYSTEM_ARCHITECTURE.md | Design tokens/components detected | Design token analysis, component library structure, maturity |
UI_FRAMEWORK_GUIDE.md | UI framework detected (React, Vue, etc.) | Framework configuration, component patterns, best practices |
WEB_UI_DESIGN_CONTEXT.md | Frontend pages/components detected | Web UI design analysis, accessibility, UX flows, responsive design |
The system automatically detects:
Tech Stack:
Project Structure:
Complexity Assessment:
Simple: < 50 files, < 3 levels deep ā 20 min
Moderate: 50-200 files, 3-6 levels deep ā 45 min
Complex: 200+ files, 6+ levels deep ā 85 min
Based on detection, the system selects appropriate agents:
Foundation Agents (Always Run):
structure-analyst: Map file system and dependenciespattern-detective: Identify architectural patternsquality-auditor: Security and quality analysisDomain-Specific Agents (Conditional):
ui-specialist: If frontend components founddesign-system-architect: If design tokens/component library detectedui-framework-analyzer: If UI framework detected (React, Vue, Angular, Svelte)web-ui-design-analyzer: If frontend pages/components foundtest-strategist: If test files founddatabase-analyst: If database schemas foundmessaging-architect: If queues/events foundapi-design-analyst: If API routes foundauth0-detector: If Auth0 SDK imports or configuration foundoauth-security-auditor: If Auth0 integration found (runs after auth0-detector)payload-cms-detector: If Payload CMS packages detectedpayload-cms-config-analyzer: If Payload CMS detected (runs after payload-cms-detector)Synthesis Agent (Always Final):
context-synthesizer: Generate final documentationAgents execute in intelligent parallel groups:
Group 1 (Foundation):
structure-analyst āāāāāāāā
integration-mapper āāāāāā⤠Run in parallel
ui-specialist āāāāāāāāāāāā
Group 2 (Analysis) - Depends on Group 1:
domain-expert āāāāāāāāāāā
pattern-detective āāāāāāā¤
test-strategist āāāāāāāā⤠Run in parallel
database-analyst āāāāāāāā¤
design-system-architect ā
Group 3 (UI/Framework/Design) - Depends on Groups 1 & 2:
ui-framework-analyzer āāā
web-ui-design-analyzer ā⤠Run in parallel
messaging-architect āāāāā¤
api-design-analyst āāāāāā¤
stripe-payment-expert āāā Run in parallel
auth0-detector āāāāāāāāāā¤
payload-cms-detector āāāā¤
quality-auditor āāāāāāāāā
Group 3B (Security & Config Audits) - Depends on Group 3:
oauth-security-auditor (sequential, after auth0-detector, if Auth0 detected)
payload-cms-config-analyzer (sequential, after payload-cms-detector, if Payload CMS detected)
Group 4 (Synthesis) - Depends on all:
context-synthesizer (sequential)
Time Savings: Parallel execution is 55% faster than sequential! Note: UI/Framework/Design analysis adds ~30-40 minutes for comprehensive analysis if UI detected. Note: Auth0 security audit runs automatically after Auth0 detection, adding ~10 minutes if Auth0 is present. Note: Payload CMS config analysis runs automatically after CMS detection, adding ~10 minutes if Payload CMS is present.
Each agent contributes to final documents:
structure-analyst ā ARCHITECTURE.md (structure section)
domain-expert ā DOMAIN_CONTEXT.md (complete)
pattern-detective ā ARCHITECTURE.md (patterns section)
ui-specialist ā UI_DESIGN_SYSTEM.md (complete)
design-system-architect ā DESIGN_SYSTEM_ARCHITECTURE.md (complete, if design system found)
ui-framework-analyzer ā UI_FRAMEWORK_GUIDE.md (complete, if UI framework found)
web-ui-design-analyzer ā WEB_UI_DESIGN_CONTEXT.md (complete, if frontend pages found)
test-strategist ā TESTING_GUIDE.md (complete)
database-analyst ā DATABASE_CONTEXT.md (complete)
messaging-architect ā MESSAGING_GUIDE.md (complete)
api-design-analyst ā API_DESIGN_GUIDE.md (complete)
stripe-payment-expert ā STRIPE_PAYMENT_CONTEXT.md (complete, if Stripe found)
auth0-detector ā AUTH0_OAUTH_CONTEXT.md (complete, if Auth0 found)
oauth-security-auditor ā AUTH0_SECURITY_AUDIT.md (complete, if Auth0 found)
payload-cms-detector ā PAYLOAD_CMS_CONTEXT.md (complete, if Payload CMS found)
payload-cms-config-analyzer ā PAYLOAD_CMS_CONFIG.md (complete, if Payload CMS found)
quality-auditor ā QUALITY_REPORT.md (complete)
context-synthesizer ā AI_CONTEXT.md, CODEBASE_GUIDE.md
The system uses the Task tool to invoke agents in parallel:
# Create session ID for tracking
SESSION_ID="gen_$(date +%Y%m%d_%H%M%S)"
# Initialize execution state
cat > .claude/memory/orchestration/current_session.json << EOF
{
"session_id": "$SESSION_ID",
"started": "$(date -Iseconds)",
"status": "running",
"phase": "detection"
}
EOF
Analyze project characteristics:
Detecting project type...
ā Tech Stack: Node.js/TypeScript
ā Framework: Next.js 14 (App Router)
ā Package Manager: pnpm (monorepo detected)
ā Database: Prisma + PostgreSQL
ā Testing: Vitest + Playwright
ā CMS: Payload CMS v2.x detected
Assessing complexity...
Files: 387
Directories: 45 (max depth: 6)
Dependencies: 73
Estimated LOC: ~25,000
Complexity: Moderate
Estimated Time: 55 minutes (includes Payload CMS analysis)
Workflow: Standard (3 parallel phases + security audits)
Use the Task tool to run agents in parallel:
Critical: Execute ALL agents in Group 1 in a SINGLE message with multiple Task tool calls.
Depends on: Group 1 outputs
Depends on: Groups 1 & 2 outputs
Depends on: Group 3 outputs
Automatically executes after:
Depends on: All previous outputs
# Validate generated files
bash scripts/validate.sh
# Display summary
echo "ā
Steering context generation complete!"
echo ""
echo "Generated Files (.claude/steering/):"
ls -lh .claude/steering/*.md | awk '{print " ā", $9, "(" $5 ")"}'
echo ""
echo "Next Steps:"
echo " 1. Review: /steering-status"
echo " 2. Load context: Reference .claude/steering/*.md in prompts"
echo " 3. Update later: /steering-update (incremental)"
Prioritize specific analysis areas in .claude/steering/config.json:
{
"focus_areas": ["architecture", "security", "performance"]
}
Skip certain files/directories:
{
"excluded_patterns": [
"node_modules/**",
".git/**",
"dist/**",
"*.test.ts"
]
}
Disable parallel execution if needed:
{
"parallel_execution": false
}
After successful completion:
ā
Steering context generation complete! (55 minutes)
Generated Files (.claude/steering/):
ā ARCHITECTURE.md (342 KB) - System architecture
ā AI_CONTEXT.md (156 KB) - AI agent bootstrap
ā CODEBASE_GUIDE.md (278 KB) - Developer guide
ā DOMAIN_CONTEXT.md (189 KB) - Business logic
ā QUALITY_REPORT.md (134 KB) - Quality analysis
ā PAYLOAD_CMS_CONTEXT.md (203 KB) - CMS architecture
ā PAYLOAD_CMS_CONFIG.md (187 KB) - CMS configuration
Total: 2.1 MB of context documentation
Performance:
Total tokens: ~165,000
Agents executed: 16
Parallel efficiency: 52% time saved
Next Steps:
1. Review: /steering-status
2. Load context: Reference .claude/steering/*.md in prompts
3. Update later: /steering-update (incremental)
If generation is interrupted:
# Check for checkpoint
ls .claude/memory/orchestration/current_session.json
# Resume from checkpoint
/steering-resume
Ensure plugin is properly installed:
/plugin list
# Should show "steering-context-generator"
# Reinstall if needed
/plugin uninstall steering-context-generator@aditi.code
/plugin install steering-context-generator@aditi.code
For very large codebases:
Analyze only specific areas:
{
"focus_areas": ["cms", "api"],
"agents": ["payload-cms-detector", "api-design-analyst"]
}
Analyze multiple projects:
# Project A
cd /path/to/project-a
/steering-generate
# Project B
cd /path/to/project-b
/steering-generate
# Compare
diff .claude/steering/ARCHITECTURE.md ../project-a/.claude/steering/ARCHITECTURE.md
Faster Generation:
Better Quality:
Your generation is successful when:
After generation:
/steering-status.claude/steering/*.md in AI prompts/steering-update when code changes/steering-export for different formats/steering-clean to remove old archivesReady to generate? Just run: /steering-generate
The system handles everything automatically!