prizmkit 1.1.42 → 1.1.46
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/claude/settings-adapter.js +4 -4
- package/bundled/adapters/codebuddy/settings-adapter.js +1 -1
- package/bundled/agents/prizm-dev-team-critic.md +9 -9
- package/bundled/agents/prizm-dev-team-dev.md +13 -13
- package/bundled/agents/prizm-dev-team-reviewer.md +2 -2
- package/bundled/dev-pipeline/.env.example +6 -6
- package/bundled/dev-pipeline/README.md +32 -32
- package/bundled/dev-pipeline/assets/prizm-dev-team-integration.md +1 -1
- package/bundled/dev-pipeline/launch-bugfix-daemon.sh +5 -2
- package/bundled/dev-pipeline/launch-feature-daemon.sh +5 -2
- package/bundled/dev-pipeline/launch-refactor-daemon.sh +5 -2
- package/bundled/dev-pipeline/lib/common.sh +34 -5
- package/bundled/dev-pipeline/reset-bug.sh +7 -5
- package/bundled/dev-pipeline/reset-feature.sh +7 -5
- package/bundled/dev-pipeline/reset-refactor.sh +7 -5
- package/bundled/dev-pipeline/run-bugfix.sh +14 -11
- package/bundled/dev-pipeline/run-feature.sh +15 -12
- package/bundled/dev-pipeline/run-recovery.sh +6 -3
- package/bundled/dev-pipeline/run-refactor.sh +15 -12
- package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +14 -14
- package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/generate-recovery-prompt.py +18 -12
- package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +9 -4
- package/bundled/dev-pipeline/scripts/parse-stream-progress.py +1 -1
- package/bundled/dev-pipeline/scripts/update-bug-status.py +9 -1
- package/bundled/dev-pipeline/scripts/update-feature-status.py +13 -1
- package/bundled/dev-pipeline/scripts/update-refactor-status.py +9 -1
- package/bundled/dev-pipeline/templates/agent-prompts/critic-plan-challenge.md +1 -1
- package/bundled/dev-pipeline/templates/bootstrap-prompt.md +2 -2
- package/bundled/dev-pipeline/templates/bootstrap-tier1.md +8 -8
- package/bundled/dev-pipeline/templates/bootstrap-tier2.md +11 -11
- package/bundled/dev-pipeline/templates/bootstrap-tier3.md +9 -9
- package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +6 -6
- package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +3 -3
- package/bundled/dev-pipeline/templates/sections/phase-commit-full.md +5 -5
- package/bundled/dev-pipeline/templates/sections/phase-commit.md +6 -6
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-agent-suffix.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-context-snapshot-base.md +1 -1
- package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +2 -2
- package/bundled/dev-pipeline/templates/sections/phase0-init.md +1 -1
- package/bundled/dev-pipeline/tests/test-path-resolution.sh +100 -0
- package/bundled/rules/USAGE.md +2 -2
- package/bundled/rules/_rules-metadata.json +1 -1
- package/bundled/rules/prizm/prizm-commit-workflow.md +1 -1
- package/bundled/rules/prizm/prizm-documentation.md +4 -4
- package/bundled/rules/prizm/prizm-progressive-loading.md +3 -3
- package/bundled/skills/_metadata.json +4 -4
- package/bundled/skills/app-planner/SKILL.md +35 -7
- package/bundled/skills/bug-fix-workflow/SKILL.md +6 -6
- package/bundled/skills/bug-planner/SKILL.md +5 -5
- package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/feature-planner/SKILL.md +5 -5
- package/bundled/skills/feature-workflow/SKILL.md +8 -8
- package/bundled/skills/prizm-kit/SKILL.md +10 -10
- package/bundled/skills/prizmkit-committer/SKILL.md +2 -2
- package/bundled/skills/prizmkit-implement/SKILL.md +2 -2
- package/bundled/skills/prizmkit-init/SKILL.md +17 -17
- package/bundled/skills/prizmkit-plan/SKILL.md +3 -3
- package/bundled/skills/prizmkit-plan/references/verification-checklist.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/SKILL.md +17 -17
- package/bundled/skills/prizmkit-prizm-docs/assets/prizm-docs-format.md +45 -45
- package/bundled/skills/prizmkit-prizm-docs/references/op-init.md +9 -9
- package/bundled/skills/prizmkit-prizm-docs/references/op-rebuild.md +1 -1
- package/bundled/skills/prizmkit-prizm-docs/references/op-status.md +2 -2
- package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +3 -3
- package/bundled/skills/prizmkit-prizm-docs/references/op-validate.md +1 -1
- package/bundled/skills/prizmkit-retrospective/SKILL.md +10 -10
- package/bundled/skills/prizmkit-retrospective/references/knowledge-injection-steps.md +3 -3
- package/bundled/skills/prizmkit-retrospective/references/structural-sync-steps.md +1 -1
- package/bundled/skills/recovery-workflow/SKILL.md +15 -15
- package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -1
- package/bundled/skills/refactor-pipeline-launcher/SKILL.md +21 -21
- package/bundled/skills/refactor-planner/SKILL.md +6 -6
- package/bundled/skills/refactor-workflow/SKILL.md +9 -9
- package/bundled/team/prizm-dev-team.json +1 -1
- package/bundled/templates/hooks/commit-intent.json +2 -2
- package/bundled/templates/hooks/diff-prizm-docs.sh +8 -8
- package/bundled/templates/hooks/prizm-pre-commit.sh +4 -4
- package/bundled/templates/hooks/validate-prizm-docs.sh +4 -4
- package/bundled/templates/project-memory-template.md +4 -4
- package/package.json +1 -1
- package/src/clean.js +1 -3
- package/src/config.js +1 -1
- package/src/gitignore-template.js +4 -24
- package/src/scaffold.js +12 -11
- package/src/upgrade.js +3 -3
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Operation: Init — Detailed Steps
|
|
2
2
|
|
|
3
|
-
Bootstrap .prizm-docs/ for the current project.
|
|
3
|
+
Bootstrap .prizmkit/prizm-docs/ for the current project.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: No .prizm-docs/ directory exists, or user confirms overwrite.
|
|
5
|
+
PRECONDITION: No .prizmkit/prizm-docs/ directory exists, or user confirms overwrite.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
1. Detect project type by scanning for build system files (go.mod, package.json, requirements.txt, Cargo.toml, pom.xml, *.csproj). Identify primary language, framework, build command, test command, and entry points.
|
|
@@ -10,16 +10,16 @@ STEPS:
|
|
|
10
10
|
- A directory qualifies as a module if it contains source files forming a logical unit, contains entry/config/interface files, contains qualifying sub-modules, or is referenced by multiple modules as a dependency.
|
|
11
11
|
- TOP-LEVEL modules: directories directly under project root (or under src/ for src-based layouts) that qualify.
|
|
12
12
|
- SUB-MODULES: directories INSIDE a top-level module that qualify. Listed in the parent L1 doc's SUBDIRS section.
|
|
13
|
-
- HIERARCHY RULE: directory X inside top-level module M maps to .prizm-docs/<M>/<X>.prizm, never to .prizm-docs/<X>.prizm.
|
|
14
|
-
- Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizm-docs/, dev-pipeline/. If total module count > 30, ask user for include/exclude patterns.
|
|
15
|
-
3. Create .prizm-docs/ directory structure mirroring the source tree exactly. For each top-level module M that has sub-modules, create the subdirectory .prizm-docs/<M>/.
|
|
13
|
+
- HIERARCHY RULE: directory X inside top-level module M maps to .prizmkit/prizm-docs/<M>/<X>.prizm, never to .prizmkit/prizm-docs/<X>.prizm.
|
|
14
|
+
- Exclude .git/, node_modules/, vendor/, build/, dist/, __pycache__/, target/, bin/, .claude/, .codebuddy/, .prizmkit/, .prizmkit/prizm-docs/, dev-pipeline/. If total module count > 30, ask user for include/exclude patterns.
|
|
15
|
+
3. Create .prizmkit/prizm-docs/ directory structure mirroring the source tree exactly. For each top-level module M that has sub-modules, create the subdirectory .prizmkit/prizm-docs/<M>/.
|
|
16
16
|
4. Generate root.prizm (L0) with PROJECT, LANG, FRAMEWORK, BUILD, TEST, ENTRY, MODULE_INDEX with multi-level entries as needed for efficient navigation (constrained by 4KB limit), RULES extracted from CODEBUDDY.md/CLAUDE.md/README/linter configs, PATTERNS, and CROSS_CUTTING (cross-module concerns spanning 2+ modules). Set PRIZM_VERSION: 4. Max 4KB. No UPDATED timestamp — git tracks modification times.
|
|
17
17
|
- If `.prizmkit/plans/project-brief.md` exists: add `PROJECT_BRIEF: .prizmkit/plans/project-brief.md` to root.prizm (generated by prizmkit-init). If not present, skip — prizmkit-init Phase 7 will add it later.
|
|
18
18
|
- If module count > 15: use MODULE_GROUPS format instead of MODULE_INDEX — group modules by functional domain (3-8 domains, inferred from directory structure and module responsibilities). See prizm-docs-format.md for MODULE_GROUPS format.
|
|
19
19
|
- For each module entry, auto-generate 3-6 keyword tags by scanning the module's key source files for: exported function/class names, imported library names, domain-specific terms in file/directory names. Add tags in square brackets after the module name (e.g., `- auth [login, session, jwt]: ...`). Tags are optional but recommended for projects with 10+ modules.
|
|
20
20
|
5. Generate L1 .prizm files (structural index only) for ALL modules, each at its correct mirrored path:
|
|
21
|
-
- Top-level module M → write .prizm-docs/<M>.prizm (include SUBDIRS section with pointers to sub-module docs)
|
|
22
|
-
- Sub-module S inside M → write .prizm-docs/<M>/<S>.prizm
|
|
21
|
+
- Top-level module M → write .prizmkit/prizm-docs/<M>.prizm (include SUBDIRS section with pointers to sub-module docs)
|
|
22
|
+
- Sub-module S inside M → write .prizmkit/prizm-docs/<M>/<S>.prizm
|
|
23
23
|
Each L1 includes MODULE (full relative path), FILES count, RESPONSIBILITY, SUBDIRS with pointers, KEY_FILES (5-10 most important), DEPENDENCIES (imports, imported-by, external), RULES (1-3 most critical only). L1 does NOT include INTERFACES, DATA_FLOW, TRAPS, or DECISIONS (those are L2, generated lazily). Max 4KB each.
|
|
24
24
|
6. Skip L2 docs during init — L2 is created lazily on first file modification or when AI needs deep understanding (ON_DEEP_READ trigger). L2 contains behavioral detail: INTERFACES, DATA_FLOW, TRAPS, DECISIONS, full RULES, domain-specific sections.
|
|
25
25
|
7. Create changelog.prizm with initial entry: `- root | add: initialized prizm documentation framework`
|
|
@@ -35,12 +35,12 @@ After initialization, L2 docs are created incrementally:
|
|
|
35
35
|
|
|
36
36
|
ON_MODIFY trigger:
|
|
37
37
|
- First time AI modifies a file in sub-module S within module M:
|
|
38
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
38
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
39
39
|
AI reads the source files in S, generates L2 doc, then proceeds with modification
|
|
40
40
|
- This ensures L2 docs have real depth, written when AI has actual context
|
|
41
41
|
|
|
42
42
|
ON_DEEP_READ trigger:
|
|
43
43
|
- When AI needs to deeply understand a module but not modify it (e.g., code review, architecture analysis, dependency tracing, explaining complex logic):
|
|
44
|
-
IF .prizm-docs/<M>/<S>.prizm does not exist:
|
|
44
|
+
IF .prizmkit/prizm-docs/<M>/<S>.prizm does not exist:
|
|
45
45
|
AI reads the source files in S, generates L2 doc for future reference
|
|
46
46
|
- This ensures L2 docs are available for read-heavy analysis tasks, not just modifications
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Regenerate docs for a specific module from scratch. Requires a module path argument.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists. Module path is valid.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists. Module path is valid.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
1. Delete existing L1 and all L2 docs for the specified module.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Check freshness of all .prizm docs.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
|
-
1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizm-docs/root.prizm`.
|
|
8
|
+
1. Get last git modification time of root.prizm via `git log -1 --format="%ai" -- .prizmkit/prizm-docs/root.prizm`.
|
|
9
9
|
2. Count commits since that time via `git log --since="<timestamp>" --oneline | wc -l`.
|
|
10
10
|
3. For each L1/L2 doc, compare git modification time of the .prizm file (`git log -1 --format="%ai" -- <prizm-file>`) against latest git modification of source files in that module (`git log -1 --format="%ai" -- <module-path>/`).
|
|
11
11
|
4. Classify each doc as: FRESH (prizm file updated after latest source change), STALE (source changed more recently than prizm file), MISSING (module exists but no .prizm doc).
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Operation: Update — Detailed Steps
|
|
2
2
|
|
|
3
|
-
Update .prizm-docs/ to reflect recent code changes.
|
|
3
|
+
Update .prizmkit/prizm-docs/ to reflect recent code changes.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists with root.prizm.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists with root.prizm.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
1. Get changed files via `git diff --cached --name-status`. If nothing staged, use `git diff --name-status`. If no git changes at all, do full rescan comparing code against existing docs — this includes checking for modules that have source files but no L2 doc.
|
|
@@ -14,6 +14,6 @@ STEPS:
|
|
|
14
14
|
6a. **L2 gap check** (runs during full rescan mode only — when no git changes detected): For each existing module in MODULE_INDEX, check if L2 doc exists. If L2 is missing and the module has source files with meaningful logic (not trivial config/wrapper) → create L2 with sections: MODULE, FILES, RESPONSIBILITY, INTERFACES, DATA_FLOW, KEY_FILES, DEPENDENCIES, RULES, TRAPS, DECISIONS, CHANGELOG. This ensures Update fills documentation gaps left by previous sessions.
|
|
15
15
|
7. Append entries to changelog.prizm using format: `- <module-path> | <verb>: <description>`
|
|
16
16
|
8. Enforce size limits: L0 > 4KB -> consolidate. L1 > 4KB -> trim KEY_FILES descriptions, ensure RULES <= 3 entries. L2 > 5KB -> split or archive.
|
|
17
|
-
9. Stage updated .prizm files via `git add .prizm-docs/`
|
|
17
|
+
9. Stage updated .prizm files via `git add .prizmkit/prizm-docs/`
|
|
18
18
|
|
|
19
19
|
OUTPUT: List of updated/created/skipped docs with reasons.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Check format compliance and consistency of all .prizm docs.
|
|
4
4
|
|
|
5
|
-
PRECONDITION: .prizm-docs/ exists.
|
|
5
|
+
PRECONDITION: .prizmkit/prizm-docs/ exists.
|
|
6
6
|
|
|
7
7
|
STEPS:
|
|
8
8
|
1. FORMAT CHECK: Verify all .prizm files use KEY: value format. Flag any prose paragraphs, code blocks (```), markdown headers (##), emoji, ASCII art, or horizontal rules. Flag TRAPS entries missing severity prefix ([CRITICAL], [HIGH], or [LOW]). Note: [REVIEW] preceding severity (e.g., `[REVIEW][HIGH]`) is a valid temporary staleness marker, not a format violation.
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "prizmkit-retrospective"
|
|
3
|
-
description: "Incremental .prizm-docs/ maintainer. Performs two jobs: (1) structural sync — update .prizm-docs/ KEY_FILES/INTERFACES/DEPENDENCIES, (2) architecture knowledge — inject TRAPS/RULES/DECISIONS into .prizm-docs/. All project knowledge lives in .prizm-docs/ . Run after code review passes and before committing. Trigger on: 'retrospective', 'retro', 'update docs', 'sync docs', 'wrap up', 'done with feature', 'feature complete'. (project)"
|
|
3
|
+
description: "Incremental .prizmkit/prizm-docs/ maintainer. Performs two jobs: (1) structural sync — update .prizmkit/prizm-docs/ KEY_FILES/INTERFACES/DEPENDENCIES, (2) architecture knowledge — inject TRAPS/RULES/DECISIONS into .prizmkit/prizm-docs/. All project knowledge lives in .prizmkit/prizm-docs/ . Run after code review passes and before committing. Trigger on: 'retrospective', 'retro', 'update docs', 'sync docs', 'wrap up', 'done with feature', 'feature complete'. (project)"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PrizmKit Retrospective
|
|
7
7
|
|
|
8
8
|
| Store | Location | Content | Purpose |
|
|
9
9
|
|-------|----------|---------|---------|
|
|
10
|
-
| **Architecture Index** | `.prizm-docs/` | MODULE, FILES, INTERFACES, DEPENDENCIES, TRAPS, RULES, DECISIONS | AI quickly locates code structure, interfaces, known pitfalls, and key design decisions |
|
|
10
|
+
| **Architecture Index** | `.prizmkit/prizm-docs/` | MODULE, FILES, INTERFACES, DEPENDENCIES, TRAPS, RULES, DECISIONS | AI quickly locates code structure, interfaces, known pitfalls, and key design decisions |
|
|
11
11
|
|
|
12
12
|
**This skill handles both structural sync and knowledge injection in one pass:**
|
|
13
13
|
|
|
14
|
-
1. **Structural Sync** — reflect what changed in code → `.prizm-docs/` (KEY_FILES, INTERFACES, DEPENDENCIES, file counts)
|
|
15
|
-
2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizm-docs/`
|
|
14
|
+
1. **Structural Sync** — reflect what changed in code → `.prizmkit/prizm-docs/` (KEY_FILES, INTERFACES, DEPENDENCIES, file counts)
|
|
15
|
+
2. **Architecture Knowledge** — inject TRAPS, RULES, and DECISIONS → `.prizmkit/prizm-docs/`
|
|
16
16
|
|
|
17
17
|
For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` instead.
|
|
18
18
|
|
|
@@ -38,7 +38,7 @@ For initial doc setup, validation, or migration, use `/prizmkit-prizm-docs` inst
|
|
|
38
38
|
---
|
|
39
39
|
|
|
40
40
|
### Job 1: Structural Sync (always runs)
|
|
41
|
-
Synchronize `.prizm-docs/` structure with actual codebase changes from this session.
|
|
41
|
+
Synchronize `.prizmkit/prizm-docs/` structure with actual codebase changes from this session.
|
|
42
42
|
→ Read `${SKILL_DIR}/references/structural-sync-steps.md` for the detailed procedure.
|
|
43
43
|
|
|
44
44
|
**Key outputs**: Updated L1 file counts, L2 INTERFACES/DATA_FLOW, changelog entries, stale TRAPS cleanup.
|
|
@@ -72,20 +72,20 @@ Inject newly discovered project knowledge (TRAPS, RULES, DECISIONS) into archite
|
|
|
72
72
|
|
|
73
73
|
## Final: Changelog + Stage
|
|
74
74
|
|
|
75
|
-
**3a.** Append to `.prizm-docs/changelog.prizm`:
|
|
75
|
+
**3a.** Append to `.prizmkit/prizm-docs/changelog.prizm`:
|
|
76
76
|
- Format: `<module-path> | <verb>: <one-line description>`
|
|
77
77
|
- Verbs: add, update, fix, remove, refactor, rename, deprecate
|
|
78
78
|
- One entry per meaningful change, not one per file
|
|
79
79
|
|
|
80
80
|
**3b.** Stage all doc changes:
|
|
81
81
|
```bash
|
|
82
|
-
git add .prizm-docs/
|
|
82
|
+
git add .prizmkit/prizm-docs/
|
|
83
83
|
```
|
|
84
84
|
|
|
85
85
|
**HANDOFF:** `/prizmkit-committer`
|
|
86
86
|
|
|
87
87
|
## Output
|
|
88
88
|
|
|
89
|
-
- `.prizm-docs/*.prizm` — Structurally synced + TRAPS/RULES/DECISIONS enriched
|
|
90
|
-
- `.prizm-docs/changelog.prizm` — Appended entries
|
|
91
|
-
- All `.prizm-docs/` changes staged via `git add`
|
|
89
|
+
- `.prizmkit/prizm-docs/*.prizm` — Structurally synced + TRAPS/RULES/DECISIONS enriched
|
|
90
|
+
- `.prizmkit/prizm-docs/changelog.prizm` — Appended entries
|
|
91
|
+
- All `.prizmkit/prizm-docs/` changes staged via `git add`
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
- `review-report.md` in the artifact directory — read the findings and fix instructions. If this file exists, use it as a source for pre-categorized decisions and findings.
|
|
7
7
|
- `plan.md` in the artifact directory — read planned vs actual
|
|
8
8
|
- Any companion documents in the artifact directory (e.g., `refactor-analysis.md`, `fix-report.md`) — read what was discovered
|
|
9
|
-
- The relevant `.prizm-docs/` L1/L2 docs for affected modules
|
|
9
|
+
- The relevant `.prizmkit/prizm-docs/` L1/L2 docs for affected modules
|
|
10
10
|
|
|
11
11
|
**2b.** Extract knowledge from what was **observed in code**, not invented:
|
|
12
12
|
|
|
@@ -38,9 +38,9 @@ When writing TRAPS:
|
|
|
38
38
|
- Only record decisions that a future AI session would benefit from knowing
|
|
39
39
|
- Do NOT record obvious implementation details that can be derived by reading the code
|
|
40
40
|
|
|
41
|
-
**QUALITY GATE**: Every item must answer: "If a new AI session reads only `.prizm-docs/` and this entry, does it gain actionable understanding?" If not, discard. Do not record trivially observable code patterns — the AI can read the code directly.
|
|
41
|
+
**QUALITY GATE**: Every item must answer: "If a new AI session reads only `.prizmkit/prizm-docs/` and this entry, does it gain actionable understanding?" If not, discard. Do not record trivially observable code patterns — the AI can read the code directly.
|
|
42
42
|
|
|
43
|
-
**2c.** Inject into the correct `.prizm-docs/` file:
|
|
43
|
+
**2c.** Inject into the correct `.prizmkit/prizm-docs/` file:
|
|
44
44
|
- Module-level TRAPS/RULES/DECISIONS → the affected **L2** `.prizm` file. If the target L2 does not exist, create it first using the L2 GENERATION TEMPLATE before injecting knowledge. (TRAPS/DECISIONS/RULES belong in L2, not L1.)
|
|
45
45
|
- Project-level RULES/PATTERNS → `root.prizm` (respect the current format — MODULE_INDEX or MODULE_GROUPS — do not convert between them during injection)
|
|
46
46
|
- Cross-module concerns spanning 2+ modules → `root.prizm` CROSS_CUTTING section
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
git diff HEAD --name-status
|
|
6
6
|
```
|
|
7
7
|
|
|
8
|
-
**1b.** Read `.prizm-docs/root.prizm` to get MODULE_INDEX (or MODULE_GROUPS). Map each changed file to its module.
|
|
8
|
+
**1b.** Read `.prizmkit/prizm-docs/root.prizm` to get MODULE_INDEX (or MODULE_GROUPS). Map each changed file to its module.
|
|
9
9
|
|
|
10
10
|
**1c.** Classify changes:
|
|
11
11
|
- `A` (added) → add to KEY_FILES, check for new INTERFACES
|
|
@@ -27,11 +27,11 @@ User says:
|
|
|
27
27
|
Pipeline commands (for reference — Phase 1.3 will present these as a selectable option):
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
30
|
+
./.prizmkit/dev-pipeline/run-recovery.sh # Auto-detect and recover
|
|
31
|
+
./.prizmkit/dev-pipeline/run-recovery.sh detect # Detection report only
|
|
32
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --dry-run # Generate prompt, don't execute
|
|
33
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --yes # Skip confirmation
|
|
34
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --model <model> # Override AI model
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
### When to use pipeline vs interactive recovery
|
|
@@ -141,19 +141,19 @@ Before showing the recovery report, run a comprehensive diagnosis:
|
|
|
141
141
|
2. **Scan all pipelines for failed/in-progress tasks**:
|
|
142
142
|
```bash
|
|
143
143
|
# Feature pipeline
|
|
144
|
-
python3 dev-pipeline/scripts/update-feature-status.py \
|
|
144
|
+
python3 .prizmkit/dev-pipeline/scripts/update-feature-status.py \
|
|
145
145
|
--feature-list .prizmkit/plans/feature-list.json \
|
|
146
146
|
--state-dir .prizmkit/state/features \
|
|
147
147
|
--action status 2>/dev/null
|
|
148
148
|
|
|
149
149
|
# Bugfix pipeline
|
|
150
|
-
python3 dev-pipeline/scripts/update-bug-status.py \
|
|
150
|
+
python3 .prizmkit/dev-pipeline/scripts/update-bug-status.py \
|
|
151
151
|
--bug-list .prizmkit/plans/bug-fix-list.json \
|
|
152
152
|
--state-dir .prizmkit/state/bugfix \
|
|
153
153
|
--action status 2>/dev/null
|
|
154
154
|
|
|
155
155
|
# Refactor pipeline
|
|
156
|
-
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
156
|
+
python3 .prizmkit/dev-pipeline/scripts/update-refactor-status.py \
|
|
157
157
|
--refactor-list .prizmkit/plans/refactor-list.json \
|
|
158
158
|
--state-dir .prizmkit/state/refactor \
|
|
159
159
|
--action status 2>/dev/null
|
|
@@ -259,7 +259,7 @@ AskUserQuestion:
|
|
|
259
259
|
header: "Recovery"
|
|
260
260
|
options:
|
|
261
261
|
- label: "Run recovery script (Recommended)"
|
|
262
|
-
description: "Execute
|
|
262
|
+
description: "Execute ./.prizmkit/dev-pipeline/run-recovery.sh — autonomously completes ALL remaining phases (review, commit, merge, etc.) via a dedicated AI session with explicit phase instructions"
|
|
263
263
|
- label: "Copy command and run manually"
|
|
264
264
|
description: "I'll give you the exact shell command to paste into your terminal — you run it yourself outside this session"
|
|
265
265
|
- label: "Resume interactively in this session"
|
|
@@ -270,7 +270,7 @@ AskUserQuestion:
|
|
|
270
270
|
|
|
271
271
|
**If "Run recovery script"** → Execute the pipeline recovery:
|
|
272
272
|
```bash
|
|
273
|
-
|
|
273
|
+
./.prizmkit/dev-pipeline/run-recovery.sh
|
|
274
274
|
```
|
|
275
275
|
The script handles everything: detection, confirmation, prompt generation, session spawn, and post-session validation. **End this skill after launching the script** — do not proceed to Phase 2.
|
|
276
276
|
|
|
@@ -278,12 +278,12 @@ The script handles everything: detection, confirmation, prompt generation, sessi
|
|
|
278
278
|
```
|
|
279
279
|
To recover, run this command in your project root:
|
|
280
280
|
|
|
281
|
-
|
|
281
|
+
./.prizmkit/dev-pipeline/run-recovery.sh
|
|
282
282
|
|
|
283
283
|
Or with options:
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
284
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --dry-run # Preview the recovery prompt first
|
|
285
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --yes # Skip confirmation
|
|
286
|
+
./.prizmkit/dev-pipeline/run-recovery.sh run --model <model> # Specify AI model
|
|
287
287
|
```
|
|
288
288
|
**End this skill** — do not proceed to Phase 2. The user will run the command themselves.
|
|
289
289
|
|
|
@@ -312,7 +312,7 @@ End this skill.
|
|
|
312
312
|
- If `context-snapshot.md` exists in the artifact directory → read it first. It provides a snapshot of completed tasks, key decisions, and remaining work from the interrupted session.
|
|
313
313
|
- If `session-summary.md` exists → read it for a lightweight summary of the previous session.
|
|
314
314
|
- Then read remaining artifacts: spec.md, plan.md, review-report.md, code diffs, bug descriptions, etc.
|
|
315
|
-
3. **Read relevant `.prizm-docs/`** — load project context (L0 root, relevant L1/L2 for affected modules).
|
|
315
|
+
3. **Read relevant `.prizmkit/prizm-docs/`** — load project context (L0 root, relevant L1/L2 for affected modules).
|
|
316
316
|
|
|
317
317
|
This step replaces the context that was lost when the AI session was interrupted.
|
|
318
318
|
|
|
@@ -11,8 +11,8 @@ Launch the autonomous refactor pipeline from within an AI CLI conversation. The
|
|
|
11
11
|
|
|
12
12
|
Three execution modes are available. The user chooses one before configuring other options:
|
|
13
13
|
|
|
14
|
-
1. **Foreground** (recommended) —
|
|
15
|
-
2. **Background daemon** —
|
|
14
|
+
1. **Foreground** (recommended) — `.prizmkit/dev-pipeline/run-refactor.sh run`. Visible output, direct error feedback, no orphaned processes.
|
|
15
|
+
2. **Background daemon** — `.prizmkit/dev-pipeline/launch-refactor-daemon.sh`. 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
18
|
### When to Use
|
|
@@ -45,7 +45,7 @@ Three execution modes are available. The user chooses one before configuring oth
|
|
|
45
45
|
|
|
46
46
|
Before any action, validate:
|
|
47
47
|
|
|
48
|
-
1. **refactor pipeline exists**: Confirm
|
|
48
|
+
1. **refactor pipeline exists**: Confirm `.prizmkit/dev-pipeline/launch-refactor-daemon.sh` and `.prizmkit/dev-pipeline/run-refactor.sh` are present and executable
|
|
49
49
|
2. **For start**: `.prizmkit/plans/refactor-list.json` must exist in `.prizmkit/plans/` (or user-specified path)
|
|
50
50
|
3. **Dependencies**: `jq`, `python3`, AI CLI (`cbc` or `claude`) must be in PATH
|
|
51
51
|
4. **Python version**: Requires Python 3.8+ for dev-pipeline scripts
|
|
@@ -79,7 +79,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
79
79
|
|
|
80
80
|
2. **Check not already running**:
|
|
81
81
|
```bash
|
|
82
|
-
dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null
|
|
82
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null
|
|
83
83
|
```
|
|
84
84
|
If running, inform user and ask: "Refactor pipeline is already running. Want to restart it, check status, or view logs?"
|
|
85
85
|
|
|
@@ -106,7 +106,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
106
106
|
```
|
|
107
107
|
If pipeline state already exists, use the status command instead:
|
|
108
108
|
```bash
|
|
109
|
-
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
109
|
+
python3 .prizmkit/dev-pipeline/scripts/update-refactor-status.py \
|
|
110
110
|
--refactor-list .prizmkit/plans/refactor-list.json \
|
|
111
111
|
--state-dir .prizmkit/state/refactor \
|
|
112
112
|
--action status 2>/dev/null
|
|
@@ -222,34 +222,34 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
222
222
|
|
|
223
223
|
**Foreground command:**
|
|
224
224
|
```bash
|
|
225
|
-
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
225
|
+
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 .prizmkit/dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
226
226
|
```
|
|
227
227
|
With all options:
|
|
228
228
|
```bash
|
|
229
229
|
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 SESSION_TIMEOUT=3600 ENABLE_DEPLOY=1 \
|
|
230
|
-
dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
230
|
+
.prizmkit/dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
**Background daemon command:**
|
|
234
234
|
```bash
|
|
235
|
-
dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json --env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1"
|
|
235
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json --env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1"
|
|
236
236
|
```
|
|
237
237
|
With all options:
|
|
238
238
|
```bash
|
|
239
|
-
dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json \
|
|
239
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json \
|
|
240
240
|
--env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 MAX_RETRIES=5 ENABLE_DEPLOY=1"
|
|
241
241
|
```
|
|
242
242
|
|
|
243
243
|
**Manual mode**: Print the assembled command(s) and **stop here**. Do not execute anything. Do not proceed to step 8.
|
|
244
244
|
```
|
|
245
245
|
# To run in foreground:
|
|
246
|
-
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
246
|
+
VERBOSE=1 STRICT_BEHAVIOR_CHECK=1 .prizmkit/dev-pipeline/run-refactor.sh run .prizmkit/plans/refactor-list.json
|
|
247
247
|
|
|
248
248
|
# To run in background (detached):
|
|
249
|
-
dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json --env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1"
|
|
249
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh start .prizmkit/plans/refactor-list.json --env "VERBOSE=1 STRICT_BEHAVIOR_CHECK=1"
|
|
250
250
|
|
|
251
251
|
# To check status:
|
|
252
|
-
dev-pipeline/run-refactor.sh status .prizmkit/plans/refactor-list.json
|
|
252
|
+
.prizmkit/dev-pipeline/run-refactor.sh status .prizmkit/plans/refactor-list.json
|
|
253
253
|
```
|
|
254
254
|
|
|
255
255
|
8. **Confirm and launch** (Foreground and Background only — Manual mode ends at step 7):
|
|
@@ -268,7 +268,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
268
268
|
**If background daemon**:
|
|
269
269
|
1. Verify launch:
|
|
270
270
|
```bash
|
|
271
|
-
dev-pipeline/launch-refactor-daemon.sh status
|
|
271
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status
|
|
272
272
|
```
|
|
273
273
|
2. Start log monitoring — Use the Bash tool with `run_in_background: true`:
|
|
274
274
|
```bash
|
|
@@ -286,12 +286,12 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
286
286
|
|
|
287
287
|
1. **Check daemon status**:
|
|
288
288
|
```bash
|
|
289
|
-
dev-pipeline/launch-refactor-daemon.sh status
|
|
289
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
2. **Show refactor-level progress**:
|
|
293
293
|
```bash
|
|
294
|
-
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
294
|
+
python3 .prizmkit/dev-pipeline/scripts/update-refactor-status.py \
|
|
295
295
|
--refactor-list .prizmkit/plans/refactor-list.json \
|
|
296
296
|
--state-dir .prizmkit/state/refactor \
|
|
297
297
|
--action status
|
|
@@ -310,12 +310,12 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
310
310
|
|
|
311
311
|
1. **Stop the daemon**:
|
|
312
312
|
```bash
|
|
313
|
-
dev-pipeline/launch-refactor-daemon.sh stop
|
|
313
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh stop
|
|
314
314
|
```
|
|
315
315
|
|
|
316
316
|
2. **Verify stopped**:
|
|
317
317
|
```bash
|
|
318
|
-
dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null || true
|
|
318
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null || true
|
|
319
319
|
```
|
|
320
320
|
|
|
321
321
|
3. **Inform user**: "Refactor pipeline stopped. State is preserved -- you can resume later with 'start refactoring' and it will pick up where it left off."
|
|
@@ -326,7 +326,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
326
326
|
|
|
327
327
|
1. **Check if running**:
|
|
328
328
|
```bash
|
|
329
|
-
dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null
|
|
329
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status 2>/dev/null
|
|
330
330
|
```
|
|
331
331
|
|
|
332
332
|
2. **If running** -- Start live tail with Bash tool `run_in_background: true`:
|
|
@@ -354,7 +354,7 @@ Detect user intent from their message, then follow the corresponding workflow:
|
|
|
354
354
|
When user says "retry R-001" or "clean retry R-001":
|
|
355
355
|
|
|
356
356
|
```bash
|
|
357
|
-
dev-pipeline/reset-refactor.sh R-001 --clean --run .prizmkit/plans/refactor-list.json
|
|
357
|
+
.prizmkit/dev-pipeline/reset-refactor.sh R-001 --clean --run .prizmkit/plans/refactor-list.json
|
|
358
358
|
```
|
|
359
359
|
|
|
360
360
|
Notes:
|
|
@@ -376,11 +376,11 @@ Notes:
|
|
|
376
376
|
| PID file stale (process dead) | `launch-refactor-daemon.sh` auto-cleans, retry start |
|
|
377
377
|
| Launch failed (process died immediately) | Show last 20 lines of log: `tail -20 .prizmkit/state/refactor/pipeline-daemon.log` |
|
|
378
378
|
| Refactor stuck/blocked | Use `reset-refactor.sh <R-XXX> --clean --run` for a fresh retry |
|
|
379
|
-
| All refactors blocked/failed | Show status, suggest recovery:
|
|
379
|
+
| All refactors blocked/failed | Show status, suggest recovery: `.prizmkit/dev-pipeline/reset-refactor.sh <R-XXX> --clean --run .prizmkit/plans/refactor-list.json` |
|
|
380
380
|
| `playwright-cli` not installed | Browser verification skipped for playwright refactors (non-blocking). Suggest: `npm install -g @playwright/cli@latest && playwright-cli install --skills` |
|
|
381
381
|
| `opencli` not installed | Browser verification skipped for opencli refactors (non-blocking). Install opencli for Chrome session-based browser verification |
|
|
382
382
|
| Deploy session failed | Pipeline completed but deploy session exited non-zero. Check `.prizmkit/state/refactor/deploy/<session_id>/logs/session.log`. Retry manually: `/prizmkit-deploy`. |
|
|
383
|
-
| Permission denied on script | Run `chmod +x dev-pipeline/launch-refactor-daemon.sh dev-pipeline/run-refactor.sh` |
|
|
383
|
+
| Permission denied on script | Run `chmod +x .prizmkit/dev-pipeline/launch-refactor-daemon.sh .prizmkit/dev-pipeline/run-refactor.sh` |
|
|
384
384
|
|
|
385
385
|
### Integration Notes
|
|
386
386
|
|
|
@@ -92,11 +92,11 @@ Do NOT use this skill when the user wants to:
|
|
|
92
92
|
## Prerequisites
|
|
93
93
|
|
|
94
94
|
Before questions, check optional context files (never block if absent):
|
|
95
|
-
- `.prizm-docs/root.prizm` (architecture/project context)
|
|
95
|
+
- `.prizmkit/prizm-docs/root.prizm` (architecture/project context)
|
|
96
96
|
- `.prizmkit/config.json` (existing stack preferences and detected tech stack)
|
|
97
97
|
- Existing test suite (critical for behavior preservation assessment)
|
|
98
98
|
- Existing `.prizmkit/plans/refactor-list.json` (if appending additional items)
|
|
99
|
-
- If `.prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure:
|
|
99
|
+
- If `.prizmkit/prizm-docs/root.prizm` is absent and the project has existing source code, scan the directory structure:
|
|
100
100
|
```bash
|
|
101
101
|
find . -maxdepth 2 -type d -not -path '*/node_modules/*' -not -path '*/.git/*' -not -path '*/dist/*' -not -path '*/build/*' -not -path '*/__pycache__/*' -not -path '*/vendor/*' | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
|
|
102
102
|
```
|
|
@@ -132,7 +132,7 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
|
132
132
|
|
|
133
133
|
**Goal**: Understand the current codebase structure and tech stack.
|
|
134
134
|
|
|
135
|
-
1. Read `.prizm-docs/root.prizm` and relevant L1 docs
|
|
135
|
+
1. Read `.prizmkit/prizm-docs/root.prizm` and relevant L1 docs
|
|
136
136
|
2. Read `.prizmkit/config.json` for tech stack info
|
|
137
137
|
3. Identify existing test suite and coverage
|
|
138
138
|
4. Summarize project context to the user: "Here's what I found about your project..."
|
|
@@ -142,7 +142,7 @@ Execute the planning workflow in conversation mode with mandatory checkpoints:
|
|
|
142
142
|
> "Do you have any reference materials I should review before planning the refactoring? This can include:
|
|
143
143
|
> - **Code paths** — specific files or directories that are refactoring targets or dependencies
|
|
144
144
|
> - **Documents** — design docs, architecture proposals, refactoring RFCs, or technical debt analyses
|
|
145
|
-
> - **Knowledge docs** — `.prizm-docs/` files, README files, or internal wiki pages for the affected area
|
|
145
|
+
> - **Knowledge docs** — `.prizmkit/prizm-docs/` files, README files, or internal wiki pages for the affected area
|
|
146
146
|
> - **Images** — architecture diagrams, dependency graphs, or whiteboard photos
|
|
147
147
|
> - **Web links** — reference implementations, design pattern articles, or migration guides
|
|
148
148
|
>
|
|
@@ -307,7 +307,7 @@ If issues found, discuss with user and resolve before proceeding.
|
|
|
307
307
|
|
|
308
308
|
| Checkpoint | Artifact/State | Criteria | Phase |
|
|
309
309
|
|-----------|----------------|----------|-------|
|
|
310
|
-
| **CP-RP-0** | Project Context | Tech stack, test suite status, .prizm-docs loaded | 1 |
|
|
310
|
+
| **CP-RP-0** | Project Context | Tech stack, test suite status, .prizmkit/prizm-docs loaded | 1 |
|
|
311
311
|
| **CP-RP-1** | Goals Collected | All refactoring goals understood, no open ambiguities | 2 |
|
|
312
312
|
| **CP-RP-2** | Code Analyzed | Analysis complete, user agrees with approach | 3 |
|
|
313
313
|
| **CP-RP-3** | Items Decomposed | All items have deps, complexity, preservation strategy | 4 |
|
|
@@ -324,7 +324,7 @@ If issues found, discuss with user and resolve before proceeding.
|
|
|
324
324
|
- Non-empty `refactors` array
|
|
325
325
|
- Sequential IDs: `R-001`, `R-002`, ...
|
|
326
326
|
- Valid dependency DAG (no cycles)
|
|
327
|
-
- Each item has a declared `behavior_preservation` object with `strategy` field: `"test-gate"`, `"snapshot"`, or `"manual"`. Optional fields: `existing_tests` (boolean), `new_tests_needed` (string array). See
|
|
327
|
+
- Each item has a declared `behavior_preservation` object with `strategy` field: `"test-gate"`, `"snapshot"`, or `"manual"`. Optional fields: `existing_tests` (boolean), `new_tests_needed` (string array). See `.prizmkit/dev-pipeline/templates/refactor-list-schema.json` for the full schema.
|
|
328
328
|
- `priority` must be a string: `"critical"`, `"high"`, `"medium"`, or `"low"`
|
|
329
329
|
- New items default `status: "pending"`
|
|
330
330
|
- English titles for stable slug generation
|
|
@@ -132,7 +132,7 @@ Then ask:
|
|
|
132
132
|
Ask:
|
|
133
133
|
1. **Code paths** — "Which files or directories are the main targets? Any specific files I should look at?"
|
|
134
134
|
2. **Design documents** — "Do you have any design docs, architecture diagrams, or refactoring proposals I should read?"
|
|
135
|
-
3. **Knowledge docs** — "Are there related `.prizm-docs/`, README files, or internal wiki pages for the target area?"
|
|
135
|
+
3. **Knowledge docs** — "Are there related `.prizmkit/prizm-docs/`, README files, or internal wiki pages for the target area?"
|
|
136
136
|
4. **Related issues/PRs** — "Any related issues, PRs, or previous refactoring attempts I should be aware of?"
|
|
137
137
|
|
|
138
138
|
Record everything the user provides — these become inputs for Step 1.3.
|
|
@@ -147,7 +147,7 @@ Record everything the user provides — these become inputs for Step 1.3.
|
|
|
147
147
|
|-------|-------------|---------|
|
|
148
148
|
| Agent A | User-provided code paths — read full source files | Understand current structure, interfaces, dependencies |
|
|
149
149
|
| Agent B | User-provided documents — design docs, proposals, wiki pages | Understand intended direction and constraints |
|
|
150
|
-
| Agent C | `.prizm-docs/` for affected modules — L1/L2 docs, TRAPS, RULES | Understand existing architecture knowledge and known pitfalls |
|
|
150
|
+
| Agent C | `.prizmkit/prizm-docs/` for affected modules — L1/L2 docs, TRAPS, RULES | Understand existing architecture knowledge and known pitfalls |
|
|
151
151
|
| Agent D | Test files for the target area — find and read existing tests | Understand current test coverage and behavior contracts |
|
|
152
152
|
|
|
153
153
|
**Also gather** (can be included in any agent's task):
|
|
@@ -164,7 +164,7 @@ Record everything the user provides — these become inputs for Step 1.3.
|
|
|
164
164
|
Present what you learned from the parallel reading:
|
|
165
165
|
- Current code structure and its problems (with specific file/function references)
|
|
166
166
|
- Existing test coverage status (which areas are safe, which are risky)
|
|
167
|
-
- Known TRAPS and pitfalls from `.prizm-docs/`
|
|
167
|
+
- Known TRAPS and pitfalls from `.prizmkit/prizm-docs/`
|
|
168
168
|
- Dependencies and potential impact on other modules
|
|
169
169
|
|
|
170
170
|
Then ask targeted questions based on what you read. **Adapt question depth to the refactoring complexity** — a simple extract-method refactor needs fewer questions than a full module decomposition.
|
|
@@ -184,7 +184,7 @@ Then ask targeted questions based on what you read. **Adapt question depth to th
|
|
|
184
184
|
- Any undocumented behavior that callers depend on?
|
|
185
185
|
|
|
186
186
|
**Risk Assessment:**
|
|
187
|
-
- "I found these TRAPS in .prizm-docs/: [list]. Any other known gotchas?"
|
|
187
|
+
- "I found these TRAPS in .prizmkit/prizm-docs/: [list]. Any other known gotchas?"
|
|
188
188
|
- Does this code have external consumers (other teams, published APIs)?
|
|
189
189
|
- Any concurrent development happening in the target area?
|
|
190
190
|
|
|
@@ -249,7 +249,7 @@ Once brainstorming is complete, produce a structured goals summary:
|
|
|
249
249
|
- [Risk]: [Mitigation strategy]
|
|
250
250
|
|
|
251
251
|
### Reference Materials Reviewed
|
|
252
|
-
- [List of code paths, documents, .prizm-docs/ files that were read]
|
|
252
|
+
- [List of code paths, documents, .prizmkit/prizm-docs/ files that were read]
|
|
253
253
|
|
|
254
254
|
### Constraints
|
|
255
255
|
- [Timeline, coordination, deployment concerns]
|
|
@@ -293,7 +293,7 @@ AskUserQuestion:
|
|
|
293
293
|
2. Invoke `/prizmkit-implement` to execute the plan (behavior preservation verified by tests)
|
|
294
294
|
3. After implementation, run `/prizmkit-code-review` for quality check
|
|
295
295
|
4. Commit via `/prizmkit-committer` with `refactor(<scope>):` prefix
|
|
296
|
-
5. Run `/prizmkit-retrospective` to sync `.prizm-docs/`
|
|
296
|
+
5. Run `/prizmkit-retrospective` to sync `.prizmkit/prizm-docs/`
|
|
297
297
|
6. **End workflow** — skip Phase 2/3/4
|
|
298
298
|
- **Add to refactor list** → Continue to Phase 2 (Plan via pipeline)
|
|
299
299
|
|
|
@@ -394,7 +394,7 @@ AskUserQuestion:
|
|
|
394
394
|
|
|
395
395
|
1. **Initial status check**:
|
|
396
396
|
```bash
|
|
397
|
-
dev-pipeline/launch-refactor-daemon.sh status
|
|
397
|
+
.prizmkit/dev-pipeline/launch-refactor-daemon.sh status
|
|
398
398
|
```
|
|
399
399
|
|
|
400
400
|
2. **Offer monitoring options**:
|
|
@@ -404,7 +404,7 @@ AskUserQuestion:
|
|
|
404
404
|
|
|
405
405
|
3. **Periodic progress reports** (when user asks):
|
|
406
406
|
```bash
|
|
407
|
-
python3 dev-pipeline/scripts/update-refactor-status.py \
|
|
407
|
+
python3 .prizmkit/dev-pipeline/scripts/update-refactor-status.py \
|
|
408
408
|
--refactor-list .prizmkit/plans/refactor-list.json \
|
|
409
409
|
--state-dir .prizmkit/state/refactor \
|
|
410
410
|
--action status
|
|
@@ -480,4 +480,4 @@ While the pipeline runs, the user can continue the conversation:
|
|
|
480
480
|
- Pipeline execution (Phase 3)
|
|
481
481
|
- Progress updates (Phase 4)
|
|
482
482
|
- Multiple git commits with `refactor(<scope>):` prefix
|
|
483
|
-
- Updated `.prizm-docs/` (via prizmkit-retrospective per refactor item)
|
|
483
|
+
- Updated `.prizmkit/prizm-docs/` (via prizmkit-retrospective per refactor item)
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"name": "dev",
|
|
14
14
|
"role": "developer",
|
|
15
15
|
"agentDefinition": "prizm-dev-team-dev",
|
|
16
|
-
"prompt": "You are a Dev Agent of the prizm-dev-team. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x]. Check .prizm-docs/ TRAPS before implementing.",
|
|
16
|
+
"prompt": "You are a Dev Agent of the prizm-dev-team. Follow /prizmkit-implement workflow with TDD. Read plan.md/spec.md, implement task-by-task, mark completed tasks [x]. Check .prizmkit/prizm-docs/ TRAPS before implementing.",
|
|
17
17
|
"subscriptions": ["*"]
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"hooks": [
|
|
7
7
|
{
|
|
8
8
|
"type": "command",
|
|
9
|
-
"command": "SRC=$(git diff --cached --name-only 2>/dev/null | grep -cE '\\.(ts|tsx|js|jsx|py|go|rs|java)$'); if [ \"$SRC\" -gt 0 ]; then PRIZM=$(git diff --cached --name-only 2>/dev/null | grep -c '^\\.prizm-docs/'); if [ \"$PRIZM\" -gt 0 ]; then echo \"PRIZMKIT_DOC_STATUS: $SRC source file(s) staged | .prizm-docs/ updated ($PRIZM file(s))\"; else echo \"PRIZMKIT_DOC_STATUS: $SRC source file(s) staged | .prizm-docs/ NOT UPDATED — update if this is a feature change\"; fi; fi"
|
|
9
|
+
"command": "SRC=$(git diff --cached --name-only 2>/dev/null | grep -cE '\\.(ts|tsx|js|jsx|py|go|rs|java)$'); if [ \"$SRC\" -gt 0 ]; then PRIZM=$(git diff --cached --name-only 2>/dev/null | grep -c '^\\.prizmkit/prizm-docs/'); if [ \"$PRIZM\" -gt 0 ]; then echo \"PRIZMKIT_DOC_STATUS: $SRC source file(s) staged | .prizmkit/prizm-docs/ updated ($PRIZM file(s))\"; else echo \"PRIZMKIT_DOC_STATUS: $SRC source file(s) staged | .prizmkit/prizm-docs/ NOT UPDATED — update if this is a feature change\"; fi; fi"
|
|
10
10
|
}
|
|
11
11
|
]
|
|
12
12
|
}
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"hooks": [
|
|
18
18
|
{
|
|
19
19
|
"type": "command",
|
|
20
|
-
"command": "TOOL_INPUT=\"${CLAUDE_TOOL_INPUT:-${CODEBUDDY_TOOL_INPUT:-}}\"; if echo \"$TOOL_INPUT\" | grep -qE 'git (commit|merge|rebase)' 2>/dev/null; then DRIFT=$(sh .prizmkit/scripts/diff-prizm-docs.sh 2>/dev/null); if [ -n \"$DRIFT\" ]; then echo \"PRIZMKIT_DRIFT_DETECTED: prizm-docs structural differences found:\"; echo \"$DRIFT\"; echo \"Please update affected .prizm-docs/ files.\"; fi; fi"
|
|
20
|
+
"command": "TOOL_INPUT=\"${CLAUDE_TOOL_INPUT:-${CODEBUDDY_TOOL_INPUT:-}}\"; if echo \"$TOOL_INPUT\" | grep -qE 'git (commit|merge|rebase)' 2>/dev/null; then DRIFT=$(sh .prizmkit/scripts/diff-prizm-docs.sh 2>/dev/null); if [ -n \"$DRIFT\" ]; then echo \"PRIZMKIT_DRIFT_DETECTED: prizm-docs structural differences found:\"; echo \"$DRIFT\"; echo \"Please update affected .prizmkit/prizm-docs/ files.\"; fi; fi"
|
|
21
21
|
}
|
|
22
22
|
]
|
|
23
23
|
}
|