Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Chapter 34: Claude Code Command Reference

Complete Command Guide for POS Development

This chapter provides a comprehensive reference for all Claude Code multi-agent commands used throughout POS platform development. Use this as your quick-reference guide during implementation.


Table of Contents

  1. Quick Commands
  2. Workflow Commands
  3. Specialized Commands
  4. Command Sequences by Task
  5. Best Practices

Quick Commands

Core Development Commands

CommandAgents UsedPurpose
/o <task>Auto-selectedSmart routing - Claude figures out the best approach
/dev-teamEditor + EngineerCode implementation with automatic review
/design-teamDemo + StylistUI design with accessibility validation
/architect-reviewArchitectArchitecture validation and decisions
/engineerEngineer (read-only)Code review without modifications
/refactor-checkEngineerFind code quality issues and duplication
/researchResearcherDeep online investigation
/learnMemoryCapture discoveries for future sessions
/cleanupOrchestratorPost-task organization and documentation

When to Use Each Command

/o <task>
  Use for: General tasks where you're unsure which agent is best
  Example: /o add customer search to POS
  Result: Claude analyzes and routes to appropriate agents

/dev-team
  Use for: Any code implementation that needs review
  Example: /dev-team implement tenant middleware
  Result: Editor writes code, Engineer reviews it

/design-team
  Use for: UI/UX work with accessibility
  Example: /design-team create checkout flow mockup
  Result: Demo creates design, Stylist validates accessibility

/architect-review
  Use for: Validating major decisions
  Example: /architect-review event sourcing for inventory
  Result: Architect evaluates and documents ADR

/engineer
  Use for: Read-only code review
  Example: /engineer review PaymentService.cs
  Result: Feedback without code changes

/refactor-check
  Use for: Finding technical debt
  Example: /refactor-check src/Services/
  Result: List of duplication, violations, improvements

/research
  Use for: External research
  Example: /research PCI-DSS 4.0 changes for retail
  Result: Comprehensive research with sources

/learn
  Use for: Capturing learnings
  Example: /learn EF Core tenant isolation pattern
  Result: Saved to memory for future sessions

/cleanup
  Use for: Finishing work sessions
  Example: /cleanup after implementing inventory sync
  Result: Documentation updated, files organized

Workflow Commands

Standard Workflows

CommandStagesTotal Agents
/workflowPlan, Edit, Review3
/pos-workflowPlan, Architect, Edit, Review4
/auto-workflowDoc, Plan, Implement, Review, Doc5
/design-workflowResearch, Plan, Demo, Style, Implement, Review6

Workflow Details

/workflow - Basic Development Workflow

Stage 1: Plan
  Agent: Planner
  Output: Implementation plan with steps

Stage 2: Edit
  Agent: Editor
  Output: Code implementation

Stage 3: Review
  Agent: Engineer
  Output: Code review feedback

Use for: Standard feature implementation

Example:

/workflow add customer loyalty points calculation

/pos-workflow - Full POS Workflow

Stage 1: Plan
  Agent: Planner
  Output: Detailed implementation plan

Stage 2: Architect Review
  Agent: Architect
  Output: Architecture validation, ADR if needed

Stage 3: Edit
  Agent: Editor
  Output: Code implementation

Stage 4: Review
  Agent: Engineer
  Output: Code review with POS-specific checks

Use for: Major POS features requiring architecture validation

Example:

/pos-workflow implement offline payment queue

/auto-workflow - Fully Automated

Stage 1: Document (Pre)
  Agent: Documenter
  Output: Current state documentation

Stage 2: Plan
  Agent: Planner
  Output: Implementation strategy

Stage 3: Implement
  Agent: Editor
  Output: Code changes

Stage 4: Review
  Agent: Engineer
  Output: Quality validation

Stage 5: Document (Post)
  Agent: Documenter
  Output: Updated documentation

Use for: Complete features needing full documentation

Example:

/auto-workflow implement multi-store inventory transfer

/design-workflow - UI Development

Stage 1: Research
  Agent: Researcher
  Output: UX patterns, accessibility requirements

Stage 2: Plan
  Agent: Planner
  Output: Component structure plan

Stage 3: Demo
  Agent: Demo Creator
  Output: Visual mockups (ASCII/text)

Stage 4: Style
  Agent: Stylist
  Output: Accessibility validation, WCAG compliance

Stage 5: Implement
  Agent: Editor
  Output: Component code

