okstra 0.205.1 → 0.206.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.
- package/README.md +2 -2
- package/dist/commands/lifecycle/install.mjs +2 -1
- package/dist/commands/lifecycle/install.mjs.map +1 -1
- package/docs/architecture.md +16 -16
- package/docs/cli.md +4 -4
- package/docs/contributor-change-matrix.md +3 -2
- package/docs/performance-improvement-plan-v2.md +1 -1
- package/docs/project-structure-overview.md +45 -21
- package/package.json +2 -3
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/okstra-spawn-followups.py +2 -2
- package/runtime/prompts/launch.template.md +1 -1
- package/runtime/prompts/lead/context-loader.md +1 -1
- package/runtime/prompts/lead/convergence.md +3 -3
- package/runtime/prompts/lead/okstra-lead-contract.md +14 -55
- package/runtime/prompts/lead/phase-routing.md +82 -0
- package/runtime/prompts/lead/report-writer.md +2 -2
- package/runtime/prompts/lead/team-contract.md +1 -1
- package/runtime/prompts/profiles/_coding-conventions-preflight.md +1 -1
- package/runtime/prompts/profiles/_common-contract.md +1 -1
- package/runtime/prompts/profiles/_coverage-critic.md +1 -1
- package/runtime/prompts/profiles/forbidden-actions.json +0 -94
- package/runtime/python/okstra_ctl/agent/prompt_cli/corrections.py +1 -1
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +10 -1
- package/runtime/python/okstra_ctl/analysis_inputs.py +0 -39
- package/runtime/python/okstra_ctl/analysis_scope.py +31 -0
- package/runtime/python/okstra_ctl/asset_roots.py +19 -0
- package/runtime/python/okstra_ctl/consumers.py +12 -0
- package/runtime/python/okstra_ctl/contract_graph.py +75 -10
- package/runtime/python/okstra_ctl/dispatch_state.py +22 -0
- package/runtime/python/okstra_ctl/doctor.py +15 -4
- package/runtime/python/okstra_ctl/execution_mutation_audit.py +27 -1
- package/runtime/python/okstra_ctl/handoff.py +11 -466
- package/runtime/python/okstra_ctl/handoff_error.py +5 -0
- package/runtime/python/okstra_ctl/implementation_direction.py +9 -485
- package/runtime/python/okstra_ctl/initial_prompt_materialization.py +8 -1
- package/runtime/python/okstra_ctl/next_phase.py +2 -2
- package/runtime/python/okstra_ctl/option_comparison.py +3 -165
- package/runtime/python/okstra_ctl/option_votes.py +3 -191
- package/runtime/python/okstra_ctl/paths.py +22 -6
- package/runtime/python/okstra_ctl/phases/__init__.py +4 -0
- package/runtime/python/okstra_ctl/phases/catalog.py +260 -0
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/boundary.json +11 -0
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/entry.py +39 -0
- package/runtime/python/okstra_ctl/{report_html/view_models/change_impact_analysis.py → phases/change_impact_analysis/report.py} +3 -3
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/spec.md +26 -0
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/validation.py +23 -0
- package/runtime/python/okstra_ctl/phases/error_analysis/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/error_analysis/boundary.json +9 -0
- package/runtime/{prompts/profiles/error-analysis.md → python/okstra_ctl/phases/error_analysis/profile.md} +2 -2
- package/runtime/python/okstra_ctl/{report_html/view_models/error_analysis.py → phases/error_analysis/report.py} +9 -8
- package/runtime/{templates/reports → python/okstra_ctl/phases/error_analysis/report_assets}/error-analysis-input.template.md +1 -1
- package/{docs/task-process/error-analysis.md → runtime/python/okstra_ctl/phases/error_analysis/spec.md} +22 -7
- package/runtime/python/okstra_ctl/phases/error_analysis/validation.py +241 -0
- package/runtime/python/okstra_ctl/phases/feature_analysis/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/feature_analysis/boundary.json +8 -0
- package/runtime/python/okstra_ctl/phases/feature_analysis/entry.py +63 -0
- package/runtime/python/okstra_ctl/{report_html/view_models/feature_analysis.py → phases/feature_analysis/report.py} +12 -5
- package/runtime/python/okstra_ctl/phases/feature_analysis/spec.md +22 -0
- package/runtime/python/okstra_ctl/phases/feature_analysis/validation.py +27 -0
- package/runtime/python/okstra_ctl/phases/feature_analysis/wizard.py +95 -0
- package/runtime/python/okstra_ctl/phases/final_verification/__init__.py +4 -0
- package/runtime/python/okstra_ctl/phases/final_verification/boundary.json +8 -0
- package/runtime/python/okstra_ctl/phases/final_verification/entry.py +166 -0
- package/runtime/{prompts/profiles/final-verification.md → python/okstra_ctl/phases/final_verification/profile.md} +5 -5
- package/runtime/python/okstra_ctl/{report_html/view_models/final_verification.py → phases/final_verification/report.py} +12 -3
- package/runtime/{templates/reports → python/okstra_ctl/phases/final_verification/report_assets}/final-verification-input.template.md +1 -1
- package/{docs/task-process/final-verification.md → runtime/python/okstra_ctl/phases/final_verification/spec.md} +42 -25
- package/runtime/python/okstra_ctl/phases/final_verification/target.py +296 -0
- package/runtime/python/okstra_ctl/phases/final_verification/validation.py +190 -0
- package/runtime/python/okstra_ctl/phases/final_verification/wizard.py +38 -0
- package/runtime/python/okstra_ctl/phases/implementation/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/implementation/boundary.json +17 -0
- package/runtime/python/okstra_ctl/{implementation_stage.py → phases/implementation/entry.py} +22 -10
- package/runtime/{prompts/host-orchestration/implementation.md → python/okstra_ctl/phases/implementation/host-rules.md} +1 -1
- package/runtime/{prompts/profiles → python/okstra_ctl/phases/implementation/instructions}/_implementation-deliverable.md +1 -1
- package/runtime/{prompts/profiles → python/okstra_ctl/phases/implementation/instructions}/_implementation-executor.md +4 -3
- package/runtime/{prompts/profiles → python/okstra_ctl/phases/implementation/instructions}/_implementation-verifier.md +4 -4
- package/runtime/{prompts/profiles/implementation.md → python/okstra_ctl/phases/implementation/profile.md} +5 -5
- package/runtime/python/okstra_ctl/{report_html/view_models/implementation.py → phases/implementation/report.py} +3 -3
- package/runtime/{templates/reports → python/okstra_ctl/phases/implementation/report_assets}/implementation-input.template.md +1 -1
- package/{docs/task-process/implementation.md → runtime/python/okstra_ctl/phases/implementation/spec.md} +20 -8
- package/runtime/python/okstra_ctl/phases/implementation/validation.py +205 -0
- package/runtime/python/okstra_ctl/phases/implementation/wizard.py +39 -0
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/authoring.py +80 -0
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/boundary.json +10 -0
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/comparison.py +168 -0
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/entry.py +27 -0
- package/runtime/{prompts/profiles/implementation-option-selection.md → python/okstra_ctl/phases/implementation_option_selection/profile.md} +2 -2
- package/runtime/python/okstra_ctl/{report_html/view_models/implementation_option_selection.py → phases/implementation_option_selection/report.py} +2 -2
- package/{docs/task-process/implementation-option-selection.md → runtime/python/okstra_ctl/phases/implementation_option_selection/spec.md} +20 -7
- package/runtime/python/okstra_ctl/{implementation_options.py → phases/implementation_option_selection/validation.py} +3 -3
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/votes.py +194 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/authoring.py +2345 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/boundary.json +12 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/entry.py +161 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/guidance.py +178 -0
- package/runtime/{prompts/lead → python/okstra_ctl/phases/implementation_planning/instructions}/plan-body-verification.md +61 -51
- package/runtime/python/okstra_ctl/phases/implementation_planning/plan_body.py +3295 -0
- package/runtime/{prompts/profiles/implementation-planning.md → python/okstra_ctl/phases/implementation_planning/profile.md} +74 -25
- package/runtime/python/okstra_ctl/phases/implementation_planning/report.py +237 -0
- package/runtime/{templates/reports → python/okstra_ctl/phases/implementation_planning/report_assets}/implementation-planning-input.template.md +2 -2
- package/{docs/task-process/implementation-planning.md → runtime/python/okstra_ctl/phases/implementation_planning/spec.md} +30 -6
- package/runtime/python/okstra_ctl/phases/implementation_planning/validation.py +597 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/wizard.py +166 -0
- package/runtime/python/okstra_ctl/phases/improvement_discovery/boundary.json +12 -0
- package/runtime/python/okstra_ctl/{improvement_lenses.py → phases/improvement_discovery/lenses.py} +1 -6
- package/runtime/{prompts/profiles/improvement-discovery.md → python/okstra_ctl/phases/improvement_discovery/profile.md} +5 -5
- package/runtime/python/okstra_ctl/{report_html/view_models/improvement_discovery.py → phases/improvement_discovery/report.py} +3 -3
- package/runtime/{templates/reports → python/okstra_ctl/phases/improvement_discovery/report_assets}/improvement-discovery-input.template.md +1 -2
- package/runtime/python/okstra_ctl/phases/improvement_discovery/spec.md +29 -0
- package/runtime/{validators/validate_improvement_report.py → python/okstra_ctl/phases/improvement_discovery/validation.py} +5 -14
- package/runtime/python/okstra_ctl/phases/project_analysis/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/project_analysis/boundary.json +8 -0
- package/runtime/python/okstra_ctl/phases/project_analysis/entry.py +11 -0
- package/runtime/python/okstra_ctl/{report_html/view_models/project_analysis.py → phases/project_analysis/report.py} +3 -3
- package/runtime/python/okstra_ctl/phases/project_analysis/spec.md +33 -0
- package/runtime/python/okstra_ctl/phases/project_analysis/validation.py +55 -0
- package/runtime/python/okstra_ctl/phases/release_handoff/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/release_handoff/boundary.json +17 -0
- package/runtime/python/okstra_ctl/phases/release_handoff/entry.py +147 -0
- package/runtime/python/okstra_ctl/phases/release_handoff/operations.py +446 -0
- package/runtime/{prompts/profiles/release-handoff.md → python/okstra_ctl/phases/release_handoff/profile.md} +3 -3
- package/runtime/python/okstra_ctl/{report_html/view_models/release_handoff.py → phases/release_handoff/report.py} +3 -3
- package/runtime/{templates/reports → python/okstra_ctl/phases/release_handoff/report_assets}/release-handoff-input.template.md +1 -1
- package/{docs/task-process/release-handoff.md → runtime/python/okstra_ctl/phases/release_handoff/spec.md} +22 -9
- package/runtime/python/okstra_ctl/phases/release_handoff/wizard.py +84 -0
- package/runtime/python/okstra_ctl/phases/requirements_discovery/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/requirements_discovery/boundary.json +9 -0
- package/runtime/{prompts/profiles/requirements-discovery.md → python/okstra_ctl/phases/requirements_discovery/profile.md} +2 -3
- package/runtime/python/okstra_ctl/{report_html/view_models/requirements_discovery.py → phases/requirements_discovery/report.py} +3 -3
- package/{docs/task-process/requirements-discovery.md → runtime/python/okstra_ctl/phases/requirements_discovery/spec.md} +25 -6
- package/runtime/{validators/validate_fanout.py → python/okstra_ctl/phases/requirements_discovery/validation.py} +11 -12
- package/runtime/python/okstra_ctl/phases/technical_verification/__init__.py +1 -0
- package/runtime/python/okstra_ctl/phases/technical_verification/boundary.json +9 -0
- package/runtime/python/okstra_ctl/phases/technical_verification/entry.py +100 -0
- package/runtime/{prompts/profiles/technical-verification.md → python/okstra_ctl/phases/technical_verification/profile.md} +1 -1
- package/runtime/python/okstra_ctl/{report_html/view_models/technical_verification.py → phases/technical_verification/report.py} +2 -2
- package/runtime/python/okstra_ctl/phases/technical_verification/spec.md +37 -0
- package/runtime/python/okstra_ctl/phases/technical_verification/validation.py +90 -0
- package/runtime/python/okstra_ctl/plan_approval.py +70 -0
- package/runtime/python/okstra_ctl/plan_items_cli.py +2 -2130
- package/runtime/python/okstra_ctl/profile_show.py +9 -3
- package/runtime/python/okstra_ctl/render.py +9 -2
- package/runtime/python/okstra_ctl/render_final_report.py +3 -2
- package/runtime/python/okstra_ctl/report_assembly.py +14 -93
- package/runtime/python/okstra_ctl/report_html/context_links.py +1 -1
- package/runtime/python/okstra_ctl/report_html/render.py +3 -2
- package/runtime/python/okstra_ctl/report_html/router.py +9 -33
- package/runtime/python/okstra_ctl/report_projections.py +1 -36
- package/runtime/python/okstra_ctl/report_routing.py +23 -0
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +4 -73
- package/runtime/python/okstra_ctl/report_template_loader.py +35 -0
- package/runtime/python/okstra_ctl/report_validation_identity.py +38 -0
- package/runtime/python/okstra_ctl/report_views.py +18 -2
- package/runtime/python/okstra_ctl/run.py +113 -503
- package/runtime/python/okstra_ctl/stage_map.py +13 -0
- package/runtime/python/okstra_ctl/stage_targets.py +9 -286
- package/runtime/python/okstra_ctl/technical_verification_facts.py +52 -0
- package/runtime/python/okstra_ctl/user_response.py +199 -4
- package/runtime/python/okstra_ctl/verification_target.py +1 -1
- package/runtime/python/okstra_ctl/wizard/__init__.py +31 -31
- package/runtime/python/okstra_ctl/wizard/api.py +18 -0
- package/runtime/python/okstra_ctl/wizard/outcome.py +3 -12
- package/runtime/python/okstra_ctl/wizard/registry.py +20 -12
- package/runtime/python/okstra_ctl/wizard/state.py +6 -2
- package/runtime/python/okstra_ctl/wizard/steps_analysis.py +0 -97
- package/runtime/python/okstra_ctl/wizard/steps_plan.py +27 -278
- package/runtime/python/okstra_ctl/wizard/steps_roles.py +2 -1
- package/runtime/python/okstra_ctl/work_categories.py +1 -1
- package/runtime/python/okstra_ctl/worker_prompt_contract.py +36 -0
- package/runtime/python/okstra_ctl/workflow.py +26 -143
- package/runtime/skills/okstra-brief-gen/SKILL.md +3 -3
- package/runtime/skills/okstra-run/SKILL.md +1 -1
- package/runtime/skills/okstra-user-response/SKILL.md +23 -4
- package/runtime/templates/reports/quick-input.template.md +1 -1
- package/runtime/templates/reports/task-brief.template.md +1 -1
- package/runtime/validators/validate-brief.py +2 -2
- package/runtime/validators/validate-run.py +287 -4091
- package/runtime/validators/validate_analysis_report.py +14 -126
- package/docs/task-process/README.md +0 -82
- package/docs/task-process/common-flow.md +0 -173
- package/runtime/python/okstra_ctl/report_html/view_models/implementation_planning.py +0 -147
- package/runtime/python/okstra_ctl/technical_verification.py +0 -195
- /package/runtime/{prompts/profiles/change-impact-analysis.json → python/okstra_ctl/phases/change_impact_analysis/profile.json} +0 -0
- /package/runtime/{prompts/profiles/change-impact-analysis.md → python/okstra_ctl/phases/change_impact_analysis/profile.md} +0 -0
- /package/runtime/{templates/reports → python/okstra_ctl/phases/change_impact_analysis/report_assets}/change-impact-analysis-input.template.md +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/change_impact_analysis/report_assets}/change-impact-analysis.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/change_impact_analysis/report_assets}/change-impact-analysis.template.md +0 -0
- /package/runtime/{prompts/profiles/error-analysis.json → python/okstra_ctl/phases/error_analysis/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/error_analysis/report_assets}/error-analysis.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/error_analysis/report_assets}/error-analysis.template.md +0 -0
- /package/runtime/{prompts/profiles/feature-analysis.json → python/okstra_ctl/phases/feature_analysis/profile.json} +0 -0
- /package/runtime/{prompts/profiles/feature-analysis.md → python/okstra_ctl/phases/feature_analysis/profile.md} +0 -0
- /package/runtime/{templates/reports → python/okstra_ctl/phases/feature_analysis/report_assets}/feature-analysis-input.template.md +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/feature_analysis/report_assets}/feature-analysis.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/feature_analysis/report_assets}/feature-analysis.template.md +0 -0
- /package/runtime/{prompts/profiles/final-verification.json → python/okstra_ctl/phases/final_verification/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/final_verification/report_assets}/final-verification.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/final_verification/report_assets}/final-verification.template.md +0 -0
- /package/runtime/{prompts/profiles → python/okstra_ctl/phases/implementation/instructions}/_implementation-diff-review.md +0 -0
- /package/runtime/{prompts/profiles → python/okstra_ctl/phases/implementation/instructions}/_implementation-self-check.md +0 -0
- /package/runtime/{prompts/profiles/implementation.json → python/okstra_ctl/phases/implementation/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/implementation/report_assets}/implementation.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/implementation/report_assets}/implementation.template.md +0 -0
- /package/runtime/{prompts/profiles/implementation-option-selection.json → python/okstra_ctl/phases/implementation_option_selection/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/implementation_option_selection/report_assets}/implementation-option-selection.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/implementation_option_selection/report_assets}/implementation-option-selection.template.md +0 -0
- /package/runtime/{prompts/host-orchestration/implementation-planning.md → python/okstra_ctl/phases/implementation_planning/host-rules.md} +0 -0
- /package/runtime/{prompts/profiles/implementation-planning.json → python/okstra_ctl/phases/implementation_planning/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/implementation_planning/report_assets}/implementation-planning.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/implementation_planning/report_assets}/implementation-planning.template.md +0 -0
- /package/runtime/{prompts/profiles/improvement-discovery.json → python/okstra_ctl/phases/improvement_discovery/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/improvement_discovery/report_assets}/improvement-discovery.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/improvement_discovery/report_assets}/improvement-discovery.template.md +0 -0
- /package/runtime/{prompts/profiles/project-analysis.json → python/okstra_ctl/phases/project_analysis/profile.json} +0 -0
- /package/runtime/{prompts/profiles/project-analysis.md → python/okstra_ctl/phases/project_analysis/profile.md} +0 -0
- /package/runtime/{templates/reports → python/okstra_ctl/phases/project_analysis/report_assets}/project-analysis-input.template.md +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/project_analysis/report_assets}/project-analysis.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/project_analysis/report_assets}/project-analysis.template.md +0 -0
- /package/runtime/{prompts/profiles/release-handoff.json → python/okstra_ctl/phases/release_handoff/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/release_handoff/report_assets}/release-handoff.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/release_handoff/report_assets}/release-handoff.template.md +0 -0
- /package/runtime/python/okstra_ctl/{fanout.py → phases/requirements_discovery/fanout.py} +0 -0
- /package/runtime/{prompts/profiles/requirements-discovery.json → python/okstra_ctl/phases/requirements_discovery/profile.json} +0 -0
- /package/runtime/{templates/reports → python/okstra_ctl/phases/requirements_discovery/report_assets}/fan-out-unit.template.md +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/requirements_discovery/report_assets}/requirements-discovery.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/requirements_discovery/report_assets}/requirements-discovery.template.md +0 -0
- /package/runtime/{prompts/profiles/technical-verification.json → python/okstra_ctl/phases/technical_verification/profile.json} +0 -0
- /package/runtime/{templates/reports/html/tasks → python/okstra_ctl/phases/technical_verification/report_assets}/technical-verification.template.html +0 -0
- /package/runtime/{templates/reports/md/tasks → python/okstra_ctl/phases/technical_verification/report_assets}/technical-verification.template.md +0 -0
|
@@ -7,14 +7,13 @@ task/run status, render-only flag) 만 받아서 WORKFLOW_* 필드 dict 를 돌
|
|
|
7
7
|
`okstra_ctl.next_phase` 하나가 소유하고, 값은 리포트가 저작한 라우팅에서
|
|
8
8
|
투영된다.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
PHASE_FORBIDDEN_ACTIONS 는 `prompts/profiles/forbidden-actions.json` SSOT 에서 로드한다.
|
|
10
|
+
단계별 출력·금지 문구는 선택한 단계의 boundary.json 에서 읽는다.
|
|
12
11
|
"""
|
|
13
12
|
from __future__ import annotations
|
|
14
13
|
|
|
15
|
-
import json
|
|
16
14
|
from pathlib import Path
|
|
17
15
|
from .json_boundary import load_owned_object
|
|
16
|
+
from .phases.catalog import phase_boundary, phase_record, task_types
|
|
18
17
|
|
|
19
18
|
PHASE_SEQUENCE = [
|
|
20
19
|
"requirements-discovery",
|
|
@@ -35,125 +34,6 @@ ERROR_ANALYSIS_ROUTING_DIRECTIONS = {
|
|
|
35
34
|
"implementation-option-selection": "begin-option-selection",
|
|
36
35
|
}
|
|
37
36
|
|
|
38
|
-
# Phase 별 allowed outputs. bash heredoc 원문 그대로 옮긴 값 — 들여쓰기와 백틱은
|
|
39
|
-
# prompt template 에 그대로 박혀 lead 가 읽는다. forbidden actions 는 이 dict 가
|
|
40
|
-
# 아니라 prompts/profiles/forbidden-actions.json (load_phase_forbidden) 이 SSOT.
|
|
41
|
-
PHASE_RULES: dict[str, dict[str, str]] = {
|
|
42
|
-
"technical-verification": {
|
|
43
|
-
"allowed": (
|
|
44
|
-
" - falsifiable experiment plans for the frozen unresolved facts\n"
|
|
45
|
-
" - dependency installation, source experiments, tests and builds only in this run's experiment copies\n"
|
|
46
|
-
" - command logs, observed signals and per-fact supported/refuted/inconclusive/not-run results\n"
|
|
47
|
-
" - return to implementation-option-selection with evidence, without adoption or plan approval"
|
|
48
|
-
),
|
|
49
|
-
},
|
|
50
|
-
"requirements-discovery": {
|
|
51
|
-
"allowed": (
|
|
52
|
-
" - work-category classification (bugfix / feature / refactor / ops / improvement)\n"
|
|
53
|
-
" - routing decision as the `routing` object `{nextTaskType, readyWhen, rationale}`: `nextTaskType` is `error-analysis` or `implementation-option-selection` and nothing else — this phase never hands off directly to planning or implementation. Prose alone does not route the task — Phase 7 projects `workflow.nextRecommendedPhase` from `nextTaskType`\n"
|
|
54
|
-
" - missing-input list and clarification requests\n"
|
|
55
|
-
" - approval / confirmation checkpoints recorded for the next phase\n"
|
|
56
|
-
" - one endStateCoverage row per brief end-state id (this phase authors no goal of its own)"
|
|
57
|
-
),
|
|
58
|
-
},
|
|
59
|
-
"improvement-discovery": {
|
|
60
|
-
"allowed": (
|
|
61
|
-
" - improvement candidate discovery within the lens whitelist defined in `scripts/okstra_ctl/improvement_lenses.py`\n"
|
|
62
|
-
" - top-N ranking (default 8, brief `candidate-cap` overrides within 1..12)\n"
|
|
63
|
-
" - per-candidate columns Lens / Scope / Severity / Effort / Consensus / Source workers / Recommended next-phase / Expected behavior after / Evidence (path:line)\n"
|
|
64
|
-
" - Phase 1.5 reflect-back grilling log at `runs/improvement-discovery/<seq>/state/phase-1.5-grilling.md`\n"
|
|
65
|
-
" - Phase 5.5 consensus classification (full / partial / contested / worker-unique / unverified)"
|
|
66
|
-
),
|
|
67
|
-
},
|
|
68
|
-
"project-analysis": {
|
|
69
|
-
"allowed": (
|
|
70
|
-
" - components, dependency directions, entry points, repositories, and external integrations\n"
|
|
71
|
-
" - shallow feature index and scan scope\n"
|
|
72
|
-
),
|
|
73
|
-
},
|
|
74
|
-
"feature-analysis": {
|
|
75
|
-
"allowed": (
|
|
76
|
-
" - confirmed target and normal, alternate, and failure flows\n"
|
|
77
|
-
" - rules, state transitions, external calls, and test coverage scope\n"
|
|
78
|
-
),
|
|
79
|
-
},
|
|
80
|
-
"change-impact-analysis": {
|
|
81
|
-
"allowed": (
|
|
82
|
-
" - preserved behavior, impacted items, and dependency propagation\n"
|
|
83
|
-
" - test and operational impact\n"
|
|
84
|
-
" - constraints and open decisions passed to implementation-planning\n"
|
|
85
|
-
),
|
|
86
|
-
},
|
|
87
|
-
"error-analysis": {
|
|
88
|
-
"allowed": (
|
|
89
|
-
" - symptom and trigger evidence\n"
|
|
90
|
-
" - root-cause hypotheses with supporting citations\n"
|
|
91
|
-
" - reproduction gaps and missing observability\n"
|
|
92
|
-
" - validation paths to confirm or refute hypotheses\n"
|
|
93
|
-
" - one endStateCoverage row per brief end-state id (this phase authors no goal of its own)"
|
|
94
|
-
),
|
|
95
|
-
},
|
|
96
|
-
"implementation-option-selection": {
|
|
97
|
-
"allowed": (
|
|
98
|
-
" - candidate-comparison evidence for up to three options per worker\n"
|
|
99
|
-
" - preselected-validation of exactly ONE candidate: every analyser returns its own feasibility verdict on that one direction, `candidateAudit` stays empty, and no analyser generates an alternative. It is not a re-evaluation of the merged set — `okstra_ctl.implementation_options._validate_mode` rejects a preselected-validation report carrying more than one option or a non-empty audit\n"
|
|
100
|
-
" - a ranked display of at most three options with requirement mappings\n"
|
|
101
|
-
" - an audit record for every rejected candidate\n"
|
|
102
|
-
" - one endStateCoverage row per brief end-state id (this phase authors no goal of its own)"
|
|
103
|
-
),
|
|
104
|
-
},
|
|
105
|
-
"implementation-planning": {
|
|
106
|
-
"allowed": (
|
|
107
|
-
" - pre-planning context exploration notes (files/interfaces inspected, recent commits scanned, ambiguities flagged)\n"
|
|
108
|
-
" - selected-direction planning: realize the one validated selected direction without reopening candidate comparison, with a File Structure list (Create/Modify/Delete with one-line responsibility per file), affected interfaces, and blast-radius estimate\n"
|
|
109
|
-
" - legacy candidate-comparison planning only: at least two implementation option candidates, each with a File Structure list (Create/Modify/Delete with one-line responsibility per file), affected interfaces, and blast-radius estimate\n"
|
|
110
|
-
" - legacy candidate-comparison planning only: a trade-off matrix across options (complexity, risk, reversibility, test cost, rollout cost) and recommended option with rationale tied to isolation / single-responsibility / YAGNI principles\n"
|
|
111
|
-
" - bite-sized stepwise execution order for the selected direction or legacy recommended option (each step ~2-5 min, exact file paths and commands, TDD ordering when applicable, no placeholders)\n"
|
|
112
|
-
" - dependency / migration risk assessment, validation checklist (pre / mid / post with exact commands), rollback strategy with revert path and trigger signal\n"
|
|
113
|
-
" - every unresolved ambiguity registered as a `Blocks=approval` row in the `## 1. Clarification Items` table (do NOT create a separate `Open Questions` block under `5.5.x` — the unified table is the single home)\n"
|
|
114
|
-
" - report record `frontmatter.approved: false` awaiting `--approve` or the in-session wizard\n"
|
|
115
|
-
" - self-review confirmation (spec coverage, placeholder scan, internal consistency, ambiguity, scope)\n"
|
|
116
|
-
" - one endStateCoverage row per brief end-state id, each mapped to the R-NNN row that carries it"
|
|
117
|
-
),
|
|
118
|
-
},
|
|
119
|
-
"implementation": {
|
|
120
|
-
"allowed": (
|
|
121
|
-
" - approved-plan reference and quoted user-approval evidence\n"
|
|
122
|
-
" - commit list with SHA, message, and the plan step each commit satisfies\n"
|
|
123
|
-
" - `git diff --stat <base>..HEAD` summary plus per-file one-line change summary\n"
|
|
124
|
-
" - `Out-of-plan edits` block listing every file touched outside the approved plan with rationale (empty block preferred)\n"
|
|
125
|
-
' - validation evidence: actual stdout/stderr and exit code for every pre / mid / post command from the plan (no paraphrased "tests pass")\n'
|
|
126
|
-
" - TDD evidence for TDD-applicable steps: failing-test output before implementation commit and passing-test output after, with framing SHAs\n"
|
|
127
|
-
" - per-verifier sections for every verifier in the resolved roster, with an independent verdict (PASS / CONCERNS / FAIL) and cited diff snippets; dissent is preserved by the Okstra lead\n"
|
|
128
|
-
" - rollback verification (advisory, never blocks — record the revert path for a human; `result` is ok / not-applicable / advisory — human-run)\n"
|
|
129
|
-
" - routing recommendation as the `routingRecommendation` object `{target, rationale}`: `target` is one of `final-verification`, `error-analysis`, `implementation-planning`, `implementation`, and `rationale` is why that one and nothing else. Prose alone does not route the task — Phase 7 projects `workflow.nextRecommendedPhase` from `target`"
|
|
130
|
-
),
|
|
131
|
-
},
|
|
132
|
-
"final-verification": {
|
|
133
|
-
"allowed": (
|
|
134
|
-
" - acceptance verdict with requirement coverage assessment\n"
|
|
135
|
-
" - residual risk and regression notes\n"
|
|
136
|
-
" - routing recommendation as the `routingRecommendation` object `{target, rationale}`: `target` is one of `release-handoff`, `release-handoff(stage-group)`, `error-analysis`, `implementation-option-selection`, `implementation-planning`, `implementation`, `done`, and `rationale` ties that choice to the verdict and the blocker list. Both `release-handoff` forms require a release-ready verdict — `accepted`, or `conditional-accept` with every condition declaring `blocksReleaseHandoff: false` (`okstra_ctl.release_gate.release_handoff_allowed`); either verification scope may route there, because release-handoff opens one PR per stage. Prose alone does not route the task — Phase 7 projects `workflow.nextRecommendedPhase` from `target`"
|
|
137
|
-
),
|
|
138
|
-
},
|
|
139
|
-
"release-handoff": {
|
|
140
|
-
"allowed": (
|
|
141
|
-
" - entering this phase only when the cited final-verification report's verdict is release-ready — `Verdict Token` exactly `accepted`, or exactly `conditional-accept` with every Conditional Acceptance Condition row declaring `blocksReleaseHandoff: false` (`okstra_ctl.release_gate.release_handoff_allowed`)\n"
|
|
142
|
-
" - asking the user (via `AskUserQuestion` / interactive prompt) which delivery action to take: `local checkout`, `push + PR`, or `skip` (end the run)\n"
|
|
143
|
-
" - asking the user to pick a PR base branch from `staging` | `preprod` | `prod` | `main` | `dev` | a user-supplied branch name\n"
|
|
144
|
-
" - drafting PR title and PR body **inline as the Okstra lead** (no drafter worker and no delegated dispatch); the lead reviews its own draft with the user before any mutating git / gh command runs\n"
|
|
145
|
-
" - read-only git inspection: `git status`, `git diff`, `git log`, `git rev-parse`\n"
|
|
146
|
-
" - pushing the current feature branch to its origin remote via `git push -u origin <current-branch>` (the feature branch only — NEVER the base branch)\n"
|
|
147
|
-
" - creating a pull request via `gh pr create --base <chosen-base> --head <current-branch>`; if a PR with the same head already exists, surface its URL and skip creation\n"
|
|
148
|
-
" - the lead writes the final report directly (no `Report writer worker` dispatch); the report still conforms to the standard final-report template"
|
|
149
|
-
),
|
|
150
|
-
},
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
PHASE_RULES_UNKNOWN = {
|
|
154
|
-
"allowed": " - outputs defined by the active task type",
|
|
155
|
-
}
|
|
156
|
-
|
|
157
37
|
|
|
158
38
|
def render_forbidden(items: list[str]) -> str:
|
|
159
39
|
"""Render a forbidden-action list to the ` - item` bullet block injected
|
|
@@ -161,24 +41,30 @@ def render_forbidden(items: list[str]) -> str:
|
|
|
161
41
|
return "\n".join(f" - {item}" for item in items)
|
|
162
42
|
|
|
163
43
|
|
|
164
|
-
def
|
|
165
|
-
"""
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
`prompts/profiles/forbidden-actions.json`.
|
|
170
|
-
"""
|
|
171
|
-
path = Path(workspace_root) / "prompts" / "profiles" / "forbidden-actions.json"
|
|
172
|
-
data = load_owned_object(path, artifact="forbidden actions profile")
|
|
173
|
-
if "unknown" not in data:
|
|
174
|
-
# compute_workflow_state falls back to the "unknown" entry for any
|
|
175
|
-
# unmapped task_type; without it a missing/renamed key would surface as
|
|
176
|
-
# a KeyError deep in prompt assembly instead of here at the SSOT seam.
|
|
44
|
+
def load_phase_boundary(workspace_root: Path, task_type: str) -> dict[str, str]:
|
|
45
|
+
"""선택한 단계의 출력 경계를 읽고 구형 자산 루트의 금지 목록도 보존한다."""
|
|
46
|
+
fallback_path = Path(workspace_root) / "prompts" / "profiles" / "forbidden-actions.json"
|
|
47
|
+
fallback = load_owned_object(fallback_path, artifact="forbidden actions profile")
|
|
48
|
+
if "unknown" not in fallback:
|
|
177
49
|
raise ValueError(
|
|
178
|
-
f"forbidden-actions SSOT at {
|
|
50
|
+
f"forbidden-actions SSOT at {fallback_path} is missing the required "
|
|
179
51
|
"'unknown' fallback entry"
|
|
180
52
|
)
|
|
181
|
-
|
|
53
|
+
if task_type not in task_types():
|
|
54
|
+
return {
|
|
55
|
+
"allowed": " - outputs defined by the active task type",
|
|
56
|
+
"forbidden": render_forbidden(fallback.get(task_type, fallback["unknown"])),
|
|
57
|
+
}
|
|
58
|
+
path = phase_boundary(workspace_root, task_type)
|
|
59
|
+
if path is None:
|
|
60
|
+
# 패키지 없는 외부 프로필 루트는 기존 코드의 출력 정책과 자체 금지 목록을 쓴다.
|
|
61
|
+
path = Path(__file__).parent / "phases" / phase_record(task_type).package_name / "boundary.json"
|
|
62
|
+
data = load_owned_object(path, artifact="phase boundary")
|
|
63
|
+
items = fallback.get(task_type, fallback["unknown"])
|
|
64
|
+
else:
|
|
65
|
+
data = load_owned_object(path, artifact="phase boundary")
|
|
66
|
+
items = data["forbidden"]
|
|
67
|
+
return {"allowed": data["allowed"], "forbidden": render_forbidden(items)}
|
|
182
68
|
|
|
183
69
|
|
|
184
70
|
def phase_position(task_type: str) -> str:
|
|
@@ -203,7 +89,7 @@ def compute_workflow_state(
|
|
|
203
89
|
current_run_status: str,
|
|
204
90
|
current_task_status: str,
|
|
205
91
|
render_only: bool,
|
|
206
|
-
|
|
92
|
+
boundary: dict[str, str],
|
|
207
93
|
work_category: str = "",
|
|
208
94
|
) -> dict:
|
|
209
95
|
"""WORKFLOW_* + PHASE_* 값을 dict 로 돌려준다."""
|
|
@@ -234,7 +120,6 @@ def compute_workflow_state(
|
|
|
234
120
|
else:
|
|
235
121
|
checkpoint_label = "run-prepared"
|
|
236
122
|
|
|
237
|
-
rules = PHASE_RULES.get(task_type, PHASE_RULES_UNKNOWN)
|
|
238
123
|
last_completed = task_type if current_run_status == "completed" else ""
|
|
239
124
|
|
|
240
125
|
resolved_work_category = (work_category or "").strip() or "unknown"
|
|
@@ -256,8 +141,6 @@ def compute_workflow_state(
|
|
|
256
141
|
"WORKFLOW_LAST_COMPLETED_PHASE": last_completed,
|
|
257
142
|
"WORKFLOW_AWAITING_APPROVAL": "false",
|
|
258
143
|
"WORKFLOW_LAST_SAFE_CHECKPOINT_LABEL": checkpoint_label,
|
|
259
|
-
"PHASE_ALLOWED_OUTPUTS":
|
|
260
|
-
"PHASE_FORBIDDEN_ACTIONS":
|
|
261
|
-
task_type, forbidden_by_phase["unknown"]
|
|
262
|
-
),
|
|
144
|
+
"PHASE_ALLOWED_OUTPUTS": boundary["allowed"],
|
|
145
|
+
"PHASE_FORBIDDEN_ACTIONS": boundary["forbidden"],
|
|
263
146
|
}
|
|
@@ -345,7 +345,7 @@ If the user picked `Codebase scan`, gather the codebase-scan-specific inputs:
|
|
|
345
345
|
|
|
346
346
|
1. `AskUserQuestion` (free text):
|
|
347
347
|
`"Scan scope — comma-separated paths inside the project (e.g. src/foo/, src/bar/baz.py)"` → `scan_scope` (CSV).
|
|
348
|
-
2. `AskUserQuestion` (multi-select, options = the lens values from `~/.okstra/lib/python/okstra_ctl/
|
|
348
|
+
2. `AskUserQuestion` (multi-select, options = the lens values from `~/.okstra/lib/python/okstra_ctl/phases/improvement_discovery/lenses.py`'s `LENSES` — code source: `scripts/okstra_ctl/phases/improvement_discovery/lenses.py`):
|
|
349
349
|
`"Priority lenses (pick 1–4)"` → `priority_lenses` (1..4 values from the enum).
|
|
350
350
|
Current `LENSES` values (this list mirrors the module — if they diverge, the module wins; Step 6.6 `validate-brief` enforces the subset): `performance`, `security`, `readability`, `architecture`, `test-coverage`, `dx`, `observability`, `accessibility`.
|
|
351
351
|
3. `AskUserQuestion` (free text):
|
|
@@ -362,7 +362,7 @@ If the user picked `Codebase scan`, gather the codebase-scan-specific inputs:
|
|
|
362
362
|
Validation (before Step 4 sharpening):
|
|
363
363
|
|
|
364
364
|
- Confirm that each path in `scan_scope` actually exists inside `<PROJECT_ROOT>` via `ls` — if not, correct it with a single question.
|
|
365
|
-
- Confirm that `priority_lenses` is a subset (1–4) of `LENSES` in `~/.okstra/lib/python/okstra_ctl/
|
|
365
|
+
- Confirm that `priority_lenses` is a subset (1–4) of `LENSES` in `~/.okstra/lib/python/okstra_ctl/phases/improvement_discovery/lenses.py` — on violation, show the enum + re-select. Final enforcement is done by Step 6.6 `validate-brief` (`check_codebase_scope`).
|
|
366
366
|
- Confirm that `candidate_cap` is an integer in 1–12.
|
|
367
367
|
|
|
368
368
|
Once validation passes, jump to Step 2 (task key).
|
|
@@ -632,7 +632,7 @@ These 5 rules apply only to `scope: codebase` briefs. The budget expands from th
|
|
|
632
632
|
|
|
633
633
|
1. **scan-scope path existence check.** Confirm each path via `ls` / `Read`. If missing, correct it with a single question (offer the nearest path candidate as `Recommended:`).
|
|
634
634
|
2. **Ambiguous path narrowing.** Narrow abstract paths like `"backend"`, `"payment module"` down to one or more concrete directories. Guess codebase-first, then confirm with a single question.
|
|
635
|
-
3. **priority-lenses whitelist check.** Confirm it is a subset of `LENSES` in `~/.okstra/lib/python/okstra_ctl/
|
|
635
|
+
3. **priority-lenses whitelist check.** Confirm it is a subset of `LENSES` in `~/.okstra/lib/python/okstra_ctl/phases/improvement_discovery/lenses.py`. If out-of-enum, offer the nearest in-enum value as `Recommended:`.
|
|
636
636
|
4. **out-of-scope consistency.** Confirm each path in `out-of-scope` is a subset of `scan-scope`. If a path is unrelated, remove it with a single question or absorb it into scan-scope.
|
|
637
637
|
5. **One line of lens-priority rationale.** If the brief body lacks a line on *why* each priority lens takes precedence in this scope, offer the result of a first codebase pass as `Recommended:` and ask one question.
|
|
638
638
|
|
|
@@ -428,7 +428,7 @@ If the anchor (`implementation_base_commit`) is reported unresolvable, run the s
|
|
|
428
428
|
Because of the dependency closure, the chain queue **may include a stage that another implementation run has occupied as started/reserved.** That stage's `render-bundle` is rejected with `--stage N already in progress or reserved by another run` (StageTargetError). This is **not** an exception gate needing human judgment but a "next stage not yet ready" situation. On this rejection, **terminate the chain normally** and report the remaining queue to the user (e.g. `remaining queue: stage 4, 5 — resume with okstra-run after occupancy is released`). This is a different branch from the exception gate below (data corruption·concurrent-occupancy conflict confirmation).
|
|
429
429
|
|
|
430
430
|
### Stage ended FAIL — stop the queue and report (not an exception gate)
|
|
431
|
-
When a stage's synthesised verdict is `FAIL`, Phase 6 writes no carry sidecar and appends a `status:"failed"` row in place of `done` (`
|
|
431
|
+
When a stage's synthesised verdict is `FAIL`, Phase 6 writes no carry sidecar and appends a `status:"failed"` row in place of `done` (`scripts/okstra_ctl/phases/implementation/instructions/_implementation-deliverable.md` "Lead post-stage persistence"). **Stop the queue at that stage** and report the failed stage, its report path, and the remaining queue (e.g. `stage 1 FAIL — remaining queue: stage 2, 3, 5; re-enter with okstra-run --stage 1 after the fix`). Do **not** continue to the next stage even when that stage is dependency-independent: an unattended chain that keeps building past a confirmed regression stacks later work on top of it. The `failed` row releases the stage's occupancy, so `--stage <N>` re-enters the same stage on its preserved worktree and branch — there is nothing to unblock by hand.
|
|
432
432
|
|
|
433
433
|
### Exception gate during chaining
|
|
434
434
|
If `render-bundle` raises Step 5's concurrent-run conflict detection (concurrent-run branch) or git stale-SHA reconciliation (git-reconcile branch), **stop the chain at that stage** and present the gate to the user exactly as Step 5 prescribes. Once the user resolves the gate, resume the chain in place (continue with the remaining queue). Data corruption·concurrent-occupancy conflicts are confirmed by a human — this is the safety boundary of unattended chaining. (Unlike the "not ready" rejection above, these two branches do not discard the queue; they wait for user resolution.)
|
|
@@ -6,7 +6,7 @@ description: >-
|
|
|
6
6
|
|
|
7
7
|
# OKSTRA User Response
|
|
8
8
|
|
|
9
|
-
Use this skill for open `C-*` clarification items
|
|
9
|
+
Use this skill for open `C-*` clarification items, explicit plan decisions, and the implementation direction a finished `implementation-option-selection` comparison awaits. The user alone selects or writes every answer. Never infer an answer or approval.
|
|
10
10
|
|
|
11
11
|
The model-facing commands are fixed text reads and typed transaction writes:
|
|
12
12
|
|
|
@@ -17,6 +17,7 @@ The model-facing commands are fixed text reads and typed transaction writes:
|
|
|
17
17
|
| `user-response begin` | Open a sidecar transaction for one report identity. |
|
|
18
18
|
| `user-response answer` | Add or replace one validated clarification answer. |
|
|
19
19
|
| `user-response plan-decision` | Record an explicit plan decision in the transaction. |
|
|
20
|
+
| `user-response direction` | Record the implementation direction the user picked in the transaction. |
|
|
20
21
|
| `user-response legacy-report-authoring` | Record legacy report-authoring permission for report contract 2.0 only. |
|
|
21
22
|
| `user-response finalize` | Atomically merge and publish the user-owned sidecar. |
|
|
22
23
|
|
|
@@ -71,7 +72,7 @@ Never invent a picker function. Never ask the user to type a number when the nat
|
|
|
71
72
|
okstra user-response list-view --home <resolved-home> --project <projectId> --limit 3
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
The view gives `Task key`, `Task type`, `Report`, open-item counts, and readability status. If the count is zero, answer `No task has open clarification items.` and stop. Do not continue with an unreadable entry.
|
|
75
|
+
The view gives `Task key`, `Task type`, `Report`, open-item counts, `Direction selection required`, and readability status. If the count is zero, answer `No task has open clarification items.` and stop. Do not continue with an unreadable entry.
|
|
75
76
|
|
|
76
77
|
Present up to three task choices through the host picker. A host free-text row or unmatched next message is the report path or task key.
|
|
77
78
|
|
|
@@ -89,6 +90,8 @@ Contract 3.0 options also expose `reach` and `scopeEffects`. Contract 3.0 approv
|
|
|
89
90
|
|
|
90
91
|
When an axis says `not stated in the report`, repeat that text. Do not infer missing report-owned impact. The skill must **never invent it**.
|
|
91
92
|
|
|
93
|
+
When the view prints `Direction candidates:`, the comparison awaits a direction. Each `Direction option N:` row gives the candidate id and name, `Recommended`, `Goal`, `Core mechanism`, and `Selectable`. The `Direction picker:` block lists only selectable candidates, recommended first, each with its `Option number`.
|
|
94
|
+
|
|
92
95
|
## Step 2b: Investigate cited context before asking
|
|
93
96
|
|
|
94
97
|
Do not present a picker from the raw field dump. For each still-open item, read the investigation list the view printed:
|
|
@@ -127,9 +130,15 @@ Use the displayed values to confirm the user's choice. Do not copy a predefined
|
|
|
127
130
|
|
|
128
131
|
Copy `kind` from the view. A `reframe` does not satisfy the gate. If the user asks what an item means, explain from the view plus the cited files already read, then ask the same item again.
|
|
129
132
|
|
|
133
|
+
## Step 3b: Ask for the direction
|
|
134
|
+
|
|
135
|
+
Only when `Current direction selection: none` and `Direction picker:` has rows. Ask one single-select question through the host picker, after any clarification whose answer would change the choice. The body says that the comparison is finished, that the chosen candidate becomes the input of `implementation-planning`, and that planning cannot start until one is chosen. Copy each `Direction picker:` `- Label:` / `Description:` pair in order. Remember the `Option number` of the picked row. A `Selectable: no - <reason>` candidate is never offered; when the user asks for it, state the reason.
|
|
136
|
+
|
|
137
|
+
When the user adds a note or a constraint for the planner, keep their words verbatim for Step 6.
|
|
138
|
+
|
|
130
139
|
## Step 4: Confirm the complete response
|
|
131
140
|
|
|
132
|
-
Echo each clarification ID, kind, disposition, value, and rationale. Include any explicit plan decision or legacy report-authoring decision. Ask through the host picker, two options:
|
|
141
|
+
Echo each clarification ID, kind, disposition, value, and rationale. Include any explicit plan decision, direction, or legacy report-authoring decision. Ask through the host picker, two options:
|
|
133
142
|
|
|
134
143
|
1. `Record as shown` (Recommended)
|
|
135
144
|
2. `Change an answer`
|
|
@@ -150,7 +159,7 @@ For a predefined option, pass only its one-based number from the fixed view:
|
|
|
150
159
|
okstra user-response answer --transaction <transaction> --clarification-id <C-NNN> --kind <kind> --option-number <N>
|
|
151
160
|
```
|
|
152
161
|
|
|
153
|
-
Every value, rationale, and reason body file must be a regular file under `<projectRoot>/.okstra/tmp/user-response/`; do not use an external file or a symbolic link. For a direct user answer, write the exact value there. Write the rationale to a separate Markdown file only when present. Then run:
|
|
162
|
+
Every value, rationale, and reason body file — and every direction note or constraints file — must be a regular file under `<projectRoot>/.okstra/tmp/user-response/`; do not use an external file or a symbolic link. For a direct user answer, write the exact value there. Write the rationale to a separate Markdown file only when present. Then run:
|
|
154
163
|
|
|
155
164
|
```bash
|
|
156
165
|
okstra user-response answer --transaction <transaction> --clarification-id <C-NNN> --kind <kind> --disposition <disposition> --value-file <value.md> [--rationale-file <rationale.md>]
|
|
@@ -174,6 +183,14 @@ okstra user-response plan-decision --transaction <transaction> --status <revisio
|
|
|
174
183
|
|
|
175
184
|
Never infer a plan decision from the user's tone.
|
|
176
185
|
|
|
186
|
+
When the user picked a direction, pass the picked row's `Option number`. Write a note or constraints the user stated to separate Markdown files in that same temporary directory, one constraint per line:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
okstra user-response direction --transaction <transaction> --option-number <N> [--note-file <note.md>] [--constraints-file <constraints.md>]
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
The command refuses a candidate the planning gate would refuse and a report that does not await a direction.
|
|
193
|
+
|
|
177
194
|
Only for a report whose fixed view says `Report contract: 2.0`, an explicit legacy report-authoring decision may be recorded. A reason file in that same temporary directory is always required:
|
|
178
195
|
|
|
179
196
|
```bash
|
|
@@ -194,6 +211,8 @@ Leave this guidance in the final answer:
|
|
|
194
211
|
|
|
195
212
|
> This answer was recorded in the `user-responses/` sidecar (`<sidecar path>`). Re-running this task with `/okstra-run` attaches the answer to the next eligible phase.
|
|
196
213
|
|
|
214
|
+
When a direction was recorded, add: start `implementation-planning` with `/okstra-run` and pick this report in the wizard's direction-report step.
|
|
215
|
+
|
|
197
216
|
## Output rules
|
|
198
217
|
|
|
199
218
|
- Keep responses in the user's language.
|
|
@@ -52,7 +52,7 @@ taskType: "{{FM_TASK_TYPE}}"
|
|
|
52
52
|
> If left blank, any changes beyond the explicit requirements of the input will be treated as out of scope by default.
|
|
53
53
|
> Any exclusions that appear necessary will be recorded only as follow-up recommendations in the final report, and no further action will be taken.
|
|
54
54
|
|
|
55
|
-
**Enforced (delivery only):** `tests/contract/test_scope_boundary_delivery.py` pins that a filled section reaches every analysis worker through `okstra_ctl.analysis_packet` — drop it from `CANONICAL_BRIEF_SECTIONS` and every run's exclusions vanish silently. The exclusions themselves are prose and are **not** machine-checked: only the codebase-scan `out-of-scope` frontmatter is a path list, and `
|
|
55
|
+
**Enforced (delivery only):** `tests/contract/test_scope_boundary_delivery.py` pins that a filled section reaches every analysis worker through `okstra_ctl.analysis_packet` — drop it from `CANONICAL_BRIEF_SECTIONS` and every run's exclusions vanish silently. The exclusions themselves are prose and are **not** machine-checked: only the codebase-scan `out-of-scope` frontmatter is a path list, and `scripts/okstra_ctl/phases/improvement_discovery/validation.py` checks that one.
|
|
56
56
|
|
|
57
57
|
## Config and Deployment References
|
|
58
58
|
|
|
@@ -95,7 +95,7 @@ taskType: "{{FM_TASK_TYPE}}"
|
|
|
95
95
|
|
|
96
96
|
> Workers MUST NOT expand into items listed here. If a worker believes an excluded item must be addressed to satisfy the requirement, the worker records it as a recommended follow-up task in the final report and stops — it does not silently include the work. If this section is left empty, workers treat any change beyond what `Request Summary` and `Current Context` explicitly demand as out of scope by default.
|
|
97
97
|
|
|
98
|
-
**Enforced (delivery only):** `tests/contract/test_scope_boundary_delivery.py` pins that a filled section reaches every analysis worker through `okstra_ctl.analysis_packet` — drop it from `CANONICAL_BRIEF_SECTIONS` and every run's exclusions vanish silently. The exclusions themselves are prose and are **not** machine-checked: only the codebase-scan `out-of-scope` frontmatter is a path list, and `
|
|
98
|
+
**Enforced (delivery only):** `tests/contract/test_scope_boundary_delivery.py` pins that a filled section reaches every analysis worker through `okstra_ctl.analysis_packet` — drop it from `CANONICAL_BRIEF_SECTIONS` and every run's exclusions vanish silently. The exclusions themselves are prose and are **not** machine-checked: only the codebase-scan `out-of-scope` frontmatter is a path list, and `scripts/okstra_ctl/phases/improvement_discovery/validation.py` checks that one.
|
|
99
99
|
|
|
100
100
|
## Configuration References and Expected Values
|
|
101
101
|
|
|
@@ -32,7 +32,7 @@ Checks performed per brief file:
|
|
|
32
32
|
10. `scope` is one of {reporter-input, codebase} (absent ⇒ reporter-input).
|
|
33
33
|
11. codebase-scan variant (`scope: codebase`): the Scan Scope section is
|
|
34
34
|
non-empty and Priority Lenses lists 1–4 values from the lens whitelist
|
|
35
|
-
(`scripts/okstra_ctl/
|
|
35
|
+
(`scripts/okstra_ctl/phases/improvement_discovery/lenses.py` SSOT).
|
|
36
36
|
12. When present, `Related Task Graph` is a markdown table with the canonical
|
|
37
37
|
columns and relation/direction values from the okstra-brief-gen contract.
|
|
38
38
|
13. The requirement/objective section `## Desired Outcome` (required in every
|
|
@@ -70,7 +70,7 @@ for _ssot_dir in (_VALIDATORS_DIR.parent / "scripts", _VALIDATORS_DIR.parent / "
|
|
|
70
70
|
if _ssot_dir.is_dir() and str(_ssot_dir) not in sys.path:
|
|
71
71
|
sys.path.insert(0, str(_ssot_dir))
|
|
72
72
|
|
|
73
|
-
from okstra_ctl.
|
|
73
|
+
from okstra_ctl.phases.improvement_discovery.lenses import (
|
|
74
74
|
LENSES,
|
|
75
75
|
MAX_PRIORITY_LENSES,
|
|
76
76
|
MIN_PRIORITY_LENSES,
|