okstra 0.49.0 → 0.51.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 (86) hide show
  1. package/README.kr.md +8 -7
  2. package/README.md +8 -7
  3. package/bin/okstra +2 -0
  4. package/docs/kr/architecture.md +23 -24
  5. package/docs/kr/cli.md +6 -6
  6. package/docs/project-structure-overview.md +13 -9
  7. package/docs/superpowers/plans/2026-06-05-wizard-batch-prompts.md +559 -0
  8. package/docs/superpowers/specs/2026-06-05-wizard-batch-prompts-design.md +121 -0
  9. package/docs/task-process/error-analysis.md +1 -1
  10. package/docs/task-process/final-verification.md +1 -1
  11. package/docs/task-process/release-handoff.md +1 -1
  12. package/docs/task-process/requirements-discovery.md +1 -1
  13. package/package.json +1 -1
  14. package/runtime/BUILD.json +2 -2
  15. package/runtime/agents/SKILL.md +18 -14
  16. package/runtime/agents/workers/claude-worker.md +4 -4
  17. package/runtime/agents/workers/codex-worker.md +3 -3
  18. package/runtime/agents/workers/gemini-worker.md +3 -3
  19. package/runtime/agents/workers/report-writer-worker.md +3 -3
  20. package/runtime/bin/lib/okstra/cli.sh +8 -1
  21. package/runtime/bin/lib/okstra/globals.sh +3 -0
  22. package/runtime/bin/lib/okstra/interactive.sh +14 -12
  23. package/runtime/bin/lib/okstra/usage.sh +6 -0
  24. package/runtime/bin/okstra-render-report-views.py +1 -1
  25. package/runtime/bin/okstra-team-reconcile.sh +28 -0
  26. package/runtime/bin/okstra.sh +2 -0
  27. package/runtime/prompts/launch.template.md +4 -2
  28. package/runtime/prompts/profiles/_common-contract.md +15 -15
  29. package/runtime/prompts/profiles/_implementation-deliverable.md +1 -1
  30. package/runtime/prompts/profiles/_implementation-executor.md +3 -3
  31. package/runtime/prompts/profiles/_implementation-verifier.md +2 -2
  32. package/runtime/prompts/profiles/error-analysis.md +1 -1
  33. package/runtime/prompts/profiles/final-verification.md +2 -2
  34. package/runtime/prompts/profiles/implementation-planning.md +10 -9
  35. package/runtime/prompts/profiles/implementation.md +1 -1
  36. package/runtime/prompts/profiles/improvement-discovery.md +5 -5
  37. package/runtime/prompts/profiles/release-handoff.md +2 -2
  38. package/runtime/prompts/profiles/requirements-discovery.md +2 -2
  39. package/runtime/python/okstra_ctl/analysis_packet.py +259 -0
  40. package/runtime/python/okstra_ctl/clarification_items.py +11 -11
  41. package/runtime/python/okstra_ctl/context_cost.py +308 -0
  42. package/runtime/python/okstra_ctl/migrate.py +2 -12
  43. package/runtime/python/okstra_ctl/paths.py +22 -0
  44. package/runtime/python/okstra_ctl/render.py +285 -126
  45. package/runtime/python/okstra_ctl/render_final_report.py +32 -1
  46. package/runtime/python/okstra_ctl/report_views.py +12 -12
  47. package/runtime/python/okstra_ctl/run.py +510 -248
  48. package/runtime/python/okstra_ctl/sequence.py +2 -5
  49. package/runtime/python/okstra_ctl/team_reconcile.py +131 -0
  50. package/runtime/python/okstra_ctl/wizard.py +219 -136
  51. package/runtime/python/okstra_ctl/workflow.py +1 -1
  52. package/runtime/python/okstra_ctl/worktree.py +13 -5
  53. package/runtime/schemas/final-report-v1.0.schema.json +4 -0
  54. package/runtime/skills/okstra-brief/SKILL.md +1 -1
  55. package/runtime/skills/okstra-coding-preflight/SKILL.md +69 -0
  56. package/runtime/skills/okstra-coding-preflight/architecture/hexagonal.md +116 -0
  57. package/runtime/skills/okstra-coding-preflight/clean-code.md +254 -0
  58. package/runtime/skills/okstra-coding-preflight/languages/java.md +64 -0
  59. package/runtime/skills/okstra-coding-preflight/languages/javascript-typescript.md +87 -0
  60. package/runtime/skills/okstra-coding-preflight/languages/kotlin.md +69 -0
  61. package/runtime/skills/okstra-coding-preflight/languages/nodejs.md +66 -0
  62. package/runtime/skills/okstra-coding-preflight/languages/python.md +179 -0
  63. package/runtime/skills/okstra-coding-preflight/languages/rust.md +105 -0
  64. package/runtime/skills/okstra-coding-preflight/languages/sql.md +68 -0
  65. package/runtime/skills/okstra-context-loader/SKILL.md +12 -6
  66. package/runtime/skills/okstra-convergence/SKILL.md +8 -8
  67. package/runtime/skills/okstra-inspect/SKILL.md +100 -1
  68. package/runtime/skills/okstra-report-writer/SKILL.md +27 -23
  69. package/runtime/skills/okstra-run/SKILL.md +3 -1
  70. package/runtime/skills/okstra-team-contract/SKILL.md +8 -5
  71. package/runtime/templates/reports/final-report.template.md +188 -187
  72. package/runtime/templates/reports/i18n/en.json +4 -4
  73. package/runtime/templates/reports/i18n/ko.json +4 -4
  74. package/runtime/templates/reports/implementation-planning-input.template.md +1 -1
  75. package/runtime/templates/reports/release-handoff-input.template.md +1 -1
  76. package/runtime/templates/reports/user-response.template.md +1 -1
  77. package/runtime/templates/worker-prompt-preamble.md +4 -4
  78. package/runtime/validators/lib/fixtures.sh +2 -2
  79. package/runtime/validators/validate-implementation-plan-stages.py +9 -9
  80. package/runtime/validators/validate-report-views.py +10 -10
  81. package/runtime/validators/validate-run.py +36 -36
  82. package/runtime/validators/validate_improvement_report.py +8 -8
  83. package/src/_python-helper.mjs +3 -3
  84. package/src/context-cost.mjs +27 -0
  85. package/src/install.mjs +1 -0
  86. package/src/uninstall.mjs +1 -0
