okstra 0.179.2 → 0.183.2

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.
Files changed (258) hide show
  1. package/README.md +1 -1
  2. package/dist/cli-registry.mjs +30 -2
  3. package/dist/cli-registry.mjs.map +1 -1
  4. package/dist/commands/execute/incremental-carry.mjs +9 -8
  5. package/dist/commands/execute/incremental-carry.mjs.map +1 -1
  6. package/dist/commands/execute/plan-verify.mjs +3 -1
  7. package/dist/commands/execute/plan-verify.mjs.map +1 -1
  8. package/dist/commands/execute/render-bundle.d.mts +4 -2
  9. package/dist/commands/execute/render-bundle.mjs +46 -5
  10. package/dist/commands/execute/render-bundle.mjs.map +1 -1
  11. package/dist/commands/execute/run.mjs +11 -3
  12. package/dist/commands/execute/run.mjs.map +1 -1
  13. package/dist/commands/inspect/model-io.d.mts +1 -0
  14. package/dist/commands/inspect/model-io.mjs +25 -0
  15. package/dist/commands/inspect/model-io.mjs.map +1 -0
  16. package/dist/commands/inspect/stage-map.mjs +29 -8
  17. package/dist/commands/inspect/stage-map.mjs.map +1 -1
  18. package/dist/commands/inspect/task-list.mjs +52 -6
  19. package/dist/commands/inspect/task-list.mjs.map +1 -1
  20. package/dist/commands/inspect/user-response.mjs +14 -4
  21. package/dist/commands/inspect/user-response.mjs.map +1 -1
  22. package/dist/commands/lifecycle/check-project.d.mts +1 -0
  23. package/dist/commands/lifecycle/check-project.mjs +69 -50
  24. package/dist/commands/lifecycle/check-project.mjs.map +1 -1
  25. package/dist/commands/lifecycle/contract-check.d.mts +1 -0
  26. package/dist/commands/lifecycle/contract-check.mjs +18 -0
  27. package/dist/commands/lifecycle/contract-check.mjs.map +1 -0
  28. package/dist/commands/lifecycle/preflight.mjs +154 -51
  29. package/dist/commands/lifecycle/preflight.mjs.map +1 -1
  30. package/dist/commands/pr/pr.d.mts +1 -0
  31. package/dist/commands/pr/pr.mjs +19 -1
  32. package/dist/commands/pr/pr.mjs.map +1 -1
  33. package/dist/commands/report/agent-activity.mjs +2 -2
  34. package/dist/commands/report/approval-decision.d.mts +1 -0
  35. package/dist/commands/report/approval-decision.mjs +21 -0
  36. package/dist/commands/report/approval-decision.mjs.map +1 -0
  37. package/dist/commands/report/design-snapshot.d.mts +1 -0
  38. package/dist/commands/report/design-snapshot.mjs +19 -0
  39. package/dist/commands/report/design-snapshot.mjs.map +1 -0
  40. package/dist/commands/report/translate.mjs +3 -0
  41. package/dist/commands/report/translate.mjs.map +1 -1
  42. package/dist/lib/host-registry-client.mjs +13 -9
  43. package/dist/lib/host-registry-client.mjs.map +1 -1
  44. package/docs/architecture/storage-model.md +1 -1
  45. package/docs/architecture.md +21 -10
  46. package/docs/cli.md +36 -20
  47. package/docs/container.md +6 -4
  48. package/docs/contributor-change-matrix.md +1 -1
  49. package/docs/for-ai/README.md +2 -2
  50. package/docs/for-ai/skills/okstra-brief-gen.md +5 -3
  51. package/docs/for-ai/skills/okstra-code-review.md +4 -4
  52. package/docs/for-ai/skills/okstra-container-build.md +20 -17
  53. package/docs/for-ai/skills/okstra-inspect.md +20 -23
  54. package/docs/for-ai/skills/okstra-manager.md +19 -18
  55. package/docs/for-ai/skills/okstra-memory.md +2 -2
  56. package/docs/for-ai/skills/okstra-pr-gen.md +3 -3
  57. package/docs/for-ai/skills/okstra-rollup.md +14 -13
  58. package/docs/for-ai/skills/okstra-run.md +7 -3
  59. package/docs/for-ai/skills/okstra-schedule-gen.md +15 -18
  60. package/docs/for-ai/skills/okstra-setup.md +7 -7
  61. package/docs/for-ai/skills/okstra-usage.md +5 -4
  62. package/docs/for-ai/skills/okstra-user-response.md +50 -32
  63. package/docs/project-structure-overview.md +43 -31
  64. package/docs/task-process/implementation-planning.md +2 -2
  65. package/docs/task-process/implementation.md +7 -4
  66. package/package.json +1 -1
  67. package/runtime/BUILD.json +2 -2
  68. package/runtime/agents/workers/claude-worker.md +4 -4
  69. package/runtime/agents/workers/report-writer-worker.md +15 -164
  70. package/runtime/agents/workers/translator-worker.md +5 -13
  71. package/runtime/bin/okstra-error-log.py +51 -11
  72. package/runtime/bin/okstra-report-translate.py +210 -23
  73. package/runtime/prompts/host-orchestration/implementation.md +1 -1
  74. package/runtime/prompts/launch.template.md +9 -12
  75. package/runtime/prompts/lead/adapters/cmux.md +1 -1
  76. package/runtime/prompts/lead/context-loader.md +41 -141
  77. package/runtime/prompts/lead/convergence.md +10 -8
  78. package/runtime/prompts/lead/okstra-lead-contract.md +40 -49
  79. package/runtime/prompts/lead/plan-body-verification.md +217 -23
  80. package/runtime/prompts/lead/report-writer.md +81 -421
  81. package/runtime/prompts/lead/team-contract.md +9 -54
  82. package/runtime/prompts/profiles/_clarification-recommendation.md +5 -4
  83. package/runtime/prompts/profiles/_coding-conventions-preflight.md +3 -2
  84. package/runtime/prompts/profiles/_common-contract.md +4 -4
  85. package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
  86. package/runtime/prompts/profiles/_implementation-diff-review.md +1 -1
  87. package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
  88. package/runtime/prompts/profiles/change-impact-analysis.md +1 -1
  89. package/runtime/prompts/profiles/error-analysis.md +1 -1
  90. package/runtime/prompts/profiles/feature-analysis.md +1 -1
  91. package/runtime/prompts/profiles/final-verification.md +1 -1
  92. package/runtime/prompts/profiles/implementation-planning.md +20 -12
  93. package/runtime/prompts/profiles/improvement-discovery.md +1 -1
  94. package/runtime/prompts/profiles/project-analysis.md +1 -1
  95. package/runtime/prompts/profiles/release-handoff.md +0 -1
  96. package/runtime/prompts/profiles/requirements-discovery.md +1 -1
  97. package/runtime/prompts/wizard/prompts.ko.json +0 -1
  98. package/runtime/python/okstra_ctl/adapters/hosts/capability_adapter.py +69 -17
  99. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +13 -4
  100. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +8 -2
  101. package/runtime/python/okstra_ctl/adapters/hosts/codex/adapter.py +2 -2
  102. package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +50 -5
  103. package/runtime/python/okstra_ctl/adapters/hosts/external/relay.md +1 -1
  104. package/runtime/python/okstra_ctl/adapters/hosts/grok/adapter.py +2 -2
  105. package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +66 -5
  106. package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +70 -2
  107. package/runtime/python/okstra_ctl/agent_activity.py +141 -38
  108. package/runtime/python/okstra_ctl/agent_invocation.py +19 -6
  109. package/runtime/python/okstra_ctl/agent_prompt_cli.py +70 -23
  110. package/runtime/python/okstra_ctl/analysis_inputs.py +5 -4
  111. package/runtime/python/okstra_ctl/analysis_packet.py +124 -3
  112. package/runtime/python/okstra_ctl/approval_decisions.py +328 -0
  113. package/runtime/python/okstra_ctl/attempt_evidence.py +2 -2
  114. package/runtime/python/okstra_ctl/backfill.py +13 -10
  115. package/runtime/python/okstra_ctl/batch.py +2 -4
  116. package/runtime/python/okstra_ctl/build_tools.py +6 -3
  117. package/runtime/python/okstra_ctl/claim_reproduction.py +101 -0
  118. package/runtime/python/okstra_ctl/clarification_items.py +27 -13
  119. package/runtime/python/okstra_ctl/cmux.py +130 -52
  120. package/runtime/python/okstra_ctl/code_review_target.py +34 -8
  121. package/runtime/python/okstra_ctl/consumers.py +5 -4
  122. package/runtime/python/okstra_ctl/container.py +103 -8
  123. package/runtime/python/okstra_ctl/context_cost.py +2 -1
  124. package/runtime/python/okstra_ctl/contract_graph.py +497 -0
  125. package/runtime/python/okstra_ctl/contract_graph_cli.py +62 -0
  126. package/runtime/python/okstra_ctl/convergence.py +338 -17
  127. package/runtime/python/okstra_ctl/convergence_engine.py +10 -18
  128. package/runtime/python/okstra_ctl/convergence_provenance.py +58 -8
  129. package/runtime/python/okstra_ctl/convergence_store.py +55 -34
  130. package/runtime/python/okstra_ctl/design_prep.py +7 -4
  131. package/runtime/python/okstra_ctl/design_snapshot.py +134 -0
  132. package/runtime/python/okstra_ctl/dispatch_core.py +97 -69
  133. package/runtime/python/okstra_ctl/dispatch_state.py +163 -63
  134. package/runtime/python/okstra_ctl/doctor.py +6 -3
  135. package/runtime/python/okstra_ctl/domain/worker_presentation.py +70 -9
  136. package/runtime/python/okstra_ctl/entrypoints/hosts.py +16 -30
  137. package/runtime/python/okstra_ctl/error_log_write.py +35 -30
  138. package/runtime/python/okstra_ctl/error_report.py +26 -1
  139. package/runtime/python/okstra_ctl/error_zip.py +27 -5
  140. package/runtime/python/okstra_ctl/execution_identity.py +3 -2
  141. package/runtime/python/okstra_ctl/execution_manifest.py +7 -4
  142. package/runtime/python/okstra_ctl/execution_mutation_audit.py +6 -2
  143. package/runtime/python/okstra_ctl/final_report_schema.py +26 -17
  144. package/runtime/python/okstra_ctl/fix_cycles.py +2 -2
  145. package/runtime/python/okstra_ctl/fixed_text.py +39 -0
  146. package/runtime/python/okstra_ctl/git_reconcile.py +41 -9
  147. package/runtime/python/okstra_ctl/handoff.py +5 -4
  148. package/runtime/python/okstra_ctl/i18n.py +4 -2
  149. package/runtime/python/okstra_ctl/implementation_direction.py +22 -14
  150. package/runtime/python/okstra_ctl/implementation_outcome.py +4 -7
  151. package/runtime/python/okstra_ctl/incremental_carry.py +130 -17
  152. package/runtime/python/okstra_ctl/incremental_scope.py +12 -4
  153. package/runtime/python/okstra_ctl/index.py +8 -11
  154. package/runtime/python/okstra_ctl/initial_prompt_materialization.py +79 -7
  155. package/runtime/python/okstra_ctl/invocation.py +3 -6
  156. package/runtime/python/okstra_ctl/json_boundary.py +366 -0
  157. package/runtime/python/okstra_ctl/json_registry.py +10 -12
  158. package/runtime/python/okstra_ctl/jsonl.py +19 -2
  159. package/runtime/python/okstra_ctl/lead_events.py +33 -1
  160. package/runtime/python/okstra_ctl/listing.py +3 -3
  161. package/runtime/python/okstra_ctl/log_report.py +24 -2
  162. package/runtime/python/okstra_ctl/manager_cli.py +92 -7
  163. package/runtime/python/okstra_ctl/manager_store.py +12 -10
  164. package/runtime/python/okstra_ctl/material.py +5 -1
  165. package/runtime/python/okstra_ctl/migrate.py +29 -25
  166. package/runtime/python/okstra_ctl/model_cli.py +3 -15
  167. package/runtime/python/okstra_ctl/model_io_cli.py +1051 -0
  168. package/runtime/python/okstra_ctl/mutation_probe.py +13 -4
  169. package/runtime/python/okstra_ctl/pane_reclaim.py +3 -2
  170. package/runtime/python/okstra_ctl/path_hints.py +12 -0
  171. package/runtime/python/okstra_ctl/paths.py +21 -0
  172. package/runtime/python/okstra_ctl/plan_items.py +115 -4
  173. package/runtime/python/okstra_ctl/plan_items_cli.py +626 -34
  174. package/runtime/python/okstra_ctl/ports/worker_dispatch.py +2 -1
  175. package/runtime/python/okstra_ctl/pr_template.py +3 -2
  176. package/runtime/python/okstra_ctl/project_meta.py +5 -7
  177. package/runtime/python/okstra_ctl/recap.py +5 -4
  178. package/runtime/python/okstra_ctl/reconcile.py +21 -27
  179. package/runtime/python/okstra_ctl/registry/host_discovery.py +3 -2
  180. package/runtime/python/okstra_ctl/registry/provider_registry.py +3 -2
  181. package/runtime/python/okstra_ctl/render.py +74 -16
  182. package/runtime/python/okstra_ctl/render_final_report.py +10 -8
  183. package/runtime/python/okstra_ctl/report_assembly.py +509 -0
  184. package/runtime/python/okstra_ctl/report_contract.py +2 -1
  185. package/runtime/python/okstra_ctl/report_finalize.py +67 -32
  186. package/runtime/python/okstra_ctl/report_html/render.py +3 -2
  187. package/runtime/python/okstra_ctl/report_inputs.py +72 -0
  188. package/runtime/python/okstra_ctl/report_language.py +3 -2
  189. package/runtime/python/okstra_ctl/report_markdown.py +81 -8
  190. package/runtime/python/okstra_ctl/report_narrative.py +351 -0
  191. package/runtime/python/okstra_ctl/report_projections.py +265 -0
  192. package/runtime/python/okstra_ctl/report_synthesis_packet.py +518 -0
  193. package/runtime/python/okstra_ctl/report_views.py +3 -2
  194. package/runtime/python/okstra_ctl/rollup.py +65 -4
  195. package/runtime/python/okstra_ctl/run.py +184 -65
  196. package/runtime/python/okstra_ctl/run_audit.py +3 -2
  197. package/runtime/python/okstra_ctl/run_context.py +6 -9
  198. package/runtime/python/okstra_ctl/run_index_row.py +2 -8
  199. package/runtime/python/okstra_ctl/schedule_semantics.py +5 -2
  200. package/runtime/python/okstra_ctl/schema_excerpt.py +15 -8
  201. package/runtime/python/okstra_ctl/session_transcript.py +27 -1
  202. package/runtime/python/okstra_ctl/set_work_status.py +64 -38
  203. package/runtime/python/okstra_ctl/stage_fix_carry.py +8 -6
  204. package/runtime/python/okstra_ctl/stage_ledger.py +132 -18
  205. package/runtime/python/okstra_ctl/stage_map.py +96 -28
  206. package/runtime/python/okstra_ctl/stage_targets.py +3 -4
  207. package/runtime/python/okstra_ctl/team.py +3 -2
  208. package/runtime/python/okstra_ctl/team_reconcile.py +11 -2
  209. package/runtime/python/okstra_ctl/time_report.py +51 -4
  210. package/runtime/python/okstra_ctl/usage_identity.py +2 -1
  211. package/runtime/python/okstra_ctl/usage_report.py +58 -4
  212. package/runtime/python/okstra_ctl/user_response.py +1431 -66
  213. package/runtime/python/okstra_ctl/wizard.py +11 -44
  214. package/runtime/python/okstra_ctl/work_categories.py +3 -2
  215. package/runtime/python/okstra_ctl/worker_dispatch.py +5 -2
  216. package/runtime/python/okstra_ctl/worker_prompt_body.py +49 -3
  217. package/runtime/python/okstra_ctl/worker_prompt_contract.py +3 -2
  218. package/runtime/python/okstra_ctl/worker_prompt_policy.py +31 -3
  219. package/runtime/python/okstra_ctl/worker_runner.py +14 -12
  220. package/runtime/python/okstra_ctl/workflow.py +2 -1
  221. package/runtime/python/okstra_ctl/worktree.py +3 -2
  222. package/runtime/python/okstra_ctl/wrapper_status.py +4 -2
  223. package/runtime/python/okstra_ctl/write_policy.py +4 -2
  224. package/runtime/python/okstra_token_usage/antigravity.py +39 -12
  225. package/runtime/python/okstra_token_usage/collect.py +90 -38
  226. package/runtime/python/okstra_token_usage/grok.py +127 -0
  227. package/runtime/schemas/final-report-v2.0.schema.json +9 -0
  228. package/runtime/schemas/final-report-v3.0.schema.json +10219 -0
  229. package/runtime/schemas/report-narrative-v3.0.schema.json +30 -0
  230. package/runtime/schemas/report-synthesis-packet-v1.0.schema.json +140 -0
  231. package/runtime/skills/okstra-brief-gen/SKILL.md +9 -7
  232. package/runtime/skills/okstra-code-review/SKILL.md +21 -11
  233. package/runtime/skills/okstra-container-build/SKILL.md +18 -18
  234. package/runtime/skills/okstra-inspect/SKILL.md +12 -11
  235. package/runtime/skills/okstra-inspect/facets/error-zip.md +8 -8
  236. package/runtime/skills/okstra-inspect/facets/errors.md +2 -2
  237. package/runtime/skills/okstra-inspect/facets/history.md +9 -14
  238. package/runtime/skills/okstra-inspect/facets/logs.md +2 -2
  239. package/runtime/skills/okstra-inspect/facets/recap.md +5 -5
  240. package/runtime/skills/okstra-inspect/facets/report.md +6 -10
  241. package/runtime/skills/okstra-inspect/facets/status.md +9 -8
  242. package/runtime/skills/okstra-inspect/facets/time.md +3 -3
  243. package/runtime/skills/okstra-manager/SKILL.md +16 -14
  244. package/runtime/skills/okstra-memory/SKILL.md +3 -3
  245. package/runtime/skills/okstra-pr-gen/SKILL.md +5 -4
  246. package/runtime/skills/okstra-rollup/SKILL.md +6 -16
  247. package/runtime/skills/okstra-run/SKILL.md +7 -7
  248. package/runtime/skills/okstra-schedule-gen/SKILL.md +21 -17
  249. package/runtime/skills/okstra-setup/SKILL.md +21 -13
  250. package/runtime/skills/okstra-setup/references/project-config.md +2 -2
  251. package/runtime/skills/okstra-usage/SKILL.md +10 -10
  252. package/runtime/skills/okstra-user-response/SKILL.md +78 -107
  253. package/runtime/templates/report-writer-prompt-preamble.md +29 -19
  254. package/runtime/templates/reports/html/macros/forms.html +6 -4
  255. package/runtime/templates/reports/schedule.template.md +4 -4
  256. package/runtime/templates/worker-error-contract.md +17 -29
  257. package/runtime/validators/validate-run.py +636 -72
  258. package/runtime/validators/validate_session_conformance.py +43 -7
