skillwiki 0.4.2 → 0.4.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.
@@ -3,17 +3,12 @@ version: 0.2.1
3
3
  name: using-skillwiki
4
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
-
7
6
  <SUBAGENT-STOP>
8
7
  If you were dispatched as a subagent to execute a specific task, skip this skill.
9
8
  </SUBAGENT-STOP>
10
-
11
9
  # using-skillwiki
12
-
13
10
  You have skillwiki — a project-aware Karpathy-style knowledge base for Claude Code.
14
-
15
11
  ## When to Use These Skills
16
-
17
12
  Invoke a skillwiki skill when the user:
18
13
  - Wants to create, build, or start a vault/wiki/knowledge base
19
14
  - Mentions ingesting sources, reading URLs into notes, converting content
@@ -29,13 +24,9 @@ Invoke a skillwiki skill when the user:
29
24
  - Wants to sync vault changes to/from a git remote
30
25
  - Wants to visualize the vault graph as an Obsidian Canvas
31
26
  - Wants to run a research scan of repo and vault health
32
-
33
27
  ## Vault Structure
34
-
35
28
  A skillwiki vault has three layers. The canonical architecture lives in `SCHEMA.md` at the vault root — read it before creating any new directories.
36
-
37
29
  **Layer 1 — Raw (`raw/`):** Immutable source material. Never modify after ingest. `raw/transcripts/` doubles as the ad-hoc capture point for meeting notes and unprocessed ideas.
38
-
39
30
  ```
40
31
  raw/
41
32
  ├── articles/ # Web articles, clippings
@@ -43,7 +34,6 @@ raw/
43
34
  ├── transcripts/ # Meeting notes, interviews, ad-hoc captures
44
35
  └── assets/ # Images, diagrams referenced by sources
45
36
  ```
46
-
47
37
  Raw frontmatter:
48
38
  ```yaml
49
39
  ---
@@ -52,23 +42,16 @@ ingested: YYYY-MM-DD
52
42
  sha256: # computed by skillwiki hash over body bytes after closing ---
53
43
  ---
54
44
  ```
55
-
56
45
  **Layer 2 — Typed Knowledge:** `entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`. Agent-owned pages with `^[raw/...]` citation markers at paragraph-end. Global scope — project association via `provenance_projects:` frontmatter, not directory nesting.
57
-
58
46
  **Layer 3 — Project Workspaces (`projects/{slug}/`):** Per-project lifecycle directories with `work/` (spec + plan + retro), `compound/` (distilled lessons/patterns), `architecture/` (ADRs), and `history/` (archived specs/plans).
59
-
60
47
  **No `inbox/` directory.** Ad-hoc captures go to `raw/transcripts/` or directly into a project work item via `proj-work`. Do not invent new top-level directories — extend Layer 2 via SCHEMA.md tag taxonomy if needed.
61
-
62
48
  ### Ad-hoc capture: three entry points
63
-
64
49
  | Entry | When | What happens |
65
50
  |-------|------|-------------|
66
51
  | `/wiki-add-task <text>` | You're in a Claude session | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
67
52
  | 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 |
68
53
  | Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
69
-
70
54
  ## Skill Map
71
-
72
55
  | Skill | When to Invoke |
73
56
  |-------|----------------|
74
57
  | `wiki-init` | Bootstrap a new vault — SCHEMA.md, index.md, log.md, ~/.skillwiki/.env |
@@ -89,56 +72,48 @@ sha256: # computed by skillwiki hash over body bytes after closing ---
89
72
  | `proj-decide` | Write an Architectural Decision Record (ADR) |
90
73
  | `wiki-gate-plan-mode` | Toggle EnterPlanMode gating — force superpowers planning instead of built-in plan mode |
91
74
  | `dev-loop-research` | Standalone research agent — scans repo + vault health, outputs prioritized work-item recommendations |
92
-
93
75
  ## CLI Backbone
94
-
95
76
  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.
96
-
97
77
  Key CLI subcommands: `init`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `graph build`, `archive`, `drift`, `compound`, `tag-sync`, `sync status`, `seed`, `stale`, `observe`, `canvas generate`.
98
-
99
78
  Run `skillwiki doctor` to diagnose setup issues. Run `skillwiki config list` to see current configuration.
