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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/cli/index.js +63 -27
- package/dist/cli/index.js.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +257 -257
- package/dist/installer/hooks.d.ts +47 -14
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +45 -77
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +8 -7
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +49 -46
- package/dist/installer/index.js.map +1 -1
- package/package.json +1 -1
- package/resources/config/risk-keywords.json +5 -5
- package/resources/rules/common/ascii-diagram-standards.md +115 -115
- package/resources/rules/common/content-validation.md +131 -131
- package/resources/rules/common/error-handling.md +430 -430
- package/resources/rules/common/markdown-formatting.md +170 -170
- package/resources/rules/common/overconfidence-prevention.md +100 -100
- package/resources/rules/common/pathway-behaviors.json +60 -60
- package/resources/rules/common/pathway-behaviors.md +100 -100
- package/resources/rules/common/process-overview.md +157 -157
- package/resources/rules/common/terminal-formatting.md +161 -161
- package/resources/rules/common/terminology.md +189 -189
- package/resources/rules/common/welcome-message.md +118 -118
- package/resources/rules/common/workflow-changes.md +285 -285
- package/resources/rules/construction/bolt-planning.md +153 -153
- package/resources/rules/construction/bolt-review.md +143 -143
- package/resources/rules/construction/build-and-test.md +527 -527
- package/resources/rules/construction/code-generation.md +414 -414
- package/resources/rules/construction/documentation.md +201 -201
- package/resources/rules/construction/functional-design.md +135 -135
- package/resources/rules/construction/infrastructure-design.md +110 -110
- package/resources/rules/construction/nfr-design.md +106 -106
- package/resources/rules/construction/nfr-requirements.md +118 -118
- package/resources/rules/construction/test-generation.md +112 -112
- package/resources/rules/core-workflow.md +196 -196
- package/resources/rules/inception/application-design.md +195 -195
- package/resources/rules/inception/bolt-planning.md +588 -588
- package/resources/rules/inception/reverse-engineering.md +354 -354
- package/resources/rules/inception/units-generation.md +505 -505
- package/resources/rules/inception/user-stories.md +527 -527
- package/resources/rules/inception/workspace-detection.md +82 -82
- package/resources/rules/operations/operations.md +19 -19
- package/resources/skills/brief/templates/ai-dlc-intent-brief-template.md +149 -149
- package/resources/skills/getting-started/SKILL.md +79 -79
- package/resources/templates/construction/bolt-spec-template.md +270 -270
- package/resources/templates/inception/unit-brief-template.md +188 -188
- package/resources/templates/inception/units-template.md +99 -99
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
{
|
|
2
|
-
"bugfix": {
|
|
3
|
-
"rules": [
|
|
4
|
-
{
|
|
5
|
-
"id": "BF-001",
|
|
6
|
-
"name": "autonomous-diagnosis",
|
|
7
|
-
"description": "Before writing any code change, reproduce the defect with a failing test or a documented reproduction recipe, identify the root cause (the specific code path, assumption, or edge case that causes the failure), and document the root cause in the '## Root Cause' section of the unit's test-report.md. Do not write a fix before completing the diagnosis.",
|
|
8
|
-
"enforcement": "mandatory"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"id": "BF-002",
|
|
12
|
-
"name": "root-cause-analysis",
|
|
13
|
-
"description": "The test-report.md for a bugfix unit must contain a '## Root Cause' section with: file path and line number(s) of the defect, a one-paragraph explanation of why the failure occurs, and confirmation that the fix targets the root cause, not a workaround.",
|
|
14
|
-
"enforcement": "mandatory"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"id": "BF-003",
|
|
18
|
-
"name": "missing-test-rule",
|
|
19
|
-
"description": "Every bugfix unit MUST produce at least one new test that reproduces the original defect (fails before the fix, passes after), is placed in the appropriate test file for the affected module, and is named to clearly identify the defect it guards against. This rule cannot be overridden via allowFailures. The engine blocks unit completion if tests_total === 0 for any bugfix unit.",
|
|
20
|
-
"enforcement": "mandatory"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"quality_gate_checklist": [
|
|
24
|
-
"Root cause identified and documented in test-report.md",
|
|
25
|
-
"Fix addresses the root cause (not just the symptom)",
|
|
26
|
-
"All existing tests still pass (zero regressions)",
|
|
27
|
-
"At least one new test reproduces the original defect",
|
|
28
|
-
"New test passes with the fix applied"
|
|
29
|
-
]
|
|
30
|
-
},
|
|
31
|
-
"optimization": {
|
|
32
|
-
"rules": [
|
|
33
|
-
{
|
|
34
|
-
"id": "OPT-001",
|
|
35
|
-
"name": "baseline-measurement",
|
|
36
|
-
"description": "Before making any code changes, run the relevant benchmark or performance test, record the baseline metric (e.g., execution time, memory usage, throughput) in the '## Baseline' section of the unit's test-report.md, and note the test command used and any environment conditions that could affect the result. Do not proceed with changes until the baseline is captured.",
|
|
37
|
-
"enforcement": "mandatory"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"id": "OPT-002",
|
|
41
|
-
"name": "before-after-comparison",
|
|
42
|
-
"description": "After applying changes, run the same benchmark or performance test under the same conditions and record the result in the '## Performance Comparison' section of test-report.md, including: baseline metric, post-change metric, and delta (absolute and percentage). Confirm the improvement meets the acceptance criteria defined in the unit spec. If performance has not improved, investigate before marking the unit complete.",
|
|
43
|
-
"enforcement": "mandatory"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"id": "OPT-003",
|
|
47
|
-
"name": "rollback-plan",
|
|
48
|
-
"description": "Document in test-report.md how to revert the optimization if it causes a regression in production: which files were changed, the prior behavior that would need to be restored, and any feature flags or config knobs that could disable the optimization without a deploy.",
|
|
49
|
-
"enforcement": "mandatory"
|
|
50
|
-
}
|
|
51
|
-
],
|
|
52
|
-
"quality_gate_checklist": [
|
|
53
|
-
"Baseline metric recorded in test-report.md before changes",
|
|
54
|
-
"Post-change metric recorded with delta (absolute and percentage)",
|
|
55
|
-
"Improvement meets the acceptance criteria defined in the unit spec",
|
|
56
|
-
"Rollback plan documented in test-report.md",
|
|
57
|
-
"All existing tests still pass (zero regressions)"
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"bugfix": {
|
|
3
|
+
"rules": [
|
|
4
|
+
{
|
|
5
|
+
"id": "BF-001",
|
|
6
|
+
"name": "autonomous-diagnosis",
|
|
7
|
+
"description": "Before writing any code change, reproduce the defect with a failing test or a documented reproduction recipe, identify the root cause (the specific code path, assumption, or edge case that causes the failure), and document the root cause in the '## Root Cause' section of the unit's test-report.md. Do not write a fix before completing the diagnosis.",
|
|
8
|
+
"enforcement": "mandatory"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"id": "BF-002",
|
|
12
|
+
"name": "root-cause-analysis",
|
|
13
|
+
"description": "The test-report.md for a bugfix unit must contain a '## Root Cause' section with: file path and line number(s) of the defect, a one-paragraph explanation of why the failure occurs, and confirmation that the fix targets the root cause, not a workaround.",
|
|
14
|
+
"enforcement": "mandatory"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"id": "BF-003",
|
|
18
|
+
"name": "missing-test-rule",
|
|
19
|
+
"description": "Every bugfix unit MUST produce at least one new test that reproduces the original defect (fails before the fix, passes after), is placed in the appropriate test file for the affected module, and is named to clearly identify the defect it guards against. This rule cannot be overridden via allowFailures. The engine blocks unit completion if tests_total === 0 for any bugfix unit.",
|
|
20
|
+
"enforcement": "mandatory"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"quality_gate_checklist": [
|
|
24
|
+
"Root cause identified and documented in test-report.md",
|
|
25
|
+
"Fix addresses the root cause (not just the symptom)",
|
|
26
|
+
"All existing tests still pass (zero regressions)",
|
|
27
|
+
"At least one new test reproduces the original defect",
|
|
28
|
+
"New test passes with the fix applied"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
"optimization": {
|
|
32
|
+
"rules": [
|
|
33
|
+
{
|
|
34
|
+
"id": "OPT-001",
|
|
35
|
+
"name": "baseline-measurement",
|
|
36
|
+
"description": "Before making any code changes, run the relevant benchmark or performance test, record the baseline metric (e.g., execution time, memory usage, throughput) in the '## Baseline' section of the unit's test-report.md, and note the test command used and any environment conditions that could affect the result. Do not proceed with changes until the baseline is captured.",
|
|
37
|
+
"enforcement": "mandatory"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"id": "OPT-002",
|
|
41
|
+
"name": "before-after-comparison",
|
|
42
|
+
"description": "After applying changes, run the same benchmark or performance test under the same conditions and record the result in the '## Performance Comparison' section of test-report.md, including: baseline metric, post-change metric, and delta (absolute and percentage). Confirm the improvement meets the acceptance criteria defined in the unit spec. If performance has not improved, investigate before marking the unit complete.",
|
|
43
|
+
"enforcement": "mandatory"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"id": "OPT-003",
|
|
47
|
+
"name": "rollback-plan",
|
|
48
|
+
"description": "Document in test-report.md how to revert the optimization if it causes a regression in production: which files were changed, the prior behavior that would need to be restored, and any feature flags or config knobs that could disable the optimization without a deploy.",
|
|
49
|
+
"enforcement": "mandatory"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"quality_gate_checklist": [
|
|
53
|
+
"Baseline metric recorded in test-report.md before changes",
|
|
54
|
+
"Post-change metric recorded with delta (absolute and percentage)",
|
|
55
|
+
"Improvement meets the acceptance criteria defined in the unit spec",
|
|
56
|
+
"Rollback plan documented in test-report.md",
|
|
57
|
+
"All existing tests still pass (zero regressions)"
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -1,100 +1,100 @@
|
|
|
1
|
-
# Pathway Behaviors
|
|
2
|
-
|
|
3
|
-
**Loading note**: The orchestrator loads this file at the start of each Construction unit and
|
|
4
|
-
injects the section matching `checkpoint.pathway_type` into the agent context. Only the
|
|
5
|
-
relevant section is injected — the agent sees its pathway section, not the full file.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Bugfix Pathway
|
|
10
|
-
|
|
11
|
-
These rules are non-negotiable. Every bugfix unit must satisfy all items in the quality gate
|
|
12
|
-
before the unit is marked complete.
|
|
13
|
-
|
|
14
|
-
### Autonomous Diagnosis
|
|
15
|
-
|
|
16
|
-
Before writing any code change, the agent must:
|
|
17
|
-
|
|
18
|
-
1. Reproduce the defect with a failing test or a documented reproduction recipe
|
|
19
|
-
2. Identify the root cause — the specific code path, assumption, or edge case that causes
|
|
20
|
-
the failure
|
|
21
|
-
3. Document the root cause in the `## Root Cause` section of the unit's `test-report.md`
|
|
22
|
-
|
|
23
|
-
Do not write a fix before completing the diagnosis. A fix that addresses only the symptom
|
|
24
|
-
will likely fail the quality gate.
|
|
25
|
-
|
|
26
|
-
### Root Cause Analysis Requirement
|
|
27
|
-
|
|
28
|
-
The `test-report.md` for a bugfix unit must contain a `## Root Cause` section with:
|
|
29
|
-
- File path and line number(s) of the defect
|
|
30
|
-
- A one-paragraph explanation of why the failure occurs
|
|
31
|
-
- Confirmation that the fix targets the root cause, not a workaround
|
|
32
|
-
|
|
33
|
-
### Missing Test Rule (Non-Negotiable)
|
|
34
|
-
|
|
35
|
-
Every bugfix unit MUST produce at least one new test that:
|
|
36
|
-
- Reproduces the original defect (fails before the fix, passes after)
|
|
37
|
-
- Is placed in the appropriate test file for the affected module
|
|
38
|
-
- Is named to clearly identify the defect it guards against
|
|
39
|
-
|
|
40
|
-
This rule cannot be overridden via `allowFailures`. The engine blocks unit completion if
|
|
41
|
-
`tests_total === 0` for any bugfix unit, regardless of options passed.
|
|
42
|
-
|
|
43
|
-
### Quality Gate Checklist
|
|
44
|
-
|
|
45
|
-
All items must be satisfied before the bugfix unit is marked complete:
|
|
46
|
-
|
|
47
|
-
- [ ] Root cause identified and documented in `test-report.md`
|
|
48
|
-
- [ ] Fix addresses the root cause (not just the symptom)
|
|
49
|
-
- [ ] All existing tests still pass (zero regressions)
|
|
50
|
-
- [ ] At least one new test reproduces the original defect
|
|
51
|
-
- [ ] New test passes with the fix applied
|
|
52
|
-
|
|
53
|
-
---
|
|
54
|
-
|
|
55
|
-
## Optimization Pathway
|
|
56
|
-
|
|
57
|
-
### Baseline Measurement
|
|
58
|
-
|
|
59
|
-
Before making any code changes:
|
|
60
|
-
|
|
61
|
-
1. Run the relevant benchmark or performance test
|
|
62
|
-
2. Record the baseline metric (e.g., execution time, memory usage, throughput) in the
|
|
63
|
-
`## Baseline` section of the unit's `test-report.md`
|
|
64
|
-
3. Note the test command used and any environment conditions that could affect the result
|
|
65
|
-
|
|
66
|
-
Do not proceed with changes until the baseline is captured. A comparison without a baseline
|
|
67
|
-
is not a valid optimization result.
|
|
68
|
-
|
|
69
|
-
### Performance Comparison
|
|
70
|
-
|
|
71
|
-
After applying changes:
|
|
72
|
-
|
|
73
|
-
1. Run the same benchmark or performance test under the same conditions
|
|
74
|
-
2. Record the result in the `## Performance Comparison` section of `test-report.md`:
|
|
75
|
-
- Baseline metric
|
|
76
|
-
- Post-change metric
|
|
77
|
-
- Delta (absolute and percentage)
|
|
78
|
-
3. Confirm the improvement meets the acceptance criteria defined in the unit spec
|
|
79
|
-
|
|
80
|
-
If performance has not improved, investigate before marking the unit complete.
|
|
81
|
-
|
|
82
|
-
### Rollback Plan
|
|
83
|
-
|
|
84
|
-
Document in `test-report.md` how to revert the optimization if it causes a regression in
|
|
85
|
-
production:
|
|
86
|
-
- Which files were changed
|
|
87
|
-
- The prior behavior that would need to be restored
|
|
88
|
-
- Any feature flags or config knobs that could disable the optimization without a deploy
|
|
89
|
-
|
|
90
|
-
---
|
|
91
|
-
|
|
92
|
-
## Standard / Enhancement / Greenfield Pathways
|
|
93
|
-
|
|
94
|
-
No additional behavioral constraints apply beyond the standard rules defined in:
|
|
95
|
-
|
|
96
|
-
- `resources/rules/construction/code-generation.md`
|
|
97
|
-
- `resources/rules/construction/test-generation.md`
|
|
98
|
-
|
|
99
|
-
Follow those rules as written. The orchestrator does not inject any additional context for
|
|
100
|
-
these pathways.
|
|
1
|
+
# Pathway Behaviors
|
|
2
|
+
|
|
3
|
+
**Loading note**: The orchestrator loads this file at the start of each Construction unit and
|
|
4
|
+
injects the section matching `checkpoint.pathway_type` into the agent context. Only the
|
|
5
|
+
relevant section is injected — the agent sees its pathway section, not the full file.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Bugfix Pathway
|
|
10
|
+
|
|
11
|
+
These rules are non-negotiable. Every bugfix unit must satisfy all items in the quality gate
|
|
12
|
+
before the unit is marked complete.
|
|
13
|
+
|
|
14
|
+
### Autonomous Diagnosis
|
|
15
|
+
|
|
16
|
+
Before writing any code change, the agent must:
|
|
17
|
+
|
|
18
|
+
1. Reproduce the defect with a failing test or a documented reproduction recipe
|
|
19
|
+
2. Identify the root cause — the specific code path, assumption, or edge case that causes
|
|
20
|
+
the failure
|
|
21
|
+
3. Document the root cause in the `## Root Cause` section of the unit's `test-report.md`
|
|
22
|
+
|
|
23
|
+
Do not write a fix before completing the diagnosis. A fix that addresses only the symptom
|
|
24
|
+
will likely fail the quality gate.
|
|
25
|
+
|
|
26
|
+
### Root Cause Analysis Requirement
|
|
27
|
+
|
|
28
|
+
The `test-report.md` for a bugfix unit must contain a `## Root Cause` section with:
|
|
29
|
+
- File path and line number(s) of the defect
|
|
30
|
+
- A one-paragraph explanation of why the failure occurs
|
|
31
|
+
- Confirmation that the fix targets the root cause, not a workaround
|
|
32
|
+
|
|
33
|
+
### Missing Test Rule (Non-Negotiable)
|
|
34
|
+
|
|
35
|
+
Every bugfix unit MUST produce at least one new test that:
|
|
36
|
+
- Reproduces the original defect (fails before the fix, passes after)
|
|
37
|
+
- Is placed in the appropriate test file for the affected module
|
|
38
|
+
- Is named to clearly identify the defect it guards against
|
|
39
|
+
|
|
40
|
+
This rule cannot be overridden via `allowFailures`. The engine blocks unit completion if
|
|
41
|
+
`tests_total === 0` for any bugfix unit, regardless of options passed.
|
|
42
|
+
|
|
43
|
+
### Quality Gate Checklist
|
|
44
|
+
|
|
45
|
+
All items must be satisfied before the bugfix unit is marked complete:
|
|
46
|
+
|
|
47
|
+
- [ ] Root cause identified and documented in `test-report.md`
|
|
48
|
+
- [ ] Fix addresses the root cause (not just the symptom)
|
|
49
|
+
- [ ] All existing tests still pass (zero regressions)
|
|
50
|
+
- [ ] At least one new test reproduces the original defect
|
|
51
|
+
- [ ] New test passes with the fix applied
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
## Optimization Pathway
|
|
56
|
+
|
|
57
|
+
### Baseline Measurement
|
|
58
|
+
|
|
59
|
+
Before making any code changes:
|
|
60
|
+
|
|
61
|
+
1. Run the relevant benchmark or performance test
|
|
62
|
+
2. Record the baseline metric (e.g., execution time, memory usage, throughput) in the
|
|
63
|
+
`## Baseline` section of the unit's `test-report.md`
|
|
64
|
+
3. Note the test command used and any environment conditions that could affect the result
|
|
65
|
+
|
|
66
|
+
Do not proceed with changes until the baseline is captured. A comparison without a baseline
|
|
67
|
+
is not a valid optimization result.
|
|
68
|
+
|
|
69
|
+
### Performance Comparison
|
|
70
|
+
|
|
71
|
+
After applying changes:
|
|
72
|
+
|
|
73
|
+
1. Run the same benchmark or performance test under the same conditions
|
|
74
|
+
2. Record the result in the `## Performance Comparison` section of `test-report.md`:
|
|
75
|
+
- Baseline metric
|
|
76
|
+
- Post-change metric
|
|
77
|
+
- Delta (absolute and percentage)
|
|
78
|
+
3. Confirm the improvement meets the acceptance criteria defined in the unit spec
|
|
79
|
+
|
|
80
|
+
If performance has not improved, investigate before marking the unit complete.
|
|
81
|
+
|
|
82
|
+
### Rollback Plan
|
|
83
|
+
|
|
84
|
+
Document in `test-report.md` how to revert the optimization if it causes a regression in
|
|
85
|
+
production:
|
|
86
|
+
- Which files were changed
|
|
87
|
+
- The prior behavior that would need to be restored
|
|
88
|
+
- Any feature flags or config knobs that could disable the optimization without a deploy
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Standard / Enhancement / Greenfield Pathways
|
|
93
|
+
|
|
94
|
+
No additional behavioral constraints apply beyond the standard rules defined in:
|
|
95
|
+
|
|
96
|
+
- `resources/rules/construction/code-generation.md`
|
|
97
|
+
- `resources/rules/construction/test-generation.md`
|
|
98
|
+
|
|
99
|
+
Follow those rules as written. The orchestrator does not inject any additional context for
|
|
100
|
+
these pathways.
|
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
# AI-DLC Adaptive Workflow Overview
|
|
2
|
-
|
|
3
|
-
**Purpose**: Technical reference for AI model and developers to understand complete workflow structure.
|
|
4
|
-
|
|
5
|
-
**Note**: Similar content exists in core-workflow.md (user welcome message) and README.md (documentation). This duplication is INTENTIONAL - each file serves a different purpose:
|
|
6
|
-
- **This file**: Detailed technical reference with Mermaid diagram for AI model context loading
|
|
7
|
-
- **core-workflow.md**: User-facing welcome message with ASCII diagram
|
|
8
|
-
- **README.md**: Human-readable documentation for repository
|
|
9
|
-
|
|
10
|
-
## The Three-Phase Lifecycle:
|
|
11
|
-
• **INCEPTION PHASE**: Planning and architecture (Workspace Detection + conditional phases + Workflow Planning)
|
|
12
|
-
• **CONSTRUCTION PHASE**: Design, implementation, build and test (per-unit design + Code Generation (two-part: plan then generate) + Build & Test)
|
|
13
|
-
• **OPERATIONS PHASE**: Placeholder for future deployment and monitoring workflows
|
|
14
|
-
|
|
15
|
-
## The Adaptive Workflow:
|
|
16
|
-
• **Workspace Detection** (always) → **Reverse Engineering** (brownfield only) → **Requirements Analysis** (always, adaptive depth) → **Conditional Phases** (as needed) → **Workflow Planning** (always) → **Code Generation** (always, per-unit) → **Build and Test** (always) → **Documentation** (always)
|
|
17
|
-
|
|
18
|
-
## How It Works:
|
|
19
|
-
• **AI analyzes** your request, workspace, and complexity to determine which stages are needed
|
|
20
|
-
• **These stages always execute**: Workspace Detection, Requirements Analysis (adaptive depth), Workflow Planning, Code Generation (per-unit), Build and Test, Documentation
|
|
21
|
-
• **All other stages are conditional**: Reverse Engineering, User Stories, Units Generation, per-unit design stages (Functional Design, NFR Requirements, NFR Design, Infrastructure Design)
|
|
22
|
-
• **No fixed sequences**: Stages execute in the order that makes sense for your specific task
|
|
23
|
-
|
|
24
|
-
## Your Team's Role:
|
|
25
|
-
• **Answer questions** in dedicated question files using [Answer]: tags with letter choices (A, B, C, D, E)
|
|
26
|
-
• **Option E available**: Choose "Other" and describe your custom response if provided options don't match
|
|
27
|
-
• **Work as a team** to review and approve each phase before proceeding
|
|
28
|
-
• **Collectively decide** on architectural approach when needed
|
|
29
|
-
• **Important**: This is a team effort - involve relevant stakeholders for each phase
|
|
30
|
-
|
|
31
|
-
## AI-DLC Three-Phase Workflow:
|
|
32
|
-
|
|
33
|
-
```mermaid
|
|
34
|
-
flowchart TD
|
|
35
|
-
Start(["User Request"])
|
|
36
|
-
|
|
37
|
-
subgraph INCEPTION["🔵 INCEPTION PHASE"]
|
|
38
|
-
WD["Workspace Detection<br/><b>ALWAYS</b>"]
|
|
39
|
-
RE["Reverse Engineering<br/><b>CONDITIONAL</b>"]
|
|
40
|
-
RA["Requirements Analysis<br/><b>ALWAYS</b>"]
|
|
41
|
-
Stories["User Stories<br/><b>CONDITIONAL</b>"]
|
|
42
|
-
WP["Workflow Planning<br/><b>ALWAYS</b>"]
|
|
43
|
-
UnitsG["Units Generation<br/><b>CONDITIONAL</b>"]
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"]
|
|
47
|
-
FD["Functional Design<br/><b>CONDITIONAL</b>"]
|
|
48
|
-
NFRA["NFR Requirements<br/><b>CONDITIONAL</b>"]
|
|
49
|
-
NFRD["NFR Design<br/><b>CONDITIONAL</b>"]
|
|
50
|
-
ID["Infrastructure Design<br/><b>CONDITIONAL</b>"]
|
|
51
|
-
CG["Code Generation<br/><b>ALWAYS</b>"]
|
|
52
|
-
BT["Build and Test<br/><b>ALWAYS</b>"]
|
|
53
|
-
DOC["Documentation<br/><b>ALWAYS</b>"]
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
subgraph OPERATIONS["🟡 OPERATIONS PHASE"]
|
|
57
|
-
OPS["Operations<br/><b>PLACEHOLDER</b>"]
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
Start --> WD
|
|
61
|
-
WD -.-> RE
|
|
62
|
-
WD --> RA
|
|
63
|
-
RE --> RA
|
|
64
|
-
|
|
65
|
-
RA -.-> Stories
|
|
66
|
-
RA --> WP
|
|
67
|
-
Stories --> WP
|
|
68
|
-
|
|
69
|
-
WP -.-> UnitsG
|
|
70
|
-
UnitsG --> FD
|
|
71
|
-
FD -.-> NFRA
|
|
72
|
-
NFRA -.-> NFRD
|
|
73
|
-
NFRD -.-> ID
|
|
74
|
-
|
|
75
|
-
WP --> CG
|
|
76
|
-
FD --> CG
|
|
77
|
-
NFRA --> CG
|
|
78
|
-
NFRD --> CG
|
|
79
|
-
ID --> CG
|
|
80
|
-
CG -.->|Next Unit| FD
|
|
81
|
-
CG --> BT
|
|
82
|
-
BT --> DOC
|
|
83
|
-
DOC -.-> OPS
|
|
84
|
-
DOC --> End(["Complete"])
|
|
85
|
-
|
|
86
|
-
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
87
|
-
style RA fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
88
|
-
style WP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
89
|
-
|
|
90
|
-
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
91
|
-
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
92
|
-
style DOC fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
93
|
-
style OPS fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
|
94
|
-
style RE fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
95
|
-
style Stories fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
96
|
-
|
|
97
|
-
style UnitsG fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
98
|
-
style FD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
99
|
-
style NFRA fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
100
|
-
style NFRD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
101
|
-
style ID fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
102
|
-
style INCEPTION fill:#BBDEFB,stroke:#1565C0,stroke-width:3px, color:#000
|
|
103
|
-
style CONSTRUCTION fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px, color:#000
|
|
104
|
-
style OPERATIONS fill:#FFF59D,stroke:#F57F17,stroke-width:3px, color:#000
|
|
105
|
-
style Start fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
|
106
|
-
style End fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
|
107
|
-
|
|
108
|
-
linkStyle default stroke:#333,stroke-width:2px
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Stage Descriptions:**
|
|
112
|
-
|
|
113
|
-
**🔵 INCEPTION PHASE** - Planning and Architecture
|
|
114
|
-
- Workspace Detection: Analyze workspace state and project type (ALWAYS)
|
|
115
|
-
- Reverse Engineering: Analyze existing codebase (CONDITIONAL - Brownfield only)
|
|
116
|
-
- Requirements Analysis: Gather and validate requirements (ALWAYS - Adaptive depth)
|
|
117
|
-
- User Stories: Create user stories and personas (CONDITIONAL)
|
|
118
|
-
- Workflow Planning: Create execution plan (ALWAYS)
|
|
119
|
-
- Units Generation: Decompose into units of work (CONDITIONAL)
|
|
120
|
-
|
|
121
|
-
**🟢 CONSTRUCTION PHASE** - Design, Implementation, Build and Test
|
|
122
|
-
- Functional Design: Detailed business logic design per unit (CONDITIONAL, per-unit)
|
|
123
|
-
- NFR Requirements: Determine NFRs and select tech stack (CONDITIONAL, per-unit)
|
|
124
|
-
- NFR Design: Incorporate NFR patterns and logical components (CONDITIONAL, per-unit)
|
|
125
|
-
- Infrastructure Design: Map to actual infrastructure services (CONDITIONAL, per-unit)
|
|
126
|
-
- Code Generation: Generate code with Part 1 - Planning, Part 2 - Generation (ALWAYS, per-unit)
|
|
127
|
-
- Build and Test: Build all units and execute comprehensive testing (ALWAYS)
|
|
128
|
-
- Documentation: Generate documentation drafts from workflow artifacts (ALWAYS)
|
|
129
|
-
|
|
130
|
-
**🟡 OPERATIONS PHASE** - Placeholder
|
|
131
|
-
- Operations: Placeholder for future deployment and monitoring workflows (PLACEHOLDER)
|
|
132
|
-
|
|
133
|
-
**Key Principles:**
|
|
134
|
-
- Phases execute only when they add value
|
|
135
|
-
- Each phase independently evaluated
|
|
136
|
-
- INCEPTION focuses on "what" and "why"
|
|
137
|
-
- CONSTRUCTION focuses on "how" plus "build and test"
|
|
138
|
-
- OPERATIONS is placeholder for future expansion
|
|
139
|
-
- Simple changes may skip conditional INCEPTION stages
|
|
140
|
-
- Complex changes get full INCEPTION and CONSTRUCTION treatment
|
|
141
|
-
|
|
142
|
-
## Approval Gate Safety Rule
|
|
143
|
-
|
|
144
|
-
**CRITICAL**: NEVER present an approval gate while background agents are still running.
|
|
145
|
-
|
|
146
|
-
All background agents and parallel tasks MUST complete — and their results MUST be fully incorporated — BEFORE presenting any approval prompt to the user.
|
|
147
|
-
|
|
148
|
-
**Why**: When a background agent completes, it triggers a new processing turn for the orchestrator. If an approval gate has already been presented, the orchestrator will resume processing from the agent completion notification instead of waiting for the user's response. This bypasses the approval gate entirely.
|
|
149
|
-
|
|
150
|
-
**Rule**: Before displaying any "You may: Request Changes / Continue" prompt:
|
|
151
|
-
1. Confirm zero pending background agents or tasks
|
|
152
|
-
2. Incorporate all returned results into the current artifact
|
|
153
|
-
3. Only then present the approval prompt
|
|
154
|
-
|
|
155
|
-
If exploration or file reading is needed during planning, either:
|
|
156
|
-
- Run it in the **foreground** (blocking) so it completes before the approval gate, OR
|
|
157
|
-
- Run it in the background but **wait for completion** before presenting the approval prompt — do NOT present the prompt while agents are still running
|
|
1
|
+
# AI-DLC Adaptive Workflow Overview
|
|
2
|
+
|
|
3
|
+
**Purpose**: Technical reference for AI model and developers to understand complete workflow structure.
|
|
4
|
+
|
|
5
|
+
**Note**: Similar content exists in core-workflow.md (user welcome message) and README.md (documentation). This duplication is INTENTIONAL - each file serves a different purpose:
|
|
6
|
+
- **This file**: Detailed technical reference with Mermaid diagram for AI model context loading
|
|
7
|
+
- **core-workflow.md**: User-facing welcome message with ASCII diagram
|
|
8
|
+
- **README.md**: Human-readable documentation for repository
|
|
9
|
+
|
|
10
|
+
## The Three-Phase Lifecycle:
|
|
11
|
+
• **INCEPTION PHASE**: Planning and architecture (Workspace Detection + conditional phases + Workflow Planning)
|
|
12
|
+
• **CONSTRUCTION PHASE**: Design, implementation, build and test (per-unit design + Code Generation (two-part: plan then generate) + Build & Test)
|
|
13
|
+
• **OPERATIONS PHASE**: Placeholder for future deployment and monitoring workflows
|
|
14
|
+
|
|
15
|
+
## The Adaptive Workflow:
|
|
16
|
+
• **Workspace Detection** (always) → **Reverse Engineering** (brownfield only) → **Requirements Analysis** (always, adaptive depth) → **Conditional Phases** (as needed) → **Workflow Planning** (always) → **Code Generation** (always, per-unit) → **Build and Test** (always) → **Documentation** (always)
|
|
17
|
+
|
|
18
|
+
## How It Works:
|
|
19
|
+
• **AI analyzes** your request, workspace, and complexity to determine which stages are needed
|
|
20
|
+
• **These stages always execute**: Workspace Detection, Requirements Analysis (adaptive depth), Workflow Planning, Code Generation (per-unit), Build and Test, Documentation
|
|
21
|
+
• **All other stages are conditional**: Reverse Engineering, User Stories, Units Generation, per-unit design stages (Functional Design, NFR Requirements, NFR Design, Infrastructure Design)
|
|
22
|
+
• **No fixed sequences**: Stages execute in the order that makes sense for your specific task
|
|
23
|
+
|
|
24
|
+
## Your Team's Role:
|
|
25
|
+
• **Answer questions** in dedicated question files using [Answer]: tags with letter choices (A, B, C, D, E)
|
|
26
|
+
• **Option E available**: Choose "Other" and describe your custom response if provided options don't match
|
|
27
|
+
• **Work as a team** to review and approve each phase before proceeding
|
|
28
|
+
• **Collectively decide** on architectural approach when needed
|
|
29
|
+
• **Important**: This is a team effort - involve relevant stakeholders for each phase
|
|
30
|
+
|
|
31
|
+
## AI-DLC Three-Phase Workflow:
|
|
32
|
+
|
|
33
|
+
```mermaid
|
|
34
|
+
flowchart TD
|
|
35
|
+
Start(["User Request"])
|
|
36
|
+
|
|
37
|
+
subgraph INCEPTION["🔵 INCEPTION PHASE"]
|
|
38
|
+
WD["Workspace Detection<br/><b>ALWAYS</b>"]
|
|
39
|
+
RE["Reverse Engineering<br/><b>CONDITIONAL</b>"]
|
|
40
|
+
RA["Requirements Analysis<br/><b>ALWAYS</b>"]
|
|
41
|
+
Stories["User Stories<br/><b>CONDITIONAL</b>"]
|
|
42
|
+
WP["Workflow Planning<br/><b>ALWAYS</b>"]
|
|
43
|
+
UnitsG["Units Generation<br/><b>CONDITIONAL</b>"]
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
subgraph CONSTRUCTION["🟢 CONSTRUCTION PHASE"]
|
|
47
|
+
FD["Functional Design<br/><b>CONDITIONAL</b>"]
|
|
48
|
+
NFRA["NFR Requirements<br/><b>CONDITIONAL</b>"]
|
|
49
|
+
NFRD["NFR Design<br/><b>CONDITIONAL</b>"]
|
|
50
|
+
ID["Infrastructure Design<br/><b>CONDITIONAL</b>"]
|
|
51
|
+
CG["Code Generation<br/><b>ALWAYS</b>"]
|
|
52
|
+
BT["Build and Test<br/><b>ALWAYS</b>"]
|
|
53
|
+
DOC["Documentation<br/><b>ALWAYS</b>"]
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
subgraph OPERATIONS["🟡 OPERATIONS PHASE"]
|
|
57
|
+
OPS["Operations<br/><b>PLACEHOLDER</b>"]
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
Start --> WD
|
|
61
|
+
WD -.-> RE
|
|
62
|
+
WD --> RA
|
|
63
|
+
RE --> RA
|
|
64
|
+
|
|
65
|
+
RA -.-> Stories
|
|
66
|
+
RA --> WP
|
|
67
|
+
Stories --> WP
|
|
68
|
+
|
|
69
|
+
WP -.-> UnitsG
|
|
70
|
+
UnitsG --> FD
|
|
71
|
+
FD -.-> NFRA
|
|
72
|
+
NFRA -.-> NFRD
|
|
73
|
+
NFRD -.-> ID
|
|
74
|
+
|
|
75
|
+
WP --> CG
|
|
76
|
+
FD --> CG
|
|
77
|
+
NFRA --> CG
|
|
78
|
+
NFRD --> CG
|
|
79
|
+
ID --> CG
|
|
80
|
+
CG -.->|Next Unit| FD
|
|
81
|
+
CG --> BT
|
|
82
|
+
BT --> DOC
|
|
83
|
+
DOC -.-> OPS
|
|
84
|
+
DOC --> End(["Complete"])
|
|
85
|
+
|
|
86
|
+
style WD fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
87
|
+
style RA fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
88
|
+
style WP fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
89
|
+
|
|
90
|
+
style CG fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
91
|
+
style BT fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
92
|
+
style DOC fill:#4CAF50,stroke:#1B5E20,stroke-width:3px,color:#fff
|
|
93
|
+
style OPS fill:#BDBDBD,stroke:#424242,stroke-width:2px,stroke-dasharray: 5 5,color:#000
|
|
94
|
+
style RE fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
95
|
+
style Stories fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
96
|
+
|
|
97
|
+
style UnitsG fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
98
|
+
style FD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
99
|
+
style NFRA fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
100
|
+
style NFRD fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
101
|
+
style ID fill:#FFA726,stroke:#E65100,stroke-width:3px,stroke-dasharray: 5 5,color:#000
|
|
102
|
+
style INCEPTION fill:#BBDEFB,stroke:#1565C0,stroke-width:3px, color:#000
|
|
103
|
+
style CONSTRUCTION fill:#C8E6C9,stroke:#2E7D32,stroke-width:3px, color:#000
|
|
104
|
+
style OPERATIONS fill:#FFF59D,stroke:#F57F17,stroke-width:3px, color:#000
|
|
105
|
+
style Start fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
|
106
|
+
style End fill:#CE93D8,stroke:#6A1B9A,stroke-width:3px,color:#000
|
|
107
|
+
|
|
108
|
+
linkStyle default stroke:#333,stroke-width:2px
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
**Stage Descriptions:**
|
|
112
|
+
|
|
113
|
+
**🔵 INCEPTION PHASE** - Planning and Architecture
|
|
114
|
+
- Workspace Detection: Analyze workspace state and project type (ALWAYS)
|
|
115
|
+
- Reverse Engineering: Analyze existing codebase (CONDITIONAL - Brownfield only)
|
|
116
|
+
- Requirements Analysis: Gather and validate requirements (ALWAYS - Adaptive depth)
|
|
117
|
+
- User Stories: Create user stories and personas (CONDITIONAL)
|
|
118
|
+
- Workflow Planning: Create execution plan (ALWAYS)
|
|
119
|
+
- Units Generation: Decompose into units of work (CONDITIONAL)
|
|
120
|
+
|
|
121
|
+
**🟢 CONSTRUCTION PHASE** - Design, Implementation, Build and Test
|
|
122
|
+
- Functional Design: Detailed business logic design per unit (CONDITIONAL, per-unit)
|
|
123
|
+
- NFR Requirements: Determine NFRs and select tech stack (CONDITIONAL, per-unit)
|
|
124
|
+
- NFR Design: Incorporate NFR patterns and logical components (CONDITIONAL, per-unit)
|
|
125
|
+
- Infrastructure Design: Map to actual infrastructure services (CONDITIONAL, per-unit)
|
|
126
|
+
- Code Generation: Generate code with Part 1 - Planning, Part 2 - Generation (ALWAYS, per-unit)
|
|
127
|
+
- Build and Test: Build all units and execute comprehensive testing (ALWAYS)
|
|
128
|
+
- Documentation: Generate documentation drafts from workflow artifacts (ALWAYS)
|
|
129
|
+
|
|
130
|
+
**🟡 OPERATIONS PHASE** - Placeholder
|
|
131
|
+
- Operations: Placeholder for future deployment and monitoring workflows (PLACEHOLDER)
|
|
132
|
+
|
|
133
|
+
**Key Principles:**
|
|
134
|
+
- Phases execute only when they add value
|
|
135
|
+
- Each phase independently evaluated
|
|
136
|
+
- INCEPTION focuses on "what" and "why"
|
|
137
|
+
- CONSTRUCTION focuses on "how" plus "build and test"
|
|
138
|
+
- OPERATIONS is placeholder for future expansion
|
|
139
|
+
- Simple changes may skip conditional INCEPTION stages
|
|
140
|
+
- Complex changes get full INCEPTION and CONSTRUCTION treatment
|
|
141
|
+
|
|
142
|
+
## Approval Gate Safety Rule
|
|
143
|
+
|
|
144
|
+
**CRITICAL**: NEVER present an approval gate while background agents are still running.
|
|
145
|
+
|
|
146
|
+
All background agents and parallel tasks MUST complete — and their results MUST be fully incorporated — BEFORE presenting any approval prompt to the user.
|
|
147
|
+
|
|
148
|
+
**Why**: When a background agent completes, it triggers a new processing turn for the orchestrator. If an approval gate has already been presented, the orchestrator will resume processing from the agent completion notification instead of waiting for the user's response. This bypasses the approval gate entirely.
|
|
149
|
+
|
|
150
|
+
**Rule**: Before displaying any "You may: Request Changes / Continue" prompt:
|
|
151
|
+
1. Confirm zero pending background agents or tasks
|
|
152
|
+
2. Incorporate all returned results into the current artifact
|
|
153
|
+
3. Only then present the approval prompt
|
|
154
|
+
|
|
155
|
+
If exploration or file reading is needed during planning, either:
|
|
156
|
+
- Run it in the **foreground** (blocking) so it completes before the approval gate, OR
|
|
157
|
+
- Run it in the background but **wait for completion** before presenting the approval prompt — do NOT present the prompt while agents are still running
|