@@ -3,9 +3,9 @@
3
3
  Single product, single source of truth:
4
4
 
5
5
  * ``render_html(src_md, *, run_meta)`` — deterministic self-contained
6
- HTML renderer for human readers. Sections §567 user-actionable
7
- rows (those reachable from §5 ``C-*`` IDs) get embedded ``<form>``
8
- controls. §4.6 / §4.7 / §4.8 deliverable sub-sections are explicitly
6
+ HTML renderer for human readers. Sections §134 user-actionable
7
+ rows (those reachable from §1 ``C-*`` IDs) get embedded ``<form>``
8
+ controls. §5.6 / §5.7 / §5.8 deliverable sub-sections are explicitly
9
9
  excluded from form attachment — they are read-only deliverables.
10
10
 
11
11
  User responses are NEVER merged back into the original report. The HTML
@@ -57,7 +57,7 @@ def _strip_leading_frontmatter(text: str) -> str:
57
57
 
58
58
  from .clarification_items import (
59
59
  _is_separator_row,
60
- _section_5_slice,
60
+ _section_1_slice,
61
61
  _split_pipe_row,
62
62
  parse_clarification_items,
63
63
  )
@@ -79,7 +79,7 @@ _LINK_PATTERN = re.compile(r"\[([^\]]+)\]\(([^)]+)\)")
79
79
 
80
80
  # Sections whose Response-ID-bearing rows must NOT get form attachment
81
81
  # (read-only deliverables — see plan §1.4).
82
- _NO_FORM_SECTION_PREFIXES = ("## 4.6", "### 4.6", "## 4.7", "### 4.7", "## 4.8", "### 4.8")
82
+ _NO_FORM_SECTION_PREFIXES = ("## 5.6", "### 5.6", "## 5.7", "### 5.7", "## 5.8", "### 5.8")
83
83
 
