olympus-ai 4.5.13 → 4.5.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/cli/index.js +63 -27
  3. package/dist/cli/index.js.map +1 -1
  4. package/dist/hooks/olympus-hooks.cjs +257 -257
  5. package/dist/installer/hooks.d.ts +47 -14
  6. package/dist/installer/hooks.d.ts.map +1 -1
  7. package/dist/installer/hooks.js +45 -77
  8. package/dist/installer/hooks.js.map +1 -1
  9. package/dist/installer/index.d.ts +8 -7
  10. package/dist/installer/index.d.ts.map +1 -1
  11. package/dist/installer/index.js +49 -46
  12. package/dist/installer/index.js.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/config/risk-keywords.json +5 -5
  15. package/resources/rules/common/ascii-diagram-standards.md +115 -115
  16. package/resources/rules/common/content-validation.md +131 -131
  17. package/resources/rules/common/error-handling.md +430 -430
  18. package/resources/rules/common/markdown-formatting.md +170 -170
  19. package/resources/rules/common/overconfidence-prevention.md +100 -100
  20. package/resources/rules/common/pathway-behaviors.json +60 -60
  21. package/resources/rules/common/pathway-behaviors.md +100 -100
  22. package/resources/rules/common/process-overview.md +157 -157
  23. package/resources/rules/common/terminal-formatting.md +161 -161
  24. package/resources/rules/common/terminology.md +189 -189
  25. package/resources/rules/common/welcome-message.md +118 -118
  26. package/resources/rules/common/workflow-changes.md +285 -285
  27. package/resources/rules/construction/bolt-planning.md +153 -153
  28. package/resources/rules/construction/bolt-review.md +143 -143
  29. package/resources/rules/construction/build-and-test.md +527 -527
  30. package/resources/rules/construction/code-generation.md +414 -414
  31. package/resources/rules/construction/documentation.md +201 -201
  32. package/resources/rules/construction/functional-design.md +135 -135
  33. package/resources/rules/construction/infrastructure-design.md +110 -110
  34. package/resources/rules/construction/nfr-design.md +106 -106
  35. package/resources/rules/construction/nfr-requirements.md +118 -118
  36. package/resources/rules/construction/test-generation.md +112 -112
  37. package/resources/rules/core-workflow.md +196 -196
  38. package/resources/rules/inception/application-design.md +195 -195
  39. package/resources/rules/inception/bolt-planning.md +588 -588
  40. package/resources/rules/inception/reverse-engineering.md +354 -354
  41. package/resources/rules/inception/units-generation.md +505 -505
  42. package/resources/rules/inception/user-stories.md +527 -527
  43. package/resources/rules/inception/workspace-detection.md +82 -82
  44. package/resources/rules/operations/operations.md +19 -19
  45. package/resources/skills/brief/templates/ai-dlc-intent-brief-template.md +149 -149
  46. package/resources/skills/getting-started/SKILL.md +79 -79
  47. package/resources/templates/construction/bolt-spec-template.md +270 -270
  48. package/resources/templates/inception/unit-brief-template.md +188 -188
  49. package/resources/templates/inception/units-template.md +99 -99
