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,57 +0,0 @@
1
- # okstra-code-review AI Manual
2
-
3
- ## Sources
4
-
5
- - Skill source: [`skills/okstra-code-review/SKILL.md`](../../../skills/okstra-code-review/SKILL.md)
6
- - Census rules: [`skills/okstra-code-review/references/census-rules.md`](../../../skills/okstra-code-review/references/census-rules.md)
7
- - Review calibration: [`skills/okstra-code-review/references/review-calibration.md`](../../../skills/okstra-code-review/references/review-calibration.md)
8
- - Target core (CLI): [`scripts/okstra_ctl/code_review_target.py`](../../../scripts/okstra_ctl/code_review_target.py)
9
- - Review path core: [`scripts/okstra_ctl/code_review_paths.py`](../../../scripts/okstra_ctl/code_review_paths.py)
10
- - Rules the review applies: [`prompts/coding-preflight/`](../../../prompts/coding-preflight/)
11
-
12
- ## Purpose
13
-
14
- `okstra-code-review` reviews what a diff changed — one okstra `implementation` stage, or any branch unrelated to an okstra run — against this project's coding-preflight rules, and leaves the result as a file under the project.
15
-
16
- **Core principle — the census is law.** The orchestrator turns the diff into an explicit worklist of cells **once, deterministically**, before any reviewer is dispatched. Reviewers receive their slice as input and never rebuild, reinterpret, or extend it. Each returns a verdict for **every** cell it was given (`clean` or findings), so a skipped cell is visible rather than silently absent, and the coverage audit re-dispatches every cell that came back without one.
17
-
18
- **Second principle — the rules are not in the skill.** They live in `prompts/coding-preflight/` (`overview.md` router + `clean-code.md` + the routed `languages/` / `frameworks/` / `architectures/` resources). Briefs point at absolute pack paths; they never restate a rule.
19
-
20
- Distinguish it from writing a PR body (`okstra-pr-gen`), starting a run (`okstra-run`), and inspecting a finished task (`okstra-inspect`).
21
-
22
- ## Modes
23
-
24
- | Mode | Trigger | Diff range | Result file |
25
- |---|---|---|---|
26
- | stage | a task token (`DEV-9184`, or a full `project-id:task-group:task-id` key) | the stage's registry `base_ref` → the stage branch head | `.okstra/tasks/<task-group>/<task-id>/code-reviews/stage-<NN>.md` (re-review: `-r2`, `-r3`, …) |
27
- | branch | a branch name | `--base` when given, otherwise the CLI's estimate against the default branch | `.project-docs/code-reviews/<branch>/<YYYY-MM-DD>-<NN>.md` |
28
-
29
- The branch-mode result path is the one deliberate exception to the `.okstra/`-only artifact rule: a branch review belongs to no task bundle.
30
-
31
- ## Preflight
32
-
33
- A single Bash call with the literal `okstra` token (not wrapped in `if` / `eval` / `export` / `$(...)` / `VAR=` / `||` / `&&` / `npx`):
34
-
35
- ```bash
36
- okstra preflight --runtime claude-code
37
- ```
38
-
39
- `Okstra preflight: ready` → carry `Project root` as a literal. `Okstra preflight: failed` → retry the intended directory with `--cwd <dir>`; if that also fails, show `Reason` and `Recovery`, then stop. `unknown command: preflight` or `unknown command: code-review` means the `okstra` binary predates the skill — `npm i -g okstra@latest`, then stop.
40
-
41
- ## Flow
42
-
43
- 1. **Resolve the target.** A full `project-id:task-group:task-id` token is already the key. For a bare token, run `okstra model-io task-selection-input --project-root <projectRoot> --task-ref <token>` and use the fixed `Match count`, `Task`, and `Updated at` rows. Then run `okstra stage-map <taskKey> --project <projectRoot> --text` and pick from the fixed `Stages` and `Done stages` rows with a 3-option picker (recommendations first, `Enter directly` last). Branch mode picks the branch the same way; a detached HEAD is refused.
44
- 2. **Call the target CLI**: `okstra code-review target --task-key <k> --stage <N> --project-root <dir> --text`, or `okstra code-review target --branch <name> [--base <ref>] --project-root <dir> --text`. Carry the returned `Project root`, `Mode`, `Worktree path`, `Branch`, `Base commit`, `Head commit`, `Review path`, and `Round` values; stage mode also carries `Task key`, `Task root`, and `Stage`. Then run `okstra model-io code-review-input --project-root <projectRoot> --base <baseCommit> --head <headCommit>` and pass only that fixed Markdown view to model prompts. **Never derive the base** — the CLI owns it, and `Base commit` may be a ref rather than a commit id, so pass it through verbatim. Run git in `Worktree path` when non-empty, otherwise in `Project root` against `Branch`.
45
- 3. **Show the base and confirm it** with a 3-option picker before censusing anything — the returned `baseCommit` plus `git log -1 --oneline <baseCommit>` first, `Enter directly` last. Only an override calls the target CLI a second time, with `--base <ref>`.
46
- 4. **Census the diff** per `census-rules.md`: four axes (`structural`, `semantic`, `state-and-tests`, `general`), one cell per target per axis — the axis **is** the rule group, never one cell per individual rule. Membership is mechanical; judgment only ever decides a verdict. Route the coding-preflight packs exactly once here (`okstra paths --field home` → `<okstraHome>/prompts/coding-preflight/overview.md`), and fix the calibration path the briefs carry (`~/.claude/skills/okstra-code-review/references/review-calibration.md`). Print every cell table, every exclusion with its reason, the applied packs, and both completion criteria. Never truncate a large census — report the cell count and confirm.
47
- 5. **Materialize and dispatch four reviewers in parallel.** Each reviewer is a separate standalone invocation under `.okstra/agent-invocations/code-review/`. Write `<invocation-id>.instructions.md`, run `okstra agent-prompt materialize --purpose code-review --audience code-reviewer ...`, and verify the returned `metadataPath` before dispatch. A native host call receives the verified prompt body and `hostModelValue`; a deterministic provider process receives the prompt path and `modelExecutionValue` through `okstra worker-dispatch`. Each brief carries the diff, the work directory, its own axis's cell list verbatim, its packs' absolute paths, and the absolute calibration path.
48
- 6. **Complete and audit the results.** Capture each raw return under the purpose directory's `.tmp/`, then run `agent-prompt materialize-result`, `complete`, and `verify-completion` in order. Parse only the verified `returnedBody`. Diff those cells against the assigned slice; re-dispatch one gap-fill invocation per axis for missing cells, using a new invocation ID and the same full materialize/verify/result/completion boundary. A missing or unverified verdict is unfinished work, never an implicit `clean`.
49
- 7. **Merge and write.** Dedupe across axes, never re-grade a severity, and write the report to `reviewPath` with `Write` (frontmatter `mode` / `taskKey` / `branch` / `stage` / `round` / `baseCommit` / `headCommit` / `packs` / `generatedAt`; body `## Coverage`, `## Must-fix`, `## Should-fix`, `## Nits`, `## Score`). An empty diff dispatches no reviewer and still writes the report — Coverage reading zero cells and a Score table totalling 0.
50
-
51
- ## Output Rules
52
-
53
- - The file is the deliverable. In session, print only `reviewPath`, the count per severity, and the score total — do not replay the findings in chat.
54
- - The report's prose is Korean; paths, identifiers, rule names, and quoted code stay verbatim.
55
- - Every finding cites a line **this diff changed**, and carries a concrete fix (a pseudocode sketch for readability, an alternative name for naming, a destination for structural).
56
- - Read-only against the repository: `okstra code-review target` creates no directory and no file, and the review never reconciles git history. A rewritten base is reported, not force-fixed.
57
- - Branch mode keeps the final review at `.project-docs/code-reviews/<branch>/`, but its invocation prompts, result envelopes, and completion markers remain under `.okstra/agent-invocations/code-review/`.
@@ -1,129 +0,0 @@
1
- # okstra-container-build AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-container-build/SKILL.md`](../../../skills/okstra-container-build/SKILL.md)
6
- - container CLI: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
7
- - container runtime: [`scripts/okstra_ctl/container.py`](../../../scripts/okstra_ctl/container.py)
8
- - stage integration gate: [`scripts/okstra_ctl/stage_targets.py`](../../../scripts/okstra_ctl/stage_targets.py)
9
-
10
- ## Purpose
11
-
12
- `okstra-container-build` manages a user-test container group using the `docker-compose.yml` in an implementation task worktree. okstra labels the compose group with the task/run trace so later sub-commands can find it.
13
-
14
- ## sub-command
15
-
16
- | Sub-command | Role | side effect |
17
- |---|---|---|
18
- | `up` | Integrate the implementation stages into the task worktree, then `docker compose up -d`, poll healthchecks | create/start containers |
19
- | `status` | Check running containers (by label query) | read |
20
- | `down` | Remove the container group by label query | stop/remove containers |
21
-
22
- ## Preflight
23
-
24
- Single call:
25
-
26
- ```bash
27
- okstra preflight --runtime claude-code
28
- ```
29
-
30
- On `Okstra preflight: ready`, carry the fixed `Project root` line. On
31
- `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop. A Docker
32
- daemon is required. On a Docker connection error, tell the user to start Docker
33
- Desktop/daemon; do not start Docker yourself.
34
-
35
- ## task-key resolution
36
-
37
- Most sub-commands need a full task-key.
38
-
39
- 1. If a full task-key is given, use it as-is.
40
- 2. For a bare task-id, use the resolver:
41
-
42
- ```bash
43
- okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
44
- ```
45
-
46
- 3. On multiple matches, show the candidates and let the user pick.
47
- 4. Only `down --all` can run without a task-key.
48
-
49
- ## intent routing
50
-
51
- Clear verbs:
52
-
53
- - "bring up/deploy", "up": `up`
54
- - "status": `status`
55
- - "tear down", "down": `down`
56
-
57
- If ambiguous, show the full facet list and offer an Enter directly option. When multiple facets are in one message, run Step 0 once and execute the sub-commands sequentially.
58
-
59
- ## up
60
-
61
- Run:
62
-
63
- ```bash
64
- okstra container up --project-root <projectRoot> --task-key <task-key> --text
65
- ```
66
-
67
- Preconditions:
68
-
69
- - The task must have an implementation worktree registered in the registry.
70
- - The worktree root must contain a `docker-compose.yml`.
71
- - Every stage of the approved plan must be `done`. Do not deploy a partial-stage state as if it were a complete task.
72
-
73
- Handling failure messages:
74
-
75
- - Message that the task worktree is not in the registry: tell the user to run the implementation phase first.
76
- - No compose file: show the CLI message verbatim.
77
- - `final-verification(whole-task): stage N not done`: tell the user to finish that stage via implementation.
78
- - healthcheck failure: relay the failing service and the `docker compose ... logs` line the CLI provides, verbatim.
79
-
80
- On success, read the fixed `Service` rows, then run the `status --text` command below and read its numbered container `ports` fields. Tell the user that management from here is via `okstra container status <task-key>` and `down <task-key>`. For *what to verify* once it is up, point to the implementation report's §5.7.9 Manual User Test (Draft) — those steps and expected results are the manual test script for this build.
81
-
82
- ## status
83
-
84
- Run:
85
-
86
- ```bash
87
- okstra container status --project-root <projectRoot> --task-key <task-key> --text
88
- ```
89
-
90
- Fixed fields:
91
-
92
- - `projectName`: compose project name
93
- - `containers`: running containers found by run-trace label
94
-
95
- The label query is authoritative for whether it is alive. If `containers` is empty, say the group is not running and offer `up`. To follow a service's live logs, get `Project name` from `status`, then tell the user they can run `docker compose -p <projectName> logs -f <service>`.
96
-
97
- ## down
98
-
99
- Single task:
100
-
101
- ```bash
102
- okstra container down --project-root <projectRoot> --task-key <task-key> --text
103
- ```
104
-
105
- Whole project:
106
-
107
- ```bash
108
- okstra container down --project-root <projectRoot> --all --text
109
- ```
110
-
111
- A single-task down is fine to run after resolving the task-key. `--all` takes down every okstra container group in the project, so confirm with the user before running it.
112
-
113
- Report the fixed `Downed` rows. Show each torn-down project name.
114
-
115
- ## Output rules
116
-
117
- - The fixed text fields are the source of truth.
118
- - Do not second-guess it with raw `docker` commands. The only exception is when the CLI failed and the user asked for a manual fallback.
119
- - Show the resolved task-key in the heading or on the first line.
120
- - Show CLI failure messages verbatim, including the remediation line.
121
- - Show container/service state as the fixed values, without normalizing.
122
-
123
- ## Forbidden patterns
124
-
125
- - Trying to start the Docker daemon yourself.
126
- - Guessing the cause of an `up` failure and editing the compose file.
127
- - Dressing up a partial-stage task as deployable.
128
- - Running `down --all` without user confirmation.
129
- - Overriding the CLI result arbitrarily with a raw docker query.
@@ -1,262 +0,0 @@
1
- # okstra-inspect AI Manual
2
-
3
- ## Source
4
-
5
- - Skill source: [`skills/okstra-inspect/SKILL.md`](../../../skills/okstra-inspect/SKILL.md)
6
- - Facet bodies: `skills/okstra-inspect/facets/<sub-command>.md` — the skill is a thin core (preflight + dispatch + shared rules); each sub-command's full procedure is a lazily loaded facet file, guarded by `tests/contract/test_okstra_inspect_facets.py`
7
- - CLI registry: [`src/cli-registry.mjs`](../../../src/cli-registry.mjs)
8
- - context-cost CLI: `scripts/okstra_ctl/context_cost.py`
9
- - time-report CLI: `scripts/okstra_ctl/time_report.py`
10
- - log-report CLI: `scripts/okstra_ctl/log_report.py`
11
- - error-report CLI: `scripts/okstra_ctl/error_report.py`
12
- - container is a separate skill: [`okstra-container-build.md`](okstra-container-build.md)
13
-
14
- ## Purpose
15
-
16
- `okstra-inspect` is the single entry point for okstra read-side work. Most of it is read-only, with two exceptions.
17
-
18
- - `status.4`: writes the user-requested `workStatus` into `task-manifest.json`.
19
- - `errors`, `error-zip`, `recap record`: produce report/zip/log artifacts from the information read.
20
-
21
- No sub-command writes outside this machine.
22
-
23
- ## sub-command list
24
-
25
- | Sub-command | Role | Writes? |
26
- |---|---|---|
27
- | `status` | check task/phase/workflow status, change workStatus | manifest edit in `status.4` |
28
- | `history` | list past runs, assemble rerun/resume command | read by default |
29
- | `report` | resolve final-report path and optionally read | read |
30
- | `time` | aggregate elapsed time per task type/worker | read |
31
- | `logs` | inventory wrapper `.log` sidecars and suggest cleanup commands | read |
32
- | `cost` | estimate task bundle context/read cost | read |
33
- | `errors` | aggregate task error logs into a timestamped markdown report | generates report |
34
- | `error-zip` | build an anonymized zip of cross-project error logs | generates zip |
35
- | `run-audit` | check every run's artifacts against progress invariants — catches a run that ended wrong without ever logging a failure | read |
36
- | `recap` | summarize a task's before/after runs, or a task-group's per-brief status and latest conclusions, and record Q&A | appends `recap-log.jsonl` (task `recap/`, group `.recap/`) |
37
-
38
- ## Preflight
39
-
40
- Run once before any sub-command.
41
-
42
- ```bash
43
- okstra preflight --runtime claude-code
44
- ```
45
-
46
- The project check only sees the cwd of the Bash call. For a project that is not the cwd (a sibling repo, a monorepo subdir, or a project named in the request), `Okstra preflight: failed` can be a false negative rather than missing setup. Retry with `okstra preflight --runtime claude-code --cwd <that-dir>` (`--cwd` is the sanctioned way to target a project without a leading `cd`). Only when that also reports `Okstra preflight: failed` do you show `Reason` and `Recovery`, then stop. On `Okstra preflight: ready`, carry `Project root` as a literal value and pass it to the sub-command CLIs that accept it (`recap`, `context-cost`, etc.) via `--cwd`/`--project-root <projectRoot>`.
47
-
48
- ## intent routing
49
-
50
- Classify the user request into one or more facets. If ambiguous, show the entire sub-command table and let the user pick by number/name. Do not hide a facet because of AskUserQuestion's option limit.
51
-
52
- If several facets appear in one message, execute them sequentially. Step 0 runs only once.
53
-
54
- ## task-key resolution — shared rule
55
-
56
- Many facets accept the following target forms.
57
-
58
- 1. full task-key: `<project-id>:<task-group>:<task-id>`
59
- 2. bare task-id
60
- 3. task root path
61
-
62
- A bare task-id uses the shared resolver.
63
-
64
- ```bash
65
- okstra model-io task-selection-input --project-root <projectRoot> --task-ref <task-id>
66
- ```
67
-
68
- Handling the fixed text projection's `Match count` and repeated task lines:
69
-
70
- - 0: say it cannot be found; do not guess.
71
- - 1: use that `taskKey`.
72
- - N: show the candidate `taskKey`s and `updatedAt`, and take a disambiguation.
73
-
74
- ## status
75
-
76
- ### Project overview
77
-
78
- Run `okstra model-io status-input --project-root <projectRoot>`. Its fixed text task blocks are the projected source.
79
-
80
- Sort: `updatedAt` desc, then `taskKey`.
81
-
82
- Keep the table narrow.
83
-
84
- - Task Key
85
- - Category
86
- - Phase
87
- - workStatus
88
- - Next
89
-
90
- `nextRecommendedPhase` is an object `{phase, status, rationale}`. The Next cell is its `phase`, or `--` when that is empty. If `awaitingApproval`, or `nextRecommendedPhase.status` is anything but `ready`, add a marker to the Next cell and explain it. When `awaitingApproval` is true, the next human action is to approve the plan (`okstra-run` → `implementation`, or `--approve`); do not re-run `implementation-planning`. When the pointer is `blocked` after planning, send the user to `okstra-user-response` on the named `C-NNN` ids first.
91
-
92
- ### Specific task
93
-
94
- For a single task's detail, run `okstra model-io status-input --project-root <projectRoot> --task-ref <task-key>` and use its named lines.
95
-
96
- Information to show:
97
-
98
- - work category
99
- - current phase/state
100
- - last completed phase
101
- - next-phase pointer: `phase` (or `--`), its `status`, its `rationale`
102
- - awaiting approval
103
- - task status, latest run status
104
- - latest report, resume command
105
- - workStatus, note
106
- - phase states
107
- - safe resume checkpoint
108
-
109
- ### workStatus update
110
-
111
- Write only when the user explicitly requests a status change.
112
-
113
- Allowed values:
114
-
115
- - `todo`
116
- - `in-progress`
117
- - `blocked`
118
- - `done`
119
-
120
- Procedure: update via a single `okstra set-work-status <token> <status> [--note <text>] --project-root <projectRoot> --text` call — do not edit the manifest by hand. On `Stage: ambiguous`, re-ask with the listed `Match` values; on `Stage: not-found`, answer that it cannot be found.
121
-
122
- When `workStatus` is absent in a read display, infer it from the lifecycle state, but do not back-fill on read alone.
123
-
124
- ## history
125
-
126
- First branch: distinguish re-run from resume.
127
-
128
- - Re-run: create a new run from previous run parameters. A new run-seq is created.
129
- - Resume: continue an interrupted existing run. No new run-seq is created.
130
-
131
- Run `okstra model-io history-input --project-root <projectRoot>` for project history, or add `--task-ref <task-key>` for one task.
132
-
133
- Re-run obtains `projectId`, `taskGroup`, `taskId`, `taskType`, `taskBriefPath`, workers, related tasks, model overrides, and executor provider through `okstra model-io rerun-input --run-manifest <runManifestPath>`. Omit `implementation`'s `--base-ref` to reuse a registration; if launch reports that a base is required, ask the user.
134
-
135
- Resume checks `latestResumeCommandPath` or the timeline entry's `resumeCommandPath`, and if the file exists, guides/runs `bash <resume-command-path>`. If the path is empty or the file is missing, declare "no resume" and guide to history.3 (re-run).
136
-
137
- ## report
138
-
139
- Run `okstra model-io report-input --project-root <projectRoot> --task-ref <task-key>` for the latest report. For a specific run, use the `Report` line from `okstra model-io history-input --project-root <projectRoot> --task-ref <task-key>`. Render a full reading copy on demand with `okstra render-final-report <that data.json>`.
140
-
141
- Match read depth to the request (a final report is 300+ lines / 50K+ tokens). For summary/conclusion/pass questions ("summary", "just the key points", "conclusion", "did it pass?"), do not read the whole thing — read only the verdict in the `runs/<task-type-segment>/status/final-<task-type-segment>-<NNN>.status` (stage-isolated: `runs/<task-type-segment>/stage-<N>/status/`) sidecar plus the report's leading summary block. Ingest the whole file only for "the whole thing / read it all / full body". If a completion signal exists but the file does not, report it as a missing report; if it is not yet complete, show the current status and workStatus.
142
-
143
- ## time
144
-
145
- The CLI does the time computation. The AI does not recompute duration by hand.
146
-
147
- ```bash
148
- okstra time-report <task-key> --project-root <projectRoot> --text
149
- ```
150
-
151
- Convert every `*Ms` to `HH:MM:SS` for display. `CPU sum` is the overlapping cost of lead and workers time combined, not wall-clock. Show wall-clock from `perRunWallClock` only when the user explicitly asks. For `by stage`/`per stage`/`which stage took longest`, the task-type view (the By task type table) is the default answer — do not treat it as 'not measurable'. Render the intra-run `phaseTimelines` only on an explicit request like 'Phase 1–7' / 'which phase', and when it is empty, mention it only as a footnote rather than a headline.
152
-
153
- `unavailable[]` is not summed into totals; show it as a separate note.
154
-
155
- ## cost
156
-
157
- For context/read cost, the CLI output is the source of truth.
158
-
159
- ```bash
160
- okstra context-cost <task-key> --project-root <projectRoot>
161
- ```
162
-
163
- Interpretation points:
164
-
165
- - the token estimate is a heuristic, not a billing figure.
166
- - if `leadPhase1.mode == "active-run-context"`, the compact lead intake is primary.
167
- - if `analysisWorker.mode == "analysis-packet-primary"`, the worker reads the analysis-packet first and opens the full source only when needed.
168
- - if `skillAssets` is large, it is a prompt-diet target.
169
- - if there are many legacy timestamp artifacts, propose current-view/cold-artifact separation rather than a destructive delete.
170
-
171
- ## logs
172
-
173
- wrapper sidecar log inventory:
174
-
175
- ```bash
176
- okstra log-report --project-root <projectRoot> --text
177
- ```
178
-
179
- Scans `.okstra/tasks/**/runs/*/prompts/*.log`. Does not delete. The cleanup command merely presents a dry-run and `-delete` pair as fenced bash.
180
-
181
- Deleting an active run's log loses the live trace, so recommend checking `status` first.
182
-
183
- ## errors
184
-
185
- Aggregate task error logs into a markdown report.
186
-
187
- ```bash
188
- okstra error-report <task-key> --project-root <projectRoot> --text
189
- ```
190
-
191
- Read the fixed `Report path`, total, phase, agent, and parse-skipped labels and summarize. If the report path is `-` and total errors is 0, say there are no recorded error logs. Do not hide a nonzero parse-skipped count.
192
-
193
- ## error-zip
194
-
195
- Bundle the machine's cross-project okstra errors into an anonymized zip.
196
-
197
- Run `okstra model-io error-zip-input`. Recommend its `Previous output path` first when present; otherwise propose `~/okstra-error-feedback-<YYYY-MM-DD>.zip`.
198
-
199
- Run:
200
-
201
- ```bash
202
- okstra error-zip --out <path> --text
203
- ```
204
-
205
- Summary fields:
206
-
207
- - `outPath`
208
- - `errorCount`
209
- - `runCount`
210
- - `unreachableRuns`
211
- - `clusterCount`
212
- - `projectCount`
213
-
214
- At the end, guide the user to build a brief with the error-feedback variant of `/okstra-brief-gen`, then run `error-analysis` in the okstra repo.
215
-
216
- ## recap
217
-
218
- The default is artifact mode. It builds the before/after summary and answers questions using only `.okstra/` artifacts.
219
-
220
- Read the fixed recap projection:
221
-
222
- ```bash
223
- okstra model-io recap-input --project-root <projectRoot> --task-ref <task-key>
224
- ```
225
-
226
- Use the emitted `Run count` and repeated `Transition` fields in order. Do not parse recap JSON or open recap state files directly.
227
-
228
- Group scope — when the user names a task-group, or the bare token resolves only via `taskGroup`:
229
-
230
- ```bash
231
- okstra model-io recap-input --project-root <projectRoot> --task-group <task-group>
232
- ```
233
-
234
- The projection joins the group's briefs (start order, `waits for` edges), the catalog / task-manifests (real status, progress, run count, next phase, report), and the group document's Task Memory (headline, decisions, watch-outs, follow-ups). Read `Brief count` / `Task count` / `Next in group`, then the repeated `Queue entry` and `Task` blocks. Run-count / time / error totals belong to `okstra-rollup`.
235
-
236
- record:
237
-
238
- ```bash
239
- okstra recap record <task-key> --project-root <projectRoot> --kind <summary|qa> --mode <artifact|code> --question "<question>" --answer "<summary>" --citation "<path:line>"
240
- ```
241
-
242
- In group scope, `--task-group <task-group>` replaces `<task-key>` and the line lands at `.okstra/tasks/<task-group>/.recap/recap-log.jsonl`. `recap note` has no group form.
243
-
244
- Enter code mode only when the user explicitly requests it, such as "including the diff" or "the code changes too". Entering recap alone does not read the code diff.
245
-
246
- ## Output rules
247
-
248
- - Answer in Korean, spelling out task ids, phase names, and status values on first mention.
249
- - Prefer project-relative paths.
250
- - Show disk field values as-is without normalizing.
251
- - Clearly indicate an awaiting-approval state.
252
- - If there is no recent report, show `--`.
253
- - Display dates in `YYYY-MM-DD HH:MM`.
254
-
255
- ## Forbidden patterns
256
-
257
- - Failing immediately because the catalog is absent. There is a manifest fallback.
258
- - Confusing `workStatus` with `currentStatus`.
259
- - Hand-computing time duration without the CLI.
260
- - Running a cleanup command directly.
261
- - Arbitrarily reinterpreting raw files instead of CLI output in `errors`/`cost`/`time`.
262
- - Automatically reading code changes in recap artifact mode.
@@ -1,69 +0,0 @@
1
- # okstra-manager
2
-
3
- Use this to bundle okstra tasks across multiple projects into a single manager-owned context. The authoritative contract is [`skills/okstra-manager/SKILL.md`](../../../skills/okstra-manager/SKILL.md); the CLI implementation is [`scripts/okstra_ctl/manager_cli.py`](../../../scripts/okstra_ctl/manager_cli.py).
4
-
5
- ## When to Use
6
-
7
- - The user says something like "multiple projects", "cross-project", "okstra manager", or "group projects together".
8
- - Register projects under a manager, or discover candidate projects.
9
- - Plan child project tasks under a shared task-group/task-id and assign roles/directives.
10
- - Sync child project `.okstra` state into the manager snapshot, or view status.
11
- - Prepare a launch packet and a manager child context for running a specific child task.
12
-
13
- ## Execution Rules
14
-
15
- 1. Every command starts with the literal `okstra`. Do not wrap it in shell variables, `$(...)`, `&&`, `eval`, or a leading env assignment.
16
- 2. The fixed CLI fields are the source of truth. Do not reconstruct manager state or child launch args from docs/memory.
17
- Nested project, manifest, child, snapshot, and directive values use numbered count/name/value rows; carry every returned row.
18
- 3. `--workspace-root` is owned by the Node wrapper. The CLI rejects it if the user passes it.
19
- 4. `new project`'s `--project-root` must be an already-existing directory. It performs setup-equivalent registration only when there is no `.okstra/project.json` inside it.
20
- 5. The public child task identity is `project-id:task-group:task-id`. The `new task --task` example shows the full key form first.
21
- 6. When the actual child task id differs under the same manager task id, pass `--child-task-id <id>` to both `task assign` and `task run`.
22
-
23
- ## Command Surface
24
-
25
- ```bash
26
- okstra manager init --manager-id <manager-id>
27
- okstra manager discover-projects
28
- okstra manager new project --manager-id <manager-id> --project-id <project-id> --project-root <abs-path> [--role <role>] [--tag <tag>]
29
- okstra manager new task-group --manager-id <manager-id> --task-group <task-group>
30
- okstra manager new task --manager-id <manager-id> --task-group <task-group> --task-id <task-id> [--task <project-id:task-group:task-id> ...] [--objective <text>] [--common-brief <path>] [--progress-mode <manual|auto>]
31
- okstra manager task assign --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --project-id <project-id> [--child-task-id <child-task-id>] [--role <role>] [--tag <tag>] [--assignment <text>]
32
- okstra manager task note --manager-id <manager-id> --task-group <task-group> --task-id <task-id> --scope <shared|project> [--project-id <project-id>] --body <text>
33
- okstra manager task sync --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
34
- okstra manager task status --manager-id <manager-id> --task-group <task-group> --task-id <task-id>
35
- okstra manager task run --manager-id <manager-id> --project-id <project-id> --task-group <task-group> --task-id <task-id> [--child-task-id <child-task-id>]
36
- ```
37
-
38
- ## Storage Model
39
-
40
- Manager state is stored under `~/.okstra/managers/<manager-id>/`, split into two layers: the manager root and the task directory.
41
-
42
- Directly under the manager root:
43
-
44
- - `manager.json`: manager id / schema / createdAt
45
- - `projects.json`: registered projectId, projectRoot, role, tags
46
-
47
- Under the task directory `task-groups/<safe-group>/<safe-task>/`:
48
-
49
- - `manifest.json`: manager task objective, common brief, progress mode
50
- - `children.json`: child task plan, assignment, launch metadata
51
- - `directives.jsonl`: shared/project directive rows
52
- - `snapshots.json`: the read-side snapshot `task sync` read from the project-local `.okstra`
53
- - `events.jsonl`: manager events such as `task-created` and `child-launch-prepared`
54
- - `child-context/<safe-project>-<safe-task>.md`: the child lead context `task run` produced
55
-
56
- A segment whose slug is empty (e.g. a non-ASCII task-group/task-id) uses a `u-<sha1-prefix>` path segment, but the manifest and the child `taskKey` preserve the original input value.
57
-
58
- ## Child launch
59
-
60
- `task run` does not run the child work directly; it prepares a launch packet. The key fixed fields of the returned packet:
61
-
62
- - `Task key`: the child's `project-id:task-group:task-id` (the public child-identity key — also recorded on the `child-launch-prepared` event)
63
- - `Backend`: always `subagent-child-lead`
64
- - `Worker dispatch backend`: always `subagent` in v1
65
- - `Project root`: the child project root
66
- - `Context path`: the manager child context markdown
67
- - every numbered `Run arg N`: the ordered `okstra run ... --directive "Read manager child context: ..."` arguments for the host launcher to use
68
-
69
- When packet creation succeeds, that child launch's status in `children.json` is updated to `prepared`, and a `child-launch-prepared` is appended to `events.jsonl`. On failure it does not modify the project-local task state.
@@ -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.