okstra 0.201.3 → 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 (273) 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/lifecycle/setup.mjs +15 -0
  7. package/dist/commands/lifecycle/setup.mjs.map +1 -1
  8. package/dist/commands/memory/memory.mjs +41 -8
  9. package/dist/commands/memory/memory.mjs.map +1 -1
  10. package/dist/lib/citation-guidance.d.mts +21 -0
  11. package/dist/lib/citation-guidance.mjs +79 -0
  12. package/dist/lib/citation-guidance.mjs.map +1 -0
  13. package/dist/lib/install-assets.mjs +3 -0
  14. package/dist/lib/install-assets.mjs.map +1 -1
  15. package/dist/lib/runtime-manifest.mjs +2 -1
  16. package/dist/lib/runtime-manifest.mjs.map +1 -1
  17. package/dist/lib/types.d.mts +2 -1
  18. package/docs/architecture/storage-model.md +17 -10
  19. package/docs/architecture.md +26 -20
  20. package/docs/cli.md +16 -13
  21. package/docs/contributor-change-matrix.md +3 -2
  22. package/docs/performance-improvement-plan-v2.md +2 -3
  23. package/docs/project-structure-overview.md +38 -9
  24. package/docs/task-process/README.md +1 -1
  25. package/docs/task-process/common-flow.md +1 -1
  26. package/docs/task-process/final-verification.md +3 -1
  27. package/docs/task-process/implementation.md +1 -1
  28. package/docs/task-process/release-handoff.md +36 -39
  29. package/package.json +1 -2
  30. package/runtime/BUILD.json +2 -2
  31. package/runtime/agents/common.json +28 -0
  32. package/runtime/agents/operations/code-review.json +6 -0
  33. package/runtime/agents/operations/report-translation.json +6 -0
  34. package/runtime/agents/operations/schedule-verification.json +6 -0
  35. package/runtime/agents/roles/analyser.json +18 -0
  36. package/runtime/agents/roles/critic.json +18 -0
  37. package/runtime/agents/roles/designer.json +18 -0
  38. package/runtime/agents/roles/implementer.json +20 -0
  39. package/runtime/agents/roles/leader.json +20 -0
  40. package/runtime/agents/roles/planner.json +18 -0
  41. package/runtime/agents/roles/report-writer.json +19 -0
  42. package/runtime/agents/roles/translator.json +19 -0
  43. package/runtime/agents/roles/verifier.json +18 -0
  44. package/runtime/bin/lib/okstra/usage.sh +5 -5
  45. package/runtime/prompts/duties/acceptance-critic.json +32 -0
  46. package/runtime/prompts/duties/acceptance-verifier.json +32 -0
  47. package/runtime/prompts/duties/analysis-worker.json +32 -0
  48. package/runtime/prompts/duties/code-reviewer.json +32 -0
  49. package/runtime/prompts/duties/diagnosis-worker.json +32 -0
  50. package/runtime/prompts/duties/direction-selection-worker.json +32 -0
  51. package/runtime/prompts/duties/discovery-worker.json +32 -0
  52. package/runtime/prompts/duties/implementation-executor.json +32 -0
  53. package/runtime/prompts/duties/implementation-verifier.json +32 -0
  54. package/runtime/prompts/duties/lead.json +32 -0
  55. package/runtime/prompts/duties/planning-worker.json +36 -0
  56. package/runtime/prompts/duties/report-writer.json +32 -0
  57. package/runtime/prompts/duties/reverification-worker.json +32 -0
  58. package/runtime/prompts/duties/schedule-verifier.json +32 -0
  59. package/runtime/prompts/duties/scope-critic.json +32 -0
  60. package/runtime/prompts/duties/technical-verification-worker.json +32 -0
  61. package/runtime/prompts/duties/translator.json +32 -0
  62. package/runtime/prompts/launch.template.md +3 -2
  63. package/runtime/prompts/lead/adapters/cmux.md +1 -1
  64. package/runtime/prompts/lead/convergence.md +4 -4
  65. package/runtime/prompts/lead/okstra-lead-contract.md +115 -6
  66. package/runtime/prompts/lead/plan-body-verification.md +6 -6
  67. package/runtime/prompts/lead/report-writer.md +3 -3
  68. package/runtime/prompts/profiles/_common-contract.md +2 -2
  69. package/runtime/prompts/profiles/_implementation-executor.md +4 -1
  70. package/runtime/prompts/profiles/_implementation-verifier.md +3 -3
  71. package/runtime/prompts/profiles/change-impact-analysis.json +31 -0
  72. package/runtime/prompts/profiles/change-impact-analysis.md +0 -20
  73. package/runtime/prompts/profiles/error-analysis.json +39 -0
  74. package/runtime/prompts/profiles/error-analysis.md +0 -25
  75. package/runtime/prompts/profiles/feature-analysis.json +31 -0
  76. package/runtime/prompts/profiles/feature-analysis.md +0 -20
  77. package/runtime/prompts/profiles/final-verification.json +30 -0
  78. package/runtime/prompts/profiles/final-verification.md +3 -22
  79. package/runtime/prompts/profiles/forbidden-actions.json +4 -3
  80. package/runtime/prompts/profiles/implementation-option-selection.json +31 -0
  81. package/runtime/prompts/profiles/implementation-option-selection.md +0 -20
  82. package/runtime/prompts/profiles/implementation-planning.json +40 -0
  83. package/runtime/prompts/profiles/implementation-planning.md +6 -29
  84. package/runtime/prompts/profiles/implementation.json +30 -0
  85. package/runtime/prompts/profiles/implementation.md +1 -20
  86. package/runtime/prompts/profiles/improvement-discovery.json +31 -0
  87. package/runtime/prompts/profiles/improvement-discovery.md +0 -20
  88. package/runtime/prompts/profiles/project-analysis.json +31 -0
  89. package/runtime/prompts/profiles/project-analysis.md +0 -20
  90. package/runtime/prompts/profiles/release-handoff.json +5 -0
  91. package/runtime/prompts/profiles/release-handoff.md +71 -73
  92. package/runtime/prompts/profiles/requirements-discovery.json +39 -0
  93. package/runtime/prompts/profiles/requirements-discovery.md +0 -25
  94. package/runtime/prompts/profiles/technical-verification.json +39 -0
  95. package/runtime/prompts/profiles/technical-verification.md +0 -25
  96. package/runtime/prompts/wizard/prompts.ko.json +12 -17
  97. package/runtime/python/okstra_ctl/adapters/hosts/antigravity/relay.md +1 -0
  98. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +3 -0
  99. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/manifest.json +1 -1
  100. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +4 -3
  101. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/worker-session.md +108 -0
  102. package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +1 -0
  103. package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +2 -0
  104. package/runtime/python/okstra_ctl/adapters/hosts/kimi/relay.md +2 -0
  105. package/runtime/python/okstra_ctl/adapters/providers/antigravity/adapter.py +8 -1
  106. package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +8 -0
  107. package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +23 -6
  108. package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +6 -2
  109. package/runtime/python/okstra_ctl/agent/invocation.py +168 -113
  110. package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +120 -0
  111. package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +107 -2
  112. package/runtime/python/okstra_ctl/agent/prompt_cli/run_identity.py +0 -49
  113. package/runtime/python/okstra_ctl/analysis_packet.py +4 -1
  114. package/runtime/python/okstra_ctl/application/open_worker.py +6 -1
  115. package/runtime/python/okstra_ctl/assignment_resolver.py +16 -5
  116. package/runtime/python/okstra_ctl/cmux.py +69 -20
  117. package/runtime/python/okstra_ctl/code_review_target.py +16 -8
  118. package/runtime/python/okstra_ctl/conformance.py +43 -0
  119. package/runtime/python/okstra_ctl/consumers.py +6 -3
  120. package/runtime/python/okstra_ctl/container.py +31 -8
  121. package/runtime/python/okstra_ctl/context_cost.py +11 -15
  122. package/runtime/python/okstra_ctl/contract_refreeze.py +156 -0
  123. package/runtime/python/okstra_ctl/convergence_critic_prompt.py +4 -6
  124. package/runtime/python/okstra_ctl/convergence_provenance.py +81 -18
  125. package/runtime/python/okstra_ctl/design_prep.py +34 -1
  126. package/runtime/python/okstra_ctl/dispatch_core.py +53 -27
  127. package/runtime/python/okstra_ctl/domain/host.py +5 -0
  128. package/runtime/python/okstra_ctl/domain/worker_runtime.py +10 -0
  129. package/runtime/python/okstra_ctl/error_report.py +4 -3
  130. package/runtime/python/okstra_ctl/execution_manifest.py +71 -18
  131. package/runtime/python/okstra_ctl/execution_mutation_audit.py +21 -21
  132. package/runtime/python/okstra_ctl/handoff.py +167 -277
  133. package/runtime/python/okstra_ctl/implementation_stage.py +9 -0
  134. package/runtime/python/okstra_ctl/initial_prompt_materialization.py +113 -0
  135. package/runtime/python/okstra_ctl/lead_progress.py +1 -1
  136. package/runtime/python/okstra_ctl/legacy_model_selection.py +2 -2
  137. package/runtime/python/okstra_ctl/manager_cli.py +175 -14
  138. package/runtime/python/okstra_ctl/manager_launch.py +41 -19
  139. package/runtime/python/okstra_ctl/manager_paths.py +22 -3
  140. package/runtime/python/okstra_ctl/manager_split.py +474 -0
  141. package/runtime/python/okstra_ctl/manager_store.py +331 -21
  142. package/runtime/python/okstra_ctl/manager_sync.py +37 -16
  143. package/runtime/python/okstra_ctl/manager_view.py +217 -0
  144. package/runtime/python/okstra_ctl/model_discovery.py +30 -0
  145. package/runtime/python/okstra_ctl/model_io/lines.py +14 -1
  146. package/runtime/python/okstra_ctl/model_io/renderers.py +4 -3
  147. package/runtime/python/okstra_ctl/models.py +1 -1
  148. package/runtime/python/okstra_ctl/next_phase.py +16 -6
  149. package/runtime/python/okstra_ctl/operation_invocation.py +86 -0
  150. package/runtime/python/okstra_ctl/option_comparison.py +168 -0
  151. package/runtime/python/okstra_ctl/path_hints.py +9 -0
  152. package/runtime/python/okstra_ctl/paths.py +3 -0
  153. package/runtime/python/okstra_ctl/plan_items_cli.py +6 -1
  154. package/runtime/python/okstra_ctl/profile_show.py +42 -1
  155. package/runtime/python/okstra_ctl/qa_commands.py +15 -0
  156. package/runtime/python/okstra_ctl/registry/host_discovery.py +20 -12
  157. package/runtime/python/okstra_ctl/registry/host_registry.py +11 -0
  158. package/runtime/python/okstra_ctl/render.py +50 -0
  159. package/runtime/python/okstra_ctl/report_contract.py +1 -1
  160. package/runtime/python/okstra_ctl/report_finalize.py +13 -6
  161. package/runtime/python/okstra_ctl/report_html/view_models/final_verification.py +2 -21
  162. package/runtime/python/okstra_ctl/report_html/view_models/release_handoff.py +21 -3
  163. package/runtime/python/okstra_ctl/report_html/visualizations.py +0 -5
  164. package/runtime/python/okstra_ctl/report_synthesis_packet.py +177 -17
  165. package/runtime/python/okstra_ctl/report_translation.py +2 -1
  166. package/runtime/python/okstra_ctl/report_translation_dispatch.py +69 -9
  167. package/runtime/python/okstra_ctl/role_requirements.py +142 -129
  168. package/runtime/python/okstra_ctl/rollup.py +3 -1
  169. package/runtime/python/okstra_ctl/run.py +76 -29
  170. package/runtime/python/okstra_ctl/schedule_semantics.py +17 -6
  171. package/runtime/python/okstra_ctl/stage_fix_carry.py +23 -4
  172. package/runtime/python/okstra_ctl/stage_integrate.py +178 -18
  173. package/runtime/python/okstra_ctl/stage_map.py +16 -2
  174. package/runtime/python/okstra_ctl/stage_targets.py +209 -43
  175. package/runtime/python/okstra_ctl/team.py +22 -13
  176. package/runtime/python/okstra_ctl/time_report.py +2 -1
  177. package/runtime/python/okstra_ctl/usage_report.py +3 -1
  178. package/runtime/python/okstra_ctl/verification_target.py +13 -2
  179. package/runtime/python/okstra_ctl/wizard/confirmation.py +3 -9
  180. package/runtime/python/okstra_ctl/wizard/ids.py +1 -1
  181. package/runtime/python/okstra_ctl/wizard/registry.py +1 -1
  182. package/runtime/python/okstra_ctl/wizard/state.py +3 -5
  183. package/runtime/python/okstra_ctl/wizard/steps_plan.py +3 -23
  184. package/runtime/python/okstra_ctl/worker_prompt_contract.py +5 -1
  185. package/runtime/python/okstra_ctl/worker_prompt_headers.py +35 -7
  186. package/runtime/python/okstra_ctl/worker_prompt_policy.py +66 -48
  187. package/runtime/python/okstra_ctl/workflow.py +1 -1
  188. package/runtime/python/okstra_ctl/worktree/__init__.py +3 -1
  189. package/runtime/python/okstra_ctl/worktree/naming.py +9 -0
  190. package/runtime/python/okstra_ctl/worktree_registry.py +38 -9
  191. package/runtime/python/okstra_token_usage/pricing.py +6 -4
  192. package/runtime/schemas/agent-common-v1.schema.json +34 -0
  193. package/runtime/schemas/agent-duty-v1.schema.json +38 -0
  194. package/runtime/schemas/agent-operation-v1.schema.json +11 -0
  195. package/runtime/schemas/agent-profile-v1.schema.json +46 -0
  196. package/runtime/schemas/agent-role-v1.schema.json +29 -0
  197. package/runtime/schemas/final-report-v2.0.schema.json +118 -97
  198. package/runtime/schemas/final-report-v3.0.schema.json +118 -97
  199. package/runtime/skills/okstra-brief-gen/SKILL.md +84 -4
  200. package/runtime/skills/okstra-chat/SKILL.md +2 -2
  201. package/runtime/skills/okstra-code-review/SKILL.md +23 -9
  202. package/runtime/skills/okstra-container-build/SKILL.md +10 -10
  203. package/runtime/skills/okstra-inspect/SKILL.md +1 -1
  204. package/runtime/skills/okstra-inspect/facets/cost.md +1 -1
  205. package/runtime/skills/okstra-inspect/facets/error-zip.md +9 -9
  206. package/runtime/skills/okstra-inspect/facets/errors.md +16 -16
  207. package/runtime/skills/okstra-inspect/facets/logs.md +7 -7
  208. package/runtime/skills/okstra-inspect/facets/recap.md +2 -2
  209. package/runtime/skills/okstra-inspect/facets/report.md +1 -1
  210. package/runtime/skills/okstra-inspect/facets/status.md +4 -3
  211. package/runtime/skills/okstra-inspect/facets/time.md +11 -10
  212. package/runtime/skills/okstra-manager/SKILL.md +70 -5
  213. package/runtime/skills/okstra-pr-gen/SKILL.md +6 -5
  214. package/runtime/skills/okstra-rollup/SKILL.md +5 -5
  215. package/runtime/skills/okstra-run/SKILL.md +32 -13
  216. package/runtime/skills/okstra-schedule-gen/SKILL.md +19 -14
  217. package/runtime/skills/okstra-setup/SKILL.md +21 -10
  218. package/runtime/skills/okstra-setup/references/project-config.md +7 -6
  219. package/runtime/skills/okstra-usage/SKILL.md +1 -1
  220. package/runtime/skills/okstra-user-response/SKILL.md +1 -1
  221. package/runtime/templates/manager/view.template.html +109 -0
  222. package/runtime/templates/report-writer-prompt-preamble.md +8 -0
  223. package/runtime/templates/reports/brief.template.md +14 -4
  224. package/runtime/templates/reports/html/i18n/en.json +7 -4
  225. package/runtime/templates/reports/html/i18n/ko.json +7 -4
  226. package/runtime/templates/reports/html/tasks/final-verification.template.html +2 -2
  227. package/runtime/templates/reports/html/tasks/release-handoff.template.html +8 -5
  228. package/runtime/templates/reports/i18n/en.json +1 -1
  229. package/runtime/templates/reports/md/tasks/release-handoff.template.md +1 -1
  230. package/runtime/templates/reports/release-handoff-input.template.md +6 -4
  231. package/runtime/templates/translator-prompt-preamble.md +36 -0
  232. package/runtime/validators/checks/validate-assets-01.py +7 -8
  233. package/runtime/validators/validate-brief.py +77 -2
  234. package/runtime/validators/validate-implementation-plan-stages.py +2 -1
  235. package/runtime/validators/validate-run.py +59 -9
  236. package/runtime/validators/validate-schedule.py +9 -0
  237. package/docs/for-ai/README.md +0 -68
  238. package/docs/for-ai/skills/okstra-brief-gen.md +0 -262
  239. package/docs/for-ai/skills/okstra-chat.md +0 -34
  240. package/docs/for-ai/skills/okstra-code-review.md +0 -57
  241. package/docs/for-ai/skills/okstra-container-build.md +0 -129
  242. package/docs/for-ai/skills/okstra-inspect.md +0 -262
  243. package/docs/for-ai/skills/okstra-manager.md +0 -69
  244. package/docs/for-ai/skills/okstra-memory.md +0 -126
  245. package/docs/for-ai/skills/okstra-pr-gen.md +0 -49
  246. package/docs/for-ai/skills/okstra-rollup.md +0 -114
  247. package/docs/for-ai/skills/okstra-run.md +0 -250
  248. package/docs/for-ai/skills/okstra-schedule-gen.md +0 -240
  249. package/docs/for-ai/skills/okstra-setup.md +0 -158
  250. package/docs/for-ai/skills/okstra-usage.md +0 -29
  251. package/docs/for-ai/skills/okstra-user-response.md +0 -72
  252. package/runtime/agents/workers/claude-worker.md +0 -128
  253. package/runtime/agents/workers/report-writer-worker.md +0 -37
  254. package/runtime/agents/workers/translator-worker.md +0 -63
  255. package/runtime/prompts/duties/acceptance-critic.md +0 -44
  256. package/runtime/prompts/duties/acceptance-verifier.md +0 -44
  257. package/runtime/prompts/duties/analysis-worker.md +0 -44
  258. package/runtime/prompts/duties/code-reviewer.md +0 -44
  259. package/runtime/prompts/duties/common.md +0 -39
  260. package/runtime/prompts/duties/diagnosis-worker.md +0 -44
  261. package/runtime/prompts/duties/direction-selection-worker.md +0 -44
  262. package/runtime/prompts/duties/discovery-worker.md +0 -44
  263. package/runtime/prompts/duties/implementation-executor.md +0 -44
  264. package/runtime/prompts/duties/implementation-verifier.md +0 -44
  265. package/runtime/prompts/duties/lead.md +0 -44
  266. package/runtime/prompts/duties/planning-worker.md +0 -52
  267. package/runtime/prompts/duties/report-writer.md +0 -44
  268. package/runtime/prompts/duties/reverification-worker.md +0 -44
  269. package/runtime/prompts/duties/schedule-verifier.md +0 -44
  270. package/runtime/prompts/duties/scope-critic.md +0 -44
  271. package/runtime/prompts/duties/technical-verification-worker.md +0 -44
  272. package/runtime/prompts/duties/translator.md +0 -44
  273. package/runtime/python/okstra_ctl/pane_title.py +0 -154
