prizmkit 1.1.112 → 1.1.114
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/codex/skill-adapter.js +4 -0
- package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +10 -10
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +1 -0
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +7 -0
- package/bundled/dev-pipeline/scripts/utils.py +8 -3
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +7 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +7 -1
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +7 -1
- package/bundled/dev-pipeline/templates/sections/bugfix-phase-commit-report.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +7 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +7 -1
- package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +7 -1
- package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +87 -21
- package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +14 -0
- package/bundled/dev-pipeline/tests/test_python_runner_parity.py +42 -0
- package/bundled/dev-pipeline/tests/test_runtime_helper.py +23 -0
- package/bundled/skills/_metadata.json +1 -1
- package/bundled/skills/app-planner/SKILL.md +18 -2
- package/bundled/skills/app-planner/references/generated-plan-review.md +67 -0
- package/bundled/skills/bug-planner/SKILL.md +19 -24
- package/bundled/skills/bug-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/bug-planner/scripts/validate-bug-list.py +43 -3
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +6 -6
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +7 -16
- package/bundled/skills/feature-planner/SKILL.md +17 -22
- package/bundled/skills/feature-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/feature-workflow/SKILL.md +8 -7
- package/bundled/skills/prizmkit-code-review/references/reviewer-agent-prompt.md +2 -2
- package/bundled/skills/prizmkit-deploy/references/database-setup.md +12 -3
- package/bundled/skills/prizmkit-init/SKILL.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +12 -14
- package/bundled/skills/prizmkit-test/SKILL.md +1 -1
- package/bundled/skills/prizmkit-test/references/boundary-coverage-protocol.md +1 -1
- package/bundled/skills/prizmkit-test/references/examples.md +2 -2
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +3 -2
- package/bundled/skills/refactor-planner/SKILL.md +20 -26
- package/bundled/skills/refactor-planner/references/fast-path.md +2 -2
- package/bundled/skills/refactor-planner/references/generated-plan-review.md +63 -0
- package/bundled/skills/refactor-workflow/SKILL.md +6 -5
- package/package.json +1 -1
- package/src/clean.js +60 -7
- package/src/config.js +61 -20
- package/src/gitignore-template.js +6 -3
- package/src/manifest.js +6 -2
- package/src/platforms.js +14 -0
- package/src/scaffold.js +198 -34
- package/src/upgrade.js +5 -2
|
@@ -283,42 +283,37 @@ Only proceed to Phase 5 after user confirms.
|
|
|
283
283
|
```
|
|
284
284
|
The script fills in defaults (`$schema`, `created_at`, `created_by`), validates all fields, and writes the final file only if validation passes.
|
|
285
285
|
3. **If validation fails**: Fix the draft and retry (max 3 attempts). If the script is unavailable, use the checklist in `${SKILL_DIR}/references/schema-validation.md`.
|
|
286
|
-
4. **Run the mandatory
|
|
287
|
-
5. **Output**: File path, summary, review result, validation outcome, and next steps
|
|
286
|
+
4. **Run the mandatory Local Generated-Plan Review Gate** (see §Local Generated-Plan Review Gate below): load `${SKILL_DIR}/references/generated-plan-review.md` and review only newly added/changed bug entries after validation passes and before success output.
|
|
287
|
+
5. **Output**: File path, summary, local generated-plan review result, validation outcome, and next steps
|
|
288
288
|
|
|
289
289
|
**Gate → CP-BP-5**: `bug-fix-list.json` passes validation script with zero errors.
|
|
290
290
|
|
|
291
|
-
**Gate → CP-BP-6**:
|
|
291
|
+
**Gate → CP-BP-6**: Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed bug entries, applied accepted fixes through draft/source data, regenerated, and revalidated.
|
|
292
292
|
|
|
293
|
-
##
|
|
293
|
+
## Local Generated-Plan Review Gate
|
|
294
294
|
|
|
295
|
-
User requirement preserved verbatim:
|
|
295
|
+
User requirement preserved verbatim: `there is a litter bug for prizm-code-review will to check git diff in working space and staged space , however the .prizmkit will be gitignored in most situation. so do you think the content should be change to inline a new reference file instead of use prizmkit-code-review`
|
|
296
296
|
|
|
297
|
-
Run this gate **after** `.prizmkit/plans/bug-fix-list.json` passes the validation/generate script and **before** any success output or next-step summary recommends `bugfix-pipeline-launcher`. This gate applies to Interactive Planning, From Log, From Tests, and
|
|
297
|
+
Run this gate **after** `.prizmkit/plans/bug-fix-list.json` passes the validation/generate script and **before** any success output or next-step summary recommends `bugfix-pipeline-launcher`. This gate applies to Interactive Planning, From Log, From Tests, and append-to-existing bug list flows when the current session generated, appended, or rewrote final bug planning content. For Validate, Summary, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
298
298
|
|
|
299
|
-
1. **
|
|
300
|
-
2. **
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
- preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
|
|
306
|
-
- task-scoped `user_context` isolation: no unrelated sibling bug descriptions, logs, stack traces, reproduction steps, or supplementary materials, and shared context appears on multiple items only when explicitly global
|
|
307
|
-
- severity/priority calibration: every reviewed bug has a short severity rationale and priority rationale, the preserved severity-to-priority mapping is followed, and high priority is not used without core outage, data loss/integrity, security/auth, timeout/crash, or no-workaround indicators
|
|
308
|
-
3. **Keep the review planning-only**: do NOT start `bugfix-pipeline-launcher`, do NOT run the bugfix pipeline, do NOT run tests/builds/installs, and do NOT implement source-code fixes.
|
|
309
|
-
4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
299
|
+
1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for this planner-output review loop.
|
|
300
|
+
2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/bug-fix-list.json`, `.prizmkit/plans/bug-fix-list.draft.json` when present, and any pre-session or in-memory draft snapshot. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
|
|
301
|
+
3. **Identify review scope**: compare by stable bug IDs and item fields against the pre-session list when one existed. Ignore root generator metadata such as `$schema`, `created_at`, and `created_by`. Review only newly added or changed bug entries; preserve unchanged historical entries except when needed to verify duplicate/root-cause overlap or dependency references.
|
|
302
|
+
4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG consistency, duplicate handling, root-cause overlap, description completeness, expected vs actual behavior, reproduction path, code-location hints, acceptance criteria measurability, user-provided wording preservation, task-scoped `user_context` isolation, and severity/priority calibration.
|
|
303
|
+
5. **Keep the review planning-only**: do NOT start `bugfix-pipeline-launcher`, do NOT run the bugfix pipeline, do NOT run tests/builds/installs, and do NOT implement source-code fixes.
|
|
304
|
+
6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
310
305
|
```bash
|
|
311
306
|
python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
|
|
312
307
|
```
|
|
313
308
|
Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
|
|
314
|
-
|
|
315
|
-
|
|
309
|
+
7. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
|
|
310
|
+
8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result.
|
|
316
311
|
|
|
317
312
|
#### Success Output
|
|
318
313
|
|
|
319
314
|
```
|
|
320
315
|
.prizmkit/plans/bug-fix-list.json generated with 3 bugs (1 critical, 1 medium, 1 low)
|
|
321
|
-
|
|
316
|
+
Local generated-plan review: PASS, reviewed B-001..B-003, accepted fixes: none, final validation: PASS
|
|
322
317
|
|
|
323
318
|
Next steps:
|
|
324
319
|
- Review: cat .prizmkit/plans/bug-fix-list.json
|
|
@@ -336,7 +331,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
336
331
|
| **CP-BP-3** | Priorities Set | Severity/priority assigned, duplicates resolved | 3 |
|
|
337
332
|
| **CP-BP-4** | Completeness Passed | All bugs pass headless execution readiness check | 4 |
|
|
338
333
|
| **CP-BP-5** | File Generated | `bug-fix-list.json` passes validation script | 5 |
|
|
339
|
-
| **CP-BP-6** | Plan Review Passed |
|
|
334
|
+
| **CP-BP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed bug entries, applied accepted fixes through draft/source data, regenerated, and revalidated | 5 |
|
|
340
335
|
|
|
341
336
|
**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.
|
|
342
337
|
|
|
@@ -363,7 +358,7 @@ Batch-parse error logs with minimal interaction: parse automatically, then requi
|
|
|
363
358
|
```bash
|
|
364
359
|
python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
|
|
365
360
|
```
|
|
366
|
-
7. If validation passes, run the mandatory
|
|
361
|
+
7. If validation passes, run the mandatory Local Generated-Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
|
|
367
362
|
|
|
368
363
|
## Operation: From Tests
|
|
369
364
|
|
|
@@ -381,7 +376,7 @@ Batch-parse failed test output:
|
|
|
381
376
|
```bash
|
|
382
377
|
python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
|
|
383
378
|
```
|
|
384
|
-
7. If validation passes, run the mandatory
|
|
379
|
+
7. If validation passes, run the mandatory Local Generated-Plan Review Gate before summarizing or recommending `bugfix-pipeline-launcher`.
|
|
385
380
|
|
|
386
381
|
## Operation: Validate
|
|
387
382
|
|
|
@@ -436,7 +431,7 @@ Recommend invoking `bugfix-pipeline-launcher` to configure and launch the pipeli
|
|
|
436
431
|
|
|
437
432
|
After `.prizmkit/plans/bug-fix-list.json` is generated, validated, and reviewed, present:
|
|
438
433
|
1. Summary of generated bugs (count, severity breakdown)
|
|
439
|
-
2.
|
|
434
|
+
2. Local generated-plan review result: verdict, reviewed bug IDs, accepted fixes (or "none"), and final validation result
|
|
440
435
|
3. Recommend: "Say 'start fixing' to launch the bugfix pipeline via `bugfix-pipeline-launcher`"
|
|
441
436
|
4. Alternative: fix a single bug interactively via `bug-fix-workflow`
|
|
442
437
|
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Generated Plan Review — Bug Planner
|
|
2
|
+
|
|
3
|
+
Use this local review loop after `.prizmkit/plans/bug-fix-list.json` has been generated and validated. This is a planner-output review, not an implementation/code-diff review.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
|
|
7
|
+
Run only when the current `bug-planner` session generated, appended, or rewrote final bug planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
8
|
+
|
|
9
|
+
## Direct Artifact Reads
|
|
10
|
+
|
|
11
|
+
Planning artifacts may be gitignored, untracked, or absent from staged and unstaged diffs. Read the actual files directly:
|
|
12
|
+
|
|
13
|
+
- Final list: `.prizmkit/plans/bug-fix-list.json`
|
|
14
|
+
- Draft/source list when present: `.prizmkit/plans/bug-fix-list.draft.json`
|
|
15
|
+
- Pre-session final list snapshot if captured in memory before edits
|
|
16
|
+
- In-memory draft object if the session has not written a draft file yet
|
|
17
|
+
|
|
18
|
+
Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether planner output exists or changed. Do not invoke `/prizmkit-code-review` for this planner-output gate; `/prizmkit-code-review` remains the implementation/code-diff review gate after `/prizmkit-implement`.
|
|
19
|
+
|
|
20
|
+
## Review Scope
|
|
21
|
+
|
|
22
|
+
1. If a pre-session final list exists, compare by stable bug IDs (`B-*`).
|
|
23
|
+
2. Treat bugs as changed only when item fields changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
|
|
24
|
+
3. Review newly added bug IDs and changed bug IDs.
|
|
25
|
+
4. Preserve unchanged historical bugs. Read unchanged entries only when needed to verify dependency references, duplicate handling, or root-cause overlap with reviewed bugs.
|
|
26
|
+
5. If no snapshot exists, review all bug entries produced by the current generation flow.
|
|
27
|
+
|
|
28
|
+
## Review Checklist
|
|
29
|
+
|
|
30
|
+
For every reviewed bug entry, check:
|
|
31
|
+
|
|
32
|
+
- Schema compatibility with `dev-pipeline-bug-fix-list-v1` and `.prizmkit/dev-pipeline/templates/bug-fix-list-schema.json`
|
|
33
|
+
- Dependency/DAG consistency, duplicate handling, and root-cause overlap
|
|
34
|
+
- Description completeness: expected vs actual behavior, reproduction path, code-location hints, affected environment, and headless execution readiness
|
|
35
|
+
- Acceptance criteria specificity and measurable verification method
|
|
36
|
+
- User-provided wording preservation in `description`, `acceptance_criteria`, and `user_context`
|
|
37
|
+
- Task-scoped `user_context` isolation: no unrelated sibling bug descriptions, logs, stack traces, reproduction steps, expected/actual behavior notes, or supplementary materials; shared context appears on multiple bugs only when explicitly global
|
|
38
|
+
- Severity/priority calibration: every reviewed bug has a short severity rationale and priority rationale, the preserved severity-to-priority mapping is followed, and high priority is not used without core outage, data loss/integrity, security/auth, timeout/crash, or no-workaround indicators
|
|
39
|
+
- Browser interaction and verification fields for UI-reproducible bugs when applicable
|
|
40
|
+
|
|
41
|
+
## Fix Loop
|
|
42
|
+
|
|
43
|
+
1. Present findings with IDs, severity, evidence, and suggested draft/source changes.
|
|
44
|
+
2. Accept only findings that improve planner correctness, completeness, or downstream bug-fix execution readiness.
|
|
45
|
+
3. Apply accepted fixes to `.prizmkit/plans/bug-fix-list.draft.json` or the in-memory draft object first.
|
|
46
|
+
4. Regenerate the final list through the existing generator:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 ${SKILL_DIR}/scripts/validate-bug-list.py generate --input .prizmkit/plans/bug-fix-list.draft.json --output .prizmkit/plans/bug-fix-list.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. Re-run validation/generation until valid. Do not hand-patch `.prizmkit/plans/bug-fix-list.json` as the source of truth.
|
|
53
|
+
6. Repeat the local review only for entries changed by accepted fixes.
|
|
54
|
+
|
|
55
|
+
## Report Format
|
|
56
|
+
|
|
57
|
+
Report in the final handoff summary:
|
|
58
|
+
|
|
59
|
+
- `Local generated-plan review: PASS` or `NEEDS_FIXES`
|
|
60
|
+
- Reviewed bug IDs
|
|
61
|
+
- Accepted fixes, or `none`
|
|
62
|
+
- Final validation result
|
|
63
|
+
- Note when review was not applicable because no new final planning content was written
|
|
@@ -34,6 +34,38 @@ BUG_ID_PATTERN = re.compile(r"^B-\d{3}$")
|
|
|
34
34
|
SCHEMA_VERSION = "dev-pipeline-bug-fix-list-v1"
|
|
35
35
|
|
|
36
36
|
|
|
37
|
+
def _find_dependency_cycle(dep_map, item_ids):
|
|
38
|
+
"""Return one dependency cycle as a list of bug IDs, or an empty list."""
|
|
39
|
+
visiting = set()
|
|
40
|
+
visited = set()
|
|
41
|
+
stack = []
|
|
42
|
+
|
|
43
|
+
def visit(node):
|
|
44
|
+
visiting.add(node)
|
|
45
|
+
stack.append(node)
|
|
46
|
+
for dep in dep_map.get(node, []):
|
|
47
|
+
if dep not in item_ids:
|
|
48
|
+
continue
|
|
49
|
+
if dep in visiting:
|
|
50
|
+
start = stack.index(dep)
|
|
51
|
+
return stack[start:] + [dep]
|
|
52
|
+
if dep not in visited:
|
|
53
|
+
cycle = visit(dep)
|
|
54
|
+
if cycle:
|
|
55
|
+
return cycle
|
|
56
|
+
stack.pop()
|
|
57
|
+
visiting.remove(node)
|
|
58
|
+
visited.add(node)
|
|
59
|
+
return []
|
|
60
|
+
|
|
61
|
+
for bug_id in sorted(item_ids):
|
|
62
|
+
if bug_id not in visited:
|
|
63
|
+
cycle = visit(bug_id)
|
|
64
|
+
if cycle:
|
|
65
|
+
return cycle
|
|
66
|
+
return []
|
|
67
|
+
|
|
68
|
+
|
|
37
69
|
def _err(msg):
|
|
38
70
|
"""Print an error message to stderr."""
|
|
39
71
|
print("ERROR: {}".format(msg), file=sys.stderr)
|
|
@@ -181,15 +213,23 @@ def validate(data, feature_ids=None):
|
|
|
181
213
|
for bug in bugs
|
|
182
214
|
if BUG_ID_PATTERN.match(str(bug.get("id", "")))
|
|
183
215
|
}
|
|
216
|
+
dep_map = {bug_id: [] for bug_id in known_ids}
|
|
184
217
|
for i, bug in enumerate(bugs):
|
|
185
218
|
bug_id = bug.get("id", "")
|
|
186
219
|
deps = bug.get("dependencies", []) or []
|
|
187
220
|
if not isinstance(deps, list):
|
|
188
221
|
continue
|
|
189
222
|
for dep in deps:
|
|
190
|
-
if isinstance(dep, str) and BUG_ID_PATTERN.match(dep)
|
|
191
|
-
|
|
192
|
-
|
|
223
|
+
if isinstance(dep, str) and BUG_ID_PATTERN.match(dep):
|
|
224
|
+
if dep not in known_ids:
|
|
225
|
+
errors.append("bugs[{}] ({}): dependency '{}' does not exist".format(
|
|
226
|
+
i, bug_id, dep))
|
|
227
|
+
elif BUG_ID_PATTERN.match(str(bug_id)):
|
|
228
|
+
dep_map.setdefault(bug_id, []).append(dep)
|
|
229
|
+
|
|
230
|
+
cycle = _find_dependency_cycle(dep_map, known_ids)
|
|
231
|
+
if cycle:
|
|
232
|
+
errors.append("Dependency cycle detected: {}".format(" -> ".join(cycle)))
|
|
193
233
|
|
|
194
234
|
return {
|
|
195
235
|
"valid": len(errors) == 0,
|
|
@@ -5,7 +5,7 @@ description: "Launch and manage the bugfix pipeline from within an AI CLI sessio
|
|
|
5
5
|
|
|
6
6
|
# Bugfix-Pipeline Launcher
|
|
7
7
|
|
|
8
|
-
Launch the autonomous bug fix pipeline from within an AI CLI conversation.
|
|
8
|
+
Launch the autonomous bug fix pipeline from within an AI CLI conversation. Only Background daemon mode is fully detached and survives AI CLI session closure; Foreground runs in the current session, and Manual prints commands without launching.
|
|
9
9
|
|
|
10
10
|
### Execution Mode
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ Three execution modes are available. The user chooses one before configuring oth
|
|
|
15
15
|
2. **Background daemon** — `python3 ./.prizmkit/dev-pipeline/cli.py daemon bugfix start .prizmkit/plans/bug-fix-list.json`. Runs fully detached, survives AI CLI session closure.
|
|
16
16
|
3. **Manual** — Display the assembled command(s) only. Do not execute anything. User runs them on their own.
|
|
17
17
|
|
|
18
|
-
**Background mode traceability**: Daemon mode metadata and logs are written by the Python runtime (`daemon bugfix start/status/logs`). Do not
|
|
18
|
+
**Background mode traceability**: Daemon mode metadata and logs are written by the Python runtime (`daemon bugfix start/status/logs`). Do not create any extra launcher-managed audit file.
|
|
19
19
|
|
|
20
20
|
### When to Use
|
|
21
21
|
|
|
@@ -90,7 +90,6 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
90
90
|
data = json.load(f)
|
|
91
91
|
bugs = data.get('bugs', [])
|
|
92
92
|
severity_order = {'critical': 0, 'high': 1, 'medium': 2, 'low': 3}
|
|
93
|
-
bugs_sorted = sorted(bugs, key=lambda b: (severity_order.get(b.get('severity', 'medium'), 2), b.get('priority', 99)))
|
|
94
93
|
print(f'Total bugs: {len(bugs)}')
|
|
95
94
|
sev_counts = {}
|
|
96
95
|
for b in bugs:
|
|
@@ -98,7 +97,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
98
97
|
sev_counts[s] = sev_counts.get(s, 0) + 1
|
|
99
98
|
print(f'By severity: {dict(sorted(sev_counts.items(), key=lambda x: severity_order.get(x[0], 2)))}')
|
|
100
99
|
print()
|
|
101
|
-
for b in
|
|
100
|
+
for b in bugs:
|
|
102
101
|
print(f\" {b['id']}: [{b.get('severity','?').upper()}] {b.get('title', 'untitled')}\")
|
|
103
102
|
"
|
|
104
103
|
```
|
|
@@ -165,6 +164,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
165
164
|
- Summarize results: total bugs, fixed, failed, skipped
|
|
166
165
|
- If all fixed: each bug session has already run `prizmkit-retrospective` internally (structural sync by default; full retrospective when the fix changed interfaces, dependencies, or observable behavior). Ask user what's next.
|
|
167
166
|
- If some failed: show failed bug IDs and suggest `python3 ./.prizmkit/dev-pipeline/cli.py reset bugfix <B-XXX> --clean --run` for a fresh retry
|
|
167
|
+
- **Browser verification**: Bug sessions with `browser_interaction` perform their own verification attempts during execution. After completion, use `python3 ./.prizmkit/dev-pipeline/cli.py bugfix status .prizmkit/plans/bug-fix-list.json` and per-bug session logs as the source of truth before summarizing browser verification results.
|
|
168
168
|
|
|
169
169
|
**If background daemon**:
|
|
170
170
|
1. Verify launch:
|
|
@@ -264,9 +264,9 @@ Read `${SKILL_DIR}/references/configuration.md` for the full error handling tabl
|
|
|
264
264
|
### Integration Notes
|
|
265
265
|
|
|
266
266
|
- **After bug-planner**: This is the natural next step. When user finishes bug planning and has `.prizmkit/plans/bug-fix-list.json`, suggest launching the bugfix pipeline.
|
|
267
|
-
- **Session independence**:
|
|
267
|
+
- **Session independence**: Only Background daemon mode runs detached. Foreground runs in the current AI CLI session, and Manual mode prints commands without launching.
|
|
268
268
|
- **Single instance per family**: Only one bugfix pipeline can run at a time. Different pipeline families may coexist because they use separate daemon metadata and state directories.
|
|
269
|
-
- **
|
|
269
|
+
- **Pipeline coexistence**: Bugfix, feature, and refactor pipelines use separate state directories (`.prizmkit/state/bugfix/`, `.prizmkit/state/features/`, `.prizmkit/state/refactor/`), so all three can run simultaneously without conflict.
|
|
270
270
|
- **State preservation**: Stopping and restarting the bugfix pipeline resumes from where it left off -- completed bugs are not re-fixed.
|
|
271
271
|
- **Bug ordering**: Dependencies are active. Runtime selects eligible bugs in stable list order after dependencies are completed; planners should order unrelated bugs by severity/priority before launch.
|
|
272
272
|
- **Background mode traceability**: Daemon mode metadata/logging is runtime-owned; use `daemon bugfix status` and `daemon bugfix logs`.
|
|
@@ -309,22 +309,13 @@ Notes:
|
|
|
309
309
|
|
|
310
310
|
After pipeline completion, if features have `browser_interaction` fields and the corresponding browser tool (`playwright-cli` or `opencli`) is installed:
|
|
311
311
|
|
|
312
|
-
If list status may be stale,
|
|
312
|
+
If list status may be stale, use the runtime status command as the source of truth for completion state:
|
|
313
313
|
`python3 ./.prizmkit/dev-pipeline/cli.py feature status .prizmkit/plans/feature-list.json`.
|
|
314
314
|
|
|
315
|
-
1. **Check which features
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
with open('.prizmkit/plans/feature-list.json') as f:
|
|
320
|
-
data = json.load(f)
|
|
321
|
-
for feat in data.get('features', []):
|
|
322
|
-
bi = feat.get('browser_interaction')
|
|
323
|
-
if bi and feat.get('status') == 'completed':
|
|
324
|
-
tool = bi.get('tool', 'auto') if isinstance(bi, dict) else 'auto'
|
|
325
|
-
print(f\" {feat['id']}: {feat.get('title','')} (tool: {tool})\")
|
|
326
|
-
" 2>/dev/null
|
|
327
|
-
```
|
|
315
|
+
1. **Check which completed features have browser verification configured**:
|
|
316
|
+
- Read `browser_interaction` configuration from `.prizmkit/plans/feature-list.json`.
|
|
317
|
+
- Use the runtime status command output to decide which configured features are actually completed.
|
|
318
|
+
- Do not rely on list-file `status` alone when runtime state exists, because daemon/foreground bookkeeping may be newer than the plan file.
|
|
328
319
|
|
|
329
320
|
2. **Ask user**: "N features have browser verification configured. Run browser verification now? (Y/n)"
|
|
330
321
|
|
|
@@ -352,8 +343,8 @@ Read `${SKILL_DIR}/references/configuration.md` for the full error handling tabl
|
|
|
352
343
|
### Integration Notes
|
|
353
344
|
|
|
354
345
|
- **After feature-planner**: This is the natural next step. When user finishes planning and has `.prizmkit/plans/feature-list.json`, suggest launching the pipeline.
|
|
355
|
-
- **Session independence**:
|
|
346
|
+
- **Session independence**: Only Background daemon mode runs detached. Foreground runs in the current AI CLI session, and Manual mode prints commands without launching.
|
|
356
347
|
- **Single instance per family**: Only one feature pipeline can run at a time. Different pipeline families may coexist because they use separate daemon metadata and state directories.
|
|
357
|
-
- **Pipeline coexistence**: Feature and
|
|
348
|
+
- **Pipeline coexistence**: Feature, bugfix, and refactor pipelines use separate state directories (`.prizmkit/state/features/`, `.prizmkit/state/bugfix/`, `.prizmkit/state/refactor/`), so all three can run simultaneously without conflict.
|
|
358
349
|
- **State preservation**: Stopping and restarting the pipeline resumes from where it left off -- completed features are not re-run.
|
|
359
350
|
- **HANDOFF**: After pipeline completes all features, each session has already run `prizmkit-retrospective` internally. Ask user what's next.
|
|
@@ -253,8 +253,8 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
|
253
253
|
7. Build or append `.prizmkit/plans/feature-list.json`
|
|
254
254
|
8. Apply default testing strategy (see §Testing Defaults below)
|
|
255
255
|
9. Validate and fix until pass
|
|
256
|
-
10. Run the mandatory
|
|
257
|
-
11. Summarize final feature table with review result and validation outcome
|
|
256
|
+
10. Run the mandatory Local Generated-Plan Review Gate (see §Local Generated-Plan Review Gate below); apply accepted fixes to the draft/source plan, regenerate, and revalidate until pass
|
|
257
|
+
11. Summarize final feature table with local review result and validation outcome
|
|
258
258
|
|
|
259
259
|
### Checkpoints (Mandatory Gates)
|
|
260
260
|
|
|
@@ -270,7 +270,7 @@ Checkpoints catch cascading errors early — skipping one means the next phase b
|
|
|
270
270
|
| **CP-FP-3.3** | Completeness Review Passed | All features reviewed for description adequacy and cross-feature gaps | 6 |
|
|
271
271
|
| **CP-FP-4** | `.prizmkit/plans/feature-list.json` Generated | Schema validates, all required keys present | 7-8 |
|
|
272
272
|
| **CP-FP-5** | Final Validation Pass | Python script returns `"valid": true` with zero errors | 9 |
|
|
273
|
-
| **CP-FP-6** | Plan Review Passed |
|
|
273
|
+
| **CP-FP-6** | Local Plan Review Passed | Local generated-plan review loaded `${SKILL_DIR}/references/generated-plan-review.md`, reviewed only newly added/changed feature entries, applied accepted fixes through draft/source data, regenerated, and revalidated | 10 |
|
|
274
274
|
|
|
275
275
|
**Resume Detection**: If existing artifacts are found, read `${SKILL_DIR}/references/error-recovery.md` §Resume Support for checkpoint-based resumption.
|
|
276
276
|
|
|
@@ -320,7 +320,7 @@ For simple incremental planning, skip detailed Phase 2-3 analysis:
|
|
|
320
320
|
```bash
|
|
321
321
|
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
322
322
|
```
|
|
323
|
-
6. If valid → run the mandatory
|
|
323
|
+
6. If valid → run the mandatory Local Generated-Plan Review Gate, then summarize and recommend next step
|
|
324
324
|
7. If invalid → apply fixes to the draft, re-run generate (max 2 attempts, then escalate to full workflow)
|
|
325
325
|
|
|
326
326
|
## Browser Interaction Planning
|
|
@@ -373,29 +373,24 @@ python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit
|
|
|
373
373
|
```
|
|
374
374
|
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.
|
|
375
375
|
|
|
376
|
-
##
|
|
376
|
+
## Local Generated-Plan Review Gate
|
|
377
377
|
|
|
378
|
-
User requirement preserved verbatim:
|
|
378
|
+
User requirement preserved verbatim: `there is a litter bug for prizm-code-review will to check git diff in working space and staged space , however the .prizmkit will be gitignored in most situation. so do you think the content should be change to inline a new reference file instead of use prizmkit-code-review`
|
|
379
379
|
|
|
380
|
-
Run this gate **after** `.prizmkit/plans/feature-list.json` passes the validation/generate script and **before** the final handoff summary recommends `feature-pipeline-launcher`. This gate applies to full workflow and fast-path incremental planning.
|
|
380
|
+
Run this gate **after** `.prizmkit/plans/feature-list.json` passes the validation/generate script and **before** the final handoff summary recommends `feature-pipeline-launcher`. This gate applies to full workflow and fast-path incremental planning when the current session generated, appended, or rewrote final feature planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
381
381
|
|
|
382
|
-
1. **
|
|
383
|
-
2. **
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
- preservation of user-provided wording in `description`, `acceptance_criteria`, and `user_context`
|
|
389
|
-
- task-scoped `user_context` isolation: no unrelated sibling feature descriptions, file references, or supplementary materials, and shared context appears on multiple items only when explicitly global
|
|
390
|
-
- priority/complexity calibration: every reviewed feature has a short priority rationale and complexity rationale, medium/low assignments are allowed when criteria fit, and high/high is not used merely because work is framework-related, multi-file, or user-requested
|
|
391
|
-
3. **Keep the review planning-only**: do NOT start `feature-pipeline-launcher`, do NOT run the dev-pipeline, do NOT run tests/builds/installs, and do NOT implement source-code changes.
|
|
392
|
-
4. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/feature-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
382
|
+
1. **Load the local reference**: read `${SKILL_DIR}/references/generated-plan-review.md` and follow it as the source of truth for this planner-output review loop.
|
|
383
|
+
2. **Read actual planning artifacts directly**: inspect `.prizmkit/plans/feature-list.json`, `.prizmkit/plans/feature-list.draft.json` when present, and any pre-session or in-memory draft snapshot. Do not rely on `git status`, `git diff`, or `git diff --cached`, because `.prizmkit` planning artifacts are often gitignored or untracked.
|
|
384
|
+
3. **Identify review scope**: compare by stable feature IDs and item fields against the pre-session list when one existed. Ignore root generator metadata such as `$schema`, `created_at`, and `created_by`. Review only newly added or changed feature entries; preserve unchanged historical entries except when needed to verify dependency references.
|
|
385
|
+
4. **Run the local checklist** from the reference: schema compatibility, dependency/DAG soundness, description completeness, headless execution readiness, acceptance criteria measurability, user-provided wording preservation, task-scoped `user_context` isolation, priority/complexity calibration, and browser interaction fields when applicable.
|
|
386
|
+
5. **Keep the review planning-only**: do NOT start `feature-pipeline-launcher`, do NOT run the dev-pipeline, do NOT run tests/builds/installs, and do NOT implement source-code changes.
|
|
387
|
+
6. **Apply accepted review fixes through the draft/source plan**: when a finding is accepted, update `.prizmkit/plans/feature-list.draft.json` or the in-memory draft representation first, then regenerate the final file with:
|
|
393
388
|
```bash
|
|
394
389
|
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
395
390
|
```
|
|
396
391
|
Do not hand-patch the final JSON as the source of truth; map final-output findings back to draft entries before regeneration.
|
|
397
|
-
|
|
398
|
-
|
|
392
|
+
7. **Revalidate after every accepted fix batch**: the generate script must pass again before the planner can proceed. If validation fails, fix the draft and rerun until pass.
|
|
393
|
+
8. **Report the gate outcome** in the final summary: include local generated-plan review verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result.
|
|
399
394
|
|
|
400
395
|
## Testing Defaults (Phase 8)
|
|
401
396
|
|
|
@@ -445,11 +440,11 @@ When the session appears to be ending:
|
|
|
445
440
|
|
|
446
441
|
## Handoff Message Template
|
|
447
442
|
|
|
448
|
-
After successful validation and the
|
|
443
|
+
After successful validation and the Local Generated-Plan Review Gate, report:
|
|
449
444
|
1. Output file path
|
|
450
445
|
2. Total features + newly added features
|
|
451
446
|
3. Dependency and priority highlights
|
|
452
|
-
4.
|
|
447
|
+
4. Local generated-plan review result: verdict, reviewed feature IDs, accepted fixes (or "none"), and final validation result
|
|
453
448
|
5. Recommended next action: `feature-pipeline-launcher`
|
|
454
449
|
|
|
455
450
|
Then apply the post-planning handoff in §Scope Boundary (ask before proceeding; never auto-execute).
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Generated Plan Review — Feature Planner
|
|
2
|
+
|
|
3
|
+
Use this local review loop after `.prizmkit/plans/feature-list.json` has been generated and validated. This is a planner-output review, not an implementation/code-diff review.
|
|
4
|
+
|
|
5
|
+
## Trigger
|
|
6
|
+
|
|
7
|
+
Run only when the current `feature-planner` session generated, appended, or rewrote final feature planning content. For validate-only, summary-only, or draft-save flows with no new final planning content, report: `Local generated-plan review: not applicable — no new final planning content written.`
|
|
8
|
+
|
|
9
|
+
## Direct Artifact Reads
|
|
10
|
+
|
|
11
|
+
Planning artifacts may be gitignored, untracked, or absent from staged and unstaged diffs. Read the actual files directly:
|
|
12
|
+
|
|
13
|
+
- Final list: `.prizmkit/plans/feature-list.json`
|
|
14
|
+
- Draft/source list when present: `.prizmkit/plans/feature-list.draft.json`
|
|
15
|
+
- Pre-session final list snapshot if captured in memory before edits
|
|
16
|
+
- In-memory draft object if the session has not written a draft file yet
|
|
17
|
+
|
|
18
|
+
Do not rely on `git status`, `git diff`, or `git diff --cached` to decide whether planner output exists or changed. Do not invoke `/prizmkit-code-review` for this planner-output gate; `/prizmkit-code-review` remains the implementation/code-diff review gate after `/prizmkit-implement`.
|
|
19
|
+
|
|
20
|
+
## Review Scope
|
|
21
|
+
|
|
22
|
+
1. If a pre-session final list exists, compare by stable feature IDs (`F-*`).
|
|
23
|
+
2. Treat features as changed only when item fields changed. Ignore root generator metadata and formatting-only differences such as `$schema`, `created_at`, and `created_by`.
|
|
24
|
+
3. Review newly added feature IDs and changed feature IDs.
|
|
25
|
+
4. Preserve unchanged historical features. Read unchanged entries only when needed to verify dependency references from reviewed features.
|
|
26
|
+
5. If no snapshot exists, review all feature entries produced by the current generation flow.
|
|
27
|
+
|
|
28
|
+
## Review Checklist
|
|
29
|
+
|
|
30
|
+
For every reviewed feature entry, check:
|
|
31
|
+
|
|
32
|
+
- Schema compatibility with `dev-pipeline-feature-list-v1` and `.prizmkit/dev-pipeline/templates/feature-list-schema.json`
|
|
33
|
+
- Dependency/DAG soundness: dependencies exist, no cycles, no poorly ordered prerequisite chains
|
|
34
|
+
- Description completeness and headless execution readiness
|
|
35
|
+
- Acceptance criteria specificity, measurability, and coverage of the described behavior
|
|
36
|
+
- User-provided wording preservation in `description`, `acceptance_criteria`, and `user_context`
|
|
37
|
+
- Task-scoped `user_context` isolation: no unrelated sibling feature descriptions, file references, or supplementary materials; shared context appears on multiple items only when explicitly global
|
|
38
|
+
- Priority/complexity calibration: every reviewed feature has short priority and complexity rationales, medium/low assignments are allowed when criteria fit, and high/high is not used merely because work is framework-related, multi-file, or user-requested
|
|
39
|
+
- Browser interaction fields for qualifying frontend/fullstack features when applicable
|
|
40
|
+
|
|
41
|
+
## Fix Loop
|
|
42
|
+
|
|
43
|
+
1. Present findings with IDs, severity, evidence, and suggested draft/source changes.
|
|
44
|
+
2. Accept only findings that improve planner correctness, completeness, or downstream execution readiness.
|
|
45
|
+
3. Apply accepted fixes to `.prizmkit/plans/feature-list.draft.json` or the in-memory draft object first.
|
|
46
|
+
4. Regenerate the final list through the existing generator:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
python3 ${SKILL_DIR}/scripts/validate-and-generate.py generate --input .prizmkit/plans/feature-list.draft.json --output .prizmkit/plans/feature-list.json
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
5. Re-run validation/generation until valid. Do not hand-patch `.prizmkit/plans/feature-list.json` as the source of truth.
|
|
53
|
+
6. Repeat the local review only for entries changed by accepted fixes.
|
|
54
|
+
|
|
55
|
+
## Report Format
|
|
56
|
+
|
|
57
|
+
Report in the final handoff summary:
|
|
58
|
+
|
|
59
|
+
- `Local generated-plan review: PASS` or `NEEDS_FIXES`
|
|
60
|
+
- Reviewed feature IDs
|
|
61
|
+
- Accepted fixes, or `none`
|
|
62
|
+
- Final validation result
|
|
63
|
+
- Note when review was not applicable because no new final planning content was written
|
|
@@ -87,7 +87,7 @@ For existing-project feature work:
|
|
|
87
87
|
Question: How would you like to proceed?
|
|
88
88
|
Header: Approach
|
|
89
89
|
Options:
|
|
90
|
-
- Implement now (Fast Path) — current session/current workspace via /prizmkit-plan -> /prizmkit-implement -> review/retro/
|
|
90
|
+
- Implement now (Fast Path) — current session/current workspace via simplified /prizmkit-plan -> /prizmkit-implement -> conditional test/review/retro -> /prizmkit-committer
|
|
91
91
|
- Use Pipeline Path — feature-planner creates/reviews feature-list.json, then feature-pipeline-launcher configures execution
|
|
92
92
|
- Continue clarifying — ask a few more route-level questions before choosing
|
|
93
93
|
```
|
|
@@ -166,12 +166,13 @@ Do not generate `feature-list.json` inside this workflow; `feature-planner` owns
|
|
|
166
166
|
|
|
167
167
|
Use Fast Path only after explicit user selection.
|
|
168
168
|
|
|
169
|
-
1. Invoke `/prizmkit-plan` with the handoff brief.
|
|
169
|
+
1. Invoke `/prizmkit-plan` with the handoff brief; use simplified planning for this scoped feature.
|
|
170
170
|
2. Invoke `/prizmkit-implement` after the plan is ready.
|
|
171
|
-
3. Run `/prizmkit-
|
|
172
|
-
4. Run `/prizmkit-
|
|
173
|
-
5. Run `/prizmkit-
|
|
174
|
-
6.
|
|
171
|
+
3. Run `/prizmkit-test` only when risk triggers match: behavior, public interface, data model, security/permission/payment, deployment readiness, or explicit user verification request.
|
|
172
|
+
4. Run `/prizmkit-code-review` when the user requested review, implementation uncertainty is high, or Full-path-level risk appears during implementation.
|
|
173
|
+
5. Run `/prizmkit-retrospective` only when structure, interfaces, dependencies, behavior, or durable project knowledge changed.
|
|
174
|
+
6. Run `/prizmkit-committer` with a `feat(<scope>):` message.
|
|
175
|
+
7. End the workflow after commit; do not call `feature-planner`, `feature-pipeline-launcher`, or monitoring.
|
|
175
176
|
|
|
176
177
|
If implementation scope grows beyond the Fast Path criteria, pause and ask whether to switch to Pipeline Path.
|
|
177
178
|
|
|
@@ -236,6 +237,6 @@ For start/stop/logs/retry execution, hand off to `feature-pipeline-launcher`; do
|
|
|
236
237
|
|
|
237
238
|
## Output
|
|
238
239
|
|
|
239
|
-
- Fast Path: `spec.md`, `plan.md`, code changes, review
|
|
240
|
+
- Fast Path: concise `spec.md`, simplified `plan.md`, code changes, conditional test/review evidence when triggered, Prizm docs sync only when durable knowledge changed, and one feature commit.
|
|
240
241
|
- Pipeline Path: handoff brief, validated `.prizmkit/plans/feature-list.json` from `feature-planner`, and pipeline launch/status handled by `feature-pipeline-launcher`.
|
|
241
242
|
- Greenfield path: app-level planning artifacts from `app-planner`, optionally followed by feature planning and launch.
|
|
@@ -12,7 +12,7 @@ You are the dedicated PrizmKit Reviewer agent (`prizm-dev-team-reviewer`). Revie
|
|
|
12
12
|
{architecture decisions and task list from plan.md}
|
|
13
13
|
|
|
14
14
|
## Scoped Test Report
|
|
15
|
-
{summary from artifact_dir/test-report-path.txt and test-report.md, including Scope, Generated / Updated Tests, In-Scope Failures, Baseline Failures, Out of Scope Gaps, Boundary Matrix / Boundary Completion Gate if present, and Verdict. If no scoped report exists for a
|
|
15
|
+
{summary from artifact_dir/test-report-path.txt and test-report.md, including Scope, Generated / Updated Tests, In-Scope Failures, Baseline Failures, Out of Scope Gaps, Boundary Matrix / Boundary Completion Gate if present, and Verdict. If no scoped report exists for a change artifact, write "No scoped /prizmkit-test report found (expected for pre-test review)." Treat that absence as informational unless the calling workflow explicitly requires a prior test report.}
|
|
16
16
|
|
|
17
17
|
## Workspace Context
|
|
18
18
|
{git status, unstaged diff summary, staged diff summary, current working directory, expected active checkout git top-level, and new-file paths captured by the Main Agent in Phase 0 from the active checkout. This is your primary review scope — use this context to understand what changed. Request targeted file reads only when you need specific line-level detail for a finding, not to re-discover or re-index the repository. Do not read files that are not in the workspace context unless you need them to verify impact (callers, dependents, shared patterns). Do not switch to a separate worktree or repository copy — the Main Agent has provided everything needed to understand the change set.}
|
|
@@ -49,7 +49,7 @@ Evaluate the changes across these dimensions (focus on what's relevant):
|
|
|
49
49
|
3. **Completeness**: Files that should have been changed but weren't? Missing tests, types, imports, exports?
|
|
50
50
|
4. **Consistency**: Do changes follow the project's existing patterns, naming conventions, and code style?
|
|
51
51
|
5. **Security**: Hardcoded secrets, injection vulnerabilities, unsafe operations.
|
|
52
|
-
6. **Test quality**: If a scoped `/prizmkit-test` report is present, verify the report scope is `this-change`, the artifact dir matches the
|
|
52
|
+
6. **Test quality**: If a scoped `/prizmkit-test` report is present, verify the report scope is `this-change`, the artifact dir matches the reviewed change, generated/updated tests assert real behavior rather than mock success or empty assertions, in-scope failures are not mislabeled as baseline failures, baseline failures are genuinely unrelated or pre-existing, out-of-scope gaps were not turned into unrelated test changes, and the report verdict is compatible with proceeding.
|
|
53
53
|
7. **Rules compliance**: (Skip this dimension if no dev rules were provided.) Do changes follow the per-layer dev rules? Flag violations of framework conventions, naming patterns, state management, or other rules defined for that layer.
|
|
54
54
|
|
|
55
55
|
## Output Format
|
|
@@ -10,7 +10,14 @@ During Discovery Step 1 (Project Detection), database drivers were already scann
|
|
|
10
10
|
> - **Yes** → proceed with database installation
|
|
11
11
|
> - **No** → skip, record in deploy.md with note "database must be configured by user"
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Secrets file safety
|
|
14
|
+
|
|
15
|
+
Before writing `.prizmkit/deploy/secrets.local.json`:
|
|
16
|
+
|
|
17
|
+
1. Verify `.gitignore` or an equivalent ignore rule covers `.prizmkit/deploy/secrets.local.json` and any `.prizmkit/deploy/*.local.json` pattern used by the project.
|
|
18
|
+
2. If the ignore rule is missing, pause and add or request the ignore rule before writing secrets.
|
|
19
|
+
3. Set the secrets file permissions to current-user read/write only, for example `chmod 600 .prizmkit/deploy/secrets.local.json` on POSIX systems.
|
|
20
|
+
4. Record only presence metadata in deploy config, docs, reports, and history. Never copy raw passwords, connection strings, passphrases, decryption keys, unsalted hashes, or full env var values into committed files.
|
|
14
21
|
|
|
15
22
|
```
|
|
16
23
|
apt-get install -y postgresql postgresql-contrib
|
|
@@ -21,7 +28,8 @@ sudo -u postgres psql -c "GRANT ALL ON DATABASE <project> TO <project>;"
|
|
|
21
28
|
|
|
22
29
|
- Generate a secure random password (32 chars, alphanumeric + symbols).
|
|
23
30
|
- Write the connection string to `.prizmkit/deploy/secrets.local.json`: `DATABASE_URL=postgresql://<project>:<password>@localhost:5432/<project>`.
|
|
24
|
-
-
|
|
31
|
+
- Set `.prizmkit/deploy/secrets.local.json` permissions to current-user read/write only after writing.
|
|
32
|
+
- In deploy.md, write: "PostgreSQL installed, connection info recorded in `.prizmkit/deploy/secrets.local.json` (gitignored; raw value not committed)".
|
|
25
33
|
|
|
26
34
|
## MySQL setup (future)
|
|
27
35
|
|
|
@@ -37,10 +45,11 @@ redis-cli CONFIG REWRITE
|
|
|
37
45
|
|
|
38
46
|
- Bind to localhost only (modify `/etc/redis/redis.conf` if needed).
|
|
39
47
|
- Write `REDIS_URL=redis://:<password>@localhost:6379` to `.prizmkit/deploy/secrets.local.json`.
|
|
48
|
+
- Set `.prizmkit/deploy/secrets.local.json` permissions to current-user read/write only after writing.
|
|
40
49
|
|
|
41
50
|
## Security notes
|
|
42
51
|
|
|
43
52
|
- Never write database passwords to deploy.md, because deploy.md may be committed to git and passwords would leak.
|
|
44
|
-
- Passwords stored in `.prizmkit/deploy/secrets.local.json`
|
|
53
|
+
- Passwords stored in `.prizmkit/deploy/secrets.local.json` only after verifying the file is ignored by git and locked down to current-user read/write permissions.
|
|
45
54
|
- Default: database binds to localhost, no external access, because most indie projects only need local connections.
|
|
46
55
|
- Record a `"database-setup"` event in deploy history (presence metadata only, no passwords).
|
|
@@ -140,7 +140,7 @@ Detect database and deployment signals, then ask 1-2 brief questions. This phase
|
|
|
140
140
|
- If "SaaS platform": follow up with platform selection (Vercel / Railway / Fly.io / Cloudflare / AWS / Other)
|
|
141
141
|
|
|
142
142
|
3. **Write results**:
|
|
143
|
-
- Append `### Infrastructure` section to the detected platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy)
|
|
143
|
+
- Append `### Infrastructure` section to the detected **main** platform instruction file (`AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `CODEBUDDY.md` for CodeBuddy). Do not write Infrastructure to `AGENTS.private.md`, `CLAUDE.private.md`, or `CODEBUDDY.private.md`; private files are reserved for PrizmKit framework protocol imports. Format:
|
|
144
144
|
```markdown
|
|
145
145
|
### Infrastructure
|
|
146
146
|
|
|
@@ -302,7 +302,7 @@ Layer Detection:
|
|
|
302
302
|
Infrastructure Quick Scan:
|
|
303
303
|
Database: PostgreSQL (Prisma) — detected from dependencies
|
|
304
304
|
Deployment: Vercel — detected from vercel.json
|
|
305
|
-
→ Written to the detected platform instruction file `### Infrastructure`
|
|
305
|
+
→ Written to the detected main platform instruction file `### Infrastructure` (not `.private.md`)
|
|
306
306
|
|
|
307
307
|
Rules Quick Entry:
|
|
308
308
|
Matched layers: frontend (React), backend (Express.js), database (Prisma) → keeping default rules
|