create-claude-cabinet 0.29.1 → 0.29.3
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 +1 -1
- package/package.json +1 -1
- package/templates/site-audit-runtime/package.json +1 -1
- package/templates/skills/orient/SKILL.md +10 -0
- package/templates/skills/spring-clean/SKILL.md +260 -0
- package/templates/skills/spring-clean/phases/analysis-scope.md +24 -0
- package/templates/skills/spring-clean/phases/execute-decisions.md +17 -0
- package/templates/skills/spring-clean/phases/triage-presentation.md +24 -0
- package/templates/skills/spring-clean/phases/verification-rules.md +22 -0
package/lib/cli.js
CHANGED
|
@@ -476,7 +476,7 @@ const MODULES = {
|
|
|
476
476
|
mandatory: false,
|
|
477
477
|
default: true,
|
|
478
478
|
lean: false,
|
|
479
|
-
templates: ['scripts/pib-db.mjs', 'scripts/pib-db-lib.mjs', 'scripts/pib-db-mcp-server.mjs', 'scripts/pib-db-schema.sql', 'scripts/work-tracker-server.mjs', 'scripts/work-tracker-ui.html', 'skills/work-tracker'],
|
|
479
|
+
templates: ['scripts/pib-db.mjs', 'scripts/pib-db-lib.mjs', 'scripts/pib-db-mcp-server.mjs', 'scripts/pib-db-schema.sql', 'scripts/work-tracker-server.mjs', 'scripts/work-tracker-ui.html', 'skills/work-tracker', 'skills/spring-clean'],
|
|
480
480
|
needsDb: true,
|
|
481
481
|
},
|
|
482
482
|
'planning': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@claude-cabinet/site-audit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Comprehensive deployed-site quality audit engine for Claude Cabinet. Runs checks across performance, accessibility, security, SEO, content, DNS, and privacy against a deployed URL; single-site and comparison modes; standalone HTML report.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -249,6 +249,16 @@ CLI.
|
|
|
249
249
|
- "N projects may be ready to close (0 open actions)"
|
|
250
250
|
- "N projects have had no activity in 14+ days"
|
|
251
251
|
|
|
252
|
+
4. **Spring-clean heuristic** — suggest `/spring-clean` when the backlog
|
|
253
|
+
shows structural cruft. Fire when ANY of:
|
|
254
|
+
- An active project has 10+ open actions AND no completion in 14+ days
|
|
255
|
+
- Total active projects > 7
|
|
256
|
+
Cap at once per 7 days — check if a spring-clean note exists in the
|
|
257
|
+
last 7 days of session context before surfacing. When it fires,
|
|
258
|
+
append to Attention Items:
|
|
259
|
+
*"Backlog may benefit from `/spring-clean` (N stale, M open actions
|
|
260
|
+
in mega-projects)."*
|
|
261
|
+
|
|
252
262
|
If pib-db doesn't exist, skip with no warning — the project may use
|
|
253
263
|
a different work tracking system configured in `phases/work-scan.md`.
|
|
254
264
|
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: spring-clean
|
|
3
|
+
description: |
|
|
4
|
+
Work-tracker backlog hygiene. Diagnoses cruft (stale projects, duplicates,
|
|
5
|
+
orphaned actions, mega-projects, naming issues), runs organized-mind
|
|
6
|
+
assessment for cognitive load, then walks you through interactive triage
|
|
7
|
+
with immediate pib-db mutations. Use when: backlog feels unwieldy,
|
|
8
|
+
"spring clean", "/spring-clean", or orient heuristic suggests it.
|
|
9
|
+
related:
|
|
10
|
+
- type: file
|
|
11
|
+
path: .claude/skills/spring-clean/phases/analysis-scope.md
|
|
12
|
+
role: "Project-specific heuristics for what to analyze and what to skip"
|
|
13
|
+
- type: file
|
|
14
|
+
path: .claude/skills/spring-clean/phases/verification-rules.md
|
|
15
|
+
role: "How to verify items against codebase state"
|
|
16
|
+
- type: file
|
|
17
|
+
path: .claude/skills/spring-clean/phases/triage-presentation.md
|
|
18
|
+
role: "How to present recommendations (inline default, UI optional)"
|
|
19
|
+
- type: file
|
|
20
|
+
path: .claude/skills/spring-clean/phases/execute-decisions.md
|
|
21
|
+
role: "How to apply approved mutations to pib-db"
|
|
22
|
+
- type: file
|
|
23
|
+
path: cabinet/_briefing.md
|
|
24
|
+
role: "Project identity and configuration"
|
|
25
|
+
argument-hint: "focus — e.g., 'stale', 'reorg', 'all'"
|
|
26
|
+
user-invocable: true
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
# /spring-clean — Work-Tracker Backlog Hygiene
|
|
30
|
+
|
|
31
|
+
## Arguments
|
|
32
|
+
|
|
33
|
+
If `$ARGUMENTS` is provided:
|
|
34
|
+
- **Empty** or **'all'**: Full analysis — stale, duplicates, orphans,
|
|
35
|
+
mega-projects, naming, cognitive load.
|
|
36
|
+
- **'stale'**: Focus on stale projects and completion candidates only.
|
|
37
|
+
- **'reorg'**: Focus on structural issues — mega-projects, reparenting,
|
|
38
|
+
missing functional groups, cognitive load.
|
|
39
|
+
|
|
40
|
+
## Purpose
|
|
41
|
+
|
|
42
|
+
Work-tracking backlogs accumulate cruft that orient detects symptomatically
|
|
43
|
+
("N projects stale") but can't resolve. Resolving it today requires an
|
|
44
|
+
improvised 30-minute session. This skill encodes the pattern: autonomous
|
|
45
|
+
diagnosis, then interactive cure.
|
|
46
|
+
|
|
47
|
+
**Boundary:** orient surfaces signals. Pulse checks descriptions.
|
|
48
|
+
Spring-clean resolves structural problems in the work tracker itself.
|
|
49
|
+
|
|
50
|
+
| Skill | Question it asks |
|
|
51
|
+
|-------|-----------------|
|
|
52
|
+
| Orient | What needs attention today? |
|
|
53
|
+
| Pulse | Do the descriptions match reality? |
|
|
54
|
+
| Spring-clean | Is the backlog itself well-structured? |
|
|
55
|
+
|
|
56
|
+
This is a **skeleton skill** using the `phases/` directory pattern.
|
|
57
|
+
|
|
58
|
+
### Phase File Protocol
|
|
59
|
+
|
|
60
|
+
Phase files have three states:
|
|
61
|
+
|
|
62
|
+
| State | Meaning |
|
|
63
|
+
|-------|---------|
|
|
64
|
+
| Absent or empty | Use this skeleton's **default behavior** for the phase |
|
|
65
|
+
| Contains only `skip: true` | **Explicitly opted out** — skip this phase entirely |
|
|
66
|
+
| Contains content | **Custom behavior** — use the file's content instead |
|
|
67
|
+
|
|
68
|
+
## Preflight
|
|
69
|
+
|
|
70
|
+
Verify `pib.db` exists (check for `scripts/pib-db.mjs` or pib_* MCP
|
|
71
|
+
tools). If not: "No work tracker found — /spring-clean requires pib-db."
|
|
72
|
+
|
|
73
|
+
## Workflow
|
|
74
|
+
|
|
75
|
+
### 1. Inventory & Analysis (autonomous)
|
|
76
|
+
|
|
77
|
+
Spawn a single agent to pull the full pib-db picture and analyze it.
|
|
78
|
+
The agent uses pib_query (MCP) or `node scripts/pib-db.mjs query` to
|
|
79
|
+
run the following queries:
|
|
80
|
+
|
|
81
|
+
**Active projects with open/completed counts and last activity:**
|
|
82
|
+
```sql
|
|
83
|
+
SELECT p.fid, p.name, p.status, p.created,
|
|
84
|
+
(SELECT COUNT(*) FROM actions a WHERE a.project_fid = p.fid AND a.completed = 0 AND a.deleted_at IS NULL) as open_count,
|
|
85
|
+
(SELECT COUNT(*) FROM actions a WHERE a.project_fid = p.fid AND a.completed = 1) as done_count,
|
|
86
|
+
(SELECT MAX(a.completed_at) FROM actions a WHERE a.project_fid = p.fid AND a.completed = 1) as last_completion,
|
|
87
|
+
(SELECT MAX(a.created) FROM actions a WHERE a.project_fid = p.fid AND a.deleted_at IS NULL) as last_action_created
|
|
88
|
+
FROM projects p
|
|
89
|
+
WHERE p.deleted_at IS NULL
|
|
90
|
+
ORDER BY p.status, open_count DESC
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**All open actions with project context:**
|
|
94
|
+
```sql
|
|
95
|
+
SELECT a.fid, a.text, a.status, a.created, a.project_fid, a.trigger_condition,
|
|
96
|
+
p.name as project_name, p.status as project_status
|
|
97
|
+
FROM actions a
|
|
98
|
+
LEFT JOIN projects p ON a.project_fid = p.fid
|
|
99
|
+
WHERE a.completed = 0 AND a.deleted_at IS NULL
|
|
100
|
+
ORDER BY p.name, a.sort_order
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
From this data, the agent produces structured analysis:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"stale": [{"fid": "...", "name": "...", "daysSinceActivity": 0, "openCount": 0}],
|
|
108
|
+
"duplicates": [{"fid1": "...", "fid2": "...", "matchReason": "..."}],
|
|
109
|
+
"orphans": [{"fid": "...", "text": "...", "parentStatus": "..."}],
|
|
110
|
+
"completionCandidates": [{"fid": "...", "name": "..."}],
|
|
111
|
+
"megaProjects": [{"fid": "...", "name": "...", "openCount": 0}],
|
|
112
|
+
"dataInconsistencies": [{"fid": "...", "issue": "..."}],
|
|
113
|
+
"namingIssues": [{"fid": "...", "currentName": "...", "concern": "..."}],
|
|
114
|
+
"statusDistribution": {"active": 0, "someday": 0, "dropped": 0},
|
|
115
|
+
"totalOpen": 0,
|
|
116
|
+
"totalProjects": 0
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Heuristics:
|
|
121
|
+
- **Stale:** active project with no completion in 14+ days and open actions
|
|
122
|
+
- **Completion candidate:** active project with 0 open actions
|
|
123
|
+
- **Orphan:** action whose project is dropped/completed/deleted
|
|
124
|
+
- **Mega-project:** 10+ open actions
|
|
125
|
+
- **Duplicate:** two actions in the same project with >70% text overlap
|
|
126
|
+
(Levenshtein or shared significant words)
|
|
127
|
+
- **Data inconsistency:** project marked active but all actions completed;
|
|
128
|
+
action marked open but project is dropped
|
|
129
|
+
- **Naming issue:** project name references a version that's now shipped,
|
|
130
|
+
or name is ambiguous/too generic
|
|
131
|
+
|
|
132
|
+
Read `phases/analysis-scope.md` for project-specific heuristic overrides.
|
|
133
|
+
|
|
134
|
+
Read `phases/verification-rules.md` for how to verify items against
|
|
135
|
+
codebase state (e.g., check if a planned feature was actually built).
|
|
136
|
+
|
|
137
|
+
### 2. Organized-Mind Assessment (autonomous, sequential after step 1)
|
|
138
|
+
|
|
139
|
+
Spawn the organized-mind cabinet member with the structured output from
|
|
140
|
+
step 1. The organized-mind agent evaluates:
|
|
141
|
+
|
|
142
|
+
- **Cognitive load:** How many active projects vs the ~4-item working
|
|
143
|
+
memory limit? Is the operator context-switching between too many
|
|
144
|
+
concurrent efforts?
|
|
145
|
+
- **Mixed-mode projects:** Any project that mixes "build this now"
|
|
146
|
+
actions with "research this someday" items? Candidates for split.
|
|
147
|
+
- **Functional grouping:** Are related actions scattered across
|
|
148
|
+
projects that should be consolidated? Are there implicit categories
|
|
149
|
+
that deserve their own project?
|
|
150
|
+
- **Categorization quality:** Do project names map to cognitive modes
|
|
151
|
+
(what brain you're in), or are they organized by type/urgency?
|
|
152
|
+
|
|
153
|
+
Returns structured recommendations alongside the inventory analysis.
|
|
154
|
+
|
|
155
|
+
### 3. Synthesis
|
|
156
|
+
|
|
157
|
+
Merge inventory analysis + organized-mind assessment into categorized
|
|
158
|
+
recommendations. Seven categories (locked — no ad-hoc categories):
|
|
159
|
+
|
|
160
|
+
| Category | Meaning | Typical action |
|
|
161
|
+
|----------|---------|---------------|
|
|
162
|
+
| **close** | Verified done or data inconsistency | `pib_complete_action` or update project status |
|
|
163
|
+
| **archive** | Not done but abandoned/superseded | Move to `someday` or `dropped` |
|
|
164
|
+
| **merge** | Two items covering same ground | Delete one, update the other's notes |
|
|
165
|
+
| **split** | Mega-project mixing cognitive modes | Create new project, reparent actions |
|
|
166
|
+
| **reparent** | Action belongs in a different project | Update action's `project_fid` |
|
|
167
|
+
| **create-project** | Missing functional group identified | `pib_create_project`, then reparent |
|
|
168
|
+
| **flag** | Worth attention but no immediate action | Surface in briefing, no mutation |
|
|
169
|
+
|
|
170
|
+
**Rename** is a sub-recommendation on other categories (e.g., "close
|
|
171
|
+
project X — also rename to reflect shipped version"), not a standalone
|
|
172
|
+
category.
|
|
173
|
+
|
|
174
|
+
Each recommendation includes: fid(s), category, rationale, proposed
|
|
175
|
+
mutation (the exact MCP call or CLI command).
|
|
176
|
+
|
|
177
|
+
### 4. Interactive Triage
|
|
178
|
+
|
|
179
|
+
Present recommendations in **decision-cost ascending** order:
|
|
180
|
+
|
|
181
|
+
1. **Structural summary** — total counts, high-level picture. No
|
|
182
|
+
decisions required. Just orientation.
|
|
183
|
+
2. **No-brainers** — closes, archives. Low decision cost, quick wins.
|
|
184
|
+
Batch by category.
|
|
185
|
+
3. **Structural moves** — merges, splits, reparents, create-project.
|
|
186
|
+
Higher cost, may need follow-up. Present individually.
|
|
187
|
+
4. **Flags** — advisory. No action unless the user wants to act.
|
|
188
|
+
|
|
189
|
+
For each recommendation, present:
|
|
190
|
+
- What it is and why
|
|
191
|
+
- The proposed mutation
|
|
192
|
+
- Three options: **approve** (apply now), **defer** (persist for next
|
|
193
|
+
spring-clean), **reject** (dismiss permanently)
|
|
194
|
+
|
|
195
|
+
**Defer affordance:** Deferred items are NOT lost. Append a note to
|
|
196
|
+
the action/project: `[spring-clean deferred: <rationale>]`. The next
|
|
197
|
+
spring-clean run surfaces them again with the prior rationale.
|
|
198
|
+
|
|
199
|
+
Apply approved changes immediately via pib_* MCP tools (or CLI
|
|
200
|
+
fallback). Read `phases/execute-decisions.md` for project-specific
|
|
201
|
+
mutation rules.
|
|
202
|
+
|
|
203
|
+
Read `phases/triage-presentation.md` for presentation customization
|
|
204
|
+
(inline conversation is the default; review UI is optional).
|
|
205
|
+
|
|
206
|
+
### 5. Summary
|
|
207
|
+
|
|
208
|
+
After all recommendations are triaged, report:
|
|
209
|
+
- Changes made (N closed, N archived, N merged, N reparented, ...)
|
|
210
|
+
- Deferred items (N items deferred for next run)
|
|
211
|
+
- Updated landscape (active project count, total open actions)
|
|
212
|
+
|
|
213
|
+
## Phase Summary
|
|
214
|
+
|
|
215
|
+
| Phase | Absent = | What it customizes |
|
|
216
|
+
|-------|----------|-------------------|
|
|
217
|
+
| `analysis-scope.md` | Default: standard heuristics | Project-specific thresholds and exclusions |
|
|
218
|
+
| `verification-rules.md` | Default: skip codebase verification | How to verify items against code |
|
|
219
|
+
| `triage-presentation.md` | Default: inline conversation | Presentation format (inline vs review UI) |
|
|
220
|
+
| `execute-decisions.md` | Default: direct pib_* MCP calls | Mutation rules and safeguards |
|
|
221
|
+
|
|
222
|
+
## Principles
|
|
223
|
+
|
|
224
|
+
- **Autonomous diagnosis, interactive cure.** The analysis is fully
|
|
225
|
+
automated. The triage is fully human-driven. No auto-mutations.
|
|
226
|
+
- **Decision-cost ordering.** Easy wins first. The user builds momentum
|
|
227
|
+
on no-brainer closes before facing structural reorganization.
|
|
228
|
+
- **Defer is not dismiss.** Ambiguous items persist. Spring-clean is
|
|
229
|
+
re-runnable — deferred items surface again with prior context.
|
|
230
|
+
- **Seven locked categories.** No ad-hoc categories. If something
|
|
231
|
+
doesn't fit, it's a flag. This prevents category sprawl across runs.
|
|
232
|
+
- **Organized-mind always runs.** Even on a small backlog, the
|
|
233
|
+
cognitive-load assessment is valuable — it catches structural issues
|
|
234
|
+
that raw staleness detection misses.
|
|
235
|
+
|
|
236
|
+
## Calibration
|
|
237
|
+
|
|
238
|
+
**Core failure this targets:** Backlogs that grow monotonically because
|
|
239
|
+
nothing resolves structural cruft. Orient says "N stale projects" every
|
|
240
|
+
session. The user mentally notes it and moves on. After 3 months, the
|
|
241
|
+
backlog is 40% cruft and the signal-to-noise ratio makes work-scanning
|
|
242
|
+
useless.
|
|
243
|
+
|
|
244
|
+
### Without Skill (Bad)
|
|
245
|
+
|
|
246
|
+
Orient reports 3 stale projects and 2 completion candidates. The user
|
|
247
|
+
says "I should clean that up sometime." They don't. Next session, orient
|
|
248
|
+
reports 4 stale and 2 candidates. The backlog grows. After 8 weeks,
|
|
249
|
+
there are 15 active projects, half of which are actually done, abandoned,
|
|
250
|
+
or duplicative. The work tracker is noise.
|
|
251
|
+
|
|
252
|
+
### With Skill (Good)
|
|
253
|
+
|
|
254
|
+
Orient fires the heuristic: "Backlog may benefit from /spring-clean (3
|
|
255
|
+
stale, 12+ open actions in 2 projects)." The user runs it. In 10
|
|
256
|
+
minutes: 2 projects closed (verified done), 1 archived (superseded by
|
|
257
|
+
a newer approach), 3 actions reparented to the right project, 1
|
|
258
|
+
mega-project split into two focused tracks. Organized-mind notes that
|
|
259
|
+
active project count dropped from 8 to 5 — within working memory.
|
|
260
|
+
Deferred: 1 ambiguous item that'll surface next run with context.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Analysis Scope
|
|
2
|
+
|
|
3
|
+
Define project-specific heuristics for the inventory & analysis step.
|
|
4
|
+
|
|
5
|
+
**Default (absent/empty):** Use standard heuristics:
|
|
6
|
+
- Stale: 14+ days since last completion with open actions
|
|
7
|
+
- Mega-project: 10+ open actions
|
|
8
|
+
- Duplicate: >70% text overlap between actions in the same project
|
|
9
|
+
- Completion candidate: active project with 0 open actions
|
|
10
|
+
|
|
11
|
+
## Customization examples
|
|
12
|
+
|
|
13
|
+
```markdown
|
|
14
|
+
# Exclude someday projects from staleness detection
|
|
15
|
+
exclude_from_stale: status = 'someday'
|
|
16
|
+
|
|
17
|
+
# Lower the mega-project threshold for this team
|
|
18
|
+
mega_project_threshold: 7
|
|
19
|
+
|
|
20
|
+
# These projects are intentionally long-running — don't flag as stale
|
|
21
|
+
always_skip:
|
|
22
|
+
- prj:abc12345 # ongoing maintenance
|
|
23
|
+
- prj:def67890 # quarterly review
|
|
24
|
+
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Execute Decisions
|
|
2
|
+
|
|
3
|
+
Define how to apply approved mutations to pib-db.
|
|
4
|
+
|
|
5
|
+
**Default (absent/empty):** Direct pib_* MCP calls (or CLI fallback):
|
|
6
|
+
- **close:** `pib_complete_action` or update project status
|
|
7
|
+
- **archive:** `pib_update_action` with status change to someday/dropped
|
|
8
|
+
- **merge:** Update surviving item's notes, delete the duplicate
|
|
9
|
+
- **split:** `pib_create_project`, then `pib_update_action` to reparent
|
|
10
|
+
- **reparent:** `pib_update_action` with new `project_fid`
|
|
11
|
+
- **create-project:** `pib_create_project`
|
|
12
|
+
|
|
13
|
+
## Safeguards
|
|
14
|
+
|
|
15
|
+
All mutations are logged to the conversation. No bulk deletes — each
|
|
16
|
+
deletion is individually approved. Project status changes (active →
|
|
17
|
+
dropped) require explicit confirmation even in batch mode.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Triage Presentation
|
|
2
|
+
|
|
3
|
+
Define how to present spring-clean recommendations to the user.
|
|
4
|
+
|
|
5
|
+
**Default (absent/empty):** Inline conversation. Recommendations are
|
|
6
|
+
presented in decision-cost order directly in the chat. Each batch
|
|
7
|
+
shows the items, proposed mutations, and asks for approve/defer/reject.
|
|
8
|
+
|
|
9
|
+
## Alternative: Review UI
|
|
10
|
+
|
|
11
|
+
For large backlogs (20+ recommendations), the review UI may be less
|
|
12
|
+
fatiguing than inline conversation:
|
|
13
|
+
|
|
14
|
+
```markdown
|
|
15
|
+
presentation: review-ui
|
|
16
|
+
port: 3459
|
|
17
|
+
verdict_labels:
|
|
18
|
+
approve: "Apply"
|
|
19
|
+
defer: "Later"
|
|
20
|
+
reject: "Dismiss"
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The skill starts `node scripts/review-server.mjs`, posts recommendations
|
|
24
|
+
as review items, and processes verdicts after the user submits.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Verification Rules
|
|
2
|
+
|
|
3
|
+
Define how to verify work-tracker items against the actual codebase.
|
|
4
|
+
|
|
5
|
+
**Default (absent/empty):** Skip codebase verification. Analysis
|
|
6
|
+
relies on pib-db state only (timestamps, counts, text).
|
|
7
|
+
|
|
8
|
+
## When to use
|
|
9
|
+
|
|
10
|
+
Enable codebase verification when you want the analysis agent to
|
|
11
|
+
check whether planned work was actually built. This catches items
|
|
12
|
+
that were implemented but never marked complete.
|
|
13
|
+
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```markdown
|
|
17
|
+
# For each completion candidate, check if the described feature exists
|
|
18
|
+
verify_completion:
|
|
19
|
+
- Check git log for commits mentioning the action fid
|
|
20
|
+
- Check if files in the action's surface area exist
|
|
21
|
+
- If evidence found, recommend "close" with verification note
|
|
22
|
+
```
|