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,24 +2,25 @@
|
|
|
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. runtime gate](#3-runtime-gate)
|
|
8
|
-
- [
|
|
9
|
-
- [
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
12
|
-
- [
|
|
8
|
+
- [3.1 design-preparation preflight](#31-design-preparation-preflight)
|
|
9
|
+
- [4. executor and verifier](#4-executor-and-verifier)
|
|
10
|
+
- [5. stage and consumers](#5-stage-and-consumers)
|
|
11
|
+
- [6. Deliverables](#6-deliverables)
|
|
12
|
+
- [7. Forbidden actions](#7-forbidden-actions)
|
|
13
|
+
- [8. Verified code](#8-verified-code)
|
|
13
14
|
|
|
14
|
-
## 1.
|
|
15
|
+
## 1. Purpose
|
|
15
16
|
|
|
16
|
-
`implementation
|
|
17
|
+
`implementation` executes an approved `implementation-planning` final report into actual code changes and local commits. Source edit is allowed only in this phase, but scope is limited to the approved plan and recorded out-of-plan justification.
|
|
17
18
|
|
|
18
|
-
## 2. okstra-run wizard
|
|
19
|
+
## 2. okstra-run wizard flow
|
|
19
20
|
|
|
20
21
|
```mermaid
|
|
21
22
|
flowchart TD
|
|
22
|
-
Start[/okstra-run/] --> Common[
|
|
23
|
+
Start[/okstra-run/] --> Common[common task identity flow]
|
|
23
24
|
Common --> Type[task-type = implementation]
|
|
24
25
|
Type --> Worktree{active task worktree?}
|
|
25
26
|
Worktree -->|yes| PlanPick[approved plan pick/text]
|
|
@@ -38,9 +39,9 @@ flowchart TD
|
|
|
38
39
|
Confirm --> Render[render-bundle]
|
|
39
40
|
```
|
|
40
41
|
|
|
41
|
-
`implementation
|
|
42
|
+
`implementation` has no worker override question. The wizard `render_args()` emits `workers` as an empty string, and the runtime uses the profile default roster. `stage_pick` is a multi-pick that shows done/in-progress/ready/waiting status. The selected stage set goes through dependency closure and topological sort into a `chain-stages` CSV, and each actual run executes only one of those stages.
|
|
42
43
|
|
|
43
|
-
|
|
44
|
+
The current okstra-run wizard path does not expose `--approve` that directly flips the approval checkbox. The plan file must already have a recognized approval marker.
|
|
44
45
|
|
|
45
46
|
## 3. runtime gate
|
|
46
47
|
|
|
@@ -61,6 +62,7 @@ sequenceDiagram
|
|
|
61
62
|
P->>Stage: build Stage Lifecycle Snapshot
|
|
62
63
|
P->>Reg: read active stage-key reservations
|
|
63
64
|
P->>Stage: select exactly one ready stage
|
|
65
|
+
P->>Plan: resolve selected stage design preparation
|
|
64
66
|
P->>WT: provision stage-N worktree + branch
|
|
65
67
|
P->>QA: validate qaCommands deny-list
|
|
66
68
|
P->>P: executor provider in resolved roster?
|
|
@@ -68,9 +70,23 @@ sequenceDiagram
|
|
|
68
70
|
P-->>W: prepared implementation prompt or PrepareError
|
|
69
71
|
```
|
|
70
72
|
|
|
71
|
-
`--approve
|
|
73
|
+
`--approve` exists in the Python runtime, but the okstra-run wizard does not emit it as args. On the shell path, `--approve` flips the unchecked approval line, appends an audit line, and then follows the same validation path.
|
|
72
74
|
|
|
73
|
-
|
|
75
|
+
### 3.1 design-preparation preflight
|
|
76
|
+
|
|
77
|
+
Right after stage selection, before worktree provisioning and appending `status:"started"` to `consumers.jsonl`, it resolves the design preparation of the approved plan. The resolver reads only items whose `stageRefs` includes the selected stage, so an undecided decision in another stage does not block the current run.
|
|
78
|
+
|
|
79
|
+
| outcome | runtime behavior |
|
|
80
|
+
|---|---|
|
|
81
|
+
| `proceed` | Inject the effective AI proposal, confirmed override, guardrail, and provisional working assumption into the executor prompt as `DESIGN_PREP_CONTEXT`, and create the worktree. |
|
|
82
|
+
| `wait_for_input` | Stop with `stage <N> waits for design input: ...; <request paths>`. Do not create the worktree or the started consumer row. |
|
|
83
|
+
| `replan` | Stop with `stage <N> requires implementation-planning rerun: ...`. Let a newly approved/edited decision change the planning snapshot or the Stage Map. |
|
|
84
|
+
|
|
85
|
+
`ready`, `not-applicable`, and `no-design-inputs` proceed. `provisional` can proceed even without a response because there is a safe working assumption, and a non-triggering approval/edit states that assumption and override in the prompt. A `blocked` non-response makes only that stage wait, and when a blocked draft is approved/edited, it replans so that authorization is reflected into the approved plan. A markerless legacy plan proceeds with a `legacy-unassessed` warning without modifying the report.
|
|
86
|
+
|
|
87
|
+
`manual-user-test` input uses the same flexible status. The planning draft is a seed for implementation to concretize the verification method against the actual diff, and the SSOT of the final execution method is the implementation report's `implementation.manualUserTest`. final-verification does not directly execute the planning sidecar.
|
|
88
|
+
|
|
89
|
+
## 4. executor and verifier
|
|
74
90
|
|
|
75
91
|
```mermaid
|
|
76
92
|
flowchart TD
|
|
@@ -87,9 +103,9 @@ flowchart TD
|
|
|
87
103
|
Verdict --> Report[Final report preserves dissent]
|
|
88
104
|
```
|
|
89
105
|
|
|
90
|
-
|
|
106
|
+
Only the executor may mutate project files. The verifier independently re-runs the diff and validation command read-only in the same worktree. Even a verifier with the same provider as the executor runs again in a separate fresh CLI session. This is to prevent a structure where the same session approves a diff the same session wrote.
|
|
91
107
|
|
|
92
|
-
## 5. stage
|
|
108
|
+
## 5. stage and consumers
|
|
93
109
|
|
|
94
110
|
```mermaid
|
|
95
111
|
flowchart LR
|
|
@@ -98,18 +114,20 @@ flowchart LR
|
|
|
98
114
|
Snapshot --> Resolve{stage arg}
|
|
99
115
|
Resolve -->|auto| Next[lowest ready<br/>not done/started/reserved]
|
|
100
116
|
Resolve -->|number| Forced[selected stage]
|
|
101
|
-
Next -->
|
|
102
|
-
Forced -->
|
|
117
|
+
Next --> Prep{selected-stage<br/>design preflight}
|
|
118
|
+
Forced --> Prep
|
|
119
|
+
Prep -->|proceed| Base[resolve stage base commit]
|
|
120
|
+
Prep -->|wait / replan| Stop[stop before worktree<br/>and started consumer]
|
|
103
121
|
Base --> WT[create/reuse stage worktree]
|
|
104
122
|
WT --> Started[append consumer status=started]
|
|
105
123
|
Started --> Run[implementation executes one selected stage]
|
|
106
124
|
```
|
|
107
125
|
|
|
108
|
-
|
|
126
|
+
Stage selection is `auto` or a number. If `--stage` comes from another task-type, it is a `PrepareError`. The runtime reads `done`/`started` of `consumers.jsonl`, carry sidecar backfill, and the active stage-key of the registry together in the Stage Lifecycle Snapshot, and excludes occupied stages. The Snapshot is not a new stored file but a read-side view of `stage_targets.py`.
|
|
109
127
|
|
|
110
|
-
stage worktree base
|
|
128
|
+
The stage worktree base is decided by dependency shape. An independent stage uses the task-key worktree HEAD fixed at first implementation entry as its anchor, and a single-dependency stage branches from the predecessor stage's done `head_commit`. A multi-dependency stage branches from the task-key worktree HEAD after confirming that every predecessor done commit is an ancestor of that HEAD.
|
|
111
129
|
|
|
112
|
-
## 6.
|
|
130
|
+
## 6. Deliverables
|
|
113
131
|
|
|
114
132
|
```mermaid
|
|
115
133
|
flowchart TD
|
|
@@ -122,21 +140,22 @@ flowchart TD
|
|
|
122
140
|
Report --> Next[Routing recommendation<br/>final-verification or loop back]
|
|
123
141
|
```
|
|
124
142
|
|
|
125
|
-
final report
|
|
143
|
+
The final report requires at least the following.
|
|
126
144
|
|
|
127
|
-
- approved plan path
|
|
128
|
-
- selected stage, isolated stage worktree path, run artifact path(`runs/implementation/stage-<N>/`)
|
|
145
|
+
- approved plan path and quoted approval marker
|
|
146
|
+
- selected stage, isolated stage worktree path, run artifact path (`runs/implementation/stage-<N>/`)
|
|
129
147
|
- commit SHA, message, plan step mapping
|
|
130
|
-
- diff summary
|
|
148
|
+
- diff summary and per-file summary
|
|
131
149
|
- out-of-plan edits block
|
|
132
|
-
-
|
|
150
|
+
- actual stdout/stderr and exit code of the plan validation command
|
|
133
151
|
- TDD failing-then-passing evidence
|
|
134
|
-
- verifier
|
|
135
|
-
- `carry/stage-<N>.json` evidence sidecar
|
|
152
|
+
- per-verifier independent validation rerun result
|
|
153
|
+
- `carry/stage-<N>.json` evidence sidecar and `consumers.jsonl` started/done row
|
|
136
154
|
- rollback verification
|
|
155
|
+
- `implementation.manualUserTest` finalized against the actual diff and whether it is executable
|
|
137
156
|
- follow-up tasks table
|
|
138
157
|
|
|
139
|
-
## 7.
|
|
158
|
+
## 7. Forbidden actions
|
|
140
159
|
|
|
141
160
|
```mermaid
|
|
142
161
|
flowchart TD
|
|
@@ -149,9 +168,9 @@ flowchart TD
|
|
|
149
168
|
Impl -. forbidden .-> Acceptance[declaring final acceptance]
|
|
150
169
|
```
|
|
151
170
|
|
|
152
|
-
|
|
171
|
+
This phase does not declare final acceptance. It says only ready for final-verification or needs new loop.
|
|
153
172
|
|
|
154
|
-
## 8.
|
|
173
|
+
## 8. Verified code
|
|
155
174
|
|
|
156
175
|
- [`prompts/profiles/implementation.md`](../../prompts/profiles/implementation.md)
|
|
157
176
|
- [`templates/reports/implementation-input.template.md`](../../templates/reports/implementation-input.template.md)
|
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
## Index
|
|
4
4
|
|
|
5
|
-
- [1.
|
|
6
|
-
- [2. okstra-run wizard
|
|
7
|
-
- [3. prepare
|
|
5
|
+
- [1. Purpose](#1-purpose)
|
|
6
|
+
- [2. okstra-run wizard flow](#2-okstra-run-wizard-flow)
|
|
7
|
+
- [3. prepare stage](#3-prepare-stage)
|
|
8
8
|
- [4. entry gate](#4-entry-gate)
|
|
9
|
-
- [5. lead-only
|
|
10
|
-
- [6. PR template
|
|
11
|
-
- [7.
|
|
12
|
-
- [8.
|
|
13
|
-
- [9.
|
|
9
|
+
- [5. lead-only execution flow](#5-lead-only-execution-flow)
|
|
10
|
+
- [6. PR template resolution](#6-pr-template-resolution)
|
|
11
|
+
- [7. Deliverables](#7-deliverables)
|
|
12
|
+
- [8. Forbidden actions](#8-forbidden-actions)
|
|
13
|
+
- [9. Verified code](#9-verified-code)
|
|
14
14
|
|
|
15
|
-
## 1.
|
|
15
|
+
## 1. Purpose
|
|
16
16
|
|
|
17
|
-
`release-handoff
|
|
17
|
+
`release-handoff` is the terminal phase that pushes an already-committed implementation result with an `accepted` verdict, or hands it off as a PR. whole-task mode packages the verified task branch as-is. stage-group mode can assemble the selected stages into a collector branch and bundle them into a single PR, and the merge commit created here is produced only by `okstra handoff assemble`.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
This phase has no worker dispatch. It does not use the `claude`, `codex`, or `report-writer` roster; the Claude lead performs git/gh inspection, user questions, the PR draft, and the final report all inline.
|
|
20
20
|
|
|
21
|
-
## 2. okstra-run wizard
|
|
21
|
+
## 2. okstra-run wizard flow
|
|
22
22
|
|
|
23
23
|
```mermaid
|
|
24
24
|
flowchart TD
|
|
25
|
-
Start[/okstra-run/] --> Common[
|
|
25
|
+
Start[/okstra-run/] --> Common[common task identity flow]
|
|
26
26
|
Common --> Type[task-type = release-handoff]
|
|
27
27
|
Type --> Plan[approved plan auto/pick]
|
|
28
28
|
Plan --> Scope[handoff stage pick<br/>whole-task or eligible stages]
|
|
@@ -39,11 +39,11 @@ flowchart TD
|
|
|
39
39
|
Confirm --> Render[render-bundle]
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
`release-handoff
|
|
42
|
+
`release-handoff` has no worker roster prompt. The wizard outcome's `renderArgs` includes `pr-template-path` only for release-handoff, and the runtime forces the worker list to empty. Scope selection finishes before prepare, and the project/global save runs before `render-bundle` via the `config.set pr-template-path` action of `outcome.persistActions[]`. whole-task requires an accepted whole-task verification report, and for stage-group only the stages that were marked `verified` by an accepted single-stage verification in the Stage Lifecycle Snapshot but not yet covered by a `pr` become candidates.
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
Note that this phase is also a target of task worktree provisioning. The normal flow reuses the implementation/final-verification result of the same task-key. Starting a new task may create a new branch, and it is likely to be blocked at the entry gate's "implementation commit exists" condition.
|
|
45
45
|
|
|
46
|
-
## 3. prepare
|
|
46
|
+
## 3. prepare stage
|
|
47
47
|
|
|
48
48
|
```mermaid
|
|
49
49
|
sequenceDiagram
|
|
@@ -64,7 +64,7 @@ sequenceDiagram
|
|
|
64
64
|
P-->>W: lead prompt for current session
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
profile
|
|
67
|
+
The profile has no `Required workers:` block, and `run.py` also empties the worker override for `release-handoff`. So not going through the general TeamCreate / convergence / report-writer flow of `prompts/lead/okstra-lead-contract.md` is the intended behavior.
|
|
68
68
|
|
|
69
69
|
## 4. entry gate
|
|
70
70
|
|
|
@@ -86,18 +86,18 @@ flowchart TD
|
|
|
86
86
|
Commits -->|yes| Ready[handoff questions may begin]
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Before asking the user whether to push/PR, the lead confirms the following.
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
- whole-task mode
|
|
93
|
-
- stage-group mode
|
|
94
|
-
- working tree
|
|
95
|
-
-
|
|
96
|
-
- `<base>..HEAD` commit range
|
|
91
|
+
- The `## Source Verification Report` of the input document (`release-handoff-input.md`) generated by prepare contains the mode (`HANDOFF_MODE`) and the cited report table. The brief is the input of the entry phase, so it does not exist in release-handoff — the user's stage selection finishes before prepare via the wizard `handoff_stage_pick` or the CLI `--stages`.
|
|
92
|
+
- In whole-task mode, the cited report must be `verificationScope=whole-task` and `Verdict Token = accepted`.
|
|
93
|
+
- In stage-group mode, each cited single-stage report must be `Verdict Token = accepted`, and prepare / `okstra handoff assemble` re-enforce the Stage Lifecycle Snapshot-based eligibility and dependency closure.
|
|
94
|
+
- The working tree is clean.
|
|
95
|
+
- The current branch is not a base branch such as `main`, `master`, `prod`, `preprod`, `staging`, or `dev`.
|
|
96
|
+
- The `<base>..HEAD` commit range is non-empty.
|
|
97
97
|
|
|
98
|
-
`conditional-accept`, `blocked`,
|
|
98
|
+
`conditional-accept`, `blocked`, and vague-sentence verdicts are all immediate-termination targets.
|
|
99
99
|
|
|
100
|
-
## 5. lead-only
|
|
100
|
+
## 5. lead-only execution flow
|
|
101
101
|
|
|
102
102
|
```mermaid
|
|
103
103
|
stateDiagram-v2
|
|
@@ -126,15 +126,15 @@ stateDiagram-v2
|
|
|
126
126
|
FinalReport --> [*]
|
|
127
127
|
```
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
User interaction is exactly three steps.
|
|
130
130
|
|
|
131
131
|
1. Q1 action: `local checkout`, `push + PR`, `skip`
|
|
132
|
-
2. Q2 PR base: `staging`, `preprod`, `main`,
|
|
132
|
+
2. Q2 PR base: a branch from the profile menu such as `staging`, `preprod`, `main`, or Enter directly
|
|
133
133
|
3. Q3 PR title/body: `use as-is`, `edit then proceed`, `cancel`
|
|
134
134
|
|
|
135
|
-
|
|
135
|
+
The merge-conflict probe happens only for `push + PR`.
|
|
136
136
|
|
|
137
|
-
stage-group mode
|
|
137
|
+
In stage-group mode, `local checkout` is not offered. After choosing `push + PR`, first select the PR base, confirm the already-fixed `HANDOFF_STAGES`, and then `okstra handoff assemble` creates the collector branch. After that, the conflict probe and PR title/body confirmation take the collector branch as head.
|
|
138
138
|
|
|
139
139
|
```mermaid
|
|
140
140
|
flowchart TD
|
|
@@ -148,9 +148,9 @@ flowchart TD
|
|
|
148
148
|
Ask -->|cancel| Report[final report without push/PR]
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
probe
|
|
151
|
+
The probe must not change the working tree. `git merge`, `git rebase`, and `git pull` are not part of this probe.
|
|
152
152
|
|
|
153
|
-
## 6. PR template
|
|
153
|
+
## 6. PR template resolution
|
|
154
154
|
|
|
155
155
|
```mermaid
|
|
156
156
|
flowchart TD
|
|
@@ -163,9 +163,9 @@ flowchart TD
|
|
|
163
163
|
Global -->|missing| Default[okstra skill default template]
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
|
|
166
|
+
When the user picks a template on the customize path, the okstra-run skill performs the project/global scope save before render-bundle. The runtime puts the resolved `PR_TEMPLATE_PATH` and `PR_TEMPLATE_SOURCE` into the run context, and the lead reads this file as-is, removes the HTML comments, and fills the placeholders. The section structure must not be hard-coded.
|
|
167
167
|
|
|
168
|
-
## 7.
|
|
168
|
+
## 7. Deliverables
|
|
169
169
|
|
|
170
170
|
```mermaid
|
|
171
171
|
flowchart TD
|
|
@@ -179,20 +179,20 @@ flowchart TD
|
|
|
179
179
|
Report --> Done[routing recommendation: done]
|
|
180
180
|
```
|
|
181
181
|
|
|
182
|
-
final report
|
|
182
|
+
The final report requires at least the following.
|
|
183
183
|
|
|
184
|
-
- originating final-verification report path
|
|
185
|
-
- handoff mode(`whole-task`
|
|
186
|
-
- feature branch
|
|
187
|
-
-
|
|
188
|
-
-
|
|
184
|
+
- originating final-verification report path and quoted `accepted` verdict row
|
|
185
|
+
- handoff mode (`whole-task` or `stage-group`) and selected stages
|
|
186
|
+
- feature branch and run start `git status --short`
|
|
187
|
+
- record of user selections
|
|
188
|
+
- all executed git/gh commands and exit codes
|
|
189
189
|
- implementation commit list
|
|
190
|
-
- merge-conflict probe
|
|
191
|
-
- stage-group
|
|
192
|
-
- PR
|
|
190
|
+
- merge-conflict probe result
|
|
191
|
+
- for stage-group, the collector branch, merge commit SHA, and dependency-closure result
|
|
192
|
+
- PR created, reused, or skipped result
|
|
193
193
|
- routing recommendation `done`
|
|
194
194
|
|
|
195
|
-
## 8.
|
|
195
|
+
## 8. Forbidden actions
|
|
196
196
|
|
|
197
197
|
```mermaid
|
|
198
198
|
flowchart TD
|
|
@@ -207,9 +207,9 @@ flowchart TD
|
|
|
207
207
|
RH -. forbidden .-> Merge[gh pr merge]
|
|
208
208
|
```
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
A failed `git push` must not be retried with weaker safeguards. When a failure such as non-fast-forward occurs, stop and take the user's instruction, and `--force`-family flags are forbidden even if the user requests them.
|
|
211
211
|
|
|
212
|
-
## 9.
|
|
212
|
+
## 9. Verified code
|
|
213
213
|
|
|
214
214
|
- [`prompts/profiles/release-handoff.md`](../../prompts/profiles/release-handoff.md)
|
|
215
215
|
- [`templates/reports/release-handoff-input.template.md`](../../templates/reports/release-handoff-input.template.md)
|
|
@@ -2,18 +2,18 @@
|
|
|
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 routing](#5-deliverables-and-routing)
|
|
10
|
+
- [6. Code reviewed](#6-code-reviewed)
|
|
11
11
|
|
|
12
|
-
## 1.
|
|
12
|
+
## 1. Purpose
|
|
13
13
|
|
|
14
|
-
`requirements-discovery
|
|
14
|
+
`requirements-discovery` classifies the request before implementation. It determines which of bugfix, feature, improvement, refactor, or ops it is, and chooses whether the next safe phase is `error-analysis` or `implementation-planning`. Going directly to `implementation` is not valid per the profile. Implementation can only start once an approved `implementation-planning` report exists.
|
|
15
15
|
|
|
16
|
-
## 2. okstra-run wizard
|
|
16
|
+
## 2. okstra-run wizard flow
|
|
17
17
|
|
|
18
18
|
```mermaid
|
|
19
19
|
flowchart TD
|
|
@@ -42,9 +42,9 @@ flowchart TD
|
|
|
42
42
|
Confirm --> Render[render-bundle]
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
worker multi-pick
|
|
45
|
+
In the worker multi-pick, the picker does not show `report-writer` as an option. Even if the user selects only `claude`, the wizard force-appends `report-writer`. The optional `antigravity` is included only when the user selects it.
|
|
46
46
|
|
|
47
|
-
## 3. prepare_task_bundle
|
|
47
|
+
## 3. prepare_task_bundle handling
|
|
48
48
|
|
|
49
49
|
```mermaid
|
|
50
50
|
sequenceDiagram
|
|
@@ -65,9 +65,9 @@ sequenceDiagram
|
|
|
65
65
|
P-->>W: prepared lead prompt
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
runtime
|
|
68
|
+
There is no additional hard gate in the runtime for this phase alone. The important gates are: the profile file exists, the brief file exists, the worktree gate requiring base-ref to be resolvable at the first phase, and the gate requiring worker overrides to stay within the profile roster range.
|
|
69
69
|
|
|
70
|
-
## 4. lead
|
|
70
|
+
## 4. lead execution flow
|
|
71
71
|
|
|
72
72
|
```mermaid
|
|
73
73
|
flowchart TD
|
|
@@ -79,9 +79,9 @@ flowchart TD
|
|
|
79
79
|
R --> P7[Phase 7 token usage, validate, persist]
|
|
80
80
|
```
|
|
81
81
|
|
|
82
|
-
`requirements-discovery
|
|
82
|
+
`requirements-discovery` has a convergence default of 1 round. This exception is stated in both `render._build_convergence_block()` and `prompts/lead/okstra-lead-contract.md`.
|
|
83
83
|
|
|
84
|
-
## 5.
|
|
84
|
+
## 5. Deliverables and routing
|
|
85
85
|
|
|
86
86
|
```mermaid
|
|
87
87
|
flowchart LR
|
|
@@ -94,17 +94,17 @@ flowchart LR
|
|
|
94
94
|
Route -. invalid .-> Impl[implementation<br/>not allowed directly]
|
|
95
95
|
```
|
|
96
96
|
|
|
97
|
-
final report
|
|
97
|
+
The final report emphasizes the following in particular.
|
|
98
98
|
|
|
99
99
|
- evidence-backed routing decision
|
|
100
|
-
- missing input
|
|
101
|
-
-
|
|
102
|
-
- `terminology:*` brief
|
|
103
|
-
- blocking input
|
|
100
|
+
- missing input and uncertainty boundary
|
|
101
|
+
- the next phase and safe resume guidance
|
|
102
|
+
- canonical term resolution for `terminology:*` brief items
|
|
103
|
+
- if there is blocking input, `Blocks=next-phase` in the `## 1. Clarification Items` unified table
|
|
104
104
|
|
|
105
|
-
Non-
|
|
105
|
+
Non-goals are source edit, plan authoring, build, and deployment.
|
|
106
106
|
|
|
107
|
-
## 6.
|
|
107
|
+
## 6. Code reviewed
|
|
108
108
|
|
|
109
109
|
- [`skills/okstra-run/SKILL.md`](../../skills/okstra-run/SKILL.md)
|
|
110
110
|
- [`scripts/okstra_ctl/wizard.py`](../../scripts/okstra_ctl/wizard.py)
|
|
@@ -112,4 +112,3 @@ Non-goal은 source edit, plan authoring, build, deployment다.
|
|
|
112
112
|
- [`scripts/okstra_ctl/workflow.py`](../../scripts/okstra_ctl/workflow.py)
|
|
113
113
|
- [`prompts/profiles/requirements-discovery.md`](../../prompts/profiles/requirements-discovery.md)
|
|
114
114
|
- [`prompts/lead/okstra-lead-contract.md`](../../prompts/lead/okstra-lead-contract.md)
|
|
115
|
-
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -106,7 +106,7 @@ The wrapper exists because Claude Code's Bash permission matcher rejects simple-
|
|
|
106
106
|
2. Record a `cli-failure` event directly to the run-level error log via the exact `okstra error-log append-observed` template in §"Error reporting" — substitute `--exit-code 0`, `--duration-ms <observed-ms>`, `--message "okstra-antigravity-exec.sh exited 0 but no result file at <abs-path>"`, and `--stderr-excerpt-file <temp-tail-path>`.
|
|
107
107
|
3. Return `ANTIGRAVITY_RESULT_MISSING: agy exited 0 but result file absent at <abs-path>` instead of the raw stdout. The lead is responsible for deciding redispatch per `team-contract` "Lead Redispatch Policy on Result-Missing".
|
|
108
108
|
|
|
109
|
-
d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line
|
|
109
|
+
d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line per the preamble §"Return message to the lead":
|
|
110
110
|
```
|
|
111
111
|
**Model:** Antigravity worker, <assigned-model-execution-value>
|
|
112
112
|
```
|
|
@@ -151,11 +151,11 @@ Before invoking the Antigravity CLI, you MUST:
|
|
|
151
151
|
1. Extract the absolute path from the lead's `**Worker Preamble Path:**` anchor header and verify the CLI run will Read that file end-to-end (canonical SSOT for the Required Reading + Error Reporting + Output sections contract). The lead's prompt body — which you persist verbatim and feed into Antigravity via stdin — already contains this anchor; do not strip it.
|
|
152
152
|
2. Verify the lead's prompt body lists the per-run primary input files under `## Inputs` (normally `analysis-packet.md` for analysis workers). The source files named inside that packet are fallback/evidence paths to open when needed. Analysis workers do NOT read `final-report-template.md` — that file is for the report writer only.
|
|
153
153
|
|
|
154
|
-
The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/antigravity-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Antigravity Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading.
|
|
154
|
+
The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/antigravity-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Antigravity Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading. Section-0 placement follows the worker preamble §"Reading rules" (canonical). If any file was skipped, record a `tool-failure` in the errors sidecar instead of fabricating Findings.
|
|
155
155
|
|
|
156
156
|
## Worker Output Structure
|
|
157
157
|
|
|
158
|
-
The Antigravity CLI — not this wrapper — produces the worker result. Its required structure is defined in the preamble (the lead injects the `**Worker Preamble Path:**` anchor into the dispatched prompt you persist and forward, and the CLI Reads it)
|
|
158
|
+
The Antigravity CLI — not this wrapper — produces the worker result. Its required structure is defined in the preamble (the lead injects the `**Worker Preamble Path:**` anchor into the dispatched prompt you persist and forward, and the CLI Reads it): YAML frontmatter with `workerId: "antigravity"`, sections 1–5 (common core) plus optional Section 6, a unique item ID on every item, and ticket tagging on `requirements-discovery` / `error-analysis` / `implementation-planning` / `implementation` runs. This wrapper forwards the CLI's output unmodified except for the single `**Model:**` line (step 8d) — never reshape or summarize it.
|
|
159
159
|
|
|
160
160
|
## Error reporting
|
|
161
161
|
|
|
@@ -219,7 +219,7 @@ pre-flight terminal status, not a runtime CLI error.
|
|
|
219
219
|
- Always specify the assigned `--model` value for the current run.
|
|
220
220
|
- Return error messages as-is on failure.
|
|
221
221
|
- Do not summarize or modify Antigravity results beyond prepending the single `**Model:**` line on a normal return (step 8d).
|
|
222
|
-
- Sections 1–5 of the worker output are the common core shared with the Claude and Codex workers — the dispatched prompt asks identical questions for all three roles, and the Antigravity CLI must answer all of them, not only requirement-interpretation findings. Your specialization (requirement interpretation, consistency, safety, documentation quality, alternative viewpoints) belongs only in optional Section 6 as additive depth. A Antigravity result whose Findings section is populated solely with requirement-interpretation items is in breach of contract; see
|
|
222
|
+
- Sections 1–5 of the worker output are the common core shared with the Claude and Codex workers — the dispatched prompt asks identical questions for all three roles, and the Antigravity CLI must answer all of them, not only requirement-interpretation findings. Your specialization (requirement interpretation, consistency, safety, documentation quality, alternative viewpoints) belongs only in optional Section 6 as additive depth. A Antigravity result whose Findings section is populated solely with requirement-interpretation items is in breach of contract; see the preamble §"Worker output sections".
|
|
223
223
|
|
|
224
224
|
## Stage evidence emission (BLOCKING, implementation task only)
|
|
225
225
|
|
|
@@ -70,7 +70,7 @@ Before producing any output, you MUST:
|
|
|
70
70
|
|
|
71
71
|
## Worker Output Structure
|
|
72
72
|
|
|
73
|
-
Follow the **Worker output
|
|
73
|
+
Follow the **Worker output contract** in the preamble you Read via the `**Worker Preamble Path:**` anchor — it is the canonical source for the frontmatter schema, sections 1–5 + optional Section 6 ordering, item-ID conventions, and ticket tagging. Set `workerId: "claude"`.
|
|
74
74
|
|
|
75
75
|
## Stop Condition (BLOCKING)
|
|
76
76
|
|
|
@@ -78,7 +78,7 @@ When Lead dispatches you with `run_in_background: true`, its `Agent()` call retu
|
|
|
78
78
|
|
|
79
79
|
After your `Write` to the assigned worker-results file (path provided by Lead as `**Result Path:**` — the canonical anchor header defined in `team-contract` "Worker Prompt Composition" — or derived under `runs/<task-type>/worker-results/claude-worker-<task-type>-<seq>.md`) succeeds:
|
|
80
80
|
|
|
81
|
-
1. Return your final assistant message **immediately**. Begin every return with your model identity,
|
|
81
|
+
1. Return your final assistant message **immediately**. Begin every return with your model identity, per the preamble §"Return message to the lead", then the status line — for an analysis dispatch:
|
|
82
82
|
```
|
|
83
83
|
**Model:** Claude worker, <modelExecutionValue>
|
|
84
84
|
Worker results written to <abs path>. Sections 1–5 complete. Findings: <n>.
|
|
@@ -106,7 +106,7 @@ The wrapper exists because Claude Code's Bash permission matcher rejects simple-
|
|
|
106
106
|
2. Record a `cli-failure` event directly to the run-level error log via the exact `okstra error-log append-observed` template in §"Error reporting" — substitute `--exit-code 0`, `--duration-ms <observed-ms>`, `--message "okstra-codex-exec.sh exited 0 but no result file at <abs-path>"`, and `--stderr-excerpt-file <temp-tail-path>`.
|
|
107
107
|
3. Return `CODEX_RESULT_MISSING: codex exited 0 but result file absent at <abs-path>` instead of the raw stdout. The lead is responsible for deciding redispatch per `team-contract` "Lead Redispatch Policy on Result-Missing".
|
|
108
108
|
|
|
109
|
-
d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line
|
|
109
|
+
d. **Normal return.** Otherwise (`exit_code == 0` AND result file exists), return the wrapper's accumulated stdout from `BashOutput`, prefixed by exactly one model-identity line per the preamble §"Return message to the lead":
|
|
110
110
|
```
|
|
111
111
|
**Model:** Codex worker, <assigned-model-execution-value>
|
|
112
112
|
```
|
|
@@ -151,11 +151,11 @@ Before invoking the Codex CLI, you MUST:
|
|
|
151
151
|
1. Extract the absolute path from the lead's `**Worker Preamble Path:**` anchor header and verify the CLI run will Read that file end-to-end (canonical SSOT for the Required Reading + Error Reporting + Output sections contract). The lead's prompt body — which you persist verbatim and feed into Codex via stdin — already contains this anchor; do not strip it.
|
|
152
152
|
2. Verify the lead's prompt body lists the per-run primary input files under `## Inputs` (normally `analysis-packet.md` for analysis workers). The source files named inside that packet are fallback/evidence paths to open when needed. Analysis workers do NOT read `final-report-template.md` — that file is for the report writer only.
|
|
153
153
|
|
|
154
|
-
The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/codex-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Codex Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading.
|
|
154
|
+
The CLI writes a Reading Confirmation block to the **audit sidecar** at `runs/<task-type>/worker-results/codex-worker-audit-<task-type>-<seq>.md`. The sidecar's body begins with `# Codex Worker Audit — <task-key>` followed by one short line per input file confirming end-to-end reading. Section-0 placement follows the worker preamble §"Reading rules" (canonical). If any file was skipped, record a `tool-failure` in the errors sidecar instead of fabricating Findings.
|
|
155
155
|
|
|
156
156
|
## Worker Output Structure
|
|
157
157
|
|
|
158
|
-
The Codex CLI — not this wrapper — produces the worker result. Its required structure is defined in the preamble (the lead injects the `**Worker Preamble Path:**` anchor into the dispatched prompt you persist and forward, and the CLI Reads it)
|
|
158
|
+
The Codex CLI — not this wrapper — produces the worker result. Its required structure is defined in the preamble (the lead injects the `**Worker Preamble Path:**` anchor into the dispatched prompt you persist and forward, and the CLI Reads it): YAML frontmatter with `workerId: "codex"`, sections 1–5 (common core) plus optional Section 6, a unique item ID on every item, and ticket tagging on `requirements-discovery` / `error-analysis` / `implementation-planning` / `implementation` runs. This wrapper forwards the CLI's output unmodified except for the single `**Model:**` line (step 8d) — never reshape or summarize it.
|
|
159
159
|
|
|
160
160
|
## Error reporting
|
|
161
161
|
|
|
@@ -219,7 +219,7 @@ pre-flight terminal status, not a runtime CLI error.
|
|
|
219
219
|
- Ignore stderr warnings from MCP integration.
|
|
220
220
|
- Return error messages as-is on failure.
|
|
221
221
|
- Do not summarize or modify Codex results beyond prepending the single `**Model:**` line on a normal return (step 8d).
|
|
222
|
-
- Sections 1–5 of the worker output are the common core shared with the Claude and Antigravity workers — the dispatched prompt asks identical questions for all three roles, and the Codex CLI must answer all of them, not only implementation-feasibility findings. Your specialization (implementation realism, code-path implications, edge cases, technical trade-offs) belongs only in optional Section 6 as additive depth. A Codex result whose Findings section is populated solely with implementation-feasibility items is in breach of contract; see
|
|
222
|
+
- Sections 1–5 of the worker output are the common core shared with the Claude and Antigravity workers — the dispatched prompt asks identical questions for all three roles, and the Codex CLI must answer all of them, not only implementation-feasibility findings. Your specialization (implementation realism, code-path implications, edge cases, technical trade-offs) belongs only in optional Section 6 as additive depth. A Codex result whose Findings section is populated solely with implementation-feasibility items is in breach of contract; see the preamble §"Worker output sections".
|
|
223
223
|
|
|
224
224
|
## Stage evidence emission (BLOCKING, implementation task only)
|
|
225
225
|
|