package/docs/container.md CHANGED
@@ -21,14 +21,14 @@
21
21
  ## Command format
22
22
 
23
23
  ```
24
- okstra container <up|status|logs|stop-watcher|down> --project-root <PATH> --task-key <KEY> [options]
24
+ okstra container <up|status|logs|stop-watcher|down> --project-root <PATH> --task-key <KEY> [--text] [options]
25
25
  ```
26
26
 
27
27
  | sub-command | Behavior | Additional options |
28
28
  |---|---|---|
29
29
  | `up` | Verify stage integration → validate `docker-compose.yml` → compose env override → `docker compose -p <project> up -d` → poll health checks → start a tail/watcher pane for each container | — |
30
30
  | `status` | Show the live container group status by querying Docker labels | — |
31
- | `logs` | Report `watchersDir` and registered watcher entries as JSON; it does not stream Docker container logs | `--service <NAME>` (filters watcher metadata; all registered watchers when omitted) |
31
+ | `logs` | Report the watcher directory and registered watcher entries; it does not stream Docker container logs | `--service <NAME>` (filters watcher metadata; all registered watchers when omitted) |
32
32
  | `stop-watcher` | Stop the watcher panes for the task (containers remain running) | — |
33
33
  | `down` | Tear down the container group and stop attached watchers | `--all` |
