skillwiki 0.2.0-beta.8 → 0.2.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.2.0-beta.8",
3
+ "version": "0.2.0",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js"
@@ -15,7 +15,8 @@
15
15
  "build": "tsup && rm -rf ./skills && cp -r ../skills ./skills",
16
16
  "test": "vitest run",
17
17
  "test:watch": "vitest",
18
- "typecheck": "tsc --noEmit"
18
+ "typecheck": "tsc --noEmit",
19
+ "prepublishOnly": "npm run build"
19
20
  },
20
21
  "dependencies": {
21
22
  "commander": "^12.1.0",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.2.0-beta.8",
3
+ "version": "0.2.0",
4
4
  "skills": "./",
5
5
  "description": "Project-aware Karpathy-style knowledge base for Claude Code: 11 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI (8 subcommands, JSON-by-default).",
6
6
  "author": {
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env bash
2
+ # skillwiki CLI wrapper — delegates to npx so the CLI is available
3
+ # automatically when this plugin is enabled (Claude Code adds bin/ to PATH).
4
+ set -euo pipefail
5
+ exec npx -y skillwiki@beta "$@"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.2.0-beta.8",
3
+ "version": "0.2.0",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",
@@ -13,7 +13,7 @@ Standard four + project context.
13
13
 
14
14
  ## Steps
15
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
- 2. `npx skillwiki validate <adr>`. If non-zero, STOP.
16
+ 2. `skillwiki validate <adr>`. If non-zero, STOP.
17
17
  3. **Generalization check.** If the decision applies beyond this project, create a `concepts/` page with `provenance: project` (or `mixed` if research-informed).
18
18
  4. Apply writes: ADR → (optional) concept page → vault `index.md` → vault `log.md` and project `log.md`.
19
19
 
@@ -31,7 +31,7 @@ When reading retros as source material:
31
31
  2. **Step 2 — Generate.** Compose the vault concept page with
32
32
  `provenance: project` and
33
33
  `provenance_projects: ["[[slug]]"]`. Validate with
34
- `npx skillwiki validate`.
34
+ `skillwiki validate`.
35
35
  3. **Backlink.** Set `promoted_to: "[[concept-slug]]"` on the source
36
36
  compound entry. For retro-sourced distillation, skip backlink (log.md
37
37
  entries are append-only) and instead add `sources:` citing the vault
@@ -16,7 +16,7 @@ Standard four + project context (project README, last ~5 work logs).
16
16
  1. Determine `kind:` (feature | issue | refactor | decision) and slug.
17
17
  2. Create folder `projects/{slug}/work/YYYY-MM-DD-{work-slug}/`.
18
18
  3. Override default output paths for any nested skill: `spec.md`, `plan.md`, and `log.md` are written here, not at vault root.
19
- 4. Validate work-item frontmatter via `npx skillwiki validate <spec.md>`. If non-zero, STOP.
19
+ 4. Validate work-item frontmatter via `skillwiki validate <spec.md>`. If non-zero, STOP.
20
20
  5. Manage status transitions: `planned` → `in-progress` → `completed` (set `completed:` date) or `abandoned`.
21
21
  6. Append vault `log.md` entry on creation and on each status transition.
22
22
 
@@ -25,6 +25,31 @@ Invoke a skillwiki skill when the user:
25
25
  - Has a spec/plan in a non-skillwiki format (CodeStable, RFC, AIDE)
26
26
  - Asks about their skillwiki configuration or setup health
27
27
 
28
+ ## Vault Structure
29
+
30
+ A skillwiki vault has two layers:
31
+
32
+ **Layer 1 — Raw (`raw/`):** Immutable source material. Never modify after ingest.
33
+
34
+ ```
35
+ raw/
36
+ ├── articles/ # Web articles, clippings
37
+ ├── papers/ # PDFs, arxiv papers
38
+ ├── transcripts/ # Meeting notes, interviews
39
+ └── assets/ # Images, diagrams referenced by sources
40
+ ```
41
+
42
+ Raw frontmatter:
43
+ ```yaml
44
+ ---
45
+ source_url: https://…
46
+ ingested: YYYY-MM-DD
47
+ sha256: # computed by skillwiki hash over body bytes after closing ---
48
+ ---
49
+ ```
50
+
51
+ **Layer 2 — Agent-owned pages:** `entities/`, `concepts/`, `comparisons/`, `queries/`, `meta/`, `projects/`. Citations use `^[raw/articles/source-file.md]` markers at paragraph-end.
52
+
28
53
  ## Skill Map
29
54
 
30
55
  | Skill | When to Invoke |
@@ -63,3 +88,35 @@ Run `skillwiki doctor` to diagnose setup issues. Run `skillwiki config list` to
63
88
  For longer-running project work, use `proj-init` → `proj-work` → `proj-distill` / `proj-decide`.
64
89
 
65
90
  Maintenance: **Archive** (`wiki-archive`) superseded pages, **Drift** (`wiki-reingest`) to detect stale sources, **Adapter** (`wiki-adapter-prd`) for foreign PRD format ingestion.
91
+
92
+ ## Multi-Wiki Profiles
93
+
94
+ skillwiki supports named wiki profiles for working with multiple vaults. Set `WIKI_DEFAULT` to control which wiki all skills target by default.
95
+
96
+ **Manage profiles:**
97
+ - `skillwiki config set wiki.<name>.path <dir>` — register a profile
98
+ - `skillwiki config set default <name>` — set active profile
99
+ - `skillwiki config list --profiles` — list all profiles
100
+ - `skillwiki --wiki <name> lint` — override per-command
101
+
102
+ **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.
103
+
104
+ ## PRD Bridge — Redirect Spec/Plan Output to Vault
105
+
106
+ 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.).
107
+
108
+ **Rule:** Before a PRD skill writes a spec or plan file, redirect its save path:
109
+ 1. Resolve the vault path: `skillwiki path`
110
+ 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
111
+ 3. Create or locate the work item via `proj-work`, which emits redirect paths for `spec.md` and `plan.md`
112
+ 4. Pass those vault paths to the PRD skill as its save location
113
+
114
+ **Concrete overrides for superpowers:**
115
+ - `superpowers:brainstorming` step 6: override `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` → vault work-item `spec.md` path from `proj-work`
116
+ - `superpowers:writing-plans` header: override `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md` → vault work-item `plan.md` path from `proj-work`
117
+
118
+ Both skills say "User preferences for spec location override this default" — the vault work-item path IS the override.
119
+
120
+ **If no project context exists** (standalone vault, not inside a project), save specs/plans directly under the vault root with the PRD skill's default naming, e.g. `<vault>/specs/YYYY-MM-DD-<slug>.md`.
121
+
122
+ **Never create `docs/superpowers/` in any repo.**
@@ -24,7 +24,8 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
24
24
  1. Identify the target page. Confirm with the user which page to archive (show full relPath).
25
25
  2. Run `skillwiki archive <page> [vault]`. Read the JSON output.
26
26
  3. Verify with `skillwiki index-check [vault]` — confirm no ghost entries remain.
27
- 4. Append a `log.md` entry: `## [{date}] archive | {relPath} _archive/{subdir}/`.
27
+ 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. Append a `log.md` entry: `## [{date}] archive | {relPath} → _archive/{subdir}/`.
28
29
 
29
30
  ## Reversibility
30
31
 
@@ -19,7 +19,7 @@ Standard four reads.
19
19
 
20
20
  ## Steps
21
21
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
22
- 1. `npx skillwiki audit <page>`. Read the JSON report.
22
+ 1. `skillwiki audit <page>`. Read the JSON report.
23
23
  2. Reason over the report:
24
24
  - For each unresolved marker: suggest ingesting the missing source or correcting the path.
25
25
  - For each `unused_sources` entry: suggest adding a body marker or removing from `sources:`.
@@ -22,7 +22,7 @@ Standard four reads. If cwd is inside `projects/{slug}/`, also read project READ
22
22
  1. Identify type: entity / concept / comparison / query / summary.
23
23
  2. Set `provenance:`. Default `research`. If in project context: `project` with `provenance_projects: ["[[slug]]"]`.
24
24
  3. Compose the page with citations pre-attached. Reuse existing `raw/` sources where possible.
25
- 4. `npx skillwiki validate <page>`. If non-zero, STOP.
25
+ 4. `skillwiki validate <page>`. If non-zero, STOP.
26
26
  5. Apply writes: page → `index.md` → `log.md`.
27
27
 
28
28
  ## Stop conditions
@@ -23,11 +23,11 @@ Run `skillwiki lang` at the start. Generate page-body prose, narrative sections,
23
23
 
24
24
  ## Steps (in order — N6, N7, N8)
25
25
  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.
26
- 1. **Guard.** For each URL: run `npx skillwiki fetch-guard <url>`. If exit ≠ 0, STOP and surface the error. Do not retry.
26
+ 1. **Guard.** For each URL: run `skillwiki fetch-guard <url>`. If exit ≠ 0, STOP and surface the error. Do not retry.
27
27
  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).
