Skip to main content
← Back to Director Mode Lite
/workflow

The 5-Step Workflow

A structured checklist for scoping, minimal implementation, testing, documentation review, and a clean commit.

Execution note: /workflow supplies instructions and checklists; it is not a deterministic runner. Claude may ask clarifying questions or choose an available agent, and you should verify the real tests, diff, and commit. See Claude Code's official agents documentation.

1
Focus
2
Prevent
3
Test
4
Document
5
Commit
1

Focus Problem

/focus-problem

Understand the problem before writing code. The shipped command shows one Explore agent for codebase context; additional agents are optional and should only handle independent work.

What happens:

  • Analyze project structure and architecture
  • Search for related code and patterns
  • Review existing tests and documentation
  • Identify dependencies and constraints
/focus-problem "understand the authentication flow"

# Output: Structured analysis report
# - Current implementation
# - Key files involved
# - Potential issues
# - Recommended approach
2

Prevent Over-Development

Built into /workflow · no separate command

YAGNI principle check. Only build what's actually needed. Avoid premature optimization and unnecessary abstraction.

Checklist:

  • Is this feature actually required?
  • Can we solve it simpler?
  • Are we adding unnecessary abstractions?
  • What's the minimum viable implementation?

Avoid:

  • • Database integration when in-memory works
  • • Auth system when not in scope
  • • Complex validation libraries for simple checks
  • • Premature performance optimization
3

Test First (TDD)

/test-first

Write tests before implementation. The checklist guides Red-Green-Refactor; run each test and confirm the expected failure and pass yourself.

RED

Write a failing test

GREEN

Write minimal code to pass

REFACTOR

Improve without breaking

/test-first "implement user login"

# RED: Write test first
describe('login', () => {
  it('returns token for valid credentials');
  it('returns 401 for invalid password');
});

# GREEN: Implement to pass
# REFACTOR: Clean up
4

Document

/workflow checklist · optional doc-writer delegation

Review whether the change requires README, API documentation, examples, or comments. The doc-writer agent is available for explicit or model-selected delegation, but it is not guaranteed to run.

Review and update as needed:

  • Function/method JSDoc comments
  • API endpoint documentation
  • README updates for new features
  • Usage examples
5

Smart Commit

/smart-commit

Inspect the diff, run configured quality checks, group related changes, and create Conventional Commits. Review what will be committed first; this step does not push to a remote.

/smart-commit

feat(auth): implement JWT token validation

- Add validateToken function with expiry check
- Include refresh token rotation
- Add comprehensive test coverage (95%)

Co-Authored-By: Claude <noreply@anthropic.com>

Usage

# Run the complete workflow
/workflow

# Or run individual steps
/focus-problem "describe what you want to build"
/test-first
/smart-commit