34
34
 
@@ -45,6 +45,8 @@ Identifier of the task to deploy, in the form `<project-id>:<task-group>:<task-i
45
45
 
46
46
  The actual `logs` output from `logs_container_group()` contains `watchersDir` and registered watcher entries in `watchers`. It does not run `docker compose logs` and does not stream Docker container logs. Inspect each watcher's `findings_path` and the files beneath `watchersDir` for monitoring results.
47
47
 
48
+ `--text` emits command-specific fixed labels for model-facing skills. Without it, the command preserves the full machine JSON bytes and exit codes.
49
+
48
50
  ### `--all` (`down` only)
49
51
  Clean up **all** task container groups and watchers within the current project root's `.okstra/` scope. The boundary is limited to the `<project-root>/.okstra/` prefix, so panes belonging to **other projects** in concurrent sessions are never touched. Without `--all`, a single `down` cleans up exactly the panes for the specified task.
50
52
 
@@ -99,13 +101,13 @@ container/
99
101
 
100
102
  ## Exit behavior/output
101
103
 
102
- Each sub-command writes its result to stdout as JSON and returns exit code 0. Validation failures (missing configuration files, merge conflicts, health check timeouts, and so on) terminate abnormally with a `PrepareError` that identifies what went wrong.
104
+ Each sub-command returns exit code 0 on success. `--text` writes its command-specific fixed labels for model callers; the default writes the full machine JSON contract. Validation failures (missing configuration files, merge conflicts, health check timeouts, and so on) terminate abnormally with a `PrepareError` that identifies what went wrong.
103
105
 
104
106
  ## Usage examples
105
107
 
106
108
  ```bash
107
109
  # Deploy and start monitoring
108
- okstra container up --project-root /path/to/proj --task-key proj:auth:login-fix
110
+ okstra container up --project-root /path/to/proj --task-key proj:auth:login-fix --text
109
111
 
110
112
  # Status
111
113
  okstra container status --project-root /path/to/proj --task-key proj:auth:login-fix
@@ -11,6 +11,6 @@ Use this matrix before changing high-risk repo contracts. Update the source file
11
11
  | Add phase | `scripts/okstra_ctl/workflow.py`, `prompts/profiles/`, `validators/`, `tests/` | workflow and validation contract tests |
12
12
  | Change worker roster | `prompts/profiles/*.md`, `scripts/okstra_ctl/workers.py`, `tests/contract/test_repo_contracts.py` | worker roster contract tests |
