okstra 0.180.0 → 0.184.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 (233) hide show
  1. package/README.md +1 -1
  2. package/dist/cli-registry.mjs +16 -2
  3. package/dist/cli-registry.mjs.map +1 -1
  4. package/dist/commands/execute/render-bundle.d.mts +4 -2
  5. package/dist/commands/execute/render-bundle.mjs +46 -5
  6. package/dist/commands/execute/render-bundle.mjs.map +1 -1
  7. package/dist/commands/execute/run.mjs +11 -3
  8. package/dist/commands/execute/run.mjs.map +1 -1
  9. package/dist/commands/inspect/model-io.d.mts +1 -0
  10. package/dist/commands/inspect/model-io.mjs +25 -0
  11. package/dist/commands/inspect/model-io.mjs.map +1 -0
  12. package/dist/commands/inspect/stage-map.mjs +29 -8
  13. package/dist/commands/inspect/stage-map.mjs.map +1 -1
  14. package/dist/commands/inspect/task-list.mjs +52 -6
  15. package/dist/commands/inspect/task-list.mjs.map +1 -1
  16. package/dist/commands/inspect/user-response.mjs +14 -4
  17. package/dist/commands/inspect/user-response.mjs.map +1 -1
  18. package/dist/commands/lifecycle/check-project.d.mts +1 -0
  19. package/dist/commands/lifecycle/check-project.mjs +69 -50
  20. package/dist/commands/lifecycle/check-project.mjs.map +1 -1
  21. package/dist/commands/lifecycle/contract-check.d.mts +1 -0
  22. package/dist/commands/lifecycle/contract-check.mjs +18 -0
  23. package/dist/commands/lifecycle/contract-check.mjs.map +1 -0
  24. package/dist/commands/lifecycle/preflight.mjs +154 -51
  25. package/dist/commands/lifecycle/preflight.mjs.map +1 -1
  26. package/dist/commands/pr/pr.d.mts +1 -0
  27. package/dist/commands/pr/pr.mjs +19 -1
  28. package/dist/commands/pr/pr.mjs.map +1 -1
  29. package/dist/commands/report/agent-activity.mjs +2 -2
  30. package/dist/commands/report/translate.mjs +3 -0
  31. package/dist/commands/report/translate.mjs.map +1 -1
  32. package/dist/lib/host-registry-client.mjs +13 -9
  33. package/dist/lib/host-registry-client.mjs.map +1 -1
  34. package/docs/architecture.md +13 -2
  35. package/docs/cli.md +31 -15
  36. package/docs/container.md +6 -4
  37. package/docs/contributor-change-matrix.md +1 -1
  38. package/docs/for-ai/README.md +2 -2
  39. package/docs/for-ai/skills/okstra-brief-gen.md +5 -3
  40. package/docs/for-ai/skills/okstra-code-review.md +4 -4
  41. package/docs/for-ai/skills/okstra-container-build.md +20 -17
  42. package/docs/for-ai/skills/okstra-inspect.md +20 -23
  43. package/docs/for-ai/skills/okstra-manager.md +19 -18
  44. package/docs/for-ai/skills/okstra-memory.md +2 -2
  45. package/docs/for-ai/skills/okstra-pr-gen.md +3 -3
  46. package/docs/for-ai/skills/okstra-rollup.md +14 -13
  47. package/docs/for-ai/skills/okstra-run.md +7 -3
  48. package/docs/for-ai/skills/okstra-schedule-gen.md +15 -18
  49. package/docs/for-ai/skills/okstra-setup.md +7 -7
  50. package/docs/for-ai/skills/okstra-usage.md +5 -4
  51. package/docs/for-ai/skills/okstra-user-response.md +50 -32
  52. package/docs/project-structure-overview.md +30 -27
  53. package/docs/task-process/README.md +1 -1
  54. package/docs/task-process/common-flow.md +2 -3
  55. package/docs/task-process/error-analysis.md +3 -4
  56. package/docs/task-process/final-verification.md +2 -3
  57. package/docs/task-process/implementation-planning.md +2 -3
  58. package/docs/task-process/implementation.md +9 -7
  59. package/docs/task-process/release-handoff.md +3 -4
  60. package/docs/task-process/requirements-discovery.md +3 -4
  61. package/package.json +1 -1
  62. package/runtime/BUILD.json +2 -2
  63. package/runtime/agents/workers/claude-worker.md +4 -4
  64. package/runtime/agents/workers/report-writer-worker.md +3 -3
  65. package/runtime/agents/workers/translator-worker.md +5 -13
  66. package/runtime/bin/okstra-error-log.py +51 -11
  67. package/runtime/bin/okstra-report-translate.py +210 -23
  68. package/runtime/prompts/host-orchestration/implementation.md +1 -1
  69. package/runtime/prompts/launch.template.md +11 -14
  70. package/runtime/prompts/lead/context-loader.md +41 -141
  71. package/runtime/prompts/lead/convergence.md +8 -6
  72. package/runtime/prompts/lead/okstra-lead-contract.md +26 -36
  73. package/runtime/prompts/lead/plan-body-verification.md +211 -30
  74. package/runtime/prompts/lead/report-writer.md +23 -4
  75. package/runtime/prompts/lead/team-contract.md +8 -53
  76. package/runtime/prompts/profiles/_coding-conventions-preflight.md +3 -2
  77. package/runtime/prompts/profiles/_common-contract.md +1 -1
  78. package/runtime/prompts/profiles/_implementation-diff-review.md +1 -1
  79. package/runtime/prompts/profiles/_implementation-executor.md +1 -0
  80. package/runtime/prompts/profiles/_implementation-verifier.md +4 -4
  81. package/runtime/prompts/profiles/final-verification.md +1 -1
  82. package/runtime/prompts/profiles/implementation-planning.md +17 -13
  83. package/runtime/prompts/profiles/release-handoff.md +0 -1
  84. package/runtime/prompts/wizard/prompts.ko.json +7 -11
  85. package/runtime/python/okstra_ctl/adapters/hosts/capability_adapter.py +69 -17
  86. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/adapter.py +13 -4
  87. package/runtime/python/okstra_ctl/adapters/hosts/claude-code/relay.md +6 -1
  88. package/runtime/python/okstra_ctl/adapters/hosts/codex/adapter.py +2 -2
  89. package/runtime/python/okstra_ctl/adapters/hosts/codex/relay.md +50 -5
  90. package/runtime/python/okstra_ctl/adapters/hosts/grok/adapter.py +2 -2
  91. package/runtime/python/okstra_ctl/adapters/hosts/grok/relay.md +66 -5
  92. package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +70 -2
  93. package/runtime/python/okstra_ctl/agent_activity.py +118 -35
  94. package/runtime/python/okstra_ctl/agent_invocation.py +19 -6
  95. package/runtime/python/okstra_ctl/agent_prompt_cli.py +65 -18
  96. package/runtime/python/okstra_ctl/analysis_inputs.py +5 -4
  97. package/runtime/python/okstra_ctl/analysis_packet.py +81 -1
  98. package/runtime/python/okstra_ctl/approval_decisions.py +3 -2
  99. package/runtime/python/okstra_ctl/attempt_evidence.py +2 -2
  100. package/runtime/python/okstra_ctl/backfill.py +13 -10
  101. package/runtime/python/okstra_ctl/batch.py +2 -4
  102. package/runtime/python/okstra_ctl/build_tools.py +6 -3
  103. package/runtime/python/okstra_ctl/claim_reproduction.py +101 -0
  104. package/runtime/python/okstra_ctl/clarification_items.py +27 -13
  105. package/runtime/python/okstra_ctl/cmux.py +130 -52
  106. package/runtime/python/okstra_ctl/code_review_target.py +34 -8
  107. package/runtime/python/okstra_ctl/conformance.py +37 -1
  108. package/runtime/python/okstra_ctl/consumers.py +5 -4
  109. package/runtime/python/okstra_ctl/container.py +103 -8
  110. package/runtime/python/okstra_ctl/context_cost.py +2 -1
  111. package/runtime/python/okstra_ctl/contract_graph.py +497 -0
  112. package/runtime/python/okstra_ctl/contract_graph_cli.py +62 -0
  113. package/runtime/python/okstra_ctl/convergence.py +338 -17
  114. package/runtime/python/okstra_ctl/convergence_engine.py +10 -18
  115. package/runtime/python/okstra_ctl/convergence_provenance.py +58 -8
  116. package/runtime/python/okstra_ctl/convergence_store.py +55 -34
  117. package/runtime/python/okstra_ctl/design_prep.py +7 -4
  118. package/runtime/python/okstra_ctl/dispatch_core.py +35 -65
  119. package/runtime/python/okstra_ctl/dispatch_state.py +134 -59
  120. package/runtime/python/okstra_ctl/doctor.py +6 -3
  121. package/runtime/python/okstra_ctl/domain/worker_presentation.py +70 -9
  122. package/runtime/python/okstra_ctl/entrypoints/hosts.py +16 -30
  123. package/runtime/python/okstra_ctl/error_log_write.py +35 -30
  124. package/runtime/python/okstra_ctl/error_report.py +26 -1
  125. package/runtime/python/okstra_ctl/error_zip.py +27 -5
  126. package/runtime/python/okstra_ctl/execution_identity.py +3 -2
  127. package/runtime/python/okstra_ctl/execution_manifest.py +7 -4
  128. package/runtime/python/okstra_ctl/final_report_schema.py +2 -2
  129. package/runtime/python/okstra_ctl/fix_cycles.py +2 -2
  130. package/runtime/python/okstra_ctl/fixed_text.py +39 -0
  131. package/runtime/python/okstra_ctl/git_reconcile.py +41 -9
  132. package/runtime/python/okstra_ctl/handoff.py +5 -4
  133. package/runtime/python/okstra_ctl/i18n.py +4 -2
  134. package/runtime/python/okstra_ctl/implementation_direction.py +22 -14
  135. package/runtime/python/okstra_ctl/implementation_outcome.py +4 -7
  136. package/runtime/python/okstra_ctl/incremental_carry.py +2 -1
  137. package/runtime/python/okstra_ctl/incremental_scope.py +89 -39
  138. package/runtime/python/okstra_ctl/index.py +8 -11
  139. package/runtime/python/okstra_ctl/initial_prompt_materialization.py +79 -7
  140. package/runtime/python/okstra_ctl/invocation.py +3 -6
  141. package/runtime/python/okstra_ctl/json_boundary.py +366 -0
  142. package/runtime/python/okstra_ctl/json_registry.py +10 -12
  143. package/runtime/python/okstra_ctl/jsonl.py +19 -2
  144. package/runtime/python/okstra_ctl/lead_events.py +33 -1
  145. package/runtime/python/okstra_ctl/listing.py +3 -3
  146. package/runtime/python/okstra_ctl/log_report.py +24 -2
  147. package/runtime/python/okstra_ctl/manager_cli.py +92 -7
  148. package/runtime/python/okstra_ctl/manager_store.py +12 -10
  149. package/runtime/python/okstra_ctl/material.py +5 -1
  150. package/runtime/python/okstra_ctl/migrate.py +29 -25
  151. package/runtime/python/okstra_ctl/model_cli.py +3 -15
  152. package/runtime/python/okstra_ctl/model_io_cli.py +1051 -0
  153. package/runtime/python/okstra_ctl/mutation_probe.py +13 -4
  154. package/runtime/python/okstra_ctl/pane_reclaim.py +3 -2
  155. package/runtime/python/okstra_ctl/paths.py +9 -0
  156. package/runtime/python/okstra_ctl/plan_items.py +525 -5
  157. package/runtime/python/okstra_ctl/plan_items_cli.py +842 -32
  158. package/runtime/python/okstra_ctl/pr_template.py +3 -2
  159. package/runtime/python/okstra_ctl/project_meta.py +5 -7
  160. package/runtime/python/okstra_ctl/recap.py +5 -4
  161. package/runtime/python/okstra_ctl/reconcile.py +21 -27
  162. package/runtime/python/okstra_ctl/registry/host_discovery.py +3 -2
  163. package/runtime/python/okstra_ctl/registry/provider_registry.py +3 -2
  164. package/runtime/python/okstra_ctl/render.py +30 -15
  165. package/runtime/python/okstra_ctl/render_final_report.py +3 -2
  166. package/runtime/python/okstra_ctl/report_assembly.py +172 -17
  167. package/runtime/python/okstra_ctl/report_finalize.py +7 -10
  168. package/runtime/python/okstra_ctl/report_html/render.py +3 -2
  169. package/runtime/python/okstra_ctl/report_language.py +3 -2
  170. package/runtime/python/okstra_ctl/report_markdown.py +13 -1
  171. package/runtime/python/okstra_ctl/report_narrative.py +40 -8
  172. package/runtime/python/okstra_ctl/report_synthesis_packet.py +518 -0
  173. package/runtime/python/okstra_ctl/report_views.py +3 -2
  174. package/runtime/python/okstra_ctl/rollup.py +65 -4
  175. package/runtime/python/okstra_ctl/run.py +159 -56
  176. package/runtime/python/okstra_ctl/run_audit.py +3 -2
  177. package/runtime/python/okstra_ctl/run_context.py +6 -9
  178. package/runtime/python/okstra_ctl/run_index_row.py +2 -8
  179. package/runtime/python/okstra_ctl/schedule_semantics.py +5 -2
  180. package/runtime/python/okstra_ctl/schema_excerpt.py +4 -2
  181. package/runtime/python/okstra_ctl/session_transcript.py +27 -1
  182. package/runtime/python/okstra_ctl/set_work_status.py +64 -38
  183. package/runtime/python/okstra_ctl/stage_fix_carry.py +4 -2
  184. package/runtime/python/okstra_ctl/stage_map.py +26 -6
  185. package/runtime/python/okstra_ctl/stage_targets.py +3 -4
  186. package/runtime/python/okstra_ctl/team.py +2 -1
  187. package/runtime/python/okstra_ctl/team_reconcile.py +11 -2
  188. package/runtime/python/okstra_ctl/time_report.py +51 -4
  189. package/runtime/python/okstra_ctl/usage_identity.py +2 -1
  190. package/runtime/python/okstra_ctl/usage_report.py +58 -4
  191. package/runtime/python/okstra_ctl/user_response.py +1431 -66
  192. package/runtime/python/okstra_ctl/wizard.py +50 -117
  193. package/runtime/python/okstra_ctl/work_categories.py +3 -2
  194. package/runtime/python/okstra_ctl/worker_prompt_body.py +18 -7
  195. package/runtime/python/okstra_ctl/worker_prompt_contract.py +3 -2
  196. package/runtime/python/okstra_ctl/worker_runner.py +14 -12
  197. package/runtime/python/okstra_ctl/workflow.py +2 -1
  198. package/runtime/python/okstra_ctl/worktree.py +3 -2
  199. package/runtime/python/okstra_ctl/wrapper_status.py +4 -2
  200. package/runtime/python/okstra_ctl/write_policy.py +4 -2
  201. package/runtime/python/okstra_token_usage/antigravity.py +39 -12
  202. package/runtime/python/okstra_token_usage/collect.py +90 -38
  203. package/runtime/python/okstra_token_usage/grok.py +127 -0
  204. package/runtime/schemas/final-report-v2.0.schema.json +21 -0
  205. package/runtime/schemas/final-report-v3.0.schema.json +21 -0
  206. package/runtime/schemas/report-synthesis-packet-v1.0.schema.json +140 -0
  207. package/runtime/skills/okstra-brief-gen/SKILL.md +9 -7
  208. package/runtime/skills/okstra-code-review/SKILL.md +21 -11
  209. package/runtime/skills/okstra-container-build/SKILL.md +18 -18
  210. package/runtime/skills/okstra-inspect/SKILL.md +12 -11
  211. package/runtime/skills/okstra-inspect/facets/error-zip.md +8 -8
  212. package/runtime/skills/okstra-inspect/facets/errors.md +2 -2
  213. package/runtime/skills/okstra-inspect/facets/history.md +9 -14
  214. package/runtime/skills/okstra-inspect/facets/logs.md +2 -2
  215. package/runtime/skills/okstra-inspect/facets/recap.md +5 -5
  216. package/runtime/skills/okstra-inspect/facets/report.md +6 -10
  217. package/runtime/skills/okstra-inspect/facets/status.md +9 -8
  218. package/runtime/skills/okstra-inspect/facets/time.md +3 -3
  219. package/runtime/skills/okstra-manager/SKILL.md +16 -14
  220. package/runtime/skills/okstra-memory/SKILL.md +3 -3
  221. package/runtime/skills/okstra-pr-gen/SKILL.md +5 -4
  222. package/runtime/skills/okstra-rollup/SKILL.md +6 -16
  223. package/runtime/skills/okstra-run/SKILL.md +9 -9
  224. package/runtime/skills/okstra-schedule-gen/SKILL.md +21 -17
  225. package/runtime/skills/okstra-setup/SKILL.md +21 -13
  226. package/runtime/skills/okstra-setup/references/project-config.md +2 -2
  227. package/runtime/skills/okstra-usage/SKILL.md +10 -10
  228. package/runtime/skills/okstra-user-response/SKILL.md +78 -107
  229. package/runtime/templates/report-writer-prompt-preamble.md +17 -1
  230. package/runtime/templates/reports/schedule.template.md +4 -4
  231. package/runtime/templates/worker-error-contract.md +17 -29
  232. package/runtime/validators/validate-run.py +527 -113
  233. package/runtime/validators/validate_session_conformance.py +65 -10
