okstra 0.224.0 → 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/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/phases/implementation_planning/authoring.py +66 -0
- package/runtime/python/okstra_ctl/phases/implementation_planning/instructions/plan-body-verification.md +5 -1
- 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/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/wizard/__init__.py +1 -0
- package/runtime/python/okstra_ctl/wizard/confirmation.py +2 -0
- package/runtime/python/okstra_ctl/wizard/ids.py +3 -0
- package/runtime/python/okstra_ctl/wizard/registry.py +11 -0
- package/runtime/python/okstra_ctl/wizard/render.py +1 -0
- package/runtime/python/okstra_ctl/wizard/state.py +3 -0
- package/runtime/python/okstra_ctl/wizard/steps_options.py +41 -1
- 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/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
|
@@ -16,14 +16,18 @@ Single entry point for the okstra user-test container runtime. okstra provisions
|
|
|
16
16
|
|
|
17
17
|
## Step 0: Preflight (shared)
|
|
18
18
|
|
|
19
|
+
<!-- BEGIN FRAGMENT: host-runtime-selection -->
|
|
20
|
+
Resolve `<host-runtime>` from the launcher's `OKSTRA_RUNTIME_HOST` when present; otherwise use the registered host ID declared by the current harness. Do not infer the host from worker models, installed executables, or `PATH`. If neither source identifies the host, report that it is unknown instead of substituting another host. Keep the same resolved host when retrying against another project directory.
|
|
21
|
+
<!-- END FRAGMENT: host-runtime-selection -->
|
|
22
|
+
|
|
19
23
|
Before any sub-command:
|
|
20
24
|
|
|
21
25
|
<!-- BEGIN FRAGMENT: bash-invocation-rule -->
|
|
22
|
-
Run one
|
|
26
|
+
Run one shell-command tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — literal command tokens keep execution permissions reviewable):
|
|
23
27
|
<!-- END FRAGMENT: bash-invocation-rule -->
|
|
24
28
|
|
|
25
29
|
```bash
|
|
26
|
-
okstra preflight --runtime
|
|
30
|
+
okstra preflight --runtime <host-runtime>
|
|
27
31
|
```
|
|
28
32
|
|
|
29
33
|
On `Okstra preflight: ready`, carry the fixed `Project root` line and pass it as `--project-root <projectRoot>` to every `okstra container` call below. On `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
|
|
@@ -10,7 +10,7 @@ Start or continue a `discussion` task — the user and several agents research a
|
|
|
10
10
|
A discussion needs no manager. `okstra manager task sync` reads the discussion of a manager task's child by reference; it never starts or completes one.
|
|
11
11
|
|
|
12
12
|
<!-- BEGIN FRAGMENT: wizard-bash-invocation-rule -->
|
|
13
|
-
**
|
|
13
|
+
**Shell invocation rule (permission-friendly)**: every shell command in this skill begins with the literal token `okstra` (or another already-allowed binary) and passes literal argument values. Do not introduce shell variables (`$STATE_FILE`, `$ANSWER`, `$projectRoot`, ...), `$(...)` command substitution, or leading `VAR=...` assignments — any of those make the command harder to audit; apply the selected host adapter's execution-permission guidance. When a prior tool call emitted a path or value, read it from the tool output and paste the literal string into the next command.
|
|
14
14
|
<!-- END FRAGMENT: wizard-bash-invocation-rule -->
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
@@ -76,7 +76,7 @@ Record the semantic functions that the live harness can actually perform. Always
|
|
|
76
76
|
|
|
77
77
|
The host-native provider runs as the current lead session when its role is supported. Other selected providers run through their registered CLI wrappers. Claude remains only the model-policy default; it is not the process owner.
|
|
78
78
|
|
|
79
|
-
Run one
|
|
79
|
+
Run one shell-command tool call (Shell invocation rule from the top of this file applies):
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
okstra preflight --runtime <host-runtime>
|
|
@@ -242,9 +242,9 @@ okstra config set pr-template-path "<value>" --scope global
|
|
|
242
242
|
|
|
243
243
|
If an action has an unknown `command`, `key`, or `scope`, stop and report the wizard output instead of inventing a command.
|
|
244
244
|
|
|
245
|
-
Before rendering the next phase's bundle — and between worker rounds within a phase (reverify/critic/gapverify batches), after you have collected that round's results and token usage and before you dispatch the next round — close the panes of the dispatches that finished in the prior round so they do not accumulate: `okstra team reclaim --project-root <projectRoot> --run-manifest <RUN_MANIFEST_PATH>` closes them, records `phase-batch-cleanup panes=<n>` with the number it closed, and prints that `PROGRESS:` line last — emit it as printed and do not call `okstra lead-progress append` for it. The command reads each dispatch's recorded status, so an in-progress worker keeps its pane whichever moment you call it. It closes only the panes okstra opened and recorded — a pane the harness opened for its own teammate carries no recorded id and is not okstra's to close.
|
|
245
|
+
Before rendering the next phase's bundle — and between worker rounds within a phase (reverify/critic/gapverify batches), after you have collected that round's results and token usage and before you dispatch the next round — close the panes of the dispatches that finished in the prior round so they do not accumulate: `okstra team reclaim --project-root <projectRoot> --run-manifest <RUN_MANIFEST_PATH>` closes them, records `phase-batch-cleanup panes=<n>` with the number it closed, and prints that `PROGRESS:` line last — emit it as printed and do not call `okstra lead-progress append` for it. The command reads each dispatch's recorded status, so an in-progress worker keeps its pane whichever moment you call it. It closes only the panes okstra opened and recorded — a pane the harness opened for its own teammate carries no recorded id and is not okstra's to close. After collecting results and token usage, apply the selected adapter's `shutdown_workers` operation only to confirmed-complete workers; preserve in-flight workers and the lead. A `cli-wrapper` run holds no pane at all and `team reclaim` refuses it, so record the checkpoint there with `okstra lead-progress append … --phase phase-batch-cleanup --field panes=0`.
|
|
246
246
|
|
|
247
|
-
Before you ask the user for any approval, clarification, or decision after workers have been dispatched, run `okstra team reclaim … --gate` first: it closes the finished panes and prints `PROGRESS: phase-gate-cleanup panes=<n>` for you to emit, without recording a batch cleanup. Then
|
|
247
|
+
Before you ask the user for any approval, clarification, or decision after workers have been dispatched, run `okstra team reclaim … --gate` first: it closes the finished panes and prints `PROGRESS: phase-gate-cleanup panes=<n>` for you to emit, without recording a batch cleanup. Then apply the selected adapter's `shutdown_workers` operation to confirmed-complete workers after collecting their results and token usage; preserve in-flight workers and the lead. This keeps a user gate from being shown while finished worker panes remain; in-progress dispatches keep their panes. Then follow `prompts/lead/okstra-lead-contract.md` "User confirmation before an approval blocker": read cited plan items, worker findings, and files before asking, and ask in the user's language with each option's outcome.
|
|
248
248
|
|
|
249
249
|
Build the `okstra render-bundle` invocation from `outcome.renderArgv`, passing every token verbatim and in order (including empty strings — they are intentional `use phase default` markers).
|
|
250
250
|
|
|
@@ -257,13 +257,13 @@ Step 3's empty-answer and escaping rules apply verbatim: every flag in `renderAr
|
|
|
257
257
|
`renderArgv` already contains exactly one `--lead-runtime <host-runtime>` pair. Do not add or replace it. Do not enumerate a fixed provider list in this skill because the wizard and role model pool own the ordered tokens.
|
|
258
258
|
|
|
259
259
|
```bash
|
|
260
|
-
okstra render-bundle \
|
|
260
|
+
okstra render-bundle --summary-only \
|
|
261
261
|
<outcome.renderArgv token 1> \
|
|
262
262
|
<outcome.renderArgv token 2> \
|
|
263
263
|
<each remaining outcome.renderArgv token in order>
|
|
264
264
|
```
|
|
265
265
|
|
|
266
|
-
`render-bundle` auto-supplies `--workspace-root` and forces `--render-only`. Stdout prints `okstra task root:`, `okstra instruction-set:`, `okstra run manifest:`, and
|
|
266
|
+
`render-bundle` auto-supplies `--workspace-root` and forces `--render-only`. Stdout prints `okstra task root:`, `okstra instruction-set:`, `okstra run manifest:`, and other preparation status. `--summary-only` omits the lead prompt body from stdout; Step 6 reads the verified saved prompt from the manifest path. Parse the labelled lines for `TASK_ROOT`, `INSTRUCTION_SET_PATH`, and `RUN_MANIFEST_PATH`. Also watch for an optional `okstra concurrent-run stages:` label line — present only when a concurrent run is detected (see "Concurrent-run detection branch" below).
|
|
267
267
|
|
|
268
268
|
Before acting as the lead, read `resources.leadPromptMetadataPath` from the run
|
|
269
269
|
manifest and execute the host-native specification-link gate:
|
|
@@ -28,10 +28,12 @@ Single read-side entry point for okstra runtime inspection plus the one status m
|
|
|
28
28
|
|
|
29
29
|
## Step 0: Preflight (shared)
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
<!-- BEGIN FRAGMENT: host-runtime-selection -->
|
|
32
|
+
Resolve `<host-runtime>` from the launcher's `OKSTRA_RUNTIME_HOST` when present; otherwise use the registered host ID declared by the current harness. Do not infer the host from worker models, installed executables, or `PATH`. If neither source identifies the host, report that it is unknown instead of substituting another host. Keep the same resolved host when retrying against another project directory.
|
|
33
|
+
<!-- END FRAGMENT: host-runtime-selection -->
|
|
32
34
|
|
|
33
35
|
<!-- BEGIN FRAGMENT: bash-invocation-rule -->
|
|
34
|
-
Run one
|
|
36
|
+
Run one shell-command tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — literal command tokens keep execution permissions reviewable):
|
|
35
37
|
<!-- END FRAGMENT: bash-invocation-rule -->
|
|
36
38
|
|
|
37
39
|
```bash
|
|
@@ -58,7 +60,7 @@ Every subsequent `okstra <subcmd>` call self-bootstraps its Python path, so this
|
|
|
58
60
|
|
|
59
61
|
Classify the user's request into one sub-command using the trigger table above. If ambiguous (e.g. "show me okstra"), ask which facet — do not silently default. After routing, **Read the chosen row's facet file** (path relative to this skill's base directory) and follow it for the rest of the response. Load exactly one facet per sub-command — never preload the others.
|
|
60
62
|
|
|
61
|
-
When you ask which facet, the option list is **authoritative**: enumerate every sub-command in the dispatch table above as a numbered text list, in table order, each with its one-line description, and let the user pick by number or name. Never present a hand-picked subset — the
|
|
63
|
+
When you ask which facet, the option list is **authoritative**: enumerate every sub-command in the dispatch table above as a numbered text list, in table order, each with its one-line description, and let the user pick by number or name. Never present a hand-picked subset — the current host's native option limit is not a reason to drop facets; render the full menu as text in the question body so no facet (e.g. a newly added one) is ever hidden. The table is the single source of truth for this menu; adding a row there (plus its facet file) is all it takes for the facet to appear here.
|
|
62
64
|
|
|
63
65
|
When the user chains multiple facets in one message (e.g. "status, and then time for DEV-9047"), execute them sequentially — Step 0 runs once, then load and run each facet in turn.
|
|
64
66
|
|
|
@@ -7,9 +7,13 @@ disable-model-invocation: true
|
|
|
7
7
|
|
|
8
8
|
# OKSTRA Manager
|
|
9
9
|
|
|
10
|
+
<!-- BEGIN FRAGMENT: host-question-interface -->
|
|
11
|
+
For authored questions, `prompt_user` means the current host's available question interface, not a literal tool name. Use the selected host relay when one is provided. Preserve every question, option, description, and answer; use native controls only when the live session permits them and the complete interaction fits its limits. Otherwise show complete numbered choices and accept the user's reply; collect free text through normal conversation. If a native control is refused, follow the relay's recovery mapping, or use text when no relay is provided. A delivery acknowledgement or preselected option is not an answer; wait for the user's actual response.
|
|
12
|
+
<!-- END FRAGMENT: host-question-interface -->
|
|
13
|
+
|
|
10
14
|
Thin conversational wrapper over `okstra manager`. Manager state and child launch decisions belong to the CLI fixed output, not to this skill.
|
|
11
15
|
|
|
12
|
-
##
|
|
16
|
+
## Shell Invocation Rule
|
|
13
17
|
|
|
14
18
|
Every command in this skill must begin with the literal token `okstra`. Do not introduce shell variables, command substitution, leading environment assignments, or alternate wrappers around `okstra manager`.
|
|
15
19
|
|
|
@@ -61,9 +65,9 @@ okstra manager view --manager-id <manager-id>
|
|
|
61
65
|
Use this when one Linear project, or one parent issue, covers work in several registered projects and each project needs its own brief. A Linear project can point at several projects, and one issue can too; every (issue, project) pair gets its own brief and child task.
|
|
62
66
|
|
|
63
67
|
1. Run `okstra manager list projects --manager-id <manager-id>`. These are the only valid targets. Register a missing repo with `okstra manager new project ...` first.
|
|
64
|
-
2. Fetch from the Linear MCP: the project (`get_project`) and its issues (`list_issues` filtered by that project), then each issue with `get_issue`, including sub-issues and blocking or related links. If the Linear tools are missing, load them once with
|
|
65
|
-
3. For each issue, propose target projects from evidence: labels, team, repository names or paths in the body. Confirm with `
|
|
66
|
-
4. For each (issue, project) pair, draft the scope: the part of the issue this project implements. Confirm it with `
|
|
68
|
+
2. Fetch from the Linear MCP: the project (`get_project`) and its issues (`list_issues` filtered by that project), then each issue with `get_issue`, including sub-issues and blocking or related links. If the Linear tools are missing, load them once with the host's tool-discovery capability (when available); if they are still missing, ask the user to paste the bodies. Never invent ticket content.
|
|
69
|
+
3. For each issue, propose target projects from evidence: labels, team, repository names or paths in the body. Confirm with `prompt_user` (multi-select, recommended projects first, reason in each description).
|
|
70
|
+
4. For each (issue, project) pair, draft the scope: the part of the issue this project implements. Confirm it with `prompt_user` offering one or two drafts plus a custom-input option. A pair without scope is rejected by the CLI.
|
|
67
71
|
5. Author each pair's brief fields under the okstra-brief-gen brief contract: bodies verbatim, `EB-NNN` / `PB-NNN` / `EO-NNN` items as `<id> <observable condition> — verify: <how>`, anything without an observation method under `externalGates`, and `openQuestions` rows prefixed `general:`, `terminology:`, `intent-check:`, `conversion-block:` or `adr-candidate:`.
|
|
68
72
|
6. Write the plan JSON below with the Write tool to a scratch path outside the project roots, then run `okstra manager task split ... --plan <path>`.
|
|
69
73
|
- `split plan rejected` or `rendered briefs failed validate-brief`: fix the named fields and run it again. Nothing was written.
|
|
@@ -32,7 +32,7 @@ tokens, JWTs) and exits non-zero — redact and retry if you hit it.
|
|
|
32
32
|
|
|
33
33
|
## Step 0: Check CLI availability
|
|
34
34
|
|
|
35
|
-
Run as a separate
|
|
35
|
+
Run as a separate shell-command tool call with literal leading token:
|
|
36
36
|
|
|
37
37
|
```bash
|
|
38
38
|
okstra memory --help
|
|
@@ -5,6 +5,10 @@ description: Use when the user wants to register a PR body template or generate
|
|
|
5
5
|
|
|
6
6
|
# okstra-pr-gen
|
|
7
7
|
|
|
8
|
+
<!-- BEGIN FRAGMENT: host-question-interface -->
|
|
9
|
+
For authored questions, `prompt_user` means the current host's available question interface, not a literal tool name. Use the selected host relay when one is provided. Preserve every question, option, description, and answer; use native controls only when the live session permits them and the complete interaction fits its limits. Otherwise show complete numbered choices and accept the user's reply; collect free text through normal conversation. If a native control is refused, follow the relay's recovery mapping, or use text when no relay is provided. A delivery acknowledgement or preselected option is not an answer; wait for the user's actual response.
|
|
10
|
+
<!-- END FRAGMENT: host-question-interface -->
|
|
11
|
+
|
|
8
12
|
Register PR body templates and generate PR descriptions. Templates live in the
|
|
9
13
|
user home at `~/.okstra/template/pr/`. This skill is **global** — it does not
|
|
10
14
|
require `<PROJECT_ROOT>/.okstra/project.json`. PR generation additionally
|
|
@@ -12,7 +16,7 @@ requires the current directory to be a git repository.
|
|
|
12
16
|
|
|
13
17
|
## Step 0: Check CLI availability
|
|
14
18
|
|
|
15
|
-
Run as a separate
|
|
19
|
+
Run as a separate shell-command tool call with a literal leading token:
|
|
16
20
|
|
|
17
21
|
```bash
|
|
18
22
|
okstra pr --help
|
|
@@ -22,14 +26,14 @@ If `okstra` is not on PATH, tell the user:
|
|
|
22
26
|
|
|
23
27
|
`okstra not installed — run npx okstra@latest install once, then retry this skill.`
|
|
24
28
|
|
|
25
|
-
**
|
|
29
|
+
**Shell invocation rule:** every shell command begins with the literal token
|
|
26
30
|
`okstra` and passes literal argument values. Do not introduce shell variables,
|
|
27
|
-
`$(...)`, leading `VAR=`, or wrap in `if`/`eval`/`||`/`&&` —
|
|
28
|
-
|
|
31
|
+
`$(...)`, leading `VAR=`, or wrap in `if`/`eval`/`||`/`&&` — keep arguments literal and follow the current host's
|
|
32
|
+
execution-permission guidance. Paste literal values emitted by a prior call.
|
|
29
33
|
|
|
30
34
|
## Step 1: Pick the mode (always first)
|
|
31
35
|
|
|
32
|
-
Present a 3-option picker (`
|
|
36
|
+
Present a 3-option picker (`prompt_user`):
|
|
33
37
|
|
|
34
38
|
1. `Generate PR` — generate a PR body from a branch diff.
|
|
35
39
|
2. `Register template` — save a new PR body template.
|
|
@@ -118,7 +122,7 @@ user's explicit confirmation.
|
|
|
118
122
|
|
|
119
123
|
## Mode B — Register template
|
|
120
124
|
|
|
121
|
-
1. Ask for a template name (`
|
|
125
|
+
1. Ask for a template name (`prompt_user`, free text). It must match
|
|
122
126
|
`^[A-Za-z0-9._-]+$`; re-ask on invalid input.
|
|
123
127
|
2. Ask for the template body — either pasted text or an absolute file path.
|
|
124
128
|
3. Save it:
|
|
@@ -12,12 +12,16 @@ The skill itself writes nothing. `okstra rollup` resolves every catalog task by
|
|
|
12
12
|
|
|
13
13
|
## Step 0: Preflight
|
|
14
14
|
|
|
15
|
+
<!-- BEGIN FRAGMENT: host-runtime-selection -->
|
|
16
|
+
Resolve `<host-runtime>` from the launcher's `OKSTRA_RUNTIME_HOST` when present; otherwise use the registered host ID declared by the current harness. Do not infer the host from worker models, installed executables, or `PATH`. If neither source identifies the host, report that it is unknown instead of substituting another host. Keep the same resolved host when retrying against another project directory.
|
|
17
|
+
<!-- END FRAGMENT: host-runtime-selection -->
|
|
18
|
+
|
|
15
19
|
<!-- BEGIN FRAGMENT: bash-invocation-rule -->
|
|
16
|
-
Run one
|
|
20
|
+
Run one shell-command tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — literal command tokens keep execution permissions reviewable):
|
|
17
21
|
<!-- END FRAGMENT: bash-invocation-rule -->
|
|
18
22
|
|
|
19
23
|
```bash
|
|
20
|
-
okstra preflight --runtime
|
|
24
|
+
okstra preflight --runtime <host-runtime>
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
On `Okstra preflight: ready`, carry the fixed `Project root` line. On `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
|
|
@@ -10,7 +10,7 @@ Launch an okstra task — gather inputs interactively via the **wizard state mac
|
|
|
10
10
|
**Single authority**: this skill drives `okstra wizard`, which owns every step (ordering, branching, validation). The skill is just a thin prompt-relay loop — it never decides "what to ask next" itself. If the flow needs to change, edit `scripts/okstra_ctl/wizard/registry.py` (the `STEPS` order) or the owning `scripts/okstra_ctl/wizard/steps_*.py`, not this file.
|
|
11
11
|
|
|
12
12
|
<!-- BEGIN FRAGMENT: wizard-bash-invocation-rule -->
|
|
13
|
-
**
|
|
13
|
+
**Shell invocation rule (permission-friendly)**: every shell command in this skill begins with the literal token `okstra` (or another already-allowed binary) and passes literal argument values. Do not introduce shell variables (`$STATE_FILE`, `$ANSWER`, `$projectRoot`, ...), `$(...)` command substitution, or leading `VAR=...` assignments — any of those make the command harder to audit; apply the selected host adapter's execution-permission guidance. When a prior tool call emitted a path or value, read it from the tool output and paste the literal string into the next command.
|
|
14
14
|
<!-- END FRAGMENT: wizard-bash-invocation-rule -->
|
|
15
15
|
|
|
16
16
|
## When to Use
|
|
@@ -76,7 +76,7 @@ Record the semantic functions that the live harness can actually perform. Always
|
|
|
76
76
|
|
|
77
77
|
The host-native provider runs as the current lead session when its role is supported. Other selected providers run through their registered CLI wrappers. Claude remains only the model-policy default; it is not the process owner.
|
|
78
78
|
|
|
79
|
-
Run one
|
|
79
|
+
Run one shell-command tool call (Shell invocation rule from the top of this file applies):
|
|
80
80
|
|
|
81
81
|
```bash
|
|
82
82
|
okstra preflight --runtime <host-runtime>
|
|
@@ -147,7 +147,7 @@ For numbered interactions, render every option as a 1-based Markdown item contai
|
|
|
147
147
|
|
|
148
148
|
## Step 2: Initialize the wizard
|
|
149
149
|
|
|
150
|
-
First, generate a state-file path (
|
|
150
|
+
First, generate a state-file path (Shell invocation rule from the top of this file applies to every command below):
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
153
|
okstra wizard new-state-file
|
|
@@ -217,6 +217,7 @@ That is the entire interactive flow. The wizard handles:
|
|
|
217
217
|
- `implementation`-only sub-flow: approved-plan path (frontmatter `approved: true` check) + stage pick (`auto` = the earliest incomplete stage whose dependencies are satisfied, or a specific stage number). Implementer slots use role-count / role-model like every other role (`executor` is only a compatibility alias for `implementer`). When an approved plan is selected and a `## PLAN DECISION` sidecar carrying `Status: approved`, exported from the report — matching the plan on source-report·seq — is detected in that run's sibling `user-responses/`, the approve-confirm step expands to 3 options (`yes_apply` recommended: approve + apply the option as exported / `yes` approve only / `no` abort) — `yes_apply` validates the option against the plan's `optionCandidates` before applying it via the existing approval·option path,
|
|
218
218
|
- `release-handoff`-only sub-flow: after the approved plan auto-resolves, a `handoff_stage_pick` multi-select — choose the eligible stages to open a PR for, one PR per stage; the result goes out as render-args' `stages` key (csv; empty takes every eligible stage),
|
|
219
219
|
- launch selection after identity/worktree steps: one screen per static role, in profile order. A role that can run several instances (`max > 1`) is a checkbox step `role-models:<role>` (`multi: true`) — the number of models checked is the number of instances, there is no separate count question; the label states the profile range and recommended count, every executable candidate is listed on that one screen (defaults first, the recommended set flagged), and when the list exceeds the host's native checkbox limit the runtime either splits it into several checkbox questions on one `pick_group` screen (interaction plan `native-group`; the question steps are `role-models:<role>#1`, `#2`, … and the answer is one JSON object keyed by them, each value a CSV) when the host's native question group holds every option, or returns the interaction plan `numbered-multi` — render the whole list, never a shortlist or pages. An optional role (`min = 0`, e.g. critic) carries a `추가 안 함` row. A fixed single role (`min = max = 1`, e.g. report-writer) is a single pick `role-model:<role>:1`, and a role capped at one model (`max = 1`, e.g. critic) is a single pick on its `role-models:<role>` step; both split the same way when they exceed the native option limit — the tabs are checkbox questions, the answer is the same keyed JSON object, and the wizard rejects a screen whose tabs together name more than one value. current-session lead is this session and is listed on the confirmation summary, not as a wizard step. The wizard does not fork on defaults-vs-customize, does not show a provider roster multi-pick, and does not offer a separate implementer-provider pick. Dynamic verifiers are not chosen at launch. Repeated `--role-count` / `--role-model` tokens on `renderArgv` are intentional,
|
|
220
|
+
- reasoning effort (`reasoning_effort`) after the role screens and the directive, for every task type whose profile starts workers (not `release-handoff`): `high` (recommended) / `low` / `medium` / `xhigh`. The answer goes out as `--reasoning-effort`, is stored as the run manifest's `reasoningEffort`, and every claude, codex and grok worker CLI of the run starts with it; antigravity, kimi and zai keep their own configuration.
|
|
220
221
|
- **resume-clarification (in-session equivalent)** — there is no separate mode or flag matching the shell's `okstra.sh --resume-clarification`; two steps of the standard flow carry out its substance. (1) `reuse_previous` (yes/no to reuse the previous run's settings — in `requirements-discovery` / `error-analysis` / `implementation-planning` / `project-analysis` / `feature-analysis` / `change-impact-analysis`, only when prior run-inputs exist): YES prefills role-count·role-model·directive·related-tasks at once (and, for the analysis types, the target and evidence inputs). (2) `clarification_pick`: a `revision-requested` analysis report for the selected analysis type is recommended first; otherwise the **task-type's own** previous `final-report` is auto-recommended as the carry-in input (for `technical-verification`, the `implementation-option-selection` report), falling back to the newest by mtime across all phases when absent — except for `implementation-planning` and `technical-verification`, which get no cross-phase fallback. The approved plan is never recommended here. The same run's `user-responses/` sidecar (answers the user filled in) is attached alongside. The chosen path is passed to prepare as `--clarification-response` — the user makes the sidecar via the report's `Export user response`, places it in `runs/<task-type>/user-responses/`, and re-runs the same phase,
|
|
221
222
|
- **re-verification scope (`reverify_scope_pick`, `implementation-planning` clarification re-runs only)** — asked right before `confirm` when the re-run is narrowable **or** an answered `C-NNN` traces to no stage. When every answered id traces to a stage: 3 options — `auto` (recommended — leave it to the lead's `okstra incremental-scope` decision) / `full` (re-verify every stage) / Enter directly (a stage-number CSV, validated against the prior report's Stage Map). When an id is unlinked, `auto` is omitted and the user names stages or picks `full`; that unlinked id does not freeze the run at full. The answer goes out as `--reverify-scope` and reaches the lead prompt as the `REVERIFY_SCOPE_MODE` / `REVERIFY_SCOPE_STAGES` tokens; it shapes that CLI's inputs rather than replacing the decision. The confirmation block's `reverify-scope` line names unlinked ids as needing stage numbers, not as a forced full re-run,
|
|
222
223
|
- `release-handoff` PR template override + persist scope,
|
|
@@ -275,9 +276,9 @@ okstra config set pr-template-path "<value>" --scope global
|
|
|
275
276
|
|
|
276
277
|
If an action has an unknown `command`, `key`, or `scope`, stop and report the wizard output instead of inventing a command.
|
|
277
278
|
|
|
278
|
-
Before rendering the next phase's bundle — and between worker rounds within a phase (reverify/critic/gapverify batches), after you have collected that round's results and token usage and before you dispatch the next round — close the panes of the dispatches that finished in the prior round so they do not accumulate: `okstra team reclaim --project-root <projectRoot> --run-manifest <RUN_MANIFEST_PATH>` closes them, records `phase-batch-cleanup panes=<n>` with the number it closed, and prints that `PROGRESS:` line last — emit it as printed and do not call `okstra lead-progress append` for it. The command reads each dispatch's recorded status, so an in-progress worker keeps its pane whichever moment you call it. It closes only the panes okstra opened and recorded — a pane the harness opened for its own teammate carries no recorded id and is not okstra's to close.
|
|
279
|
+
Before rendering the next phase's bundle — and between worker rounds within a phase (reverify/critic/gapverify batches), after you have collected that round's results and token usage and before you dispatch the next round — close the panes of the dispatches that finished in the prior round so they do not accumulate: `okstra team reclaim --project-root <projectRoot> --run-manifest <RUN_MANIFEST_PATH>` closes them, records `phase-batch-cleanup panes=<n>` with the number it closed, and prints that `PROGRESS:` line last — emit it as printed and do not call `okstra lead-progress append` for it. The command reads each dispatch's recorded status, so an in-progress worker keeps its pane whichever moment you call it. It closes only the panes okstra opened and recorded — a pane the harness opened for its own teammate carries no recorded id and is not okstra's to close. After collecting results and token usage, apply the selected adapter's `shutdown_workers` operation only to confirmed-complete workers; preserve in-flight workers and the lead. A `cli-wrapper` run holds no pane at all and `team reclaim` refuses it, so record the checkpoint there with `okstra lead-progress append … --phase phase-batch-cleanup --field panes=0`.
|
|
279
280
|
|
|
280
|
-
Before you ask the user for any approval, clarification, or decision after workers have been dispatched, run `okstra team reclaim … --gate` first: it closes the finished panes and prints `PROGRESS: phase-gate-cleanup panes=<n>` for you to emit, without recording a batch cleanup. Then
|
|
281
|
+
Before you ask the user for any approval, clarification, or decision after workers have been dispatched, run `okstra team reclaim … --gate` first: it closes the finished panes and prints `PROGRESS: phase-gate-cleanup panes=<n>` for you to emit, without recording a batch cleanup. Then apply the selected adapter's `shutdown_workers` operation to confirmed-complete workers after collecting their results and token usage; preserve in-flight workers and the lead. This keeps a user gate from being shown while finished worker panes remain; in-progress dispatches keep their panes. Then follow `prompts/lead/okstra-lead-contract.md` "User confirmation before an approval blocker": read cited plan items, worker findings, and files before asking, and ask in the user's language with each option's outcome.
|
|
281
282
|
|
|
282
283
|
Build the `okstra render-bundle` invocation from `outcome.renderArgv`, passing every token verbatim and in order (including empty strings — they are intentional `use phase default` markers).
|
|
283
284
|
|
|
@@ -290,13 +291,13 @@ Step 3's empty-answer and escaping rules apply verbatim: every flag in `renderAr
|
|
|
290
291
|
`renderArgv` already contains exactly one `--lead-runtime <host-runtime>` pair. Do not add or replace it. Do not enumerate a fixed provider list in this skill because the wizard and role model pool own the ordered tokens.
|
|
291
292
|
|
|
292
293
|
```bash
|
|
293
|
-
okstra render-bundle \
|
|
294
|
+
okstra render-bundle --summary-only \
|
|
294
295
|
<outcome.renderArgv token 1> \
|
|
295
296
|
<outcome.renderArgv token 2> \
|
|
296
297
|
<each remaining outcome.renderArgv token in order>
|
|
297
298
|
```
|
|
298
299
|
|
|
299
|
-
`render-bundle` auto-supplies `--workspace-root` and forces `--render-only`. Stdout prints `okstra task root:`, `okstra instruction-set:`, `okstra run manifest:`, and
|
|
300
|
+
`render-bundle` auto-supplies `--workspace-root` and forces `--render-only`. Stdout prints `okstra task root:`, `okstra instruction-set:`, `okstra run manifest:`, and other preparation status. `--summary-only` omits the lead prompt body from stdout; Step 6 reads the verified saved prompt from the manifest path. Parse the labelled lines for `TASK_ROOT`, `INSTRUCTION_SET_PATH`, and `RUN_MANIFEST_PATH`. Also watch for an optional `okstra concurrent-run stages:` label line — present only when a concurrent run is detected (see "Concurrent-run detection branch" below).
|
|
300
301
|
|
|
301
302
|
Before acting as the lead, read `resources.leadPromptMetadataPath` from the run
|
|
302
303
|
manifest and execute the host-native specification-link gate:
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: okstra-schedule-gen
|
|
3
3
|
description: Use when the user asks for a task-group work schedule, a consolidated implementation plan across multiple tasks in a task-group, or wants to generate a schedule or work plan for non-done tasks.
|
|
4
|
-
model: opus
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# OKSTRA Schedule Gen
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
<!-- BEGIN FRAGMENT: host-question-interface -->
|
|
9
|
+
For authored questions, `prompt_user` means the current host's available question interface, not a literal tool name. Use the selected host relay when one is provided. Preserve every question, option, description, and answer; use native controls only when the live session permits them and the complete interaction fits its limits. Otherwise show complete numbered choices and accept the user's reply; collect free text through normal conversation. If a native control is refused, follow the relay's recovery mapping, or use text when no relay is provided. A delivery acknowledgement or preselected option is not an answer; wait for the user's actual response.
|
|
10
|
+
<!-- END FRAGMENT: host-question-interface -->
|
|
11
|
+
|
|
12
|
+
Generate a consolidated work schedule for the selected `implementation-planning` stages of every non-done task in a given `task-group` (or a single `task-id`). For each task the skill reads the source-aware **Stage Map**, records the user's stage choices in a temporary selection contract, and gates the same draft through deterministic validation followed by an independent narrative review. It runs as a **lead + verifier** flow in the current authoring session; the registered operation contract selects the independent verifier.
|
|
10
13
|
|
|
11
14
|
## When to Use
|
|
12
15
|
|
|
@@ -19,12 +22,16 @@ Public invocation: `/okstra-schedule-gen [task-group]`. A title or directive may
|
|
|
19
22
|
|
|
20
23
|
## Step 0: Preflight
|
|
21
24
|
|
|
25
|
+
<!-- BEGIN FRAGMENT: host-runtime-selection -->
|
|
26
|
+
Resolve `<host-runtime>` from the launcher's `OKSTRA_RUNTIME_HOST` when present; otherwise use the registered host ID declared by the current harness. Do not infer the host from worker models, installed executables, or `PATH`. If neither source identifies the host, report that it is unknown instead of substituting another host. Keep the same resolved host when retrying against another project directory.
|
|
27
|
+
<!-- END FRAGMENT: host-runtime-selection -->
|
|
28
|
+
|
|
22
29
|
<!-- BEGIN FRAGMENT: bash-invocation-rule -->
|
|
23
|
-
Run one
|
|
30
|
+
Run one shell-command tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — literal command tokens keep execution permissions reviewable):
|
|
24
31
|
<!-- END FRAGMENT: bash-invocation-rule -->
|
|
25
32
|
|
|
26
33
|
```bash
|
|
27
|
-
okstra preflight --runtime
|
|
34
|
+
okstra preflight --runtime <host-runtime>
|
|
28
35
|
```
|
|
29
36
|
|
|
30
37
|
On `Okstra preflight: ready`, carry the fixed `Project root` line for the later `model-io` calls. On `Okstra preflight: failed`, show `Reason` and `Recovery`, then stop.
|
|
@@ -130,8 +137,8 @@ Run this **once per in-scope task that has a non-empty `remainingStages`**, sequ
|
|
|
130
137
|
2. Pick natural cut points to form up to **3 cumulative bundles**: `B1` = through the first milestone, `B2` = through the core, `B3` = all remaining. Each bundle is a **dependency-closed prefix** — selecting it never omits a prerequisite stage. Label each bundle with its stage list and summed `step_count` (e.g. `B2: stage 1–4 (steps 12)`).
|
|
131
138
|
3. If `remainingStages` has ≤2 stages, emit only the bundles that are distinct (1–2), never pad to 3.
|
|
132
139
|
|
|
133
|
-
**Render the picker** with `
|
|
134
|
-
- Options = the distinct bundles + a final `"All remaining stages"` option.
|
|
140
|
+
**Render the picker** with `prompt_user` (one question for this task):
|
|
141
|
+
- Options = the distinct bundles + a final `"All remaining stages"` option. Use the host's free-input mechanism for `Enter directly` (an arbitrary stage subset), or collect that value as a separate text answer; when the user supplies a custom subset, close it under `depends_on` before accepting.
|
|
135
142
|
- **Degenerate skip:** if only one distinct bundle exists AND it already equals all remaining stages, skip the picker for this task and set `selectedStages = remainingStages` (log `> _Stage picker skipped: remaining stages form a single dependency chain._`).
|
|
136
143
|
|
|
137
144
|
Record the chosen `selectedStages` for this task. Reject and re-prompt any custom selection whose transitive `depends_on` closure is not covered by `selectedStages ∪ doneStages`.
|
|
@@ -5,6 +5,10 @@ description: One-time bootstrap for okstra in a new project or on a new machine
|
|
|
5
5
|
|
|
6
6
|
# okstra-setup
|
|
7
7
|
|
|
8
|
+
<!-- BEGIN FRAGMENT: host-question-interface -->
|
|
9
|
+
For authored questions, `prompt_user` means the current host's available question interface, not a literal tool name. Use the selected host relay when one is provided. Preserve every question, option, description, and answer; use native controls only when the live session permits them and the complete interaction fits its limits. Otherwise show complete numbered choices and accept the user's reply; collect free text through normal conversation. If a native control is refused, follow the relay's recovery mapping, or use text when no relay is provided. A delivery acknowledgement or preselected option is not an answer; wait for the user's actual response.
|
|
10
|
+
<!-- END FRAGMENT: host-question-interface -->
|
|
11
|
+
|
|
8
12
|
One-time bootstrap. Run when okstra is being used for the first time on this
|
|
9
13
|
machine, or when adopting okstra in a new project.
|
|
10
14
|
|
|
@@ -28,7 +32,7 @@ Inform the user up-front and confirm before continuing:
|
|
|
28
32
|
or `nvm`.
|
|
29
33
|
- **Python 3.10+** required (runs the okstra core).
|
|
30
34
|
- The current working directory must be inside the project that will host the
|
|
31
|
-
okstra metadata. If unsure, ask with `
|
|
35
|
+
okstra metadata. If unsure, ask with `prompt_user` for an absolute project
|
|
32
36
|
root before proceeding.
|
|
33
37
|
|
|
34
38
|
## Step 1: Install okstra
|
|
@@ -88,7 +92,7 @@ Do not run recursive `sudo chown` based only on npm's generic message. A cache
|
|
|
88
92
|
override does not grant network access or permission to write the installation
|
|
89
93
|
targets; follow the host's permission mechanism if either remains blocked.
|
|
90
94
|
|
|
91
|
-
**
|
|
95
|
+
**Shell invocation rule (permission-friendly)**: after Step 1, every shell command in this skill MUST begin with the literal token `okstra` and pass literal argument values. Do not introduce shell variables (`$PROJECT_ROOT`, `$PROJECT_ID`, ...), `$(...)` command substitution, leading `VAR=...` assignments, or wrap commands in `if`/`eval`/`||`/`&&` — any of those make the command harder to audit; apply the current host's execution-permission guidance. When a prior tool call emitted a path or value, paste the literal string into the next command. Every `okstra <subcmd>` call self-bootstraps its Python path — never run `okstra paths --shell` / `export PYTHONPATH=...`.
|
|
92
96
|
|
|
93
97
|
## Step 2: Resolve PROJECT_ROOT
|
|
94
98
|
|
|
@@ -101,7 +105,7 @@ carries `Project ID` and `Project root`; on `Okstra preflight: failed` it carrie
|
|
|
101
105
|
`Stage`, `Reason`, and `Recovery`, and no `Project root` line.
|
|
102
106
|
|
|
103
107
|
- `Okstra preflight: ready` → carry `Project root` as a literal absolute string and paste it into every subsequent command in this skill.
|
|
104
|
-
- `Okstra preflight: failed`, `Stage: resolve` → ask the user (`
|
|
108
|
+
- `Okstra preflight: failed`, `Stage: resolve` → ask the user (`prompt_user`, free text) for an absolute project root and rerun as a separate shell-command tool call with the literal absolute path:
|
|
105
109
|
|
|
106
110
|
```bash
|
|
107
111
|
okstra preflight --runtime <host-runtime> --cwd /abs/path/from/user
|
|
@@ -126,7 +130,7 @@ okstra refuses to change `projectId` on an existing project (see
|
|
|
126
130
|
`okstra_project.resolver.upsert_project_json`), so overwriting requires
|
|
127
131
|
manually deleting the file first.
|
|
128
132
|
|
|
129
|
-
If the file does NOT exist, ask via `
|
|
133
|
+
If the file does NOT exist, ask via `prompt_user`:
|
|
130
134
|
|
|
131
135
|
- **Question**: `"Project id for okstra (e.g. INV-1234, my-app, okstra)"`
|
|
132
136
|
- **Validate**: the answer must be non-empty AND contain at least one
|
|
@@ -4,7 +4,7 @@ Use this reference only when the user asks to customise one of the areas below a
|
|
|
4
4
|
`project.json` exists. The built-in defaults work for most projects — none of
|
|
5
5
|
these sections is required for a working setup.
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The Shell invocation rule from SKILL.md applies to every command here.
|
|
8
8
|
|
|
9
9
|
## A. Worktree sync dirs (`worktreeSyncDirs`)
|
|
10
10
|
|
|
@@ -172,7 +172,7 @@ the next `okstra setup` or run prepare.
|
|
|
172
172
|
opt-in; the same prompt is offered again on the first `release-handoff` run,
|
|
173
173
|
so deferring (`Later`) is safe.
|
|
174
174
|
|
|
175
|
-
Ask with `
|
|
175
|
+
Ask with `prompt_user` (fixed options — file path entry happens in the
|
|
176
176
|
follow-up plain text prompt):
|
|
177
177
|
|
|
178
178
|
- **Question**: `"Register the PR body template that release-handoff will use for this project?"`
|
|
@@ -200,7 +200,7 @@ The value is a language tag (`en`, `ko`, `fr`, `pt-BR`, …). The report writer
|
|
|
200
200
|
writes the report prose directly in that language; no translation step runs.
|
|
201
201
|
If you skip, no `reportLanguage` field is written and the runtime uses `en`.
|
|
202
202
|
|
|
203
|
-
|
|
203
|
+
prompt_user (fixed options):
|
|
204
204
|
- Question: `"Which language should the final report be written in?"`
|
|
205
205
|
- Options:
|
|
206
206
|
1. `English (recommended)` → `en`
|
|
@@ -14,10 +14,14 @@ Project usage snapshot. The skill itself writes nothing. `okstra usage-report` r
|
|
|
14
14
|
|
|
15
15
|
## Step 0: Preflight
|
|
16
16
|
|
|
17
|
+
<!-- BEGIN FRAGMENT: host-runtime-selection -->
|
|
18
|
+
Resolve `<host-runtime>` from the launcher's `OKSTRA_RUNTIME_HOST` when present; otherwise use the registered host ID declared by the current harness. Do not infer the host from worker models, installed executables, or `PATH`. If neither source identifies the host, report that it is unknown instead of substituting another host. Keep the same resolved host when retrying against another project directory.
|
|
19
|
+
<!-- END FRAGMENT: host-runtime-selection -->
|
|
20
|
+
|
|
17
21
|
Run one literal Bash call:
|
|
18
22
|
|
|
19
23
|
```bash
|
|
20
|
-
okstra preflight --runtime
|
|
24
|
+
okstra preflight --runtime <host-runtime>
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
On `Okstra preflight: ready`, carry the fixed `Project root` line. On
|
|
@@ -6,6 +6,10 @@ description: >-
|
|
|
6
6
|
|
|
7
7
|
# OKSTRA User Response
|
|
8
8
|
|
|
9
|
+
<!-- BEGIN FRAGMENT: host-question-interface -->
|
|
10
|
+
For authored questions, `prompt_user` means the current host's available question interface, not a literal tool name. Use the selected host relay when one is provided. Preserve every question, option, description, and answer; use native controls only when the live session permits them and the complete interaction fits its limits. Otherwise show complete numbered choices and accept the user's reply; collect free text through normal conversation. If a native control is refused, follow the relay's recovery mapping, or use text when no relay is provided. A delivery acknowledgement or preselected option is not an answer; wait for the user's actual response.
|
|
11
|
+
<!-- END FRAGMENT: host-question-interface -->
|
|
12
|
+
|
|
9
13
|
Use this skill for open `C-*` clarification items, explicit plan decisions, and the implementation direction a finished `implementation-option-selection` comparison awaits. The user alone selects or writes every answer. Never infer an answer or approval.
|
|
10
14
|
|
|
11
15
|
The model-facing commands are fixed text reads and typed transaction writes:
|
|
@@ -28,7 +32,7 @@ Do not use the automation-oriented `list` or `show` commands. Do not open a repo
|
|
|
28
32
|
Use the registered host ID that the current harness declares for this session. Do not infer it from an executable or `PATH`. Do not substitute `claude-code`.
|
|
29
33
|
|
|
30
34
|
<!-- BEGIN FRAGMENT: bash-invocation-rule -->
|
|
31
|
-
Run one
|
|
35
|
+
Run one shell-command tool call, starting with the literal token `okstra` (never wrapped in `if`/`eval`/`export`/`$(...)`/`VAR=...`/`||`/`&&`/`npx` — literal command tokens keep execution permissions reviewable):
|
|
32
36
|
<!-- END FRAGMENT: bash-invocation-rule -->
|
|
33
37
|
|
|
34
38
|
```bash
|
|
@@ -57,12 +61,12 @@ Every choice this skill asks — the task pick, each clarification, an explicit
|
|
|
57
61
|
|
|
58
62
|
Read the absolute path in the fixed `Relay contract` line. In that file, take the `Wizard interaction relay` JSON. Intersect its `semanticFunctions` with the functions this session can actually call, using each `interactions` kind's `function` field. The live harness does not expose tools named `native_single_select`. Keep `native-single` only when `native_single_select` is in that intersection. Keep `nativeLimits`. If `Relay contract` is `-`, native-single is unavailable.
|
|
59
63
|
|
|
60
|
-
- When `native-single` is available and the option count fits `nativeLimits` (unique labels, within min/max): call `interactions.native-single.function` once with one question and every option as `{label, description}` in original order. Do not print a numbered list in chat while the native tool is available. Emit the question as the last thing in that turn; text emitted after the call renders below the question.
|
|
64
|
+
- When `native-single` is available and the option count fits `nativeLimits` (unique labels, within min/max): call `interactions.native-single.function` once with one question and every option as `{label, description}` in original order. Do not print a numbered list in chat while the native tool is available. Emit the question as the last thing in that turn; text emitted after the call renders below the question. Copy the function name from the selected relay field; do not substitute another host's function.
|
|
61
65
|
- Otherwise render a 1-based numbered Markdown list and wait for the next message. Do not drop options to force the native tool.
|
|
62
66
|
|
|
63
67
|
Copy the view's `Picker:` `- Label:` / `Description:` pairs into that function in that order. Do not rebuild labels from the `Options:` dump. `--option-number` is the 1-based `Option N:` index, which is the same order as `Picker:`. The HTML report's `<select>` uses the same `option.answer` values.
|
|
64
68
|
|
|
65
|
-
Pass only the choices this step already owns — the `list-view` `Picker:` rows, the report `Picker:` rows, or the two confirmation labels. Do not append `Enter directly`.
|
|
69
|
+
Pass only the choices this step already owns — the `list-view` `Picker:` rows, the report `Picker:` rows, or the two confirmation labels. Do not append `Enter directly`. The selected host's free-input mechanism already collects a custom answer; that row is `Enters an answer`. When native-single is unavailable, a next message that is not a listed label or its 1-based number is the same `Enters an answer`. Do not ask a second question for the custom value.
|
|
66
70
|
|
|
67
71
|
Never invent a picker function. Never ask the user to type a number when the native tool is available.
|
|
68
72
|
|