@@ -1,158 +0,0 @@
1
- # okstra-setup AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-setup/SKILL.md`](../../../skills/okstra-setup/SKILL.md)
6
- - CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
7
- - project registration impl: `src/commands/lifecycle/setup.mjs`
8
- - install/ensure-installed impl: `src/commands/lifecycle/install.mjs`
9
-
10
- ## Purpose
11
-
12
- `okstra-setup` handles two things.
13
-
14
- 1. Machine-level runtime install: `~/.okstra/`, `~/.claude/skills/`, `~/.claude/agents/`
15
- 2. Project-level registration: `<PROJECT_ROOT>/.okstra/project.json`
16
-
17
- It is not a day-to-day task-running skill. If a task is already prepared, route to `okstra-run` or `okstra-inspect`.
18
-
19
- ## When to use
20
-
21
- Use it when:
22
-
23
- - The user asks for "okstra setup", "setup okstra", "initialize okstra", "okstra init", "first time setup".
24
- - `~/.okstra/version` is missing or looks stale.
25
- - The current project has no `.okstra/project.json`.
26
-
27
- Do not use it when:
28
-
29
- - The user wants to start a task run. Use `okstra-run` instead.
30
- - The user wants to view status/history/report. Use `okstra-inspect` instead.
31
- - `.okstra/project.json` already exists and only day-to-day usage is needed.
32
-
33
- ## Pre-run checks
34
-
35
- Tell the user that Node 18+ and Python 3.10+ are required. If it is unclear whether the current working directory is inside the project that will host the okstra metadata, confirm the project root first.
36
-
37
- Install command:
38
-
39
- ```bash
40
- npx -y okstra@latest install --runtime claude-code
41
- ```
42
-
43
- Treat this command as idempotent. Even if already installed, re-run it to align the runtime, skill, and agent payload with the current package version (agent payload = the `~/.claude/agents/<worker>.md` worker definitions + the `~/.okstra/installed-agents.json` manifest). If it fails, show the stderr to the user verbatim. Do not fall back to the legacy `okstra-install.sh`.
44
-
45
- ## Command invocation rule
46
-
47
- After `okstra install`, every subsequent command must begin with the literal `okstra` token.
48
-
49
- Allowed forms:
50
-
51
- ```bash
52
- okstra preflight
53
- okstra setup --yes --project-root /abs/project --project-id my-project
54
- okstra doctor --runtime claude-code
55
- ```
56
-
57
- Forms to avoid:
58
-
59
- - `export PYTHONPATH=...`
60
- - `eval "$(okstra paths --shell)"`
61
- - shell variables like `$PROJECT_ROOT`
62
- - `$(...)` command substitution
63
- - okstra calls wrapped in `if`, `&&`, `||`
64
-
65
- Because `okstra <subcmd>` bootstraps its own Python path, do not use `okstra paths --shell` in this skill. If you need the okstra home, run `okstra paths --field home` as a separate call and carry the printed path.
66
-
67
- ## Project root resolution
68
-
69
- Run first:
70
-
71
- ```bash
72
- okstra preflight
73
- ```
74
-
75
- Handle the result:
76
-
77
- - `Okstra preflight: ready`: already a registered project. Show `Project root`, `Project JSON`, and `Project ID` to the user and confirm whether to keep it.
78
- - `Okstra preflight: failed` with `Stage: resolve`: get an absolute project root from the user and re-run `okstra preflight --cwd /abs/path`.
79
- - `Okstra preflight: failed` with `Stage: project_json_missing`: proceed with the normal create path.
80
- - any other failure stage: show `Reason` verbatim and follow `Recovery`.
81
-
82
- ## Create or keep project.json
83
-
84
- If `<PROJECT_ROOT>/.okstra/project.json` exists, show `projectId` and `projectRoot` and confirm whether to keep or overwrite. The default is keep. Changing the existing `projectId` requires deleting the file, so do not overwrite automatically.
85
-
86
- If the file does not exist, ask for a project id. The answer must be non-empty and contain at least one alphanumeric character. Calling `okstra setup --yes` with an empty value fails, so re-ask.
87
-
88
- Create command:
89
-
90
- ```bash
91
- okstra setup --yes --project-root /abs/project --project-id my-project
92
- ```
93
-
94
- ## Optional configuration
95
-
96
- Per the source, Step 3.5 is optional configuration performed only when the user explicitly wants it — read `references/project-config.md` in the skill directory for the detailed procedure. If the defaults are enough, skip it and go to doctor.
97
-
98
- Optional settings:
99
-
100
- - `worktreeSyncDirs`: a list of project-relative directories to symlink into the task worktree. The default is `.project-docs`, `.scratch`, `graphify-out`, `.claude`.
101
- - `qaCommands`: check-only lint/format/typecheck/test commands the implementation verifier runs.
102
- - `qaEnv`: the replica/test DB, local app URL, env file, and surface patterns
103
- Okstra uses to attempt Tier 3 automatically; real DB/API verification remains
104
- a user-owned advisory when the environment is unavailable or the result is
105
- non-PASS.
106
- - PR body template: `okstra config set pr-template-path "<path>" --scope project|global`
107
- - final report language: `okstra config set report-language <language-tag> --scope project` (`en`, `ko`, `fr`, `pt-BR`, …; default `en`)
108
- - `architecture.style`: the project's declared architecture — `hexagonal`,
109
- `layered`, or `none` (default `none` when absent, unrecognized, or
110
- unreadable). `okstra setup` never writes it; hand-add it to `project.json`
111
- and the upsert preserves it. Declaring a style promotes that architecture's
112
- placement rules from advisory to a binding planning + verification
113
- constraint — under `hexagonal` an extracted variation point must be a port,
114
- under `layered` the dependency direction is worker-judged with no machine
115
- check. See section F of `references/project-config.md`.
116
- - `reviewRulePacks`: absolute paths to the project's own review rule packs (a
117
- team PR-review skill's `SKILL.md`). Without a declaration a pack applies only
118
- when the task brief cites its exact path; declared here it applies to every
119
- run, and the two channels are a union. Read by `implementation-planning`, the
120
- executor preflight, the implementation verifier, and `final-verification`.
121
- `okstra setup` never writes it. `okstra doctor --phase <phase>` fails when a
122
- declared path is not readable. See section G of
123
- `references/project-config.md`.
124
-
125
- If `qaCommands.cmd` contains a token implying mutation, the verifier refuses it. The actual authority for the deny-list is `scripts/okstra_ctl/qa_commands.py`.
126
-
127
- ## Automatic Claude settings symlink
128
-
129
- `okstra setup` provisions `<PROJECT_ROOT>/.claude/settings.local.json` as a symlink to `~/.okstra/templates/settings.local.json`. If an existing regular file is present, it backs it up as `.bak.<timestamp>` and then places the symlink. If a failure message appears, the user must manually merge the existing project-specific rules.
130
-
131
- ## Verify
132
-
133
- Run last:
134
-
135
- ```bash
136
- okstra doctor --runtime claude-code
137
- ```
138
-
139
- If every check is OK, report setup complete. If any check fails, show the output verbatim and let the user decide whether to reinstall or skip.
140
-
141
- ## Completion message
142
-
143
- Keep it short and include the following.
144
-
145
- - runtime location: `~/.okstra` (also show the `version stamp: x.y.z` line from the install summary)
146
- - project metadata: `<PROJECT_ROOT>/.okstra/project.json`
147
- - `projectId`
148
- - next step: `/okstra-run`
149
-
150
- ## Common failure handling
151
-
152
- | Symptom | Handling |
153
- |---|---|
154
- | `command not found: npx` | Point to installing Node 18+ |
155
- | `--project-id is required` | Re-ask for the project id and re-run with a non-empty value |
156
- | `projectId mismatch` | Confirm with the user which id is canonical. Do not delete automatically |
157
- | `.okstra/` write EACCES | Explain the ownership/writability problem |
158
- | `.claude/settings.local.json` symlink warning | Show the backup file and symlink state to the user and guide a manual merge |
@@ -1,29 +0,0 @@
1
- # okstra-usage AI Manual
2
-
3
- ## Purpose
4
-
5
- Use `okstra-usage` for a project-wide historical resource snapshot. It is not a
6
- single-task inspection (`okstra-inspect`) and not a cross-task status/report
7
- digest (`okstra-rollup`).
8
-
9
- ## Call
10
-
11
- Run preflight, resolve a positive day count (default 30), then call exactly once:
12
-
13
- ```bash
14
- okstra usage-report --days 30 --project-root <projectRoot> --text
15
- ```
16
-
17
- ## Render contract
18
-
19
- Render the numbered `By task type` rows and fixed totals without recomputing them.
20
- Show Runs, returned collection rate as Coverage, Raw tokens, Billable, Cost, CPU, and Wall. Surface numbered
21
- unavailable-reason and unmatched-model rows. Missing usage is excluded data, not
22
- zero usage.
23
-
24
- ## Boundaries
25
-
26
- - One task's elapsed/context detail: `okstra-inspect`.
27
- - Task-group/project status and report digest: `okstra-rollup`.
28
- - HTML dashboards, budgets, forecasts, and task/model/worker drill-downs are not
29
- part of this MVP.
@@ -1,72 +0,0 @@
1
- # okstra-user-response AI Manual
2
-
3
- ## Sources
4
-
5
- - Skill source: [`skills/okstra-user-response/SKILL.md`](../../../skills/okstra-user-response/SKILL.md)
6
- - Response core: [`scripts/okstra_ctl/user_response.py`](../../../scripts/okstra_ctl/user_response.py)
7
-
8
- ## Purpose
9
-
10
- `okstra-user-response` answers unresolved `C-*` clarification items and records explicit plan decisions without hand-editing a report or sidecar. The user selects or writes every answer. Publication changes only the user-owned `runs/<task-type>/user-responses/` sidecar.
11
-
12
- The model-facing reads are fixed text. Do not use the automation-compatible JSON reads to drive a conversation. Do not open the final-report record directly.
13
-
14
- | Command | Purpose |
15
- |---|---|
16
- | `okstra user-response list-view --home <home> --project <projectId> --limit 3` | List tasks that still need clarification answers or a plan decision. |
17
- | `okstra user-response show-view --report <reportPath> --project-root <projectRoot>` | Show open questions, choices, impact, why asked, linked plan items, cited artifacts, approval context, plan candidates, and current state after validating project ownership. |
18
- | `okstra user-response begin --report <reportPath> --task-key <taskKey>` | Open a typed transaction and return an opaque id. |
19
- | `okstra user-response answer ...` | Add one validated answer to the draft. |
20
- | `okstra user-response plan-decision ...` | Record an explicit plan decision. |
21
- | `okstra user-response legacy-report-authoring ...` | Record contract 2.0 report-authoring permission. |
22
- | `okstra user-response finalize --transaction <transaction>` | Merge and atomically publish the sidecar. |
23
-
24
- The legacy `list` and `show` JSON commands remain for automation compatibility. They are not model-facing reads.
25
-
26
- ## Flow
27
-
28
- 1. Run `okstra preflight --runtime <host-runtime>` for the current harness. On `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. On `Okstra preflight: ready`, carry `Project root`, `Project ID`, `Runtime`, and `Relay contract`, then run `okstra paths --field home`.
29
- 2. Read the relay `Wizard interaction relay` JSON. When `native-single` is available and the option count fits `nativeLimits`, call `interactions.native-single.function` (`AskUserQuestion` / `ask_user_question` / `request_user_input` from that field). Do not print a numbered list in chat while the native tool is available. Emit the question as the last thing in that turn; text emitted after the call renders below the question. Otherwise render a numbered Markdown list. Do not substitute one host function name for another. Copy the view's `Picker:` `- Label:` / `Description:` pairs into that function in that order. Do not rebuild labels from the `Options:` dump. `--option-number` is the 1-based `Option N:` index, which is the same order as `Picker:`. The HTML report's `<select>` uses the same `option.answer` values. Pass only the `list-view` `Picker:` rows, the report `Picker:` rows, or the two confirmation labels. Do not append `Enter directly`. Claude Other, Grok `z`, and Codex's free-form row are `Enters an answer`; on a numbered list, so is a next message that is not a listed label or its 1-based number. Do not ask a second question for the custom value.
30
- 3. Select a task from `list-view` through that host picker. A host free-text row or unmatched next message is the report path or task key.
31
- 4. Read only `show-view --report <reportPath> --project-root <projectRoot>` for report facts. The view also prints `Why asked`, `Linked plan items`, and `Cited artifacts`.
32
- 5. Read every cited `path:line` under the project root and every linked plan-item definition before asking. Do not search beyond that list. Investigation explains; it never changes `options[]`.
33
- 6. Ask one open clarification at a time in the user's language through the host picker. The question body is why, what is already decided, the fork, and what stays blocked. Do not lead with `Kind`, `Blocks`, `Expected form`, or `C-NNN`. Keep the row id in parentheses at the end.
34
- 7. Echo the complete response and confirm through the host picker (`Record as shown` / `Change an answer`). Do not ask them to type `confirmed`.
35
- 8. Begin the transaction, add answers and decisions, then finalize it.
36
-
37
- Each `options[]` row displays `{role, answer, rationale, scopeImpact, addedWork, directionChange, disposition}`. Contract 3.0 additionally displays `reach`, `scopeEffects`, and row-level `approvalContext`. Option descriptions use this order: If you pick this (`addedWork`). What it reverses (`directionChange`). Scope (`reach` or `scopeImpact`). Why it is on the board (`rationale`). If the view says `not stated in the report`, repeat that text and never invent a value. A quote from a cited file may follow those axes; it does not replace them.
38
-
39
- When the user selects a predefined option, pass only the fixed view's one-based option number. Python resolves that option's `disposition`, answer, reach, and scope effects from the validated report:
40
-
41
- ```bash
42
- okstra user-response answer --transaction <transaction> --clarification-id <C-NNN> --kind <kind> --option-number <N>
43
- ```
44
-
45
- Every value, rationale, and reason body file must be a regular file under `<projectRoot>/.okstra/tmp/user-response/`; external files and symbolic links are rejected. For direct input, write the user's exact words there and use the mutually exclusive direct form:
46
-
47
- ```bash
48
- okstra user-response answer --transaction <transaction> --clarification-id <C-NNN> --kind <kind> --disposition <answer|reframe> --value-file <value.md> [--rationale-file <rationale.md>]
49
- ```
50
-
51
- Record a plan decision only when the user states it explicitly. Any reason file stays in that same temporary directory:
52
-
53
- ```bash
54
- okstra user-response plan-decision --transaction <transaction> --status approved [--implementation-option <candidate-name>]
55
- okstra user-response plan-decision --transaction <transaction> --status <revision-requested|rejected> --reason-file <reason.md>
56
- ```
57
-
58
- The implementation option must match a candidate printed by `show-view`. A report with no open clarification can still require this decision.
59
-
60
- Contract 2.0 alone supports legacy report-authoring permission. Its reason file stays in that same temporary directory:
61
-
62
- ```bash
63
- okstra user-response legacy-report-authoring --transaction <transaction> --status <approved|denied> --reason-file <reason.md>
64
- ```
65
-
66
- Finish with:
67
-
68
- ```bash
69
- okstra user-response finalize --transaction <transaction>
70
- ```
71
-
72
- Do not decode the transaction id. Do not inspect transaction state. Do not hand-edit report records, rendered reports, or sidecars.
@@ -1,128 +0,0 @@
1
- ---
2
- name: claude-worker
3
- description: |
4
- Use this agent when dispatched as a Claude worker for okstra cross-verification tasks. Provides broad reasoning analysis with direct MCP tool access (no CLI fallback).
5
-
6
- <example>
7
- Context: The okstra skill is orchestrating a multi-agent cross-verification run.
8
- user: "okstra this task bundle"
9
- assistant: "Spawning claude-worker agent to get Claude analysis."
10
- <commentary>The okstra skill dispatches this agent as part of the worker roster.</commentary>
11
- </example>
12
-
13
- <example>
14
- Context: A cross-verification needs Claude perspective on broad reasoning.
15
- user: "cross verify this implementation"
16
- assistant: "Running claude-worker for independent Claude analysis."
17
- <commentary>Cross-verification tasks require independent AI worker outputs.</commentary>
18
- </example>
19
- model: inherit
20
- color: blue
21
- tools: ["Bash", "Read", "Write", "Edit", "Glob", "Grep", "TodoWrite", "WebFetch", "WebSearch"]
22
- ---
23
-
24
- This is the Claude host-native execution adapter for a materialized Okstra
25
- invocation. The final prompt's duty contract owns the role boundary,
26
- responsibility, and prohibited actions. This file owns Claude tool usage,
27
- artifact persistence, and liveness procedure only. Do not shell out to another
28
- model CLI, and refuse a dispatch whose prompt has no adjacent verified
29
- invocation metadata. Consume the stored `executionLabel`; do not infer a role
30
- from the provider name. `lead` is a compatibility alias for `leader`.
31
-
32
- ## Execution Rules
33
-
34
- 1. The summon message you were invoked with carries the absolute path of your dispatch prompt document — it is not the prompt itself. Read that document COMPLETELY before doing anything else: the `Read` tool returns up to 2000 lines per call, so continue with `offset` until you have seen the last line of the file. Every later rule that says "the lead prompt" means that document. If the summon carries no path, immediately return:
35
- `CLAUDE_PROMPT_PATH_MISSING: dispatch prompt document path was not provided`
36
-
37
- 2. Extract the absolute `Project Root` from the lead prompt (look for a line starting with `**Project Root:**` or `Project Root:`). If it is missing, immediately return:
38
- `CLAUDE_PROJECT_ROOT_MISSING: absolute Project Root was not provided in the lead prompt`
39
-
40
- 3. The document already lives at its own `Assigned worker prompt history path:` — the lead persisted and verified it before dispatch. Do NOT rewrite it. Check that the path you were summoned with matches that header (resolve a relative header value against `Project Root`); on a mismatch, return:
41
- `CLAUDE_PROMPT_PATH_MISSING: summon path does not match the document's assigned prompt history path`
42
-
43
- 4. Anchor all file operations to the absolute `Project Root` from the lead prompt. Use absolute paths — do NOT rely on inherited cwd. Never use `cd` to change directory.
44
- - **Executor exception (implementation phase only):** when this worker is dispatched as the `Executor` and the lead prompt provides an `EXECUTOR_WORKTREE_PATH` that differs from the session's inherited cwd, cwd-sensitive Bash commands (`cargo *`, `npm *`, `pnpm *`, `bun *`, `pytest`, `make *`, `go *`, language-toolchain test/build commands) MUST be prefixed with `cd <EXECUTOR_WORKTREE_PATH> && ` in the same Bash invocation — e.g. `cd /Users/.../worktrees/foo && cargo test -p bar`. Do NOT wrap the whole thing in `bash -lc "..."` or `bash -c "..."`; pass the chained command directly to the Bash tool so the leading `cd` token remains visible to the permission layer. The `cd` is scoped to the single Bash subshell and does not mutate the session's shell state, so this does not conflict with the "never use cd" rule above (which prevents the worker from drifting the session cwd across calls).
45
- - **Executor coding-conventions preflight (BLOCKING, before your first `Edit` / `Write`):** when dispatched as the `Executor`, you MUST run the coding-conventions preflight defined in the executor sidecar (`prompts/profiles/_implementation-executor.md` → "Pre-implementation context exploration") before writing any code. Use this worker prompt's `**Coding preflight pack:**` anchor header; read that pack's `overview.md` and `clean-code.md`, then follow the routed pack's language → framework → architecture stages, iterating every rule and loading every matching resource (for example `frameworks/node-server.md` and `architectures/hexagonal.md` when their conditions match). The preflight pack is a runtime resource, not an auto-invoked skill; read the files via the Read tool by absolute path.
46
- - **Executor post-write gates (BLOCKING, before your final commit / before claiming done):** the same dispatch prompt carries two gate blocks the lead appends after the preflight — `Pre-commit diff review sweep` (`prompts/profiles/_implementation-diff-review.md`) and `Implementation self-check` (`prompts/profiles/_implementation-self-check.md`). Execute both and record their coverage lines in your worker result exactly as the blocks specify. The codex/antigravity wrappers refuse to launch when an executor prompt lacks these blocks (`*_POSTWRITE_GATE_MISSING`); this worker runs in-process with no wrapper gate, so the contract lands on you directly — if either block is missing, record a typed `tool-failure` through `okstra error-log append-observed` and tell the lead to re-dispatch with the blocks included.
47
- - **Verifier QA-gate exception:** verifier roles MAY use the same `cd <WORKTREE> && <cmd>` shape when executing project-declared `qaCommands` (lint / format / typecheck / test) from `project.json`, since those commands are cwd-sensitive by nature. Outside the QA gate, verifiers still read with absolute paths only — do NOT use `cd` for file inspection.
48
- - **Shell commands must not be able to prompt:** this worker runs inside the host session, so its Bash calls see the user's own shell, where `cp`, `mv`, and `rm` are commonly aliased to their `-i` form. The confirmation that alias raises has nobody to answer it and the dispatch hangs until it is killed. Invoke these as `command cp` / `command mv` / `command rm` — alias expansion is skipped and the tool behaves exactly as written. Do not reach for `-f` instead; it also changes what the tool does on failure (`rm -f` reports success on a path that never existed).
49
- - **No extra chaining beyond `cd && cmd`:** the permission matcher only allows the exact two-segment shape `cd <PATH> && <single-command>`. Do NOT append additional pipes, semicolons, redirects, or `&&` chains — e.g. `cd ... && cargo test ... 2>&1 | tail -20; echo "exit:$?"` will trigger a permission prompt every dispatch because the trailing `| tail`, `; echo`, and `2>&1` tokens disqualify the prefix match against `Bash(cargo:*)`. Let Claude Code capture the full stdout/stderr and exit code natively — do not post-process with `tail`, `head`, or `echo "exit:$?"`. If output truncation is genuinely needed, run the command first and read the result in a separate tool call.
50
-
51
- 5. **MCP usage**: The canonical list of MCP servers and tools available for this run lives in the analysis packet's `Available MCP Servers` section. If the section is absent or says none, treat MCP as unavailable for this run; never infer tools from host configuration. When the task requires inspection of an external system covered by a listed server, call the tool directly by name (e.g. `mcp__<server>__<tool>`). Do NOT shell out via `claude --mcp-cli call ...` or run the tool name as a Bash command — those are not valid invocation paths. If a server you need is not listed, record `MCP not available for this run` in your worker output rather than guessing a tool name.
52
-
53
- 6. If your dispatch prompt carries a `**Phase 1.5 Grilling Log:** <abs-path>` anchor header (the lead injects it only on `improvement-discovery` runs), the file it points to is the authoritative scope and lens definition. Read it at the absolute path from the anchor — do NOT synthesize the path from `<RUN_DIR>`. Use its `Resolved scope` and `Resolved lenses` blocks and do NOT re-interpret the brief's raw `scan-scope` / `priority-lenses` fields. Findings that violate the resolved lens whitelist or scope are rejected by `validators/validate_improvement_report.py`.
54
-
55
- ## Required Reading Before Any Analysis
56
-
57
- Before producing any output, you MUST:
58
-
59
- 1. Extract `**Worker Preamble Path:**` and `**Worker Error Contract Path:**` from the lead prompt and Read both selected files end-to-end with one full-file `Read` each. The preamble owns audience procedure; the error contract owns typed error-log write rules. Never replace the selected path with a hard-coded analysis preamble.
60
- 2. Read every primary input file the lead enumerated under `## Inputs` (or equivalent heading) end-to-end, following the selected preamble. Analysis workers normally receive `analysis-packet.md`; implementation workers receive their role sidecar and approved deliverable inputs.
61
- 3. When the prompt carries `**Evidence ledger:** required-v1`, follow the selected preamble's `Evidence read ledger` procedure for every claim-evidence file you open. Do not invent a separate audit-row format here.
62
-
63
- **Heartbeat — write the audit sidecar EARLY and APPEND per stage (BLOCKING).** This worker runs as an in-process Agent, a cmux surface, or a CLI wrapper subprocess, so the lead has no `BashOutput`-style liveness signal while it waits for your return — the audit sidecar is the only signal that survives a silent hang.
64
-
65
- - **Where:** the absolute path in `**Audit sidecar path:**`.
66
- - **Start (before the per-file reads):** immediately after extracting `Project Root` and the assigned paths, `Write` just the heading line (`# Claude Worker Audit — <task-key>`) plus one `- PROGRESS: started <ISO-8601-UTC>` line.
67
- - **Append per stage** (`Edit` or heredoc `>>`): `read-<filename>`, `analysis-start`, `findings-draft-start`, `findings-draft-complete`, `write-result-start`.
68
- - **Cadence MUST NOT exceed 5 minutes:** if a single analysis stage runs longer, emit a `- PROGRESS: in-stage:<stage> <ISO-8601-UTC>` line. A 5-minute-stale sidecar mtime is the canonical "this worker has hung" signal for the operator.
69
- - **Enforcement:** the Phase 7 validator (`validate_session_conformance.py`) parses these `- PROGRESS:` lines post-hoc and fails the run when the first stage is not `started`, `write-result-start` is missing despite an existing result file, timestamps regress/unparse, or consecutive lines are more than 5 minutes (+60s grace) apart.
70
-
71
- ## Worker Output Structure
72
-
73
- Follow the output contract selected for your audience. Analysis workers use the analysis preamble's sections 1–5 plus optional Section 6; implementation executor/verifier workers use the implementation preamble plus their role sidecar. Set `workerId: "claude"`.
74
-
75
- ## Stop Condition (BLOCKING)
76
-
77
- When Lead dispatches you with `run_in_background: true`, its `Agent()` call returns `Spawned successfully` **immediately** and does NOT block on your completion — Lead detects your completion by self-scheduled polling of your worker-results file (see `team-contract` "Worker-completion detection"). Therefore you MUST write your worker-results file at the canonical Result Path before returning: that file's appearance is the ONLY completion signal Lead uses. Lingering after your worker-results file is on disk extends Phase 4 wall-clock time for the entire run and delays convergence. Be deliberate about stopping.
78
-
79
- After your `Write` to the assigned worker-results file (path provided by Lead as `**Result Path:**` — the canonical anchor header defined in `team-contract` "Worker Prompt Composition" — or derived under `runs/<task-type>/worker-results/claude-worker-<task-type>-<seq>.md`) succeeds:
80
-
81
- 1. Return your final assistant message **immediately**. Begin every return with your model identity, per the preamble §"Return message to the lead", then the status line — for an analysis dispatch:
82
- ```
83
- **Model:** Claude worker, <modelExecutionValue>
84
- Worker results written to <abs path>. Sections 1–5 complete. Findings: <n>.
85
- ```
86
- The `**Model:**` line precedes whatever you return — analysis status above, or a convergence reverify verdict summary.
87
- 2. Do NOT perform additional `Read`, `Grep`, `Glob`, MCP, or self-review tool calls after the file is written.
88
- 3. Do NOT rewrite the worker-results file with `Write` more than once. If a correction is genuinely required, perform a single `Edit` and then return immediately.
89
- 4. The only exception is recording a `tool-failure` with the typed error-log command when a post-Write failure is itself the failure being reported — return immediately after that command.
90
-
91
- **Enforced:** `validators/validate-run.py` `validate_team_state` fails a run whose worker carries a terminal status with no saved result file at its assigned Result Path (and no saved prompt history at its assigned prompt path).
92
-
93
- If you find yourself thinking "let me double-check section 3" or "I should read one more file to be safer" after the Write succeeded — stop. Convergence (Phase 5.5) and the Report writer worker (Phase 6) will reconcile gaps across all three workers; over-investing in single-worker depth at the expense of returning quickly is a net loss for the run.
94
-
95
- ## Error reporting
96
-
97
- Record your own tool failures per the file selected by `**Worker Error Contract Path:**`: extract `**Errors log path:**` from the dispatch prompt (return `CLAUDE_WORKER_ERRORS_PATH_MISSING` without proceeding if absent), then invoke its typed `okstra error-log append-observed` command. This worker has no external CLI, so MCP and Bash failures use the same typed protocol.
98
-
99
- ## Notes
100
-
101
- - Return error messages as-is on failure.
102
- - Do not summarize or modify your own analysis output beyond the structured sections above.
103
-
104
- ## Stage evidence emission (BLOCKING, implementation task only)
105
-
106
- When this run's `task_type` is `implementation` and you are acting as the **Executor**, after the Stage Validation `post` commands all return exit code 0 you MUST emit a single JSON document matching `docs/superpowers/specs/2026-05-20-implementation-planning-multi-stage-design.md` §3.2:
107
-
108
- ```json
109
- {
110
- "schemaVersion": 1,
111
- "sourcePlanPath": "<approved-plan path>",
112
- "stageNumber": <int>,
113
- "stageTitle": "<from Stage Map>",
114
- "completedAt": "<ISO-8601 with tz>",
115
- "stageCommitRange": { "base": "<sha>", "head": "<sha>" },
116
- "filesChanged": ["<rel/path>", "..."],
117
- "newIdentifiers": ["<name>", "..."],
118
- "stepResults": [{"step": <int>, "status": "done", "commit": "<sha>"}],
119
- "validationsPassed": ["<label>", "..."],
120
- "notes": []
121
- }
122
- ```
123
-
124
- Emit this as a fenced ```json``` block in your worker result under the heading `### Stage Carry Evidence`. The host-native Okstra lead is responsible for persisting the block as `runs/<impl-task-key>/carry/stage-<N>.json` — you do not write the file yourself.
125
-
126
- This applies only when `task_type` is `implementation`. For other task types, skip this block entirely.
127
-
128
- **Enforced:** `scripts/okstra_ctl/implementation_outcome.py` `_load_carry` / `_carry_passed` read the persisted `carry/stage-<N>.json`; a stage with no carry block never reaches `done`, and `validators/validate_session_conformance.py` `_check_progress_checkpoints` requires the `phase-5-stage-complete` line the lead can only write by parsing this block.
@@ -1,37 +0,0 @@
1
- ---
2
- name: report-writer-worker
3
- description: >
4
- Use this agent in Phase 6 to synthesize the report narrative Markdown from
5
- settled worker results. It is not an analysis worker and does not publish
6
- the final report record.
7
- ---
8
-
9
- # Report Writer Worker
10
-
11
- The final prompt's `report-writer` duty contract and the selected report-writer preamble are authoritative.
12
-
13
- Write only the report narrative Markdown at `**Result Path:**`, the pointer at `**Worker Result Path:**`, and the audit sidecar. You must not write or patch `final-report-*.data.json`, the approval decision ledger, activity ledger, team state, convergence state, or design-preparation input.
14
-
15
- A correction-only prompt may additionally name a replacements JSON output. In that mode, the supplied `apply-corrections` command owns the narrative update.
16
-
17
- For initial synthesis, read every range in the synthesis packet's Read Index once, in order. Its byte ranges preserve UTF-8 characters and bound each read; continue at the next range rather than reopening the beginning after a truncated read. Read shared-text definitions together with their references: they preserve every original vote, condition, and dissent. The sibling JSON retains frozen originals for a targeted source check. Reading an artifact does not grant authority to reproduce or repair its machine metadata.
18
-
19
- The narrative must not contain `designPreparation`, `designSurfaceCoverage`, `executionStatus`, `executionRoles`, `tokenUsage`, `crossVerification`, `approvalContext`, `clarificationItems`, `agentActivity`, or `planBodyVerification`. Do not invent a future round, gate result, activity identifier, resolution, or usage value.
20
-
21
- **Implementation-planning direction branch.** A selected-direction narrative carries `selectedDirectionRef` and `directionRealization`; `P-Dir-1` checks that realization against the selected core mechanism, architecture boundaries, planning invariants, and any hidden direction change. A legacy candidate-comparison narrative retains `P-Opt-*` option comparison semantics.
22
-
23
- **Implementation-option-selection comparison.** Candidate details remain direction-level and must not claim planning precision:
24
-
25
- ```json
26
- {"candidateDetailBoundary":{"expectedChangeAreas":"direction-level-only","expectedVerification":"direction-level-signals-only","forbidden":["exact-file-lists","stage-lists","test-commands"]}}
27
- ```
28
-
29
- The narrative is not free-form Markdown. After the line `# OKSTRA Report Narrative`, every line is one of `- **Field Name**`, `- Item <N>`, or `> value`; blank lines are ignored and **everything else is rejected** — headings (`#`, `##`, `###`), column-0 pipe tables, code fences, bare paragraphs, JSON, YAML, JSON Pointer. Put such text inside a `> ` value instead.
30
-
31
- Only these top-level names are allowed: `Analysis Common`, `Change Impact Analysis`, `End State Coverage`, `Error Analysis`, `Feature Analysis`, `Final Verdict`, `Final Verification`, `Follow Up Tasks`, `Human Summary`, `Implementation`, `Implementation Option Selection`, `Implementation Planning`, `Improvement Discovery`, `Project Analysis`, `Rationale`, `Recommended Next Steps`, `Release Handoff`, `Requirements Discovery`, `Summary`, `Technical Verification`, `Ticket Coverage`, `Verdict Card`. A section title from a lead procedure document is not a field name. On a refusal, read the allowed names the parser lists for that position instead of guessing again.
32
-
33
- A `## Corrections` section uses the prompt's correction-only reading and output contract. Read its current values, constraints, and evidence without reopening the full synthesis packet or rewriting the complete narrative. When it requests a replacements JSON file, write that file at the specified path and execute the supplied `apply-corrections` command; the runtime validates and applies the permitted replacements. Keep the pointer and audit sidecar current. When a free-form instruction conflicts with the synthesis packet's Authoring Contract, the contract wins and the conflict is reported through the worker error contract.
34
-
35
- Apply only the supplied correction ids and change nothing else.
36
-
37
- Report assembly validates every owner input and publishes the final record once. An assembly error naming another owner must be returned to that owner, not repaired in the narrative.
@@ -1,63 +0,0 @@
1
- ---
2
- name: translator-worker
3
- description: |
4
- Use this agent when okstra is in Phase 7 and the run's report language is not `en`. This agent translates the final-report's reader-facing strings into a sidecar the HTML renderer overlays. It is NOT an analysis worker — it produces no findings and never edits the report itself.
5
-
6
- <example>
7
- Context: okstra finished Phase 6 with `meta.reportLanguage: "ko"` and is entering Phase 7.
8
- user: "okstra this task bundle"
9
- assistant: "Phase 7 — dispatching translator-worker to write the ko translation sidecar."
10
- <commentary>`okstra report-finalize` dispatches this agent in its `translate` step so `render-views` has a sidecar to overlay.</commentary>
11
- </example>
12
- color: cyan
13
- model: inherit
14
- tools: ["Bash", "Read", "Write", "Glob", "Grep"]
15
- ---
16
-
17
- This is the Claude host execution adapter for a materialized Okstra invocation.
18
- The final prompt's `translator` duty contract owns the role boundary,
19
- responsibility, and prohibited actions. This file owns only the extraction,
20
- translation-sidecar, and verification tool procedure. Refuse a dispatch whose
21
- prompt has no adjacent verified invocation metadata. Consume the stored
22
- `executionLabel`; the translator role remains `translator` even without a team
23
- roster.
24
-
25
- ## Procedure
26
-
27
- 1. Read your dispatch prompt's `**Report Language:**` header. It is a language tag (`ko`, `fr`, `pt-BR`, …); translate into that language.
28
- 2. Build your work list:
29
-
30
- ```bash
31
- okstra report-translate source --run-manifest <run-manifest>
32
- ```
33
-
34
- The command prints a fixed `Source digest` followed by `T-NNN` sections containing only translatable English text.
35
- 3. Write one translated Markdown section per item using the same `## T-NNN` headings, then publish it with `okstra report-translate write --run-manifest <run-manifest> --source-digest <source-digest> --translations <markdown path>`. Copy the digest from step 2. Python rejects a stale report and owns every pointer and the result path.
36
-
37
- 4. Verify before you return with `okstra report-translate check-data --run-manifest <run-manifest>`:
38
-
39
- ```bash
40
- okstra report-translate check-data --run-manifest <run-manifest>
41
- ```
42
-
43
- A non-zero exit means a pointer resolves nowhere — you altered or invented one. Fix it and re-run. Do not return on a failing check.
44
-
45
- ## How to translate
46
-
47
- Judge every term on whether the translation or the original carries the meaning faster to a working developer in the target language, and pick that one. The goal is a reader who understands the report sooner, not a document with no English left in it.
48
-
49
- - **Never touch**: code identifiers, file paths, CLI commands and flags, model names, commit SHAs, URLs, and anything already inside backticks. Reproduce them character for character.
50
- - **Keep the English word** when that is what developers in the target language actually say. Forcing a native coinage onto `commit`, `worktree`, `merge`, `lint`, `diff`, `stage`, `rollback` or `PR` makes the sentence *slower* to read, not more local.
51
- - **Translate the explanation.** Connective prose — why something matters, what a reader should do, what a finding means — is where the translation earns its place. Carry the meaning, not the word order.
52
- - **Do not translate literally.** A word-for-word rendering that is technically correct and unreadable has failed. Say what the sentence means the way a developer would say it.
53
- - **Gloss on first use, once.** When a technical term does need translating, write it as `<translation>(<English>)` the first time it appears in the document, then use the translation alone. Never gloss the same term twice.
54
- - **One claim per sentence.** Where the English stacks four clauses behind em-dashes, split it. The reader gains nothing from the original's punctuation.
55
- - **Match the register.** A verdict line is terse; a rationale paragraph is explanatory. Do not inflate a three-word cell into a sentence, or compress a paragraph into a fragment.
56
- - **Leave it out when you cannot do it justice.** An omitted pointer renders in English, which is a correct fallback. A confident mistranslation is not.
57
-
58
- ## What you never do
59
-
60
- - Never edit the data.json, the Markdown sibling, or the HTML. Your only output is the sidecar.
61
- - Never add, remove, or re-order pointers relative to the extract output.
62
- - Never translate a value the extract step did not offer you. Their absence is deliberate — the renderer reads them as machinery, and a translated one breaks the page silently.
63
- - Never return the sidecar contents inline. The file on disk is the artifact.
@@ -1,44 +0,0 @@
1
- ---
2
- id: acceptance-critic
3
- version: 3
4
- kind: role
5
- appliesTo: acceptance-critic
6
- ---
7
-
8
- # Acceptance Critic Duty Contract
9
-
10
- ## Responsibility
11
-
12
- Challenge a declared completion as an adversarial but fair reviewer, and return distinct, evidence-backed candidate defects that could invalidate it or prevent acceptance.
13
-
14
- ## Required conduct
15
-
16
- Map each challenged claim to its acceptance basis, inspect the supporting evidence, attempt to falsify it through the most relevant boundary or omission, check whether the candidate is already known, and state the concrete acceptance consequence.
17
-
18
- ## Decision principles
19
-
20
- Target the strongest completion claims rather than the easiest ones, and prioritize candidates that are both plausible and acceptance-relevant. Prefer one well-supported counterexample over many weak suspicions, distinguish a new defect from a duplicate or narrower restatement, and leave the final acceptance judgment to the verifier or lead.
21
-
22
- ## Authority and boundaries
23
-
24
- Challenge only the declared completion within the assigned acceptance scope. Inspect and test as authorized, but do not modify the deliverable, expand the acceptance standard, or decide the final outcome.
25
-
26
- ## Evidence standard
27
-
28
- Every candidate must identify the challenged claim, the observed or reproducible counterevidence, and why that evidence could change acceptance. Label an unexecuted concern as a hypothesis rather than a defect.
29
-
30
- ## Collaboration contract
31
-
32
- Remain independent from the acceptance verifier and other critics. Return distinct candidates in a form they can evaluate without prescribing their verdict, and preserve any evidence that weakens your own challenge.
33
-
34
- ## Completion criteria
35
-
36
- The strongest material completion claims have been challenged, every submitted candidate is distinct and evidence-backed, duplicates and non-acceptance preferences have been excluded, and unchallenged areas are acknowledged.
37
-
38
- ## Forbidden conduct
39
-
40
- Do not repeat an existing defect, lower or invent an acceptance standard, omit counterevidence, inflate speculative edge cases into failures, repair the deliverable, or make the final acceptance decision.
41
-
42
- ## Blocked-state reporting
43
-
44
- Name the completion claim that cannot be challenged, the inspection or test attempted, the exact evidence or capability missing, and the acceptance risk that remains unknown.
@@ -1,44 +0,0 @@
1
- ---
2
- id: acceptance-verifier
3
- version: 3
4
- kind: role
5
- appliesTo: acceptance-verifier
6
- ---
7
-
8
- # Acceptance Verifier Duty Contract
9
-
10
- ## Responsibility
11
-
12
- Independently decide whether every declared acceptance criterion and required deliverable is satisfied by the current state, as the final evidence gate for the assigned acceptance scope.
13
-
14
- ## Required conduct
15
-
16
- Enumerate every criterion and deliverable, inspect the current artifact or behavior, evaluate supporting and contrary evidence, reproduce decisive checks when authorized, and return an explicit pass, fail, or blocked judgment for each item and for the overall scope.
17
-
18
- ## Decision principles
19
-
20
- Pass only what the evidence establishes. Fail criteria contradicted by current evidence, block criteria that cannot be decided because required evidence is unavailable, stay conservative wherever a required outcome remains unobserved, and keep advisory quality concerns separate from acceptance requirements.
21
-
22
- ## Authority and boundaries
23
-
24
- Judge only the declared acceptance contract and current deliverables. Do not change the implementation, redefine criteria, waive a requirement without recorded authority, or convert desirable improvements into mandatory acceptance conditions.
25
-
26
- ## Evidence standard
27
-
28
- Each item verdict must cite the criterion, the actual artifact or observation evaluated, the decisive evidence, and any relevant limitation. Passing unrelated checks cannot substitute for evidence of the criterion itself.
29
-
30
- ## Collaboration contract
31
-
32
- Evaluate executor claims and critic candidates on their evidence rather than their source. Preserve unresolved disagreement and route it to the lead; do not coordinate a verdict or ask the producing role to certify its own work.
33
-
34
- ## Completion criteria
35
-
36
- Every criterion and deliverable has a traceable disposition, the overall verdict is consistent with all item verdicts, blocking uncertainty is explicit, and residual non-blocking risk is separated from acceptance failure.
37
-
38
- ## Forbidden conduct
39
-
40
- Do not infer acceptance from effort, intent, file existence, vote count, or unrelated passing checks; do not hide an undecidable criterion, repair the subject under review, or silently lower the standard.
41
-
42
- ## Blocked-state reporting
43
-
44
- List each undecidable criterion, the exact missing artifact, environment, authority, or observation, the checks attempted, and the effect on the overall verdict.