skillwiki 0.10.49 → 0.10.51
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-F7LXKP4T.js → chunk-3IBRZTLF.js} +2309 -1398
- package/dist/{chunk-UHZBOOMK.js → chunk-74OSLCXE.js} +1 -1
- package/dist/{chunk-PLUHIOCQ.js → chunk-GAHMWLWU.js} +174 -175
- package/dist/chunk-HBQTTYXZ.js +1045 -0
- package/dist/{chunk-EVQASYII.js → chunk-IJ7DD7QZ.js} +59 -0
- package/dist/{chunk-GAU4D25O.js → chunk-O3HCB7R2.js} +2 -2
- package/dist/{chunk-FXASPB3C.js → chunk-UPQ6XJSV.js} +1964 -1285
- package/dist/cli.js +2391 -1789
- package/dist/{index-projection-BJNZUPH6.js → index-projection-EXBX32RR.js} +3 -3
- package/dist/{managed-write-preflight-H7KVK2KI.js → managed-write-preflight-7GDFRPUT.js} +4 -4
- package/dist/skillwiki-mcp.js +7 -6
- package/dist/sources-BFYEFTS4.js +9 -0
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +2 -2
- package/skills/.codex-plugin/plugin.json +3 -3
- package/skills/README.md +1 -1
- package/skills/agents/wiki-ingest.md +2 -0
- package/skills/package.json +1 -1
- package/skills/skills/using-skillwiki/SKILL.md +4 -1
- package/skills/skills/wiki-freshness-repair/SKILL.md +94 -0
- package/skills/skills/wiki-ingest/SKILL.md +8 -0
- package/skills/skills/wiki-query/SKILL.md +1 -1
- package/skills/using-skillwiki/SKILL.md +4 -1
- package/skills/wiki-freshness-repair/SKILL.md +94 -0
- package/skills/wiki-ingest/SKILL.md +8 -0
- package/skills/wiki-query/SKILL.md +1 -1
- package/dist/chunk-QNSD72FH.js +0 -466
- package/dist/sources-CMV5DKS5.js +0 -9
|
@@ -4,9 +4,9 @@ import {
|
|
|
4
4
|
UNMANAGED_START,
|
|
5
5
|
renderRootIndex,
|
|
6
6
|
writeRootIndexProjection
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-O3HCB7R2.js";
|
|
8
|
+
import "./chunk-74OSLCXE.js";
|
|
9
|
+
import "./chunk-IJ7DD7QZ.js";
|
|
10
10
|
export {
|
|
11
11
|
UNMANAGED_END,
|
|
12
12
|
UNMANAGED_START,
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runManagedWritePreflight,
|
|
4
4
|
runManagedWriteTransaction
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-UPQ6XJSV.js";
|
|
6
|
+
import "./chunk-74OSLCXE.js";
|
|
7
|
+
import "./chunk-GAHMWLWU.js";
|
|
8
|
+
import "./chunk-IJ7DD7QZ.js";
|
|
9
9
|
export {
|
|
10
10
|
runManagedWritePreflight,
|
|
11
11
|
runManagedWriteTransaction
|
package/dist/skillwiki-mcp.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runSkillwikiMcpStdio
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-3IBRZTLF.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-O3HCB7R2.js";
|
|
7
|
+
import "./chunk-UPQ6XJSV.js";
|
|
8
|
+
import "./chunk-74OSLCXE.js";
|
|
9
|
+
import "./chunk-HBQTTYXZ.js";
|
|
10
|
+
import "./chunk-GAHMWLWU.js";
|
|
11
|
+
import "./chunk-IJ7DD7QZ.js";
|
|
11
12
|
|
|
12
13
|
// src/mcp-entry.ts
|
|
13
14
|
runSkillwikiMcpStdio().catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.51",
|
|
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: 20 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"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"description": "Project-aware Karpathy-style knowledge base for Codex with
|
|
3
|
+
"version": "0.10.51",
|
|
4
|
+
"description": "Project-aware Karpathy-style knowledge base for Codex with 20 prompt-only skills backed by the deterministic skillwiki CLI.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "karlorz",
|
|
7
7
|
"url": "https://github.com/karlorz"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"interface": {
|
|
23
23
|
"displayName": "SkillWiki",
|
|
24
24
|
"shortDescription": "Project-aware wiki skills for Codex agents",
|
|
25
|
-
"longDescription": "
|
|
25
|
+
"longDescription": "20 prompt-only skills (wiki-*, proj-*, using-skillwiki) for deterministic, project-aware knowledge workflows.",
|
|
26
26
|
"developerName": "karlorz",
|
|
27
27
|
"category": "Productivity",
|
|
28
28
|
"capabilities": [
|
package/skills/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Prompt-only Markdown skills for Claude Code. Installed via `skillwiki install`
|
|
4
4
|
or the Claude/Codex/Antigravity plugin packaging paths.
|
|
5
5
|
|
|
6
|
-
Current package inventory: **
|
|
6
|
+
Current package inventory: **20 skills**.
|
|
7
7
|
|
|
8
8
|
Publication policy: new or updated typed-knowledge and meta pages must use
|
|
9
9
|
`skillwiki page publish` from a temporary draft, inspect its dry-run, and add
|
|
@@ -63,11 +63,13 @@ Return:
|
|
|
63
63
|
- `skillwiki ingest` returns nonzero; retain any raw-only result for retry
|
|
64
64
|
- sha256 already exists in vault (skip, don't duplicate)
|
|
65
65
|
- Source or generated content contains unredacted live credentials or other authenticating secrets
|
|
66
|
+
- The source is already a pending raw article/paper. Do not call `skillwiki ingest` again and do not drain `sources compile` from this maintenance agent. Report the path for an attended interactive session.
|
|
66
67
|
|
|
67
68
|
**Forbidden:**
|
|
68
69
|
- Skipping `fetch-guard` for URL sources
|
|
69
70
|
- Creating a final typed page or editing index.md/log.md directly
|
|
70
71
|
- Modifying existing raw files (N9)
|
|
72
|
+
- Unattended `sources compile claim` / `published` / `review` writes (interactive only)
|
|
71
73
|
- Writing `[[wikilinks]]` to nonexistent pages — verify first
|
|
72
74
|
- Writing raw ephemeral data to cloud-mounted wiki paths
|
|
73
75
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault
|
package/skills/package.json
CHANGED
|
@@ -127,6 +127,8 @@ Also mirror these pointers in vault-presync / vault-sync-status skills when oper
|
|
|
127
127
|
- typed pages: `skillwiki page publish <draft> <vault> --target <path>` then the same command with `--write`
|
|
128
128
|
- archive: `skillwiki archive <path> <vault>`
|
|
129
129
|
- pending source inventory: `skillwiki sources pending <vault>`
|
|
130
|
+
- attended compile-turn: `skillwiki sources compile claim|release|published|status`
|
|
131
|
+
- post-compile reviews: `skillwiki sources review` / `skillwiki sources reviews`
|
|
130
132
|
- editorial disposition: `skillwiki sources disposition <exact-raw-path> <vault> ...`
|
|
131
133
|
- exceptional raw disposal: `skillwiki sources dispose <exact-raw-path> <vault> --reason ...` then attended `--write --approve <token>`
|
|
132
134
|
- ad-hoc structural log: `skillwiki log-append <vault> --content '<entry>'` (Release A dual-write) or event materialization (Release B)
|
|
@@ -226,7 +228,8 @@ for code changes.
|
|
|
226
228
|
|
|
227
229
|
## CLI Backbone
|
|
228
230
|
All skills are backed by the `skillwiki` CLI — a deterministic tool with no LLM calls. It handles path resolution, config management, validation, health reporting, and linting. Skills invoke it via Bash for the mechanical parts and use the active agent for the creative parts.
|
|
229
|
-
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `sources pending`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`.
|
|
231
|
+
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`.
|
|
232
|
+
Optional read-only MCP (`skillwiki mcp`) exposes pending/compile/review list tools. Do not use MCP for compile claim, publish, or review writes.
|
|
230
233
|
`skillwiki claim` binds a transcript to a work item only through an exact `raw/transcripts/...` path in `source:` / `sources:` / `closes:`. A `--project` that contradicts the capture's explicit project is rejected. `skillwiki stale --project` uses exact normalized slugs, not substring matching. `skillwiki claims audit` is the read-only integrity report for duplicate, malformed, dangling, cross-project, and unbacked claims; it never rewrites captures or work items.
|
|
231
234
|
|
|
232
235
|
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only. Run `skillwiki config list` to see current configuration.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-freshness-repair
|
|
3
|
+
description: Repair stale vault sources end to end. Consumes skillwiki drift --affected-pages, re-ingests changed sources through wiki-reingest, then republishes the affected typed pages through the page publish approval flow. Attended only; never auto-repairs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki-freshness-repair
|
|
7
|
+
|
|
8
|
+
## When This Skill Activates
|
|
9
|
+
|
|
10
|
+
- A `skillwiki drift --affected-pages` report lists typed pages citing drifted raw sources and the user wants them repaired.
|
|
11
|
+
- User explicitly asks to repair stale sources or refresh pages that cite changed sources.
|
|
12
|
+
- Attended post-drift maintenance; scheduled/headless runs are report-only.
|
|
13
|
+
|
|
14
|
+
## Output language
|
|
15
|
+
|
|
16
|
+
Run `skillwiki lang` at the start. Generate log entries in the resolved language.
|
|
17
|
+
|
|
18
|
+
## Pre-orientation reads
|
|
19
|
+
|
|
20
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
21
|
+
|
|
22
|
+
## Input contract
|
|
23
|
+
|
|
24
|
+
`skillwiki drift --affected-pages [vault]` emits the normal drift report where
|
|
25
|
+
every drifted entry additionally carries `affected_pages: string[]` —
|
|
26
|
+
vault-relative paths of typed pages that cite the drifted raw source (via body
|
|
27
|
+
`^[raw/...]` citation markers and `sources:` frontmatter). An empty array means
|
|
28
|
+
the drifted source has no citing pages: raw-only repair, no republish step.
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
0. Resolve vault: `skillwiki path` and `skillwiki lang`.
|
|
33
|
+
1. Run `skillwiki drift --affected-pages [vault]`. Read the JSON output.
|
|
34
|
+
2. Present findings grouped by status, exactly as wiki-reingest does:
|
|
35
|
+
- **drifted:** source content changed. Show stored vs current sha256 AND the
|
|
36
|
+
`affected_pages` list per source.
|
|
37
|
+
- **identity_conflicts:** STOP and surface; a human chooses the correct
|
|
38
|
+
source/filename pair before any repair.
|
|
39
|
+
- **fetch_failed:** show error details.
|
|
40
|
+
- **unchanged:** no action needed.
|
|
41
|
+
3. Report-only is the default. Present the repair plan: per drifted source, the
|
|
42
|
+
new capture to create and the affected pages that would be republished.
|
|
43
|
+
4. For each drifted source the user explicitly approves:
|
|
44
|
+
a. Follow wiki-reingest steps 5a–5c: create the updated content as a NEW raw
|
|
45
|
+
capture and verify it; preview `skillwiki archive <exact-old-raw-path>`;
|
|
46
|
+
apply only with the live `--apply --approve <token>` flow. Old bytes move
|
|
47
|
+
to `raw/archived/<category>/...` and are never rewritten.
|
|
48
|
+
b. Update maintained citations to the new capture where editorially required.
|
|
49
|
+
c. For each page in that source's `affected_pages`: re-verify the page
|
|
50
|
+
against the new capture. If the page content must change, republish ONLY
|
|
51
|
+
through `skillwiki page publish <draft> <vault> --target <page>`:
|
|
52
|
+
dry-run first, capture the approval token, then `--write --approve
|
|
53
|
+
"$token"` in one shell chain. A stale token fails with APPROVAL_INVALID —
|
|
54
|
+
re-run the dry-run for a fresh token instead of retrying the old one.
|
|
55
|
+
If the publish returns `held: true`, surface the `hold_reasons`
|
|
56
|
+
(schema-invalid, broken-wikilink, citation-marker-missing) to the user
|
|
57
|
+
and stop for that page; never force a held page.
|
|
58
|
+
5. Run `skillwiki audit [vault]` to verify every citation resolves after the
|
|
59
|
+
repairs.
|
|
60
|
+
6. Append a log entry summarizing: scanned, drifted, repaired (new captures),
|
|
61
|
+
archived, pages republished, pages skipped/held.
|
|
62
|
+
|
|
63
|
+
## N9 Compliance
|
|
64
|
+
|
|
65
|
+
Raw files are immutable (N9). Repairs never modify an existing raw file: the
|
|
66
|
+
old raw is preserve-archived and a new raw capture is created with updated
|
|
67
|
+
content and sha256, preserving full provenance history.
|
|
68
|
+
|
|
69
|
+
## Hard boundary (third-harvest program)
|
|
70
|
+
|
|
71
|
+
- This skill is ATTENDED ONLY. Never run repairs from scheduled or headless
|
|
72
|
+
maintenance; those runs stop after step 3 (the report).
|
|
73
|
+
- The third-harvest program shipped this skill with parse-only validation
|
|
74
|
+
against a dry-run `drift --affected-pages` report. Zero live repairs were
|
|
75
|
+
performed as part of program delivery; the first real repair run happens
|
|
76
|
+
only when the user invokes this skill attended.
|
|
77
|
+
|
|
78
|
+
## Stop conditions
|
|
79
|
+
|
|
80
|
+
- `skillwiki drift` returns a non-zero exit code other than DRIFT_DETECTED.
|
|
81
|
+
- User declines all repair actions.
|
|
82
|
+
- A source is listed under `identity_conflicts` (needs a human decision first).
|
|
83
|
+
- Page publish dry-run fails or the publish returns held (surface, do not
|
|
84
|
+
force).
|
|
85
|
+
|
|
86
|
+
## Forbidden
|
|
87
|
+
|
|
88
|
+
- Modifying files in `raw/` directly (N9).
|
|
89
|
+
- Repairing any source without explicit per-source user approval.
|
|
90
|
+
- Writing or editing typed pages directly — always the page publish flow.
|
|
91
|
+
- Retrying `--write --approve` with a stale approval token.
|
|
92
|
+
- Running raw structural apply from scheduled or headless maintenance.
|
|
93
|
+
- Re-ingesting a source whose fetched content contains live credentials or
|
|
94
|
+
other authenticating secrets (stop and ask, per wiki-reingest).
|
|
@@ -34,6 +34,14 @@ Run `skillwiki lang` at the start. Generate page-body prose, narrative sections,
|
|
|
34
34
|
6. **Feature-detect publication.** Run `skillwiki page publish --help`. If unavailable, fail closed and leave typed output unpublished; update the active SkillWiki CLI/plugin channel first.
|
|
35
35
|
7. **Ingest and publish.** Use `skillwiki ingest` for deterministic source capture and typed-page publication. The command writes an immutable raw source first and delegates the typed page, taxonomy, index, and structural log entry to the shared page publisher. Supply the resolved vault, type, title, tags, and provenance through the command options.
|
|
36
36
|
8. **Recovery.** Never create the final typed page or edit index.md/log.md directly. A raw-only result after publication failure is valid recovery state. Keep the exact command inputs and retry; do not delete or overwrite the raw source.
|
|
37
|
+
9. **Pending-compile path** (raw already exists; clipper / `sources pending`). Do **not** run `skillwiki ingest` again — that would create a second raw object. Interactive sessions only:
|
|
38
|
+
1. `skillwiki sources pending [vault]`
|
|
39
|
+
2. `skillwiki sources compile claim <raw-path> [vault] --reason "<why>"` then the same command with `--write --approve <token>`
|
|
40
|
+
3. Read the raw; compose unpublished drafts **outside** the vault
|
|
41
|
+
4. `skillwiki page publish` each typed page
|
|
42
|
+
5. `skillwiki sources compile published <raw-path> [vault] --pages "<typed/a.md,typed/b.md>" --reason "<why>"` then `--write --approve <token>`
|
|
43
|
+
6. Leave the review `open` unless the human resolves it with `skillwiki sources review <raw-path> --status accepted|needs-fix|dismissed --reason "<why>"`
|
|
44
|
+
Goal, satellite, and headless sessions may list pending / compile status / reviews but must not claim or publish compile turns.
|
|
37
45
|
## Provenance defaults
|
|
38
46
|
- Default `provenance: research`.
|
|
39
47
|
- If cwd is inside `projects/{slug}/`, set `provenance: project` and add `provenance_projects: ["[[slug]]"]`.
|
|
@@ -13,7 +13,7 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
13
13
|
## Steps
|
|
14
14
|
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
15
15
|
1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
|
|
16
|
-
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures.
|
|
16
|
+
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures. Default ranking is 4-signal only. Optional `skillwiki query "<text>" --hybrid` RRF-fuses that ranking with a rebuildable TF-IDF cache (`skillwiki vectors rebuild`); if the cache is missing, stop and rebuild instead of silently falling back.
|
|
17
17
|
- Explicit freshness language — `new`, `recent`, `fresh`, `clipped`, `raw`, `pending`, `undigested`, `unprocessed`, `not yet ingested`, or `not yet integrated` — requests the pending evidence channel. Run `skillwiki sources pending [vault]` for inventory and `skillwiki query "<text>" [vault] --include-pending` for synthesis support.
|
|
18
18
|
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
19
19
|
3. **Compute overlap.** `skillwiki overlap <vault>`.
|
|
@@ -127,6 +127,8 @@ Also mirror these pointers in vault-presync / vault-sync-status skills when oper
|
|
|
127
127
|
- typed pages: `skillwiki page publish <draft> <vault> --target <path>` then the same command with `--write`
|
|
128
128
|
- archive: `skillwiki archive <path> <vault>`
|
|
129
129
|
- pending source inventory: `skillwiki sources pending <vault>`
|
|
130
|
+
- attended compile-turn: `skillwiki sources compile claim|release|published|status`
|
|
131
|
+
- post-compile reviews: `skillwiki sources review` / `skillwiki sources reviews`
|
|
130
132
|
- editorial disposition: `skillwiki sources disposition <exact-raw-path> <vault> ...`
|
|
131
133
|
- exceptional raw disposal: `skillwiki sources dispose <exact-raw-path> <vault> --reason ...` then attended `--write --approve <token>`
|
|
132
134
|
- ad-hoc structural log: `skillwiki log-append <vault> --content '<entry>'` (Release A dual-write) or event materialization (Release B)
|
|
@@ -226,7 +228,8 @@ for code changes.
|
|
|
226
228
|
|
|
227
229
|
## CLI Backbone
|
|
228
230
|
All skills are backed by the `skillwiki` CLI — a deterministic tool with no LLM calls. It handles path resolution, config management, validation, health reporting, and linting. Skills invoke it via Bash for the mechanical parts and use the active agent for the creative parts.
|
|
229
|
-
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `sources pending`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`.
|
|
231
|
+
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `query`, `vectors rebuild`, `vectors status`, `sources pending`, `sources compile`, `sources review`, `sources reviews`, `sources disposition`, `sources dispose`, `archive`, `remove`, `drift`, `dedup`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `claim`, `claims audit`, `observe`, `canvas generate`, `mcp`.
|
|
232
|
+
Optional read-only MCP (`skillwiki mcp`) exposes pending/compile/review list tools. Do not use MCP for compile claim, publish, or review writes.
|
|
230
233
|
`skillwiki claim` binds a transcript to a work item only through an exact `raw/transcripts/...` path in `source:` / `sources:` / `closes:`. A `--project` that contradicts the capture's explicit project is rejected. `skillwiki stale --project` uses exact normalized slugs, not substring matching. `skillwiki claims audit` is the read-only integrity report for duplicate, malformed, dangling, cross-project, and unbacked claims; it never rewrites captures or work items.
|
|
231
234
|
|
|
232
235
|
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes the nonblocking source-lifecycle backlog. Pending captures are informational and do not make health fail. Run `skillwiki lint <vault> --summary` for lint-only bucket counts with capped examples and details commands. Run `skillwiki doctor` to diagnose setup/runtime issues only. Run `skillwiki config list` to see current configuration.
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: wiki-freshness-repair
|
|
3
|
+
description: Repair stale vault sources end to end. Consumes skillwiki drift --affected-pages, re-ingests changed sources through wiki-reingest, then republishes the affected typed pages through the page publish approval flow. Attended only; never auto-repairs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# wiki-freshness-repair
|
|
7
|
+
|
|
8
|
+
## When This Skill Activates
|
|
9
|
+
|
|
10
|
+
- A `skillwiki drift --affected-pages` report lists typed pages citing drifted raw sources and the user wants them repaired.
|
|
11
|
+
- User explicitly asks to repair stale sources or refresh pages that cite changed sources.
|
|
12
|
+
- Attended post-drift maintenance; scheduled/headless runs are report-only.
|
|
13
|
+
|
|
14
|
+
## Output language
|
|
15
|
+
|
|
16
|
+
Run `skillwiki lang` at the start. Generate log entries in the resolved language.
|
|
17
|
+
|
|
18
|
+
## Pre-orientation reads
|
|
19
|
+
|
|
20
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
21
|
+
|
|
22
|
+
## Input contract
|
|
23
|
+
|
|
24
|
+
`skillwiki drift --affected-pages [vault]` emits the normal drift report where
|
|
25
|
+
every drifted entry additionally carries `affected_pages: string[]` —
|
|
26
|
+
vault-relative paths of typed pages that cite the drifted raw source (via body
|
|
27
|
+
`^[raw/...]` citation markers and `sources:` frontmatter). An empty array means
|
|
28
|
+
the drifted source has no citing pages: raw-only repair, no republish step.
|
|
29
|
+
|
|
30
|
+
## Steps
|
|
31
|
+
|
|
32
|
+
0. Resolve vault: `skillwiki path` and `skillwiki lang`.
|
|
33
|
+
1. Run `skillwiki drift --affected-pages [vault]`. Read the JSON output.
|
|
34
|
+
2. Present findings grouped by status, exactly as wiki-reingest does:
|
|
35
|
+
- **drifted:** source content changed. Show stored vs current sha256 AND the
|
|
36
|
+
`affected_pages` list per source.
|
|
37
|
+
- **identity_conflicts:** STOP and surface; a human chooses the correct
|
|
38
|
+
source/filename pair before any repair.
|
|
39
|
+
- **fetch_failed:** show error details.
|
|
40
|
+
- **unchanged:** no action needed.
|
|
41
|
+
3. Report-only is the default. Present the repair plan: per drifted source, the
|
|
42
|
+
new capture to create and the affected pages that would be republished.
|
|
43
|
+
4. For each drifted source the user explicitly approves:
|
|
44
|
+
a. Follow wiki-reingest steps 5a–5c: create the updated content as a NEW raw
|
|
45
|
+
capture and verify it; preview `skillwiki archive <exact-old-raw-path>`;
|
|
46
|
+
apply only with the live `--apply --approve <token>` flow. Old bytes move
|
|
47
|
+
to `raw/archived/<category>/...` and are never rewritten.
|
|
48
|
+
b. Update maintained citations to the new capture where editorially required.
|
|
49
|
+
c. For each page in that source's `affected_pages`: re-verify the page
|
|
50
|
+
against the new capture. If the page content must change, republish ONLY
|
|
51
|
+
through `skillwiki page publish <draft> <vault> --target <page>`:
|
|
52
|
+
dry-run first, capture the approval token, then `--write --approve
|
|
53
|
+
"$token"` in one shell chain. A stale token fails with APPROVAL_INVALID —
|
|
54
|
+
re-run the dry-run for a fresh token instead of retrying the old one.
|
|
55
|
+
If the publish returns `held: true`, surface the `hold_reasons`
|
|
56
|
+
(schema-invalid, broken-wikilink, citation-marker-missing) to the user
|
|
57
|
+
and stop for that page; never force a held page.
|
|
58
|
+
5. Run `skillwiki audit [vault]` to verify every citation resolves after the
|
|
59
|
+
repairs.
|
|
60
|
+
6. Append a log entry summarizing: scanned, drifted, repaired (new captures),
|
|
61
|
+
archived, pages republished, pages skipped/held.
|
|
62
|
+
|
|
63
|
+
## N9 Compliance
|
|
64
|
+
|
|
65
|
+
Raw files are immutable (N9). Repairs never modify an existing raw file: the
|
|
66
|
+
old raw is preserve-archived and a new raw capture is created with updated
|
|
67
|
+
content and sha256, preserving full provenance history.
|
|
68
|
+
|
|
69
|
+
## Hard boundary (third-harvest program)
|
|
70
|
+
|
|
71
|
+
- This skill is ATTENDED ONLY. Never run repairs from scheduled or headless
|
|
72
|
+
maintenance; those runs stop after step 3 (the report).
|
|
73
|
+
- The third-harvest program shipped this skill with parse-only validation
|
|
74
|
+
against a dry-run `drift --affected-pages` report. Zero live repairs were
|
|
75
|
+
performed as part of program delivery; the first real repair run happens
|
|
76
|
+
only when the user invokes this skill attended.
|
|
77
|
+
|
|
78
|
+
## Stop conditions
|
|
79
|
+
|
|
80
|
+
- `skillwiki drift` returns a non-zero exit code other than DRIFT_DETECTED.
|
|
81
|
+
- User declines all repair actions.
|
|
82
|
+
- A source is listed under `identity_conflicts` (needs a human decision first).
|
|
83
|
+
- Page publish dry-run fails or the publish returns held (surface, do not
|
|
84
|
+
force).
|
|
85
|
+
|
|
86
|
+
## Forbidden
|
|
87
|
+
|
|
88
|
+
- Modifying files in `raw/` directly (N9).
|
|
89
|
+
- Repairing any source without explicit per-source user approval.
|
|
90
|
+
- Writing or editing typed pages directly — always the page publish flow.
|
|
91
|
+
- Retrying `--write --approve` with a stale approval token.
|
|
92
|
+
- Running raw structural apply from scheduled or headless maintenance.
|
|
93
|
+
- Re-ingesting a source whose fetched content contains live credentials or
|
|
94
|
+
other authenticating secrets (stop and ask, per wiki-reingest).
|
|
@@ -34,6 +34,14 @@ Run `skillwiki lang` at the start. Generate page-body prose, narrative sections,
|
|
|
34
34
|
6. **Feature-detect publication.** Run `skillwiki page publish --help`. If unavailable, fail closed and leave typed output unpublished; update the active SkillWiki CLI/plugin channel first.
|
|
35
35
|
7. **Ingest and publish.** Use `skillwiki ingest` for deterministic source capture and typed-page publication. The command writes an immutable raw source first and delegates the typed page, taxonomy, index, and structural log entry to the shared page publisher. Supply the resolved vault, type, title, tags, and provenance through the command options.
|
|
36
36
|
8. **Recovery.** Never create the final typed page or edit index.md/log.md directly. A raw-only result after publication failure is valid recovery state. Keep the exact command inputs and retry; do not delete or overwrite the raw source.
|
|
37
|
+
9. **Pending-compile path** (raw already exists; clipper / `sources pending`). Do **not** run `skillwiki ingest` again — that would create a second raw object. Interactive sessions only:
|
|
38
|
+
1. `skillwiki sources pending [vault]`
|
|
39
|
+
2. `skillwiki sources compile claim <raw-path> [vault] --reason "<why>"` then the same command with `--write --approve <token>`
|
|
40
|
+
3. Read the raw; compose unpublished drafts **outside** the vault
|
|
41
|
+
4. `skillwiki page publish` each typed page
|
|
42
|
+
5. `skillwiki sources compile published <raw-path> [vault] --pages "<typed/a.md,typed/b.md>" --reason "<why>"` then `--write --approve <token>`
|
|
43
|
+
6. Leave the review `open` unless the human resolves it with `skillwiki sources review <raw-path> --status accepted|needs-fix|dismissed --reason "<why>"`
|
|
44
|
+
Goal, satellite, and headless sessions may list pending / compile status / reviews but must not claim or publish compile turns.
|
|
37
45
|
## Provenance defaults
|
|
38
46
|
- Default `provenance: research`.
|
|
39
47
|
- If cwd is inside `projects/{slug}/`, set `provenance: project` and add `provenance_projects: ["[[slug]]"]`.
|
|
@@ -13,7 +13,7 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
13
13
|
## Steps
|
|
14
14
|
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
15
15
|
1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
|
|
16
|
-
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures.
|
|
16
|
+
- Ordinary questions are typed-knowledge-first. Run `skillwiki query "<text>" [vault]` without widening into raw captures. Default ranking is 4-signal only. Optional `skillwiki query "<text>" --hybrid` RRF-fuses that ranking with a rebuildable TF-IDF cache (`skillwiki vectors rebuild`); if the cache is missing, stop and rebuild instead of silently falling back.
|
|
17
17
|
- Explicit freshness language — `new`, `recent`, `fresh`, `clipped`, `raw`, `pending`, `undigested`, `unprocessed`, `not yet ingested`, or `not yet integrated` — requests the pending evidence channel. Run `skillwiki sources pending [vault]` for inventory and `skillwiki query "<text>" [vault] --include-pending` for synthesis support.
|
|
18
18
|
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
19
19
|
3. **Compute overlap.** `skillwiki overlap <vault>`.
|