StarterApp Docs
AI Workflow

Commands

AI command reference for development workflows

Commands automate common development tasks through pre-defined workflows. Each command lives in /llms/commands/ and handles specific operations while enforcing codebase patterns and quality standards.

Quick Reference

Essential Commands

Core workflows that form the foundation of AI-assisted development.

/initialize

Interactive setup guide from zero to running app with your first feature implemented.

Command: /llms/commands/initialize.md

Usage
/initialize

Workflow: Environment detection → Toolchain setup → Dependencies → Environment config → First boot → App brief → PRP generation → PRP execution

Heads up

The command stops at environment configuration until .env.local is complete. Do not continue with placeholder values.

/prime

Initializes AI context by reading architecture documentation and pattern templates.

Command: /llms/commands/prime.md

Usage
/prime

Files Read: CODEBASE.md, CORE.md, AUTH_PATTERNS.md, BILLING.md, SECURITY.md, TESTING.md, CONVEX.md, templates/*

Pro Tip

Run /prime at the start of each session to ensure AI understands current patterns and security requirements.

/tdd

Test-driven development workflow: write tests first, then implement code until tests pass.

Command: /llms/commands/tdd.md

Usage
/tdd --focus apps/dashboard/app/api/support

Workflow: Plan scenarios → Write tests first → Run failing tests → Implement code → Iterate until green

Validation
pnpm test -- --watch=false --runInBand
pnpm test -- --coverage  # Check coverage

/debug

Root cause analysis with fix suggestions for errors and test failures.

Command: /llms/commands/debug.md

Usage
/debug "Hydration mismatch in user profile" --deep --logs

Workflow: Reproduce error → Trace root cause → Design fix → Apply and validate → Document findings

Output: Patched files, optional diagnostic report in reports/debug/, regression tests

Architecture Commands

Commands for planning, specification, and structured implementation.

/architect

System design with C4 diagrams and Architecture Decision Records.

Command: /llms/commands/architect.md

Usage
/architect "real-time collaboration" --adr --diagrams

Workflow: Assess patterns → Draft diagrams → Capture decisions → Summarize → Roadmap

Output: README, Mermaid diagrams in apps/docs/docs/architecture/<feature>/diagrams/, ADR files in apps/docs/docs/architecture/<feature>/adr/

/spec

Creates detailed specifications from requirements before implementation.

Command: /llms/commands/spec.md

Usage
/spec "user profile feature" --full

Workflow: Outline scope → Define APIs/contracts → Document data/components → Testing strategy → Implementation plan

Output: Specification files in specs/<feature>/ including README, optional OpenAPI spec, types, and test plan

/generate-prp

Creates Pull Request Plans from feature specifications.

Command: /llms/commands/generate-prp.md

Usage
/generate-prp features/user-notifications.md

Workflow: Read feature → Analyze codebase → External research → Synthesize insights → Generate PRP

Output: Complete PRP saved to llms/PRPs/{feature-name}.md

/execute-prp

Implements features from Pull Request Plans with full validation.

Command: /llms/commands/execute-prp.md

Usage
/execute-prp llms/PRPs/user-profile.md

Workflow: Preflight checks → Ultrathink plan → Task-by-task execution → Integration checks → Generate artifacts

Output: Fully implemented feature with tests, validation passing, and PR-ready artifacts

Heads up

Creates feature branch automatically. Runs validation after each task to ensure quality.

/api-first

Generates type-safe API implementation from OpenAPI specification.

Command: /llms/commands/api-first.md

Usage
/api-first specs/api/openapi.yaml --client --server

Workflow: Parse OpenAPI spec → Generate server routes with Zod validators → Create client SDK → Apply security patterns

Output: API routes, TypeScript types, Zod validators, and comprehensive tests

/bmad-init

Initializes multi-agent development workflow for complex features.

Command: /llms/commands/bmad-init.md

Usage
/bmad-init "real-time collaboration" --agents=3 --context=full --prp

Workflow: Feature decomposition → Shared context creation → Agent PRP generation → Contract definition → Integration planning

Output: Coordinated agent PRPs in bmad/<feature>/ with bounded contexts and integration plan

Code Quality Commands

Commands for review, refactoring, and quality enforcement.

/review

Performs comprehensive code review with security focus.

Command: /llms/commands/review.md

Usage
/review apps/dashboard/app/api/users

Workflow: Scan code → Check security vulnerabilities → Verify TypeScript usage → Validate pattern compliance → Assess performance

Output: Review report with severity-ranked findings and fix suggestions

Pro Tip

Reviews against SECURITY.md, AUTH_PATTERNS.md, and BILLING.md requirements.

/refactor

Refactors code for maintainability and performance while preserving behavior.

Command: /llms/commands/refactor.md

Usage
/refactor apps/dashboard/lib/user-utils.ts --safe

Workflow: Analyze code structure → Identify improvements → Apply refactoring patterns → Ensure behavior preservation → Validate changes

Output: Refactored code with tests confirming behavior preservation

Pro Tip

Use --safe for conservative refactoring or --aggressive for broader improvements.

/upgrade-advisor

Analyzes and plans dependency upgrades.

Command: /llms/commands/upgrade-advisor.md

Usage
/upgrade-advisor --breaking --security

Workflow: Audit dependencies → Detect breaking changes → Generate migration paths → Assess risks → Create upgrade plan

Output: Upgrade plan with migration steps, breaking changes, and rollback strategy

UI Commands

Commands for component work and design system maintenance.

/componentize

Extracts reusable components from code with CVA patterns.

Command: /llms/commands/componentize.md

Usage
/componentize apps/marketing/app/page.tsx --name=HeroSection --story

Workflow: Identify target markup → Create component shell with CVA → Add RTL + Vitest tests → Optional Storybook story → Replace usage in apps

Output: Component in packages/ui/src/components/, tests, optional story, and updated call sites

/copy-polish

Improves UI copy for clarity and consistency.

Command: /llms/commands/copy-polish.md

Usage
/copy-polish --tone=professional --locale=en-US

Workflow: Analyze UI strings → Improve clarity and consistency → Ensure accessibility → Maintain brand voice

Output: Updated copy across UI with consistency improvements

/ds-lint

Validates design system usage and consistency.

Command: /llms/commands/ds-lint.md

Usage
/ds-lint apps/marketing

Workflow: Check component usage → Validate theme consistency → Verify spacing/typography → Confirm color palette compliance

Output: Validation report with violations and fix suggestions

/a11y-scan

Scans for accessibility issues and WCAG compliance.

Command: /llms/commands/a11y-scan.md

Usage
/a11y-scan apps/dashboard

Workflow: Check ARIA attributes → Test keyboard navigation → Verify screen reader compatibility → Assess color contrast

Output: Accessibility report with WCAG level and remediation steps

Analysis Commands

Commands for performance, SEO, and analytics optimization.

/perf-audit

Analyzes performance and suggests optimizations.

Command: /llms/commands/perf-audit.md

Usage
/perf-audit --bundle --runtime

Workflow: Analyze bundle sizes → Profile render performance → Check database queries → Assess memory usage → Generate recommendations

Output: Performance report with optimization recommendations

/seo-boost

Optimizes SEO implementation.

Command: /llms/commands/seo-boost.md

Usage
/seo-boost apps/marketing

Workflow: Audit meta tags and Open Graph → Add structured data (JSON-LD) → Optimize Core Web Vitals → Improve content structure

Output: SEO improvements with validation results

/event-map

Maps event flows and analytics implementation.

Command: /llms/commands/event-map.md

Usage
/event-map --visual --missing

Workflow: Analyze event tracking → Map user journeys → Identify analytics gaps → Optimize conversion funnels

Output: Event map with coverage report and recommendations

Development Commands

Commands for deployment, experimentation, and documentation.

/deploy

Interactive deployment guide for cloud platforms.

Command: /llms/commands/deploy.md

Usage
/deploy

Workflow: Platform selection → App identification → Local build check → Platform configuration → Environment variables → Post-deploy verification

Output: Live deployment with documented configuration

Heads up

Lists all required environment variables including BETTER_AUTH_SECRET, APP_BASE_URL, CONVEX_DEPLOY_KEY, and OAuth credentials.

/experiment

Creates isolated experiment branches for testing ideas.

Command: /llms/commands/experiment.md

Usage
/experiment "new auth flow" --sandbox

Workflow: Create experiment branch → Set up isolated environment → Track changes separately → Provide cleanup commands

Output: Isolated experiment environment with rollback instructions

/docs-gen

Generates documentation from code.

Command: /llms/commands/docs-gen.md

Usage
/docs-gen packages/ui

Workflow: Analyze code → Generate API documentation → Extract type definitions → Create usage examples → Build architecture guides

Output: Documentation in apps/docs/docs/ following existing patterns

Git Commands

Commands for version control and GitHub integration.

/commit

Creates conventional commits with semantic versioning.

Command: /llms/commands/commit.md

Usage
/commit

Workflow: Run tests and linting → Stage appropriate files → Generate conventional commit message → Exclude sensitive files

Output: Formatted commit following conventional commit standards (feat, fix, docs, test, etc.)

Pro Tip

Automatically excludes files with potential secrets like .env and credentials files.

/github-create-pr

Generates comprehensive pull request descriptions.

Command: /llms/commands/github-create-pr.md

Usage
/github-create-pr

Workflow: Analyze changes → Generate summary → Create test plan → Document breaking changes → Add screenshots (UI changes) → Include rollback instructions

Output: Complete PR description ready for GitHub

Command Structure

All commands follow consistent patterns for reliability and maintainability.

Next Steps