Skip to content

Commit 1020700

Browse files
authored
Fixes issue #104 (#120)
1 parent 273bff6 commit 1020700

File tree

9 files changed

+19
-23
lines changed

9 files changed

+19
-23
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
- **Solution**: Clearly mark as **HUMAN TASK**, provide instructions
131131
- **Wait**: For user confirmation before proceeding
132132

133-
### Code Planning Errors
133+
### Code Generation Planning Errors
134134

135135
**Error**: Code generation plan is incomplete
136136
- **Cause**: Missing design artifacts, unclear requirements

aidlc-rules/aws-aidlc-rule-details/common/process-overview.md

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

1010
## The Three-Phase Lifecycle:
1111
**INCEPTION PHASE**: Planning and architecture (Workspace Detection + conditional phases + Workflow Planning)
12-
**CONSTRUCTION PHASE**: Design, implementation, build and test (per-unit design + Code Planning/Generation + Build & Test)
12+
**CONSTRUCTION PHASE**: Design, implementation, build and test (per-unit design + Code Generation + Build & Test)
1313
**OPERATIONS PHASE**: Placeholder for future deployment and monitoring workflows
1414

1515
## The Adaptive Workflow:

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

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
- 🟡 **OPERATIONS PHASE** - Deployment & Monitoring (future expansion)
1111

1212
**Stage**: An individual workflow activity within a phase
13-
- Examples: Context Assessment stage, Requirements Assessment stage, Code Planning stage
13+
- Examples: Context Assessment stage, Requirements Assessment stage, Code Generation stage
1414
- Each stage has specific prerequisites, steps, and outputs
1515
- Stages can be ALWAYS-EXECUTE or CONDITIONAL
1616

1717
**Usage Examples**:
1818
- ✅ "The CONSTRUCTION phase contains 7 stages"
19-
- ✅ "The Code Planning stage is always executed"
19+
- ✅ "The Code Generation stage is always executed"
2020
- ✅ "We're in the INCEPTION phase, executing the Requirements Assessment stage"
2121
- ❌ "The Requirements Assessment phase" (should be "stage")
2222
- ❌ "The CONSTRUCTION stage" (should be "phase")
@@ -49,8 +49,7 @@
4949
- NFR Requirements (CONDITIONAL, per-unit)
5050
- NFR Design (CONDITIONAL, per-unit)
5151
- Infrastructure Design (CONDITIONAL, per-unit)
52-
- Code Planning (ALWAYS)
53-
- Code Generation (ALWAYS)
52+
- Code Generation (ALWAYS) — includes Part 1: Planning and Part 2: Generation
5453
- Build and Test (ALWAYS)
5554

5655
**Outputs**: Design artifacts, NFR implementations, code, tests
@@ -73,8 +72,7 @@
7372
- **Workspace Detection**: Initial analysis of workspace state and project type
7473
- **Requirements Analysis**: Gathering requirements (depth varies based on complexity)
7574
- **Workflow Planning**: Creating execution plan for which phases to run
76-
- **Code Planning**: Creating detailed implementation plans for code generation
77-
- **Code Generation**: Generating actual code based on plans and prior artifacts
75+
- **Code Generation**: Single stage with two parts — Part 1 (Planning) creates detailed implementation plans, Part 2 (Generation) generates actual code based on plans and prior artifacts
7876
- **Build and Test**: Building all units and executing comprehensive testing
7977

8078
### Conditional Stages
@@ -156,7 +154,7 @@ Examples:
156154
- Units Planning → Units Generation
157155
- Unit Design Planning → Unit Design Generation
158156
- NFR Planning → NFR Generation
159-
- Code Planning → Code Generation
157+
- Code Generation Part 1 (Planning) → Code Generation Part 2 (Generation)
160158

161159
### Depth Levels
162160
- **Minimal**: Quick, focused execution for simple changes

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Users may request changes to the execution plan or phase 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 Planning, Code Generation. Confirm?"
88+
2. **Warn User**: "Restarting Application Design will require redoing: Units Planning, 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

aidlc-rules/aws-aidlc-rule-details/construction/code-generation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ This stage generates code for each unit of work through two integrated parts:
8787
- [ ] Mark the approval status clearly
8888

8989
## Step 9: Update Progress
90-
- [ ] Mark Code Planning complete in `aidlc-state.md`
90+
- [ ] Mark Code Generation Part 1 (Planning) complete in `aidlc-state.md`
9191
- [ ] Update the "Current Status" section
9292
- [ ] Prepare for transition to Code Generation
9393

aidlc-rules/aws-aidlc-rule-details/inception/application-design.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Application Design focuses on:
3838
- [ ] Validate design completeness and consistency
3939