@@ -1,112 +1,112 @@
1
- # Test Generation - Detailed Steps
2
-
3
- ## Overview
4
-
5
- This stage generates and runs tests for the current unit after code generation completes.
6
-
7
- - Agent responsible: `qa-tester` (primary) or `olympian` for test writing
8
- - Output artifact: `aidlc-docs/{workflowId}/construction/{unitId}/testing/test-report.md`
9
-
10
- ## Prerequisites
11
-
12
- - Code generation must be complete (`code-summary.md` must exist at `aidlc-docs/{workflowId}/construction/{unitId}/code/code-summary.md`)
13
- - Unit files in scope are read from `code-summary.md`
14
- - If `code-summary.md` does not exist, halt and report to orchestrator before proceeding
15
-
16
- ## Step 1 — Framework Detection (Hybrid)
17
-
18
- - **1a**: The engine stores the detected framework in `test_framework` on `ConstructionUnitProgress`
19
- - **1b**: Agent independently verifies: read `package.json`, `vitest.config.*`, `jest.config.*` at project root
20
- - **1c**: If engine value and agent value disagree, agent value wins; log the discrepancy
21
-
22
- Known frameworks and their test commands:
23
-
24
- | Framework | Test Command |
25
- |-----------|-------------|
26
- | `vitest` | `npx vitest run` |
27
- | `jest` | `npx jest` |
28
- | `mocha` | `npx mocha` |
29
- | Unknown | Ask user before proceeding |
30
-
31
- ## Step 2 — Determine Test Types (Auditable Criteria)
32
-
33
- Evaluate each criterion explicitly and record which test types apply in `test-report.md`:
34
-
35
- - **Unit tests**: Required for all pure functions, class methods, utilities. File naming: `*.test.ts` or `*.spec.ts` co-located with source.
36
- - **Integration tests**: Required when the unit touches 2 or more modules, external APIs, databases, or file I/O. Placed in `tests/integration/`.
37
- - **E2E tests**: Required only when the unit includes a user-facing entry point (HTTP endpoint, CLI command, UI page). Placed in `tests/e2e/`.
38
-
39
- ## Step 3 — Generate Tests
40
-
41
- - Scope: only modify or create files listed in `code-summary.md`'s "Files created/modified" sections
42
- - Do NOT modify files from other units
43
- - Follow existing test file conventions in the project (import style, describe/it structure, mock patterns)
44
- - Use `data-testid` attributes for UI component tests
45
-
46
- ## Step 4 — Run Tests
47
-
48
- - Execute the framework test command for the unit's files only (scope by file path filter where possible)
49
- - Capture: total count, passed count, failed count
50
- - Write results into `test-report.md`
51
-
52
- ## Step 5 — Failure Handling
53
-
54
- - On first failure: attempt one automated fix per failing test (fix the test or the implementation; prefer fixing the test unless the implementation has a clear bug)
55
- - On second failure: attempt a second fix with a different strategy
56
- - After two failed attempts: escalate — write the failure details to `test-report.md` and set `tests_failed` count; do NOT attempt a third fix
57
- - Escalation message format: surface to the orchestrator with file path, test name, error message
58
-
59
- ## Engine Gating Rules
60
-
61
- - The engine blocks unit completion if `tests_total === 0` (no tests detected)
62
- - The engine blocks unit completion if `tests_failed > 0`
63
- - Both blocks can be overridden by setting `allowFailures: true` in `TestGenerationOptions`
64
- - Override must be logged in `test-report.md` under the `## Override` section
65
-
66
- ## Regression Category Handling
67
-
68
- When a regression baseline exists (brownfield/bugfix pathways), each newly failing test is categorized before any fix is attempted. Follow these category-specific instructions:
69
-
70
- ### legitimate_regression
71
- The test was passing in the baseline but now fails due to unintended code changes.
72
- - **Action**: Fix the regression before the unit can complete
73
- - **Priority**: Blocking — the unit CANNOT proceed until all legitimate regressions are resolved
74
- - **Approach**: Identify the code change that caused the failure, revert or fix the logic, re-run the test
75
-
76
- ### intentional_change
77
- The test behavior changed by design — either a new test was added or existing behavior was deliberately modified.
78
- - **Action**: Update the test expectations to match the new intended behavior
79
- - **Priority**: Non-blocking — but the test MUST be updated (not deleted or suppressed)
80
- - **Rationale logging**: Document WHY the behavior changed in the test-report.md under "Intentional Changes"
81
- - **Example**: If a function's return type changed from `string` to `number`, update assertions to expect `number`
82
-
83
- ### flaky
84
- The test passed on re-run without any code changes, indicating non-deterministic behavior.
85
- - **Action**: Flag the test but do NOT block unit completion
86
- - **Priority**: Non-blocking — flaky tests are tracked but do not gate progress
87
- - **Documentation**: Record the flaky test name and file in test-report.md under "Flaky Tests"
88
- - **Do NOT**: Attempt to fix flaky tests as part of this unit — that is separate work
89
-
90
- ### pre_existing_failure
91
- The test was already failing before this unit's changes began.
92
- - **Action**: Ignore — this is not caused by the current unit's work
93
- - **Priority**: Non-blocking
94
- - **Do NOT**: Attempt to fix pre-existing failures as part of this unit
95
-
96
- ## Code Modification Scope
97
-
98
- - The agent may ONLY modify files listed in `code-summary.md` for this unit
99
- - `code-summary.md` is at: `aidlc-docs/{workflowId}/construction/{unitId}/code/code-summary.md`
100
- - If `code-summary.md` does not exist, halt and report to orchestrator before proceeding
101
-
102
- ## Output Artifact
103
-
104
- - Path: `aidlc-docs/{workflowId}/construction/{unitId}/testing/test-report.md`
105
- - Must exist before the unit is marked complete
106
-
107
- ## Completion Criteria
108
-
109
- - `test-report.md` written with actual counts (not placeholders)
110
- - `tests_total > 0`
111
- - `tests_failed === 0` (or override documented)
112
- - `ConstructionUnitProgress.stages['test-generation'].status === 'completed'`
1
+ # Test Generation - Detailed Steps
2
+
3
+ ## Overview
4
+
5
+ This stage generates and runs tests for the current unit after code generation completes.
6
+
7
+ - Agent responsible: `qa-tester` (primary) or `olympian` for test writing
8
+ - Output artifact: `aidlc-docs/{workflowId}/construction/{unitId}/testing/test-report.md`
9
+
10
+ ## Prerequisites
11
+
12
+ - Code generation must be complete (`code-summary.md` must exist at `aidlc-docs/{workflowId}/construction/{unitId}/code/code-summary.md`)
13
+ - Unit files in scope are read from `code-summary.md`
14
+ - If `code-summary.md` does not exist, halt and report to orchestrator before proceeding
15
+
16
+ ## Step 1 — Framework Detection (Hybrid)
17
+
18
+ - **1a**: The engine stores the detected framework in `test_framework` on `ConstructionUnitProgress`
19
+ - **1b**: Agent independently verifies: read `package.json`, `vitest.config.*`, `jest.config.*` at project root
20
+ - **1c**: If engine value and agent value disagree, agent value wins; log the discrepancy
21
+
22
+ Known frameworks and their test commands:
23
+
24
+ | Framework | Test Command |
25
+ |-----------|-------------|
26
+ | `vitest` | `npx vitest run` |
27
+ | `jest` | `npx jest` |
28
+ | `mocha` | `npx mocha` |
29
+ | Unknown | Ask user before proceeding |
30
+
31
+ ## Step 2 — Determine Test Types (Auditable Criteria)
32
+
33
+ Evaluate each criterion explicitly and record which test types apply in `test-report.md`:
34
+
35
+ - **Unit tests**: Required for all pure functions, class methods, utilities. File naming: `*.test.ts` or `*.spec.ts` co-located with source.
36
+ - **Integration tests**: Required when the unit touches 2 or more modules, external APIs, databases, or file I/O. Placed in `tests/integration/`.
37
+ - **E2E tests**: Required only when the unit includes a user-facing entry point (HTTP endpoint, CLI command, UI page). Placed in `tests/e2e/`.
38
+
39
+ ## Step 3 — Generate Tests
40
+
41
+ - Scope: only modify or create files listed in `code-summary.md`'s "Files created/modified" sections
42
+ - Do NOT modify files from other units
43
+ - Follow existing test file conventions in the project (import style, describe/it structure, mock patterns)
44
+ - Use `data-testid` attributes for UI component tests
45
+
46
+ ## Step 4 — Run Tests
47
+
48
+ - Execute the framework test command for the unit's files only (scope by file path filter where possible)
49
+ - Capture: total count, passed count, failed count
50
+ - Write results into `test-report.md`
51
+
52
+ ## Step 5 — Failure Handling
53
+
54
+ - On first failure: attempt one automated fix per failing test (fix the test or the implementation; prefer fixing the test unless the implementation has a clear bug)
55
+ - On second failure: attempt a second fix with a different strategy
56
+ - After two failed attempts: escalate — write the failure details to `test-report.md` and set `tests_failed` count; do NOT attempt a third fix
57
+ - Escalation message format: surface to the orchestrator with file path, test name, error message
58
+
59
+ ## Engine Gating Rules
60
+
61
+ - The engine blocks unit completion if `tests_total === 0` (no tests detected)
62
+ - The engine blocks unit completion if `tests_failed > 0`
63
+ - Both blocks can be overridden by setting `allowFailures: true` in `TestGenerationOptions`
64
+ - Override must be logged in `test-report.md` under the `## Override` section
65
+
66
+ ## Regression Category Handling
67
+
68
+ When a regression baseline exists (brownfield/bugfix pathways), each newly failing test is categorized before any fix is attempted. Follow these category-specific instructions:
69
+
70
+ ### legitimate_regression
71
+ The test was passing in the baseline but now fails due to unintended code changes.
72
+ - **Action**: Fix the regression before the unit can complete
73
+ - **Priority**: Blocking — the unit CANNOT proceed until all legitimate regressions are resolved
74
+ - **Approach**: Identify the code change that caused the failure, revert or fix the logic, re-run the test
75
+
76
+ ### intentional_change
77
+ The test behavior changed by design — either a new test was added or existing behavior was deliberately modified.
78
+ - **Action**: Update the test expectations to match the new intended behavior
79
+ - **Priority**: Non-blocking — but the test MUST be updated (not deleted or suppressed)
80
+ - **Rationale logging**: Document WHY the behavior changed in the test-report.md under "Intentional Changes"
81
+ - **Example**: If a function's return type changed from `string` to `number`, update assertions to expect `number`
82
+
83
+ ### flaky
84
+ The test passed on re-run without any code changes, indicating non-deterministic behavior.
85
+ - **Action**: Flag the test but do NOT block unit completion
86
+ - **Priority**: Non-blocking — flaky tests are tracked but do not gate progress
87
+ - **Documentation**: Record the flaky test name and file in test-report.md under "Flaky Tests"
88
+ - **Do NOT**: Attempt to fix flaky tests as part of this unit — that is separate work
89
+
90
+ ### pre_existing_failure
91
+ The test was already failing before this unit's changes began.
92
+ - **Action**: Ignore — this is not caused by the current unit's work
93
+ - **Priority**: Non-blocking
94
+ - **Do NOT**: Attempt to fix pre-existing failures as part of this unit
95
+
96
+ ## Code Modification Scope
97
+
98
+ - The agent may ONLY modify files listed in `code-summary.md` for this unit
99
+ - `code-summary.md` is at: `aidlc-docs/{workflowId}/construction/{unitId}/code/code-summary.md`
100
+ - If `code-summary.md` does not exist, halt and report to orchestrator before proceeding
101
+
102
+ ## Output Artifact
103
+
104
+ - Path: `aidlc-docs/{workflowId}/construction/{unitId}/testing/test-report.md`
105
+ - Must exist before the unit is marked complete
106
+
107
+ ## Completion Criteria
108
+
109
+ - `test-report.md` written with actual counts (not placeholders)
110
+ - `tests_total > 0`
111
+ - `tests_failed === 0` (or override documented)
112
+ - `ConstructionUnitProgress.stages['test-generation'].status === 'completed'`
@@ -1,196 +1,196 @@
1
- # AI-DLC Core Workflow (Olympus Reference)
2
-
3
- This document adapts the AWS AI-DLC workflow for Olympus conventions.
4
- Actual workflow execution is driven by the `/plan` command and Olympus agent delegation.
5
-
6
- ## Adaptive Workflow Principle
7
-
8
- **The workflow adapts to the work, not the other way around.**
9
-
10
- The AI model intelligently assesses what stages are needed based on:
11
- 1. User's stated intent and clarity
12
- 2. Existing codebase state (if any)
13
- 3. Complexity and scope of change
14
- 4. Risk and impact assessment
15
-
16
- ## MANDATORY: Rule Details Loading
17
-
18
- **CRITICAL**: When performing any phase, you MUST read and use relevant content from rule detail files installed at `~/.claude/olympus/rules/`.
19
-
20
- **Common Rules**: ALWAYS load common rules at workflow start:
21
- - Load `~/.claude/olympus/rules/common/process-overview.md` for workflow overview
22
- - Load `~/.claude/olympus/rules/common/session-continuity.md` for session resumption guidance
23
- - Load `~/.claude/olympus/rules/common/content-validation.md` for content validation requirements
24
- - Load `~/.claude/olympus/rules/common/markdown-formatting.md` for markdown formatting and markdownlint compliance
25
- - Load `~/.claude/olympus/rules/common/question-format-guide.md` for question formatting rules
26
- - Load `~/.claude/olympus/rules/common/terminology.md` for phase/stage naming conventions
27
- - Load `~/.claude/olympus/rules/common/error-handling.md` for error recovery procedures
28
-
29
- ## MANDATORY: Content Validation
30
-
31
- Before creating ANY file, validate content per `~/.claude/olympus/rules/common/content-validation.md`:
32
- Mermaid syntax, ASCII diagrams, special character escaping, text alternatives.
33
-
34
- ## MANDATORY: Question File Format
35
-
36
- Follow `~/.claude/olympus/rules/common/question-format-guide.md` for multiple choice format, [Answer]: tags, and validation.
37
-
38
- ## MANDATORY: Custom Welcome Message
39
-
40
- At workflow start, load and display `~/.claude/olympus/rules/common/welcome-message.md` once.
41
-
42
- ---
43
-
44
- # INCEPTION PHASE — Determine WHAT to build and WHY
45
-
46
- Core decomposition flow: **Intent -> Units -> Stories -> Bolts -> Done**
47
-
48
- Each stage: load its rule file BEFORE executing, log all interactions in audit.md, wait for explicit user approval before proceeding (do not auto-advance).
49
-
50
- | Stage | Condition | Rule File |
51
- |-------|-----------|-----------|
52
- | Workspace Detection | ALWAYS | `~/.claude/olympus/rules/inception/workspace-detection.md` |
53
- | Reverse Engineering | Brownfield only (no prior artifacts) | `~/.claude/olympus/rules/inception/reverse-engineering.md` |
54
- | Requirements Analysis | ALWAYS (adaptive depth) | `~/.claude/olympus/rules/inception/requirements-analysis.md` |
55
- | Workflow Planning | ALWAYS | `~/.claude/olympus/rules/inception/workflow-planning.md` |
56
- | Units Generation | Conditional (decomposes intent into independent domain units; includes domain analysis — subsumes former Application Design stage) | `~/.claude/olympus/rules/inception/units-generation.md` |
57
- | User Stories | Conditional (creates stories per-unit from each unit's assigned requirements; falls back to requirements-based when units skipped) | `~/.claude/olympus/rules/inception/user-stories.md` |
58
- | Bolt Planning | Conditional (decomposes each unit's stories into executable bolts with dependency tracking) | `~/.claude/olympus/rules/inception/bolt-planning.md` |
59
-
60
- ---
61
-
62
- # CONSTRUCTION PHASE — Determine HOW to build it
63
-
64
- Each unit is completed fully (design + code) before moving to the next unit. Construction stages use standardized 2-option completion messages (Request Changes / Continue) — NO emergent 3-option behavior.
65
-
66
- **Per-Unit Loop** (for each unit of work):
67
-
68
- | Stage | Condition | Rule File |
69
- |-------|-----------|-----------|
70
- | Functional Design | Conditional (new data models, complex business logic) | `~/.claude/olympus/rules/construction/functional-design.md` |
71
- | NFR Requirements | Conditional (performance, security, scalability, tech stack) | `~/.claude/olympus/rules/construction/nfr-requirements.md` |
72
- | NFR Design | Conditional (NFR Requirements was executed) | `~/.claude/olympus/rules/construction/nfr-design.md` |
73
- | Infrastructure Design | Conditional (infra services, deployment arch) | `~/.claude/olympus/rules/construction/infrastructure-design.md` |
74
- | Code Generation | ALWAYS (two-part: plan then generate) | `~/.claude/olympus/rules/construction/code-generation.md` |
75
-
76
- **Build and Test** (ALWAYS, after all units): Load `~/.claude/olympus/rules/construction/build-and-test.md`
77
-
78
- **Documentation** (ALWAYS, after Build and Test): Load `~/.claude/olympus/rules/construction/documentation.md`
79
-
80
- ---
81
-
82
- # OPERATIONS PHASE — Placeholder for future deployment/monitoring workflows
83
-
84
- ---
85
-
86
- ## Key Principles
87
-
88
- - **Adaptive Execution**: Only execute stages that add value
89
- - **User Control**: User can request stage inclusion/exclusion
90
- - **Progress Tracking**: Update aidlc-state.md with executed and skipped stages
91
- - **Complete Audit Trail**: Log ALL user inputs and AI responses in audit.md with timestamps
92
- - Capture user's COMPLETE RAW INPUT exactly as provided (never summarize)
93
- - Log every interaction, not just approvals
94
- - **Content Validation**: Validate before file creation per content-validation.md rules
95
- - **NO EMERGENT BEHAVIOR**: Construction phases use standardized 2-option completion messages only
96
-
97
- ## MANDATORY: Plan-Level Checkbox Enforcement
98
-
99
- 1. NEVER complete any work without updating plan checkboxes
100
- 2. IMMEDIATELY mark steps `[x]` in the SAME interaction where work is completed
101
- 3. Two-Level tracking: Plan-Level (detailed steps) + Stage-Level (aidlc-state.md)
102
-
103
- ## Prompts Logging Requirements
104
-
105
- - Log EVERY user input with ISO 8601 timestamp in audit.md
106
- - Capture COMPLETE RAW INPUT exactly as provided (never summarize)
107
- - ALWAYS append/edit audit.md — NEVER overwrite
108
-
109
- ### Audit Log Format:
110
- ```markdown
111
- ## [Stage Name]
112
- **Timestamp**: [ISO timestamp]
113
- **User Input**: "[Complete raw user input]"
114
- **AI Response**: "[Action taken]"
115
- **Context**: [Stage/decision]
116
-
117
- ---
118
- ```
119
-
120
- ## Directory Structure
121
-
122
- ```text
123
- <WORKSPACE-ROOT>/ # APPLICATION CODE HERE
124
- ├── [project-specific structure]
125
- ├── aidlc-docs/ # DOCUMENTATION ONLY
126
- │ ├── inception/
127
- │ │ ├── plans/
128
- │ │ ├── reverse-engineering/ # Brownfield only
129
- │ │ ├── requirements/
130
- │ │ ├── units/
131
- │ │ │ └── {UNIT-NNN-slug}/
132
- │ │ │ ├── unit-brief.md
133
- │ │ │ └── stories/ # Per-unit stories (created during User Stories stage)
134
- │ │ │ ├── S-001-{slug}.md
135
- │ │ │ └── S-002-{slug}.md
136
- │ │ └── user-stories/
137
- │ │ └── personas.md # Project-wide personas (not per-unit)
138
- │ ├── construction/
139
- │ │ ├── {UNIT-NNN-slug}/
140
- │ │ │ ├── functional-design/
141
- │ │ │ ├── nfr-requirements/
142
- │ │ │ ├── nfr-design/
143
- │ │ │ ├── infrastructure-design/
144
- │ │ │ ├── code/ # Markdown summaries only
145
- │ │ │ └── bolts/ # Per-unit bolt specs (created during Bolt Planning)
146
- │ │ │ └── BOLT-NNN-{slug}/
147
- │ │ │ ├── spec.md
148
- │ │ │ └── review.md
149
- │ │ ├── design/
150
- │ │ ├── build-and-test/
151
- │ │ └── documentation/
152
- │ ├── operations/ # Placeholder
153
- │ ├── aidlc-state.md
154
- │ └── audit.md
155
- ```
156
-
157
- Application code: workspace root (NEVER in aidlc-docs/). Documentation: aidlc-docs/ only.
158
-
159
- ## Canonical Templates
160
-
161
- Agents MUST read and follow these template files when creating artifacts:
162
-
163
- | Template | Path | Used By |
164
- |----------|------|---------|
165
- | Units overview | `resources/templates/inception/units-template.md` | Units Generation |
166
- | Unit brief | `resources/templates/inception/unit-brief-template.md` | Units Generation |
167
- | Bolt spec | `resources/templates/construction/bolt-spec-template.md` | Bolt Planning |
168
-
169
- ## Olympus Agent Delegation
170
-
171
- | Stage | Agent | Purpose |
172
- |-------|-------|---------|
173
- | Discovery/Reverse Engineering | `explore-medium` | Codebase analysis |
174
- | Intent/Requirements | `prometheus` | Strategic planning with interview |
175
- | Units Generation | `olympian` + `momus` (optional) | Domain decomposition with optional review |
176
- | User Stories | `oracle-medium` | Per-unit story and persona generation |
177
- | Bolt Planning | `olympian` + `momus` (optional) | Bolt decomposition with optional review |
178
- | Functional/NFR/Infrastructure Design | `oracle-medium` | Design decisions |
179
- | Code Generation (backend) | `olympian` or `olympian-high` | Implementation |
180
- | Code Generation (frontend) | `frontend-engineer` or `frontend-engineer-high` | UI implementation |
181
- | Build & Test | `qa-tester` | Testing and verification |
182
- | Documentation | `document-writer` | Documentation draft generation |
183
- | Review | `momus` | Critical evaluation |
184
-
185
- ## Skill Stacking for AI-DLC
186
-
187
- | Combination | Effect |
188
- |-------------|--------|
189
- | `/plan` alone | Structured workflow with agent delegation |
190
- | `/plan` + `/ascent` | Adds persistence — cannot stop until all units complete |
191
- | `/plan` + `/ultrawork` | Adds parallel execution and verification guarantees |
192
- | `/plan` + `/ascent` + `/ultrawork` | Full power: parallel, persistent, verified |
193
-
194
- ## Extensions
195
-
196
- Custom extensions in `.aidlc-rule-details/extensions/` at workspace root take precedence over standard rules.
1
+ # AI-DLC Core Workflow (Olympus Reference)
2
+
3
+ This document adapts the AWS AI-DLC workflow for Olympus conventions.
4
+ Actual workflow execution is driven by the `/plan` command and Olympus agent delegation.
5
+
6
+ ## Adaptive Workflow Principle
7
+
8
+ **The workflow adapts to the work, not the other way around.**
9
+
10
+ The AI model intelligently assesses what stages are needed based on:
11
+ 1. User's stated intent and clarity
12
+ 2. Existing codebase state (if any)
13
+ 3. Complexity and scope of change
14
+ 4. Risk and impact assessment
15
+
16
+ ## MANDATORY: Rule Details Loading
17
+
18
+ **CRITICAL**: When performing any phase, you MUST read and use relevant content from rule detail files installed at `~/.claude/olympus/rules/`.
19
+
20
+ **Common Rules**: ALWAYS load common rules at workflow start:
21
+ - Load `~/.claude/olympus/rules/common/process-overview.md` for workflow overview
22
+ - Load `~/.claude/olympus/rules/common/session-continuity.md` for session resumption guidance
23
+ - Load `~/.claude/olympus/rules/common/content-validation.md` for content validation requirements
24
+ - Load `~/.claude/olympus/rules/common/markdown-formatting.md` for markdown formatting and markdownlint compliance
25
+ - Load `~/.claude/olympus/rules/common/question-format-guide.md` for question formatting rules
26
+ - Load `~/.claude/olympus/rules/common/terminology.md` for phase/stage naming conventions
27
+ - Load `~/.claude/olympus/rules/common/error-handling.md` for error recovery procedures
28
+
29
+ ## MANDATORY: Content Validation
30
+
31
+ Before creating ANY file, validate content per `~/.claude/olympus/rules/common/content-validation.md`:
32
+ Mermaid syntax, ASCII diagrams, special character escaping, text alternatives.
33
+
34
+ ## MANDATORY: Question File Format
35
+
36
+ Follow `~/.claude/olympus/rules/common/question-format-guide.md` for multiple choice format, [Answer]: tags, and validation.
37
+
38
+ ## MANDATORY: Custom Welcome Message
39
+
40
+ At workflow start, load and display `~/.claude/olympus/rules/common/welcome-message.md` once.
41
+
42
+ ---
43
+
44
+ # INCEPTION PHASE — Determine WHAT to build and WHY
45
+
46
+ Core decomposition flow: **Intent -> Units -> Stories -> Bolts -> Done**
47
+
48
+ Each stage: load its rule file BEFORE executing, log all interactions in audit.md, wait for explicit user approval before proceeding (do not auto-advance).
49
+
50
+ | Stage | Condition | Rule File |
51
+ |-------|-----------|-----------|
52
+ | Workspace Detection | ALWAYS | `~/.claude/olympus/rules/inception/workspace-detection.md` |
53
+ | Reverse Engineering | Brownfield only (no prior artifacts) | `~/.claude/olympus/rules/inception/reverse-engineering.md` |
54
+ | Requirements Analysis | ALWAYS (adaptive depth) | `~/.claude/olympus/rules/inception/requirements-analysis.md` |
55
+ | Workflow Planning | ALWAYS | `~/.claude/olympus/rules/inception/workflow-planning.md` |
56
+ | Units Generation | Conditional (decomposes intent into independent domain units; includes domain analysis — subsumes former Application Design stage) | `~/.claude/olympus/rules/inception/units-generation.md` |
57
+ | User Stories | Conditional (creates stories per-unit from each unit's assigned requirements; falls back to requirements-based when units skipped) | `~/.claude/olympus/rules/inception/user-stories.md` |
58
+ | Bolt Planning | Conditional (decomposes each unit's stories into executable bolts with dependency tracking) | `~/.claude/olympus/rules/inception/bolt-planning.md` |
59
+
60
+ ---
61
+
62
+ # CONSTRUCTION PHASE — Determine HOW to build it
63
+
64
+ Each unit is completed fully (design + code) before moving to the next unit. Construction stages use standardized 2-option completion messages (Request Changes / Continue) — NO emergent 3-option behavior.
65
+
66
+ **Per-Unit Loop** (for each unit of work):
67
+
68
+ | Stage | Condition | Rule File |
69
+ |-------|-----------|-----------|
70
+ | Functional Design | Conditional (new data models, complex business logic) | `~/.claude/olympus/rules/construction/functional-design.md` |
71
+ | NFR Requirements | Conditional (performance, security, scalability, tech stack) | `~/.claude/olympus/rules/construction/nfr-requirements.md` |
72
+ | NFR Design | Conditional (NFR Requirements was executed) | `~/.claude/olympus/rules/construction/nfr-design.md` |
73
+ | Infrastructure Design | Conditional (infra services, deployment arch) | `~/.claude/olympus/rules/construction/infrastructure-design.md` |
74
+ | Code Generation | ALWAYS (two-part: plan then generate) | `~/.claude/olympus/rules/construction/code-generation.md` |
75
+
76
+ **Build and Test** (ALWAYS, after all units): Load `~/.claude/olympus/rules/construction/build-and-test.md`
77
+
78
+ **Documentation** (ALWAYS, after Build and Test): Load `~/.claude/olympus/rules/construction/documentation.md`
79
+
80
+ ---
81
+
82
+ # OPERATIONS PHASE — Placeholder for future deployment/monitoring workflows
83
+
84
+ ---
85
+
86
+ ## Key Principles
87
+
88
+ - **Adaptive Execution**: Only execute stages that add value
89
+ - **User Control**: User can request stage inclusion/exclusion
90
+ - **Progress Tracking**: Update aidlc-state.md with executed and skipped stages
91
+ - **Complete Audit Trail**: Log ALL user inputs and AI responses in audit.md with timestamps
92
+ - Capture user's COMPLETE RAW INPUT exactly as provided (never summarize)
93
+ - Log every interaction, not just approvals
94
+ - **Content Validation**: Validate before file creation per content-validation.md rules
95
+ - **NO EMERGENT BEHAVIOR**: Construction phases use standardized 2-option completion messages only
96
+
97
+ ## MANDATORY: Plan-Level Checkbox Enforcement
98
+
99
+ 1. NEVER complete any work without updating plan checkboxes
100
+ 2. IMMEDIATELY mark steps `[x]` in the SAME interaction where work is completed
101
+ 3. Two-Level tracking: Plan-Level (detailed steps) + Stage-Level (aidlc-state.md)
102
+
103
+ ## Prompts Logging Requirements
104
+
105
+ - Log EVERY user input with ISO 8601 timestamp in audit.md
106
+ - Capture COMPLETE RAW INPUT exactly as provided (never summarize)
107
+ - ALWAYS append/edit audit.md — NEVER overwrite
108
+
109
+ ### Audit Log Format:
110
+ ```markdown
111
+ ## [Stage Name]
112
+ **Timestamp**: [ISO timestamp]
113
+ **User Input**: "[Complete raw user input]"
114
+ **AI Response**: "[Action taken]"
115
+ **Context**: [Stage/decision]
116
+
117
+ ---
118
+ ```
119
+
120
+ ## Directory Structure
121
+
122
+ ```text
123
+ <WORKSPACE-ROOT>/ # APPLICATION CODE HERE
124
+ ├── [project-specific structure]
125
+ ├── aidlc-docs/ # DOCUMENTATION ONLY
126
+ │ ├── inception/
127
+ │ │ ├── plans/
128
+ │ │ ├── reverse-engineering/ # Brownfield only
129
+ │ │ ├── requirements/
130
+ │ │ ├── units/
131
+ │ │ │ └── {UNIT-NNN-slug}/
132
+ │ │ │ ├── unit-brief.md
133
+ │ │ │ └── stories/ # Per-unit stories (created during User Stories stage)
134
+ │ │ │ ├── S-001-{slug}.md
135
+ │ │ │ └── S-002-{slug}.md
136
+ │ │ └── user-stories/
137
+ │ │ └── personas.md # Project-wide personas (not per-unit)
138
+ │ ├── construction/
139
+ │ │ ├── {UNIT-NNN-slug}/
140
+ │ │ │ ├── functional-design/
141
+ │ │ │ ├── nfr-requirements/
142
+ │ │ │ ├── nfr-design/
143
+ │ │ │ ├── infrastructure-design/
144
+ │ │ │ ├── code/ # Markdown summaries only
145
+ │ │ │ └── bolts/ # Per-unit bolt specs (created during Bolt Planning)
146
+ │ │ │ └── BOLT-NNN-{slug}/
147
+ │ │ │ ├── spec.md
148
+ │ │ │ └── review.md
149
+ │ │ ├── design/
150
+ │ │ ├── build-and-test/
151
+ │ │ └── documentation/
152
+ │ ├── operations/ # Placeholder
153
+ │ ├── aidlc-state.md
154
+ │ └── audit.md
155
+ ```
156
+
157
+ Application code: workspace root (NEVER in aidlc-docs/). Documentation: aidlc-docs/ only.
158
+
159
+ ## Canonical Templates
160
+
161
+ Agents MUST read and follow these template files when creating artifacts:
162
+
163
+ | Template | Path | Used By |
164
+ |----------|------|---------|
165
+ | Units overview | `resources/templates/inception/units-template.md` | Units Generation |
166
+ | Unit brief | `resources/templates/inception/unit-brief-template.md` | Units Generation |
167
+ | Bolt spec | `resources/templates/construction/bolt-spec-template.md` | Bolt Planning |
168
+
169
+ ## Olympus Agent Delegation
170
+
171
+ | Stage | Agent | Purpose |
172
+ |-------|-------|---------|
173
+ | Discovery/Reverse Engineering | `explore-medium` | Codebase analysis |
174
+ | Intent/Requirements | `prometheus` | Strategic planning with interview |
175
+ | Units Generation | `olympian` + `momus` (optional) | Domain decomposition with optional review |
176
+ | User Stories | `oracle-medium` | Per-unit story and persona generation |
177
+ | Bolt Planning | `olympian` + `momus` (optional) | Bolt decomposition with optional review |
178
+ | Functional/NFR/Infrastructure Design | `oracle-medium` | Design decisions |
179
+ | Code Generation (backend) | `olympian` or `olympian-high` | Implementation |
180
+ | Code Generation (frontend) | `frontend-engineer` or `frontend-engineer-high` | UI implementation |
181
+ | Build & Test | `qa-tester` | Testing and verification |
182
+ | Documentation | `document-writer` | Documentation draft generation |
183
+ | Review | `momus` | Critical evaluation |
184
+
185
+ ## Skill Stacking for AI-DLC
186
+
187
+ | Combination | Effect |
188
+ |-------------|--------|
189
+ | `/plan` alone | Structured workflow with agent delegation |
190
+ | `/plan` + `/ascent` | Adds persistence — cannot stop until all units complete |
191
+ | `/plan` + `/ultrawork` | Adds parallel execution and verification guarantees |
192
+ | `/plan` + `/ascent` + `/ultrawork` | Full power: parallel, persistent, verified |
193
+
194
+ ## Extensions
195
+
196
+ Custom extensions in `.aidlc-rule-details/extensions/` at workspace root take precedence over standard rules.