Stage 6: Review
  Agent: Engineer
  Output: Code review

Use for: New UI components and screens

Example:

/design-workflow create product quick-add modal

Specialized Commands

Architecture Commands

# Create new ADR
/architect-review ADR for <decision topic>

# Validate existing architecture
/architect-review validate <component> against ADRs

# Review cross-cutting concerns
/architect-review security implications of <change>

Security Commands

# Security-focused review
/engineer security review <file or feature>

# PCI-DSS compliance check
/refactor-check PCI-DSS compliance in payment flow

# Authentication/authorization review
/architect-review auth flow for <feature>

Database Commands

# Schema review
/engineer review migration <migration-name>

# Performance analysis
/refactor-check database performance in <repository>

# Data integrity check
/architect-review data model for <entity>

Testing Commands

# Generate tests
/dev-team write tests for <feature>

# Review test coverage
/engineer review test coverage for <service>

# Integration test plan
/workflow plan integration tests for <module>

Command Sequences by Task

Task 1: Adding a New API Endpoint

Scenario: Add GET /api/v1/tenants/{tenantId}/customers/search

# Step 1: Review existing patterns
/engineer review existing customer endpoints

# Step 2: Plan and implement
/dev-team add customer search endpoint with pagination

# Step 3: Validate architecture
/architect-review customer search query patterns

# Step 4: Add tests
/dev-team write tests for customer search endpoint

# Step 5: Document
/cleanup update API documentation

Expected Files Modified:

  • Controllers/CustomersController.cs
  • Services/ICustomerService.cs
  • Services/CustomerService.cs
  • Tests/CustomerControllerTests.cs

Task 2: Creating a New Domain Entity

Scenario: Add LoyaltyProgram entity with points tracking

# Step 1: Architecture review
/architect-review domain model for loyalty program

# Step 2: Create entity and events
/dev-team create LoyaltyProgram entity with domain events

# Step 3: Add repository
/dev-team implement ILoyaltyProgramRepository

# Step 4: Create migration
/dev-team add EF Core migration for loyalty_programs

# Step 5: Review everything
/engineer review loyalty program implementation

# Step 6: Capture pattern
/learn loyalty program implementation pattern

Expected Files Created:

  • Domain/Entities/LoyaltyProgram.cs
  • Domain/Events/LoyaltyPointsEarnedEvent.cs
  • Domain/Events/LoyaltyPointsRedeemedEvent.cs
  • Infrastructure/Repositories/LoyaltyProgramRepository.cs
  • Migrations/YYYYMMDDHHMMSS_AddLoyaltyProgram.cs

Task 3: Implementing a Background Job

Scenario: Daily inventory snapshot job

# Step 1: Research patterns
/research background job patterns in ASP.NET Core

# Step 2: Architecture decision
/architect-review background job hosting strategy

# Step 3: Implement job
/dev-team implement daily inventory snapshot job

# Step 4: Add scheduling
/dev-team configure Hangfire scheduling for snapshot job

# Step 5: Add monitoring
/dev-team add job health checks and metrics

# Step 6: Test
/dev-team write integration tests for snapshot job

Expected Files Created:

  • Jobs/InventorySnapshotJob.cs
  • Jobs/IInventorySnapshotJob.cs
  • Configuration/HangfireConfig.cs
  • Tests/InventorySnapshotJobTests.cs

Task 4: Adding Tests

Scenario: Improve test coverage for PaymentService

# Step 1: Analyze current coverage
/engineer review test coverage for PaymentService

# Step 2: Identify gaps
/refactor-check find untested paths in PaymentService

# Step 3: Unit tests
/dev-team write unit tests for PaymentService edge cases

# Step 4: Integration tests
/dev-team write integration tests for payment flow

# Step 5: Validate
/engineer review new payment tests

Test Categories to Cover:

  • Unit tests for business logic
  • Integration tests for database operations
  • Mock tests for external payment gateway
  • Edge case tests (failures, timeouts, partial payments)

Task 5: Security Review

Scenario: Pre-deployment security audit

# Step 1: Authentication review
/engineer security review authentication flow

# Step 2: Authorization review
/architect-review RBAC implementation

# Step 3: Data protection
/refactor-check sensitive data handling

# Step 4: Input validation
/engineer review input validation in controllers

# Step 5: Dependency audit
/research security vulnerabilities in dependencies

# Step 6: Document findings
/cleanup create security review report

