prizmkit 1.1.196 → 1.1.198

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.
Files changed (108) hide show
  1. package/bin/create-prizmkit.js +1 -7
  2. package/bundled/VERSION.json +3 -3
  3. package/bundled/adapters/antigravity/assets/prizmkit-hook.cjs +1 -1
  4. package/bundled/adapters/antigravity/rules-adapter.js +1 -13
  5. package/bundled/adapters/claude/paths.js +0 -1
  6. package/bundled/adapters/claude/settings-adapter.js +3 -8
  7. package/bundled/adapters/codex/paths.js +0 -1
  8. package/bundled/adapters/codex/settings-adapter.js +1 -1
  9. package/bundled/adapters/cursor/assets/prizmkit-hook.cjs +1 -1
  10. package/bundled/adapters/cursor/rules-adapter.js +1 -13
  11. package/bundled/adapters/pi/paths.js +0 -1
  12. package/bundled/dev-pipeline/.env.example +2 -2
  13. package/bundled/dev-pipeline/README.md +6 -5
  14. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +2 -2
  15. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +15 -25
  16. package/bundled/dev-pipeline/prizmkit_runtime/iterate.py +1 -69
  17. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +1 -114
  18. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +2 -2
  19. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +78 -0
  20. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +4 -234
  21. package/bundled/dev-pipeline/prizmkit_runtime/status.py +0 -5
  22. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +9 -1
  23. package/bundled/dev-pipeline/scripts/feature_list_contract.py +0 -43
  24. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +15 -76
  25. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -112
  26. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +0 -13
  27. package/bundled/dev-pipeline/scripts/init-pipeline.py +0 -1
  28. package/bundled/dev-pipeline/scripts/prompt_framework.py +0 -79
  29. package/bundled/dev-pipeline/scripts/status_common.py +150 -4
  30. package/bundled/dev-pipeline/scripts/update-bug-status.py +20 -2
  31. package/bundled/dev-pipeline/scripts/update-feature-status.py +20 -2
  32. package/bundled/dev-pipeline/scripts/utils.py +6 -0
  33. package/bundled/dev-pipeline/templates/bootstrap-prompt.md +4 -5
  34. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -101
  35. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +0 -35
  36. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +4 -52
  37. package/bundled/dev-pipeline/templates/feature-list-schema.json +0 -25
  38. package/bundled/dev-pipeline/templates/iterate/evaluate-prompt.md +5 -16
  39. package/bundled/dev-pipeline/templates/iterate/evaluation-schema.json +1 -58
  40. package/bundled/dev-pipeline/templates/iterate/headless-plan-prompt.md +1 -12
  41. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +0 -1
  42. package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +0 -1
  43. package/bundled/dev-pipeline/templates/sections/bugfix-phase-diagnose-plan.md +2 -2
  44. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  45. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +1 -1
  46. package/bundled/dev-pipeline/templates/sections/bugfix-reminders.md +0 -2
  47. package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +0 -1
  48. package/bundled/dev-pipeline/templates/sections/bugfix-task-contract.md +0 -5
  49. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -2
  50. package/bundled/dev-pipeline/templates/sections/feature-completion-summary.md +1 -1
  51. package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +3 -3
  52. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +3 -3
  53. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +3 -3
  54. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +1 -1
  55. package/bundled/dev-pipeline/templates/sections/retrospective.md +3 -3
  56. package/bundled/dev-pipeline/templates/sections/runtime-commit-handoff.md +1 -1
  57. package/bundled/rules/USAGE.md +5 -19
  58. package/bundled/rules/general/coding-baseline.md +2 -2
  59. package/bundled/rules/prizm/prizm-progressive-loading.md +2 -1
  60. package/bundled/skills/_metadata.json +4 -4
  61. package/bundled/skills/app-planner/SKILL.md +1 -1
  62. package/bundled/skills/app-planner/references/generated-plan-review.md +1 -1
  63. package/bundled/skills/app-planner/references/rules-configuration.md +6 -7
  64. package/bundled/skills/app-planner/scripts/validate-rules-configuration.py +2 -20
  65. package/bundled/skills/bug-planner/SKILL.md +5 -6
  66. package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +1 -1
  67. package/bundled/skills/bug-planner/references/input-formats.md +2 -2
  68. package/bundled/skills/bug-planner/references/schema-validation.md +0 -1
  69. package/bundled/skills/bug-planner/scripts/validate-bug-list.py +2 -9
  70. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +36 -25
  71. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +32 -26
  72. package/bundled/skills/feature-pipeline-launcher/SKILL.md +33 -25
  73. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +32 -26
  74. package/bundled/skills/feature-planner/SKILL.md +4 -10
  75. package/bundled/skills/feature-planner/references/completeness-review.md +2 -2
  76. package/bundled/skills/feature-planner/references/new-project-planning.md +0 -1
  77. package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -25
  78. package/bundled/skills/iterate-pipeline-launcher/SKILL.md +53 -42
  79. package/bundled/skills/iterate-pipeline-launcher/references/configuration.md +47 -43
  80. package/bundled/skills/prizmkit-code-review/SKILL.md +1 -1
  81. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +2 -2
  82. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  83. package/bundled/skills/prizmkit-init/SKILL.md +6 -7
  84. package/bundled/skills/prizmkit-init/references/config-schema.md +5 -9
  85. package/bundled/skills/prizmkit-init/references/rules/layer-detection.md +1 -1
  86. package/bundled/skills/prizmkit-plan/SKILL.md +1 -1
  87. package/bundled/skills/prizmkit-retrospective/SKILL.md +3 -3
  88. package/bundled/skills/prizmkit-retrospective/references/rule-evolution-steps.md +11 -17
  89. package/bundled/skills/prizmkit-workflow/SKILL.md +6 -3
  90. package/bundled/skills/prizmkit-workflow/references/cold-start-rules.md +8 -7
  91. package/bundled/templates/project-memory-template.md +2 -1
  92. package/package.json +1 -1
  93. package/src/clean.js +29 -7
  94. package/src/config.js +29 -48
  95. package/src/index.js +2 -9
  96. package/src/manifest.js +5 -9
  97. package/src/platforms.js +0 -14
  98. package/src/prompts.js +0 -13
  99. package/src/scaffold.js +100 -327
  100. package/src/upgrade.js +38 -42
  101. package/bundled/adapters/claude/rules-adapter.js +0 -25
  102. package/bundled/adapters/codebuddy/rules-adapter.js +0 -30
  103. package/bundled/adapters/codex/rules-adapter.js +0 -30
  104. package/bundled/adapters/pi/rules-adapter.js +0 -13
  105. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +0 -10
  106. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +0 -111
  107. package/bundled/skills/bug-planner/references/verification.md +0 -26
  108. package/bundled/skills/feature-planner/references/browser-interaction.md +0 -39
@@ -97,7 +97,7 @@ Every new or changed feature is an executable contract for a fresh AI session th
97
97
 
98
98
  ### Artifact-Wide AI Readability & Normalization
99
99
 
100
- - Every generated natural-language value (`project_description`, `global_context`, titles, descriptions, acceptance criteria, rationales, `completion_notes`, `testing`, `user_context`, evidence, browser verification goals, comments, parentheticals) must be a standalone domain statement (machine IDs/enums/timestamps exempt).
100
+ - Every generated natural-language value (`project_description`, `global_context`, titles, descriptions, acceptance criteria, rationales, `completion_notes`, `testing`, `user_context`, evidence, comments, parentheticals) must be a standalone domain statement (machine IDs/enums/timestamps exempt).
101
101
  - Never emit dialogue-role/chronology labels (`user said`, `user answered`, `original request`, `this round`, `previous discussion`, `as discussed earlier`, `用户本轮回答`, `如前面讨论`), planning question IDs, answer tokens, recommendation markers, checkpoint provenance, or raw internal answer-map entries.