100
-
101
79
  ## Typical Workflow
102
-
103
80
  1. **Init** (`wiki-init`) — create vault, set domain and taxonomy
104
81
  2. **Ingest** (`wiki-ingest`) — add sources, build pages
105
82
  3. **Query** (`wiki-query`) — search and synthesize answers
106
83
  4. **Lint** (`wiki-lint`) — periodic health checks
107
84
  5. **Crystallize** (`wiki-crystallize`) — save session insights as pages
108
85
  6. **Audit** (`wiki-audit`) — verify source integrity
109
-
110
86
  For longer-running project work, use `proj-init` → `proj-work` → `proj-distill` / `proj-decide`.
111
-
112
87
  Maintenance: **Archive** (`wiki-archive`) superseded pages, **Drift** (`wiki-reingest`) to detect stale sources, **Adapter** (`wiki-adapter-prd`) for foreign PRD format ingestion.
113
-
88
+ ## Troubleshooting Version Drift
89
+ skillwiki has three distribution channels that can drift:
90
+ | Channel | Location | Update Command |
91
+ |---------|----------|----------------|
92
+ | npm CLI | `/usr/local/bin/skillwiki` | `npm install -g skillwiki@latest` |
93
+ | npm skills | `/usr/local/lib/node_modules/skillwiki/skills/` | `skillwiki install` (copies to `~/.claude/skills/`) |
94
+ | Claude plugin | `~/.claude/plugins/cache/llm-wiki/` | `claude plugin update skillwiki@llm-wiki` |
95
+ | Local git dev | `~/.hermes/skills/llm-wiki/` | `npm link ./packages/cli` (from repo root) |
96
+ **Check versions:** `skillwiki doctor` reports "Plugin/CLI version" mismatch warnings.
97
+ **Common issue:** npm package ships SKILL.md files with older `version:` frontmatter than CLI code. This creates false-positive "version warnings" in `skillwiki doctor` — the CLI is newer but skills report older version.
98
+ **Fix:** If developing locally, use `npm link` from the git repo. If using released versions, wait for maintainer to bump SKILL.md versions in source and republish.
114
99
  ## Multi-Wiki Profiles
115
-
116
100
  skillwiki supports named wiki profiles for working with multiple vaults. Set `WIKI_DEFAULT` to control which wiki all skills target by default.
117
-
118
101
  **Manage profiles:**
119
102
  - `skillwiki config set wiki.<name>.path <dir>` — register a profile
120
103
  - `skillwiki config set default <name>` — set active profile
121
104
  - `skillwiki config list --profiles` — list all profiles
122
105
  - `skillwiki --wiki <name> lint` — override per-command
123
-
124
106
  **Project-local override:** Place a `./skillwiki/.env` in a project root to bind that project to a specific wiki. Skills will use it automatically when running from that directory.
125
-
126
107
  ## PRD Bridge — Redirect Spec/Plan Output to Vault
127
-
128
108
  When skillwiki is installed, **all spec and plan documents must land in the vault**, not in repo-local directories like `docs/superpowers/`. This applies to any PRD/design skill (superpowers:brainstorming, superpowers:writing-plans, CodeStable, AIDE, Hermes, etc.).
129
-
130
109
  **Rule:** Before a PRD skill writes a spec or plan file, redirect its save path:
131
110
  1. Resolve the vault path: `skillwiki path`
132
111
  2. If the cwd is inside a project (check for `projects/{slug}/` via `skillwiki path --init-time` or look for `./skillwiki/.env`), use that project's work directory
133
112
  3. Create or locate the work item via `proj-work`, which emits redirect paths for `spec.md` and `plan.md`
134
113
  4. Pass those vault paths to the PRD skill as its save location
135
-
136
114
  **Concrete overrides for superpowers:**
137
115
  - `superpowers:brainstorming` step 6: override `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` → vault work-item `spec.md` path from `proj-work`
138
116
  - `superpowers:writing-plans` header: override `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md` → vault work-item `plan.md` path from `proj-work`
139
-
140
117
  Both skills say "User preferences for spec location override this default" — the vault work-item path IS the override.
141
-
142
118
  **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.
143
-
144
119
  **Never create `docs/superpowers/` in any repo.**
