okstra 0.37.0 → 0.38.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/docs/kr/architecture.md +2 -2
- package/docs/kr/cli.md +3 -3
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/agents/SKILL.md +14 -12
- package/runtime/prompts/profiles/_common-contract.md +1 -1
- package/runtime/prompts/profiles/_implementation-verifier.md +1 -1
- package/runtime/python/lib/okstra/globals.sh +2 -2
- package/runtime/python/lib/okstra/usage.sh +4 -4
- package/runtime/python/okstra_ctl/run.py +2 -2
- package/runtime/skills/okstra-team-contract/SKILL.md +4 -4
package/docs/kr/architecture.md
CHANGED
|
@@ -257,7 +257,7 @@ Claude launch prompt 본문은 항상 `prompts/launch.template.md` 템플릿에
|
|
|
257
257
|
- 메인 Claude는 항상 `Claude lead`이며 synthesis-only로 동작합니다.
|
|
258
258
|
- 기본 required worker role은 `Claude worker`, `Codex worker`, `Report writer worker`입니다. `Gemini worker`는 옵션 워커로, `--workers` 또는 프로필의 `- Workers:` 섹션에 명시될 때만 required 로 포함됩니다.
|
|
259
259
|
- `Report writer worker`는 보고서 구조화와 근거 정리에 집중하지만 최종 synthesis owner는 여전히 `Claude lead`입니다.
|
|
260
|
-
- 기본 모델 계약은 중앙 기본값에서 계산합니다. 기본 fallback은 `Claude lead`=`opus
|
|
260
|
+
- 기본 모델 계약은 중앙 기본값에서 계산합니다. 기본 fallback은 `Claude lead`=`opus`, `Claude worker`=`opus`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`(opt-in 시 적용)이며, `Report writer worker`는 별도 override가 없으면 `Claude lead` 모델을 따릅니다(즉, 기본값에서는 `opus`).
|
|
261
261
|
- `Gemini worker`는 옵션이므로 명시 포함된 run에 한해서만 시도 대상이 됩니다.
|
|
262
262
|
- 최종 판단 전에는 현재 run의 worker roster 에 포함된 각 required role별로 결과 또는 명시적인 terminal status(`completed`, `timeout`, `error`, `not-run`)가 필요합니다.
|
|
263
263
|
- 시도된 worker(`completed`, `timeout`, `error`)는 현재 run의 `prompts/` 아래 assigned worker prompt history file을 반드시 가져야 합니다.
|
|
@@ -943,7 +943,7 @@ phase 산출물의 출고 가능 여부를 강제하는 진입점:
|
|
|
943
943
|
- run directory 내부는 `manifests/`, `state/`, `prompts/`, `reports/`, `status/`, `sessions/`, `worker-results/`처럼 유형별 하위 폴더로 구성되고, prompt snapshot은 `prompts/` 아래에 먼저 준비됩니다.
|
|
944
944
|
- worker 생성과 결과 취합은 Claude가 수행합니다.
|
|
945
945
|
- standard workflow는 `Claude lead` + 기본 worker `Claude worker`, `Codex worker`, `Report writer worker`를 사용하고, `Gemini worker`는 명시할 때만 포함되는 옵션입니다.
|
|
946
|
-
- worker 모델은 `--lead-model`, `--claude-model`, `--codex-model`, `--gemini-model`, `--report-writer-model`로 override할 수 있고, 기본값은 `OKSTRA_DEFAULT_*` 환경 변수에서 중앙 관리합니다. fallback 기본값은 `Claude lead`/`Report writer worker`=`opus
|
|
946
|
+
- worker 모델은 `--lead-model`, `--claude-model`, `--codex-model`, `--gemini-model`, `--report-writer-model`로 override할 수 있고, 기본값은 `OKSTRA_DEFAULT_*` 환경 변수에서 중앙 관리합니다. fallback 기본값은 `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`opus`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`입니다.
|
|
947
947
|
- `--task-type implementation` 에서는 Executor 역할을 맡을 provider 를 `--executor <claude|codex|gemini>` (또는 `OKSTRA_DEFAULT_EXECUTOR`, fallback `claude`) 로 선택합니다. Executor 만 프로젝트 파일을 mutate 할 수 있고, 나머지 두 provider 와 자기 자신의 provider 가 모두 별도 CLI 세션으로 verifier 로 dispatch 됩니다 (세션 분리만으로도 self-review 안전장치 유지). Executor 의 모델은 선택된 provider 의 worker 모델 플래그(`--claude-model` / `--codex-model` / `--gemini-model`) 를 그대로 재사용하며, run-manifest 의 `teamContract.executor` 블록에 provider / displayName / workerAgent / model 이 기록됩니다.
|
|
948
948
|
- Executor 별 worktree cwd 주입: codex / gemini executor 는 wrapper(`okstra-codex-exec.sh -C` / `okstra-gemini-exec.sh --include-directories`) 가 CLI layer 에서 cwd 를 worktree 로 고정합니다. Claude executor 는 Bash tool 에 per-call cwd 인자가 없어 cwd 민감 toolchain (`cargo`/`npm`/`pnpm`/`bun`/`pytest`/`make`/`go`) 호출을 같은 Bash invocation 안에서 `cd {{EXECUTOR_WORKTREE_PATH}} && <cmd>` 로 prefix 합니다 — `bash -lc`/`bash -c` 래핑은 금지되며 (`cd` leading token 이 가려져 permission auto-allow 우회 실패), 작업 디렉터리 플래그 (`git -C`, `cargo --manifest-path` 등) 가 있으면 그것을 우선합니다. 자세한 규약은 `prompts/profiles/implementation.md` 의 *Executor Worktree* 블록과 `agents/workers/claude-worker.md` 의 Executor exception 항목 참고.
|
|
949
949
|
- project-level current-task convenience pointer는 `.okstra/discovery/latest-task.json`입니다.
|
package/docs/kr/cli.md
CHANGED
|
@@ -302,12 +302,12 @@ scripts/okstra.sh --task-type implementation-planning --workers claude,codex --p
|
|
|
302
302
|
### `--claude-model`
|
|
303
303
|
|
|
304
304
|
`Claude worker`에 사용할 모델을 지정합니다.
|
|
305
|
-
지정하지 않으면 중앙 기본값 `OKSTRA_DEFAULT_CLAUDE_MODEL` 또는 fallback `
|
|
305
|
+
지정하지 않으면 중앙 기본값 `OKSTRA_DEFAULT_CLAUDE_MODEL` 또는 fallback `opus`을 사용합니다.
|
|
306
306
|
|
|
307
307
|
### `--lead-model`
|
|
308
308
|
|
|
309
309
|
`Claude lead`에 사용할 모델을 지정합니다.
|
|
310
|
-
지정하지 않으면 중앙 기본값 `OKSTRA_DEFAULT_LEAD_MODEL` 또는 fallback `opus
|
|
310
|
+
지정하지 않으면 중앙 기본값 `OKSTRA_DEFAULT_LEAD_MODEL` 또는 fallback `opus`을 사용합니다.
|
|
311
311
|
|
|
312
312
|
### `--codex-model`
|
|
313
313
|
|
|
@@ -337,7 +337,7 @@ fallback 기본값은 아래와 같습니다.
|
|
|
337
337
|
|
|
338
338
|
- `Claude lead`: `opus`
|
|
339
339
|
- `Report writer worker`: `opus`
|
|
340
|
-
- `Claude worker`: `
|
|
340
|
+
- `Claude worker`: `opus`
|
|
341
341
|
- `Codex worker`: `gpt-5.5`
|
|
342
342
|
- `Gemini worker`: `auto`
|
|
343
343
|
- Implementation executor: `claude` (즉 기본은 `Claude executor`)
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
package/runtime/agents/SKILL.md
CHANGED
|
@@ -100,19 +100,21 @@ These lines are the only structured signal the user has during a long run. Do NO
|
|
|
100
100
|
|
|
101
101
|
`okstra-run` (in-session) surfaces these lines to the user directly; the bash-spawned path leaves them in the session jsonl for post-hoc retrieval. Neither path requires any additional formatting from Lead — emit the literal `PROGRESS:` prefix and the rest of the line as plain text.
|
|
102
102
|
|
|
103
|
-
##
|
|
103
|
+
## Model assignments
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
**The lead never invents a model.** Every role's model is read from `task-manifest.json` → `resultContract.requiredWorkerRoles[*].modelExecutionValue` (and the lead model metadata). A missing assignment is a manifest defect, not a license to fall back — see [okstra-team-contract](./skills/okstra-team-contract/SKILL.md) "Model Assignment Rules". The manifest is always populated at run-prep time by the CLI, which seeds these values from `OKSTRA_DEFAULT_*_MODEL` (`scripts/okstra_ctl/run.py`).
|
|
106
106
|
|
|
107
|
-
|
|
108
|
-
|------|-------|---------------|-------|
|
|
109
|
-
| Claude lead | opus-4-6 | -- | orchestration + synthesis |
|
|
110
|
-
| Report writer worker | opus-4-6 | report-writer-worker | authors the final report file (`agents/report-writer-worker.md`) |
|
|
111
|
-
| Claude worker | sonnet | claude-worker | defined in `agents/claude-worker.md` |
|
|
112
|
-
| Codex worker | gpt-5.5 | codex-worker | defined in `agents/codex-worker.md` |
|
|
113
|
-
| Gemini worker | auto | gemini-worker | defined in `agents/gemini-worker.md` |
|
|
107
|
+
The table below documents those prep-time seed values **for reference only** — it is NOT a lead-applied fallback:
|
|
114
108
|
|
|
115
|
-
|
|
109
|
+
| Role | Seed model | subagent_type | Source definition |
|
|
110
|
+
|------|-----------|---------------|-------------------|
|
|
111
|
+
| Claude lead | opus | -- | orchestration + convergence supervision + final-report review/approval |
|
|
112
|
+
| Report writer worker | opus | report-writer-worker | `agents/workers/report-writer-worker.md` |
|
|
113
|
+
| Claude worker | opus | claude-worker | `agents/workers/claude-worker.md` |
|
|
114
|
+
| Codex worker | gpt-5.5 | codex-worker | generated from `agents/workers/_cli-wrapper-template.md` + `codex-worker.params.json` |
|
|
115
|
+
| Gemini worker | auto | gemini-worker | generated from `agents/workers/_cli-wrapper-template.md` + `gemini-worker.params.json` |
|
|
116
|
+
|
|
117
|
+
All three analysis workers use dedicated agent definitions; Codex/Gemini wrappers handle external CLI invocation internally; Claude worker runs as an in-process subagent with explicitly registered MCP tools so it does not fall back to `claude --mcp-cli` Bash invocations.
|
|
116
118
|
|
|
117
119
|
### Implementation phase: Executor binding
|
|
118
120
|
|
|
@@ -263,7 +265,7 @@ If convergence is disabled, proceed directly to Phase 6 with the raw worker resu
|
|
|
263
265
|
|
|
264
266
|
### Authoring ownership (BLOCKING)
|
|
265
267
|
|
|
266
|
-
If `Report writer worker` is in the selected roster (`recommendedWorkers` / `resultContract.requiredWorkerRoles`), **Lead MUST dispatch it to
|
|
268
|
+
If `Report writer worker` is in the selected roster (`recommendedWorkers` / `resultContract.requiredWorkerRoles`), **Lead MUST dispatch it to author the final report**. The worker writes the JSON SSOT at `runs/<task-type>/reports/final-report-<task-type>-<seq>.data.json` and invokes `scripts/okstra-render-final-report.py` to produce the sibling `final-report-<task-type>-<seq>.md` — Lead writes neither file. Lead's role in this phase is: prepare the report-writer prompt (carrying convergence output, all worker results, and reference expectations), dispatch, then review the produced files. See [okstra-report-writer](./skills/okstra-report-writer/SKILL.md) "File-author ownership".
|
|
267
269
|
|
|
268
270
|
Before constructing the dispatch prompt, the lead MUST:
|
|
269
271
|
|
|
@@ -290,7 +292,7 @@ If only one worker result is usable: reduced-confidence synthesis. If evidence i
|
|
|
290
292
|
|
|
291
293
|
After the Report writer worker draft is reviewed (or after the lead-authored fallback completes), **if** `task_type == "implementation-planning"` **and** `task-manifest.json` `convergence.planBodyVerification.enabled == true` (default), the lead MUST run one additional verification round on the consolidated plan body before declaring Phase 6 complete and entering Phase 7.
|
|
292
294
|
|
|
293
|
-
This is a Phase 6 sub-step — it does NOT introduce a new top-level lifecycle phase. The
|
|
295
|
+
This is a Phase 6 sub-step — it does NOT introduce a new top-level lifecycle phase. The lead operating-phase model (Phase 1 Intake → Phase 7 Persist, with the labels in the "Quick Reference" table above as the single source of truth) is preserved.
|
|
294
296
|
|
|
295
297
|
**REQUIRED SUB-SKILL:** Invoke [okstra-convergence](./skills/okstra-convergence/SKILL.md) "Plan-body verification mode (implementation-planning only)" for the round protocol, plan-item ID scheme (`P-Opt-*` / `P-Step-*` / `P-Dep-*` / `P-Val-*` / `P-Rb-*`), verdict semantics (`AGREE` / `DISAGREE(a-e)` / `SUPPLEMENT`), classification rules, gate-result resolution, and the state-file schema at `runs/<task-type>/state/plan-body-verification.json`.
|
|
296
298
|
|
|
@@ -8,7 +8,7 @@ profile document.
|
|
|
8
8
|
- Team contract (shared):
|
|
9
9
|
- `Claude lead` is synthesis-only and stays distinct from `Claude worker` (or, in `implementation`, the `Executor` and verifiers).
|
|
10
10
|
- `Report writer worker` is the **author** of the final-report file; `Claude lead` reviews and approves the produced draft and does NOT write the file itself (see `okstra-team-contract` and `okstra-report-writer` for the authoritative contract).
|
|
11
|
-
- default model assignments are resolved from centralised defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`
|
|
11
|
+
- default model assignments are resolved from centralised defaults; the fallback values are `Claude lead`/`Report writer worker`=`opus`, `Claude worker`=`opus`, `Codex worker`=`gpt-5.5`, `Gemini worker`=`auto`. Phase-specific overrides (e.g. `implementation`'s executor binding) live in the per-profile document.
|
|
12
12
|
- every required worker listed in the per-profile `Required workers:` block must be attempted; the final verdict waits until each has either a result or an explicit terminal status (`timeout`, `error`, `not-run`).
|
|
13
13
|
- unnamed generic parallel workers must not replace the required role roster, and no additional sub-agent dispatch is allowed beyond this roster.
|
|
14
14
|
- Worker interaction model (shared — read before inferring behaviour from the roster):
|
|
@@ -11,7 +11,7 @@ at Phase 5, BEFORE constructing the verifier worker dispatch prompts.
|
|
|
11
11
|
|
|
12
12
|
- The verifier slots are `Claude verifier` and `Codex verifier`, plus `Gemini verifier` **only when `gemini` is in the resolved `--workers` roster**. Every verifier in the resolved roster is dispatched regardless of which provider holds the executor role; the executor's own provider is run *separately* as a verifier (a fresh CLI session with no shared context) so that no verdict is produced from the same session that wrote the diff. Verifiers MUST NOT call Edit, Write, or any Bash command that mutates files outside the run's artifact directories. If a verifier wants a fix, it records the recommendation in its worker result; it does not apply the fix itself.
|
|
13
13
|
- Session isolation — not model-variant divergence — is the primary self-review safeguard: each verifier is a separate CLI invocation with its own context window, so reusing the same model variant for executor and same-provider verifier is acceptable. Different model variants (e.g. executor=opus / Claude verifier=sonnet) remain recommended when available.
|
|
14
|
-
- Phase-specific model defaults override the shared defaults: `Claude verifier`=`
|
|
14
|
+
- Phase-specific model defaults override the shared defaults: `Claude verifier`=`opus`, `Codex verifier`=`gpt-5.5`, `Gemini verifier`=`auto` (only when present in the roster). The `Executor`'s model is taken from the provider-specific worker model corresponding to `--executor`: claude→`--claude-model` (default `opus`), codex→`--codex-model` (default `gpt-5.5`), gemini→`--gemini-model` (default `auto`).
|
|
15
15
|
- Verifiers read from the SAME working tree path the Executor used so they observe the exact diff the Executor produced. Verifiers remain strictly read-only there.
|
|
16
16
|
|
|
17
17
|
## Verifier QA duties (independent re-run mandate)
|
|
@@ -154,8 +154,8 @@ GEMINI_WORKER_MODEL_EXECUTION_VALUE=""
|
|
|
154
154
|
REPORT_WRITER_MODEL=""
|
|
155
155
|
REPORT_WRITER_MODEL_EXECUTION_VALUE=""
|
|
156
156
|
DEFAULT_WORKERS="claude,codex,report-writer"
|
|
157
|
-
DEFAULT_LEAD_MODEL_NAME="${OKSTRA_DEFAULT_LEAD_MODEL:-opus
|
|
158
|
-
DEFAULT_CLAUDE_WORKER_MODEL_NAME="${OKSTRA_DEFAULT_CLAUDE_MODEL:-
|
|
157
|
+
DEFAULT_LEAD_MODEL_NAME="${OKSTRA_DEFAULT_LEAD_MODEL:-opus}"
|
|
158
|
+
DEFAULT_CLAUDE_WORKER_MODEL_NAME="${OKSTRA_DEFAULT_CLAUDE_MODEL:-opus}"
|
|
159
159
|
DEFAULT_CODEX_WORKER_MODEL_NAME="${OKSTRA_DEFAULT_CODEX_MODEL:-gpt-5.5}"
|
|
160
160
|
DEFAULT_GEMINI_WORKER_MODEL_NAME="${OKSTRA_DEFAULT_GEMINI_MODEL:-auto}"
|
|
161
161
|
DEFAULT_REPORT_WRITER_MODEL_NAME="${OKSTRA_DEFAULT_REPORT_WRITER_MODEL:-$DEFAULT_LEAD_MODEL_NAME}"
|
|
@@ -71,8 +71,8 @@ options:
|
|
|
71
71
|
--yes Skip interactive prompting and confirmation. Requires all required arguments.
|
|
72
72
|
--workers Comma-separated worker list for this run. Default: claude,codex,report-writer
|
|
73
73
|
(Gemini worker is optional; add `gemini` explicitly, e.g. --workers claude,codex,gemini,report-writer)
|
|
74
|
-
--lead-model Model for Claude lead. Default: OKSTRA_DEFAULT_LEAD_MODEL or opus
|
|
75
|
-
--claude-model Model for Claude worker. Default: OKSTRA_DEFAULT_CLAUDE_MODEL or
|
|
74
|
+
--lead-model Model for Claude lead. Default: OKSTRA_DEFAULT_LEAD_MODEL or opus
|
|
75
|
+
--claude-model Model for Claude worker. Default: OKSTRA_DEFAULT_CLAUDE_MODEL or opus
|
|
76
76
|
--codex-model Model for Codex worker. Default: OKSTRA_DEFAULT_CODEX_MODEL or gpt-5.5
|
|
77
77
|
--gemini-model Model for Gemini worker. Default: OKSTRA_DEFAULT_GEMINI_MODEL or auto
|
|
78
78
|
--report-writer-model
|
|
@@ -98,9 +98,9 @@ options:
|
|
|
98
98
|
-h, --help Show this help.
|
|
99
99
|
|
|
100
100
|
model defaults:
|
|
101
|
-
Claude lead: OKSTRA_DEFAULT_LEAD_MODEL or opus
|
|
101
|
+
Claude lead: OKSTRA_DEFAULT_LEAD_MODEL or opus
|
|
102
102
|
Report writer worker: OKSTRA_DEFAULT_REPORT_WRITER_MODEL or Claude lead default
|
|
103
|
-
Claude worker: OKSTRA_DEFAULT_CLAUDE_MODEL or
|
|
103
|
+
Claude worker: OKSTRA_DEFAULT_CLAUDE_MODEL or opus
|
|
104
104
|
Codex worker: OKSTRA_DEFAULT_CODEX_MODEL or gpt-5.5
|
|
105
105
|
Gemini worker: OKSTRA_DEFAULT_GEMINI_MODEL or auto
|
|
106
106
|
Implementation executor: OKSTRA_DEFAULT_EXECUTOR or claude (one of: claude | codex | gemini)
|
|
@@ -667,8 +667,8 @@ def prepare_task_bundle(inp: PrepareInputs) -> PrepareOutputs:
|
|
|
667
667
|
pr_template_source = resolved_tpl.source
|
|
668
668
|
|
|
669
669
|
# ---- model assignments ----
|
|
670
|
-
lead_default = _default("OKSTRA_DEFAULT_LEAD_MODEL", "opus
|
|
671
|
-
claude_default = _default("OKSTRA_DEFAULT_CLAUDE_MODEL", "
|
|
670
|
+
lead_default = _default("OKSTRA_DEFAULT_LEAD_MODEL", "opus")
|
|
671
|
+
claude_default = _default("OKSTRA_DEFAULT_CLAUDE_MODEL", "opus")
|
|
672
672
|
codex_default = _default("OKSTRA_DEFAULT_CODEX_MODEL", "gpt-5.5")
|
|
673
673
|
gemini_default = _default("OKSTRA_DEFAULT_GEMINI_MODEL", "auto")
|
|
674
674
|
report_writer_default = _default("OKSTRA_DEFAULT_REPORT_WRITER_MODEL", lead_default)
|
|
@@ -24,10 +24,10 @@ okstra tasks are always operated using the `Claude lead` + required worker team
|
|
|
24
24
|
| Role | Core responsibility | Specialization lens (Section 6 only) | subagent_type | Notes |
|
|
25
25
|
|------|------|------|---------------|------|
|
|
26
26
|
| Claude lead | orchestration + convergence supervision + final-report review/approval | — | -- | Does NOT author the final-report file when `Report writer worker` is in the roster |
|
|
27
|
-
| Claude worker | Answer every brief question across feasibility, requirement interpretation, hidden assumptions, and alternatives — with file:line evidence | broad reasoning depth, hidden assumptions, execution-risk surfacing | claude-worker | `agents/claude-worker.md` |
|
|
28
|
-
| Codex worker | Same core responsibility as Claude worker — identical questions, identical sections 1–5 | implementation realism, code-path implications, edge cases, technical trade-offs | codex-worker | `agents/codex-worker.
|
|
29
|
-
| Gemini worker | Same core responsibility as Claude worker — identical questions, identical sections 1–5 | requirement interpretation, consistency, safety, alternative viewpoints | gemini-worker | `agents/gemini-worker.
|
|
30
|
-
| Report writer worker | **Authors** the final-report file in Phase 6. NOT an analysis worker. | — | report-writer-worker | `agents/report-writer-worker.md`. Excluded from Phase 4/5 and convergence |
|
|
27
|
+
| Claude worker | Answer every brief question across feasibility, requirement interpretation, hidden assumptions, and alternatives — with file:line evidence | broad reasoning depth, hidden assumptions, execution-risk surfacing | claude-worker | `agents/workers/claude-worker.md` |
|
|
28
|
+
| Codex worker | Same core responsibility as Claude worker — identical questions, identical sections 1–5 | implementation realism, code-path implications, edge cases, technical trade-offs | codex-worker | generated from `agents/workers/_cli-wrapper-template.md` + `codex-worker.params.json` |
|
|
29
|
+
| Gemini worker | Same core responsibility as Claude worker — identical questions, identical sections 1–5 | requirement interpretation, consistency, safety, alternative viewpoints | gemini-worker | generated from `agents/workers/_cli-wrapper-template.md` + `gemini-worker.params.json` |
|
|
30
|
+
| Report writer worker | **Authors** the final-report file in Phase 6. NOT an analysis worker. | — | report-writer-worker | `agents/workers/report-writer-worker.md`. Excluded from Phase 4/5 and convergence |
|
|
31
31
|
|
|
32
32
|
**Model assignment has no default.** The model for every role comes from `resultContract.requiredWorkerRoles[*].modelExecutionValue` in `task-manifest.json` (and lead model metadata). There is no per-role hard-coded fallback — see "Model Assignment Rules" below.
|
|
33
33
|
|