okstra 0.185.0 → 0.186.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 (41) hide show
  1. package/README.md +1 -0
  2. package/dist/commands/chat/chat.mjs +62 -15
  3. package/dist/commands/chat/chat.mjs.map +1 -1
  4. package/docs/architecture.md +1 -1
  5. package/docs/cli.md +2 -2
  6. package/docs/for-ai/skills/okstra-chat.md +7 -1
  7. package/docs/project-structure-overview.md +1 -1
  8. package/package.json +1 -1
  9. package/runtime/BUILD.json +2 -2
  10. package/runtime/prompts/lead/okstra-lead-contract.md +1 -1
  11. package/runtime/prompts/lead/plan-body-verification.md +8 -7
  12. package/runtime/prompts/profiles/implementation-planning.md +3 -3
  13. package/runtime/python/okstra_ctl/cmux.py +63 -35
  14. package/runtime/python/okstra_ctl/incremental_carry.py +149 -5
  15. package/runtime/python/okstra_ctl/incremental_scope.py +25 -3
  16. package/runtime/python/okstra_ctl/plan_items.py +40 -4
  17. package/runtime/python/okstra_ctl/report_html/common.py +86 -11
  18. package/runtime/python/okstra_ctl/report_html/filters.py +27 -10
  19. package/runtime/python/okstra_ctl/report_html/render.py +1 -0
  20. package/runtime/python/okstra_ctl/report_html/report_index.py +5 -1
  21. package/runtime/python/okstra_ctl/report_html/view_models/implementation_planning.py +1 -1
  22. package/runtime/skills/okstra-chat/SKILL.md +25 -13
  23. package/runtime/templates/reports/html/assets/base.css +48 -3
  24. package/runtime/templates/reports/html/base.template.html +7 -4
  25. package/runtime/templates/reports/html/i18n/en.json +86 -8
  26. package/runtime/templates/reports/html/i18n/ko.json +86 -8
  27. package/runtime/templates/reports/html/macros/forms.html +74 -55
  28. package/runtime/templates/reports/html/macros/layout.html +2 -2
  29. package/runtime/templates/reports/html/macros/visualizations.html +1 -1
  30. package/runtime/templates/reports/html/tasks/change-impact-analysis.template.html +2 -2
  31. package/runtime/templates/reports/html/tasks/error-analysis.template.html +3 -3
  32. package/runtime/templates/reports/html/tasks/feature-analysis.template.html +4 -4
  33. package/runtime/templates/reports/html/tasks/final-verification.template.html +3 -3
  34. package/runtime/templates/reports/html/tasks/implementation-option-selection.template.html +9 -9
  35. package/runtime/templates/reports/html/tasks/implementation-planning.template.html +20 -18
  36. package/runtime/templates/reports/html/tasks/implementation.template.html +3 -3
  37. package/runtime/templates/reports/html/tasks/improvement-discovery.template.html +3 -3
  38. package/runtime/templates/reports/html/tasks/project-analysis.template.html +10 -10
  39. package/runtime/templates/reports/html/tasks/release-handoff.template.html +2 -2
  40. package/runtime/templates/reports/html/tasks/requirements-discovery.template.html +4 -4
  41. package/runtime/validators/validate-run.py +19 -19
@@ -4178,10 +4178,11 @@ def _stage_scope_bucket(item: dict, pbv: dict) -> str:
4178
4178
 
4179
4179
  Returns `in-scope` (may block), `observed` (only frozen stages), or
4180
4180
  `deferred` (only stages not yet startable). Anything unresolvable is
4181
- `in-scope`: an absent ledger is no basis to narrow, and an item with no
4182
- `stageScope` belongs to the plan as a whole — `P-Opt-*` and `P-Var-*` live
4183
- there permanently, and scoping them out would stop an unrequested-work
4184
- verdict from blocking a start.
4181
+ `in-scope`: an absent ledger is no basis to narrow. Plan-wide items
4182
+ (`P-Opt-*`, `P-Var-*`, `P-Dep-*`, `P-Dir-1`) with no `stageScope` stay
4183
+ in-scope. An unscoped `P-Val-*` / `P-Req-*` / `P-Rb-*` stays in-scope only
4184
+ until a stage is `done`; after that it is `deferred` so a re-plan does not
4185
+ re-score the whole checklist.
4185
4186
 
