okstra 0.207.0 → 0.208.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.
- package/README.md +3 -2
- package/dist/cli-registry.mjs +6 -0
- package/dist/cli-registry.mjs.map +1 -1
- package/dist/commands/execute/render-bundle.mjs +1 -1
- package/dist/commands/lifecycle/doctor.mjs +1 -1
- package/dist/lib/skill-catalog.mjs +1 -0
- package/dist/lib/skill-catalog.mjs.map +1 -1
- package/docs/architecture/storage-model.md +14 -0
- package/docs/architecture.md +30 -9
- package/docs/cli.md +26 -22
- package/docs/contributor-change-matrix.md +1 -1
- package/docs/project-structure-overview.md +15 -8
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/operations/explain-flow.json +6 -0
- package/runtime/bin/lib/okstra/cli.sh +1 -5
- package/runtime/bin/lib/okstra/globals.sh +0 -2
- package/runtime/bin/lib/okstra/usage.sh +5 -3
- package/runtime/bin/okstra.sh +0 -2
- package/runtime/prompts/duties/business-flow-investigator.json +14 -0
- package/runtime/prompts/lead/context-loader.md +1 -1
- package/runtime/prompts/lead/convergence.md +22 -7
- package/runtime/prompts/lead/okstra-lead-contract.md +10 -6
- package/runtime/prompts/lead/report-writer.md +1 -1
- package/runtime/prompts/lead/team-contract.md +12 -17
- package/runtime/prompts/profiles/_common-contract.md +3 -3
- package/runtime/prompts/wizard/prompts.ko.json +0 -91
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +6 -0
- package/runtime/python/okstra_ctl/agent/invocation.py +1 -1
- package/runtime/python/okstra_ctl/agent/prompt_cli/batch.py +1 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/cli.py +1 -0
- package/runtime/python/okstra_ctl/agent/prompt_cli/materialize.py +11 -125
- package/runtime/python/okstra_ctl/agent/standalone.py +183 -0
- package/runtime/python/okstra_ctl/analysis_packet.py +39 -8
- package/runtime/python/okstra_ctl/assignment_resolver.py +7 -1
- package/runtime/python/okstra_ctl/brief_frontmatter.py +10 -0
- package/runtime/python/okstra_ctl/business_flow/__init__.py +4 -0
- package/runtime/python/okstra_ctl/business_flow/cli.py +134 -0
- package/runtime/python/okstra_ctl/business_flow/contracts.py +268 -0
- package/runtime/python/okstra_ctl/business_flow/engine.py +518 -0
- package/runtime/python/okstra_ctl/business_flow/hooks.py +221 -0
- package/runtime/python/okstra_ctl/business_flow/invocation.py +170 -0
- package/runtime/python/okstra_ctl/business_flow/report.py +49 -0
- package/runtime/python/okstra_ctl/business_flow/source.py +206 -0
- package/runtime/python/okstra_ctl/business_flow/store.py +388 -0
- package/runtime/python/okstra_ctl/convergence.py +173 -2
- package/runtime/python/okstra_ctl/convergence_critic_verify_prompt.py +18 -0
- package/runtime/python/okstra_ctl/convergence_provenance.py +8 -0
- package/runtime/python/okstra_ctl/coverage_census.py +596 -0
- package/runtime/python/okstra_ctl/design_surfaces.py +4 -0
- package/runtime/python/okstra_ctl/direct_work.py +1 -1
- package/runtime/python/okstra_ctl/dispatch_core.py +7 -3
- package/runtime/python/okstra_ctl/doctor.py +12 -6
- package/runtime/python/okstra_ctl/domain/role.py +1 -0
- package/runtime/python/okstra_ctl/group_context.py +5 -4
- package/runtime/python/okstra_ctl/legacy_model_selection.py +7 -51
- package/runtime/python/okstra_ctl/manager_split.py +4 -1
- package/runtime/python/okstra_ctl/manager_view.py +9 -3
- package/runtime/python/okstra_ctl/model_io/lines.py +1 -24
- package/runtime/python/okstra_ctl/model_io/renderers.py +54 -41
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/change_impact_analysis/profile.md +0 -8
- package/runtime/python/okstra_ctl/phases/error_analysis/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/error_analysis/profile.md +6 -8
- package/runtime/python/okstra_ctl/phases/feature_analysis/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/feature_analysis/profile.md +0 -8
- package/runtime/python/okstra_ctl/phases/final_verification/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/final_verification/profile.md +2 -8
- package/runtime/python/okstra_ctl/phases/implementation/boundary.json +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/profile.md +0 -6
- package/runtime/python/okstra_ctl/phases/implementation/report_assets/implementation-input.template.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/authoring.py +4 -3
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/entry.py +1 -14
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/profile.md +5 -8
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/spec.md +3 -3
- package/runtime/python/okstra_ctl/phases/implementation_option_selection/validation.py +15 -5
- package/runtime/python/okstra_ctl/phases/implementation_planning/authoring.py +9 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/boundary.json +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +4 -2
- package/runtime/python/okstra_ctl/phases/implementation_planning/plan_body.py +25 -9
- package/runtime/python/okstra_ctl/phases/implementation_planning/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +7 -10
- package/runtime/python/okstra_ctl/phases/improvement_discovery/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/improvement_discovery/profile.md +4 -11
- package/runtime/python/okstra_ctl/phases/project_analysis/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/project_analysis/profile.md +0 -8
- package/runtime/python/okstra_ctl/phases/release_handoff/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/release_handoff/spec.md +1 -1
- package/runtime/python/okstra_ctl/phases/requirements_discovery/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/requirements_discovery/profile.md +10 -8
- package/runtime/python/okstra_ctl/phases/requirements_discovery/spec.md +3 -3
- package/runtime/python/okstra_ctl/phases/technical_verification/profile.json +1 -1
- package/runtime/python/okstra_ctl/phases/technical_verification/profile.md +0 -4
- package/runtime/python/okstra_ctl/plan_items.py +1 -1
- package/runtime/python/okstra_ctl/render.py +10 -43
- package/runtime/python/okstra_ctl/render_final_report.py +3 -0
- package/runtime/python/okstra_ctl/report_assembly.py +15 -1
- package/runtime/python/okstra_ctl/report_finalize.py +40 -0
- package/runtime/python/okstra_ctl/report_html/render.py +3 -0
- package/runtime/python/okstra_ctl/report_synthesis_packet.py +1 -2
- package/runtime/python/okstra_ctl/run.py +78 -409
- package/runtime/python/okstra_ctl/wizard/__init__.py +2 -24
- package/runtime/python/okstra_ctl/wizard/cli.py +3 -6
- package/runtime/python/okstra_ctl/wizard/confirmation.py +3 -35
- package/runtime/python/okstra_ctl/wizard/engine.py +2 -4
- package/runtime/python/okstra_ctl/wizard/ids.py +1 -88
- package/runtime/python/okstra_ctl/wizard/registry.py +36 -228
- package/runtime/python/okstra_ctl/wizard/render.py +2 -2
- package/runtime/python/okstra_ctl/wizard/roles.py +1 -3
- package/runtime/python/okstra_ctl/wizard/sources.py +9 -40
- package/runtime/python/okstra_ctl/wizard/state.py +36 -145
- package/runtime/python/okstra_ctl/wizard/statefile.py +27 -128
- package/runtime/python/okstra_ctl/wizard/steps_identity.py +22 -10
- package/runtime/python/okstra_ctl/wizard/steps_options.py +5 -4
- package/runtime/python/okstra_ctl/wizard/steps_roles.py +15 -565
- package/runtime/python/okstra_ctl/worker_prompt_policy.py +9 -2
- package/runtime/schemas/business-flow-v1.schema.json +847 -0
- package/runtime/schemas/convergence-groups-v2.0.schema.json +7 -0
- package/runtime/skills/okstra-explain-flow/SKILL.md +42 -0
- package/runtime/skills/okstra-inspect/facets/history.md +5 -5
- package/runtime/skills/okstra-run/SKILL.md +2 -2
- package/runtime/templates/manager/view.template.html +7 -4
- package/runtime/templates/reports/business-flow.template.md +106 -0
- package/runtime/templates/reports/html/base.template.html +14 -1
- package/runtime/templates/reports/html/business-flow.template.html +31 -0
- package/runtime/templates/reports/html/i18n/en.json +1 -0
- package/runtime/templates/reports/html/i18n/ko.json +1 -0
- package/runtime/templates/worker-prompt-preamble.md +11 -2
- package/runtime/validators/checks/validate-prompt-metadata-01.py +10 -10
- package/runtime/validators/validate-run.py +70 -21
- package/runtime/validators/validate_analysis_report.py +21 -21
- package/runtime/python/okstra_ctl/workers.py +0 -133
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"""okstra-run wizard — state machine for interactive task setup.
|
|
2
2
|
|
|
3
3
|
The okstra-run skill used to encode the full input-collection flow in prose,
|
|
4
|
-
which drifted into seven internal inconsistencies (
|
|
5
|
-
|
|
4
|
+
which drifted into seven internal inconsistencies (free-text-via-AskUserQuestion,
|
|
5
|
+
missing clarification prompt for impl, etc.).
|
|
6
6
|
This package owns the flow as code so the skill becomes a thin loop.
|
|
7
7
|
|
|
8
8
|
Public surface (re-exported here; the skill calls it through the
|
|
@@ -24,34 +24,25 @@ from __future__ import annotations
|
|
|
24
24
|
|
|
25
25
|
from .ids import (
|
|
26
26
|
ALL_STAGES,
|
|
27
|
-
ANTIGRAVITY_MODEL_OPTIONS,
|
|
28
27
|
BASE_REF_FREE_INPUT_TOKEN,
|
|
29
28
|
BRIEF_CARRY_ABORT,
|
|
30
29
|
BRIEF_CARRY_SWITCH_ENTRY,
|
|
31
30
|
CANONICAL_BASE_REFS,
|
|
32
|
-
CLAUDE_MODEL_OPTIONS,
|
|
33
|
-
CODEX_MODEL_OPTIONS,
|
|
34
|
-
EXECUTORS,
|
|
35
|
-
GROK_MODEL_OPTIONS,
|
|
36
31
|
GROUP_LABELS,
|
|
37
32
|
GROUP_MAX_TABS,
|
|
38
|
-
GROUP_MODELS,
|
|
39
33
|
GROUP_OPTIONS,
|
|
40
|
-
KIMI_MODEL_OPTIONS,
|
|
41
34
|
PICK_OTHER,
|
|
42
35
|
PICK_SKIP,
|
|
43
36
|
PICK_TYPE_CUSTOM,
|
|
44
37
|
PICK_USE_DEFAULT,
|
|
45
38
|
PICK_USE_SUGGESTED,
|
|
46
39
|
PROMPT_GROUPS,
|
|
47
|
-
ROLE_BLURBS,
|
|
48
40
|
SCOPE_SHAPE_LINKED,
|
|
49
41
|
SCOPE_SHAPE_NO_ANSWERS,
|
|
50
42
|
SCOPE_SHAPE_UNLINKED,
|
|
51
43
|
S_ABORTED,
|
|
52
44
|
S_ANALYSIS_TARGET,
|
|
53
45
|
S_ANALYSIS_TARGET_PICK,
|
|
54
|
-
S_ANTIGRAVITY_MODEL,
|
|
55
46
|
S_APPROVED_PLAN,
|
|
56
47
|
S_APPROVED_PLAN_PICK,
|
|
57
48
|
S_APPROVE_PLAN_CONFIRM,
|
|
@@ -63,12 +54,7 @@ from .ids import (
|
|
|
63
54
|
S_BRIEF_PATH_PICK,
|
|
64
55
|
S_CLARIFICATION,
|
|
65
56
|
S_CLARIFICATION_PICK,
|
|
66
|
-
S_CLAUDE_MODEL,
|
|
67
|
-
S_CODEX_MODEL,
|
|
68
57
|
S_CONFIRM,
|
|
69
|
-
S_CRITIC_PICK,
|
|
70
|
-
S_CRITIC_TEXT,
|
|
71
|
-
S_DEFAULTS_OR_CUSTOM,
|
|
72
58
|
S_DESIGN_PREP_CONFIRM,
|
|
73
59
|
S_DESIGN_PREP_DECISION,
|
|
74
60
|
S_DESIGN_PREP_OVERRIDES,
|
|
@@ -76,15 +62,10 @@ from .ids import (
|
|
|
76
62
|
S_DIRECTIVE_PICK,
|
|
77
63
|
S_DONE,
|
|
78
64
|
S_EDIT_TARGET,
|
|
79
|
-
S_EXECUTOR,
|
|
80
|
-
S_EXECUTOR_MODEL,
|
|
81
65
|
S_FEATURE_EVIDENCE,
|
|
82
66
|
S_FEATURE_EVIDENCE_PICK,
|
|
83
67
|
S_FIX_CYCLE_CONFIRM,
|
|
84
|
-
S_GROK_MODEL,
|
|
85
68
|
S_HANDOFF_STAGE_PICK,
|
|
86
|
-
S_KIMI_MODEL,
|
|
87
|
-
S_LEAD_MODEL,
|
|
88
69
|
S_PROJECT_EVIDENCE,
|
|
89
70
|
S_PROJECT_EVIDENCE_PICK,
|
|
90
71
|
S_PR_TEMPLATE,
|
|
@@ -92,7 +73,6 @@ from .ids import (
|
|
|
92
73
|
S_PR_TEMPLATE_SCOPE,
|
|
93
74
|
S_RELATED_TASKS,
|
|
94
75
|
S_RELATED_TASKS_PICK,
|
|
95
|
-
S_REPORT_WRITER_MODEL,
|
|
96
76
|
S_REUSE_PREVIOUS,
|
|
97
77
|
S_REVERIFY_SCOPE_PICK,
|
|
98
78
|
S_REVERIFY_SCOPE_STAGES,
|
|
@@ -105,8 +85,6 @@ from .ids import (
|
|
|
105
85
|
S_TASK_PICK,
|
|
106
86
|
S_TASK_TYPE,
|
|
107
87
|
S_TASK_TYPE_TEXT,
|
|
108
|
-
S_WORKERS_CUSTOM,
|
|
109
|
-
S_WORKERS_OVERRIDE,
|
|
110
88
|
TASK_PICK_NEW_TOKEN,
|
|
111
89
|
TASK_TYPES,
|
|
112
90
|
TASK_TYPE_VALUES,
|
|
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
from okstra_ctl.registry.host_registry import default_host_registry
|
|
9
9
|
|
|
10
10
|
from .state import WizardError
|
|
11
|
-
from .statefile import
|
|
11
|
+
from .statefile import load_state_file, save_state_file
|
|
12
12
|
from .confirmation import confirmation_block
|
|
13
13
|
from .engine import (
|
|
14
14
|
_auto_start_new_task_when_it_is_the_only_choice,
|
|
@@ -55,7 +55,6 @@ def main(argv: list[str]) -> int:
|
|
|
55
55
|
choices=("spawn-process", "current-session"),
|
|
56
56
|
)
|
|
57
57
|
p_init.add_argument("--available-function", action="append", default=[])
|
|
58
|
-
p_init.add_argument("--critic", default="")
|
|
59
58
|
|
|
60
59
|
p_step = sub.add_parser("step")
|
|
61
60
|
p_step.add_argument("--state-file", required=True)
|
|
@@ -88,8 +87,6 @@ def main(argv: list[str]) -> int:
|
|
|
88
87
|
host_entry_mode=args.entry_mode,
|
|
89
88
|
available_functions=args.available_function,
|
|
90
89
|
)
|
|
91
|
-
if args.critic:
|
|
92
|
-
state.critic = args.critic
|
|
93
90
|
_auto_start_new_task_when_it_is_the_only_choice(state)
|
|
94
91
|
save_state_file(state_path, state)
|
|
95
92
|
first = next_prompt(state)
|
|
@@ -124,7 +121,7 @@ def main(argv: list[str]) -> int:
|
|
|
124
121
|
else:
|
|
125
122
|
result = submit(state, args.answer)
|
|
126
123
|
except WizardError as exc:
|
|
127
|
-
|
|
124
|
+
save_state_file(state_path, persisted_state)
|
|
128
125
|
try:
|
|
129
126
|
# current 는 방금 디스크로 되돌린 상태에서 렌더한다. 뮤테이션이
|
|
130
127
|
# 진행되다 만 state 로 렌더하면, 검증 전에 필드를 채운 핸들러
|
|
@@ -142,7 +139,7 @@ def main(argv: list[str]) -> int:
|
|
|
142
139
|
print(json.dumps({"ok": False, "error": str(exc), "current": current},
|
|
143
140
|
ensure_ascii=False, indent=2))
|
|
144
141
|
return 0
|
|
145
|
-
|
|
142
|
+
save_state_file(state_path, state)
|
|
146
143
|
print(json.dumps({"ok": True, **result}, ensure_ascii=False, indent=2))
|
|
147
144
|
return 0
|
|
148
145
|
|
|
@@ -22,7 +22,7 @@ from .state import (
|
|
|
22
22
|
WizardError,
|
|
23
23
|
WizardState,
|
|
24
24
|
_load_role_profile_for_state,
|
|
25
|
-
|
|
25
|
+
_role_selection_ready,
|
|
26
26
|
)
|
|
27
27
|
from .prompts import _msg, _opt, _p
|
|
28
28
|
from .sources import _resolve_path, _reverify_scope_preview
|
|
@@ -255,16 +255,7 @@ def confirmation_block(state: WizardState) -> str:
|
|
|
255
255
|
worktree_line = _worktree_preview_line(state)
|
|
256
256
|
if worktree_line is not None:
|
|
257
257
|
lines.append(worktree_line)
|
|
258
|
-
|
|
259
|
-
if state.task_type == "implementation" and not role_selection:
|
|
260
|
-
lines.append(f" executor : {state.executor or '(default)'}")
|
|
261
|
-
lines.append(
|
|
262
|
-
_msg(state.workspace_root, "confirmation", "workers_implementation_default")
|
|
263
|
-
)
|
|
264
|
-
elif not role_selection:
|
|
265
|
-
roster = state.workers_override or ",".join(state.profile_workers) or "(profile default)"
|
|
266
|
-
lines.append(f" workers : {roster}")
|
|
267
|
-
if role_selection:
|
|
258
|
+
if _role_selection_ready(state):
|
|
268
259
|
profile = _load_role_profile_for_state(state)
|
|
269
260
|
native_provider = default_host_registry().resolve(
|
|
270
261
|
state.host_runtime
|
|
@@ -308,32 +299,9 @@ def confirmation_block(state: WizardState) -> str:
|
|
|
308
299
|
"dynamic_role",
|
|
309
300
|
role=requirement.role,
|
|
310
301
|
))
|
|
311
|
-
else:
|
|
312
|
-
lines.append(
|
|
313
|
-
f" lead : {state.lead_provider or 'claude'} / "
|
|
314
|
-
f"{state.lead_model or 'default'}"
|
|
315
|
-
)
|
|
316
|
-
if state.claude_model:
|
|
317
|
-
lines.append(f" claude-model : {state.claude_model}")
|
|
318
|
-
if state.codex_model:
|
|
319
|
-
lines.append(f" codex-model : {state.codex_model}")
|
|
320
|
-
if state.antigravity_model:
|
|
321
|
-
lines.append(f" antigravity-model : {state.antigravity_model}")
|
|
322
|
-
if state.grok_model:
|
|
323
|
-
lines.append(f" grok-model : {state.grok_model}")
|
|
324
|
-
if state.kimi_model:
|
|
325
|
-
lines.append(f" kimi-model : {state.kimi_model}")
|
|
326
|
-
if state.report_writer_model or state.report_writer_provider:
|
|
327
|
-
lines.append(
|
|
328
|
-
f" report-writer : {state.report_writer_provider or 'claude'} / "
|
|
329
|
-
f"{state.report_writer_model or 'default'}"
|
|
330
|
-
)
|
|
331
302
|
lines.append(f" directive : {state.directive or '(none)'}")
|
|
332
303
|
if state.related_tasks_raw:
|
|
333
304
|
lines.append(f" related-tasks : {state.related_tasks_raw}")
|
|
334
|
-
if (not role_selection
|
|
335
|
-
and state.task_type in ("requirements-discovery", "error-analysis", "implementation-planning", "final-verification")):
|
|
336
|
-
lines.append(f" critic : {state.critic or '(off)'}")
|
|
337
305
|
if state.task_type in _STAGE_SCOPED_TASK_TYPES:
|
|
338
306
|
lines.append(f" approved-plan : {state.approved_plan_path}")
|
|
339
307
|
stage = wizard_stage_confirmation_label(
|
|
@@ -365,7 +333,7 @@ def confirmation_block(state: WizardState) -> str:
|
|
|
365
333
|
report_writer_models = state.role_models.get("report-writer", [])
|
|
366
334
|
translator_model = (
|
|
367
335
|
report_writer_models[0] if report_writer_models
|
|
368
|
-
else
|
|
336
|
+
else "(selection required)"
|
|
369
337
|
)
|
|
370
338
|
lines.append(_msg(
|
|
371
339
|
state.workspace_root, "confirmation", "translation_scope", model=translator_model,
|
|
@@ -23,7 +23,6 @@ from .ids import (
|
|
|
23
23
|
PROMPT_GROUPS,
|
|
24
24
|
S_ABORTED,
|
|
25
25
|
S_CONFIRM,
|
|
26
|
-
S_DEFAULTS_OR_CUSTOM,
|
|
27
26
|
S_DESIGN_PREP_CONFIRM,
|
|
28
27
|
S_DESIGN_PREP_OVERRIDES,
|
|
29
28
|
S_DONE,
|
|
@@ -43,7 +42,7 @@ from .picker_navigation import (
|
|
|
43
42
|
from .roles import _submit_role_prompt, next_role_prompt
|
|
44
43
|
from .steps_identity import _submit_task_pick
|
|
45
44
|
from .steps_analysis import _advance_design_prep_item
|
|
46
|
-
from .registry import STEPS, STEP_BY_ID
|
|
45
|
+
from .registry import STEPS, STEP_BY_ID, _ROLE_SELECTION_BOUNDARY
|
|
47
46
|
|
|
48
47
|
|
|
49
48
|
# ---- Public API ---------------------------------------------------------
|
|
@@ -57,7 +56,6 @@ def init_state(
|
|
|
57
56
|
) -> WizardState:
|
|
58
57
|
"""Bootstrap a new wizard state."""
|
|
59
58
|
return WizardState(
|
|
60
|
-
execution_identity_version=2,
|
|
61
59
|
workspace_root=workspace_root,
|
|
62
60
|
project_root=project_root,
|
|
63
61
|
project_id=project_id,
|
|
@@ -177,7 +175,7 @@ def _next_prompt_screen(state: WizardState) -> Prompt:
|
|
|
177
175
|
if state.confirmed:
|
|
178
176
|
return Prompt(step=S_DONE, kind="done")
|
|
179
177
|
for step in STEPS:
|
|
180
|
-
if step.id ==
|
|
178
|
+
if step.id == _ROLE_SELECTION_BOUNDARY:
|
|
181
179
|
role_prompt = next_role_prompt(state)
|
|
182
180
|
if role_prompt is not None:
|
|
183
181
|
return role_prompt
|
|
@@ -4,7 +4,6 @@ from __future__ import annotations
|
|
|
4
4
|
import re
|
|
5
5
|
|
|
6
6
|
from okstra_ctl.analysis_inputs import ANALYSIS_TASK_TYPES
|
|
7
|
-
from okstra_ctl.models import picker_options
|
|
8
7
|
|
|
9
8
|
|
|
10
9
|
# ---- Constants -----------------------------------------------------------
|
|
@@ -33,21 +32,6 @@ TASK_TYPES: list[tuple[str, str]] = [
|
|
|
33
32
|
TASK_TYPE_VALUES = [tt for tt, _ in TASK_TYPES]
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
EXECUTORS = ["claude", "codex", "antigravity"]
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
# 역할 한 줄 설명 — defaults_or_custom 안내에서 각 역할이 무슨 일을 하는지 보여준다.
|
|
40
|
-
ROLE_BLURBS = {
|
|
41
|
-
"lead": "Okstra lead · 워커 dispatch·교차검증 수렴·최종 합성",
|
|
42
|
-
"claude": "독립 분석 워커 (Claude)",
|
|
43
|
-
"codex": "독립 분석 워커 (Codex)",
|
|
44
|
-
"antigravity": "독립 분석 워커 (Antigravity)",
|
|
45
|
-
"grok": "독립 분석 워커 (Grok)",
|
|
46
|
-
"kimi": "독립 분석 워커 (Kimi)",
|
|
47
|
-
"report-writer": "최종 리포트 작성 (분석은 하지 않음)",
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
|
|
51
35
|
# Task types that consume an approved plan and need a stage-scope pick:
|
|
52
36
|
# implementation executes a stage, final-verification verifies a stage
|
|
53
37
|
# (or the whole task via `auto`). Both gate the approved-plan + stage steps.
|
|
@@ -72,21 +56,6 @@ CANONICAL_BASE_REFS = ["main", "dev", "staging", "preprod", "prod"]
|
|
|
72
56
|
BASE_REF_FREE_INPUT_TOKEN = "__free_input__"
|
|
73
57
|
|
|
74
58
|
|
|
75
|
-
CLAUDE_MODEL_OPTIONS = ["default", *picker_options("claude")]
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
CODEX_MODEL_OPTIONS = ["default", *picker_options("codex")]
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
ANTIGRAVITY_MODEL_OPTIONS = ["default", *picker_options("antigravity")]
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
GROK_MODEL_OPTIONS = ["default", *picker_options("grok")]
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
KIMI_MODEL_OPTIONS = ["default", *picker_options("kimi")]
|
|
88
|
-
|
|
89
|
-
|
|
90
59
|
# special pick value: start a brand-new task
|
|
91
60
|
TASK_PICK_NEW_TOKEN = "__new__"
|
|
92
61
|
|
|
@@ -108,10 +77,6 @@ PICK_TYPE_CUSTOM = "__free_input__"
|
|
|
108
77
|
_ABORT_OPTION = "__abort__"
|
|
109
78
|
|
|
110
79
|
|
|
111
|
-
# workers_override 에서 "옵션 워커를 추가하지 않음" 을 뜻하는 sentinel.
|
|
112
|
-
_DEFAULT_ROSTER_TOKEN = "__default_roster__"
|
|
113
|
-
|
|
114
|
-
|
|
115
80
|
_RECENT_PREFIX = "__recent:"
|
|
116
81
|
|
|
117
82
|
|
|
@@ -222,51 +187,9 @@ S_STAGE_PICK = "stage_pick"
|
|
|
222
187
|
S_HANDOFF_STAGE_PICK = "handoff_stage_pick"
|
|
223
188
|
|
|
224
189
|
|
|
225
|
-
S_EXECUTOR = "executor"
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
S_CRITIC_PICK = "critic_pick"
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
S_CRITIC_TEXT = "critic_text"
|
|
232
|
-
|
|
233
|
-
|
|
234
190
|
S_REUSE_PREVIOUS = "reuse_previous"
|
|
235
191
|
|
|
236
192
|
|
|
237
|
-
S_DEFAULTS_OR_CUSTOM = "defaults_or_custom"
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
S_WORKERS_OVERRIDE = "workers_override"
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
S_WORKERS_CUSTOM = "workers_custom"
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
S_LEAD_MODEL = "lead_model"
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
S_EXECUTOR_MODEL = "executor_model"
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
S_CLAUDE_MODEL = "claude_model"
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
S_CODEX_MODEL = "codex_model"
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
S_ANTIGRAVITY_MODEL = "antigravity_model"
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
S_GROK_MODEL = "grok_model"
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
S_KIMI_MODEL = "kimi_model"
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
S_REPORT_WRITER_MODEL = "report_writer_model"
|
|
268
|
-
|
|
269
|
-
|
|
270
193
|
S_DIRECTIVE_PICK = "directive_pick"
|
|
271
194
|
|
|
272
195
|
|
|
@@ -317,9 +240,6 @@ S_ABORTED = "aborted"
|
|
|
317
240
|
|
|
318
241
|
# ---- 멀티탭 배치 프롬프트 그룹 (방출 계층 전용) ----
|
|
319
242
|
# 그룹 id 는 S_* 가 아니므로 prompts JSON SOT / step-id 동기화 검사 대상이 아니다.
|
|
320
|
-
GROUP_MODELS = "models"
|
|
321
|
-
|
|
322
|
-
|
|
323
243
|
GROUP_OPTIONS = "options"
|
|
324
244
|
|
|
325
245
|
|
|
@@ -327,18 +247,14 @@ GROUP_MAX_TABS = 4 # AskUserQuestion 의 질문(탭) 수 한도
|
|
|
327
247
|
|
|
328
248
|
|
|
329
249
|
# 멤버는 모두 서로 의존이 없는 단일선택 픽 step 이어야 한다.
|
|
330
|
-
# *_TEXT 후속 /
|
|
250
|
+
# *_TEXT 후속 / pr_template_scope 는 의존성 때문에 개별 유지.
|
|
331
251
|
PROMPT_GROUPS: dict[str, tuple[str, ...]] = {
|
|
332
|
-
GROUP_MODELS: (S_LEAD_MODEL, S_EXECUTOR_MODEL, S_CLAUDE_MODEL,
|
|
333
|
-
S_CODEX_MODEL, S_ANTIGRAVITY_MODEL, S_GROK_MODEL,
|
|
334
|
-
S_KIMI_MODEL, S_REPORT_WRITER_MODEL),
|
|
335
252
|
GROUP_OPTIONS: (S_DIRECTIVE_PICK, S_RELATED_TASKS_PICK,
|
|
336
253
|
S_CLARIFICATION_PICK, S_PR_TEMPLATE_PICK),
|
|
337
254
|
}
|
|
338
255
|
|
|
339
256
|
|
|
340
257
|
GROUP_LABELS: dict[str, str] = {
|
|
341
|
-
GROUP_MODELS: "모델 선택 (탭별로 선택)",
|
|
342
258
|
GROUP_OPTIONS: "추가 옵션 (탭별로 선택)",
|
|
343
259
|
}
|
|
344
260
|
|
|
@@ -406,8 +322,5 @@ _REUSE_FILLED_STEPS = (
|
|
|
406
322
|
S_FEATURE_EVIDENCE_PICK, S_FEATURE_EVIDENCE,
|
|
407
323
|
S_PROJECT_EVIDENCE_PICK, S_PROJECT_EVIDENCE,
|
|
408
324
|
S_ANALYSIS_TARGET_PICK, S_ANALYSIS_TARGET,
|
|
409
|
-
S_DEFAULTS_OR_CUSTOM, S_WORKERS_OVERRIDE, S_LEAD_MODEL, S_EXECUTOR_MODEL,
|
|
410
|
-
S_CLAUDE_MODEL, S_CODEX_MODEL, S_ANTIGRAVITY_MODEL, S_GROK_MODEL,
|
|
411
|
-
S_KIMI_MODEL, S_REPORT_WRITER_MODEL,
|
|
412
325
|
S_DIRECTIVE_PICK, S_DIRECTIVE, S_RELATED_TASKS_PICK, S_RELATED_TASKS,
|
|
413
326
|
S_CLARIFICATION_PICK, S_CLARIFICATION)
|