skillwiki 0.8.1-beta.5 → 0.8.1-beta.8

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
@@ -4268,21 +4268,21 @@ function checkVaultStructure(resolvedPath) {
4268
4268
  function checkSkillsInstalled(home, cwd) {
4269
4269
  const srcDir = cwd ? join26(cwd, "packages", "skills") : void 0;
4270
4270
  if (srcDir && existsSync8(srcDir)) {
4271
- const found = findSkillMd(srcDir);
4271
+ const found = findInstalledSkillMd(srcDir);
4272
4272
  if (found.length > 0) {
4273
4273
  return check("pass", "skills_installed", "Skills installed", `${found.length} SKILL.md file(s) found (source)`);
4274
4274
  }
4275
4275
  }
4276
4276
  const plugin = findPlugin(home);
4277
4277
  if (plugin) {
4278
- const found = findSkillMd(plugin.installPath);
4278
+ const found = findInstalledSkillMd(plugin.installPath);
4279
4279
  if (found.length > 0) {
4280
4280
  return check("pass", "skills_installed", "Skills installed", `${found.length} SKILL.md file(s) found (plugin v${plugin.version})`);
4281
4281
  }
4282
4282
  }
4283
4283
  const skillsDir = join26(home, ".claude", "skills");
4284
4284
  if (existsSync8(skillsDir)) {
4285
- const found = findSkillMd(skillsDir);
4285
+ const found = findInstalledSkillMd(skillsDir);
4286
4286
  if (found.length > 0) {
4287
4287
  return check("pass", "skills_installed", "Skills installed", `${found.length} SKILL.md file(s) found (CLI install)`);
4288
4288
  }
@@ -5066,6 +5066,10 @@ function findSkillMd(dir) {
5066
5066
  }
5067
5067
  return results;
5068
5068
  }
5069
+ function findInstalledSkillMd(dir) {
5070
+ const directSkills = findSkillNames(dir).map((name) => join26(dir, name, "SKILL.md"));
5071
+ return directSkills.length > 0 ? directSkills : findSkillMd(dir);
5072
+ }
5069
5073
  function findSkillNames(dir) {
5070
5074
  const results = [];
5071
5075
  let entries;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.8.1-beta.5",
3
+ "version": "0.8.1-beta.8",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "skillwiki": "dist/cli.js"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.8.1-beta.5",
3
+ "version": "0.8.1-beta.8",
4
4
  "skills": "./",
5
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": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skillwiki",
3
- "version": "0.8.1-beta.5",
3
+ "version": "0.8.1-beta.8",
4
4
  "description": "Project-aware Karpathy-style knowledge base for Codex with 18 prompt-only skills backed by the deterministic skillwiki CLI.",
5
5
  "author": {
6
6
  "name": "karlorz",
@@ -17,7 +17,7 @@
17
17
  "obsidian",
18
18
  "karpathy"
19
19
  ],
20
- "skills": "./",
20
+ "skills": "./skills/",
21
21
  "interface": {
22
22
  "displayName": "SkillWiki",
23
23
  "shortDescription": "Project-aware wiki skills for Codex agents",
package/skills/README.md CHANGED
@@ -7,4 +7,6 @@ Prompt-only Markdown skills for Claude Code. Installed via `skillwiki install`.
7
7
  | `wiki-*` | `wiki-init`, `wiki-ingest`, `wiki-query`, `wiki-lint`, `wiki-crystallize`, `wiki-audit` |
8
8
  | `proj-*` | `proj-init`, `proj-work`, `proj-distill`, `proj-decide` |
9
9
 
10
- Each subdirectory holds one `SKILL.md`. No build step.
10
+ Each top-level skill subdirectory holds one canonical `SKILL.md`. The nested
11
+ `skills/<skill>/SKILL.md` tree mirrors those files for Codex plugin discovery;
12
+ keep it byte-for-byte in sync with the canonical top-level files.
@@ -21,7 +21,7 @@ escape_for_json() {
21
21
  }
22
22
 
23
23
  skill_escaped=$(escape_for_json "$skill_content")
24
- session_context="<EXTREMELY_IMPORTANT>\nYou have skillwiki.\n\n**Below is the full content of your 'skillwiki:using-skillwiki' skill - your introduction to the skillwiki skills. For all other skills, use the 'Skill' tool:**\n\n${skill_escaped}\n</EXTREMELY_IMPORTANT>"
24
+ session_context="### Skillwiki Activation\n\nSkillwiki is active for this workspace. Below are the capability guidelines for local reference:\n\n${skill_escaped}"
25
25
 
26
26
  # Uses printf instead of heredoc to work around bash 5.3+ heredoc hang.
27
27
  printf '{\n "hookSpecificOutput": {\n "hookEventName": "SessionStart",\n "additionalContext": "%s"\n }\n}\n' "$session_context"
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@skillwiki/skills",
3
- "version": "0.8.1-beta.5",
3
+ "version": "0.8.1-beta.8",
4
4
  "private": true,
5
5
  "files": [
6
6
  "wiki-*",
7
7
  "proj-*",
8
8
  "using-skillwiki",
9
+ "skills",
9
10
  ".claude-plugin",
10
11
  ".codex-plugin",
11
12
  "hooks",
@@ -0,0 +1,25 @@
1
+ ---
2
+ version: 0.2.1
3
+ name: proj-decide
4
+ description: Write an Architectural Decision Record (ADR). If the decision generalizes, also create a concepts/ page.
5
+ ---
6
+
7
+ # proj-decide
8
+
9
+ ## When to invoke
10
+ - User commits to an architectural decision worth recording for future reference.
11
+
12
+ ## Pre-orientation reads
13
+ Standard four + project context.
14
+
15
+ ## Steps
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`.
17
+ 2. `skillwiki validate <adr>`. If non-zero, STOP.
18
+ 3. **Generalization check.** If the decision applies beyond this project, create a `concepts/` page with `provenance: project` (or `mixed` if research-informed).
19
+ 4. Apply writes: ADR → (optional) concept page → vault `index.md` → vault `log.md` and project `log.md`.
20
+
21
+ ## Stop conditions
22
+ - `validate` non-zero on either page.
23
+
24
+ ## Forbidden
25
+ - Filing the concept page without explicit `provenance:`.
@@ -0,0 +1,55 @@
1
+ ---
2
+ version: 0.2.1
3
+ name: proj-distill
4
+ description: 2-step distillation (E4) — analyze project compound entry, then generate a vault concept page with provenance.
5
+ ---
6
+
7
+ # proj-distill
8
+
9
+ ## When to invoke
10
+ - A project compound entry captures a pattern that generalizes beyond the project.
11
+
12
+ ## Pre-orientation reads
13
+ Standard four + project context.
14
+
15
+ ## Steps (E4 — 2-step pattern)
16
+
17
+ ### Source selection
18
+
19
+ Check `projects/{slug}/compound/` first. If no project context exists, default to `playground`. If empty, fall back to retro
20
+ entries in vault `log.md` (lines matching `## [YYYY-MM-DD] retro`).
21
+
22
+ When reading retros as source material:
23
+ - Collect all retros for the project, focusing on entries with
24
+ `Generalize?: yes`.
25
+ - Group by recurring theme (≥2 occurrences across cycles).
26
+ - Each group becomes a candidate concept outline.
27
+
28
+ 1. **Step 1 — Analyze.** Read the source compound entry + linked work
29
+ items (or retro groups from log.md). Output a candidate concept
30
+ outline. STOP if no clear universal pattern is found — surface the
31
+ reasoning instead of forcing a page.
32
+ 2. **Step 2 — Generate.** Compose the vault concept page with
33
+ `provenance: project` and
34
+ `provenance_projects: ["[[slug]]"]`. Validate with
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.
42
+ 3. **Backlink.** Set `promoted_to: "[[concept-slug]]"` on the source
43
+ compound entry. For retro-sourced distillation, skip backlink (log.md
44
+ entries are append-only) and instead add `sources:` citing the vault
45
+ log with date range.
46
+ 4. **Apply writes in order.** Vault concept page → backlink update →
47
+ project `log.md` → vault `index.md` → vault `log.md`.
48
+
49
+ ## Stop conditions
50
+ - No clear universal pattern.
51
+ - `validate` non-zero on either page.
52
+
53
+ ## Forbidden
54
+ - Skipping Step 1 (no direct generation).
55
+ - Updating index/logs before `validate` passes.
@@ -0,0 +1,30 @@
1
+ ---
2
+ version: 0.2.1
3
+ name: proj-init
4
+ description: Bootstrap a project workspace at projects/{slug}/ with README, requirements/, architecture/, work/, compound/.
5
+ ---
6
+
7
+ # proj-init
8
+
9
+ ## When to invoke
10
+ - User starts a new project that should live inside the vault.
11
+
12
+ ## Pre-orientation reads
13
+ Standard four reads (vault SCHEMA, index, log) — no project context yet.
14
+
15
+ ## Inputs
16
+ - Slug (lowercase, hyphenated).
17
+ - One-line intent.
18
+
19
+ ## Steps
20
+ 1. Verify `projects/{slug}/` does not exist.
21
+ 2. Create folders: `projects/{slug}/{requirements,architecture,work,compound}/`.
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`.
23
+ 4. Update vault `index.md` "Projects" section: add `- [[projects/{slug}]]`.
24
+ 5. Append vault `log.md` entry: "Project {slug} initialized."
25
+
26
+ ## Stop conditions
27
+ - `projects/{slug}/` already exists.
28
+
29
+ ## Forbidden
30
+ - Modifying any other project's files.
@@ -0,0 +1,69 @@
1
+ ---
2
+ version: 0.2.2
3
+ name: proj-work
4
+ description: Open or run a work item under projects/{slug}/work/YYYY-MM-DD-{slug}/. Redirects brainstorming/writing-plans output paths.
5
+ ---
6
+
7
+ # proj-work
8
+
9
+ ## When to invoke
10
+ - User starts a feature, issue, refactor, or decision inside an existing project.
11
+ - User asks to "get work of X" or "run work item Y" to review/execute an existing item.
12
+ - Brainstorming or writing-plans skills would otherwise default-write outside the project tree.
13
+ - If no project context can be determined, default to the `playground` slug so redirect paths always emit and the PRD bridge chain works.
14
+
15
+ ## Pre-orientation reads
16
+ Standard four + project context (project README, last ~5 work logs).
17
+
18
+ ## Executing an Existing Work Item
19
+
20
+ When the user asks to "get work of X" or "run work item Y" for review, you are in EXECUTION mode — not creation mode. Steps:
21
+
22
+ 1. **Resolve the work folder** at `<vault>/projects/{slug}/work/{YYYY-MM-DD-<slug>}/`. If the vault root isn't obvious, run `skillwiki path`.
23
+ 2. **Read spec.md and tasks.md** in full. The spec defines scope; tasks define the review checklist.
24
+ 3. **Verify every "DONE" claim against disk.** This is critical — previous sessions routinely mark items DONE in the wiki without actually applying the fix. For each claimed-complete task:
25
+ - Check file existence, content, config values on disk
26
+ - Cross-reference crontab entries, script timeouts, Makefile targets
27
+ - Trust nothing in the wiki alone — validate
28
+ 4. **Apply missing fixes**, then update the work item with accurate post-fix status.
29
+ 5. **Set `status: complete`** when all fixes are verified.
30
+
31
+ ## Creating a New Work Item
32
+ 1. Determine `kind:` (feature | issue | refactor | decision) and slug.
33
+ 2. Create folder `projects/{slug}/work/YYYY-MM-DD-{work-slug}/`.
34
+ 3. Override default output paths for any nested skill: `spec.md`, `plan.md`, and `log.md` are written here, not at vault root.
35
+ 4. Validate work-item frontmatter via `skillwiki validate <spec.md>`. If non-zero, STOP.
36
+ 5. Manage status transitions: `planned` → `in-progress` → `completed` (set `completed:` date) or `abandoned`.
37
+ 6. Append vault `log.md` entry on creation and on each status transition.
38
+
39
+ ## Redirect Output
40
+
41
+ After step 3 (output path override), emit redirect paths for the active PRD skill:
42
+
43
+ > Work item created: projects/{slug}/work/YYYY-MM-DD-{work-slug}/
44
+ >
45
+ > Redirect paths for PRD skills:
46
+ > spec -> <vault-root>/projects/{slug}/work/YYYY-MM-DD-{work-slug}/spec.md
47
+ > plan -> <vault-root>/projects/{slug}/work/YYYY-MM-DD-{work-slug}/plan.md
48
+ >
49
+ > Pass these paths to your PRD skill (superpowers:brainstorming, superpowers:writing-plans,
50
+ > CodeStable, or any other). Files land in the vault natively — no separate ingest needed.
51
+
52
+ Rules:
53
+ - Emit redirect paths as the first output after folder creation, before any PRD skill runs.
54
+ - Resolve `<vault-root>` via `skillwiki path` (never hardcode).
55
+ - proj-work does NOT invoke any PRD skill — it provides paths only.
56
+ - If the PRD skill cannot accept custom save paths, fall back to manual `wiki-ingest`.
57
+
58
+ ## Pitfalls
59
+ - **Wiki-as-truth fallacy**: tasks.md status markers are aspirational claims by previous sessions. They are often wrong. Always audit the actual file system before accepting a "DONE" label.
60
+ - **Re-marking without doing**: do not simply re-write tasks.md to say DONE without applying the corresponding fix. The next session will find the same gap.
61
+
62
+ ## Stop conditions
63
+ - `validate` non-zero.
64
+ - Conflicting work folder name.
65
+
66
+ ## Forbidden
67
+ - Writing spec/plan files outside the work folder.
68
+ - Marking `status: completed` without a `completed:` date.
69
+ - Accepting tasks.md status labels without independent disk verification.
@@ -0,0 +1,157 @@
1
+ ---
2
+ version: 0.2.2
3
+ name: using-skillwiki
4
+ description: Invoke at session start or when knowledge-base tasks arise — maps skillwiki skills, dev-loop alignment, and PRD/TDD routing with plan-mode gate checks
5
+ ---
6
+ *Note: If executing as a background subagent, skip this skill section.*
7
+
8
+ # using-skillwiki
9
+ You have skillwiki — a project-aware Karpathy-style knowledge base for Claude Code.
10
+
11
+ ## Last Hook Gate (SessionStart)
12
+
13
+ This skill is activated by the plugin during `startup|clear|compact` lifecycle events.
14
+ Use this section as procedural planning guidelines:
15
+
16
+ 1. If the task requires spec/plan work, route through PRD skills (not built-in plan mode).
17
+ 2. If `prd_layer` is `superpowers` or `tdd`, ensure `EnterPlanMode` is gated (`wiki-gate-plan-mode on` or `status` if uncertain).
18
+ 3. If `prd_layer` is `manual` or `none`, do not force the gate; follow project policy.
19
+ 4. Always apply the PRD bridge: spec/plan outputs go to vault work-item paths, never `docs/superpowers/`.
20
+
21
+ ## When to Use These Skills
22
+ Invoke a skillwiki skill when the user:
23
+ - Wants to create, build, or start a vault/wiki/knowledge base
24
+ - Mentions ingesting sources, reading URLs into notes, converting content
25
+ - Asks to search, query, or find information in their vault
26
+ - Wants a health check or lint on their vault
27
+ - Mentions crystallizing a session into a note
28
+ - Talks about project workspaces, ADRs, or distillation
29
+ - Wants to quickly capture an idea, bug, task, or note without interrupting their workflow
30
+ - Wants to archive or clean up old vault pages
31
+ - Needs to detect source drift or re-ingest updated content
32
+ - Has a spec/plan in a non-skillwiki format (CodeStable, RFC, AIDE)
33
+ - Asks about their skillwiki configuration or setup health
34
+ - Wants to sync vault changes to/from a git remote
35
+ - Wants to visualize the vault graph as an Obsidian Canvas
36
+ - Wants to run a research scan of repo and vault health
37
+
38
+ ## Vault Structure
39
+ A skillwiki vault has three layers. The canonical architecture lives in `SCHEMA.md` at the vault root — read it before creating any new directories.
40
+ **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.
41
+ ```
42
+ raw/
43
+ ├── articles/ # Web articles, clippings
44
+ ├── papers/ # PDFs, arxiv papers
45
+ ├── transcripts/ # Meeting notes, interviews, ad-hoc captures
46
+ └── assets/ # Images, diagrams referenced by sources
47
+ ```
48
+ Raw frontmatter:
49
+ ```yaml
50
+ ---
51
+ source_url: https://…
52
+ ingested: YYYY-MM-DD
53
+ sha256: # computed by skillwiki hash over body bytes after closing ---
54
+ ---
55
+ ```
56
+ **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
+ **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).
58
+ **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.
59
+ ### Ad-hoc capture: three entry points
60
+ | Entry | When | What happens |
61
+ |-------|------|-------------|
62
+ | `/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
+ | 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
+ | Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
65
+
66
+ ## Skill Map
67
+ | Skill | When to Invoke |
68
+ |-------|----------------|
69
+ | `wiki-init` | Bootstrap a new vault — SCHEMA.md, index.md, log.md, ~/.skillwiki/.env |
70
+ | `wiki-ingest` | Convert URLs, files, or pasted text into typed-knowledge pages |
71
+ | `wiki-query` | Search the vault and synthesize an answer with ranked results |
72
+ | `wiki-lint` | Vault health check (stale pages, oversized pages, log rotation) |
73
+ | `wiki-crystallize` | Distill the current working session into a typed-knowledge page |
74
+ | `wiki-audit` | Verify raw provenance references and source frontmatter integrity |
75
+ | `wiki-archive` | Archive a typed-knowledge page — move to `_archive/`, remove from index |
76
+ | `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
77
+ | `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes into `raw/transcripts/` without leaving the current workflow |
78
+ | `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
79
+ | `proj-init` | Bootstrap a project workspace (README, requirements, architecture) |
80
+ | `proj-work` | Open or run a work item under a project's work/ directory |
81
+ | `proj-distill` | Distill project compound entries into vault concept pages |
82
+ | `wiki-sync` | Safely sync vault git repository — push/pull with lint guards and conflict resolution |
83
+ | `wiki-canvas` | Generate Obsidian Canvas visualization from vault graph data |
84
+ | `proj-decide` | Write an Architectural Decision Record (ADR) |
85
+ | `wiki-gate-plan-mode` | Toggle EnterPlanMode gating — force superpowers planning instead of built-in plan mode |
86
+ | `dev-loop:research` | Research agent for dev-loop IDLE — scans repo + vault health, outputs prioritized work-item recommendations (formerly `/dev-loop-research`) |
87
+
88
+ ## dev-loop Alignment
89
+
90
+ Use these skills as the knowledge layer in dev-loop. The loop remains capability-based:
91
+ branch on capabilities (`BACKEND_CAPS`, `PRD_CAPS`), not backend names.
92
+
93
+ Typical sequence with PRD enabled:
94
+ `REFRESH → QUERY → WORK → SPEC → PLAN → EXECUTE → SIMPLIFY → MERGE → SAVE → RETRO`.
95
+
96
+ - `QUERY/WORK/SAVE/RETRO` map naturally to `wiki-query`, `proj-work`, `wiki-crystallize`, and vault logs.
97
+ - `SIMPLIFY` is a quality gate before merge; keep it in the loop even for small changes.
98
+ - For no-work cycles, run maintenance (`wiki-lint`, `wiki-audit`, `proj-distill`, `dev-loop:research`).
99
+
100
+ ## PRD/TDD Compatibility
101
+
102
+ Use `prd_layer` + `prd_pipeline` from `.claude/dev-loop.config.md` as source of truth:
103
+
104
+ - `superpowers` + `full`: brainstorming/spec/plan/execute/review; route spec+plan through `proj-work`.
105
+ - `tdd` + `tdd-first`: plan-first then test-driven execute; still route artifacts through `proj-work`.
106
+ - `single-pass` or `debug-only`: may skip formal spec/plan, but if generated they still belong in vault work items.
107
+ - `manual` / `none`: no forced PRD skills; preserve skillwiki logging and provenance discipline.
108
+
109
+ ## CLI Backbone
110
+ 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.
111
+ Key CLI subcommands: `init`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `graph build`, `archive`, `drift`, `compound`, `tag-sync`, `sync status`, `seed`, `stale`, `observe`, `canvas generate`.
112
+ Run `skillwiki doctor` to diagnose setup issues. Run `skillwiki config list` to see current configuration.
113
+
114
+ ## Typical Workflow
115
+ 1. **Init** (`wiki-init`) — create vault, set domain and taxonomy
116
+ 2. **Ingest** (`wiki-ingest`) — add sources, build pages
117
+ 3. **Query** (`wiki-query`) — search and synthesize answers
118
+ 4. **Lint** (`wiki-lint`) — periodic health checks
119
+ 5. **Crystallize** (`wiki-crystallize`) — save session insights as pages
120
+ 6. **Audit** (`wiki-audit`) — verify source integrity
121
+ For longer-running project work, use `proj-init` → `proj-work` → `proj-distill` / `proj-decide`.
122
+ Maintenance: **Archive** (`wiki-archive`) superseded pages, **Drift** (`wiki-reingest`) to detect stale sources, **Adapter** (`wiki-adapter-prd`) for foreign PRD format ingestion.
123
+
124
+ ## Troubleshooting Version Drift
125
+ skillwiki has three distribution channels that can drift:
126
+ | Channel | Location | Update Command |
127
+ |---------|----------|----------------|
128
+ | npm CLI | `/usr/local/bin/skillwiki` | `npm install -g skillwiki@latest` |
129
+ | npm skills | `/usr/local/lib/node_modules/skillwiki/skills/` | `skillwiki install` (copies to `~/.claude/skills/`) |
130
+ | Claude plugin | `~/.claude/plugins/cache/llm-wiki/` | `claude plugin update skillwiki@llm-wiki` |
131
+ | Local git dev | `~/.hermes/skills/llm-wiki/` | `npm link ./packages/cli` (from repo root) |
132
+ **Check versions:** `skillwiki doctor` reports "Plugin/CLI version" mismatch warnings.
133
+ **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.
134
+ **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.
135
+
136
+ ## Multi-Wiki Profiles
137
+ skillwiki supports named wiki profiles for working with multiple vaults. Set `WIKI_DEFAULT` to control which wiki all skills target by default.
138
+ **Manage profiles:**
139
+ - `skillwiki config set wiki.<name>.path <dir>` — register a profile
140
+ - `skillwiki config set default <name>` — set active profile
141
+ - `skillwiki config list --profiles` — list all profiles
142
+ - `skillwiki --wiki <name> lint` — override per-command
143
+ **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.
144
+
145
+ ## PRD Bridge — Redirect Spec/Plan Output to Vault
146
+ 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 PRD and TDD workflows (superpowers, codestable, AIDE, Hermes, manual templates).
147
+ **Rule:** Before a PRD skill writes a spec or plan file, redirect its save path:
148
+ 1. Resolve the vault path: `skillwiki path`
149
+ 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
150
+ 3. Create or locate the work item via `proj-work`, which emits redirect paths for `spec.md` and `plan.md`
151
+ 4. Pass those vault paths to the PRD/TDD skill as its save location
152
+ **Concrete overrides for superpowers:**
153
+ - `superpowers:brainstorming` step 6: override `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` → vault work-item `spec.md` path from `proj-work`
154
+ - `superpowers:writing-plans` header: override `docs/superpowers/plans/YYYY-MM-DD-<feature-name>.md` → vault work-item `plan.md` path from `proj-work`
155
+ Both skills say "User preferences for spec location override this default" — the vault work-item path IS the override. Apply the same override pattern to any TDD-oriented planner that emits spec/plan artifacts.
156
+ **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.
157
+ **Never create `docs/superpowers/` in any repo.**
@@ -0,0 +1,88 @@
1
+ ---
2
+ version: 0.2.1
3
+ name: wiki-adapter-prd
4
+ description: Map foreign PRD formats (CodeStable, RFCs, structured markdown) into skillwiki raw + typed-knowledge pages.
5
+ ---
6
+
7
+ # wiki-adapter-prd
8
+
9
+ ## When This Skill Activates
10
+
11
+ - User provides a document or URL in a non-skillwiki PRD format and wants it captured in the vault.
12
+ - User mentions CodeStable, RFC, AIDE, or another structured design document format.
13
+ - A foreign spec/plan needs to be normalized into the vault's raw + concept structure.
14
+
15
+ ## Output language
16
+
17
+ Run `skillwiki lang` at the start. Generate page prose in the resolved language. Frontmatter keys, file names, and structural markers stay English.
18
+
19
+ ## Pre-orientation reads
20
+
21
+ Standard four reads (SCHEMA, index, log, project context if applicable).
22
+
23
+ ## Recognized PRD Formats
24
+
25
+ | Format | Structural cues |
26
+ |--------|----------------|
27
+ | CodeStable | `REQ-NNN` requirement IDs, `## Requirements` / `## Architecture` headers |
28
+ | RFC | `## Motivation` / `## Proposal` / `## Drawbacks` headers |
29
+ | AIDE directives | Specific YAML frontmatter keys (`aide-*`) |
30
+ | Hermes spec | `N1`–`N18` normative requirement markers |
31
+ | Generic structured | Clear `##` section hierarchy with requirements, decisions, or designs |
32
+
33
+ If the format is unrecognized, treat as generic structured markdown and map by section hierarchy.
34
+
35
+ ## Mapping Strategy
36
+
37
+ ### Raw capture (verbatim)
38
+
39
+ - Write the full source document to `raw/articles/<slug>.md` with RawSourceSchema frontmatter (`sha256`, `source_url`, `ingested`, `ingested_by: "wiki-ingest"`).
40
+ - If the source is a URL, run `skillwiki fetch-guard <url>` first.
41
+ - Run `skillwiki hash <raw-file>` to compute sha256.
42
+
43
+ ### Knowledge extraction
44
+
45
+ Map source sections to typed-knowledge pages:
46
+
47
+ | Source section | Target type | Notes |
48
+ |----------------|-------------|-------|
49
+ | Requirements list | `concepts/` or `entities/` | Each major requirement becomes its own page or a section in a compound page |
50
+ | Architecture decisions | `concepts/` | Map to concept pages with `tags: [architecture]` |
51
+ | Motivation / context | `entities/` | Capture as entity pages describing the system or component |
52
+ | Trade-offs / comparisons | `comparisons/` | Create comparison pages when the source weighs alternatives |
53
+ | Action items / next steps | Skip | Not knowledge — track in project work items instead |
54
+
55
+ ### Cross-reference handling
56
+
57
+ - Requirement IDs (`REQ-NNN`, `N1`–`N18`) → preserve as frontmatter tags or inline references.
58
+ - Internal links within the source → convert to `[[wikilinks]]` where corresponding pages exist.
59
+ - External URLs → keep as-is in body text.
60
+
61
+ ## Steps
62
+
63
+ 0. Resolve vault and language: `skillwiki path` and `skillwiki lang`.
64
+ 1. Classify the input format using the structural cues above.
65
+ 2. If URL source: run `skillwiki fetch-guard <url>`, then fetch.
66
+ 3. Write raw capture: frontmatter + full body → `raw/articles/<slug>.md`.
67
+ 4. Run `skillwiki hash <raw-file>`, embed sha256.
68
+ 5. Generate typed-knowledge pages following the mapping strategy.
69
+ 6. For each page: run `skillwiki validate <page>`. If any fails, STOP.
70
+ 7. Write pages, then update `index.md` and `log.md`.
71
+
72
+ ## Provenance defaults
73
+
74
+ - `provenance: research` (external PRD sources).
75
+ - `sources: ["^[raw/articles/<slug>.md]"]` on every generated page.
76
+
77
+ ## Stop conditions
78
+
79
+ - `fetch-guard` non-zero.
80
+ - `validate` non-zero on any page.
81
+ - sha256 already exists for the same source (skip — already ingested).
82
+
83
+ ## Forbidden
84
+
85
+ - Skipping `fetch-guard` for URL sources.
86
+ - Writing index/log before all pages validate.
87
+ - Modifying existing raw files (N9).
88
+ - Auto-generating pages for action items, timelines, or process steps — those are project management, not knowledge.
@@ -0,0 +1,102 @@
1
+ ---
2
+ version: 0.2.2
3
+ name: wiki-add-task
4
+ description: Capture ad-hoc ideas, bugs, tasks, or notes into the vault with ad-hoc capture frontmatter and descriptive filenames.
5
+ ---
6
+ # wiki-add-task
7
+ Capture ad-hoc ideas, bugs, tasks, and notes into the vault. Three entry points depending on where you are:
8
+ | Entry | When | What happens |
9
+ |-------|------|-------------|
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
+ | Filesystem drop | Hermes Agent compact mode (no slash commands available) | Same as above — create `.md` in `raw/transcripts/`, dev-loop discovers it |
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 |
13
+ | Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
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.
23
+ ## When This Skill Activates
24
+ - User invokes `/wiki-add-task` with a description.
25
+ - User says "add task", "capture this", "note this", "remember this", "log this idea", or similar.
26
+ - User provides a short text description and optionally a type tag.
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.
28
+ ## Output language
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.
30
+ ## Steps
31
+ 0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
32
+ 1. **Parse arguments.** Extract from the user's message:
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`)
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.
37
+ 3. **Write frontmatter.** Create the file with ad-hoc capture frontmatter:
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.
51
+ 4. **Write body.** Below the frontmatter, write:
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
+ 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).
62
+ 6. **Update log.md.** Append: `## [YYYY-MM-DD] capture | [type]: [text (first 60 chars)]`
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
+ ## Capture file format
69
+ Each capture is a standalone file with ad-hoc capture frontmatter:
70
+ ```yaml
71
+ ---
72
+ source_url:
73
+ ingested: 2026-05-08
74
+ kind: idea
75
+ project: "[[llm-wiki]]"
76
+ ---
77
+ # idea: Fix the template mismatch
78
+ Fix the template mismatch between wiki-add-task and the vault template.
79
+ ```
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).
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`).
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.
83
+ ## Stop conditions
84
+ - `skillwiki path` returns NO_VAULT_CONFIGURED.
85
+ - No `text` provided (prompt user once, then stop).
86
+ - Target file already exists (use a different slug or add a suffix).
87
+ ## Forbidden
88
+ - Creating an `inbox/` directory. All captures go to `raw/transcripts/`.
89
+ - Appending to existing capture files — each capture gets its own file.
90
+ - Creating a work item — this is capture-only. Use `proj-work` for full work items.
91
+ - Writing to any Layer 2 or Layer 3 location. Captures are Layer 1 (raw).
92
+ ## Filesystem drop (offline capture)
93
+ When you're not in a Claude session, drop files directly into `raw/transcripts/`:
94
+ 1. Create a `.md` file in `raw/transcripts/` — name it descriptively (e.g., `2026-05-08-idea-fix-template.md`)
95
+ 2. Use ad-hoc capture frontmatter: `source_url:`, `ingested:`, `kind:`, and optionally `project:`
96
+ 3. Write your idea/bug/task/note below the frontmatter
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.
98
+ ## Dev-loop discovery
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)
101
+ - Ingest as a knowledge page via `wiki-ingest` (for ideas with sources)
102
+ - Leave in place (for notes that don't need action yet)