84
84
 
85
85
  @dataclass(frozen=True)
@@ -161,7 +161,7 @@ def _markdown_to_html(
161
161
  headings: list[tuple[int, str, str]] = []
162
162
  i = 0
163
163
  n = len(lines)
164
- current_section_path: list[str] = [] # ['## 5. ...', '### 5.1 ...'] etc.
164
+ current_section_path: list[str] = [] # ['## 1. ...', '### 1.1 ...'] etc.
165
165
 
166
166
  while i < n:
167
167
  line = lines[i]
@@ -394,7 +394,7 @@ class _GroupedSpec:
394
394
  value`` metadata cell led by ``headline_col``; the long columns
395
395
  (``wide_cols``) each keep their own min-width column.
396
396
 
397
- ``kind == "clarification"`` additionally re-attaches the §5 form
397
+ ``kind == "clarification"`` additionally re-attaches the §1 form
398
398
  widget to the ``user_input_col`` cell and the ``data-*`` row attrs."""
399
399
  headline_col: int
400
400
  group_cols: tuple[int, ...]
@@ -410,7 +410,7 @@ class _GroupedSpec:
410
410
  def _grouped_table_spec(
411
411
  header_cells: list[str], section_path: list[str]
412
412
  ) -> Optional[_GroupedSpec]:
413
- """Only §5 Clarification Items is grouped in the HTML view (it keeps the
413
+ """Only §1 Clarification Items is grouped in the HTML view (it keeps the
414
414
  interactive form and stays flat in the .md). All other narrative tables are
415
415
  already rendered compactly by the template, so no grouping is applied here."""
416
416
  norm = [h.strip() for h in header_cells]
@@ -420,7 +420,7 @@ def _grouped_table_spec(
420
420
  group = tuple(c for c in range(len(norm)) if c != headline and c not in wide_set)
421
421
  return _GroupedSpec(headline_col=headline, group_cols=group, wide_cols=wide, **kw)
422
422
 
423
- # §5 Clarification Items — keep the interactive form, and widen the three
423
+ # §1 Clarification Items — keep the interactive form, and widen the three
424
424
  # long-prose columns (Expected form is prose too, not a code column).
425
425
  if (
426
426
  any("Clarification Items" in h for h in section_path)
@@ -474,7 +474,7 @@ def _grouped_meta_cell(
474
474
  def _grouped_clarification_row(
475
475
  row: list[str], spec: _GroupedSpec
476
476
  ) -> tuple[str, str]:
477
- """Return ``(tr_attrs, wide_cells_html)`` for one §5 row, re-attaching
477
+ """Return ``(tr_attrs, wide_cells_html)`` for one §1 row, re-attaching
478
478
  the form widget + ``data-*`` attrs to ``C-\\d+`` rows exactly as the
479
479
  non-grouped path does."""
480
480
  rid = row[spec.id_col] if 0 <= spec.id_col < len(row) else ""
@@ -822,7 +822,7 @@ def serialize_user_response(
822
822
  # --------------------------------------------------------------------------- #
823
823
 
824
824
  def report_has_clarification_items(src_md: str) -> bool:
825
- """True when the final-report MD has at least one §5 ``C-*``
825
+ """True when the final-report MD has at least one §1``C-*``
826
826
  clarification row. This is the single predicate that gates HTML-view
827
827
  generation: the self-contained html's only value over the markdown is
828
828
  the embedded ``<form>`` widgets for those rows, so a clarification-free
@@ -844,7 +844,7 @@ def render_html_view(
844
844
  ) -> Path | None:
845
845
  """Write ``<stem>.html`` next to ``src_md_path`` and return its path,
846
846
  or return ``None`` when generation is skipped because the report has
847
- no §5 clarification rows (see ``report_has_clarification_items``).
847
+ no §1 clarification rows (see ``report_has_clarification_items``).
848
848
  Idempotent — overwrites an existing html sibling, and removes a stale
849
849
  one when a previously-clarification-bearing report no longer has rows."""
850
850
  src_text = src_md_path.read_text(encoding="utf-8")