102
102
  - Never persist standalone option labels (`A`, `B`, `C`, `方案A`, `方案B`) or transcript annotations (`(original response: "...")`). Expand relative statements (`上面`, `这个`, `按推荐走`, `同前`, `继续这样`, `用刚才的方案`, `same as above`, `go with your recommendation`) only with one provable antecedent.
103
103
  - Treat `所有问题都按你的推荐处理`, `全部按照推荐`, `use all recommendations`, and equivalent blanket recommendation approval as conversational authorization: apply concrete recommendations and omit the blanket token.
@@ -118,4 +118,4 @@ Write a calibration summary (`ID | Title | Priority | Priority Rationale | Compl
118
118
 
119
119
  ## Manual Validation Fallback (If Script Unavailable)
120
120
 
121
- Verify: sequential `F-NNN` IDs; acyclic valid `dependencies`; description >= 15 words (recommended >= 30/50/80/100 for low/medium/high/critical); valid enums (`priority`: `critical|high|medium|low`; `status`: `pending|in_progress|completed|failed|skipped|split|auto_skipped`; `estimated_complexity`: `low|medium|high|critical`); `>= 1` measurable acceptance criterion per item; valid `browser_interaction` (`tool`, `verify_steps`) and `$schema: "dev-pipeline-feature-list-v1"`.
121
+ Verify: sequential `F-NNN` IDs; acyclic valid `dependencies`; description >= 15 words (recommended >= 30/50/80/100 for low/medium/high/critical); valid enums (`priority`: `critical|high|medium|low`; `status`: `pending|in_progress|completed|failed|skipped|split|auto_skipped`; `estimated_complexity`: `low|medium|high|critical`); `>= 1` measurable acceptance criterion per item; and `$schema: "dev-pipeline-feature-list-v1"`.
@@ -34,7 +34,6 @@ For each feature define:
34
34
  - `dependencies`
35
35
  - `acceptance_criteria`
36
36
  - `status: "pending"`
37
- - `browser_interaction` when UI verification is useful (see §Browser Interaction Planning in SKILL.md)
38
37
 
39
38
  ### Phase 4: Dependency & Priority
40
39
 
@@ -62,21 +62,13 @@ ALLOWED_GLOBAL_CONTEXT_FIELDS = {
62
62
  CURRENT_FEATURE_FIELDS = {
63
63
  "id", "title", "description", "priority", "estimated_complexity",
64
64
  "dependencies", "acceptance_criteria", "status", "model", "completion_notes",
65
- "user_context", "browser_interaction", "testing",
65
+ "user_context", "testing",
66
66
  }
67
67
  # Historical lists may still carry these keys. They are ignored residue, not
68
68
  # current planning fields, and must not fail unknown-field validation.
69
69
  LEFTOVER_IGNORED_FEATURE_FIELDS = {"session_granularity", "sub_features"}
70
70
  FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
71
71
 
72
- # Keywords in acceptance criteria that indicate UI/browser interaction behavior.
73
- UI_KEYWORDS_RE = re.compile(
74
- r"\b(click|button|modal|page|form|display|navigate|tab|input|opens|shows|"
75
- r"renders|visible|redirect|download|upload|preview|select|toggle|dropdown|"
76
- r"popup|toast|menu)\b",
77
- re.IGNORECASE,
78
- )
79
-
80
72
  # ---------------------------------------------------------------------------
81
73
  # Helpers
82
74
  # ---------------------------------------------------------------------------
@@ -383,22 +375,6 @@ def validate_feature_list(data, is_new_plan=True):
383
375
  else:
384
376
  complexity_dist[complexity] += 1
385
377
 
386
- # -- Browser interaction check (warning for frontend features) --
387
- has_frontend = bool(
388
- data.get("global_context", {}).get("frontend_framework")
389
- )
390
- if has_frontend and feat.get("status") != "completed":
391
- criteria = feat.get("acceptance_criteria", [])
392
- criteria_text = " ".join(
393
- c for c in criteria if isinstance(c, str)
394
- )
395
- if UI_KEYWORDS_RE.search(criteria_text):
396
- if feat.get("browser_interaction") is None:
397
- warnings.append(
398
- "{}: has UI acceptance criteria but no browser_interaction "
399
- "field. Consider adding browser verification.".format(label)
400
- )
401
-
402
378
  # ------------------------------------------------------------------
403
379
  # 3. Dependency validation
404
380
  # ------------------------------------------------------------------
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: "iterate-pipeline-launcher"
3
- description: "Build autonomous product-iteration commands without executing the pipeline. Supports bounded read-only AI CLI model/effort capability probing on demand and produces foreground or background-daemon start commands plus status, logs, stop, and post-pause resume commands in both short prizmkit and canonical Python Runtime forms. Use whenever the user wants to start autonomous product iteration, set a focus direction or round limit, inspect iterate status, view iterate logs, stop an iterate daemon, or resume after a checkpoint or user-confirmation pause. Trigger on: 'iterate product', 'autonomous iteration', 'run iterate', 'start iterate', 'iterate status', 'iterate logs', 'stop iterate', 'resume iterate', '自主迭代', '产品迭代'."
3
+ description: "Build autonomous product-iteration commands without executing the pipeline. Runs start-time bounded read-only AI CLI model/effort capability probing (skipped on non-start intents) and produces foreground or background-daemon start commands plus status, logs, stop, and post-pause resume commands in both short prizmkit and canonical Python Runtime forms. Use whenever the user wants to start autonomous product iteration, set a focus direction or round limit, inspect iterate status, view iterate logs, stop an iterate daemon, or resume after a checkpoint or user-confirmation pause. Trigger on: 'iterate product', 'autonomous iteration', 'run iterate', 'start iterate', 'iterate status', 'iterate logs', 'stop iterate', 'resume iterate', '自主迭代', '产品迭代'."
4
4
  ---
5
5
 
6
6
  # Iterate Pipeline Command Builder
7
7
 
8
- Build commands for the autonomous product-iteration loop from within an AI CLI conversation. This skill inspects optional project and iterate state for context, runs bounded read-only AI CLI capability probes only when custom model or reasoning effort configuration is needed, asks only the choices required to construct accurate commands, displays both the short `prizmkit` form and the canonical Python Runtime form with their effects, then stops.
8
+ Build commands for the autonomous product-iteration loop from within an AI CLI conversation. On start intents (and post-pause resume requests whose mode/options are not yet confirmed), this skill inspects optional project/iterate state, runs bounded start-time read-only AI CLI capability probing after execution-mode selection, displays a Default Parameters Overview Table, asks one focused configuration round (`MODEL`, conditional `PRIZMKIT_EFFORT`, and whether to customize other defaults), displays both the short `prizmkit` form and the canonical Python Runtime form with their effects, then stops. Non-start intents skip CLI probing.
9
9
 
10
10
  ## Execution Boundary
11
11
 
@@ -15,7 +15,7 @@ This skill separates bounded read-only configuration probing from pipeline execu
15
15
  - inspect optional project context (`.prizmkit/plans/feature-list.json`, `.prizmkit/state/iterate/state.json`, `.prizmkit/state/iterate/pending-decisions.md`) when present;
16
16
  - build prerequisite-check, start, status, logs, stop, and post-pause resume commands;
17
17
  - explain safety caps, checkpoint pauses, and command effects before returning them;
18
- - only when the user selects Advanced config or explicitly mentions/asks about a custom model or reasoning effort: run bounded, side-effect-free read-only probes — `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli`, check whether the resolved CLI executable exists on `PATH`, and inspect `<cli> --help` (plus `<cli> exec --help` when applicable). Read-only probes must never invoke prompt runs, interactive logins, file writes, Git mutations, or pipeline state changes.
18
+ - on every Start intent and unconfirmed Iterate Resume (after Step 2 execution-mode selection): run bounded, side-effect-free read-only probes — `python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` (or `AI_CLI=<cli> python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli` when a temporary `AI_CLI=<cli>` override is given), route `effort_flag_mode: custom_ignored` directly to Branch 2, otherwise verify `cli_available: true` and executable availability on `PATH`, and inspect `<cli> --help` (plus `<cli> exec --help` when applicable). Read-only probes must never invoke prompt runs, interactive logins, file writes, Git mutations, or pipeline state changes. Non-start intents (`status`, `logs`, `stop`) skip read-only probing and record `Read-only CLI probe: skipped (non-start intent)`.
19
19
  - **Prohibited (pipeline execution and state mutation)**:
20
20
  - never execute pipeline commands (`run`, `daemon start`, `stop`, `reset`), start processes, follow logs, change pipeline or Git state, implement source code, or run verification unless explicitly requested by the user.
21
21
 
@@ -26,7 +26,7 @@ Do not invoke another workflow or implementation skill from this command builder
26
26
  Use this skill for:
27
27
 
28
28
  - constructing a foreground or background-daemon autonomous product-iteration start command;
29
- - configuring optional `--focus`, round limit (`--max-rounds` or AI autonomous judgment), verbose logging, `MODEL`, adaptive `PRIZMKIT_EFFORT`, and advanced checkpoint or retry options;
29
+ - configuring `MODEL`, adaptive `PRIZMKIT_EFFORT`, and optional overrides (`--focus`, `--max-rounds`, `--checkpoint-every`, `--no-checkpoint`, `VERBOSE`, `MAX_RETRIES`, `STOP_ON_FAILURE`, `PRIZMKIT_ITERATE_SAFETY_CAP`);
30
30
  - constructing iterate status, logs, stop, or post-pause resume commands;
31
31
  - translating user-selected runtime options into flags and environment variables.
32
32
 
@@ -53,20 +53,20 @@ Classify the request before asking configuration questions:
53
53
 
54
54
  | Intent | Output |
55
55
  |---|---|
56
- | Start autonomous product iteration | Prerequisite-check commands plus one start command (short and canonical forms) |
57
- | Check status | Daemon status and read-only iterate status commands (plus optional `status all`) |
58
- | Show logs | Recent or follow-log command |
59
- | Stop | Daemon stop command plus optional status command |
60
- | Resume after pause | Summary/pending-decisions inspection note plus a foreground or daemon start command |
56
+ | Start autonomous product iteration | Prerequisite-check commands plus one start command in short and canonical forms (runs start-time read-only CLI probe) |
57
+ | Check status | Daemon status and read-only iterate status commands plus optional `status all` (`Read-only CLI probe: skipped (non-start intent)`) |
58
+ | Show logs | Recent or follow-log command (`Read-only CLI probe: skipped (non-start intent)`) |
59
+ | Stop | Daemon stop command plus optional status command (`Read-only CLI probe: skipped (non-start intent)`) |
60
+ | Resume after pause | Summary/pending-decisions inspection note plus a foreground or daemon start command (runs start-time read-only CLI probe when mode/options are not yet confirmed) |
61
61
 
62
- Only the start intent (and a resume request whose mode/options are not yet confirmed) uses the execution-mode and configuration rounds.
62
+ Only the start intent (and a resume request whose mode/options are not yet confirmed) uses the execution-mode, start-time CLI probe, and configuration rounds. Non-start intents (`status`, `logs`, `stop`) skip probing and emit `Read-only CLI probe: skipped (non-start intent)`.
63
63
 
64
64
  ## Start Command Workflow
65
65
 
66
66
  ### Step 1: Resolve context
67
67
 
68
68
  1. Check read-only whether `.prizmkit/plans/feature-list.json` or `.prizmkit/state/iterate/state.json` exists; summarize any incomplete backlog items or prior pause state (`PAUSE_CHECKPOINT_REVIEW`, `PAUSE_SAFETY_CAP`, or `PAUSE_FOR_USER_CONFIRM`).
69
- 2. Preserve any explicit user `--focus` or `--max-rounds` value already stated in the request without inventing unrequested limits.
69
+ 2. Preserve any pre-specified `--focus`, `--max-rounds`, or temporary `AI_CLI=<cli>` override directly; carry them forward into the Default Parameters Overview Table and final command without re-asking. Do not invent unrequested limits.
70
70
  3. If an existing iterate daemon is suspected from user context, include a status command in the output; do not run it.
71
71
 
72
72
  ### Step 2: Ask execution mode
@@ -76,24 +76,35 @@ Use one `AskUserQuestion` call with exactly one question:
76
76
  - **Foreground (Recommended)** — build `run iterate`; output remains attached to the user's terminal.
77
77
  - **Background daemon** — build `daemon iterate start`; the runtime manages detached execution and logs.
78
78
 
79
- Wait for the response before asking iteration preferences.
79
+ Wait for the response before Step 3.
80
80
 
81
- ### Step 3: Ask iteration preferences
81
+ ### Step 3: Probe CLI capabilities, show default parameters, and ask focused configuration
82
82
 
83
- Use a separate `AskUserQuestion` call to collect the user's iteration preferences:
83
+ 1. Load `${SKILL_DIR}/references/configuration.md` and run its start-time bounded read-only AI CLI capability probe sequence first: execute `diagnostics ai-cli` (honoring any temporary `AI_CLI=<cli>` override), consume structured capability fields directly with zero legacy fallback parsing, route `effort_flag_mode: custom_ignored` directly to Branch 2 without letting `<cli> --help` trigger Branch 1, otherwise verify `cli_available: true` and executable availability on `PATH`, and inspect `<cli> --help` (plus `<cli> exec --help` when applicable).
84
+ 2. Display the **Default Parameters Overview Table** before asking configuration questions (noting any pre-specified `--focus`, `--max-rounds`, or `AI_CLI` values as already specified):
84
85
 
85
- 1. **Focus direction** — Full product scope (default, omit `--focus`), or a user-provided focus string (`--focus "<direction>"`).
86
- 2. **Round limit** — AI autonomous judgment (Recommended — omit `--max-rounds`; runtime stops when goals are reached or no high-value improvements remain, guarded by a 10-round safety cap and a 5-round checkpoint pause), 3 rounds (`--max-rounds 3`), 5 rounds (`--max-rounds 5`), or a custom positive integer (`--max-rounds N`).
87
- 3. **Verbose logging** — Off or On.
88
- 4. **Advanced config** — No (default) or Yes.
86
+ | Parameter | Default | Meaning |
87
+ |---|---|---|
88
+ | `focus` | Full product scope *(omit `--focus`)* | Evaluate the entire product without restricting to one focus area |
89
+ | `max-rounds` | AI autonomous judgment *(omit `--max-rounds`)* | Stop automatically when goals are reached or no high-value improvements remain |
90
+ | `VERBOSE` | `1` | Enable verbose runtime session logging |
91
+ | `MAX_RETRIES` | `3` | Maximum retry attempts per feature task before marking failed |
92
+ | `STOP_ON_FAILURE` | `1` | Stop Phase C delivery or backlog draining immediately when a feature task fails (runtime default; override with `STOP_ON_FAILURE=0` to continue to other eligible features) |
93
+ | `checkpoint` | Every 5 completed rounds *(autonomous mode)* | 5-round checkpoint pause for human review (`PAUSE_CHECKPOINT_REVIEW`; skipped when `--max-rounds` is set unless `--checkpoint-every` is explicit) |
94
+ | `safety cap` | 10 rounds *(omit `PRIZMKIT_ITERATE_SAFETY_CAP`)* | 10-round safety cap in autonomous mode before pausing (`PAUSE_SAFETY_CAP`) |
89
95
 
90
- If Advanced config is No and the user did not specify or ask about a custom model or reasoning effort, skip read-only CLI probing (`diagnostics ai-cli` and `--help`) and record `Read-only CLI probe: skipped (default launch without custom model/effort)`.
91
-
92
- If Advanced config is Yes — or if the user specified or asked about a custom model or reasoning effort — load `${SKILL_DIR}/references/configuration.md`, run its on-demand read-only CLI capability probe first, and collect confirmed advanced options (`--checkpoint-every`, `--no-checkpoint`, `MAX_RETRIES`, `MODEL`, adaptive `PRIZMKIT_EFFORT`, and optional `PRIZMKIT_ITERATE_SAFETY_CAP`) following its four-branch placement rules.
96
+ 3. Then use a separate `AskUserQuestion` call covering only:
97
+ - **`MODEL`** — Default (omit `MODEL` to use the CLI default) or explicit/parameterized model name guided by probe evidence. Under `effort_flag_mode: custom_ignored` or `model_arg_supported: false`, warn clearly per the reference and leave `MODEL` unset. Remember that an individual feature item's `"model"` field in `.prizmkit/plans/feature-list.json` takes precedence over global `MODEL` when that feature runs.
98
+ - **`PRIZMKIT_EFFORT`** *(conditional — Branch 4 only)* — ask **only** when Branch 4 of the four ordered adaptive placement branches matches with a non-empty intersection of live `--help` choices and `supported_effort_values`, and no model-embedded intensity is already confirmed. Omit this question and never emit `PRIZMKIT_EFFORT` under Branches 1–3, empty intersection, or model-embedded intensity. If the user supplies a `MODEL` containing embedded intensity in this same Step 3 round under Branch 4, omit `PRIZMKIT_EFFORT` by default and explain that intensity is already encoded in `MODEL` so conflicting settings are not sent together.
99
+ - **Customize other default parameters?** — `No (Recommended — use all defaults from the table)` or `Yes — customize specific defaults`.
100
+ 4. **Conditional customization follow-up (only when Yes)**: if the user selects `Yes — customize specific defaults`, issue one follow-up `AskUserQuestion` call to collect only the specific table parameters to override, validate values (shell-quoted `--focus`, positive integers `--max-rounds` / `--checkpoint-every` / `PRIZMKIT_ITERATE_SAFETY_CAP`, `--no-checkpoint`, boolean `VERBOSE` / `STOP_ON_FAILURE`, non-negative integer `MAX_RETRIES`), and apply them to the command. Do not ask routine defaults one by one when the user chooses `No`.
93
101
 
94
102
  ### Step 4: Build command fragments
95
103
 
96
- Read `${SKILL_DIR}/references/configuration.md` if not already loaded during Advanced config, and map confirmed choices to CLI flags and environment variables.
104
+ Map confirmed choices to CLI flags and environment variables per `${SKILL_DIR}/references/configuration.md`:
105
+ - When defaults from the table are kept, emit `VERBOSE=1` (foreground) or `--env "VERBOSE=1"` (daemon), and omit optional flags (`--focus`, `--max-rounds`, `--checkpoint-every`, `--no-checkpoint`), `MAX_RETRIES=3`, `PRIZMKIT_ITERATE_SAFETY_CAP`, and runtime-default `STOP_ON_FAILURE=1`.
106
+ - When the user disables stop-on-failure, explicitly emit `STOP_ON_FAILURE=0`. When the user disables verbose logging, emit `VERBOSE=0` or omit `VERBOSE`.
107
+ - Preserve parameterized `MODEL` foreground/daemon quoting rules and any temporary `AI_CLI=<cli>` override.
97
108
 
98
109
  Build the prerequisite-check commands separately from the iteration command so the user can inspect each action:
99
110
 
@@ -111,31 +122,31 @@ python3 ./.prizmkit/dev-pipeline/cli.py diagnostics version && git --version
111
122
  python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
112
123
  ```
113
124
 
114
- Always include the configured AI CLI check fragment from the reference so the user can verify prerequisites in their own shell. Even when on-demand read-only probing ran during configuration, pipeline commands are never executed by this skill.
125
+ Always include the configured AI CLI check fragment from the reference so the user can verify prerequisites in their own shell. Even though start-time read-only probing ran during configuration, pipeline commands are never executed by this skill.
115
126
 
116
127
  ### Step 5: Return the start command
117
128
 
118
- Return only the templates matching the confirmed execution mode (foreground OR background daemon, never both), showing both the short `prizmkit` command and the canonical `python3 ./.prizmkit/dev-pipeline/cli.py` command. Omit optional flags (`--focus`, `--max-rounds`, `--checkpoint-every`, `--no-checkpoint`) and env overrides when the user kept defaults.
129
+ Return only the templates matching the confirmed execution mode (foreground OR background daemon, never both), showing both the short `prizmkit` command and the canonical `python3 ./.prizmkit/dev-pipeline/cli.py` command.
119
130
 
120
- Foreground template (autonomous judgment default):
131
+ Foreground template (table defaults kept):
121
132
 
122
133
  ```bash
123
134
  # Short CLI
124
- prizmkit run iterate
135
+ VERBOSE=1 prizmkit run iterate
125
136
 
126
137
  # Canonical Python Runtime
127
- python3 ./.prizmkit/dev-pipeline/cli.py run iterate
138
+ VERBOSE=1 python3 ./.prizmkit/dev-pipeline/cli.py run iterate
128
139
  ```
129
140
 
130
141
  Foreground template (with explicit options and env overrides):
131
142
 
132
143
  ```bash
133
144
  # Short CLI
134
- VERBOSE=1 MAX_RETRIES=3 \
145
+ VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=0 \
135
146
  prizmkit run iterate --focus "Improve onboarding reliability" --max-rounds 3
136
147
 
137
148
  # Canonical Python Runtime
138
- VERBOSE=1 MAX_RETRIES=3 \
149
+ VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=0 \
139
150
  python3 ./.prizmkit/dev-pipeline/cli.py run iterate --focus "Improve onboarding reliability" --max-rounds 3
140
151
  ```
141
152
 
@@ -146,14 +157,14 @@ prizmkit run iterate --dry-run
146
157
  python3 ./.prizmkit/dev-pipeline/cli.py run iterate --dry-run
147
158
  ```
148
159
 
149
- Background daemon template (autonomous judgment default):
160
+ Background daemon template (table defaults kept):
150
161
 
151
162
  ```bash
152
163
  # Short CLI
153
- prizmkit daemon iterate start
164
+ prizmkit daemon iterate start --env "VERBOSE=1"
154
165
 
155
166
  # Canonical Python Runtime
156
- python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start
167
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start --env "VERBOSE=1"
157
168
  ```
158
169
 
159
170
  Background daemon template (with explicit options and env overrides):
@@ -161,11 +172,11 @@ Background daemon template (with explicit options and env overrides):
161
172
  ```bash
162
173
  # Short CLI
163
174
  prizmkit daemon iterate start --focus "Improve onboarding reliability" --max-rounds 3 \
164
- --env "VERBOSE=1 MAX_RETRIES=3"
175
+ --env "VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=0"
165
176
 
166
177
  # Canonical Python Runtime
167
178
  python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start --focus "Improve onboarding reliability" --max-rounds 3 \
168
- --env "VERBOSE=1 MAX_RETRIES=3"
179
+ --env "VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=0"
169
180
  ```
170
181
 
171
182
  Explain that pipeline execution was not performed by this skill, then stop.
@@ -228,33 +239,33 @@ Optionally include the daemon status command for the user to run afterward. Do n
228
239
 
229
240
  Autonomous iteration pauses cleanly (exit 0) for three reasons:
230
241
 
231
- - `PAUSE_CHECKPOINT_REVIEW`: reached the periodic checkpoint interval (every 5 completed rounds by default in autonomous mode).
232
- - `PAUSE_SAFETY_CAP`: reached the autonomous safety cap (10 rounds by default when `--max-rounds` is omitted).
242
+ - `PAUSE_CHECKPOINT_REVIEW`: reached the periodic 5-round checkpoint pause interval (every 5 completed rounds by default in autonomous mode).
243
+ - `PAUSE_SAFETY_CAP`: reached the autonomous 10-round safety cap (10 rounds by default when `--max-rounds` is omitted).
233
244
  - `PAUSE_FOR_USER_CONFIRM`: high blast-radius or product-decision candidates require human review in `.prizmkit/state/iterate/pending-decisions.md`.
234
245
 
235
246
  Before returning a resume command:
236
247
 
237
248
  1. Advise the user to review `.prizmkit/state/iterate/summary.md` and (when present) `.prizmkit/state/iterate/pending-decisions.md`.
238
- 2. Return a fresh start command (`run iterate` for foreground or `daemon iterate start` for background) with any updated `--focus`, `--max-rounds`, or checkpoint options the user confirms:
249
+ 2. When mode or options are not yet confirmed, follow Steps 2–5 above (execution mode -> start-time read-only CLI probe -> Default Parameters Overview Table -> focused Step 3 configuration). Return a fresh start command (`run iterate` for foreground or `daemon iterate start` for background) with any updated `--focus`, `--max-rounds`, checkpoint, or env options the user confirms:
239
250
 
240
251
  Foreground resume template:
241
252
 
242
253
  ```bash
243
254
  # Short CLI
244
- prizmkit run iterate --focus "Follow up after checkpoint review"
255
+ VERBOSE=1 prizmkit run iterate --focus "Follow up after checkpoint review"
245
256
 
246
257
  # Canonical Python Runtime
247
- python3 ./.prizmkit/dev-pipeline/cli.py run iterate --focus "Follow up after checkpoint review"
258
+ VERBOSE=1 python3 ./.prizmkit/dev-pipeline/cli.py run iterate --focus "Follow up after checkpoint review"
248
259
  ```
249
260
 
250
261
  Background daemon resume template:
251
262
 
252
263
  ```bash
253
264
  # Short CLI
254
- prizmkit daemon iterate start --focus "Follow up after checkpoint review"
265
+ prizmkit daemon iterate start --focus "Follow up after checkpoint review" --env "VERBOSE=1"
255
266
 
256
267
  # Canonical Python Runtime
257
- python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start --focus "Follow up after checkpoint review"
268
+ python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start --focus "Follow up after checkpoint review" --env "VERBOSE=1"
258
269
  ```
259
270
 
260
271
  3. State clearly that autonomous iteration has no dedicated reset subcommand. If an underlying feature task failed during execution or backlog drain, recover that feature separately using `feature-pipeline-launcher` (`reset feature ...`) before resuming iteration.
@@ -267,7 +278,7 @@ For every request, return:
267
278
  2. Relevant optional context summary (existing backlog or prior pause state, if observed).
268
279
  3. Assumptions, safety-cap/checkpoint disclosures, and warnings.
269
280
  4. Exact command block showing both short `prizmkit` and canonical `python3 ./.prizmkit/dev-pipeline/cli.py` forms.
270
- 5. `Read-only CLI probe: <diagnostics-and-help-summary | skipped (default launch without custom model/effort)>`
281
+ 5. `Read-only CLI probe: <diagnostics-and-help-summary | skipped (non-start intent)>`
271
282
  6. `Pipeline execution: not performed by this skill; run any command above manually when ready.`
272
283
 
273
284
  Never report pipeline execution success, process IDs, log locations, round completion, verification results, or state changes unless the user later supplies authoritative runtime output for explanation.
@@ -1,6 +1,6 @@
1
1
  # Configuration Reference — Iterate Pipeline Command Builder
2
2
 
3
- Use this reference to run bounded on-demand read-only AI CLI capability probing and translate confirmed user choices into command fragments. This skill constructs and returns pipeline commands; it never executes pipeline runs or mutates state unless explicitly requested by the user.
3
+ Use this reference to run start-time bounded read-only AI CLI capability probing, present the Default Parameters Overview Table, apply the four ordered adaptive placement branches, and translate confirmed user choices into command fragments. This skill constructs and returns pipeline commands; it never executes pipeline runs or mutates state unless explicitly requested by the user.
4
4
 
5
5
  ## Configured AI CLI Prerequisite Command
6
6
 
@@ -15,48 +15,52 @@ python3 ./.prizmkit/dev-pipeline/cli.py diagnostics ai-cli
15
15
 
16
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
- ## On-Demand Read-Only CLI Capability Probe
18
+ ## Start-Time Read-Only CLI Capability Probe
19
19
 
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` (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.
20
+ - **Non-start intents (skip probing)**: For `status`, `logs`, and `stop` intents (and resume requests whose mode and options are already explicitly confirmed), skip all read-only CLI probing (`diagnostics ai-cli` and `--help`) and output `Read-only CLI probe: skipped (non-start intent)`.
21
+ - **Start intent probe sequence**: Immediately after Step 2 execution-mode confirmation on every Start intent and unconfirmed Iterate Resume (before presenting Step 3 model/effort choices), execute this bounded read-only sequence:
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 temporary `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
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
- ## Base Configuration Mapping
27
+ ## Default Parameters Overview Table
28
28
 
29
- | Choice | Command fragment | Notes |
29
+ Display this table at the start of Step 3 (noting any pre-specified `--focus`, `--max-rounds`, or temporary `AI_CLI=<cli>` override as already specified so it is carried forward without re-asking):
30
+
31
+ | Parameter | Default | Meaning |
30
32
  |---|---|---|
31
- | Focus direction (omitted) | *(omit `--focus`)* | Evaluates full product scope (env fallback: `ITERATE_FOCUS`) |
32
- | Focus direction (specified) | `--focus "<direction>"` | Always shell-quote the direction text |
33
- | Round limit: AI autonomous judgment (Recommended) | *(omit `--max-rounds`)* | Stops on goal completion or no high-value work; guarded by 10-round safety cap and 5-round checkpoint pause |
34
- | Round limit: explicit N | `--max-rounds N` | Positive integer >= 1 (env fallback: `MAX_ROUNDS`); skips default 5-round checkpoint pause unless `--checkpoint-every` is explicit |
35
- | Verbose Off | `VERBOSE=0` *(or omit)* | Default non-verbose output |
36
- | Verbose On | `VERBOSE=1` | Enables verbose runtime logging |
37
-
38
- ## Advanced Configuration Questions
39
-
40
- Ask only when the user selected Advanced config or explicitly requested custom model/effort configuration. Configure `MODEL` before `PRIZMKIT_EFFORT`:
41
-
42
- 1. **Checkpoint pause behavior**
43
- - Default — pause every 5 completed rounds in autonomous mode (omitted when `--max-rounds` is explicitly set).
44
- - Custom interval — add `--checkpoint-every N` (positive integer >= 1; also activates checkpoint pauses when combined with `--max-rounds`).
45
- - Disable checkpoint pauses — add `--no-checkpoint`.
46
- 2. **Max retries per feature**
47
- - Default (3) — omit `MAX_RETRIES` or set `MAX_RETRIES=3`.
48
- - Custom non-negative integer N — add `MAX_RETRIES=N`.
49
- 3. **Model (`MODEL`)**
33
+ | `focus` | Full product scope *(omit `--focus`)* | Evaluate the entire product without restricting to one focus area (env fallback: `ITERATE_FOCUS`) |
34
+ | `max-rounds` | AI autonomous judgment *(omit `--max-rounds`)* | Stop automatically when goals are reached or no high-value improvements remain (env fallback: `MAX_ROUNDS`) |
35
+ | `VERBOSE` | `1` | Enable verbose runtime session logging (runtime default is `0`; launcher emits `VERBOSE=1` by default) |
36
+ | `MAX_RETRIES` | `3` | Maximum retry attempts per feature task before marking failed |
37
+ | `STOP_ON_FAILURE` | `1` | Stop Phase C delivery or backlog draining immediately when a feature task fails (runtime default; omit when kept, emit `STOP_ON_FAILURE=0` to continue to other eligible features) |
38
+ | `checkpoint` | Every 5 completed rounds *(autonomous mode)* | Pause for human review (`PAUSE_CHECKPOINT_REVIEW`; skipped when `--max-rounds` is set unless `--checkpoint-every` is explicit) |
39
+ | `safety cap` | 10 rounds *(omit `PRIZMKIT_ITERATE_SAFETY_CAP`)* | Autonomous safety cap before pausing (`PAUSE_SAFETY_CAP`; applies when `--max-rounds` is omitted; coinciding thresholds prioritize `PAUSE_SAFETY_CAP`) |
40
+
41
+ ## Focused Configuration Flow
42
+
43
+ Collect configuration in one focused round after showing the Default Parameters Overview Table. Always configure `MODEL` before `PRIZMKIT_EFFORT`:
44
+
45
+ 1. **Model (`MODEL`)**
50
46
  - Default — omit `MODEL` so the resolved AI CLI uses its default model.
51
47
  - Explicit model — add `MODEL=<name>` (or single-quoted `MODEL='<model-with-level>'` for parameterized model syntax) when `model_arg_supported` is `true` (or when probing failed without diagnostics confirming `model_arg_supported: false` and the user explicitly confirms a model name).
52
48
  - If `diagnostics ai-cli` reports `effort_flag_mode: custom_ignored`, warn clearly that the active custom launch profile ignores both `MODEL` and `PRIZMKIT_EFFORT` (pass provider flags via `.prizmkit/config.json` `ai_cli_launch.extra_args`). If `model_arg_supported: false` is reported for an unresolved/unsupported profile, warn that `MODEL` is not forwarded and leave it unset.
53
49
  - **Per-item precedence**: global `MODEL` governs Phase A/B iterate evaluation and headless planning sessions and serves as the default for feature execution, while any individual feature item's `"model"` field in `.prizmkit/plans/feature-list.json` takes precedence over global `MODEL` when that feature runs.
54
- 4. **Reasoning effort (`PRIZMKIT_EFFORT`)**
55
- - Default — omit `PRIZMKIT_EFFORT`.
56
- - Adaptive placement — determine whether and how to emit `PRIZMKIT_EFFORT` strictly from the four ordered placement branches below (never hardcode one universal effort list or CLI allowlist).
57
- 5. **Autonomous safety cap (optional)**
58
- - Default (10 rounds) — omit `PRIZMKIT_ITERATE_SAFETY_CAP`.
59
- - Custom positive integer N — add `PRIZMKIT_ITERATE_SAFETY_CAP=N` (applies only in autonomous mode when `--max-rounds` is omitted; coinciding thresholds prioritize `PAUSE_SAFETY_CAP` over `PAUSE_CHECKPOINT_REVIEW`).
50
+ 2. **Reasoning effort (`PRIZMKIT_EFFORT`)** *(conditional — Branch 4 only)*
51
+ - Ask and emit `PRIZMKIT_EFFORT` strictly from the four ordered placement branches below (never hardcode one universal effort list or CLI allowlist).
52
+ - Omit the question and never emit `PRIZMKIT_EFFORT` under Branches 1–3, empty capability intersection, or model-embedded intensity syntax.
53
+ - Default under Branch 4 — omit `PRIZMKIT_EFFORT`.
54
+ 3. **Customize other default parameters?**
55
+ - `No (Recommended — use all defaults from the table)` — apply table defaults directly without asking routine parameters one by one.
56
+ - `Yes — customize specific defaults` — ask one follow-up prompt collecting and validating only the specific table overrides:
57
+ - `focus`: shell-quoted `--focus "<direction>"` (or omit for full product scope).
58
+ - `max-rounds`: positive integer >= 1 (`--max-rounds N`; skips default 5-round checkpoint pause unless `--checkpoint-every` is explicit).
59
+ - `VERBOSE`: boolean (`1` to enable; `0` or omit `VERBOSE` to disable).
60
+ - `MAX_RETRIES`: non-negative integer `N` (`MAX_RETRIES=N`).
61
+ - `STOP_ON_FAILURE`: boolean (`1` runtime default — omit; `0` explicitly emit `STOP_ON_FAILURE=0` to continue to other eligible features after a failure).
62
+ - `checkpoint`: positive integer >= 1 (`--checkpoint-every N`) or `--no-checkpoint` to disable checkpoint pauses.
63
+ - `safety cap`: positive integer >= 1 (`PRIZMKIT_ITERATE_SAFETY_CAP=N`; autonomous mode only).
60
64
 
61
65
  ## Adaptive Placement Branches (Evaluate 1 → 4 Strictly in Order)
62
66
 
@@ -64,43 +68,43 @@ Evaluate branches strictly from 1 to 4 using `diagnostics ai-cli` capability fie
64
68
 
65
69
  1. **Branch 1 — Probe failed, CLI missing, or insufficient help output**:
66
70
  - 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
- - 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).
71
+ - Action: Never guess or synthesize `PRIZMKIT_EFFORT`. Omit the `PRIZMKIT_EFFORT` question and variable, 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
72
  2. **Branch 2 — Model-embedded intensity syntax or `custom_ignored` profile**:
69
73
  - 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).
70
- - Action: Omit `PRIZMKIT_EFFORT`. Under `custom_ignored`, warn clearly that the active custom launch profile ignores both `MODEL` and `PRIZMKIT_EFFORT` (configure provider flags via `.prizmkit/config.json` `ai_cli_launch.extra_args`), never emit `PRIZMKIT_EFFORT` (the runtime rejects non-empty `PRIZMKIT_EFFORT` pre-launch on custom profiles), and omit `MODEL` unless the user explicitly overrides. Under model-embedded intensity syntax, guide the user to set `MODEL=<model-with-level>` (or leave `MODEL` unset for the CLI default).
74
+ - Action: Omit the `PRIZMKIT_EFFORT` question and variable. Under `custom_ignored`, warn clearly that the active custom launch profile ignores both `MODEL` and `PRIZMKIT_EFFORT` (configure provider flags via `.prizmkit/config.json` `ai_cli_launch.extra_args`), never emit `PRIZMKIT_EFFORT` (the runtime rejects non-empty `PRIZMKIT_EFFORT` pre-launch on custom profiles), and leave `MODEL` unset unless the user explicitly overrides. Under model-embedded intensity syntax, guide the user to set `MODEL=<model-with-level>` (or leave `MODEL` unset for the CLI default).
71
75
  3. **Branch 3 — Independent effort explicitly unsupported**:
72
76
  - Condition: Branches 1 and 2 do not match, AND `effort_flag_mode` is `none`, OR `supported_effort_values` is `none`, OR `effort_flag_mode` is `flag` yet live `--help` shows no compatible effort/thinking option (excluding compatible `effort_flag_mode: config`).
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`.
77
+ - Action: Do not ask for or 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
78
  4. **Branch 4 — Independent effort compatible**:
75
79
  - 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). 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.
80
+ - Action: When live `--help` enumerates concrete effort/thinking values, intersect those enumerated choices with `supported_effort_values`; if the intersection is empty, omit the `PRIZMKIT_EFFORT` question and variable 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 (including one supplied in the same Step 3 round) already embeds a reasoning-effort suffix or parameter, omit `PRIZMKIT_EFFORT` by default and include a conflict-avoidance notice explaining that intensity is already encoded in `MODEL` so conflicting settings are not sent together.
77
81
 
78
82
  ## Command Construction Rules
79
83
 
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
- - Background daemon (`daemon iterate start`): place environment assignments inside one `--env "..."` value; omit `--env` when no environment overrides are selected.
84
+ - Foreground (`run iterate`): place environment assignments (`AI_CLI=...` when overridden, `VERBOSE=...`, `MAX_RETRIES=...`, `STOP_ON_FAILURE=0` when disabled, `MODEL=...`, `PRIZMKIT_EFFORT=...`, `PRIZMKIT_ITERATE_SAFETY_CAP=...`) before `prizmkit` or `python3`. Default table values emit `VERBOSE=1` and omit `STOP_ON_FAILURE=1` because Runtime defaults `STOP_ON_FAILURE` to `1`.
85
+ - Background daemon (`daemon iterate start`): place environment assignments inside one `--env "..."` value. Default table values emit `--env "VERBOSE=1"` and omit `STOP_ON_FAILURE=1`.
82
86
  - **Parameterized `MODEL` quoting**:
83
87
  - Foreground: single-quote parameterized `MODEL` values containing colons, square brackets, parentheses, spaces, commas, or shell metacharacters:
84
88
  ```bash
85
89
  # Short CLI
86
- MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
90
+ MODEL='<model-with-level>' VERBOSE=1 \
87
91
  prizmkit run iterate
88
92
 
89
93
  # Canonical Python Runtime
90
- MODEL='<model-with-level>' VERBOSE=1 MAX_RETRIES=3 \
94
+ MODEL='<model-with-level>' VERBOSE=1 \
91
95
  python3 ./.prizmkit/dev-pipeline/cli.py run iterate
92
96
  ```
93
97
  - 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
98
  ```bash
95
99
  # Short CLI
96
100
  prizmkit daemon iterate start \
97
- --env "VERBOSE=1 MAX_RETRIES=3 MODEL='<model-with-level>'"
101
+ --env "VERBOSE=1 MODEL='<model-with-level>'"
98
102
 
99
103
  # Canonical Python Runtime
100
104
  python3 ./.prizmkit/dev-pipeline/cli.py daemon iterate start \
101
- --env "VERBOSE=1 MAX_RETRIES=3 MODEL='<model-with-level>'"
105
+ --env "VERBOSE=1 MODEL='<model-with-level>'"
102
106
  ```
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.
107
+ If a `MODEL` value contains spaces, quote the whole `MODEL=...` assignment inside `--env` (for example, `--env "VERBOSE=1 'MODEL=<model with spaces>'"`) so both POSIX and Windows daemon env parsing preserve spaces cleanly.
104
108
  - Do not pass `--dry-run` to `daemon iterate start`; `--dry-run` is supported only on foreground `run iterate`.
105
109
  - Include only confirmed options and shell-quote custom `--focus` values and paths.
106
110
  - 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.
@@ -68,7 +68,7 @@ Inspect each visible path through the applicable contract: production behavior t
68
68
  2. At the start of each execution, initialize a replacement report through the Report Renderer Contract and `${SKILL_DIR}/references/review-report-template.md`.
69
69
  3. Within that execution, append every review round, repair batch, independent-review event, final verification, and exactly one `## Final Result` through the renderer or its visible equivalent fallback.
70
70
  4. Start from the Main Agent's current requirement context and inspect the complete workspace inventory first: `git status --short`, the staged diff, and the unstaged diff. Include all non-ignored untracked, deleted, renamed, and copied paths in the correctness scope before producing findings.
71
- 5. Load active coding rules consciously before producing findings: if the reviewed changes land on frontend, backend, database, or mobile, Read `.prizmkit/rules/<layer>-rules.md` when that exact convention path exists and enforce it as code-review criteria. Never load all four files by default. If changes span two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. When the file does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) as `framework-coding-baseline`. Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
71
+ 5. Load active coding rules consciously before producing findings: if the reviewed changes land on frontend, backend, database, or mobile, perform an exact path Read of `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and `.prizmkit/rules/<layer>-rules.md` when those exact paths exist, and enforce them as code-review criteria. Never load all four files by default. If changes span two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. When `.prizmkit/rules/<layer>-rules.md` does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) as `framework-coding-baseline`. Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
72
72
  6. Append one validated `scope-classification` renderer event containing the exact complete Git-visible in-scope paths and the active rule source (`active_rule_source`: `project-layer-rules` naming loaded path(s), `framework-coding-baseline` naming detected language/stack conventions, or `not-applicable` for non-layer changes). Do not maintain excluded-path metadata or claim ignored content was reviewed.
73
73
  7. Reuse current context and load only missing or potentially stale material required to resolve a concrete ambiguity, verify an acceptance criterion, or understand a changed contract.
74
74
  8. Inspect unchanged callers, dependents, contracts, or tests only when the in-scope diff changes or may violate an interface, shared behavior, or regression boundary. Do not perform an unconditional repository-wide dependency sweep.
@@ -65,7 +65,7 @@ The Main Agent supplies:
65
65
  - the complete current Git-visible workspace status;
66
66
  - all staged and unstaged tracked changes;
67
67
  - all non-ignored untracked, deleted, renamed, and copied content;
68
- - active rule source (`project-layer-rules` with the loaded `.prizmkit/rules/<layer>-rules.md` path(s) and relevant rules, or `framework-coding-baseline` with `coding-baseline` and detected language/stack conventions) plus the three-tier override precedence;
68
+ - active rule source (`project-layer-rules` with the loaded `.prizmkit/rules/<layer>-rules.md` path(s) and `.prizmkit/rules/builtin/{coding-baseline,cohesive-modeling}.md`, or `framework-coding-baseline` with `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and detected language/stack conventions) plus the three-tier override precedence;
69
69
  - implementation task completion and targeted verification results;
