skillwiki 0.2.1-beta.9 → 0.2.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/dist/chunk-TPS5XD2J.js +19 -0
- package/dist/cli.js +3594 -321
- package/dist/git-M4WGJ5G3.js +9 -0
- package/package.json +3 -1
- package/skills/.claude-plugin/plugin.json +2 -2
- package/skills/package.json +2 -1
- package/skills/proj-decide/SKILL.md +2 -1
- package/skills/proj-distill/SKILL.md +8 -1
- package/skills/proj-init/SKILL.md +2 -1
- package/skills/proj-work/SKILL.md +2 -0
- package/skills/using-skillwiki/SKILL.md +12 -4
- package/skills/wiki-adapter-prd/SKILL.md +1 -0
- package/skills/wiki-add-task/SKILL.md +46 -31
- package/skills/wiki-archive/SKILL.md +5 -2
- package/skills/wiki-audit/SKILL.md +1 -0
- package/skills/wiki-canvas/SKILL.md +57 -0
- package/skills/wiki-crystallize/SKILL.md +2 -0
- package/skills/wiki-gate-plan-mode/SKILL.md +80 -0
- package/skills/wiki-ingest/SKILL.md +2 -0
- package/skills/wiki-init/SKILL.md +1 -0
- package/skills/wiki-lint/SKILL.md +1 -0
- package/skills/wiki-query/SKILL.md +1 -0
- package/skills/wiki-reingest/SKILL.md +1 -0
- package/skills/wiki-sync/SKILL.md +91 -0
- package/templates/index.md +3 -0
- package/templates/project-README.md +6 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"skillwiki": "dist/cli.js"
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"prepublishOnly": "npm run build"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@aws-sdk/client-s3": "^3.1045.0",
|
|
23
|
+
"@aws-sdk/credential-provider-env": "^3.972.34",
|
|
22
24
|
"commander": "^12.1.0",
|
|
23
25
|
"js-yaml": "^4.1.0",
|
|
24
26
|
"zod": "^3.23.0"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
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: 18 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "karlorz",
|
|
8
8
|
"url": "https://github.com/karlorz"
|
package/skills/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: proj-decide
|
|
3
4
|
description: Write an Architectural Decision Record (ADR). If the decision generalizes, also create a concepts/ page.
|
|
4
5
|
---
|
|
@@ -12,7 +13,7 @@ description: Write an Architectural Decision Record (ADR). If the decision gener
|
|
|
12
13
|
Standard four + project context.
|
|
13
14
|
|
|
14
15
|
## Steps
|
|
15
|
-
1. Compose the ADR in `projects/{slug}/architecture/YYYY-MM-DD-{adr-slug}.md`. Frontmatter: kind=decision, status=in-progress or completed, project link.
|
|
16
|
+
1. Compose the ADR in `projects/{slug}/architecture/YYYY-MM-DD-{adr-slug}.md`. Frontmatter: kind=decision, status=in-progress or completed, project link. If no project context exists, default to `playground`.
|
|
16
17
|
2. `skillwiki validate <adr>`. If non-zero, STOP.
|
|
17
18
|
3. **Generalization check.** If the decision applies beyond this project, create a `concepts/` page with `provenance: project` (or `mixed` if research-informed).
|
|
18
19
|
4. Apply writes: ADR → (optional) concept page → vault `index.md` → vault `log.md` and project `log.md`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: proj-distill
|
|
3
4
|
description: 2-step distillation (E4) — analyze project compound entry, then generate a vault concept page with provenance.
|
|
4
5
|
---
|
|
@@ -15,7 +16,7 @@ Standard four + project context.
|
|
|
15
16
|
|
|
16
17
|
### Source selection
|
|
17
18
|
|
|
18
|
-
Check `projects/{slug}/compound/` first. If empty, fall back to retro
|
|
19
|
+
Check `projects/{slug}/compound/` first. If no project context exists, default to `playground`. If empty, fall back to retro
|
|
19
20
|
entries in vault `log.md` (lines matching `## [YYYY-MM-DD] retro`).
|
|
20
21
|
|
|
21
22
|
When reading retros as source material:
|
|
@@ -32,6 +33,12 @@ When reading retros as source material:
|
|
|
32
33
|
`provenance: project` and
|
|
33
34
|
`provenance_projects: ["[[slug]]"]`. Validate with
|
|
34
35
|
`skillwiki validate`.
|
|
36
|
+
- **Tag hygiene:** `tags:` must only contain entries from
|
|
37
|
+
`{vault}/SCHEMA.md` taxonomy. Never derive tags from prose text
|
|
38
|
+
(lesson/evidence sections) — use only established taxonomy tags
|
|
39
|
+
(e.g., `dev-loop`, `lint`, `vault`). If no relevant taxonomy tag
|
|
40
|
+
exists, use `[dev-loop]` as the safe default rather than inventing
|
|
41
|
+
new tags. New tags must be added to SCHEMA.md first.
|
|
35
42
|
3. **Backlink.** Set `promoted_to: "[[concept-slug]]"` on the source
|
|
36
43
|
compound entry. For retro-sourced distillation, skip backlink (log.md
|
|
37
44
|
entries are append-only) and instead add `sources:` citing the vault
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: proj-init
|
|
3
4
|
description: Bootstrap a project workspace at projects/{slug}/ with README, requirements/, architecture/, work/, compound/.
|
|
4
5
|
---
|
|
@@ -18,7 +19,7 @@ Standard four reads (vault SCHEMA, index, log) — no project context yet.
|
|
|
18
19
|
## Steps
|
|
19
20
|
1. Verify `projects/{slug}/` does not exist.
|
|
20
21
|
2. Create folders: `projects/{slug}/{requirements,architecture,work,compound}/`.
|
|
21
|
-
3. Render `projects/{slug}/README.md` from `project-README.md` template, filling `{{slug}}` and `{{date}}`.
|
|
22
|
+
3. Render `projects/{slug}/README.md` from `project-README.md` template, filling `{{slug}}` and `{{date}}`. The template includes a `## Knowledge Pages` section with a placeholder; agents populate it on first ingest via `skillwiki project-index`.
|
|
22
23
|
4. Update vault `index.md` "Projects" section: add `- [[projects/{slug}]]`.
|
|
23
24
|
5. Append vault `log.md` entry: "Project {slug} initialized."
|
|
24
25
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: proj-work
|
|
3
4
|
description: Open or run a work item under projects/{slug}/work/YYYY-MM-DD-{slug}/. Redirects brainstorming/writing-plans output paths.
|
|
4
5
|
---
|
|
@@ -8,6 +9,7 @@ description: Open or run a work item under projects/{slug}/work/YYYY-MM-DD-{slug
|
|
|
8
9
|
## When to invoke
|
|
9
10
|
- User starts a feature, issue, refactor, or decision inside an existing project.
|
|
10
11
|
- Brainstorming or writing-plans skills would otherwise default-write outside the project tree.
|
|
12
|
+
- If no project context can be determined, default to the `playground` slug so redirect paths always emit and the PRD bridge chain works.
|
|
11
13
|
|
|
12
14
|
## Pre-orientation reads
|
|
13
15
|
Standard four + project context (project README, last ~5 work logs).
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: using-skillwiki
|
|
3
|
-
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
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
<SUBAGENT-STOP>
|
|
@@ -25,6 +26,9 @@ Invoke a skillwiki skill when the user:
|
|
|
25
26
|
- Needs to detect source drift or re-ingest updated content
|
|
26
27
|
- Has a spec/plan in a non-skillwiki format (CodeStable, RFC, AIDE)
|
|
27
28
|
- Asks about their skillwiki configuration or setup health
|
|
29
|
+
- Wants to sync vault changes to/from a git remote
|
|
30
|
+
- Wants to visualize the vault graph as an Obsidian Canvas
|
|
31
|
+
- Wants to run a research scan of repo and vault health
|
|
28
32
|
|
|
29
33
|
## Vault Structure
|
|
30
34
|
|
|
@@ -59,7 +63,7 @@ sha256: # computed by skillwiki hash over body bytes after closing ---
|
|
|
59
63
|
|
|
60
64
|
| Entry | When | What happens |
|
|
61
65
|
|-------|------|-------------|
|
|
62
|
-
| `/wiki-add-task <text>` | You're in a Claude session |
|
|
66
|
+
| `/wiki-add-task <text>` | You're in a Claude session | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
|
|
63
67
|
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create/edit any `.md` file in `raw/transcripts/` — dev-loop discovers it on next cycle |
|
|
64
68
|
| Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
|
|
65
69
|
|
|
@@ -80,13 +84,17 @@ sha256: # computed by skillwiki hash over body bytes after closing ---
|
|
|
80
84
|
| `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
|
|
81
85
|
| `proj-work` | Open or run a work item under a project's work/ directory |
|
|
82
86
|
| `proj-distill` | Distill project compound entries into vault concept pages |
|
|
87
|
+
| `wiki-sync` | Safely sync vault git repository — push/pull with lint guards and conflict resolution |
|
|
88
|
+
| `wiki-canvas` | Generate Obsidian Canvas visualization from vault graph data |
|
|
83
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 |
|
|
84
92
|
|
|
85
93
|
## CLI Backbone
|
|
86
94
|
|
|
87
95
|
All skills are backed by the `skillwiki` CLI — a deterministic tool with no LLM calls. It handles path resolution, config management, validation, and linting. Skills invoke it via Bash for the mechanical parts and use Claude for the creative parts.
|
|
88
96
|
|
|
89
|
-
Key CLI subcommands: `init`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `graph build`, `archive`, `drift`.
|
|
97
|
+
Key CLI subcommands: `init`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `graph build`, `archive`, `drift`, `compound`, `tag-sync`, `sync status`, `seed`, `stale`, `observe`, `canvas generate`.
|
|
90
98
|
|
|
91
99
|
Run `skillwiki doctor` to diagnose setup issues. Run `skillwiki config list` to see current configuration.
|
|
92
100
|
|
|
@@ -131,6 +139,6 @@ When skillwiki is installed, **all spec and plan documents must land in the vaul
|
|
|
131
139
|
|
|
132
140
|
Both skills say "User preferences for spec location override this default" — the vault work-item path IS the override.
|
|
133
141
|
|
|
134
|
-
**If no project context exists** (standalone vault, not inside a project),
|
|
142
|
+
**If no project context exists** (standalone vault, not inside a project), default to the `playground` project slug. Invoke `proj-work` with `playground` as the slug so redirect paths are emitted normally and the PRD bridge chain works. The `playground` project is a pre-initialized catch-all workspace at `projects/playground/` for exploratory work, experiments, and unclassified features. Work items that mature can be moved to a real project later.
|
|
135
143
|
|
|
136
144
|
**Never create `docs/superpowers/` in any repo.**
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: wiki-add-task
|
|
3
|
-
description: Capture ad-hoc ideas, bugs, tasks, or notes into the vault
|
|
4
|
+
description: Capture ad-hoc ideas, bugs, tasks, or notes into the vault with ad-hoc capture frontmatter and descriptive filenames.
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# wiki-add-task
|
|
@@ -9,8 +10,8 @@ Capture ad-hoc ideas, bugs, tasks, and notes into the vault. Three entry points
|
|
|
9
10
|
|
|
10
11
|
| Entry | When | What happens |
|
|
11
12
|
|-------|------|-------------|
|
|
12
|
-
| `/wiki-add-task <text>` | You're in a Claude session |
|
|
13
|
-
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create
|
|
13
|
+
| `/wiki-add-task <text>` | You're in a Claude session | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
|
|
14
|
+
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create any `.md` file in `raw/transcripts/` using the vault template — dev-loop discovers it on next cycle |
|
|
14
15
|
| Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
|
|
15
16
|
|
|
16
17
|
## When This Skill Activates
|
|
@@ -30,52 +31,73 @@ Run `skillwiki lang` at the start. Entry prose and `--human` summaries use the r
|
|
|
30
31
|
- `text` — the idea/bug/task/note content (required)
|
|
31
32
|
- `type` — one of: `idea`, `bug`, `task`, `note` (default: `idea`)
|
|
32
33
|
- `project` — optional project slug to cross-reference (e.g., `llm-wiki`)
|
|
33
|
-
2. **
|
|
34
|
-
3. **Write the
|
|
34
|
+
2. **Build filename.** Derive a slug from the first ~6 words of the text (lowercased, hyphens for spaces, non-alphanumeric stripped). The capture file is `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md`. Each capture gets its own file — never append to an existing file.
|
|
35
|
+
3. **Write frontmatter.** Create the file with ad-hoc capture frontmatter:
|
|
36
|
+
```yaml
|
|
37
|
+
---
|
|
38
|
+
source_url:
|
|
39
|
+
ingested: YYYY-MM-DD
|
|
40
|
+
kind: {type}
|
|
41
|
+
project: "[[{slug}]]"
|
|
42
|
+
---
|
|
43
|
+
```
|
|
44
|
+
- Set `kind` to the parsed type (`idea`, `bug`, `task`, `note`).
|
|
45
|
+
- If a `project` slug was provided, set `project: "[[slug]]"`.
|
|
46
|
+
- If no project, omit the `project` field entirely.
|
|
47
|
+
- `source_url` is null (these are locally originated captures).
|
|
48
|
+
- No `sha256` — ad-hoc captures are mutable working notes, not immutable sources.
|
|
49
|
+
4. **Write body.** Below the frontmatter, write:
|
|
35
50
|
```markdown
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
[text]
|
|
51
|
+
# {type}: {text}
|
|
39
52
|
|
|
40
|
-
|
|
53
|
+
{text}
|
|
41
54
|
```
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
4. **Cross-reference (optional).** If a `project` slug was provided:
|
|
55
|
+
Use the resolved output language for any prose. The type label and frontmatter stay English.
|
|
56
|
+
5. **Cross-reference (optional).** If a `project` slug was provided:
|
|
45
57
|
- Check that `projects/{slug}/` exists in the vault.
|
|
46
|
-
- Append a one-line reference to the project's
|
|
47
|
-
`- [YYYY-MM-DD] capture: [text] → raw/transcripts/YYYY-MM-DD-
|
|
58
|
+
- Append a one-line reference to the project's compound notes:
|
|
59
|
+
`- [YYYY-MM-DD] capture: [text (first 60 chars)] → raw/transcripts/YYYY-MM-DD-{type}-{slug}.md`
|
|
48
60
|
- Do NOT create a full work item (that's `proj-work`'s job).
|
|
49
|
-
|
|
50
|
-
|
|
61
|
+
6. **Update log.md.** Append: `## [YYYY-MM-DD] capture | [type]: [text (first 60 chars)]`
|
|
62
|
+
7. **Confirm to user.** Report what was captured and where. Suggest next steps:
|
|
51
63
|
- If `type: idea` → "Consider ingesting related sources to develop this idea."
|
|
52
64
|
- If `type: bug` → "Use proj-work to create a bug-fix work item."
|
|
53
65
|
- If `type: task` → "Use proj-work to track this task through the dev loop."
|
|
54
66
|
- If `type: note` → "Will be available for future wiki-query searches."
|
|
55
67
|
|
|
56
|
-
##
|
|
68
|
+
## Capture file format
|
|
57
69
|
|
|
58
|
-
|
|
70
|
+
Each capture is a standalone file with ad-hoc capture frontmatter:
|
|
59
71
|
|
|
60
72
|
```yaml
|
|
61
73
|
---
|
|
62
74
|
source_url:
|
|
63
|
-
ingested:
|
|
64
|
-
|
|
75
|
+
ingested: 2026-05-08
|
|
76
|
+
kind: idea
|
|
77
|
+
project: "[[llm-wiki]]"
|
|
65
78
|
---
|
|
79
|
+
|
|
80
|
+
# idea: Fix the template mismatch
|
|
81
|
+
|
|
82
|
+
Fix the template mismatch between wiki-add-task and the vault template.
|
|
66
83
|
```
|
|
67
84
|
|
|
68
|
-
The `
|
|
85
|
+
The `kind` field uses the capture type and must be one of: `idea`, `bug`, `task`, `note` (plus the existing `postmortem`, `session-log`, `meeting-notes`, `other` for non-capture raw sources).
|
|
86
|
+
|
|
87
|
+
The `project` and `kind` fields can be set independently — they do not require `work_item`. The `work_item` field is only used when the raw source is directly tied to a project work item (set by `proj-work`).
|
|
88
|
+
|
|
89
|
+
Ad-hoc captures omit `sha256` — they are mutable working notes, not immutable sources. The `sha256` field is reserved for ingested raw sources that require integrity verification.
|
|
69
90
|
|
|
70
91
|
## Stop conditions
|
|
71
92
|
|
|
72
93
|
- `skillwiki path` returns NO_VAULT_CONFIGURED.
|
|
73
94
|
- No `text` provided (prompt user once, then stop).
|
|
95
|
+
- Target file already exists (use a different slug or add a suffix).
|
|
74
96
|
|
|
75
97
|
## Forbidden
|
|
76
98
|
|
|
77
99
|
- Creating an `inbox/` directory. All captures go to `raw/transcripts/`.
|
|
78
|
-
-
|
|
100
|
+
- Appending to existing capture files — each capture gets its own file.
|
|
79
101
|
- Creating a work item — this is capture-only. Use `proj-work` for full work items.
|
|
80
102
|
- Writing to any Layer 2 or Layer 3 location. Captures are Layer 1 (raw).
|
|
81
103
|
|
|
@@ -83,15 +105,8 @@ The `sha256` is computed over the body after the closing `---`. On each append,
|
|
|
83
105
|
|
|
84
106
|
When you're not in a Claude session, drop files directly into `raw/transcripts/`:
|
|
85
107
|
|
|
86
|
-
1. Create
|
|
87
|
-
2.
|
|
88
|
-
```yaml
|
|
89
|
-
---
|
|
90
|
-
source_url:
|
|
91
|
-
ingested: YYYY-MM-DD
|
|
92
|
-
sha256:
|
|
93
|
-
---
|
|
94
|
-
```
|
|
108
|
+
1. Create a `.md` file in `raw/transcripts/` — name it descriptively (e.g., `2026-05-08-idea-fix-template.md`)
|
|
109
|
+
2. Use ad-hoc capture frontmatter: `source_url:`, `ingested:`, `kind:`, and optionally `project:`
|
|
95
110
|
3. Write your idea/bug/task/note below the frontmatter
|
|
96
111
|
|
|
97
112
|
No special format required — the dev-loop QUERY step will discover new files on the next cycle and surface them as claimable work. Mark the type with a heading like `## idea`, `## bug`, `## task`, or just write freeform.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: wiki-archive
|
|
3
4
|
description: Archive a superseded typed-knowledge page. Moves page to _archive/, removes from index.md, logs the action.
|
|
4
5
|
---
|
|
@@ -25,7 +26,8 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
25
26
|
2. Run `skillwiki archive <page> [vault]`. Read the JSON output.
|
|
26
27
|
3. Verify with `skillwiki index-check [vault]` — confirm no ghost entries remain.
|
|
27
28
|
4. Run `skillwiki lint [vault]` — check for broken wikilinks from other pages that still reference the archived page. If found, update those pages to point to the replacement or remove the stale link.
|
|
28
|
-
5.
|
|
29
|
+
5. **Raw file archiving (N9 Reingest Protocol only):** When archiving a `raw/` file due to content drift, update ALL `^[raw/...]` citation markers and `sources:` frontmatter entries that reference the old path. Change `raw/articles/foo.md` to `_archive/raw/articles/foo.md` in every referencing page. Verify with `skillwiki audit` that no broken markers remain.
|
|
30
|
+
6. Append a `log.md` entry: `## [{date}] archive | {relPath} → _archive/{subdir}/`.
|
|
29
31
|
|
|
30
32
|
## Reversibility
|
|
31
33
|
|
|
@@ -38,6 +40,7 @@ Archiving is reversible: move the file back from `_archive/` to its original dir
|
|
|
38
40
|
|
|
39
41
|
## Forbidden
|
|
40
42
|
|
|
41
|
-
- Archiving `raw/` files
|
|
43
|
+
- Archiving `raw/` files outside the N9 Reingest Protocol (raw is immutable except during content-drift reingestion).
|
|
44
|
+
- Archiving raw files without updating all `^[raw/...]` citation markers that reference them.
|
|
42
45
|
- Archiving without user confirmation.
|
|
43
46
|
- Deleting files (archive moves, never deletes).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-canvas
|
|
4
|
+
description: Generate an Obsidian Canvas visualization of the vault graph. Runs skillwiki graph build then skillwiki canvas generate.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-canvas
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User wants a visual map of their vault structure.
|
|
12
|
+
- User asks to see how pages are connected.
|
|
13
|
+
- After significant ingestion or restructuring, user wants an updated overview.
|
|
14
|
+
- User mentions Obsidian Canvas or visual vault exploration.
|
|
15
|
+
|
|
16
|
+
## Pre-orientation reads
|
|
17
|
+
|
|
18
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
0. Resolve vault: `skillwiki path`.
|
|
23
|
+
1. Run `skillwiki graph build <vault>` to produce the adjacency graph at `<vault>/.skillwiki/graph.json`. If graph.json already exists and the vault has not changed, this step can be skipped — but regenerate after any ingestion, reingest, archive, or restructuring to keep the canvas current.
|
|
24
|
+
2. Run `skillwiki canvas generate <vault>`. This reads graph.json and writes `<vault>/vault-graph.canvas`.
|
|
25
|
+
3. Present the result to the user: node count, edge count, and the output path.
|
|
26
|
+
4. Advise the user on opening the canvas:
|
|
27
|
+
- In Obsidian, open the vault folder and click `vault-graph.canvas` in the file explorer, or use the Quick Switcher (`Cmd/Ctrl+O`) and search for "vault-graph".
|
|
28
|
+
- Nodes are arranged in columns by type: **entities** (red), **concepts** (green), **comparisons** (orange), **queries** (cyan), **meta** (purple). Unclassified pages appear in yellow in the comparisons column.
|
|
29
|
+
- Edges represent wikilink connections. Click any node to jump to the source page; drag to rearrange.
|
|
30
|
+
- Zoom and pan with mouse/trackpad to explore large vaults.
|
|
31
|
+
5. Append one `log.md` entry noting the canvas generation (node/edge counts).
|
|
32
|
+
|
|
33
|
+
## When to regenerate
|
|
34
|
+
|
|
35
|
+
Regenerate the canvas after any of these events:
|
|
36
|
+
- One or more `wiki-ingest` runs that added new pages.
|
|
37
|
+
- `wiki-reingest` or `wiki-archive` that changed or removed pages.
|
|
38
|
+
- Manual restructuring of the vault directories.
|
|
39
|
+
- After running `wiki-lint` and fixing structural issues.
|
|
40
|
+
|
|
41
|
+
Stale canvases are not harmful, but they will not reflect new or removed pages until regenerated.
|
|
42
|
+
|
|
43
|
+
## Future: Bases view
|
|
44
|
+
|
|
45
|
+
Obsidian Bases (`.base` files) offer tabular data views of vault content. A Bases generation capability may be added in a future version to complement the graph canvas with filterable, sortable table layouts. For now, the canvas is the primary visualization.
|
|
46
|
+
|
|
47
|
+
## Stop conditions
|
|
48
|
+
|
|
49
|
+
- `skillwiki graph build` returns a non-zero exit code — investigate before continuing.
|
|
50
|
+
- `graph.json` is missing or invalid — the canvas command will surface the error; direct the user to run `skillwiki graph build` first.
|
|
51
|
+
- User cancels before generation.
|
|
52
|
+
|
|
53
|
+
## Forbidden
|
|
54
|
+
|
|
55
|
+
- Modifying `vault-graph.canvas` by hand after generation — regenerate it instead.
|
|
56
|
+
- Regenating the canvas without first regenerating graph.json when the vault has changed.
|
|
57
|
+
- Deleting the previous canvas without generating a replacement.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: wiki-crystallize
|
|
3
4
|
description: Distill the current working session into a typed-knowledge page with provenance.
|
|
4
5
|
---
|
|
@@ -32,3 +33,4 @@ Standard four reads. If cwd is inside `projects/{slug}/`, also read project READ
|
|
|
32
33
|
## Forbidden
|
|
33
34
|
- Filing without explicit `provenance:`.
|
|
34
35
|
- Updating `index.md` before `validate` passes.
|
|
36
|
+
- Writing `[[wikilinks]]` to pages that don't exist in the vault. Before linking, verify the target exists: check `index.md` or `ls` the target directory. If the target doesn't exist yet, use plain text instead of a wikilink.
|
|
@@ -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`.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
+
version: 0.2.1
|
|
2
3
|
name: wiki-ingest
|
|
3
4
|
description: Convert URLs, files, or pasted text into typed-knowledge pages with raw provenance. Supports single and batch mode.
|
|
4
5
|
---
|
|
@@ -45,6 +46,7 @@ Run `skillwiki lang` at the start. Generate page-body prose, narrative sections,
|
|
|
45
46
|
- Skipping `fetch-guard`.
|
|
46
47
|
- Updating `index.md` or `log.md` before all pages validate.
|
|
47
48
|
- Modifying any existing file in `raw/`.
|
|
49
|
+
- Writing `[[wikilinks]]` to pages that don't exist in the vault. Before linking, verify the target exists: check `index.md` or `ls` the target directory. If the target doesn't exist yet, use plain text instead of a wikilink.
|
|
48
50
|
|
|
49
51
|
## Batch Mode
|
|
50
52
|
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-sync
|
|
4
|
+
description: Safely sync the vault git repository. Runs skillwiki sync status, then guides push or pull with lint guards and conflict resolution.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-sync
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User wants to push local vault changes to the remote.
|
|
12
|
+
- User wants to pull remote changes into their local vault.
|
|
13
|
+
- User asks about vault sync status, git state, or multi-device coordination.
|
|
14
|
+
- Periodic maintenance before or after editing sessions.
|
|
15
|
+
|
|
16
|
+
## Pre-orientation reads
|
|
17
|
+
|
|
18
|
+
Standard four reads.
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
0. Resolve vault: `skillwiki path` (record source for context).
|
|
23
|
+
1. Run `skillwiki sync status <vault>`. Read the JSON output.
|
|
24
|
+
- Exit code 0: vault is clean (nothing to sync).
|
|
25
|
+
- Exit code 22: warnings — dirty/ahead/behind (needs action).
|
|
26
|
+
2. Present the current state: `status`, `dirty`, `ahead`, `behind`, `last_commit`.
|
|
27
|
+
3. Ask the user which operation they want: **push**, **pull**, or **both** (pull then push).
|
|
28
|
+
|
|
29
|
+
### Push workflow
|
|
30
|
+
|
|
31
|
+
4. If vault is dirty, ask the user to review uncommitted changes before proceeding.
|
|
32
|
+
5. Run `skillwiki lint <vault>`. If errors exist, stop and report — do not push lint errors to remote.
|
|
33
|
+
6. If lint passes (errors = 0), stage and commit:
|
|
34
|
+
- `git -C <vault> add -A`
|
|
35
|
+
- `git -C <vault> commit -m "sync: vault update $(date -u +%Y-%m-%dT%H:%MZ)"`
|
|
36
|
+
7. Run `git -C <vault> push origin HEAD`. Report result.
|
|
37
|
+
8. Append one `log.md` entry summarizing: files pushed, lint result, commit hash.
|
|
38
|
+
|
|
39
|
+
### Pull workflow
|
|
40
|
+
|
|
41
|
+
9. If vault is dirty, stash first: `git -C <vault> stash push -m "auto-stash before pull $(date -u +%Y-%m-%dT%H:%MZ)"`.
|
|
42
|
+
10. Run `git -C <vault> pull --rebase origin HEAD`. Report result.
|
|
43
|
+
11. If a stash was created, pop it: `git -C <vault> stash pop`.
|
|
44
|
+
12. If conflicts occur during stash pop, identify them and present to the user for resolution (see Conflict Resolution below).
|
|
45
|
+
13. Run `skillwiki lint <vault>` after pull to verify vault integrity.
|
|
46
|
+
14. Append one `log.md` entry summarizing: commits pulled, lint result, any conflicts.
|
|
47
|
+
|
|
48
|
+
### Pull-then-push workflow
|
|
49
|
+
|
|
50
|
+
15. Execute the pull workflow (steps 9-13) first.
|
|
51
|
+
16. Then execute the push workflow (steps 4-8).
|
|
52
|
+
|
|
53
|
+
## Conflict Resolution
|
|
54
|
+
|
|
55
|
+
When merge conflicts are detected:
|
|
56
|
+
|
|
57
|
+
- **Frontmatter conflicts:**
|
|
58
|
+
- For `updated:` fields: always take the newer timestamp (compare both sides, keep the later one).
|
|
59
|
+
- For all other frontmatter fields: present both versions to the user and ask which to keep.
|
|
60
|
+
- **Body conflicts:**
|
|
61
|
+
- Do not auto-resolve body conflicts.
|
|
62
|
+
- Mark unresolved regions with `???` on a line by itself between the conflicting versions, so the user can see both sides and decide.
|
|
63
|
+
- Example:
|
|
64
|
+
```
|
|
65
|
+
Content from local version
|
|
66
|
+
???
|
|
67
|
+
Content from remote version
|
|
68
|
+
```
|
|
69
|
+
- After resolving conflicts, run `skillwiki lint <vault>` to verify before committing.
|
|
70
|
+
|
|
71
|
+
## Multi-device coordination
|
|
72
|
+
|
|
73
|
+
When the user mentions editing from Obsidian desktop and Claude Code on a server (or any two-device setup):
|
|
74
|
+
|
|
75
|
+
- Recommend pulling before every editing session on each device.
|
|
76
|
+
- Recommend pushing after every editing session on each device.
|
|
77
|
+
- If both devices edit the same page between syncs, conflicts are inevitable — the Conflict Resolution section handles this.
|
|
78
|
+
- Suggest enabling auto-commit in Obsidian (Community Plugins: `obsidian-git`) to reduce dirty-state drift.
|
|
79
|
+
|
|
80
|
+
## Stop conditions
|
|
81
|
+
|
|
82
|
+
- `skillwiki sync status` reports `not_a_repo` — the vault is not a git repository. Advise the user to initialize one.
|
|
83
|
+
- Lint errors are found before a push — do not push until resolved.
|
|
84
|
+
- `git push` or `git pull` fails with a network error — report and stop.
|
|
85
|
+
|
|
86
|
+
## Forbidden
|
|
87
|
+
|
|
88
|
+
- Pushing when lint errors exist.
|
|
89
|
+
- Auto-resolving body conflicts without user review.
|
|
90
|
+
- Force-pushing (`git push --force`).
|
|
91
|
+
- Modifying files in `raw/` to resolve conflicts (N9 — archive and re-ingest instead).
|