13
13
  | Change report section | `schemas/final-report-v2.0.schema.json`, `templates/reports/final-report-v2.template.md`, `scripts/okstra_ctl/render_final_report.py`, `validators/validate-run.py` | final-report schema, renderer, and validator tests |
14
- | Maintain Korean review mirrors | `config/korean-sources.json`, `tools/korean-sources/` (`lifecycle.mjs` plus its `lifecycle-*.mjs` support modules, CLI/hooks adapters, and shared workflow), `.agents/skills/sync-korean-sources/`, `.claude/skills/sync-korean-sources/` | `tests-js/korean-sources-*.test.mjs` (`lifecycle`, `cli`, `hooks`, and `skill`) |
14
+ | Maintain Korean review mirrors | `config/korean-sources.json`, `tools/korean-sources/` (`cli.mjs`, `baseline.mjs`, `config.mjs`, `markdown.mjs`, and the shared workflow), `.agents/skills/sync-korean-sources/`, `.claude/skills/sync-korean-sources/` | `tests-js/korean-sources-*.test.mjs` (`cli`, `config`, `markdown`, and `skill`) |
15
15
 
16
16
  `runtime/` is build output. Never edit it directly; change source files and rebuild the runtime payload instead.
@@ -32,13 +32,13 @@ This directory is a compressed manual for an AI to quickly select and precisely
32
32
 
33
33
  ## Shared Execution Rules
34
34
 
35
- 1. Run commands as separate Bash calls whenever the source skill requires it. In particular, do not wrap `okstra preflight --runtime claude-code --json`, `okstra wizard ...`, or `okstra container ...` calls in `&&`, `||`, `$(...)`, a leading variable assignment, `eval`, or `export`.
35
+ 1. Run commands as separate Bash calls whenever the source skill requires it. In particular, do not wrap `okstra preflight --runtime claude-code`, `okstra wizard ...`, or `okstra container ...` calls in `&&`, `||`, `$(...)`, a leading variable assignment, `eval`, or `export`.
36
36
  2. An `okstra <subcmd>` call bootstraps its own Python path. Unless a skill states otherwise, do not build `okstra paths --shell` or `export PYTHONPATH=...`.
37
37
  3. Most skills except `okstra-setup` do not use an `npx` fallback. If the runtime is missing, tell the user to run `/okstra-setup` and stop. But if it fails with `unknown command: <cmd>`, the `okstra` binary on PATH is older than the skill — point the user to `npm i -g okstra@latest` rather than `/okstra-setup`, and stop.
38
38
  4. Project artifacts go under `<PROJECT_ROOT>/.okstra/` by default. The exception is `okstra-memory`, which uses the global user memory `~/.okstra/memory-book/`.
39
39
  5. `runtime/` is build output. When fixing a source skill or template, edit the source under `skills/`, `templates/`, `validators/`, `scripts/`, `src/` and apply it via a build.
40
40
  6. Do not guess the contents of a tracker, URL, file, report, log, zip, template, or validator. Use only what you have confirmed by reading or running with a tool.
41
- 7. Read-side skills also produce some artifacts. `okstra-inspect errors` produces an error report Markdown and `okstra-inspect error-zip` produces an anonymized zip. Even in these cases, keep the CLI stdout JSON as the source of truth.
41
+ 7. Read-side skills also produce some artifacts. `okstra-inspect errors` produces an error report Markdown and `okstra-inspect error-zip` produces an anonymized zip. Even in these cases, keep the purpose-specific fixed CLI fields as the source of truth.
42
42
 
43
43
  ## The Order the AI Reads In
44
44
 
@@ -43,10 +43,12 @@ Output location:
43
43
  Run as a single call.
44
44
 
45
45
  ```bash
46
- okstra preflight --runtime claude-code --json
46
+ okstra preflight --runtime claude-code
47
47
  ```
48
48
 
49
- If runtime or project setup is missing, guide the user to `/okstra-setup` and stop. This skill does not use an `npx` fallback.
49
+ On `Okstra preflight: ready`, carry the fixed `Project root` line. On
50
+ `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. This skill
51
+ does not use an `npx` fallback.
50
52
 
51
53
  ## Input collection
52
54
 
@@ -107,7 +109,7 @@ Processing:
107
109
 
108
110
  ## task-group and filename
109
111
 
110
- For task-group, show existing-group recommendations first. Call `okstra task-list`, extract the distinct `taskGroup` values from `tasks[]` in most-recent order, and offer the 2 most recent + enter-directly. In tracker recursion, task-group must be obtained before building any child path.
112
+ For task-group, show existing-group recommendations first. Call `okstra task-list --text`, read the distinct fixed `Task group` values in `Updated at` order, and offer the 2 most recent + enter-directly. If `Status` is `error`, report `Failure stage` and `Failure reason`, then stop. If `Task count` is `0`, ask for free text. In tracker recursion, task-group must be obtained before building any child path.
111
113
 
112
114
  File path rule:
113
115
 
@@ -34,15 +34,15 @@ The branch-mode result path is the one deliberate exception to the `.okstra/`-on
34
34
  A single Bash call with the literal `okstra` token (not wrapped in `if` / `eval` / `export` / `$(...)` / `VAR=` / `||` / `&&` / `npx`):
35
35
 
36
36
  ```bash
37
- okstra preflight --runtime claude-code --json
37
+ okstra preflight --runtime claude-code
38
38
  ```
39
39
 
40
- `ok:true` → carry `projectRoot` as a literal. `ok:false` → retry the intended directory with `--cwd <dir>`; if that also fails, point at `/okstra-setup` and stop. `unknown command: preflight` or `unknown command: code-review` means the `okstra` binary predates the skill — `npm i -g okstra@latest`, then stop.
40
+ `Okstra preflight: ready` → carry `Project root` as a literal. `Okstra preflight: failed` → retry the intended directory with `--cwd <dir>`; if that also fails, show `Reason` and `Recovery`, then stop. `unknown command: preflight` or `unknown command: code-review` means the `okstra` binary predates the skill — `npm i -g okstra@latest`, then stop.
41
41
 
42
42
  ## Flow
43
43
 
44
- 1. **Resolve the target.** Stage mode: `okstra resolve-task-key <token> --project-root <projectRoot> --json`, then `okstra stage-map <taskKey> --project <projectRoot> --json`, and pick the stage with a 3-option picker (recommendations first, `Enter directly` last). Branch mode: pick the branch the same way; a detached HEAD is refused.
45
- 2. **Call the target CLI**: `okstra code-review target --task-key <k> --stage <N> --project-root <dir> --json`, or `okstra code-review target --branch <name> [--base <ref>] --project-root <dir> --json`. It returns `{ok, projectRoot, mode, worktreePath, branch, baseCommit, headCommit, reviewPath, round}` (stage mode adds `taskKey`, `taskRoot`, `stage`). **Never derive the base** — the CLI owns it, and `baseCommit` may be a ref rather than a commit id, so pass it through verbatim. Run git in `worktreePath` when non-empty, otherwise in `projectRoot` against `branch`.
44
+ 1. **Resolve the target.** A full `project-id:task-group:task-id` token is already the key. For a bare token, run `okstra model-io task-selection-input --project-root <projectRoot> --task-ref <token>` and use the fixed `Match count`, `Task`, and `Updated at` rows. Then run `okstra stage-map <taskKey> --project <projectRoot> --text` and pick from the fixed `Stages` and `Done stages` rows with a 3-option picker (recommendations first, `Enter directly` last). Branch mode picks the branch the same way; a detached HEAD is refused.
45
+ 2. **Call the target CLI**: `okstra code-review target --task-key <k> --stage <N> --project-root <dir> --text`, or `okstra code-review target --branch <name> [--base <ref>] --project-root <dir> --text`. Carry the returned `Project root`, `Mode`, `Worktree path`, `Branch`, `Base commit`, `Head commit`, `Review path`, and `Round` values; stage mode also carries `Task key`, `Task root`, and `Stage`. Then run `okstra model-io code-review-input --project-root <projectRoot> --base <baseCommit> --head <headCommit>` and pass only that fixed Markdown view to model prompts. **Never derive the base** — the CLI owns it, and `Base commit` may be a ref rather than a commit id, so pass it through verbatim. Run git in `Worktree path` when non-empty, otherwise in `Project root` against `Branch`.
46
46
  3. **Show the base and confirm it** with a 3-option picker before censusing anything — the returned `baseCommit` plus `git log -1 --oneline <baseCommit>` first, `Enter directly` last. Only an override calls the target CLI a second time, with `--base <ref>`.
47
47
  4. **Census the diff** per `census-rules.md`: four axes (`structural`, `semantic`, `state-and-tests`, `general`), one cell per target per axis — the axis **is** the rule group, never one cell per individual rule. Membership is mechanical; judgment only ever decides a verdict. Route the coding-preflight packs exactly once here (`okstra paths --field home` → `<okstraHome>/prompts/coding-preflight/overview.md`), and fix the calibration path the briefs carry (`~/.claude/skills/okstra-code-review/references/review-calibration.md`). Print every cell table, every exclusion with its reason, the applied packs, and both completion criteria. Never truncate a large census — report the cell count and confirm.
48
48
  5. **Materialize and dispatch four reviewers in parallel.** Each reviewer is a separate standalone invocation under `.okstra/agent-invocations/code-review/`. Write `<invocation-id>.instructions.md`, run `okstra agent-prompt materialize --purpose code-review --audience code-reviewer ...`, and verify the returned `metadataPath` before dispatch. A native host call receives the verified prompt body and `hostModelValue`; a deterministic provider process receives the prompt path and `modelExecutionValue` through `okstra worker-dispatch`. Each brief carries the diff, the work directory, its own axis's cell list verbatim, its packs' absolute paths, and the absolute calibration path.
@@ -27,10 +27,13 @@
27
27
  Single call:
28
28
 
29
29
  ```bash
