prizmkit 1.1.114 → 1.1.116
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/.env.example +0 -1
- package/bundled/dev-pipeline/README.md +4 -6
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +40 -518
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +27 -99
- package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +283 -0
- package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +3 -13
- package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +2 -0
- package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +0 -1
- package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +14 -2
- package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +25 -31
- package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +0 -8
- package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -3
- package/bundled/dev-pipeline/prizmkit_runtime/runners.py +13 -7
- package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +13 -1
- package/bundled/dev-pipeline/scripts/continuation.py +8 -40
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +76 -261
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +16 -35
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +15 -34
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/init-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +6 -0
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/scripts/prompt_framework.py +114 -63
- package/bundled/dev-pipeline/scripts/update-bug-status.py +3 -7
- package/bundled/dev-pipeline/scripts/update-checkpoint.py +54 -22
- package/bundled/dev-pipeline/scripts/update-feature-status.py +3 -7
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +3 -7
- package/bundled/dev-pipeline/scripts/utils.py +6 -37
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +9 -91
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -66
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +10 -16
- package/bundled/dev-pipeline/templates/feature-list-schema.json +32 -17
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -16
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -16
- package/bundled/dev-pipeline/templates/sections/bugfix-session-context.md +1 -1
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +1 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +0 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-full.md +0 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-agent.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-implement-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +1 -1
- package/bundled/dev-pipeline/tests/conftest.py +1 -0
- package/bundled/dev-pipeline/tests/test_checkpoint_state.py +164 -0
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +48 -76
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +25 -3
- package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +25 -5
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +329 -16
- package/bundled/dev-pipeline/tests/test_unified_cli.py +40 -9
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bug-planner/SKILL.md +5 -4
- package/bundled/skills/bug-planner/references/verification.md +29 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +8 -0
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +2 -2
- package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +1 -6
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +6 -12
- package/bundled/skills/feature-pipeline-launcher/references/configuration.md +0 -1
- package/bundled/skills/feature-planner/SKILL.md +13 -12
- package/bundled/skills/feature-planner/assets/planning-guide.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +8 -11
- package/bundled/skills/prizmkit-plan/SKILL.md +15 -1
- package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +101 -0
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +5 -5
- package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +2 -7
- package/bundled/skills/refactor-planner/SKILL.md +10 -8
- package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +9 -0
- package/bundled/team/prizm-dev-team.json +2 -9
- package/package.json +1 -1
- package/bundled/agents/prizm-dev-team-critic.md +0 -179
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +0 -8
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-critic.md +0 -22
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +0 -61
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan.md +0 -38
- package/bundled/dev-pipeline/templates/sections/refactor-phase-critic.md +0 -22
- package/bundled/skills/bug-planner/references/critic-and-verification.md +0 -44
|
@@ -133,27 +133,21 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
133
133
|
|
|
134
134
|
6. **Ask configuration options** — MANDATORY INTERACTIVE STEP, applies to ALL execution modes (Foreground, Background, AND Manual). This is a SEPARATE `AskUserQuestion` call from step 5 (see the RULE above). You MUST call `AskUserQuestion` with the 4 questions below and WAIT for the user's response before proceeding to step 7. Do NOT assume defaults, do NOT show the command as text and ask "ready?", and do NOT merge step 6 and step 7. If you find yourself writing the final command before the user has answered these 4 questions, STOP — you are violating this rule.
|
|
135
135
|
|
|
136
|
-
Use `AskUserQuestion` to present ALL
|
|
136
|
+
Use `AskUserQuestion` to present ALL 3 configuration choices:
|
|
137
137
|
|
|
138
|
-
**Question 1 —
|
|
139
|
-
- Off (default) — Skip adversarial review
|
|
140
|
-
- On — Enable adversarial critic review: an independent AI agent reviews the spec/plan for completeness and the implementation for defects, edge cases, and missed requirements. Adds ~5-10 min per feature.
|
|
141
|
-
|
|
142
|
-
**Question 2 — Verbose logging** (multiSelect: false):
|
|
138
|
+
**Question 1 — Verbose logging** (multiSelect: false):
|
|
143
139
|
- On (default) — Detailed AI session logs including tool calls and subagent activity
|
|
144
140
|
- Off — Minimal logging
|
|
145
141
|
|
|
146
|
-
**Question
|
|
142
|
+
**Question 2 — Max retries** (multiSelect: false):
|
|
147
143
|
- 3 (default)
|
|
148
144
|
- 1
|
|
149
145
|
- 5
|
|
150
146
|
|
|
151
|
-
**Question
|
|
147
|
+
**Question 3 — Advanced config?** (multiSelect: false):
|
|
152
148
|
- No (default) — Use defaults for failure behavior
|
|
153
149
|
- Yes — Configure stop-on-failure, deploy-after-completion, and reasoning effort options
|
|
154
150
|
|
|
155
|
-
Default Critic to Off unless features have `estimated_complexity: "high"` or above (in which case default to On).
|
|
156
|
-
|
|
157
151
|
**If user chose "Yes" to Advanced config**, ask a second round of `AskUserQuestion` — see the advanced config questions (stop-on-failure, deploy-after-completion, reasoning effort) in `${SKILL_DIR}/references/configuration.md`.
|
|
158
152
|
|
|
159
153
|
Read `${SKILL_DIR}/references/configuration.md` for the current environment-variable mapping and advanced environment-variable tables.
|
|
@@ -167,7 +161,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
167
161
|
```
|
|
168
162
|
Selected-options example:
|
|
169
163
|
```bash
|
|
170
|
-
VERBOSE=1
|
|
164
|
+
VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high \
|
|
171
165
|
python3 ./.prizmkit/dev-pipeline/cli.py feature run .prizmkit/plans/feature-list.json --features F-001:F-005
|
|
172
166
|
```
|
|
173
167
|
|
|
@@ -178,7 +172,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
178
172
|
Selected-options example:
|
|
179
173
|
```bash
|
|
180
174
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon feature start .prizmkit/plans/feature-list.json --features F-001:F-005 \
|
|
181
|
-
--env "VERBOSE=1
|
|
175
|
+
--env "VERBOSE=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high"
|
|
182
176
|
```
|
|
183
177
|
|
|
184
178
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
@@ -28,7 +28,6 @@ Translating user responses to env vars:
|
|
|
28
28
|
|
|
29
29
|
| Config choice | Environment variable |
|
|
30
30
|
|-----------|---------------------|
|
|
31
|
-
| Critic: On | `ENABLE_CRITIC=true` |
|
|
32
31
|
| Verbose: Off | `VERBOSE=0` |
|
|
33
32
|
| Verbose: On | `VERBOSE=1` |
|
|
34
33
|
| Max retries: N | `MAX_RETRIES=N` |
|
|
@@ -106,7 +106,7 @@ Trigger conditions are covered by the frontmatter `description`. Do NOT use this
|
|
|
106
106
|
8. **Browser interaction**: If present, may include `tool` and `verify_steps`; planner should add concrete `verify_steps` when known, but the schema permits an empty object for AI runtime exploration.
|
|
107
107
|
9. **Complexity enum**: If present, is one of: low, medium, high, critical
|
|
108
108
|
10. **Model field**: If present, is a non-empty string
|
|
109
|
-
11. **
|
|
109
|
+
11. **Retired fields**: `critic` and `critic_count` must not appear; validation fails if either field is present
|
|
110
110
|
12. **Root schema**: Has $schema='dev-pipeline-feature-list-v1', project_name, and non-empty features array
|
|
111
111
|
|
|
112
112
|
5. **Use script output as source of truth** — if validation fails, fix and re-run until pass
|
|
@@ -184,7 +184,7 @@ Assign `estimated_complexity` from concrete scope indicators, not from perceived
|
|
|
184
184
|
- acceptance-criteria count and edge-case breadth
|
|
185
185
|
- test coverage and verification difficulty
|
|
186
186
|
|
|
187
|
-
Use `low` for focused changes in 1 module with <=5 acceptance criteria and no public API/schema changes. Use `medium` for normal multi-file or 2-3 module work with bounded interfaces. Use `high` only when multiple concrete high indicators are present, such as 3+ modules plus public API changes, deep dependencies, weak tests, or substantial architectural risk. Use `critical` only for system-wide architectural/infrastructure changes or safety-critical work requiring
|
|
187
|
+
Use `low` for focused changes in 1 module with <=5 acceptance criteria and no public API/schema changes. Use `medium` for normal multi-file or 2-3 module work with bounded interfaces. Use `high` only when multiple concrete high indicators are present, such as 3+ modules plus public API changes, deep dependencies, weak tests, or substantial architectural risk. Use `critical` only for system-wide architectural/infrastructure changes or safety-critical work requiring the strongest orchestrator/reviewer/test guardrails.
|
|
188
188
|
|
|
189
189
|
### Required Planning Review Summary
|
|
190
190
|
|
|
@@ -266,7 +266,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
266
266
|
| **CP-FP-2** | Feature Proposals | Feature set with titles+deps identified (pre-validation) | 3-5 |
|
|
267
267
|
| **CP-FP-3** | DAG Validity | No cycles, dependencies resolved (validation dry-run) | 5 |
|
|
268
268
|
| **CP-FP-3.1** | Browser Interaction Applied | Qualifying features have `browser_interaction` field; user confirmed or opted out | 4 |
|
|
269
|
-
| **CP-FP-3.2** | Testing Defaults Applied | All features have appropriate
|
|
269
|
+
| **CP-FP-3.2** | Testing Defaults Applied | All features have appropriate testing expectations and no retired `critic`/`critic_count` fields | 7 |
|
|
270
270
|
| **CP-FP-3.3** | Completeness Review Passed | All features reviewed for description adequacy and cross-feature gaps | 6 |
|
|
271
271
|
| **CP-FP-4** | `.prizmkit/plans/feature-list.json` Generated | Schema validates, all required keys present | 7-8 |
|
|
272
272
|
| **CP-FP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 9 |
|
|
@@ -357,13 +357,12 @@ Key requirements:
|
|
|
357
357
|
- `priority`: `"critical"`, `"high"`, `"medium"`, or `"low"` (string, NOT numeric)
|
|
358
358
|
- new items default `status: "pending"`
|
|
359
359
|
- English feature titles for stable slug generation
|
|
360
|
-
- `critic` / `critic_count` defaults per Testing Defaults section
|
|
361
360
|
- `browser_interaction` auto-generated for qualifying frontend features (with `tool` selection: `auto`/`playwright-cli`/`opencli`)
|
|
362
361
|
- descriptions: minimum 15 words (error), recommended minimum 30/50/80/100+ for low/medium/high/critical (warning). No upper limit — more detail prevents AI guessing
|
|
363
362
|
- `estimated_complexity` determines pipeline execution tier:
|
|
364
363
|
- `low` / `medium` → **lite** (single agent, no subagents)
|
|
365
|
-
- `high` → **standard** (orchestrator +
|
|
366
|
-
- `critical` → **full** (
|
|
364
|
+
- `high` → **standard** (orchestrator + reviewer guardrails, 3-agent metadata)
|
|
365
|
+
- `critical` → **full** (strongest orchestrator/reviewer guardrails). Use for: architectural changes touching 10+ files, cross-module refactoring with API surface changes, or safety/security/data-loss risk
|
|
367
366
|
|
|
368
367
|
**IMPORTANT: Do NOT hand-write the final JSON file.** Instead:
|
|
369
368
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
@@ -394,13 +393,15 @@ Run this gate **after** `.prizmkit/plans/feature-list.json` passes the validatio
|
|
|
394
393
|
|
|
395
394
|
## Testing Defaults (Phase 8)
|
|
396
395
|
|
|
397
|
-
Set default testing-related fields for each feature. The user can opt out.
|
|
396
|
+
Set default testing-related fields for each feature. The user can opt out of generated testing expectations, but do not generate retired review-agent configuration fields.
|
|
398
397
|
|
|
399
|
-
| Priority |
|
|
400
|
-
|
|
401
|
-
| high |
|
|
402
|
-
| medium |
|
|
403
|
-
| low |
|
|
398
|
+
| Priority | Testing expectation | Rationale |
|
|
399
|
+
|----------|---------------------|-----------|
|
|
400
|
+
| high | Require scoped tests and review-gate evidence | Higher-risk feature behavior needs stronger verification. |
|
|
401
|
+
| medium | Require focused tests for changed public behavior | Normal changes need meaningful boundary coverage. |
|
|
402
|
+
| low | Require the smallest relevant verification | Low-risk changes should stay lightweight. |
|
|
403
|
+
|
|
404
|
+
Never emit `critic` or `critic_count`; those fields are fully removed and the validator rejects them.
|
|
404
405
|
|
|
405
406
|
For frontend features with `browser_interaction`, browser verification is enabled by default. The `tool` field uses the user's choice from the mandatory browser tool question in Phase 4.2 (see §Browser Interaction Planning → Default Behavior).
|
|
406
407
|
|
|
@@ -123,7 +123,7 @@ Complexity is an execution-scope estimate, not a priority or importance signal.
|
|
|
123
123
|
| low | 1 module/layer, 1-3 files, no public API/schema change, shallow dependencies, <=5 acceptance criteria, clear existing tests | 1-2 API endpoints, 1-2 pages, focused config or copy behavior | lite (1 agent) |
|
|
124
124
|
| medium | 2-3 modules/layers, 3-6 files, bounded API/interface changes, moderate dependency depth, 4-8 acceptance criteria, standard test updates | 3-5 API endpoints, 2-4 pages, normal integration work | lite (1 agent) |
|
|
125
125
|
| high | 3+ modules/layers plus public API/interface or schema impact, deep dependencies, weak test coverage, complex state, third-party integration risk, or 8+ acceptance criteria | 5+ API endpoints, complex interactions, cross-cutting behavior | standard (3 agents) |
|
|
126
|
-
| critical | System-wide architecture, new infrastructure, 10+ files with multi-module API surface changes, safety/security/data-loss risk requiring
|
|
126
|
+
| critical | System-wide architecture, new infrastructure, 10+ files with multi-module API surface changes, safety/security/data-loss risk requiring strongest review and test gates | System-wide refactoring, new infrastructure + app logic | full (5 agents + critic) |
|
|
127
127
|
|
|
128
128
|
### Complexity Indicator Checklist
|
|
129
129
|
|
|
@@ -152,7 +152,7 @@ Consider splitting a feature if it exhibits any of the following:
|
|
|
152
152
|
- If a feature is marked as `low` complexity, it should not have more than 5 acceptance criteria and should have no public API/schema changes.
|
|
153
153
|
- If a feature is marked as `medium` complexity, explain why the scope is bounded even if it touches multiple files.
|
|
154
154
|
- If a feature is marked as `high` complexity, it must have a clear concrete justification (e.g., "payment processing with webhook idempotency across API, persistence, and worker modules").
|
|
155
|
-
- Use `critical` complexity only for features requiring architectural changes that touch 10+ files, involve cross-module API surface changes, or need
|
|
155
|
+
- Use `critical` complexity only for features requiring architectural changes that touch 10+ files, involve cross-module API surface changes, or need stronger review and test gates for safety.
|
|
156
156
|
- When in doubt between two levels, choose the higher level only when the concrete scope indicators support it; do not use `high` as a safe default.
|
|
157
157
|
|
|
158
158
|
### Mixed Calibration Examples
|
|
@@ -335,17 +335,14 @@ def validate_feature_list(data, is_new_plan=True):
|
|
|
335
335
|
# -- Sub-features --
|
|
336
336
|
subs = feat.get("sub_features")
|
|
337
337
|
|
|
338
|
-
# --
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
errors.append(
|
|
347
|
-
"{}: 'critic_count' must be 1 or 3, got {}".format(label, critic_count)
|
|
348
|
-
)
|
|
338
|
+
# -- Retired fields --
|
|
339
|
+
for retired_field in ("critic", "critic_count"):
|
|
340
|
+
if retired_field in feat:
|
|
341
|
+
errors.append(
|
|
342
|
+
"{}: '{}' field is retired; remove it from feature-list data".format(
|
|
343
|
+
label, retired_field
|
|
344
|
+
)
|
|
345
|
+
)
|
|
349
346
|
|
|
350
347
|
# -- Browser interaction check (warning for frontend features) --
|
|
351
348
|
has_frontend = bool(
|
|
@@ -96,7 +96,21 @@ Steps:
|
|
|
96
96
|
- Polish tasks when needed
|
|
97
97
|
- Checkpoint tasks between phases when integration risk exists
|
|
98
98
|
3. Mark parallel tasks with `[P]` only when they can safely run independently.
|
|
99
|
-
4. Run the verification checklist from `${SKILL_DIR}/references/verification-checklist.md` and fix issues before
|
|
99
|
+
4. Run the verification checklist from `${SKILL_DIR}/references/verification-checklist.md` and fix issues before the planning quality gate.
|
|
100
|
+
|
|
101
|
+
### Phase 3: Plan/Spec Review Loop
|
|
102
|
+
|
|
103
|
+
Run this phase every time `spec.md` and `plan.md` are created or updated, before reporting the plan or handing off to implementation.
|
|
104
|
+
|
|
105
|
+
1. Explicitly read `${SKILL_DIR}/references/review-plan-spec-loop.md`.
|
|
106
|
+
2. Execute that guide against the current `spec.md` and `plan.md`.
|
|
107
|
+
3. Apply all resolvable `BLOCKER` fixes and accepted `SHOULD_FIX` fixes directly to `spec.md` and/or `plan.md`.
|
|
108
|
+
4. Treat `OPTIONAL` findings as non-blocking.
|
|
109
|
+
5. Rerun the review once when fixes were applied, respecting the guide's maximum of 2 total rounds.
|
|
110
|
+
6. If unresolved `BLOCKER` findings remain, stop and ask targeted clarification questions in interactive mode; in non-interactive mode, record the blocker and stop. Do not escalate to a Critic agent.
|
|
111
|
+
7. Only proceed to `/prizmkit-implement` handoff after the loop has no unresolved blockers.
|
|
112
|
+
|
|
113
|
+
The review loop is planning-only. It must not start implementation, run tests/builds, launch a pipeline, create a separate skill, or require a Critic agent.
|
|
100
114
|
|
|
101
115
|
## Output
|
|
102
116
|
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Review Plan/Spec Loop
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Run this local planning-quality gate after `spec.md` and `plan.md` are drafted or updated, before handing off to `/prizmkit-implement`.
|
|
6
|
+
|
|
7
|
+
This is not a separate skill and it does not use a Critic agent. It is a bounded review loop executed inside `prizmkit-plan` to improve the planning artifacts only.
|
|
8
|
+
|
|
9
|
+
## Non-Goals
|
|
10
|
+
|
|
11
|
+
Do not do any of the following from this guide:
|
|
12
|
+
|
|
13
|
+
- Start implementation or edit product/source code.
|
|
14
|
+
- Run tests, builds, lint, or package commands.
|
|
15
|
+
- Launch a feature, bugfix, or refactor pipeline.
|
|
16
|
+
- Spawn or require a Critic agent.
|
|
17
|
+
- Create a separate review-loop skill.
|
|
18
|
+
- Expand scope beyond improving `spec.md` and `plan.md`.
|
|
19
|
+
|
|
20
|
+
## Required Inputs
|
|
21
|
+
|
|
22
|
+
- `spec.md` in the selected artifact directory.
|
|
23
|
+
- `plan.md` in the selected artifact directory.
|
|
24
|
+
- Relevant Prizm docs and source summaries already loaded by `prizmkit-plan`.
|
|
25
|
+
|
|
26
|
+
Use source reads sparingly. Prefer the context already loaded for planning. Read additional source only when a finding cannot be classified without confirming an existing interface, naming pattern, dependency, or constraint.
|
|
27
|
+
|
|
28
|
+
## Review Dimensions
|
|
29
|
+
|
|
30
|
+
Review both artifacts against these dimensions:
|
|
31
|
+
|
|
32
|
+
| Dimension | Check |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Ambiguity | Requirements, scope, terms, or expected behavior are unclear or internally inconsistent. |
|
|
35
|
+
| Acceptance criteria completeness | Each goal has verifiable acceptance criteria; edge/error cases are included when meaningful. |
|
|
36
|
+
| Missing constraints | Security, data, compatibility, performance, platform, deployment, migration, or non-goal constraints are absent where relevant. |
|
|
37
|
+
| Task ordering errors | Tasks are sequenced before their prerequisites, checkpoints are misplaced, or dependency order is unsafe. |
|
|
38
|
+
| Dependency assumptions | The plan assumes missing APIs, schemas, files, services, packages, auth, environment variables, or generated artifacts without evidence. |
|
|
39
|
+
| Scope drift | The plan adds unrelated work, backlog items, nice-to-haves, or implementation beyond the spec. |
|
|
40
|
+
| Overengineering | The plan introduces abstractions, services, agents, workflows, data stores, or cross-module rewrites that the spec does not justify. |
|
|
41
|
+
| Implementation readiness | Tasks are actionable, file-scoped when possible, testable, and resumable; blockers are explicit. |
|
|
42
|
+
| Source-reading overhead | The implementation plan avoids broad rereads and identifies the minimum context/files needed for execution. |
|
|
43
|
+
|
|
44
|
+
## Finding Classification
|
|
45
|
+
|
|
46
|
+
Use exactly these classifications:
|
|
47
|
+
|
|
48
|
+
### BLOCKER
|
|
49
|
+
|
|
50
|
+
A finding is `BLOCKER` when implementation would likely fail, produce the wrong behavior, or require user clarification before a safe plan exists.
|
|
51
|
+
|
|
52
|
+
Examples:
|
|
53
|
+
- Acceptance criteria contradict each other.
|
|
54
|
+
- A required interface/data model decision is unresolved.
|
|
55
|
+
- The task order starts implementation before required schema/context decisions.
|
|
56
|
+
- The plan includes scope that conflicts with explicit non-goals.
|
|
57
|
+
|
|
58
|
+
### SHOULD_FIX
|
|
59
|
+
|
|
60
|
+
A finding is `SHOULD_FIX` when the artifact can be improved directly without changing user intent or requiring clarification.
|
|
61
|
+
|
|
62
|
+
Examples:
|
|
63
|
+
- Add missing acceptance criteria derived from the stated goal.
|
|
64
|
+
- Clarify a constraint already implied by the task context.
|
|
65
|
+
- Reorder dependent tasks.
|
|
66
|
+
- Remove an unjustified overengineered step.
|
|
67
|
+
- Add a minimal file/context note to reduce source-reading overhead.
|
|
68
|
+
|
|
69
|
+
### OPTIONAL
|
|
70
|
+
|
|
71
|
+
A finding is `OPTIONAL` when it is a nice-to-have improvement that does not block implementation readiness.
|
|
72
|
+
|
|
73
|
+
Examples:
|
|
74
|
+
- Extra detail that could help but is not necessary.
|
|
75
|
+
- Alternative task grouping with no correctness impact.
|
|
76
|
+
- A lower-risk cleanup suggestion outside current scope.
|
|
77
|
+
|
|
78
|
+
Optional findings do not block handoff.
|
|
79
|
+
|
|
80
|
+
## Loop Algorithm
|
|
81
|
+
|
|
82
|
+
1. Read this guide, then review the current `spec.md` and `plan.md` together.
|
|
83
|
+
2. Produce a concise internal finding list grouped by `BLOCKER`, `SHOULD_FIX`, and `OPTIONAL`.
|
|
84
|
+
3. Apply fixes directly to `spec.md` and/or `plan.md` for:
|
|
85
|
+
- every `BLOCKER` that can be resolved from existing task context;
|
|
86
|
+
- every `SHOULD_FIX` that is accepted as aligned with the user's intent.
|
|
87
|
+
4. Do not apply `OPTIONAL` findings unless they clearly improve readiness without expanding scope.
|
|
88
|
+
5. If any fixes were applied, rerun this review once.
|
|
89
|
+
6. Stop after at most 2 total review rounds.
|
|
90
|
+
7. If unresolved `BLOCKER` findings remain after the final round, stop planning and ask targeted clarification questions. Do not escalate to a Critic agent.
|
|
91
|
+
8. If no unresolved blockers remain, report that the planning quality gate passed and hand off to `/prizmkit-implement`.
|
|
92
|
+
|
|
93
|
+
## Output Summary
|
|
94
|
+
|
|
95
|
+
At handoff, include a short summary:
|
|
96
|
+
|
|
97
|
+
- Review rounds run: `1` or `2`.
|
|
98
|
+
- Fixes applied to `spec.md`: short list or `none`.
|
|
99
|
+
- Fixes applied to `plan.md`: short list or `none`.
|
|
100
|
+
- Optional findings deferred: short list or `none`.
|
|
101
|
+
- Unresolved blockers: `none` before handoff.
|
|
@@ -166,12 +166,12 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
166
166
|
- Off — Skip post-task test verification (faster but riskier)
|
|
167
167
|
|
|
168
168
|
**Question 4 — Advanced config?** (multiSelect: false):
|
|
169
|
-
- No (default) — Use defaults for
|
|
170
|
-
- Yes — Configure
|
|
169
|
+
- No (default) — Use defaults for failure behavior
|
|
170
|
+
- Yes — Configure stop-on-failure, deploy-after-completion, and reasoning effort options
|
|
171
171
|
|
|
172
172
|
Note: Refactor filter defaults to all refactor items. Runtime selects eligible refactors in stable list order after dependencies are completed; planners should order unrelated refactors by user priority before launch. If the user selects "Other" on any option, handle their custom input.
|
|
173
173
|
|
|
174
|
-
**If user chose "Yes" to Advanced config**, run the advanced configuration round (a second `AskUserQuestion` round, plus a reasoning-effort follow-up). It applies to a minority of sessions, so the full question set lives in `${SKILL_DIR}/references/configuration.md` → **Advanced Configuration Round**.
|
|
174
|
+
**If user chose "Yes" to Advanced config**, run the advanced configuration round (a second `AskUserQuestion` round, plus a reasoning-effort follow-up). It applies to a minority of sessions, so the full question set lives in `${SKILL_DIR}/references/configuration.md` → **Advanced Configuration Round**.
|
|
175
175
|
|
|
176
176
|
Read `${SKILL_DIR}/references/configuration.md` for the current environment-variable mapping and advanced environment-variable tables.
|
|
177
177
|
|
|
@@ -184,7 +184,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
184
184
|
```
|
|
185
185
|
Selected-options example:
|
|
186
186
|
```bash
|
|
187
|
-
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1
|
|
187
|
+
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high \
|
|
188
188
|
python3 ./.prizmkit/dev-pipeline/cli.py refactor run .prizmkit/plans/refactor-list.json
|
|
189
189
|
```
|
|
190
190
|
|
|
@@ -195,7 +195,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
195
195
|
Selected-options example:
|
|
196
196
|
```bash
|
|
197
197
|
python3 ./.prizmkit/dev-pipeline/cli.py daemon refactor start .prizmkit/plans/refactor-list.json \
|
|
198
|
-
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1
|
|
198
|
+
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 STOP_ON_FAILURE=1 ENABLE_DEPLOY=1 PRIZMKIT_EFFORT=high"
|
|
199
199
|
```
|
|
200
200
|
|
|
201
201
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
@@ -13,7 +13,6 @@ Translating user responses to env vars:
|
|
|
13
13
|
| Max retries: N | `MAX_RETRIES=N` |
|
|
14
14
|
| Strict behavior: On | `STRICT_BEHAVIOR_CHECK=1` |
|
|
15
15
|
| Strict behavior: Off | `STRICT_BEHAVIOR_CHECK=0` |
|
|
16
|
-
| Critic: On | `ENABLE_CRITIC=true` |
|
|
17
16
|
| Stop on failure: On | `STOP_ON_FAILURE=1` |
|
|
18
17
|
| Deploy: Yes | `ENABLE_DEPLOY=1` |
|
|
19
18
|
| Effort: value | `PRIZMKIT_EFFORT=<value>` |
|
|
@@ -54,17 +53,13 @@ Not exposed in interactive menu, pass via `--env`:
|
|
|
54
53
|
|
|
55
54
|
Only run this when the user answered "Yes" to the **Advanced config?** question in step 6. It applies to a minority of sessions.
|
|
56
55
|
|
|
57
|
-
Ask a second round of `AskUserQuestion` with these
|
|
56
|
+
Ask a second round of `AskUserQuestion` with these 2 questions:
|
|
58
57
|
|
|
59
58
|
**Question 1 — Stop on failure** (multiSelect: false):
|
|
60
59
|
- Off (default) — Pipeline continues to next task after failure
|
|
61
60
|
- On — Pipeline halts immediately when a task exhausts all retries (`STOP_ON_FAILURE=1`)
|
|
62
61
|
|
|
63
|
-
**Question 2 —
|
|
64
|
-
- Off (default) — Skip adversarial review
|
|
65
|
-
- On — Enable adversarial critic review: an independent AI agent reviews the refactor plan for completeness and the implementation for regressions, missed edge cases, and behavior violations. Adds ~5-10 min per refactor task.
|
|
66
|
-
|
|
67
|
-
**Question 3 — Deploy after completion?** (multiSelect: false):
|
|
62
|
+
**Question 2 — Deploy after completion?** (multiSelect: false):
|
|
68
63
|
- No (default) — Skip deployment after pipeline completes
|
|
69
64
|
- Yes — Run /prizmkit-deploy automatically after all refactors complete successfully (`ENABLE_DEPLOY=1`). Deployment is blocked if any refactor did not complete successfully (status not 'completed' or manually 'skipped').
|
|
70
65
|
|
|
@@ -320,16 +320,18 @@ Run this gate **after** `.prizmkit/plans/refactor-list.json` passes the validati
|
|
|
320
320
|
- `model` field is optional — omitting it means the pipeline uses $MODEL env or CLI default
|
|
321
321
|
- `scope` object with nested structure: `files` array (target file paths) and `modules` array (module names)
|
|
322
322
|
|
|
323
|
-
##
|
|
323
|
+
## Verification Defaults
|
|
324
324
|
|
|
325
|
-
Set
|
|
325
|
+
Set behavior-preservation and testing expectations for each refactor item. Do not generate retired review-agent configuration fields.
|
|
326
326
|
|
|
327
|
-
| Priority | Complexity |
|
|
328
|
-
|
|
329
|
-
| critical | high |
|
|
330
|
-
| critical | medium/low |
|
|
331
|
-
| high | high |
|
|
332
|
-
| other combinations | any |
|
|
327
|
+
| Priority | Complexity | Verification expectation |
|
|
328
|
+
|----------|-----------|--------------------------|
|
|
329
|
+
| critical | high | Strong behavior-preservation evidence plus scoped tests and review gate |
|
|
330
|
+
| critical | medium/low | Focused behavior-preservation evidence plus review gate |
|
|
331
|
+
| high | high | Scoped tests for changed boundaries plus review gate |
|
|
332
|
+
| other combinations | any | Smallest meaningful behavior-preservation check |
|
|
333
|
+
|
|
334
|
+
Never emit `critic` or `critic_count`; those fields are fully removed and validators reject them.
|
|
333
335
|
|
|
334
336
|
---
|
|
335
337
|
|
|
@@ -246,6 +246,15 @@ def validate_refactor_list(data):
|
|
|
246
246
|
)
|
|
247
247
|
)
|
|
248
248
|
|
|
249
|
+
# -- Retired fields --
|
|
250
|
+
for retired_field in ("critic", "critic_count"):
|
|
251
|
+
if retired_field in refactor:
|
|
252
|
+
errors.append(
|
|
253
|
+
"{}: '{}' field is retired; remove it from refactor-list data".format(
|
|
254
|
+
label, retired_field
|
|
255
|
+
)
|
|
256
|
+
)
|
|
257
|
+
|
|
249
258
|
# -- Scope --
|
|
250
259
|
scope = refactor.get("scope")
|
|
251
260
|
if isinstance(scope, dict):
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizm-dev-team",
|
|
3
3
|
"team_name": "prizm-dev-team",
|
|
4
|
-
"description": "PrizmKit-integrated
|
|
4
|
+
"description": "PrizmKit-integrated software development team with Dev and Reviewer agents following the PrizmKit spec-driven workflow.",
|
|
5
5
|
"lead": "orchestrator",
|
|
6
6
|
"communication": {
|
|
7
7
|
"protocol": "SendMessage",
|
|
8
8
|
"routing": "mesh",
|
|
9
|
-
"note": "Teammates communicate directly via SendMessage; key messages must also be sent to Orchestrator (the main AI session).
|
|
9
|
+
"note": "Teammates communicate directly via SendMessage; key messages must also be sent to Orchestrator (the main AI session)."
|
|
10
10
|
},
|
|
11
11
|
"members": [
|
|
12
12
|
{
|
|
@@ -22,13 +22,6 @@
|
|
|
22
22
|
"agentDefinition": "prizm-dev-team-reviewer",
|
|
23
23
|
"prompt": "You are the Reviewer Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Run /prizmkit-code-review for diagnosis + fix strategy formulation. You do NOT run tests — the Orchestrator handles testing.",
|
|
24
24
|
"subscriptions": ["*"]
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
"name": "critic",
|
|
28
|
-
"role": "critic",
|
|
29
|
-
"agentDefinition": "prizm-dev-team-critic",
|
|
30
|
-
"prompt": "You are the Critic Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Challenge plans and implementations for project fitness, style consistency, robustness, and integration quality. Supports parallel 3-critic voting mode. Do NOT verify correctness — that is the Reviewer's job.",
|
|
31
|
-
"subscriptions": ["*"]
|
|
32
25
|
}
|
|
33
26
|
]
|
|
34
27
|
}
|
package/package.json
CHANGED
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: prizm-dev-team-critic
|
|
3
|
-
description: Adversarial challenger that questions plan fitness against the project's existing architecture, style, and patterns. Supports parallel 3-critic voting with distinct focus lenses (Architecture, Data/Edge Cases, Security/Performance). Use when performing adversarial plan challenge or implementation challenge.
|
|
4
|
-
tools: Read, Glob, Grep, Bash
|
|
5
|
-
disallowedTools: Agent, Write, Edit
|
|
6
|
-
model: inherit
|
|
7
|
-
context_level: minimal
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
You are the **Critic Agent**, the adversarial challenger of the PrizmKit-integrated Multi-Agent software development collaboration team.
|
|
11
|
-
|
|
12
|
-
### Core Identity
|
|
13
|
-
|
|
14
|
-
You are the team's "devil's advocate" — you challenge decisions, question assumptions, and find hidden risks that others miss. You do NOT verify correctness (that is Reviewer's job). Your unique value is asking: **"Does this BELONG in this project? Is this the RIGHT approach? What are you NOT seeing?"**
|
|
15
|
-
|
|
16
|
-
You operate in two modes:
|
|
17
|
-
- **Plan Challenge** (Phase 3.5): before implementation, challenge the plan's fitness for the project
|
|
18
|
-
- **Implementation Challenge** (Phase 5.5): after review, challenge the implementation for architecture drift and missed edge cases (optional, tier3+)
|
|
19
|
-
|
|
20
|
-
### Project Context
|
|
21
|
-
|
|
22
|
-
Before any challenge, you MUST understand the project:
|
|
23
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` — understand architecture, patterns, conventions
|
|
24
|
-
2. Read relevant L1/L2 `.prizmkit/prizm-docs/` files for affected modules — understand RULES, PATTERNS, TRAPS, DECISIONS
|
|
25
|
-
3. Read `context-snapshot.md` if it exists — Section 3 has Prizm Context, Section 4 has File Manifest
|
|
26
|
-
|
|
27
|
-
**File Reading Rule**: Read actual project source files to compare against. Your challenges must be grounded in evidence from existing code, not theoretical concerns. If you cannot find evidence in the codebase, downgrade the severity.
|
|
28
|
-
|
|
29
|
-
### Must Do (MUST)
|
|
30
|
-
|
|
31
|
-
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant module docs BEFORE writing any challenge
|
|
32
|
-
2. Read existing source files in affected modules for comparison
|
|
33
|
-
3. Ground every challenge in specific evidence (file paths, code patterns, existing conventions)
|
|
34
|
-
4. Write challenge report with structured findings
|
|
35
|
-
5. Keep the report ≤50 lines — focus on HIGH and CRITICAL only, skip LOW
|
|
36
|
-
6. Clearly state which mode you are operating in (Plan Challenge or Implementation Challenge)
|
|
37
|
-
|
|
38
|
-
### Never Do (NEVER)
|
|
39
|
-
|
|
40
|
-
- Do not write implementation code (that is Dev's responsibility)
|
|
41
|
-
- Do not verify correctness or test coverage (test coverage is verified by the Orchestrator via prizmkit-test; correctness is the Reviewer's responsibility)
|
|
42
|
-
- **Do not execute any git operations** (git commit / git add / git reset / git push are all prohibited)
|
|
43
|
-
- Do not modify source files — write only challenge reports
|
|
44
|
-
- Do not raise theoretical concerns without evidence from the codebase
|
|
45
|
-
|
|
46
|
-
### Behavioral Rules
|
|
47
|
-
|
|
48
|
-
```
|
|
49
|
-
CRIT-01: Always read .prizmkit/prizm-docs/ and existing source before challenging
|
|
50
|
-
CRIT-02: Every challenge must reference a specific file path or code pattern as evidence
|
|
51
|
-
CRIT-03: Maximum 10 challenges per report (focus on highest impact)
|
|
52
|
-
CRIT-04: Severity levels: CRITICAL (architecture mismatch), HIGH (style/robustness gap), MEDIUM (minor inconsistency)
|
|
53
|
-
CRIT-05: If no significant challenges found, write "No significant challenges — plan fits the project well" and exit
|
|
54
|
-
CRIT-06: Read comparable existing code in the same module for style baseline before flagging style issues
|
|
55
|
-
CRIT-07: When challenging a decision, always suggest a concrete alternative
|
|
56
|
-
CRIT-08: Do not use the timeout command (incompatible with macOS). Run commands directly without a timeout prefix
|
|
57
|
-
CRIT-09: In voting mode, write to your assigned report file — do NOT read other critics' reports
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Mode 1: Plan Challenge
|
|
63
|
-
|
|
64
|
-
**Precondition**: Orchestrator has completed plan.md (with Tasks section). Phase 3 Analyze has passed (CP-2).
|
|
65
|
-
|
|
66
|
-
**Goal**: Challenge whether the plan fits the project — not whether the plan is internally consistent.
|
|
67
|
-
|
|
68
|
-
### Challenge Dimensions
|
|
69
|
-
|
|
70
|
-
| Dimension | What to Challenge | Evidence Source |
|
|
71
|
-
|-----------|------------------|----------------|
|
|
72
|
-
| **Architecture Fit** | Does the plan's approach match the project's existing architectural patterns? Would it feel foreign to someone familiar with the codebase? | `.prizmkit/prizm-docs/` PATTERNS, existing module structure |
|
|
73
|
-
| **Integration Planning** | Do proposed interfaces match existing conventions? Are naming patterns consistent with existing code? | Existing source files in the same module/layer |
|
|
74
|
-
| **Alternative Approaches** | Given the project's tech stack and existing patterns, is there a more natural approach that leverages what's already built? | `.prizmkit/prizm-docs/` KEY_FILES, existing utilities/helpers |
|
|
75
|
-
| **Coupling Risk** | Does the task breakdown hide cross-module dependencies? Will changes bleed into areas the plan doesn't mention? | `.prizmkit/prizm-docs/` DEPENDENCIES, import graphs |
|
|
76
|
-
|
|
77
|
-
### Workflow
|
|
78
|
-
|
|
79
|
-
1. Read `context-snapshot.md` — understand the feature and file manifest
|
|
80
|
-
2. Read `.prizmkit/prizm-docs/root.prizm` and affected L1/L2 docs
|
|
81
|
-
3. Read existing source files in modules the plan touches
|
|
82
|
-
4. For each dimension, compare plan decisions against evidence from existing code
|
|
83
|
-
5. Write challenge report
|
|
84
|
-
|
|
85
|
-
---
|
|
86
|
-
|
|
87
|
-
## Mode 2: Implementation Challenge
|
|
88
|
-
|
|
89
|
-
**Precondition**: Dev has completed implementation, Reviewer has completed code review (CP-3). Optional, tier3+ only.
|
|
90
|
-
|
|
91
|
-
**Goal**: Challenge whether the implementation drifted from the plan, introduced architectural regressions, or missed edge cases the plan didn't anticipate.
|
|
92
|
-
|
|
93
|
-
### Challenge Dimensions
|
|
94
|
-
|
|
95
|
-
| Dimension | What to Challenge | Evidence Source |
|
|
96
|
-
|-----------|------------------|----------------|
|
|
97
|
-
| **Architecture Drift** | Did the implementation deviate from plan.md's architecture? Are new patterns introduced that don't match existing conventions? | plan.md vs git diff, existing source |
|
|
98
|
-
| **Edge Case Coverage** | What edge cases did the plan not anticipate that the implementation now needs to handle? | Acceptance criteria, existing TRAPS in `.prizmkit/prizm-docs/` |
|
|
99
|
-
| **Security Surface** | Did the implementation introduce new attack surface not covered in the plan? | New endpoints, new user inputs, new data flows |
|
|
100
|
-
| **Performance Impact** | Did the implementation introduce unnecessary complexity or performance bottlenecks? | New loops, queries, allocations in changed files |
|
|
101
|
-
|
|
102
|
-
### Workflow
|
|
103
|
-
|
|
104
|
-
1. Read `context-snapshot.md` — especially `## Implementation Log` and `## Review Notes`
|
|
105
|
-
2. Read `review-report.md` — understand what Reviewer already found
|
|
106
|
-
3. **Review the implementation diff provided by the Orchestrator in your task assignment.** The Orchestrator runs `git diff HEAD` and provides the relevant diff context in the spawn prompt — you do NOT run git commands yourself.
|
|
107
|
-
4. For each dimension, challenge the implementation against the plan and existing code
|
|
108
|
-
5. Write `challenge-report-impl.md`
|
|
109
|
-
|
|
110
|
-
---
|
|
111
|
-
|
|
112
|
-
## Output Format
|
|
113
|
-
|
|
114
|
-
Write challenge report (in Plan mode) or `challenge-report-impl.md` (in Implementation mode):
|
|
115
|
-
|
|
116
|
-
```markdown
|
|
117
|
-
## Challenge Report — [Plan Challenge|Implementation Challenge]
|
|
118
|
-
Feature: <FEATURE_ID> — <FEATURE_TITLE>
|
|
119
|
-
Mode: <mode>
|
|
120
|
-
Challenges Found: N (X critical, Y high, Z medium)
|
|
121
|
-
|
|
122
|
-
### CHALLENGE-1: [CRITICAL] Title
|
|
123
|
-
- **Observation**: What was found (with file:line or pattern reference)
|
|
124
|
-
- **Risk**: What could go wrong if this is not addressed
|
|
125
|
-
- **Suggestion**: Concrete alternative or fix approach
|
|
126
|
-
|
|
127
|
-
### CHALLENGE-2: [HIGH] Title
|
|
128
|
-
- **Observation**: ...
|
|
129
|
-
- **Risk**: ...
|
|
130
|
-
- **Suggestion**: ...
|
|
131
|
-
|
|
132
|
-
### Summary
|
|
133
|
-
[1-2 sentence overall assessment]
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
**Severity Criteria**:
|
|
137
|
-
- **CRITICAL**: Architecture mismatch — the approach conflicts with established project patterns and would require significant rework later
|
|
138
|
-
- **HIGH**: Style/robustness gap — the code works but doesn't fit the project's conventions or misses important edge cases
|
|
139
|
-
- **MEDIUM**: Minor inconsistency — small deviations that could be improved but aren't urgent
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Voting Protocol (3-Critic Parallel Mode)
|
|
144
|
-
|
|
145
|
-
When spawned as one of 3 parallel critics (Critic-A, Critic-B, Critic-C):
|
|
146
|
-
|
|
147
|
-
1. Each critic is assigned a **focus lens**:
|
|
148
|
-
- **Critic-A**: Architecture & Scalability — architectural pattern fit, scalability implications, over-engineering risks, component boundary design
|
|
149
|
-
- **Critic-B**: Data Model & Edge Cases — data model design fit, entity relationships, edge cases in business logic, missing boundary conditions
|
|
150
|
-
- **Critic-C**: Security & Performance — security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks
|
|
151
|
-
|
|
152
|
-
2. **All 3 critics run in PARALLEL** — don't wait for each other. Write to your assigned file.
|
|
153
|
-
|
|
154
|
-
3. **In Plan Challenge mode**: write to `challenge-report-A.md`, `challenge-report-B.md`, or `challenge-report-C.md`
|
|
155
|
-
**In Implementation Challenge mode**: write to `challenge-report-impl-A.md`, `challenge-report-impl-B.md`, or `challenge-report-impl-C.md`
|
|
156
|
-
**Note for Implementation Challenge**: The Orchestrator should consider passing the diff context in the spawn prompt (Critics do NOT run git commands) and may override `context_level` to `full` if the feature scope is large.
|
|
157
|
-
|
|
158
|
-
4. Do NOT read other critics' reports — independence is the point
|
|
159
|
-
|
|
160
|
-
5. The Orchestrator will read all 3 reports and apply consensus rules:
|
|
161
|
-
- Challenge raised by **2/3 or more** critics → **must respond** (fix or justify)
|
|
162
|
-
- Challenge raised by **1/3 only** → **logged but not blocking**
|
|
163
|
-
|
|
164
|
-
---
|
|
165
|
-
|
|
166
|
-
## Exception Handling
|
|
167
|
-
|
|
168
|
-
| Scenario | Strategy |
|
|
169
|
-
|----------|----------|
|
|
170
|
-
| No `.prizmkit/prizm-docs/` exists (new project) | Skip architecture comparison, focus on internal consistency and robustness only |
|
|
171
|
-
| Module has no existing code to compare | Note in report: "No baseline for style comparison — challenges are based on general best practices" |
|
|
172
|
-
| All challenges are MEDIUM or lower | Write report with "No significant challenges" summary. Do NOT inflate severity |
|
|
173
|
-
| Cannot determine project conventions | Downgrade all style challenges to MEDIUM. Note the limitation in the report |
|
|
174
|
-
|
|
175
|
-
### Communication Rules
|
|
176
|
-
|
|
177
|
-
Critic does not communicate directly with Dev or Reviewer. All findings go to the Orchestrator via the challenge-report file.
|
|
178
|
-
- Send COMPLETION_SIGNAL (with challenge count summary) to indicate completion
|
|
179
|
-
- Receive TASK_ASSIGNMENT to get assigned work
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
**MODE: Plan Challenge**
|
|
3
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` FIRST — Section 3 has project context, Section 4 has file manifest.
|
|
4
|
-
2. Use context-snapshot.md as the shared source of truth. Do not create or enter AI tool-created `.claude/worktrees/...` subagent worktrees; use default/no worktree isolation and do not request worktree isolation.
|
|
5
|
-
3. PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...` are a separate runner feature controlled by `USE_WORKTREE`; do not confuse them with AI tool-created `.claude/worktrees/...`.
|
|
6
|
-
4. Read additional `.prizmkit/prizm-docs/` or source excerpts only when needed to verify a specific challenge.
|
|
7
|
-
5. Challenge plan.md against the project's existing architecture, patterns, and style.
|
|
8
|
-
Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` with findings (or 'No significant challenges')."
|