@@ -85,6 +85,7 @@ from .self_mock_signals import (
85
85
  partition_waived_entries,
86
86
  selfmock_path_key,
87
87
  )
88
+ from .json_boundary import JsonBoundaryError, external_tool_json_source, load_external_json
88
89
 
89
90
  # `survived` is read by a human in the sidecar, so it is trimmed. The verdict and
90
91
  # the logged total are taken before the trim — the cap shortens the report, never
@@ -414,8 +415,12 @@ class StrykerAdapter:
414
415
  if not path.is_file():
415
416
  return None
416
417
  try:
417
- return json.loads(path.read_text(encoding="utf-8"))
418
- except (OSError, json.JSONDecodeError):
418
+ # 외부 입력: mutation testing 도구가 생성한 실행 보고서다.
419
+ return load_external_json(
420
+ external_tool_json_source(path, Path(worktree) if worktree else Path.cwd()),
421
+ artifact="mutation test report",
422
+ )
423
+ except JsonBoundaryError:
419
424
  return None
420
425
 
421
426
 
@@ -1004,8 +1009,12 @@ class CargoMutantsAdapter:
1004
1009
  if not path.is_file():
1005
1010
  return None
1006
1011
  try:
1007
- data = json.loads(path.read_text(encoding="utf-8"))
1008
- except (OSError, json.JSONDecodeError):
1012
+ # 외부 입력: mutation testing 도구가 생성한 실행 보고서다.
1013
+ data = load_external_json(
1014
+ external_tool_json_source(path, Path(worktree) if worktree else Path.cwd()),
1015
+ artifact="mutation test report",
1016
+ )
1017
+ except JsonBoundaryError:
1009
1018
  return None