4040
### 4. Generate Context-Appropriate Questions
41-
**DIRECTIVE**: Analyze the requirements and stories to generate ONLY questions relevant to THIS specific application design. Use the categories below as inspiration, NOT as a mandatory checklist. Skip entire categories if not applicable.
41+
**DIRECTIVE**: Analyze the requirements and stories to generate questions relevant to THIS specific application design. Use the categories below as guidance. Evaluate each category and, when in doubt about applicability, ask the question rather than skipping it — overconfidence leads to poor outcomes (see overconfidence-prevention.md).
4242

4343
- EMBED questions using [Answer]: tag format
4444
- Focus on ambiguities and missing information specific to this context

aidlc-rules/aws-aidlc-rule-details/inception/reverse-engineering.md

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

77
**Skip when**: Greenfield project (no existing code)
88

9-
**Rerun behavior**: Always rerun when brownfield project detected, even if artifacts exist. This ensures artifacts reflect current code state
9+
**Rerun behavior**: Rerun is controlled by workspace-detection.md. If existing reverse engineering artifacts are found and are still current, they are loaded and reverse engineering is skipped. If artifacts are stale (older than the codebase's last significant modification) or the user explicitly requests a rerun, reverse engineering executes again to ensure artifacts reflect current code state
1010

1111
## Step 1: Multi-Package Discovery
1212

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

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ Create Mermaid flowchart showing:
203203
**Styling rules** (add after flowchart):
204204
```
205205
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
206-
style CP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
207206
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
208207
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
209208
style US fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
@@ -271,8 +270,7 @@ flowchart TD
271270
NFRA["NFR Requirements<br/><b>STATUS</b>"]
272271
NFRD["NFR Design<br/><b>STATUS</b>"]
273272
ID["Infrastructure Design<br/><b>STATUS</b>"]
274-
CP["Code Planning<br/><b>EXECUTE</b>"]
275-
CG["Code Generation<br/><b>EXECUTE</b>"]
273+
CG["Code Generation<br/>(Planning + Generation)<br/><b>EXECUTE</b>"]
276274
BT["Build and Test<br/><b>EXECUTE</b>"]
277275
end
278276
@@ -283,8 +281,7 @@ flowchart TD
283281
Start --> WD
284282
WD --> RA
285283
RA --> WP
286-
WP --> CP
287-
CP --> CG
284+
WP --> CG
288285
CG --> BT
289286
BT --> End(["Complete"])
290287
@@ -318,10 +315,8 @@ flowchart TD
318315
- **Rationale**: [Why executing or skipping]
319316
- [ ] Infrastructure Design - [EXECUTE/SKIP]
320317
- **Rationale**: [Why executing or skipping]
321-
- [ ] Code Planning - EXECUTE (ALWAYS)
322-
- **Rationale**: Implementation approach needed
323318
- [ ] Code Generation - EXECUTE (ALWAYS)
324-
- **Rationale**: Code implementation needed
319+
- **Rationale**: Implementation planning and code generation needed
325320
- [ ] Build and Test - EXECUTE (ALWAYS)
326321
- **Rationale**: Build, test, and verification needed
327322

@@ -380,7 +375,6 @@ Update `aidlc-docs/aidlc-state.md`:
380375
- [ ] NFR Requirements - [EXECUTE/SKIP]
381376
- [ ] NFR Design - [EXECUTE/SKIP]
382377
- [ ] Infrastructure Design - [EXECUTE/SKIP]
383-
- [ ] Code Planning - EXECUTE
384378
- [ ] Code Generation - EXECUTE
385379
- [ ] Build and Test - EXECUTE
386380

aidlc-rules/aws-aidlc-rule-details/inception/workspace-detection.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ Check if `aidlc-docs/aidlc-state.md` exists:
3535
**IF workspace has existing code**:
3636
- Set flag: `brownfield = true`
3737
- Check for existing reverse engineering artifacts in `aidlc-docs/inception/reverse-engineering/`
38-
- **IF reverse engineering artifacts exist**: Load them, skip to Requirements Analysis
38+
- **IF reverse engineering artifacts exist**:
39+
- Check if artifacts are stale (compare artifact timestamps against codebase's last significant modification)
40+
- **IF artifacts are current**: Load them, skip to Requirements Analysis
41+
- **IF artifacts are stale**: Next phase is Reverse Engineering (rerun to refresh artifacts)
42+
- **IF user explicitly requests rerun**: Next phase is Reverse Engineering regardless of staleness
3943
- **IF no reverse engineering artifacts**: Next phase is Reverse Engineering
4044

4145
## Step 4: Create Initial State File

0 commit comments

Comments
 (0)