prizmkit 1.1.94 → 1.1.95
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 +57 -29
- package/bundled/agents/prizm-dev-team-dev.md +2 -14
- package/bundled/agents/prizm-dev-team-reviewer.md +40 -24
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +3 -2
- package/bundled/dev-pipeline/run-bugfix.sh +0 -10
- package/bundled/dev-pipeline/run-feature.sh +0 -10
- package/bundled/dev-pipeline/run-refactor.sh +0 -10
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +53 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -6
- package/bundled/dev-pipeline/templates/sections/phase-critic-plan-full.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -3
- package/bundled/dev-pipeline-windows/assets/prizm-dev-team-integration.md +3 -2
- package/bundled/dev-pipeline-windows/lib/pipeline.ps1 +0 -9
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier2.md +5 -6
- package/bundled/dev-pipeline-windows/templates/bootstrap-tier3.md +9 -6
- package/bundled/dev-pipeline-windows/templates/sections/phase-critic-plan-full.md +1 -1
- package/bundled/dev-pipeline-windows/templates/sections/phase-review-full.md +1 -3
- package/bundled/rules/_rules-metadata.json +9 -3
- package/bundled/rules/general/agent-operational-rules.md +68 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/feature-planner/SKILL.md +2 -2
- package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +1 -1
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +17 -26
- package/bundled/skills-windows/feature-planner/SKILL.md +2 -2
- package/bundled/skills-windows/feature-planner/references/error-recovery.md +1 -1
- package/bundled/skills-windows/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills-windows/feature-planner/references/new-project-planning.md +1 -1
- package/bundled/skills-windows/feature-planner/scripts/validate-and-generate.py +17 -26
- package/bundled/team/prizm-dev-team.json +6 -6
- package/package.json +1 -1
|
@@ -220,7 +220,7 @@ Wait for Reviewer to return.
|
|
|
220
220
|
**CP-2**: No CRITICAL issues.
|
|
221
221
|
|
|
222
222
|
{{IF_CRITIC_ENABLED}}
|
|
223
|
-
### Phase 3.5: Plan Challenge — Critic Agent
|
|
223
|
+
### Phase 3.5: Plan Challenge — Critic Agent(s)
|
|
224
224
|
|
|
225
225
|
**Guard**: Verify critic agent file exists before spawning:
|
|
226
226
|
```powershell
|
|
@@ -290,7 +290,7 @@ Gate requirements:
|
|
|
290
290
|
- Only after a valid `PASS`, write the report path to `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt` and append a 3-5 bullet `## PrizmKit Test Gate` summary to `context-snapshot.md`.
|
|
291
291
|
- If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is `BLOCKED`, missing, stale, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
|
|
292
292
|
|
|
293
|
-
### Phase 5: Review
|
|
293
|
+
### Phase 5: Review — Reviewer Subagent
|
|
294
294
|
|
|
295
295
|
Spawn Reviewer subagent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
296
296
|
|
|
@@ -302,8 +302,7 @@ Prompt:
|
|
|
302
302
|
> 2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
303
303
|
> 3. Read `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt`, then read the referenced `/prizmkit-test` report. Review generated/updated tests, `In-Scope Failures`, `Baseline Failures`, `Out of Scope Gaps`, boundary coverage if present, and the report verdict.
|
|
304
304
|
> 4. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md.
|
|
305
|
-
> 5.
|
|
306
|
-
> 6. review-report.md will be written to .prizmkit/specs/{{FEATURE_SLUG}}/ by prizmkit-code-review.
|
|
305
|
+
> 5. Do NOT run test suites — the Orchestrator already ran prizmkit-test. Focus on code review and fix strategy.
|
|
307
306
|
> Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected."
|
|
308
307
|
|
|
309
308
|
Wait for Reviewer to return.
|
|
@@ -323,7 +322,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
323
322
|
- `PASS` → proceed to next phase
|
|
324
323
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed
|
|
325
324
|
|
|
326
|
-
**CP-3**:
|
|
325
|
+
**CP-3**: Review complete.
|
|
327
326
|
|
|
328
327
|
{{IF_BROWSER_INTERACTION}}
|
|
329
328
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -696,7 +695,7 @@ Remove-Item -Force -ErrorAction SilentlyContinue .prizmkit/specs/{{FEATURE_SLUG}
|
|
|
696
695
|
|
|
697
696
|
## Reminders
|
|
698
697
|
|
|
699
|
-
- Tier 2: orchestrator builds context+plan, Analyzer checks consistency, Dev implements, Reviewer reviews
|
|
698
|
+
- Tier 2: orchestrator builds context+plan, Analyzer checks consistency, Dev implements, Reviewer reviews — use direct Agent spawn for agents
|
|
700
699
|
- Build context-snapshot.md FIRST; all subagents read it instead of re-reading source files
|
|
701
700
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
702
701
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
@@ -266,7 +266,9 @@ Prompt:
|
|
|
266
266
|
|
|
267
267
|
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
268
268
|
|
|
269
|
-
Spawn 3
|
|
269
|
+
**IMPORTANT**: Spawn all 3 Critics in PARALLEL (issue all 3 Agent tool calls in the SAME message turn). Do NOT wait for one before spawning the next.
|
|
270
|
+
|
|
271
|
+
Spawn Critic-A, Critic-B, Critic-C simultaneously (each with mode="plan", run_in_background=false):
|
|
270
272
|
|
|
271
273
|
Critic-A prompt (append to base prompt above):
|
|
272
274
|
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
@@ -280,6 +282,8 @@ Critic-C prompt (append to base prompt above):
|
|
|
280
282
|
> "**Focus Lens: Security & Performance.** Prioritize: security attack surface, authentication/authorization gaps, performance bottlenecks, resource leaks.
|
|
281
283
|
> Write `.prizmkit/specs/{{FEATURE_SLUG}}/challenge-report-C.md`."
|
|
282
284
|
|
|
285
|
+
Spawn failure cap: for team/config/lock errors, each Critic retries at most once. If 2 or more Critics fail to spawn after retry, perform the plan challenge inline and record the fallback.
|
|
286
|
+
|
|
283
287
|
After all critics return, read all 3 reports:
|
|
284
288
|
- Challenge raised by **2/3 or more** critics → **must respond** (adjust plan or justify why not)
|
|
285
289
|
- Challenge raised by **1/3 only** → logged in context-snapshot but not blocking
|
|
@@ -351,7 +355,7 @@ Gate requirements:
|
|
|
351
355
|
- Only after a valid `PASS`, write the report path to `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt` and append a 3-5 bullet `## PrizmKit Test Gate` summary to `context-snapshot.md`.
|
|
352
356
|
- If the report verdict is `NEEDS_FIXES`, fix in-scope implementation/test issues and rerun `/prizmkit-test`. If the report is `BLOCKED`, missing, stale, or for the wrong scope/artifact dir, write `failure-log.md` and stop for recovery.
|
|
353
357
|
|
|
354
|
-
### Phase 5: Review
|
|
358
|
+
### Phase 5: Review — Reviewer Agent
|
|
355
359
|
|
|
356
360
|
Spawn Reviewer agent (Agent tool, subagent_type="prizm-dev-team-reviewer", run_in_background=false).
|
|
357
361
|
|
|
@@ -363,8 +367,7 @@ Prompt:
|
|
|
363
367
|
> 2. Read `.prizmkit/specs/{{FEATURE_SLUG}}/plan.md` for architecture decisions and completed tasks
|
|
364
368
|
> 3. Read `.prizmkit/specs/{{FEATURE_SLUG}}/test-report-path.txt`, then read the referenced `/prizmkit-test` report. Review generated/updated tests, `In-Scope Failures`, `Baseline Failures`, `Out of Scope Gaps`, boundary coverage if present, and the report verdict.
|
|
365
369
|
> 4. Run /prizmkit-code-review with artifact_dir=.prizmkit/specs/{{FEATURE_SLUG}}/. The skill runs an internal review-fix loop (Reviewer → filter → Dev fix, max 3 rounds) and writes review-report.md.
|
|
366
|
-
> 5.
|
|
367
|
-
> 6. review-report.md will be written to .prizmkit/specs/{{FEATURE_SLUG}}/ by prizmkit-code-review.
|
|
370
|
+
> 5. Do NOT run test suites — the Orchestrator already ran prizmkit-test. Focus on code review and fix strategy.
|
|
368
371
|
> Report: verdict (PASS/NEEDS_FIXES), number of rounds, findings fixed/rejected."
|
|
369
372
|
|
|
370
373
|
Wait for Reviewer to return.
|
|
@@ -384,7 +387,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
384
387
|
- `PASS` → proceed to next phase
|
|
385
388
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed
|
|
386
389
|
|
|
387
|
-
**CP-3**:
|
|
390
|
+
**CP-3**: Review complete.
|
|
388
391
|
|
|
389
392
|
{{IF_BROWSER_INTERACTION}}
|
|
390
393
|
### Phase 5.5: Browser Verification — MANDATORY
|
|
@@ -774,7 +777,7 @@ Remove-Item -Force -ErrorAction SilentlyContinue .prizmkit/specs/{{FEATURE_SLUG}
|
|
|
774
777
|
|
|
775
778
|
## Reminders
|
|
776
779
|
|
|
777
|
-
- Tier 3: full team — Dev (implementation) → Reviewer (review
|
|
780
|
+
- Tier 3: full team — Dev (implementation) → Reviewer (review) — spawn agents directly via Agent tool
|
|
778
781
|
- context-snapshot.md is append-only: orchestrator writes Sections 1-4, Dev appends Implementation Log, Reviewer appends Review Notes
|
|
779
782
|
- Gate checks enforce Implementation Log and Review Notes are written before proceeding
|
|
780
783
|
- Do NOT use `run_in_background=true` when spawning agents
|
|
@@ -32,7 +32,7 @@ If CRITIC:MISSING — skip this phase entirely and proceed. Log: "Critic agent n
|
|
|
32
32
|
|
|
33
33
|
**If {{CRITIC_COUNT}} = 3 → Multi-Critic Voting** (skip Single Critic above):
|
|
34
34
|
|
|
35
|
-
Spawn 3 Critic agents
|
|
35
|
+
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:
|
|
36
36
|
|
|
37
37
|
Critic-A prompt (append to base prompt above):
|
|
38
38
|
> "**Focus Lens: Architecture & Scalability.** Prioritize: architectural pattern fit, scalability implications, over-engineering risks, component boundary design.
|
|
@@ -23,9 +23,7 @@ Read `review-report.md` and check the Verdict:
|
|
|
23
23
|
- `PASS` → proceed to next phase
|
|
24
24
|
- `NEEDS_FIXES` → the skill exhausted its max rounds; log the remaining findings and proceed (do not retry externally)
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
**CP-3**: Review complete, report written, and the Test Failure Recovery Protocol's Success Rule is satisfied.
|
|
26
|
+
**CP-3**: Review complete, report written.
|
|
29
27
|
|
|
30
28
|
|
|
31
29
|
**Checkpoint update**: Run the update script to set step `prizmkit-code-review` to `"completed"`:
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"general/cohesive-modeling": {
|
|
21
21
|
"description": "Group co-occurring variables/fields/concepts into a cohesive unit (struct/class/interface)",
|
|
22
22
|
"tags": ["general", "design"]
|
|
23
|
+
},
|
|
24
|
+
"general/agent-operational-rules": {
|
|
25
|
+
"description": "Framework-level operational rules for all agents — Edit failure recovery, Read offset safety, test output hygiene, incremental validation",
|
|
26
|
+
"tags": ["general", "agent", "operational"]
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
"presets": {
|
|
@@ -30,14 +34,16 @@
|
|
|
30
34
|
"prizm/prizm-commit-workflow",
|
|
31
35
|
"prizm/prizm-progressive-loading",
|
|
32
36
|
"general/prefer-linux-commands",
|
|
33
|
-
"general/cohesive-modeling"
|
|
37
|
+
"general/cohesive-modeling",
|
|
38
|
+
"general/agent-operational-rules"
|
|
34
39
|
]
|
|
35
40
|
},
|
|
36
41
|
"minimal": {
|
|
37
|
-
"description": "Minimal: progressive loading + general rules
|
|
42
|
+
"description": "Minimal: progressive loading + general rules + operational rules",
|
|
38
43
|
"rules": [
|
|
39
44
|
"prizm/prizm-progressive-loading",
|
|
40
|
-
"general/prefer-linux-commands"
|
|
45
|
+
"general/prefer-linux-commands",
|
|
46
|
+
"general/agent-operational-rules"
|
|
41
47
|
]
|
|
42
48
|
},
|
|
43
49
|
"none": {
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: agent-operational-rules
|
|
3
|
+
description: Framework-level operational rules for AI agents — handling Edit failures, Read offsets, test output hygiene, and escalation. These apply to all agents regardless of role.
|
|
4
|
+
tags: [general, agent, operational]
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Agent Operational Rules
|
|
8
|
+
|
|
9
|
+
These rules apply to ALL agents in the PrizmKit ecosystem. They cover common operational patterns that prevent wasted context and infinite loops.
|
|
10
|
+
|
|
11
|
+
## Edit Failure Recovery
|
|
12
|
+
|
|
13
|
+
When an Edit call fails with 'String to replace not found':
|
|
14
|
+
1. STOP editing immediately — do NOT retry the same Edit.
|
|
15
|
+
2. Run `grep -n` to locate the exact line of the target text.
|
|
16
|
+
3. Read with offset = max(grep_line - 20, 0), limit = 50.
|
|
17
|
+
4. Copy the exact text from the Read result into the Edit old_string.
|
|
18
|
+
5. Never guess or extrapolate an offset — grep first, then read, then edit.
|
|
19
|
+
|
|
20
|
+
## Read Offset Safety
|
|
21
|
+
|
|
22
|
+
Before any Read with offset + limit:
|
|
23
|
+
- Compute offset + limit. If the last tool_result for this file shows it has N lines, offset MUST be < N.
|
|
24
|
+
- Never request an offset >= known file length.
|
|
25
|
+
|
|
26
|
+
## Stale Line Counts (Large Files)
|
|
27
|
+
|
|
28
|
+
Before editing a large file (>1000 lines), verify you know its current line count from the most recent tool_result. Old line counts from earlier turns may be stale if you have since edited the file.
|
|
29
|
+
|
|
30
|
+
## Consecutive Read Failures
|
|
31
|
+
|
|
32
|
+
If 3 consecutive Read calls to the same file return 'shorter than provided offset' or 'Wasted call':
|
|
33
|
+
- STOP all work on that file.
|
|
34
|
+
- Send ESCALATION with the file path, current line count, and the offsets you attempted.
|
|
35
|
+
- The orchestrator will provide the correct content.
|
|
36
|
+
|
|
37
|
+
## Test Output Hygiene
|
|
38
|
+
|
|
39
|
+
**Applies to: Dev Agent and any agent that runs tests.** Does NOT apply to Reviewer, Critic, or other agents that do not execute test commands.
|
|
40
|
+
|
|
41
|
+
When tests fail:
|
|
42
|
+
- Run the test command provided in your task assignment ONCE (e.g., `$TEST_CMD`, `npm test`, `pytest`, etc.).
|
|
43
|
+
- Capture output with `tee` (macOS/Linux) or `Tee-Object` (Windows/PowerShell) to a temp file.
|
|
44
|
+
- Then grep/Select-String that file for failure details.
|
|
45
|
+
- Never re-run the full test suite just to apply a different filter to its output.
|
|
46
|
+
|
|
47
|
+
**macOS/Linux**:
|
|
48
|
+
```bash
|
|
49
|
+
($TEST_CMD) 2>&1 | tee /tmp/test-out.txt | tail -20
|
|
50
|
+
grep -n "FAIL\|Error\|assert" /tmp/test-out.txt
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
**Windows/PowerShell**:
|
|
54
|
+
```powershell
|
|
55
|
+
& { {{TEST_CMD}} } 2>&1 | Tee-Object (Join-Path $env:TEMP "test-out.txt") | Select-Object -Last 20
|
|
56
|
+
Select-String -Path (Join-Path $env:TEMP "test-out.txt") -Pattern "FAIL|Error|assert"
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Note: `$TEST_CMD` / `{{TEST_CMD}}` is a placeholder set by the pipeline or orchestrator. Use whatever test command is provided in your task assignment. Do NOT hardcode a specific test tool — projects vary.
|
|
60
|
+
|
|
61
|
+
## Incremental Validation
|
|
62
|
+
|
|
63
|
+
**Applies to: Dev Agent.** Does NOT apply to Reviewer, Critic, or read-only agents.
|
|
64
|
+
|
|
65
|
+
After every 3 successful Edit operations on a file:
|
|
66
|
+
- Run the relevant test command for that file once.
|
|
67
|
+
- Validate your changes compile and behave correctly.
|
|
68
|
+
- Do not defer all testing to the end.
|
|
@@ -266,7 +266,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
266
266
|
4. Draft features (title + description + acceptance_criteria + dependencies)
|
|
267
267
|
5. Write draft to `.prizmkit/plans/feature-list.draft.json`, then call the generate script:
|
|
268
268
|
```bash
|
|
269
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
269
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
270
270
|
```
|
|
271
271
|
6. If valid → summarize and recommend next step
|
|
272
272
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
@@ -317,7 +317,7 @@ Key requirements:
|
|
|
317
317
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
318
318
|
2. Call the generate script to validate and produce the final file:
|
|
319
319
|
```bash
|
|
320
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
320
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
321
321
|
```
|
|
322
322
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes. If validation fails, fix the draft and retry.
|
|
323
323
|
|
|
@@ -4,7 +4,7 @@ Structured error handling for validation failures, interrupted sessions, and che
|
|
|
4
4
|
|
|
5
5
|
## Validation Failures
|
|
6
6
|
|
|
7
|
-
When `python3 scripts/validate-and-generate.py validate --input <file
|
|
7
|
+
When `python3 scripts/validate-and-generate.py validate --input <file>` returns errors:
|
|
8
8
|
|
|
9
9
|
### Parse validation output
|
|
10
10
|
Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
|
|
@@ -83,7 +83,7 @@ Keep dependency correctness as first constraint.
|
|
|
83
83
|
### Step 5: Validate
|
|
84
84
|
Run:
|
|
85
85
|
```bash
|
|
86
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
86
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Fix and re-run until pass.
|
|
@@ -55,7 +55,7 @@ Split into `sub_features` when:
|
|
|
55
55
|
1. Write `feature-list.json`.
|
|
56
56
|
2. Run:
|
|
57
57
|
```bash
|
|
58
|
-
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
58
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
59
59
|
```
|
|
60
60
|
3. Fix all errors, then re-run.
|
|
61
61
|
|
|
@@ -11,12 +11,16 @@ Commands:
|
|
|
11
11
|
grade Generate grading results from eval runs (for npm run skill:review)
|
|
12
12
|
|
|
13
13
|
Usage:
|
|
14
|
-
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
14
|
+
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
15
15
|
python3 validate-and-generate.py template --output .prizmkit/plans/feature-list.json
|
|
16
|
-
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
16
|
+
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
17
17
|
python3 validate-and-generate.py summary --input .prizmkit/plans/feature-list.json [--format markdown|json]
|
|
18
18
|
python3 validate-and-generate.py grade --workspace /.codebuddy/skill-evals/feature-planner-workspace --iteration iteration-1
|
|
19
19
|
|
|
20
|
+
Mode is determined automatically by --output path:
|
|
21
|
+
- Output file does NOT exist -> new plan (all features must be "pending")
|
|
22
|
+
- Output file already exists -> incremental append (existing features keep their status)
|
|
23
|
+
|
|
20
24
|
Python 3.6+ required. No external dependencies.
|
|
21
25
|
"""
|
|
22
26
|
|
|
@@ -38,8 +42,6 @@ VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "s
|
|
|
38
42
|
VALID_COMPLEXITIES = {"low", "medium", "high", "critical"}
|
|
39
43
|
VALID_PRIORITIES = {"critical", "high", "medium", "low"}
|
|
40
44
|
VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
|
|
41
|
-
VALID_PLANNING_MODES = {"new", "incremental"}
|
|
42
|
-
|
|
43
45
|
FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
|
|
44
46
|
SUB_FEATURE_ID_RE = re.compile(r"^F-\d{3}-[A-Z]$")
|
|
45
47
|
|
|
@@ -156,13 +158,11 @@ def _detect_cycles(features):
|
|
|
156
158
|
# ---------------------------------------------------------------------------
|
|
157
159
|
|
|
158
160
|
|
|
159
|
-
def validate_feature_list(data,
|
|
161
|
+
def validate_feature_list(data, is_new_plan=True):
|
|
160
162
|
"""Validate a parsed feature-list data structure.
|
|
161
163
|
|
|
162
164
|
Returns a dict with keys ``valid``, ``errors``, ``warnings``, ``stats``.
|
|
163
165
|
"""
|
|
164
|
-
if planning_mode not in VALID_PLANNING_MODES:
|
|
165
|
-
planning_mode = "new"
|
|
166
166
|
|
|
167
167
|
errors = []
|
|
168
168
|
warnings = []
|
|
@@ -299,7 +299,7 @@ def validate_feature_list(data, planning_mode="new"):
|
|
|
299
299
|
label, status, ", ".join(sorted(VALID_STATUSES))
|
|
300
300
|
)
|
|
301
301
|
)
|
|
302
|
-
if
|
|
302
|
+
if is_new_plan and status and status != "pending":
|
|
303
303
|
warnings.append(
|
|
304
304
|
"{}: status is '{}' (expected 'pending' for new plans)".format(label, status)
|
|
305
305
|
)
|
|
@@ -680,7 +680,9 @@ def cmd_validate(args):
|
|
|
680
680
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
681
681
|
return 2
|
|
682
682
|
|
|
683
|
-
|
|
683
|
+
# Validate input file exists -> incremental mode (existing features keep their status)
|
|
684
|
+
is_new_plan = False
|
|
685
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
684
686
|
|
|
685
687
|
# Print results to stdout
|
|
686
688
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -758,9 +760,11 @@ def cmd_generate(args):
|
|
|
758
760
|
for feature in data.get("features", []):
|
|
759
761
|
feature.setdefault("status", "pending")
|
|
760
762
|
|
|
761
|
-
# Validate
|
|
762
|
-
|
|
763
|
-
|
|
763
|
+
# Validate. Mode is determined by whether --output file already exists:
|
|
764
|
+
# - does NOT exist -> new plan (all features must be "pending")
|
|
765
|
+
# - already exists -> incremental append (existing features keep their status)
|
|
766
|
+
is_new_plan = not os.path.exists(args.output)
|
|
767
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
764
768
|
|
|
765
769
|
# Output validation result
|
|
766
770
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -856,7 +860,7 @@ def cmd_grade(args):
|
|
|
856
860
|
continue
|
|
857
861
|
|
|
858
862
|
# Run validation
|
|
859
|
-
result = validate_feature_list(data,
|
|
863
|
+
result = validate_feature_list(data, is_new_plan=True)
|
|
860
864
|
|
|
861
865
|
# Create grading entry
|
|
862
866
|
grade_entry = {
|
|
@@ -916,7 +920,6 @@ def main():
|
|
|
916
920
|
epilog=(
|
|
917
921
|
"Examples:\n"
|
|
918
922
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json\n"
|
|
919
|
-
" %(prog)s validate --input .prizmkit/plans/feature-list.json --mode incremental\n"
|
|
920
923
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json --output validated.json\n"
|
|
921
924
|
" %(prog)s template --output .prizmkit/plans/feature-list.json\n"
|
|
922
925
|
" %(prog)s generate --input draft.json --output .prizmkit/plans/feature-list.json\n"
|
|
@@ -938,12 +941,6 @@ def main():
|
|
|
938
941
|
p_validate.add_argument(
|
|
939
942
|
"--output", help="Path to write validated output (optional)"
|
|
940
943
|
)
|
|
941
|
-
p_validate.add_argument(
|
|
942
|
-
"--mode",
|
|
943
|
-
choices=["new", "incremental"],
|
|
944
|
-
default="new",
|
|
945
|
-
help="Validation mode (default: new)",
|
|
946
|
-
)
|
|
947
944
|
|
|
948
945
|
# -- template --
|
|
949
946
|
p_template = subparsers.add_parser(
|
|
@@ -965,12 +962,6 @@ def main():
|
|
|
965
962
|
p_generate.add_argument(
|
|
966
963
|
"--output", required=True, help="Path to write final feature-list.json"
|
|
967
964
|
)
|
|
968
|
-
p_generate.add_argument(
|
|
969
|
-
"--mode",
|
|
970
|
-
choices=["new", "incremental"],
|
|
971
|
-
default="new",
|
|
972
|
-
help="Validation mode (default: new)",
|
|
973
|
-
)
|
|
974
965
|
|
|
975
966
|
# -- summary --
|
|
976
967
|
p_summary = subparsers.add_parser(
|
|
@@ -285,7 +285,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
285
285
|
4. Draft features (title + description + acceptance_criteria + dependencies)
|
|
286
286
|
5. Write draft to `.prizmkit/plans/feature-list.draft.json`, then call the generate script:
|
|
287
287
|
```powershell
|
|
288
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
288
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
289
289
|
```
|
|
290
290
|
6. If valid → summarize and recommend next step
|
|
291
291
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
@@ -336,7 +336,7 @@ Key requirements:
|
|
|
336
336
|
1. Write a draft JSON to a temporary path (e.g., `.prizmkit/plans/feature-list.draft.json`)
|
|
337
337
|
2. Call the generate script to validate and produce the final file:
|
|
338
338
|
```powershell
|
|
339
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
339
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
340
340
|
```
|
|
341
341
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes. If validation fails, fix the draft and retry.
|
|
342
342
|
|
|
@@ -4,7 +4,7 @@ Structured error handling for validation failures, interrupted sessions, and che
|
|
|
4
4
|
|
|
5
5
|
## Validation Failures
|
|
6
6
|
|
|
7
|
-
When `Invoke-PrizmPython scripts/validate-and-generate.py validate --input <file
|
|
7
|
+
When `Invoke-PrizmPython scripts/validate-and-generate.py validate --input <file>` returns errors:
|
|
8
8
|
|
|
9
9
|
### Parse validation output
|
|
10
10
|
Script returns JSON with `"valid": false`, `"errors": [...]`, `"warnings": [...]`
|
|
@@ -83,7 +83,7 @@ Keep dependency correctness as first constraint.
|
|
|
83
83
|
### Step 5: Validate
|
|
84
84
|
Run after defining `Invoke-PrizmPython` from the main `SKILL.md`:
|
|
85
85
|
```powershell
|
|
86
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
86
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
87
87
|
```
|
|
88
88
|
|
|
89
89
|
Fix and re-run until pass.
|
|
@@ -55,7 +55,7 @@ Split into `sub_features` when:
|
|
|
55
55
|
1. Write `feature-list.json`.
|
|
56
56
|
2. Run the command below after defining `Invoke-PrizmPython` from the main `SKILL.md`:
|
|
57
57
|
```powershell
|
|
58
|
-
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
58
|
+
Invoke-PrizmPython ${SKILL_DIR}/scripts/validate-and-generate.py validate --input feature-list.json
|
|
59
59
|
```
|
|
60
60
|
3. Fix all errors, then re-run.
|
|
61
61
|
|
|
@@ -11,12 +11,16 @@ Commands:
|
|
|
11
11
|
grade Generate grading results from eval runs (for npm run skill:review)
|
|
12
12
|
|
|
13
13
|
Usage:
|
|
14
|
-
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
14
|
+
python3 validate-and-generate.py validate --input .prizmkit/plans/feature-list.json [--output validated.json]
|
|
15
15
|
python3 validate-and-generate.py template --output .prizmkit/plans/feature-list.json
|
|
16
|
-
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
16
|
+
python3 validate-and-generate.py generate --input draft.json --output .prizmkit/plans/feature-list.json
|
|
17
17
|
python3 validate-and-generate.py summary --input .prizmkit/plans/feature-list.json [--format markdown|json]
|
|
18
18
|
python3 validate-and-generate.py grade --workspace /.codebuddy/skill-evals/feature-planner-workspace --iteration iteration-1
|
|
19
19
|
|
|
20
|
+
Mode is determined automatically by --output path:
|
|
21
|
+
- Output file does NOT exist -> new plan (all features must be "pending")
|
|
22
|
+
- Output file already exists -> incremental append (existing features keep their status)
|
|
23
|
+
|
|
20
24
|
Python 3.6+ required. No external dependencies.
|
|
21
25
|
"""
|
|
22
26
|
|
|
@@ -38,8 +42,6 @@ VALID_STATUSES = {"pending", "in_progress", "completed", "failed", "skipped", "s
|
|
|
38
42
|
VALID_COMPLEXITIES = {"low", "medium", "high", "critical"}
|
|
39
43
|
VALID_PRIORITIES = {"critical", "high", "medium", "low"}
|
|
40
44
|
VALID_GRANULARITIES = {"feature", "sub_feature", "auto"}
|
|
41
|
-
VALID_PLANNING_MODES = {"new", "incremental"}
|
|
42
|
-
|
|
43
45
|
FEATURE_ID_RE = re.compile(r"^F-\d{3}(-[A-Z])?$")
|
|
44
46
|
SUB_FEATURE_ID_RE = re.compile(r"^F-\d{3}-[A-Z]$")
|
|
45
47
|
|
|
@@ -156,13 +158,11 @@ def _detect_cycles(features):
|
|
|
156
158
|
# ---------------------------------------------------------------------------
|
|
157
159
|
|
|
158
160
|
|
|
159
|
-
def validate_feature_list(data,
|
|
161
|
+
def validate_feature_list(data, is_new_plan=True):
|
|
160
162
|
"""Validate a parsed feature-list data structure.
|
|
161
163
|
|
|
162
164
|
Returns a dict with keys ``valid``, ``errors``, ``warnings``, ``stats``.
|
|
163
165
|
"""
|
|
164
|
-
if planning_mode not in VALID_PLANNING_MODES:
|
|
165
|
-
planning_mode = "new"
|
|
166
166
|
|
|
167
167
|
errors = []
|
|
168
168
|
warnings = []
|
|
@@ -299,7 +299,7 @@ def validate_feature_list(data, planning_mode="new"):
|
|
|
299
299
|
label, status, ", ".join(sorted(VALID_STATUSES))
|
|
300
300
|
)
|
|
301
301
|
)
|
|
302
|
-
if
|
|
302
|
+
if is_new_plan and status and status != "pending":
|
|
303
303
|
warnings.append(
|
|
304
304
|
"{}: status is '{}' (expected 'pending' for new plans)".format(label, status)
|
|
305
305
|
)
|
|
@@ -680,7 +680,9 @@ def cmd_validate(args):
|
|
|
680
680
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
681
681
|
return 2
|
|
682
682
|
|
|
683
|
-
|
|
683
|
+
# Validate input file exists -> incremental mode (existing features keep their status)
|
|
684
|
+
is_new_plan = False
|
|
685
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
684
686
|
|
|
685
687
|
# Print results to stdout
|
|
686
688
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -758,9 +760,11 @@ def cmd_generate(args):
|
|
|
758
760
|
for feature in data.get("features", []):
|
|
759
761
|
feature.setdefault("status", "pending")
|
|
760
762
|
|
|
761
|
-
# Validate
|
|
762
|
-
|
|
763
|
-
|
|
763
|
+
# Validate. Mode is determined by whether --output file already exists:
|
|
764
|
+
# - does NOT exist -> new plan (all features must be "pending")
|
|
765
|
+
# - already exists -> incremental append (existing features keep their status)
|
|
766
|
+
is_new_plan = not os.path.exists(args.output)
|
|
767
|
+
result = validate_feature_list(data, is_new_plan=is_new_plan)
|
|
764
768
|
|
|
765
769
|
# Output validation result
|
|
766
770
|
print(json.dumps(result, indent=2, ensure_ascii=False))
|
|
@@ -856,7 +860,7 @@ def cmd_grade(args):
|
|
|
856
860
|
continue
|
|
857
861
|
|
|
858
862
|
# Run validation
|
|
859
|
-
result = validate_feature_list(data,
|
|
863
|
+
result = validate_feature_list(data, is_new_plan=True)
|
|
860
864
|
|
|
861
865
|
# Create grading entry
|
|
862
866
|
grade_entry = {
|
|
@@ -916,7 +920,6 @@ def main():
|
|
|
916
920
|
epilog=(
|
|
917
921
|
"Examples:\n"
|
|
918
922
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json\n"
|
|
919
|
-
" %(prog)s validate --input .prizmkit/plans/feature-list.json --mode incremental\n"
|
|
920
923
|
" %(prog)s validate --input .prizmkit/plans/feature-list.json --output validated.json\n"
|
|
921
924
|
" %(prog)s template --output .prizmkit/plans/feature-list.json\n"
|
|
922
925
|
" %(prog)s generate --input draft.json --output .prizmkit/plans/feature-list.json\n"
|
|
@@ -938,12 +941,6 @@ def main():
|
|
|
938
941
|
p_validate.add_argument(
|
|
939
942
|
"--output", help="Path to write validated output (optional)"
|
|
940
943
|
)
|
|
941
|
-
p_validate.add_argument(
|
|
942
|
-
"--mode",
|
|
943
|
-
choices=["new", "incremental"],
|
|
944
|
-
default="new",
|
|
945
|
-
help="Validation mode (default: new)",
|
|
946
|
-
)
|
|
947
944
|
|
|
948
945
|
# -- template --
|
|
949
946
|
p_template = subparsers.add_parser(
|
|
@@ -965,12 +962,6 @@ def main():
|
|
|
965
962
|
p_generate.add_argument(
|
|
966
963
|
"--output", required=True, help="Path to write final feature-list.json"
|
|
967
964
|
)
|
|
968
|
-
p_generate.add_argument(
|
|
969
|
-
"--mode",
|
|
970
|
-
choices=["new", "incremental"],
|
|
971
|
-
default="new",
|
|
972
|
-
help="Validation mode (default: new)",
|
|
973
|
-
)
|
|
974
965
|
|
|
975
966
|
# -- summary --
|
|
976
967
|
p_summary = subparsers.add_parser(
|
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "prizm-dev-team",
|
|
3
3
|
"team_name": "prizm-dev-team",
|
|
4
|
-
"description": "PrizmKit-integrated Multi-Agent software development team. 3 specialized agents (Dev, Reviewer, Critic) following PrizmKit spec-driven workflow with
|
|
4
|
+
"description": "PrizmKit-integrated Multi-Agent software development team. 3 specialized agents (Dev, Reviewer, Critic) following PrizmKit spec-driven workflow. Critic supports parallel 3-critic voting with distinct focus lenses.",
|
|
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
|
|
9
|
+
"note": "Teammates communicate directly via SendMessage; key messages must also be sent to Orchestrator (the main AI session). Critic agents operate independently in parallel — they do NOT read each other's reports."
|
|
10
10
|
},
|
|
11
11
|
"members": [
|
|
12
12
|
{
|
|
13
13
|
"name": "dev",
|
|
14
|
-
"role": "developer",
|
|
14
|
+
"role": "developer",
|
|
15
15
|
"agentDefinition": "prizm-dev-team-dev",
|
|
16
|
-
"prompt": "You are a Dev Agent of the prizm-dev-team. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x].
|
|
16
|
+
"prompt": "You are a Dev Agent of the prizm-dev-team. Your complete behavior rules are in your agent definition. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x].",
|
|
17
17
|
"subscriptions": ["*"]
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "reviewer",
|
|
21
21
|
"role": "reviewer",
|
|
22
22
|
"agentDefinition": "prizm-dev-team-reviewer",
|
|
23
|
-
"prompt": "You are the Reviewer Agent of the prizm-dev-team. Run /prizmkit-code-review for diagnosis + fix strategy formulation
|
|
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
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "critic",
|
|
28
28
|
"role": "critic",
|
|
29
29
|
"agentDefinition": "prizm-dev-team-critic",
|
|
30
|
-
"prompt": "You are the Critic Agent of the prizm-dev-team. Challenge plans and implementations for project fitness, style consistency, robustness, and integration quality. Do NOT verify correctness — that is the Reviewer's job.
|
|
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
31
|
"subscriptions": ["*"]
|
|
32
32
|
}
|
|
33
33
|
]
|