claude-prism 1.6.0-beta.1 → 1.6.0
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/.claude-plugin/plugin.json +1 -1
- package/CHANGELOG.md +22 -0
- package/README.md +8 -1
- package/bin/cli.mjs +10 -3
- package/lib/handoff.mjs +93 -12
- package/lib/installer.mjs +96 -2
- package/package.json +1 -1
- package/templates/commands/claude-prism/plan.md +30 -4
- package/templates/commands/claude-prism/stats.md +3 -3
- package/templates/rules-lean.md +16 -2
- package/templates/rules.md +18 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,28 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.6.0] — 2026-03-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- **Session Bootstrap** — `<!-- PRISM:BOOT -->` block auto-injected into CLAUDE.md; instructs agents to read `docs/PROJECT-MEMORY.md`, `docs/HANDOFF.md`, active plans, and `.prism/registry.json` on session start
|
|
12
|
+
- **Plan Frontmatter** — plans support YAML frontmatter (`status`, `created`, `depends_on`); `/plan list` shows status icons (📋 active, ✅ completed, 📦 archived, 🚫 blocked)
|
|
13
|
+
- **Plan Check** — `/plan check` subcommand detects file overlaps across active plans (cross-plan conflict detection)
|
|
14
|
+
- **Docs Scaffolding** — `prism init --docs` creates `docs/` structure with `PROJECT-MEMORY.md`, `HANDOFF.md` templates and `.prism/registry.json` (auto-scans existing docs)
|
|
15
|
+
- **Project Registry** — `.prism/registry.json` catalogs SSOT documents, session files, and reference/archive paths
|
|
16
|
+
- **Lightweight Recording** — lightweight tasks now record a 1-line summary to `docs/PROJECT-MEMORY.md`
|
|
17
|
+
- **HANDOFF Auto-triggers** — rules.md documents PreCompact/SessionEnd hook auto-generation of HANDOFF.md
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
- `getActivePlanInfo()` now filters by frontmatter `status: active` (backward-compatible: no frontmatter = active)
|
|
21
|
+
- `dryRun()` shows docs scaffolding actions when `--docs` is used
|
|
22
|
+
- `stats.md` plan list shows frontmatter status icons
|
|
23
|
+
- `rules-lean.md` Session Handoff section updated with auto-generation info
|
|
24
|
+
|
|
25
|
+
### New exports
|
|
26
|
+
- `parseFrontmatter(content)` — parse YAML-like frontmatter from markdown
|
|
27
|
+
- `getAllPlans(projectRoot)` — list all plans with frontmatter + progress info merged
|
|
28
|
+
- `detectPlanConflicts(projectRoot)` — find file overlaps across active plans
|
|
29
|
+
|
|
8
30
|
## [1.6.0-beta.1] — 2026-03-04
|
|
9
31
|
|
|
10
32
|
### Added
|
package/README.md
CHANGED
|
@@ -90,6 +90,12 @@ Injected into `CLAUDE.md`, EUDEC is a behavioral framework that corrects how AI
|
|
|
90
90
|
- **Streamlined verification**: 3-level fallback ladder (Tests → Build → Diff)
|
|
91
91
|
- **Adaptive checkpoints**: no pause for small tasks, summary for medium, full for large
|
|
92
92
|
|
|
93
|
+
**New in v1.6.0:**
|
|
94
|
+
- **Session Bootstrap** — agents auto-read `PROJECT-MEMORY.md`, `HANDOFF.md`, active plans, and registry on session start
|
|
95
|
+
- **Plan Lifecycle** — frontmatter (`status`, `created`, `depends_on`), `/plan check` for cross-plan file conflict detection
|
|
96
|
+
- **Docs Scaffolding** — `prism init --docs` creates `docs/` with templates + `.prism/registry.json`
|
|
97
|
+
- **Lightweight Recording** — even small tasks append a 1-line summary to `docs/PROJECT-MEMORY.md`
|
|
98
|
+
|
|
93
99
|
**New in v1.4.0:**
|
|
94
100
|
- **Native Claude Code plugin** — `claude plugin install claude-prism` for zero-config setup
|
|
95
101
|
- **4 new hook events** — PreCompact (auto-HANDOFF), SessionEnd (session protection), SubagentStart (scope injection), TaskCompleted (plan auto-update)
|
|
@@ -187,6 +193,7 @@ Plugin mode auto-registers hooks and skills. Run `prism init` additionally if yo
|
|
|
187
193
|
|
|
188
194
|
```bash
|
|
189
195
|
npx claude-prism init # Install with hooks (prompts for HUD)
|
|
196
|
+
npx claude-prism init --docs # Install + docs scaffolding (PROJECT-MEMORY, HANDOFF, registry)
|
|
190
197
|
npx claude-prism init --hud # Install + auto-enable HUD
|
|
191
198
|
npx claude-prism init --no-hooks # Methodology only, no hooks
|
|
192
199
|
npx claude-prism init --global # Global skill (all projects)
|
|
@@ -271,7 +278,7 @@ prism update
|
|
|
271
278
|
## CLI Commands
|
|
272
279
|
|
|
273
280
|
```bash
|
|
274
|
-
prism init [--no-hooks] [--global] [--dry-run]
|
|
281
|
+
prism init [--no-hooks] [--docs] [--global] [--dry-run] # Install
|
|
275
282
|
prism init --hud # Install + auto-enable HUD
|
|
276
283
|
prism check [--ci] # Verify installation
|
|
277
284
|
prism doctor # Diagnose issues
|
package/bin/cli.mjs
CHANGED
|
@@ -44,9 +44,11 @@ switch (command) {
|
|
|
44
44
|
|
|
45
45
|
const hooks = !hasFlag('no-hooks');
|
|
46
46
|
|
|
47
|
+
const docs = hasFlag('docs');
|
|
48
|
+
|
|
47
49
|
if (hasFlag('dry-run')) {
|
|
48
50
|
const { dryRun } = await import('../lib/installer.mjs');
|
|
49
|
-
const result = dryRun(cwd, { hooks });
|
|
51
|
+
const result = dryRun(cwd, { hooks, docs });
|
|
50
52
|
console.log('🌈 claude-prism init --dry-run\n');
|
|
51
53
|
console.log(' Files that would be created/updated:\n');
|
|
52
54
|
for (const action of result.actions) {
|
|
@@ -58,7 +60,7 @@ switch (command) {
|
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
console.log('🌈 claude-prism init\n');
|
|
61
|
-
await init(cwd, { hooks });
|
|
63
|
+
await init(cwd, { hooks, docs });
|
|
62
64
|
|
|
63
65
|
console.log('✅ EUDEC methodology → CLAUDE.md');
|
|
64
66
|
console.log('✅ Commands → /prism, /checkpoint, /plan');
|
|
@@ -67,6 +69,10 @@ switch (command) {
|
|
|
67
69
|
} else {
|
|
68
70
|
console.log('⏭️ Hooks skipped (--no-hooks)');
|
|
69
71
|
}
|
|
72
|
+
if (docs) {
|
|
73
|
+
console.log('✅ Docs scaffolding → docs/PROJECT-MEMORY.md, docs/HANDOFF.md');
|
|
74
|
+
console.log('✅ Registry → .prism/registry.json');
|
|
75
|
+
}
|
|
70
76
|
|
|
71
77
|
// HUD prompt — only ask interactively if not already installed and no flag given
|
|
72
78
|
if (!hasFlag('no-hud') && process.stdin.isTTY) {
|
|
@@ -308,7 +314,7 @@ switch (command) {
|
|
|
308
314
|
console.log(`🌈 claude-prism — EUDEC methodology framework for AI coding agents
|
|
309
315
|
|
|
310
316
|
Usage:
|
|
311
|
-
prism init [--no-hooks]
|
|
317
|
+
prism init [--no-hooks] [--docs] Install prism in current project
|
|
312
318
|
prism init --global Install globally (~/.claude/) + OMC skill
|
|
313
319
|
prism check [--ci] Verify installation
|
|
314
320
|
prism doctor Diagnose issues with fix suggestions
|
|
@@ -325,6 +331,7 @@ Usage:
|
|
|
325
331
|
|
|
326
332
|
Options:
|
|
327
333
|
--no-hooks Skip commit guard hook
|
|
334
|
+
--docs Create docs/ scaffolding (PROJECT-MEMORY.md, HANDOFF.md, registry.json)
|
|
328
335
|
--hud Auto-enable HUD during init (no prompt)
|
|
329
336
|
--no-hud Skip HUD prompt during init
|
|
330
337
|
--dry-run Show what init would do without making changes
|
package/lib/handoff.mjs
CHANGED
|
@@ -70,23 +70,61 @@ export function generateHandoff(projectRoot) {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Parse YAML-like frontmatter from markdown content
|
|
74
|
+
* @param {string} content - Markdown file content
|
|
75
|
+
* @returns {Object} Parsed frontmatter key-value pairs
|
|
74
76
|
*/
|
|
75
|
-
export function
|
|
76
|
-
const
|
|
77
|
-
if (!
|
|
77
|
+
export function parseFrontmatter(content) {
|
|
78
|
+
const match = content.match(/^---\n([\s\S]*?)\n---/);
|
|
79
|
+
if (!match) return {};
|
|
80
|
+
const fm = {};
|
|
81
|
+
for (const line of match[1].split('\n')) {
|
|
82
|
+
const [key, ...rest] = line.split(':');
|
|
83
|
+
if (key && rest.length) {
|
|
84
|
+
const val = rest.join(':').trim();
|
|
85
|
+
if (val.startsWith('[')) {
|
|
86
|
+
try { fm[key.trim()] = JSON.parse(val); } catch { fm[key.trim()] = val; }
|
|
87
|
+
} else {
|
|
88
|
+
fm[key.trim()] = val;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return fm;
|
|
93
|
+
}
|
|
78
94
|
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
95
|
+
/**
|
|
96
|
+
* Get all plans with frontmatter and progress info
|
|
97
|
+
* @param {string} projectRoot - Project root directory
|
|
98
|
+
* @returns {Array<Object>} Array of plan objects
|
|
99
|
+
*/
|
|
100
|
+
export function getAllPlans(projectRoot) {
|
|
101
|
+
const plansDir = join(projectRoot, '.prism', 'plans');
|
|
102
|
+
if (!existsSync(plansDir)) return [];
|
|
103
|
+
const files = readdirSync(plansDir).filter(f => f.endsWith('.md')).sort().reverse();
|
|
104
|
+
return files.map(f => {
|
|
105
|
+
const content = readFileSync(join(plansDir, f), 'utf8');
|
|
106
|
+
const fm = parseFrontmatter(content);
|
|
107
|
+
const parsed = parsePlanContent(content, f);
|
|
108
|
+
return { file: f, content, ...fm, ...parsed };
|
|
109
|
+
});
|
|
110
|
+
}
|
|
83
111
|
|
|
84
|
-
|
|
112
|
+
/**
|
|
113
|
+
* Read active plan file and extract progress info
|
|
114
|
+
* Now uses frontmatter status to find active plans
|
|
115
|
+
*/
|
|
116
|
+
export function getActivePlanInfo(projectRoot) {
|
|
117
|
+
const plans = getAllPlans(projectRoot);
|
|
118
|
+
if (plans.length === 0) return null;
|
|
85
119
|
|
|
86
|
-
|
|
87
|
-
const
|
|
120
|
+
// Find the most recent plan with status: active (or no frontmatter = default active)
|
|
121
|
+
const activePlan = plans.find(p => (p.status || 'active') === 'active');
|
|
122
|
+
if (!activePlan) return null;
|
|
88
123
|
|
|
89
|
-
return parsePlanContent(
|
|
124
|
+
return parsePlanContent(
|
|
125
|
+
readFileSync(join(projectRoot, '.prism', 'plans', activePlan.file), 'utf8'),
|
|
126
|
+
activePlan.file
|
|
127
|
+
);
|
|
90
128
|
}
|
|
91
129
|
|
|
92
130
|
/**
|
|
@@ -170,6 +208,49 @@ export function parsePlanContent(content, planName) {
|
|
|
170
208
|
return { planName, total, done, nextBatch, nextTasks, currentBatchFiles };
|
|
171
209
|
}
|
|
172
210
|
|
|
211
|
+
/**
|
|
212
|
+
* Detect file overlaps across active plans
|
|
213
|
+
* @param {string} projectRoot - Project root directory
|
|
214
|
+
* @returns {Array<{file: string, plans: string[]}>} Conflicting files
|
|
215
|
+
*/
|
|
216
|
+
export function detectPlanConflicts(projectRoot) {
|
|
217
|
+
const plans = getAllPlans(projectRoot).filter(p => (p.status || 'active') === 'active');
|
|
218
|
+
const fileMap = new Map();
|
|
219
|
+
|
|
220
|
+
for (const plan of plans) {
|
|
221
|
+
const files = extractFilesInScope(plan.content || '');
|
|
222
|
+
for (const f of files) {
|
|
223
|
+
if (!fileMap.has(f)) fileMap.set(f, []);
|
|
224
|
+
fileMap.get(f).push(plan.file);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
const conflicts = [];
|
|
229
|
+
for (const [file, planList] of fileMap) {
|
|
230
|
+
if (planList.length > 1) {
|
|
231
|
+
conflicts.push({ file, plans: planList });
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
return conflicts;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Extract file paths from "Files in Scope" section
|
|
239
|
+
* @param {string} content - Plan markdown content
|
|
240
|
+
* @returns {string[]} File paths found
|
|
241
|
+
*/
|
|
242
|
+
function extractFilesInScope(content) {
|
|
243
|
+
const scopeMatch = content.match(/##\s+Files\s+in\s+Scope\s*\n([\s\S]*?)(?=\n##|\n---|\s*$)/i);
|
|
244
|
+
if (!scopeMatch) return [];
|
|
245
|
+
const paths = [];
|
|
246
|
+
const backtickRegex = /`([^`]+\.[a-z]+)`/g;
|
|
247
|
+
let m;
|
|
248
|
+
while ((m = backtickRegex.exec(scopeMatch[1])) !== null) {
|
|
249
|
+
paths.push(m[1]);
|
|
250
|
+
}
|
|
251
|
+
return paths;
|
|
252
|
+
}
|
|
253
|
+
|
|
173
254
|
/**
|
|
174
255
|
* Get git status info
|
|
175
256
|
*/
|
package/lib/installer.mjs
CHANGED
|
@@ -20,7 +20,7 @@ const TEMPLATES_DIR = join(__dirname, '..', 'templates');
|
|
|
20
20
|
* @param {boolean} options.hooks - Install commit-guard hook
|
|
21
21
|
*/
|
|
22
22
|
export async function init(projectDir, options = {}) {
|
|
23
|
-
const { hooks = true } = options;
|
|
23
|
+
const { hooks = true, docs = false } = options;
|
|
24
24
|
|
|
25
25
|
// 1. Create directories
|
|
26
26
|
const claudeDir = join(projectDir, '.claude');
|
|
@@ -108,6 +108,26 @@ export async function init(projectDir, options = {}) {
|
|
|
108
108
|
if (!existsSync(prismGitignore)) {
|
|
109
109
|
writeFileSync(prismGitignore, '.version\n');
|
|
110
110
|
}
|
|
111
|
+
|
|
112
|
+
// 7. Docs scaffolding (optional)
|
|
113
|
+
if (docs) {
|
|
114
|
+
const docsDir = join(projectDir, 'docs');
|
|
115
|
+
mkdirSync(docsDir, { recursive: true });
|
|
116
|
+
mkdirSync(join(docsDir, 'reference'), { recursive: true });
|
|
117
|
+
mkdirSync(join(docsDir, 'archive'), { recursive: true });
|
|
118
|
+
|
|
119
|
+
const memoryPath = join(docsDir, 'PROJECT-MEMORY.md');
|
|
120
|
+
if (!existsSync(memoryPath)) {
|
|
121
|
+
writeFileSync(memoryPath, PROJECT_MEMORY_TEMPLATE);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const handoffPath = join(docsDir, 'HANDOFF.md');
|
|
125
|
+
if (!existsSync(handoffPath)) {
|
|
126
|
+
writeFileSync(handoffPath, HANDOFF_TEMPLATE);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
createRegistry(projectDir);
|
|
130
|
+
}
|
|
111
131
|
}
|
|
112
132
|
|
|
113
133
|
/**
|
|
@@ -614,7 +634,7 @@ export function uninstallGlobal(options = {}) {
|
|
|
614
634
|
* @returns {{ actions: Array<{type: string, path: string, status: string}> }}
|
|
615
635
|
*/
|
|
616
636
|
export function dryRun(projectDir, options = {}) {
|
|
617
|
-
const { hooks = true } = options;
|
|
637
|
+
const { hooks = true, docs = false } = options;
|
|
618
638
|
const claudeDir = join(projectDir, '.claude');
|
|
619
639
|
const actions = [];
|
|
620
640
|
|
|
@@ -674,6 +694,19 @@ export function dryRun(projectDir, options = {}) {
|
|
|
674
694
|
actions.push({ type: 'config', path: '.prism/config.json', status: 'create' });
|
|
675
695
|
}
|
|
676
696
|
|
|
697
|
+
// Docs scaffolding
|
|
698
|
+
if (docs) {
|
|
699
|
+
const docsDir = join(projectDir, 'docs');
|
|
700
|
+
for (const sub of ['', 'reference/', 'archive/']) {
|
|
701
|
+
actions.push({ type: 'docs', path: `docs/${sub}`, status: existsSync(join(docsDir, sub)) ? 'exists' : 'create' });
|
|
702
|
+
}
|
|
703
|
+
const memoryPath = join(docsDir, 'PROJECT-MEMORY.md');
|
|
704
|
+
actions.push({ type: 'docs', path: 'docs/PROJECT-MEMORY.md', status: existsSync(memoryPath) ? 'exists' : 'create' });
|
|
705
|
+
const handoffPath = join(docsDir, 'HANDOFF.md');
|
|
706
|
+
actions.push({ type: 'docs', path: 'docs/HANDOFF.md', status: existsSync(handoffPath) ? 'exists' : 'create' });
|
|
707
|
+
actions.push({ type: 'docs', path: '.prism/registry.json', status: 'create' });
|
|
708
|
+
}
|
|
709
|
+
|
|
677
710
|
return { actions };
|
|
678
711
|
}
|
|
679
712
|
|
|
@@ -759,6 +792,67 @@ export function hudStatus(options = {}) {
|
|
|
759
792
|
return { enabled, scriptExists: existsSync(scriptPath), command: cmd };
|
|
760
793
|
}
|
|
761
794
|
|
|
795
|
+
// ─── templates ───
|
|
796
|
+
|
|
797
|
+
const PROJECT_MEMORY_TEMPLATE = `# Project Memory
|
|
798
|
+
|
|
799
|
+
Cumulative knowledge that survives session transitions.
|
|
800
|
+
|
|
801
|
+
## Architectural Decisions
|
|
802
|
+
<!-- [date] [decision] — [rationale] -->
|
|
803
|
+
|
|
804
|
+
## Conventions
|
|
805
|
+
<!-- [naming, patterns, file structure rules] -->
|
|
806
|
+
|
|
807
|
+
## Environment Gotchas
|
|
808
|
+
<!-- [quirks, workarounds, version constraints] -->
|
|
809
|
+
|
|
810
|
+
## Package Constraints
|
|
811
|
+
<!-- [package@version — why pinned] -->
|
|
812
|
+
`;
|
|
813
|
+
|
|
814
|
+
const HANDOFF_TEMPLATE = `# Handoff
|
|
815
|
+
|
|
816
|
+
## Status
|
|
817
|
+
[What's done, what's remaining]
|
|
818
|
+
|
|
819
|
+
## Current State
|
|
820
|
+
[Branch name, last commit, any uncommitted changes]
|
|
821
|
+
|
|
822
|
+
## Next Steps
|
|
823
|
+
[Exact next action to take, with file paths]
|
|
824
|
+
|
|
825
|
+
## Decisions Made
|
|
826
|
+
[Key choices and why]
|
|
827
|
+
|
|
828
|
+
## Known Issues
|
|
829
|
+
[Anything broken or incomplete]
|
|
830
|
+
`;
|
|
831
|
+
|
|
832
|
+
function createRegistry(projectDir) {
|
|
833
|
+
const registryPath = join(projectDir, '.prism', 'registry.json');
|
|
834
|
+
const registry = {
|
|
835
|
+
ssot: [],
|
|
836
|
+
session: {
|
|
837
|
+
handoff: 'docs/HANDOFF.md',
|
|
838
|
+
memory: 'docs/PROJECT-MEMORY.md'
|
|
839
|
+
},
|
|
840
|
+
reference: [],
|
|
841
|
+
archive: 'docs/archive/'
|
|
842
|
+
};
|
|
843
|
+
|
|
844
|
+
const docsDir = join(projectDir, 'docs');
|
|
845
|
+
if (existsSync(docsDir)) {
|
|
846
|
+
const files = readdirSync(docsDir).filter(f => f.endsWith('.md'));
|
|
847
|
+
for (const f of files) {
|
|
848
|
+
if (f === 'HANDOFF.md' || f === 'PROJECT-MEMORY.md') continue;
|
|
849
|
+
registry.ssot.push({ path: `docs/${f}`, role: 'unknown' });
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
|
|
853
|
+
writeFileSync(registryPath, JSON.stringify(registry, null, 2) + '\n');
|
|
854
|
+
}
|
|
855
|
+
|
|
762
856
|
// ─── internal helpers ───
|
|
763
857
|
|
|
764
858
|
function injectRules(projectDir, overrideRulesPath) {
|
package/package.json
CHANGED
|
@@ -6,11 +6,17 @@ When this command is invoked:
|
|
|
6
6
|
|
|
7
7
|
1. **Check** if `.prism/plans/` exists. If not, report "No plans directory found. Create one with `/claude-prism:plan create <topic>`."
|
|
8
8
|
2. **Scan** `.prism/plans/` for all `.md` files
|
|
9
|
-
3. **
|
|
10
|
-
-
|
|
9
|
+
3. **Parse frontmatter** for each plan (between `---` markers at file start):
|
|
10
|
+
- `status: active` → 📋
|
|
11
|
+
- `status: completed` → ✅
|
|
12
|
+
- `status: archived` → 📦
|
|
13
|
+
- `status: blocked` → 🚫
|
|
14
|
+
- No frontmatter → 📋 (default: active)
|
|
15
|
+
4. **Show each plan** with:
|
|
16
|
+
- Status icon, filename and date
|
|
11
17
|
- Goal (first line after `## Goal`)
|
|
12
18
|
- Progress: count [x] vs [ ] tasks
|
|
13
|
-
-
|
|
19
|
+
- Frontmatter status + task-based progress
|
|
14
20
|
|
|
15
21
|
## Create New Plan
|
|
16
22
|
|
|
@@ -18,9 +24,15 @@ If user requests a new plan:
|
|
|
18
24
|
|
|
19
25
|
1. **Determine topic** from user's description
|
|
20
26
|
2. **Create file** at `.prism/plans/YYYY-MM-DD-<topic>.md`
|
|
21
|
-
3. **Use EUDEC template
|
|
27
|
+
3. **Use EUDEC template** (with frontmatter):
|
|
22
28
|
|
|
23
29
|
```
|
|
30
|
+
---
|
|
31
|
+
status: active
|
|
32
|
+
created: YYYY-MM-DD
|
|
33
|
+
depends_on: []
|
|
34
|
+
---
|
|
35
|
+
|
|
24
36
|
## Goal
|
|
25
37
|
One sentence: what we're building and why.
|
|
26
38
|
|
|
@@ -53,6 +65,20 @@ Tech stack, key decisions, 2-3 sentences max.
|
|
|
53
65
|
|
|
54
66
|
4. **Announce**: "Plan file created. Use /claude-prism:prism to start execution."
|
|
55
67
|
|
|
68
|
+
## Check (file overlap detection)
|
|
69
|
+
|
|
70
|
+
If user requests a conflict check:
|
|
71
|
+
|
|
72
|
+
1. **Read all active plans** from `.prism/plans/` (frontmatter `status: active` or no frontmatter)
|
|
73
|
+
2. **Parse "Files in Scope"** section from each plan — extract backtick-wrapped file paths
|
|
74
|
+
3. **Detect file overlaps** across plans
|
|
75
|
+
4. **Report**:
|
|
76
|
+
- ⚠️ File overlap: `path/to/file`
|
|
77
|
+
← plan-a.md (active)
|
|
78
|
+
← plan-b.md (active)
|
|
79
|
+
- Recommendation: check dependency order or merge plans
|
|
80
|
+
5. If no overlaps found: "✅ No file conflicts across active plans."
|
|
81
|
+
|
|
56
82
|
## View Specific Plan
|
|
57
83
|
|
|
58
84
|
If user specifies a plan file:
|
|
@@ -30,7 +30,7 @@ When this command is invoked:
|
|
|
30
30
|
✅ scope-guard (warn: 4/8, block: 7/12)
|
|
31
31
|
|
|
32
32
|
Plans:
|
|
33
|
-
📋 2026-02-15-p3-inspector.md [3/5] 60%
|
|
34
|
-
|
|
35
|
-
|
|
33
|
+
📋 2026-02-15-p3-inspector.md [3/5] 60% (active)
|
|
34
|
+
✅ 2026-02-15-p8-templates.md [5/5] 100% (completed)
|
|
35
|
+
🚫 2026-02-16-p4-token.md [0/4] 0% (blocked)
|
|
36
36
|
```
|
package/templates/rules-lean.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
<!-- PRISM:START -->
|
|
3
|
+
<!-- PRISM:BOOT -->
|
|
4
|
+
## Session Bootstrap (auto-generated by Prism)
|
|
5
|
+
|
|
6
|
+
On session start, read in order:
|
|
7
|
+
1. `docs/PROJECT-MEMORY.md` (if exists) — persistent architectural decisions and conventions
|
|
8
|
+
2. `docs/HANDOFF.md` (if exists) — previous session's state and next steps
|
|
9
|
+
3. `.prism/plans/` — scan for active plans (frontmatter `status: active`)
|
|
10
|
+
4. `.prism/registry.json` (if exists) — project document registry
|
|
11
|
+
|
|
12
|
+
After reading, verify described state matches reality (git status, file contents).
|
|
13
|
+
<!-- PRISM:BOOT:END -->
|
|
14
|
+
|
|
3
15
|
# Prism — EUDEC Methodology (Lean Mode)
|
|
4
16
|
|
|
5
17
|
**EUDEC = Essence, Understand, Decompose, Execute, Checkpoint** — the core cycle.
|
|
@@ -14,7 +26,7 @@ For the full methodology, run `/claude-prism:prism`.
|
|
|
14
26
|
|
|
15
27
|
| Weight | Criteria | Path |
|
|
16
28
|
|--------|----------|------|
|
|
17
|
-
| **Lightweight** | 1-2 files, <50 LOC, clear scope | Essence (1 line) → Execute → Verify → Done |
|
|
29
|
+
| **Lightweight** | 1-2 files, <50 LOC, clear scope | Essence (1 line) → Execute → Verify → Record (1-line to `docs/PROJECT-MEMORY.md`) → Done |
|
|
18
30
|
| **Standard** | 3-5 files, 50-200 LOC | Run `/claude-prism:prism` for full EUDEC guidance |
|
|
19
31
|
| **Full** | 6+ files, 200+ LOC, or unclear scope | Run `/claude-prism:prism` for full EUDEC with plan file |
|
|
20
32
|
|
|
@@ -80,7 +92,9 @@ After 3 failed fixes: STOP. Discuss with user.
|
|
|
80
92
|
|
|
81
93
|
## Session Handoff
|
|
82
94
|
|
|
83
|
-
|
|
95
|
+
Prism hooks auto-generate `docs/HANDOFF.md` on compaction and session end.
|
|
96
|
+
`docs/PROJECT-MEMORY.md` is auto-appended on session end.
|
|
97
|
+
For manual handoff: Status, Current State, Next Steps, Decisions Made, Known Issues.
|
|
84
98
|
|
|
85
99
|
## Completion Declaration
|
|
86
100
|
|
package/templates/rules.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
|
|
2
2
|
<!-- PRISM:START -->
|
|
3
|
+
<!-- PRISM:BOOT -->
|
|
4
|
+
## Session Bootstrap (auto-generated by Prism)
|
|
5
|
+
|
|
6
|
+
On session start, read in order:
|
|
7
|
+
1. `docs/PROJECT-MEMORY.md` (if exists) — persistent architectural decisions and conventions
|
|
8
|
+
2. `docs/HANDOFF.md` (if exists) — previous session's state and next steps
|
|
9
|
+
3. `.prism/plans/` — scan for active plans (frontmatter `status: active`)
|
|
10
|
+
4. `.prism/registry.json` (if exists) — project document registry
|
|
11
|
+
|
|
12
|
+
After reading, verify described state matches reality (git status, file contents).
|
|
13
|
+
<!-- PRISM:BOOT:END -->
|
|
14
|
+
|
|
3
15
|
# Prism — EUDEC Methodology Framework
|
|
4
16
|
|
|
5
17
|
**EUDEC = Essence, Understand, Decompose, Execute, Checkpoint** — the core cycle.
|
|
@@ -76,7 +88,7 @@ After extracting essence and task type, assess task weight to select the appropr
|
|
|
76
88
|
| **Standard** | 3-5 files, 50-200 LOC | Full EUDEC, summary checkpoints |
|
|
77
89
|
| **Full** | 6+ files, 200+ LOC, or unclear scope | Full EUDEC with plan file + full checkpoints |
|
|
78
90
|
|
|
79
|
-
**Lightweight path** skips formal UNDERSTAND (sufficiency assessment, question rounds, alignment confirmation) and DECOMPOSE. The essence statement still grounds the work but takes one line, not a full section.
|
|
91
|
+
**Lightweight path** skips formal UNDERSTAND (sufficiency assessment, question rounds, alignment confirmation) and DECOMPOSE. The essence statement still grounds the work but takes one line, not a full section. Record: append 1-line summary to `docs/PROJECT-MEMORY.md` (what was changed and why).
|
|
80
92
|
|
|
81
93
|
**Bugfix fast path** (regardless of file count):
|
|
82
94
|
1. Reproduce the symptom
|
|
@@ -419,6 +431,11 @@ User says "stop here" → clean exit
|
|
|
419
431
|
- Task is multi-session by nature (multi-day refactor, large migration)
|
|
420
432
|
- Switching to a different task mid-session
|
|
421
433
|
|
|
434
|
+
**Auto-triggers (via Prism hooks):**
|
|
435
|
+
- PreCompact hook → auto-generates `docs/HANDOFF.md`
|
|
436
|
+
- SessionEnd hook → auto-generates `docs/HANDOFF.md` + appends to `docs/PROJECT-MEMORY.md`
|
|
437
|
+
- `/compact` 실행 전 → HANDOFF 자동 저장 (hook으로 처리됨)
|
|
438
|
+
|
|
422
439
|
### 6-2. Handoff Document
|
|
423
440
|
|
|
424
441
|
Create `docs/HANDOFF.md` with:
|