okstra 0.122.0 → 0.124.0
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/README.md +5 -2
- package/docs/architecture/storage-model.md +15 -1
- package/docs/architecture.md +45 -7
- package/docs/cli.md +47 -5
- package/docs/for-ai/README.md +42 -36
- package/docs/for-ai/skills/okstra-brief-gen.md +105 -105
- package/docs/for-ai/skills/okstra-container-build.md +61 -61
- package/docs/for-ai/skills/okstra-graphify.md +64 -0
- package/docs/for-ai/skills/okstra-inspect.md +86 -86
- package/docs/for-ai/skills/okstra-manager.md +32 -32
- package/docs/for-ai/skills/okstra-memory.md +49 -50
- package/docs/for-ai/skills/okstra-pr-gen.md +48 -0
- package/docs/for-ai/skills/okstra-rollup.md +58 -58
- package/docs/for-ai/skills/okstra-run.md +95 -95
- package/docs/for-ai/skills/okstra-schedule-gen.md +320 -0
- package/docs/for-ai/skills/okstra-setup.md +63 -64
- package/docs/for-ai/skills/okstra-user-response.md +48 -0
- package/docs/performance-improvement-plan-v2.md +4 -4
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +92 -70
- package/docs/task-process/README.md +33 -33
- package/docs/task-process/common-flow.md +26 -26
- package/docs/task-process/error-analysis.md +20 -21
- package/docs/task-process/final-verification.md +41 -41
- package/docs/task-process/implementation-planning.md +52 -28
- package/docs/task-process/implementation.md +51 -32
- package/docs/task-process/release-handoff.md +46 -46
- package/docs/task-process/requirements-discovery.md +22 -23
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/antigravity-worker.md +4 -4
- package/runtime/agents/workers/claude-worker.md +2 -2
- package/runtime/agents/workers/codex-worker.md +4 -4
- package/runtime/agents/workers/report-writer-worker.md +4 -4
- package/runtime/bin/lib/okstra/usage.sh +3 -3
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +6 -3
- package/runtime/prompts/lead/convergence.md +11 -21
- package/runtime/prompts/lead/okstra-lead-contract.md +16 -18
- package/runtime/prompts/lead/plan-body-verification.md +47 -18
- package/runtime/prompts/lead/report-writer.md +50 -45
- package/runtime/prompts/lead/team-contract.md +11 -122
- package/runtime/prompts/profiles/_common-contract.md +15 -22
- package/runtime/prompts/profiles/_implementation-deliverable.md +4 -2
- package/runtime/prompts/profiles/_implementation-executor.md +6 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +3 -1
- package/runtime/prompts/profiles/implementation-planning.md +24 -14
- package/runtime/prompts/profiles/implementation.md +1 -1
- package/runtime/prompts/profiles/improvement-discovery.md +1 -1
- package/runtime/prompts/profiles/release-handoff.md +3 -3
- package/runtime/prompts/profiles/requirements-discovery.md +18 -18
- package/runtime/prompts/wizard/prompts.ko.json +44 -0
- package/runtime/python/okstra_ctl/codex_dispatch.py +23 -1
- package/runtime/python/okstra_ctl/design_prep.py +1462 -0
- package/runtime/python/okstra_ctl/design_surfaces.py +243 -0
- package/runtime/python/okstra_ctl/final_report_schema.py +33 -1
- package/runtime/python/okstra_ctl/implementation_stage.py +35 -0
- package/runtime/python/okstra_ctl/incremental_carry.py +294 -21
- package/runtime/python/okstra_ctl/incremental_scope.py +51 -5
- package/runtime/python/okstra_ctl/material.py +1 -1
- package/runtime/python/okstra_ctl/model_discovery.py +98 -0
- package/runtime/python/okstra_ctl/models.py +8 -3
- package/runtime/python/okstra_ctl/render.py +5 -0
- package/runtime/python/okstra_ctl/run.py +53 -5
- package/runtime/python/okstra_ctl/user_response.py +67 -2
- package/runtime/python/okstra_ctl/wizard.py +283 -3
- package/runtime/python/okstra_token_usage/report.py +11 -0
- package/runtime/schemas/final-report-v1.0.schema.json +336 -0
- package/runtime/skills/_fragments/bash-invocation-rule.md +1 -0
- package/runtime/skills/_fragments/preflight-outdated-cli.md +1 -0
- package/runtime/skills/_fragments/python-bootstrap-note.md +1 -0
- package/runtime/skills/okstra-brief-gen/SKILL.md +117 -122
- package/runtime/skills/okstra-container-build/SKILL.md +24 -14
- package/runtime/skills/okstra-graphify/SKILL.md +12 -4
- package/runtime/skills/okstra-inspect/SKILL.md +105 -99
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-rollup/SKILL.md +12 -6
- package/runtime/skills/okstra-run/SKILL.md +49 -88
- package/runtime/skills/{okstra-schedule → okstra-schedule-gen}/SKILL.md +38 -32
- package/runtime/skills/okstra-setup/SKILL.md +1 -1
- package/runtime/skills/okstra-setup/references/project-config.md +17 -16
- package/runtime/skills/okstra-usage/SKILL.md +5 -2
- package/runtime/skills/okstra-user-response/SKILL.md +23 -9
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/reports/error-analysis-input.template.md +1 -1
- package/runtime/templates/reports/fan-out-unit.template.md +6 -6
- package/runtime/templates/reports/final-report.template.md +67 -0
- package/runtime/templates/reports/final-verification-input.template.md +6 -6
- package/runtime/templates/reports/i18n/en.json +31 -0
- package/runtime/templates/reports/i18n/ko.json +31 -0
- package/runtime/templates/reports/implementation-input.template.md +1 -1
- package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
- package/runtime/templates/reports/improvement-discovery-input.template.md +1 -1
- package/runtime/templates/reports/quick-input.template.md +1 -1
- package/runtime/templates/reports/release-handoff-input.template.md +1 -1
- package/runtime/templates/reports/schedule.template.md +22 -22
- package/runtime/templates/reports/task-brief.template.md +3 -3
- package/runtime/templates/reports/user-response.template.md +20 -20
- package/runtime/templates/worker-prompt-preamble.md +111 -13
- package/runtime/validators/validate-run.py +426 -5
- package/runtime/validators/validate-schedule.py +5 -5
- package/src/cli-registry.mjs +7 -0
- package/src/commands/inspect/design-prep.mjs +23 -0
- package/src/lib/skill-catalog.mjs +2 -1
- package/docs/for-ai/skills/okstra-schedule.md +0 -320
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2.
|
|
7
|
-
- [3. wizard
|
|
8
|
-
- [4. render-bundle
|
|
5
|
+
- [1. One-line summary](#1-one-line-summary)
|
|
6
|
+
- [2. Where the two entrypoints meet](#2-where-the-two-entrypoints-meet)
|
|
7
|
+
- [3. wizard input collection flow](#3-wizard-input-collection-flow)
|
|
8
|
+
- [4. render-bundle and prepare_task_bundle](#4-render-bundle-and-prepare_task_bundle)
|
|
9
9
|
- [5. Claude lead phase 1-7](#5-claude-lead-phase-1-7)
|
|
10
10
|
- [6. artifact layout](#6-artifact-layout)
|
|
11
|
-
- [7.
|
|
12
|
-
- [8.
|
|
11
|
+
- [7. Common branching rules](#7-common-branching-rules)
|
|
12
|
+
- [8. Inconsistencies to watch for](#8-inconsistencies-to-watch-for)
|
|
13
13
|
|
|
14
|
-
## 1.
|
|
14
|
+
## 1. One-line summary
|
|
15
15
|
|
|
16
|
-
`okstra-run
|
|
16
|
+
`okstra-run` is not a "skill that decides questions on its own" but a thin loop that relays the `okstra wizard` JSON state machine to the user. Once input collection finishes, it calls `okstra render-bundle`, and that command builds the task bundle through `python3 -m okstra_ctl.run --render-only`. After that, the current Claude Code session switches over to `Claude lead`.
|
|
17
17
|
|
|
18
|
-
## 2.
|
|
18
|
+
## 2. Where the two entrypoints meet
|
|
19
19
|
|
|
20
20
|
```mermaid
|
|
21
21
|
flowchart LR
|
|
@@ -36,9 +36,9 @@ flowchart LR
|
|
|
36
36
|
H -->|non-render-only| J[exec claude --session-id ...]
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
The common principle is that `prepare_task_bundle()` is the single authority for task bundle creation. Neither the wizard nor the shell wrapper duplicates the path computation, manifest creation, or worktree creation logic.
|
|
40
40
|
|
|
41
|
-
## 3. wizard
|
|
41
|
+
## 3. wizard input collection flow
|
|
42
42
|
|
|
43
43
|
```mermaid
|
|
44
44
|
stateDiagram-v2
|
|
@@ -67,9 +67,9 @@ stateDiagram-v2
|
|
|
67
67
|
Confirm --> Done: Proceed
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
A new task receives its brief first. If the brief frontmatter has `task-group:` and `brief-id:`, the wizard shows the task group/id as recommended picks. An existing task shows the manifest's `workflow.nextRecommendedPhase` as the recommended task-type, and if an existing brief path exists it asks whether to keep or change it.
|
|
71
71
|
|
|
72
|
-
## 4. render-bundle
|
|
72
|
+
## 4. render-bundle and prepare_task_bundle
|
|
73
73
|
|
|
74
74
|
```mermaid
|
|
75
75
|
sequenceDiagram
|
|
@@ -96,7 +96,7 @@ sequenceDiagram
|
|
|
96
96
|
Skill->>FS: read claude-execution-prompt.md
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
`render-bundle
|
|
99
|
+
The Node shim for `render-bundle` is [`src/commands/execute/render-bundle.mjs`](../../src/commands/execute/render-bundle.mjs). This shim attaches the `--workspace-root`, `--render-only`, and runtime resolution arguments directly. As a result, on the okstra-run path the initial run status starts at `prepared` and the task status starts at `instruction-set-generated`.
|
|
100
100
|
|
|
101
101
|
## 5. Claude lead phase 1-7
|
|
102
102
|
|
|
@@ -116,7 +116,7 @@ flowchart TD
|
|
|
116
116
|
P7 --> Done[final report + manifests updated]
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
The roles of the analysis workers and the report-writer are separated. `report-writer` is not a Phase 4/5 analysis worker but the Phase 6 final report author. Note, however, that `release-handoff` is a single-lead phase, so it deliberately does not follow this phase graph.
|
|
120
120
|
|
|
121
121
|
## 6. artifact layout
|
|
122
122
|
|
|
@@ -141,11 +141,11 @@ flowchart TD
|
|
|
141
141
|
Root --> Handoff[release-handoff-input.md]
|
|
142
142
|
```
|
|
143
143
|
|
|
144
|
-
`implementation
|
|
144
|
+
`implementation` and single-stage `final-verification` isolate their run deliverables under `stage-<N>/`. The `implementation` carry sidecar and `consumers.jsonl` are cross-stage coordination ledgers, so they remain at the phase root. The runtime reads this ledger and the registry reservations as a Stage Lifecycle Snapshot to compute stage selection and handoff eligibility. `release-handoff` does not receive a brief; prepare generates `release-handoff-input.md`.
|
|
145
145
|
|
|
146
|
-
`runtime
|
|
146
|
+
`runtime/` is build output, so when you fix this flow you edit the sources `scripts/`, `skills/`, `agents/`, `prompts/`, `templates/`, `validators/` and refresh with `npm run build`.
|
|
147
147
|
|
|
148
|
-
## 7.
|
|
148
|
+
## 7. Common branching rules
|
|
149
149
|
|
|
150
150
|
```mermaid
|
|
151
151
|
flowchart TD
|
|
@@ -165,14 +165,14 @@ flowchart TD
|
|
|
165
165
|
PR --> Confirm
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
The important point is that `Use defaults` means the model defaults. For non-implementation task-types, the worker roster question still appears even if you choose defaults. Conversely, `implementation` has no worker override question; it uses the profile default roster and executor binding.
|
|
169
169
|
|
|
170
|
-
Worktree
|
|
170
|
+
Worktree rules differ per phase. From `requirements-discovery` through `implementation-planning`, the task-key worktree is reused. `implementation` uses the task-key worktree as an anchor but does the actual execution isolated one stage at a time in a stage-key (`stage-<N>`) worktree and the `runs/implementation/stage-<N>/` deliverables. `final-verification --stage N` reuses that implementation stage worktree as a read target, and whole-task mode auto-integrates the stage commits into the task-key worktree and then builds the verification target. The Stage Lifecycle Snapshot is a read-side view that does not change this storage structure.
|
|
171
171
|
|
|
172
|
-
## 8.
|
|
172
|
+
## 8. Inconsistencies to watch for
|
|
173
173
|
|
|
174
|
-
- `okstra-run` wizard
|
|
175
|
-
- `release-handoff
|
|
176
|
-
- `release-handoff
|
|
177
|
-
- `release-handoff
|
|
178
|
-
-
|
|
174
|
+
- The `okstra-run` wizard path passes only if the implementation approved plan already has an approval marker. `scripts/okstra.sh` has `--approve`, which can flip the checkbox with a CLI ack, but the current wizard `render_args()` has no `approve` flag.
|
|
175
|
+
- `release-handoff` has no brief. Prepare cites the accepted final-verification report to build `release-handoff-input.md`, and the wizard's `handoff_stage_pick` or the CLI `--stages` fixes the whole-task/stage-group scope.
|
|
176
|
+
- `release-handoff` is also a target for task worktree provisioning. A healthy handoff is safest when it reuses the implementation/final-verification results of the same task-key. Starting a new task creates a new worktree, which may be blocked at the profile's "an implementation commit must exist" entry gate.
|
|
177
|
+
- `release-handoff` has no `Required workers:` block in its profile. The runtime also forces the worker roster to be empty.
|
|
178
|
+
- No task-type starts the next lifecycle phase within a single run. "Proceed to the next step" is interpreted only as wrapping up the current phase's output.
|
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2. okstra-run wizard
|
|
7
|
-
- [3. prepare_task_bundle
|
|
8
|
-
- [4. lead
|
|
9
|
-
- [5.
|
|
10
|
-
- [6.
|
|
5
|
+
- [1. Purpose](#1-purpose)
|
|
6
|
+
- [2. okstra-run wizard flow](#2-okstra-run-wizard-flow)
|
|
7
|
+
- [3. prepare_task_bundle handling](#3-prepare_task_bundle-handling)
|
|
8
|
+
- [4. lead execution flow](#4-lead-execution-flow)
|
|
9
|
+
- [5. Deliverables and prohibitions](#5-deliverables-and-prohibitions)
|
|
10
|
+
- [6. Code reviewed](#6-code-reviewed)
|
|
11
11
|
|
|
12
|
-
## 1.
|
|
12
|
+
## 1. Purpose
|
|
13
13
|
|
|
14
|
-
`error-analysis
|
|
14
|
+
`error-analysis` analyzes a reported error or incident to organize the symptom, trigger, root-cause candidate, reproduction gap, and validation path. It is not the phase that produces the fix itself or an implementation design.
|
|
15
15
|
|
|
16
|
-
## 2. okstra-run wizard
|
|
16
|
+
## 2. okstra-run wizard flow
|
|
17
17
|
|
|
18
18
|
```mermaid
|
|
19
19
|
flowchart TD
|
|
20
|
-
Start[/okstra-run/] --> Common[
|
|
20
|
+
Start[/okstra-run/] --> Common[common task identity flow]
|
|
21
21
|
Common --> Type[task-type = error-analysis]
|
|
22
22
|
Type --> Worktree{active worktree exists?}
|
|
23
23
|
Worktree -->|yes| Defaults[Use defaults / Customize]
|
|
@@ -32,9 +32,9 @@ flowchart TD
|
|
|
32
32
|
Confirm --> Render[render-bundle --render-only]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
The default required roster is `claude`, `codex`, `report-writer`. `antigravity` is an optional worker, and if selected it joins the analyser set.
|
|
36
36
|
|
|
37
|
-
## 3. prepare_task_bundle
|
|
37
|
+
## 3. prepare_task_bundle handling
|
|
38
38
|
|
|
39
39
|
```mermaid
|
|
40
40
|
sequenceDiagram
|
|
@@ -54,9 +54,9 @@ sequenceDiagram
|
|
|
54
54
|
Run->>Art: task-manifest workflow next=implementation-planning
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
The static next phase in `workflow.py` is `implementation-planning`. The actual final report may say more investigation is needed, but in the lifecycle the fix does not go straight ahead; it moves on to planning.
|
|
58
58
|
|
|
59
|
-
## 4. lead
|
|
59
|
+
## 4. lead execution flow
|
|
60
60
|
|
|
61
61
|
```mermaid
|
|
62
62
|
flowchart TD
|
|
@@ -69,9 +69,9 @@ flowchart TD
|
|
|
69
69
|
Report --> Persist[Phase 7 persist + validate]
|
|
70
70
|
```
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
The workers analyze the symptom and evidence independently. The report-writer does not analyze during Phase 4/5 but writes the final report in Phase 6.
|
|
73
73
|
|
|
74
|
-
## 5.
|
|
74
|
+
## 5. Deliverables and prohibitions
|
|
75
75
|
|
|
76
76
|
```mermaid
|
|
77
77
|
flowchart LR
|
|
@@ -82,20 +82,19 @@ flowchart LR
|
|
|
82
82
|
Hyp -. forbidden .-> Fix[Code fix in this run]
|
|
83
83
|
```
|
|
84
84
|
|
|
85
|
-
final report
|
|
85
|
+
The final report must contain the following.
|
|
86
86
|
|
|
87
87
|
- evidence-backed cause analysis
|
|
88
88
|
- uncertainty boundary
|
|
89
89
|
- practical next diagnostic steps
|
|
90
|
-
- blocking uncertainty
|
|
90
|
+
- if there is blocking uncertainty, `## 1. Clarification Items`, usually `Blocks=next-phase`
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
What is prohibited is source edit, refactor, fix attempt, implementation design artifact, and running build/migration/deploy. Deferring ambiguity that could be answered from code or logs to a user question is also a defect per the profile.
|
|
93
93
|
|
|
94
|
-
## 6.
|
|
94
|
+
## 6. Code reviewed
|
|
95
95
|
|
|
96
96
|
- [`prompts/profiles/error-analysis.md`](../../prompts/profiles/error-analysis.md)
|
|
97
97
|
- [`templates/reports/error-analysis-input.template.md`](../../templates/reports/error-analysis-input.template.md)
|
|
98
98
|
- [`scripts/okstra_ctl/workflow.py`](../../scripts/okstra_ctl/workflow.py)
|
|
99
99
|
- [`scripts/okstra_ctl/wizard.py`](../../scripts/okstra_ctl/wizard.py)
|
|
100
100
|
- [`prompts/lead/okstra-lead-contract.md`](../../prompts/lead/okstra-lead-contract.md)
|
|
101
|
-
|
|
@@ -2,24 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2. okstra-run wizard
|
|
5
|
+
- [1. Purpose](#1-purpose)
|
|
6
|
+
- [2. okstra-run wizard flow](#2-okstra-run-wizard-flow)
|
|
7
7
|
- [3. entry gate](#3-entry-gate)
|
|
8
|
-
- [4.
|
|
9
|
-
- [5.
|
|
10
|
-
- [6.
|
|
11
|
-
- [7.
|
|
12
|
-
- [8.
|
|
8
|
+
- [4. Verification execution flow](#4-verification-execution-flow)
|
|
9
|
+
- [5. Verdict and routing](#5-verdict-and-routing)
|
|
10
|
+
- [6. Deliverables](#6-deliverables)
|
|
11
|
+
- [7. Forbidden actions](#7-forbidden-actions)
|
|
12
|
+
- [8. Verified code](#8-verified-code)
|
|
13
13
|
|
|
14
|
-
## 1.
|
|
14
|
+
## 1. Purpose
|
|
15
15
|
|
|
16
|
-
`final-verification
|
|
16
|
+
`final-verification` determines whether the committed diff produced by `implementation` can be finally accepted. Without performing any source edit or follow-up fix, it confirms that the implementation report matches the actual checkout, then records acceptance blockers, residual risk, and a release recommendation.
|
|
17
17
|
|
|
18
|
-
## 2. okstra-run wizard
|
|
18
|
+
## 2. okstra-run wizard flow
|
|
19
19
|
|
|
20
20
|
```mermaid
|
|
21
21
|
flowchart TD
|
|
22
|
-
Start[/okstra-run/] --> Common[
|
|
22
|
+
Start[/okstra-run/] --> Common[common task identity flow]
|
|
23
23
|
Common --> Type[task-type = final-verification]
|
|
24
24
|
Type --> PlanPick[approved plan pick]
|
|
25
25
|
PlanPick --> Approved[approval marker confirm]
|
|
@@ -33,9 +33,9 @@ flowchart TD
|
|
|
33
33
|
Confirm --> Render[render-bundle]
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
`final-verification
|
|
36
|
+
`final-verification` is a non-implementation phase that has an analyser roster. So even if you pick `Use defaults`, the worker roster prompt still appears. The default required workers are `claude`, `codex`, and `report-writer`, and `antigravity` is opt-in.
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
This phase does not ask for `base-ref` directly. The wizard selects whole-task or a single stage from the approved plan's Stage Map, and prepare resolves `VERIFICATION_TARGET` from the registry / `consumers.jsonl` / git state.
|
|
39
39
|
|
|
40
40
|
## 3. entry gate
|
|
41
41
|
|
|
@@ -60,17 +60,17 @@ sequenceDiagram
|
|
|
60
60
|
Lead->>Lead: verify against injected target only
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
prepare
|
|
63
|
+
prepare fixes the verification target before worker dispatch. If any of the following fails, the lead prompt does not start and it stops with `PrepareError`.
|
|
64
64
|
|
|
65
|
-
- approved plan
|
|
66
|
-
- whole-task
|
|
67
|
-
-
|
|
68
|
-
- single-stage
|
|
69
|
-
- verification worktree
|
|
65
|
+
- The approved plan's Stage Map cannot be read.
|
|
66
|
+
- It is whole-task but not every stage in the Stage Map is `done`.
|
|
67
|
+
- A merge conflict occurs during whole-task auto-integration.
|
|
68
|
+
- It is single-stage but the selected stage's implementation stage worktree is missing or dirty.
|
|
69
|
+
- The verification worktree is in a dirty state outside `.okstra/`.
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
Once started, the lead treats `VERIFICATION_TARGET` as authoritative. It does not re-pick worktree/base/head/stage/source report from the brief.
|
|
72
72
|
|
|
73
|
-
## 4.
|
|
73
|
+
## 4. Verification execution flow
|
|
74
74
|
|
|
75
75
|
```mermaid
|
|
76
76
|
flowchart TD
|
|
@@ -90,7 +90,7 @@ flowchart TD
|
|
|
90
90
|
SelfReview --> Persist[final report + manifests]
|
|
91
91
|
```
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
The validation command is never guessed automatically. When independent re-verification is needed, there are only two tiers of command source.
|
|
94
94
|
|
|
95
95
|
```mermaid
|
|
96
96
|
flowchart LR
|
|
@@ -103,9 +103,9 @@ flowchart LR
|
|
|
103
103
|
Deny -->|denied token| Reject[record rejected command<br/>do not execute]
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
`implementation` runtime
|
|
106
|
+
The `implementation` runtime validates the `qaCommands` deny-list at the prepare stage, but `final-verification` has no such fail-fast gate. Per the profile contract, the lead must self-check the deny-list directly right before execution.
|
|
107
107
|
|
|
108
|
-
## 5.
|
|
108
|
+
## 5. Verdict and routing
|
|
109
109
|
|
|
110
110
|
```mermaid
|
|
111
111
|
flowchart TD
|
|
@@ -117,15 +117,15 @@ flowchart TD
|
|
|
117
117
|
Blockers --> Followup
|
|
118
118
|
```
|
|
119
119
|
|
|
120
|
-
`## 7. Final Verdict
|
|
120
|
+
`## 7. Final Verdict` must contain exactly one `Verdict Token` field, and its value is one of the following three.
|
|
121
121
|
|
|
122
|
-
- `accepted`:
|
|
123
|
-
- `conditional-accept`:
|
|
124
|
-
- `blocked`: acceptance
|
|
122
|
+
- `accepted`: a state that becomes a candidate for plain `release-handoff` when whole-task, or `release-handoff(stage-group)` when single-stage
|
|
123
|
+
- `conditional-accept`: all conditions must be stated explicitly, and when a condition is a gate it blocks the next phase
|
|
124
|
+
- `blocked`: a state that has acceptance blockers and cannot proceed to release-handoff
|
|
125
125
|
|
|
126
|
-
|
|
126
|
+
Vague phrasings such as "looks good" or "mostly ready" are not allowed.
|
|
127
127
|
|
|
128
|
-
## 6.
|
|
128
|
+
## 6. Deliverables
|
|
129
129
|
|
|
130
130
|
```mermaid
|
|
131
131
|
flowchart TD
|
|
@@ -138,21 +138,21 @@ flowchart TD
|
|
|
138
138
|
Report --> Route[routing recommendation]
|
|
139
139
|
```
|
|
140
140
|
|
|
141
|
-
final report
|
|
141
|
+
The final report requires at least the following.
|
|
142
142
|
|
|
143
143
|
- originating implementation final-report path
|
|
144
|
-
- verification scope(`whole-task`
|
|
144
|
+
- verification scope (`whole-task` or `single-stage`) and the injected `VERIFICATION_TARGET`
|
|
145
145
|
- inspected worktree path
|
|
146
|
-
- implementation base ref
|
|
146
|
+
- implementation base ref and run start head SHA
|
|
147
147
|
- quoted commit list / diff summary
|
|
148
148
|
- `Verdict Token`
|
|
149
|
-
- blocker table
|
|
150
|
-
- residual risk
|
|
151
|
-
-
|
|
152
|
-
- read-only command log
|
|
153
|
-
-
|
|
149
|
+
- blocker table or `No acceptance blockers found.`
|
|
150
|
+
- residual risk and escalation trigger
|
|
151
|
+
- coverage artifact per requirement
|
|
152
|
+
- read-only command log and exit code
|
|
153
|
+
- next safe phase recommendation
|
|
154
154
|
|
|
155
|
-
## 7.
|
|
155
|
+
## 7. Forbidden actions
|
|
156
156
|
|
|
157
157
|
```mermaid
|
|
158
158
|
flowchart TD
|
|
@@ -165,9 +165,9 @@ flowchart TD
|
|
|
165
165
|
FV -. forbidden .-> Hide[hide verifier dissent]
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
|
|
168
|
+
The stage merge/teardown of whole-task mode is a runtime-owned integration step that prepare performs. After that, lead verification is read-only. Source edit, follow-up fix, and scope expansion are all forbidden. When a defect is found, it is not fixed within the current run; instead it is recorded as a blocker in the final report and handed off as new `error-analysis` or `implementation-planning` input.
|
|
169
169
|
|
|
170
|
-
## 8.
|
|
170
|
+
## 8. Verified code
|
|
171
171
|
|
|
172
172
|
- [`prompts/profiles/final-verification.md`](../../prompts/profiles/final-verification.md)
|
|
173
173
|
- [`templates/reports/final-verification-input.template.md`](../../templates/reports/final-verification-input.template.md)
|
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2. okstra-run wizard
|
|
7
|
-
- [3. prepare_task_bundle
|
|
8
|
-
- [4. lead
|
|
9
|
-
- [5. final report gate](#5-final-report-gate)
|
|
10
|
-
- [6.
|
|
11
|
-
- [7.
|
|
5
|
+
- [1. Purpose](#1-purpose)
|
|
6
|
+
- [2. okstra-run wizard flow](#2-okstra-run-wizard-flow)
|
|
7
|
+
- [3. prepare_task_bundle handling](#3-prepare_task_bundle-handling)
|
|
8
|
+
- [4. lead execution flow](#4-lead-execution-flow)
|
|
9
|
+
- [5. design preparation and final report gate](#5-design-preparation-and-final-report-gate)
|
|
10
|
+
- [6. Forbidden actions](#6-forbidden-actions)
|
|
11
|
+
- [7. Verified code](#7-verified-code)
|
|
12
12
|
|
|
13
|
-
## 1.
|
|
13
|
+
## 1. Purpose
|
|
14
14
|
|
|
15
|
-
`implementation-planning
|
|
15
|
+
`implementation-planning` is the phase that decides the implementation direction before coding. It produces at least two implementation options, trade-offs, a recommended option, a stepwise execution order, a validation checklist, and a rollback strategy, and it places a user approval gate.
|
|
16
16
|
|
|
17
|
-
## 2. okstra-run wizard
|
|
17
|
+
## 2. okstra-run wizard flow
|
|
18
18
|
|
|
19
19
|
```mermaid
|
|
20
20
|
flowchart TD
|
|
21
|
-
Start[/okstra-run/] --> Common[
|
|
21
|
+
Start[/okstra-run/] --> Common[common task identity flow]
|
|
22
22
|
Common --> Type[task-type = implementation-planning]
|
|
23
23
|
Type --> Worktree{active task worktree?}
|
|
24
24
|
Worktree -->|yes| Defaults[Use defaults / Customize]
|
|
@@ -33,9 +33,9 @@ flowchart TD
|
|
|
33
33
|
Confirm --> Render[render-bundle]
|
|
34
34
|
```
|
|
35
35
|
|
|
36
|
-
wizard
|
|
36
|
+
The wizard currently does not ask about `--no-plan-verification`. On the okstra-run path, plan-body verification is prepared as enabled by default. The shell/CLI path has a `--no-plan-verification` flag.
|
|
37
37
|
|
|
38
|
-
## 3. prepare_task_bundle
|
|
38
|
+
## 3. prepare_task_bundle handling
|
|
39
39
|
|
|
40
40
|
```mermaid
|
|
41
41
|
sequenceDiagram
|
|
@@ -55,9 +55,9 @@ sequenceDiagram
|
|
|
55
55
|
P-->>W: prepared lead prompt
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
runtime prepare
|
|
58
|
+
The runtime prepare stage does not block source edits itself; instead it "bakes the current phase boundary into the lead prompt and manifest." The actual no-edit/no-build rules must be honored by the lead and workers reading the profile.
|
|
59
59
|
|
|
60
|
-
## 4. lead
|
|
60
|
+
## 4. lead execution flow
|
|
61
61
|
|
|
62
62
|
```mermaid
|
|
63
63
|
flowchart TD
|
|
@@ -74,37 +74,62 @@ flowchart TD
|
|
|
74
74
|
NoApproval --> P7
|
|
75
75
|
```
|
|
76
76
|
|
|
77
|
-
Plan-body verification
|
|
77
|
+
Plan-body verification uses a different queue from Phase 5.5. Phase 5.5 verifies worker findings, and the Phase 6 sub-step re-verifies the consolidated plan body produced by the report-writer at the `P-*` plan-item level.
|
|
78
78
|
|
|
79
|
-
## 5. final report gate
|
|
79
|
+
## 5. design preparation and final report gate
|
|
80
|
+
|
|
81
|
+
The lead deterministically detects domain contract, persistence schema, external interface, transaction/consistency, transformation mapping, lifecycle state machine, rollout/observability, and manual user test surface from the Stage Map. The report-writer does not ask the user starting from blanks; instead it first writes a concrete AI draft for each surface using known facts and evidence.
|
|
82
|
+
|
|
83
|
+
The status of `designPreparation.items[]` does not forcibly pin completeness to a single stage.
|
|
84
|
+
|
|
85
|
+
| Status | Meaning | Handling on implementation entry |
|
|
86
|
+
|---|---|---|
|
|
87
|
+
| `ready` | The implementation contract is sufficiently finalized within the planning snapshot | Proceed with that stage |
|
|
88
|
+
| `provisional` | There is a reversible working assumption and guardrail, so it is safe to proceed now | Proceed with that stage, inject the assumption into the executor prompt, and re-confirm at the designated review point |
|
|
89
|
+
| `blocked` | There is no safe default and it needs an external authorization, business policy, or destructive-change decision | Only the stage in this item's `stageRefs` waits for input or is replanned |
|
|
90
|
+
| `not-applicable` | The surface found by the detector does not require a separate contract in this stage | Record a concrete reason and proceed |
|
|
91
|
+
|
|
92
|
+
If there is no detected surface and no manual test input that changes the interface/acceptance, write `mode: no-design-inputs` with a concrete reason. So there is no need to create a formal empty document for a simple task.
|
|
93
|
+
|
|
94
|
+
`manual-user-test` does not have to fully fix the execution method at planning time. If there is a safe default procedure even before seeing the actual diff, proceed with `provisional` and `ifStillOpen: follow-up`, and the implementation report finally owns the `implementation.manualUserTest` aligned to the actual change. Conversely, use `blocked` only when the stage cannot be safely completed without an acceptance method that only the user can provide.
|
|
95
|
+
|
|
96
|
+
Phase 7 deterministically creates a `design-prep-requests/` document filled with an AI proposal for each `provisional`/`blocked` item. When the user or wizard approves, edits, rejects, or holds the draft, only after confirmation does it append a new revision sidecar under `design-prep-inputs/`. This response does not modify the approved planning report.
|
|
97
|
+
|
|
98
|
+
Plan approval and design-preparation status are independent gates. If plan-body verification passed, the plan itself can be approved even when there is a `blocked` item. The actual `implementation` preflight resolves only the items of the selected stage, and unrelated stages keep proceeding.
|
|
80
99
|
|
|
81
100
|
```mermaid
|
|
82
101
|
flowchart LR
|
|
83
102
|
Options[Option Candidates] --> Matrix[Trade-off Matrix]
|
|
84
103
|
Matrix --> Rec[Recommended Option]
|
|
85
|
-
Rec -->
|
|
86
|
-
|
|
104
|
+
Rec --> Stages[Stage Map + Stage Exit/Validation]
|
|
105
|
+
Stages --> Prep[Implementation Design Preparation]
|
|
106
|
+
Prep --> Dep[Dependency / Migration Risk]
|
|
87
107
|
Dep --> Val[Validation Checklist]
|
|
88
108
|
Val --> Rb[Rollback Strategy]
|
|
89
109
|
Rb --> Verify[Plan Body Verification]
|
|
90
|
-
Verify --> Approval[
|
|
110
|
+
Verify --> Approval[YAML frontmatter approval]
|
|
91
111
|
Approval --> Impl[Next run: implementation]
|
|
92
112
|
```
|
|
93
113
|
|
|
94
|
-
validator
|
|
114
|
+
Because the validator searches for the English substring of the section heading, the following strings must remain verbatim on the heading line.
|
|
95
115
|
|
|
96
116
|
- `Option Candidates`
|
|
97
117
|
- `Trade-off`
|
|
98
118
|
- `Recommended Option`
|
|
99
|
-
- `
|
|
119
|
+
- `Stage Map`
|
|
120
|
+
- `Stage Exit Contract`
|
|
121
|
+
- `Stage Validation`
|
|
100
122
|
- `Dependency`
|
|
123
|
+
- `Cross-Project Dependencies`
|
|
124
|
+
- `Decision Drafts`
|
|
101
125
|
- `Validation Checklist`
|
|
102
126
|
- `Rollback`
|
|
103
|
-
- `
|
|
127
|
+
- `Requirement Coverage`
|
|
128
|
+
- `Implementation Design Preparation`
|
|
104
129
|
|
|
105
|
-
|
|
130
|
+
Approval is recorded with `approved: true` in the YAML frontmatter and the chosen `implementation-option`. If a `Blocks=approval` clarification row is unresolved, the implementation prepare rejects it even when the frontmatter is in an approved state. The `blocked` status of design-preparation is not the same as `Blocks=approval`, and it operates only at that stage's implementation preflight.
|
|
106
131
|
|
|
107
|
-
## 6.
|
|
132
|
+
## 6. Forbidden actions
|
|
108
133
|
|
|
109
134
|
```mermaid
|
|
110
135
|
flowchart TD
|
|
@@ -115,9 +140,9 @@ flowchart TD
|
|
|
115
140
|
Plan -. forbidden .-> NextPhase[start implementation in same run]
|
|
116
141
|
```
|
|
117
142
|
|
|
118
|
-
|
|
143
|
+
This phase only produces the plan document. Code-level micro-optimization, source edit, build, migration, deployment, and any write outside the run artifact directory are forbidden.
|
|
119
144
|
|
|
120
|
-
## 7.
|
|
145
|
+
## 7. Verified code
|
|
121
146
|
|
|
122
147
|
- [`prompts/profiles/implementation-planning.md`](../../prompts/profiles/implementation-planning.md)
|
|
123
148
|
- [`templates/reports/implementation-planning-input.template.md`](../../templates/reports/implementation-planning-input.template.md)
|
|
@@ -125,4 +150,3 @@ flowchart TD
|
|
|
125
150
|
- [`scripts/okstra_ctl/render.py`](../../scripts/okstra_ctl/render.py)
|
|
126
151
|
- [`validators/validate-run.py`](../../validators/validate-run.py)
|
|
127
152
|
- [`prompts/lead/okstra-lead-contract.md`](../../prompts/lead/okstra-lead-contract.md)
|
|
128
|
-
|