1010
1019
  return data if isinstance(data, dict) else None
1011
1020
 
@@ -18,6 +18,7 @@ import sys
18
18
  from pathlib import Path
19
19
 
20
20
  from .dispatch_state import NON_TERMINAL_WORKER_STATUSES
21
+ from .json_boundary import JsonBoundaryError, load_owned_object
21
22
 
22
23
 
23
24
  def _newest_team_state(state_dir: Path) -> Path | None:
@@ -33,8 +34,8 @@ def _newest_team_state(state_dir: Path) -> Path | None:
33
34
 
34
35
  def _has_live_dispatch(team_state_path: Path) -> bool:
35
36
  try:
36
- payload = json.loads(team_state_path.read_text(encoding="utf-8"))
37
- except (OSError, json.JSONDecodeError):
37
+ payload = load_owned_object(team_state_path, artifact="team state")
38
+ except JsonBoundaryError:
38
39
  return False
39
40
  if not isinstance(payload, dict):
40
41
  return False
@@ -552,6 +552,9 @@ def compute_run_paths(
552
552
  team_state = run_state / f"team-state{suffixes['state']}.json"
553
553
  active_run_context = run_state / f"active-run-context{suffixes['state']}.json"
554
554
  lead_events = run_state / f"lead-events-{task_type_segment}-{seqs['state']}.jsonl"
555
+ convergence_state = (
556
+ run_state / f"convergence-{task_type_segment}-{seqs['state']}.json"
557
+ )
555
558
  final_report_template = instruction_set / "final-report-template.md"
556
559
  final_report_schema = instruction_set / "final-report-schema.json"
557
560
  reference_expectations = instruction_set / "reference-expectations.md"
@@ -674,6 +677,7 @@ def compute_run_paths(
674
677
  "REPORT_WRITER_NARRATIVE_FILE": str(report_writer_narrative),
675
678
  "APPROVAL_DECISIONS_PATH": str(approval_decisions),
676
679
  "DESIGN_PREPARATION_PATH": str(design_preparation),
680
+ "CONVERGENCE_STATE_PATH": str(convergence_state),
677
681
  "PLAN_BODY_VERIFICATION_STATE_PATH": str(plan_body_verification),
678
682
  "RUN_ERRORS_LOG_PATH": str(run_errors_log),
679
683
  "CLAUDE_WORKER_ERRORS_SIDECAR_PATH": str(claude_worker_errors_sidecar),
@@ -732,6 +736,11 @@ def compute_run_paths(
732
736
  ("FINAL_REPORT_RECORD_RELATIVE_PATH", final_report),
733
737
  ("FINAL_STATUS_RELATIVE_PATH", final_status),
734
738
  ("TEAM_STATE_RELATIVE_PATH", team_state),
739
+ # `render.py` 가 이 키로 매니페스트의 `convergenceStatePath` 를 채운다.
740
+ # `path_hints` 만 내보내던 동안 그 필드가 빈 문자열로 렌더돼,
741
+ # `report-finalize` 가 "report contract 3.0 requires convergenceStatePath"
742
+ # 로 죽었다 — 수렴 상태 파일 자체는 정상 생성돼 있었다.
743
+ ("CONVERGENCE_STATE_RELATIVE_PATH", convergence_state),
735
744
  ("ACTIVE_RUN_CONTEXT_RELATIVE_PATH", active_run_context),
736
745
  ("LEAD_EVENTS_RELATIVE_PATH", lead_events),
737
746
  ("WORKER_RESULTS_RELATIVE_PATH", worker_results),