okstra 0.202.0 → 0.204.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.
Files changed (258) hide show
  1. package/README.md +3 -3
  2. package/dist/cli-registry.mjs +7 -7
  3. package/dist/cli-registry.mjs.map +1 -1
  4. package/dist/commands/lifecycle/install.mjs +50 -124
  5. package/dist/commands/lifecycle/install.mjs.map +1 -1
  6. package/dist/commands/memory/memory.mjs +41 -8
  7. package/dist/commands/memory/memory.mjs.map +1 -1
  8. package/dist/lib/install-assets.mjs +3 -0
  9. package/dist/lib/install-assets.mjs.map +1 -1
  10. package/dist/lib/runtime-manifest.mjs +2 -1
  11. package/dist/lib/runtime-manifest.mjs.map +1 -1
  12. package/dist/lib/types.d.mts +2 -1
  13. package/docs/architecture/storage-model.md +14 -11
  14. package/docs/architecture.md +25 -19
  15. package/docs/cli.md +15 -12
  16. package/docs/contributor-change-matrix.md +3 -2
  17. package/docs/performance-improvement-plan-v2.md +2 -3
  18. package/docs/project-structure-overview.md +35 -9
  19. package/docs/task-process/README.md +1 -1
  20. package/docs/task-process/common-flow.md +1 -1
  21. package/docs/task-process/final-verification.md +3 -1
  22. package/docs/task-process/implementation.md +1 -1
  23. package/docs/task-process/release-handoff.md +36 -39
  24. package/package.json +1 -2
  25. package/runtime/BUILD.json +2 -2
  26. package/runtime/agents/common.json +28 -0
  27. package/runtime/agents/operations/code-review.json +6 -0
  28. package/runtime/agents/operations/report-translation.json +6 -0
  29. package/runtime/agents/operations/schedule-verification.json +6 -0
  30. package/runtime/agents/roles/analyser.json +18 -0
  31. package/runtime/agents/roles/critic.json +18 -0
  32. package/runtime/agents/roles/designer.json +18 -0
  33. package/runtime/agents/roles/implementer.json +20 -0
  34. package/runtime/agents/roles/leader.json +20 -0
  35. package/runtime/agents/roles/planner.json +18 -0
  36. package/runtime/agents/roles/report-writer.json +19 -0
  37. package/runtime/agents/roles/translator.json +19 -0
  38. package/runtime/agents/roles/verifier.json +18 -0
  39. package/runtime/bin/lib/okstra/usage.sh +5 -5
  40. package/runtime/prompts/duties/acceptance-critic.json +32 -0
  41. package/runtime/prompts/duties/acceptance-verifier.json +32 -0
  42. package/runtime/prompts/duties/analysis-worker.json +32 -0
  43. package/runtime/prompts/duties/code-reviewer.json +32 -0
  44. package/runtime/prompts/duties/diagnosis-worker.json +32 -0
  45. package/runtime/prompts/duties/direction-selection-worker.json +32 -0
  46. package/runtime/prompts/duties/discovery-worker.json +32 -0
  47. package/runtime/prompts/duties/implementation-executor.json +32 -0
  48. package/runtime/prompts/duties/implementation-verifier.json +32 -0
  49. package/runtime/prompts/duties/lead.json +32 -0
  50. package/runtime/prompts/duties/planning-worker.json +36 -0
  51. package/runtime/prompts/duties/report-writer.json +32 -0
  52. package/runtime/prompts/duties/reverification-worker.json +32 -0
  53. package/runtime/prompts/duties/schedule-verifier.json +32 -0
  54. package/runtime/prompts/duties/scope-critic.json +32 -0
  55. package/runtime/prompts/duties/technical-verification-worker.json +32 -0
  56. package/runtime/prompts/duties/translator.json +32 -0
  57. package/runtime/prompts/launch.template.md +2 -1
  58. package/runtime/prompts/lead/adapters/cmux.md +1 -1
  59. package/runtime/prompts/lead/convergence.md +4 -4
  60. package/runtime/prompts/lead/okstra-lead-contract.md +113 -4
  61. package/runtime/prompts/lead/plan-body-verification.md +6 -6
  62. package/runtime/prompts/lead/report-writer.md +3 -3
  63. package/runtime/prompts/profiles/_common-contract.md +2 -2
  64. package/runtime/prompts/profiles/_implementation-executor.md +4 -1
  65. package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
  66. package/runtime/prompts/profiles/change-impact-analysis.json +31 -0
  67. package/runtime/prompts/profiles/change-impact-analysis.md +0 -20
  68. package/runtime/prompts/profiles/error-analysis.json +39 -0
  69. package/runtime/prompts/profiles/error-analysis.md +0 -25
  70. package/runtime/prompts/profiles/feature-analysis.json +31 -0
  71. package/runtime/prompts/profiles/feature-analysis.md +0 -20
  72. package/runtime/prompts/profiles/final-verification.json +30 -0
  73. package/runtime/prompts/profiles/final-verification.md +3 -22
  74. package/runtime/prompts/profiles/forbidden-actions.json +4 -3
  75. package/runtime/prompts/profiles/implementation-option-selection.json +31 -0
  76. package/runtime/prompts/profiles/implementation-option-selection.md +0 -20
  77. package/runtime/prompts/profiles/implementation-planning.json +40 -0
  78. package/runtime/prompts/profiles/implementation-planning.md +4 -29
  79. package/runtime/prompts/profiles/implementation.json +30 -0
  80. package/runtime/prompts/profiles/implementation.md +1 -20
  81. package/runtime/prompts/profiles/improvement-discovery.json +31 -0
  82. package/runtime/prompts/profiles/improvement-discovery.md +0 -20
  83. package/runtime/prompts/profiles/project-analysis.json +31 -0
  84. package/runtime/prompts/profiles/project-analysis.md +0 -20
  85. package/runtime/prompts/profiles/release-handoff.json +5 -0
  86. package/runtime/prompts/profiles/release-handoff.md +71 -73
  87. package/runtime/prompts/profiles/requirements-discovery.json +39 -0
  88. package/runtime/prompts/profiles/requirements-discovery.md +0 -25
  89. package/runtime/prompts/profiles/technical-verification.json +39 -0
  90. package/runtime/prompts/profiles/technical-verification.md +0 -25
  91. package/runtime/prompts/wizard/prompts.ko.json +12 -17
  92. package/runtime/python/okstra_ctl/adapters/hosts/antigravity/relay.md +1 -0
  93. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +3 -0
  94. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/manifest.json +1 -1
  95. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +4 -3
  96. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/worker-session.md +108 -0
  97. package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +1 -0
  98. package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +2 -0
  99. package/runtime/python/okstra_ctl/adapters/hosts/kimi/relay.md +2 -0
  100. package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +8 -1
  101. package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +8 -0
  102. package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +23 -6
  103. package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +6 -2
  104. package/runtime/python/okstra_ctl/agent/invocation.py +168 -113
  105. package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +120 -0
  106. package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +107 -2
  107. package/runtime/python/okstra_ctl/agent/prompt_cli/run_identity.py +0 -49
  108. package/runtime/python/okstra_ctl/analysis_packet.py +4 -1
  109. package/runtime/python/okstra_ctl/application/open_worker.py +6 -1
  110. package/runtime/python/okstra_ctl/assignment_resolver.py +16 -5
  111. package/runtime/python/okstra_ctl/cmux.py +69 -20
  112. package/runtime/python/okstra_ctl/code_review_target.py +16 -8
  113. package/runtime/python/okstra_ctl/conformance.py +43 -0
  114. package/runtime/python/okstra_ctl/consumers.py +6 -3
  115. package/runtime/python/okstra_ctl/container.py +31 -8
  116. package/runtime/python/okstra_ctl/context_cost.py +11 -15
  117. package/runtime/python/okstra_ctl/contract_refreeze.py +156 -0
  118. package/runtime/python/okstra_ctl/convergence_provenance.py +7 -1
  119. package/runtime/python/okstra_ctl/design_prep.py +34 -1
  120. package/runtime/python/okstra_ctl/dispatch_core.py +53 -27
  121. package/runtime/python/okstra_ctl/domain/host.py +5 -0
  122. package/runtime/python/okstra_ctl/domain/worker_runtime.py +10 -0
  123. package/runtime/python/okstra_ctl/error_report.py +4 -3
  124. package/runtime/python/okstra_ctl/execution_manifest.py +71 -18
  125. package/runtime/python/okstra_ctl/handoff.py +167 -277
  126. package/runtime/python/okstra_ctl/implementation_stage.py +9 -0
  127. package/runtime/python/okstra_ctl/initial_prompt_materialization.py +113 -0
  128. package/runtime/python/okstra_ctl/lead_progress.py +1 -1
  129. package/runtime/python/okstra_ctl/legacy_model_selection.py +2 -2
  130. package/runtime/python/okstra_ctl/manager_cli.py +92 -4
  131. package/runtime/python/okstra_ctl/manager_launch.py +1 -1
  132. package/runtime/python/okstra_ctl/manager_paths.py +14 -3
  133. package/runtime/python/okstra_ctl/manager_store.py +210 -3
  134. package/runtime/python/okstra_ctl/manager_sync.py +4 -1
  135. package/runtime/python/okstra_ctl/manager_view.py +2 -1
  136. package/runtime/python/okstra_ctl/model_discovery.py +30 -0
  137. package/runtime/python/okstra_ctl/model_io/lines.py +14 -1
  138. package/runtime/python/okstra_ctl/model_io/renderers.py +4 -3
  139. package/runtime/python/okstra_ctl/models.py +1 -1
  140. package/runtime/python/okstra_ctl/next_phase.py +16 -6
  141. package/runtime/python/okstra_ctl/operation_invocation.py +86 -0
  142. package/runtime/python/okstra_ctl/option_comparison.py +168 -0
  143. package/runtime/python/okstra_ctl/path_hints.py +9 -0
  144. package/runtime/python/okstra_ctl/paths.py +3 -0
  145. package/runtime/python/okstra_ctl/profile_show.py +42 -1
  146. package/runtime/python/okstra_ctl/registry/host_discovery.py +20 -12
  147. package/runtime/python/okstra_ctl/registry/host_registry.py +11 -0
  148. package/runtime/python/okstra_ctl/render.py +50 -0
  149. package/runtime/python/okstra_ctl/report_contract.py +1 -1
  150. package/runtime/python/okstra_ctl/report_html/view_models/release_handoff.py +21 -3
  151. package/runtime/python/okstra_ctl/report_synthesis_packet.py +177 -17
  152. package/runtime/python/okstra_ctl/report_translation.py +2 -1
  153. package/runtime/python/okstra_ctl/report_translation_dispatch.py +69 -9
  154. package/runtime/python/okstra_ctl/role_requirements.py +142 -129
  155. package/runtime/python/okstra_ctl/rollup.py +3 -1
  156. package/runtime/python/okstra_ctl/run.py +76 -29
  157. package/runtime/python/okstra_ctl/schedule_semantics.py +17 -6
  158. package/runtime/python/okstra_ctl/stage_fix_carry.py +23 -4
  159. package/runtime/python/okstra_ctl/stage_integrate.py +178 -18
  160. package/runtime/python/okstra_ctl/stage_map.py +16 -2
  161. package/runtime/python/okstra_ctl/stage_targets.py +209 -43
  162. package/runtime/python/okstra_ctl/team.py +22 -13
  163. package/runtime/python/okstra_ctl/time_report.py +2 -1
  164. package/runtime/python/okstra_ctl/usage_report.py +3 -1
  165. package/runtime/python/okstra_ctl/wizard/confirmation.py +3 -9
  166. package/runtime/python/okstra_ctl/wizard/ids.py +1 -1
  167. package/runtime/python/okstra_ctl/wizard/registry.py +1 -1
  168. package/runtime/python/okstra_ctl/wizard/state.py +3 -5
  169. package/runtime/python/okstra_ctl/wizard/steps_plan.py +3 -23
  170. package/runtime/python/okstra_ctl/worker_prompt_contract.py +5 -1
  171. package/runtime/python/okstra_ctl/worker_prompt_headers.py +35 -7
  172. package/runtime/python/okstra_ctl/worker_prompt_policy.py +66 -48
  173. package/runtime/python/okstra_ctl/workflow.py +1 -1
  174. package/runtime/python/okstra_ctl/worktree/__init__.py +3 -1
  175. package/runtime/python/okstra_ctl/worktree/naming.py +9 -0
  176. package/runtime/python/okstra_ctl/worktree_registry.py +38 -9
  177. package/runtime/python/okstra_token_usage/pricing.py +6 -4
  178. package/runtime/schemas/agent-common-v1.schema.json +34 -0
  179. package/runtime/schemas/agent-duty-v1.schema.json +38 -0
  180. package/runtime/schemas/agent-operation-v1.schema.json +11 -0
  181. package/runtime/schemas/agent-profile-v1.schema.json +46 -0
  182. package/runtime/schemas/agent-role-v1.schema.json +29 -0
  183. package/runtime/schemas/final-report-v2.0.schema.json +118 -97
  184. package/runtime/schemas/final-report-v3.0.schema.json +118 -97
  185. package/runtime/skills/okstra-brief-gen/SKILL.md +84 -4
  186. package/runtime/skills/okstra-chat/SKILL.md +2 -2
  187. package/runtime/skills/okstra-code-review/SKILL.md +23 -9
  188. package/runtime/skills/okstra-container-build/SKILL.md +10 -10
  189. package/runtime/skills/okstra-inspect/SKILL.md +1 -1
  190. package/runtime/skills/okstra-inspect/facets/cost.md +1 -1
  191. package/runtime/skills/okstra-inspect/facets/error-zip.md +9 -9
  192. package/runtime/skills/okstra-inspect/facets/errors.md +16 -16
  193. package/runtime/skills/okstra-inspect/facets/logs.md +7 -7
  194. package/runtime/skills/okstra-inspect/facets/recap.md +2 -2
  195. package/runtime/skills/okstra-inspect/facets/report.md +1 -1
  196. package/runtime/skills/okstra-inspect/facets/status.md +4 -3
  197. package/runtime/skills/okstra-inspect/facets/time.md +11 -10
  198. package/runtime/skills/okstra-manager/SKILL.md +18 -2
  199. package/runtime/skills/okstra-pr-gen/SKILL.md +6 -5
  200. package/runtime/skills/okstra-rollup/SKILL.md +5 -5
  201. package/runtime/skills/okstra-run/SKILL.md +31 -12
  202. package/runtime/skills/okstra-schedule-gen/SKILL.md +19 -14
  203. package/runtime/skills/okstra-setup/SKILL.md +12 -10
  204. package/runtime/skills/okstra-setup/references/project-config.md +7 -6
  205. package/runtime/skills/okstra-usage/SKILL.md +1 -1
  206. package/runtime/skills/okstra-user-response/SKILL.md +1 -1
  207. package/runtime/templates/manager/view.template.html +1 -0
  208. package/runtime/templates/report-writer-prompt-preamble.md +8 -0
  209. package/runtime/templates/reports/brief.template.md +14 -4
  210. package/runtime/templates/reports/html/i18n/en.json +5 -4
  211. package/runtime/templates/reports/html/i18n/ko.json +5 -4
  212. package/runtime/templates/reports/html/tasks/release-handoff.template.html +8 -5
  213. package/runtime/templates/reports/i18n/en.json +1 -1
  214. package/runtime/templates/reports/md/tasks/release-handoff.template.md +1 -1
  215. package/runtime/templates/reports/release-handoff-input.template.md +6 -4
  216. package/runtime/templates/translator-prompt-preamble.md +36 -0
  217. package/runtime/validators/checks/validate-assets-01.py +7 -8
  218. package/runtime/validators/validate-brief.py +70 -0
  219. package/runtime/validators/validate-implementation-plan-stages.py +2 -1
  220. package/runtime/validators/validate-run.py +59 -9
  221. package/runtime/validators/validate-schedule.py +9 -0
  222. package/docs/for-ai/README.md +0 -68
  223. package/docs/for-ai/skills/okstra-brief-gen.md +0 -262
  224. package/docs/for-ai/skills/okstra-chat.md +0 -34
  225. package/docs/for-ai/skills/okstra-code-review.md +0 -57
  226. package/docs/for-ai/skills/okstra-container-build.md +0 -129
  227. package/docs/for-ai/skills/okstra-inspect.md +0 -262
  228. package/docs/for-ai/skills/okstra-manager.md +0 -86
  229. package/docs/for-ai/skills/okstra-memory.md +0 -126
  230. package/docs/for-ai/skills/okstra-pr-gen.md +0 -49
  231. package/docs/for-ai/skills/okstra-rollup.md +0 -114
  232. package/docs/for-ai/skills/okstra-run.md +0 -250
  233. package/docs/for-ai/skills/okstra-schedule-gen.md +0 -240
  234. package/docs/for-ai/skills/okstra-setup.md +0 -167
  235. package/docs/for-ai/skills/okstra-usage.md +0 -29
  236. package/docs/for-ai/skills/okstra-user-response.md +0 -72
  237. package/runtime/agents/workers/claude-worker.md +0 -128
  238. package/runtime/agents/workers/report-writer-worker.md +0 -37
  239. package/runtime/agents/workers/translator-worker.md +0 -63
  240. package/runtime/prompts/duties/acceptance-critic.md +0 -44
  241. package/runtime/prompts/duties/acceptance-verifier.md +0 -44
  242. package/runtime/prompts/duties/analysis-worker.md +0 -44
  243. package/runtime/prompts/duties/code-reviewer.md +0 -44
  244. package/runtime/prompts/duties/common.md +0 -39
  245. package/runtime/prompts/duties/diagnosis-worker.md +0 -44
  246. package/runtime/prompts/duties/direction-selection-worker.md +0 -44
  247. package/runtime/prompts/duties/discovery-worker.md +0 -44
  248. package/runtime/prompts/duties/implementation-executor.md +0 -44
  249. package/runtime/prompts/duties/implementation-verifier.md +0 -44
  250. package/runtime/prompts/duties/lead.md +0 -44
  251. package/runtime/prompts/duties/planning-worker.md +0 -52
  252. package/runtime/prompts/duties/report-writer.md +0 -44
  253. package/runtime/prompts/duties/reverification-worker.md +0 -44
  254. package/runtime/prompts/duties/schedule-verifier.md +0 -44
  255. package/runtime/prompts/duties/scope-critic.md +0 -44
  256. package/runtime/prompts/duties/technical-verification-worker.md +0 -44
  257. package/runtime/prompts/duties/translator.md +0 -44
  258. package/runtime/python/okstra_ctl/pane_title.py +0 -154