70
70
  - response number and total budget;
71
71
  - prior adjudication, actual repairs, and repair verification on continuation or replacement.
@@ -108,7 +108,7 @@ Execution boundaries:
108
108
  - Return REVIEW_BLOCKED rather than delegate or provide an incomplete success result.
109
109
  - Do not expose private reasoning traces. Return only the required output.
110
110
 
111
- First validate input consistency. Then review requirement and acceptance-criteria alignment, implementation completeness, concrete failure scenarios, error handling, security, authorization, data integrity, transaction/concurrency/state-transition behavior, public and internal contracts, compatibility and regression risk, test-boundary or evidence defects that can conceal incorrect behavior, and compliance with the active coding rules (`project-layer-rules` from exact `.prizmkit/rules/<layer>-rules.md` paths when present, or `framework-coding-baseline` with `coding-baseline` plus detected language/stack conventions when absent) under three-tier override precedence without clarification pauses (Tier 1 repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions > Tier 2 `.prizmkit/rules/<layer>-rules.md` > Tier 3 framework `coding-baseline` and language conventions; L0 `RULES:` MUST/NEVER remain authoritative for that key).
111
+ First validate input consistency. Then review requirement and acceptance-criteria alignment, implementation completeness, concrete failure scenarios, error handling, security, authorization, data integrity, transaction/concurrency/state-transition behavior, public and internal contracts, compatibility and regression risk, test-boundary or evidence defects that can conceal incorrect behavior, and compliance with the active coding rules (`project-layer-rules` from exact `.prizmkit/rules/<layer>-rules.md` and `.prizmkit/rules/builtin/{coding-baseline,cohesive-modeling}.md` paths when present, or `framework-coding-baseline` with `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and detected language/stack conventions when `<layer>-rules.md` is absent) under three-tier override precedence without clarification pauses (Tier 1 repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions > Tier 2 `.prizmkit/rules/<layer>-rules.md` > Tier 3 framework `coding-baseline` and language conventions; L0 `RULES:` MUST/NEVER remain authoritative for that key).
112
112
 
113
113
  Do not rewrite the plan, modify code, execute tests, or perform broad exploratory repository discovery.
114
114
 
@@ -38,7 +38,7 @@ Before editing:
38
38
  2. Read `.prizmkit/prizm-docs/root.prizm` when present.
39
39
  3. Follow its pointers to only the relevant direct-child module index and nested detail documentation. Before modifying source, read the complete relevant detail plus the complete parent/child documents needed to resolve its pointers; grep-only fragments are insufficient modification context.
40
40
  4. If relevant detail documentation is missing, inspect only bounded target source files and narrowly implicated callers/contracts as fallback, record that detailed context was unavailable, and proceed without creating a placeholder. Context loading never creates or modifies documentation.
41
- 5. If the current task lands on frontend, backend, database, or mobile, Read `.prizmkit/rules/<layer>-rules.md` when that exact convention path exists and enforce it consciously during implementation. Never load all four files by default. If a task spans two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. Use layer-rules only to fill HOW the plan does not specify. When the file does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) as the active `framework-coding-baseline` HOW guardrail. Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
41
+ 5. If the current task lands on frontend, backend, database, or mobile, perform an exact path Read of `.prizmkit/rules/builtin/coding-baseline.md`, `.prizmkit/rules/builtin/cohesive-modeling.md`, and `.prizmkit/rules/<layer>-rules.md` when those exact paths exist, and enforce them consciously during implementation. Never load all four files by default. If a task spans two layers, read both existing files. Map browser UI work to frontend, service or API work to backend, schema migration or ORM work to database, and iOS, Android, React Native, or Flutter work to mobile. Discover by exact path Read; do not depend on git tracking or glob. Use layer-rules only to fill HOW the plan does not specify. When `.prizmkit/rules/<layer>-rules.md` does not exist, do not block and do not silently skip—explicitly activate the built-in `coding-baseline` plus detected language/stack conventions (e.g., strict typing and no unhandled promises in TypeScript, no bare `except:` or mutable default arguments in Python, explicit `err` handling in Go, parameterized SQL) as the active `framework-coding-baseline` HOW guardrail. Enforce three-tier override precedence without a clarification pause: Tier 1 (highest) repository explicit contracts, current source and nested `.prizm` detail facts, committed OpenAPI/schemas, project linters/compilers, and host project instruction conventions; Tier 2 `.prizmkit/rules/<layer>-rules.md`; Tier 3 (fallback) framework `coding-baseline` and language conventions—when rules conflict, those current sources win without a clarification pause. L0 `RULES:` MUST/NEVER remain authoritative for that key.
42
42
 
43
43
  ## Optional Inline Delegation
44
44
 
@@ -175,17 +175,16 @@ Invoke prizmkit-prizm-docs (Init operation), passing the two-tier module structu
175
175
  If `.prizmkit/config.json` action is `skip`, output `Skipped (exists)` and move to Phase 7; otherwise:
176
176
 
177
177
  6a. Create `.prizmkit/` directory structure (if missing):
178
- - `.prizmkit/config.json` (adoption_mode, platform installation metadata, detected_layers, enabled_rule_profiles)
178
+ - `.prizmkit/config.json` (adoption_mode, platform installation metadata, detected_layers, tech_stack)
179
179
  - `.prizmkit/specs/` (empty)
180
180
  - `.prizmkit/plans/` (empty — needed by Phase 7 and future pipeline tasks)
181
181
 
182
182
  6b. Read `${SKILL_DIR}/references/config-schema.md` for merge strategy, field definitions, and write detected `tech_stack` to `.prizmkit/config.json`.
183
183
 
184
- 6c. Write observed layers and separate rule adoption to `.prizmkit/config.json` (alongside `tech_stack`):
185
- - `"detected_layers": ["frontend", "backend"]` records only the observed layers from Phase 4.5 and is never cleared because the user declines rule configuration.
186
- - `"enabled_rule_profiles": []` records rule adoption separately. Preserve valid existing entries; initialize an empty array when no profiles are enabled.
187
- - For greenfield projects (Phase 4.5 skipped), write both fields as empty arrays until code exists or the user explicitly enables a rule profile.
188
- - Future re-detection updates observed layers without silently enabling or disabling rule profiles.
184
+ 6c. Write observed layers to `.prizmkit/config.json` (alongside `tech_stack`):
185
+ - `"detected_layers": ["frontend", "backend"]` records only the observed layers from Phase 4.5. Active rule adoption is determined directly by the presence of `.prizmkit/rules/<layer>-rules.md` files (never tracked by a separate config boolean/array).
186
+ - For greenfield projects (Phase 4.5 skipped), write `"detected_layers": []` until code exists.
187
+ - Future re-detection updates observed layers without modifying existing `.prizmkit/rules/*` files.
189
188
 
190
189
  **Phase 7: Project Brief Generation**
191
190
 
@@ -242,7 +241,7 @@ $ /prizmkit-init
242
241
  Platform detected: Claude Code | Mode: Brownfield
243
242
  Init Status Check: [missing] .prizmkit/prizm-docs/, config.json, project-brief.md -> generating all.
244
243
  Tech stack: TypeScript, Node.js 20, React + Tailwind CSS, Express.js, PostgreSQL (Prisma), Vitest, Vite
245
- Layer Detection: frontend, backend, database -> saved independently from enabled_rule_profiles
244
+ Layer Detection: frontend, backend, database -> saved to detected_layers
246
245
  Infrastructure Quick Scan: Database=PostgreSQL (Prisma), Deployment=Vercel -> written to main host instruction file (not .private.md)
247
246
  Modules: src/ -> .prizmkit/prizm-docs/src.prizm (L1); core L2: src/routes.prizm, src/models.prizm (source-evidenced; edge dirs structural-only without ->; zero placeholder L2s)
248
247
  Brief: inferred and confirmed -> .prizmkit/plans/project-brief.md