@@ -1,132 +1,102 @@
1
1
  ---
2
- version: 0.2.1
2
+ version: 0.2.2
3
3
  name: wiki-add-task
4
4
  description: Capture ad-hoc ideas, bugs, tasks, or notes into the vault with ad-hoc capture frontmatter and descriptive filenames.
5
5
  ---
6
-
7
6
  # wiki-add-task
8
-
9
7
  Capture ad-hoc ideas, bugs, tasks, and notes into the vault. Three entry points depending on where you are:
10
-
11
8
  | Entry | When | What happens |
12
9
  |-------|------|-------------|
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 |
10
+ | `/wiki-add-task <text>` | You're in a Claude Code session (NOT Hermes compact) | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
11
+ | `skillwiki add-task <text>` | Hermes Agent compact mode | Same as above — compact-compatible CLI trigger |
14
12
  | 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 |
15
13
  | Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
16
-
14
+ **Path Rule:** Captures ALWAYS go to `$(skillwiki path)/raw/transcripts/` (Layer 1). Never under `projects/{slug}/raw/` — that violates SCHEMA.md Layer 1 immutability.
15
+ ### Exception: Explicit project task requests
16
+ When the user explicitly says "raise task to project X", "add a task for X", "create a feature request for X", or uses a directive structure like "raise task to {project} {description}", the intent is a **work item**, not a capture:
17
+ | User wording | Action | Target |
18
+ |---|---|---|
19
+ | "capture this", "note this", "remember this" | Use wiki-add-task (this skill) | `raw/transcripts/` |
20
+ | "raise task to project X", "add task to X project" | Escalate to `proj-work` | `projects/{slug}/work/YYYY-MM-DD-{slug}/task.md` |
21
+ | "save to wiki" + content | Use `wiki-ingest` | `concepts/`, `entities/`, etc. |
22
+ This is NOT a violation of the "ALWAYS" rule below — explicit project task requests are a distinct user intent that bypasses raw capture and goes directly to a Layer 3 work item.
17
23
  ## When This Skill Activates
18
-
19
24
  - User invokes `/wiki-add-task` with a description.
20
25
  - User says "add task", "capture this", "note this", "remember this", "log this idea", or similar.
21
26
  - User provides a short text description and optionally a type tag.
22
-
27
+ - **Do NOT activate** when the user says "raise task to project X" or "add work item to project X" — escalate to `proj-work` instead.
23
28
  ## Output language
24
-
25
29
  Run `skillwiki lang` at the start. Entry prose and `--human` summaries use the resolved language. Frontmatter keys, file names, and structural markers stay English.
26
-
27
30
  ## Steps
28
-
29
31
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
30
32
  1. **Parse arguments.** Extract from the user's message:
31
- - `text` — the idea/bug/task/note content (required)
32
- - `type` — one of: `idea`, `bug`, `task`, `note` (default: `task`)
33
- - `project` — project slug for claim detection (e.g., `llm-wiki`). Required for `task` and `bug` types to appear in `skillwiki stale` unclaimed list.
33
+ - `text` — the idea/bug/task/note content (required)
34
+ - `type` — one of: `idea`, `bug`, `task`, `note` (default: `idea`)
35
+ - `project` — optional project slug to cross-reference (e.g., `llm-wiki`)
34
36
  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
37
  3. **Write frontmatter.** Create the file with ad-hoc capture frontmatter:
36
- ```yaml
37
- ---
38
- source_url:
39
- created: YYYY-MM-DD
40
- ingested: # filled by ingest pipeline
41
- kind: {type}
42
- project: "[[{slug}]]"
43
- ---
44
- ```
45
- - Set `kind` to the parsed type (`idea`, `bug`, `task`, `note`).
46
- - Set `project: "[[slug]]"` — **required for claim detection**. Without this field, the transcript is invisible to `skillwiki stale`. If no project context exists, ask the user which project this capture belongs to.
47
- - `source_url` is null (these are locally originated captures).
48
- - `created` — today's date. `ingested` is left empty for the ingest pipeline.
49
- - No `sha256` — ad-hoc captures are mutable working notes, not immutable sources.
38
+ ```yaml
39
+ ---
40
+ source_url:
41
+ ingested: YYYY-MM-DD
42
+ kind: {type}
43
+ project: "[[{slug}]]"
44
+ ---
45
+ ```
46
+ - Set `kind` to the parsed type (`idea`, `bug`, `task`, `note`).
47
+ - If a `project` slug was provided, set `project: "[[slug]]"`.
48
+ - If no project, omit the `project` field entirely.
49
+ - `source_url` is null (these are locally originated captures).
50
+ - No `sha256` — ad-hoc captures are mutable working notes, not immutable sources.
50
51
  4. **Write body.** Below the frontmatter, write:
51
- ```markdown
52
- # {type}: {text}
53
-
54
- {text}
55
- ```
56
- Use the resolved output language for any prose. The type label and frontmatter stay English.
52
+ ```markdown
53
+ # {type}: {text}
54
+ {text}
55
+ ```
56
+ Use the resolved output language for any prose. The type label and frontmatter stay English.
57
57
  5. **Cross-reference (optional).** If a `project` slug was provided:
58
- - Check that `projects/{slug}/` exists in the vault.
59
- - Append a one-line reference to the project's compound notes:
60
- `- [YYYY-MM-DD] capture: [text (first 60 chars)] → raw/transcripts/YYYY-MM-DD-{type}-{slug}.md`
61
- - Do NOT create a full work item (that's `proj-work`'s job).
58
+ - Check that `projects/{slug}/` exists in the vault.
59
+ - Append a one-line reference to the project's compound notes:
60
+ `- [YYYY-MM-DD] capture: [text (first 60 chars)] → raw/transcripts/YYYY-MM-DD-{type}-{slug}.md`
61
+ - Do NOT create a full work item (that's `proj-work`'s job).
62
62
  6. **Update log.md.** Append: `## [YYYY-MM-DD] capture | [type]: [text (first 60 chars)]`
63
63
  7. **Confirm to user.** Report what was captured and where. Suggest next steps:
64
- - If `type: idea` → "Consider ingesting related sources to develop this idea."
65
- - If `type: bug` → "Use proj-work to create a bug-fix work item."
66
- - If `type: task` → "Use proj-work to track this task through the dev loop."
67
- - If `type: note` → "Will be available for future wiki-query searches."
68
-
64
+ - If `type: idea` → "Consider ingesting related sources to develop this idea."
65
+ - If `type: bug` → "Use proj-work to create a bug-fix work item."
66
+ - If `type: task` → "Use proj-work to track this task through the dev loop."
67
+ - If `type: note` → "Will be available for future wiki-query searches."
69
68
  ## Capture file format
70
-
71
69
  Each capture is a standalone file with ad-hoc capture frontmatter:
72
-
73
70
  ```yaml
74
71
  ---
75
72
  source_url:
76
- created: 2026-05-08
77
- ingested:
73
+ ingested: 2026-05-08
78
74
  kind: idea
79
75
  project: "[[llm-wiki]]"
80
76
  ---
81
-
82
77
  # idea: Fix the template mismatch
83
-
84
78
  Fix the template mismatch between wiki-add-task and the vault template.
85
79
  ```
86
-
87
80
  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).
88
-
89
- The `project` field is **required for claim detection**. Without it, `skillwiki stale` cannot surface the transcript as unclaimed work. The `kind` and `project` 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`).
90
-
81
+ 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`).
91
82
  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.
92
-
93
83
  ## Stop conditions
94
-
95
84
  - `skillwiki path` returns NO_VAULT_CONFIGURED.
96
85
  - No `text` provided (prompt user once, then stop).
97
86
  - Target file already exists (use a different slug or add a suffix).
98
-
99
87
  ## Forbidden
100
-
101
88
  - Creating an `inbox/` directory. All captures go to `raw/transcripts/`.
102
89
  - Appending to existing capture files — each capture gets its own file.
103
90
  - Creating a work item — this is capture-only. Use `proj-work` for full work items.
104
91
  - Writing to any Layer 2 or Layer 3 location. Captures are Layer 1 (raw).
105
-
106
92
  ## Filesystem drop (offline capture)
107
-
108
93
  When you're not in a Claude session, drop files directly into `raw/transcripts/`:
