From business-analyst
Execute business analysis for an existing codebase. Reverse-engineers requirements from code, identifies gaps, and gathers change requirements from stakeholders.
How this command is triggered — by the user, by Claude, or both
Slash command
/business-analyst:brownfieldThe summary Claude sees in its command listing — used to decide when to auto-load this command
# Brownfield Project Analysis Execute existing codebase analysis for: **$ARGUMENTS** ## Objective Context **IMPORTANT**: Parse the arguments for an objective/context statement. Look for patterns like: - `--objective "..."` or `-o "..."` - `--context "..."` or `-c "..."` - `--reason "..."` or `-r "..."` - Natural language after the path: `./src - refactoring for testability` - Quoted context: `./src "migrating to microservices"` If an objective is provided, store it as the **Analysis Objective** and use it to: 1. **Focus discovery** - Prioritize areas relevant to the objective 2. **Weigh...
Execute existing codebase analysis for: $ARGUMENTS
IMPORTANT: Parse the arguments for an objective/context statement. Look for patterns like:
--objective "..." or -o "..."--context "..." or -c "..."--reason "..." or -r "..."./src - refactoring for testability./src "migrating to microservices"If an objective is provided, store it as the Analysis Objective and use it to:
Analysis Objective: {extracted from arguments, or "General analysis" if not specified}
This command is optimized for projects involving existing systems. The workflow combines codebase analysis to understand current capabilities with stakeholder interviews to identify desired changes and improvements.
When an objective is provided, the entire workflow adapts:
Objective-Driven Discovery If an objective was provided, immediately focus discovery on relevant areas:
Project Structure Analysis
Initial Questions (skip if already answered via objective)
Entity Discovery
Documentation Format
## Entity: {Name}
- Attributes: {list}
- Relationships: {list}
- Business meaning: {description}
- Location: {file path}
Rule Identification
Rule Categories
External Systems
Documentation Format
## Integration: {Name}
- Type: API / Message Queue / File / Database
- Direction: Inbound / Outbound / Bidirectional
- Data: {what flows}
- Location: {file path}
Current State Summary
Current State Questions
Change Requirements
Migration Considerations
As-Is vs To-Be
Technical Debt Assessment
Change Prioritization Using MoSCoW:
Validation Checkpoint
Documentation
I will pause for your confirmation at:
Codebase Analysis Report
As-Is Requirements Document
Change Requirements
Gap Analysis Report
SRS Document
Migration Considerations
Validation Report
Full Analysis (Recommended) Analyze entire codebase and all aspects.
Focused Analysis Target specific areas:
/business-analyst:brownfield ./src/auth
/business-analyst:brownfield ./api/orders
Specific Aspects Focus on particular concerns:
/business-analyst:brownfield security audit
/business-analyst:brownfield integration mapping
/business-analyst:brownfield business rules
Let's begin the brownfield analysis!
If an objective was provided in the arguments, acknowledge it:
"I see you want to analyze this codebase for: {objective}. I'll focus my analysis accordingly."
Then proceed directly to Phase 1, using the objective to guide discovery.
If no objective was provided, ask:
# Basic usage (will ask for objective interactively)
/business-analyst:brownfield ./src
# With objective flag
/business-analyst:brownfield ./src --objective "Refactor to improve testability"
/business-analyst:brownfield ./src -o "Migrate authentication to OAuth2"
# Natural language (path followed by context)
/business-analyst:brownfield ./src/orders - need to split into microservice
/business-analyst:brownfield ./api "security audit for compliance"
# Focused analysis with objective
/business-analyst:brownfield ./src/payments --objective "PCI compliance audit"
npx claudepluginhub doubleslashse/claude-marketplace --plugin business-analyst/hatch3r-codebase-mapReverse-engineers a brownfield codebase into module boundaries, integration-point inventory, tech-debt register, and dependency graph via static analysis. Outputs structured specs and ADRs.
/brownfieldAnalyzes existing codebase with structure mapping, architecture review, hotspots, and test health checks; generates docs/CONTEXT-MAP.md onboarding spec.
/analyze-productAnalyzes brownfield project codebase, architecture, and docs to identify technical debt and improvements, then generates prioritized roadmap with PRD.
/intake-from-codebaseScans codebase directory to analyze code structure, dependencies, infrastructure, and patterns, generating intake documents. Supports optional interactive mode, custom output, and guidance text.
/migrateAnalyzes legacy and new codebase paths to generate a prioritized plan of independently shippable migrations via structure scans and developer interview.
/map-codebaseAnalyzes codebase using parallel mapper agents to produce structured .planning/codebase/ documents. Also supports --fast scan and --query intelligence modes.