olympus-ai 4.4.13 → 4.4.15
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/features/workflow-engine/checkpoint.d.ts.map +1 -1
- package/dist/features/workflow-engine/checkpoint.js +33 -6
- package/dist/features/workflow-engine/checkpoint.js.map +1 -1
- package/dist/features/workflow-engine/construction/executor.d.ts +38 -3
- package/dist/features/workflow-engine/construction/executor.d.ts.map +1 -1
- package/dist/features/workflow-engine/construction/executor.js +245 -3
- package/dist/features/workflow-engine/construction/executor.js.map +1 -1
- package/dist/features/workflow-engine/construction/regression-baseline.d.ts +76 -0
- package/dist/features/workflow-engine/construction/regression-baseline.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/regression-baseline.js +274 -0
- package/dist/features/workflow-engine/construction/regression-baseline.js.map +1 -0
- package/dist/features/workflow-engine/construction/regression-categorizer.d.ts +44 -0
- package/dist/features/workflow-engine/construction/regression-categorizer.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/regression-categorizer.js +54 -0
- package/dist/features/workflow-engine/construction/regression-categorizer.js.map +1 -0
- package/dist/features/workflow-engine/construction/validators/index.d.ts +6 -0
- package/dist/features/workflow-engine/construction/validators/index.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/validators/index.js +4 -0
- package/dist/features/workflow-engine/construction/validators/index.js.map +1 -0
- package/dist/features/workflow-engine/construction/validators/pipeline.d.ts +10 -0
- package/dist/features/workflow-engine/construction/validators/pipeline.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/validators/pipeline.js +84 -0
- package/dist/features/workflow-engine/construction/validators/pipeline.js.map +1 -0
- package/dist/features/workflow-engine/construction/validators/quality-patterns.d.ts +18 -0
- package/dist/features/workflow-engine/construction/validators/quality-patterns.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/validators/quality-patterns.js +245 -0
- package/dist/features/workflow-engine/construction/validators/quality-patterns.js.map +1 -0
- package/dist/features/workflow-engine/construction/validators/quality-validator.d.ts +3 -0
- package/dist/features/workflow-engine/construction/validators/quality-validator.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/validators/quality-validator.js +132 -0
- package/dist/features/workflow-engine/construction/validators/quality-validator.js.map +1 -0
- package/dist/features/workflow-engine/construction/validators/types.d.ts +26 -0
- package/dist/features/workflow-engine/construction/validators/types.d.ts.map +1 -0
- package/dist/features/workflow-engine/construction/validators/types.js +2 -0
- package/dist/features/workflow-engine/construction/validators/types.js.map +1 -0
- package/dist/features/workflow-engine/index.d.ts +3 -1
- package/dist/features/workflow-engine/index.d.ts.map +1 -1
- package/dist/features/workflow-engine/index.js +1 -0
- package/dist/features/workflow-engine/index.js.map +1 -1
- package/dist/features/workflow-engine/phase-types.d.ts +73 -1
- package/dist/features/workflow-engine/phase-types.d.ts.map +1 -1
- package/dist/hooks/olympus-hooks.cjs +334 -280
- package/dist/hooks/registry.d.ts +18 -0
- package/dist/hooks/registry.d.ts.map +1 -1
- package/dist/hooks/registry.js +18 -0
- package/dist/hooks/registry.js.map +1 -1
- package/dist/installer/index.d.ts +1 -1
- package/dist/installer/index.js +1 -1
- package/package.json +1 -1
- package/resources/agents/frontend-engineer-high.md +12 -0
- package/resources/agents/olympian-high.md +77 -1
- package/resources/agents/olympian.md +31 -7
- package/resources/claude-md.md +44 -0
- package/resources/config/risk-keywords.json +5 -0
- package/resources/rules/common/pathway-behaviors.md +100 -0
- package/resources/rules/common/terminal-formatting.md +161 -0
- package/resources/rules/construction/build-and-test.md +58 -0
- package/resources/rules/construction/code-generation.md +26 -5
- package/resources/rules/construction/test-generation.md +82 -0
- package/resources/skills/continue/SKILL.md +4 -0
|
@@ -30,7 +30,14 @@ This stage generates code for each unit of work through two integrated parts:
|
|
|
30
30
|
|
|
31
31
|
**If an agent task fails**: Follow the Agent Task Failure Recovery procedure in `error-handling.md` — retry the delegation, never silently do the work yourself.
|
|
32
32
|
|
|
33
|
-
**After agent completes**: The orchestrator
|
|
33
|
+
**After agent completes**: The orchestrator MUST verify completion before proceeding:
|
|
34
|
+
1. Read the plan file and count `[x]` vs `[ ]` checkboxes
|
|
35
|
+
2. If ALL checkboxes are `[x]` AND code-summary.md exists → proceed to Step 14 (completion message)
|
|
36
|
+
3. If ANY checkboxes remain `[ ]` OR code-summary.md is missing → **re-delegate** from the first unchecked step:
|
|
37
|
+
- Log the partial completion in audit.md ("Agent completed steps 1-{M} of {N}, re-delegating steps {M+1}-{N}")
|
|
38
|
+
- Send a new Task to the same agent type with the prompt: "Continue Part 2 from step {M+1}. Steps 1-{M} are already complete. Complete the remaining steps {M+1} through {N}." followed by the standard delegation prompt
|
|
39
|
+
- Repeat until all checkboxes are marked
|
|
40
|
+
4. The orchestrator manages the approval gate (Steps 15-16)
|
|
34
41
|
|
|
35
42
|
### Mandatory Delegation Prompt Requirements
|
|
36
43
|
|
|
@@ -38,15 +45,22 @@ When delegating Part 2 to an agent, the Task tool prompt MUST include all of the
|
|
|
38
45
|
|
|
39
46
|
```
|
|
40
47
|
You are executing Part 2 (Code Generation) for the AIDLC unit "{unit-name}".
|
|
48
|
+
This plan has {N} steps. Your task is NOT complete until ALL {N} steps are marked [x].
|
|
41
49
|
|
|
42
50
|
1. Read the complete code generation plan at:
|
|
43
51
|
aidlc-docs/{workflow-id}/construction/plans/{unit-name}-code-generation-plan.md
|
|
44
52
|
|
|
45
|
-
2.
|
|
53
|
+
2. Count the total number of steps with checkboxes [ ]. This is your completion target.
|
|
46
54
|
|
|
47
|
-
3.
|
|
55
|
+
3. Execute each step in the plan exactly, in order. Do NOT skip steps or deviate.
|
|
48
56
|
|
|
49
|
-
4. After
|
|
57
|
+
4. After completing each step, immediately mark its checkbox [x] in the plan file.
|
|
58
|
+
|
|
59
|
+
5. After marking a checkbox, check: are there more [ ] checkboxes remaining in the plan?
|
|
60
|
+
- YES → Continue to the next step immediately. DO NOT STOP OR RETURN.
|
|
61
|
+
- NO → All steps done. Proceed to step 6.
|
|
62
|
+
|
|
63
|
+
6. After ALL steps are marked [x], create a code summary at:
|
|
50
64
|
aidlc-docs/{workflow-id}/construction/{unit-name}/code/code-summary.md
|
|
51
65
|
|
|
52
66
|
The summary must include:
|
|
@@ -56,9 +70,13 @@ You are executing Part 2 (Code Generation) for the AIDLC unit "{unit-name}".
|
|
|
56
70
|
- User stories implemented (reference story IDs)
|
|
57
71
|
- Known gaps or deferred items
|
|
58
72
|
|
|
59
|
-
Do
|
|
73
|
+
⚠️ CRITICAL: Do NOT return after completing only some steps. Completing 2-3 steps out of {N} and stopping is a FAILURE. You must finish the ENTIRE plan — all {N} steps — before returning.
|
|
74
|
+
|
|
75
|
+
Do not report completion until EVERY plan checkbox is [x] and the code summary file exists.
|
|
60
76
|
```
|
|
61
77
|
|
|
78
|
+
**Note**: Replace `{N}` with the actual step count from the plan before delegating. The orchestrator must count the steps and include the concrete number.
|
|
79
|
+
|
|
62
80
|
## Orchestrator Execution Requirements
|
|
63
81
|
|
|
64
82
|
When managing code generation, the orchestrator MUST leverage Olympus capabilities:
|
|
@@ -341,5 +359,8 @@ When generating UI code (web, mobile, desktop), ensure elements are automation-f
|
|
|
341
359
|
- All steps in unit code generation plan marked [x]
|
|
342
360
|
- All unit stories implemented according to plan
|
|
343
361
|
- All code and tests generated (tests will be executed in Build & Test phase)
|
|
362
|
+
- After code generation completes for a unit, proceed to the **Test Generation** stage
|
|
363
|
+
(see `resources/rules/construction/test-generation.md`) before moving to the next unit
|
|
364
|
+
or Build & Test.
|
|
344
365
|
- Deployment artifacts generated
|
|
345
366
|
- Complete unit ready for build and verification
|
|
@@ -0,0 +1,82 @@
|
|
|
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
|
+
## Code Modification Scope
|
|
67
|
+
|
|
68
|
+
- The agent may ONLY modify files listed in `code-summary.md` for this unit
|
|
69
|
+
- `code-summary.md` is at: `aidlc-docs/{workflowId}/construction/{unitId}/code/code-summary.md`
|
|
70
|
+
- If `code-summary.md` does not exist, halt and report to orchestrator before proceeding
|
|
71
|
+
|
|
72
|
+
## Output Artifact
|
|
73
|
+
|
|
74
|
+
- Path: `aidlc-docs/{workflowId}/construction/{unitId}/testing/test-report.md`
|
|
75
|
+
- Must exist before the unit is marked complete
|
|
76
|
+
|
|
77
|
+
## Completion Criteria
|
|
78
|
+
|
|
79
|
+
- `test-report.md` written with actual counts (not placeholders)
|
|
80
|
+
- `tests_total > 0`
|
|
81
|
+
- `tests_failed === 0` (or override documented)
|
|
82
|
+
- `ConstructionUnitProgress.stages['test-generation'].status === 'completed'`
|
|
@@ -138,6 +138,8 @@ If `current_phase === 'construction'`:
|
|
|
138
138
|
- Check `construction_units` for the active unit
|
|
139
139
|
- Determine which design stage is `in_progress` or `not_started`
|
|
140
140
|
- Resume from that point
|
|
141
|
+
- If a `construction_units` entry has `stages['test-generation'].status === 'in_progress'` or `test_generation_status === 'in_progress'`, resume at test-generation for that unit
|
|
142
|
+
- Note: test-generation runs after code-generation for each unit; check `test_generation_status` in the unit progress
|
|
141
143
|
|
|
142
144
|
### 4d. Other Phases
|
|
143
145
|
|
|
@@ -163,6 +165,7 @@ Based on the resume point determined in Step 4, read the corresponding rule file
|
|
|
163
165
|
| nfr-design | `~/.claude/olympus/rules/construction/nfr-design.md` |
|
|
164
166
|
| infrastructure-design | `~/.claude/olympus/rules/construction/infrastructure-design.md` |
|
|
165
167
|
| code-generation | `~/.claude/olympus/rules/construction/code-generation.md` |
|
|
168
|
+
| test-generation | `~/.claude/olympus/rules/construction/test-generation.md` |
|
|
166
169
|
|
|
167
170
|
---
|
|
168
171
|
|
|
@@ -217,6 +220,7 @@ Wait for user response before proceeding.
|
|
|
217
220
|
| infrastructure-design | `oracle-medium` |
|
|
218
221
|
| code-generation (backend) | `olympian` or `olympian-high` |
|
|
219
222
|
| code-generation (frontend) | `frontend-engineer` or `frontend-engineer-high` |
|
|
223
|
+
| test-generation | `qa-tester` |
|
|
220
224
|
| build-and-test | `qa-tester` |
|
|
221
225
|
|
|
222
226
|
### If user chose B (Review)
|