30
- okstra preflight --runtime claude-code --json
30
+ okstra preflight --runtime claude-code
31
31
  ```
32
32
 
33
- If the project is not set up, point to `/okstra-setup` and stop. A Docker daemon is required. On a Docker connection error, tell the user to start Docker Desktop/daemon; do not start Docker yourself.
33
+ On `Okstra preflight: ready`, carry the fixed `Project root` line. On
34
+ `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. A Docker
35
+ daemon is required. On a Docker connection error, tell the user to start Docker
36
+ Desktop/daemon; do not start Docker yourself.
34
37
 
35
38
  ## task-key resolution
36
39
 
@@ -40,7 +43,7 @@ Most sub-commands need a full task-key.
40
43
  2. For a bare task-id, use the resolver:
41
44
 
42
45
  ```bash
43
- okstra resolve-task-key <task-id> --project-root <projectRoot> --json
46
+ okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
44
47
  ```
45
48
 
46
49
  3. On multiple matches, show the candidates and let the user pick.
@@ -63,7 +66,7 @@ If ambiguous, show the full facet list and offer an Enter directly option. When
63
66
  Run:
64
67
 
65
68
  ```bash
66
- okstra container up --project-root <projectRoot> --task-key <task-key>
69
+ okstra container up --project-root <projectRoot> --task-key <task-key> --text
67
70
  ```
68
71
 
69
72
  Preconditions:
@@ -79,17 +82,17 @@ Handling failure messages:
79
82
  - `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
80
83
  - healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
81
84
 
82
- On success, parse the stdout JSON and summarize services, watcher pane, and published ports. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
85
+ On success, read the fixed `Service` and `Watcher` rows, then run the `status --text` command below and read its numbered container `ports` fields. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
83
86
 
84
87
  ## status
85
88
 
86
89
  Run:
87
90
 
88
91
  ```bash
89
- okstra container status --project-root <projectRoot> --task-key <task-key>
92
+ okstra container status --project-root <projectRoot> --task-key <task-key> --text
90
93
  ```
91
94
 
92
- stdout JSON:
95
+ Fixed fields:
93
96
 
94
97
  - `projectName`: compose project name
95
98
  - `containers`: running containers found by run-trace label
@@ -102,52 +105,52 @@ The `containers` label query is authoritative for whether it is alive. The watch
102
105
  Run:
103
106
 
104
107
  ```bash
105
- okstra container logs --project-root <projectRoot> --task-key <task-key>
108
+ okstra container logs --project-root <projectRoot> --task-key <task-key> --text
106
109
  ```
107
110
 
108
111
  service scope:
109
112
 
110
113
  ```bash
111
- okstra container logs --project-root <projectRoot> --task-key <task-key> --service <service>
114
+ okstra container logs --project-root <projectRoot> --task-key <task-key> --service <service> --text
112
115
  ```
113
116
 
114
- Show the stdout JSON's `watchersDir` and `watchers`. The live stream is in the tmux watcher pane, not a file. If raw compose logs are needed, get `projectName` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
117
+ Show the fixed `Watchers dir` and numbered `Watchers` rows. The live stream is in the tmux watcher pane, not a file. If raw compose logs are needed, get `Project name` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
115
118
 
116
119
  ## stop-watcher
117
120
 
118
121
  Run:
119
122
 
120
123
  ```bash
121
- okstra container stop-watcher --project-root <projectRoot> --task-key <task-key>
124
+ okstra container stop-watcher --project-root <projectRoot> --task-key <task-key> --text
122
125
  ```
123
126
 
124
- Remove only the watcher/tail panes and keep the containers. Summarize the stdout JSON's `reapedPanes` and `note`. If the user actually intends to bring the containers down, route to `down`.
127
+ Remove only the watcher/tail panes and keep the containers. Summarize the fixed `Reaped panes` and `Note` rows. If the user actually intends to bring the containers down, route to `down`.
125
128
 
126
129
  ## down
127
130
 
128
131
  Single task:
129
132
 
130
133
  ```bash
131
- okstra container down --project-root <projectRoot> --task-key <task-key>
134
+ okstra container down --project-root <projectRoot> --task-key <task-key> --text
132
135
  ```
133
136
 
134
137
  Whole project:
135
138
 
136
139
  ```bash
137
- okstra container down --project-root <projectRoot> --all
140
+ okstra container down --project-root <projectRoot> --all --text
138
141
  ```
139
142
 
140
143
  A single-task down is fine to run after resolving the task-key. `--all` takes down every okstra container group in the project, so confirm with the user before running it.
141
144
 
142
- Report the stdout JSON's `downed` and `orphanPanesReaped`. Show each `projectName` and the reaped panes.
145
+ Report the fixed `Downed` and `Orphan panes reaped` rows. Show each project name and the reaped panes.
143
146
 
144
147
  ## Output rules
145
148
 
146
- - The stdout JSON is the source of truth.
149
+ - The fixed text fields are the source of truth.
147
150
  - Do not second-guess it with raw `docker` commands. The only exception is when the CLI failed and the user asked for a manual fallback.
148
151
  - Show the resolved task-key in the heading or on the first line.
149
152
  - Show CLI failure messages verbatim, including the remediation line.
150
- - Show container/service state as the JSON values, without normalizing.
153
+ - Show container/service state as the fixed values, without normalizing.
151
154
 
152
155
  ## Forbidden patterns
153
156
 
@@ -40,10 +40,10 @@ No sub-command writes outside this machine.
40
40
  Run once before any sub-command.
41
41
 
42
42
  ```bash
