okstra 0.206.1 → 0.207.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 -1
- package/dist/cli-registry.mjs +7 -1
- package/dist/cli-registry.mjs.map +1 -1
- package/docs/architecture/storage-model.md +1 -0
- package/docs/architecture.md +28 -4
- package/docs/cli.md +13 -11
- package/docs/project-structure-overview.md +4 -2
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/operations/code-review.json +1 -1
- package/runtime/bin/lib/okstra/usage.sh +3 -3
- package/runtime/bin/okstra-compact-reminder.sh +1 -1
- package/runtime/prompts/duties/direction-selection-worker.json +1 -1
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/adapters/cmux.md +4 -3
- package/runtime/prompts/lead/convergence.md +41 -9
- package/runtime/prompts/lead/okstra-lead-contract.md +31 -19
- package/runtime/prompts/lead/report-writer.md +8 -6
- package/runtime/prompts/profiles/_clarification-recommendation.md +4 -4
- package/runtime/prompts/profiles/_common-contract.md +1 -1
- package/runtime/prompts/wizard/prompts.ko.json +2 -1
- package/runtime/python/okstra_ctl/adapters/hosts/antigravity/relay.md +1 -1
- package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +5 -5
- package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +1 -1
- package/runtime/python/okstra_ctl/adapters/hosts/external/relay.md +3 -2
- package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +1 -1
- package/runtime/python/okstra_ctl/adapters/hosts/kimi/relay.md +1 -1
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +17 -26
- package/runtime/python/okstra_ctl/agent/prompt_cli/batch.py +183 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +60 -10
- package/runtime/python/okstra_ctl/agent/prompt_cli/jobs.py +21 -4
- package/runtime/python/okstra_ctl/approval_decisions.py +32 -2
- package/runtime/python/okstra_ctl/assignment_resolver.py +8 -0
- package/runtime/python/okstra_ctl/blocking_checks.py +7 -0
- package/runtime/python/okstra_ctl/code_review_target.py +92 -6
- package/runtime/python/okstra_ctl/dispatch_checkpoints.py +121 -0
- package/runtime/python/okstra_ctl/dispatch_core.py +54 -32
- package/runtime/python/okstra_ctl/dispatch_state.py +12 -5
- package/runtime/python/okstra_ctl/domain/provider.py +5 -0
- package/runtime/python/okstra_ctl/domain/worker_presentation.py +21 -2
- package/runtime/python/okstra_ctl/domain/write_policy.py +2 -1
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +19 -8
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +5 -0
- package/runtime/python/okstra_ctl/lead_progress.py +33 -1
- package/runtime/python/okstra_ctl/manager_view.py +26 -19
- package/runtime/python/okstra_ctl/model_io/lines.py +21 -4
- package/runtime/python/okstra_ctl/models.py +4 -1
- package/runtime/python/okstra_ctl/operation_invocation.py +11 -2
- package/runtime/python/okstra_ctl/phases/final_verification/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-executor.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md +14 -3
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/technical_verification/profile.md +1 -1
- package/runtime/python/okstra_ctl/process_group.py +118 -0
- package/runtime/python/okstra_ctl/render.py +6 -2
- package/runtime/python/okstra_ctl/report_assembly.py +17 -2
- package/runtime/python/okstra_ctl/report_finalize.py +106 -2
- package/runtime/python/okstra_ctl/run.py +1 -1
- package/runtime/python/okstra_ctl/run_artifact_prune.py +200 -0
- package/runtime/python/okstra_ctl/team.py +108 -9
- package/runtime/python/okstra_ctl/wizard/steps_options.py +8 -0
- package/runtime/python/okstra_ctl/worker_dispatch.py +44 -3
- package/runtime/python/okstra_ctl/worker_prompt_policy.py +19 -0
- package/runtime/python/okstra_ctl/worker_runner.py +21 -3
- package/runtime/python/okstra_ctl/write_policy.py +57 -7
- package/runtime/python/okstra_project/dirs.py +14 -0
- package/runtime/python/okstra_project/resolver.py +2 -1
- package/runtime/schemas/execution-manifest-v2.schema.json +2 -1
- package/runtime/skills/okstra-code-review/SKILL.md +70 -32
- package/runtime/skills/okstra-code-review/references/review-calibration.md +26 -6
- package/runtime/skills/okstra-run/SKILL.md +2 -2
- package/runtime/templates/manager/view.template.html +18 -1
|
@@ -258,6 +258,35 @@ keeps its legacy read-only identity resolution for that schema version. The
|
|
|
258
258
|
returned `promptPath` is the only body that may be dispatched; do not append
|
|
259
259
|
role prose or reconstruct model headers after materialization.
|
|
260
260
|
|
|
261
|
+
Materialize a whole dispatch batch — every row of one round plan, every
|
|
262
|
+
critic-gap verification row of one dispatch kind — in one `okstra agent-prompt
|
|
263
|
+
materialize --project-root <root> --run-manifest <run-manifest> --batch <file>
|
|
264
|
+
--jobs-out <jobs-file>` call, not one call per worker. The batch file holds
|
|
265
|
+
`{"invocations": [...]}`; each entry maps the per-invocation flags above,
|
|
266
|
+
without the leading `--`, to their values (`"invocation-id"`, `"audience"`,
|
|
267
|
+
`"assignment-ref"`, `"source-role-execution-ref"`, `"worker-id"`,
|
|
268
|
+
`"dispatch-kind"`, `"instruction"`, `"prompt"`, `"result"`, and `"replace-undispatched": true` for a legacy v1 correction). A batch refuses those flags at the top level, so a v1 correction re-run through a batch carries `"replace-undispatched": true` in its entry. Each entry is
|
|
269
|
+
materialized exactly as the single call would be and fails with the same error;
|
|
270
|
+
a failure names the entry and every invocation already materialized, and an
|
|
271
|
+
identical rerun after the fix reuses those unchanged. `--jobs-out` then writes
|
|
272
|
+
the verified jobs file as `okstra agent-prompt jobs` would, so for
|
|
273
|
+
`runner=cli-wrapper` rows one shell command covers the batch: render the
|
|
274
|
+
instruction files, create the batch file, run `materialize --batch …
|
|
275
|
+
--jobs-out <jobs-file> && <dispatcher> --project-root <root> --run-manifest
|
|
276
|
+
<run-manifest> --dispatch-kind <kind> --jobs-file <jobs-file>`, where
|
|
277
|
+
`<dispatcher>` is the one the planned execution surface selects below —
|
|
278
|
+
`okstra team dispatch` when `terminalBackend` is `cmux-pane`, otherwise
|
|
279
|
+
`okstra worker-dispatch`. `--jobs-out` needs a v2 run manifest
|
|
280
|
+
(`executionIdentityVersion: 2`) and a path under the run directory; both are
|
|
281
|
+
checked before any entry is materialized, so a legacy v1 run materializes the
|
|
282
|
+
batch without `--jobs-out` and dispatches as it did before. `runner=native-session`
|
|
283
|
+
rows are never chained into a jobs-file dispatcher: materialize them in the
|
|
284
|
+
batch without `--jobs-out`, then `verify`, `record-dispatch` and the host call
|
|
285
|
+
per row as below. Each worker in its own materialize call costs one lead turn
|
|
286
|
+
over the whole context per worker. The batch call is `materialize_batch` in
|
|
287
|
+
`scripts/okstra_ctl/agent/prompt_cli/batch.py`; the pre-materialization check is
|
|
288
|
+
`check_jobs_target` in `scripts/okstra_ctl/agent/prompt_cli/jobs.py`.
|
|
289
|
+
|
|
261
290
|
If the dispatch gate then rejects that prompt, preserve its prompt, metadata,
|
|
262
291
|
reservation, and append-only Invocation bytes. A v2 reverify correction uses a
|
|
263
292
|
fresh `--invocation-id` and fresh prompt/metadata path; the materializer rejects
|
|
@@ -267,8 +296,11 @@ may fix the task-instructions file and re-run the same `materialize` call with
|
|
|
267
296
|
row names the invocation, replacement is rejected even for v1 and the prompt is
|
|
268
297
|
history. Do not delete prompt, metadata, or reservation files by hand.
|
|
269
298
|
|
|
270
|
-
|
|
271
|
-
<
|
|
299
|
+
Before a native-session dispatch, run `okstra agent-prompt verify --project-root
|
|
300
|
+
<dir> --run-manifest <path> --metadata <metadataPath> --text`. A `--jobs-file`
|
|
301
|
+
dispatch needs no separate `verify` call: jobs generation and the dispatcher
|
|
302
|
+
both run the same verification (`validate_dispatch_prompts` in
|
|
303
|
+
`scripts/okstra_ctl/dispatch_state.py`). A failed verification is a
|
|
272
304
|
pre-dispatch contract failure. For `runner=native-session`, pass only the
|
|
273
305
|
returned `hostModelValue` to the host model argument. For
|
|
274
306
|
`runner=cli-wrapper`, follow the planned execution surface after
|
|
@@ -305,15 +337,15 @@ The generated `**Errors log path:**` and `**Errors sidecar path:**` headers use
|
|
|
305
337
|
|
|
306
338
|
An older instruction file may already contain the fixed boundary. Matching values are retained once; conflicting model, task type, or forbidden-actions values are reported with the expected value and a materialization remedy. Do not edit a dispatched prompt. Use a fresh invocation ID and prompt path for a dynamic reverify correction; undispatched initial prompts can be regenerated in place by the existing recovery path.
|
|
307
339
|
|
|
308
|
-
After materialization, generate the batch file from the returned metadata paths:
|
|
309
|
-
|
|
310
340
|
Name the reverify result `<role-slug>-worker-reverify-r<N>-<task-type>-<seq>.md` under the run's authorized worker-results directory. Its generated audit path is checked before dispatch.
|
|
311
341
|
|
|
342
|
+
Materialize the round's workers and generate their jobs file in the one batch call (§"Invocation materialization gate"):
|
|
343
|
+
|
|
312
344
|
```bash
|
|
313
|
-
okstra agent-prompt
|
|
345
|
+
okstra agent-prompt materialize --project-root <root> --run-manifest <manifest> --batch <run-state>/reverify-batch-r<N>.json --jobs-out <run-state>/reverify-jobs-r<N>.json
|
|
314
346
|
```
|
|
315
347
|
|
|
316
|
-
Pass only the current engine-planned batch. The generator reads the actual result headers and canonical role execution, verifies all inputs, then publishes the file. Dispatch the emitted file with the selected adapter's `--jobs-file`; do not copy identity, path, or digest fields by hand. Existing v1 jobs-file consumers remain available.
|
|
348
|
+
`okstra agent-prompt jobs --project-root <root> --run-manifest <manifest> --dispatch-kind reverify-r<N> --metadata <meta.json> --out <jobs-file>` builds the same file from metadata that is already materialized, such as a retry's. Pass only the current engine-planned batch. The generator reads the actual result headers and canonical role execution, verifies all inputs, then publishes the file. Dispatch the emitted file with the selected adapter's `--jobs-file`; do not copy identity, path, or digest fields by hand. Existing v1 jobs-file consumers remain available.
|
|
317
349
|
|
|
318
350
|
### Required reverify output contract (BLOCKING)
|
|
319
351
|
|
|
@@ -603,7 +635,7 @@ Render the critic-only task instructions with `okstra convergence critic-prompt
|
|
|
603
635
|
verbatim — the same pattern as `okstra plan-items prompt` at round 1. Then run
|
|
604
636
|
`okstra agent-prompt
|
|
605
637
|
materialize` with `--audience scope-critic`, `--assignment-ref critic/scope`,
|
|
606
|
-
the
|
|
638
|
+
`--worker-id scope` (the run-input Worker Roster line), and `--dispatch-kind critic`. Verify the returned
|
|
607
639
|
`metadataPath` before dispatch and use its `promptPath` without modification.
|
|
608
640
|
For `runner=native-session`, use only `hostModelValue`; for
|
|
609
641
|
`runner=cli-wrapper`, use `okstra team dispatch` when `terminalBackend` is
|
|
@@ -696,8 +728,8 @@ The `final-verification` phase uses the same fresh one-shot `redispatch_worker`
|
|
|
696
728
|
|
|
697
729
|
Before that call, write the acceptance-only task instructions and run `okstra
|
|
698
730
|
agent-prompt materialize` with `--audience acceptance-critic`,
|
|
699
|
-
`--assignment-ref critic/acceptance`,
|
|
700
|
-
`--dispatch-kind critic`. **The final-verification 96-nonblank-line prompt-body
|
|
731
|
+
`--assignment-ref critic/acceptance`, `--worker-id acceptance` (the run-input
|
|
732
|
+
Worker Roster line), and `--dispatch-kind critic`. **The final-verification 96-nonblank-line prompt-body
|
|
701
733
|
cap applies to this dispatch too** — `resolve_prompt_plan` exempts a critic from
|
|
702
734
|
the analysis equality group, not from the cap. The anchors and the duty contract
|
|
703
735
|
account for roughly 51 of those lines, so the instructions you write have a
|
|
@@ -65,10 +65,10 @@ Every `okstra` command the lead documents cite, grouped by phase, each spelled w
|
|
|
65
65
|
|
|
66
66
|
| Command | Use when | Procedure |
|
|
67
67
|
|---|---|---|
|
|
68
|
-
| `okstra lead-progress append --project-root <dir> --run-manifest <path> --phase <phase-id>` | Every `PROGRESS` checkpoint; print the `progressLine` it returns. `--phase` accepts only the listed phase ids; use `--worker`, `--field NAME=VALUE`, and `--detail <text>` for the rest | this contract "Progress reporting" |
|
|
68
|
+
| `okstra lead-progress append --project-root <dir> --run-manifest <path> --phase <phase-id>` | Every `PROGRESS` checkpoint the command performing that step does not record itself; print the `progressLine` it returns. `--phase` accepts only the listed phase ids; use `--worker`, `--field NAME=VALUE`, and `--detail <text>` for the rest | this contract "Progress reporting" |
|
|
69
69
|
| `okstra agent-activity append --project-root <dir> --run-manifest <path> --kind <kind> --agent <agent> --outcome <outcome> --summary <text>` | Before each activity boundary when the run manifest declares `activityContractVersion: 1` | launch prompt "Progress reporting" |
|
|
70
70
|
| `okstra error-log append-observed --out <errors-path> --task-key <key> --phase <phase> --agent <provider-worker> --agent-role <role> --model <model> --error-type <type> --command-kind <kind> --command <command> --message <text>` | Record an observed failure. `--agent` takes the provider worker id (`codex-worker`); an execution label goes in `--execution-label` | this contract "Errors log path wiring"; `team-contract` "Worker error-log command" |
|
|
71
|
-
| `okstra approval-decision open --ledger <path> --task-key <key> --task-type <type> --run-seq <seq> --clarification-id <C-NNN> --ticket-id <id> --statement <text> --expected-form <form> --classification <class> --origin <origin> --user-confirmation <text> --unblock-condition <text> --recommended-disposition <disposition
|
|
71
|
+
| `okstra approval-decision open --ledger <path> --task-key <key> --task-type <type> --run-seq <seq> --clarification-id <C-NNN> --ticket-id <id> --statement <text> --expected-form <form> --classification <class> --origin <origin> --user-confirmation <text> --unblock-condition <text> --recommended-disposition <disposition> [--supersedes <C-NNN>]` | Open an approval blocker after the user confirmed it | this contract "User confirmation before an approval blocker" |
|
|
72
72
|
| `okstra approval-decision carry --ledger <path> --clarification-id <C-NNN> --from-responses <path>` | Carry a decision answered in an earlier run | `report-writer` "Role-owned inputs" |
|
|
73
73
|
| `okstra approval-decision resolve --ledger <path> --clarification-id <C-NNN> --disposition <disposition> --user-text <text> --user-response-ref <ref>` | Record the user's disposition of an approval row; it touches no verdict | `plan-body-verification` "Round protocol" |
|
|
74
74
|
| `okstra user-response show --report <path>` | Not a lead step: the `okstra-user-response` skill reads approval rows through it, so an `origin` outside the schema enum breaks every later read | `plan-body-verification` "Round protocol" |
|
|
@@ -77,24 +77,25 @@ Every `okstra` command the lead documents cite, grouped by phase, each spelled w
|
|
|
77
77
|
|
|
78
78
|
| Command | Use when | Procedure |
|
|
79
79
|
|---|---|---|
|
|
80
|
-
| `okstra agent-prompt materialize --project-root <dir> --invocation-id <id> --audience <audience> --instruction <path> --prompt <path>` | Materialize
|
|
81
|
-
| `okstra agent-prompt
|
|
80
|
+
| `okstra agent-prompt materialize --project-root <dir> --invocation-id <id> --audience <audience> --instruction <path> --prompt <path>` | Materialize one worker prompt; the command owns the anchor headers and paths. Add `--jobs-out <jobs-file>` in run mode to also write its verified jobs file (report writer) | `convergence` "Invocation materialization gate"; `report-writer` "Report-writer dispatch" |
|
|
81
|
+
| `okstra agent-prompt materialize --project-root <dir> --run-manifest <path> --batch <file> --jobs-out <jobs-file>` | Materialize every worker of one dispatch batch and write its jobs file in one call — one call per batch, never one per worker. For `runner=cli-wrapper` rows chain the dispatcher the execution surface selects in the same shell command: `&& okstra team dispatch … --jobs-file <jobs-file>` on `terminalBackend: cmux-pane`, `&& okstra worker-dispatch … --jobs-file <jobs-file>` otherwise. `--jobs-out` needs a v2 run manifest; `runner=native-session` rows take the batch without `--jobs-out` and keep their per-row `verify` + `record-dispatch` + host call | `convergence` "Invocation materialization gate" |
|
|
82
|
+
| `okstra agent-prompt verify --project-root <dir> --metadata <path>` | Immediately before a native-session dispatch (`record-dispatch`). Not needed before a `--jobs-file` dispatch: jobs generation and the dispatcher verify every invocation | `convergence` "Invocation materialization gate" |
|
|
82
83
|
| `okstra agent-prompt record-dispatch --project-root <dir> --run-manifest <path> --metadata <path> --enforcement-mode <mode>` | Record a native-session dispatch | `convergence` "Invocation materialization gate" |
|
|
83
84
|
| `okstra agent-prompt jobs --project-root <dir> --run-manifest <path> --dispatch-kind <kind> --metadata <path> --out <jobs-file>` | Build a verified jobs file for `okstra team dispatch` | cmux adapter "cmux dispatch details" |
|
|
84
|
-
| `okstra team dispatch --project-root <dir> --run-manifest <path>` | Dispatch pane-backed workers (`terminalBackend` is `cmux-pane`) | cmux adapter "Semantic operation mapping" |
|
|
85
|
-
| `okstra worker-dispatch --project-root <dir> --run-manifest <path>` | Dispatch CLI-backed workers when `terminalBackend` is not `cmux-pane` | this contract "Model assignments" |
|
|
86
|
-
| `okstra codex-dispatch --project-root <dir> --run-manifest <path>` | CLI-backed dispatch for a prepared Codex run; never under the cmux adapter | cmux adapter "cmux dispatch details" |
|
|
85
|
+
| `okstra team dispatch --project-root <dir> --run-manifest <path>` | Dispatch pane-backed workers (`terminalBackend` is `cmux-pane`). Records `phase-3-team-create`, `phase-4-dispatch` and `phase-6-synthesis` as this contract "Progress reporting" describes; emit its `progressLines` | cmux adapter "Semantic operation mapping" |
|
|
86
|
+
| `okstra worker-dispatch --project-root <dir> --run-manifest <path>` | Dispatch CLI-backed workers when `terminalBackend` is not `cmux-pane`. Records `phase-3-team-create`, `phase-4-dispatch`, `phase-5-collect` and `phase-6-synthesis`; emit its `progressLines` | this contract "Model assignments" |
|
|
87
|
+
| `okstra codex-dispatch --project-root <dir> --run-manifest <path>` | CLI-backed dispatch for a prepared Codex run; never under the cmux adapter. Same command as `worker-dispatch`, and records the same checkpoints | cmux adapter "cmux dispatch details" |
|
|
87
88
|
|
|
88
89
|
### Phase 5 — await and collect
|
|
89
90
|
|
|
90
91
|
| Command | Use when | Procedure |
|
|
91
92
|
|---|---|---|
|
|
92
|
-
| `okstra team await --project-root <dir> --run-manifest <path>` | Wait for pane-backed workers | cmux adapter "Semantic operation mapping" |
|
|
93
|
+
| `okstra team await --project-root <dir> --run-manifest <path>` | Wait for pane-backed workers. Records `phase-5-poll` on entry and again when the counts changed, and `phase-5-collect` for each `initial` dispatch it settled; emit the `PROGRESS:` lines it prints | cmux adapter "Semantic operation mapping" |
|
|
93
94
|
| `okstra worker-liveness --team-state <path> --dispatch-id <id>` | Probe a pending worker; add `--wait` to block until result, death, or timeout | `team-contract` "Mid-run liveness probes" |
|
|
94
95
|
| `okstra agent-prompt link-result --project-root <dir> --run-manifest <path> --dispatch-id <id> --result <path>` | Link a returned result to its dispatch | `convergence` "Invocation materialization gate" |
|
|
95
96
|
| `okstra agent-prompt reject-result --project-root <dir> --run-manifest <path> --dispatch-id <id> --superseded-by <id> --reason <text>` | Retire a linked result before a corrective dispatch links its own | `plan-body-verification` "Round protocol" |
|
|
96
97
|
| `okstra worker-audit-check --run-dir <path> --task-type <type> --seq <seq>` | Check a live worker's audit sidecars and citations before accepting its result; add `--worker <id>` | `team-contract` "Lead Redispatch Policy on Result-Missing" |
|
|
97
|
-
| `okstra team reclaim --project-root <dir> --run-manifest <path>` | Close finished dispatches' panes at a batch boundary | this contract "Progress reporting" |
|
|
98
|
+
| `okstra team reclaim --project-root <dir> --run-manifest <path>` | Close finished dispatches' panes at a batch boundary and record `phase-batch-cleanup panes=<n>`; add `--gate` before a user gate, which prints `phase-gate-cleanup` and records nothing | this contract "Progress reporting" |
|
|
98
99
|
|
|
99
100
|
### Phase 5.5 / 5.6 — convergence and critic
|
|
100
101
|
|
|
@@ -138,9 +139,9 @@ Every `okstra` command the lead documents cite, grouped by phase, each spelled w
|
|
|
138
139
|
|
|
139
140
|
| Command | Use when | Procedure |
|
|
140
141
|
|---|---|---|
|
|
141
|
-
| `okstra report-finalize --project-root <dir> --run-manifest <path> --report <path>` | Run the whole Phase 7 sequence; do not run its steps separately | `report-writer` "Phase 6 → Phase 7 execution sequence" |
|
|
142
|
+
| `okstra report-finalize --project-root <dir> --run-manifest <path> --report <path>` | Run the whole Phase 7 sequence; do not run its steps separately. Without `--only` it records `phase-7-persist` first; emit its `progressLines` | `report-writer` "Phase 6 → Phase 7 execution sequence" |
|
|
142
143
|
| `okstra report-translate check-data --run-manifest <path>` | Check an existing translation after a narrative correction | `report-writer` "Phase 6 → Phase 7 execution sequence" |
|
|
143
|
-
| `okstra handoff record-verified --plan-run-root <dir> --stage <N> --report-path <path> --data-json <path>` | Record an accepted final-verification against its stage |
|
|
144
|
+
| `okstra handoff record-verified --plan-run-root <dir> --stage <N> --report-path <path> --data-json <path>` | Record an accepted final-verification against its stage. `report-finalize` runs it in its `record-verified` step; run it by hand only to repair a registry after that step failed | `report-writer` "Phase 6 → Phase 7 execution sequence" |
|
|
144
145
|
| `okstra team teardown --project-root <dir> --run-manifest <path>` | Close every recorded pane at the end of the run | cmux adapter "Semantic operation mapping" |
|
|
145
146
|
|
|
146
147
|
**Names that do not exist.** Lead sessions have called these; each fails with `unknown command`. Use the command on the right.
|
|
@@ -219,12 +220,22 @@ A single okstra run frequently spans 30–120 minutes with multi-minute silent w
|
|
|
219
220
|
|
|
220
221
|
Record each checkpoint with `okstra lead-progress append --project-root <dir> --run-manifest <path> --phase <phase-id>`, then emit the `progressLine` it prints as the user-facing line. The command resolves `leadEventsPath` from the run manifest and writes the checkpoint there — on a host whose adapter declares `sessionAccounting: artifact-only` that ledger is the only place the post-hoc validator can read it, so a conversation line alone leaves no trace and the run is reported as missing the checkpoint. Pass `--worker <role>` on the per-worker checkpoints (it rewrites a phase-specific functional label into the roster role team-state records), `--field NAME=VALUE` for the remaining `key=value` tokens in the order the line carries them, and `--detail <text>` where the line ends in a verb phrase; the wording listed below is the default for the fixed-prose checkpoints.
|
|
221
222
|
|
|
223
|
+
Some checkpoints are recorded by the command that performs the step, because that command holds the fact the line states:
|
|
224
|
+
|
|
225
|
+
- `okstra team dispatch` (on a `terminalBackend: cmux-pane` run) and `okstra worker-dispatch` / `okstra codex-dispatch` record `phase-3-team-create using implicit team` when the dispatch is the one that writes the implicit-team marker into team-state (no `teamCreate` recorded yet), `phase-4-dispatch` for each `initial` job, and `phase-6-synthesis` on the run's first report-writer dispatch.
|
|
226
|
+
- On a `cmux-pane` run `okstra team await` records `phase-5-poll` on entry and again when the counts changed; `okstra team await` there and `okstra worker-dispatch` record `phase-5-collect worker=<role> status=<terminal-status>` for each `initial` dispatch they settled — the settlement is the result verification: the required artifact exists, the mutation audit passed and the result is linked to its dispatch, or the attempt closed as `error` / `timeout`. A retried attempt counts once its retry settles.
|
|
227
|
+
- On a `cmux-pane` run `okstra team reclaim` records `phase-batch-cleanup`.
|
|
228
|
+
- The team commands record nothing on any other `terminalBackend`: a run that dispatches with `okstra team dispatch` and waits with `okstra team await` there appends the team commands' checkpoints itself. `okstra worker-dispatch` still records its own, as listed above.
|
|
229
|
+
- `okstra report-finalize` without `--only` records `phase-7-persist` before its first step, so `validate-run` reads it.
|
|
230
|
+
|
|
231
|
+
Emit the `PROGRESS:` lines those commands print (the trailing text lines of `team await` and `team reclaim`, or `progressLines` in the JSON the others print) verbatim, and do not call `lead-progress append` for them — each extra call is one more lead turn over the whole context. Everything else still goes through `lead-progress append`: every other checkpoint; `phase-3-team-create` when the lead itself recorded the marker (the concurrent-run `skipped (concurrent-run)` variant); and `phase-4-dispatch`, `phase-5-collect` and `phase-6-synthesis` for a worker dispatched through a host-native primitive (`record-dispatch` / `link-result`). `phase-5-collect` from a command does not replace the lead's own acceptance check (`okstra worker-audit-check`), and on an activity-contract-v1 run each `worker-dispatched` / `worker-completed` activity is still the lead's to append. **Enforced:** `scripts/okstra_ctl/dispatch_checkpoints.py`, `record_checkpoint` in `scripts/okstra_ctl/lead_progress.py`, `tests/run/test_team_cmux_backend.py`, `tests/run/test_okstra_ctl_dispatcher.py`, `tests/report/test_report_finalize.py`.
|
|
232
|
+
|
|
222
233
|
For an `implementation-planning` run whose run manifest declares `activityContractVersion: 1`, record every required activity boundary with `okstra agent-activity append` against the manifest-provided `leadEventsPath`. Model-facing calls pass prose through `--summary-file <md>` and a command through `--command`, `--command-cwd`, `--command-exit-code`, and `--command-output-file <md>`; do not construct `--command-record` JSON. The ordering is fixed: the structured append succeeds first, the matching `PROGRESS:` line is emitted second, and the immediately following `ACTIVITY:` line projects the same structured fields into the conversation language. Do not reconstruct structured activity from conversation text. If the append fails, do not present that activity boundary as completed.
|
|
223
234
|
|
|
224
235
|
The live projection follows this shape:
|
|
225
236
|
|
|
226
237
|
```text
|
|
227
|
-
PROGRESS: phase-4-dispatch worker=codex-worker model=gpt-6-sol
|
|
238
|
+
PROGRESS: phase-4-dispatch worker=codex-worker model=gpt-6.1-sol
|
|
228
239
|
ACTIVITY: id=A-001 agent=codex-worker summary="Verify Stage Map paths and commands" items=P-Step-001,P-Step-002 result=runs/.../codex-worker-....md outcome=pending
|
|
229
240
|
```
|
|
230
241
|
|
|
@@ -237,19 +248,19 @@ Required checkpoints:
|
|
|
237
248
|
- `PROGRESS: phase-1-intake reading task bundle` — at the start of Phase 1, before issuing parallel Read calls.
|
|
238
249
|
- `PROGRESS: phase-1-intake complete` — after all intake reads return.
|
|
239
250
|
- `PROGRESS: phase-2-prompts preparing <N> worker prompts` — at the start of Phase 2, before any `Write` to the assigned prompt paths.
|
|
240
|
-
- `PROGRESS: phase-3-team-create <adapter-specific-status>` — after selected-adapter setup is recorded in team-state. The stable phase id is retained for artifact compatibility.
|
|
251
|
+
- `PROGRESS: phase-3-team-create <adapter-specific-status>` — after selected-adapter setup is recorded in team-state. The stable phase id is retained for artifact compatibility. When the first dispatch writes the implicit-team marker, that dispatch command records the line.
|
|
241
252
|
- `PROGRESS: phase-4-dispatch worker=<role> model=<model>` — once per worker, immediately before `dispatch_worker`. `<role>` is the **roster** role, exactly as team-state's `workers[].role` records it (`Claude worker`, `Codex worker`) — the checkpoint is matched against that entry, so a phase-specific functional label (`Claude verifier`, `Codex executor`) names no roster worker and fails the check. Only `claude-worker`-style hyphenation of the same roster role is also accepted.
|
|
242
253
|
- `PROGRESS: phase-5-poll pending=<n> done=<m>` — emitted when entering the wait and when the pending attempts or terminal outcomes change. A host wait returning without a worker state change does not create a new checkpoint.
|
|
243
|
-
- `PROGRESS: phase-5-collect worker=<role> status=<terminal-status>` — once per worker, immediately after the result file is verified. `<role>` is the roster role, same rule as `phase-4-dispatch` above.
|
|
254
|
+
- `PROGRESS: phase-5-collect worker=<role> status=<terminal-status>` — once per worker, immediately after the result file is verified. `<role>` is the roster role, same rule as `phase-4-dispatch` above. `team await` (cmux-pane run only) and `worker-dispatch` record it for the dispatches they settle.
|
|
244
255
|
- `PROGRESS: phase-5-stage stage=<N> title=<title> steps=<count>` — `implementation` only, immediately before the Executor's `phase-4-dispatch` line, after parsing the approved plan's Stage Map and this run's `**Stage for this implementation run:**` anchor. `<title>` is the stage's Stage Map title and `<count>` is its `stepwiseExecution` row count, both read from the approved plan — this is the line that tells the user WHICH plan stage this run executes. The numbering keeps the line sorted where the work happens — the stage runs in Phase 5.
|
|
245
256
|
- `PROGRESS: phase-5-stage-complete stage=<N> steps=<done>/<count>` — `implementation` only, immediately after the Executor result is verified and its `### Stage Carry Evidence` block is parsed, before the verifier dispatch. `<done>` counts the block's `stepResults[]` rows whose `status` is `done` — read from the emitted block, never recomputed from git. Omitted when the Executor ends without carry evidence (`FAIL` or a non-result); the user then learns the outcome from `phase-5-collect status=<terminal-status>`.
|
|
246
257
|
- `PROGRESS: phase-5.5-convergence round=<N> queue=<count>` — at the start of each convergence round (Phase 5.5).
|
|
247
258
|
- `PROGRESS: phase-5.6-critic provider=<provider> gaps=<n>` — after the critic result is collected (Phase 5.6, opt-in; the critic dispatch itself fires concurrently with the first 5.5 reverify round). Omitted when `convergence.critic.enabled == false`.
|
|
248
|
-
- `PROGRESS: phase-batch-cleanup panes=<n>` — immediately after cleaning up the previous batch's panes, at each batch boundary (① just before the first `phase-5.5-convergence` round ② just before the `phase-6-synthesis` report-writer dispatch). `<n>` is the number of panes closed at that boundary — the panes of dispatches this run recorded and that have since finished —
|
|
249
|
-
- `PROGRESS: phase-6-synthesis dispatching report-writer-worker` — at the start of Phase 6.
|
|
259
|
+
- `PROGRESS: phase-batch-cleanup panes=<n>` — immediately after cleaning up the previous batch's panes, at each batch boundary (① just before the first `phase-5.5-convergence` round ② just before the `phase-6-synthesis` report-writer dispatch). `<n>` is the number of panes closed at that boundary — the panes of dispatches this run recorded and that have since finished — counted by `okstra team reclaim --project-root <dir> --run-manifest <path>` as the panes that pass closed, never estimated; no `--dry-run` pass is needed to learn it. A pane the harness opened for its own teammate carries no recorded id, so it is not counted and not closed. Expose only the counts and NEVER expose a raw `paneId` or worker handle. Just before the first batch (analysis-worker dispatch) there is nothing to clean up, so it is a no-op and the marker is omitted.
|
|
260
|
+
- `PROGRESS: phase-6-synthesis dispatching report-writer-worker` — at the start of Phase 6. `team dispatch` (cmux-pane run only) and `worker-dispatch` record it on the first report-writer dispatch; on any other backend a `team dispatch` run appends it with `lead-progress append`.
|
|
250
261
|
- `PROGRESS: phase-5.5.9-plan-verify round=<N> items=<count>` — immediately before dispatching each plan-body verification round (`implementation-planning` only; see `plan-body-verification` (the absolute path in **Okstra Runtime Resources**) §"Round protocol"). Each round is a worker batch like any other, so round 2 and later MUST be preceded by a `phase-batch-cleanup` line reclaiming the previous round's verifiers. The numbering keeps this line sorted where the work happens — after Phase 6, because the round verifies the drafted plan body.
|
|
251
262
|
- `PROGRESS: user-confirm <C-NNN> <the question, one line>` — immediately before asking the user about anything that would otherwise become an open `Blocks=approval` row (see "User confirmation before an approval blocker" below). Not tied to a phase: it fires wherever the blocker surfaces. `<C-NNN>` is the id the row will carry, so the answer and the row can be matched afterwards.
|
|
252
|
-
- `PROGRESS: phase-7-persist updating manifests` — at the start of Phase 7.
|
|
263
|
+
- `PROGRESS: phase-7-persist updating manifests` — at the start of Phase 7. `okstra report-finalize` records it.
|
|
253
264
|
- `PROGRESS: phase-7-teardown shutting-down-workers` — only after usage collection and user approval, immediately before `shutdown_workers`; omitted when no cleanup resource exists or the user keeps it.
|
|
254
265
|
- `PROGRESS: complete final-report=<relative-path>` — final summary line, after all persistence.
|
|
255
266
|
|
|
@@ -326,7 +337,7 @@ The table below documents those prep-time seed values **for reference only** —
|
|
|
326
337
|
| Lead role | opus | -- | runtime-specific role label; orchestration + convergence supervision + final-report review/approval |
|
|
327
338
|
| Report writer worker | sonnet | report-writer-worker | common + role + duty contracts composed per invocation; `native-session` execution |
|
|
328
339
|
| Claude worker | opus | claude-worker | common + role + duty contracts composed per invocation; `native-session` execution |
|
|
329
|
-
| Codex worker | gpt-6-sol | codex-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
|
|
340
|
+
| Codex worker | gpt-6.1-sol | codex-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
|
|
330
341
|
| Antigravity worker | gemini-3.1-pro | antigravity-worker | duty + task instructions composed per invocation; deterministic `worker-dispatch` execution |
|
|
331
342
|
|
|
332
343
|
Each analysis assignment follows its recorded `runner`. `runner=native-session` uses the host's native subagent primitive after `host-native-spec-link-gate`. `runner=cli-wrapper` follows the planned execution surface after `core-pre-dispatch` verification: `okstra team dispatch` when `terminalBackend` is `cmux-pane`, otherwise the deterministic `okstra worker-dispatch` process boundary. No LLM transport wrapper sits in front of a provider CLI.
|
|
@@ -450,7 +461,7 @@ For `improvement-discovery`, Lead records `## Primary Pass Assignments` in the P
|
|
|
450
461
|
2. Verify the run manifest's `leadRuntime`, `leadAdapter`, dispatch backend, concurrency metadata, and artifact paths.
|
|
451
462
|
3. Execute the adapter's pre-dispatch setup without substituting another adapter's primitive.
|
|
452
463
|
4. Persist the setup outcome in team-state using the existing fields required by that backend.
|
|
453
|
-
5. Emit the canonical `PROGRESS: phase-3-team-create <adapter-specific-status>` checkpoint. The phase id remains stable for artifact compatibility; only the adapter-owned verb phrase varies.
|
|
464
|
+
5. Emit the canonical `PROGRESS: phase-3-team-create <adapter-specific-status>` checkpoint. The phase id remains stable for artifact compatibility; only the adapter-owned verb phrase varies. When the implicit-team marker is written by the first `team dispatch` / `worker-dispatch`, that command records the line and prints it; emit it from there.
|
|
454
465
|
|
|
455
466
|
**Enforced:** `validators/validate_session_conformance.py` `_check_progress_checkpoints` requires the `phase-3-team-create` checkpoint once any worker was dispatched, and `validate-run.py` `validate_team_state` reads the setup outcome this phase persists.
|
|
456
467
|
|
|
@@ -633,6 +644,7 @@ The run-level error log lives at `<runDir>/logs/errors-<task-type>-<seq>.jsonl`.
|
|
|
633
644
|
| Injecting `[Required reading]` into lightweight reverify prompts | Lightweight reverify forbids re-reading source materials — see [convergence](./convergence.md) "Reverify prompt: required-reading suppression" |
|
|
634
645
|
| Letting `convergence.maxRounds` default to 2 for `requirements-discovery` | Resolve effective default to `1` for discovery and put it in the grouped input |
|
|
635
646
|
| Issuing serial Read calls in Phase 1 | The intake files are independent — issue all Read calls in a single message (parallel) |
|
|
647
|
+
| Running `agent-prompt materialize`, `jobs`, or a jobs-file dispatcher once per `runner=cli-wrapper` worker of a batch | One `okstra agent-prompt materialize --project-root <dir> --run-manifest <path> --batch <file> --jobs-out <jobs-file>` call per batch, chained with the dispatcher the execution surface selects (`okstra team dispatch` on `cmux-pane`, `okstra worker-dispatch` otherwise) and `--jobs-file <jobs-file>`. Native-session rows still dispatch one host call per row — see [convergence](./convergence.md) "Invocation materialization gate" |
|
|
636
648
|
| Flagging an adapter-shortened dispatch prompt as "incomplete" because it omits host-loaded material | The Worker Preamble pointer and core inputs remain mandatory; the selected adapter may omit duplicate host-loaded definitions |
|
|
637
649
|
| Waiting silently after `dispatch_worker` returns without a completed worker artifact | A dispatch acknowledgement is not completion — call `await_workers` and enforce the selected adapter's liveness policy |
|
|
638
650
|
| Re-sending a finding absent from the persisted round plan | Dispatch exactly the engine-returned `findingIds`; see [convergence](./convergence.md) "Re-verification Dispatch" |
|
|
@@ -22,7 +22,7 @@ Report assembly reads the role-owned inputs, validates them, derives links and s
|
|
|
22
22
|
| design-preparation snapshot | design-surface detector | `designPreparationPath` |
|
|
23
23
|
| final report record | report assembly | `expectedReportRecordPath` |
|
|
24
24
|
|
|
25
|
-
An active clarification exists only in `activeClarifications[]`. A decision carried from a previous run exists only in `carriedDecisions[]`; do not recreate it as an active question.
|
|
25
|
+
An active clarification exists only in `activeClarifications[]`. A decision carried from a previous run exists only in `carriedDecisions[]`; do not recreate it as an active question. When the user replaces a carried decision in this run, open the new question with `--supersedes <carried C-NNN>`. Once the new row is resolved, report assembly publishes the carried row as `obsolete`, and the next run does not carry it (`scripts/okstra_ctl/report_assembly.py` `_clarifications`, `scripts/okstra_ctl/approval_decisions.py` `seed_carried_decisions`). Without it the replaced answer stays `answered` and is carried next to its replacement.
|
|
26
26
|
|
|
27
27
|
Prepare seeds `carriedDecisions[]` when it creates the ledger: every clarification the run's carry-in record answered or resolved, plus every row that record's user-responses sidecars answered, arrives carried (`scripts/okstra_ctl/approval_decisions.py` `seed_carried_decisions`). The carry-in record is the `--clarification-response` file; for a new plan it is the option-selection record `--selected-direction` names, and for an implementation run the approved plan `--approved-plan` names (`render._carry_in_source`) — the same pointer assembly writes to `clarificationCarryIn.sourceFile`, so the page links those ids to the prior run's page. A carried plan row's `requirementCoverage[].decisionRefs` may still name a `C-NNN` the carry-in record does not answer — a decision from an older run. Carry it before assembly: `okstra approval-decision carry --ledger <approvalDecisionsPath> --from-responses <launch prompt "Clarification Response Carried In" → Source path> --clarification-id C-NNN` — repeat `--clarification-id` to take several in one call. That bundle is the source of truth for an earlier run's answer: it is task-level and cumulative, so no prior run seq has to be located, and each response section names the report that posed the question, which is where the row's `statement`, `expectedForm`, and options come from. A carried row lands as `answered`, not `resolved` — it was resolved in another run, and `resolution.checkRefs` names *this* run's activity rows. Carrying an answer also obliges a `supersessionLedger` entry for it.
|
|
28
28
|
|
|
@@ -71,7 +71,7 @@ Materialize the duty prompt with `okstra agent-prompt materialize --audience rep
|
|
|
71
71
|
|
|
72
72
|
The errors sidecar anchor reserves the runtime-owned write-artifact path used by dispatch validation. No model-authored error JSON file is part of report-writer dispatch; failures use the typed error-log command from the worker error contract.
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
Add `--jobs-out <run-state>/report-writer-jobs.json` to that materialize call: it writes the verified v2 jobs file as `okstra agent-prompt jobs --project-root <root> --run-manifest <manifest> --dispatch-kind report-writer --metadata <returned-meta.json> --out <run-state>/report-writer-jobs.json` would, without a second call. Pass the generated file through the selected deterministic dispatcher's `--jobs-file`. The generator reads the narrative and worker-result headers and validates their existing manifest contract. For host-native dispatch, use `okstra agent-prompt record-dispatch` and `link-result`; deterministic dispatchers record their own invocation lifecycle.
|
|
75
75
|
|
|
76
76
|
When `terminalBackend` is `cmux-pane`, use `okstra team dispatch --project-root <root> --run-manifest <manifest> --jobs-file <jobs-file>`. For a CLI wrapper, use `okstra worker-dispatch --project-root <root> --run-manifest <manifest> --jobs-file <jobs-file>`. Both paths use `okstra team await` to collect completion.
|
|
77
77
|
|
|
@@ -129,7 +129,7 @@ For historical schema-v1 Markdown only, the following heading table remains a re
|
|
|
129
129
|
|
|
130
130
|
**Enforced:** `okstra_ctl.report_finalize.V3_STEP_ORDER` is the order — `report-finalize` runs the steps from that tuple, so the sequence cannot be reordered by a caller. Running the steps by hand is what this rule forbids, and that path is not reachable through the CLI.
|
|
131
131
|
|
|
132
|
-
Do not run the
|
|
132
|
+
Do not run the eleven steps below manually. Invoke `okstra report-finalize`; contract 3.0 runs them in this order:
|
|
133
133
|
|
|
134
134
|
1. **`token-usage`** — collect usage into team state without touching the final record.
|
|
135
135
|
2. **`project-activity`** — report assembly validates every owner input and publishes the final record once.
|
|
@@ -137,9 +137,11 @@ Do not run the nine steps below manually. Invoke `okstra report-finalize`; contr
|
|
|
137
137
|
4. **`translate`** — for a non-English `reportLanguage`, materialize and dispatch the translator worker and require its `*.i18n.<lang>.json` sidecar; a no-op for English or when the sidecar already exists.
|
|
138
138
|
5. **`render-views`** — render the Markdown reading copy and human HTML, with the translation sidecar overlaid.
|
|
139
139
|
6. **`spawn-followups`** — materialize registered follow-up tasks.
|
|
140
|
-
7. **`
|
|
141
|
-
8. **`
|
|
142
|
-
9. **`
|
|
140
|
+
7. **`record-verified`** — for a final-verification whose verdict clears the work for release, run `okstra handoff record-verified` once per stage in `finalVerification.stageReports`, so the `verified` rows exist before validation reads them; a no-op for other task types and for a verdict that blocks release. Do not run `handoff record-verified` by hand.
|
|
141
|
+
8. **`validate-run`** — validate the record, views, run manifest, and team state.
|
|
142
|
+
9. **`record-group-memory`** — write this run's conclusion (headline, decisions, watch-outs, open follow-ups, record path, next phase) and the group's start order into the task-group's `group-context.md` okstra region, creating the file when the group has none; skipped, like teardown, when an earlier step failed. Sibling tasks read it as `## Task-Group Memory`.
|
|
143
|
+
10. **`teardown-stages`** — remove eligible stage worktrees after successful validation.
|
|
144
|
+
11. **`prune-run-artifacts`** — remove every `node_modules` and `.next` directory under the run directory, and the dispatch snapshots (`*.mutation-audit.json`) and publication locks (`*.publish.lock`) recorded by a run whose validation passed or by an earlier run in the same run directory as a passed run; it runs even after a failed step.
|
|
143
145
|
|
|
144
146
|
After `report-finalize` returns with `ok: true`, the lead closes the run with the launch prompt's User closeout. A generated HTML file alone does not establish successful validation.
|
|
145
147
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
- every `Kind=decision` clarification row is recorded by the lead in the approval decision ledger — one `okstra approval-decision open --ledger <approvalDecisionsPath>` call per row, before report assembly runs. Assembly reads `clarificationItems[]` from that ledger and from nowhere else, so a decision that exists only as narrative prose reaches no reader and no answer channel: `okstra user-response` cannot offer a row the ledger never carried, and the HTML prints "No further decision is needed" over the top of it. Each option is an object with eight fields:
|
|
2
2
|
- `role` — `recommended` for the single best answer, `alternative` for the rest. Exactly one option per row is `recommended`.
|
|
3
3
|
- `answer` — the choice itself, phrased so the user can pick it as-is. Keep it to a short phrase (roughly 120 characters); the reasoning and the consequences have their own fields below.
|
|
4
|
-
- `rationale` —
|
|
4
|
+
- `rationale` — why this option is on the board, as long as the reason needs.
|
|
5
5
|
- `reach` — exactly one of `in-repo` or `cross-repo`.
|
|
6
6
|
- `scopeEffects` — optional tokens drawn from `{new-schema, deferrable}`.
|
|
7
|
-
- `addedWork` —
|
|
8
|
-
- `directionChange` —
|
|
7
|
+
- `addedWork` — the work this choice creates that the other choices do not. Name the files, stages, or commands; do not substitute a cost adjective.
|
|
8
|
+
- `directionChange` — what this choice reverses: an approved plan item, a recorded decision, an earlier answer. Name that item. When it reverses nothing, say so.
|
|
9
9
|
- `disposition` — the effect of selecting the option. Use `select` for `user-decision`. Use `accept-risk` on any classification, including `correctness-critical`, when the user ends the gate and leaves the DISAGREE on the record. Use `request-revision` or `reject` when the option sends the plan back.
|
|
10
10
|
- report assembly derives `approvalContext`, status, and resolution. `approvalContext` contains only `classification`, `unblockCondition`, and `recommendedDisposition`; it never copies plan or activity identifiers.
|
|
11
11
|
- a `C-NNN` you name outside the row itself must be a row that exists. One place is checked: a `blocked` `endStateCoverage` row's `blockedBy.ref`, when its `kind` is `clarification` — see each phase profile's `blockedBy` rule and `validators/validate-run.py` `_validate_end_state_blocked_by`. Everywhere else — `coveredBy`, `rationale`, `verdictCard.nextStep`, `finalVerdict.nextStep`, `humanSummary.actions[]`, `recommendedNextSteps[].text` — is free prose and stays uncheckable: a shipped report legitimately writes `C-057 through C-068 are applied or carried` or `C-201 does not apply`, and a validator scanning those fields for ids would fail 15 of the 56 reports on disk. There it is on you not to send a reader after an id with no row. An id an earlier run already answered reaches this report as a carried decision — prepare seeds `carriedDecisions[]` from the run's carry-in record, and `okstra approval-decision carry` admits one that record does not answer — never by citing it bare. `crossVerification` rows are numbered `CV-NNN` so a `C-NNN` has exactly one meaning.
|
|
12
|
-
- the three impact fields answer three different questions — how far the change reaches, what new work it creates, and what it overturns. Someone choosing between options needs all three, so never fold them into one
|
|
12
|
+
- the three impact fields answer three different questions — how far the change reaches, what new work it creates, and what it overturns. Someone choosing between options needs all three, so never fold them into one field: whichever axis is easiest to write would silently stand in for the other two.
|
|
13
13
|
- a row that omits `options[]`, offers fewer than two, or marks zero or two options as `recommended` is incomplete and must be completed before the report is finalised.
|
|
14
14
|
- `expectedForm` states only the *shape* of the answer — one of the options, a file path, a number, a date. It never lists the choices again; two sources for one fact leave consumers disagreeing about which is authoritative.
|
|
15
15
|
- **Enforced:** `scripts/okstra_ctl/approval_decisions.py`, `schemas/final-report-v3.0.schema.json`, and `scripts/okstra_ctl/report_assembly.py`.
|
|
@@ -5,7 +5,7 @@ Edit here once; every profile picks the change up at next render. Do NOT
|
|
|
5
5
|
add phase-specific rules to this file — phase rules stay in the per-
|
|
6
6
|
profile document.
|
|
7
7
|
-->
|
|
8
|
-
- Team contract (shared): roster roles, model-assignment rules, dispatch invariants, and required-worker attempt rules are canonical in the team contract (`prompts/lead/team-contract.md`). Two consequences every phase honours: the host-native Okstra lead is synthesis-only (in `implementation`, distinct from the `Executor` and verifiers), and unnamed generic parallel workers never replace or extend the per-profile `Required workers:` roster. Prep-time model recommendations come from the catalog defaults in `okstra_ctl.models` (for example, `Codex worker` → `gpt-6-sol`); at dispatch time the task-manifest's materialized assignment is the only source — there is no dispatch-time fallback.
|
|
8
|
+
- Team contract (shared): roster roles, model-assignment rules, dispatch invariants, and required-worker attempt rules are canonical in the team contract (`prompts/lead/team-contract.md`). Two consequences every phase honours: the host-native Okstra lead is synthesis-only (in `implementation`, distinct from the `Executor` and verifiers), and unnamed generic parallel workers never replace or extend the per-profile `Required workers:` roster. Prep-time model recommendations come from the catalog defaults in `okstra_ctl.models` (for example, `Codex worker` → `gpt-6.1-sol`); at dispatch time the task-manifest's materialized assignment is the only source — there is no dispatch-time fallback.
|
|
9
9
|
- Worker interaction model (shared — read before inferring behaviour from the roster):
|
|
10
10
|
- the per-profile `Required workers:` block is a **roster**, not a behaviour contract. Each role's interaction mode changes across operating phases of the same run.
|
|
11
11
|
- **Phase 4 / 5 (independent analysis)**: every analyser in the resolved provider assignment roster produces findings independently and has no access to another worker's output. `report-writer` does not analyse.
|
|
@@ -391,7 +391,8 @@
|
|
|
391
391
|
"__free_input__": "직접 입력"
|
|
392
392
|
},
|
|
393
393
|
"labels": {
|
|
394
|
-
"siblings": "같은 group 의 task
|
|
394
|
+
"siblings": "같은 group 의 다른 task 전부 사용: {snippet}",
|
|
395
|
+
"siblings_count": " — 총 {count}개"
|
|
395
396
|
},
|
|
396
397
|
"echo_suffixes": {
|
|
397
398
|
"skip": "related-tasks: (none)",
|
|
@@ -81,7 +81,7 @@ Render every numbered item as its option label followed by its description verba
|
|
|
81
81
|
| `await_workers` | Await native host workers through the host primitive and CLI workers through their status sidecars, then verify terminal state and Result Paths. |
|
|
82
82
|
| `redispatch_worker` | Materialize and verify a fresh invocation, then start a fresh native worker or deterministic `worker-dispatch` attempt according to the persisted runner. |
|
|
83
83
|
| `shutdown_workers` | Perform host or process cleanup only for resources owned by this run. |
|
|
84
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
84
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
85
85
|
| `collect_usage` | Collect host- or artifact-backed usage through the existing Okstra token-usage path; do not substitute another runtime's session log. |
|
|
86
86
|
|
|
87
87
|
## Antigravity dispatch details
|
|
@@ -162,7 +162,7 @@ The `confirm` prompt's `label` is the selection summary (one line per resolved i
|
|
|
162
162
|
| `await_workers` | Arm one background shell poll for the pending Result Paths; the spawn acknowledgement is not completion. |
|
|
163
163
|
| `redispatch_worker` | Materialize and verify a fresh invocation, then use a fresh native `Agent(...)` session or `okstra worker-dispatch` attempt according to the persisted runner. |
|
|
164
164
|
| `shutdown_workers` | For each confirmed-complete worker selected for cleanup, send `SendMessage(to: <name>, message: { type: "shutdown_request" })` to idle the roster member **and** call `TaskStop(task_id: "<name>")` to stop its background task. Both are required; neither subsumes the other. |
|
|
165
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`, including activity-contract-v1 records. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
165
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`, including activity-contract-v1 records. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
166
166
|
| `collect_usage` | Run `okstra token-usage` against the team-state; it reads the run-scoped `~/.claude/projects` session JSONL evidence. |
|
|
167
167
|
|
|
168
168
|
## Dispatch variants
|
|
@@ -190,7 +190,7 @@ The `confirm` prompt's `label` is the selection summary (one line per resolved i
|
|
|
190
190
|
### Reverify, critic, and report-writer assignments
|
|
191
191
|
|
|
192
192
|
- For convergence reverify, consume the persisted round plan exactly. This adapter may map and transport each returned batch, but it cannot change batch membership and does not classify findings or branch on task type, provider, or model identity.
|
|
193
|
-
- Reverify dispatch materializes `reverification-worker
|
|
193
|
+
- Reverify dispatch materializes `reverification-worker` for every worker of the round in one `materialize --batch` call (convergence "Invocation materialization gate"), verifies its metadata, then uses a fresh one-shot native call named `<workerId>-worker-reverify-r<N>` or a fresh deterministic `worker-dispatch` attempt according to the persisted runner.
|
|
194
194
|
- Critic dispatch uses `name: "<provider>-worker-critic"`, `dispatchKind: "critic"`, and the exact mapped model from `config.critic.modelExecutionValue`. If that value cannot be mapped, record `critic-skipped: model-unresolved` and do not dispatch.
|
|
195
195
|
- Report-writer dispatch uses `name: "report-writer"` only for a native Claude assignment and passes `hostModelValue`. A CLI assignment goes through `worker-dispatch` with `modelExecutionValue`.
|
|
196
196
|
- Each variant persists its prompt path, Result Path, worker-results path, error paths, and `dispatchKind` before dispatch. Completion uses the shared background Result Path poll; an Agent acknowledgement never completes the variant.
|
|
@@ -223,9 +223,9 @@ The `confirm` prompt's `label` is the selection summary (one line per resolved i
|
|
|
223
223
|
|
|
224
224
|
- At run start, record `teamName` as the audit label in team-state and populate `lead.sessionId`; the session transcript lives under `~/.claude/projects/<encoded-cwd>/<sessionId>.jsonl`. You do NOT write `teamCreate`: `okstra team dispatch` records the implicit-team marker (`{ attempted: false, status: "implicit" }`) itself, on every dispatch path, because v2.1.178 made that value a constant rather than a judgment. The one marker that IS yours is the concurrent-run decision — a concurrent run records `teamCreate: { attempted: false, status: "skipped", reason: "concurrent-run" }` **before** the first dispatch, and dispatch then leaves it alone.
|
|
225
225
|
- Collect and persist token usage before any live-roster cleanup, including cleanup between batches and the run-end shutdown sequence.
|
|
226
|
-
- Before each new worker batch (and before the next phase's render-bundle), close the panes of the dispatches that finished in the prior round
|
|
227
|
-
- Reclaiming a pane does not stop the worker's background task. Every `dispatch_worker` Agent runs with `run_in_background: true`, so a worker whose result is already collected stays a live background task for the rest of the session — that residue is what fills the harness's exit-time `Background work is running` list. At the same batch boundary, right after the pane reclaim, call `TaskStop(task_id: "<name>")` once per worker of the completed batch, passing the exact `name` used at dispatch (`<workerId>-worker`, `<workerId>-worker-reverify-r<N>`, `<provider>-worker-critic`, `report-writer`). Stop only workers whose results were already collected — never an in-flight worker, never the lead, and keep `report-writer` while it is in flight, matching the pane pass's `--keep report-writer-worker`. `TaskStop` on an already-finished task is a no-op; treat a failure as benign, record nothing, and continue the boundary. This runs even when the pane
|
|
228
|
-
- Before any `prompt_user`/`AskUserQuestion` that follows worker dispatch — an approval, clarification, or decision gate — run
|
|
226
|
+
- Before each new worker batch (and before the next phase's render-bundle), close the panes of the dispatches that finished in the prior round with `okstra team reclaim --project-root "<PROJECT_ROOT>" --run-manifest "<RUN_MANIFEST_PATH>"`. It records the neutral contract's `phase-batch-cleanup panes=<n>` checkpoint with the number it closed and prints that `PROGRESS:` line last; emit it as printed and do not call `okstra lead-progress append` for it. Call it after collecting that round's results and token usage and before the next dispatch. The command reads each dispatch's recorded status, so an in-progress worker keeps its pane whichever moment you call it — you do not scope the pass by hand. It closes only the panes okstra opened and recorded; a pane the harness opened for itself carries no recorded id and is not okstra's to close. A `cli-wrapper` run holds no pane at all and `team reclaim` refuses it, so record the checkpoint there with `okstra lead-progress append … --phase phase-batch-cleanup --field panes=0`.
|
|
227
|
+
- Reclaiming a pane does not stop the worker's background task. Every `dispatch_worker` Agent runs with `run_in_background: true`, so a worker whose result is already collected stays a live background task for the rest of the session — that residue is what fills the harness's exit-time `Background work is running` list. At the same batch boundary, right after the pane reclaim, call `TaskStop(task_id: "<name>")` once per worker of the completed batch, passing the exact `name` used at dispatch (`<workerId>-worker`, `<workerId>-worker-reverify-r<N>`, `<provider>-worker-critic`, `report-writer`). Stop only workers whose results were already collected — never an in-flight worker, never the lead, and keep `report-writer` while it is in flight, matching the pane pass's `--keep report-writer-worker`. `TaskStop` on an already-finished task is a no-op; treat a failure as benign, record nothing, and continue the boundary. This runs even when the pane pass found nothing to close, because the background tasks exist either way.
|
|
228
|
+
- Before any `prompt_user`/`AskUserQuestion` that follows worker dispatch — an approval, clarification, or decision gate — run `okstra team reclaim … --gate`: it closes the finished panes and prints `PROGRESS: phase-gate-cleanup panes=<n>` for you to emit, without recording a batch cleanup. Then `TaskStop(task_id: "<name>")` each completed worker, exactly as at a batch boundary. A bare `TaskStop` idles the roster task and closes no pane, so it is never cleanup on its own. This keeps the user from being shown a gate while finished worker panes are still open. After that cleanup, follow the lead contract "User confirmation before an approval blocker": read cited plan items, worker findings, and files before asking, and ask in the user's language with each option's outcome.
|
|
229
229
|
- After batch cleanup, record the current live session generation with `okstra token-usage "<TEAM_STATE_PATH>" --record-observed-session --project-root "<PROJECT_ROOT>"`. This protects usage accounting when Claude Code re-issues the session id after resume or compaction.
|
|
230
230
|
- Claude Code cannot delete the implicit team or surgically remove an idle roster entry. Explain that teammates may remain visible until session end and, when needed, give the manual action `Delete team <teamName> in Teams/FleetView`.
|
|
231
231
|
|
|
@@ -173,7 +173,7 @@ Display the question only through the selected tool. Do not print it or its opti
|
|
|
173
173
|
| `await_workers` | Await native host workers through the host primitive and CLI workers through synchronous dispatch, then verify team-state terminal records and Result Paths for both. |
|
|
174
174
|
| `redispatch_worker` | Materialize and verify a fresh invocation, then start a fresh native worker or `okstra worker-dispatch` attempt according to the persisted runner. |
|
|
175
175
|
| `shutdown_workers` | Perform process cleanup when a wrapper remains live; otherwise this operation is a no-op recorded in state. |
|
|
176
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
176
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
177
177
|
| `collect_usage` | Collect artifact/rollout-backed usage through the existing Okstra token-usage path; never read Claude session JSONL as a substitute. |
|
|
178
178
|
|
|
179
179
|
## Codex execution permissions
|
|
@@ -81,7 +81,7 @@ Render every numbered item as its option label followed by its description verba
|
|
|
81
81
|
| `await_workers` | Run `okstra team await --project-root <root> --run-manifest <path>` through the host's asynchronous shell facility. |
|
|
82
82
|
| `redispatch_worker` | Create the core-specified fresh jobs file and dispatch it with a new `dispatchKind`; never reuse a live worker conversation. |
|
|
83
83
|
| `shutdown_workers` | Run `okstra team teardown --project-root <root> --run-manifest <path>` only after the user-approved cleanup gate. |
|
|
84
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
84
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
85
85
|
| `collect_usage` | Collect artifact/CLI-log-backed usage through the existing Okstra token-usage path; never substitute another runtime's session log. |
|
|
86
86
|
|
|
87
87
|
## External dispatch details
|
|
@@ -91,7 +91,8 @@ Render every numbered item as its option label followed by its description verba
|
|
|
91
91
|
- Worker completion is valid only from `workerDispatches[]`, terminal status sidecars, and required Result Paths. Pane creation alone is not completion.
|
|
92
92
|
- Reverify uses a fresh jobs file at `runs/<task-type>/state/reverify-jobs-r<N>-<task-type>-<seq>.json`, sets `dispatchKind: "reverify-r<N>"`, and dispatches with `okstra team dispatch --project-root <root> --run-manifest <path> --dispatch-kind reverify-r<N> --jobs-file <jobs-file>`.
|
|
93
93
|
- Report-writer uses a fresh one-job jobs file with `dispatchKind: "report-writer"` and the same schema, then dispatches through `okstra team dispatch --project-root <root> --run-manifest <path> --jobs-file <jobs-file>`.
|
|
94
|
-
-
|
|
94
|
+
- Build a batch's jobs file in the call that materializes it: one `materialize --batch <file> --jobs-out <jobs-file>` call for every worker of the batch (convergence "Invocation materialization gate"), or one `materialize … --jobs-out <jobs-file>` call for the report writer, chained with `&& okstra team dispatch … --jobs-file <jobs-file>` in the same shell command. One materialize, verify, or jobs call per worker adds one lead turn over the whole context per worker; `team dispatch` verifies every invocation of the jobs file, so no `agent-prompt verify` call precedes it.
|
|
95
|
+
- For metadata already materialized (a retry), generate v2 reverify and report-writer jobs files with `okstra agent-prompt jobs --project-root <root> --run-manifest <path> --dispatch-kind <kind> --metadata <prompt-meta.json> [--metadata <prompt-meta.json>] --out <jobs-file>`. It verifies the inputs and derives canonical identity, role, result paths, and all five digests. Reverify uses role `verifier`; its round belongs to `dispatchKind`. Do not transcribe metadata fields or add `workerId` to v2 files. Existing v1 jobs-file consumers remain available. Report-writer completion uses the narrative and worker-result pointer; Phase 7 later assembles `data.json`.
|
|
95
96
|
- After either dispatch, run `okstra team await --project-root <root> --run-manifest <path>` before evaluating terminal status or completion paths.
|
|
96
97
|
|
|
97
98
|
## Completion, cleanup, and resume
|
|
@@ -158,7 +158,7 @@ For a `host-text` mapping, render each numbered item as its option label followe
|
|
|
158
158
|
| `await_workers` | Await through the selected common dispatch backend, then verify terminal state and Result Paths. |
|
|
159
159
|
| `redispatch_worker` | Start a fresh attempt from the persisted assignment and record the supplied dispatch kind. |
|
|
160
160
|
| `shutdown_workers` | Clean up only host or process resources owned by this run. |
|
|
161
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
161
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
162
162
|
| `collect_usage` | Return explicit unavailable lead usage until Grok registers a session transcript or CLI usage artifact contract. |
|
|
163
163
|
|
|
164
164
|
- This host declares no worker session contract. A `runner=native-session` worker therefore receives no host session rules beyond its duty contract, the selected preamble, and the task instructions; the dispatch prompt carries no `**Host Session Contract Path:**` header. Declaring one means adding `workerSessionContract` to this adapter's `manifest.json` and descriptor — it is never installed into a host-global discovery path.
|
|
@@ -80,7 +80,7 @@ Render every numbered item as its option label followed by its description verba
|
|
|
80
80
|
| `await_workers` | Await through the selected common dispatch backend, then verify terminal state and Result Paths. |
|
|
81
81
|
| `redispatch_worker` | Start a fresh attempt from the persisted assignment and record the supplied dispatch kind. |
|
|
82
82
|
| `shutdown_workers` | Clean up only host or process resources owned by this run. |
|
|
83
|
-
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
83
|
+
| `record_lead_event` | Append progress and activity records to the manifest-provided `leadEventsPath`. Use `okstra lead-progress append --phase <phase-id>` for a checkpoint the command performing that step does not record itself (the lead contract "Progress reporting" lists the ones `team dispatch`, `team await`, `team reclaim`, `worker-dispatch` and `report-finalize` record; emit the `PROGRESS:` lines they print instead) and `okstra agent-activity append --kind <kind>` for an activity record; both resolve the ledger path from the run manifest. Emit the matching `PROGRESS:` line — the command prints it as `progressLine` — and, when an activity record is required, the immediately following `ACTIVITY:` line from the same structured fields. |
|
|
84
84
|
| `collect_usage` | Return explicit unavailable lead usage until Kimi registers a session transcript or CLI usage artifact contract. |
|
|
85
85
|
|
|
86
86
|
- This host declares no worker session contract. A `runner=native-session` worker therefore receives no host session rules beyond its duty contract, the selected preamble, and the task instructions; the dispatch prompt carries no `**Host Session Contract Path:**` header. Declaring one means adding `workerSessionContract` to this adapter's `manifest.json` and descriptor — it is never installed into a host-global discovery path.
|
|
@@ -16,22 +16,6 @@ from okstra_ctl.domain.worker_presentation import SplitText
|
|
|
16
16
|
import okstra_ctl.model_discovery as model_discovery
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
# 모델 식별자와 순서는 Codex의 `~/.codex/models_cache.json`을 따른다
|
|
20
|
-
# (2026-09-23 확인, 클라이언트 0.155.0): gpt-6 astra / sol / luna 와 5.6 계열의
|
|
21
|
-
# sol / terra / luna. `gpt-5.6` is not a slug that catalog offers at all, so it
|
|
22
|
-
# is gone from here; its rate moved to `_LEGACY_CODEX_PRICING` so past runs
|
|
23
|
-
# still price.
|
|
24
|
-
#
|
|
25
|
-
# 노출 규칙: 티어(astra·sol·terra·luna)마다, **이 계정이 실제로 서빙하는** 최신
|
|
26
|
-
# 세대 하나만 selectable 로 둔다. 카탈로그가 슬러그를 내놓는 것과 계정이 그것을
|
|
27
|
-
# 실행하는 것은 다르다 — 실측 2026-09-23(jobs dev-10860
|
|
28
|
-
# implementation-option-selection-002): ChatGPT 계정으로 로그인한 이 기계에서
|
|
29
|
-
# `gpt-6-sol` 디스패치가 두 번 다 400 으로 거절됐다
|
|
30
|
-
# ("The 'gpt-6-sol' model is not supported when using Codex with a ChatGPT
|
|
31
|
-
# account"). 같은 계정의 `models_cache.json` 도 6세대로는 astra 만 싣는다.
|
|
32
|
-
# 그래서 sol·luna 티어는 5.6 행이 선택 가능한 행이고, gpt-6 의 두 행은 엔트리만
|
|
33
|
-
# 남긴다 — 서빙하는 계정이 그 값을 쓰거나 과거 run 을 정산할 때 필요하다.
|
|
34
|
-
# astra 는 이 계정에서 실제로 돌아 gpt-6 행이 선택 가능하다.
|
|
35
19
|
CODEX = {
|
|
36
20
|
# 비용은 계정이 구독이든 API 든 공개 API 단가(입력·캐시 입력·출력 USD/1M)로
|
|
37
21
|
# 추정한다 — 리포트가 답하는 것은 "얼마나 썼는가" 이지 "청구서에 얼마가
|
|
@@ -41,16 +25,19 @@ CODEX = {
|
|
|
41
25
|
# (morphllm.com/openai-api-pricing, cloudzero.com/blog/openai-pricing,
|
|
42
26
|
# layer3labs.io/guides/gpt-6-astra-api-pricing).
|
|
43
27
|
# gpt-6 단가는 OpenAI 모델 문서의 표준 등급(2026-09-23 확인):
|
|
44
|
-
# developers.openai.com/api/docs/models/gpt-6-sol, .../gpt-6-luna.
|
|
28
|
+
# developers.openai.com/api/docs/models/gpt-6-sol, .../gpt-6-luna, .../gpt-6.1-sol
|
|
29
|
+
# (gpt-6.1-sol 은 2026-09-30 확인: 캐시 입력만 $0.10 으로 gpt-6-sol 과 다르다).
|
|
45
30
|
"gpt-6-astra": ModelSpec("gpt-6-astra", "gpt-6-astra", "gpt-6-astra", pricing=(10.0, 1.0, 50.0)),
|
|
46
|
-
#
|
|
47
|
-
|
|
31
|
+
# 카탈로그 기본 effort 는 low 라, config.toml 에 값이 없는 기계에서는 low 로 돈다.
|
|
32
|
+
"gpt-6.1-sol": ModelSpec(
|
|
33
|
+
"gpt-6.1-sol", "gpt-6.1-sol", "gpt-6.1-sol", pricing=(2.0, 0.10, 10.0),
|
|
34
|
+
cli_args=("-c", "model_reasoning_effort=high"),
|
|
35
|
+
),
|
|
48
36
|
"gpt-6-sol": ModelSpec("gpt-6-sol", "gpt-6-sol", "gpt-6-sol", pricing=(2.0, 0.20, 10.0), selectable=False),
|
|
49
|
-
"gpt-6-luna": ModelSpec("gpt-6-luna", "gpt-6-luna", "gpt-6-luna", pricing=(0.10, 0.01, 0.50)
|
|
50
|
-
"gpt-5.6-terra": ModelSpec("gpt-5.6-terra", "gpt-5.6-terra", "gpt-5.6-terra", pricing=(2.0, 0.20, 12.0)),
|
|
51
|
-
"gpt-5.6-sol": ModelSpec("gpt-5.6-sol", "gpt-5.6-sol", "gpt-5.6-sol", pricing=(5.0, 0.50, 30.0)),
|
|
52
|
-
"gpt-5.6-luna": ModelSpec("gpt-5.6-luna", "gpt-5.6-luna", "gpt-5.6-luna", pricing=(0.20, 0.02, 1.20)),
|
|
53
|
-
# picker 에서는 감춘다(사유는 위와 동일 — 더 이상 카탈로그가 내놓지 않는다).
|
|
37
|
+
"gpt-6-luna": ModelSpec("gpt-6-luna", "gpt-6-luna", "gpt-6-luna", pricing=(0.10, 0.01, 0.50)),
|
|
38
|
+
"gpt-5.6-terra": ModelSpec("gpt-5.6-terra", "gpt-5.6-terra", "gpt-5.6-terra", pricing=(2.0, 0.20, 12.0), selectable=False),
|
|
39
|
+
"gpt-5.6-sol": ModelSpec("gpt-5.6-sol", "gpt-5.6-sol", "gpt-5.6-sol", pricing=(5.0, 0.50, 30.0), selectable=False),
|
|
40
|
+
"gpt-5.6-luna": ModelSpec("gpt-5.6-luna", "gpt-5.6-luna", "gpt-5.6-luna", pricing=(0.20, 0.02, 1.20), selectable=False),
|
|
54
41
|
"gpt-5.4-mini": ModelSpec("gpt-5.4-mini", "gpt-5.4-mini", "gpt-5.4-mini", pricing=(0.75, 0.075, 4.50), selectable=False),
|
|
55
42
|
"codex-auto-review": ModelSpec("codex-auto-review", "codex-auto-review", "codex-auto-review", selectable=False),
|
|
56
43
|
}
|
|
@@ -116,7 +103,11 @@ class CodexExecution:
|
|
|
116
103
|
for directory in request.policy.write_scope:
|
|
117
104
|
if directory != request.project_root:
|
|
118
105
|
argv += ["--add-dir", str(directory)]
|
|
119
|
-
argv += ["--model", request.model
|
|
106
|
+
argv += ["--model", request.model]
|
|
107
|
+
spec = CODEX.get(request.model)
|
|
108
|
+
if spec is not None:
|
|
109
|
+
argv += spec.cli_args
|
|
110
|
+
argv += ["--sandbox", "danger-full-access"]
|
|
120
111
|
if request.policy.auto_approve:
|
|
121
112
|
argv += ["-c", "approval_policy=never"]
|
|
122
113
|
argv.append("-")
|
|
@@ -141,7 +132,7 @@ def create_provider() -> ProviderSpec:
|
|
|
141
132
|
display_label="Codex",
|
|
142
133
|
models=CODEX,
|
|
143
134
|
default_models={
|
|
144
|
-
role: "gpt-
|
|
135
|
+
role: "gpt-6.1-sol"
|
|
145
136
|
for role in ("lead", "analyser", "critic", "designer", "planner", "executor", "verifier", "report-writer", "translator")
|
|
146
137
|
},
|
|
147
138
|
wrapper="okstra-codex-exec.sh",
|