Security Checklist Integration: See Chapter 36: Checklists for complete security review checklist.


Task 6: UI Mockup Creation

Scenario: Design new receipt customization screen

# Step 1: Research
/research receipt customization UX patterns

# Step 2: Create mockup
/design-team create receipt customization screen mockup

# Step 3: Accessibility review
/design-team validate accessibility for receipt editor

# Step 4: Get architecture input
/architect-review receipt template storage approach

# Step 5: Implement
/dev-team implement receipt customization component

# Step 6: Review
/engineer review receipt customization implementation

Design Artifacts:

  • ASCII mockup in markdown
  • Component hierarchy diagram
  • Accessibility checklist (WCAG 2.1 AA)
  • State management plan

Best Practices

Command Selection Guidelines

Feature Size        | Recommended Command
--------------------|--------------------
Quick fix           | /dev-team
Small feature       | /workflow
Major feature       | /pos-workflow
New UI screen       | /design-workflow
Architecture change | /architect-review first
Bug investigation   | /engineer then /dev-team
Research needed     | /research then /workflow

Chaining Commands Effectively

Good Pattern: Research then implement

/research multi-tenant caching strategies
# Read output, understand options
/architect-review caching strategy for tenant data
# Get ADR created
/dev-team implement tenant cache with Redis

Good Pattern: Review then fix

/engineer review InventoryService
# Get feedback list
/dev-team fix InventoryService issues
# Address each point

Bad Pattern: Skipping review

/dev-team implement critical payment feature
# Missing: /architect-review and /engineer review

Memory and Learning

# After solving a tricky problem
/learn how we handled concurrent inventory updates

# After making an architecture decision
/learn tenant isolation middleware pattern

# After debugging a complex issue
/learn debugging tips for offline sync conflicts

Session Management

Start of Session:

# Check what's pending
/o what's the status of POS implementation?

# Review recent changes
/engineer review changes since last session

End of Session:

# Clean up
/cleanup

# Document progress
/learn progress on <feature> implementation

Command Reference Card

Print this section for quick reference:

+------------------------------------------------------------------+
|                    CLAUDE CODE QUICK REFERENCE                    |
+------------------------------------------------------------------+
| QUICK COMMANDS                                                    |
| /o <task>         - Smart routing (figures out best approach)    |
| /dev-team         - Code with review (Editor + Engineer)          |
| /design-team      - UI with accessibility (Demo + Stylist)        |
| /architect-review - Architecture validation                       |
| /engineer         - Code review only (read-only)                  |
| /refactor-check   - Find code quality issues                      |
| /research         - Deep investigation                            |
| /learn            - Capture discoveries                           |
| /cleanup          - Post-task organization                        |
+------------------------------------------------------------------+
| WORKFLOWS                                                         |
| /workflow         - Plan -> Edit -> Review                        |
| /pos-workflow     - Plan -> Architect -> Edit -> Review           |
| /auto-workflow    - Doc -> Plan -> Implement -> Review -> Doc     |
| /design-workflow  - Research -> Plan -> Demo -> Style -> Impl     |
+------------------------------------------------------------------+
| COMMON SEQUENCES                                                  |
| New Endpoint:   /engineer review -> /dev-team -> /architect-review|
| New Entity:     /architect-review -> /dev-team -> /engineer       |
| Security Audit: /engineer security -> /refactor-check -> /cleanup |
| UI Component:   /design-workflow (all-in-one)                     |
+------------------------------------------------------------------+

Troubleshooting Commands

When Things Go Wrong

# Agent seems confused about context
/o reset context and continue with <task>

# Need to undo changes
/engineer review what changed
# Then git reset or manual fix

# Command not producing expected results
/o explain what /dev-team does for <task>
# Clarify expectations

# Need more detail from agent
/o expand on <specific aspect>

Getting Unstuck

# Stuck on implementation approach
/research alternatives for <problem>
/architect-review compare approaches

# Stuck on debugging
/engineer analyze error in <file>
/research common causes of <error>

# Stuck on design
/design-team brainstorm approaches for <UI problem>

Summary

NeedCommand
Write code with review/dev-team
Just review code/engineer
Design UI/design-team
Major architecture decision/architect-review
Research something/research
Full feature with docs/auto-workflow
Remember something/learn
Finish session/cleanup
Not sure what to use/o <task>

This reference is designed to be printed and kept nearby during development sessions.