28
- 3. **Hash.** Write the raw file (frontmatter + body). Run `npx skillwiki hash <raw-file>` and embed the result in raw frontmatter `sha256:`.
28
+ 3. **Hash.** Write the raw file (frontmatter + body). Run `skillwiki hash <raw-file>` and embed the result in raw frontmatter `sha256:`.
29
29
  4. **Generate page(s).** Compose typed-knowledge page(s) with citations pre-attached (`^[raw/...]` markers).
30
- 5. **Validate.** For each generated page: run `npx skillwiki validate <page>`. If exit ≠ 0, STOP — do not write index/log.
30
+ 5. **Validate.** For each generated page: run `skillwiki validate <page>`. If exit ≠ 0, STOP — do not write index/log.
31
31
  6. **Apply writes in order.** raw → page(s) → `index.md` → `log.md`.
32
32
  7. **Confidence flag.** If only one source is cited, set `confidence: low`.
33
33
 
@@ -18,7 +18,7 @@ Standard four reads.
18
18
 
19
19
  0. Resolve vault: `skillwiki path` (record source for context).
20
20
  1. Run `skillwiki lint <vault>`. Read the JSON.
21
- 2. Reason over findings; present grouped by severity with concrete suggested actions per kind.
21
+ 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.
22
22
  3. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
