okstra 0.227.0 → 0.228.1

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 (76) hide show
  1. package/README.md +1 -1
  2. package/dist/cli-registry.mjs +6 -0
  3. package/dist/cli-registry.mjs.map +1 -1
  4. package/docs/architecture/storage-model.md +77 -0
  5. package/docs/cli.md +15 -3
  6. package/docs/project-structure-overview.md +12 -2
  7. package/package.json +1 -1
  8. package/runtime/BUILD.json +2 -2
  9. package/runtime/prompts/coding-preflight/clean-code.md +24 -18
  10. package/runtime/prompts/coding-preflight/overview.md +6 -6
  11. package/runtime/prompts/duties/code-reviewer.json +1 -0
  12. package/runtime/prompts/lead/convergence.md +5 -19
  13. package/runtime/prompts/lead/okstra-lead-contract.md +1 -1
  14. package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
  15. package/runtime/python/okstra_ctl/adapters/verification_inputs.py +22 -0
  16. package/runtime/python/okstra_ctl/adapters/worker_defaults.py +2 -2
  17. package/runtime/python/okstra_ctl/analysis_packet.py +52 -21
  18. package/runtime/python/okstra_ctl/approval_decisions.py +30 -1
  19. package/runtime/python/okstra_ctl/approved_plan_stage_extract.py +100 -66
  20. package/runtime/python/okstra_ctl/brief_sources.py +162 -44
  21. package/runtime/python/okstra_ctl/code_review_coverage.py +11 -1
  22. package/runtime/python/okstra_ctl/code_review_scope.py +157 -0
  23. package/runtime/python/okstra_ctl/code_review_target.py +46 -10
  24. package/runtime/python/okstra_ctl/conformance.py +9 -3
  25. package/runtime/python/okstra_ctl/design_surfaces.py +51 -19
  26. package/runtime/python/okstra_ctl/final_report_schema.py +37 -30
  27. package/runtime/python/okstra_ctl/fixed_text.py +31 -9
  28. package/runtime/python/okstra_ctl/implementation_direction.py +18 -0
  29. package/runtime/python/okstra_ctl/initial_prompt_materialization.py +59 -21
  30. package/runtime/python/okstra_ctl/json_registry.py +3 -18
  31. package/runtime/python/okstra_ctl/manager_split.py +201 -84
  32. package/runtime/python/okstra_ctl/model_io/references.py +31 -1
  33. package/runtime/python/okstra_ctl/model_io/renderers.py +30 -1
  34. package/runtime/python/okstra_ctl/model_io_cli.py +9 -0
  35. package/runtime/python/okstra_ctl/path_hints.py +13 -1
  36. package/runtime/python/okstra_ctl/paths.py +4 -0
  37. package/runtime/python/okstra_ctl/phases/final_verification/prior_blockers.py +87 -45
  38. package/runtime/python/okstra_ctl/phases/final_verification/profile.md +2 -2
  39. package/runtime/python/okstra_ctl/phases/final_verification/spec.md +10 -2
  40. package/runtime/python/okstra_ctl/phases/final_verification/validation.py +19 -11
  41. package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-executor.md +3 -1
  42. package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md +3 -1
  43. package/runtime/python/okstra_ctl/phases/implementation/spec.md +14 -0
  44. package/runtime/python/okstra_ctl/phases/implementation_option_selection/authoring.py +2 -1
  45. package/runtime/python/okstra_ctl/phases/implementation_option_selection/profile.md +1 -1
  46. package/runtime/python/okstra_ctl/phases/implementation_option_selection/validation.py +53 -37
  47. package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +1 -1
  48. package/runtime/python/okstra_ctl/plan_items.py +9 -11
  49. package/runtime/python/okstra_ctl/ports/verification_inputs.py +17 -0
  50. package/runtime/python/okstra_ctl/prior_planning.py +6 -17
  51. package/runtime/python/okstra_ctl/prior_run_summary.py +35 -0
  52. package/runtime/python/okstra_ctl/qa_commands.py +66 -1
  53. package/runtime/python/okstra_ctl/qa_commands_cli.py +67 -0
  54. package/runtime/python/okstra_ctl/qa_procedures.py +235 -0
  55. package/runtime/python/okstra_ctl/registry/verification_inputs_store.py +8 -0
  56. package/runtime/python/okstra_ctl/render.py +10 -0
  57. package/runtime/python/okstra_ctl/report_assembly.py +12 -12
  58. package/runtime/python/okstra_ctl/run.py +108 -5
  59. package/runtime/python/okstra_ctl/verification_input_ref.py +80 -0
  60. package/runtime/python/okstra_ctl/verification_input_types.py +32 -0
  61. package/runtime/python/okstra_ctl/verification_inputs.py +162 -0
  62. package/runtime/python/okstra_ctl/verification_plan.py +116 -0
  63. package/runtime/python/okstra_ctl/worker_prompt_body.py +12 -6
  64. package/runtime/python/okstra_ctl/worker_prompt_contract.py +5 -1
  65. package/runtime/python/okstra_ctl/worker_prompt_headers.py +50 -1
  66. package/runtime/python/okstra_project/dirs.py +22 -0
  67. package/runtime/python/okstra_project/resolver.py +10 -0
  68. package/runtime/schemas/final-report-v3.0.schema.json +5 -1
  69. package/runtime/skills/okstra-brief-gen/SKILL.md +10 -4
  70. package/runtime/skills/okstra-code-review/SKILL.md +39 -45
  71. package/runtime/skills/okstra-code-review/references/census-rules.md +14 -2
  72. package/runtime/skills/okstra-code-review/references/review-calibration.md +31 -8
  73. package/runtime/skills/okstra-manager/SKILL.md +2 -2
  74. package/runtime/skills/okstra-setup/SKILL.md +2 -0
  75. package/runtime/skills/okstra-setup/references/project-config.md +2 -0
  76. package/runtime/validators/validate-brief.py +21 -5
