okstra 0.123.0 → 0.125.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 +1 -0
- package/docs/architecture/storage-model.md +3 -1
- package/docs/architecture.md +16 -2
- package/docs/cli.md +3 -1
- package/docs/for-ai/README.md +41 -35
- 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 +87 -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 +106 -106
- 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 +6 -6
- package/docs/pr-template-usage.md +34 -34
- package/docs/project-structure-overview.md +91 -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 +33 -33
- package/docs/task-process/implementation.md +38 -38
- 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 +1 -1
- package/runtime/prompts/coding-preflight/frameworks/node-server.md +1 -1
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/convergence.md +10 -20
- package/runtime/prompts/lead/okstra-lead-contract.md +15 -17
- package/runtime/prompts/lead/plan-body-verification.md +18 -18
- package/runtime/prompts/lead/report-writer.md +46 -44
- 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 +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +28 -2
- package/runtime/prompts/profiles/error-analysis.md +2 -2
- package/runtime/prompts/profiles/final-verification.md +1 -1
- package/runtime/prompts/profiles/implementation-planning.md +13 -13
- package/runtime/prompts/profiles/implementation.md +2 -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 +17 -18
- package/runtime/python/okstra_ctl/models.py +4 -2
- package/runtime/python/okstra_ctl/run.py +8 -2
- package/runtime/python/okstra_ctl/stage_fix_carry.py +112 -0
- package/runtime/schemas/final-report-v1.0.schema.json +6 -6
- 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 +39 -747
- package/runtime/skills/okstra-inspect/facets/cost.md +84 -0
- package/runtime/skills/okstra-inspect/facets/error-zip.md +41 -0
- package/runtime/skills/okstra-inspect/facets/errors.md +69 -0
- package/runtime/skills/okstra-inspect/facets/history.md +90 -0
- package/runtime/skills/okstra-inspect/facets/logs.md +89 -0
- package/runtime/skills/okstra-inspect/facets/recap.md +96 -0
- package/runtime/skills/okstra-inspect/facets/report.md +61 -0
- package/runtime/skills/okstra-inspect/facets/status.md +145 -0
- package/runtime/skills/okstra-inspect/facets/time.md +56 -0
- package/runtime/skills/okstra-manager/SKILL.md +1 -1
- package/runtime/skills/okstra-memory/SKILL.md +3 -3
- package/runtime/skills/okstra-pr-gen/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-gen/SKILL.md +36 -30
- 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 +15 -3
- package/runtime/templates/prd/brief.template.md +92 -92
- package/runtime/templates/project-docs/task-index.template.md +1 -1
- 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-verification-input.template.md +6 -6
- 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-schedule.py +1 -1
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2.
|
|
7
|
-
- [3. task-type
|
|
8
|
-
- [4.
|
|
9
|
-
- [5.
|
|
5
|
+
- [1. Reading order](#1-reading-order)
|
|
6
|
+
- [2. Big picture](#2-big-picture)
|
|
7
|
+
- [3. task-type documents](#3-task-type-documents)
|
|
8
|
+
- [4. Key code locations](#4-key-code-locations)
|
|
9
|
+
- [5. Quick comparison table](#5-quick-comparison-table)
|
|
10
10
|
|
|
11
|
-
## 1.
|
|
11
|
+
## 1. Reading order
|
|
12
12
|
|
|
13
|
-
`okstra-run
|
|
13
|
+
`okstra-run` is the path that starts a task inside a Claude Code session. This folder organizes that execution flow into two layers.
|
|
14
14
|
|
|
15
|
-
1.
|
|
16
|
-
2.
|
|
17
|
-
3. task-type
|
|
15
|
+
1. First read [common-flow.md](common-flow.md). It is the wizard, render-bundle, lead phase, and artifact flow shared by every task-type.
|
|
16
|
+
2. Then read the document for the task-type you want to run.
|
|
17
|
+
3. Check the per-task-type differences across three places: "what the wizard additionally asks", "what `prepare_task_bundle()` blocks in the runtime", and "what the lead profile enforces within the phase".
|
|
18
18
|
|
|
19
|
-
## 2.
|
|
19
|
+
## 2. Big picture
|
|
20
20
|
|
|
21
21
|
```mermaid
|
|
22
22
|
flowchart TD
|
|
@@ -32,30 +32,30 @@ flowchart TD
|
|
|
32
32
|
F --> O[final-report + manifests + status]
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
`okstra-run
|
|
35
|
+
`okstra-run` does not call `scripts/okstra.sh`. Instead it goes through `okstra wizard` and `okstra render-bundle` and converges on the same single Python entrypoint, `prepare_task_bundle()`.
|
|
36
36
|
|
|
37
|
-
## 3. task-type
|
|
37
|
+
## 3. task-type documents
|
|
38
38
|
|
|
39
|
-
| task-type |
|
|
39
|
+
| task-type | Document | One-line purpose |
|
|
40
40
|
|---|---|---|
|
|
41
|
-
| `requirements-discovery` | [requirements-discovery.md](requirements-discovery.md) |
|
|
42
|
-
| `error-analysis` | [error-analysis.md](error-analysis.md) |
|
|
43
|
-
| `implementation-planning` | [implementation-planning.md](implementation-planning.md) |
|
|
44
|
-
| `implementation` | [implementation.md](implementation.md) |
|
|
45
|
-
| `final-verification` | [final-verification.md](final-verification.md) |
|
|
46
|
-
| `release-handoff` | [release-handoff.md](release-handoff.md) |
|
|
41
|
+
| `requirements-discovery` | [requirements-discovery.md](requirements-discovery.md) | Classify the request and choose the next safe phase. |
|
|
42
|
+
| `error-analysis` | [error-analysis.md](error-analysis.md) | Find cause candidates and validation paths from symptoms and evidence. |
|
|
43
|
+
| `implementation-planning` | [implementation-planning.md](implementation-planning.md) | Produce a plan with implementation options, verification, rollback, and an approval gate. |
|
|
44
|
+
| `implementation` | [implementation.md](implementation.md) | The executor implements the approved plan and the verifier verifies it independently. |
|
|
45
|
+
| `final-verification` | [final-verification.md](final-verification.md) | Judge whole-task or single-stage acceptance of the implementation result. |
|
|
46
|
+
| `release-handoff` | [release-handoff.md](release-handoff.md) | Perform the push/PR handoff lead-only after an accepted verdict. |
|
|
47
47
|
|
|
48
|
-
## 4.
|
|
48
|
+
## 4. Key code locations
|
|
49
49
|
|
|
50
|
-
|
|
|
50
|
+
| Concern | Source of truth |
|
|
51
51
|
|---|---|
|
|
52
|
-
| okstra-run skill
|
|
52
|
+
| okstra-run skill procedure | [`skills/okstra-run/SKILL.md`](../../skills/okstra-run/SKILL.md) |
|
|
53
53
|
| wizard state machine | [`scripts/okstra_ctl/wizard.py`](../../scripts/okstra_ctl/wizard.py) |
|
|
54
54
|
| wizard prompt text | [`prompts/wizard/prompts.ko.json`](../../prompts/wizard/prompts.ko.json) |
|
|
55
55
|
| render-bundle Node shim | [`src/commands/execute/render-bundle.mjs`](../../src/commands/execute/render-bundle.mjs) |
|
|
56
|
-
|
|
|
57
|
-
| implementation stage
|
|
58
|
-
| Stage Lifecycle Snapshot + stage target/base/verification
|
|
56
|
+
| single entrypoint for bundle creation | [`scripts/okstra_ctl/run.py`](../../scripts/okstra_ctl/run.py) |
|
|
57
|
+
| implementation stage selection/provisioning | [`scripts/okstra_ctl/implementation_stage.py`](../../scripts/okstra_ctl/implementation_stage.py) |
|
|
58
|
+
| Stage Lifecycle Snapshot + stage target/base/verification policy | [`scripts/okstra_ctl/stage_targets.py`](../../scripts/okstra_ctl/stage_targets.py) |
|
|
59
59
|
| phase boundary | [`scripts/okstra_ctl/workflow.py`](../../scripts/okstra_ctl/workflow.py) |
|
|
60
60
|
| task worktree | [`scripts/okstra_ctl/worktree.py`](../../scripts/okstra_ctl/worktree.py) |
|
|
61
61
|
| stage-group handoff | [`scripts/okstra_ctl/handoff.py`](../../scripts/okstra_ctl/handoff.py) |
|
|
@@ -64,13 +64,13 @@ flowchart TD
|
|
|
64
64
|
| phase profiles | [`prompts/profiles/`](../../prompts/profiles/) |
|
|
65
65
|
| final report shape / HTML view | [`templates/reports/final-report.template.md`](../../templates/reports/final-report.template.md), [`scripts/okstra_ctl/report_views.py`](../../scripts/okstra_ctl/report_views.py) |
|
|
66
66
|
|
|
67
|
-
## 5.
|
|
67
|
+
## 5. Quick comparison table
|
|
68
68
|
|
|
69
|
-
| task-type | wizard
|
|
69
|
+
| task-type | wizard special question | runtime prepare gate | lead/worker mode | next phase default |
|
|
70
70
|
|---|---|---|---|---|
|
|
71
|
-
| `requirements-discovery` |
|
|
72
|
-
| `error-analysis` |
|
|
73
|
-
| `implementation-planning` |
|
|
71
|
+
| `requirements-discovery` | common questions only | profile/brief/base-ref exist | multi-worker analysis, convergence 1 round default | `pending-routing-decision` |
|
|
72
|
+
| `error-analysis` | common questions only | profile/brief/base-ref exist | multi-worker analysis, convergence 2 rounds default | `implementation-planning` |
|
|
73
|
+
| `implementation-planning` | common questions only | profile/brief/base-ref exist | multi-worker analysis + Phase 6 plan-body verification | `implementation` |
|
|
74
74
|
| `implementation` | approved plan, stage multi-pick, executor | approved marker, Stage Lifecycle Snapshot, stage-key reservation, QA command deny-list | one run = one stage; executor writes in isolated stage worktree, verifiers read-only | `final-verification` |
|
|
75
|
-
| `final-verification` | approved plan, stage pick(whole-task or single-stage) | `VERIFICATION_TARGET`
|
|
76
|
-
| `release-handoff` | handoff scope(stage-group or whole-task), PR template override/scope | Stage Lifecycle Snapshot eligibility, generated `release-handoff-input.md`, empty worker roster | single-lead; whole-task PR or stage-group collector branch/PR | `done-or-follow-up` |
|
|
75
|
+
| `final-verification` | approved plan, stage pick (whole-task or single-stage) | `VERIFICATION_TARGET` resolved; whole-task auto integration/teardown or single-stage worktree reuse | whole-task may integrate stages first; analyser verification itself is read-only | `pending-release-handoff` |
|
|
76
|
+
| `release-handoff` | handoff scope (stage-group or whole-task), PR template override/scope | Stage Lifecycle Snapshot eligibility, generated `release-handoff-input.md`, empty worker roster | single-lead; whole-task PR or stage-group collector branch/PR | `done-or-follow-up` |
|
|
@@ -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)
|