okstra 0.146.1 → 0.148.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 +23 -9
- package/docs/architecture/storage-model.md +39 -65
- package/docs/architecture.md +68 -60
- package/docs/cli.md +40 -23
- package/docs/for-ai/skills/okstra-run.md +13 -34
- package/docs/performance-improvement-plan-v2.md +2 -2
- package/docs/pr-template-usage.md +1 -1
- package/docs/project-structure-overview.md +26 -22
- package/docs/task-process/README.md +4 -4
- package/docs/task-process/common-flow.md +12 -12
- package/docs/task-process/final-verification.md +2 -2
- package/docs/task-process/implementation.md +1 -1
- package/docs/task-process/release-handoff.md +1 -1
- package/package.json +2 -2
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/workers/antigravity-worker.md +2 -2
- package/runtime/agents/workers/claude-worker.md +1 -1
- package/runtime/agents/workers/codex-worker.md +2 -2
- package/runtime/agents/workers/grok-worker.md +256 -0
- package/runtime/agents/workers/kimi-worker.md +256 -0
- package/runtime/agents/workers/report-writer-worker.md +12 -12
- package/runtime/bin/lib/okstra/cli.sh +13 -1
- package/runtime/bin/lib/okstra/globals.sh +3 -0
- package/runtime/bin/lib/okstra/usage.sh +17 -12
- package/runtime/bin/okstra-grok-exec.sh +5 -0
- package/runtime/bin/okstra-kimi-exec.sh +5 -0
- package/runtime/bin/okstra-provider-exec.py +235 -0
- package/runtime/bin/okstra-render-final-report.py +4 -4
- package/runtime/bin/okstra-render-report-views.py +100 -12
- package/runtime/bin/okstra.sh +3 -0
- package/runtime/prompts/lead/adapters/antigravity.md +48 -0
- package/runtime/prompts/lead/adapters/claude-code.md +13 -11
- package/runtime/prompts/lead/adapters/codex.md +7 -7
- package/runtime/prompts/lead/okstra-lead-contract.md +5 -5
- package/runtime/prompts/lead/report-writer.md +16 -12
- package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +16 -10
- package/runtime/prompts/profiles/_implementation-deliverable.md +2 -2
- package/runtime/prompts/profiles/_implementation-diff-review.md +1 -1
- package/runtime/prompts/profiles/_implementation-executor.md +12 -12
- package/runtime/prompts/profiles/_implementation-self-check.md +4 -4
- package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
- package/runtime/prompts/profiles/change-impact-analysis.md +2 -0
- package/runtime/prompts/profiles/error-analysis.md +2 -0
- package/runtime/prompts/profiles/feature-analysis.md +2 -0
- package/runtime/prompts/profiles/final-verification.md +3 -1
- package/runtime/prompts/profiles/forbidden-actions.json +4 -4
- package/runtime/prompts/profiles/implementation-planning.md +3 -1
- package/runtime/prompts/profiles/implementation.md +2 -2
- package/runtime/prompts/profiles/improvement-discovery.md +6 -2
- package/runtime/prompts/profiles/project-analysis.md +2 -0
- package/runtime/prompts/profiles/release-handoff.md +7 -7
- package/runtime/prompts/profiles/requirements-discovery.md +2 -0
- package/runtime/prompts/wizard/prompts.ko.json +9 -1
- package/runtime/python/okstra_ctl/codex_dispatch.py +68 -87
- package/runtime/python/okstra_ctl/dispatch_core.py +4 -22
- package/runtime/python/okstra_ctl/final_report_schema.py +37 -12
- package/runtime/python/okstra_ctl/lead_events.py +1 -1
- package/runtime/python/okstra_ctl/lead_runtime.py +13 -2
- package/runtime/python/okstra_ctl/models.py +156 -8
- package/runtime/python/okstra_ctl/path_hints.py +9 -25
- package/runtime/python/okstra_ctl/paths.py +1 -1
- package/runtime/python/okstra_ctl/render.py +172 -74
- package/runtime/python/okstra_ctl/render_final_report.py +136 -28
- package/runtime/python/okstra_ctl/report_contract.py +124 -0
- package/runtime/python/okstra_ctl/report_finalize.py +1 -1
- package/runtime/python/okstra_ctl/report_html/__init__.py +10 -0
- package/runtime/python/okstra_ctl/report_html/common.py +86 -0
- package/runtime/python/okstra_ctl/report_html/filters.py +104 -0
- package/runtime/python/okstra_ctl/report_html/models.py +59 -0
- package/runtime/python/okstra_ctl/report_html/render.py +76 -0
- package/runtime/python/okstra_ctl/report_html/router.py +40 -0
- package/runtime/python/okstra_ctl/report_html/view_models/__init__.py +1 -0
- package/runtime/python/okstra_ctl/report_html/view_models/change_impact_analysis.py +39 -0
- package/runtime/python/okstra_ctl/report_html/view_models/error_analysis.py +49 -0
- package/runtime/python/okstra_ctl/report_html/view_models/feature_analysis.py +39 -0
- package/runtime/python/okstra_ctl/report_html/view_models/final_verification.py +47 -0
- package/runtime/python/okstra_ctl/report_html/view_models/implementation.py +47 -0
- package/runtime/python/okstra_ctl/report_html/view_models/implementation_planning.py +103 -0
- package/runtime/python/okstra_ctl/report_html/view_models/improvement_discovery.py +43 -0
- package/runtime/python/okstra_ctl/report_html/view_models/project_analysis.py +54 -0
- package/runtime/python/okstra_ctl/report_html/view_models/release_handoff.py +54 -0
- package/runtime/python/okstra_ctl/report_html/view_models/requirements_discovery.py +55 -0
- package/runtime/python/okstra_ctl/report_html/visualizations.py +139 -0
- package/runtime/python/okstra_ctl/report_view_artifacts.py +4 -1
- package/runtime/python/okstra_ctl/report_views.py +15 -43
- package/runtime/python/okstra_ctl/run.py +276 -51
- package/runtime/python/okstra_ctl/runner_resolution.py +103 -0
- package/runtime/python/okstra_ctl/schema_excerpt.py +7 -17
- package/runtime/python/okstra_ctl/team.py +2 -7
- package/runtime/python/okstra_ctl/wizard.py +194 -21
- package/runtime/python/okstra_ctl/worker_artifacts.py +46 -0
- package/runtime/python/okstra_ctl/workers.py +3 -1
- package/runtime/python/okstra_ctl/workflow.py +4 -2
- package/runtime/python/okstra_token_usage/__init__.py +1 -0
- package/runtime/python/okstra_token_usage/collect.py +32 -23
- package/runtime/python/okstra_token_usage/pricing.py +35 -3
- package/runtime/schemas/final-report-v2.0.schema.json +3923 -0
- package/runtime/skills/okstra-run/SKILL.md +31 -42
- package/runtime/templates/prd/pr-body.template.md +1 -1
- package/runtime/templates/reports/final-report-v2.template.md +66 -0
- package/runtime/templates/reports/html/assets/base.css +41 -0
- package/runtime/templates/reports/html/assets/base.js +5 -0
- package/runtime/templates/reports/html/base.template.html +79 -0
- package/runtime/templates/reports/html/macros/forms.html +47 -0
- package/runtime/templates/reports/html/macros/layout.html +19 -0
- package/runtime/templates/reports/html/macros/visualizations.html +27 -0
- package/runtime/templates/reports/html/tasks/change-impact-analysis.template.html +40 -0
- package/runtime/templates/reports/html/tasks/error-analysis.template.html +40 -0
- package/runtime/templates/reports/html/tasks/feature-analysis.template.html +40 -0
- package/runtime/templates/reports/html/tasks/final-verification.template.html +39 -0
- package/runtime/templates/reports/html/tasks/implementation-planning.template.html +47 -0
- package/runtime/templates/reports/html/tasks/implementation.template.html +40 -0
- package/runtime/templates/reports/html/tasks/improvement-discovery.template.html +29 -0
- package/runtime/templates/reports/html/tasks/project-analysis.template.html +57 -0
- package/runtime/templates/reports/html/tasks/release-handoff.template.html +36 -0
- package/runtime/templates/reports/html/tasks/requirements-discovery.template.html +37 -0
- package/runtime/templates/reports/report.js +21 -4
- package/runtime/templates/reports/settings.template.json +4 -0
- package/runtime/templates/reports/task-brief.template.md +7 -7
- package/runtime/validators/validate-report-views.py +86 -4
- package/runtime/validators/validate-run.py +73 -15
- package/runtime/validators/validate_improvement_report.py +55 -0
- package/runtime/validators/validate_session_conformance.py +2 -1
- package/src/cli-registry.mjs +4 -4
- package/src/commands/execute/codex-dispatch.mjs +7 -10
- package/src/commands/execute/render-bundle.mjs +3 -3
- package/src/commands/execute/run.mjs +17 -52
- package/src/commands/execute/wizard.mjs +4 -1
- package/src/commands/lifecycle/doctor.mjs +6 -3
- package/src/commands/lifecycle/install.mjs +49 -21
- package/src/commands/report/finalize.mjs +2 -3
- package/src/commands/report/render-final-report.mjs +4 -2
- package/src/commands/report/render-views.mjs +8 -8
- package/src/lib/runtime-manifest.mjs +1 -1
- package/src/lib/runtime-resolver.mjs +2 -2
- package/src/lib/worker-agent-render.mjs +50 -0
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## Purpose
|
|
12
12
|
|
|
13
|
-
`okstra-run` starts an okstra task run inside the current
|
|
13
|
+
`okstra-run` starts an okstra task run inside the current supported agent host. Input collection is owned entirely by the `okstra wizard` state machine; the skill relays the wizard prompts to the user and then prepares the task bundle via `okstra render-bundle`. Once the bundle is ready, the current Claude Code, Codex, or Antigravity session takes over as the host-native Okstra lead.
|
|
14
14
|
|
|
15
15
|
Single authority:
|
|
16
16
|
|
|
@@ -34,10 +34,10 @@ Do not use it when:
|
|
|
34
34
|
|
|
35
35
|
## Preflight
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
Resolve `<host-runtime>` from the executing harness: Claude Code → `claude-code`, Codex → `codex`, Antigravity CLI → `antigravity`, and another adapter host → `external`. This is a host capability, not a `PATH` inference or worker-provider choice. The lead provider is derived from this value and cannot be selected independently. Then make one Bash call:
|
|
38
38
|
|
|
39
39
|
```bash
|
|
40
|
-
okstra preflight --runtime
|
|
40
|
+
okstra preflight --runtime <host-runtime> --json
|
|
41
41
|
```
|
|
42
42
|
|
|
43
43
|
If there is no runtime or project setup (`ok:false`), point the user to `/okstra-setup` and stop. Do not create an `export PYTHONPATH`.
|
|
@@ -73,7 +73,7 @@ Carry the printed absolute path verbatim.
|
|
|
73
73
|
wizard init:
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
|
-
okstra wizard init --state-file /tmp/okstra-wizard/state.json --project-root /abs/project --project-id project-id
|
|
76
|
+
okstra wizard init --state-file /tmp/okstra-wizard/state.json --project-root /abs/project --project-id project-id --host-runtime <host-runtime>
|
|
77
77
|
```
|
|
78
78
|
|
|
79
79
|
The result is `{ok, next}` JSON. The first step is `task_pick`.
|
|
@@ -130,34 +130,13 @@ When `next.kind == "done"`:
|
|
|
130
130
|
okstra wizard outcome --state-file /tmp/okstra-wizard/state.json
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
Run `outcome.persistActions[]` first, then pass each key of the `outcome.renderArgs` object as an `okstra render-bundle` flag. Pass empty string values explicitly too. Exception: the `chain-stages` key is not a render-bundle flag — it drives the Step 7 unattended-chaining loop, so do not pass it as a flag (`run.py` accepts only `--stage`/`--stages`).
|
|
133
|
+
Run `outcome.persistActions[]` first, then pass each key of the `outcome.renderArgs` object exactly once as an `okstra render-bundle` flag. Pass empty string values explicitly too, and add `--lead-runtime <host-runtime>` from preflight. Do not enumerate provider-specific keys in this manual; the wizard and provider registry own the emitted arguments. Exception: the `chain-stages` key is not a render-bundle flag — it drives the Step 7 unattended-chaining loop, so do not pass it as a flag (`run.py` accepts only `--stage`/`--stages`).
|
|
134
134
|
|
|
135
135
|
```bash
|
|
136
136
|
okstra render-bundle \
|
|
137
|
-
--lead-runtime
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
--task-group "<args.task-group>" \
|
|
141
|
-
--task-id "<args.task-id>" \
|
|
142
|
-
--task-type "<args.task-type>" \
|
|
143
|
-
--task-brief "<args.task-brief>" \
|
|
144
|
-
--executor "<args.executor>" \
|
|
145
|
-
--critic "<args.critic>" \
|
|
146
|
-
--approved-plan "<args.approved-plan>" \
|
|
147
|
-
--stage "<args.stage>" \
|
|
148
|
-
--stages "<args.stages>" \
|
|
149
|
-
--base-ref "<args.base-ref>" \
|
|
150
|
-
--workers "<args.workers>" \
|
|
151
|
-
--directive "<args.directive>" \
|
|
152
|
-
--lead-model "<args.lead-model>" \
|
|
153
|
-
--claude-model "<args.claude-model>" \
|
|
154
|
-
--codex-model "<args.codex-model>" \
|
|
155
|
-
--antigravity-model "<args.antigravity-model>" \
|
|
156
|
-
--report-writer-model "<args.report-writer-model>" \
|
|
157
|
-
--related-tasks "<args.related-tasks>" \
|
|
158
|
-
--clarification-response "<args.clarification-response>" \
|
|
159
|
-
--pr-template-path "<args.pr-template-path>" \
|
|
160
|
-
--fix-cycle "<args.fix-cycle>"
|
|
137
|
+
--lead-runtime <host-runtime> \
|
|
138
|
+
--<first-renderArgs-key> "<first-renderArgs-value>" \
|
|
139
|
+
--<each-remaining-renderArgs-key> "<corresponding-value>"
|
|
161
140
|
```
|
|
162
141
|
|
|
163
142
|
Parse the following labeled lines from stdout.
|
|
@@ -227,14 +206,14 @@ okstra config set pr-template-path "<path>" --scope global
|
|
|
227
206
|
|
|
228
207
|
Read the scope and path from the persist action of `okstra wizard outcome`, not from the wizard state file. Do not read the raw state file directly.
|
|
229
208
|
|
|
230
|
-
##
|
|
209
|
+
## Okstra lead takeover
|
|
231
210
|
|
|
232
|
-
After render-bundle, read `<INSTRUCTION_SET_PATH>/
|
|
211
|
+
After render-bundle, read `<INSTRUCTION_SET_PATH>/lead-execution-prompt.md` verbatim and proceed from Phase 1 in that prompt's order.
|
|
233
212
|
|
|
234
213
|
Inform the user on one line.
|
|
235
214
|
|
|
236
215
|
```text
|
|
237
|
-
Took over as
|
|
216
|
+
Took over as Okstra lead (`<host-runtime>`) for `<taskKey>` (`<task-type>`). Run dir: `<RUN_DIR_RELATIVE_PATH>`. Beginning Phase 1 (context loading).
|
|
238
217
|
```
|
|
239
218
|
|
|
240
219
|
For a single-element chain, the end of Step 6 is the end of the run. Step 7 below applies only when the `chain-stages` CSV has 2 or more elements.
|
|
@@ -244,7 +223,7 @@ For a single-element chain, the end of Step 6 is the end of the run. Step 7 belo
|
|
|
244
223
|
When `task-type == implementation` and the render-args `chain-stages` CSV has 2 or more elements, the current session acts as the orchestrator and runs the stages as an unattended chain in dependency order. Queue = the topologically-sorted stage list from splitting `chain-stages` on `,`. For each stage `N` in the queue, in order:
|
|
245
224
|
|
|
246
225
|
1. Re-call render-bundle with the same arguments but `--stage N` (the base commit is auto-computed by prepare from the predecessor's done `head_commit` — do not pass it by hand). The `io`-only conformance waiver·concurrent-run·git-reconcile gates apply identically to each stage's render-bundle.
|
|
247
|
-
2. As in Step 6, become
|
|
226
|
+
2. As in Step 6, become the host-native Okstra lead and run that stage's Phase 1–7 inline. Phase 6's lead persistence appends that stage's `status:"done"` row to `runs/<plan-task-key>/consumers.jsonl`.
|
|
248
227
|
3. After confirming the `done` row was written, move to the next stage. Clean up context (leftover panes·finished teammates) at each stage boundary.
|
|
249
228
|
4. One-line report at each stage start/finish: `stage N/<total> start` / `stage N done → next K`.
|
|
250
229
|
|
|
@@ -261,4 +240,4 @@ Once the whole queue is consumed, end the chain and report completion.
|
|
|
261
240
|
- Dropping the `--answer` flag on an empty answer.
|
|
262
241
|
- Bypassing the wizard/render-bundle path by calling `okstra.sh`.
|
|
263
242
|
- Calling render-args on a state the user aborted before render-bundle.
|
|
264
|
-
- Starting phase work arbitrarily before reading the
|
|
243
|
+
- Starting phase work arbitrarily before reading the Okstra lead prompt.
|
|
@@ -63,7 +63,7 @@ The current documentation and code contain two layers with similarly named phase
|
|
|
63
63
|
|
|
64
64
|
Each okstra invocation performs exactly one task type. Moving to the next task type requires a new invocation.
|
|
65
65
|
|
|
66
|
-
####
|
|
66
|
+
#### Okstra lead operating phases
|
|
67
67
|
|
|
68
68
|
Phases 1–7 in `prompts/lead/okstra-lead-contract.md` are operating steps that the lead performs within one task-type run.
|
|
69
69
|
|
|
@@ -81,7 +81,7 @@ Therefore, "P1 convergence improvement" in this document does not change the tas
|
|
|
81
81
|
|
|
82
82
|
`prepare_task_bundle()` writes the instruction set and manifest-related files sequentially.
|
|
83
83
|
|
|
84
|
-
- Instruction set: `analysis-profile.md`, `analysis-material.md`, `task-brief.md`, optional carry-in/directive, `reference-expectations.md`, `final-report-template.md`, `
|
|
84
|
+
- Instruction set: `analysis-profile.md`, `analysis-material.md`, `task-brief.md`, optional carry-in/directive, `reference-expectations.md`, `final-report-template.md`, canonical `lead-execution-prompt.md`, and the prompt snapshot.
|
|
85
85
|
- Manifest/discovery: `team-state`, `task-manifest`, `task-index`, `run-manifest`, `timeline`, task catalog, and latest task.
|
|
86
86
|
|
|
87
87
|
This serial rendering has room for improvement, but it is generally cheaper than external worker dispatch. Render parallelization is therefore not the first priority.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PR template usage guide
|
|
2
2
|
|
|
3
|
-
Summarizes the resolution rules, storage locations, and configuration methods for the Markdown template that `
|
|
3
|
+
Summarizes the resolution rules, storage locations, and configuration methods for the Markdown template that the host-native `Okstra lead` uses to write the PR body during the `release-handoff` phase.
|
|
4
4
|
|
|
5
5
|
Authoritative source of the resolution logic: [`scripts/okstra_ctl/pr_template.py`](../scripts/okstra_ctl/pr_template.py).
|
|
6
6
|
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## 1. Project identity
|
|
22
22
|
|
|
23
|
-
`okstra` is a multi-
|
|
23
|
+
`okstra` is a host-aware, multi-provider cross-verification runtime distributed as the npm package `okstra`. It is not a one-shot reviewer; it runs one neutral lifecycle core through Claude Code, Codex, or an explicit external adapter around a stable task key.
|
|
24
24
|
|
|
25
25
|
Current baseline:
|
|
26
26
|
|
|
@@ -28,9 +28,9 @@ Current baseline:
|
|
|
28
28
|
- Node CLI entrypoint: `bin/okstra`
|
|
29
29
|
- Python orchestration authority: `scripts/okstra_ctl/run.py::prepare_task_bundle`
|
|
30
30
|
- lifecycle: `requirements-discovery → error-analysis → implementation-planning → implementation → final-verification → release-handoff`
|
|
31
|
-
- installed skills:
|
|
32
|
-
-
|
|
33
|
-
- final report SSOT: `schemas/final-report-
|
|
31
|
+
- installed skills: 13
|
|
32
|
+
- provider workers: `claude`, `codex`, `antigravity`, `grok`, `kimi`; functional report writer: `report-writer`
|
|
33
|
+
- final report SSOT: current `schemas/final-report-v2.0.schema.json` + `*.data.json`; schema v1 remains a compatibility contract
|
|
34
34
|
|
|
35
35
|
Design principles:
|
|
36
36
|
|
|
@@ -180,14 +180,14 @@ Runtime/install asset changes follow this checklist:
|
|
|
180
180
|
| `worktree-lookup` | `src/commands/execute/worktree-lookup.mjs` | Look up a task-key's registered worktree |
|
|
181
181
|
| `plan-validate` | `src/commands/execute/plan-validate.mjs` | Check approved-plan approval marker |
|
|
182
182
|
| `render-bundle` | `src/commands/execute/render-bundle.mjs` | Preview `prepare_task_bundle(render_only=True)` |
|
|
183
|
-
| `run` | `src/commands/execute/run.mjs` | Host-aware execution front door (`auto` → Claude/Codex/external path selection) |
|
|
183
|
+
| `run` | `src/commands/execute/run.mjs` | Host-aware execution front door (`auto` → Claude/Codex/Antigravity/external path selection) |
|
|
184
184
|
| `codex-run`, `codex-dispatch` | `src/commands/execute/codex-*.mjs` | Codex lead dry-run bundle preparation and CLI-backed worker dispatch |
|
|
185
185
|
| `team` | `src/commands/execute/team.mjs` | External lead tmux-pane worker dispatch / await / teardown |
|
|
186
186
|
| `convergence` | `src/commands/execute/convergence.mjs` | Internal admin CLI for the deterministic Phase 5.5 convergence engine (`seed`/`plan-round`/`apply-round`/`apply-critic-gaps`/`finalize`/`validate`/`example`; Python: `okstra_ctl.convergence`) |
|
|
187
187
|
| `plan-items` | `src/commands/execute/plan-items.mjs` | Internal admin CLI for deterministic plan-body item extraction and exact-match validation (`extract`/`validate`; Python: `okstra_ctl.plan_items_cli`) |
|
|
188
188
|
| `report-finalize` | `src/commands/report/finalize.mjs` | Run the whole Phase 7 post-report sequence in contractual order (Python: `okstra_ctl.report_finalize`) — the single reference point shared with the Codex lead adapter |
|
|
189
|
-
| `render-views` | `src/commands/report/render-views.mjs` |
|
|
190
|
-
| `render-final-report`, `inject-report-index` | `src/commands/report/*.mjs` | Render
|
|
189
|
+
| `render-views` | `src/commands/report/render-views.mjs` | Render schema v2 data with its task-specific human template, or use the schema v1 / quick-report compatibility view |
|
|
190
|
+
| `render-final-report`, `inject-report-index` | `src/commands/report/*.mjs` | Render version-selected AI handoff Markdown from data.json; v1 index injection remains compatibility-only |
|
|
191
191
|
| `wizard` | `src/commands/execute/wizard.mjs` | Drive the `okstra-run` interactive state machine, including the final outcome envelope |
|
|
192
192
|
| `token-usage` | `src/commands/execute/token-usage.mjs` | Wrap installed Python token usage CLI |
|
|
193
193
|
| `spawn-followups`, `error-log` | `src/commands/execute/*.mjs` | Follow-up task bundle creation and run error-log append helpers |
|
|
@@ -218,8 +218,8 @@ Top-level scripts:
|
|
|
218
218
|
| `okstra-claude-exec.sh`, `okstra-codex-exec.sh`, `okstra-antigravity-exec.sh` | Worker CLI wrappers with log/status sidecars |
|
|
219
219
|
| `okstra-wrapper-status.py` | Heartbeat sidecar writer used by worker wrappers |
|
|
220
220
|
| `okstra-token-usage.py` | Token usage CLI entrypoint |
|
|
221
|
-
| `okstra-render-final-report.py` | Render final-report Markdown from data.json |
|
|
222
|
-
| `okstra-render-report-views.py` | Render
|
|
221
|
+
| `okstra-render-final-report.py` | Render version-selected final-report Markdown from data.json |
|
|
222
|
+
| `okstra-render-report-views.py` | Render schema v2 task-specific HTML directly from data.json, or a legacy view from schema v1 / quick Markdown |
|
|
223
223
|
| `okstra-error-log.py` | Normalize worker/lead error sidecars |
|
|
224
224
|
| `okstra-spawn-followups.py` | Follow-up spawning helper |
|
|
225
225
|
| `okstra-trace-cleanup.sh` | tmux okstra pane cleanup (worker-agent + trace, excluding the lead pane), called by the lead at every worker round boundary — not once per phase; `--keep <substr>` (repeatable) spares panes whose title contains the substring, which is how an in-flight `report-writer-worker` survives a boundary; `--list` prints what would be reclaimed without killing; the `--reclaim-completed` mode reclaims only trace panes whose `@okstra_status` is terminated (stage=exited) and preserves in-progress panes |
|
|
@@ -260,7 +260,7 @@ Important modules:
|
|
|
260
260
|
| `qa_commands.py` | QA command deny-list validation for plans |
|
|
261
261
|
| `conformance.py` | validates task-level Tier 3 manifests, parses `QA-RESULT`, detects diff capability surfaces, and reduces results to PASS/ADVISORY/BLOCKING; DB/HTTP/external non-PASS is user-owned advisory while local IO and contract defects remain blocking, enforced by `scripts/okstra_ctl/conformance.py::decide_conformance_gate` and `validators/validate-run.py::_validate_conformance` |
|
|
262
262
|
| `pr_template.py` | PR body template resolution for release-handoff |
|
|
263
|
-
| `report_views.py`, `render_final_report.py`, `final_report_schema.py` |
|
|
263
|
+
| `report_views.py`, `render_final_report.py`, `final_report_schema.py` | Versioned final-report contract: schema v2 data independently produces AI handoff Markdown and human HTML; schema v1 keeps the legacy Markdown/view pipeline |
|
|
264
264
|
| `final_report_paths.py`, `report_view_artifacts.py` | Path-helper SSOT for the final-report markdown/data.json pair and the generated view artifacts (HTML view, user-responses directory) |
|
|
265
265
|
| `wizard.py` | `okstra-run` prompt state machine; user-facing Korean strings live in `prompts/wizard/prompts.ko.json` |
|
|
266
266
|
| `wizard_stage_intent.py` | stage-related intent projection of the `okstra-run` wizard output — normalizes whole-task (`__whole_task__`) vs single/multi stage selection into render-args (`resolve_wizard_stage_intent`) |
|
|
@@ -288,7 +288,7 @@ Important modules:
|
|
|
288
288
|
| `manager_store.py` | Manager-owned state mutation — project membership, task planning, assignment, directives, event append |
|
|
289
289
|
| `manager_sync.py` | One-way child project `.okstra` snapshot reader; corrupt child state becomes row-level `error` so other children continue |
|
|
290
290
|
| `manager_launch.py` | Child launch packet and manager child context renderer; records `prepared` launch metadata/events without changing project-local task state |
|
|
291
|
-
| `dispatch_core.py` | Backend-neutral worker dispatch core — worker execution/collection logic shared by any lead runtime (Claude/Codex/external); gates selected initial prompts through the shared cross-task contract before launch |
|
|
291
|
+
| `dispatch_core.py` | Backend-neutral worker dispatch core — worker execution/collection logic shared by any lead runtime (Claude/Codex/Antigravity/external); gates selected initial prompts through the shared cross-task contract before launch |
|
|
292
292
|
| `codex_dispatch.py` | Codex lead CLI-worker dispatcher — the `okstra codex-dispatch` backend. Reads the run manifest to run the Codex-side supported worker subset, applies the same cross-task initial-prompt gate, and performs token-usage substitution, view render, follow-up, and validation |
|
|
293
293
|
| `analysis_packet.py` | assembles the compact analysis-worker input packet for a task run from worker-owned profile sections; report/lead procedure stays outside the packet |
|
|
294
294
|
| `analysis_inputs.py` | shared input boundary for `project-analysis`, `feature-analysis`, and `change-impact-analysis` — validates evidence-report identity and review status, enforces the type-to-type relation allowlist, computes `exact`/`stale` freshness, and resolves free-text or `PF-NNN` feature targets for both wizard and prepare paths |
|
|
@@ -298,7 +298,7 @@ Important modules:
|
|
|
298
298
|
| `work_categories.py` | requirements-discovery work-category (domain) **SSOT** (`is_valid_category`) — the work-category allowlist is defined only here |
|
|
299
299
|
| `model_discovery.py` | pre-dispatch model-identity normalization for CLI workers — roster-gated label correction + a per-role reasoning-effort policy (deterministic, no per-run improvisation) for CLIs (agy) that bake effort into the model name |
|
|
300
300
|
| `lead_runtime.py` | lead runtime metadata shared by the render and prepare paths (`LeadRuntimeInfo`) |
|
|
301
|
-
| `lead_events.py` | structured JSONL events emitted by
|
|
301
|
+
| `lead_events.py` | structured JSONL events emitted by artifact-accounted lead runtimes |
|
|
302
302
|
| `team_reconcile.py` | stale team-member reconciliation at run-end teardown |
|
|
303
303
|
| `worker_prompt_headers.py` | shared rendering of phase-aware worker prompt anchors (`worker_prompt_headers`): coding-preflight only for implementation and compact target identity for final-verification |
|
|
304
304
|
| `worker_prompt_body.py` | provider-neutral initial analysis body/input renderer shared by Codex and external/team dispatch paths |
|
|
@@ -351,8 +351,10 @@ Token/cost accounting:
|
|
|
351
351
|
|
|
352
352
|
| Path | Role |
|
|
353
353
|
|---|---|
|
|
354
|
-
| `templates/reports/final-report.template.md` |
|
|
355
|
-
| `templates/reports/report.
|
|
354
|
+
| `templates/reports/final-report.template.md` | Schema v1 compatibility Markdown template |
|
|
355
|
+
| `templates/reports/final-report-v2.template.md` | Compact schema v2 AI handoff Markdown template |
|
|
356
|
+
| `templates/reports/html/base.template.html`, `html/tasks/*.template.html` | Shared HTML shell plus ten dedicated task templates for human reports; task bodies are not shared |
|
|
357
|
+
| `templates/reports/report.css`, `report.js` | Inline assets for self-contained HTML report views |
|
|
356
358
|
| `templates/reports/*.template.md` | Inputs, schedule, user-response, settings templates |
|
|
357
359
|
| `project-analysis-input.template.md`, `feature-analysis-input.template.md`, `change-impact-analysis-input.template.md` | Brief input templates for the three analysis sidetracks |
|
|
358
360
|
| `user-response.template.md`, `report.js` | Analysis Review sidecar block and the browser control that exports accept/revision/reject without changing the source report |
|
|
@@ -364,7 +366,7 @@ Token/cost accounting:
|
|
|
364
366
|
|
|
365
367
|
### 4.8 `schemas/`
|
|
366
368
|
|
|
367
|
-
`schemas/final-report-
|
|
369
|
+
`schemas/final-report-v2.0.schema.json` is the current final-report data.json contract. The report-writer worker writes `final-report-<task-type>-<seq>.data.json`; independent renderers produce AI handoff Markdown and task-specific human HTML. `schemas/final-report-v1.0.schema.json` remains supported for existing reports and quick-report compatibility.
|
|
368
370
|
|
|
369
371
|
The deterministic convergence inputs are `schemas/convergence-groups-v1.0.schema.json`, `schemas/convergence-round-results-v1.0.schema.json`, and `schemas/convergence-critic-results-v1.0.schema.json`. `tools/build.mjs` syncs the entire source `schemas/` directory to `runtime/schemas/`; these JSON Schema files are runtime contracts, not Markdown publication-inventory entries.
|
|
370
372
|
|
|
@@ -377,7 +379,7 @@ Optional (v1.0 backward-compatible) top-level keys:
|
|
|
377
379
|
|
|
378
380
|
| File | Role |
|
|
379
381
|
|---|---|
|
|
380
|
-
| `validate-run.py` |
|
|
382
|
+
| `validate-run.py` | Version-aware run/final-report validation: schema v2 AI handoff order + structured data rules, with legacy schema v1 Markdown gates preserved |
|
|
381
383
|
| `validate-brief.py`, `validate-brief.sh` | Brief frontmatter/body contract validation |
|
|
382
384
|
| `validate-report-views.py` | HTML view validation (form-control placement / no external URLs / stale source digest / Response ID parity) |
|
|
383
385
|
| `validate_analysis_report.py` | Cross-field validation for the three read-only analysis reports: frozen target/evidence snapshots, current-code evidence, review-source identity, and exact affected-ID resolution coverage on revision reruns |
|
|
@@ -397,7 +399,7 @@ Boilerplate shared by several skills (bash invocation rule, outdated-CLI preflig
|
|
|
397
399
|
| Skill | User-invocable | Role |
|
|
398
400
|
|---|---:|---|
|
|
399
401
|
| `okstra-brief-gen` | yes | Produce task brief from ticket/doc/link/conversation |
|
|
400
|
-
| `okstra-run` | yes | Start/resume okstra task in current Claude Code session |
|
|
402
|
+
| `okstra-run` | yes | Start/resume an okstra task in the current Claude Code, Codex, or Antigravity host session |
|
|
401
403
|
| `okstra-memory` | yes | Store/search/archive global conversation memory under `~/.okstra/memory-book` |
|
|
402
404
|
| `okstra-inspect` | yes | Unified read-side — sub-commands `status` (lifecycle + workStatus), `history` (past runs / re-run / resume), `report` (find final-report), `time` (elapsed-time breakdown), `logs` (wrapper log inventory + cleanup), `cost` (task bundle context/read cost), `errors` (error-log aggregation), `error-zip` (anonymized cross-project error bundle), `recap` (cross-run phase recap). `SKILL.md` is a thin core (preflight + dispatch table + shared rules) and each sub-command body lives in `skills/okstra-inspect/facets/<sub-command>.md`, lazily read only after dispatch resolves; the 1:1 match between dispatch rows and facet files is enforced by `tests/contract/test_okstra_inspect_facets.py` |
|
|
403
405
|
| `okstra-rollup` | yes | Cross-task roll-up — aggregate runs/time/errors across a task-group (or whole project) and synthesize a digest from the report files |
|
|
@@ -419,9 +421,11 @@ Boilerplate shared by several skills (bash invocation rule, outdated-CLI preflig
|
|
|
419
421
|
| `agents/workers/claude-worker.md` | Claude analyzer/verifier/executor spec |
|
|
420
422
|
| `agents/workers/codex-worker.params.json` | Codex analyzer/verifier/executor wrapper params (build renders `.md` via `_cli-wrapper-template.md`) |
|
|
421
423
|
| `agents/workers/antigravity-worker.params.json` | Antigravity analyzer/verifier/executor wrapper params (build renders `.md` via `_cli-wrapper-template.md`) |
|
|
424
|
+
| `agents/workers/grok-worker.params.json` | Grok read-only analyser/critic wrapper params |
|
|
425
|
+
| `agents/workers/kimi-worker.params.json` | Kimi read-only analyser/critic wrapper params |
|
|
422
426
|
| `agents/workers/report-writer-worker.md` | data.json SSOT author and audit sidecar writer |
|
|
423
427
|
|
|
424
|
-
The neutral lead lifecycle contract lives at `prompts/lead/okstra-lead-contract.md`. Host mappings live under `prompts/lead/adapters/`: `claude-code.md`, `codex.md`, and `external.md`. All are runtime resources installed under `~/.okstra/prompts/lead/`, not agent skills.
|
|
428
|
+
The neutral lead lifecycle contract lives at `prompts/lead/okstra-lead-contract.md`. Host mappings live under `prompts/lead/adapters/`: `claude-code.md`, `codex.md`, `antigravity.md`, and `external.md`. All are runtime resources installed under `~/.okstra/prompts/lead/`, not agent skills.
|
|
425
429
|
|
|
426
430
|
### 4.12 `tests/` and `tests-e2e/`
|
|
427
431
|
|
|
@@ -498,15 +502,15 @@ Current report pipeline:
|
|
|
498
502
|
|
|
499
503
|
1. Analysis workers write worker result files and the separate audit sidecars named by `Audit sidecar path`.
|
|
500
504
|
2. The lead writes semantic groups; the convergence engine persists working state, per-round plans/results, an optional critic transition, and then a validated `state/convergence-<task-type>-<seq>.json` terminal state: schema v1.3 when newly finalized, or an unchanged historical final schema v1.0, v1.1, or v1.2 returned by `reuse-final`.
|
|
501
|
-
3. Report-writer worker writes `reports/final-report-<task-type>-<seq>.data.json
|
|
505
|
+
3. Report-writer worker writes `reports/final-report-<task-type>-<seq>.data.json` against the current schema v2 contract, including `humanSummary` and one task-type deliverable.
|
|
502
506
|
4. For implementation-planning, `okstra plan-items extract` creates the complete `P-*` queue, `validate` proves it still matches data.json, and the analyser instances run the separate plan-body verification round.
|
|
503
|
-
5. `scripts/okstra-render-final-report.py` renders Markdown.
|
|
507
|
+
5. `scripts/okstra-render-final-report.py` renders compact AI handoff Markdown with `templates/reports/final-report-v2.template.md`.
|
|
504
508
|
6. Token usage substitution fills usage/cost cells.
|
|
505
|
-
7. `scripts/okstra-render-report-views.py`
|
|
509
|
+
7. `scripts/okstra-render-report-views.py` independently selects one of ten dedicated task templates and emits human-facing HTML directly from the same data.json; run validation checks both derived artifacts. Schema v1 and quick Markdown inputs retain their legacy conditional path.
|
|
506
510
|
|
|
507
511
|
For the three analysis sidetracks, the HTML view also exports an immutable-source `## ANALYSIS REVIEW` sidecar. A revision rerun carries that sidecar, reanalyzes the whole confirmed scope, and records one `analysisReviewResolution` row for every affected ID before `validate_analysis_report.py` accepts the result.
|
|
508
512
|
|
|
509
|
-
|
|
513
|
+
Both Markdown and HTML are derived, not authoring sources. The schema is the contract.
|
|
510
514
|
|
|
511
515
|
---
|
|
512
516
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
## 1. Reading order
|
|
12
12
|
|
|
13
|
-
`okstra-run` is the path that starts a task inside a Claude Code session. This folder organizes that execution flow into two layers.
|
|
13
|
+
`okstra-run` is the path that starts a task inside a supported Claude Code, Codex, or Antigravity host session. This folder organizes that execution flow into two layers.
|
|
14
14
|
|
|
15
15
|
1. First read [common-flow.md](common-flow.md). It is the wizard, render-bundle, lead phase, and artifact flow shared by every task-type.
|
|
16
16
|
2. Then read the document for the task-type you want to run.
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
|
|
21
21
|
```mermaid
|
|
22
22
|
flowchart TD
|
|
23
|
-
U[User in
|
|
23
|
+
U[User in supported host] --> S[okstra-run skill]
|
|
24
24
|
S --> R[Step 1<br/>ensure-installed / paths / check-project]
|
|
25
25
|
R --> W[okstra wizard<br/>state machine]
|
|
26
26
|
W --> A[render-args]
|
|
27
27
|
A --> B[okstra render-bundle<br/>--render-only]
|
|
28
28
|
B --> P[prepare_task_bundle()]
|
|
29
|
-
P --> I[instruction-set<br/>
|
|
30
|
-
I --> L[Current
|
|
29
|
+
P --> I[instruction-set<br/>lead-execution-prompt.md]
|
|
30
|
+
I --> L[Current host session<br/>takes over as Okstra lead]
|
|
31
31
|
L --> F[Phase 1-7 lead workflow]
|
|
32
32
|
F --> O[final-report + manifests + status]
|
|
33
33
|
```
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
- [2. Where the two entrypoints meet](#2-where-the-two-entrypoints-meet)
|
|
7
7
|
- [3. wizard input collection flow](#3-wizard-input-collection-flow)
|
|
8
8
|
- [4. render-bundle and prepare_task_bundle](#4-render-bundle-and-prepare_task_bundle)
|
|
9
|
-
- [5.
|
|
9
|
+
- [5. Okstra lead phase 1-7](#5-okstra-lead-phase-1-7)
|
|
10
10
|
- [6. artifact layout](#6-artifact-layout)
|
|
11
11
|
- [7. Common branching rules](#7-common-branching-rules)
|
|
12
12
|
- [8. Inconsistencies to watch for](#8-inconsistencies-to-watch-for)
|
|
13
13
|
|
|
14
14
|
## 1. One-line summary
|
|
15
15
|
|
|
16
|
-
`okstra-run` is not a "skill that decides questions on its own" but a thin loop that relays the `okstra wizard` JSON state machine to the user. Once input collection finishes, it calls `okstra render-bundle`, and that command builds the task bundle through `python3 -m okstra_ctl.run --render-only`. After that, the current Claude Code session switches over to `
|
|
16
|
+
`okstra-run` is not a "skill that decides questions on its own" but a thin loop that relays the `okstra wizard` JSON state machine to the user. Once input collection finishes, it calls `okstra render-bundle`, and that command builds the task bundle through `python3 -m okstra_ctl.run --render-only`. After that, the current Claude Code, Codex, or Antigravity session switches over to the host-native `Okstra lead`.
|
|
17
17
|
|
|
18
18
|
## 2. Where the two entrypoints meet
|
|
19
19
|
|
|
20
20
|
```mermaid
|
|
21
21
|
flowchart LR
|
|
22
|
-
subgraph InSession["
|
|
23
|
-
A[
|
|
22
|
+
subgraph InSession["supported host session"]
|
|
23
|
+
A[okstra-run skill] --> B[okstra wizard]
|
|
24
24
|
B --> C[okstra render-bundle<br/>forces --render-only]
|
|
25
25
|
end
|
|
26
26
|
|
|
@@ -32,7 +32,7 @@ flowchart LR
|
|
|
32
32
|
E --> P
|
|
33
33
|
P --> G[task bundle artifacts]
|
|
34
34
|
G --> H{launch mode}
|
|
35
|
-
H -->|render-only| I[current
|
|
35
|
+
H -->|render-only| I[current host reads lead prompt]
|
|
36
36
|
H -->|non-render-only| J[exec claude --session-id ...]
|
|
37
37
|
```
|
|
38
38
|
|
|
@@ -93,19 +93,19 @@ sequenceDiagram
|
|
|
93
93
|
Py->>Home: record_start status=prepared
|
|
94
94
|
Py-->>Node: task root, instruction-set, rendered lead prompt
|
|
95
95
|
Node-->>Skill: stdout
|
|
96
|
-
Skill->>FS: read
|
|
96
|
+
Skill->>FS: read lead-execution-prompt.md
|
|
97
97
|
```
|
|
98
98
|
|
|
99
|
-
The Node shim for `render-bundle` is [`src/commands/execute/render-bundle.mjs`](../../src/commands/execute/render-bundle.mjs). This shim attaches the `--workspace-root`, `--render-only`, and runtime resolution arguments directly. As a result, on the okstra-run path the initial run status starts at `prepared` and the task status starts at `
|
|
99
|
+
The Node shim for `render-bundle` is [`src/commands/execute/render-bundle.mjs`](../../src/commands/execute/render-bundle.mjs). This shim attaches the `--workspace-root`, `--render-only`, and runtime resolution arguments directly. As a result, on the okstra-run path the initial run status starts at `prepared` and the task status starts at `ready-for-lead`.
|
|
100
100
|
|
|
101
|
-
## 5.
|
|
101
|
+
## 5. Okstra lead phase 1-7
|
|
102
102
|
|
|
103
103
|
```mermaid
|
|
104
104
|
flowchart TD
|
|
105
105
|
P1[Phase 1<br/>task bundle intake] --> P2[Phase 2<br/>worker prompt preparation]
|
|
106
|
-
P2 --> P3[Phase 3<br/>
|
|
107
|
-
P3 -->|
|
|
108
|
-
P3 -->|
|
|
106
|
+
P2 --> P3[Phase 3<br/>resolve persisted runners]
|
|
107
|
+
P3 -->|native session| P4[Phase 4<br/>host-native dispatch]
|
|
108
|
+
P3 -->|CLI wrapper| P5[Phase 4<br/>provider CLI dispatch]
|
|
109
109
|
P4 --> C[Phase 5.5<br/>convergence]
|
|
110
110
|
P5 --> C
|
|
111
111
|
C --> P6[Phase 6<br/>report-writer synthesis]
|
|
@@ -127,7 +127,7 @@ flowchart TD
|
|
|
127
127
|
Root --> Hist[history/timeline.json]
|
|
128
128
|
IS --> Profile[analysis-profile.md]
|
|
129
129
|
IS --> Brief[task-brief.md]
|
|
130
|
-
IS --> Lead[
|
|
130
|
+
IS --> Lead[lead-execution-prompt.md]
|
|
131
131
|
Runs --> Man[manifests/run-manifest-*.json]
|
|
132
132
|
Runs --> Prompts[prompts/*-worker-prompt-*.md]
|
|
133
133
|
Runs --> Results[worker-results/*.md]
|
|
@@ -45,7 +45,7 @@ sequenceDiagram
|
|
|
45
45
|
participant C as consumers.jsonl
|
|
46
46
|
participant Reg as worktree registry
|
|
47
47
|
participant Git as verification worktree
|
|
48
|
-
participant Lead as
|
|
48
|
+
participant Lead as Okstra lead
|
|
49
49
|
|
|
50
50
|
P->>C: backfill carry and read done rows
|
|
51
51
|
P->>Reg: resolve task or stage worktree
|
|
@@ -75,7 +75,7 @@ Once started, the lead treats `VERIFICATION_TARGET` as authoritative. It does no
|
|
|
75
75
|
```mermaid
|
|
76
76
|
flowchart TD
|
|
77
77
|
Gate[entry gate passed] --> Target[injected VERIFICATION_TARGET]
|
|
78
|
-
Target --> Lead[
|
|
78
|
+
Target --> Lead[Okstra lead confirms target snapshot]
|
|
79
79
|
Lead --> CW[Claude verifier<br/>read-only]
|
|
80
80
|
Lead --> XW[Codex verifier<br/>read-only]
|
|
81
81
|
Lead --> GW{Antigravity opt-in?}
|
|
@@ -102,7 +102,7 @@ These outcomes are enforced by
|
|
|
102
102
|
|
|
103
103
|
```mermaid
|
|
104
104
|
flowchart TD
|
|
105
|
-
Lead[
|
|
105
|
+
Lead[Okstra lead<br/>host native] --> Exec[Executor<br/>selected provider]
|
|
106
106
|
Lead --> CV[Claude verifier<br/>read-only]
|
|
107
107
|
Lead --> XV[Codex verifier<br/>read-only]
|
|
108
108
|
Lead --> GV{Antigravity in roster?}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
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
|
-
This phase has no worker dispatch. It does not use
|
|
19
|
+
This phase has no worker dispatch. It does not use a provider or report-writer roster; the host-native Okstra lead performs git/gh inspection, user questions, the PR draft, and the final report inline.
|
|
20
20
|
|
|
21
21
|
## 2. okstra-run wizard flow
|
|
22
22
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "okstra",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.148.0",
|
|
4
|
+
"description": "Host-aware multi-provider cross-verification orchestrator runtime and agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "devonshin",
|
|
7
7
|
"repository": {
|
package/runtime/BUILD.json
CHANGED
|
@@ -39,7 +39,7 @@ The wrapper internally runs:
|
|
|
39
39
|
agy --print "<prompt>" --model "<model>" --add-dir "<project-root>" [--add-dir "<worktree-path>"] --dangerously-skip-permissions
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The wrapper exists because
|
|
42
|
+
The wrapper exists because agent-host Bash permission matchers can reject simple-prefix matches when the command contains stdin/stderr redirects. Calling `agy --print ... < <path> 2>/dev/null` directly may trigger a permission prompt even when `Bash(agy:*)` is allowlisted. The wrapper folds the redirects inside, so the harness sees a single non-redirect command that matches `Bash($HOME/.okstra/bin/okstra-antigravity-exec.sh:*)`.
|
|
43
43
|
|
|
44
44
|
**Do NOT** invoke `agy --print ... 2>>log > >(tee)` directly — always go through the wrapper. agy has no `--cd` flag, so the wrapper anchors workspace correctness via `--add-dir <project-root>` regardless of inherited cwd.
|
|
45
45
|
|
|
@@ -251,6 +251,6 @@ When this run's `task_type` is `implementation` and you are acting as the **Exec
|
|
|
251
251
|
}
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The
|
|
254
|
+
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The host-native Okstra lead is responsible for persisting the block as `runs/<impl-task-key>/carry/stage-<N>.json` — you do not write the file yourself.
|
|
255
255
|
|
|
256
256
|
This applies only when `task_type` is `implementation`. For other task types, skip this block entirely.
|
|
@@ -120,6 +120,6 @@ When this run's `task_type` is `implementation` and you are acting as the **Exec
|
|
|
120
120
|
}
|
|
121
121
|
```
|
|
122
122
|
|
|
123
|
-
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The
|
|
123
|
+
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The host-native Okstra lead is responsible for persisting the block as `runs/<impl-task-key>/carry/stage-<N>.json` — you do not write the file yourself.
|
|
124
124
|
|
|
125
125
|
This applies only when `task_type` is `implementation`. For other task types, skip this block entirely.
|
|
@@ -39,7 +39,7 @@ The wrapper internally runs:
|
|
|
39
39
|
codex exec -C "<project-root>" [--add-dir "<worktree-path>"] --model "<model>" --sandbox workspace-write -c approval_policy=never - < "<prompt-path>" 2>/dev/null
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
The wrapper exists because
|
|
42
|
+
The wrapper exists because agent-host Bash permission matchers can reject simple-prefix matches when the command contains stdin/stderr redirects. Calling `codex exec ... < <path> 2>/dev/null` directly may trigger a permission prompt even when `Bash(codex exec:*)` is allowlisted. The wrapper folds the redirects inside, so the harness sees a single non-redirect command that matches `Bash($HOME/.okstra/bin/okstra-codex-exec.sh:*)`.
|
|
43
43
|
|
|
44
44
|
**Do NOT use** the non-existent `-q` flag. The approval policy MUST be set with `-c approval_policy=never` (the `-a`/`--ask-for-approval` flag is NOT accepted by `codex exec` — it errors with `unexpected argument '-a'`); without `approval_policy=never` codex runs under the default `on-request` policy and, having no TTY to answer an approval prompt, ends the turn in a few seconds with exit 0 and no result file. **Do NOT** invoke `codex exec ... < ... 2>/dev/null` directly — always go through the wrapper.
|
|
45
45
|
|
|
@@ -251,6 +251,6 @@ When this run's `task_type` is `implementation` and you are acting as the **Exec
|
|
|
251
251
|
}
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The
|
|
254
|
+
Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The host-native Okstra lead is responsible for persisting the block as `runs/<impl-task-key>/carry/stage-<N>.json` — you do not write the file yourself.
|
|
255
255
|
|
|
256
256
|
This applies only when `task_type` is `implementation`. For other task types, skip this block entirely.
|