@@ -1,126 +0,0 @@
1
- # okstra-memory AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-memory/SKILL.md`](../../../skills/okstra-memory/SKILL.md)
6
- - CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
7
- - memory CLI: [`src/commands/memory/memory.mjs`](../../../src/commands/memory/memory.mjs)
8
-
9
- ## Purpose
10
-
11
- `okstra-memory` manages the Memory Book in the user's home.
12
-
13
- ```text
14
- ~/.okstra/memory-book/
15
- ```
16
-
17
- It is not a project-local `.okstra/` artifact. It can be used even without `<PROJECT_ROOT>/.okstra/project.json`.
18
-
19
- ## When to use
20
-
21
- Use it when:
22
-
23
- - The user explicitly asks to save, e.g. "remember this", "save the conversation", "organize and store this in okstra", "remember this", "save this decision".
24
- - The user wants to search, list, read, or archive stored memory.
25
-
26
- Do not use it when:
27
-
28
- - The user is only brainstorming with no save request. In that case, ask a confirmation question first.
29
- - The content should be kept as a project task artifact. In that case, use the brief/report/decision path of the relevant okstra task.
30
-
31
- ## safety rule
32
-
33
- Do not save without an explicit save request. Do not store credentials, API keys, tokens, private personal data, or secrets. If the conversation includes sensitive material, exclude it from the summary and note the omission.
34
-
35
- The CLI can also detect high-confidence secret shapes and refuse `memory add`. If refused, redact the content and retry.
36
-
37
- ## CLI availability
38
-
39
- Check the help first.
40
-
41
- ```bash
42
- okstra memory --help
43
- ```
44
-
45
- If `okstra` is not on PATH, do not run `npx okstra@latest install` directly; tell the user to install it once and then retry.
46
-
47
- ## project-group selection
48
-
49
- Every memory entry belongs to a project-group. Pick the group before storing or searching.
50
-
51
- Enumerate existing groups:
52
-
53
- ```bash
54
- okstra memory groups
55
- ```
56
-
57
- Recommendations:
58
-
59
- - the most-used existing group
60
- - the second existing group
61
- - Enter directly
62
-
63
- For a personal note, recommend `private` first. If there is no group or no selection, use the CLI default `global`.
64
-
65
- Pass the chosen group to `add`, `search`, and `list` as `--project-group <group>`. Omit the flag only when the user explicitly wants a cross-group search.
66
-
67
- ## Store procedure
68
-
69
- Do not store the full conversation transcript. Extract only durable memory worth keeping long-term and turn it into a concise Markdown summary.
70
-
71
- Include:
72
-
73
- - the reason for storing
74
- - source: `conversation`
75
- - `--project` when the related project id is clear
76
- - tags for search
77
- - memory type
78
-
79
- The `okstra memory --help` output is authoritative for the type values. Categories per the source:
80
-
81
- - `decision`
82
- - `preference`
83
- - `requirement`
84
- - `person`
85
- - `project-hint`
86
- - `follow-up`
87
- - `context`
88
-
89
- Store command shape:
90
-
91
- ```bash
92
- okstra memory add --content "<summary markdown>" --title "<short title>" --type <type> --project-group <group> --tag <tag> --project <id> --source conversation --yes
93
- ```
94
-
95
- Repeat `--tag` and `--project` as needed. Omit `--project` when no related project is clear.
96
-
97
- Use `--yes` only when the user explicitly asked to save.
98
-
99
- ## search / read / archive
100
-
101
- The default scope is the chosen project-group.
102
-
103
- ```bash
104
- okstra memory search "<query>" --project-group "<group>"
105
- okstra memory list --project-group "<group>" --tag "<tag>"
106
- okstra memory groups
107
- okstra memory show "<memory-id>"
108
- okstra memory archive "<memory-id>"
109
- ```
110
-
111
- Read IDs from the fixed text rows. Show the user only a short summary plus the entry id/path.
112
-
113
- ## Output rules
114
-
115
- - On store, summarize title, type, project-group, tags, and the generated id.
116
- - On search, show the match count and the most relevant entry first.
117
- - Run archive only when the user's intent is clear.
118
- - Do not write into a project `.okstra/`.
119
-
120
- ## Forbidden patterns
121
-
122
- - Auto-saving without an explicit request.
123
- - Storing a secret/token/key.
124
- - Storing the full transcript verbatim.
125
- - Writing into `.okstra/` as if it were project-local task memory.
126
- - Performing a cross-group search by default when the user did not ask for it.
@@ -1,49 +0,0 @@
1
- # okstra-pr-gen AI Manual
2
-
3
- ## Sources
4
-
5
- - Skill source: [`skills/okstra-pr-gen/SKILL.md`](../../../skills/okstra-pr-gen/SKILL.md)
6
- - Template core (CLI): [`scripts/okstra_ctl/pr_template.py`](../../../scripts/okstra_ctl/pr_template.py)
7
- - Node wrapper: [`src/commands/pr/pr.mjs`](../../../src/commands/pr/pr.mjs)
8
- - Bundled default template: [`src/commands/pr/default.md`](../../../src/commands/pr/default.md)
9
-
10
- ## Purpose
11
-
12
- `okstra-pr-gen` registers PR body templates and generates PR descriptions from a branch diff. Templates live in the user home at `~/.okstra/template/pr/`. This skill is **global** — it does not require `<PROJECT_ROOT>/.okstra/project.json`. PR generation additionally requires the current directory to be a git repository.
13
-
14
- ## Check CLI availability
15
-
16
- A separate Bash call with a literal leading token:
17
-
18
- ```bash
19
- okstra pr --help
20
- ```
21
-
22
- If `okstra` is not on PATH: `okstra not installed — run npx okstra@latest install once, then retry`. Every Bash command starts with the literal `okstra` token and passes literal arguments (do not wrap it in `$(...)`/leading `VAR=`/`if`/`eval`/`||`/`&&`).
23
-
24
- ## Pick the mode (always first)
25
-
26
- A 3-option picker via `AskUserQuestion`:
27
-
28
- 1. `Generate PR` — generate a PR body from a branch diff
29
- 2. `Register template` — save a new PR body template
30
- 3. `Enter directly` — always last (okstra picker convention)
31
-
32
- ## Mode A — Generate PR
33
-
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
- 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
- 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
-
40
- ## Mode B — Register template
41
-
42
- 1. Template name (`AskUserQuestion`, free text) — must match `^[A-Za-z0-9._-]+$`, otherwise re-ask.
43
- 2. body — pasted text or an absolute path.
44
- 3. Save: `okstra pr template add --name <name> --file <abs-path>` (or, for pasted text, `--content "<body>"`). Add `--yes` only when the user confirmed overwriting a same-named template. Report the saved path (`saved: ...`).
45
-
46
- ## Output Rules
47
-
48
- - Not read-side — write actions (PR creation, template saving) happen only after the user's explicit confirmation.
49
- - Do not invent changes not in the diff. Stop if commit/diffStat is empty.
@@ -1,114 +0,0 @@
1
- # okstra-rollup AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-rollup/SKILL.md`](../../../skills/okstra-rollup/SKILL.md)
6
- - aggregation core (CLI): [`scripts/okstra_ctl/rollup.py`](../../../scripts/okstra_ctl/rollup.py)
7
- - reused single-task aggregators: [`scripts/okstra_ctl/time_report.py`](../../../scripts/okstra_ctl/time_report.py), [`scripts/okstra_ctl/error_log_core.py`](../../../scripts/okstra_ctl/error_log_core.py)
8
- - catalog enumeration helper: [`scripts/okstra_project/state.py`](../../../scripts/okstra_project/state.py) (`list_project_tasks`)
9
- - unit tests: [`tests/inspect/test_okstra_rollup.py`](../../../tests/inspect/test_okstra_rollup.py)
10
-
11
- ## Purpose
12
-
13
- `okstra-rollup` **collects and summarizes the run results of multiple tasks at once**. It is a cross-task read-side layer, in contrast to `okstra-inspect` which looks at a single task.
14
-
15
- - Input scope: one task-group, or the whole-project catalog when `--task-group` is omitted.
16
- - Deterministic aggregation (counts, time sums, error sums, status/category/phase distributions) is handled entirely by the `okstra rollup` CLI. The skill renders that table and reads each task's report body to write a **cross-task synthesis (digest)**.
17
- - Design principle: hand-computed aggregation is error-prone for an LLM, so it is pushed to the CLI (SSOT), and only the natural-language synthesis is left to the LLM. This is the same division of labor as `okstra-inspect time`, which insists on "never re-sum the time by hand".
18
-
19
- This skill is read-only. It does not mutate task artifacts.
20
-
21
- ## When to use
22
-
23
- Use it when:
24
-
25
- - The user asks for "rollup", "task-group summary", "group-level report", "collect multiple task results", "whole-project task status summary", "run results all at once".
26
- - You want to look across **multiple tasks** rather than a single one.
27
-
28
- Do not use it when:
29
-
30
- - A single task's report/time/errors/recap → `okstra-inspect` (report / time / errors / recap facet).
31
- - "Where does the group stand" — which briefs are done / in progress / not started, what is next, each task's latest conclusion → `okstra-inspect` recap facet with `--task-group`. rollup keeps the numbers (runs, time, errors) and the cross-task digest.
32
- - A forward-looking work plan (a client-facing schedule of non-done tasks) → `okstra-schedule-gen`. rollup is **retrospective**, collecting past run results; schedule is **forward-looking**, planning future work.
33
- - Actual phase execution → `okstra-run`.
34
-
35
- ## Preflight
36
-
37
- A single Bash call starting with the literal `okstra` token (not wrapped in `if`/`eval`/`$(...)`/`VAR=`/`||`/`&&`/`npx` fallback):
38
-
39
- ```bash
40
- okstra preflight --runtime claude-code
41
- ```
42
-
43
- On `Okstra preflight: ready`, carry `Project root` as a literal string. On
44
- `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
45
-
46
- ## scope resolution
47
-
48
- - The user named a task-group ("summarize the alpha group") → `--task-group <group>`.
49
- - "all tasks" / "the whole project" / no scope named → omit `--task-group` (whole catalog).
50
- - If genuinely ambiguous, ask once: one task-group or the whole project? Do not silently guess a specific group.
51
-
52
- ## CLI call
53
-
54
- ```bash
55
- okstra rollup --task-group <group> --project-root <projectRoot> --text
56
- ```
57
-
58
- For the whole project, drop `--task-group`. The output is fixed, ordered label/value rows, and **all times are raw milliseconds**.
59
-
60
- ## Interpreting the output
61
-
62
- Fixed fields:
63
-
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.
68
-
69
- Numeric meanings (must observe):
70
-
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.
75
-
76
- ## Render
77
-
78
- Convert every `*Ms` to `HH:MM:SS` (zero-pad; never expose raw ms — the same rule as `okstra-inspect time`). Sort tasks by `updatedAt` descending.
79
-
80
- ```markdown
81
- ## okstra Rollup — <task-group or "whole project"> (<taskCount> tasks)
82
-
83
- | Task | Category | workStatus | Phase | Runs | CPU | Errors | Report |
84
- |------|----------|------------|-------|------|-----|--------|--------|
85
- | DEV-1 | bugfix | done | final-verification | 2 | 00:25:00 | 2 | ✓ |
86
- | DEV-2 | feature | in-progress | implementation | 1 | 00:00:00 | 0 | — |
87
-
88
- **Totals:** 3 runs · CPU 00:25:00 · 2 errors
89
- **workStatus:** done 1 · in-progress 1 **category:** bugfix 1 · feature 1
90
- ```
91
-
92
- - `Report` column: `✓` when `reportPath` is present, `—` when not.
93
- - Build the status/category/phase lines from the `totals` tally maps **verbatim**. Do not count the `tasks[]` array yourself (the CLI is the SSOT for aggregation).
94
-
95
- ## Writing the digest (the summary — the skill's core value)
96
-
97
- When the user asks to "summarize"/"organize"/"summarize"/"digest" (the common case):
98
-
99
- 1. For each task with a non-empty `reportPath` whose `<projectRoot>/<reportPath>` file actually exists, read the report and summarize in 1–2 lines **what it accomplished and its recommended next step**.
100
- 2. Above the per-task lines, write a 2–4 sentence group-level synthesis: what was delivered across the group, where the open work sits (using `byWorkStatus`/`byCurrentPhase`), and whether there are error hot-spots (tasks with high `errorCount`).
101
- 3. Cite each per-task claim with the report path (`<reportPath>`) so the reader can open it directly.
102
-
103
- For a task with no report, do not invent a summary; state the current phase/workStatus instead. Do not read non-report artifacts to fill the gap (artifact-home rule). If a report is empty or missing, say so.
104
-
105
- If a deep single-task drill-down (full report, per-worker time, error breakdown, run-to-run recap) is needed, point the user to `/okstra-inspect`.
106
-
107
- ## Forbidden patterns
108
-
109
- - Re-counting aggregate numbers (totals, distributions) by hand from `tasks[]`. `totals` is the SSOT.
110
- - Exposing raw ms. Always `HH:MM:SS`.
111
- - Labeling `cpuSumMs` as if it were wall-clock.
112
- - Inventing a summary for a task with no report. Substitute the current phase/workStatus.
113
- - Reading files outside okstra artifacts (non-`.okstra`) to fill the summary.
114
- - Handling single-task detail in rollup. Send it to `okstra-inspect`.
@@ -1,250 +0,0 @@
1
- # okstra-run AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-run/SKILL.md`](../../../skills/okstra-run/SKILL.md)
6
- - wizard CLI wrapper: [`src/commands/execute/wizard.mjs`](../../../src/commands/execute/wizard.mjs)
7
- - wizard state machine: [`scripts/okstra_ctl/wizard/`](../../../scripts/okstra_ctl/wizard/)
8
- - render-bundle CLI: [`src/commands/execute/render-bundle.mjs`](../../../src/commands/execute/render-bundle.mjs)
9
- - prepare entrypoint: [`scripts/okstra_ctl/run.py`](../../../scripts/okstra_ctl/run.py)
10
-
11
- ## Purpose
12
-
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
-
15
- Single authority:
16
-
17
- - Question order: `scripts/okstra_ctl/wizard/registry.py` (`STEPS`); branching: `engine.py`; per-step validation: `steps_*.py`
18
- - task bundle materialization: `prepare_task_bundle()`
19
- - Skill document: thin prompt-relay loop
20
-
21
- ## When to Use
22
-
23
- Use it when:
24
-
25
- - The user wants to start an okstra task in the current session.
26
- - The user wants to continue the next phase of an existing task.
27
- - "okstra run", "okstra start", "start okstra in this session", "run the next phase", etc.
28
-
29
- Do not use it when:
30
-
31
- - The user only wants status: `okstra-inspect status`
32
- - The user wants past runs or a resume command: `okstra-inspect history`
33
- - The user explicitly named a new terminal / new claude process: point them to inspect history/resume
34
-
35
- ## Preflight
36
-
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
-
39
- ```bash
40
- okstra preflight --runtime <host-runtime>
41
- ```
42
-
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`.
48
-
49
- ## Bash invocation rule
50
-
51
- Every okstra call begins with the literal token `okstra`. Read the `--state-file`, `--answer`, path, model, and worker values from the prior JSON/tool output and paste them as literal strings.
52
-
53
- Avoid:
54
-
55
- - `$STATE_FILE`, `$ANSWER`
56
- - `$(...)`
57
- - `VAR=... okstra ...`
58
- - `eval`, `export`
59
- - `okstra ... && okstra ...`
60
-
61
- Do not drop the flag even for an empty answer.
62
-
63
- ```bash
64
- okstra wizard step --state-file /tmp/okstra-wizard/state.json --answer ""
65
- ```
66
-
67
- ## wizard initialization
68
-
69
- Create the state file:
70
-
71
- ```bash
72
- okstra wizard new-state-file
73
- ```
74
-
75
- Carry the printed absolute path verbatim.
76
-
77
- wizard init:
78
-
79
- ```bash
80
- okstra wizard init --state-file /tmp/okstra-wizard/state.json --project-root /abs/project --project-id project-id --host-runtime <host-runtime>
81
- ```
82
-
83
- The result is `{ok, next}` JSON. The first step is `task_pick`.
84
-
85
- ## Interpreting the wizard JSON
86
-
87
- Pick the UI according to `next.kind`.
88
-
89
- | kind | Handling |
90
- |---|---|
91
- | `pick`, `multi: false` | Render every `options[]` verbatim as a selectable choice. Submit the chosen option's `value` |
92
- | `pick`, `multi: true` | Submit all chosen values as a comma-separated string. An empty selection still submits `--answer ""` |
93
- | `pick_group` | Render the wizard's `questions[]` as a single multi-question UI. Build a JSON object of per-step values and submit it in one shot |
94
- | `text` | Show a plain text label without a picker, then submit the user's next message verbatim |
95
- | `done` | Input collection finished. Move to render-args |
96
- | `aborted` | Delete the state file and stop. Do not call render-args/render-bundle |
97
-
98
- `progress.label` is a string the wizard composed. Append it verbatim after the UI prompt; do not compute it yourself.
99
-
100
- ## wizard loop
101
-
102
- 1. Render the prompt.
103
- 2. Submit the user's answer as a literal `--answer`.
104
- 3. `ok: true`: show `result.echo` to the user on one line and advance to the next step.
105
- 4. `ok: false`: show `result.error` verbatim and retry the same step via `result.current`.
106
- 5. `current: null`: a terminal error where the prompt cannot be reconstructed. Show the error and stop.
107
-
108
- Important: never trim, hide, or restructure the wizard-provided options into a "recommended + Enter directly" form. The wizard's `options[]` is the complete choice set.
109
-
110
- ## brief candidate ordering
111
-
112
- The brief selection is handled by the wizard. A new task is asked for its brief right after task-group and **before** the task-type; an existing task is asked only on an entry phase (`requirements-discovery`, `error-analysis`, `improvement-discovery`, `project-analysis`, `feature-analysis`, `change-impact-analysis`).
113
-
114
- - task-group candidates are shown newest-first by combining recent task-catalog use with the recent brief creation/modification times under `.okstra/briefs/<group>/`.
115
- - brief file candidates are chosen from within the selected group's `.okstra/briefs/<task-group>/**/*.md`.
116
- - The brief-file sort key is `max(file created/modified time, task-catalog updatedAt of the task that used this brief)`.
117
- - direct input is always last.
118
- - for a new task the following task-type pick offers entry phases only, and its recommended slot is the selected brief's `Recommended next phase:` line (fallback `requirements-discovery`).
119
-
120
- ## confirm step
121
-
122
- When `next.step == "confirm"`, first fetch the confirmation summary.
123
-
124
- ```bash
125
- okstra wizard confirmation --state-file /tmp/okstra-wizard/state.json
126
- ```
127
-
128
- Show `text` to the user, then render the Proceed/Edit/Abort picker as the final output of that turn — the rendered question is the last thing you emit in that turn, and text emitted after the call renders below the picker. `Edit` rewinds the wizard to an earlier step.
129
-
130
- ## outcome and render-bundle
131
-
132
- When `next.kind == "done"`:
133
-
134
- ```bash
135
- okstra wizard outcome --state-file /tmp/okstra-wizard/state.json
136
- ```
137
-
138
- 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`).
139
-
140
- ```bash
141
- okstra render-bundle \
142
- --lead-runtime <host-runtime> \
143
- --<first-renderArgs-key> "<first-renderArgs-value>" \
144
- --<each-remaining-renderArgs-key> "<corresponding-value>"
145
- ```
146
-
147
- Parse the following labeled lines from stdout.
148
-
149
- - `okstra task root:`
150
- - `okstra instruction-set:`
151
- - optionally `okstra concurrent-run stages:`
152
-
153
- render-bundle calls `prepare_task_bundle()` in render-only mode to prepare the manifests, run context, instruction set, and discovery files, and registers the run as `prepared` in `~/.okstra/recent.jsonl`.
154
-
155
- ## conformance waiver
156
-
157
- Classify the entry before offering a waiver. If `requires` contains `db`,
158
- `http`, or `external`, do not offer a waiver: Okstra still attempts the command,
159
- but any non-PASS or unavailable outcome is an external advisory with a
160
- user-owned rerun method. If `requires=[]`, fail closed as a declaration or
161
- contract defect and do not offer a waiver. Offer the waiver only when
162
- `requires=[io]` and that blocking local conformance command is genuinely
163
- impossible to run in the environment. A waiver requires user approval and a
164
- verbatim reason. Neither the AI lead nor a worker creates a self-exemption.
165
- The resulting blocking/advisory policy is enforced by
166
- `scripts/okstra_ctl/conformance.py::decide_conformance_gate` and
167
- `validators/validate-run.py::_validate_conformance`; the picker restriction is
168
- defined by `prompts/host-orchestration/implementation.md` Step 5.1 (the
169
- `okstra-run` skill body carries a generated copy).
170
-
171
- When chosen, add it to `render-bundle` only.
172
-
173
- ```bash
174
- --qa-waiver "<stageKey>:<reason>"
175
- ```
176
-
177
- Omit the flag entirely when there is no value.
178
-
179
- ## concurrent-run branch
180
-
181
- If `render-bundle` stdout carries `okstra concurrent-run stages:`, the no-team background gate is already reflected in the prompt.
182
-
183
- Give the user three options.
184
-
185
- 1. Proceed as no-team background.
186
- 2. Wait — hold the dispatch, preserve the stage worktree·run context. After the occupying run finishes, print the resume command (`okstra-inspect` history → resume) so the user can resume the same stage.
187
- 3. Enter directly.
188
-
189
- This picker is authored by the skill, so it is separate from the wizard-option-abbreviation ban.
190
-
191
- ## stale git SHA recovery
192
-
193
- When a `PrepareError` such as `Recorded stage SHAs no longer match the git history` appears, do not fix the registry/consumers by hand.
194
-
195
- 1. Run the `okstra git-reconcile ... --check --text` printed in the error message verbatim.
196
- 2. For each confirm item, ask the user for the current branch tip, a different ref, or abort.
197
- 3. Run `okstra git-reconcile ... --apply --stage <N> --use-ref <ref>` with the chosen ref.
198
- 4. Retry the failed render-bundle with the same arguments.
199
-
200
- If the anchor is unresolvable, run `--reset-anchor <ref>` after user confirmation.
201
-
202
- ## PR template persistence
203
-
204
- In release-handoff, when `outcome.persistActions[]` returns a `config.set` / `pr-template-path` action, save the config before render-bundle.
205
-
206
- ```bash
207
- # action.scope == "project"
208
- okstra config set pr-template-path "<path>" --scope project
209
- # action.scope == "global"
210
- okstra config set pr-template-path "<path>" --scope global
211
- ```
212
-
213
- 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.
214
-
215
- ## Okstra lead takeover
216
-
217
- After render-bundle, read the run manifest's `resources.leadExecutionPromptPath` (project-relative, under `runs/<task-type>/prompts/`), read that file verbatim, and proceed from Phase 1 in that prompt's order. Before any in-run approval or clarification question, follow the lead contract "User confirmation before an approval blocker": read cited plan items, worker findings, and files, then ask in the user's language with each option's outcome.
218
-
219
- Inform the user on one line.
220
-
221
- ```text
222
- Took over as Okstra lead (`<host-runtime>`) for `<taskKey>` (`<task-type>`). Run dir: `<RUN_DIR_RELATIVE_PATH>`. Beginning Phase 1 (context loading).
223
- ```
224
-
225
- 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. When the run is over, close with the user's next action — one command they can run now. A prohibition is not a next action. Take it from the `report-finalize` result: `nextCommand` (`{command, note}`) is the table below already applied, and `nextRecommendedPhase` (`phase`, `status`, `rationale`) is what it was applied to — do not re-derive either from the report, and treat `nextRecommendedPhaseError` as "pointer unreadable", said in one line before the `validate-run` branch. After `implementation-planning`: open approval blockers → `/okstra-user-response`; a recorded `accept-risk` / `select` / `answer` is not an open blocker; no open approval blocker → `/okstra-run` → `implementation` or `--approve` (do not start another planning run; do not say `/okstra-inspect`). For every other task type: pointer `ready` → `/okstra-run` for that phase; `validate-run` failed → one-line cause then `/okstra-run`; otherwise `/okstra-inspect status`.
226
-
227
- ## implementation unattended chaining (chain-stages)
228
-
229
- 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:
230
-
231
- 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.
232
- 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`.
233
- 3. After confirming the `done` row was written, move to the next stage. Clean up context (leftover panes·finished teammates) at each stage boundary. A `status:"failed"` row in place of `done` means the stage ended `FAIL` — stop the queue per the FAIL branch below.
234
- 4. One-line report at each stage start/finish: `stage N start` / `stage N done → next K`.
235
-
236
- Once the whole queue is consumed, end the chain and report completion.
237
-
238
- - **Next stage not yet ready — normal termination:** When a stage in the queue is occupied by another implementation run as started/reserved and render-bundle is rejected with `--stage N already in progress or reserved by another run` (StageTargetError), this is not an exception — **terminate the chain normally** and report the remaining queue (e.g. `remaining queue: stage 4, 5 — resume with okstra-run after occupancy is released`).
239
- - **Stage ended FAIL — stop the queue and report:** When a stage's synthesised verdict is `FAIL`, Phase 6 writes no carry sidecar and appends a `status:"failed"` row instead of `done`. **Stop the queue there** and report the failed stage, its report path, and the remaining queue. Do not continue to the next stage even when it is dependency-independent — later work must not be stacked on a confirmed regression. The `failed` row frees the occupancy, so `--stage <N>` re-enters that stage on its preserved worktree and branch.
240
- - **Exception gate during chaining:** If render-bundle raises a concurrent-run conflict or git stale-SHA reconciliation, **stop the chain at that stage** and present the gate to the user per the Step 5 procedure. Once the user resolves it, resume the remaining queue in place. Data corruption·concurrent-occupancy conflicts are confirmed by a human — this is the safety boundary of unattended chaining.
241
-
242
- ## Forbidden patterns
243
-
244
- - Changing the question order the wizard emitted.
245
- - Hiding wizard options or keeping only the recommendations.
246
- - Turning a `text` prompt into a picker.
247
- - Dropping the `--answer` flag on an empty answer.
248
- - Bypassing the wizard/render-bundle path by calling `okstra.sh`.
249
- - Calling render-args on a state the user aborted before render-bundle.
250
- - Starting phase work arbitrarily before reading the Okstra lead prompt.