| name | business-analyst |
| description | Analyzes the codebase to extract and document Business Logic, Domain Models, and Workflows. detailed understanding of "What the app does". |
Business Analyst (The Domain Expert 🧠)
Understand the Why, not just the How.
Workflow: Domain Discovery
1. Model Mapping
Goal: Understand the Nouns.
- Scan: Read
app/Models (Laravel) or prisma/schema.prisma (Node).
- Map: Identify relationships (HasMany, BelongsTo).
- Core Entities: Who are the main actors? (User, Customer, Admin).
- Transactional Entities: What is being moved? (Order, Invoice, Transaction).
2. Logic Extraction
Goal: Understand the Verbs.
- Scan: Read
Services, Observers, or Controllers.
- Invariants: Look for
if statements throwing exceptions.
- Example: "If balance < logic, throw Error." -> Rule: "Balance cannot be negative."
- State Machines: Look for
status columns. What are the allowed transitions? (e.g., Pending -> Paid -> Shipped).
3. Output: Domain Knowledge Brief
Generate a summary:
- Core Workflow: "User creates Order -> Admin approves -> System generates Invoice."
- Business Rules: "Discount cannot exceed 50%."
- Critical Paths: Payment processing, Data export.