prizmkit 1.1.37 → 1.1.39
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/agents/prizm-dev-team-critic.md +6 -34
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +1 -1
- package/bundled/dev-pipeline/run-bugfix.sh +17 -0
- package/bundled/dev-pipeline/run-feature.sh +17 -0
- package/bundled/dev-pipeline/run-refactor.sh +17 -0
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +0 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +0 -27
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +0 -27
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/feature-list-schema.json +1 -1
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +1 -1
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +1 -0
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +1 -0
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +1 -0
- package/package.json +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/critic-code-challenge.md +0 -13
- package/bundled/dev-pipeline/templates/sections/phase-critic-code.md +0 -25
package/bundled/VERSION.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: prizm-dev-team-critic
|
|
3
|
-
description: Adversarial challenger that questions plan fitness
|
|
3
|
+
description: Adversarial challenger that questions plan fitness against the project's existing architecture, style, and patterns. Evaluates whether plans truly fit the project before implementation begins. Does NOT verify correctness (that's Reviewer's job) — instead challenges strategic decisions and integration planning. Use when performing adversarial plan challenge.
|
|
4
4
|
tools: Read, Glob, Grep, Bash
|
|
5
5
|
disallowedTools: Agent, Write, Edit
|
|
6
6
|
model: inherit
|
|
@@ -13,9 +13,7 @@ You are the **Critic Agent**, the adversarial challenger of the PrizmKit-integra
|
|
|
13
13
|
|
|
14
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) and you do NOT check document consistency (that is Analyze's job). Your unique value is asking: **"Does this BELONG in this project? Is this the RIGHT approach? What are you NOT seeing?"**
|
|
15
15
|
|
|
16
|
-
You operate in
|
|
17
|
-
1. **Plan Challenge**: Before implementation, challenge the plan's fitness for the project
|
|
18
|
-
2. **Code Challenge**: After implementation, challenge the code's integration quality
|
|
16
|
+
You operate in **Plan Challenge** mode: before implementation, you challenge the plan's fitness for the project. Code-level review is handled by the Code Review skill's built-in review-fix loop (Reviewer Agent → filter → Dev Agent).
|
|
19
17
|
|
|
20
18
|
### Project Context
|
|
21
19
|
|
|
@@ -33,7 +31,7 @@ Before any challenge, you MUST understand the project:
|
|
|
33
31
|
3. Ground every challenge in specific evidence (file paths, code patterns, existing conventions)
|
|
34
32
|
4. Write `challenge-report.md` with structured findings
|
|
35
33
|
5. Keep the report ≤50 lines — focus on HIGH and CRITICAL only, skip LOW
|
|
36
|
-
6. Clearly state
|
|
34
|
+
6. Clearly state you are operating in Plan Challenge mode
|
|
37
35
|
|
|
38
36
|
### Never Do (NEVER)
|
|
39
37
|
|
|
@@ -52,7 +50,7 @@ CRIT-01: Always read .prizm-docs/ and existing source before challenging
|
|
|
52
50
|
CRIT-02: Every challenge must reference a specific file path or code pattern as evidence
|
|
53
51
|
CRIT-03: Maximum 10 challenges per report (focus on highest impact)
|
|
54
52
|
CRIT-04: Severity levels: CRITICAL (architecture mismatch), HIGH (style/robustness gap), MEDIUM (minor inconsistency)
|
|
55
|
-
CRIT-05: If no significant challenges found, write "No significant challenges — plan
|
|
53
|
+
CRIT-05: If no significant challenges found, write "No significant challenges — plan fits the project well" and exit
|
|
56
54
|
CRIT-06: Do NOT re-raise issues already covered by Analyze (document consistency) or Reviewer (correctness)
|
|
57
55
|
CRIT-07: Read comparable existing code in the same module for style baseline before flagging style issues
|
|
58
56
|
CRIT-08: When challenging a decision, always suggest a concrete alternative
|
|
@@ -87,40 +85,14 @@ CRIT-10: In voting mode, write to your assigned report file (challenge-report-{A
|
|
|
87
85
|
|
|
88
86
|
---
|
|
89
87
|
|
|
90
|
-
## Mode 2: Code Challenge
|
|
91
|
-
|
|
92
|
-
**Precondition**: Dev has completed implementation. All tasks `[x]`, tests pass. Implementation Log exists in `context-snapshot.md`.
|
|
93
|
-
|
|
94
|
-
**Goal**: Challenge whether the implemented code integrates well with the existing project — not whether it's correct (that's Reviewer's job).
|
|
95
|
-
|
|
96
|
-
### Challenge Dimensions
|
|
97
|
-
|
|
98
|
-
| Dimension | What to Challenge | Evidence Source |
|
|
99
|
-
|-----------|------------------|----------------|
|
|
100
|
-
| **Style Consistency** | Do naming conventions, code structure, and patterns match existing code in the same module? | Read existing files in the same directory/module |
|
|
101
|
-
| **Robustness** | Are edge cases handled? Error paths? Data validation? What happens with unexpected input not covered by the spec? | Read the new code, compare error handling patterns with existing code |
|
|
102
|
-
| **Integration Cohesion** | Does the new code interact naturally with existing code? Are abstractions consistent? Are import patterns standard? | Read call sites, compare with existing integrations |
|
|
103
|
-
| **Hidden Impact** | Could the new code have side effects on existing functionality? Shared state, global config, database constraints, event handlers? | Read shared modules, config files, database schemas |
|
|
104
|
-
|
|
105
|
-
### Workflow
|
|
106
|
-
|
|
107
|
-
1. Read `context-snapshot.md` — Implementation Log section for what changed
|
|
108
|
-
2. Read `.prizm-docs/root.prizm` and affected module docs (RULES, PATTERNS)
|
|
109
|
-
3. Read the actual source files changed (from Implementation Log)
|
|
110
|
-
4. Read comparable existing files in the same module for style baseline
|
|
111
|
-
5. For each dimension, compare new code against existing code patterns
|
|
112
|
-
6. Write `challenge-report.md` to `.prizmkit/specs/<feature-slug>/` (overwrite any existing report)
|
|
113
|
-
|
|
114
|
-
---
|
|
115
|
-
|
|
116
88
|
## Output Format
|
|
117
89
|
|
|
118
90
|
Write `challenge-report.md` (or `challenge-report-{A,B,C}.md` in voting mode):
|
|
119
91
|
|
|
120
92
|
```markdown
|
|
121
|
-
## Challenge Report —
|
|
93
|
+
## Challenge Report — Plan Challenge
|
|
122
94
|
Feature: <FEATURE_ID> — <FEATURE_TITLE>
|
|
123
|
-
Mode:
|
|
95
|
+
Mode: Plan Challenge
|
|
124
96
|
Challenges Found: N (X critical, Y high, Z medium)
|
|
125
97
|
|
|
126
98
|
### CHALLENGE-1: [CRITICAL] Title
|
|
@@ -307,7 +307,7 @@ pending, in_progress, completed, failed, skipped
|
|
|
307
307
|
| Phase Implementation | `phase-implement-lite.md`, `phase-implement-full.md`, `phase-implement-agent.md` | Three execution modes |
|
|
308
308
|
| Phase Review | `phase-review-full.md`, `phase-review-agent.md` | Full & Agent variants |
|
|
309
309
|
| Phase Plan | `phase-plan-lite.md`, `phase-plan-agent.md` | Lite & Agent variants |
|
|
310
|
-
| Phase Critic | `phase-critic-plan.md`, `phase-critic-plan-full.md
|
|
310
|
+
| Phase Critic | `phase-critic-plan.md`, `phase-critic-plan-full.md` | Plan review (single and multi) |
|
|
311
311
|
| Phase Commit | `phase-commit.md`, `phase-commit-full.md` | Standard & Full variants |
|
|
312
312
|
|
|
313
313
|
### Singleton Sections
|
|
@@ -28,6 +28,7 @@ set -euo pipefail
|
|
|
28
28
|
# LOG_MAX_TOTAL_MB Keep total logs under N MB via oldest-first cleanup (default: 1024)
|
|
29
29
|
# DEV_BRANCH Custom dev branch name (default: auto-generated bugfix/pipeline-{run_id})
|
|
30
30
|
# AUTO_PUSH Auto-push to remote after successful bug fix (default: 0). Set to 1 to enable.
|
|
31
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
31
32
|
# ============================================================
|
|
32
33
|
|
|
33
34
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -48,6 +49,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
48
49
|
MODEL=${MODEL:-""}
|
|
49
50
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
50
51
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
52
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
51
53
|
|
|
52
54
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
53
55
|
source "$SCRIPT_DIR/lib/common.sh"
|
|
@@ -905,6 +907,9 @@ main() {
|
|
|
905
907
|
if [[ -n "${MODEL:-}" ]]; then
|
|
906
908
|
log_info "Default Model: $MODEL"
|
|
907
909
|
fi
|
|
910
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
911
|
+
log_info "Stop on failure: enabled"
|
|
912
|
+
fi
|
|
908
913
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
909
914
|
echo ""
|
|
910
915
|
|
|
@@ -1106,6 +1111,17 @@ main() {
|
|
|
1106
1111
|
session_count=$((session_count + 1))
|
|
1107
1112
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1108
1113
|
|
|
1114
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1115
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1116
|
+
echo ""
|
|
1117
|
+
log_error "════════════════════════════════════════════════════"
|
|
1118
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $bug_id failed."
|
|
1119
|
+
log_error " Total sessions completed: $session_count"
|
|
1120
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1121
|
+
log_error "════════════════════════════════════════════════════"
|
|
1122
|
+
break
|
|
1123
|
+
fi
|
|
1124
|
+
|
|
1109
1125
|
# Stuck detection
|
|
1110
1126
|
if python3 "$SCRIPTS_DIR/detect-stuck.py" \
|
|
1111
1127
|
--state-dir "$STATE_DIR" \
|
|
@@ -1165,6 +1181,7 @@ show_help() {
|
|
|
1165
1181
|
echo " VERBOSE Set to 1 for verbose AI CLI output"
|
|
1166
1182
|
echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
|
|
1167
1183
|
echo " STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)"
|
|
1184
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1168
1185
|
echo " LOG_CLEANUP_ENABLED Run log cleanup before execution (default: 1)"
|
|
1169
1186
|
echo " LOG_RETENTION_DAYS Delete logs older than N days (default: 14)"
|
|
1170
1187
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
@@ -31,6 +31,7 @@ set -euo pipefail
|
|
|
31
31
|
# PIPELINE_MODE Override mode for all features: lite|standard|full (used by daemon)
|
|
32
32
|
# DEV_BRANCH Custom dev branch name (default: auto-generated dev/{feature_id}-YYYYMMDDHHmm)
|
|
33
33
|
# AUTO_PUSH Auto-push to remote after successful feature (default: 0). Set to 1 to enable.
|
|
34
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
34
35
|
# ============================================================
|
|
35
36
|
|
|
36
37
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
@@ -51,6 +52,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
51
52
|
MODEL=${MODEL:-""}
|
|
52
53
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
53
54
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
55
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
54
56
|
|
|
55
57
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
56
58
|
source "$SCRIPT_DIR/lib/common.sh"
|
|
@@ -1089,6 +1091,9 @@ main() {
|
|
|
1089
1091
|
if [[ -n "${MODEL:-}" ]]; then
|
|
1090
1092
|
log_info "Default Model: $MODEL"
|
|
1091
1093
|
fi
|
|
1094
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1095
|
+
log_info "Stop on failure: enabled"
|
|
1096
|
+
fi
|
|
1092
1097
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
1093
1098
|
echo ""
|
|
1094
1099
|
|
|
@@ -1338,6 +1343,17 @@ print(count)
|
|
|
1338
1343
|
session_count=$((session_count + 1))
|
|
1339
1344
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1340
1345
|
|
|
1346
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1347
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1348
|
+
echo ""
|
|
1349
|
+
log_error "════════════════════════════════════════════════════"
|
|
1350
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $feature_id failed."
|
|
1351
|
+
log_error " Total sessions completed: $session_count"
|
|
1352
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1353
|
+
log_error "════════════════════════════════════════════════════"
|
|
1354
|
+
break
|
|
1355
|
+
fi
|
|
1356
|
+
|
|
1341
1357
|
# Brief pause before next iteration
|
|
1342
1358
|
log_info "Pausing 5s before next feature..."
|
|
1343
1359
|
sleep 5
|
|
@@ -1388,6 +1404,7 @@ show_help() {
|
|
|
1388
1404
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
1389
1405
|
echo " PIPELINE_MODE Override mode for all features: lite|standard|full"
|
|
1390
1406
|
echo " ENABLE_CRITIC Enable critic review for all features: true|false"
|
|
1407
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1391
1408
|
echo ""
|
|
1392
1409
|
echo "Examples:"
|
|
1393
1410
|
echo " ./run-feature.sh run # Run all features"
|
|
@@ -28,6 +28,7 @@ set -euo pipefail
|
|
|
28
28
|
# LOG_MAX_TOTAL_MB Keep total logs under N MB via oldest-first cleanup (default: 1024)
|
|
29
29
|
# DEV_BRANCH Custom dev branch name (default: auto-generated refactor/pipeline-{run_id})
|
|
30
30
|
# AUTO_PUSH Auto-push to remote after successful refactor (default: 0). Set to 1 to enable.
|
|
31
|
+
# STOP_ON_FAILURE Stop pipeline after a task exhausts all retries (default: 0). Set to 1 to stop.
|
|
31
32
|
# STRICT_BEHAVIOR_CHECK Force full test suite after each refactor item (default: 1)
|
|
32
33
|
# ============================================================
|
|
33
34
|
|
|
@@ -49,6 +50,7 @@ VERBOSE=${VERBOSE:-0}
|
|
|
49
50
|
MODEL=${MODEL:-""}
|
|
50
51
|
DEV_BRANCH=${DEV_BRANCH:-""}
|
|
51
52
|
AUTO_PUSH=${AUTO_PUSH:-0}
|
|
53
|
+
STOP_ON_FAILURE=${STOP_ON_FAILURE:-0}
|
|
52
54
|
STRICT_BEHAVIOR_CHECK=${STRICT_BEHAVIOR_CHECK:-1}
|
|
53
55
|
|
|
54
56
|
# Source shared common helpers (CLI/platform detection + logs + deps)
|
|
@@ -940,6 +942,9 @@ main() {
|
|
|
940
942
|
else
|
|
941
943
|
log_info "Strict behavior check: disabled"
|
|
942
944
|
fi
|
|
945
|
+
if [[ "$STOP_ON_FAILURE" == "1" ]]; then
|
|
946
|
+
log_info "Stop on failure: enabled"
|
|
947
|
+
fi
|
|
943
948
|
echo -e "${BOLD}════════════════════════════════════════════════════${NC}"
|
|
944
949
|
echo ""
|
|
945
950
|
|
|
@@ -1164,6 +1169,17 @@ main() {
|
|
|
1164
1169
|
session_count=$((session_count + 1))
|
|
1165
1170
|
total_subagent_calls=$((total_subagent_calls + _SUBAGENT_COUNT))
|
|
1166
1171
|
|
|
1172
|
+
# Stop-on-failure: abort pipeline if task failed and STOP_ON_FAILURE is enabled
|
|
1173
|
+
if [[ "$session_status" != "success" && "$STOP_ON_FAILURE" == "1" ]]; then
|
|
1174
|
+
echo ""
|
|
1175
|
+
log_error "════════════════════════════════════════════════════"
|
|
1176
|
+
log_error " STOP_ON_FAILURE: Pipeline halted after $refactor_id failed."
|
|
1177
|
+
log_error " Total sessions completed: $session_count"
|
|
1178
|
+
log_error " Set STOP_ON_FAILURE=0 to continue past failures."
|
|
1179
|
+
log_error "════════════════════════════════════════════════════"
|
|
1180
|
+
break
|
|
1181
|
+
fi
|
|
1182
|
+
|
|
1167
1183
|
log_info "Pausing 5s before next refactor..."
|
|
1168
1184
|
sleep 5
|
|
1169
1185
|
done
|
|
@@ -1203,6 +1219,7 @@ show_help() {
|
|
|
1203
1219
|
echo " STRICT_BEHAVIOR_CHECK Force full test suite after each refactor (default: 1)"
|
|
1204
1220
|
echo " HEARTBEAT_INTERVAL Heartbeat log interval in seconds (default: 30)"
|
|
1205
1221
|
echo " STALE_KILL_THRESHOLD Auto-kill session after N seconds of no progress (default: 900)"
|
|
1222
|
+
echo " STOP_ON_FAILURE Stop pipeline when a task exhausts retries: 0|1 (default: 0)"
|
|
1206
1223
|
echo " LOG_CLEANUP_ENABLED Run log cleanup before execution (default: 1)"
|
|
1207
1224
|
echo " LOG_RETENTION_DAYS Delete logs older than N days (default: 14)"
|
|
1208
1225
|
echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
|
|
@@ -623,7 +623,6 @@ SECTION_TO_SKILL = {
|
|
|
623
623
|
[".prizmkit/specs/{slug}/plan.md"]),
|
|
624
624
|
"phase-critic-plan": ("critic-plan-review", "Critic: Plan Review", []),
|
|
625
625
|
"phase-implement": ("prizmkit-implement", "Implement + Test", []),
|
|
626
|
-
"phase-critic-code": ("critic-code-review", "Critic: Code Review", []),
|
|
627
626
|
"phase-review": ("prizmkit-code-review", "Code Review", []),
|
|
628
627
|
"phase-browser": ("browser-verification", "Browser Verification", []),
|
|
629
628
|
"phase-deploy": ("deploy-verification", "Deploy Verification", []),
|
|
@@ -1043,12 +1042,6 @@ def assemble_sections(pipeline_mode, sections_dir, init_done, is_resume,
|
|
|
1043
1042
|
load_section(sections_dir,
|
|
1044
1043
|
"test-failure-recovery-agent.md")))
|
|
1045
1044
|
|
|
1046
|
-
# --- Critic: Code Challenge (only if critic enabled, agent tiers) ---
|
|
1047
|
-
if critic_enabled and pipeline_mode in ("standard", "full"):
|
|
1048
|
-
sections.append(("phase-critic-code",
|
|
1049
|
-
load_section(sections_dir,
|
|
1050
|
-
"phase-critic-code.md")))
|
|
1051
|
-
|
|
1052
1045
|
# --- AC Verification Checklist (all tiers) ---
|
|
1053
1046
|
ac_checklist_path = os.path.join(sections_dir, "ac-verification-checklist.md")
|
|
1054
1047
|
if os.path.isfile(ac_checklist_path):
|
|
@@ -228,33 +228,6 @@ grep -q "## Implementation Log" .prizmkit/specs/{{FEATURE_SLUG}}/context-snapsho
|
|
|
228
228
|
```
|
|
229
229
|
If GATE:MISSING — send message to Dev (re-spawn if needed): "Write the '## Implementation Log' section to context-snapshot.md before I can proceed to review. Include: files changed/created, key decisions, deviations from plan, notable discoveries."
|
|
230
230
|
|
|
231
|
-
{{IF_CRITIC_ENABLED}}
|
|
232
|
-
### Phase 4.5: Code Challenge — Critic Agent
|
|
233
|
-
|
|
234
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
235
|
-
```bash
|
|
236
|
-
ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
|
|
237
|
-
```
|
|
238
|
-
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
239
|
-
|
|
240
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
241
|
-
|
|
242
|
-
Prompt:
|
|
243
|
-
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
244
|
-
> **MODE: Code Challenge**
|
|
245
|
-
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
|
|
246
|
-
> 2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
|
|
247
|
-
> 3. Read the actual source files changed (from Implementation Log).
|
|
248
|
-
> 4. Read comparable existing source files in the same module for style comparison.
|
|
249
|
-
> 5. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
|
|
250
|
-
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
|
|
251
|
-
|
|
252
|
-
Wait for Critic to return.
|
|
253
|
-
- Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
|
|
254
|
-
|
|
255
|
-
**CP-3.5**: Code challenges reviewed and resolved.
|
|
256
|
-
{{END_IF_CRITIC_ENABLED}}
|
|
257
|
-
|
|
258
231
|
### Phase 5: Review + Test — Reviewer Subagent
|
|
259
232
|
|
|
260
233
|
Spawn Reviewer subagent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
@@ -293,33 +293,6 @@ Wait for Dev to return. **If Dev times out before all tasks are `[x]`**:
|
|
|
293
293
|
|
|
294
294
|
All tasks `[x]`, tests pass.
|
|
295
295
|
|
|
296
|
-
{{IF_CRITIC_ENABLED}}
|
|
297
|
-
### Phase 4.5: Code Challenge — Critic Agent
|
|
298
|
-
|
|
299
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
300
|
-
```bash
|
|
301
|
-
ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
|
|
302
|
-
```
|
|
303
|
-
If CRITIC:MISSING — skip Phase 4.5 entirely and proceed to Phase 5. Log: "Critic agent not installed — skipping Code Challenge."
|
|
304
|
-
|
|
305
|
-
Spawn Critic agent (Agent tool, subagent_type="prizm-dev-team-critic", mode="plan", run_in_background=false).
|
|
306
|
-
|
|
307
|
-
Prompt:
|
|
308
|
-
> "Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
309
|
-
> **MODE: Code Challenge**
|
|
310
|
-
> 1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
|
|
311
|
-
> 2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
|
|
312
|
-
> 3. Read the actual source files changed (from Implementation Log).
|
|
313
|
-
> 4. Read comparable existing source files in the same module for style comparison.
|
|
314
|
-
> 5. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
|
|
315
|
-
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
|
|
316
|
-
|
|
317
|
-
Wait for Critic to return.
|
|
318
|
-
- Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
|
|
319
|
-
|
|
320
|
-
**CP-3.5**: Code challenges reviewed and resolved.
|
|
321
|
-
{{END_IF_CRITIC_ENABLED}}
|
|
322
|
-
|
|
323
296
|
### Phase 5: Review + Test — Reviewer Agent
|
|
324
297
|
|
|
325
298
|
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
@@ -175,7 +175,7 @@
|
|
|
175
175
|
},
|
|
176
176
|
"critic": {
|
|
177
177
|
"type": "boolean",
|
|
178
|
-
"description": "Enable adversarial
|
|
178
|
+
"description": "Enable adversarial plan challenge before implementation. Default: true for high severity bugs, false for others.",
|
|
179
179
|
"default": false
|
|
180
180
|
},
|
|
181
181
|
"critic_count": {
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
},
|
|
148
148
|
"critic": {
|
|
149
149
|
"type": "boolean",
|
|
150
|
-
"description": "Enable adversarial
|
|
150
|
+
"description": "Enable adversarial plan challenge before implementation. Default: false.",
|
|
151
151
|
"default": false
|
|
152
152
|
},
|
|
153
153
|
"critic_count": {
|
|
@@ -191,7 +191,7 @@
|
|
|
191
191
|
},
|
|
192
192
|
"critic": {
|
|
193
193
|
"type": "boolean",
|
|
194
|
-
"description": "Enable adversarial
|
|
194
|
+
"description": "Enable adversarial plan challenge before implementation. Default: true for critical/high priority refactors, false for others.",
|
|
195
195
|
"default": false
|
|
196
196
|
},
|
|
197
197
|
"critic_count": {
|
|
@@ -156,6 +156,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
156
156
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
157
157
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
158
158
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
159
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
159
160
|
|
|
160
161
|
⚠️ STOP HERE and wait for user response before continuing to step 6.
|
|
161
162
|
|
|
@@ -183,6 +183,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
183
183
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
184
184
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
185
185
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
186
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
186
187
|
|
|
187
188
|
⚠️ STOP HERE and wait for user response before continuing to step 7.
|
|
188
189
|
|
|
@@ -179,6 +179,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
179
179
|
| `LOG_CLEANUP_ENABLED` | `1` | Run periodic log cleanup (`0` to disable) |
|
|
180
180
|
| `LOG_RETENTION_DAYS` | `14` | Delete logs older than N days |
|
|
181
181
|
| `LOG_MAX_TOTAL_MB` | `1024` | Keep total logs under N MB via oldest-first cleanup |
|
|
182
|
+
| `STOP_ON_FAILURE` | `0` | Stop pipeline when a task exhausts all retries (`1` to stop immediately) |
|
|
182
183
|
|
|
183
184
|
⚠️ STOP HERE and wait for user response before continuing to step 7.
|
|
184
185
|
|
package/package.json
CHANGED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"Read {{CRITIC_SUBAGENT_PATH}}. For feature {{FEATURE_ID}} (slug: {{FEATURE_SLUG}}):
|
|
2
|
-
**MODE: Code Challenge**
|
|
3
|
-
1. Read `.prizmkit/specs/{{FEATURE_SLUG}}/context-snapshot.md` — Implementation Log section shows what Dev changed.
|
|
4
|
-
2. Read `.prizm-docs/root.prizm` and relevant module docs for RULES/PATTERNS.
|
|
5
|
-
3. Read the actual source files changed (from Implementation Log).
|
|
6
|
-
4. Read comparable existing source files in the same module for style comparison.
|
|
7
|
-
5. Read test files created/modified (from Implementation Log) — evaluate test quality:
|
|
8
|
-
- Coverage adequacy: Do tests cover all code paths modified? Target: {{COVERAGE_TARGET}}%
|
|
9
|
-
- Test brittleness: Do tests pass consistently (not flaky)? Check Implementation Log for test re-runs
|
|
10
|
-
- Edge case handling: Are boundary conditions tested? Are error paths tested?
|
|
11
|
-
6. Challenge code integration quality: style fit, robustness, existing code cohesion, hidden impact.
|
|
12
|
-
7. Challenge test quality: coverage, brittleness, edge case handling.
|
|
13
|
-
Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report.md` (overwrite) with findings (or 'No significant challenges')."
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
### Code Challenge — Critic Agent
|
|
2
|
-
|
|
3
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
-
```bash
|
|
5
|
-
ls {{CRITIC_SUBAGENT_PATH}} 2>/dev/null && echo "CRITIC:READY" || echo "CRITIC:MISSING"
|
|
6
|
-
```
|
|
7
|
-
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Code Challenge."
|
|
8
|
-
|
|
9
|
-
**Spawn Agent**:
|
|
10
|
-
| Parameter | Value |
|
|
11
|
-
|-----------|-------|
|
|
12
|
-
| subagent_type | prizm-dev-team-critic |
|
|
13
|
-
| mode | plan |
|
|
14
|
-
| run_in_background | false |
|
|
15
|
-
|
|
16
|
-
**Prompt**:
|
|
17
|
-
> {{AGENT_PROMPT_CRITIC_CODE_CHALLENGE}}
|
|
18
|
-
|
|
19
|
-
Wait for Critic to return.
|
|
20
|
-
- Read challenge-report.md. For items marked CRITICAL/HIGH: spawn Dev to fix, then proceed to Review.
|
|
21
|
-
|
|
22
|
-
**CP-3.5**: Code challenges reviewed and resolved.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
**Checkpoint update**: Update `workflow-checkpoint.json` — set step `critic-code-review` to `"completed"`.
|