| name | workflow |
| description | | Use when this capability is needed. |
Workflow Orchestration
🚨 MANDATORY: PLANNING-FIRST PRINCIPLE
STOP! Before implementing ANYTHING, you MUST:
-
CREATE A PLAN using TodoWrite tool:
- List EXACT workflow commands to use
- List SPECIFIC skills to load
- List FILES to create/modify
- List TESTS to run for validation
-
SHOW THE PLAN to the user:
"Here's my workflow plan:
1. /intent-audit to analyze gaps
2. Load ux-design skill for multi-panel UI
3. /gap to create GAP-A-XXX entries
4. /improve --severity=critical
5. /verify to validate fixes
Shall I proceed with this plan?"
-
EXECUTE STEP-BY-STEP (MANDATORY):
- Mark each todo as in_progress when starting
- ACTUALLY RUN THE TASK COMMANDS shown in the plan
- For "Task: intent-guardian with mode=evolve" → Use Task tool to invoke it
- For "/gap" → Use SlashCommand tool to execute it
- Mark as completed when done
- Show actual command output
- Update state in CLAUDE.md
CRITICAL: The plan is NOT self-executing. You MUST:
- Use Task tool for each "Task: agent-name" in the plan
- Use SlashCommand tool for each "/command" in the plan
- Actually create the v2.0 artifacts, not just plan to create them
NEVER jump straight into coding without a plan!
Automatic Mode Selection
The workflow AUTOMATICALLY detects project state:
if [ -f "docs/intent/product-intent.md" ] && \
[ -f "docs/ux/user-journeys.md" ] && \
[ -f "docs/architecture/system-design.md" ]; then
echo "📊 Existing project detected - using iteration mode"
else
echo "🆕 New project - using standard workflow"
fi
No need to ask - just use the right mode:
- Existing project? → Automatically iterate (preserve 80-90%)
- New project? → Automatically create from scratch
- User wants complete redesign? → They'll explicitly say "redesign" or "start over"
- Preserves 80-90% of existing functionality
- Extends rather than replaces documentation
- Implements only what changed
- Ensures backward compatibility
Should I create an iteration plan? [Y/n]
**User can override but explain consequences:**
⚠️ Standard mode will redesign from scratch
- May break existing features
- Will take significantly longer
- Could disrupt user workflows
Are you sure you want standard mode? [y/N]
### Planning Verification Checklist
Before proceeding with ANY implementation, verify:
- [ ] TodoWrite plan created with specific workflow steps?
- [ ] Plan shown to user for approval?
- [ ] Each step maps to a workflow command or skill?
- [ ] State tracking configured in CLAUDE.md?
- [ ] Tests identified for validation?
- [ ] No direct code writing without workflow commands?
**If any item unchecked → STOP and create proper plan first!**
## CRITICAL: Real Validation Required
**YOU HAVE THE BASH TOOL. USE IT.**
This workflow ONLY works if you:
1. **Run actual tests** - Use Bash tool to execute `npm test`
2. **Start actual servers** - Use Bash tool to run `npm run dev`
3. **Check actual results** - Show real output, not assumptions
4. **Fail when broken** - If tests fail, say so
**NEVER** say:
- "Tests would pass"
- "Should work"
- "Implementation successful"
**ALWAYS** say:
- "Running tests now..." [then actually run them]
- "Test results: [actual output]"
- "Tests failed with: [actual error]"
## Overview
This skill provides orchestration logic for greenfield and brownfield development workflows. Claude automatically loads this skill when managing project phases.
## 🔄 ITERATION WORKFLOW (Most Common - Enhancing Existing Projects)
**CRITICAL: When adding features to existing projects, ALWAYS show this plan:**
```markdown
# Iteration Plan: [Your Enhancement]
## 📊 DETECTED STATE
✓ Existing L1 artifacts found
✓ Using ITERATION mode
## 🚨 PHASE 1: REGENERATE L1 ARTIFACTS (EXECUTE THESE TASKS!)
### 1.1 Intent v2.0
- Task: intent-guardian --evolve
- Creates: /docs/intent/product-intent-v2.0.md
- **ACTION: Use Task tool with subagent_type="general-purpose" and prompt="Load the intent-guardian skill and use it in EVOLVE mode to create product-intent-v2.0.md"**
### 1.2 UX v2.0
- Task: ux-architect --evolve
- Creates: /docs/ux/user-journeys-v2.0.md
- **ACTION: Use Task tool with subagent_type="general-purpose" and prompt="Load the ux-design skill and use it in EVOLVE mode to create user-journeys-v2.0.md"**
### 1.3 Architecture v2.0
- Task: agentic-architect --evolve
- Creates: /docs/architecture/system-design-v2.0.md
- **ACTION: Use Task tool with subagent_type="general-purpose" and prompt="Load the architecture skill and use it in EVOLVE mode to create system-design-v2.0.md"**
## PHASE 2: IMPLEMENTATION
[Rest of plan...]
User should NEVER have to ask if L1 artifacts will be updated!
📌 AFTER SHOWING THE PLAN
CRITICAL: After user approves the plan, you MUST execute it:
User: "yes" or "proceed" or "go ahead"
Claude: "Starting Phase 1: Regenerating L1 artifacts..."
[ACTUALLY USE TASK TOOL HERE - Don't just say you will!]
Task tool invocation #1:
- subagent_type: "general-purpose"
- prompt: "Load intent-guardian skill, use EVOLVE mode to update product-intent.md to v2.0 with [specific enhancement]"
[WAIT FOR TASK TO COMPLETE]
✓ Created product-intent-v2.0.md
Task tool invocation #2:
- subagent_type: "general-purpose"
- prompt: "Load ux-design skill, use EVOLVE mode to update user-journeys.md to v2.0 with [specific enhancement]"
[CONTINUE WITH ALL TASKS IN PLAN]
Common mistake: Showing the plan but not executing it. The plan is a TODO list, not self-executing code!
L1 Planning Flow (Greenfield)
Intent → UX → Architecture → Planning → L2
Phase 1: Intent
When: Starting new project or capturing requirements
Actions:
- Load skill:
intent-guardian
- Create
/docs/intent/product-intent.md
- Capture promises with criticality levels (CORE/IMPORTANT/NICE_TO_HAVE)
- Define acceptance criteria for each promise
- Update CLAUDE.md state:
l1.intent.status = complete
Continue to: UX Design
Phase 2: UX Design
When: After intent complete
Actions:
- Load skill:
ux-design
- Create
/docs/ux/user-journeys.md
- Apply design principles (Fitts's Law, Hick's Law, etc.)
- Define screen specifications
- Update CLAUDE.md state:
l1.ux.status = complete
Continue to: Architecture
Phase 3: Architecture
When: After UX complete
Actions:
- Load skill:
architecture
- Create
/docs/architecture/system-design.md
- Map promises to modules
- Define tech stack and patterns
- Update CLAUDE.md state:
l1.architecture.status = complete
Continue to: Planning
Phase 4: Planning
When: After architecture complete
Actions:
- Load skill:
planning
- Create
/docs/plans/implementation-order.md
- Create feature plans in
/docs/plans/features/
- Define build order and dependencies
- Update CLAUDE.md state:
l1.planning.status = complete
Continue to: L2 Building
L2 Building Flow (Per Feature)
Backend → (review) → Frontend → (review) → Tests → Validate → Complete
Step 1: Backend
Actions:
- Load skill:
backend
- Implement APIs, database, services
- Automatic: Code review reminder via hook
- CRITICAL: Run ACTUAL backend tests using Bash tool:
npm test -- backend/
- Only update state if tests ACTUALLY pass:
l2.features[name].backend = complete
Continue to: Frontend
Step 2: Frontend
Actions:
- Load skill:
frontend
- Implement UI components (apply design principles from ux-design skill)
- Automatic: Code review reminder via hook
- Run frontend tests
- Update state:
l2.features[name].frontend = complete
Continue to: Testing
Step 3: Testing
Actions:
- Load skill:
testing
- Write comprehensive test coverage
- Run full test suite
- Automatic: Quality gate reminder via hook
- Update state:
l2.features[name].tests = complete
Continue to: Validation
Step 4: Validation
Actions:
- Load skill:
validation
- Validate promises are KEPT (not just tests passing)
- Check acceptance criteria
- If PARTIAL/FAILED: Create remediation tasks
- If VALIDATED: Mark feature complete
Continue to: Next feature or project complete
Iteration Flow (Evolving Systems)
NEW! For v2.0+ enhancements to existing systems
When to Use Iteration Flow
Triggered when:
- User says "enhance with [X]", "add [major feature]", "redesign [area]"
- Significant evolution beyond simple bug fixes
- Need to maintain backward compatibility
- Want to preserve existing functionality
Iteration Workflow Steps
Load State → Analyze Impact → Evolve Docs → Delta Analysis → Incremental Implementation
Step 1: Load Current State
cat docs/intent/product-intent.md
cat docs/ux/user-journeys.md
cat docs/architecture/system-design.md
grep "features:" CLAUDE.md
Step 2: Iteration Analysis
Analyze enhancement compatibility:
- Will it break existing promises?
- Does it conflict with current UX?
- Can architecture support it?
- What's the integration effort?
Output: Compatibility report with risk assessment
Step 3: Evolutionary Design
Create v2.0 documents that EXTEND v1.0:
# Intent v2.0
## Existing Promises (v1.0)
[Keep all existing promises]
## New Promises (v2.0)
[Add new promises]
## Evolution Notes
- What changed and why
- Backward compatibility notes
Same pattern for UX v2.0 and Architecture v2.0
Step 4: Delta Analysis
Identify precise changes:
delta_analysis:
new_promises: [P8, P9]
modified_journeys: [checkout, profile]
new_components: [ai_service, suggestion_engine]
deprecated: []
preserved: 85%
breaking_changes: none
Step 5: Gap-Based Implementation
Create iteration gaps (GAP-I-XXX):
/gap --iteration "v1.0 to v2.0"
Implement incrementally:
/improve GAP-I-001
/verify GAP-I-001
Step 6: Validation
Ensure both old AND new work:
- All v1.0 tests still pass
- New v2.0 features validated
- No performance regression
- User journeys intact
State Tracking for Iterations
workflow:
mode: iteration
version: "1.0 → 2.0"
iteration:
base_version: "1.0"
target_version: "2.0"
compatibility: maintained
preserved_percentage: 85
new_promises: [P8, P9]
iteration_gaps: [GAP-I-001, GAP-I-002]
status: in_progress
Brownfield Flow (Existing Code)
First Session
Analyze → Infer State → Ask User → Continue
Actions:
- Load skill:
brownfield
- Scan project structure and code
- Infer: tech stack, features, promises, test coverage
- Create [INFERRED] documentation
- Ask user: What would you like to do?
- Add feature → change-analysis skill → L2 flow
- Improve code → gap-analysis skill → Fix gaps
- Fix bug → debugging skill → Fix + test
Change Request Handling
Triggered when: User says "add [feature]", "change [thing]", "also need"
Actions:
- Load skill:
change-analysis
- Analyze impact on existing:
- Intent (new promises?)
- UX (new journeys?)
- Architecture (new modules?)
- Plans (new tasks?)
- Estimate effort and complexity
- Present analysis to user
- On confirmation: Update docs and continue to L2
Issue Response
Backend/General Issues
Triggered when: "error", "crash", "bug", "broken", "doesn't work"
Actions:
- Invoke debugger subagent (isolated context)
- Wait for diagnosis and fix
- Automatic: Code review reminder via hook
- Verify fix with tests
UI Issues
Triggered when: "page doesn't work", "button broken", "UI issue", "layout wrong"
Actions:
- Invoke ui-debugger subagent (isolated context + browser access)
- Wait for diagnosis and fix
- Automatic: Code review reminder via hook
- Verify fix with tests
Quality Gates (Automatic via Hooks)
Quality reminders are injected automatically by hooks:
After Code Changes
PostToolUse hook detects Write/Edit and reminds to run code-reviewer subagent
Before Marking Complete
Stop hook reminds to check:
- Tests passing?
- Code reviewed?
- State updated?
State Management
CRITICAL: State Must Be Persisted
Every workflow action MUST update state in CLAUDE.md immediately:
-
Read current state first:
grep -A 20 "workflow:" CLAUDE.md
-
Update after EVERY action:
- Command executed → Update state
- Skill loaded → Update state
- Test run → Update state with results
- Feature completed → Update state
-
State includes execution details:
workflow:
phase: L1|L2
status: in_progress|paused|complete
last_command: "/gap"
last_command_output: "Created 5 gaps"
pending_steps:
- "/improve --severity=critical"
- "/verify"
Always update CLAUDE.md state after significant actions:
workflow:
phase: L1|L2
status: in_progress|paused|complete
l1:
intent: {status: pending|in_progress|complete}
ux: {status: pending|in_progress|complete}
architecture: {status: pending|in_progress|complete}
planning: {status: pending|in_progress|complete}
l2:
current_feature: string
features:
feature_name:
backend: pending|in_progress|complete
frontend: pending|in_progress|complete
tests: pending|in_progress|complete
validation: pending|in_progress|complete
Available Skills Reference
Load these skills as needed:
| Skill | Use For |
|---|
intent-guardian | Capturing user promises and requirements |
ux-design | Designing user experience and applying design principles |
architecture | System design and module architecture |
planning | Creating implementation plans and build order |
backend | Implementing APIs, database, services |
frontend | Implementing UI components with design principles |
testing | Writing comprehensive test coverage |
validation | Validating promises are kept (acceptance testing) |
brownfield | Analyzing existing codebases |
change-analysis | Assessing impact of change requests |
gap-analysis | Finding issues in existing code |
debugging | General debugging strategies |
code-quality | Code review criteria and standards |
project-ops | Project setup, sync, docs, verification |
Available Subagents Reference
Invoke these for isolated tasks:
| Subagent | Use For |
|---|
code-reviewer | Read-only code review (isolated context) |
debugger | Isolated debugging sessions |
ui-debugger | UI debugging with browser automation |
Converted and distributed by TomeVault — claim your Tome and manage your conversions.