prizmkit 1.1.195 → 1.1.196
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/bundled/VERSION.json +3 -3
- package/bundled/dev-pipeline/README.md +3 -1
- package/bundled/dev-pipeline/prizmkit_runtime/commands.py +31 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +10 -9
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +10 -9
- package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +10 -9
- package/package.json +1 -1
package/bundled/VERSION.json
CHANGED
|
@@ -660,6 +660,8 @@ AI_CLI=agent python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
|
660
660
|
AI_CLI=agy python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
661
661
|
```
|
|
662
662
|
|
|
663
|
+
`diagnostics ai-cli` emits structured resolution and capability fields (`detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode` as `flag` | `config` | `none` | `custom_ignored`, `supported_effort_values`, and `cli_available`, plus optional `model` and `note` lines). It exits non-zero when no AI CLI can be resolved (`detected_cli: (not found)`), and reports `cli_available: false` with a diagnostic `note:` when an explicitly configured CLI executable is not found on `PATH`.
|
|
664
|
+
|
|
663
665
|
### Cursor Agent native headless contract
|
|
664
666
|
|
|
665
667
|
Install Cursor Agent separately (`curl https://cursor.com/install -fsS | bash` on macOS/Linux/WSL, or `irm 'https://cursor.com/install?win32=true' | iex` in native Windows PowerShell). Verify and authenticate with `agent --version`, `agent login`, and `agent status`; update with `agent update`. Because `agent` is a generic executable name, PATH fallback verifies Cursor identity and the required help flags before selecting it.
|
|
@@ -670,7 +672,7 @@ For a Pipeline session, PrizmKit runs:
|
|
|
670
672
|
agent --print --force --trust --output-format stream-json [--model <model>]
|
|
671
673
|
```
|
|
672
674
|
|
|
673
|
-
The complete coordinator Prompt is sent through stdin and the active task checkout is the process `cwd`. PrizmKit does not pass Cursor `--worktree`, does not disable Cursor sandbox policy, and does not create or modify `.cursor/cli.json`; user and enterprise deny policy continues to apply. Authentication is inherited from `agent login` or `CURSOR_API_KEY`, never serialized into PrizmKit config, argv, or logs. Cursor exposes no documented effort parameter, so `PRIZMKIT_EFFORT` must remain unset for `AI_CLI=agent
|
|
675
|
+
The complete coordinator Prompt is sent through stdin and the active task checkout is the process `cwd`. PrizmKit does not pass Cursor `--worktree`, does not disable Cursor sandbox policy, and does not create or modify `.cursor/cli.json`; user and enterprise deny policy continues to apply. Authentication is inherited from `agent login` or `CURSOR_API_KEY`, never serialized into PrizmKit config, argv, or logs. Cursor exposes no documented effort parameter, so `PRIZMKIT_EFFORT` must remain unset for `AI_CLI=agent` (a non-empty value fails with an actionable diagnostic); instead, Cursor supports parameterized `--model` identifiers such as `MODEL='claude-opus-4-8[context=1m,effort=high,fast=false]'`.
|
|
674
676
|
|
|
675
677
|
### Antigravity CLI native headless contract
|
|
676
678
|
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import os
|
|
6
|
+
import shutil
|
|
5
7
|
from dataclasses import dataclass
|
|
8
|
+
from pathlib import Path
|
|
6
9
|
|
|
7
10
|
from .compat import MIN_PYTHON
|
|
8
11
|
from .interoperability import UTILITY_ENTRYPOINTS, describe_existing_entrypoint
|
|
@@ -303,6 +306,26 @@ def diagnostics_version() -> CommandResult:
|
|
|
303
306
|
)
|
|
304
307
|
|
|
305
308
|
|
|
309
|
+
def _is_cli_executable_available(
|
|
310
|
+
command: str | None,
|
|
311
|
+
path_entries: tuple[Path, ...] | None,
|
|
312
|
+
) -> bool:
|
|
313
|
+
"""Return whether the resolved AI CLI executable exists and is runnable."""
|
|
314
|
+
if not command:
|
|
315
|
+
return False
|
|
316
|
+
if os.sep in command or (os.altsep and os.altsep in command):
|
|
317
|
+
candidate = Path(command)
|
|
318
|
+
if os.name == "nt":
|
|
319
|
+
return candidate.is_file()
|
|
320
|
+
return candidate.is_file() and os.access(command, os.X_OK)
|
|
321
|
+
search_path = (
|
|
322
|
+
os.pathsep.join(str(entry) for entry in path_entries)
|
|
323
|
+
if path_entries is not None
|
|
324
|
+
else os.environ.get("PATH", "")
|
|
325
|
+
)
|
|
326
|
+
return shutil.which(command, path=search_path) is not None
|
|
327
|
+
|
|
328
|
+
|
|
306
329
|
def diagnostics_ai_cli(paths: RuntimePaths | None = None) -> CommandResult:
|
|
307
330
|
"""Report the family-neutral AI CLI resolution used by runtime commands."""
|
|
308
331
|
from .config import ai_cli_capabilities, load_runtime_config
|
|
@@ -316,6 +339,9 @@ def diagnostics_ai_cli(paths: RuntimePaths | None = None) -> CommandResult:
|
|
|
316
339
|
if capabilities.supported_effort_values
|
|
317
340
|
else "none"
|
|
318
341
|
)
|
|
342
|
+
env_obj = getattr(config, "environment", None)
|
|
343
|
+
path_entries = getattr(env_obj, "path_entries", None)
|
|
344
|
+
cli_available = _is_cli_executable_available(config.ai_client.command, path_entries)
|
|
319
345
|
details = [
|
|
320
346
|
f"detected_cli: {cli}",
|
|
321
347
|
f"platform: {config.ai_client.platform or 'unresolved'}",
|
|
@@ -324,10 +350,15 @@ def diagnostics_ai_cli(paths: RuntimePaths | None = None) -> CommandResult:
|
|
|
324
350
|
f"model_arg_supported: {'true' if capabilities.model_arg_supported else 'false'}",
|
|
325
351
|
f"effort_flag_mode: {capabilities.effort_flag_mode}",
|
|
326
352
|
f"supported_effort_values: {supported_efforts}",
|
|
353
|
+
f"cli_available: {'true' if cli_available else 'false'}",
|
|
327
354
|
]
|
|
328
355
|
if config.model:
|
|
329
356
|
details.append(f"model: {config.model}")
|
|
330
357
|
details.extend(f"note: {note}" for note in config.ai_client.notes)
|
|
358
|
+
if config.ai_client.command and not cli_available:
|
|
359
|
+
details.append(
|
|
360
|
+
f"note: Resolved AI CLI '{cli}' was not found on PATH; install it or adjust PATH/AI_CLI before launching."
|
|
361
|
+
)
|
|
331
362
|
return CommandResult(
|
|
332
363
|
0 if config.ai_client.command else 1,
|
|
333
364
|
"Python runtime AI CLI diagnostics",
|
|
@@ -12,15 +12,15 @@ Return this cross-platform check command as part of start-command preparation:
|
|
|
12
12
|
python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, and `
|
|
15
|
+
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, and `cli_available`, and exits non-zero if no AI CLI can be resolved (`detected_cli: (not found)`).
|
|
16
16
|
|
|
17
17
|
## On-Demand Read-Only CLI Capability Probe
|
|
18
18
|
|
|
19
19
|
- **Fast default launch (skip probing)**: When Advanced config is not selected and the user did not mention or ask about a custom model or reasoning effort, skip all read-only CLI probing (`diagnostics ai-cli` and `--help`) and output `Read-only CLI probe: skipped (default launch without custom model/effort)`.
|
|
20
|
-
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT
|
|
21
|
-
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` and read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`),
|
|
20
|
+
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT` (including when paired with a per-invocation `AI_CLI=<cli>` override):
|
|
21
|
+
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` — or `AI_CLI=<cli> python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` whenever the user explicitly specifies a per-invocation `AI_CLI=<cli>` override (and preserve `AI_CLI=<cli>` in the returned launch command) — then read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`), `supported_effort_values` (comma-separated values or `none`), and `cli_available` (`true`|`false`). Consume these structured fields directly with zero legacy fallback parsing; if any required capability field is absent, treat the probe as failed under Branch 1.
|
|
22
22
|
2. If `effort_flag_mode` is `custom_ignored`, route directly to Branch 2 without requiring `<cli> --help`.
|
|
23
|
-
3. Otherwise, verify that the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
23
|
+
3. Otherwise, verify that `cli_available` is `true` and the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
24
24
|
4. Keep every probe strictly read-only and bounded: never invoke prompt runs, interactive logins, file writes, Git mutations, or pipeline commands (`run`, `daemon start`, `stop`, `reset`). Record a concise summary of observed capability facts in `Read-only CLI probe:`.
|
|
25
25
|
|
|
26
26
|
## Base Configuration Mapping
|
|
@@ -52,7 +52,7 @@ Ask only when the user selected Advanced config or explicitly requested custom m
|
|
|
52
52
|
Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fields plus live `--help` output; the first matching branch governs placement. Never branch on hardcoded platform CLI allowlists.
|
|
53
53
|
|
|
54
54
|
1. **Branch 1 — Probe failed, CLI missing, or insufficient help output**:
|
|
55
|
-
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
55
|
+
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, `cli_available` is `false`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, `cli_available`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
56
56
|
- Action: Never guess or synthesize `PRIZMKIT_EFFORT`. Omit `PRIZMKIT_EFFORT`, state the exact probe gap in `Read-only CLI probe:` and warnings, and allow an optional explicit `MODEL=<name>` only if diagnostics did not confirm `model_arg_supported: false` (otherwise leave `MODEL` unset).
|
|
57
57
|
2. **Branch 2 — Model-embedded intensity syntax or `custom_ignored` profile**:
|
|
58
58
|
- Condition: `effort_flag_mode` is `custom_ignored` (routed directly without letting `<cli> --help` failure trigger Branch 1), OR (`model_arg_supported` is `true`, no compatible independent effort mechanism applies — `effort_flag_mode` is `none`, or `supported_effort_values` is `none`, or `effort_flag_mode` is `flag` with no compatible effort/thinking flag in `--help`, excluding compatible `effort_flag_mode: config` — AND live `--help` documents encoding intensity inside the model identifier syntax such as `<model>:<level>` or parameterized model notation).
|
|
@@ -62,23 +62,24 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
|
|
|
62
62
|
- Action: Do not emit `PRIZMKIT_EFFORT` (keep it unset so the runtime does not reject it pre-launch). Still permit `MODEL=<name>` when `model_arg_supported` is `true`.
|
|
63
63
|
4. **Branch 4 — Independent effort compatible**:
|
|
64
64
|
- Condition: (`effort_flag_mode` is `flag` with live `--help` confirming a compatible effort/thinking option, OR `effort_flag_mode` is `config`) AND `supported_effort_values` is non-empty (not `none`).
|
|
65
|
-
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default).
|
|
65
|
+
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default). If the confirmed `MODEL` value already embeds a reasoning-effort suffix or parameter (for CLIs that accept both model-embedded intensity and an independent effort flag), omit `PRIZMKIT_EFFORT` by default and note that intensity is already specified in `MODEL` so conflicting intensity settings are not sent together.
|
|
66
66
|
|
|
67
67
|
## Command Construction Rules
|
|
68
68
|
|
|
69
|
-
- Foreground: place environment assignments (`VERBOSE=...`, `MAX_RETRIES=...`, `STOP_ON_FAILURE=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`) before `python3`.
|
|
69
|
+
- Foreground: place environment assignments (`AI_CLI=...` when overridden, `VERBOSE=...`, `MAX_RETRIES=...`, `STOP_ON_FAILURE=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`) before `python3`.
|
|
70
70
|
- Background daemon: place environment assignments inside one `--env "..."` value.
|
|
71
71
|
- **Parameterized `MODEL` quoting**:
|
|
72
|
-
- Foreground: single-quote parameterized `MODEL` values containing colons, parentheses, spaces, commas, or shell metacharacters:
|
|
72
|
+
- Foreground: single-quote parameterized `MODEL` values containing colons, square brackets, parentheses, spaces, commas, or shell metacharacters:
|
|
73
73
|
```bash
|
|
74
74
|
MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
|
|
75
75
|
python3 ./.prizmkit/dev-pipeline/cli.py run bugfix .prizmkit/plans/bug-fix-list.json
|
|
76
76
|
```
|
|
77
|
-
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it
|
|
77
|
+
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it to preserve non-space parameterized syntax (colons, square brackets, parentheses, commas) on both POSIX and Windows:
|
|
78
78
|
```bash
|
|
79
79
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon bugfix start .prizmkit/plans/bug-fix-list.json \
|
|
80
80
|
--env "VERBOSE=1 MAX_RETRIES=3 MODEL='<model-with-level>'"
|
|
81
81
|
```
|
|
82
|
+
If a `MODEL` value contains spaces, quote the whole `MODEL=...` assignment inside `--env` (for example, `--env "VERBOSE=1 MAX_RETRIES=3 'MODEL=<model with spaces>'"`) so both POSIX and Windows daemon env parsing preserve spaces cleanly.
|
|
82
83
|
- Include only confirmed options.
|
|
83
84
|
- Preserve the user-provided list path.
|
|
84
85
|
- Shell-quote custom paths and values.
|
|
@@ -12,15 +12,15 @@ Return this cross-platform check command as part of start-command preparation:
|
|
|
12
12
|
python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, and `
|
|
15
|
+
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, and `cli_available`, and exits non-zero if no AI CLI can be resolved (`detected_cli: (not found)`).
|
|
16
16
|
|
|
17
17
|
## On-Demand Read-Only CLI Capability Probe
|
|
18
18
|
|
|
19
19
|
- **Fast default launch (skip probing)**: When Advanced config is not selected and the user did not mention or ask about a custom model or reasoning effort, skip all read-only CLI probing (`diagnostics ai-cli` and `--help`) and output `Read-only CLI probe: skipped (default launch without custom model/effort)`.
|
|
20
|
-
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT
|
|
21
|
-
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` and read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`),
|
|
20
|
+
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT` (including when paired with a per-invocation `AI_CLI=<cli>` override):
|
|
21
|
+
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` — or `AI_CLI=<cli> python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` whenever the user explicitly specifies a per-invocation `AI_CLI=<cli>` override (and preserve `AI_CLI=<cli>` in the returned launch command) — then read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`), `supported_effort_values` (comma-separated values or `none`), and `cli_available` (`true`|`false`). Consume these structured fields directly with zero legacy fallback parsing; if any required capability field is absent, treat the probe as failed under Branch 1.
|
|
22
22
|
2. If `effort_flag_mode` is `custom_ignored`, route directly to Branch 2 without requiring `<cli> --help`.
|
|
23
|
-
3. Otherwise, verify that the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
23
|
+
3. Otherwise, verify that `cli_available` is `true` and the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
24
24
|
4. Keep every probe strictly read-only and bounded: never invoke prompt runs, interactive logins, file writes, Git mutations, or pipeline commands (`run`, `daemon start`, `stop`, `reset`). Record a concise summary of observed capability facts in `Read-only CLI probe:`.
|
|
25
25
|
|
|
26
26
|
## Base Configuration Mapping
|
|
@@ -52,7 +52,7 @@ Ask only when the user selected Advanced config or explicitly requested custom m
|
|
|
52
52
|
Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fields plus live `--help` output; the first matching branch governs placement. Never branch on hardcoded platform CLI allowlists.
|
|
53
53
|
|
|
54
54
|
1. **Branch 1 — Probe failed, CLI missing, or insufficient help output**:
|
|
55
|
-
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
55
|
+
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, `cli_available` is `false`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, `cli_available`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
56
56
|
- Action: Never guess or synthesize `PRIZMKIT_EFFORT`. Omit `PRIZMKIT_EFFORT`, state the exact probe gap in `Read-only CLI probe:` and warnings, and allow an optional explicit `MODEL=<name>` only if diagnostics did not confirm `model_arg_supported: false` (otherwise leave `MODEL` unset).
|
|
57
57
|
2. **Branch 2 — Model-embedded intensity syntax or `custom_ignored` profile**:
|
|
58
58
|
- Condition: `effort_flag_mode` is `custom_ignored` (routed directly without letting `<cli> --help` failure trigger Branch 1), OR (`model_arg_supported` is `true`, no compatible independent effort mechanism applies — `effort_flag_mode` is `none`, or `supported_effort_values` is `none`, or `effort_flag_mode` is `flag` with no compatible effort/thinking flag in `--help`, excluding compatible `effort_flag_mode: config` — AND live `--help` documents encoding intensity inside the model identifier syntax such as `<model>:<level>` or parameterized model notation).
|
|
@@ -62,23 +62,24 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
|
|
|
62
62
|
- Action: Do not emit `PRIZMKIT_EFFORT` (keep it unset so the runtime does not reject it pre-launch). Still permit `MODEL=<name>` when `model_arg_supported` is `true`.
|
|
63
63
|
4. **Branch 4 — Independent effort compatible**:
|
|
64
64
|
- Condition: (`effort_flag_mode` is `flag` with live `--help` confirming a compatible effort/thinking option, OR `effort_flag_mode` is `config`) AND `supported_effort_values` is non-empty (not `none`).
|
|
65
|
-
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default).
|
|
65
|
+
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default). If the confirmed `MODEL` value already embeds a reasoning-effort suffix or parameter (for CLIs that accept both model-embedded intensity and an independent effort flag), omit `PRIZMKIT_EFFORT` by default and note that intensity is already specified in `MODEL` so conflicting intensity settings are not sent together.
|
|
66
66
|
|
|
67
67
|
## Command Construction Rules
|
|
68
68
|
|
|
69
|
-
- Foreground: place environment assignments (`VERBOSE=...`, `MAX_RETRIES=...`, `STOP_ON_FAILURE=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`) before `python3`.
|
|
69
|
+
- Foreground: place environment assignments (`AI_CLI=...` when overridden, `VERBOSE=...`, `MAX_RETRIES=...`, `STOP_ON_FAILURE=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`) before `python3`.
|
|
70
70
|
- Background daemon: place environment assignments inside one `--env "..."` value.
|
|
71
71
|
- **Parameterized `MODEL` quoting**:
|
|
72
|
-
- Foreground: single-quote parameterized `MODEL` values containing colons, parentheses, spaces, commas, or shell metacharacters:
|
|
72
|
+
- Foreground: single-quote parameterized `MODEL` values containing colons, square brackets, parentheses, spaces, commas, or shell metacharacters:
|
|
73
73
|
```bash
|
|
74
74
|
MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
|
|
75
75
|
python3 ./.prizmkit/dev-pipeline/cli.py run feature .prizmkit/plans/feature-list.json
|
|
76
76
|
```
|
|
77
|
-
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it
|
|
77
|
+
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it to preserve non-space parameterized syntax (colons, square brackets, parentheses, commas) on both POSIX and Windows:
|
|
78
78
|
```bash
|
|
79
79
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json \
|
|
80
80
|
--env "VERBOSE=1 MAX_RETRIES=3 MODEL='<model-with-level>'"
|
|
81
81
|
```
|
|
82
|
+
If a `MODEL` value contains spaces, quote the whole `MODEL=...` assignment inside `--env` (for example, `--env "VERBOSE=1 MAX_RETRIES=3 'MODEL=<model with spaces>'"`) so both POSIX and Windows daemon env parsing preserve spaces cleanly.
|
|
82
83
|
- Include only confirmed options.
|
|
83
84
|
- Preserve the user-provided list path and feature filter.
|
|
84
85
|
- Shell-quote custom paths and values.
|
|
@@ -13,15 +13,15 @@ prizmkit diagnostics ai-cli
|
|
|
13
13
|
python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, and `
|
|
16
|
+
`diagnostics ai-cli` reports `detected_cli`, `platform`, `source`, `runtime_mode`, `model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, and `cli_available`, and exits non-zero if no AI CLI can be resolved (`detected_cli: (not found)`).
|
|
17
17
|
|
|
18
18
|
## On-Demand Read-Only CLI Capability Probe
|
|
19
19
|
|
|
20
20
|
- **Fast default launch (skip probing)**: When Advanced config is not selected and the user did not mention or ask about a custom model or reasoning effort, skip all read-only CLI probing (`diagnostics ai-cli` and `--help`) and output `Read-only CLI probe: skipped (default launch without custom model/effort)`.
|
|
21
|
-
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT
|
|
22
|
-
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` and read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`),
|
|
21
|
+
- **On-demand probe trigger**: Run the bounded read-only probe sequence only when Advanced config is selected or the user explicitly specifies or asks about `MODEL` or `PRIZMKIT_EFFORT` (including when paired with a per-invocation `AI_CLI=<cli>` override):
|
|
22
|
+
1. Run `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` — or `AI_CLI=<cli> python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` whenever the user explicitly specifies a per-invocation `AI_CLI=<cli>` override (and preserve `AI_CLI=<cli>` in the returned launch command) — then read the structured capability fields directly: `detected_cli`, `platform`, `source`, `model_arg_supported` (`true`|`false`), `effort_flag_mode` (`flag`|`config`|`none`|`custom_ignored`), `supported_effort_values` (comma-separated values or `none`), and `cli_available` (`true`|`false`). Consume these structured fields directly with zero legacy fallback parsing; if any required capability field is absent, treat the probe as failed under Branch 1.
|
|
23
23
|
2. If `effort_flag_mode` is `custom_ignored`, route directly to Branch 2 without requiring `<cli> --help`.
|
|
24
|
-
3. Otherwise, verify that the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
24
|
+
3. Otherwise, verify that `cli_available` is `true` and the resolved `detected_cli` executable exists on `PATH` (when not `(not found)`), then run `<cli> --help` (and `<cli> exec --help` when the CLI exposes an `exec` subcommand or `effort_flag_mode` is `config`) to inspect live model flags, independent effort/thinking options, or model-embedded intensity syntax.
|
|
25
25
|
4. Keep every probe strictly read-only and bounded: never invoke prompt runs, interactive logins, file writes, Git mutations, or pipeline commands (`run`, `daemon start`, `stop`, `reset`). Record a concise summary of observed capability facts in `Read-only CLI probe:`.
|
|
26
26
|
|
|
27
27
|
## Base Configuration Mapping
|
|
@@ -63,7 +63,7 @@ Ask only when the user selected Advanced config or explicitly requested custom m
|
|
|
63
63
|
Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fields plus live `--help` output; the first matching branch governs placement. Never branch on hardcoded platform CLI allowlists.
|
|
64
64
|
|
|
65
65
|
1. **Branch 1 — Probe failed, CLI missing, or insufficient help output**:
|
|
66
|
-
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
66
|
+
- Condition: `diagnostics ai-cli` fails or exits non-zero, `detected_cli` is `(not found)` or missing on `PATH`, `cli_available` is `false`, required capability fields (`model_arg_supported`, `effort_flag_mode`, `supported_effort_values`, `cli_available`) are absent, OR (when `effort_flag_mode` is not `custom_ignored`) `<cli> --help` fails or yields insufficient output.
|
|
67
67
|
- Action: Never guess or synthesize `PRIZMKIT_EFFORT`. Omit `PRIZMKIT_EFFORT`, state the exact probe gap in `Read-only CLI probe:` and warnings, and allow an optional explicit `MODEL=<name>` only if diagnostics did not confirm `model_arg_supported: false` (otherwise leave `MODEL` unset).
|
|
68
68
|
2. **Branch 2 — Model-embedded intensity syntax or `custom_ignored` profile**:
|
|
69
69
|
- Condition: `effort_flag_mode` is `custom_ignored` (routed directly without letting `<cli> --help` failure trigger Branch 1), OR (`model_arg_supported` is `true`, no compatible independent effort mechanism applies — `effort_flag_mode` is `none`, or `supported_effort_values` is `none`, or `effort_flag_mode` is `flag` with no compatible effort/thinking flag in `--help`, excluding compatible `effort_flag_mode: config` — AND live `--help` documents encoding intensity inside the model identifier syntax such as `<model>:<level>` or parameterized model notation).
|
|
@@ -73,14 +73,14 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
|
|
|
73
73
|
- Action: Do not emit `PRIZMKIT_EFFORT` (keep it unset so the runtime does not reject it pre-launch). Still permit `MODEL=<name>` when `model_arg_supported` is `true`.
|
|
74
74
|
4. **Branch 4 — Independent effort compatible**:
|
|
75
75
|
- Condition: (`effort_flag_mode` is `flag` with live `--help` confirming a compatible effort/thinking option, OR `effort_flag_mode` is `config`) AND `supported_effort_values` is non-empty (not `none`).
|
|
76
|
-
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default).
|
|
76
|
+
- Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit `PRIZMKIT_EFFORT` and disclose the capability mismatch rather than emitting an unvalidated value. Otherwise present the valid choices and emit `PRIZMKIT_EFFORT=<value>` (or omit for default). If the confirmed `MODEL` value already embeds a reasoning-effort suffix or parameter (for CLIs that accept both model-embedded intensity and an independent effort flag), omit `PRIZMKIT_EFFORT` by default and note that intensity is already specified in `MODEL` so conflicting intensity settings are not sent together.
|
|
77
77
|
|
|
78
78
|
## Command Construction Rules
|
|
79
79
|
|
|
80
|
-
- Foreground (`run iterate`): place environment assignments (`VERBOSE=...`, `MAX_RETRIES=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`, `PRIZMKIT_ITERATE_SAFETY_CAP=...`) before `prizmkit` or `python3`; omit env assignments when all defaults apply.
|
|
80
|
+
- Foreground (`run iterate`): place environment assignments (`AI_CLI=...` when overridden, `VERBOSE=...`, `MAX_RETRIES=...`, `MODEL=...`, `PRIZMKIT_EFFORT=...`, `PRIZMKIT_ITERATE_SAFETY_CAP=...`) before `prizmkit` or `python3`; omit env assignments when all defaults apply.
|
|
81
81
|
- Background daemon (`daemon iterate start`): place environment assignments inside one `--env "..."` value; omit `--env` when no environment overrides are selected.
|
|
82
82
|
- **Parameterized `MODEL` quoting**:
|
|
83
|
-
- Foreground: single-quote parameterized `MODEL` values containing colons, parentheses, spaces, commas, or shell metacharacters:
|
|
83
|
+
- Foreground: single-quote parameterized `MODEL` values containing colons, square brackets, parentheses, spaces, commas, or shell metacharacters:
|
|
84
84
|
```bash
|
|
85
85
|
# Short CLI
|
|
86
86
|
MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
|
|
@@ -90,7 +90,7 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
|
|
|
90
90
|
MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
|
|
91
91
|
python3 ./.prizmkit/dev-pipeline/cli.py run iterate
|
|
92
92
|
```
|
|
93
|
-
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it
|
|
93
|
+
- Background daemon: wrap `--env` in double quotes and single-quote the `MODEL` value inside it to preserve non-space parameterized syntax (colons, square brackets, parentheses, commas) on both POSIX and Windows:
|
|
94
94
|
```bash
|
|
95
95
|
# Short CLI
|
|
96
96
|
prizmkit daemon iterate start \
|
|
@@ -100,6 +100,7 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
|
|
|
100
100
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start \
|
|
101
101
|
--env "VERBOSE=1 MAX_RETRIES=3 MODEL='<model-with-level>'"
|
|
102
102
|
```
|
|
103
|
+
If a `MODEL` value contains spaces, quote the whole `MODEL=...` assignment inside `--env` (for example, `--env "VERBOSE=1 MAX_RETRIES=3 'MODEL=<model with spaces>'"`) so both POSIX and Windows daemon env parsing preserve spaces cleanly.
|
|
103
104
|
- Do not pass `--dry-run` to `daemon iterate start`; `--dry-run` is supported only on foreground `run iterate`.
|
|
104
105
|
- Include only confirmed options and shell-quote custom `--focus` values and paths.
|
|
105
106
|
- Return only the confirmed execution mode (foreground or background daemon), providing both the short `prizmkit` command and the canonical `python3 ./.prizmkit/dev-pipeline/cli.py` command.
|