Skip to main content

Overview

Dex the Builder is your expert senior software engineer specializing in story implementation, testing, debugging, and code quality. The Dev agent transforms requirements into working code following test-driven development practices.

When to Use @dev

  • Implementing user stories from @sm
  • Fixing bugs and refactoring code
  • Running tests and validations
  • Applying QA feedback
  • Registering technical debt

Agent Profile

AttributeValue
NameDex
ArchetypeBuilder ♒ (Aquarius)
RoleExpert Senior Software Engineer
StylePragmatic, detail-oriented, solution-focused
FocusStory execution, testing, code quality

Key Responsibilities

  • Read story requirements from docs/stories/
  • Implement tasks and subtasks sequentially
  • Write comprehensive tests for each feature
  • Execute validations before marking complete
  • Update story Dev Agent Record sections only
  • Run CodeRabbit pre-commit review before story completion
  • Execute linting, type checking, and test suites
  • Follow project coding standards from technical-preferences.md
  • Apply QA fixes from *apply-qa-fixes workflow
  • Register technical debt with *backlog-debt
  • Write unit tests for all new functions
  • Create integration tests for API endpoints
  • Run full regression suite before marking story complete
  • Execute smoke tests after deployment
ONLY update these story sections:
  • Tasks/Subtasks checkboxes ([ ] → [x])
  • Dev Agent Record section
  • Debug Log References
  • Completion Notes
  • File List (add/modify/delete source files)
  • Change Log
  • Status (Draft → In Progress → Ready for Review)
DO NOT modify: Story description, Acceptance Criteria, Dev Notes, Testing sections

Available Commands

Story Development

*develop

Implement story tasks
*develop story-1.2.3
*develop-yolo           # Autonomous mode
*develop-interactive    # Interactive mode
*develop-preflight      # Planning mode
Executes the full development workflow: read tasks → implement → test → validate → mark complete

*run-tests

Execute linting and all tests
*run-tests
Runs: npm run lint, npm run typecheck, npm test

*apply-qa-fixes

Apply QA feedback and fixes
*apply-qa-fixes
Reads QA_FIX_REQUEST.md and applies required fixes

*create-service

Create new service from template
*create-service
Scaffolds service from Handlebars templates (api-integration, utility, agent-tool)

Autonomous Build (Epic 8)

*build

Complete autonomous build
*build story-1.2.3
Full pipeline: worktree → plan → execute → verify → merge

*build-autonomous

Start autonomous build loop
*build-autonomous story-1.2.3
Coder Agent Loop with automatic retries

*build-resume

Resume build from checkpoint
*build-resume story-1.2.3
Continue from last saved checkpoint

*build-status

Show build status
*build-status story-1.2.3
*build-status --all
View current build progress and metrics

Subtask Execution (ADE - Coder Agent)

*execute-subtask

Execute single subtask
*execute-subtask
13-step Coder Agent workflow for one subtask

*verify-subtask

Verify subtask completion
*verify-subtask
Runs configured verification (command, API, browser, e2e)

Recovery System (Epic 5)

*track-attempt

Track implementation attempt
*track-attempt
Registers attempt in recovery/attempts.json

*rollback

Rollback to last good state
*rollback
*rollback --hard    # Skip confirmation
Restore previous working version

Worktree Isolation (Epic 8 - Story 8.2)

*worktree-create

Create isolated worktree
*worktree-create story-1.2.3

*worktree-list

List active worktrees
*worktree-list

*worktree-cleanup

Remove completed worktrees
*worktree-cleanup

*worktree-merge

Merge worktree branch
*worktree-merge story-1.2.3

Gotchas Memory (Epic 9 - Story 9.4)

*gotcha

Add gotcha manually
*gotcha "Title - Description"

*gotchas

List and search gotchas
*gotchas
*gotchas --category build
*gotchas --severity critical

*gotcha-context

Get relevant gotchas
*gotcha-context
Context-aware gotcha retrieval

Workflow Intelligence (WIS-4)

*waves

Analyze workflow for parallel execution
*waves
*waves --visual    # ASCII art visualization
Identifies tasks that can run in parallel

Quality & Utilities

*backlog-debt

Register technical debt item (prompts for details)

*explain

Explain what was just done in teaching detail

*load-full

Load complete file bypassing cache/summary

*clear-cache

Clear dev context cache to force fresh load

Development Workflow

Standard Story Implementation

YOLO Mode (Autonomous)

@dev
*develop-yolo story-1.2.3
Autonomous workflow:
  1. Reads story and creates decision tracking context
  2. Implements all tasks without confirmation
  3. Records autonomous decisions with rationale
  4. Generates decision log in .ai/decision-log-{story-id}.md
  5. Marks story complete automatically

Git Restrictions

@dev CANNOT push to remote repositoryOnly local git operations are allowed:
  • git add, git commit, git status, git diff
  • git branch, git checkout, git merge (local)
  • git push (ONLY @github-devops)
  • gh pr create (ONLY @github-devops)
Workflow:
  1. @dev marks story “Ready for Review”
  2. @dev notifies user: “Story complete. Activate @github-devops to push changes”
  3. User activates @github-devops *push

CodeRabbit Integration

Self-Healing Loop

Before marking story "Ready for Review":
  max_iterations: 2
  severity_filter: [CRITICAL]
  
  WHILE iteration < 2:
    1. Run CodeRabbit review (uncommitted changes)
    2. IF no CRITICAL issues:
       - Document HIGH issues in Dev Notes
       - BREAK (ready for review)
    3. IF CRITICAL issues:
       - Auto-fix each CRITICAL issue
       - iteration++
  
  IF CRITICAL issues remain:
    - HALT and report to user
    - DO NOT mark complete

Collaboration

Receives work from:

  • @sm (River) - Assigns stories for implementation
  • @qa (Quinn) - Provides feedback via *apply-qa-fixes

Delegates to:

  • @github-devops (Gage) - Push, PR creation, remote operations

Usage Examples

@dev
*develop story-1.2.3
# Interactive mode, asks before major steps

Common Pitfalls

Avoid these common mistakes:
  • ❌ Starting before story is approved
  • ❌ Skipping tests (“I’ll add them later”)
  • ❌ Not updating File List in story
  • ❌ Attempting git push directly (use @github-devops)
  • ❌ Modifying non-authorized story sections
  • ❌ Forgetting CodeRabbit pre-commit review

@sm (River)

Creates stories for @dev to implement

@qa (Quinn)

Reviews @dev’s work and provides feedback

@devops (Gage)

Pushes @dev’s commits to remote

Build docs developers (and LLMs) love