109
-
110
94
  1. Create a `.md` file in `raw/transcripts/` — name it descriptively (e.g., `2026-05-08-idea-fix-template.md`)
111
- 2. Use ad-hoc capture frontmatter: `source_url:`, `ingested:`, `kind:`, and `project:` (required for `task`/`bug`)
95
+ 2. Use ad-hoc capture frontmatter: `source_url:`, `ingested:`, `kind:`, and optionally `project:`
112
96
  3. Write your idea/bug/task/note below the frontmatter
113
-
114
- **For claim detection**, `kind` must be `task` or `bug` AND `project: "[[slug]]"` must be set. Without both fields, the transcript won't appear in `skillwiki stale` unclaimed list.
115
-
116
- No special format required — `skillwiki stale --days 0` will detect unclaimed task/bug transcripts on the next run. Mark the type with a heading like `## idea`, `## bug`, `## task`, or just write freeform.
117
-
97
+ 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.
118
98
  ## Dev-loop discovery
119
-
120
- `skillwiki stale` detects unclaimed transcripts automatically. A transcript is **unclaimed** when:
121
- - `kind` is `task` or `bug`
122
- - `project` field is set (e.g., `project: "[[llm-wiki]]"`)
123
- - No work item matches it (via date-prefix or `source:` frontmatter reference in spec.md)
124
-
125
- Run `skillwiki stale --days 0 --human` to see all unclaimed transcripts. The output includes an `unclaimed_transcripts` section listing each capture that needs a work item.
126
-
127
- The agent then decides whether to:
128
- - Create a work item via `proj-work` (for tasks and bugs) — set `source:` in spec.md to the transcript path for cross-date linking
99
+ When the dev-loop QUERY step runs, it should scan `raw/transcripts/` for files with `ingested:` date newer than the last cycle. New files are surfaced as claimable work items. The agent then decides whether to:
100
+ - Create a work item via `proj-work` (for tasks and bugs)
129
101
  - Ingest as a knowledge page via `wiki-ingest` (for ideas with sources)
