prizmkit 1.1.114 → 1.1.115
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/heartbeat.py +0 -1
- 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 +128 -10
- 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
|
@@ -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')."
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
### Plan Challenge — Critic Agent
|
|
2
|
-
|
|
3
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
{{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
If `CRITIC:MISSING`, mark `critic-plan-review` as `skipped` and continue.
|
|
10
|
-
|
|
11
|
-
**Focus**: Challenge the bug diagnosis and fix plan before implementation:
|
|
12
|
-
- Is the root cause actually supported by the evidence?
|
|
13
|
-
- Does the reproduction test prove the bug before the fix?
|
|
14
|
-
- Is the fix minimal, or does it mask the symptom?
|
|
15
|
-
- Are adjacent regressions likely?
|
|
16
|
-
- Does manual/hybrid verification policy match `{{VERIFICATION_TYPE}}`?
|
|
17
|
-
|
|
18
|
-
Spawn `prizm-dev-team-critic` with default/no worktree isolation. Do not request AI tool-created worktree isolation.
|
|
19
|
-
|
|
20
|
-
The Critic writes `.prizmkit/bugfix/{{BUG_ID}}/challenge-report.md`. Resolve CRITICAL/HIGH findings before implementation, or document why the plan stands.
|
|
21
|
-
|
|
22
|
-
**Checkpoint update**: Set step `critic-plan-review` to `completed` after challenges are resolved, or `skipped` when critic is unavailable.
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
### Plan Challenge — Critic Agent(s)
|
|
2
|
-
|
|
3
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
-
```bash
|
|
5
|
-
{{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
|
|
6
|
-
```
|
|
7
|
-
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan Challenge."
|
|
8
|
-
|
|
9
|
-
**Choose ONE path based on `{{CRITIC_COUNT}}`:**
|
|
10
|
-
|
|
11
|
-
**Agent spawn failure policy**:
|
|
12
|
-
- If spawning Critic fails with team/config/lock errors, retry at most once.
|
|
13
|
-
- If the second attempt fails, do not keep spawning variants. Either create the required team once (when team tooling is available) or perform the plan challenge inline and write the required challenge report yourself.
|
|
14
|
-
- Record the fallback in the report; do not burn multiple minutes on repeated identical spawn failures.
|
|
15
|
-
|
|
16
|
-
**No silent report polling**:
|
|
17
|
-
- Do NOT run a long no-output loop waiting for `challenge-report*.md`.
|
|
18
|
-
- If you need to wait for a report file, use a short bounded check (≤120s) that prints elapsed time and reports present on every iteration.
|
|
19
|
-
- If reports are still missing after the bounded check, request one status update; if still missing, perform the missing challenge lens inline and continue.
|
|
20
|
-
|
|
21
|
-
**If {{CRITIC_COUNT}} = 1 → Single Critic** (skip to CP-2.5 after this):
|
|
22
|
-
|
|
23
|
-
**Spawn Agent**:
|
|
24
|
-
| Parameter | Value |
|
|
25
|
-
|-----------|-------|
|
|
26
|
-
| subagent_type | prizm-dev-team-critic |
|
|
27
|
-
| mode | plan |
|
|
28
|
-
| run_in_background | false |
|
|
29
|
-
| isolation | default/no worktree; do not request worktree isolation |
|
|
30
|
-
|
|
31
|
-
No-worktree boundary: this prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
|
|
32
|
-
|
|
33
|
-
**Prompt**:
|
|
34
|
-
> {{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}
|
|
35
|
-
|
|
36
|
-
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
37
|
-
|
|
38
|
-
Spawn 3 Critic agents in PARALLEL (issue all 3 Agent tool calls in the SAME message turn). Do NOT wait for one before spawning the next. Each with mode="plan", run_in_background=false, and default/no worktree isolation; do not request worktree isolation.
|
|
39
|
-
|
|
40
|
-
No-worktree boundary: default/no worktree isolation prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
|
|
41
|
-
|
|
42
|
-
Critic-A prompt (append to base prompt above):
|
|
43
|
-
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
44
|
-
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-A.md`."
|
|
45
|
-
|
|
46
|
-
Critic-B prompt (append to base prompt above):
|
|
47
|
-
> "**Focus Lens: Data Model & Edge Cases.** Prioritize: data model design fit, entity relationships, edge cases in business logic, missing boundary conditions.
|
|
48
|
-
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-B.md`."
|
|
49
|
-
|
|
50
|
-
Critic-C prompt (append to base prompt above):
|
|
51
|
-
> "**Focus Lens: Security & Performance.** Prioritize: security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks.
|
|
52
|
-
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-C.md`."
|
|
53
|
-
|
|
54
|
-
After all critics return, read all 3 reports:
|
|
55
|
-
- Challenge raised by **2/3 or more** critics → **must respond** (adjust plan or justify why not)
|
|
56
|
-
- Challenge raised by **1/3 only** → logged in context-snapshot but not blocking
|
|
57
|
-
- Max 1 plan revision round.
|
|
58
|
-
|
|
59
|
-
**CP-2.5**: Plan challenges reviewed and resolved.
|
|
60
|
-
|
|
61
|
-
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
### Plan Challenge — Critic Agent
|
|
2
|
-
|
|
3
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
-
```bash
|
|
5
|
-
{{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
|
|
6
|
-
```
|
|
7
|
-
If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent not installed — skipping Plan 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
|
-
| isolation | default/no worktree; do not request worktree isolation |
|
|
16
|
-
|
|
17
|
-
No-worktree boundary: this prevents AI tool-created `.claude/worktrees/...` subagent worktrees. It does not disable PrizmKit pipeline-managed linked git worktrees under `.prizmkit/state/worktrees/...`, which are controlled separately by `USE_WORKTREE`.
|
|
18
|
-
|
|
19
|
-
**Prompt**:
|
|
20
|
-
> {{AGENT_PROMPT_CRITIC_PLAN_CHALLENGE}}
|
|
21
|
-
|
|
22
|
-
**Agent spawn failure policy**:
|
|
23
|
-
- If spawning Critic fails with team/config/lock errors, retry at most once.
|
|
24
|
-
- If the second attempt fails, do not keep spawning variants. Either create the required team once (when team tooling is available) or perform the plan challenge inline and write `challenge-report.md` yourself.
|
|
25
|
-
- Record the fallback in the report; do not burn multiple minutes on repeated identical spawn failures.
|
|
26
|
-
|
|
27
|
-
**No silent report polling**:
|
|
28
|
-
- Do NOT run a long no-output loop waiting for `challenge-report.md`.
|
|
29
|
-
- If you need to wait for the report file, use a short bounded check (≤120s) that prints elapsed time and whether the report exists on every iteration.
|
|
30
|
-
- If the report is still missing after the bounded check, request one status update; if still missing, perform the challenge inline and continue.
|
|
31
|
-
|
|
32
|
-
Wait for Critic to return.
|
|
33
|
-
- Read challenge-report.md. For items marked CRITICAL/HIGH: decide whether to adjust plan.md or document why the plan stands.
|
|
34
|
-
- Max 1 plan revision round.
|
|
35
|
-
|
|
36
|
-
**CP-2.5**: Plan challenges reviewed and resolved.
|
|
37
|
-
|
|
38
|
-
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
### Plan Challenge — Critic Agent
|
|
2
|
-
|
|
3
|
-
**Guard**: Verify critic agent file exists before spawning:
|
|
4
|
-
|
|
5
|
-
```bash
|
|
6
|
-
{{RUNTIME_HELPER_CMD}} artifact exists {{CRITIC_SUBAGENT_PATH}} --exists-marker CRITIC:READY --missing-marker CRITIC:MISSING
|
|
7
|
-
```
|
|
8
|
-
|
|
9
|
-
If `CRITIC:MISSING`, mark `critic-plan-review` as `skipped` and continue.
|
|
10
|
-
|
|
11
|
-
**Focus**: Challenge behavior preservation and plan safety before implementation:
|
|
12
|
-
- Is observable behavior clearly defined and protected?
|
|
13
|
-
- Do existing/new tests cover the behavior affected by this refactor?
|
|
14
|
-
- Is the plan too broad for the stated scope?
|
|
15
|
-
- Are file moves/renames safe for imports, public APIs, and integrations?
|
|
16
|
-
- Is rollback realistic?
|
|
17
|
-
|
|
18
|
-
Spawn `prizm-dev-team-critic` with default/no worktree isolation. Do not request AI tool-created worktree isolation.
|
|
19
|
-
|
|
20
|
-
The Critic writes `.prizmkit/refactor/{{REFACTOR_ID}}/challenge-report.md`. Resolve CRITICAL/HIGH findings before implementation, or document why the plan stands.
|
|
21
|
-
|
|
22
|
-
**Checkpoint update**: Set step `critic-plan-review` to `completed` after challenges are resolved, or `skipped` when critic is unavailable.
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
# Adversarial Critic Review & Browser Verification
|
|
2
|
-
|
|
3
|
-
## Adversarial Critic Review (Testing Defaults)
|
|
4
|
-
|
|
5
|
-
All bug fixes support optional critic review for additional quality assurance. The planner enables critic review by default for critical/high severity bugs and leaves it disabled for medium/low bugs; users can override per bug.
|
|
6
|
-
|
|
7
|
-
### Default Critic Behavior
|
|
8
|
-
|
|
9
|
-
| Severity | `critic` | `critic_count` | Rationale |
|
|
10
|
-
|----------|----------|----------------|-----------|
|
|
11
|
-
| critical | `true` | `1` | Single critic review for critical bugs |
|
|
12
|
-
| high | `true` | `1` | Single critic review for high-severity bugs |
|
|
13
|
-
| medium | `false` | (omitted) | Skip critic for medium-severity bugs |
|
|
14
|
-
| low | `false` | (omitted) | Skip critic for low-severity bugs |
|
|
15
|
-
|
|
16
|
-
- `critic: true` — Enable adversarial review after fix implementation
|
|
17
|
-
- `critic_count: 1` — Single critic agent reviews the fix
|
|
18
|
-
- Critic verifies: fix addresses root cause, no regressions introduced, acceptance criteria met
|
|
19
|
-
|
|
20
|
-
**User Override**: During Phase 2 or Phase 3, users can opt to enable/disable critic on a per-bug basis.
|
|
21
|
-
|
|
22
|
-
## Browser Verification
|
|
23
|
-
|
|
24
|
-
Bug fixes can use `browser_interaction` when the bug is reproducible through a UI. The `verification_type` field still declares the overall verification mode:
|
|
25
|
-
|
|
26
|
-
- `verification_type: automated` — Use unit/integration tests to verify the fix
|
|
27
|
-
- `verification_type: manual` — Describe manual testing steps in acceptance criteria (including any browser verification steps)
|
|
28
|
-
- `verification_type: hybrid` — Combine automated tests with manual browser verification steps
|
|
29
|
-
|
|
30
|
-
For UI-related bugs, add `browser_interaction.verify_steps` when concrete browser goals are known. Also keep acceptance criteria measurable so the bugfix session can verify the fix without asking the user.
|
|
31
|
-
|
|
32
|
-
### Example
|
|
33
|
-
|
|
34
|
-
```
|
|
35
|
-
Bug Title: Login error message not displaying
|
|
36
|
-
Verification Type: manual
|
|
37
|
-
Acceptance Criteria:
|
|
38
|
-
1. Navigate to /login with invalid credentials
|
|
39
|
-
2. Verify error message "Invalid email or password" appears below the email field
|
|
40
|
-
3. Verify error message is red (#FF0000)
|
|
41
|
-
4. Verify form fields are still enabled and can be re-submitted
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
The bugfix pipeline AI will use these criteria during manual verification.
|