okstra 0.23.0 → 0.24.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/bin/okstra CHANGED
@@ -15,6 +15,7 @@ const COMMANDS = new Map([
15
15
  ["worktree-lookup", () => import("../src/worktree-lookup.mjs").then((m) => m.run)],
16
16
  ["plan-validate", () => import("../src/plan-validate.mjs").then((m) => m.run)],
17
17
  ["render-bundle", () => import("../src/render-bundle.mjs").then((m) => m.run)],
18
+ ["wizard", () => import("../src/wizard.mjs").then((m) => m.run)],
18
19
  ]);
19
20
 
20
21
  const USAGE = `okstra — multi-agent cross-verification orchestrator for Claude Code
@@ -51,6 +52,8 @@ Introspection commands (JSON output, used by skills to avoid python heredocs):
51
52
  plan-validate Check an approved-plan file for the approval marker
52
53
  render-bundle Preview prepare_task_bundle() output (forwards to
53
54
  python3 -m okstra_ctl.run --render-only)
55
+ wizard Drive the okstra-run interactive input state machine
56
+ (init / step / render-args / confirmation)
54
57
 
55
58
  Global options:
56
59
  --version Print okstra version and exit
@@ -95,7 +95,7 @@ okstra 의 prepare 책임은 단일 python 진입점 [`okstra_ctl.run.prepare_ta
95
95
  `prepare_task_bundle` 의 두 caller:
96
96
 
97
97
  1. **`scripts/okstra.sh`**: CLI 인자를 파싱·확인하고 → `prepare_task_bundle` 호출 → `--render-only` 가 아니면 `claude --model ... --session-id ... "$PROMPT"` 를 `exec` 으로 띄움. ~160 줄의 thin wrapper.
98
- 2. **`okstra-run` skill**: 같은 claude 세션 안에서 `AskUserQuestion` 으로 인자를 모은 뒤 → `prepare_task_bundle(render_only=True)` 직접 호출 → 렌더된 lead prompt 를 현재 세션이 그대로 읽어 lead 역할 수행. 새 claude 프로세스를 띄우지 않음.
98
+ 2. **`okstra-run` skill**: 같은 claude 세션 안에서 [`okstra_ctl.wizard`](../../scripts/okstra_ctl/wizard.py) 상태머신(`okstra wizard init|step|...` CLI)을 돌려 사용자 입력을 모은 뒤 → `okstra render-bundle` (즉 `prepare_task_bundle(render_only=True)`) 호출 → 렌더된 lead prompt 를 현재 세션이 그대로 읽어 lead 역할 수행. 새 claude 프로세스를 띄우지 않음. 분기/검증/순서는 모두 wizard 가 결정하므로 skill 본문은 `Prompt.kind` 에 맞춰 `AskUserQuestion`(`pick`) 또는 평문 메시지(`text`)를 띄우는 ~30 줄짜리 루프이다.
99
99
 
100
100
  판단 정책과 worker orchestration 은 lead claude 가 담당하고, okstra 의 prepare 단계는 그 lead 가 정확한 입력 묶음과 출력 골격을 받아 일을 시작할 수 있게 정형화된 자산을 준비할 뿐입니다.
101
101
 
@@ -167,7 +167,7 @@ okstra 의 prepare 단계는 디스크 권위 + 단일 python 진입점 모델
167
167
  ├────────────────────────────────────────────────────────────────┤
168
168
  │ │
169
169
  │ scripts/okstra.sh skills/okstra-run/SKILL.md │
170
- │ (CLI: bash 인자 파싱) (current claude 세션 안 AskUserQuestion)
170
+ │ (CLI: bash 인자 파싱) (okstra_ctl.wizard 상태머신 루프)
171
171
  │ │ │ │
172
172
  │ └─────────────┬────────────────┘ │
173
173
  │ ▼ │
package/docs/kr/cli.md CHANGED
@@ -492,6 +492,7 @@ chmod +x ~/.local/bin/okstra-ctl
492
492
  | `okstra worktree-lookup <task-key>` | `worktree_registry.lookup` 결과 (예약된 path / branch / base ref / 현재 상태) |
493
493
  | `okstra plan-validate <plan-path>` | `_validate_approved_plan` — approval marker 인식 결과와 sanitization 후 diff |
494
494
  | `okstra render-bundle <args…>` | `prepare_task_bundle(render_only=True)` 의 thin shim — `python3 -m okstra_ctl.run --render-only` 와 동일 시그니처 |
495
+ | `okstra wizard <init\|step\|render-args\|confirmation> --state-file <path>` | okstra-run 인터랙티브 입력 상태머신 (`okstra_ctl.wizard`). `init` 으로 state file 을 시드한 뒤 skill 이 `step --answer <val>` 을 반복 호출하면 다음 `Prompt` JSON 을 받음. `render-args` 는 최종 `render-bundle` 인자 맵, `confirmation` 은 사용자 echo 블록을 반환 |
495
496
 
496
497
  > 모든 subcommand 는 `bin/okstra` 가 spawn 하는 python 헬퍼 (`src/_python-helper.mjs`) 가 `PYTHONPATH` 와 `~/.okstra/lib/python` 을 wire 합니다. 직접 `python3 -m okstra_ctl.*` 으로 호출하면 `PYTHONPATH` 를 사용자가 직접 셋업해야 합니다.
497
498
 
@@ -101,6 +101,7 @@ okstra/
101
101
  | `worktree-lookup.mjs` | 작업별 git worktree 경로 조회 |
102
102
  | `plan-validate.mjs` | Approved plan 파일의 approval marker 검증 |
