okstra 0.223.2 → 0.225.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/dist/commands/execute/render-bundle.mjs +7 -5
- package/dist/commands/execute/render-bundle.mjs.map +1 -1
- package/docs/cli.md +10 -2
- package/package.json +1 -1
- package/runtime/BUILD.json +2 -2
- package/runtime/bin/lib/okstra/cli.sh +5 -1
- package/runtime/bin/lib/okstra/globals.sh +1 -0
- package/runtime/bin/lib/okstra/usage.sh +4 -1
- package/runtime/bin/okstra-provider-exec.py +32 -16
- package/runtime/bin/okstra.sh +1 -0
- package/runtime/prompts/coding-preflight/clean-code.md +8 -1
- package/runtime/prompts/duties/code-reviewer.json +5 -3
- package/runtime/prompts/wizard/prompts.ko.json +10 -0
- package/runtime/python/okstra_ctl/adapters/providers/claude/adapter.py +2 -0
- package/runtime/python/okstra_ctl/adapters/providers/codex/adapter.py +3 -1
- package/runtime/python/okstra_ctl/adapters/providers/grok/adapter.py +6 -0
- package/runtime/python/okstra_ctl/adapters/providers/zai/adapter.py +5 -1
- package/runtime/python/okstra_ctl/agent/prompt_cli/results.py +25 -0
- package/runtime/python/okstra_ctl/code_review_coverage.py +213 -0
- package/runtime/python/okstra_ctl/code_review_target.py +31 -2
- package/runtime/python/okstra_ctl/coverage_census.py +2 -2
- package/runtime/python/okstra_ctl/dispatch_core.py +15 -0
- package/runtime/python/okstra_ctl/domain/worker_exec.py +6 -0
- package/runtime/python/okstra_ctl/incremental_carry.py +10 -16
- package/runtime/python/okstra_ctl/phases/final_verification/profile.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-diff-review.md +1 -1
- package/runtime/python/okstra_ctl/phases/implementation/instructions/_implementation-verifier.md +2 -2
- package/runtime/python/okstra_ctl/phases/implementation_planning/authoring.py +164 -33
- package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +27 -3
- package/runtime/python/okstra_ctl/phases/implementation_planning/plan_body.py +33 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/profile.md +1 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/round_completion.py +177 -0
- package/runtime/python/okstra_ctl/plan_item_evidence.py +237 -0
- package/runtime/python/okstra_ctl/plan_items.py +12 -9
- package/runtime/python/okstra_ctl/plan_review_context.py +82 -0
- package/runtime/python/okstra_ctl/render.py +2 -0
- package/runtime/python/okstra_ctl/run.py +23 -2
- package/runtime/python/okstra_ctl/team.py +12 -18
- package/runtime/python/okstra_ctl/verdict_blocks.py +17 -1
- package/runtime/python/okstra_ctl/wizard/__init__.py +1 -0
- package/runtime/python/okstra_ctl/wizard/confirmation.py +2 -0
- package/runtime/python/okstra_ctl/wizard/engine.py +26 -5
- package/runtime/python/okstra_ctl/wizard/ids.py +3 -0
- package/runtime/python/okstra_ctl/wizard/registry.py +13 -0
- package/runtime/python/okstra_ctl/wizard/render.py +1 -0
- package/runtime/python/okstra_ctl/wizard/state.py +8 -0
- package/runtime/python/okstra_ctl/wizard/steps_identity.py +99 -16
- package/runtime/python/okstra_ctl/wizard/steps_options.py +52 -1
- package/runtime/python/okstra_ctl/wizard/steps_plan.py +14 -0
- package/runtime/python/okstra_ctl/worker_dispatch.py +9 -0
- package/runtime/python/okstra_ctl/worker_request.py +12 -1
- package/runtime/schemas/execution-manifest-v2.schema.json +1 -0
- package/runtime/schemas/final-report-v2.0.schema.json +3 -1
- package/runtime/schemas/final-report-v3.0.schema.json +3 -1
- package/runtime/skills/_fragments/bash-invocation-rule.md +1 -1
- package/runtime/skills/_fragments/host-question-interface.md +1 -0
- package/runtime/skills/_fragments/host-runtime-selection.md +1 -0
- package/runtime/skills/_fragments/wizard-bash-invocation-rule.md +1 -1
- package/runtime/skills/_fragments/wizard-preflight.md +1 -1
- package/runtime/skills/_fragments/wizard-render-bundle.md +4 -4
- package/runtime/skills/okstra-brief-gen/SKILL.md +45 -47
- package/runtime/skills/okstra-brief-gen/references/reporter-confirmations.md +3 -3
- package/runtime/skills/okstra-brief-gen/references/tracker-recursion.md +1 -1
- package/runtime/skills/okstra-chat/SKILL.md +1 -1
- package/runtime/skills/okstra-code-review/SKILL.md +26 -15
- package/runtime/skills/okstra-code-review/references/census-rules.md +38 -2
- package/runtime/skills/okstra-code-review/references/review-calibration.md +39 -15
- package/runtime/skills/okstra-container-build/SKILL.md +6 -2
- package/runtime/skills/okstra-discussion/SKILL.md +6 -6
- package/runtime/skills/okstra-inspect/SKILL.md +5 -3
- package/runtime/skills/okstra-manager/SKILL.md +8 -4
- package/runtime/skills/okstra-memory/SKILL.md +1 -1
- package/runtime/skills/okstra-pr-gen/SKILL.md +10 -6
- package/runtime/skills/okstra-rollup/SKILL.md +6 -2
- package/runtime/skills/okstra-run/SKILL.md +8 -7
- package/runtime/skills/okstra-schedule-gen/SKILL.md +13 -6
- package/runtime/skills/okstra-setup/SKILL.md +8 -4
- package/runtime/skills/okstra-setup/references/project-config.md +3 -3
- package/runtime/skills/okstra-usage/SKILL.md +5 -1
- package/runtime/skills/okstra-user-response/SKILL.md +7 -3
|
@@ -4,10 +4,9 @@ import { resolveRuntime } from "../../lib/host-registry-client.mjs";
|
|
|
4
4
|
const USAGE = `okstra render-bundle — preview the task bundle without launching a lead
|
|
5
5
|
|
|
6
6
|
This is a thin shim over \`python3 -m okstra_ctl.run\` that forces
|
|
7
|
-
\`--render-only\`.
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
actually creating the run-state or spawning the launcher.
|
|
7
|
+
\`--render-only\`. It prepares the run state and task artifacts without
|
|
8
|
+
launching a new lead process. Add --summary-only to keep the artifact paths
|
|
9
|
+
and preparation status in stdout without repeating the saved lead prompt.
|
|
11
10
|
|
|
12
11
|
Usage:
|
|
13
12
|
okstra render-bundle --project-root <dir> --project-id <id> \\
|
|
@@ -23,14 +22,17 @@ Usage:
|
|
|
23
22
|
[--clarification-response <path>] [--work-category <cat>] \\
|
|
24
23
|
[--selected-direction <selection-final-report.md>] \\
|
|
25
24
|
[--stage <auto|N>] [--stages <csv>] [--pr-template-path <path>] \\
|
|
26
|
-
[--fix-cycle <yes|no>] [--discussion-start <link|text|task-key>]
|
|
25
|
+
[--fix-cycle <yes|no>] [--discussion-start <link|text|task-key>] \\
|
|
26
|
+
[--reasoning-effort <low|medium|high|xhigh>] [--summary-only]
|
|
27
27
|
|
|
28
|
+
--summary-only omit the lead prompt body; preparation and validation are unchanged
|
|
28
29
|
--stage implementation / final-verification only
|
|
29
30
|
--stages release-handoff only: PR stage bundle csv (empty = whole-task)
|
|
30
31
|
--lead-runtime registered host ID or alias
|
|
31
32
|
--pr-template-path release-handoff only
|
|
32
33
|
--fix-cycle entry phase only: record this re-entry of a done task as a
|
|
33
34
|
bug-fix cycle (yes opens/continues the cycle)
|
|
35
|
+
--reasoning-effort effort every claude, codex and grok worker CLI is started with
|
|
34
36
|
--analysis-target feature-analysis only: required target identifier or text
|
|
35
37
|
--evidence-inputs analysis task types except project-analysis: report path csv
|
|
36
38
|
--discussion-start discussion only, required there: a ticket or project link,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"render-bundle.mjs","sourceRoot":"","sources":["../../../src/commands/execute/render-bundle.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,MAAM,KAAK,GAAG
|
|
1
|
+
{"version":3,"file":"render-bundle.mjs","sourceRoot":"","sources":["../../../src/commands/execute/render-bundle.mts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,MAAM,KAAK,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,CAClB,UAAU,CAAC,uEAAuE,CACnF,CAAC;YACF,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IAED,MAAM,gBAAgB,GAAG,aAAa,CAAC,IAAI,EAAE,gBAAgB,CAAC,IAAI,MAAM,CAAC;IACzE,MAAM,iBAAiB,GAAG,MAAM,cAAc,CAAC;QAC7C,gBAAgB;QAChB,OAAO,EAAE,QAAQ;QACjB,GAAG,EAAE,OAAO,CAAC,GAAG;KACjB,CAAC,CAAC;IACH,IAAI,CAAC,iBAAiB,CAAC,EAAE,EAAE,CAAC;QAC1B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,iBAAiB,CAAC,MAAM,IAAI,CAAC,CAAC;QAC7D,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,eAAe,GAAG,iBAAiB,CAAC,eAAe,CAAC;IAC1D,IAAI,eAAe,KAAK,IAAI,EAAE,CAAC;QAC7B,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,sDAAsD,CAAC,CAAC;QAC7E,OAAO,CAAC,CAAC;IACX,CAAC;IAED,MAAM,SAAS,GAAG,qBAAqB,CACrC,IAAI,EACJ,KAAK,CAAC,SAAS,EACf,iBAAiB,CAClB,CAAC;IAEF,MAAM,MAAM,GAAG,MAAM,eAAe,CAAC;QACnC,MAAM,EAAE,gBAAgB;QACxB,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,gBAAgB;KACxB,CAAC,CAAC;IACH,OAAO,MAAM,CAAC,IAAI,CAAC;AACrB,CAAC"}
|
package/docs/cli.md
CHANGED
|
@@ -30,6 +30,7 @@ The Node CLI requires Node.js 22 or newer. Its TypeScript sources are compiled f
|
|
|
30
30
|
- [`--evidence-inputs`](#--evidence-inputs)
|
|
31
31
|
- [`--directive`](#--directive)
|
|
32
32
|
- [`--fix-cycle`](#--fix-cycle)
|
|
33
|
+
- [`--reasoning-effort`](#--reasoning-effort)
|
|
33
34
|
- [`--role-count`](#--role-count)
|
|
34
35
|
- [`--role-model`](#--role-model)
|
|
35
36
|
- [`--lead-runtime`](#--lead-runtime)
|
|
@@ -61,7 +62,7 @@ The Node CLI requires Node.js 22 or newer. Its TypeScript sources are compiled f
|
|
|
61
62
|
Base command for initial entry with full arguments:
|
|
62
63
|
|
|
63
64
|
```bash
|
|
64
|
-
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] [--terminal-backend cmux-pane|cli-wrapper] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<modelRef>] [--lead-runtime <host-id-or-alias>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--executor claude|codex|antigravity|grok|kimi] [--critic claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--base-ref <branch|tag|sha>] [--clarification-response <previous-final-report>] [--selected-direction <selection-final-report.md>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> (--task-brief <brief-path> | --discussion-start <start-input>) [--directive <directive>] [--fix-cycle <yes|no>]
|
|
65
|
+
scripts/okstra.sh [--render-only] [--yes] [--no-plan-verification] [--terminal-backend cmux-pane|cli-wrapper] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<modelRef>] [--lead-runtime <host-id-or-alias>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--executor claude|codex|antigravity|grok|kimi] [--critic claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] [--work-category bugfix|feature|refactor|ops|improvement|unknown] [--base-ref <branch|tag|sha>] [--clarification-response <previous-final-report>] [--selected-direction <selection-final-report.md>] [--approved-plan <plan-path>] [--approve] --project-id <project-id> --task-group <task-group> --task-id <task-id> (--task-brief <brief-path> | --discussion-start <start-input>) [--directive <directive>] [--fix-cycle <yes|no>] [--reasoning-effort low|medium|high|xhigh]
|
|
65
66
|
```
|
|
66
67
|
|
|
67
68
|
Analysis input ownership is narrower than the base shell command. The `/okstra-run` wizard collects `--analysis-target` and `--evidence-inputs` values and passes them internally to `node bin/okstra render-bundle`. `scripts/okstra.sh` does not accept either flag. Because `feature-analysis` requires a target, start that task type with the in-host skill; the two option sections below document the internal Node render inputs, not standalone shell options.
|
|
@@ -443,6 +444,12 @@ scripts/okstra.sh --task-type implementation-planning ... \
|
|
|
443
444
|
- `--fix-cycle <yes|no>` records whether re-entry into an entry phase (`requirements-discovery` / `error-analysis` / `implementation-option-selection` / `implementation-planning`) after completion through release-handoff is a bug-fix cycle. When omitted, no cycle is recorded. The `fix_cycle_confirm` step in the okstra-run wizard accepts the same input.
|
|
444
445
|
- `yes` opens a new cycle only when both conditions hold: the task type is an entry phase, and the manifest's `workflow.lastCompletedPhase` is `release-handoff` with delivery finished — a release-handoff that ended in `skip` or left a stage's PR `skipped` points the next phase back at `release-handoff`, and that task is refused. Preparation rejects the request if either condition is false. Once a cycle is open, later runs for the same task attach to it automatically without this flag.
|
|
445
446
|
|
|
447
|
+
### `--reasoning-effort`
|
|
448
|
+
|
|
449
|
+
- `--reasoning-effort <low|medium|high|xhigh>` sets the reasoning effort of every worker CLI the run starts. The value is stored as `reasoningEffort` in the run manifest, and `okstra-provider-exec.py` passes it on each dispatch: `--effort` to claude, `-c model_reasoning_effort=` to codex, and `--reasoning-effort` to grok. The `reasoning_effort` step in the okstra-run wizard asks for the same value after the role screens.
|
|
450
|
+
- When omitted, each CLI keeps its own configuration, and codex keeps the catalog's `high` for `gpt-6.1-sol`.
|
|
451
|
+
- antigravity, kimi and zai do not receive it. antigravity encodes the effort in the model identity (`gemini-3.8-flash-high`) and rejects `--effort` beside it, and that identity is fixed when roles are assigned. Whether the kimi CLI and z.ai's endpoint accept an effort setting has not been verified.
|
|
452
|
+
|
|
446
453
|
### `--lead-runtime`
|
|
447
454
|
|
|
448
455
|
Selects a lead adapter by registered host ID or alias. The default is `claude-code`. Terminal `okstra run <host-id-or-alias>` requests the same registry entry and verifies its `spawn-process` readiness before launch; an unavailable selected host is never replaced silently.
|
|
@@ -903,11 +910,12 @@ The `okstra` Node CLI (`bin/okstra`) provides both installer/admin commands and
|
|
|
903
910
|
| `okstra incremental-scope <args…>` | Decide re-verify vs carry-forward scope for an `implementation-planning` clarification re-run. Thin shim into `scripts/okstra_ctl/incremental_scope.py` (deterministic): it reads the dependency graph from the prior run `data.json`'s `implementationPlanning.stageMap` and returns `mode:"incremental"` only when the base-ref SHA is unchanged and the affected stages' `downstream_stage_closure` covers at most half of all stages; `--full-reason` (selected option / Stage Map / approach) still forces `mode:"full"`. An answered `C-NNN` that traces to no stage returns `mode:"unresolved"` rather than full — pass `--impacted` with the stage numbers or `--full-reason`. `--run-manifest <path>` is required for a decision (not for `--preview`): the same decision is written to the record that manifest names in `incrementalDecisionPath`, so the report writer's authoring contract and `okstra incremental-carry` read it instead of CSVs the lead re-typed. `mode: "unresolved"` is a question back to the lead and is deliberately not recorded. `--preview --prev-data <path> --answered-clarifications <csv>` runs the link half alone — no base SHA, no side effects — and prints `{wouldForceFull, unlinkedIds, reason}`; unlinked ids set `wouldForceFull: false` and fill `unlinkedIds` |
|
|
904
911
|
| `okstra incremental-carry <args…>` | Merge carried-forward plan-item verdicts into an incremental re-run. Contract v3 takes `--prev-data`, `--cur-narrative`, and the convergence-owned `--state`; it verifies carried stage rows and writes only `--out-state`, tagging copied verdicts with `carriedForwardFromSeq`. Pass `--decision <incrementalDecisionPath>` for the two stage sets — the same record the report writer's authoring contract was built from — instead of `--carry-stages` / `--reverify-stages`, which the lead re-typed off stdout; the two forms cannot be combined, and a record whose `mode` is not `incremental` is refused. Unchanged `P-Val-*` / `P-Req-*` / `P-Rb-*` rows whose extract hash still matches are carried the same way, and the sibling `plan-items-*.json` `dispatchQueue` is rewritten to match. The historical v2 `--cur-data --out` form remains readable. Ownership, scope, item, or schema drift raises `CarryError` and forces a full fallback. |
|
|
905
912
|
| `okstra code-review target --task-key <k> --stage <N> [--project-root <dir>] [--cwd <dir>] [--json]` / `okstra code-review target --branch <name> [--base <ref>] [--date <YYYY-MM-DD>] [--project-root <dir>] [--cwd <dir>] [--json]` | Resolve what a code review reads and where its result file goes. Output is always JSON, so `--json` only makes that explicit. `--project-root` and `--cwd` are shared pre-dispatch arguments and apply to both modes; `--cwd` is only consulted when `--project-root` is absent. Both modes return `{ ok, projectRoot, mode, worktreePath, branch, baseCommit, headCommit, reviewPath, round }`; stage mode additionally returns `taskKey`, `taskRoot`, and `stage`. Stage mode takes the diff base from the `base_ref` recorded on that stage's worktree-registry row when it was provisioned — not from a rule re-applied at review time — and names the result `.okstra/tasks/<task-group>/<task-id>/code-reviews/stage-<NN>.md`, where a re-review of the same stage becomes `-r2`, `-r3`, … (the `round` field). Only a legacy row provisioned before `base_ref` was recorded falls back to re-deriving the base through `stage_targets`, and a failure there is reported as `stage_base_unresolved`. `worktreePath` comes back empty whenever the stage worktree is not usable as a live checkout — the registry row is no longer `active` (whole-task final-verification released it), the row never carried a path, or the recorded directory is gone — and the review then reads the `branch` ref instead. Branch mode uses `--base` when given, otherwise the merge-base with the default branch (`refs/remotes/origin/HEAD`, else `main`/`master`), and names the result `.project-docs/code-reviews/<branch>/<YYYY-MM-DD>-<NN>.md`, where `<NN>` (the `round` field) is the next sequence number for that date — the highest already on disk plus one. Read-only: it resolves paths and creates no directory and no file, so the review directory does not exist until the caller writes the report. Backend for the okstra-code-review skill |
|
|
913
|
+
| `okstra code-review check-coverage --project-root <dir> --census <table-path> --completion <completion-path> [--completion <gap-fill-path> ...]` | Audits compact grouped-cell verdicts from one reviewer's verified standalone completions. Rejects changed model assignments or invalid evidence (exit 2); lists missing/unknown IDs (exit 1); complete usable coverage exits 0. The census has `## Rules` (Rule, Group, Reference) and `## Cells` (Cell, Target, Group) tables. Each result row explicitly accounts for the group's rules through Checked, N/A and Findings, with one existing target-source path:line. Missing rules are reported without expanding a target-by-bullet table; the lead audits selected references and semantic truth. |
|
|
906
914
|
| `okstra set-work-status <token> <todo\|in-progress\|blocked\|done> [--note <text> \| --note-file <path>] [--task-group <g>] [--project-root <dir>]` | Update user-managed `workStatus`. Existing briefs can be registered without a run. Direct completion requires a work and verification summary; use a UTF-8 note file for longer results. Records are shared through group context, inspect, and subsequent runs without claiming cross-verification. Ambiguous IDs return `matches[]`. A `share` failure with `statusRecorded:true` can be retried with the same command. |
|
|
907
915
|
| `okstra worktree-lookup <project-id> <task-group> <task-id>` | Return the `worktree_registry.lookup` result: reserved path, branch, base ref, and current status |
|
|
908
916
|
| `okstra worktree-status [--path <dir>] [--check-clean]` | Answer "is this worktree clean?" over source paths only, excluding what okstra provisioned there — `.okstra`, the configured sync entries (`.project-docs`, `.claude`, …), and any nested stage worktree. A bare `git status --porcelain` in a task worktree is never empty for that reason, so a plan step asserting a clean tree with one fails on okstra's scaffolding instead of on the stage's own work; this is the same gate `handoff` and stage integration use. Output is JSON `{ ok, path, clean, entries, excluded }` where `entries` holds the `git status --short` rows that made it dirty. Exit code is 0 regardless unless `--check-clean` is given, which exits 1 on a dirty tree so it can stand as a shell assertion (`okstra worktree-status --check-clean`). okstra writes `stage-<N>-exit` itself when it settles the stage, so a plan step must not tag. A path outside a git work tree exits 2 rather than reporting a clean tree |
|
|
909
917
|
| `okstra plan-validate <plan-path>` | Run `_validate_approved_plan` and report frontmatter `approved` recognition plus unresolved Blocks=approval rows |
|
|
910
|
-
| `okstra render-bundle <args…> [--stage <auto\|N>] [--stages <csv>]` | Thin shim over `prepare_task_bundle(render_only=True)` with the same signature as `python3 -m okstra_ctl.run --render-only`. `--stage` is for `implementation` and `final-verification`: for implementation, `auto` (default) selects the earliest incomplete stage with satisfied dependencies, while `<N>` forces a stage; for final-verification, `<N>` verifies one stage with artifacts under `runs/final-verification/stage-<N>/` and a `-fv-s<N>` team suffix, while an empty value performs whole-task verification with the flat layout. The separate `--stages <csv>` channel is for `release-handoff`: it names the stages to open a PR for, one PR per stage, and an empty value takes every eligible stage. Preparation enforces eligibility—`done` + accepted `verified` + not yet `pr`—and automatically creates an input document that cites verification reports. `--discussion-start <link\|text\|task-key>` is for `discussion`, which takes no `--task-brief`: prepare records the start input in the task's discussion record and writes the input document from it |
|
|
918
|
+
| `okstra render-bundle <args…> [--stage <auto\|N>] [--stages <csv>] [--summary-only]` | Thin shim over `prepare_task_bundle(render_only=True)` with the same signature as `python3 -m okstra_ctl.run --render-only`. `--summary-only` omits the lead prompt body from stdout while preserving preparation status, artifact paths, concurrency warnings, and all saved artifacts; default output still includes the full prompt. `--stage` is for `implementation` and `final-verification`: for implementation, `auto` (default) selects the earliest incomplete stage with satisfied dependencies, while `<N>` forces a stage; for final-verification, `<N>` verifies one stage with artifacts under `runs/final-verification/stage-<N>/` and a `-fv-s<N>` team suffix, while an empty value performs whole-task verification with the flat layout. The separate `--stages <csv>` channel is for `release-handoff`: it names the stages to open a PR for, one PR per stage, and an empty value takes every eligible stage. Preparation enforces eligibility—`done` + accepted `verified` + not yet `pr`—and automatically creates an input document that cites verification reports. `--discussion-start <link\|text\|task-key>` is for `discussion`, which takes no `--task-brief`: prepare records the start input in the task's discussion record and writes the input document from it |
|
|
911
919
|
| `okstra profile show <task-type> [--resolved]` | Print a phase profile. `--resolved` expands its `{{INCLUDE:}}` targets and appends the lazy-read sidecars named in the profile body — transitively, because sidecars name sidecars of their own (`_implementation-executor.md` points at the coding-conventions preflight, the diff-review sweep, and the completion self-check). That matters because a profile is assembled from three places, so grepping only the top-level file returns false negatives: `grep clarification scripts/okstra_ctl/phases/implementation/profile.md` finds nothing while the assembled profile has many hits. One grep over this output answers whether a task-type covers a rule. The sidecar list is read from the profile body, never hard-coded, so a newly added sidecar is picked up without a code change. Read-only: it writes no manifest and registers no run, which is what separates it from `render-bundle` — `render-bundle` answers the same question but records a run in `recent.jsonl`, so it cannot be used to look something up. Exits 2 for an unknown task-type |
|
|
912
920
|
| `okstra codex-run <args…>` | Codex lead-adapter dry-run entry point. Accepts the same arguments as `render-bundle` but owns `--render-only --lead-runtime codex`. It prepares the task bundle and prints the prompt for the Codex lead without dispatching workers |
|
|
913
921
|
| `okstra worker-dispatch --project-root <dir> --run-manifest <path> [--workers <csv>] [--dry-run]` | Provider-neutral deterministic dispatcher for `runner=cli-wrapper` assignments. It verifies each adjacent invocation specification against the immutable run manifest immediately before process creation and records `core-pre-dispatch`; native-session rows stay with the host. The default selects CLI analysis assignments only. Phase 6 uses explicit `--workers report-writer`, and a mixed analysis/report batch is rejected. `--dry-run` performs the same verification and resolution without starting a provider process. A real dispatch records the lead checkpoints it owns in the run's lead-events ledger and returns them as `progressLines`: `phase-3-team-create` when it writes the implicit-team marker, `phase-4-dispatch` for each `initial` job, `phase-6-synthesis` on the first report-writer dispatch, and `phase-5-collect` for each `initial` dispatch it settled. |
|
package/package.json
CHANGED
package/runtime/BUILD.json
CHANGED
|
@@ -190,6 +190,10 @@ while [[ $# -gt 0 ]]; do
|
|
|
190
190
|
FIX_CYCLE="$(require_option_value --fix-cycle "${2-}")"
|
|
191
191
|
shift 2
|
|
192
192
|
;;
|
|
193
|
+
--reasoning-effort)
|
|
194
|
+
REASONING_EFFORT="$(require_option_value --reasoning-effort "${2-}")"
|
|
195
|
+
shift 2
|
|
196
|
+
;;
|
|
193
197
|
--clarification-response)
|
|
194
198
|
CLARIFICATION_RESPONSE_PATH="$(require_option_value --clarification-response "${2-}")"
|
|
195
199
|
shift 2
|
|
@@ -256,7 +260,7 @@ while [[ $# -gt 0 ]]; do
|
|
|
256
260
|
printf ' hint: did you mean --task-id?\n' >&2
|
|
257
261
|
;;
|
|
258
262
|
esac
|
|
259
|
-
printf ' valid options: --render-only --resume-clarification --yes --role-count --role-model --lead-provider --lead-model --claude-model --codex-model --antigravity-model --worker-model --report-writer-provider --report-writer-model --lead-runtime --executor --critic --related-tasks --work-category --task-type --project-id --project-root --task-group --task-id --task-brief --discussion-start --directive --base-ref --fix-cycle --clarification-response --selected-direction --task-key --approved-plan --approve --implementation-option --stage --stages --qa-waiver --no-plan-verification -h|--help\n' >&2
|
|
263
|
+
printf ' valid options: --render-only --resume-clarification --yes --role-count --role-model --lead-provider --lead-model --claude-model --codex-model --antigravity-model --worker-model --report-writer-provider --report-writer-model --lead-runtime --executor --critic --related-tasks --work-category --task-type --project-id --project-root --task-group --task-id --task-brief --discussion-start --directive --base-ref --fix-cycle --reasoning-effort --clarification-response --selected-direction --task-key --approved-plan --approve --implementation-option --stage --stages --qa-waiver --no-plan-verification -h|--help\n' >&2
|
|
260
264
|
usage
|
|
261
265
|
exit 1
|
|
262
266
|
;;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
usage() {
|
|
4
4
|
cat >&2 <<USAGE_EOF
|
|
5
5
|
usage:
|
|
6
|
-
$DISPLAY_COMMAND_NAME [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<provider/model>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--lead-runtime <host-id-or-alias>] [--executor claude|codex|antigravity] [--critic off|claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] --project-id <project-id> [--project-root <path>] --task-group <task-group> --task-id <task-id> (--task-brief <brief-path> | --discussion-start <start-input>) [--directive <directive>] [--fix-cycle <yes|no>]
|
|
6
|
+
$DISPLAY_COMMAND_NAME [--render-only] [--yes] [--no-plan-verification] --task-type <task-type> [--role-count <role>=<N>] [--role-model <role>=<provider/model>] [--lead-provider <provider>] [--lead-model <model>] [--worker-model provider=model,...] [--report-writer-provider <provider>] [--report-writer-model <model>] [--lead-runtime <host-id-or-alias>] [--executor claude|codex|antigravity] [--critic off|claude|codex|antigravity|grok|kimi] [--related-tasks taskA,taskB] --project-id <project-id> [--project-root <path>] --task-group <task-group> --task-id <task-id> (--task-brief <brief-path> | --discussion-start <start-input>) [--directive <directive>] [--fix-cycle <yes|no>] [--reasoning-effort low|medium|high|xhigh]
|
|
7
7
|
|
|
8
8
|
summary:
|
|
9
9
|
$DISPLAY_TOOL_NAME prepares a task-keyed instruction bundle. The standalone launcher defaults to an interactive Claude session; in-host skills keep the current registered host session as the native lead.
|
|
@@ -39,6 +39,9 @@ optional arguments:
|
|
|
39
39
|
release-handoff, decide whether to record this work as a bug-fix cycle.
|
|
40
40
|
'yes' opens a new cycle and attaches this run to it; 'no' or omitted records
|
|
41
41
|
nothing.
|
|
42
|
+
--reasoning-effort <low|medium|high|xhigh>
|
|
43
|
+
Reasoning effort every claude, codex and grok worker CLI in this run is started
|
|
44
|
+
with. Omitted leaves each CLI on its own configuration.
|
|
42
45
|
--clarification-response
|
|
43
46
|
Low-level path argument. Carries an edited final-report.md from a prior
|
|
44
47
|
requirements-discovery or error-analysis run into this run as Section 0
|
|
@@ -39,7 +39,7 @@ from okstra_ctl.worker_request import build_request, idle_timeout # noqa: E402
|
|
|
39
39
|
from okstra_ctl.worker_runner import LIVE, QUIET, run_worker # noqa: E402
|
|
40
40
|
from okstra_ctl.dispatch_core import verify_served_model # noqa: E402
|
|
41
41
|
from okstra_ctl.dispatch_state import DispatchError # noqa: E402
|
|
42
|
-
from okstra_ctl.execution_manifest import
|
|
42
|
+
from okstra_ctl.execution_manifest import read_execution_manifest_view # noqa: E402
|
|
43
43
|
from okstra_ctl.write_policy import ( # noqa: E402
|
|
44
44
|
WriteEnforcement,
|
|
45
45
|
WritePolicy,
|
|
@@ -90,6 +90,7 @@ class _V2InvocationContext:
|
|
|
90
90
|
verify_attestation: Callable[[ServedModelAttestation], str]
|
|
91
91
|
write_policy: WritePolicy
|
|
92
92
|
write_enforcement: WriteEnforcement
|
|
93
|
+
reasoning_effort: str
|
|
93
94
|
|
|
94
95
|
|
|
95
96
|
def parse_invocation(argv: list[str]) -> Invocation:
|
|
@@ -120,6 +121,7 @@ def parse_invocation(argv: list[str]) -> Invocation:
|
|
|
120
121
|
served_model_verifier: Callable[[ServedModelAttestation], str] | None = None
|
|
121
122
|
write_policy: WritePolicy | None = None
|
|
122
123
|
write_enforcement: WriteEnforcement | None = None
|
|
124
|
+
reasoning_effort = ""
|
|
123
125
|
if metadata_raw:
|
|
124
126
|
context = _v2_status_extra(
|
|
125
127
|
metadata_path=_existing_file(
|
|
@@ -136,22 +138,27 @@ def parse_invocation(argv: list[str]) -> Invocation:
|
|
|
136
138
|
served_model_verifier = context.verify_attestation
|
|
137
139
|
write_policy = context.write_policy
|
|
138
140
|
write_enforcement = context.write_enforcement
|
|
141
|
+
reasoning_effort = context.reasoning_effort
|
|
139
142
|
if not spec.supports_role(role):
|
|
140
143
|
raise PreflightError(
|
|
141
144
|
64, f"provider {provider_id!r} does not support role {role!r}"
|
|
142
145
|
)
|
|
143
146
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
147
|
+
try:
|
|
148
|
+
request = build_request(
|
|
149
|
+
prompt_text=prompt_path.read_text(encoding="utf-8"),
|
|
150
|
+
model=model,
|
|
151
|
+
project_root=project_root,
|
|
152
|
+
worktree_path=worktree,
|
|
153
|
+
role=role,
|
|
154
|
+
idle_timeout_seconds=idle_timeout_seconds,
|
|
155
|
+
session_id=session_id,
|
|
156
|
+
write_policy=write_policy,
|
|
157
|
+
write_enforcement=write_enforcement,
|
|
158
|
+
reasoning_effort=reasoning_effort,
|
|
159
|
+
)
|
|
160
|
+
except ValueError as exc:
|
|
161
|
+
raise PreflightError(64, str(exc)) from exc
|
|
155
162
|
strategy = spec.exec_strategy
|
|
156
163
|
_check_command(strategy, request)
|
|
157
164
|
return Invocation(
|
|
@@ -252,7 +259,7 @@ def _v2_status_extra(
|
|
|
252
259
|
recorded = project_root / recorded
|
|
253
260
|
if recorded.resolve(strict=False) != prompt_path.resolve(strict=True):
|
|
254
261
|
raise PreflightError(64, "invocation metadata prompt does not match wrapper")
|
|
255
|
-
role_execution, attempt_row, pool = _execution_authority(
|
|
262
|
+
role_execution, attempt_row, pool, reasoning_effort = _execution_authority(
|
|
256
263
|
metadata=metadata,
|
|
257
264
|
project_root=project_root,
|
|
258
265
|
role_execution_ref=identity.role_execution_ref,
|
|
@@ -291,7 +298,7 @@ def _v2_status_extra(
|
|
|
291
298
|
except ValueError as exc:
|
|
292
299
|
raise PreflightError(64, f"invocation write contract is invalid: {exc}") from exc
|
|
293
300
|
|
|
294
|
-
|
|
301
|
+
status_extra: dict[str, Any] = {
|
|
295
302
|
"schemaVersion": "2.0",
|
|
296
303
|
"executionIdentityVersion": 2,
|
|
297
304
|
"participantRef": identity.participant_ref,
|
|
@@ -308,7 +315,12 @@ def _v2_status_extra(
|
|
|
308
315
|
},
|
|
309
316
|
"writePolicyDigest": attempt_row.write_policy_digest,
|
|
310
317
|
"writeEnforcement": write_enforcement.to_payload(),
|
|
311
|
-
}
|
|
318
|
+
}
|
|
319
|
+
if reasoning_effort:
|
|
320
|
+
status_extra["reasoningEffort"] = reasoning_effort
|
|
321
|
+
return _V2InvocationContext(
|
|
322
|
+
status_extra, verify_attestation, write_policy, write_enforcement, reasoning_effort
|
|
323
|
+
)
|
|
312
324
|
|
|
313
325
|
|
|
314
326
|
def _execution_authority(
|
|
@@ -329,7 +341,7 @@ def _execution_authority(
|
|
|
329
341
|
try:
|
|
330
342
|
manifest_path = manifest_path.resolve(strict=True)
|
|
331
343
|
manifest_path.relative_to(project_root.resolve(strict=True))
|
|
332
|
-
manifest =
|
|
344
|
+
manifest, manifest_payload = read_execution_manifest_view(manifest_path)
|
|
333
345
|
except (OSError, ValueError) as exc:
|
|
334
346
|
raise PreflightError(64, "invocation metadata run manifest is invalid") from exc
|
|
335
347
|
role_execution = next((
|
|
@@ -358,10 +370,14 @@ def _execution_authority(
|
|
|
358
370
|
raise PreflightError(
|
|
359
371
|
64, "invocation metadata attempt does not match run manifest"
|
|
360
372
|
)
|
|
373
|
+
reasoning_effort = manifest_payload.get("reasoningEffort") or ""
|
|
374
|
+
if not isinstance(reasoning_effort, str):
|
|
375
|
+
raise PreflightError(64, "run manifest reasoningEffort must be a string")
|
|
361
376
|
return (
|
|
362
377
|
role_execution,
|
|
363
378
|
attempt_row,
|
|
364
379
|
ModelPool.from_registry(default_provider_registry()),
|
|
380
|
+
reasoning_effort,
|
|
365
381
|
)
|
|
366
382
|
|
|
367
383
|
|
package/runtime/bin/okstra.sh
CHANGED
|
@@ -226,6 +226,7 @@ else
|
|
|
226
226
|
fi
|
|
227
227
|
[[ -n "${DIRECTIVE-}" ]] && PY_ARGS+=(--directive "$DIRECTIVE")
|
|
228
228
|
[[ -n "${FIX_CYCLE-}" ]] && PY_ARGS+=(--fix-cycle "$FIX_CYCLE")
|
|
229
|
+
[[ -n "${REASONING_EFFORT-}" ]] && PY_ARGS+=(--reasoning-effort "$REASONING_EFFORT")
|
|
229
230
|
for role_count in "${ROLE_COUNTS[@]-}"; do
|
|
230
231
|
[[ -z "$role_count" ]] && continue
|
|
231
232
|
PY_ARGS+=(--role-count "$role_count")
|
|
@@ -20,7 +20,7 @@ Good:
|
|
|
20
20
|
const sum = (arr) => arr.reduce((acc, x) => acc + x, 0);
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Caveat: do not extract until the duplication is real (rule of three). Premature abstraction is also a code smell.
|
|
23
|
+
Caveat: do not extract until the duplication is real (rule of three). Premature abstraction is also a code smell. The caveat does not cover a literal copy: a new block byte-identical to one already in the repository — test helpers included — reuses or moves the existing one.
|
|
24
24
|
|
|
25
25
|
Two more forms of duplication that hide from symbol-level grep:
|
|
26
26
|
|
|
@@ -325,6 +325,13 @@ For every source file this change touches, follow the paths the change creates o
|
|
|
325
325
|
- **concurrent** — something else is still writing, or the deadline fired and the work did not stop.
|
|
326
326
|
- **selection** — when several candidates fail, which one's evidence survives.
|
|
327
327
|
|
|
328
|
+
The failures the plan names are where the trace starts, not where it stops. Two orderings produce most error-path defects:
|
|
329
|
+
|
|
330
|
+
- **cleanup registered after a call that can throw** — inside a `try` whose `catch` / `finally` cleans up, the object to clean up must be registered before any call that can throw: a property write, a read, a call that starts other work whose completion the cleanup must wait for. Registered after it, the failure leaves the object behind or lets the cleanup run before that work settles.
|
|
331
|
+
- **order changed by a move** — when the change moves or restructures existing code, compare the order of throwing calls and cleanup registration with the base version; a refactor that swaps them is a behaviour change.
|
|
332
|
+
|
|
333
|
+
A failure the test fakes cannot produce is not covered by a passing test. Name it as unverified rather than calling the path clean.
|
|
334
|
+
|
|
328
335
|
**A finding names the input or state that produces the wrong result.** *"If the archive yields no entries, line 42 reports success and stores an empty result"* is a finding. Code that works as written is `clean`, however you would have written it differently: alternative structures, guards for states no caller can reach, extra tests for covered paths, and "consider extracting / renaming / memoizing" are improvements, not findings. A real failure that is small and cheap to fix is still a finding.
|
|
329
336
|
|
|
330
337
|
## Untrusted input and security
|
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"Return an evidence-backed verdict for every assigned review census cell, acting as a correctness and maintainability gate rather than a style commentator, and without changing the census or the code under review."
|
|
7
7
|
],
|
|
8
8
|
"requiredConduct": [
|
|
9
|
-
"Inspect every cell's actual diff and surrounding behavior, apply the assigned standard, trace affected call paths and tests where relevant, look for regressions and missing validation, preserve the cell identifier, and return either concrete findings or an evidence-backed clean verdict."
|
|
9
|
+
"Inspect every cell's actual diff and surrounding behavior, apply the assigned standard, trace affected call paths and tests where relevant, look for regressions and missing validation, preserve the cell identifier, and return either concrete findings or an evidence-backed clean verdict.",
|
|
10
|
+
"Return one compact Coverage Verdicts table row per assigned target/group cell. Explicitly account for every shared-catalog rule ID under Checked, N/A with an inline applicability reason, or Findings with finding IDs. Share one literal inspected target-source path:line per row. Do not expand pack bullets into separate verdict rows, use all-checked claims, or mark unread rules checked."
|
|
10
11
|
],
|
|
11
12
|
"decisionPrinciples": [
|
|
12
13
|
"Report only actionable defects with a demonstrated consequence. Calibrate priority from impact and likelihood, distinguish correctness from preference, avoid duplicate findings across cells, and recommend the smallest fix that addresses the established problem."
|
|
@@ -15,13 +16,14 @@
|
|
|
15
16
|
"Review only the provided census and fixed comparison range. Do not add, merge, split, omit, or reinterpret cells; do not edit source, broaden the diff, or redesign unrelated code."
|
|
16
17
|
],
|
|
17
18
|
"evidenceStandards": [
|
|
18
|
-
"Each finding must identify its cell, exact code evidence, violated behavior or project standard, consequence, and feasible correction. A clean verdict must name what was inspected and why no actionable issue was found."
|
|
19
|
+
"Each finding must identify its cell, exact code evidence, violated behavior or project standard, consequence, and feasible correction. A clean verdict must name what was inspected and why no actionable issue was found.",
|
|
20
|
+
"Classify each finding as execution-error or design-violation. An execution error establishes a reachable failure and wrong result. A design violation identifies the applicable assigned rule, code evidence, and concrete design or maintenance impact; it does not require a runtime failure. Both kinds include a feasible fix; preference alone is insufficient."
|
|
19
21
|
],
|
|
20
22
|
"collaborationContract": [
|
|
21
23
|
"Keep verdicts independent from other reviewers and the author. Do not echo a finding without verifying it, suppress a unique defect for consistency, or resolve cross-cell overlap by changing identifiers; return overlap information to the lead."
|
|
22
24
|
],
|
|
23
25
|
"completionCriteria": [
|
|
24
|
-
"Every
|
|
26
|
+
"Every grouped cell accounts for all expected shared-catalog rule IDs exactly once, all findings are prioritized and evidenced, and blocked or unaccounted rules identify what prevents evaluation. Preserve the census IDs; do not silently infer clean verdicts from missing rule IDs."
|
|
25
27
|
],
|
|
26
28
|
"prohibitions": [
|
|
27
29
|
"Do not reinterpret, merge, omit, or add census cells; report speculative concerns as defects; use style preference as a blocking standard; edit the reviewed code; or claim a cell clean without inspecting its assigned evidence."
|
|
@@ -252,6 +252,16 @@
|
|
|
252
252
|
},
|
|
253
253
|
"echo_template": "fix-cycle: {value}"
|
|
254
254
|
},
|
|
255
|
+
"reasoning_effort": {
|
|
256
|
+
"label": "이번 run 의 모든 워커 CLI 를 어떤 추론 강도로 실행할까요? claude·codex·grok 에 같은 단계로 전달됩니다. antigravity·kimi·zai 는 각자의 설정을 따릅니다.",
|
|
257
|
+
"options": {
|
|
258
|
+
"low": "low — 가장 빠름, 깊은 추론이 필요한 단계에서는 품질 저하 가능",
|
|
259
|
+
"medium": "medium — 속도와 품질의 중간",
|
|
260
|
+
"high": "high — 지금까지의 codex 기본값",
|
|
261
|
+
"xhigh": "xhigh — 가장 느림, 가장 깊은 추론"
|
|
262
|
+
},
|
|
263
|
+
"echo_template": "reasoning-effort: {value}"
|
|
264
|
+
},
|
|
255
265
|
"base_ref_text": {
|
|
256
266
|
"label": "base ref 를 입력해주세요 (branch, tag, 또는 short/full SHA)",
|
|
257
267
|
"echo_template": "base-ref: {value}"
|
|
@@ -129,6 +129,8 @@ class ClaudeExecution:
|
|
|
129
129
|
argv += ["--add-dir", str(directory)]
|
|
130
130
|
if request.policy.auto_approve:
|
|
131
131
|
argv += list(_APPROVAL_ARGS)
|
|
132
|
+
if request.reasoning_effort:
|
|
133
|
+
argv += ["--effort", request.reasoning_effort]
|
|
132
134
|
# `--verbose` is mandatory, not cosmetic: Claude Code rejects `--print`
|
|
133
135
|
# combined with `--output-format=stream-json` without it and exits 1 in
|
|
134
136
|
# under a second.
|
|
@@ -108,7 +108,9 @@ class CodexExecution:
|
|
|
108
108
|
argv += ["--add-dir", str(directory)]
|
|
109
109
|
argv += ["--model", request.model]
|
|
110
110
|
spec = CODEX.get(request.model)
|
|
111
|
-
if
|
|
111
|
+
if request.reasoning_effort:
|
|
112
|
+
argv += ["-c", f"model_reasoning_effort={request.reasoning_effort}"]
|
|
113
|
+
elif spec is not None:
|
|
112
114
|
argv += spec.cli_args
|
|
113
115
|
argv += ["--sandbox", "danger-full-access"]
|
|
114
116
|
if request.policy.auto_approve:
|
|
@@ -263,6 +263,11 @@ class GrokExecution:
|
|
|
263
263
|
cwd = request.worktree_path or request.project_root
|
|
264
264
|
# `-p` 기본 `plain` 은 종료 시에만 stdout 에 쓴다. 러너는 파이프라
|
|
265
265
|
# TUI 도 열리지 않고, `--no-alt-screen` 도 그 침묵을 바꾸지 않는다.
|
|
266
|
+
effort = (
|
|
267
|
+
("--reasoning-effort", request.reasoning_effort)
|
|
268
|
+
if request.reasoning_effort
|
|
269
|
+
else ()
|
|
270
|
+
)
|
|
266
271
|
return ExecCommand(
|
|
267
272
|
argv=(
|
|
268
273
|
"grok",
|
|
@@ -270,6 +275,7 @@ class GrokExecution:
|
|
|
270
275
|
request.prompt_text,
|
|
271
276
|
"-m",
|
|
272
277
|
request.model,
|
|
278
|
+
*effort,
|
|
273
279
|
"--cwd",
|
|
274
280
|
str(cwd),
|
|
275
281
|
"--output-format",
|
|
@@ -83,7 +83,11 @@ def _read_zai_api_key() -> str:
|
|
|
83
83
|
class ZaiExecution:
|
|
84
84
|
def build_command(self, request: WorkerExecRequest) -> ExecCommand:
|
|
85
85
|
api_key = _read_zai_api_key()
|
|
86
|
-
|
|
86
|
+
# z.ai 의 Anthropic 호환 엔드포인트가 Claude Code 의 effort 를 받는지
|
|
87
|
+
# 확인되지 않았으므로 run 의 강도를 넘기지 않는다.
|
|
88
|
+
command = ClaudeExecution().build_command(
|
|
89
|
+
replace(request, reasoning_effort="")
|
|
90
|
+
)
|
|
87
91
|
return replace(
|
|
88
92
|
command,
|
|
89
93
|
# 설정 파일의 env 가 자식 환경을 다시 덮어쓰지 않게 한다.
|
|
@@ -7,6 +7,7 @@ materialize 가 만든 명세에 대해, 이 층은 그 뒤에 오는 것들을
|
|
|
7
7
|
from __future__ import annotations
|
|
8
8
|
|
|
9
9
|
import argparse
|
|
10
|
+
import json
|
|
10
11
|
from datetime import datetime, timezone
|
|
11
12
|
from pathlib import Path
|
|
12
13
|
|
|
@@ -87,6 +88,30 @@ def _link_result(args: argparse.Namespace) -> None:
|
|
|
87
88
|
dispatch_id=args.dispatch_id,
|
|
88
89
|
result_path=_project_input(project_root, args.result, "agent result"),
|
|
89
90
|
)
|
|
91
|
+
from ...dispatch_core import existing_dispatch_plan
|
|
92
|
+
from ...paths import RUN_VALIDATOR_RELATIVE, find_asset_root
|
|
93
|
+
from ...phases.implementation_planning.round_completion import complete_ready_plan_round
|
|
94
|
+
from ...worker_prompt_policy import is_plan_verify_dispatch_kind
|
|
95
|
+
|
|
96
|
+
manifest_path = _project_input(project_root, args.run_manifest, "run manifest")
|
|
97
|
+
manifest = _read_json_object(manifest_path, "run manifest")
|
|
98
|
+
if manifest.get("taskType") == "implementation-planning":
|
|
99
|
+
team = _read_json_object(project_root / manifest["teamStatePath"], "team-state")
|
|
100
|
+
records = [row for collection in ("workerDispatches", "agentDispatches")
|
|
101
|
+
for row in team.get(collection, []) if row.get("dispatchId") == args.dispatch_id]
|
|
102
|
+
if len(records) == 1 and is_plan_verify_dispatch_kind(str(records[0].get("kind") or records[0].get("dispatchKind", ""))):
|
|
103
|
+
assets = find_asset_root(RUN_VALIDATOR_RELATIVE)
|
|
104
|
+
if assets is None:
|
|
105
|
+
raise AgentPromptCliError("plan-body validator is unavailable")
|
|
106
|
+
completion = complete_ready_plan_round(existing_dispatch_plan(
|
|
107
|
+
project_root, assets, manifest_path, manifest,
|
|
108
|
+
))
|
|
109
|
+
if completion:
|
|
110
|
+
link["planVerification"] = completion
|
|
111
|
+
if completion["status"] == "failed":
|
|
112
|
+
raise AgentPromptCliError(completion["reason"])
|
|
113
|
+
if not args.json:
|
|
114
|
+
print(json.dumps({"planVerification": completion}, ensure_ascii=False))
|
|
90
115
|
_emit(link, args.json)
|
|
91
116
|
|
|
92
117
|
|