skillwiki 0.10.22 → 0.10.24
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-6ZDKTNLA.js +294 -0
- package/dist/chunk-EQPU2BPM.js +468 -0
- package/dist/{chunk-54JVBNWK.js → chunk-QBZYEEBD.js} +12 -295
- package/dist/chunk-QNTBNNEL.js +616 -0
- package/dist/{chunk-7YDWC6D3.js → chunk-SYKSL3JQ.js} +852 -699
- package/dist/cli.js +613 -146
- package/dist/{index-projection-Q6WL76SO.js → index-projection-FRWTZB5Y.js} +2 -1
- package/dist/skillwiki-mcp.js +4 -2
- package/dist/sources-L2SQV63E.js +10 -0
- package/dist/vault-sync/scripts/wiki-pull-with-auto-resolve.sh +37 -24
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +1 -1
- package/skills/README.md +13 -2
- package/skills/agents/wiki-add-task.md +2 -1
- package/skills/agents/wiki-archive.md +8 -9
- package/skills/agents/wiki-audit.md +2 -1
- package/skills/agents/wiki-lint.md +2 -1
- package/skills/agents/wiki-query.md +3 -1
- package/skills/agents/wiki-reingest.md +9 -8
- package/skills/package.json +1 -1
- package/skills/skills/using-skillwiki/SKILL.md +19 -13
- package/skills/skills/wiki-add-task/SKILL.md +4 -3
- package/skills/skills/wiki-archive/SKILL.md +23 -18
- package/skills/skills/wiki-audit/SKILL.md +3 -1
- package/skills/skills/wiki-init/SKILL.md +12 -1
- package/skills/skills/wiki-lint/SKILL.md +2 -1
- package/skills/skills/wiki-query/SKILL.md +7 -0
- package/skills/skills/wiki-reingest/SKILL.md +12 -8
- package/skills/skills/wiki-remove/SKILL.md +22 -5
- package/skills/skills/wiki-sync/SKILL.md +2 -3
- package/skills/using-skillwiki/SKILL.md +19 -13
- package/skills/wiki-add-task/SKILL.md +4 -3
- package/skills/wiki-archive/SKILL.md +23 -18
- package/skills/wiki-audit/SKILL.md +3 -1
- package/skills/wiki-init/SKILL.md +12 -1
- package/skills/wiki-lint/SKILL.md +2 -1
- package/skills/wiki-query/SKILL.md +7 -0
- package/skills/wiki-reingest/SKILL.md +12 -8
- package/skills/wiki-remove/SKILL.md +22 -5
- package/skills/wiki-sync/SKILL.md +2 -3
- package/templates/SCHEMA.md +8 -5
- package/templates/web-clipper/llm-wiki-clippings.json +56 -0
- package/templates/web-clipper/readme.txt +16 -0
package/dist/skillwiki-mcp.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runSkillwikiMcpStdio
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-SYKSL3JQ.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-QBZYEEBD.js";
|
|
7
7
|
import "./chunk-PQG26AGJ.js";
|
|
8
|
+
import "./chunk-QNTBNNEL.js";
|
|
9
|
+
import "./chunk-6ZDKTNLA.js";
|
|
8
10
|
import "./chunk-C2DKFJFA.js";
|
|
9
11
|
|
|
10
12
|
// src/mcp-entry.ts
|
|
@@ -100,44 +100,57 @@ acquire_pull_lock() {
|
|
|
100
100
|
drop_or_preserve_untracked_remote_overlaps() {
|
|
101
101
|
local removed=0
|
|
102
102
|
local preserved=0
|
|
103
|
-
local path remote_blob
|
|
104
|
-
local collision_root
|
|
103
|
+
local path remote_blob identical
|
|
104
|
+
local collision_root=""
|
|
105
|
+
local backup_path backup_dir
|
|
105
106
|
|
|
106
107
|
while IFS= read -r -d '' path; do
|
|
107
|
-
if ! git cat-file -e "$
|
|
108
|
+
if ! git cat-file -e "$TARGET_OID:$path" 2>/dev/null; then
|
|
108
109
|
continue
|
|
109
110
|
fi
|
|
110
111
|
|
|
111
112
|
remote_blob="$(mktemp)"
|
|
112
|
-
|
|
113
|
+
identical=0
|
|
114
|
+
if git show "$TARGET_OID:$path" >"$remote_blob" 2>/dev/null && cmp -s "$path" "$remote_blob"; then
|
|
115
|
+
identical=1
|
|
116
|
+
fi
|
|
117
|
+
rm -f "$remote_blob"
|
|
118
|
+
|
|
119
|
+
if [ "$identical" -eq 1 ]; then
|
|
113
120
|
if rm -f -- "$path"; then
|
|
114
121
|
removed=$((removed + 1))
|
|
115
122
|
else
|
|
116
|
-
rm -f "$remote_blob"
|
|
117
123
|
log "FAIL could not remove untracked remote duplicate before pull: $path"
|
|
118
124
|
return 1
|
|
119
125
|
fi
|
|
126
|
+
continue
|
|
127
|
+
fi
|
|
128
|
+
|
|
129
|
+
if [ -z "$collision_root" ]; then
|
|
130
|
+
collision_root="$(platform_cache_dir)/untracked-collisions/$(date -u +%Y%m%dT%H%M%SZ)-$$"
|
|
131
|
+
fi
|
|
132
|
+
backup_path="$collision_root/$path"
|
|
133
|
+
backup_dir="$(dirname "$backup_path")"
|
|
134
|
+
if ! mkdir -p "$backup_dir" || ! cp -p "$path" "$backup_path"; then
|
|
135
|
+
log "FAIL could not preserve divergent untracked remote overlap before pull: $path"
|
|
136
|
+
return 1
|
|
137
|
+
fi
|
|
138
|
+
if rm -f -- "$path"; then
|
|
139
|
+
preserved=$((preserved + 1))
|
|
140
|
+
log "PRESERVE divergent untracked remote overlap before pull: $path -> $backup_path"
|
|
120
141
|
else
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
collision_root="$(platform_cache_dir)/untracked-collisions/$(date -u +%Y%m%dT%H%M%SZ)-$$"
|
|
124
|
-
fi
|
|
125
|
-
backup_path="$collision_root/$path"
|
|
126
|
-
backup_dir="$(dirname "$backup_path")"
|
|
127
|
-
if ! mkdir -p "$backup_dir" || ! cp -p "$path" "$backup_path"; then
|
|
128
|
-
log "FAIL could not preserve divergent untracked remote overlap before pull: $path"
|
|
129
|
-
return 1
|
|
130
|
-
fi
|
|
131
|
-
if rm -f -- "$path"; then
|
|
132
|
-
preserved=$((preserved + 1))
|
|
133
|
-
log "PRESERVE divergent untracked remote overlap before pull: $path -> $backup_path"
|
|
134
|
-
else
|
|
135
|
-
log "FAIL could not remove preserved divergent untracked remote overlap before pull: $path"
|
|
136
|
-
return 1
|
|
137
|
-
fi
|
|
142
|
+
log "FAIL could not remove preserved divergent untracked remote overlap before pull: $path"
|
|
143
|
+
return 1
|
|
138
144
|
fi
|
|
139
|
-
|
|
140
|
-
|
|
145
|
+
done < <(
|
|
146
|
+
git ls-files --others --exclude-standard -z
|
|
147
|
+
# `stash -u` excludes ignored paths. Protect only ignored typed-page
|
|
148
|
+
# Markdown, without sweeping unrelated ignored caches into the operation.
|
|
149
|
+
git ls-files --others --ignored --exclude-standard -z -- \
|
|
150
|
+
':(glob)queries/**/*.md' \
|
|
151
|
+
':(glob)concepts/**/*.md' \
|
|
152
|
+
':(glob)entities/**/*.md'
|
|
153
|
+
)
|
|
141
154
|
|
|
142
155
|
if [ "$removed" -gt 0 ]; then
|
|
143
156
|
log "DROP $removed identical untracked remote duplicate(s) before pull"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.24",
|
|
4
4
|
"skills": "./",
|
|
5
5
|
"description": "Project-aware Karpathy-style knowledge base for Claude Code: 19 prompt-only skills (wiki-*, proj-*, using-skillwiki) backed by the deterministic `skillwiki` CLI.",
|
|
6
6
|
"author": {
|
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: **19 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
|
|
@@ -11,6 +11,16 @@ Publication policy: new or updated typed-knowledge and meta pages must use
|
|
|
11
11
|
typed path or separately edit its index/log entries; immutable raw sources and
|
|
12
12
|
non-typed project work retain their existing workflows.
|
|
13
13
|
|
|
14
|
+
Raw lifecycle policy: completed raw captures are byte-immutable. Attended,
|
|
15
|
+
state-bound structural commands may preserve-move sources under
|
|
16
|
+
`raw/archived/` or `raw/duplicates/`; ordinary remove refuses raw, and permanent
|
|
17
|
+
disposal requires `skillwiki sources dispose` for one explicit exact target.
|
|
18
|
+
Web Clipper captures enter asynchronously through the init-installed
|
|
19
|
+
`_Templates/web-clipper/llm-wiki-clippings.json`; inspect them with
|
|
20
|
+
`skillwiki sources pending` or the separate `query --include-pending` channel.
|
|
21
|
+
`raw/assets/**` is a flexible stable pool with explicit vault-root embeds, not a
|
|
22
|
+
fixed papers/transcripts taxonomy.
|
|
23
|
+
|
|
14
24
|
| Namespace | Skills |
|
|
15
25
|
|---|---|
|
|
16
26
|
| `wiki-*` | `wiki-init`, `wiki-ingest`, `wiki-query`, `wiki-lint`, `wiki-crystallize`, `wiki-audit`, `wiki-archive`, `wiki-reingest`, `wiki-adapter-prd`, `wiki-add-task`, `wiki-sync`, `wiki-canvas`, `wiki-gate-plan-mode` |
|
|
@@ -48,8 +58,9 @@ Before a managed vault mutation, invoke the managed SkillWiki command while the
|
|
|
48
58
|
|
|
49
59
|
- typed pages: `skillwiki page publish <draft> <vault> --target <path>` then the same command with `--write`
|
|
50
60
|
- archive: `skillwiki archive <path> <vault>`
|
|
61
|
+
- pending inventory/query: `skillwiki sources pending <vault>` and `skillwiki query "..." <vault> --include-pending`
|
|
62
|
+
- raw disposition/disposal: `skillwiki sources disposition ...` / attended `skillwiki sources dispose ...`
|
|
51
63
|
- ad-hoc structural log: `skillwiki log-append <vault> --content '<entry>'` (Release A dual-write) or event materialization (Release B)
|
|
52
64
|
- project/root index: `skillwiki project-index <slug> <vault> --apply` and `skillwiki index rebuild <vault> --write` only through managed commands
|
|
53
65
|
- log projection: `skillwiki log materialize <vault> [--write]`
|
|
54
66
|
- paired projections: `skillwiki projections materialize <vault> [--write]`
|
|
55
|
-
|
|
@@ -39,7 +39,7 @@ You are a quick-capture agent specializing in writing ad-hoc captures to `raw/tr
|
|
|
39
39
|
project: "[[{slug}]]" # omit if no project
|
|
40
40
|
---
|
|
41
41
|
```
|
|
42
|
-
|
|
42
|
+
`sha256` may be omitted, but the completed capture is still immutable evidence.
|
|
43
43
|
6. **Write body:** `# {type}: {text}` then the text content.
|
|
44
44
|
7. **Cross-reference (optional).** If project slug provided, verify `projects/{slug}/` exists. Append one-line reference to project compound notes.
|
|
45
45
|
8. **Log.** Append to `{vault}/log.md`: `## [YYYY-MM-DD] capture | [type]: [text (first 60 chars)]`.
|
|
@@ -60,6 +60,7 @@ Return:
|
|
|
60
60
|
**Forbidden:**
|
|
61
61
|
- Creating an `inbox/` directory
|
|
62
62
|
- Appending to existing capture files
|
|
63
|
+
- Editing or correcting an existing raw transcript; create a new capture or maintained work-item note
|
|
63
64
|
- Creating a full work item (that's proj-work's job)
|
|
64
65
|
- Writing to Layer 2 or Layer 3 locations (captures are Layer 1)
|
|
65
66
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault
|
|
@@ -1,34 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wiki-archive
|
|
3
|
-
description: Use this agent
|
|
3
|
+
description: Use this agent for typed-page archival and report-only raw lifecycle previews; raw apply requires attended exact-target approval.
|
|
4
4
|
model: sonnet
|
|
5
5
|
color: yellow
|
|
6
6
|
tools: ["Read", "Edit", "Bash", "Grep", "Glob"]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
You are a vault archivist specializing in safely retiring typed
|
|
9
|
+
You are a vault archivist specializing in safely retiring typed pages and previewing raw preserve-moves. Automated maintenance may apply typed archival, but raw structural apply is never autonomous.
|
|
10
10
|
|
|
11
11
|
## When to invoke
|
|
12
12
|
|
|
13
13
|
- **Page superseded.** A new version of a concept/entity page exists and the old one should be retired.
|
|
14
|
-
- **
|
|
14
|
+
- **Raw lifecycle preview.** An exact raw source may need preserve-archive after attended review.
|
|
15
15
|
- **Cleanup cycle.** Dev-loop spawns you to archive pages flagged during lint/audit.
|
|
16
16
|
|
|
17
17
|
**Your Core Responsibilities:**
|
|
18
18
|
1. Run `skillwiki archive <page>` to move the page to `_archive/`
|
|
19
19
|
2. Verify no ghost entries remain with `skillwiki index-check`
|
|
20
20
|
3. Check for broken wikilinks from other pages referencing the archived page
|
|
21
|
-
4. For raw
|
|
21
|
+
4. For raw targets, produce the dry-run only and surface the state-bound approval token to an attended parent/operator
|
|
22
22
|
|
|
23
23
|
**Execution Process:**
|
|
24
24
|
|
|
25
25
|
1. **Resolve vault.** Run `skillwiki path`. If NO_VAULT_CONFIGURED, report failure and STOP.
|
|
26
26
|
2. **Identify target.** The page to archive is specified in your task prompt.
|
|
27
|
-
3. **Run archive.**
|
|
27
|
+
3. **Run archive.** For typed pages, execute `skillwiki archive <page> <vault>`. For an exact raw path, execute preview only; do not add `--apply`. Raw destination must be `raw/archived/<category>/...`, with exact bytes preserved and no asset movement.
|
|
28
28
|
4. **Verify index.** Run `skillwiki index-check <vault>`. Confirm no ghost entries remain.
|
|
29
29
|
5. **Check broken links.** Run `skillwiki lint <vault>`. If other pages still wikilink to the archived page, update them to point to the replacement or remove the stale link.
|
|
30
|
-
6. **
|
|
31
|
-
7. **Log.** Append to `{vault}/log.md`: `## [{date}] archive | {relPath} → _archive/{subdir}/`.
|
|
30
|
+
6. **Raw handoff.** Report exact source/destination, complete-file hash, citation impact, and approval token. Only an attended explicitly invoked workflow may rerun with `--apply --approve <token>`.
|
|
32
31
|
|
|
33
32
|
**Output Format:**
|
|
34
33
|
Return:
|
|
@@ -43,7 +42,7 @@ Return:
|
|
|
43
42
|
- Page not found or already archived
|
|
44
43
|
|
|
45
44
|
**Forbidden:**
|
|
46
|
-
-
|
|
47
|
-
-
|
|
45
|
+
- Applying any raw archive from an automated/background agent
|
|
46
|
+
- Rewriting raw bytes/frontmatter, moving raw outside `raw/`, writing `_archive/raw/`, or moving referenced assets
|
|
48
47
|
- Deleting files (archive moves, never deletes)
|
|
49
48
|
- Preserving live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets by archive-only handling
|
|
@@ -25,7 +25,7 @@ You are a vault provenance auditor specializing in verifying that every `^[raw/.
|
|
|
25
25
|
1. **Resolve vault.** Run `skillwiki path`. If NO_VAULT_CONFIGURED, report failure and STOP.
|
|
26
26
|
2. **Run audit.** Execute `skillwiki audit <page>` for each target page. If no page specified, audit all typed-knowledge pages (entities/, concepts/, comparisons/, queries/, meta/). Read the JSON report.
|
|
27
27
|
3. **Reason over findings:**
|
|
28
|
-
- **Unresolved markers:**
|
|
28
|
+
- **Unresolved markers:** Resolve against active `raw/`, `raw/archived/`, `raw/duplicates/`, and relocation history; legacy `_archive/raw/` is read-only compatibility. Distinguish genuinely missing evidence from a stale historical address.
|
|
29
29
|
- **Unused sources:** A source is listed in `sources:` frontmatter but never cited in the body. Suggest adding a body citation or removing from `sources:`.
|
|
30
30
|
- **Missing from sources:** A body citation lacks a corresponding `sources:` entry. Suggest adding to `sources:`.
|
|
31
31
|
4. **Append summary.** Write one entry to `{vault}/log.md` summarizing audit findings and suggested follow-ups.
|
|
@@ -44,4 +44,5 @@ Return a structured summary:
|
|
|
44
44
|
**Forbidden:**
|
|
45
45
|
- Auto-applying suggested fixes (audit is observation-only — do not edit pages)
|
|
46
46
|
- Modifying `sources:` frontmatter or body citations
|
|
47
|
+
- Rewriting raw evidence
|
|
47
48
|
- Printing or writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets in audit summaries
|
|
@@ -27,7 +27,7 @@ You are a vault health inspector specializing in running `skillwiki health` and
|
|
|
27
27
|
2. **Run health or lint summary.** For whole-system health, execute `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail`. For lint-only maintenance, execute `skillwiki lint <vault> --summary`. Read the JSON envelope. Treat `skillwiki doctor` as setup/runtime diagnostics only.
|
|
28
28
|
3. **Drill into details only when needed.** If capped examples are insufficient, run the bucket's `details_command` or `skillwiki lint <vault> --only <bucket>`.
|
|
29
29
|
4. **Reason over findings.** Group by severity. For each kind of finding, suggest concrete next actions. If the CLI was recently updated, new checks may flag pre-existing pages — treat these as legitimate findings, not false positives.
|
|
30
|
-
5. **Sensitive content.** Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human
|
|
30
|
+
5. **Sensitive content.** Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human`; never print the secret value. Raw findings remain report/quarantine-only: do not redact or rewrite existing raw content/frontmatter.
|
|
31
31
|
6. **Log rotation.** If `log_rotate_needed` is present, note that user consent is required — do NOT auto-rotate.
|
|
32
32
|
7. **Post-migration check.** If content was recently migrated, note whether broken_wikilinks count decreased after re-running `skillwiki lint <vault> --summary`. Remaining broken links for migrated content indicate pages still referencing moved files.
|
|
33
33
|
8. **Optional summary.** Append one entry to `{vault}/log.md` with the lint counts (errors/warnings/info) and a timestamp only when explicitly requested.
|
|
@@ -49,5 +49,6 @@ Return a structured summary:
|
|
|
49
49
|
**Forbidden:**
|
|
50
50
|
- Auto-rotating logs without user consent
|
|
51
51
|
- Auto-updating sha256 fields
|
|
52
|
+
- Rewriting or redacting raw evidence
|
|
52
53
|
- Modifying any page beyond an explicitly requested lint summary entry in `log.md`
|
|
53
54
|
- Printing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets in findings or summaries
|
|
@@ -25,6 +25,7 @@ You are a vault search and synthesis specialist using E2 4-signal ranking to fin
|
|
|
25
25
|
|
|
26
26
|
1. **Resolve vault.** Run `skillwiki path`. If NO_VAULT_CONFIGURED, report failure and STOP.
|
|
27
27
|
2. **Determine scope.** From task prompt: full vault, current project, or project+concepts.
|
|
28
|
+
- Default to typed knowledge. If the prompt explicitly asks for new/recent/fresh/clipped/raw/pending/undigested/unprocessed/not-yet-integrated material, run `skillwiki sources pending` and `skillwiki query "..." --include-pending`.
|
|
28
29
|
3. **Refresh graph.** If `.skillwiki/graph.json` missing or >24h old: `skillwiki graph build <vault>`.
|
|
29
30
|
4. **Compute overlap.** `skillwiki overlap <vault>`.
|
|
30
31
|
5. **Score candidates.** Apply 4 signals:
|
|
@@ -33,7 +34,7 @@ You are a vault search and synthesis specialist using E2 4-signal ranking to fin
|
|
|
33
34
|
- Adamic-Adar: 1.5× (from graph output)
|
|
34
35
|
- Type affinity: 1.0×
|
|
35
36
|
6. **Read top candidates.** Read frontmatter + body of highest-scored pages.
|
|
36
|
-
7. **Synthesize answer.** Compose with explicit citations to candidate pages using `^[page-path]` markers.
|
|
37
|
+
7. **Synthesize answer.** Compose with explicit citations to candidate pages using `^[page-path]` markers. Keep `pending_sources` separate from ranked typed results, label them pending evidence, and never let them alter typed scores/order. Weak typed results may prompt a suggestion, not silent widening.
|
|
37
38
|
8. **Sensitive content guard.** Before filing a query or comparison page, scan the generated body for live credentials, access keys, tokens, passwords, cookies, bearer headers, or private keys. Redact before writing. If the answer depends on preserving a live secret, STOP and ask for a redacted source or explicit rotation/remediation direction.
|
|
38
39
|
9. **Optional file.** If the task asks to persist, first run `skillwiki page publish --help`. If it is unavailable, fail closed and leave the result unpublished. Otherwise:
|
|
39
40
|
1. Resolve the vault and create a temporary directory outside the vault.
|
|
@@ -75,4 +76,5 @@ Return:
|
|
|
75
76
|
- Directly creating a final typed page or separately editing `index.md` or `log.md` for its publication
|
|
76
77
|
- Skipping graph refresh when graph.json is missing
|
|
77
78
|
- Accepting wiki claims without filesystem verification
|
|
79
|
+
- Treating pending raw captures as integrated typed knowledge or silently widening into raw
|
|
78
80
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault
|
|
@@ -6,7 +6,7 @@ color: yellow
|
|
|
6
6
|
tools: ["Read", "Write", "Edit", "Bash", "Grep", "Glob"]
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
You are a drift detection specialist running `skillwiki drift` and processing results.
|
|
9
|
+
You are a drift detection specialist running `skillwiki drift` and processing results. Automated maintenance is report-only for raw evidence; attended reingest creates a new capture and preserve-archives the old one.
|
|
10
10
|
|
|
11
11
|
## When to invoke
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@ You are a drift detection specialist running `skillwiki drift` and processing re
|
|
|
17
17
|
**Your Core Responsibilities:**
|
|
18
18
|
1. Run `skillwiki drift` to detect changed sources
|
|
19
19
|
2. Present findings grouped by status (drifted, fetch_failed, unchanged)
|
|
20
|
-
3. For each drifted source:
|
|
20
|
+
3. For each drifted source: report the proposed new-capture + attended preserve-archive workflow
|
|
21
21
|
4. Log the results
|
|
22
22
|
|
|
23
23
|
**Execution Process:**
|
|
@@ -29,16 +29,16 @@ You are a drift detection specialist running `skillwiki drift` and processing re
|
|
|
29
29
|
- **fetch_failed:** Could not re-fetch. Note error details.
|
|
30
30
|
- **unchanged:** No action needed.
|
|
31
31
|
4. **Process each drifted source:**
|
|
32
|
-
a.
|
|
32
|
+
a. In background/headless mode, stop after reporting. Never run raw structural apply.
|
|
33
33
|
b. Re-fetch content. If it contains live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets, STOP and ask for a redacted source or explicit rotation/remediation direction.
|
|
34
|
-
c.
|
|
35
|
-
d.
|
|
36
|
-
e.
|
|
34
|
+
c. In an attended explicitly approved workflow, write the fetched content as a new raw file with updated sha256 and verify it.
|
|
35
|
+
d. Preview `skillwiki archive <exact-old-raw-path>`; apply only with the live `--apply --approve <token>` authorization. Old bytes remain under `raw/archived/`.
|
|
36
|
+
e. Update maintained citations to the new capture where editorially appropriate and verify with `skillwiki audit`.
|
|
37
37
|
5. **Log.** Append to `{vault}/log.md`: scanned count, drifted count, re-ingested count, skipped count.
|
|
38
38
|
|
|
39
39
|
**N9 Compliance:**
|
|
40
40
|
Raw files are immutable. Never modify an existing raw file. Instead:
|
|
41
|
-
-
|
|
41
|
+
- Preserve-archive old raw → `raw/archived/<category>/`
|
|
42
42
|
- Create new raw with updated content and new sha256
|
|
43
43
|
- This preserves full provenance history
|
|
44
44
|
|
|
@@ -58,6 +58,7 @@ Return:
|
|
|
58
58
|
|
|
59
59
|
**Forbidden:**
|
|
60
60
|
- Modifying files in `raw/` directly (N9)
|
|
61
|
-
-
|
|
61
|
+
- Applying raw reingest/archive from scheduled or headless maintenance
|
|
62
|
+
- Writing new archives to `_archive/raw/`
|
|
62
63
|
- Updating citations without running `skillwiki audit` to verify
|
|
63
64
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault
|
package/skills/package.json
CHANGED
|
@@ -37,14 +37,17 @@ Invoke a skillwiki skill when the user:
|
|
|
37
37
|
|
|
38
38
|
## Vault Structure
|
|
39
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
|
|
40
|
+
**Layer 1 — Raw (`raw/`):** Immutable evidence. Existing content/frontmatter is never autonomously rewritten or removed. Attended structural workflows may rename, relocate, archive, or deduplicate only when exact bytes remain somewhere under `raw/`. Permanent disposal requires explicit exact-target user intent. `raw/transcripts/` is the ad-hoc capture point for meeting notes and unprocessed ideas.
|
|
41
41
|
```
|
|
42
42
|
raw/
|
|
43
|
-
├── articles/
|
|
44
|
-
├── papers/
|
|
45
|
-
├── transcripts/
|
|
46
|
-
|
|
43
|
+
├── articles/ # Active Web articles and clippings
|
|
44
|
+
├── papers/ # Active PDFs and papers
|
|
45
|
+
├── transcripts/ # Active meeting notes and ad-hoc captures
|
|
46
|
+
├── assets/ # Stable flexible asset pool; no fixed internal taxonomy
|
|
47
|
+
├── archived/{articles,papers,transcripts}/
|
|
48
|
+
└── duplicates/{articles,papers,transcripts}/
|
|
47
49
|
```
|
|
50
|
+
Use explicit vault-root asset embeds such as `![[raw/assets/example/diagram.png]]`. Agents may choose flat or URL-friendly nested paths. Once an immutable capture references an asset, that path freezes; routine source archive/dedup never moves the asset. Remote images remain external dependencies unless separately captured.
|
|
48
51
|
Raw frontmatter:
|
|
49
52
|
```yaml
|
|
50
53
|
---
|
|
@@ -94,6 +97,9 @@ Also mirror these pointers in vault-presync / vault-sync-status skills when oper
|
|
|
94
97
|
|
|
95
98
|
- typed pages: `skillwiki page publish <draft> <vault> --target <path>` then the same command with `--write`
|
|
96
99
|
- archive: `skillwiki archive <path> <vault>`
|
|
100
|
+
- pending source inventory: `skillwiki sources pending <vault>`
|
|
101
|
+
- editorial disposition: `skillwiki sources disposition <exact-raw-path> <vault> ...`
|
|
102
|
+
- exceptional raw disposal: `skillwiki sources dispose <exact-raw-path> <vault> --reason ...` then attended `--write --approve <token>`
|
|
97
103
|
- ad-hoc structural log: `skillwiki log-append <vault> --content '<entry>'` (Release A dual-write) or event materialization (Release B)
|
|
98
104
|
- project/root index: `skillwiki project-index <slug> <vault> --apply` and `skillwiki index rebuild <vault> --write` only through managed commands
|
|
99
105
|
- log projection: `skillwiki log materialize <vault> [--write]`
|
|
@@ -125,20 +131,20 @@ The vault is shared across hosts, so host-local absolute paths are not durable s
|
|
|
125
131
|
| Entry | When | What happens |
|
|
126
132
|
|-------|------|-------------|
|
|
127
133
|
| `/wiki-add-task <text>` | You're in a Claude session | Creates `raw/transcripts/YYYY-MM-DD-{type}-{slug}.md` with ad-hoc capture frontmatter |
|
|
128
|
-
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create
|
|
134
|
+
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create a new `.md` file in `raw/transcripts/` — dev-loop discovers it on next cycle; do not edit it after capture |
|
|
129
135
|
| Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
|
|
130
136
|
|
|
131
137
|
## Skill Map
|
|
132
138
|
| Skill | When to Invoke |
|
|
133
139
|
|-------|----------------|
|
|
134
|
-
| `wiki-init` | Bootstrap a
|
|
140
|
+
| `wiki-init` | Bootstrap a vault and install `_Templates/web-clipper/llm-wiki-clippings.json` plus import guidance |
|
|
135
141
|
| `wiki-ingest` | Convert URLs, files, or pasted text into typed-knowledge pages |
|
|
136
|
-
| `wiki-query` | Search
|
|
142
|
+
| `wiki-query` | Search typed knowledge by default; explicitly requested fresh/raw evidence uses the separate pending channel |
|
|
137
143
|
| `wiki-lint` | Vault health and lint checks; use `health` for whole-system reports and `lint --summary` for bounded lint buckets |
|
|
138
144
|
| `wiki-crystallize` | Distill the current working session into a typed-knowledge page |
|
|
139
145
|
| `wiki-audit` | Verify raw provenance references and source frontmatter integrity |
|
|
140
|
-
| `wiki-archive` | Archive
|
|
141
|
-
| `wiki-remove` |
|
|
146
|
+
| `wiki-archive` | Archive typed pages, or attended preserve-move exact raw sources under `raw/archived/` |
|
|
147
|
+
| `wiki-remove` | Remove maintained pages; exact raw disposal uses the separate attended `sources dispose` flow |
|
|
142
148
|
| `wiki-reingest` | Detect drift in raw sources (sha256 comparison) and re-ingest updated content |
|
|
143
149
|
| `wiki-add-task` | Quick-capture ideas, bugs, tasks, notes into `raw/transcripts/` without leaving the current workflow |
|
|
144
150
|
| `wiki-adapter-prd` | Map foreign PRD formats (CodeStable, RFC, AIDE, Hermes) into vault pages |
|
|
@@ -174,8 +180,8 @@ Use `prd_layer` + `prd_pipeline` from `.claude/dev-loop.config.md` as source of
|
|
|
174
180
|
|
|
175
181
|
## CLI Backbone
|
|
176
182
|
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 Claude for the creative parts.
|
|
177
|
-
Key CLI subcommands: `init`, `health`, `lint`, `config`, `doctor`, `path`, `lang`, `install`, `fleet context`, `fleet validate`, `graph build`, `archive`, `remove`, `drift`, `compound`, `tag-sync`, `tag reconcile`, `page publish`, `sync status`, `seed`, `stale`, `observe`, `canvas generate`.
|
|
178
|
-
Run `skillwiki health <vault> --out /tmp/skillwiki-health.json --no-fail` for a bounded whole-system report that includes
|
|
183
|
+
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`, `observe`, `canvas generate`.
|
|
184
|
+
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.
|
|
179
185
|
|
|
180
186
|
## Runtime Host Context and Fleet Freshness
|
|
181
187
|
Resolve the active project vault with `skillwiki path` first. Then pass that exact path to `skillwiki --human fleet context <vault>` for host identity and safety guidance. `fleet context` is authoritative for host identity. It overrides stale injected SessionStart context, remembered workspace context, and prior conversation summaries. `fleet context` is local and network-free; it reports `identity_status`, resolver trace, warnings, and the fact that remote freshness was not checked.
|
|
@@ -214,7 +220,7 @@ Before asking questions or running scheduled maintenance, resolve the session ki
|
|
|
214
220
|
## Typical Workflow
|
|
215
221
|
1. **Init** (`wiki-init`) — create vault, set domain and taxonomy
|
|
216
222
|
2. **Ingest** (`wiki-ingest`) — add sources, build pages
|
|
217
|
-
3. **Query** (`wiki-query`) — search
|
|
223
|
+
3. **Query** (`wiki-query`) — search typed knowledge; explicitly include pending captures for fresh/raw intent
|
|
218
224
|
4. **Lint** (`wiki-lint`) — periodic health checks
|
|
219
225
|
5. **Crystallize** (`wiki-crystallize`) — save session insights as pages
|
|
220
226
|
6. **Audit** (`wiki-audit`) — verify source integrity
|
|
@@ -8,7 +8,7 @@ Capture ad-hoc ideas, bugs, tasks, and notes into the vault. Three entry points
|
|
|
8
8
|
|-------|------|-------------|
|
|
9
9
|
| `/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 |
|
|
10
10
|
| Filesystem drop | Hermes Agent compact mode (no slash commands available) | Same as above — create `.md` in `raw/transcripts/`, dev-loop discovers it |
|
|
11
|
-
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create
|
|
11
|
+
| Filesystem drop | You're NOT in a Claude session (Obsidian, editor, sync) | Create a new `.md` file in `raw/transcripts/` using the vault template — dev-loop discovers it on next cycle |
|
|
12
12
|
| Dev-loop discovery | Automatic, next cycle | Scans `raw/transcripts/` for new files since last cycle, surfaces as claimable work |
|
|
13
13
|
**Path Rule:** Captures ALWAYS go to `$(skillwiki path)/raw/transcripts/` (Layer 1). Never under `projects/{slug}/raw/` — that violates SCHEMA.md Layer 1 immutability.
|
|
14
14
|
### Exception: Explicit project task requests
|
|
@@ -47,7 +47,7 @@ project: "[[{slug}]]"
|
|
|
47
47
|
- If a `project` slug was provided, set `project: "[[slug]]"`.
|
|
48
48
|
- If no project, omit the `project` field entirely.
|
|
49
49
|
- `source_url` is null (these are locally originated captures).
|
|
50
|
-
-
|
|
50
|
+
- `sha256` may be omitted for locally originated captures, but the completed capture is still immutable evidence. Corrections create a new capture or a maintained work-item note; never rewrite the existing transcript.
|
|
51
51
|
5. **Write body.** Below the frontmatter, write:
|
|
52
52
|
```markdown
|
|
53
53
|
# {type}: {text}
|
|
@@ -79,7 +79,7 @@ Fix the template mismatch between wiki-add-task and the vault template.
|
|
|
79
79
|
```
|
|
80
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
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
|
|
82
|
+
Ad-hoc captures may omit `sha256`; omission does not grant mutation authority. Once created, the transcript's content and frontmatter are immutable. The `sha256` field remains required for ingest pipelines that provide integrity verification.
|
|
83
83
|
## Stop conditions
|
|
84
84
|
- `skillwiki path` returns NO_VAULT_CONFIGURED.
|
|
85
85
|
- No `text` provided (prompt user once, then stop).
|
|
@@ -88,6 +88,7 @@ Ad-hoc captures omit `sha256` — they are mutable working notes, not immutable
|
|
|
88
88
|
## Forbidden
|
|
89
89
|
- Creating an `inbox/` directory. All captures go to `raw/transcripts/`.
|
|
90
90
|
- Appending to existing capture files — each capture gets its own file.
|
|
91
|
+
- Editing or correcting an existing raw transcript; create a new capture or maintained work-item note instead.
|
|
91
92
|
- Creating a work item — this is capture-only. Use `proj-work` for full work items.
|
|
92
93
|
- Writing to any Layer 2 or Layer 3 location. Captures are Layer 1 (raw).
|
|
93
94
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wiki-archive
|
|
3
|
-
description: Archive a superseded typed
|
|
3
|
+
description: Archive a superseded typed page or preserve-move an exact raw source through the attended lifecycle workflow.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# wiki-archive
|
|
@@ -8,7 +8,8 @@ description: Archive a superseded typed-knowledge page. Moves page to _archive/,
|
|
|
8
8
|
## When This Skill Activates
|
|
9
9
|
|
|
10
10
|
- User wants to retire, supersede, or remove a typed-knowledge page from active use.
|
|
11
|
-
- A page has been replaced by a newer version and should be kept for reference but excluded from
|
|
11
|
+
- A page has been replaced by a newer version and should be kept for reference but excluded from active use.
|
|
12
|
+
- The user explicitly requests a structural archive of one exact raw source while preserving its bytes under `raw/`.
|
|
12
13
|
|
|
13
14
|
## Output language
|
|
14
15
|
|
|
@@ -20,29 +21,32 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
20
21
|
|
|
21
22
|
## Probe
|
|
22
23
|
|
|
23
|
-
Same matrix as `using-skillwiki` → **CLI probe and failsafe
|
|
24
|
+
Same matrix as `using-skillwiki` → **CLI probe and failsafe**. FAILSAFE-GIT is permitted for typed pages only. Raw archive requires the SkillWiki attended approval flow; if it is unavailable, fail closed.
|
|
24
25
|
|
|
25
26
|
## Steps (PRIMARY)
|
|
26
27
|
|
|
27
28
|
0. Resolve vault: `skillwiki path` and `skillwiki lang`.
|
|
28
|
-
1. Identify the target page.
|
|
29
|
-
2.
|
|
30
|
-
3.
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
1. Identify the target page and show its full vault-relative path. Raw targets must be exact `raw/...` paths; basename inference is refused.
|
|
30
|
+
2. For a typed page, run `skillwiki archive <page> [vault]` using the normal managed mutation workflow.
|
|
31
|
+
3. For a raw article, paper, or transcript:
|
|
32
|
+
1. Run `skillwiki archive <exact-raw-path> [vault]` and inspect the dry-run, destination, complete-file hash, citation impact, and state-bound approval token.
|
|
33
|
+
2. If the user approves that exact live plan, run the identical command with `--apply --approve <token>`.
|
|
34
|
+
3. The destination is `raw/archived/<category>/...`. The command copies exclusively, verifies complete-file SHA-256, retires the old address, records append-only relocation history, and leaves the raw bytes unchanged.
|
|
35
|
+
4. Maintained citations may be rewritten to the new address; historical addresses also resolve through relocation history. Legacy `_archive/raw/` is read-compatible only and is never a new-write destination.
|
|
36
|
+
4. On a vault-sync leaf where remote stale-path pruning is explicitly intended, add `--remote ... --remote-delete --max-remote-deletes 1`. This prunes only the retired address; the preserved raw destination remains.
|
|
37
|
+
5. Verify with `skillwiki index-check [vault]`, `skillwiki lint [vault]`, and `skillwiki audit <referencing-page>` where applicable.
|
|
38
|
+
6. Commit/push through the normal vault-sync workflow so the tombstone, preserved destination, and relocation event land together.
|
|
35
39
|
|
|
36
40
|
## FAILSAFE-GIT (no skillwiki)
|
|
37
41
|
|
|
38
|
-
1. Confirm
|
|
39
|
-
2.
|
|
40
|
-
3.
|
|
41
|
-
4.
|
|
42
|
+
1. Confirm the target is not under `raw/`. Raw preserve-moves fail closed without the CLI transaction.
|
|
43
|
+
2. Write `meta/delete-intents/<slug>.json` with `action: "archive"`, `source: "failsafe-git"`, schema `vault-delete-intent/v1`.
|
|
44
|
+
3. `git mv` the typed page to `_archive/<same relPath>`; update `index.md`.
|
|
45
|
+
4. Commit with `Delete-Intent` / `Delete-Source: failsafe-git` trailers; push to private `main`.
|
|
42
46
|
|
|
43
47
|
## Reversibility
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
Typed archiving is locally reversible from `_archive/`. Raw archive is reversible only through another attended preserve-move that keeps exact bytes under `raw/`; do not hand-edit or recreate the source at its old address.
|
|
46
50
|
|
|
47
51
|
## Stop conditions
|
|
48
52
|
|
|
@@ -52,8 +56,9 @@ Archiving is locally reversible: move the file back from `_archive/` to its orig
|
|
|
52
56
|
|
|
53
57
|
## Forbidden
|
|
54
58
|
|
|
55
|
-
-
|
|
56
|
-
-
|
|
57
|
-
-
|
|
59
|
+
- Rewriting raw content or frontmatter during archive.
|
|
60
|
+
- Moving raw evidence outside `raw/`, including new writes to `_archive/raw/`.
|
|
61
|
+
- Moving `raw/assets/**` as a side effect of source archive; referenced asset paths stay frozen.
|
|
62
|
+
- Applying a raw archive without a fresh state-bound token and attended explicit invocation.
|
|
58
63
|
- Deleting local vault files with bare `rm` / bare `git rm` without a delete-intent tombstone (causes snapshot resurrection).
|
|
59
64
|
- Remote stale-path pruning only via explicit `skillwiki archive --remote ... --remote-delete` (PRIMARY) or bounded single-path rclone in FAILSAFE-GIT.
|
|
@@ -21,7 +21,8 @@ Standard four reads.
|
|
|
21
21
|
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
22
22
|
1. `skillwiki audit <page>`. Read the JSON report.
|
|
23
23
|
2. Reason over the report:
|
|
24
|
-
-
|
|
24
|
+
- Resolve citations against active `raw/`, `raw/archived/`, `raw/duplicates/`, and append-only relocation history. Legacy `_archive/raw/` is read-compatible only, not a valid new destination.
|
|
25
|
+
- For each unresolved marker: distinguish a genuinely missing target from a stale historical path, then suggest ingesting the missing source or correcting maintained-page metadata.
|
|
25
26
|
- For each `unused_sources` entry: suggest adding a body marker or removing from `sources:`.
|
|
26
27
|
- For each `missing_from_sources` entry: suggest adding to `sources:`.
|
|
27
28
|
3. Append one `log.md` entry summarizing the audit and any suggested follow-ups.
|
|
@@ -31,3 +32,4 @@ None — audit always completes.
|
|
|
31
32
|
|
|
32
33
|
## Forbidden
|
|
33
34
|
- Auto-applying suggested fixes (audit is observation-only).
|
|
35
|
+
- Rewriting raw evidence while repairing an audit finding.
|