23
23
  4. Append one `log.md` entry summarizing the lint counts (errors/warnings/info).
24
24
 
@@ -20,8 +20,8 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
20
20
  ## Steps
21
21
  0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
22
22
  1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
23
- 2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `npx skillwiki graph build <vault>`.
24
- 3. **Compute overlap.** `npx skillwiki overlap <vault>`.
23
+ 2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
24
+ 3. **Compute overlap.** `skillwiki overlap <vault>`.
25
25
  4. **Score candidates** in prompt using the 4 signals:
26
26
  - Direct wikilink: 3.0×
27
27
  - Source overlap: 4.0× (read from overlap output)
@@ -49,7 +49,8 @@ Rule: every tag on every page MUST appear in this taxonomy. Add new tags here fi
49
49
 
50
50
  - File names: lowercase-hyphenated, no spaces.
51
51
  - Wikilinks in YAML: quoted, `"[[name]]"`. Body wikilinks: unquoted `[[name]]`.
52
- - Citations in body: `^[raw/...]` markers; every entry in `sources:` MUST appear in body.
52
+ - Citations in body: `^[raw/...]` markers at paragraph-end; every entry in `sources:` MUST appear in body and in `## Sources` footer.
53
+ - Legacy inline `^[raw/...]` markers remain valid; `migrate-citations` converts them.
53
54
  - sha256 in `raw/` frontmatter is computed by `skillwiki hash` over body bytes after closing `---`.
54
55
 
55
56
  ## Obsidian Integration