Commit dca1c96
refactor: Major restructuring of DEFAULT_WORKFLOW.md for documentation-first development (#1591)
* refactor: Major restructuring of DEFAULT_WORKFLOW.md for documentation-first development
This commit introduces revolutionary changes to the default workflow, shifting from
a numbered step-based approach to a more flexible, documentation-first methodology.
## Key Structural Changes
### 1. Documentation-First Approach (NEW)
- Added "Retcon Documentation Writing" step - documentation is written BEFORE implementation
- Documentation acts as specification for the feature "as it should be"
- Architect reviews documentation to align with vision before coding begins
### 2. True Test-Driven Development
- Separated TDD into dedicated step AFTER documentation
- Tests written based on documentation, before implementation
- Clearer separation between design, testing, and implementation phases
### 3. Early Review Integration
- Added "Review pass before commit" - review happens BEFORE committing
- Added "Incorporate any review feedback" - immediate feedback loop before commit
- Shifted from post-PR review to pre-commit review for earlier quality gates
### 4. Flexible Step Structure
- Removed rigid step numbering (Step 1, Step 2, etc.) from headers
- Headers now use descriptive names only
- Allows for easier customization and step insertion
### 5. Enhanced Agent Orchestration
- Added zen-architect agent consultation for philosophy alignment
- Added documentation-writer agent for retcon documentation
- Emphasized use of Skills() tool throughout workflow
- More explicit handoffs between agents
### 6. Outside-In Testing Emphasis
- Added explicit guidance: "Test like a user would use the feature - outside-in"
- Emphasis on end-to-end testing, not just unit tests
- Test results documented for PR description
### 7. Workflow Timing Simplification
- Removed specific timing requirements ("Within 24 hours", "Within 48 hours")
- More autonomous, trust-based approach
- Focus on quality over arbitrary deadlines
## Process Flow Changes
**Old Flow:**
1. Requirements → 2. Issue → 3. Worktree → 4. Design+TDD → 5. Implement →
6. Refactor → 7. Tests → 8. Local Test → 9. Commit → 10. Draft PR →
11. Review PR → 12. Feedback → 13. Philosophy Check → 14. Ready → 15. Mergeable → 16. Cleanup
**New Flow:**
Prepare Workspace → Requirements → Issue → Worktree → Research & Design →
**Retcon Documentation** → **TDD Tests** → Implement → Refactor →
**Review Before Commit** → **Incorporate Feedback** → Tests & Pre-commit →
Local Testing → Commit → Draft PR → Review PR → Implement Feedback →
Philosophy Check → **Cleanup** → Ready → Mergeable
## Philosophical Improvements
1. **Documentation as Specification**: Documentation written before code provides
clear target and prevents implementation drift
2. **Earlier Quality Gates**: Review before commit catches issues earlier in the
development cycle
3. **True TDD**: Separating test writing from design makes TDD process clearer
and more deliberate
4. **Flexibility**: Removing numbered steps makes workflow more adaptable to
different project needs
5. **Agent Specialization**: More explicit agent roles and handoffs improve
clarity and effectiveness
## Breaking Changes
- Step numbers removed from workflow headers (affects TodoWrite formatting)
- New steps added (Retcon Documentation, Review Before Commit)
- Workflow now requires documentation-writer agent
- Success criteria updated from "All 15 steps" to "All steps"
## Migration Notes
Existing workflows referencing specific step numbers may need updates. The TodoWrite
best practices section still references step numbers for tracking purposes, but the
actual workflow headers use descriptive names only.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: Re-number workflow steps and remove hardcoded step counts
This commit adds explicit step numbering (Steps 1-21) to all workflow section
headers and removes hardcoded step counts from documentation to prevent drift.
## Changes Made
### 1. DEFAULT_WORKFLOW.md - Complete Re-numbering
- Added "Step N:" prefix to ALL workflow section headers (1-21)
- Updated frontmatter: `steps: 15` → `steps: 21`
- Fixed inconsistent numbering (old Steps 2-4 were actually steps 3-5)
- Removed example hardcoded count: "Step X of 15" → generic "which step is active"
**New Section Headers:**
- Step 1: Prepare the Workspace
- Step 2: Rewrite and Clarify Requirements
- Step 3: Create GitHub Issue
- Step 4: Setup Worktree and Branch
- Step 5: Research and Design
- Step 6: Retcon Documentation Writing (NEW section user added)
- Step 7: Test Driven Development - Writing Tests First (NEW section user added)
- Step 8: Implement the Solution
- Step 9: Refactor and Simplify
- Step 10: Review Pass Before Commit (NEW section user added)
- Step 11: Incorporate Any Review Feedback (NEW section user added)
- Step 12: Run Tests and Pre-commit Hooks
- Step 13: Mandatory Local Testing
- Step 14: Commit and Push
- Step 15: Open Pull Request as Draft
- Step 16: Review the PR
- Step 17: Implement Review Feedback
- Step 18: Philosophy Compliance Check
- Step 19: Final Cleanup and Verification
- Step 20: Convert PR to Ready for Review
- Step 21: Ensure PR is Mergeable
### 2. Removed Hardcoded Step Counts (Multiple Files)
To prevent documentation drift as workflow evolves, removed specific step counts
from references where not critical:
**Files Updated:**
- `.claude/commands/amplihack/ultrathink.md` - Removed "(15 steps)" references (3 instances)
- `.claude/skills/default-workflow/SKILL.md` - Removed "15-step" and "(Step X of 15)" (3 instances)
- `.claude/skills/ultrathink-orchestrator/SKILL.md` - Removed "(15 steps)" references (2 instances)
- `.claude/skills/ultrathink-orchestrator/README.md` - Removed "(15 steps)" and "(6 phases)" (4 instances)
- `.claude/workflow/CONSENSUS_WORKFLOW.md` - Updated to 21 steps, removed "15-Step" header
- `docs/commands/COMMAND_SELECTION_GUIDE.md` - Removed "(15 steps)" references (2 instances)
### 3. CONSENSUS_WORKFLOW.md Updates
- Updated frontmatter: `steps: 15` → `steps: 21`
- Updated description: "Enhanced 15-step workflow" → "Enhanced workflow"
- Updated success criteria: "All 15 steps" → "All steps"
- Renamed header: "The 15-Step Consensus-Augmented Workflow" → "The Consensus-Augmented Workflow"
## Why These Changes
### Problem 1: Ambiguous Ordering Without Numbers
The workflow had inconsistent numbering:
- First 2 sections had NO numbers
- Next 3 sections had WRONG numbers (Steps 2-4 were actually 3-5)
- Remaining 16 sections had NO numbers
- Total: 21 sections but only 3 were numbered
This created ambiguity about sequential order and could confuse AI models about
whether steps can be reordered.
### Problem 2: Documentation Drift
Hardcoded step counts ("15 steps", "16 steps") throughout documentation become
stale when workflow evolves. Examples:
- Workflow grew from 15→16→21 steps over time
- Each growth required hunting down all hardcoded references
- Easy to miss references, creating inconsistencies
### Solution: Explicit Numbering + Generic References
1. **Explicit step numbers in headers** make sequential order crystal clear
2. **Remove counts from docs** prevents drift (workflow file is source of truth)
3. **Only keep counts in frontmatter** where they're programmatically useful
## Breaking Changes
None. This is purely clarification - the workflow steps and their order haven't
changed, just how they're labeled.
## Migration Notes
- TodoWrite examples still reference step numbers as before
- Agents can now reliably parse "Step N:" from headers
- Workflow file remains single source of truth for step count
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Ubuntu <azureuser@amplihack2.yb0a3bvkdghunmsjr4s3fnfhra.phxx.internal.cloudapp.net>
Co-authored-by: Claude <noreply@anthropic.com>1 parent 84d0b33 commit dca1c96
File tree
7 files changed
+159
-148
lines changed- .claude
- commands/amplihack
- skills
- default-workflow
- ultrathink-orchestrator
- workflow
- docs/commands
7 files changed
+159
-148
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
| 39 | + | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
| 66 | + | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
| 157 | + | |
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
| 21 | + | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| 57 | + | |
54 | 58 | | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
58 | | - | |
59 | | - | |
| 62 | + | |
| 63 | + | |
60 | 64 | | |
61 | 65 | | |
62 | 66 | | |
| |||
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| 74 | + | |
70 | 75 | | |
71 | 76 | | |
72 | 77 | | |
73 | 78 | | |
74 | | - | |
| 79 | + | |
75 | 80 | | |
76 | 81 | | |
77 | 82 | | |
| |||
83 | 88 | | |
84 | 89 | | |
85 | 90 | | |
| 91 | + | |
86 | 92 | | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
90 | | - | |
| 96 | + | |
91 | 97 | | |
92 | 98 | | |
93 | 99 | | |
| |||
97 | 103 | | |
98 | 104 | | |
99 | 105 | | |
| 106 | + | |
100 | 107 | | |
101 | 108 | | |
102 | 109 | | |
103 | 110 | | |
104 | 111 | | |
| 112 | + | |
105 | 113 | | |
106 | 114 | | |
107 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
| 4 | + | |
| 5 | + | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
| |||
71 | 70 | | |
72 | 71 | | |
73 | 72 | | |
74 | | - | |
| 73 | + | |
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
| |||
0 commit comments