prizmkit 1.1.8 → 1.1.10
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/adapters/codebuddy/skill-adapter.js +21 -7
- package/bundled/agents/prizm-dev-team-reviewer.md +53 -173
- package/bundled/dev-pipeline/.env.example +45 -0
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +535 -0
- package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +57 -12
- package/bundled/dev-pipeline/launch-feature-daemon.sh +3 -1
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +57 -12
- package/bundled/dev-pipeline/lib/branch.sh +6 -1
- package/bundled/dev-pipeline/lib/common.sh +71 -0
- package/bundled/dev-pipeline/lib/heartbeat.sh +2 -2
- package/bundled/dev-pipeline/retry-bugfix.sh +60 -23
- package/bundled/dev-pipeline/retry-feature.sh +47 -12
- package/bundled/dev-pipeline/retry-refactor.sh +105 -23
- package/bundled/dev-pipeline/run-bugfix.sh +265 -44
- package/bundled/dev-pipeline/run-feature.sh +35 -1
- package/bundled/dev-pipeline/run-refactor.sh +376 -51
- package/bundled/dev-pipeline/scripts/check-session-status.py +24 -1
- package/bundled/dev-pipeline/scripts/detect-stuck.py +195 -85
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +31 -19
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +19 -3
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +98 -11
- package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +30 -5
- package/bundled/dev-pipeline/scripts/init-pipeline.py +3 -3
- package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +15 -4
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -5
- package/bundled/dev-pipeline/scripts/patch-completion-notes.py +191 -0
- package/bundled/dev-pipeline/scripts/update-bug-status.py +159 -14
- package/bundled/dev-pipeline/scripts/update-feature-status.py +79 -37
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +343 -13
- package/bundled/dev-pipeline/templates/agent-prompts/dev-fix.md +1 -1
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-review.md +7 -11
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +41 -7
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +27 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +43 -19
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +54 -26
- package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +5 -14
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +36 -25
- package/bundled/dev-pipeline/templates/feature-list-schema.json +23 -11
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +270 -0
- package/bundled/dev-pipeline/templates/refactor-list-schema.json +10 -2
- package/bundled/dev-pipeline/templates/sections/context-budget-rules.md +3 -1
- package/bundled/dev-pipeline/templates/sections/critical-paths-agent.md +1 -0
- package/bundled/dev-pipeline/templates/sections/feature-context.md +2 -0
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +29 -2
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +22 -0
- package/bundled/dev-pipeline/templates/sections/phase-deploy-verification.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase-review-agent.md +8 -6
- package/bundled/dev-pipeline/templates/sections/phase-review-full.md +7 -5
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -3
- package/bundled/skills/_metadata.json +5 -22
- package/bundled/skills/app-planner/SKILL.md +92 -66
- package/bundled/skills/app-planner/assets/app-design-guide.md +1 -1
- package/bundled/skills/app-planner/references/architecture-decisions.md +1 -1
- package/bundled/skills/app-planner/references/project-brief-guide.md +69 -66
- package/bundled/skills/bug-fix-workflow/SKILL.md +47 -4
- package/bundled/skills/bug-planner/SKILL.md +130 -188
- package/bundled/skills/bug-planner/assets/bug-confirmation-template.md +43 -0
- package/bundled/skills/bug-planner/references/critic-and-verification.md +44 -0
- package/bundled/skills/bug-planner/references/error-recovery.md +73 -0
- package/bundled/skills/bug-planner/references/input-formats.md +53 -0
- package/bundled/skills/bug-planner/references/schema-validation.md +25 -0
- package/bundled/skills/bug-planner/references/severity-rules.md +16 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +1 -5
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +5 -10
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +16 -3
- package/bundled/skills/feature-planner/SKILL.md +33 -122
- package/bundled/skills/feature-planner/assets/evaluation-guide.md +1 -1
- package/bundled/skills/feature-planner/assets/planning-guide.md +21 -5
- package/bundled/skills/feature-planner/references/browser-interaction.md +2 -4
- package/bundled/skills/feature-planner/references/completeness-review.md +57 -0
- package/bundled/skills/feature-planner/references/error-recovery.md +15 -34
- package/bundled/skills/feature-planner/references/incremental-feature-planning.md +1 -1
- package/bundled/skills/feature-planner/references/new-project-planning.md +2 -2
- package/bundled/skills/feature-planner/scripts/validate-and-generate.py +1 -2
- package/bundled/skills/feature-workflow/SKILL.md +3 -4
- package/bundled/skills/prizm-kit/SKILL.md +39 -49
- package/bundled/skills/prizmkit-code-review/SKILL.md +51 -64
- package/bundled/skills/prizmkit-code-review/rules/dimensions.md +85 -0
- package/bundled/skills/prizmkit-code-review/rules/fix-strategy.md +11 -11
- package/bundled/skills/prizmkit-committer/SKILL.md +3 -31
- package/bundled/skills/prizmkit-deploy/SKILL.md +34 -31
- package/bundled/skills/prizmkit-deploy/assets/deploy-template.md +1 -1
- package/bundled/skills/prizmkit-implement/SKILL.md +35 -68
- package/bundled/skills/prizmkit-init/SKILL.md +112 -65
- package/bundled/skills/prizmkit-init/assets/project-brief-template.md +82 -0
- package/bundled/skills/prizmkit-plan/SKILL.md +120 -79
- package/bundled/skills/prizmkit-plan/assets/plan-template.md +28 -18
- package/bundled/skills/prizmkit-plan/assets/spec-template.md +28 -11
- package/bundled/skills/prizmkit-plan/references/clarify-guide.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +60 -0
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +10 -81
- package/bundled/skills/prizmkit-prizm-docs/assets/{PRIZM-SPEC.md → prizm-docs-format.md} +41 -526
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +46 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +16 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +14 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +19 -0
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +17 -0
- package/bundled/skills/prizmkit-retrospective/SKILL.md +27 -65
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -4
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +7 -25
- package/bundled/skills/recovery-workflow/SKILL.md +8 -8
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +17 -9
- package/bundled/skills/refactor-planner/SKILL.md +23 -41
- package/bundled/skills/refactor-workflow/SKILL.md +1 -2
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/{skills/prizm-kit/assets → templates}/project-memory-template.md +1 -1
- package/package.json +1 -1
- package/src/clean.js +0 -1
- package/src/gitignore-template.js +0 -1
- package/src/scaffold.js +10 -3
- package/bundled/dev-pipeline/templates/agent-prompts/reviewer-analyze.md +0 -5
- package/bundled/dev-pipeline/templates/sections/phase-analyze-agent.md +0 -19
- package/bundled/dev-pipeline/templates/sections/phase-analyze-full.md +0 -19
- package/bundled/skills/app-planner/references/project-conventions.md +0 -93
- package/bundled/skills/prizmkit-analyze/SKILL.md +0 -207
- package/bundled/skills/prizmkit-code-review/rules/dimensions-bugfix.md +0 -25
- package/bundled/skills/prizmkit-code-review/rules/dimensions-feature.md +0 -43
- package/bundled/skills/prizmkit-code-review/rules/dimensions-refactor.md +0 -25
- package/bundled/skills/prizmkit-implement/references/deploy-guide-protocol.md +0 -69
- package/bundled/skills/prizmkit-verify/SKILL.md +0 -281
- package/bundled/skills/prizmkit-verify/scripts/verify-light.py +0 -402
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "bug-planner"
|
|
3
|
-
|
|
4
|
-
description: "Interactive bug planning that produces .prizmkit/plans/bug-fix-list.json for the Bug Fix Pipeline. Supports multiple input formats: error logs, stack traces, user reports, failed tests, monitoring alerts. Use this skill whenever the user has bugs to report, errors to parse, or test failures to organize. Trigger on: 'plan bug fixes', 'report bugs', 'I have some bugs', 'these tests are failing', 'here is an error log', 'parse these errors', 'generate bug list'. (project)"
|
|
3
|
+
description: "Interactive bug planning that produces .prizmkit/plans/bug-fix-list.json for the Bug Fix Pipeline. Supports multiple input formats: error logs, stack traces, user reports, failed tests, monitoring alerts. Use this skill whenever the user has bugs to report, errors to parse, or test failures to organize. Trigger on: 'plan bug fixes', 'report bugs', 'I have some bugs', 'these tests are failing', 'here is an error log', 'parse these errors', 'generate bug list'."
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# Bug Planner
|
|
8
7
|
|
|
9
|
-
Interactive skill that collects bug information from various input formats and generates a standardized `.prizmkit/plans/bug-fix-list.json` for the Bug Fix Pipeline.
|
|
8
|
+
Interactive skill that collects bug information from various input formats and generates a standardized `.prizmkit/plans/bug-fix-list.json` for the Bug Fix Pipeline.
|
|
9
|
+
|
|
10
|
+
## Invocation Commitment (Hard Rule)
|
|
11
|
+
|
|
12
|
+
When the user invokes `/bug-planner`, you MUST execute the bug-planner workflow. You must NEVER:
|
|
13
|
+
- Decide on the user's behalf that the task "doesn't need bug-planner"
|
|
14
|
+
- Skip bug-planner to jump directly to implementation or any other skill
|
|
15
|
+
- Bypass the interactive phases because you judge the task to be "simple"
|
|
16
|
+
|
|
17
|
+
If you believe the task is better suited for a different workflow, you MUST:
|
|
18
|
+
1. Explain why you think a different path is more appropriate
|
|
19
|
+
2. Ask the user explicitly whether they want to switch or continue with bug-planner
|
|
20
|
+
3. Only switch if the user confirms
|
|
21
|
+
|
|
22
|
+
The user chose this skill intentionally. Respect that choice.
|
|
23
|
+
|
|
24
|
+
## Scope Boundary (Hard Rule)
|
|
25
|
+
|
|
26
|
+
This skill is PLANNING ONLY. You must NEVER:
|
|
27
|
+
- Create, modify, or delete source code files (*.js, *.ts, *.py, *.go, *.html, *.css, etc.)
|
|
28
|
+
- Run build/install/test commands
|
|
29
|
+
- Execute any bug fix action
|
|
30
|
+
- Execute any implementation action beyond writing `.prizmkit/plans/bug-fix-list.json`
|
|
31
|
+
|
|
32
|
+
Your ONLY writable outputs are:
|
|
33
|
+
1. `.prizmkit/plans/bug-fix-list.json`
|
|
34
|
+
2. Draft backups in `.prizmkit/plans/` (e.g., `bug-fix-list.draft.json`)
|
|
35
|
+
|
|
36
|
+
After planning is complete, you MUST:
|
|
37
|
+
1. Present the summary and recommended next step (invoking `bugfix-pipeline-launcher`)
|
|
38
|
+
2. Ask the user explicitly whether they want to proceed to execution
|
|
39
|
+
3. If the user wants to adjust → continue refining the bug list
|
|
40
|
+
4. NEVER auto-execute the pipeline, launcher, or any fix step
|
|
10
41
|
|
|
11
42
|
## When to Use
|
|
12
43
|
|
|
@@ -17,9 +48,9 @@ User says:
|
|
|
17
48
|
- After receiving bug reports, error logs, or failed test output
|
|
18
49
|
|
|
19
50
|
**Do NOT use when:**
|
|
20
|
-
- User wants to start fixing bugs now
|
|
21
|
-
- User wants to fix a single bug interactively
|
|
22
|
-
- User wants to plan features
|
|
51
|
+
- User wants to start fixing bugs now → use `bugfix-pipeline-launcher`
|
|
52
|
+
- User wants to fix a single bug interactively → use `bug-fix-workflow`
|
|
53
|
+
- User wants to plan features → use `feature-planner`
|
|
23
54
|
|
|
24
55
|
## Intent Routing
|
|
25
56
|
|
|
@@ -33,6 +64,28 @@ This skill handles multiple operations. Determine the user's intent and execute
|
|
|
33
64
|
| Validate existing bug list | **Validate** | "validate bug list", "check .prizmkit/plans/bug-fix-list.json" |
|
|
34
65
|
| Summarize bug list | **Summary** | "bug summary", "show bug list", "list bugs" |
|
|
35
66
|
|
|
67
|
+
## Scenario Routing
|
|
68
|
+
|
|
69
|
+
Classify user intent first:
|
|
70
|
+
|
|
71
|
+
### Route A: New Bug List (No Existing Plan)
|
|
72
|
+
|
|
73
|
+
Use when no `.prizmkit/plans/bug-fix-list.json` exists.
|
|
74
|
+
|
|
75
|
+
Actions:
|
|
76
|
+
1. Run full Interactive Planning (Phase 1-5)
|
|
77
|
+
2. Generate initial `.prizmkit/plans/bug-fix-list.json`
|
|
78
|
+
|
|
79
|
+
### Route B: Append to Existing Bug List
|
|
80
|
+
|
|
81
|
+
Use when `.prizmkit/plans/bug-fix-list.json` already exists and user wants to add more bugs.
|
|
82
|
+
|
|
83
|
+
Actions:
|
|
84
|
+
1. Read existing `.prizmkit/plans/bug-fix-list.json` first (if missing, ask whether to start new plan)
|
|
85
|
+
2. Continue with next sequential `B-NNN` IDs
|
|
86
|
+
3. Preserve existing entries, append new bugs
|
|
87
|
+
4. Re-run validation on the merged list
|
|
88
|
+
|
|
36
89
|
---
|
|
37
90
|
|
|
38
91
|
## Operation: Interactive Planning
|
|
@@ -41,78 +94,40 @@ Launch the interactive bug planning process through 5 phases.
|
|
|
41
94
|
|
|
42
95
|
### Phase 1: Project Context
|
|
43
96
|
|
|
44
|
-
|
|
45
|
-
|
|
97
|
+
Gather project metadata from the project's own configuration and documentation — bug-planner is independent of feature-planner, so it reads project-level sources directly rather than depending on feature-list.json.
|
|
98
|
+
|
|
99
|
+
1. **Identify project**: Read project name and description from these sources (first match wins):
|
|
100
|
+
- `.prizmkit/config.json` (`project_name`, `description` fields)
|
|
101
|
+
- `.prizm-docs/root.prizm` (project overview section)
|
|
102
|
+
- `CLAUDE.md` or `CODEBUDDY.md` (project instructions)
|
|
103
|
+
- `package.json` / `pyproject.toml` / `Cargo.toml` (name + description fields)
|
|
104
|
+
- If none found, ask the user
|
|
105
|
+
2. **Identify tech stack**: Read from these sources (first match wins):
|
|
106
|
+
- `.prizmkit/config.json` `tech_stack` (preferred — contains language, frameworks, DB, etc.)
|
|
107
|
+
- `.prizm-docs/root.prizm` (architecture section)
|
|
108
|
+
- Auto-detect from project files (`package.json`, `requirements.txt`, `go.mod`, etc.)
|
|
109
|
+
- If none found, ask the user
|
|
46
110
|
3. **Identify testing framework**: Read from `.prizmkit/config.json` `tech_stack.testing`, or auto-detect from package.json/requirements.txt/etc., or ask user
|
|
47
111
|
4. **Clarify context** — if the project context, affected systems, or bug scope is unclear, ask questions one at a time (cite the unclear point, give a recommended answer with rationale) until you fully understand the environment. No limit on rounds or number of questions.
|
|
48
112
|
|
|
49
113
|
Output: `project_name`, `project_description`, `global_context` fields populated.
|
|
50
114
|
|
|
115
|
+
**Gate → CP-BP-1**: Tech stack and project info confirmed before proceeding.
|
|
116
|
+
|
|
51
117
|
### Phase 2: Bug Collection
|
|
52
118
|
|
|
53
119
|
Accept bug information in ANY of these formats (auto-detect):
|
|
54
120
|
|
|
55
|
-
#### Severity
|
|
56
|
-
|
|
57
|
-
When extracting bugs, apply these rules to auto-suggest severity:
|
|
121
|
+
#### Severity & Input Format References
|
|
58
122
|
|
|
59
|
-
|
|
60
|
-
|----------|------------|----------|
|
|
61
|
-
| **critical** | System crash, data loss, security breach, OOM, unrecoverable error | `Segmentation fault`, `OutOfMemoryError`, `SQL injection vulnerability`, `Database corrupted` |
|
|
62
|
-
| **high** | Core feature broken, authentication failure, data integrity issue, timeout | `Auth token invalid`, `Payment failed`, `Connection timeout`, `500 Internal Server Error` |
|
|
63
|
-
| **medium** | Feature partially broken, workaround exists, incorrect output | `CSV encoding issue`, `Pagination not working`, `Wrong date format`, `Missing validation` |
|
|
64
|
-
| **low** | Cosmetic issue, minor inconvenience, edge case | `UI misalignment`, `Typo in error message`, `Slow loading (non-critical page)`, `Non-breaking warning` |
|
|
123
|
+
When classifying severity, read `${SKILL_DIR}/references/severity-rules.md` for the auto-classification table (critical/high/medium/low indicators and special cases).
|
|
65
124
|
|
|
66
|
-
|
|
67
|
-
- Failed test → medium (unless test covers critical path, then high)
|
|
68
|
-
- User report with "cannot use app" → high
|
|
69
|
-
- User report with "annoying but works" → low
|
|
70
|
-
|
|
71
|
-
#### Format A: Stack Trace / Error Log
|
|
72
|
-
```
|
|
73
|
-
TypeError: Cannot read property 'token' of null
|
|
74
|
-
at AuthService.handleLogin (src/services/auth.ts:42)
|
|
75
|
-
at LoginPage.onSubmit (src/pages/login.tsx:28)
|
|
76
|
-
```
|
|
77
|
-
→ Auto-extract: `error_source.type="stack_trace"`, `error_message`, `stack_trace`, `affected_modules`
|
|
78
|
-
|
|
79
|
-
#### Format B: Natural Language User Report
|
|
80
|
-
```
|
|
81
|
-
When I click the login button with correct credentials, the page turns white.
|
|
82
|
-
Expected: redirect to home page.
|
|
83
|
-
Actual: white screen with no error message visible.
|
|
84
|
-
```
|
|
85
|
-
→ Auto-extract: `error_source.type="user_report"`, `reproduction_steps`, `description` (expected vs actual)
|
|
86
|
-
|
|
87
|
-
#### Format C: Failed Test Output
|
|
88
|
-
```
|
|
89
|
-
FAIL src/services/__tests__/auth.test.ts
|
|
90
|
-
● AuthService > handleLogin > should return token on success
|
|
91
|
-
Expected: "abc123"
|
|
92
|
-
Received: null
|
|
93
|
-
```
|
|
94
|
-
→ Auto-extract: `error_source.type="failed_test"`, `failed_test_path`, `error_message`
|
|
95
|
-
|
|
96
|
-
#### Format D: Log Pattern
|
|
97
|
-
```
|
|
98
|
-
[2026-03-07 10:23:45] ERROR [auth-service] Connection timeout after 30000ms
|
|
99
|
-
[2026-03-07 10:23:45] ERROR [auth-service] Failed to authenticate user: ETIMEDOUT
|
|
100
|
-
[2026-03-07 10:23:46] ERROR [auth-service] Connection timeout after 30000ms
|
|
101
|
-
```
|
|
102
|
-
→ Auto-extract: `error_source.type="log_pattern"`, `log_snippet`, `affected_modules`
|
|
103
|
-
|
|
104
|
-
#### Format E: Monitoring Alert
|
|
105
|
-
```
|
|
106
|
-
ALERT: CPU usage > 95% for auth-service pod (5min avg)
|
|
107
|
-
ALERT: Error rate spike: 500 errors/min on /api/login endpoint
|
|
108
|
-
```
|
|
109
|
-
→ Auto-extract: `error_source.type="monitoring_alert"`, `error_message`, `affected_modules`
|
|
125
|
+
When parsing user input, auto-detect the format and read `${SKILL_DIR}/references/input-formats.md` for extraction patterns. Supported formats: stack traces, user reports, failed tests, log patterns, monitoring alerts.
|
|
110
126
|
|
|
111
127
|
**For each bug collected**, interactively confirm or fill in:
|
|
112
128
|
- Title (auto-suggest from error message, user can edit)
|
|
113
129
|
- Description (auto-generate expected vs actual, user can edit)
|
|
114
130
|
- Severity (auto-suggest based on error type, user can override)
|
|
115
|
-
- Affected feature (ask if known, map to existing F-NNN IDs)
|
|
116
131
|
- Environment (ask or auto-detect from logs)
|
|
117
132
|
- Verification type (suggest `automated` by default, ask user)
|
|
118
133
|
- Acceptance criteria (auto-suggest based on description, user can edit)
|
|
@@ -120,30 +135,7 @@ ALERT: Error rate spike: 500 errors/min on /api/login endpoint
|
|
|
120
135
|
|
|
121
136
|
**Per-bug clarification** — if the bug's root cause, reproduction steps, expected behavior, or scope is unclear from the provided information, ask focused questions one at a time (cite the unclear point, give a recommended answer with rationale) until the bug is fully understood. Do not finalize a bug entry with ambiguous details. No limit on the number of questions per bug.
|
|
122
137
|
|
|
123
|
-
**Per-bug confirmation (mandatory)** — after extracting and clarifying each bug, present a structured summary
|
|
124
|
-
|
|
125
|
-
```
|
|
126
|
-
┌─ Bug Confirmation: B-NNN ─────────────────────────────
|
|
127
|
-
│ Title: <auto-suggested title>
|
|
128
|
-
│ Description: <expected vs actual behavior>
|
|
129
|
-
│ Severity: <auto-classified> | Verification: <type>
|
|
130
|
-
│
|
|
131
|
-
│ Reproduction: <steps if available, or "not provided">
|
|
132
|
-
│ Affected: <module/feature or "unknown">
|
|
133
|
-
│
|
|
134
|
-
│ ✅ Acceptance Criteria (fix verified when):
|
|
135
|
-
│ 1. <criterion — specific enough for automated pipeline to verify>
|
|
136
|
-
│ 2. <criterion>
|
|
137
|
-
│
|
|
138
|
-
│ ⚠️ Open Questions:
|
|
139
|
-
│ - <any unclear points, or "None">
|
|
140
|
-
└────────────────────────────────────────────────────────
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Then ask three confirmation questions:
|
|
144
|
-
1. "描述是否准确?是否需要修改?" / "Is the description accurate? Any corrections?"
|
|
145
|
-
2. "是否需要补充更多细节?(复现步骤、环境信息、相关代码位置等)" / "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
|
|
146
|
-
3. "验证条件是否具体到 pipeline 可以自主判断修复成功?" / "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
|
|
138
|
+
**Per-bug confirmation (mandatory)** — after extracting and clarifying each bug, present a structured summary using the template in `${SKILL_DIR}/assets/bug-confirmation-template.md`, then ask the three confirmation questions defined there.
|
|
147
139
|
|
|
148
140
|
The acceptance criteria are critical — they directly determine how the bugfix pipeline judges success or failure. Vague criteria like "login works" lead to shallow fixes; prefer specific, verifiable conditions like "POST /api/login with valid credentials returns 200 and a JWT token in the response body."
|
|
149
141
|
|
|
@@ -151,16 +143,18 @@ Only finalize the bug entry after user confirms all three points.
|
|
|
151
143
|
|
|
152
144
|
**Multiple bugs per session**: After each bug, ask "Any more bugs to add? (yes/no)"
|
|
153
145
|
|
|
146
|
+
**Gate → CP-BP-2**: All bugs extracted and confirmed by user.
|
|
147
|
+
|
|
154
148
|
### Phase 3: Prioritization & Review
|
|
155
149
|
|
|
156
|
-
1. **Auto-assign priorities**: Based on severity
|
|
157
|
-
|
|
150
|
+
1. **Auto-assign priorities**: Based on severity, adjustable by user
|
|
151
|
+
|
|
158
152
|
**Severity → Priority Mapping**:
|
|
159
153
|
- `critical` severity → `high` priority (treated with highest urgency)
|
|
160
154
|
- `high` severity → `high` priority
|
|
161
155
|
- `medium` severity → `medium` priority
|
|
162
156
|
- `low` severity → `low` priority
|
|
163
|
-
|
|
157
|
+
|
|
164
158
|
Note: Severity has 4 levels (critical, high, medium, low) but Priority has 3 levels (high, medium, low). Both critical and high severity bugs map to high priority.
|
|
165
159
|
2. **Display summary table**:
|
|
166
160
|
```
|
|
@@ -172,14 +166,20 @@ Only finalize the bug entry after user confirms all three points.
|
|
|
172
166
|
3. **Ask for adjustments**: "Want to reorder priorities, change severity, or remove any bugs?"
|
|
173
167
|
4. **Detect potential duplicates**: If two bugs have similar error messages or affected modules, warn user
|
|
174
168
|
|
|
169
|
+
**Gate → CP-BP-3**: Severity/priority assigned, duplicates resolved.
|
|
170
|
+
|
|
175
171
|
### Phase 4: Pre-Generation Completeness Review
|
|
176
172
|
|
|
177
173
|
Before generating `.prizmkit/plans/bug-fix-list.json`, perform a holistic scan across all collected bugs. The bugfix pipeline runs autonomously — any ambiguity left here becomes a wrong assumption later.
|
|
178
174
|
|
|
179
|
-
**Step 1 — Description adequacy scan**: For each bug, check:
|
|
175
|
+
**Step 1 — Description adequacy scan (Headless Execution Readiness)**: The bugfix pipeline runs each bug through an autonomous AI session with NO human interaction. Every description must be unambiguous enough for headless execution. For each bug, check:
|
|
180
176
|
- Description clearly states **expected** vs **actual** behavior (not just "X doesn't work")
|
|
181
177
|
- Reproduction path is specific enough for the pipeline AI to locate the relevant code
|
|
182
178
|
- If the bug involves user interaction, the trigger action is described (not just the symptom)
|
|
179
|
+
- **Code location hints**: Where in the codebase should the AI look? (file paths, module names, function names)
|
|
180
|
+
- **Verification method**: How should the AI verify the fix? (run specific test, check specific behavior)
|
|
181
|
+
- Bad: "Login is broken" — too vague, AI will search the entire codebase
|
|
182
|
+
- Good: "Login form at /login returns 500 when password field is empty. Expected: validation error 400. Root cause likely in src/api/auth.ts POST /api/auth/login handler — missing null check on password field."
|
|
183
183
|
|
|
184
184
|
**Step 2 — Acceptance criteria specificity check**: For each bug, verify each acceptance criterion passes the "pipeline autonomy test" — could an AI session, without asking a human, determine whether this criterion is met? Flag criteria that are subjective ("works correctly"), lack measurable conditions ("performs better"), or don't specify the verification method.
|
|
185
185
|
|
|
@@ -188,72 +188,50 @@ Before generating `.prizmkit/plans/bug-fix-list.json`, perform a holistic scan a
|
|
|
188
188
|
- **Missing dependencies**: If fixing B-002 requires B-001 to be fixed first, flag the dependency
|
|
189
189
|
- **Scope gaps**: If bugs describe symptoms but the underlying cause likely affects more areas, suggest additional bugs
|
|
190
190
|
|
|
191
|
-
**Step 4 — Present review table**: Display the completeness assessment using
|
|
192
|
-
|
|
193
|
-
```
|
|
194
|
-
┌─ Completeness Review ─────────────────────────────────────────────────
|
|
195
|
-
│ Bug │ Description │ Criteria │ Reproducible │ Notes
|
|
196
|
-
│ B-001 │ ✓ Clear │ ✓ Specific │ ✓ Yes │ —
|
|
197
|
-
│ B-002 │ ⚠ Vague │ ⚠ Subjective│ ✓ Yes │ "encoding works" → needs specific test case
|
|
198
|
-
│ B-003 │ ✓ Clear │ ⚠ No metric│ ⚠ No steps │ needs perf threshold + reproduction steps
|
|
199
|
-
└────────────────────────────────────────────────────────────────────────
|
|
200
|
-
```
|
|
191
|
+
**Step 4 — Present review table**: Display the completeness assessment using the template in `${SKILL_DIR}/assets/bug-confirmation-template.md` (§Completeness Review Template).
|
|
201
192
|
|
|
202
|
-
For any
|
|
193
|
+
For any items that need attention, ask targeted questions to fill gaps. Iterate until the user confirms all bugs are adequately described. Present bilingual prompt:
|
|
203
194
|
|
|
204
|
-
> "
|
|
205
|
-
> "Above is the completeness review. Items
|
|
195
|
+
> "以上是完整性审查结果。需要补充的项目是否逐一补充?还是先跳过,之后再完善?"
|
|
196
|
+
> "Above is the completeness review. Items needing more detail — address them now, or proceed and refine later?"
|
|
206
197
|
|
|
207
198
|
Only proceed to Phase 5 after user confirms.
|
|
208
199
|
|
|
200
|
+
**Gate → CP-BP-4**: All bugs pass headless execution readiness check.
|
|
201
|
+
|
|
209
202
|
### Phase 5: Generate & Validate
|
|
210
203
|
|
|
211
204
|
1. **Generate `.prizmkit/plans/bug-fix-list.json`**: Conform to `dev-pipeline/templates/bug-fix-list-schema.json`
|
|
212
|
-
2. **Validate against schema**: Run the validation
|
|
213
|
-
```bash
|
|
214
|
-
python3 ${SKILL_DIR}/scripts/validate-bug-list.py .prizmkit/plans/bug-fix-list.json --feature-list .prizmkit/plans/feature-list.json
|
|
215
|
-
```
|
|
216
|
-
If the script is not available, perform the validation checks manually (see checklist below).
|
|
205
|
+
2. **Validate against schema**: Run `python3 ${SKILL_DIR}/scripts/validate-bug-list.py .prizmkit/plans/bug-fix-list.json --feature-list .prizmkit/plans/feature-list.json`. If the script is unavailable, use the checklist in `${SKILL_DIR}/references/schema-validation.md`.
|
|
217
206
|
3. **Write file** to `.prizmkit/plans/` (or user-specified path)
|
|
218
207
|
4. **Output**: File path, summary, and next steps
|
|
219
208
|
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
Before writing the file, verify all items pass:
|
|
223
|
-
|
|
224
|
-
**Required fields:**
|
|
225
|
-
- [ ] `$schema`: must be `"dev-pipeline-bug-fix-list-v1"`
|
|
226
|
-
- [ ] `project_name`: non-empty string
|
|
227
|
-
- [ ] `bugs`: non-empty array
|
|
228
|
-
|
|
229
|
-
**Per-bug required fields:**
|
|
230
|
-
- [ ] `id`: matches pattern `B-NNN` (e.g., `B-001`)
|
|
231
|
-
- [ ] `title`: non-empty string
|
|
232
|
-
- [ ] `description`: non-empty string
|
|
233
|
-
- [ ] `severity`: one of `critical`, `high`, `medium`, `low`
|
|
234
|
-
- [ ] `error_source.type`: one of `stack_trace`, `user_report`, `failed_test`, `log_pattern`, `monitoring_alert`
|
|
235
|
-
- [ ] `verification_type`: one of `automated`, `manual`, `hybrid`
|
|
236
|
-
- [ ] `acceptance_criteria`: non-empty array of strings
|
|
237
|
-
- [ ] `status`: must be `pending` for new bugs
|
|
238
|
-
|
|
239
|
-
**Consistency checks:**
|
|
240
|
-
- [ ] No duplicate bug IDs
|
|
241
|
-
- [ ] If `priority` is set, must be one of `high`, `medium`, `low`
|
|
242
|
-
- [ ] If `affected_feature` is set, verify it exists in `.prizmkit/plans/feature-list.json` (if available)
|
|
243
|
-
|
|
244
|
-
If any check fails, fix before writing the file.
|
|
209
|
+
**Gate → CP-BP-5**: `bug-fix-list.json` passes validation script with zero errors.
|
|
245
210
|
|
|
246
211
|
#### Success Output
|
|
247
212
|
|
|
248
213
|
```
|
|
249
|
-
|
|
214
|
+
.prizmkit/plans/bug-fix-list.json generated with 3 bugs (1 critical, 1 medium, 1 low)
|
|
250
215
|
|
|
251
216
|
Next steps:
|
|
252
217
|
- Review: cat .prizmkit/plans/bug-fix-list.json
|
|
253
|
-
- Start fixing: say "start fixing"
|
|
254
|
-
- Or run directly: ./dev-pipeline/launch-bugfix-daemon.sh start .prizmkit/plans/bug-fix-list.json
|
|
218
|
+
- Start fixing: say "start fixing" to launch the bugfix pipeline via bugfix-pipeline-launcher
|
|
255
219
|
```
|
|
256
220
|
|
|
221
|
+
### Checkpoints (Mandatory Gates)
|
|
222
|
+
|
|
223
|
+
Checkpoints catch cascading errors early — skipping one means the next phase builds on unvalidated assumptions.
|
|
224
|
+
|
|
225
|
+
| Checkpoint | Artifact/State | Criteria | Phase |
|
|
226
|
+
|-----------|----------------|----------|-------|
|
|
227
|
+
| **CP-BP-1** | Project Context | Tech stack and project info confirmed | 1 |
|
|
228
|
+
| **CP-BP-2** | Bugs Collected | All bugs extracted and confirmed by user | 2 |
|
|
229
|
+
| **CP-BP-3** | Priorities Set | Severity/priority assigned, duplicates resolved | 3 |
|
|
230
|
+
| **CP-BP-4** | Completeness Passed | All bugs pass headless execution readiness check | 4 |
|
|
231
|
+
| **CP-BP-5** | File Generated | `bug-fix-list.json` passes validation script | 5 |
|
|
232
|
+
|
|
233
|
+
**Resume Detection**: If existing `.prizmkit/plans/bug-fix-list.json` or draft found, read `${SKILL_DIR}/references/error-recovery.md` §Resume Support for checkpoint-based resumption.
|
|
234
|
+
|
|
257
235
|
---
|
|
258
236
|
|
|
259
237
|
## Operation: From Log
|
|
@@ -265,7 +243,7 @@ Batch-parse error logs to generate bug entries without interactive prompts:
|
|
|
265
243
|
3. Auto-generate bug entries with:
|
|
266
244
|
- Title: first line of error message
|
|
267
245
|
- Description: full error context
|
|
268
|
-
- Severity: use
|
|
246
|
+
- Severity: use `${SKILL_DIR}/references/severity-rules.md`
|
|
269
247
|
- error_source: populated from log content
|
|
270
248
|
- verification_type: default to `automated`
|
|
271
249
|
- acceptance_criteria: auto-generate "Error no longer occurs in [scenario]"
|
|
@@ -293,7 +271,6 @@ Validate existing `.prizmkit/plans/bug-fix-list.json`:
|
|
|
293
271
|
- Missing required fields
|
|
294
272
|
- Invalid status values
|
|
295
273
|
- Invalid priority values (must be 'high', 'medium', or 'low')
|
|
296
|
-
- Invalid `affected_feature` references (if .prizmkit/plans/feature-list.json exists)
|
|
297
274
|
4. Output: validation result with specific errors/warnings
|
|
298
275
|
|
|
299
276
|
## Operation: Summary
|
|
@@ -302,7 +279,6 @@ Print human-readable summary:
|
|
|
302
279
|
|
|
303
280
|
```
|
|
304
281
|
Bug Fix List Summary: my-web-app
|
|
305
|
-
═══════════════════════════════
|
|
306
282
|
|
|
307
283
|
Total: 3 bugs
|
|
308
284
|
By Severity: critical=1, high=0, medium=1, low=1
|
|
@@ -312,69 +288,35 @@ Bug List (by priority):
|
|
|
312
288
|
1. [B-001] Login null reference crash (CRITICAL) — automated
|
|
313
289
|
2. [B-002] CSV export Chinese encoding (MEDIUM) — hybrid
|
|
314
290
|
3. [B-003] Slow dashboard loading (LOW) — manual
|
|
315
|
-
|
|
316
|
-
Affected Features: F-003 (1 bug), F-012 (1 bug), none (1 bug)
|
|
317
291
|
```
|
|
318
292
|
|
|
319
293
|
---
|
|
320
294
|
|
|
321
|
-
## Adversarial Critic
|
|
322
|
-
|
|
323
|
-
All bug fixes support optional critic review for additional quality assurance. The critic mechanism is disabled by default but can be enabled per-bug based on severity and complexity.
|
|
295
|
+
## Adversarial Critic & Browser Verification
|
|
324
296
|
|
|
325
|
-
|
|
297
|
+
When configuring critic settings or browser verification for bugs, read `${SKILL_DIR}/references/critic-and-verification.md` for default behavior tables and verification type guidance.
|
|
326
298
|
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
| medium | `false` | (omitted) | Skip critic for medium-severity bugs |
|
|
332
|
-
| low | `false` | (omitted) | Skip critic for low-severity bugs |
|
|
333
|
-
|
|
334
|
-
- `critic: true` — Enable adversarial review after fix implementation
|
|
335
|
-
- `critic_count: 1` — Single critic agent reviews the fix
|
|
336
|
-
- Critic verifies: fix addresses root cause, no regressions introduced, acceptance criteria met
|
|
337
|
-
|
|
338
|
-
**User Override**: During Phase 2 or Phase 3, users can opt to enable/disable critic on a per-bug basis.
|
|
299
|
+
Key points:
|
|
300
|
+
- Critic is enabled by default for critical/high severity, disabled for medium/low
|
|
301
|
+
- Users can override critic settings per-bug during Phase 2 or Phase 3
|
|
302
|
+
- Browser verification is feature-pipeline only — bug fixes use `verification_type` field (automated/manual/hybrid)
|
|
339
303
|
|
|
340
304
|
---
|
|
341
305
|
|
|
342
|
-
##
|
|
306
|
+
## Next-Step Execution Policy
|
|
343
307
|
|
|
344
|
-
|
|
308
|
+
Recommend invoking `bugfix-pipeline-launcher` to configure and launch the pipeline. Do NOT recommend running shell scripts directly — that is the launcher's responsibility.
|
|
345
309
|
|
|
346
|
-
-
|
|
347
|
-
|
|
348
|
-
|
|
310
|
+
After `.prizmkit/plans/bug-fix-list.json` is generated, present:
|
|
311
|
+
1. Summary of generated bugs (count, severity breakdown)
|
|
312
|
+
2. Recommend: "Say 'start fixing' to launch the bugfix pipeline via `bugfix-pipeline-launcher`"
|
|
313
|
+
3. Alternative: fix a single bug interactively via `bug-fix-workflow`
|
|
349
314
|
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
Example:
|
|
353
|
-
```
|
|
354
|
-
Bug Title: Login error message not displaying
|
|
355
|
-
Verification Type: manual
|
|
356
|
-
Acceptance Criteria:
|
|
357
|
-
1. Navigate to /login with invalid credentials
|
|
358
|
-
2. Verify error message "Invalid email or password" appears below the email field
|
|
359
|
-
3. Verify error message is red (#FF0000)
|
|
360
|
-
4. Verify form fields are still enabled and can be re-submitted
|
|
361
|
-
```
|
|
362
|
-
|
|
363
|
-
The bugfix pipeline AI will use these criteria during manual verification.
|
|
364
|
-
|
|
365
|
-
---
|
|
366
|
-
|
|
367
|
-
## Integration with Bug Fix Pipeline
|
|
368
|
-
|
|
369
|
-
After `.prizmkit/plans/bug-fix-list.json` is generated, the user can:
|
|
315
|
+
## Error Handling
|
|
370
316
|
|
|
371
|
-
|
|
372
|
-
2. **Background daemon**: `./dev-pipeline/launch-bugfix-daemon.sh start .prizmkit/plans/bug-fix-list.json`
|
|
373
|
-
3. **Foreground run**: `./dev-pipeline/run-bugfix.sh run .prizmkit/plans/bug-fix-list.json`
|
|
374
|
-
4. **Fix single bug interactively**: invoke `bug-fix-workflow` in current session
|
|
375
|
-
5. **Retry a failed bug**: `./dev-pipeline/retry-bugfix.sh B-001`
|
|
317
|
+
If validation fails or a session is interrupted, read `${SKILL_DIR}/references/error-recovery.md` for the full error type table, retry logic, and checkpoint-based resume support.
|
|
376
318
|
|
|
377
|
-
|
|
319
|
+
Common errors handled inline:
|
|
378
320
|
|
|
379
321
|
| Error | Action |
|
|
380
322
|
|-------|--------|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Bug Confirmation Templates
|
|
2
|
+
|
|
3
|
+
## Per-Bug Confirmation Template
|
|
4
|
+
|
|
5
|
+
Present this after extracting and clarifying each bug:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
┌─ Bug Confirmation: B-NNN ─────────────────────────────
|
|
9
|
+
│ Title: <auto-suggested title>
|
|
10
|
+
│ Description: <expected vs actual behavior>
|
|
11
|
+
│ Severity: <auto-classified> | Verification: <type>
|
|
12
|
+
│
|
|
13
|
+
│ Reproduction: <steps if available, or "not provided">
|
|
14
|
+
│ Affected: <module/feature or "unknown">
|
|
15
|
+
│
|
|
16
|
+
│ Acceptance Criteria (fix verified when):
|
|
17
|
+
│ 1. <criterion — specific enough for automated pipeline to verify>
|
|
18
|
+
│ 2. <criterion>
|
|
19
|
+
│
|
|
20
|
+
│ Open Questions:
|
|
21
|
+
│ - <any unclear points, or "None">
|
|
22
|
+
└────────────────────────────────────────────────────────
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Then ask three confirmation questions:
|
|
26
|
+
1. "描述是否准确?是否需要修改?" / "Is the description accurate? Any corrections?"
|
|
27
|
+
2. "是否需要补充更多细节?(复现步骤、环境信息、相关代码位置等)" / "Need to add more details? (reproduction steps, environment, related code locations, etc.)"
|
|
28
|
+
3. "验证条件是否具体到 pipeline 可以自主判断修复成功?" / "Are the acceptance criteria specific enough that the pipeline can autonomously verify the fix?"
|
|
29
|
+
|
|
30
|
+
Only finalize the bug entry after user confirms all three points.
|
|
31
|
+
|
|
32
|
+
## Completeness Review Template
|
|
33
|
+
|
|
34
|
+
Display during Phase 4 pre-generation review:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
┌─ Completeness Review ─────────────────────────────────────────────────
|
|
38
|
+
│ Bug │ Description │ Criteria │ Reproducible │ Notes
|
|
39
|
+
│ B-001 │ ✓ Clear │ ✓ Specific │ ✓ Yes │ —
|
|
40
|
+
│ B-002 │ ⚠ Vague │ ⚠ Subjective│ ✓ Yes │ "encoding works" → needs specific test case
|
|
41
|
+
│ B-003 │ ✓ Clear │ ⚠ No metric│ ⚠ No steps │ needs perf threshold + reproduction steps
|
|
42
|
+
└────────────────────────────────────────────────────────────────────────
|
|
43
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
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 critic mechanism is disabled by default but can be enabled per-bug based on severity and complexity.
|
|
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
|
+
**Browser verification is a feature-pipeline capability only.** Bug fixes use the `verification_type` field instead:
|
|
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 that require visual verification (e.g., "Button doesn't show error message"), describe the verification steps in acceptance criteria.
|
|
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.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Error Recovery & Resume Support
|
|
2
|
+
|
|
3
|
+
Reference document for bug-planner error handling and session recovery. Load this when validation fails, a session is interrupted, or existing artifacts are detected.
|
|
4
|
+
|
|
5
|
+
## Validation Failure Handling
|
|
6
|
+
|
|
7
|
+
### Warnings Only
|
|
8
|
+
|
|
9
|
+
If `validate-bug-list.py` returns warnings but no errors:
|
|
10
|
+
1. Present warnings to user
|
|
11
|
+
2. Ask: "Proceed with these warnings, or fix them first?"
|
|
12
|
+
3. If user approves → write file and continue
|
|
13
|
+
4. If user wants fixes → address each warning, re-validate
|
|
14
|
+
|
|
15
|
+
### Errors Found
|
|
16
|
+
|
|
17
|
+
If validation returns errors:
|
|
18
|
+
1. Group errors by type (missing fields, invalid values, duplicate IDs, broken references)
|
|
19
|
+
2. Auto-fix where possible:
|
|
20
|
+
- Missing `status` → set to `pending`
|
|
21
|
+
- Duplicate IDs → re-number with next sequential B-NNN
|
|
22
|
+
- Invalid `priority` → re-derive from severity using the mapping table
|
|
23
|
+
3. Present fixes to user for confirmation
|
|
24
|
+
4. Re-validate after fixes
|
|
25
|
+
5. Maximum 3 total validation attempts — if still failing after 3 rounds, present the raw errors and ask user for guidance
|
|
26
|
+
|
|
27
|
+
### JSON Parse Failure
|
|
28
|
+
|
|
29
|
+
If the generated JSON is malformed:
|
|
30
|
+
1. Do not write the file
|
|
31
|
+
2. Regenerate from the collected bug data (Phase 2-3 state)
|
|
32
|
+
3. Re-validate before writing
|
|
33
|
+
|
|
34
|
+
## Resume Support
|
|
35
|
+
|
|
36
|
+
### Checkpoint-Based Resumption
|
|
37
|
+
|
|
38
|
+
When bug-planner detects existing artifacts, determine the last completed checkpoint and offer to resume:
|
|
39
|
+
|
|
40
|
+
| Existing Artifact | Last Checkpoint | Resume From |
|
|
41
|
+
|---|---|---|
|
|
42
|
+
| `.prizmkit/plans/bug-fix-list.json` (valid) | CP-BP-5 | Offer: "Valid bug list exists. Append new bugs (Route B) or regenerate?" |
|
|
43
|
+
| `.prizmkit/plans/bug-fix-list.json` (invalid) | CP-BP-4 | Re-run Phase 5 validation and fix |
|
|
44
|
+
| `.prizmkit/plans/bug-fix-list.draft.json` | CP-BP-2 or CP-BP-3 | Load draft, determine phase from content completeness, resume |
|
|
45
|
+
| `.prizmkit/config.json` with tech_stack | CP-BP-1 (partial) | Skip project context questions, start at Phase 2 |
|
|
46
|
+
| No artifacts | — | Start from Phase 1 |
|
|
47
|
+
|
|
48
|
+
### Resume Detection Flow
|
|
49
|
+
|
|
50
|
+
1. Check for `.prizmkit/plans/bug-fix-list.json`
|
|
51
|
+
- If exists and valid → offer Route B (append) or full regeneration
|
|
52
|
+
- If exists but invalid → offer to fix and re-validate (resume from CP-BP-4)
|
|
53
|
+
2. Check for `.prizmkit/plans/bug-fix-list.draft.json`
|
|
54
|
+
- If exists → load draft, count bugs with/without confirmation, resume from appropriate phase
|
|
55
|
+
3. Check for `.prizmkit/config.json`
|
|
56
|
+
- If exists with tech_stack → skip Phase 1 context gathering
|
|
57
|
+
4. If no artifacts → start fresh (Route A)
|
|
58
|
+
|
|
59
|
+
### Session Interruption Recovery
|
|
60
|
+
|
|
61
|
+
If a bug-planner session is interrupted mid-planning:
|
|
62
|
+
|
|
63
|
+
1. On next invocation, run the Resume Detection Flow above
|
|
64
|
+
2. If a draft exists, present: "Found a draft with N bugs from a previous session. Resume from where you left off, or start fresh?"
|
|
65
|
+
3. If user resumes → load draft state, skip completed phases
|
|
66
|
+
4. If user starts fresh → archive draft as `bug-fix-list.draft.TIMESTAMP.json`, begin Phase 1
|
|
67
|
+
|
|
68
|
+
## Draft Management
|
|
69
|
+
|
|
70
|
+
- Save drafts to `.prizmkit/plans/bug-fix-list.draft.json` after each completed phase (CP-BP-1 through CP-BP-4)
|
|
71
|
+
- Drafts use the same schema as the final file but may have incomplete fields
|
|
72
|
+
- Delete draft after successful generation of the final `bug-fix-list.json`
|
|
73
|
+
- Keep at most 1 draft — overwrite on each phase completion
|