130
102
  - Leave in place (for notes that don't need action yet)
131
-
132
- Transcripts without `kind` or `project` fields (e.g., `loop-cycle-*` session logs) are excluded from claim detection.
@@ -3,35 +3,26 @@ version: 0.2.1
3
3
  name: wiki-crystallize
4
4
  description: Distill the current working session into a typed-knowledge page with provenance.
5
5
  ---
6
-
7
6
  # wiki-crystallize
8
-
9
7
  ## When This Skill Activates
10
-
11
8
  - User asks to crystallize, consolidate, or promote draft material into typed-knowledge pages.
12
9
  - A vault is resolvable (see step 0).
13
-
14
10
  ## Output language
15
-
16
11
  Run `skillwiki lang` at the start. Generate consolidated page prose and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
17
-
18
12
  ## Pre-orientation reads
19
13
  Standard four reads. If cwd is inside `projects/{slug}/`, also read project README and recent work logs.
20
-
21
14
  ## Steps
22
15
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
23
16
  1. Identify type: entity / concept / comparison / query / summary.
24
17
  2. Set `provenance:`. Default `research`. If in project context: `project` with `provenance_projects: ["[[slug]]"]`.
25
18
  3. Compose the page with citations pre-attached. Reuse existing `raw/` sources where possible. Every page MUST include:
26
- - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
27
- - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
19
+ - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
20
+ - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
28
21
  4. `skillwiki validate <page>`. If non-zero, STOP.
29
22
  5. Apply writes: page → `index.md` → `log.md`.
30
-
31
23
  ## Stop conditions
32
24
  - `validate` non-zero.
33
25
  - Missing `provenance:` for project-context runs.
34
-
35
26
  ## Forbidden
36
27
  - Filing without explicit `provenance:`.
37
28
  - Updating `index.md` before `validate` passes.
@@ -3,57 +3,50 @@ version: 0.2.1
3
3
  name: wiki-ingest
4
4
  description: Convert URLs, files, or pasted text into typed-knowledge pages with raw provenance. Supports single and batch mode.
5
5
  ---
6
-
7
6
  # wiki-ingest
8
-
9
7
  ## When This Skill Activates
10
-
11
8
  - User shares a URL, paste, or local file to capture in the vault.
12
9
  - The output target is `entities/`, `concepts/`, `comparisons/`, or `queries/`.
13
10
  - A vault is resolvable (see step 0).
14
-
15
11
  ## Output language
16
-
17
12
  Run `skillwiki lang` at the start. Generate page-body prose, narrative sections, and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
18
-
19
13
  ## Pre-orientation reads (mandatory before any write)
20
14
  1. `SCHEMA.md`
21
15
  2. `index.md`
22
16
  3. Last 20–30 entries of `log.md`
23
17
  4. (Project context only) `projects/{slug}/README.md` and last ~5 work-item logs.
24
-
25
18
  ## Steps (in order — N6, N7, N8)
26
19
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`. Use the resolved vault path for all writes; use the canonical language for all generated prose.
27
20
  1. **Guard.** For each URL: run `skillwiki fetch-guard <url>`. If exit ≠ 0, STOP and surface the error. Do not retry.
28
21
  2. **Fetch.** Use `web_fetch` (or read local file) under Layer 2 controls (the CLI Layer 2 fetcher applies in tests; in skill runtime use `web_fetch` directly and treat any error as STOP).
29
22
  3. **Hash.** Write the raw file (frontmatter + body). Run `skillwiki hash <raw-file>` and embed the result in raw frontmatter `sha256:`.
30
23
  4. **Generate page(s).** Compose typed-knowledge page(s) with citations pre-attached (`^[raw/...]` markers). Every page MUST include:
31
- - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
32
- - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
24
+ - `## TL;DR` as the first section after frontmatter — a 1–3 bullet summary of the page's key takeaway.
25
+ - For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
33
26
  5. **Validate.** For each generated page: run `skillwiki validate <page>`. If exit ≠ 0, STOP — do not write index/log.
34
27
  6. **Apply writes in order.** raw → page(s) → `index.md` → `log.md`.
35
28
  7. **Confidence flag.** If only one source is cited, set `confidence: low`.
36
-
37
29
  ## Provenance defaults
38
30
  - Default `provenance: research`.
39
31
  - If cwd is inside `projects/{slug}/`, set `provenance: project` and add `provenance_projects: ["[[slug]]"]`.
40
-
32
+ ## Raw Data Locality
33
+ Raw ephemeral data (market feeds, logs, transient JSON) must be written to the **project local** `raw/` directory, NOT the cloud-mounted wiki path. See `references/raw-data-locality.md` for the full pattern.
34
+ **Quick rule:**
35
+ - Transient data → `~/projects/{slug}/raw/` (local, git-tracked)
36
+ - Compound pages → `~/wiki/projects/{slug}/compound/` (cloud, durable)
41
37
  ## Stop conditions
42
38
  - `fetch-guard` non-zero.
43
39
  - Fetch timeout / size limit exceeded.
44
40
  - `validate` non-zero on any page.
45
41
  - sha256 already exists in vault for the same source.
46
-
47
42
  ## Forbidden
48
43
  - Skipping `fetch-guard`.
49
44
  - Updating `index.md` or `log.md` before all pages validate.
50
45
  - Modifying any existing file in `raw/`.
46
+ - Writing raw ephemeral data directly to cloud-mounted wiki paths (`~/wiki/`).
51
47
  - 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.
52
-
53
48
  ## Batch Mode
54
-
55
49
  When the user provides multiple sources (a directory of files, a list of URLs, or a multi-document input):
56
-
57
50
  1. **Loop per source.** Execute steps 1–5 for each source individually (guard → fetch → hash → generate → validate).
58
51
  2. **Accumulate, don't write yet.** Collect all raw files and pages in memory. Do not write `index.md` or `log.md` until every source has validated.
59
52
  3. **Fail fast.** If any page fails validation, STOP. Report all failures. Do not write index/log for any source.
@@ -1,34 +1,25 @@
1
1
  ---
2
- version: 0.2.1
2
+ version: 0.2.2
3
3
  name: wiki-lint
4
4
  description: Vault health check via the umbrella `skillwiki lint` subcommand. Read-only by default; rotation requires explicit user consent.
5
5
  ---
6
-
7
6
  # wiki-lint
8
-
9
7
  ## When This Skill Activates
10
-
11
8
  - User asks for a vault health report, lint, or audit.
12
9
  - Periodic maintenance.
13
-
14
10
  ## Pre-orientation reads
15
-
16
11
  Standard four reads.
17
-
18
12
  ## Steps
19
-
20
13
  0. Resolve vault: `skillwiki path` (record source for context).
14
+ - **CRITICAL**: Verify the correct vault when the user has multiple wiki instances (e.g., ~/wiki vs ~/wiki-fin). User may explicitly specify which vault to target — confirm before destructive operations.
21
15
  1. Run `skillwiki lint <vault>`. Read the JSON.
22
16
  2. Reason over findings; present grouped by severity with concrete suggested actions per kind. If the CLI was recently updated with new lint checks, re-running lint on the full vault may flag pre-existing pages that predate the new rule — treat these as legitimate findings, not false positives.
23
17
  3. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
24
- 4. Append one `log.md` entry summarizing the lint counts (errors/warnings/info).
25
-
18
+ 4. **Post-migration verification**: If the user recently migrated content (e.g., moved entity/concept pages to another vault), re-run lint and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too).
19
+ 5. Append one `log.md` entry summarizing the lint counts (errors/warnings/info).
26
20
  ## Stop conditions