43
- okstra preflight --runtime claude-code --json
43
+ okstra preflight --runtime claude-code
44
44
  ```
45
45
 
46
- The project check only sees the cwd of the Bash call. For a project that is not the cwd (a sibling repo, a monorepo subdir, or a project named in the request), `ok:false` is a false negative, not a missing setup do not stop immediately; retry with `okstra preflight --runtime claude-code --cwd <that-dir> --json` (`--cwd` is the sanctioned way to target a project without a leading `cd`). Only when that also returns `ok:false` do you guide the user to `/okstra-setup` and stop. Then use `projectRoot` as a literal value, and pass it to the sub-command CLIs that accept it (`recap`, `context-cost`, etc.) via `--cwd`/`--project-root <projectRoot>`.
46
+ The project check only sees the cwd of the Bash call. For a project that is not the cwd (a sibling repo, a monorepo subdir, or a project named in the request), `Okstra preflight: failed` can be a false negative rather than missing setup. Retry with `okstra preflight --runtime claude-code --cwd <that-dir>` (`--cwd` is the sanctioned way to target a project without a leading `cd`). Only when that also reports `Okstra preflight: failed` do you show `Reason` and `Recovery`, then stop. On `Okstra preflight: ready`, carry `Project root` as a literal value and pass it to the sub-command CLIs that accept it (`recap`, `context-cost`, etc.) via `--cwd`/`--project-root <projectRoot>`.
47
47
 
48
48
  ## intent routing
49
49
 
@@ -62,10 +62,10 @@ Many facets accept the following target forms.
62
62
  A bare task-id uses the shared resolver.
63
63
 
64
64
  ```bash
65
- okstra resolve-task-key <task-id> --project-root <projectRoot> --json
65
+ okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
66
66
  ```
67
67
 
68
- Handling `matches[]`:
68
+ Handling the fixed text projection's `Match count` and repeated task lines:
69
69
 
70
70
  - 0: say it cannot be found; do not guess.
71
71
  - 1: use that `taskKey`.
@@ -75,7 +75,7 @@ Handling `matches[]`:
75
75
 
76
76
  ### Project overview
77
77
 
78
- Read `.okstra/discovery/task-catalog.json`. Do not re-open individual manifests for the overview. The catalog is the projected source.
78
+ Run `okstra model-io status-input --project-root <projectRoot>`. Its fixed text task blocks are the projected source.
79
79
 
80
80
  Sort: `updatedAt` desc, then `taskKey`.
81
81
 
@@ -91,7 +91,7 @@ Keep the table narrow.
91
91
 
92
92
  ### Specific task
93
93
 
94
- For a single task's detail, check the catalog first, then if needed read `.okstra/tasks/<group>/<id>/task-manifest.json`, `history/timeline.json`, and the latest run manifest.
94
+ For a single task's detail, run `okstra model-io status-input --project-root <projectRoot> --task-ref <task-key>` and use its named lines.
95
95
 
96
96
  Information to show:
97
97
 
@@ -117,7 +117,7 @@ Allowed values:
117
117
  - `blocked`
118
118
  - `done`
119
119
 
120
- Procedure: update via a single `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --json` call — do not edit the manifest by hand. On `stage:"ambiguous"`, re-ask with `matches[]`; on `stage:"not-found"`, answer that it cannot be found.
120
+ Procedure: update via a single `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --text` call — do not edit the manifest by hand. On `Stage: ambiguous`, re-ask with the listed `Match` values; on `Stage: not-found`, answer that it cannot be found.
121
121
 
122
122
  When `workStatus` is absent in a read display, infer it from the lifecycle state, but do not back-fill on read alone.
123
123
 
@@ -128,20 +128,15 @@ First branch: distinguish re-run from resume.
128
128
  - Re-run: create a new run from previous run parameters. A new run-seq is created.
129
129
  - Resume: continue an interrupted existing run. No new run-seq is created.
130
130
 
131
- If the catalog is absent, fall back to the `.okstra/tasks/*/*/task-manifest.json` glob. The disk manifest is the source of truth.
131
+ Run `okstra model-io history-input --project-root <projectRoot>` for project history, or add `--task-ref <task-key>` for one task.
132
132
 
133
- Re-run extracts `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, relatedTasks, model overrides, and so on from the source run-manifest to assemble the command. `implementation`'s `--base-ref` is not in the run-manifest but in the worktree registry, so ask for it as the situation requires.
133
+ Re-run obtains `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, related tasks, model overrides, and executor provider through `okstra model-io rerun-input --run-manifest <runManifestPath>`. Omit `implementation`'s `--base-ref` to reuse a registration; if launch reports that a base is required, ask the user.
134
134
 
135
135
  Resume checks `latestResumeCommandPath` or the timeline entry's `resumeCommandPath`, and if the file exists, guides/runs `bash <resume-command-path>`. If the path is empty or the file is missing, declare "no resume" and guide to history.3 (re-run).
136
136
 
137
137
  ## report
138
138
 
139
- report path resolution priority:
140
-
141
- 1. `latestReportRecordPath` in `.okstra/discovery/task-catalog.json`
142
- 2. `latestReportRecordPath` in the direct `task-manifest.json`
143
- 3. a specific run's `reportPath` in `history/timeline.json`
144
- 4. specific task-type fallback: `runs/<task-type>/reports/final-report-*.data.json`, including stage-isolated paths. Render a full reading copy on demand with `okstra render-final-report <that data.json>`.
139
+ Run `okstra model-io report-input --project-root <projectRoot> --task-ref <task-key>` for the latest report. For a specific run, use the `Report` line from `okstra model-io history-input --project-root <projectRoot> --task-ref <task-key>`. Render a full reading copy on demand with `okstra render-final-report <that data.json>`.
145
140
 
146
141
  Match read depth to the request (a final report is 300+ lines / 50K+ tokens). For summary/conclusion/pass questions ("summary", "just the key points", "conclusion", "did it pass?"), do not read the whole thing — read only the verdict in the `runs/<task-type-segment>/status/final-<task-type-segment>-<NNN>.status` (stage-isolated: `runs/<task-type-segment>/stage-<N>/status/`) sidecar plus the report's leading summary block. Ingest the whole file only for "the whole thing / read it all / full body". If a completion signal exists but the file does not, report it as a missing report; if it is not yet complete, show the current status and workStatus.
147
142
 
@@ -150,7 +145,7 @@ Match read depth to the request (a final report is 300+ lines / 50K+ tokens). Fo
150
145
  The CLI does the time computation. The AI does not recompute duration by hand.
151
146
 
152
147
  ```bash
153
- okstra time-report <task-key> --project-root <projectRoot> --json
148
+ okstra time-report <task-key> --project-root <projectRoot> --text
154
149
  ```
155
150
 
156
151
  Convert every `*Ms` to `HH:MM:SS` for display. `CPU sum` is the overlapping cost of lead and workers time combined, not wall-clock. Show wall-clock from `perRunWallClock` only when the user explicitly asks. For `by stage`/`per stage`/`which stage took longest`, the task-type view (the By task type table) is the default answer — do not treat it as 'not measurable'. Render the intra-run `phaseTimelines` only on an explicit request like 'Phase 1–7' / 'which phase', and when it is empty, mention it only as a footnote rather than a headline.
@@ -178,7 +173,7 @@ Interpretation points:
178
173
  wrapper sidecar log inventory:
179
174
 
180
175
  ```bash
