create-claude-cabinet 0.25.0 → 0.25.2
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/lib/cli.js
CHANGED
|
@@ -463,6 +463,7 @@ const MODULES = {
|
|
|
463
463
|
'skills/plan/phases/verify-plan.md',
|
|
464
464
|
'skills/execute/phases/verify-emit.md',
|
|
465
465
|
'skills/debrief/phases/verify-coverage.md',
|
|
466
|
+
'skills/orient/phases/verify-backfill.md',
|
|
466
467
|
],
|
|
467
468
|
postInstall: 'verify-setup',
|
|
468
469
|
},
|
|
@@ -690,6 +691,14 @@ async function run() {
|
|
|
690
691
|
// Explicit module selection via --modules <key1,key2,...>. Mandatory
|
|
691
692
|
// modules are always included regardless of the flag value, so the
|
|
692
693
|
// installer always has session-loop etc. available.
|
|
694
|
+
//
|
|
695
|
+
// On an upgrade (existing .ccrc.json present), --modules is treated
|
|
696
|
+
// ADDITIVELY: the requested keys are merged with whatever the
|
|
697
|
+
// existing installation already had enabled. Otherwise an `--modules
|
|
698
|
+
// verify` invocation on a project with 9 enabled modules would
|
|
699
|
+
// silently deregister 8 of them. Replacing the existing set on
|
|
700
|
+
// upgrade is almost never what the operator wants. (Fresh installs
|
|
701
|
+
// unchanged — there's no prior set to merge with.)
|
|
693
702
|
const mandatoryKeys = Object.entries(MODULES)
|
|
694
703
|
.filter(([, mod]) => mod.mandatory)
|
|
695
704
|
.map(([key]) => key);
|
|
@@ -699,7 +708,17 @@ async function run() {
|
|
|
699
708
|
console.log(` ⚠ Unknown modules ignored: ${unknown.join(', ')}`);
|
|
700
709
|
console.log(` Known modules: ${Object.keys(MODULES).join(', ')}`);
|
|
701
710
|
}
|
|
702
|
-
|
|
711
|
+
let existingEnabled = [];
|
|
712
|
+
if (dirState === 'existing-install') {
|
|
713
|
+
const existing = readMetadata(projectDir);
|
|
714
|
+
existingEnabled = Object.entries(existing.modules || {})
|
|
715
|
+
.filter(([k, enabled]) => enabled && MODULES[k])
|
|
716
|
+
.map(([k]) => k);
|
|
717
|
+
if (existingEnabled.length > 0) {
|
|
718
|
+
console.log(` Existing modules carried forward: ${existingEnabled.join(', ')}`);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
selectedModules = [...new Set([...mandatoryKeys, ...existingEnabled, ...requested])];
|
|
703
722
|
const skippedKeys = Object.keys(MODULES).filter(k => !selectedModules.includes(k));
|
|
704
723
|
for (const k of skippedKeys) {
|
|
705
724
|
skippedModules[k] = `Skipped by --modules flag`;
|
|
@@ -891,6 +910,19 @@ async function run() {
|
|
|
891
910
|
continue;
|
|
892
911
|
}
|
|
893
912
|
|
|
913
|
+
// Phase file customization guard — mirrors copy.js:48-59 for the
|
|
914
|
+
// single-file install path. If the destination path is a phase
|
|
915
|
+
// file and the on-disk content differs from upstream (operator
|
|
916
|
+
// edited it), preserve it. This keeps the documented "customize
|
|
917
|
+
// by editing the phase file" affordance intact across upgrades.
|
|
918
|
+
const isPhaseFile = tmpl.includes('/phases/') || tmpl.includes('\\phases\\');
|
|
919
|
+
if (isPhaseFile && existingContent.trim() !== '' && existingContent.trim() !== incoming.trim()) {
|
|
920
|
+
console.log(` Preserved customized phase: ${tmpl}`);
|
|
921
|
+
totalSkipped++;
|
|
922
|
+
allManifest[mPath] = hashContent(existingContent);
|
|
923
|
+
continue;
|
|
924
|
+
}
|
|
925
|
+
|
|
894
926
|
if (flags.yes || dirState === 'existing-install') {
|
|
895
927
|
// If file is in the old manifest, it's upstream-managed — overwrite.
|
|
896
928
|
// If not, it's project-created — skip.
|
package/package.json
CHANGED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# Verify-Plan Backfill
|
|
2
|
+
|
|
3
|
+
**Contract: v0.x soft — may change before v1.0.** This phase is part
|
|
4
|
+
of the `/verify` integration with `/orient`. Customization phase
|
|
5
|
+
(opt-in), copied into your project only when the `verify` module is
|
|
6
|
+
selected during `npx create-claude-cabinet`.
|
|
7
|
+
|
|
8
|
+
**Runs:** after work-scan, before briefing. Pairs with
|
|
9
|
+
[verify-coverage on /debrief] — verify-coverage catches drift on
|
|
10
|
+
acts that already shipped; this phase catches the same gap on the
|
|
11
|
+
*front* end, at planning time, on acts still pending.
|
|
12
|
+
|
|
13
|
+
## What this phase does
|
|
14
|
+
|
|
15
|
+
Surfaces pending plans in pib-db whose surface area touches UI but
|
|
16
|
+
whose notes lack a `## Verify Plan` section. Advisory only — never
|
|
17
|
+
auto-modifies an action. The operator decides whether to re-plan the
|
|
18
|
+
act (adding the section) or accept the drift.
|
|
19
|
+
|
|
20
|
+
## No-op guards
|
|
21
|
+
|
|
22
|
+
This phase exits silently in two cases — checked in order:
|
|
23
|
+
|
|
24
|
+
1. **The project has no `e2e/features/` directory.** Without the
|
|
25
|
+
runtime installed, there are no feature files to be out of sync
|
|
26
|
+
with. Skip.
|
|
27
|
+
2. **No pending actions match the UI heuristic.** No Attention Items
|
|
28
|
+
entry, no warning.
|
|
29
|
+
|
|
30
|
+
Detection for guard 1:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
test -d e2e/features
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
If either guard trips, skip the phase entirely. No briefing line.
|
|
37
|
+
|
|
38
|
+
## Detection algorithm
|
|
39
|
+
|
|
40
|
+
1. **Query pib-db for pending UI-touching actions without a Verify
|
|
41
|
+
Plan section.** The default heuristic matches the surface-area path
|
|
42
|
+
patterns used by `verify-coverage.md`:
|
|
43
|
+
|
|
44
|
+
```sql
|
|
45
|
+
SELECT fid, text, notes FROM actions
|
|
46
|
+
WHERE completed = 0
|
|
47
|
+
AND deleted_at IS NULL
|
|
48
|
+
AND (
|
|
49
|
+
notes LIKE '%webapp/frontend/%'
|
|
50
|
+
OR notes LIKE '%components/%'
|
|
51
|
+
OR notes LIKE '%pages/%'
|
|
52
|
+
OR notes LIKE '%app/%'
|
|
53
|
+
)
|
|
54
|
+
AND notes NOT LIKE '%## Verify Plan%'
|
|
55
|
+
ORDER BY created ASC;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Run via `node scripts/pib-db.mjs query "<sql>"` or, if the project
|
|
59
|
+
has a `phases/ui-paths.md` override, substitute those paths.
|
|
60
|
+
|
|
61
|
+
2. **Per match, judge whether it really is UI-touching.** The path
|
|
62
|
+
heuristic over-matches (e.g., an action that merely mentions
|
|
63
|
+
`webapp/frontend/` in a passing comment). Read the action's
|
|
64
|
+
`## Surface Area` section if present and confirm the listed files
|
|
65
|
+
include a UI path. If not, drop the match silently.
|
|
66
|
+
|
|
67
|
+
3. **Cap at 5 entries.** If more than 5 match, list the 5
|
|
68
|
+
oldest-created and append a "(+N more — run /pulse for full list)"
|
|
69
|
+
note. Don't dump 20 entries into the orient briefing.
|
|
70
|
+
|
|
71
|
+
## Output
|
|
72
|
+
|
|
73
|
+
For each remaining match, emit one Attention Items entry:
|
|
74
|
+
|
|
75
|
+
> **`<fid>`** — `<action text>`
|
|
76
|
+
> Pending plan touches UI but lacks a `## Verify Plan` section.
|
|
77
|
+
> Suggest: `/plan <fid>` to backfill the section, or accept drift —
|
|
78
|
+
> `/debrief` will flag this act on completion if it ships uncovered.
|
|
79
|
+
|
|
80
|
+
The entries go in the briefing's **Attention Items** section,
|
|
81
|
+
alongside any items surfaced by deferred-check, health-checks, etc.
|
|
82
|
+
|
|
83
|
+
## What this phase does NOT do
|
|
84
|
+
|
|
85
|
+
- It does not modify action notes. The operator runs `/plan <fid>`
|
|
86
|
+
to backfill, or chooses to accept the drift.
|
|
87
|
+
- It does not file new actions or projects.
|
|
88
|
+
- It does not block orient. Even with 5 backfill candidates, orient
|
|
89
|
+
completes; the Attention Items accumulate.
|
|
90
|
+
- It does not look at *completed* acts — that's verify-coverage's job
|
|
91
|
+
on `/debrief`.
|
|
92
|
+
|
|
93
|
+
## Tuning to reduce false positives
|
|
94
|
+
|
|
95
|
+
Two common refinements:
|
|
96
|
+
|
|
97
|
+
1. **Path override.** A project's `phases/ui-paths.md` (if defined)
|
|
98
|
+
replaces the default path list. See `verify-coverage.md` for the
|
|
99
|
+
same pattern.
|
|
100
|
+
2. **Per-act opt-out.** An action can declare in its notes that it's
|
|
101
|
+
intentionally backend-only:
|
|
102
|
+
```
|
|
103
|
+
## Verify Coverage
|
|
104
|
+
Skip: this change is internal — no UI behavior changed.
|
|
105
|
+
```
|
|
106
|
+
This phase reads that line and skips the act, same as
|
|
107
|
+
verify-coverage does.
|