27
-
28
21
  None — lint reports all findings even on per-page errors.
29
-
30
22
  ## Forbidden
31
-
32
23
  - Auto-rotating logs.
33
24
  - Auto-updating sha256 fields.
34
25
  - Modifying any page beyond the lint summary entry in `log.md`.
@@ -1,41 +1,36 @@
1
1
  ---
2
- version: 0.2.1
2
+ version: 0.2.2
3
3
  name: wiki-query
4
4
  description: Search the vault and synthesize an answer with E2 4-signal ranking. Optional file to queries/ or comparisons/.
5
5
  ---
6
-
7
6
  # wiki-query
8
-
9
7
  ## When This Skill Activates
10
-
11
8
  - User asks a question that should be answered from vault contents.
12
9
  - A vault is resolvable (see step 0).
13
-
14
10
  ## Output language
15
-
16
11
  Run `skillwiki lang` at the start. Generate query-result prose and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
17
-
18
12
  ## Pre-orientation reads
19
13
  Standard four reads (SCHEMA, index, log, project context if applicable).
20
-
21
14
  ## Steps
22
15
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
23
16
  1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
24
17
  2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
25
18
  3. **Compute overlap.** `skillwiki overlap <vault>`.
26
19
  4. **Score candidates** in prompt using the 4 signals:
27
- - Direct wikilink: 3.0×
28
- - Source overlap: 4.0× (read from overlap output)
29
- - Adamic-Adar: 1.5× (read from graph output)
30
- - Type affinity: 1.0×
20
+ - Direct wikilink: 3.0×
21
+ - Source overlap: 4.0× (read from overlap output)
22
+ - Adamic-Adar: 1.5× (read from graph output)
23
+ - Type affinity: 1.0×
31
24
  5. **Read top candidates** in full (frontmatter + body).
32
25
  6. **Synthesize answer** with explicit citations to the candidate pages.
33
26
  7. **Optional file.** If user accepts: write to `queries/<slug>.md` or `comparisons/<slug>.md` with full frontmatter, validate, then update `index.md` then `log.md`.
34
-
35
27
  ## Stop conditions
36
28
  - Zero matching pages.
37
29
  - User declines to file.
38
-
30
+ ## Pitfalls
31
+ ### Claimed-status vs actual-state gap
32
+ When a wiki page (especially a work item `tasks.md`) claims that fixes were applied, features were completed, or files were removed — **verify on disk before accepting the claim**. In one incident, a `tasks.md` marked 6 items DONE but 5 were not actually applied: a script claimed "removed" was still 2020 bytes on disk, a crontab claimed "updated to 30min" was still `*/10`, and a build target claimed "verified has consumers" had no web server serving it.
33
+ **Rule**: After reading a work item that declares completion, run at least one verification command per critical claim (check file existence, grep a config, inspect a crontab). Documents can drift from reality — the filesystem is the source of truth.
39
34
  ## Forbidden
40
35
  - Filing without `validate` passing.
41
36
  - Skipping the orientation reads even for "quick" queries.