4186
4187
  디스패치 큐와 같은 함수를 쓴다. 검증기가 다른 통을 내면 워커가 안 본
4187
4188
  항목이 승인을 막거나, 본 항목이 게이트에서 빠진다.
@@ -6161,12 +6162,13 @@ def _validate_approval_clarification_backtrace(
6161
6162
  f"final-report data.json: clarification `{row_id}` blocks approval "
6162
6163
  "and is linked, but the link resolves to no stage. `incremental-"
6163
6164
  "scope` reads the stage from a `P-Step-<stage>.<step>` / `P-Prep-"
6164
- "S<stage>-<kind>` plan-item id, or from a `Stage N` citation in the "
6165
- f"blocked coverage row's `coveredBy`. A `P-Req-*` / `P-Val-*` id "
6166
- "carries no stage number, so a row linked only that way must cite "
6167
- "the stage in `coveredBy`. A blocker whose blast radius resolves to "
6168
- "no stage cannot auto-narrow the next re-run; this report fails "
6169
- "rather than forcing a full re-run."
6165
+ "S<stage>-<kind>` plan-item id, from `stageScope` / `stageRefs` on "
6166
+ "the linked plan item or coverage row, or from a `Stage N` citation "
6167
+ f"in the blocked coverage row's `coveredBy`. A `P-Req-*` / `P-Val-*` "
6168
+ "id carries no stage number, so a row linked only that way must "
6169
+ "carry `stageRefs` or cite the stage in `coveredBy`. A blocker "
6170
+ "whose blast radius resolves to no stage cannot auto-narrow the "
6171
+ "next re-run; this report fails rather than forcing a full re-run."
6170
6172
  )
6171
6173
 
6172
6174
 
@@ -8238,11 +8240,11 @@ def _validate_plan_body_clarification_matching(
8238
8240
  failures: list[str],
8239
8241
  accepted_item_ids: set[str] | None = None,
8240
8242
  ) -> None:
8241
- """H5 — every plan item that the recorded verdicts make `majority-disagree`
8242
- must point (via `clarificationId`) at an existing `blocks: approval`
8243
- clarification row. Closes the hole where a majority-disagree item blocks the
8244
- gate but no §1 Clarification row is raised, so the user never sees why
8245
- approval is withheld (implementation-planning.md self-review step 7).
8243
+ """H5 — every plan item whose *gate class after stage scope* is
8244
+ `majority-disagree` must point at an existing `blocks: approval`
8245
+ clarification row. Observed / deferred / record items stay in `setAside`
8246
+ and must not become a new C row — that is what grew the clarification
8247
+ list while the next stage was already executable.
8246
8248
  """
8247
8249
  ip = data.get("implementationPlanning")
8248
8250
  if not isinstance(ip, dict):
@@ -8264,9 +8266,7 @@ def _validate_plan_body_clarification_matching(
8264
8266
  for item in pbv.get("planItems") or []:
8265
8267
  if not isinstance(item, dict):
8266
8268
  continue
8267
- if _classify_plan_item_gate(item) != "majority-disagree":
8268
- continue
8269
- if _is_dissent_downgraded(item, pbv, accepted):
8269
+ if _plan_item_gate_class(item, pbv, accepted) != "majority-disagree":
8270
8270
  continue
8271
8271
  item_id = item.get("id") or "<unknown>"
8272
8272
  cids = _plan_item_clarification_ids(item)
@@ -8319,7 +8319,7 @@ def _validate_self_fix_before_clarification(data: dict, failures: list[str]) ->
8319
8319
  for item in pbv.get("planItems") or []:
8320
8320
  if not isinstance(item, dict):
8321
8321
  continue
8322
- if _classify_plan_item_gate(item) != "majority-disagree":
8322
+ if _plan_item_gate_class(item, pbv, set()) != "majority-disagree":
8323
8323
  continue
8324
8324
  if _has_planner_fixable_majority(item):
8325
8325
  allowed = " / ".join(sorted(_SELF_FIX_EXHAUSTED_REASONS))