okstra 0.143.0 → 0.145.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 (46) hide show
  1. package/README.md +4 -1
  2. package/docs/architecture.md +18 -2
  3. package/docs/cli.md +39 -2
  4. package/docs/project-structure-overview.md +19 -6
  5. package/package.json +1 -1
  6. package/runtime/BUILD.json +2 -2
  7. package/runtime/prompts/coding-preflight/overview.md +1 -1
  8. package/runtime/prompts/lead/convergence.md +11 -3
  9. package/runtime/prompts/lead/okstra-lead-contract.md +7 -1
  10. package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
  11. package/runtime/prompts/profiles/_common-contract.md +1 -1
  12. package/runtime/prompts/profiles/_implementation-verifier.md +48 -2
  13. package/runtime/prompts/profiles/change-impact-analysis.md +24 -0
  14. package/runtime/prompts/profiles/feature-analysis.md +24 -0
  15. package/runtime/prompts/profiles/forbidden-actions.json +18 -0
  16. package/runtime/prompts/profiles/project-analysis.md +24 -0
  17. package/runtime/prompts/wizard/prompts.ko.json +44 -1
  18. package/runtime/python/okstra_ctl/analysis_inputs.py +369 -0
  19. package/runtime/python/okstra_ctl/clarification_items.py +74 -1
  20. package/runtime/python/okstra_ctl/mutation_probe.py +1263 -0
  21. package/runtime/python/okstra_ctl/render.py +77 -4
  22. package/runtime/python/okstra_ctl/render_final_report.py +13 -4
  23. package/runtime/python/okstra_ctl/report_views.py +134 -3
  24. package/runtime/python/okstra_ctl/run.py +118 -0
  25. package/runtime/python/okstra_ctl/run_context.py +34 -2
  26. package/runtime/python/okstra_ctl/schema_excerpt.py +12 -4
  27. package/runtime/python/okstra_ctl/self_mock_signals.py +183 -0
  28. package/runtime/python/okstra_ctl/user_response.py +309 -3
  29. package/runtime/python/okstra_ctl/wizard.py +545 -32
  30. package/runtime/python/okstra_ctl/worker_prompt_policy.py +3 -0
  31. package/runtime/python/okstra_ctl/workflow.py +22 -0
  32. package/runtime/schemas/final-report-v1.0.schema.json +849 -3
  33. package/runtime/skills/okstra-run/SKILL.md +13 -1
  34. package/runtime/templates/reports/change-impact-analysis-input.template.md +58 -0
  35. package/runtime/templates/reports/feature-analysis-input.template.md +59 -0
  36. package/runtime/templates/reports/final-report.template.md +220 -0
  37. package/runtime/templates/reports/i18n/en.json +8 -0
  38. package/runtime/templates/reports/i18n/ko.json +8 -0
  39. package/runtime/templates/reports/project-analysis-input.template.md +58 -0
  40. package/runtime/templates/reports/report.js +84 -5
  41. package/runtime/templates/reports/user-response.template.md +19 -1
  42. package/runtime/validators/detect_self_mock.py +220 -0
  43. package/runtime/validators/validate-report-views.py +61 -7
  44. package/runtime/validators/validate-run.py +518 -0
  45. package/runtime/validators/validate_analysis_report.py +864 -0
  46. package/src/commands/execute/render-bundle.mjs +3 -0
@@ -4,6 +4,8 @@ from __future__ import annotations
4
4
  from dataclasses import dataclass
5
5
  from typing import Any, Literal, Mapping
6
6
 
7
+ from .analysis_inputs import ANALYSIS_TASK_TYPES
8
+
7
9
 
8
10
  PromptAudience = Literal[
9
11
  "analysis",
@@ -41,6 +43,7 @@ SUPPORTED_TASK_TYPES = frozenset({
41
43
  "implementation",
42
44
  "final-verification",
43
45
  "release-handoff",
46
+ *ANALYSIS_TASK_TYPES,
44
47
  })
45
48
  WORKER_PREAMBLE_FILENAME_BY_AUDIENCE = {
46
49
  "analysis": "worker-prompt-preamble.md",
@@ -12,6 +12,8 @@ from __future__ import annotations
12
12
  import json
13
13
  from pathlib import Path
14
14
 
15
+ from okstra_ctl.analysis_inputs import ANALYSIS_TASK_TYPES
16
+
15
17
  PHASE_SEQUENCE = [
16
18
  "requirements-discovery",
17
19
  "error-analysis",
@@ -24,6 +26,7 @@ PHASE_SEQUENCE = [
24
26
  DEFAULT_NEXT_PHASE = {
25
27
  "requirements-discovery": "pending-routing-decision",
26
28
  "improvement-discovery": "pending-routing-decision",
29
+ **{task_type: "pending-routing-decision" for task_type in ANALYSIS_TASK_TYPES},
27
30
  "error-analysis": "implementation-planning",
28
31
  "implementation-planning": "implementation",
29
32
  "implementation": "final-verification",
@@ -56,6 +59,25 @@ PHASE_RULES: dict[str, dict[str, str]] = {
56
59
  " - Phase 5.5 consensus classification (full / partial / contested / worker-unique)"
57
60
  ),
58
61
  },
62
+ "project-analysis": {
63
+ "allowed": (
64
+ " - components, dependency directions, entry points, repositories, and external integrations\n"
65
+ " - shallow feature index and scan scope\n"
66
+ ),
67
+ },
68
+ "feature-analysis": {
69
+ "allowed": (
70
+ " - confirmed target and normal, alternate, and failure flows\n"
71
+ " - rules, state transitions, external calls, and test coverage scope\n"
72
+ ),
73
+ },
74
+ "change-impact-analysis": {
75
+ "allowed": (
76
+ " - preserved behavior, impacted items, and dependency propagation\n"
77
+ " - test and operational impact\n"
78
+ " - constraints and open decisions passed to implementation-planning\n"
79
+ ),
80
+ },
59
81
  "error-analysis": {
60
82
  "allowed": (
61
83
  " - symptom and trigger evidence\n"