okstra 0.147.0 → 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 +21 -7
- package/docs/architecture/storage-model.md +34 -61
- package/docs/architecture.md +51 -49
- package/docs/cli.md +38 -21
- 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 +10 -8
- 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 +2 -2
- 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.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 +1 -1
- package/runtime/prompts/lead/report-writer.md +1 -1
- package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +4 -4
- 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 +3 -1
- 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/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/report_html/common.py +38 -2
- package/runtime/python/okstra_ctl/report_html/filters.py +104 -0
- package/runtime/python/okstra_ctl/report_html/render.py +7 -0
- package/runtime/python/okstra_ctl/report_html/view_models/change_impact_analysis.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/error_analysis.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/feature_analysis.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/final_verification.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/implementation.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/implementation_planning.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/improvement_discovery.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/release_handoff.py +2 -1
- package/runtime/python/okstra_ctl/report_html/view_models/requirements_discovery.py +2 -1
- package/runtime/python/okstra_ctl/report_html/visualizations.py +32 -6
- package/runtime/python/okstra_ctl/run.py +264 -45
- package/runtime/python/okstra_ctl/runner_resolution.py +103 -0
- 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 +2 -2
- package/runtime/skills/okstra-run/SKILL.md +31 -42
- package/runtime/templates/prd/pr-body.template.md +1 -1
- package/runtime/templates/reports/html/assets/base.css +6 -3
- package/runtime/templates/reports/html/base.template.html +22 -8
- package/runtime/templates/reports/html/macros/forms.html +2 -2
- package/runtime/templates/reports/html/macros/layout.html +5 -5
- package/runtime/templates/reports/html/macros/visualizations.html +11 -1
- package/runtime/templates/reports/html/tasks/change-impact-analysis.template.html +11 -11
- package/runtime/templates/reports/html/tasks/error-analysis.template.html +12 -12
- package/runtime/templates/reports/html/tasks/feature-analysis.template.html +9 -9
- package/runtime/templates/reports/html/tasks/final-verification.template.html +7 -7
- package/runtime/templates/reports/html/tasks/implementation-planning.template.html +12 -12
- package/runtime/templates/reports/html/tasks/implementation.template.html +7 -7
- package/runtime/templates/reports/html/tasks/improvement-discovery.template.html +6 -6
- package/runtime/templates/reports/html/tasks/project-analysis.template.html +11 -11
- package/runtime/templates/reports/html/tasks/release-handoff.template.html +5 -5
- package/runtime/templates/reports/html/tasks/requirements-discovery.template.html +8 -8
- 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-run.py +11 -6
- 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 +31 -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
package/docs/cli.md
CHANGED
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
Base command for initial entry with full arguments:
|
|
59
59
|
|
|
60
60
|
```bash
|
|
61
|
-
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--workers worker1,worker2] [--lead-runtime claude-code|codex] [--lead-
|
|
61
|
+
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--workers worker1,worker2] [--lead-runtime claude-code|codex|antigravity|external] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--executor claude|codex|antigravity] [--critic off|claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--base-ref <branch|tag|sha>] [--clarification-response <previous-final-report>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> --task-brief <brief-path> [--directive <directive>] [--fix-cycle <yes|no>]
|
|
62
62
|
```
|
|
63
63
|
|
|
64
|
-
Analysis input ownership is narrower than the base shell command. The `/okstra-run` wizard collects `--analysis-target` and `--evidence-inputs` values and passes them internally to `node bin/okstra render-bundle`. `scripts/okstra.sh` does not accept either flag. Because `feature-analysis` requires a target, start that task type with
|
|
64
|
+
Analysis input ownership is narrower than the base shell command. The `/okstra-run` wizard collects `--analysis-target` and `--evidence-inputs` values and passes them internally to `node bin/okstra render-bundle`. `scripts/okstra.sh` does not accept either flag. Because `feature-analysis` requires a target, start that task type with the in-host skill; the two option sections below document the internal Node render inputs, not standalone shell options.
|
|
65
65
|
|
|
66
66
|
Short form for a later phase when an existing task-manifest.json is available:
|
|
67
67
|
|
|
@@ -371,6 +371,7 @@ Lead runtime independence boundary:
|
|
|
371
371
|
|
|
372
372
|
- `claude-code`: the current default execution path. Claude Code v2.1.178 removed `TeamCreate`, and the session owns an implicit team. Workers are dispatched with `Agent(name: ..., run_in_background: true)` without `team_name`. `teamName` is audit/display metadata; Claude session JSONL is used for usage accounting.
|
|
373
373
|
- `codex`: the runtime marker for the Codex lead adapter. `okstra codex-run` owns `--render-only --lead-runtime codex` to prepare a task bundle, and the prepared run manifest can be passed to `okstra codex-dispatch` for CLI-backed worker execution.
|
|
374
|
+
- `antigravity`: the runtime marker for the Antigravity CLI lead adapter. The current Antigravity session owns the native lead, keeps Antigravity assignments native, and routes every other provider through its registered CLI wrapper.
|
|
374
375
|
- `external`: without Claude Code Teams, `--render-only --lead-runtime external` prepares the task bundle and external lead prompt. The lead manages the tmux-pane worker lifecycle with `okstra team dispatch`, `okstra team await`, and `okstra team teardown`. This path does not use `TeamCreate` / `Agent(...)` and uses artifact-only accounting.
|
|
375
376
|
|
|
376
377
|
The current Claude Code independence boundary covers the external lead prompt and `okstra team *` worker dispatch. non-render `okstra_ctl.run --lead-runtime external` remains blocked; a complete external lead driver remains separate future work. `--runtime external` only selects the runtime adapter. `okstra install` creates `~/.agents/skills/` by default and also installs Claude skills and agents when `~/.claude` exists. Selecting the `claude` worker still requires the local Claude CLI wrapper.
|
|
@@ -381,32 +382,47 @@ Code session, that session may not have accepted workspace trust yet. The next
|
|
|
381
382
|
`/okstra-run` preflight reports `runtimeReadiness.checks[id=workspace-trust]`
|
|
382
383
|
and stops before the wizard when trust is required or cannot be verified. The
|
|
383
384
|
user reopens the project, accepts the one Claude Code workspace prompt, and
|
|
384
|
-
reruns the command. This check applies only to a `claude-code` host; `codex
|
|
385
|
-
`external` hosts do not inspect Claude Code state, regardless of whether the
|
|
385
|
+
reruns the command. This check applies only to a `claude-code` host; `codex`,
|
|
386
|
+
`antigravity`, and `external` hosts do not inspect Claude Code state, regardless of whether the
|
|
386
387
|
worker roster contains Claude, Codex, or Antigravity.
|
|
387
388
|
|
|
388
389
|
### Runtime auto-detection (`auto`)
|
|
389
390
|
|
|
390
|
-
`okstra run` defaults to `auto`. `auto` resolves to one of `claude-code`, `codex`, or `external` based on the host through `src/lib/runtime-resolver.mjs`. Precedence: explicit runtime > the `OKSTRA_RUNTIME_HOST` environment variable > Claude Code skill handoff > external when tmux is available > fail fast otherwise. The safe fallback never silently selects a runtime different from the user's intent.
|
|
391
|
+
`okstra run` defaults to `auto`. `auto` resolves to one of `claude-code`, `codex`, `antigravity`, or `external` based on the host through `src/lib/runtime-resolver.mjs`. Precedence: explicit runtime > the `OKSTRA_RUNTIME_HOST` environment variable > Claude Code skill handoff > external when tmux is available > fail fast otherwise. The safe fallback never silently selects a runtime different from the user's intent, and the presence of the `agy` binary alone never selects the Antigravity host.
|
|
391
392
|
|
|
392
|
-
- Inside Claude Code, `/okstra-run` is the front door.
|
|
393
|
-
- On a Codex host, `okstra
|
|
393
|
+
- Inside Claude Code, `/okstra-run` is the front door. Bare `okstra run` cannot invoke host-native Claude workers.
|
|
394
|
+
- On a Codex host, the installed `okstra-run` skill is the front door. Bare `okstra run` cannot invoke host-native Codex workers.
|
|
395
|
+
- On an Antigravity host, the installed `okstra-run` skill is the front door. Bare `okstra run` cannot invoke host-native Antigravity workers.
|
|
394
396
|
- In a generic terminal with tmux, `okstra run` orchestrates `render-bundle --lead-runtime external` -> `okstra team dispatch` -> `okstra team await`.
|
|
395
397
|
|
|
396
|
-
`doctor` and `render-bundle` also default to `auto`, but a plain terminal without a host signal must specify a host. `okstra install` and `ensure-installed` are exceptions. Installation places the shared runtime and skill targets based on agent homes rather than the runtime host, so it records the `auto` request and unresolved state in the manifest and continues even without a host signal. Skill copy targets depend on the presence of agent homes and the default Agent target policy, not runtime resolution. `~/.agents/skills/` is always created, and Claude skills/agents are installed when `~/.claude` exists.
|
|
398
|
+
`doctor` and `render-bundle` also default to `auto`, but a plain terminal without a host signal must specify a host. `okstra install` and `ensure-installed` are exceptions. Installation places the shared runtime and skill targets based on agent homes rather than the runtime host, so it records the `auto` request and unresolved state in the manifest and continues even without a host signal. Skill copy targets depend on the presence of agent homes and the default Agent target policy, not runtime resolution. `~/.agents/skills/` is always created, and Claude skills/agents are installed when `~/.claude` exists. The host-aware `okstra-run` skill passes the current harness runtime explicitly; Claude-only maintenance skills continue to pass `--runtime claude-code` where that host is part of their contract.
|
|
397
399
|
|
|
398
400
|
`installed-runtimes.json` uses schemaVersion 2 and separates `installRequest`, `runtimeResolution`, `installedRuntimes`, and `installedAssets`. `installed-skills.json` uses a schemaVersion 2 target list with `provider`, `root`, and `skills` to record Claude and Agent skill targets; uninstall removes files according to this list. `codexAdapter` / `externalAdapter` retain read compatibility with v1 manifests only.
|
|
399
401
|
|
|
400
402
|
For a Codex lead dry run, use `okstra codex-run <args...>`. It adds `--render-only --lead-runtime codex` itself and prints the prepared task bundle and lead prompt without dispatching workers.
|
|
401
403
|
The generated team-state, run manifest, and task manifest point `leadEventsPath` to `runs/<task-type>/state/lead-events-<task-type>-<seq>.jsonl`; rendering records a `bundle-prepared` event.
|
|
402
|
-
Then `okstra codex-dispatch --project-root <dir> --run-manifest <run-manifest> --workers
|
|
404
|
+
Then `okstra codex-dispatch --project-root <dir> --run-manifest <run-manifest> [--workers <csv>]` reads each persisted assignment. `runner=native-session` rows stay with the current Codex host; `runner=cli-wrapper` rows run through their registered Claude, Antigravity, Grok, Kimi, or report-writer wrapper. The report-writer provider and model come from the manifest without a Codex-only opt-in flag; on success, postprocessing runs token-usage substitution → render-views → spawn-followups → validate-run in order.
|
|
403
405
|
|
|
404
|
-
The Codex worker (`--workers codex`, `--codex-model`) and Codex lead runtime are separate. The former
|
|
406
|
+
The Codex worker (`--workers codex`, `--codex-model`) and Codex lead runtime are separate. The former creates a worker assignment whose runner depends on the host; the latter selects Codex as the native lead boundary. On Claude Code the Codex worker uses a CLI wrapper, while on Codex it uses the host-native worker/session primitive.
|
|
405
407
|
|
|
406
408
|
> Every `--*-model` flag accepts only aliases registered in the provider mappings in `scripts/okstra_ctl/models.py`. An unregistered value is immediately rejected with `UnknownModelError`, preventing a contract violation where the manifest's `modelExecutionValue` differs from the actual execution value. Allowed values:
|
|
407
|
-
> - Claude (`--lead-model` / `--claude-model` / `--report-writer-model`): `fable`, `fable-5`, `claude-fable-5`, `opus`, `opus-5`, `claude-opus-5`, `opus-4-8`, `claude-opus-4-8`, `opus-4-7`, `claude-opus-4-7`, `opus-4-6`, `claude-opus-4-6`, `sonnet`, `sonnet-4-6`, `claude-sonnet-4-6`, `haiku`, `haiku-4-5`, `claude-haiku-4-5`, `claude-haiku-4-5-20251001`
|
|
409
|
+
> - Claude (`--lead-model` / `--claude-model` / `--report-writer-model`): `fable`, `fable-5`, `claude-fable-5`, `opus`, `opus-5`, `claude-opus-5`, `opus-4-8`, `claude-opus-4-8`, `opus-4-7`, `claude-opus-4-7`, `opus-4-6`, `claude-opus-4-6`, `sonnet`, `sonnet-5`, `claude-sonnet-5`, `sonnet-4-6`, `claude-sonnet-4-6`, `haiku`, `haiku-4-5`, `claude-haiku-4-5`, `claude-haiku-4-5-20251001`
|
|
408
410
|
> - Codex (`--codex-model`): `gpt-5.6-sol`, `gpt-5.6`, `gpt-5.5`, `gpt-5.4`, `gpt-5.4-mini`, `gpt-5.3-codex`, `gpt-5.2`, `codex-auto-review`
|
|
409
|
-
> - Antigravity (`--antigravity-model`): `gemini-3.1-pro` (default), `gemini-3.5-flash`, and
|
|
411
|
+
> - Antigravity (`--antigravity-model`): `gemini-3.1-pro` (default), `gemini-3.6-flash`, `gemini-3.5-flash`, and their space-separated aliases. The antigravity worker uses the `agy` CLI to run Gemini-family models, so model IDs retain the `gemini-*` form.
|
|
412
|
+
> - Grok (`--worker-model grok=<model>`): `grok-build-0.1`, `grok-4.5`
|
|
413
|
+
> - Kimi (`--worker-model kimi=<model>`): `kimi-k2.7-code`, `kimi-for-coding`, `kimi-k3`, `k3`, `k3-256k` and their registered display aliases
|
|
414
|
+
|
|
415
|
+
### `--lead-provider`
|
|
416
|
+
|
|
417
|
+
Compatibility assertion for previously recorded invocations. The value must match the host-native provider: `claude` on Claude Code, `codex` on Codex, and `antigravity` on Antigravity. It is not an independent lead selector. Other providers belong in the worker roster and run through CLI wrappers; preparation rejects a cross-provider lead rather than recording one model and silently running another.
|
|
418
|
+
|
|
419
|
+
### `--worker-model`
|
|
420
|
+
|
|
421
|
+
Adds generic `provider=model` overrides, separated by commas. It is the model input for registry providers without a legacy dedicated flag, including Grok and Kimi.
|
|
422
|
+
|
|
423
|
+
### `--report-writer-provider`
|
|
424
|
+
|
|
425
|
+
Selects a registry provider that declares the `report-writer` capability. Claude remains the default; Codex is also supported. The provider, model, and resolved runner are persisted in `workerAssignments[]`.
|
|
410
426
|
|
|
411
427
|
### `--claude-model`
|
|
412
428
|
|
|
@@ -415,8 +431,7 @@ When omitted, it uses the central default `OKSTRA_DEFAULT_CLAUDE_MODEL`, falling
|
|
|
415
431
|
|
|
416
432
|
### `--lead-model`
|
|
417
433
|
|
|
418
|
-
Selects the model used by the
|
|
419
|
-
When omitted, it uses the central default `OKSTRA_DEFAULT_LEAD_MODEL`, falling back to `opus`.
|
|
434
|
+
Selects the model used by the host-native Okstra lead. Claude Code resolves it through the Claude catalog; Codex resolves it through the Codex catalog; Antigravity resolves it through the Antigravity catalog. When omitted, the host-native provider's lead default applies.
|
|
420
435
|
|
|
421
436
|
### `--codex-model`
|
|
422
437
|
|
|
@@ -444,7 +459,9 @@ The central-default environment variables are:
|
|
|
444
459
|
|
|
445
460
|
Fallback defaults are:
|
|
446
461
|
|
|
447
|
-
-
|
|
462
|
+
- Claude Code lead: `opus`
|
|
463
|
+
- Codex lead: `gpt-5.6-sol`
|
|
464
|
+
- Antigravity lead: `gemini-3.1-pro`
|
|
448
465
|
- `Report writer worker`: `sonnet`
|
|
449
466
|
- `Claude worker`: `opus`
|
|
450
467
|
- `Codex worker`: `gpt-5.6-sol`
|
|
@@ -478,7 +495,7 @@ scripts/okstra.sh --task-type implementation \
|
|
|
478
495
|
|
|
479
496
|
### `--critic`
|
|
480
497
|
|
|
481
|
-
Selects the provider for the opt-in Phase 5.6 critic pass. The value is `off`, `claude`, `codex`, or `
|
|
498
|
+
Selects the provider for the opt-in Phase 5.6 critic pass. The value is `off`, `claude`, `codex`, `antigravity`, `grok`, or `kimi`; the default is `off`. The selected critic receives its own role-default model even when that provider is not in the initial analyser roster.
|
|
482
499
|
|
|
483
500
|
- Critic dispatch runs concurrently with the first convergence reverify round in Phase 5.5, with critic input fixed to the integrated Round 0 result. One gap/blocker verification round runs in Phase 5.6 after convergence finishes. It detects coverage gaps in discovery, error-analysis, and implementation-planning, and acts as an acceptance devil's advocate in final-verification. Follow the "Coverage critic pass" and "Acceptance critic pass" sections of `prompts/lead/convergence.md` for the detailed contract.
|
|
484
501
|
- It shares the same value space as the critic-selection step in the in-session `okstra-run` wizard. `_resolve_model_bindings` in `prepare_task_bundle` validates the value; anything else is rejected immediately with `PrepareError`.
|
|
@@ -690,13 +707,13 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
690
707
|
| Command | Purpose |
|
|
691
708
|
|---|---|
|
|
692
709
|
| `okstra paths [--field <name>\|--shell]` | Print package, runtime, home, bin, Python path, and version locations |
|
|
693
|
-
| `okstra install [--runtime claude-code\|codex\|external\|all] [--refresh\|--dry-run\|--link <repo>]` | Install or update the runtime, templates, skills, and agents. The default runtime is `auto`; skill targets are not runtimes. `~/.agents/skills/` is always created, and Claude skills and agents are also installed when `~/.claude` exists |
|
|
694
|
-
| `okstra ensure-installed [--runtime claude-code\|codex\|external\|all] [-q]` | Check installation state and reinstall stale assets for the same runtime. Default `auto` continues without a host signal and checks drift in the Agent skill target and any existing Claude target |
|
|
710
|
+
| `okstra install [--runtime claude-code\|codex\|antigravity\|external\|all] [--refresh\|--dry-run\|--link <repo>]` | Install or update the runtime, templates, skills, and agents. The default runtime is `auto`; skill targets are not runtimes. `~/.agents/skills/` is always created, and Claude skills and agents are also installed when `~/.claude` exists |
|
|
711
|
+
| `okstra ensure-installed [--runtime claude-code\|codex\|antigravity\|external\|all] [-q]` | Check installation state and reinstall stale assets for the same runtime. Default `auto` continues without a host signal and checks drift in the Agent skill target and any existing Claude target |
|
|
695
712
|
| `okstra uninstall [--purge -y]` | Remove installed assets. By default, removes files listed by the `installed-skills.json` targets and `installed-agents.json` while preserving user data |
|
|
696
|
-
| `okstra doctor [--runtime claude-code\|codex\|external\|all] [--phase <phase>] [--json]` | Diagnose the runtime, Python imports, and skill/agent installation. The `codex` and `external` runtimes omit Claude skill checks. `--phase` adds readiness checks for `implementation`, `final-verification`, `release-handoff`, or `improvement-discovery` |
|
|
713
|
+
| `okstra doctor [--runtime claude-code\|codex\|antigravity\|external\|all] [--phase <phase>] [--json]` | Diagnose the runtime, Python imports, and skill/agent installation. The `codex`, `antigravity`, and `external` runtimes omit Claude skill checks. `--phase` adds readiness checks for `implementation`, `final-verification`, `release-handoff`, or `improvement-discovery` |
|
|
697
714
|
| `okstra setup --project-id <id>` | Create or update `.okstra/project.json` in the current project |
|
|
698
715
|
| `okstra check-project [--json]` | Verify that the current project is registered |
|
|
699
|
-
| `okstra preflight [--runtime <name>] [--cwd <dir>] [--json]` | Single skill-preflight call combining `ensure-installed`, with silent reinstall when stale, `check-project`, and host-specific `runtimeReadiness` into one JSON response. A `claude-code` host checks project workspace trust; `codex` and `external` hosts return ready without reading Claude Code state. Step 0 of every project-scoped skill converges on this command |
|
|
716
|
+
| `okstra preflight [--runtime <name>] [--cwd <dir>] [--json]` | Single skill-preflight call combining `ensure-installed`, with silent reinstall when stale, `check-project`, and host-specific `runtimeReadiness` into one JSON response. A `claude-code` host checks project workspace trust; `codex`, `antigravity`, and `external` hosts return ready without reading Claude Code state. Step 0 of every project-scoped skill converges on this command |
|
|
700
717
|
| `okstra convergence seed --groups <path> --work-state <path> --final-state <path> --migration-dir <dir> [--restart-from-round0]` | Create, resume, reuse, or explicitly recover deterministic convergence state |
|
|
701
718
|
| `okstra convergence plan-round --work-state <path> --plan <path>` | Persist the next roster-aware dispatch plan without mutating working state |
|
|
702
719
|
| `okstra convergence apply-round --work-state <path> --plan <path> --results <path>` | Validate one complete structured result set and atomically reduce it into working state |
|
|
@@ -729,7 +746,7 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
729
746
|
| `okstra plan-validate <plan-path>` | Run `_validate_approved_plan` and report frontmatter `approved` recognition plus unresolved Blocks=approval rows |
|
|
730
747
|
| `okstra render-bundle <args…> [--stage <auto\|N>] [--stages <csv>]` | Thin shim over `prepare_task_bundle(render_only=True)` with the same signature as `python3 -m okstra_ctl.run --render-only`. `--stage` is for `implementation` and `final-verification`: for implementation, `auto` (default) selects the earliest incomplete stage with satisfied dependencies, while `<N>` forces a stage; for final-verification, `<N>` verifies one stage with artifacts under `runs/final-verification/stage-<N>/` and a `-fv-s<N>` team suffix, while an empty value performs whole-task verification with the flat layout. The separate `--stages <csv>` channel is for `release-handoff`: stage-group mode bundles the listed stage numbers into one PR, while an empty value selects whole-task mode. Preparation enforces eligibility—`done` + accepted `verified` + not yet `pr`—and automatically creates an input document that cites verification reports |
|
|
731
748
|
| `okstra codex-run <args…>` | Codex lead-adapter dry-run entry point. Accepts the same arguments as `render-bundle` but owns `--render-only --lead-runtime codex`. It prepares the task bundle and prints the prompt for the Codex lead without dispatching workers |
|
|
732
|
-
| `okstra codex-dispatch --project-root <dir> --run-manifest <path> [--workers
|
|
749
|
+
| `okstra codex-dispatch --project-root <dir> --run-manifest <path> [--workers <csv>]` | Read a Codex-host run manifest and dispatch every requested `runner=cli-wrapper` assignment through its registered provider wrapper. Native Codex rows remain in-session. The persisted report-writer assignment needs no Codex-specific opt-in; successful report completion triggers token substitution, HTML rendering, follow-up generation, and validation |
|
|
733
750
|
| `okstra team dispatch --project-root <dir> --run-manifest <path> [--workers <csv>] [--jobs-file <path>] [--dry-run]` / `okstra team await --project-root <dir> --run-manifest <path> [--json]` / `okstra team teardown --project-root <dir> --run-manifest <path> [--dry-run] [--json]` | Read a `leadRuntime=external` run manifest and dispatch, await, or tear down tmux-pane workers. If a tmux pane cannot be created, gracefully degrade to the CLI wrapper and record the fallback in `workerDispatches[].degradedFrom` |
|
|
734
751
|
| `okstra report-finalize --project-root <dir> --run-manifest <path> --report <final-report.md>` | Run the whole Phase 7 post-report sequence in its contractual order: `token-usage` → `render-views` → `spawn-followups` → `validate-run`. Stops at the first non-zero exit and names the failing step, then prints a per-step `[ok]` / `[FAIL]` / `[skip]` summary on stderr so the outcome is legible without parsing the JSON payload. Every step is idempotent, so re-running after a fix is safe — but `--only <step>` (repeatable) reruns just the named steps in contractual order, which matters because `validate-run` is the step that usually fails and retrying it otherwise repeats the three steps before it at full token and wall-clock cost. This is the same code path (`scripts/okstra_ctl/report_finalize.py`) the Codex lead adapter runs automatically after its report-writer completes, so a Claude-led and a Codex-led run finalize identically. `--workspace-root` is owned by the Node wrapper. Prefer this over invoking the four steps individually |
|
|
735
752
|
| `okstra render-views <final-report.data.json\|final-report.md>` | The Phase 7 `render-views` step, runnable on its own. Schema v2 data is rendered directly (contract: `schemas/final-report-v2.0.schema.json`) into an always-generated, task-specific human HTML sibling while `templates/reports/final-report-v2.template.md` independently owns the AI handoff Markdown. Passing the Markdown sibling locates the same v2 data.json. Schema v1 and quick reports keep the legacy conditional renderer. The Node wrapper calls `scripts/okstra-render-report-views.py`; `validators/validate-report-views.py` verifies source/schema/template digests, required human fields, form controls, external assets, diagram/table ID parity, and Response ID parity |
|
|
@@ -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,8 +28,8 @@ 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
|
-
-
|
|
31
|
+
- installed skills: 13
|
|
32
|
+
- provider workers: `claude`, `codex`, `antigravity`, `grok`, `kimi`; functional report writer: `report-writer`
|
|
33
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:
|
|
@@ -180,7 +180,7 @@ 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`) |
|
|
@@ -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 |
|
|
@@ -399,7 +399,7 @@ Boilerplate shared by several skills (bash invocation rule, outdated-CLI preflig
|
|
|
399
399
|
| Skill | User-invocable | Role |
|
|
400
400
|
|---|---:|---|
|
|
401
401
|
| `okstra-brief-gen` | yes | Produce task brief from ticket/doc/link/conversation |
|
|
402
|
-
| `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 |
|
|
403
403
|
| `okstra-memory` | yes | Store/search/archive global conversation memory under `~/.okstra/memory-book` |
|
|
404
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` |
|
|
405
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 |
|
|
@@ -421,9 +421,11 @@ Boilerplate shared by several skills (bash invocation rule, outdated-CLI preflig
|
|
|
421
421
|
| `agents/workers/claude-worker.md` | Claude analyzer/verifier/executor spec |
|
|
422
422
|
| `agents/workers/codex-worker.params.json` | Codex analyzer/verifier/executor wrapper params (build renders `.md` via `_cli-wrapper-template.md`) |
|
|
423
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 |
|
|
424
426
|
| `agents/workers/report-writer-worker.md` | data.json SSOT author and audit sidecar writer |
|
|
425
427
|
|
|
426
|
-
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.
|
|
427
429
|
|
|
428
430
|
### 4.12 `tests/` and `tests-e2e/`
|
|
429
431
|
|
|
@@ -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.
|