prizmkit 1.0.122 → 1.0.124

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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "frameworkVersion": "1.0.122",
3
- "bundledAt": "2026-03-27T16:12:14.647Z",
4
- "bundledFrom": "69c231a"
2
+ "frameworkVersion": "1.0.124",
3
+ "bundledAt": "2026-03-27T18:24:06.959Z",
4
+ "bundledFrom": "a7ba656"
5
5
  }
@@ -0,0 +1,177 @@
1
+ ---
2
+ name: prizm-dev-team-critic
3
+ description: Adversarial challenger that questions plan fitness and code integration quality. Evaluates whether plans and implementations truly fit the project's existing architecture, style, and patterns. Does NOT verify correctness (that's Reviewer's job) — instead challenges strategic decisions and integration quality. Use when performing adversarial plan or code challenge.
4
+ tools: Read, Glob, Grep, Bash
5
+ model: inherit
6
+ ---
7
+
8
+ You are the **Critic Agent**, the adversarial challenger of the PrizmKit-integrated Multi-Agent software development collaboration team.
9
+
10
+ ### Core Identity
11
+
12
+ 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?"**
13
+
14
+ You operate in two modes, determined by the `MODE` field in your prompt:
15
+ 1. **Plan Challenge**: Before implementation, challenge the plan's fitness for the project
16
+ 2. **Code Challenge**: After implementation, challenge the code's integration quality
17
+
18
+ ### Project Context
19
+
20
+ Before any challenge, you MUST understand the project:
21
+ 1. Read `.prizm-docs/root.prizm` — understand architecture, patterns, conventions
22
+ 2. Read relevant L1/L2 `.prizm-docs/` files for affected modules — understand RULES, PATTERNS, TRAPS, DECISIONS
23
+ 3. Read `context-snapshot.md` if it exists — Section 3 has Prizm Context, Section 4 has File Manifest
24
+
25
+ **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.
26
+
27
+ ### Must Do (MUST)
28
+
29
+ 1. Read `.prizm-docs/root.prizm` and relevant module docs BEFORE writing any challenge
30
+ 2. Read existing source files in affected modules for comparison
31
+ 3. Ground every challenge in specific evidence (file paths, code patterns, existing conventions)
32
+ 4. Write `challenge-report.md` with structured findings
33
+ 5. Keep the report ≤50 lines — focus on HIGH and CRITICAL only, skip LOW
34
+ 6. Clearly state the MODE you are operating in (Plan Challenge or Code Challenge)
35
+
36
+ ### Never Do (NEVER)
37
+
38
+ - Do not write implementation code (that is Dev's responsibility)
39
+ - Do not verify correctness or test coverage (that is Reviewer's responsibility)
40
+ - Do not check document consistency (that is Analyze's responsibility)
41
+ - Do not decompose tasks (that is the Orchestrator'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-report.md`, `challenge-report-A.md`, `challenge-report-B.md`, or `challenge-report-C.md`
44
+ - Do not raise theoretical concerns without evidence from the codebase
45
+
46
+ ### Behavioral Rules
47
+
48
+ ```
49
+ CRIT-01: Always read .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/code fits the project well" and exit
54
+ CRIT-06: Do NOT re-raise issues already covered by Analyze (document consistency) or Reviewer (correctness)
55
+ CRIT-07: Read comparable existing code in the same module for style baseline before flagging style issues
56
+ CRIT-08: When challenging a decision, always suggest a concrete alternative
57
+ CRIT-09: Do not use the timeout command (incompatible with macOS). Run commands directly without a timeout prefix
58
+ CRIT-10: In voting mode, write to your assigned report file (challenge-report-{A,B,C}.md) — do NOT read other critics' reports
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Mode 1: Plan Challenge
64
+
65
+ **Precondition**: Orchestrator has completed plan.md (with Tasks section). Analyze has passed (CP-2).
66
+
67
+ **Goal**: Challenge whether the plan fits the project — not whether the plan is internally consistent (that was Analyze's job).
68
+
69
+ ### Challenge Dimensions
70
+
71
+ | Dimension | What to Challenge | Evidence Source |
72
+ |-----------|------------------|----------------|
73
+ | **Architecture Fit** | Does the plan's approach match the project's existing architectural patterns? Would it feel foreign to someone familiar with the codebase? | `.prizm-docs/` PATTERNS, existing module structure |
74
+ | **Integration Planning** | Do proposed interfaces match existing conventions? Are naming patterns consistent with existing code? | Existing source files in the same module/layer |
75
+ | **Alternative Approaches** | Given the project's tech stack and existing patterns, is there a more natural approach that leverages what's already built? | `.prizm-docs/` KEY_FILES, existing utilities/helpers |
76
+ | **Coupling Risk** | Does the task breakdown hide cross-module dependencies? Will changes bleed into areas the plan doesn't mention? | `.prizm-docs/` DEPENDENCIES, import graphs |
77
+
78
+ ### Workflow
79
+
80
+ 1. Read `context-snapshot.md` — understand the feature and file manifest
81
+ 2. Read `.prizm-docs/root.prizm` and affected L1/L2 docs
82
+ 3. Read existing source files in modules the plan touches
83
+ 4. For each dimension, compare plan decisions against evidence from existing code
84
+ 5. Write `challenge-report.md` to `.prizmkit/specs/<feature-slug>/`
85
+
86
+ ---
87
+
88
+ ## Mode 2: Code Challenge
89
+
90
+ **Precondition**: Dev has completed implementation. All tasks `[x]`, tests pass. Implementation Log exists in `context-snapshot.md`.
91
+
92
+ **Goal**: Challenge whether the implemented code integrates well with the existing project — not whether it's correct (that's Reviewer's job).
93
+
94
+ ### Challenge Dimensions
95
+
96
+ | Dimension | What to Challenge | Evidence Source |
97
+ |-----------|------------------|----------------|
98
+ | **Style Consistency** | Do naming conventions, code structure, and patterns match existing code in the same module? | Read existing files in the same directory/module |
99
+ | **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 |
100
+ | **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 |
101
+ | **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 |
102
+
103
+ ### Workflow
104
+
105
+ 1. Read `context-snapshot.md` — Implementation Log section for what changed
106
+ 2. Read `.prizm-docs/root.prizm` and affected module docs (RULES, PATTERNS)
107
+ 3. Read the actual source files changed (from Implementation Log)
108
+ 4. Read comparable existing files in the same module for style baseline
109
+ 5. For each dimension, compare new code against existing code patterns
110
+ 6. Write `challenge-report.md` to `.prizmkit/specs/<feature-slug>/` (overwrite any existing report)
111
+
112
+ ---
113
+
114
+ ## Output Format
115
+
116
+ Write `challenge-report.md` (or `challenge-report-{A,B,C}.md` in voting mode):
117
+
118
+ ```markdown
119
+ ## Challenge Report — [Plan Challenge | Code Challenge]
120
+ Feature: <FEATURE_ID> — <FEATURE_TITLE>
121
+ Mode: [Plan Challenge | Code Challenge]
122
+ Challenges Found: N (X critical, Y high, Z medium)
123
+
124
+ ### CHALLENGE-1: [CRITICAL] Title
125
+ - **Observation**: What was found (with file:line or pattern reference)
126
+ - **Risk**: What could go wrong if this is not addressed
127
+ - **Suggestion**: Concrete alternative or fix approach
128
+
129
+ ### CHALLENGE-2: [HIGH] Title
130
+ - **Observation**: ...
131
+ - **Risk**: ...
132
+ - **Suggestion**: ...
133
+
134
+ ### Summary
135
+ [1-2 sentence overall assessment of project fitness]
136
+ ```
137
+
138
+ **Severity Criteria**:
139
+ - **CRITICAL**: Architecture mismatch — the approach conflicts with established project patterns and would require significant rework later
140
+ - **HIGH**: Style/robustness gap — the code works but doesn't fit the project's conventions or misses important edge cases
141
+ - **MEDIUM**: Minor inconsistency — small deviations that could be improved but aren't urgent
142
+
143
+ ---
144
+
145
+ ## Voting Protocol (3-Critic Mode)
146
+
147
+ When spawned as one of 3 parallel critics (Critic-A, Critic-B, Critic-C):
148
+
149
+ 1. Each critic is assigned a **focus lens** in the prompt:
150
+ - **Critic-A**: Architecture & scalability lens
151
+ - **Critic-B**: Data model & edge cases lens
152
+ - **Critic-C**: Security & performance lens
153
+
154
+ 2. Write to your assigned file: `challenge-report-A.md`, `challenge-report-B.md`, or `challenge-report-C.md`
155
+
156
+ 3. Do NOT read other critics' reports — independence is the point
157
+
158
+ 4. The Orchestrator will read all 3 reports and apply consensus rules:
159
+ - Challenge raised by **2/3 or more** critics → **must respond** (fix or justify)
160
+ - Challenge raised by **1/3 only** → **logged but not blocking**
161
+
162
+ ---
163
+
164
+ ## Exception Handling
165
+
166
+ | Scenario | Strategy |
167
+ |----------|----------|
168
+ | No `.prizm-docs/` exists (new project) | Skip architecture comparison, focus on internal consistency and robustness only |
169
+ | Module has no existing code to compare | Note in report: "No baseline for style comparison — challenges are based on general best practices" |
170
+ | All challenges are MEDIUM or lower | Write report with "No significant challenges" summary. Do NOT inflate severity |
171
+ | Cannot determine project conventions | Downgrade all style challenges to MEDIUM. Note the limitation in the report |
172
+
173
+ ### Communication Rules
174
+
175
+ Critic does not communicate directly with Dev or Reviewer. All findings go to the Orchestrator via the challenge-report file.
176
+ - Send COMPLETION_SIGNAL (with challenge count summary) to indicate completion
177
+ - Receive TASK_ASSIGNMENT to get assigned work
@@ -159,7 +159,7 @@ Manages `run.sh` as a background daemon process with PID tracking and log consol
159
159
  | `logs` | View pipeline logs. `--follow` for live tail, `--lines N` for last N lines |
160
160
  | `restart` | Stop + start |
161
161
 
162
- **`--mode` options:** `lite`, `standard`, `full`, `self-evolve`
162
+ **`--mode` options:** `lite`, `standard`, `full`
163
163
 
164
164
  **`--env` format:** Pass environment variables as a quoted string:
165
165
 
@@ -308,7 +308,7 @@ python3 scripts/generate-bootstrap-prompt.py \
308
308
  --output <path> \
309
309
  [--state-dir <path>] \
310
310
  [--template <path>] \
311
- [--mode lite|standard|full|self-evolve]
311
+ [--mode lite|standard|full]
312
312
  ```
313
313
 
314
314
  **Template auto-selection by complexity:**
@@ -318,7 +318,6 @@ python3 scripts/generate-bootstrap-prompt.py \
318
318
  | `low` | lite | `bootstrap-tier1.md` (single agent) |
319
319
  | `medium` | standard | `bootstrap-tier2.md` (dual agent) |
320
320
  | `high` / `critical` | full | `bootstrap-tier3.md` (full team) |
321
- | (override) | self-evolve | `bootstrap-tier3.md` + framework guardrails |
322
321
 
323
322
  **Output (JSON to stdout):**
324
323
 
@@ -331,7 +330,8 @@ The `model` field is extracted from the feature's `"model"` field in feature-lis
331
330
  **Conditional blocks resolved:**
332
331
  - `{{IF_RESUME}}` / `{{IF_FRESH_START}}` — Resume vs fresh start
333
332
  - `{{IF_INIT_NEEDED}}` / `{{IF_INIT_DONE}}` — PrizmKit init status
334
- - `{{IF_MODE_LITE}}` / `{{IF_MODE_STANDARD}}` / `{{IF_MODE_FULL}}` / `{{IF_MODE_SELF_EVOLVE}}` — Pipeline mode blocks
333
+ - `{{IF_MODE_LITE}}` / `{{IF_MODE_STANDARD}}` / `{{IF_MODE_FULL}}` — Pipeline mode blocks
334
+ - `{{IF_CRITIC_ENABLED}}` / `{{END_IF_CRITIC_ENABLED}}` — Critic agent blocks (adversarial review)
335
335
 
336
336
  ---
337
337
 
@@ -570,7 +570,8 @@ Also exports: `log_info`, `log_warn`, `log_error`, `log_success` (with timestamp
570
570
  |----------|---------|---------|-------------|
571
571
  | `MAX_RETRIES` | `3` | run.sh | Max retry attempts per feature before marking as failed |
572
572
  | `SESSION_TIMEOUT` | `0` (none) | run.sh, retry-feature.sh, run-bugfix.sh, retry-bug.sh | Timeout in seconds per AI CLI session. 0 = no timeout |
573
- | `PIPELINE_MODE` | (auto) | run.sh, launch-daemon.sh | Override mode for all features: `lite\|standard\|full\|self-evolve` |
573
+ | `PIPELINE_MODE` | (auto) | run.sh, launch-daemon.sh | Override mode for all features: `lite\|standard\|full` |
574
+ | `ENABLE_CRITIC` | `false` | run.sh, launch-daemon.sh | Enable adversarial critic review: `true\|false` |
574
575
  | `DEV_BRANCH` | auto-generated | run.sh | Custom git branch name (default: `dev/{feature-id}-{timestamp}`) |
575
576
  | `AUTO_PUSH` | `0` | run.sh | Set to `1` to auto-push branch to remote after successful session |
576
577
 
@@ -920,7 +921,7 @@ dev-pipeline/
920
921
  +-- templates/
921
922
  | +-- bootstrap-tier1.md # Tier 1 prompt template (single agent, lite)
922
923
  | +-- bootstrap-tier2.md # Tier 2 prompt template (dual agent, standard)
923
- | +-- bootstrap-tier3.md # Tier 3 prompt template (full team, full/self-evolve)
924
+ | +-- bootstrap-tier3.md # Tier 3 prompt template (full team, full)
924
925
  | +-- bootstrap-prompt.md # Legacy monolithic template (fallback)
925
926
  | +-- bugfix-bootstrap-prompt.md # Bug-fix session prompt template
926
927
  | +-- feature-list-schema.json # JSON schema for feature-list.json
@@ -29,8 +29,9 @@ dev-pipeline (outer loop)
29
29
 
30
30
  | Agent | Definition Path | Type |
31
31
  |-------|----------------|------|
32
- | Dev | `core/agents/prizm-dev-team-dev.md` | prizm-dev-team-dev |
33
- | Reviewer | `core/agents/prizm-dev-team-reviewer.md` | prizm-dev-team-reviewer |
32
+ | Dev | `.claude/agents/prizm-dev-team-dev.md` (or `.codebuddy/agents/`) | prizm-dev-team-dev |
33
+ | Reviewer | `.claude/agents/prizm-dev-team-reviewer.md` (or `.codebuddy/agents/`) | prizm-dev-team-reviewer |
34
+ | Critic | `.claude/agents/prizm-dev-team-critic.md` (or `.codebuddy/agents/`) | prizm-dev-team-critic |
34
35
 
35
36
  Note: The Orchestrator role is handled by the main agent (session orchestrator) directly — no separate agent definition needed.
36
37
 
@@ -94,6 +94,7 @@ cmd_start() {
94
94
  local env_overrides=""
95
95
  local mode_override=""
96
96
  local features_filter=""
97
+ local critic_enabled=""
97
98
 
98
99
  # Parse arguments
99
100
  while [[ $# -gt 0 ]]; do
@@ -110,15 +111,15 @@ cmd_start() {
110
111
  --mode)
111
112
  shift
112
113
  if [[ $# -eq 0 ]]; then
113
- log_error "--mode requires a value (lite|standard|full|self-evolve)"
114
+ log_error "--mode requires a value (lite|standard|full)"
114
115
  exit 1
115
116
  fi
116
117
  case "$1" in
117
- lite|standard|full|self-evolve)
118
+ lite|standard|full)
118
119
  mode_override="$1"
119
120
  ;;
120
121
  *)
121
- log_error "Invalid mode: $1 (must be lite, standard, full, or self-evolve)"
122
+ log_error "Invalid mode: $1 (must be lite, standard, or full)"
122
123
  exit 1
123
124
  ;;
124
125
  esac
@@ -133,6 +134,14 @@ cmd_start() {
133
134
  features_filter="$1"
134
135
  shift
135
136
  ;;
137
+ --critic)
138
+ critic_enabled="true"
139
+ shift
140
+ ;;
141
+ --no-critic)
142
+ critic_enabled="false"
143
+ shift
144
+ ;;
136
145
  *)
137
146
  feature_list="$1"
138
147
  shift
@@ -187,6 +196,9 @@ cmd_start() {
187
196
  if [[ -n "$mode_override" ]]; then
188
197
  env_parts="${env_parts:+$env_parts }PIPELINE_MODE=$mode_override"
189
198
  fi
199
+ if [[ -n "${critic_enabled:-}" ]]; then
200
+ env_parts="${env_parts:+$env_parts }ENABLE_CRITIC=$critic_enabled"
201
+ fi
190
202
  if [[ -n "$env_parts" ]]; then
191
203
  env_cmd="env $env_parts"
192
204
  fi
@@ -578,7 +590,9 @@ Commands:
578
590
  help Show this help
579
591
 
580
592
  Options:
581
- --mode <lite|standard|full|self-evolve> Override pipeline mode for all features
593
+ --mode <lite|standard|full> Override pipeline mode for all features
594
+ --critic Enable adversarial critic review for all features
595
+ --no-critic Disable critic review (overrides feature-list setting)
582
596
  --features <filter> Run only specified features (e.g. F-001,F-003 or F-001:F-010)
583
597
  --env "KEY=VAL ..." Set environment variables
584
598
 
@@ -587,9 +601,10 @@ Examples:
587
601
  ./launch-daemon.sh start my-features.json # Start with custom feature list
588
602
  ./launch-daemon.sh start --features F-001:F-005 # Run only features F-001 through F-005
589
603
  ./launch-daemon.sh start --features F-001,F-003,F-007 # Run specific features
590
- ./launch-daemon.sh start --mode self-evolve # Self-evolve mode (framework development)
604
+ ./launch-daemon.sh start --mode full # Full mode for complex features
605
+ ./launch-daemon.sh start --critic # Enable adversarial critic review
591
606
  ./launch-daemon.sh start --env "MAX_RETRIES=5 SESSION_TIMEOUT=7200"
592
- ./launch-daemon.sh start feature-list.json --mode self-evolve --env "VERBOSE=1"
607
+ ./launch-daemon.sh start feature-list.json --mode full --critic --env "VERBOSE=1"
593
608
  ./launch-daemon.sh status # Check if running (JSON on stdout)
594
609
  ./launch-daemon.sh logs --follow # Live log tailing
595
610
  ./launch-daemon.sh logs --lines 100 # Last 100 lines
@@ -183,15 +183,25 @@ mkdir -p "$SESSION_DIR/logs"
183
183
  BOOTSTRAP_PROMPT="$SESSION_DIR/bootstrap-prompt.md"
184
184
 
185
185
  log_info "Generating bootstrap prompt..."
186
- GEN_OUTPUT=$(python3 "$SCRIPTS_DIR/generate-bootstrap-prompt.py" \
187
- --feature-list "$FEATURE_LIST" \
188
- --feature-id "$FEATURE_ID" \
189
- --session-id "$SESSION_ID" \
190
- --run-id "$RUN_ID" \
191
- --retry-count 0 \
192
- --resume-phase "null" \
193
- --state-dir "$STATE_DIR" \
194
- --output "$BOOTSTRAP_PROMPT" 2>/dev/null) || {
186
+ GEN_ARGS=(
187
+ --feature-list "$FEATURE_LIST"
188
+ --feature-id "$FEATURE_ID"
189
+ --session-id "$SESSION_ID"
190
+ --run-id "$RUN_ID"
191
+ --retry-count 0
192
+ --resume-phase "null"
193
+ --state-dir "$STATE_DIR"
194
+ --output "$BOOTSTRAP_PROMPT"
195
+ )
196
+
197
+ # Support ENABLE_CRITIC env var
198
+ if [[ "${ENABLE_CRITIC:-}" == "true" || "${ENABLE_CRITIC:-}" == "1" ]]; then
199
+ GEN_ARGS+=(--critic "true")
200
+ elif [[ "${ENABLE_CRITIC:-}" == "false" || "${ENABLE_CRITIC:-}" == "0" ]]; then
201
+ GEN_ARGS+=(--critic "false")
202
+ fi
203
+
204
+ GEN_OUTPUT=$(python3 "$SCRIPTS_DIR/generate-bootstrap-prompt.py" "${GEN_ARGS[@]}" 2>/dev/null) || {
195
205
  log_error "Failed to generate bootstrap prompt"
196
206
  exit 1
197
207
  }
@@ -27,7 +27,7 @@ set -euo pipefail
27
27
  # LOG_CLEANUP_ENABLED Run periodic log cleanup (default: 1)
28
28
  # LOG_RETENTION_DAYS Delete logs older than N days (default: 14)
29
29
  # LOG_MAX_TOTAL_MB Keep total logs under N MB via oldest-first cleanup (default: 1024)
30
- # PIPELINE_MODE Override mode for all features: lite|standard|full|self-evolve (used by daemon)
30
+ # PIPELINE_MODE Override mode for all features: lite|standard|full (used by daemon)
31
31
  # DEV_BRANCH Custom dev branch name (default: auto-generated dev/{feature_id}-YYYYMMDDHHmm)
32
32
  # AUTO_PUSH Auto-push to remote after successful feature (default: 0). Set to 1 to enable.
33
33
  # ============================================================
@@ -393,6 +393,7 @@ run_one() {
393
393
  local dry_run=false
394
394
  local resume_phase=""
395
395
  local mode_override=""
396
+ local critic_override=""
396
397
  local do_clean=false
397
398
  local no_reset=false
398
399
 
@@ -419,11 +420,11 @@ run_one() {
419
420
  exit 1
420
421
  fi
421
422
  case "$1" in
422
- lite|standard|full|self-evolve)
423
+ lite|standard|full)
423
424
  mode_override="$1"
424
425
  ;;
425
426
  *)
426
- log_error "Invalid mode: $1 (must be lite, standard, full, or self-evolve)"
427
+ log_error "Invalid mode: $1 (must be lite, standard, or full)"
427
428
  exit 1
428
429
  ;;
429
430
  esac
@@ -437,6 +438,14 @@ run_one() {
437
438
  no_reset=true
438
439
  shift
439
440
  ;;
441
+ --critic)
442
+ critic_override="true"
443
+ shift
444
+ ;;
445
+ --no-critic)
446
+ critic_override="false"
447
+ shift
448
+ ;;
440
449
  --timeout)
441
450
  shift
442
451
  if [[ $# -eq 0 ]]; then
@@ -513,14 +522,6 @@ run_one() {
513
522
  log_success "Pipeline initialized with $features_count features"
514
523
  fi
515
524
 
516
- # Auto-detect framework repo: if scripts/bundle.js exists, enable self-evolve mode
517
- local project_root
518
- project_root=$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel 2>/dev/null || echo "")
519
- if [[ -z "$mode_override" && -n "$project_root" && -f "$project_root/scripts/bundle.js" ]]; then
520
- log_info "Detected PrizmKit framework repo — auto-enabling self-evolve mode"
521
- mode_override="self-evolve"
522
- fi
523
-
524
525
  # Verify feature exists
525
526
  local feature_title
526
527
  feature_title=$(python3 -c "
@@ -629,6 +630,14 @@ sys.exit(1)
629
630
  prompt_args+=(--mode "$mode_override")
630
631
  fi
631
632
 
633
+ if [[ -n "${critic_override:-}" ]]; then
634
+ prompt_args+=(--critic "$critic_override")
635
+ elif [[ "${ENABLE_CRITIC:-}" == "true" || "${ENABLE_CRITIC:-}" == "1" ]]; then
636
+ prompt_args+=(--critic "true")
637
+ elif [[ "${ENABLE_CRITIC:-}" == "false" || "${ENABLE_CRITIC:-}" == "0" ]]; then
638
+ prompt_args+=(--critic "false")
639
+ fi
640
+
632
641
  log_info "Generating bootstrap prompt..."
633
642
  local gen_output
634
643
  gen_output=$(python3 "$SCRIPTS_DIR/generate-bootstrap-prompt.py" "${prompt_args[@]}" 2>/dev/null) || {
@@ -752,37 +761,6 @@ sys.exit(1)
752
761
 
753
762
  echo ""
754
763
  if [[ "$session_status" == "success" ]]; then
755
- # Self-evolve mode: run framework validation after successful session
756
- if [[ "$mode_override" == "self-evolve" ]]; then
757
- log_info "Self-evolve mode: running framework validation..."
758
- if bash "$SCRIPTS_DIR/validate-framework.sh" 2>&1; then
759
- log_success "Framework validation passed"
760
- else
761
- log_warn "Framework validation failed — review issues above"
762
- session_status="framework_validation_failed"
763
- fi
764
-
765
- # Check for reload_needed marker in session status
766
- local session_status_file="$session_dir/session-status.json"
767
- if [[ -f "$session_status_file" ]]; then
768
- local reload_needed
769
- reload_needed=$(python3 -c "
770
- import json, sys
771
- with open(sys.argv[1]) as f:
772
- data = json.load(f)
773
- print(data.get('reload_needed', False))
774
- " "$session_status_file" 2>/dev/null || echo "False")
775
- if [[ "$reload_needed" == "True" ]]; then
776
- echo ""
777
- log_warn "╔══════════════════════════════════════════════════════════════╗"
778
- log_warn "║ RELOAD NEEDED: This session modified pipeline skills or ║"
779
- log_warn "║ templates that are used by the dev-pipeline itself. ║"
780
- log_warn "║ Changes will take effect in the NEXT session. ║"
781
- log_warn "╚══════════════════════════════════════════════════════════════╝"
782
- fi
783
- fi
784
- fi
785
-
786
764
  log_success "════════════════════════════════════════════════════"
787
765
  log_success " $feature_id completed successfully!"
788
766
  log_success "════════════════════════════════════════════════════"
@@ -991,16 +969,11 @@ for f in data.get('stuck_features', []):
991
969
  main_prompt_args+=(--mode "$PIPELINE_MODE")
992
970
  fi
993
971
 
994
- # Auto-detect framework repo: if scripts/bundle.js exists, enable self-evolve mode
995
- if [[ -z "${PIPELINE_MODE:-}" ]]; then
996
- local _project_root
997
- _project_root=$(git -C "$SCRIPT_DIR" rev-parse --show-toplevel 2>/dev/null || echo "")
998
- if [[ -n "$_project_root" && -f "$_project_root/scripts/bundle.js" ]]; then
999
- if [[ $session_count -eq 0 ]]; then
1000
- log_info "Detected PrizmKit framework repo — auto-enabling self-evolve mode"
1001
- fi
1002
- main_prompt_args+=(--mode "self-evolve")
1003
- fi
972
+ # Support ENABLE_CRITIC env var (set by launch-daemon.sh --critic)
973
+ if [[ "${ENABLE_CRITIC:-}" == "true" || "${ENABLE_CRITIC:-}" == "1" ]]; then
974
+ main_prompt_args+=(--critic "true")
975
+ elif [[ "${ENABLE_CRITIC:-}" == "false" || "${ENABLE_CRITIC:-}" == "0" ]]; then
976
+ main_prompt_args+=(--critic "false")
1004
977
  fi
1005
978
 
1006
979
  local gen_output
@@ -1102,7 +1075,9 @@ show_help() {
1102
1075
  echo "Single Feature Options (run <feature-id>):"
1103
1076
  echo " --dry-run Generate bootstrap prompt only, don't spawn session"
1104
1077
  echo " --resume-phase N Override resume phase (default: auto-detect)"
1105
- echo " --mode <lite|standard|full|self-evolve> Override pipeline mode (bypasses estimated_complexity)"
1078
+ echo " --mode <lite|standard|full> Override pipeline mode (bypasses estimated_complexity)"
1079
+ echo " --critic Enable adversarial critic review for this feature"
1080
+ echo " --no-critic Disable critic review (overrides feature-list setting)"
1106
1081
  echo " --clean Delete artifacts and reset before running"
1107
1082
  echo " --no-reset Skip feature status reset step"
1108
1083
  echo " --timeout N Session timeout in seconds (default: 0 = no limit)"
@@ -1117,7 +1092,8 @@ show_help() {
1117
1092
  echo " LOG_CLEANUP_ENABLED Run log cleanup before execution (default: 1)"
1118
1093
  echo " LOG_RETENTION_DAYS Delete logs older than N days (default: 14)"
1119
1094
  echo " LOG_MAX_TOTAL_MB Keep total logs under N MB (default: 1024)"
1120
- echo " PIPELINE_MODE Override mode for all features: lite|standard|full|self-evolve"
1095
+ echo " PIPELINE_MODE Override mode for all features: lite|standard|full"
1096
+ echo " ENABLE_CRITIC Enable critic review for all features: true|false"
1121
1097
  echo ""
1122
1098
  echo "Examples:"
1123
1099
  echo " ./run.sh run # Run all features"