103
103
  | `render-bundle.mjs` | `prepare_task_bundle()` 산출 미리보기 |
104
+ | `wizard.mjs` | okstra-run 인터랙티브 입력 상태머신 구동 (`init`/`step`/`render-args`/`confirmation`) |
104
105
  | `uninstall.mjs` | `~/.okstra` 및 스킬 제거 |
105
106
 
106
107
  **핵심 설계**: 모든 CLI 명령은 `okstra paths --shell` 결과를 환경변수로 로드한 뒤, Python의 단일 진입점 `okstra_ctl.run.prepare_task_bundle`을 호출한다. CLI(`okstra.sh`)와 skill(`okstra-run`)이 같은 Python 함수를 공유하는 **Rule of Two**를 강제한다.
@@ -126,6 +127,7 @@ okstra/
126
127
  | `workers.py` | Worker 모델 할당 (Claude/Codex/Gemini) |
127
128
  | `backfill.py` | 레거시 run 자동 마이그레이션 |
128
129
  | `models.py` | `ModelAssignment`, `PrepareInputs`, `PrepareOutputs` 데이터클래스 |
130
+ | `wizard.py` | `WizardState`, `Prompt`, `STEPS` — okstra-run 입력 수집 상태머신 (단일 권위) |
129
131
 
130
132
  #### 3.2.2 `scripts/okstra_project/` — 프로젝트 메타 리졸버
131
133
 
@@ -242,7 +244,7 @@ okstra/
242
244
 
243
245
  ### 3.8 `bin/okstra` — Node.js CLI
244
246
 
245
- 12개 명령(`paths`, `install`, `ensure-installed`, `uninstall`, `doctor`, `setup`, `check-project`, `task-list`, `task-show`, `worktree-lookup`, `plan-validate`, `render-bundle`) 라우터. 명령 파싱 → `src/<cmd>.mjs` 동적 로드 → `run(args)` 호출 → exit code 반환.
247
+ 13개 명령(`paths`, `install`, `ensure-installed`, `uninstall`, `doctor`, `setup`, `check-project`, `task-list`, `task-show`, `worktree-lookup`, `plan-validate`, `render-bundle`, `wizard`) 라우터. 명령 파싱 → `src/<cmd>.mjs` 동적 로드 → `run(args)` 호출 → exit code 반환.
246
248
 
247
249
  ---
248
250
 
@@ -306,6 +308,7 @@ okstra/
306
308
  | 프로젝트 | `setup.mjs`, `check-project.mjs` |
307
309
  | Task 조회 | `task-list.mjs`, `task-show.mjs` |
308
310
  | 실행 보조 | `worktree-lookup.mjs`, `plan-validate.mjs`, `render-bundle.mjs` |
311
+ | 스킬 구동 | `wizard.mjs` |
309
312
 
310
313
  ---
311
314
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "okstra",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Multi-agent cross-verification orchestrator runtime + Claude Code skills.",
5
5
  "license": "MIT",
6
6
  "author": "devonshin",
@@ -1,5 +1,5 @@
1
1
  {
2
- "package": "0.23.0",
3
- "builtAt": "2026-05-15T01:56:19.363Z",
2
+ "package": "0.24.0",
3
+ "builtAt": "2026-05-15T05:35:39.299Z",
4
4
  "repoRoot": "/home/runner/work/okstra/okstra"
5
5
  }
@@ -61,7 +61,7 @@ Hard rules:
61
61
  - Include all four convergence categories (Full Consensus, Partial Consensus, Contested, Worker-Unique). Do not omit Contested or Worker-Unique findings.
62
62
  - Include a Round History sub-table in Section 1 (one row per executed round) and a `round2SkippedReason` line below it. When convergence is disabled, omit both. The values are quoted verbatim from `state/convergence-<task-type>-<seq>.json` — do not recompute.
63
63
  - Treat `verification-error` votes as their own verdict. They are listed in vote summaries as `verification-error`, not folded into AGREE/DISAGREE counts.
64
- - Include the per-agent execution status table and the token-usage summary section. All numbers come from `team-state-<task-type>-<seq>.json` (populated by `okstra-token-usage.py` at the start of Phase 7). Do not estimate or invent.
64
+ - Include the per-agent execution status table and the token-usage summary section. **Leave the 10 token-related `{{...}}` placeholders verbatim** (`{{LEAD_TOTAL_TOKENS}}`, `{{LEAD_BILLABLE_TOKENS}}`, `{{LEAD_COST_USD}}`, `{{WORKER_TOTAL_TOKENS}}`, `{{WORKER_BILLABLE_TOKENS}}`, `{{WORKER_COST_USD}}`, `{{GRAND_TOTAL_TOKENS}}`, `{{GRAND_BILLABLE_TOKENS}}`, `{{GRAND_COST_USD}}`, `{{CLI_COST_USD}}`). You run in Phase 6, but `team-state-<task-type>-<seq>.json` is populated by `okstra-token-usage.py` at the start of Phase 7 and the same Phase 7 invocation substitutes the placeholders via `--substitute-final-report`. Never replace these cells with `not-collected`, `N/A`, `--`, `0`, or any other sentinel — doing so deletes the substitution target and the report ships with no token numbers. Likewise do NOT append a note like "Phase 7 has not run yet"; that statement is unfalsifiable at write-time and is wrong by the time the report is shipped.
65
65
  - If only one analysis worker produced a usable result, perform a reduced-confidence write-up and say so explicitly.
66
66
  - If evidence is missing, write `I don't know` rather than fabricating confidence.
67
67
  - Cite file paths and line numbers for every code-evidence claim.