@@ -58,7 +58,8 @@ Checks performed per brief file:
58
58
  the analysis packet. `okstra brief-sources attach` appends the missing
59
59
  entries in place. The project root is the parent of a `--briefs-root`
60
60
  of the form `<root>/.okstra/briefs`; for any other briefs root, or
61
- outside a git checkout, the check is skipped. The codebase-scan variant
61
+ outside a git checkout, the check is skipped; a git failure inside a
62
+ checkout fails the brief with git's message. The codebase-scan variant
62
63
  has no Source Material section and is not checked.
63
64
 
64
65
  Exit code 0 on PASS, 1 on FAIL.
@@ -85,7 +86,12 @@ from okstra_ctl.phases.improvement_discovery.lenses import (
85
86
  MIN_PRIORITY_LENSES,
86
87
  )
87
88
  from okstra_ctl.group_context import GROUP_CONTEXT_TYPE, validate_group_context
88
- from okstra_ctl.brief_sources import uncited_local_documents
89
+ from okstra_ctl.brief_sources import (
90
+ TOO_LARGE_REASON,
91
+ GitQueryError,
92
+ too_large_to_cite,
93
+ uncited_local_documents,
94
+ )
89
95
  from okstra_ctl.ids import slugify_task_segment
90
96
 
91
97
  REQUIRED_FRONTMATTER_KEYS = {
@@ -770,12 +776,22 @@ def check_cited_local_documents(
770
776
  ) -> None:
771
777
  if project_root is None or scope == "codebase":
772
778
  return
773
- for relative in uncited_local_documents(text, project_root):
774
- errors.append(
779
+ try:
780
+ uncited = uncited_local_documents(text, project_root)
781
+ except GitQueryError as exc:
782
+ errors.append(f"local document check could not run: {exc}")
783
+ return
784
+ for relative in uncited:
785
+ prefix = (
775
786
  f"local document {relative!r} is cited in the brief but has no "
776
787
  "`### Source N — file` entry in Source Material; it is untracked, "
777
788
  "so the task worktree lacks it and no run will show it to workers. "
778
- f"Run `okstra brief-sources attach --project-root {project_root} "
789
+ )
790
+ if too_large_to_cite(project_root.resolve(), relative):
791
+ errors.append(f"{prefix}It is {TOO_LARGE_REASON}")
792
+ continue
793
+ errors.append(
794
+ f"{prefix}Run `okstra brief-sources attach --project-root {project_root} "
779
795
  "--brief <this brief>` to append it by reference"
780
796
  )
781
797