Skip to content

Commit 4d2830c

Browse files
fix(rules): reconcile Units Planning ghost stage with canonical Units Generation (#156)
* fix(rules): reconcile Units Planning ghost stage with canonical Units Generation Units Planning was referenced as a separate workflow stage in 5 files (workflow-planning.md, units-generation.md, terminology.md, workflow-changes.md, error-handling.md) but was never defined as a top-level stage in core-workflow.md. It is actually Part 1 (an internal sub-step) of the Units Generation stage. This inconsistency caused: - State tracking confusion (aidlc-state.md would have two entries for one stage) - Session continuity breakage (stage names in state file wouldn't match what the rules expect) - Mermaid diagram showing 2 nodes for a single stage Changes: - Merge UP/UG Mermaid nodes into single Units Generation node - Remove duplicate Units Planning checklist items from execution plans - Clarify that planning/generation are internal sub-steps, not stages - Update all impact assessments and error recovery references * docs: add full prompt engineering review TODO with 25 prioritized findings * docs: move review TODO from repo to PR comment --------- Co-authored-by: Scott Schreckengaust <345885+scottschreckengaust@users.noreply.github.com> Co-authored-by: Leandro Damascena <lcdama@amazon.pt>
1 parent 5c33ae7 commit 4d2830c

5 files changed

Lines changed: 16 additions & 20 deletions

File tree

aidlc-rules/aws-aidlc-rule-details/common/error-handling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110

111111
**Error**: Cannot generate design artifacts
112112
- **Cause**: Missing unit information, unclear requirements
113-
- **Solution**: Return to Units Planning to clarify unit definition
113+
- **Solution**: Return to Units Generation to clarify unit definition
114114
- **Workaround**: Generate partial design, mark gaps
115115

116116
### NFR Implementation Errors

aidlc-rules/aws-aidlc-rule-details/common/terminology.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
- User Stories (CONDITIONAL)
3636
- Workflow Planning (ALWAYS)
3737
- Application Design (CONDITIONAL)
38-
- Design - Units Planning/Generation (CONDITIONAL)
38+
- Units Generation (CONDITIONAL)
3939

4040
**Outputs**: Requirements, user stories, architectural decisions, unit definitions
4141

@@ -79,7 +79,7 @@
7979
- **Reverse Engineering**: Analyzing existing codebase (brownfield projects only)
8080
- **User Stories**: Creating user stories and personas (includes Story Planning and Story Generation)
8181
- **Application Design**: Designing application components, methods, business rules, and services
82-
- **Design**: Designing system components (includes Units Planning, Units Generation, per-unit design)
82+
- **Units Generation**: Decomposing the system into units of work (includes internal planning and generation sub-steps, plus per-unit design)
8383
- **Functional Design**: Technology-agnostic business logic design (per-unit)
8484
- **NFR Requirements**: Determining NFRs and selecting tech stack (per-unit)
8585
- **NFR Design**: Incorporating NFR patterns and logical components (per-unit)
@@ -120,7 +120,7 @@ A reusable building block within a service or module. Components are classes, fu
120120
### When to Use Each Term
121121

122122
**Unit of Work**:
123-
- During Units Planning and Units Generation stages
123+
- During the Units Generation stage
124124
- When discussing system decomposition
125125
- In planning documents and discussions
126126
- Example: "How should we decompose this into units of work?"
@@ -149,11 +149,11 @@ A reusable building block within a service or module. Components are classes, fu
149149
- **Planning**: Creating a plan with questions and checkboxes for execution
150150
- **Generation**: Executing the plan to create artifacts
151151

152-
Examples:
153-
- Story Planning → Story Generation
154-
- Units Planning → Units Generation
155-
- Unit Design Planning → Unit Design Generation
156-
- NFR Planning → NFR Generation
152+
Examples (these are internal sub-steps within a single stage, not separate stages):
153+
- Story Planning → Story Generation (within User Stories stage)
154+
- Units Planning → Units Generation (within Units Generation stage)
155+
- Unit Design Planning → Unit Design Generation (within per-unit design)
156+
- NFR Planning → NFR Generation (within NFR Requirements stage)
157157
- Code Generation Part 1 (Planning) → Code Generation Part 2 (Generation)
158158

159159
### Depth Levels

aidlc-rules/aws-aidlc-rule-details/common/workflow-changes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Users may request changes to the execution plan or stage execution during the wo
8585

8686
**Handling**:
8787
1. **Assess Impact**: Identify all stages that depend on the stage to be restarted
88-
2. **Warn User**: "Restarting Application Design will require redoing: Units Planning, Units Generation, per-unit design (all units), Code Generation. Confirm?"
88+
2. **Warn User**: "Restarting Application Design will require redoing: Units Generation, per-unit design (all units), Code Generation. Confirm?"
8989
3. **Get Explicit Confirmation**: User must understand full impact
9090
4. **If Confirmed**:
9191
- Archive all affected artifacts
@@ -154,8 +154,8 @@ Users may request changes to the execution plan or stage execution during the wo
154154
**Handling**:
155155
1. **Assess Current Progress**: Determine how far into workflow
156156
2. **Explain Impact**:
157-
- If before Units Planning: Minimal impact, just update decision
158-
- If after Units Planning: Must redo Units Planning, Units Generation, all per-unit design
157+
- If before Units Generation: Minimal impact, just update decision
158+
- If after Units Generation: Must redo Units Generation, all per-unit design
159159
- If after Code Generation: Significant rework required
160160
3. **Recommend Approach**:
161161
- Early in workflow: Restart from Application Design stage

aidlc-rules/aws-aidlc-rule-details/inception/units-generation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ If the analysis in step 7 reveals ANY ambiguous answers, you MUST:
9797
- Include complete approval prompt text
9898

9999
## Step 11: Update Progress
100-
- Mark Units Planning complete in aidlc-state.md
100+
- Mark Units Generation Part 1 (Planning) complete in aidlc-state.md
101101
- Update the "Current Status" section
102-
- Prepare for transition to Units Generation
102+
- Prepare for transition to Units Generation Part 2 (Generation)
103103

104104
---
105105

aidlc-rules/aws-aidlc-rule-details/inception/workflow-planning.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Evaluate risk level:
128128
- No new components or methods
129129
- Pure implementation changes
130130

131-
### 3.3 Design (Units Planning/Generation) - Execute IF:
131+
### 3.3 Units Generation - Execute IF:
132132
- New data models or schemas
133133
- API changes or new endpoints
134134
- Complex algorithms or business logic
@@ -261,8 +261,7 @@ flowchart TD
261261
US["User Stories<br/><b>STATUS</b>"]
262262
WP["Workflow Planning<br/><b>STATUS</b>"]
263263
AD["Application Design<br/><b>STATUS</b>"]
264-
UP["Units Planning<br/><b>STATUS</b>"]
265-
UG["Units Generation<br/><b>STATUS</b>"]
264+
UG["Units Generation<br/>(Planning + Generation)<br/><b>STATUS</b>"]
266265
end
267266
268267
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"]
@@ -301,8 +300,6 @@ flowchart TD
301300
- [x] Execution Plan (IN PROGRESS)
302301
- [ ] Application Design - [EXECUTE/SKIP]
303302
- **Rationale**: [Why executing or skipping]
304-
- [ ] Units Planning - [EXECUTE/SKIP]
305-
- **Rationale**: [Why executing or skipping]
306303
- [ ] Units Generation - [EXECUTE/SKIP]
307304
- **Rationale**: [Why executing or skipping]
308305

@@ -367,7 +364,6 @@ Update `aidlc-docs/aidlc-state.md`:
367364
- [x] User Stories (if applicable)
368365
- [x] Workflow Planning
369366
- [ ] Application Design - [EXECUTE/SKIP]
370-
- [ ] Units Planning - [EXECUTE/SKIP]
371367
- [ ] Units Generation - [EXECUTE/SKIP]
372368

373369
### 🟢 CONSTRUCTION PHASE

0 commit comments

Comments
 (0)