| name | start-dev |
| description | Intelligent adaptive workflow with automatic pattern library loading, codebase exploration, and multi-approach architecture. Auto-detects frontend/backend tasks and loads relevant patterns. |
| version | 0.1.0 |
| source | fork |
| checksum | e30f29bb5dbb9b0a61c3b34aab635d1878940df8acad4dd89db2ebbe8e13a24e |
| updated_at | "2026-02-11T01:29:22.000Z" |
| intent | execution |
| layer | orchestration |
start-dev - Intelligent Workflow with Smart Pattern Loading
Native Subagent Protocol (Codex)
Codex supports native subagents. Delegate with spawn_agent, coordinate with send_input, collect via wait_agent, and clean up with close_agent.
Execution preference:
- Use native subagents first for independent workstreams (parallel when possible).
- Merge results in main thread and run final verification.
- Fallback only when delegation is blocked: use the
[ANALYST]/[ARCHITECT]/[EXECUTOR]/[REVIEWER] structure in a single response.
Minimal orchestration pattern:
spawn_agent -> send_input (optional) -> wait_agent -> close_agent
Codex subagent profile mapping:
code-explorer intent -> agent_type: explorer
code-architect / code-reviewer / code-executor intents -> agent_type: worker with role-specific prompt
- Parallel fan-out: spawn multiple agents, then
wait_agent and synthesize in main thread
Codex invocation: use start-dev: ... or $start-dev ...
Execute complete Research โ Plan โ Implement workflow with automatic pattern library loading and intelligent codebase understanding.
Usage
start-dev <feature description>
start-dev --no-explore <feature> # Force skip exploration
start-dev --force-explore <feature> # Force deep exploration
start-dev --frontend <feature> # Force frontend patterns
start-dev --backend <feature> # Force backend patterns
๐ NEW: Automatic Pattern Library Loading
The workflow now automatically detects task type and loads relevant pattern libraries:
Task Type Detection
Frontend Keywords (auto-loads frontend-patterns):
- UI, ็้ข, ็ปไปถ, ้กต้ข, ่กจๅ, ๅ็ซฏ
- React, Vue, Angular, ๆ ทๅผ, CSS
- ็จๆทไบคไบ, ๅจ็ป, ๅๅบๅผ, ๅธๅฑ
- Component, Hook, State, Props
Backend Keywords (auto-loads backend-patterns):
- API, ๆฅๅฃ, ๆๅก, ๆฐๆฎๅบ, ๅ็ซฏ
- ่ฎค่ฏ, ๆๆ, ไธญ้ดไปถ, ็ผๅญ
- Redis, PostgreSQL, MongoDB
- Authentication, Authorization, Middleware
Full-Stack Keywords (loads both):
- ๅ
จๆ , ๅฎๆดๅ่ฝ, ็ซฏๅฐ็ซฏ, full-stack
- ๅๅ็ซฏ, ๆดไฝๅฎ็ฐ, complete feature
Pattern Loading Process
Step 0: Task Analysis
โ
Detect: Frontend/Backend/Full-Stack
โ
Auto-load: Relevant Pattern Library (631/587/1218 lines)
โ
Extract: Relevant patterns for this specific task
โ
Integrate: Patterns into Research & Planning phases
โ
Continue: Normal workflow execution
Time overhead: +1-2 minutes for pattern loading
Accuracy improvement: +25-35% (better architecture decisions)
Complete Workflow Phases (Enhanced)
Phase 0A: ๐ฏ Pattern Library Loading (NEW - Automatic)
Trigger: Automatic task type detection
Actions:
- Analyze feature request for task type indicators
- Load relevant patterns:
- Frontend: 631 lines of component patterns, hooks, performance optimization
- Backend: 587 lines of API design, caching, authentication patterns
- Full-Stack: Both libraries (1,218 lines total)
- Extract relevant sections:
- Filter patterns matching the specific task
- Identify 3-5 most relevant patterns
- Prepare pattern references for next phases
- Create Pattern Context:
- Key patterns to follow
- Best practices to apply
- Common pitfalls to avoid
- Code examples to reference
Time: 1-2 minutes
Output: Pattern Context with:
- Task type: [frontend/backend/full-stack]
- Patterns loaded: [count] lines
- Relevant patterns: [list]
- Code examples: [count]
Example Output:
๐ฏ Task Type Detected: Frontend
๐ Loading frontend-patterns (631 lines)...
โ
Patterns loaded successfully
Relevant Patterns Identified:
1. Form Handling Pattern (lines 245-280)
2. State Management with Context (lines 320-365)
3. Error Boundary Pattern (lines 410-445)
4. Custom Hooks: useForm (lines 180-210)
Code Examples Available:
- Form validation with Zod
- Context + Reducer pattern
- Error handling best practices
Phase 0B: ๐ Codebase Exploration (Conditional)
Trigger: Intelligent auto-detection or --force-explore
Actions:
- Analyze feature request for existing code references
- Launch code-explorer agents in parallel:
- Explorer 1: Similar feature tracing
- Explorer 2: Architecture pattern analysis
- Explorer 3 (deep mode only): Integration points mapping
- Codex execution: spawn 2-3
explorer subagents in parallel, then wait_agent for completion
- Identify 5-10 key files to read
- Extract patterns, abstractions, and conventions
- Cross-reference with loaded pattern library
- Build context for next phases
Time: 3-8 minutes depending on mode
Output: Exploration report with:
- Entry points and execution flows
- Architecture layers and patterns
- Key files list with file:line references
- Dependencies and integration points
- Pattern library alignment check
Phase 1: ๐ Research (Enhanced with Patterns)
Goal: Version-accurate documentation + Pattern-guided approach
Actions:
- Perform version-accurate research (apply research-methodology principles)
- Apply
research-methodology skill
- Integrate loaded pattern library:
- Reference relevant patterns from Phase 0A
- Apply best practices from pattern library
- Use code examples as templates
- Integrate Phase 0B findings (if available)
- Create ResearchPack with:
- Library version identification
- API documentation (minimum 3 APIs)
- Code examples
- Pattern-aligned implementation approach
- Best practices from existing codebase
Quality Gate: ResearchPack score โฅ 80
- โ
Pass โ Proceed to Planning
- โ Fail โ Block, request fixes
Time: 2-5 minutes
Enhanced Output:
ResearchPack Created:
- Library: React Hook Form v7.45.0
- APIs documented: 5
- Pattern alignment: โ
Form Handling Pattern
- Code examples: 3 (from pattern library)
- Best practices: 8 (from frontend-patterns)
- Score: 87/100 โ
Phase 2: ๐ Planning (Enhanced with Patterns)
Goal: Compare multiple implementation approaches using pattern library guidance
Actions:
-
Launch 2-3 code-architect agents in parallel with different focuses:
- Minimal changes: Smallest change, maximum reuse
- Clean architecture: Maintainability, elegant abstractions
- Pragmatic balance: Speed + quality (default recommendation)
- NEW: Pattern-aligned: Follow loaded pattern library closely
- Codex execution: spawn 2-3
worker subagents with distinct architecture prompts, then compare outputs
-
Pattern-guided architecture:
- Apply patterns from Phase 0A
- Ensure consistency with pattern library
- Use recommended abstractions
- Follow best practices
-
Compare approaches:
- Files to modify count
- Complexity vs maintainability trade-offs
- Pattern library compliance
- Integration risks
- Testing requirements
-
Auto-select or quick confirm (5 seconds):
- ACE recommends best fit based on:
- Feature complexity
- Team context
- Pattern library alignment
- Past similar decisions
- User can override if needed
-
Create an Implementation Plan
-
Apply planning-methodology skill
-
Create Implementation Plan with:
- Chosen architecture approach
- Pattern library references (file:line)
- Files to create/modify (absolute paths)
- Step-by-step implementation sequence
- Rollback strategy
- Risk assessment
Quality Gate: Implementation Plan score โฅ 85
- โ
API matching with ResearchPack
- โ
Pattern library compliance
- โ
Rollback plan present
- โ
Pass โ Proceed to Implementation
- โ Fail โ Block, suggest research update
Time: 3-8 minutes
Enhanced Output:
Implementation Plan Created:
- Approach: Pattern-aligned (recommended)
- Pattern references:
โข Form Handling Pattern (frontend-patterns:245-280)
โข useForm Hook (frontend-patterns:180-210)
โข Error Boundary (frontend-patterns:410-445)
- Files to modify: 3
- Steps: 8
- Pattern compliance: 95% โ
- Score: 91/100 โ
Phase 3: โก Implementation (Pattern-Guided)
Goal: TDD implementation following pattern library
Pre-check: Circuit breaker must be closed
Actions:
- Implement the plan
- Apply patterns from library:
- Use code examples as templates
- Follow recommended abstractions
- Apply best practices
- Execute plan with TDD enforcement:
- Write test first (RED)
- Implement code (GREEN) using patterns
- Refactor (REFACTOR) to match patterns
- Self-correction loop (max 3 attempts)
- Pattern compliance check
- Validate all tests pass
- Record circuit breaker state
Circuit Breaker: Opens after 3 failed attempts
- Prevents infinite loops
- Requires manual reset
- Provides complete failure analysis
Time: 5-25 minutes depending on complexity
Enhanced Output:
Implementation Complete:
- Files created: 2
- Files modified: 3
- Tests passing: 12/12 โ
- Pattern compliance: 92% โ
- Patterns applied:
โข Form Handling Pattern โ
โข useForm Hook โ
โข Error Boundary โ
- Self-corrections: 1
Phase 4: ๐ Quality Review (Pattern-Aware)
Goal: Three-dimension code quality assurance + Pattern compliance
Actions:
-
Launch 3 code-reviewer agents in parallel:
- Reviewer 1: Simplicity/DRY/Elegance focus
- Reviewer 2: Bugs/Functional correctness focus
- Reviewer 3: Project conventions/Abstractions focus
- NEW: Pattern Reviewer: Pattern library compliance
- Codex execution: spawn 3-4
worker subagents with reviewer-specific prompts, then merge findings by severity/confidence
-
Pattern compliance check:
- Verify patterns were applied correctly
- Check for pattern violations
- Ensure best practices followed
- Validate code examples usage
-
Consolidate findings:
- Critical (confidence โฅ90): Auto-fix immediately
- High (confidence 80-89): Auto-fix or report
- Medium/Low (confidence <80): Report only
- Pattern violations: Report with fix suggestions
-
Auto-remediation:
- Critical issues: Fix automatically
- High issues: Quick fix if safe, otherwise report
- Pattern violations: Suggest fixes with pattern references
- Medium/Low: Add to improvement backlog
Time: 3-5 minutes
Output: Quality report with:
- Issues fixed automatically
- Issues requiring attention
- Pattern compliance score
- Improvement suggestions
- Overall quality score
Phase 5: ๐ง Knowledge Capture (Pattern Learning)
Goal: Continuous learning and pattern recognition
Actions:
-
Apply pattern-recognition skill
-
Record pattern usage:
- Which patterns were most helpful
- Pattern application success rate
- Pattern-related issues encountered
-
Update knowledge-core.md with:
- Successful patterns identified
- Architecture decisions and rationale
- Common pitfalls avoided
- Integration strategies used
- Pattern library effectiveness
-
ACE Self-Learning (Background, async):
- Evaluate workflow execution score
- Analyze what worked / what didn't
- Update pattern selection strategies
- Sync to Agent-KB every 10 workflows
-
Record decision data:
- Was exploration helpful? (for future decisions)
- Which architecture approach worked best?
- Which patterns were most effective?
- What quality issues were most common?
- Time spent vs complexity
Time: 1-2 minutes
Output: Complete Project Report (Enhanced)
๐ Project Summary
- Goal: [Your request]
- Task Type: [frontend/backend/full-stack] ๐
- Patterns Loaded: [count] lines ๐
- Exploration Mode: [deep/light/none]
- Architecture Chosen: [minimal/clean/pragmatic/pattern-aligned] ๐
- Outcome: [What was delivered]
- Duration: [Actual time]
- Agents Used: [List]
๐ ๏ธ Phase Results
Phase 0A - Pattern Loading (NEW): ๐
- Task type detected: [frontend/backend/full-stack]
- Pattern library loaded: [name] ([count] lines)
- Relevant patterns: [count]
- Code examples: [count]
- Pattern context created: โ
Phase 0B - Exploration (if enabled):
- Similar features found: [count]
- Key files identified: [count]
- Patterns extracted: [list]
- Pattern library alignment: [percentage] ๐
- Exploration mode: [deep/light]
Phase 1 - Research:
- Library/API researched: [name + version]
- APIs documented: [count]
- Pattern alignment: [percentage] ๐
- ResearchPack score: [X/100]
Phase 2 - Planning:
- Approaches compared: [count]
- Approach selected: [name]
- Pattern references: [count] ๐
- Files to change: [count]
- Implementation steps: [count]
- Pattern compliance: [percentage] ๐
- Risks identified: [count]
- Plan score: [X/100]
Phase 3 - Implementation:
- Files created: [count]
- Files modified: [count]
- Patterns applied: [list] ๐
- Tests passing: [X/X]
- Pattern compliance: [percentage] ๐
- Self-corrections: [count]
- Circuit breaker: [open/closed]
Phase 4 - Quality Review:
- Critical issues fixed: [count]
- High issues fixed: [count]
- Pattern violations: [count] ๐
- Medium/Low reported: [count]
- Pattern compliance score: [X/100] ๐
- Overall quality score: [X/100]
Phase 5 - Knowledge:
- Patterns captured: [count]
- Pattern effectiveness: [rating] ๐
- Decisions recorded: [count]
- ACE learning: [enabled/disabled]
๐ Artifacts Created
- PatternContext.md (NEW) ๐
- ExplorationReport.md (if Phase 0B enabled)
- ResearchPack.md
- ArchitectureComparison.md
- ImplementationPlan.md
- QualityReview.md
- PatternComplianceReport.md (NEW) ๐
- Code files: [list]
- Test files: [list]
๐ง Knowledge Captured
- Architecture patterns identified
- Pattern library effectiveness ๐
- Integration strategies used
- Quality improvements made
- ACE playbook updates
Examples (Enhanced)
Example 1: Frontend Task (Auto Pattern Loading)
start-dev ๅฎ็ฐ็จๆท็ปๅฝ่กจๅ๏ผๅ
ๅซ้ฎ็ฎฑๅๅฏ็ ้ช่ฏ
๐ฏ Task Type Detected: Frontend
๐ Loading frontend-patterns (631 lines)...
โ
Patterns loaded successfully
Relevant Patterns:
1. Form Handling Pattern
2. Custom Hook: useForm
3. Error Boundary Pattern
โก Executing workflow with pattern guidance...
โฑ๏ธ Expected: 18-22 minutes
Example 2: Backend Task (Auto Pattern Loading)
start-dev Add JWT authentication middleware to Express API
๐ฏ Task Type Detected: Backend
๐ Loading backend-patterns (587 lines)...
โ
Patterns loaded successfully
Relevant Patterns:
1. Authentication Pattern (JWT)
2. Middleware Pattern
3. Error Handling Pattern
โก Executing workflow with pattern guidance...
โฑ๏ธ Expected: 20-25 minutes
Example 3: Full-Stack Task (Both Patterns)
start-dev ๅฎ็ฐๅฎๆด็็จๆท่ฎค่ฏๅ่ฝ๏ผๅ
ๆฌๅ็ซฏ็ปๅฝ็้ขๅๅ็ซฏAPI
๐ฏ Task Type Detected: Full-Stack
๐ Loading frontend-patterns (631 lines)...
๐ Loading backend-patterns (587 lines)...
โ
Both pattern libraries loaded (1,218 lines total)
Relevant Patterns:
Frontend:
1. Form Handling Pattern
2. State Management Pattern
Backend:
1. JWT Authentication Pattern
2. API Design Pattern
โก Executing workflow with comprehensive pattern guidance...
โฑ๏ธ Expected: 35-45 minutes
Example 4: Force Specific Pattern Library
start-dev --frontend Add caching layer to API responses
๐ฏ User Override: Frontend patterns forced
๐ Loading frontend-patterns (631 lines)...
โ
Patterns loaded successfully
Note: Task seems backend-related but frontend patterns loaded per user request
Pattern Library Benefits
Before Pattern Loading
Research โ Plan โ Implement
โ โ โ
Generic Generic Trial &
approach design Error
After Pattern Loading (NEW)
Pattern Loading โ Research โ Plan โ Implement
โ โ โ โ
Best practices Pattern- Pattern- Pattern-
identified guided aligned compliant
research design code
Improvements:
- โ
+25-35% better architecture decisions
- โ
+40% fewer pattern violations
- โ
+30% faster implementation (less trial & error)
- โ
+50% better code consistency
- โ
1,627 lines of professional patterns available
Tips for Best Results (Enhanced)
Be specific in request:
- โ "Add caching" (too vague)
- โ
"Add Redis caching to ProductService with 5-minute TTL"
Mention task type explicitly (helps pattern detection):
- โ
"ๅ็ซฏ: ๅฎ็ฐ็จๆท็ปๅฝ็้ข"
- โ
"Backend: Add JWT authentication"
- โ
"Full-stack: Complete user management feature"
Reference patterns if you know them:
- โ
"Use Repository Pattern for data access"
- โ
"Apply Compound Component pattern"
- โ
"Follow Error Boundary best practices"
Mention existing code explicitly (triggers exploration):
- โ
"ๅจ็ฐๆ็็จๆท่ฎค่ฏ็ณป็ปไธญๆทปๅ OAuth ๆฏๆ"
- โ
"Integrate with existing payment flow"
- โ
"Extend current logging to include request tracing"
Quality Gates (Enhanced)
Pattern Loading โ Research:
- โ
Task type detected
- โ
Pattern library loaded
- โ
Relevant patterns identified
- โ If pattern loading fails: Continue without patterns (log warning)
Research โ Planning:
- โ
ResearchPack score โฅ 80
- โ
Pattern alignment โฅ 70% ๐
- โ
Library version identified
- โ
Minimum 3 APIs documented
- โ If fail: Blocks planning, requests fixes
Planning โ Implementation:
- โ
Plan score โฅ 85
- โ
Pattern compliance โฅ 80% ๐
- โ
APIs match ResearchPack exactly
- โ
Rollback plan present
- โ If fail: Blocks implementation, requests fixes
Implementation โ Quality Review:
- โ
Circuit breaker closed
- โ
All tests passing
- โ
Pattern compliance โฅ 75% ๐
- โ
Build successful
- โ If fail: Up to 3 self-corrections, then block
Time Estimates (Updated)
| Complexity | Pattern | Exploration | Research | Planning | Implementation | Review | Total |
|---|
| Simple | +1 min | +0 min | 2 min | 3 min | 5 min | 3 min | 14-16 min |
| Simple (explore) | +1 min | +3 min | 2 min | 5 min | 5 min | 3 min | 19-21 min |
| Medium | +2 min | +5 min | 3 min | 5 min | 15 min | 4 min | 34-37 min |
| Complex | +2 min | +8 min | 5 min | 8 min | 25 min | 5 min | 53-57 min |
Pattern loading overhead: +1-2 minutes
Accuracy improvement: +25-35%
Implementation speed: +30% (less trial & error)
Executing enhanced workflow with automatic pattern loading...
Intelligent Workflow Orchestration (Enhanced)
I will now execute the intelligent adaptive workflow with pattern library support:
Step 1: Analyze Feature Request & Detect Task Type ๐
I'll analyze your request for:
- Task type (frontend/backend/full-stack) ๐
- Trigger keywords (existing code references)
- Project context (size, complexity)
- Similar feature patterns
- ACE historical data
Step 2: Load Relevant Pattern Library ๐
Based on task type, I'll load:
- Frontend patterns (631 lines): Components, Hooks, Performance
- Backend patterns (587 lines): API, Auth, Caching
- Both (1,218 lines): Full-stack features
- Extract 3-5 most relevant patterns for this task
Step 3: Decide Exploration Mode
Based on analysis, I'll choose:
deep_exploration: 2-3 code-explorer agents
light_exploration: 1 code-explorer agent
no_exploration: Direct to research
Step 4: Execute Phases with Pattern Guidance ๐
I'll orchestrate all phases with:
- Pattern-guided research and planning ๐
- Quality gates at each transition
- Pattern compliance checks ๐
- Automatic error handling and retries
- Multi-agent parallelization
- Progress reporting
Step 5: Synthesize Report
I'll provide comprehensive final report with:
- Pattern loading results ๐
- All phase results
- Pattern compliance scores ๐
- Quality metrics
- Artifacts created
- Knowledge captured
- Next steps
Expected duration: 16-72 minutes depending on complexity and exploration mode
Pattern overhead: +1-2 minutes
Accuracy improvement: +25-35%
Enhancements:
- โ
Automatic pattern library loading ๐
- โ
Task type detection ๐
- โ
Pattern-guided implementation ๐
- โ
Pattern compliance checking ๐
- โ
Automatic codebase exploration (when needed)
- โ
Multi-approach architecture comparison
- โ
Three-dimension quality review
- โ
Intelligent decision learning
- โ
30-40% higher accuracy with only 10-15% time overhead