Files
myclaude/dev-workflow/README.md
2025-11-24 21:52:24 +08:00

164 lines
3.6 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# /dev - Minimal Dev Workflow
## Overview
A freshly designed lightweight development workflow with no legacy baggage, focused on delivering high-quality code fast.
## Flow
```
/dev trigger
AskUserQuestion (requirements clarification)
Codex analysis (extract key points and tasks)
develop-doc-generator (create dev doc)
Codex concurrent development (25 tasks)
Codex testing & verification (≥90% coverage)
Done (generate summary)
```
## The 6 Steps
### 1. Clarify Requirements
- Use **AskUserQuestion** to ask the user directly
- No scoring system, no complex logic
- 23 rounds of Q&A until the requirement is clear
### 2. Codex Analysis
- Call codex to analyze the request
- Extract: core functions, technical points, task list (25 items)
- Output a structured analysis
### 3. Generate Dev Doc
- Call the **develop-doc-generator** agent
- Produce a single `dev-plan.md`
- Include: task breakdown, file scope, dependencies, test commands
### 4. Concurrent Development
- Work from the task list in dev-plan.md
- Independent tasks → run in parallel
- Conflicting tasks → run serially
### 5. Testing & Verification
- Each codex task:
- Implements the feature
- Writes tests
- Runs coverage
- Reports results (≥90%)
### 6. Complete
- Summarize task status
- Record coverage
## Usage
```bash
/dev "Implement user login with email + password"
```
**No options**, fixed workflow, works out of the box.
## Output Structure
```
.claude/specs/{feature_name}/
└── dev-plan.md # Dev document generated by agent
```
Only one file—minimal and clear.
## Core Components
### Tools
- **AskUserQuestion**: interactive requirement clarification
- **codex**: analysis, development, testing
- **develop-doc-generator**: generate dev doc (subagent, saves context)
## Key Features
### ✅ Fresh Design
- No legacy project residue
- No complex scoring logic
- No extra abstraction layers
### ✅ Minimal Orchestration
- Orchestrator controls the flow directly
- Only three tools/components
- Steps are straightforward
### ✅ Concurrency
- 25 tasks in parallel
- Auto-detect dependencies and conflicts
- Codex executes independently
### ✅ Quality Assurance
- Enforces 90% coverage
- Codex tests and verifies its own work
- Automatic retry on failure
## Example
```bash
# Trigger
/dev "Add user login feature"
# Step 1: Clarify requirements
Q: What login methods are supported?
A: Email + password
Q: Should login be remembered?
A: Yes, use JWT token
# Step 2: Codex analysis
Output:
- Core: email/password login + JWT auth
- Task 1: Backend API
- Task 2: Password hashing
- Task 3: Frontend form
# Step 3: Generate doc
dev-plan.md generated ✓
# Step 4-5: Concurrent development
[task-1] Backend API → tests → 92% ✓
[task-2] Password hashing → tests → 95% ✓
[task-3] Frontend form → tests → 91% ✓
```
## Directory Structure
```
dev-workflow/
├── README.md # This doc
├── commands/
│ └── dev.md # Workflow definition
└── agents/
└── develop-doc-generator.md # Doc generator
```
Minimal structure, only three files.
## When to Use
**Good for**:
- Any feature size
- Fast iterations
- High test coverage needs
- Wanting concurrent speed-up
## Design Principles
1. **KISS**: keep it simple
2. **Disposable**: no persistent config
3. **Quality first**: enforce 90% coverage
4. **Concurrency first**: leverage codex
5. **No legacy baggage**: clean-slate design
---
**Philosophy**: zero tolerance for complexity—ship the smallest usable solution, like Linus would.