181
- okstra log-report --project-root <projectRoot> --json
176
+ okstra log-report --project-root <projectRoot> --text
182
177
  ```
183
178
 
184
179
  Scans `.okstra/tasks/**/runs/*/prompts/*.log`. Does not delete. The cleanup command merely presents a dry-run and `-delete` pair as fenced bash.
@@ -190,21 +185,21 @@ Deleting an active run's log loses the live trace, so recommend checking `status
190
185
  Aggregate task error logs into a markdown report.
191
186
 
192
187
  ```bash
193
- okstra error-report <task-key> --project-root <projectRoot>
188
+ okstra error-report <task-key> --project-root <projectRoot> --text
194
189
  ```
195
190
 
196
- Read `reportPath`, totals, byPhase, byAgent, parseSkipped from the stdout JSON and summarize. If `reportPath` is absent and errorCount is 0, say there are no recorded error logs. Do not hide `parseSkipped > 0`.
191
+ Read the fixed `Report path`, total, phase, agent, and parse-skipped labels and summarize. If the report path is `-` and total errors is 0, say there are no recorded error logs. Do not hide a nonzero parse-skipped count.
197
192
 
198
193
  ## error-zip
199
194
 
200
195
  Bundle the machine's cross-project okstra errors into an anonymized zip.
201
196
 
202
- For the output path, recommend `lastOutputPath` from `~/.okstra/error-zip.json` first, and if absent, propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
197
+ Run `okstra model-io error-zip-input`. Recommend its `Previous output path` first when present; otherwise propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
203
198
 
204
199
  Run:
205
200
 
206
201
  ```bash
207
- okstra error-zip --out <path>
202
+ okstra error-zip --out <path> --text
208
203
  ```
209
204
 
210
205
  Summary fields:
@@ -222,12 +217,14 @@ At the end, guide the user to build a brief with the error-feedback variant of `
222
217
 
223
218
  The default is artifact mode. It builds the before/after summary and answers questions using only `.okstra/` artifacts.
224
219
 
225
- assemble:
220
+ Read the fixed recap projection:
226
221
 
227
222
  ```bash
228
- okstra recap assemble <task-key> --project-root <projectRoot>
223
+ okstra model-io recap-input --project-root <projectRoot> --task-ref <task-key>
229
224
  ```
230
225
 
226
+ Use the emitted `Run count` and repeated `Transition` fields in order. Do not parse recap JSON or open recap state files directly.
227
+
231
228
  record:
232
229
 
233
230
  ```bash
@@ -13,7 +13,8 @@ Use this to bundle okstra tasks across multiple projects into a single manager-o
13
13
  ## Execution Rules
14
14
 
15
15
  1. Every command starts with the literal `okstra`. Do not wrap it in shell variables, `$(...)`, `&&`, `eval`, or a leading env assignment.
16
- 2. JSON stdout is the source of truth. Do not reconstruct manager state or child launch args from docs/memory.
16
+ 2. The fixed CLI fields are the source of truth. Do not reconstruct manager state or child launch args from docs/memory.
17
+ Nested project, manifest, child, snapshot, and directive values use numbered count/name/value rows; carry every returned row.
17
18
  3. `--workspace-root` is owned by the Node wrapper. The CLI rejects it if the user passes it.
18
19
  4. `new project`'s `--project-root` must be an already-existing directory. It performs setup-equivalent registration only when there is no `.okstra/project.json` inside it.
19
20
  5. The public child task identity is `project-id:task-group:task-id`. The `new task --task` example shows the full key form first.
@@ -22,16 +23,16 @@ Use this to bundle okstra tasks across multiple projects into a single manager-o
22
23
  ## Command Surface
23
24
 
24
25
  ```bash
25
- okstra manager init --manager-id <manager-id> --json
26
- okstra manager discover-projects --json
27
- okstra manager new project --manager-id <manager-id> --project-id <project-id> --project-root <abs-path> [--role <role>] [--tag <tag>] --json
28
- okstra manager new task-group --manager-id <manager-id> --task-group <task-group> --json
29
- okstra manager new task --manager-id <manager-id> --task-group <task-group> --task-id <task-id> [--task <project-id:task-group:task-id> ...] [--objective <text>] [--common-brief <path>] [--progress-mode <manual|auto>] --json
30
- okstra manager task assign --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --project-id <project-id> [--child-task-id <child-task-id>] [--role <role>] [--tag <tag>] [--assignment <text>] --json
31
- okstra manager task note --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --scope <shared|project> [--project-id <project-id>] --body <text> --json
32
- okstra manager task sync --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --json
33
- okstra manager task status --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --json
34
- okstra manager task run --manager-id <manager-id> --project-id <project-id> --task-group <task-group> --task-id <task-id> [--child-task-id <child-task-id>] --json
26
+ okstra manager init --manager-id <manager-id>
27
+ okstra manager discover-projects
28
+ okstra manager new project --manager-id <manager-id> --project-id <project-id> --project-root <abs-path> [--role <role>] [--tag <tag>]
29
+ okstra manager new task-group --manager-id <manager-id> --task-group <task-group>
30
+ okstra manager new task --manager-id <manager-id> --task-group <task-group> --task-id <task-id> [--task <project-id:task-group:task-id> ...] [--objective <text>] [--common-brief <path>] [--progress-mode <manual|auto>]
31
+ okstra manager task assign --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --project-id <project-id> [--child-task-id <child-task-id>] [--role <role>] [--tag <tag>] [--assignment <text>]
32
+ okstra manager task note --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --scope <shared|project> [--project-id <project-id>] --body <text>
33
+ okstra manager task sync --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
34
+ okstra manager task status --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
35
+ okstra manager task run --manager-id <manager-id> --project-id <project-id> --task-group <task-group> --task-id <task-id> [--child-task-id <child-task-id>]
35
36
  ```
36
37
 
37
38
  ## Storage Model
@@ -56,13 +57,13 @@ A segment whose slug is empty (e.g. a non-ASCII task-group/task-id) uses a `u-<s
56
57
 
57
58
  ## Child launch
58
59
 
59
- `task run` does not run the child work directly; it prepares a launch packet. The key fields of the returned packet:
60
+ `task run` does not run the child work directly; it prepares a launch packet. The key fixed fields of the returned packet:
60
61
 
61
- - `taskKey`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
62
- - `backend`: `tmux-child-lead` if `$TMUX` is present, otherwise `subagent-child-lead`
63
- - `workerDispatchBackend`: always `subagent` in v1
64
- - `projectRoot`: the child project root
65
- - `contextPath`: the manager child context markdown
66
- - `runArgs`: the `okstra run ... --directive "Read manager child context: ..."` args for the host launcher to use
62
+ - `Task key`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
63
+ - `Backend`: `tmux-child-lead` if `$TMUX` is present, otherwise `subagent-child-lead`
64
+ - `Worker dispatch backend`: always `subagent` in v1
65
+ - `Project root`: the child project root
66
+ - `Context path`: the manager child context markdown
67
+ - every numbered `Run arg N`: the ordered `okstra run ... --directive "Read manager child context: ..."` arguments for the host launcher to use
67
68
 
68
69
  When packet creation succeeds, that child launch's status in `children.json` is updated to `prepared`, and a `child-launch-prepared` is appended to `events.jsonl`. On failure it does not modify the project-local task state.
@@ -51,7 +51,7 @@ Every memory entry belongs to a project-group. Pick the group before storing or
51
51
  Enumerate existing groups:
52
52
 
53
53
  ```bash
54
- okstra memory groups --json
54
+ okstra memory groups
55
55
  ```
56
56
 
57
57
  Recommendations:
@@ -108,7 +108,7 @@ okstra memory show "<memory-id>"
108
108
  okstra memory archive "<memory-id>"
109
109
  ```
110
110
 
111
- Prefer `--json` when you need to parse IDs. Show the user only a short summary plus the entry id/path.
111
+ Read IDs from the fixed text rows. Show the user only a short summary plus the entry id/path.
112
112
 
113
113
  ## Output rules
114
114
 
@@ -31,9 +31,9 @@ A 3-option picker via `AskUserQuestion`:
31
31
 
32
32
  ## Mode A — Generate PR
33
33
 
34
- 1. Pick a template: `okstra pr template list --json`. If empty, use the bundled default. Carry the chosen name as `<template>` (`default` for the bundled one).
35
- 2. Pick the base branch: `okstra pr branches --json`. 3-option from the top `recommended` entries plus `Enter directly`. Carry the choice as `<base>`.
36
- 3. Generation bundle: `okstra pr gen --base <base> --template <template> --json` `{base, currentBranch, templateName, template, commits, diffStat}`. Then **read the real diff honestly** (SSOT): `git diff <base>...HEAD` (large diffs section by section). Fill the placeholders from the diff and commits, describing **only actual changes**. Mark a checklist box `[x]` only when the diff supports it (tests touched → tests box, docs touched → docs box). If `commits`/`diffStat` are empty, say there is nothing to describe and stop. **Never append AI trailers/footers.**
34
+ 1. Pick a template: `okstra pr template list`. If the numbered `Templates` rows are empty, use the bundled default. Carry the chosen name as `<template>` (`default` for the bundled one).
35
+ 2. Pick the base branch: `okstra pr branches`. Build a 3-option picker from the numbered `Recommended` rows plus `Enter directly`. Carry the choice as `<base>`.
36
+ 3. Generation bundle: `okstra pr gen --base <base> --template <template>`. Read the fixed `Base`, `Current branch`, `Template name`, `Commits`, `Diff stat`, and `Template` sections. Then **read the real diff honestly** (SSOT): `git diff <base>...HEAD` (large diffs section by section). Fill the placeholders from the diff and commits, describing **only actual changes**. Mark a checklist box `[x]` only when the diff supports it (tests touched → tests box, docs touched → docs box). If `Commits` or `Diff stat` is empty, say there is nothing to describe and stop. **Never append AI trailers/footers.**
37
37
  4. Identifier allowlist for the title and body: only repo-relative source paths (optionally `path:line`), symbol names present in the diff, branch names / commit subjects / SHAs, and issue-tracker ticket ids the reviewer can open. okstra's own artifact identifiers are out of the allowlist — report item ids (`F-001`, `C-001`, `R-001`, `D-0001`, `PREP-001`), run artifact names and their `<task-type>-<seq>` suffixes, phase/stage/worker labels (`final-verification`, `stage-2`, `codex-worker`), and any path under `.okstra/`. They resolve to nothing for a reviewer; restate the substance in code terms instead of citing the id.
38
38
  5. Output and offer to create the PR: print the filled PR body as a single fenced markdown block. Ask whether to open a PR. **Only on an explicit yes**: write the body to a temp file and run `gh pr create --base <base> --title "<title>" --body-file <path>`. If `gh` is missing or unauthenticated (`gh auth status` fails), leave the text in chat and give manual-creation guidance. **No push/PR creation without the user's confirmation.**
39
39
 
@@ -37,10 +37,11 @@ Do not use it when:
37
37
  A single Bash call starting with the literal `okstra` token (not wrapped in `if`/`eval`/`$(...)`/`VAR=`/`||`/`&&`/`npx` fallback):
38
38
 
39
39
  ```bash
40
- okstra preflight --runtime claude-code --json
40
+ okstra preflight --runtime claude-code
41
41
  ```
42
42
 
43
- `ok:false` → point to `/okstra-setup` and stop. If `ok:true`, carry `projectRoot` as a literal string and proceed.
43
+ On `Okstra preflight: ready`, carry `Project root` as a literal string. On
44
+ `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
44
45
 
45
46
  ## scope resolution
46
47
 
@@ -51,26 +52,26 @@ okstra preflight --runtime claude-code --json
51
52
  ## CLI call
52
53
 
53
54
  ```bash
54
- okstra rollup --task-group <group> --project-root <projectRoot> --json
55
+ okstra rollup --task-group <group> --project-root <projectRoot> --text
55
56
  ```
56
57
 
57
- For the whole project, drop `--task-group`. The output is always JSON, and **all times are raw milliseconds**.
58
+ For the whole project, drop `--task-group`. The output is fixed, ordered label/value rows, and **all times are raw milliseconds**.
58
59
 
59
60
  ## Interpreting the output
60
61
 
61
- Top level:
62
+ Fixed fields:
62
63
 
63
- - `taskGroup` the scope (`null` = whole project), `taskCount` number of tasks.
64
- - `tasks[]` per task: `taskKey, taskGroup, taskId, taskType, workCategory, workStatus, currentPhase, currentPhaseState, nextRecommendedPhase, latestRunStatus, updatedAt, reportPath, runCount, cpuSumMs, wallClockMs, errorCount`.
65
- - `nextRecommendedPhase` is an object `{phase, status, rationale}`, not a string. Print `phase`, or `--` when it is empty. Never interpolate the object itself.
66
- - `totals` `runs, cpuSumMs, wallClockMs, errors`, plus `byWorkStatus` / `byWorkCategory` / `byCurrentPhase` / `byTaskType` (each a `{value: count}` map).
64
+ - `Task group` and `Task count` identify the scope.
65
+ - Numbered `Tasks` rows carry task identity, status, phase, next phase, report path, run count, CPU, wall-clock, and error count.
66
+ - `Totals runs`, `Totals CPU sum ms`, `Totals wall clock ms`, and `Totals errors` are the aggregate values.
67
+ - Numbered `Work status`, `Work category`, `Current phase`, and `Task type` rows carry the aggregate distributions.
67
68
 
68
69
  Numeric meanings (must observe):
69
70
 
70
- - `runCount` is the **total number of runs** in the timeline. `cpuSumMs`/`wallClockMs` reflect only runs that reached Phase 7 usage, so they can be `0` even when `runCount > 0`.
71
- - `cpuSumMs` is the **CPU sum** of the overlapping lead + workers, not wall-clock. Label it "CPU", and show wall-clock as `wallClockMs` only when the user explicitly asks.
72
- - `reportPath` is project-relative and may be empty (a task with no report yet).
73
- - If `taskCount` is `0`, say there are no okstra tasks in that scope and stop.
71
+ - `Run count` is the **total number of runs** in the timeline. CPU and wall-clock rows reflect only runs that reached Phase 7 usage, so they can be `0` even when run count is positive.
72
+ - `CPU sum ms` is the **CPU sum** of the overlapping lead + workers, not wall-clock.
73
+ - `Report path` is project-relative and may be `-` for a task with no report yet.
74
+ - If `Task count` is `0`, say there are no okstra tasks in that scope and stop.
74
75
 
75
76
  ## Render
76
77
 
@@ -37,10 +37,14 @@ Do not use it when:
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 <host-runtime> --json
40
+ okstra preflight --runtime <host-runtime>
41
41
  ```
42
42
 
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`.
43
+ On `Okstra preflight: failed`, show `Reason`, `Recovery`, `Runtime readiness`,
44
+ and every repeated `Readiness check` line, then stop. On
45
+ `Okstra preflight: ready`, require `Runtime readiness: ready`, carry the fixed
46
+ `Project root` line, and read the `Relay contract` path. Do not create an
47
+ `export PYTHONPATH`.
44
48
 
45
49
  ## Bash invocation rule
46
50
 
@@ -187,7 +191,7 @@ This picker is authored by the skill, so it is separate from the wizard-option-a
187
191
 
188
192
  When a `PrepareError` such as `Recorded stage SHAs no longer match the git history` appears, do not fix the registry/consumers by hand.
189
193
 
190
- 1. Run the `okstra git-reconcile ... --check --json` printed in the error message verbatim.
194
+ 1. Run the `okstra git-reconcile ... --check --text` printed in the error message verbatim.
191
195
  2. For each confirm item, ask the user for the current branch tip, a different ref, or abort.
192
196
  3. Run `okstra git-reconcile ... --apply --stage <N> --use-ref <ref>` with the chosen ref.
193
197
  4. Retry the failed render-bundle with the same arguments.