skillwiki 0.2.1-beta.21 → 0.2.1-beta.23
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/dist/cli.js
CHANGED
|
@@ -1212,7 +1212,7 @@ async function createSymlink(src, dst) {
|
|
|
1212
1212
|
async function runInstall(input) {
|
|
1213
1213
|
let entries;
|
|
1214
1214
|
try {
|
|
1215
|
-
entries = (await readdir2(input.skillsRoot, { withFileTypes: true })).filter((d) => d.isDirectory() && (d.name.startsWith("wiki-") || d.name.startsWith("proj-"))).map((d) => d.name);
|
|
1215
|
+
entries = (await readdir2(input.skillsRoot, { withFileTypes: true })).filter((d) => d.isDirectory() && (d.name.startsWith("wiki-") || d.name.startsWith("proj-") || d.name === "dev-loop-research" || d.name === "using-skillwiki")).map((d) => d.name);
|
|
1216
1216
|
} catch (e) {
|
|
1217
1217
|
return { exitCode: ExitCode.PREFLIGHT_FAILED, result: err("PREFLIGHT_FAILED", { message: String(e) }) };
|
|
1218
1218
|
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.2.1-beta.
|
|
3
|
+
"version": "0.2.1-beta.23",
|
|
4
4
|
"skills": "./",
|
|
5
|
-
"description": "Project-aware Karpathy-style knowledge base for Claude Code:
|
|
5
|
+
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 19 prompt-only skills (wiki-*, proj-*, dev-loop-research, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "karlorz",
|
|
8
8
|
"url": "https://github.com/karlorz"
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: dev-loop-research
|
|
4
|
+
description: Standalone research agent — scans repo health and vault health, outputs prioritized work-item recommendations. Pass "high" for aggressive mode.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# dev-loop-research
|
|
8
|
+
|
|
9
|
+
Standalone invocable research agent. Scans two parallel tracks — code health
|
|
10
|
+
and vault health — cross-references findings, and outputs a prioritized
|
|
11
|
+
work-item recommendation list.
|
|
12
|
+
|
|
13
|
+
## When This Skill Activates
|
|
14
|
+
|
|
15
|
+
- User runs `/dev-loop-research` or `/dev-loop-research high`
|
|
16
|
+
- User wants a one-shot research scan of repo and vault health
|
|
17
|
+
- User schedules recurring background scans: `/loop 1h dev-loop-research`
|
|
18
|
+
- Dev-loop idle path delegates here (same logic, different trigger)
|
|
19
|
+
|
|
20
|
+
## Intensity
|
|
21
|
+
|
|
22
|
+
Parse arguments for `high` (case-insensitive). If present,
|
|
23
|
+
**intensity = high**; otherwise **intensity = normal**.
|
|
24
|
+
|
|
25
|
+
- **normal**: Output top-3 items. Suppress recurring findings that haven't
|
|
26
|
+
changed since last pass. Respect priority gates.
|
|
27
|
+
- **high**: Output top-5 items. Never suppress recurring findings. Every
|
|
28
|
+
finding is actionable regardless of priority tier. P4+ items are
|
|
29
|
+
first-class.
|
|
30
|
+
|
|
31
|
+
## Prerequisites
|
|
32
|
+
|
|
33
|
+
1. **Project config** — load `./.claude/dev-loop.config.md`. Required
|
|
34
|
+
fields: `slug`. Optional: `vault`, `cli_src`, `cli_test`,
|
|
35
|
+
`skills_glob`. If missing, prompt user to bootstrap via dev-loop.
|
|
36
|
+
2. **Resolve BACKEND_CAPS** from `knowledge_layer` config field (default:
|
|
37
|
+
`skillwiki` if vault exists, `none` otherwise).
|
|
38
|
+
3. **Resolve VAULT_TYPES** from `{vault}/SCHEMA.md` `## Layers` section —
|
|
39
|
+
extract backtick-wrapped directory names ending in `/`, exclude `raw`
|
|
40
|
+
and `project`. Store for Track B.
|
|
41
|
+
4. Read `CLAUDE.md` and user `MEMORY.md` fresh.
|
|
42
|
+
|
|
43
|
+
## Single-Pass Cycle
|
|
44
|
+
|
|
45
|
+
```
|
|
46
|
+
┌───────────────────────────────────────────────────────────┐
|
|
47
|
+
│ 0. REFRESH │
|
|
48
|
+
│ Load project config + read CLAUDE.md/MEMORY.md fresh │
|
|
49
|
+
├─────────────────────────┬─────────────────────────────────┤
|
|
50
|
+
│ TRACK A: CODE HEALTH │ TRACK B: VAULT HEALTH │
|
|
51
|
+
│ │ │
|
|
52
|
+
│ A1. CLI COVERAGE GAPS │ B1. RAW-TO-PAGE COVERAGE │
|
|
53
|
+
│ A2. SKILLS AUDIT │ B2. CROSS-LINK DENSITY │
|
|
54
|
+
│ A3. SPEC DRIFT │ B3. PAGE QUALITY │
|
|
55
|
+
│ A4. UNPUSHED COMMITS │ B4. TYPE COVERAGE │
|
|
56
|
+
├─────────────────────────┴─────────────────────────────────┤
|
|
57
|
+
│ 1. VAULT RETROS (cross-cutting) │
|
|
58
|
+
│ 2. SYNTHESIZE — merge + score (P0–P3, +P4 in high) │
|
|
59
|
+
│ 3. SAVE & EXIT │
|
|
60
|
+
└───────────────────────────────────────────────────────────┘
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Skip Track B entirely when `query_vault` not in BACKEND_CAPS or vault
|
|
64
|
+
is empty. Skip Track A when `cli_src` is empty.
|
|
65
|
+
|
|
66
|
+
## Track A: Code Health
|
|
67
|
+
|
|
68
|
+
### A1. CLI Coverage Gaps
|
|
69
|
+
- List `{cli_src}/*.ts`. For each: test file in `{cli_test}/`? `--human`
|
|
70
|
+
flag? Stable exit codes? `TODO/FIXME/HACK` markers?
|
|
71
|
+
- Compare counts against CLAUDE.md documented counts. Flag drift.
|
|
72
|
+
|
|
73
|
+
### A2. Skills Audit
|
|
74
|
+
- List SKILL.md files from `skills_glob`. Check: CLI subcommand
|
|
75
|
+
references exist? Description matches current behavior? Skill maps
|
|
76
|
+
list all skills correctly?
|
|
77
|
+
|
|
78
|
+
### A3. Spec Drift
|
|
79
|
+
- If canonical spec is declared, verify scope fields against current
|
|
80
|
+
code. New commands not in spec? Changed counts? New schema changes?
|
|
81
|
+
|
|
82
|
+
### A4. Unpushed Commits
|
|
83
|
+
- `git log origin/$RELEASE_BRANCH..HEAD --oneline`. Priority:
|
|
84
|
+
≥10→P1, 5-9→P2, 1-4→P4+.
|
|
85
|
+
|
|
86
|
+
## Track B: Vault Health
|
|
87
|
+
|
|
88
|
+
### B1. Raw-to-Page Coverage
|
|
89
|
+
- Run `skillwiki lint` for `wikilink_citation` warnings.
|
|
90
|
+
- Count raw files vs typed pages vs cited sources. Flag:
|
|
91
|
+
normal: uncited >50%→P1; high: uncited >20%→P1.
|
|
92
|
+
- Single-source pages: normal→P2, high→P2 always.
|
|
93
|
+
|
|
94
|
+
### B2. Cross-Link Density
|
|
95
|
+
- Count outbound `[[wikilink]]` in body region per page.
|
|
96
|
+
- normal: <2 links→P2; high: <3 links→P2.
|
|
97
|
+
- Orphan and overlap detection via `skillwiki orphans`/`overlap`.
|
|
98
|
+
|
|
99
|
+
### B3. Page Quality
|
|
100
|
+
- Count non-blank body lines (exclude headings and `---`).
|
|
101
|
+
- normal: <40 lines→thin; high: <60 lines→thin.
|
|
102
|
+
- Flag missing Overview or Related sections.
|
|
103
|
+
|
|
104
|
+
### B4. Type Coverage
|
|
105
|
+
- Page counts per type directory. Flag: entities <3, empty comparisons,
|
|
106
|
+
empty queries when >30 pages exist, empty meta when 2+ projects active.
|
|
107
|
+
- High: flag any empty type dir.
|
|
108
|
+
|
|
109
|
+
## Vault Retros (Track 1)
|
|
110
|
+
|
|
111
|
+
Scan `{vault}/log.md` for recent `Improve:` and `Generalize?: yes` entries.
|
|
112
|
+
Check `{vault}/projects/{slug}/compound/` for pending distillation work.
|
|
113
|
+
A retro's `Improve:` field that names a concrete action is a direct
|
|
114
|
+
work-item candidate.
|
|
115
|
+
|
|
116
|
+
## Synthesize (Track 2)
|
|
117
|
+
|
|
118
|
+
Score each finding:
|
|
119
|
+
|
|
120
|
+
| Score | Impact | Effort |
|
|
121
|
+
|-------|--------|--------|
|
|
122
|
+
| P0 | Spec violation or regression | Any |
|
|
123
|
+
| P1 | High — untested command, raw-to-page gap >50%, isolated pages | S/M |
|
|
124
|
+
| P2 | Medium — thin pages, skill map drift, single-source, empty type dirs | S/M |
|
|
125
|
+
| P3 | Low — code quality, cross-link improvement, section completeness | Any |
|
|
126
|
+
| P4+ | Speculative — proactive improvements, future-proofing, polish | Any |
|
|
127
|
+
|
|
128
|
+
**normal**: top-3, P0–P3 only, suppress unchanged recurring.
|
|
129
|
+
**high**: top-5, P0–P4+, never suppress recurring.
|
|
130
|
+
|
|
131
|
+
Output format per item:
|
|
132
|
+
|
|
133
|
+
```markdown
|
|
134
|
+
### #N: [title] (Px)
|
|
135
|
+
|
|
136
|
+
**Source**: [track source]
|
|
137
|
+
**What**: One-paragraph spec.
|
|
138
|
+
**Acceptance**: Bullet list of verifiable outcomes.
|
|
139
|
+
**Files**: Likely files to touch (omit for vault-only items).
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Save & Exit (Track 3)
|
|
143
|
+
|
|
144
|
+
1. Append research observation to `{vault}/log.md`:
|
|
145
|
+
```
|
|
146
|
+
## [YYYY-MM-DD HH:MM] research | dev-loop-research cycle [normal|high]
|
|
147
|
+
- Findings: [N] new, [N] recurring
|
|
148
|
+
- Vault health: raw=[N] pages=[N] cited=[N]% isolated=[N] thin=[N]
|
|
149
|
+
- Top-N: [titles]
|
|
150
|
+
```
|
|
151
|
+
2. If ranked list changed since last cycle, update user MEMORY.md with
|
|
152
|
+
research-backlog entry.
|
|
153
|
+
3. Exit with one-line summary.
|
|
154
|
+
|
|
155
|
+
## Idle Fast-Path
|
|
156
|
+
|
|
157
|
+
**Pre-idle gate (mandatory):** Before declaring idle, collect actual vault
|
|
158
|
+
health metrics from B1–B4. If any metric exceeds thresholds below, do NOT
|
|
159
|
+
report idle:
|
|
160
|
+
|
|
161
|
+
| Metric | normal | high |
|
|
162
|
+
|--------|--------|------|
|
|
163
|
+
| Uncited raw | >50% | >20% |
|
|
164
|
+
| Isolated pages | any | any (<3 links) |
|
|
165
|
+
| Thin pages | any (<40L) | any (<60L) |
|
|
166
|
+
| Empty type dirs | any (entities, comparisons) | any |
|
|
167
|
+
|
|
168
|
+
Three exit states:
|
|
169
|
+
1. **Truly idle** — zero new findings, all metrics healthy. Exit:
|
|
170
|
+
`"Research idle — no new findings."`
|
|
171
|
+
2. **Steady backlog** — no new findings, but known gaps persist. Exit:
|
|
172
|
+
`"Research steady — [N] recurring: [titles]"`
|
|
173
|
+
3. **High mode never idle** — always produce recommendations. If standard
|
|
174
|
+
checks find nothing, generate proactive suggestions.
|
|
175
|
+
|
|
176
|
+
**NEVER report idle when vault health metrics show actionable gaps.**
|
package/skills/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
version: 0.2.1
|
|
3
3
|
name: using-skillwiki
|
|
4
|
-
description: Invoke at session start or when knowledge-base tasks arise — maps all
|
|
4
|
+
description: Invoke at session start or when knowledge-base tasks arise — maps all skillwiki skills and teaches the skillwiki CLI workflow
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
<SUBAGENT-STOP>
|
|
@@ -28,6 +28,7 @@ Invoke a skillwiki skill when the user:
|
|
|
28
28
|
- Asks about their skillwiki configuration or setup health
|
|
29
29
|
- Wants to sync vault changes to/from a git remote
|
|
30
30
|
- Wants to visualize the vault graph as an Obsidian Canvas
|
|
31
|
+
- Wants to run a research scan of repo and vault health
|
|
31
32
|
|
|
32
33
|
## Vault Structure
|
|
33
34
|
|
|
@@ -86,6 +87,8 @@ sha256: # computed by skillwiki hash over body bytes after closing ---
|
|
|
86
87
|
| `wiki-sync` | Safely sync vault git repository — push/pull with lint guards and conflict resolution |
|
|
87
88
|
| `wiki-canvas` | Generate Obsidian Canvas visualization from vault graph data |
|
|
88
89
|
| `proj-decide` | Write an Architectural Decision Record (ADR) |
|
|
90
|
+
| `wiki-gate-plan-mode` | Toggle EnterPlanMode gating — force superpowers planning instead of built-in plan mode |
|
|
91
|
+
| `dev-loop-research` | Standalone research agent — scans repo + vault health, outputs prioritized work-item recommendations |
|
|
89
92
|
|
|
90
93
|
## CLI Backbone
|
|
91
94
|
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-gate-plan-mode
|
|
4
|
+
description: Toggle EnterPlanMode gating — force superpowers planning skills instead of built-in plan mode
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-gate-plan-mode
|
|
8
|
+
|
|
9
|
+
Gate the agent away from Claude Code's built-in `EnterPlanMode` tool, forcing
|
|
10
|
+
all planning through `superpowers:brainstorming` → `superpowers:writing-plans`
|
|
11
|
+
(or a configurable pipeline). Uses `permissions.deny` for two-layer enforcement:
|
|
12
|
+
the tool is removed from the model's context before it ever sees it.
|
|
13
|
+
|
|
14
|
+
## When This Skill Activates
|
|
15
|
+
|
|
16
|
+
- User says "gate plan mode", "disable EnterPlanMode", "force superpowers planning"
|
|
17
|
+
- User asks to toggle, check, or configure plan-mode gating
|
|
18
|
+
- User wants to enforce structured planning workflows in a project
|
|
19
|
+
|
|
20
|
+
## Pre-orientation reads
|
|
21
|
+
|
|
22
|
+
None for the first run.
|
|
23
|
+
|
|
24
|
+
## Steps
|
|
25
|
+
|
|
26
|
+
0. **Parse arguments.** Accept one of:
|
|
27
|
+
- `on` — enable gating (add EnterPlanMode to deny)
|
|
28
|
+
- `off` — disable gating (remove EnterPlanMode from deny)
|
|
29
|
+
- `status` (default if no argument) — report current state
|
|
30
|
+
|
|
31
|
+
1. **Locate settings file.** Check in this order:
|
|
32
|
+
- `~/.claude/settings.json` (user-level, global — primary target for plan-mode gating)
|
|
33
|
+
- `.claude/settings.json` (project-level, checked into repo — use if user specifies project scope)
|
|
34
|
+
If the target file does not exist, create it with `{ "permissions": { "deny": [] } }`.
|
|
35
|
+
|
|
36
|
+
2. **Read current state.** Parse the settings JSON. Check whether `"EnterPlanMode"` is present in `permissions.deny[]`.
|
|
37
|
+
|
|
38
|
+
3. **Apply the requested action:**
|
|
39
|
+
|
|
40
|
+
**`on`:**
|
|
41
|
+
- If `"EnterPlanMode"` is already in `permissions.deny`, report "already gated" and stop.
|
|
42
|
+
- Otherwise, add `"EnterPlanMode"` to `permissions.deny[]`. Create the array if absent.
|
|
43
|
+
- Write the updated JSON back, preserving formatting.
|
|
44
|
+
- Report: "EnterPlanMode gated — agent will use superpowers planning skills."
|
|
45
|
+
|
|
46
|
+
**`off`:**
|
|
47
|
+
- If `"EnterPlanMode"` is not in `permissions.deny`, report "already ungated" and stop.
|
|
48
|
+
- Otherwise, remove `"EnterPlanMode"` from `permissions.deny[]`. If the array is now empty, remove the `deny` key.
|
|
49
|
+
- Write the updated JSON back.
|
|
50
|
+
- Report: "EnterPlanMode ungated — built-in plan mode is available."
|
|
51
|
+
|
|
52
|
+
**`status`:**
|
|
53
|
+
- Check both `~/.claude/settings.json` and `.claude/settings.json`.
|
|
54
|
+
- Report whether EnterPlanMode is currently gated or ungated.
|
|
55
|
+
- If gated, list which settings file contains the deny entry.
|
|
56
|
+
|
|
57
|
+
4. **Suggest CLAUDE.md directive (on action only).** After enabling gating, check whether the project's `CLAUDE.md` contains a planning directive (search for "EnterPlanMode" or "superpowers:brainstorming"). If not found, suggest adding:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
## Planning
|
|
61
|
+
|
|
62
|
+
Use superpowers:brainstorming → superpowers:writing-plans for all planning. EnterPlanMode is disabled.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Do NOT edit CLAUDE.md automatically — only suggest.
|
|
66
|
+
|
|
67
|
+
## Schema Warning
|
|
68
|
+
|
|
69
|
+
The JSON Schema Store's `claude-code-settings.json` schema has a closed regex for `permissions.deny` that includes `ExitPlanMode` but **omits `EnterPlanMode`**. IDEs (VS Code, JetBrains) will show a validation warning. This is a schema staleness issue, not a runtime issue — Claude Code's runtime accepts `EnterPlanMode` in `permissions.deny` and enforces it correctly. See `[[queries/claude-code-plan-mode-schema-validation]]` for full analysis.
|
|
70
|
+
|
|
71
|
+
## Stop conditions
|
|
72
|
+
|
|
73
|
+
- No project directory found (not inside a git repo or project).
|
|
74
|
+
- Settings file exists but is not valid JSON and cannot be parsed.
|
|
75
|
+
|
|
76
|
+
## Forbidden
|
|
77
|
+
|
|
78
|
+
- Do not add any tool other than `EnterPlanMode` to the deny list.
|
|
79
|
+
- Do not modify CLAUDE.md automatically — only suggest changes.
|
|
80
|
+
- Do not remove other entries from `permissions.deny` when toggling off — only remove `EnterPlanMode`.
|