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

The 5-Step Workflow

A structured approach to development that prevents over-engineering and ensures quality at every step.

1
Focus
2
Prevent
3
Test
4
Document
5
Commit
1

Focus Problem

/focus-problem

Understand the problem before writing any code. Use parallel agents to explore the codebase and gather context.

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

/prevent-overdev

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 Red-Green-Refactor cycle ensures your code works and stays maintainable.

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

doc-writer agent

Auto-generate documentation for your changes. README updates, API docs, and inline comments where needed.

Auto-generated:

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

Smart Commit

/smart-commit

Generate conventional commit messages automatically. Consistent, descriptive, and following best practices.

/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 <[email protected]>

Usage

# Run the complete workflow
/workflow

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