Skip to main content
ClaudeWave
Slash Command57.6k estrellas del repoactualizado today

implement

The implement command executes phased feature development by orchestrating specialized agents through eight sequential phases, enforcing validation gates between each phase, and ensuring compliance with project constitutional guidelines. Use this command after planning documentation is complete to systematically build features with quality checks, code review, and documentation generation at each stage.

Instalar en Claude Code
Copiar
mkdir -p ~/.claude/commands && curl -fsSL https://raw.githubusercontent.com/shanraisshan/claude-code-best-practice/HEAD/development-workflows/rpi/.claude/commands/rpi/implement.md -o ~/.claude/commands/implement.md
Después abre una sesión nueva de Claude Code; el slash command carga automáticamente.

implement.md

## User Input

```text
$ARGUMENTS
```

You **MUST** parse the user input to extract the feature slug (the folder name in `rpi/`).

## Purpose

This command executes phased implementation of features based on planning documentation. It orchestrates specialized agents, enforces validation gates, and ensures constitutional compliance throughout implementation.

**Prerequisites**:
- Feature folder exists at `rpi/{feature-slug}/`
- Planning completed (`rpi/{feature-slug}/plan/PLAN.md` exists)

**Output Location**: `rpi/{feature-slug}/implement/`

**This is Step 4 of the RPI Workflow** (final step - actual implementation).

## Flags

- `--phase N`: Execute specific phase number (1-8), if omitted starts from phase 1
- `--validate-only`: Only validate current phase, don't implement
- `--skip-validation`: Skip validation gate and proceed (use with caution)

## Available Agents

All agents use **Opus model** for maximum quality.

### Implementation Agent

| Agent | Type | When to Use |
|-------|------|-------------|
| `senior-software-engineer` | Custom | All implementation tasks |

### Support Agents

| Agent | Type | Purpose |
|-------|------|---------|
| `Explore` | Built-in | Pre-implementation code exploration |
| `code-reviewer` | Custom | Code review and quality validation |
| `constitutional-validator` | Custom | Validate against project constitution |
| `documentation-analyst-writer` | Built-in | Documentation generation |

### Agent Routing

All implementation tasks are handled by the `senior-software-engineer` agent.

---

## Phase 0: Load Context and Rules

**Prerequisites**: Feature slug parsed from user input

**Process**:

### 0.1 Load Project Constitution

1. Check for a constitution or principles document in the repository
2. If exists, extract:
   - Technical constraints (type safety, testing, component isolation)
   - Business principles (quality standards, workflow)
   - Architectural boundaries
3. Store constraints for enforcement during implementation

### 0.2 Load Domain-Specific Guidelines

Based on files to be modified, load relevant project guidelines:
- Check for component-specific README files
- Check for coding style guides
- Check for testing requirements documentation

### 0.3 Analyze Implementation Scope

1. Read `rpi/{feature-slug}/plan/PLAN.md`
2. Identify all files to be modified
3. Map files to implementation agent

**Outputs**:
- Constitutional context summary
- Domain rules loaded
- File-to-agent mapping
- Phase execution plan

**Validation**:
- [ ] Constitution loaded (if exists)
- [ ] Domain rules loaded for affected files
- [ ] All files mapped to agents
- [ ] Execution plan understood

---

## Phased Implementation Workflow

### Phase Implementation Loop

For each phase in PLAN.md:

```
┌─────────────────────────────────────────────────────────────────┐
│ Phase N: [Phase Name]                                            │
├─────────────────────────────────────────────────────────────────┤
│                                                                  │
│  1. Code Discovery (Explore Agent)                              │
│     └─→ Understand existing code before changing it             │
│                                                                  │
│  2. Implementation (senior-software-engineer)                   │
│     └─→ Implement phase deliverables                            │
│                                                                  │
│  3. Self-Validation                                             │
│     └─→ Engineer validates against phase checklist              │
│                                                                  │
│  4. Code Review (code-reviewer Agent)                           │
│     └─→ Security, correctness, maintainability                  │
│                                                                  │
│  5. User Validation Gate                                        │
│     └─→ STOP and request user approval                          │
│         ├─→ PASS: Proceed to next phase                         │
│         ├─→ CONDITIONAL PASS: Note issues, proceed              │
│         └─→ FAIL: Fix issues, re-validate                       │
│                                                                  │
│  6. Documentation Update                                        │
│     └─→ Update phase status in PLAN.md                          │
│                                                                  │
└─────────────────────────────────────────────────────────────────┘
```

---

## Step 1: Code Discovery (Per Phase)

**Agent**: Explore (Built-in, via Task tool)

**Purpose**: Ground implementation in code reality before making changes.

**Process**:
1. Launch Explore agent via Task tool with `subagent_type="Explore"`
2. Request analysis of files affected by current phase
3. Understand existing patterns, integration points, constraints

**Explore Agent Prompt**:
```
Analyze the codebase to prepare for implementing Phase N of [feature-name].

Files to be modified in this phase:
[List files from PLAN.md]

Investigate and document:

1. **Current Implementation**
   - How do these files currently work?
   - What patterns are used?
   - What functions/classes will be affected?

2. **Integration Points**
   - What other files import or use these modules?
   - What APIs or interfaces will change?
   - What tests cover this code?

3. **Dependencies**
   - What libraries are used?
   - What internal utilities are available?
   - What constraints exist from current code?

4. **Patterns to Follow**
   - What coding style is used in these files?
   - What naming conventions are followed?
   - What error handling patterns exist?

5. **Risks and Considerations**
   - What could break if we change this?
   - What edge cases exist?
   - What backward compatibility concerns?

Provide a discovery summary to inform implementation.
```

**Output**: Discovery summary for implementation agent

---

## Step 2: Implementa
development-workflows-research-agentSubagent

Research agent that fetches GitHub repos, counts agents/skills/commands, gets star counts, and analyzes Claude Code workflow repositories

presentation-claude-codeSubagent

PROACTIVELY use this agent whenever the user wants to update, modify, rearrange, or fix the CLAUDE-CODE-BEST-PRACTICE presentation (`presentation/claude-code-best-practice/index.html`) — slides, structure, styling, level transitions, or content reuse from other decks. This is the canonical reusable Claude Code best-practices deck. Do NOT use this agent for the vibe-coding presentation (use `presentation-vibe-coding`) or the GDG Kolachi claude-gemini presentation (use `presentation-claude-gemini`).

presentation-claude-geminiSubagent

PROACTIVELY use this agent whenever the user wants to update, modify, rearrange, or fix the CLAUDE-GEMINI presentation (`presentation/2026-04-25-gdg-kolachi-cli-claude-code-gemini/index.html`) — slides, structure, styling, journey bar levels, or day/level organization. Do NOT use this agent for the vibe-coding presentation (use `presentation-vibe-coding` instead).

presentation-vibe-codingSubagent

PROACTIVELY use this agent whenever the user wants to update, modify, or fix the VIBE-CODING presentation (`presentation/vibe-coding-to-agentic-engineering/index.html`) — slides, structure, styling, or level transitions. Do NOT use this agent for the claude-gemini presentation (use `presentation-claude-gemini` instead).

time-agent-pktSubagent

Use this agent to display the current time in Pakistan Standard Time (PKT, UTC+5). (root scope — see agent-teams for Dubai time)

weather-agentSubagent

Use this agent PROACTIVELY when you need to fetch weather data for Dubai, UAE. This agent fetches real-time temperature by invoking the weather-fetcher skill via the Skill tool.

time-commandSlash Command

Display the current time in Pakistan Standard Time (PKT, UTC+5)

weather-orchestratorSlash Command

Fetch Dubai weather and create an SVG weather card