skillwiki 0.10.21 → 0.10.23
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-65Q5UGND.js → chunk-BASWDOQB.js} +2 -2
- package/dist/{chunk-Y6KRDGI2.js → chunk-C2DKFJFA.js} +6 -1
- package/dist/chunk-EQPU2BPM.js +468 -0
- package/dist/{chunk-GNS2ZV5P.js → chunk-PQG26AGJ.js} +1 -1
- package/dist/{chunk-I5JD3BQZ.js → chunk-QBZYEEBD.js} +13 -296
- package/dist/chunk-QNTBNNEL.js +616 -0
- package/dist/{chunk-UNPZDCWN.js → chunk-SYKSL3JQ.js} +860 -700
- package/dist/cli.js +2334 -273
- package/dist/{index-projection-HAXDEM2F.js → index-projection-FRWTZB5Y.js} +3 -2
- package/dist/{managed-write-preflight-CTXX2MHQ.js → managed-write-preflight-4LPVMP42.js} +3 -3
- package/dist/skillwiki-mcp.js +6 -4
- package/dist/sources-L2SQV63E.js +10 -0
- 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/proj-decide/SKILL.md +35 -5
- package/skills/skills/proj-decide/SKILL.md +35 -5
- 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 +39 -54
- 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 +39 -54
- package/templates/SCHEMA.md +8 -5
- package/templates/web-clipper/llm-wiki-clippings.json +56 -0
- package/templates/web-clipper/readme.txt +16 -0
|
@@ -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.
|
|
@@ -22,7 +22,18 @@ None for the first run.
|
|
|
22
22
|
3. Propose a 10–15 tag taxonomy tailored to the domain. Confirm or accept the user's revision.
|
|
23
23
|
4. Ask the language question: "What language should generated page prose use? Default is `en`. Aliases like `chinese-traditional` or `zh-Hant` are accepted."
|
|
24
24
|
5. Run `skillwiki init --target <dir> --domain "<answer>" --taxonomy "<comma list>" --lang "<lang>"`.
|
|
25
|
-
6.
|
|
25
|
+
6. Report the installed Web Clipper assets at
|
|
26
|
+
`_Templates/web-clipper/llm-wiki-clippings.json` and
|
|
27
|
+
`_Templates/web-clipper/readme.txt`. Tell the user to open Obsidian Web
|
|
28
|
+
Clipper Settings, import the JSON, and repeat the import for every browser
|
|
29
|
+
profile that should capture into the vault. Re-init preserves existing
|
|
30
|
+
customized copies, including short files.
|
|
31
|
+
7. Explain that the generic template preserves `{{content}}`; remote HTTP(S)
|
|
32
|
+
images remain external dependencies. An attended local-asset capture may
|
|
33
|
+
choose any URL-friendly path under `raw/assets/`, but it must write the asset,
|
|
34
|
+
emit an explicit vault-qualified `![[raw/assets/...]]` embed, verify
|
|
35
|
+
resolution/preview, and only then finalize the immutable raw note.
|
|
36
|
+
8. **Suggest first sources.** Propose 3–5 initial sources (URLs, papers, articles) appropriate to the domain. Prompt the user to provide the first one to ingest, then hand off to wiki-ingest.
|
|
26
37
|
|
|
27
38
|
## Stop conditions
|
|
28
39
|
|
|
@@ -15,7 +15,7 @@ Standard four reads.
|
|
|
15
15
|
2. For lint-only maintenance, run `skillwiki lint <vault> --summary`. This returns bounded bucket counts, capped examples, and `details_command` hints without full item arrays.
|
|
16
16
|
3. Drill into important buckets with `skillwiki lint <vault> --only <bucket>` when examples are insufficient for remediation.
|
|
17
17
|
4. Reason over findings; present grouped by severity with concrete suggested actions per kind. If the CLI was recently updated with new lint checks, re-running lint on the full vault may flag pre-existing pages that predate the new rule — treat these as legitimate findings, not false positives.
|
|
18
|
-
5. Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human
|
|
18
|
+
5. Treat `sensitive_content` as a security error. Drill down with `skillwiki lint <vault> --only sensitive_content --human`; never print the secret value. Raw findings are report/quarantine-only: `--fix` must not redact, rewrite, or recompute existing raw evidence. Maintained-page repairs may proceed only through their approved write workflow.
|
|
19
19
|
6. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
|
|
20
20
|
7. **Post-migration verification**: If the user recently migrated content (e.g., moved entity/concept pages to another vault), re-run `skillwiki lint <vault> --summary` and verify that broken_wikilinks count decreased. Remaining broken links for migrated content indicate pages still referencing the moved files — these should be cleaned up (remove citations or migrate the referencing pages too).
|
|
21
21
|
8. Append a `log.md` entry summarizing lint counts only when the user asked to record the maintenance result. Do not log routine `health` reports by default.
|
|
@@ -24,5 +24,6 @@ None — lint reports all findings even on per-page errors.
|
|
|
24
24
|
## Forbidden
|
|
25
25
|
- Auto-rotating logs.
|
|
26
26
|
- Auto-updating sha256 fields.
|
|
27
|
+
- Rewriting or redacting existing raw content/frontmatter, even for a sensitive-content finding.
|
|
27
28
|
- Modifying any page beyond a user-approved lint summary entry in `log.md`.
|
|
28
29
|
- Printing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets in findings or summaries.
|
|
@@ -13,6 +13,8 @@ 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.
|
|
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.
|
|
16
18
|
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
17
19
|
3. **Compute overlap.** `skillwiki overlap <vault>`.
|
|
18
20
|
4. **Score candidates** in prompt using the 4 signals:
|
|
@@ -22,6 +24,9 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
22
24
|
- Type affinity: 1.0×
|
|
23
25
|
5. **Read top candidates** in full (frontmatter + body).
|
|
24
26
|
6. **Synthesize answer** with explicit citations to the candidate pages.
|
|
27
|
+
- When pending evidence was requested, keep the CLI's `pending_sources` separate from ranked typed `results`. Pending captures never change typed scores or ordering.
|
|
28
|
+
- Label raw captures as **pending evidence**, not established vault knowledge. Explain that they have not yet been distilled into a maintained page.
|
|
29
|
+
- Weak typed results may justify suggesting a pending lookup, but never silently broaden the query.
|
|
25
30
|
7. **Sensitive content guard.** Before filing any 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.
|
|
26
31
|
8. **Optional file.** If the user accepts, first run `skillwiki page publish --help`. If it is unavailable, fail closed and leave the result unpublished. Otherwise:
|
|
27
32
|
1. Resolve the vault and create a temporary directory outside the vault.
|
|
@@ -52,4 +57,6 @@ When a wiki page (especially a work item `tasks.md`) claims that fixes were appl
|
|
|
52
57
|
- Filing without the `skillwiki page publish` dry-run passing.
|
|
53
58
|
- Directly creating a final typed page or separately editing `index.md` or `log.md` for its publication.
|
|
54
59
|
- Skipping the orientation reads even for "quick" queries.
|
|
60
|
+
- Treating a pending raw capture as integrated typed knowledge, or mixing it into typed ranking.
|
|
61
|
+
- Silently searching pending sources when the user did not request fresh/raw/unprocessed material.
|
|
55
62
|
- Writing live credentials, access keys, tokens, passwords, cookies, bearer headers, private keys, or other authenticating secrets to the vault.
|
|
@@ -8,7 +8,7 @@ description: Detect and act on source drift. Runs skillwiki drift, reviews chang
|
|
|
8
8
|
## When This Skill Activates
|
|
9
9
|
|
|
10
10
|
- User wants to check if any vault sources have changed since ingestion.
|
|
11
|
-
- Periodic drift check during lint or maintenance cycles.
|
|
11
|
+
- Periodic drift check during lint or maintenance cycles; scheduled/headless runs report only.
|
|
12
12
|
- User explicitly asks to re-ingest a specific source.
|
|
13
13
|
|
|
14
14
|
## Output language
|
|
@@ -28,17 +28,19 @@ Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
|
28
28
|
- **identity_conflicts:** The fetched source no longer matches the raw filename/source identity. STOP and surface the conflict. Do not archive or reingest until a human chooses the correct source/filename pair.
|
|
29
29
|
- **fetch_failed:** Could not re-fetch. Show error details.
|
|
30
30
|
- **unchanged:** No action needed.
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
31
|
+
3. Report-only is the default. `skillwiki drift --apply` must not rewrite raw hashes or content; it reports the need for a new capture.
|
|
32
|
+
4. For each drifted source, ask the user whether to create a new capture and preserve-archive the old address, or skip.
|
|
33
|
+
5. If the user explicitly approves one source:
|
|
34
|
+
a. Follow `wiki-ingest` to create the updated content as a **new** raw capture. Verify it before changing the old address.
|
|
35
|
+
b. Preview `skillwiki archive <exact-old-raw-path>`.
|
|
36
|
+
c. Apply only with the live `--apply --approve <token>` flow. The old complete bytes move to `raw/archived/<category>/...`; they are never rewritten.
|
|
37
|
+
d. Update maintained concept/entity pages to cite the new capture where the editorial meaning requires it. Relocation history continues to resolve the old archived evidence.
|
|
38
|
+
6. Append a log event/entry summarizing: scanned, drifted, newly captured, archived, skipped.
|
|
37
39
|
|
|
38
40
|
## N9 Compliance
|
|
39
41
|
|
|
40
42
|
Raw files are immutable (N9). Re-ingest never modifies an existing raw file. Instead:
|
|
41
|
-
-
|
|
43
|
+
- Preserve the old raw file under `raw/archived/<category>/` through the attended structural transaction.
|
|
42
44
|
- Create a new raw file with updated content and new sha256.
|
|
43
45
|
- This preserves full provenance history.
|
|
44
46
|
|
|
@@ -51,6 +53,8 @@ Raw files are immutable (N9). Re-ingest never modifies an existing raw file. Ins
|
|
|
51
53
|
## Forbidden
|
|
52
54
|
|
|
53
55
|
- Modifying files in `raw/` directly (N9).
|
|
56
|
+
- Writing new archives to legacy `_archive/raw/`.
|
|
57
|
+
- Running raw structural apply from scheduled or headless maintenance.
|
|
54
58
|
- Re-ingesting without user approval for each drifted source.
|
|
55
59
|
- Re-ingesting a source listed under `identity_conflicts` without explicit user approval and a corrected target filename/source URL.
|
|
56
60
|
- Skipping the drift check and assuming sources have changed.
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: wiki-remove
|
|
3
|
-
description:
|
|
3
|
+
description: Remove maintained vault paths with durable delete intent; raw evidence requires the separate attended exact-target sources dispose workflow.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# wiki-remove
|
|
7
7
|
|
|
8
8
|
## When This Skill Activates
|
|
9
9
|
|
|
10
|
-
- User wants to permanently remove a vault path (not archive-for-reference).
|
|
10
|
+
- User wants to permanently remove a maintained vault path (not archive-for-reference).
|
|
11
|
+
- User explicitly requests permanent disposal of one exact raw object.
|
|
11
12
|
- Cleanup of stale pages that should not return via snapshot resurrection.
|
|
12
13
|
- User says hard delete, remove for real, stop resurrecting.
|
|
13
14
|
|
|
@@ -17,7 +18,7 @@ If `skillwiki` is available: run `skillwiki lang` at the start. Otherwise defaul
|
|
|
17
18
|
|
|
18
19
|
## Pre-orientation
|
|
19
20
|
|
|
20
|
-
Read SCHEMA/index only as needed. Confirm full vault-relative path
|
|
21
|
+
Read SCHEMA/index only as needed. Confirm the full vault-relative path. First classify the target as maintained content or `raw/**` evidence.
|
|
21
22
|
|
|
22
23
|
## Probe (required)
|
|
23
24
|
|
|
@@ -33,7 +34,7 @@ Read SCHEMA/index only as needed. Confirm full vault-relative path with the user
|
|
|
33
34
|
|
|
34
35
|
Do not auto `npm install -g skillwiki` in headless/goal/satellite sessions.
|
|
35
36
|
|
|
36
|
-
## PRIMARY
|
|
37
|
+
## PRIMARY — maintained pages
|
|
37
38
|
|
|
38
39
|
1. Resolve vault: `skillwiki path`.
|
|
39
40
|
2. Confirm path with user.
|
|
@@ -44,9 +45,22 @@ Do not auto `npm install -g skillwiki` in headless/goal/satellite sessions.
|
|
|
44
45
|
5. Commit + push via normal wiki-sync / git (tombstone + deletion must reach private `main` for durability).
|
|
45
46
|
6. Report MODE=primary, paths, and whether remote-delete ran.
|
|
46
47
|
|
|
48
|
+
`skillwiki remove` must refuse every `raw/**` target. Do not bypass that refusal.
|
|
49
|
+
|
|
50
|
+
## PRIMARY — exact raw disposal
|
|
51
|
+
|
|
52
|
+
Permanent raw disposal is exceptional and never inferred from cleanup, dedup, stale, archive, or reingest intent.
|
|
53
|
+
|
|
54
|
+
1. Require an explicit user request naming one exact raw file and a reason. Refuse basenames, globs, directories, symlinks, batches, and inferred targets.
|
|
55
|
+
2. Run `skillwiki sources dispose <exact-raw-path> [vault] --reason "<text>"`.
|
|
56
|
+
3. Present the preview: complete-file SHA-256, byte size, typed/other/asset inbound references, delete-intent path, recoverability statement, operation ID, and approval token.
|
|
57
|
+
4. Only in the same attended session, after the user approves that exact preview, run the identical command with `--write --approve <token>`.
|
|
58
|
+
5. The command revalidates bytes and inbound references under the managed lock, writes append-only approval/completion events plus durable delete intent, then removes the exact object.
|
|
59
|
+
6. Scheduled/headless disposal is always refused. A stale token never authorizes changed state.
|
|
60
|
+
|
|
47
61
|
## FAILSAFE-GIT steps (no skillwiki CLI)
|
|
48
62
|
|
|
49
|
-
Agent **must** have git (and preferably gh) access to private vault remote.
|
|
63
|
+
Agent **must** have git (and preferably gh) access to private vault remote. This fallback is for maintained pages only. If the target is under `raw/`, fail closed until `skillwiki sources dispose` is available; never reproduce raw disposal by hand.
|
|
50
64
|
|
|
51
65
|
1. Confirm path with user. Set `PATH_REL` (vault-relative, no `..`).
|
|
52
66
|
2. Write tombstone `meta/delete-intents/<slug>.json` where slug is path with `/` → `__`, e.g. `summaries/foo.md` → `summaries__foo.md.json`:
|
|
@@ -83,6 +97,7 @@ Delete-Source: failsafe-git
|
|
|
83
97
|
- FAIL CLOSED (no CLI and no private git access).
|
|
84
98
|
- Push to private wiki fails.
|
|
85
99
|
- Path invalid or under `_archive/` without explicit restore/remove policy.
|
|
100
|
+
- Raw target cannot be processed by the attended exact-target CLI flow.
|
|
86
101
|
|
|
87
102
|
## Forbidden
|
|
88
103
|
|
|
@@ -90,6 +105,8 @@ Delete-Source: failsafe-git
|
|
|
90
105
|
- Force-push.
|
|
91
106
|
- Unbounded `rclone sync` / mass remote delete.
|
|
92
107
|
- Claiming fleet delete complete without tombstone on `origin/main` (and push success).
|
|
108
|
+
- Passing raw paths to ordinary `skillwiki remove`, or using FAILSAFE-GIT/bare filesystem deletion for raw evidence.
|
|
109
|
+
- Scheduled, headless, batch, glob, directory, basename-inferred, or stale-token raw disposal.
|
|
93
110
|
|
|
94
111
|
## Reversibility
|
|
95
112
|
|
|
@@ -162,7 +162,7 @@ git -C "$VAULT" rebase --continue
|
|
|
162
162
|
|
|
163
163
|
**Prevention**:
|
|
164
164
|
- Sync more frequently — don't let local fall >5 commits behind origin/main
|
|
165
|
-
-
|
|
165
|
+
- Prefer smaller, attended exact-target archive operations and sync promptly; there is no batch raw-archive apply mode.
|
|
166
166
|
- For vaults with snapshot cron, prefer smaller, more frequent syncs over large batch rebases
|
|
167
167
|
|
|
168
168
|
See `concepts/wiki-sync-rebase-conflict-storm-pattern.md` for detailed analysis.
|
|
@@ -174,72 +174,58 @@ When the user mentions editing from Obsidian desktop and Claude Code on a server
|
|
|
174
174
|
- If both devices edit the same page between syncs, conflicts are inevitable — the Conflict Resolution section handles this.
|
|
175
175
|
- Suggest enabling auto-commit in Obsidian (Community Plugins: `obsidian-git`) to reduce dirty-state drift.
|
|
176
176
|
|
|
177
|
-
##
|
|
178
|
-
Some deployments use a cloud-backed vault (`rclone mount`) with a separate git repository for versioned snapshots. This pattern separates "live working vault" from "versioned backup".
|
|
179
|
-
### Architecture
|
|
180
|
-
```
|
|
181
|
-
~/wiki → rclone mount to cloud storage (S3/IDrive/etc) — live vault
|
|
182
|
-
~/wiki-git → git repository cloned from GitHub — snapshot target
|
|
183
|
-
cron hourly → rsync ~/wiki/ → ~/wiki-git/ → git commit → git push
|
|
184
|
-
```
|
|
185
|
-
On snapshotter hosts, `~/wiki` remains the active SkillWiki vault for path resolution unless the operator explicitly configures otherwise. `~/wiki-git` is snapshot infrastructure, not the default authoring or dev-loop vault. Agents may author the live vault path when the host policy allows it, but should not point project work or `fleet context` at `~/wiki-git` unless `skillwiki path` intentionally resolves there.
|
|
177
|
+
## Host-aware write and promotion authority
|
|
186
178
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
git
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
git reset --hard origin/main
|
|
219
|
-
bash ~/.hermes/scripts/wiki-snapshot.sh # Re-sync fresh
|
|
220
|
-
```
|
|
221
|
-
**Prevention**: Avoid editing the GitHub repo directly via web interface or uncoordinated clones. The canonical flow is **single-writer-git** (see `concepts/vault-write-authority-model.md`):
|
|
222
|
-
- Server (sg01): agents may author the live vault at `~/wiki`; the snapshot job promotes cloud-backed live-vault state into `~/wiki-git`, then commits and pushes — **sole git writer to `main`**
|
|
223
|
-
- macOS/desktop: edit → `wiki-push` rclone copy to S3 (NO git push) → consume sg01 snapshots via `wiki-fetch-notify` (opt-in `WIKI_FETCH_PULL_ON_DELTA=1`) or manual `skillwiki sync`
|
|
224
|
-
- `wiki-sync` skill push is for **explicit** agent/human edit commits only, not automated background pushes
|
|
225
|
-
2. **Slow rsync on rclone mounts**: The rclone FUSE mount can be slow for large directory listings. Use `rsync -q` (quiet) to reduce output overhead, and consider `--delete-delay` instead of `--delete` if file churn is high. The rclone mount latency can cause `du` and `find` operations to timeout — this is normal, not an error.
|
|
226
|
-
3. **Golden Rule violation**: Never mix sync methods on the same vault. If using rclone mount + git snapshotting, do NOT also enable Obsidian Sync, Syncthing, or iCloud on `~/wiki`. The rclone mount IS the sync mechanism.
|
|
227
|
-
4. **Credential exposure**: The rclone mount and git remote use different credentials. Ensure git credentials are cached or use HTTPS with token, but never commit rclone config to git.
|
|
179
|
+
Resolve the live vault with `skillwiki path` first. Then choose the host role:
|
|
180
|
+
|
|
181
|
+
| Host role | Live vault | Authoring surface | Promotion to GitHub |
|
|
182
|
+
| --- | --- | --- | --- |
|
|
183
|
+
| Authorized Git-backed leaf (e.g. macOS) | Git vault from `skillwiki path` | Managed SkillWiki publishers against that vault | `skillwiki sync push "$VAULT"` after lint-delta |
|
|
184
|
+
| Protected snapshotter (sg01) | `/root/wiki` (rclone FUSE; not a Git repo) | Managed SkillWiki publishers against `/root/wiki` | S3 → `wiki-snapshot.timer` (default) → protected `/root/wiki-git` pipeline → GitHub |
|
|
185
|
+
|
|
186
|
+
High-signal safety rule:
|
|
187
|
+
|
|
188
|
+
> Do not author, copy, edit, stage, commit, pull, reset, or push agent changes
|
|
189
|
+
> in `/root/wiki-git`.
|
|
190
|
+
|
|
191
|
+
### Protected snapshotter rules (sg01)
|
|
192
|
+
|
|
193
|
+
- Author only via managed commands against the live vault (`skillwiki path` → usually `/root/wiki`).
|
|
194
|
+
- Do **not** run `skillwiki sync push /root/wiki` (not a Git repo) or `skillwiki sync push /root/wiki-git` (blocked as protected snapshot worktree).
|
|
195
|
+
- Do **not** `cd` into `/root/wiki-git` or `~/wiki-git` for ordinary authoring.
|
|
196
|
+
- Do **not** rsync, copy, or edit files into the snapshot worktree as an agent/operator workflow.
|
|
197
|
+
- Do **not** run `git reset --hard`, direct commits, or manual snapshot scripts to "fix" divergence.
|
|
198
|
+
- Promotion is owned by `wiki-snapshot.timer` by default. Publishers never start systemd units.
|
|
199
|
+
- `skillwiki work-complete` may finish with `committed=false` on sg01; later snapshot promotion owns the Git commit/push.
|
|
200
|
+
|
|
201
|
+
### Authorized Git leaf rules
|
|
202
|
+
|
|
203
|
+
- Use managed publication (`skillwiki page publish`, `skillwiki project-page publish`, etc.) against the resolved Git vault.
|
|
204
|
+
- Then use this skill's push workflow (`skillwiki sync status` → lint-delta → commit → `skillwiki sync push` / `git push` as documented above).
|
|
205
|
+
- Never treat a snapshot worktree mirror as a substitute for the live vault.
|
|
206
|
+
|
|
207
|
+
### Historical rationale (not executable)
|
|
208
|
+
|
|
209
|
+
Some older deployments separated a cloud-backed live vault from a Git snapshot worktree. That architecture still exists on protected snapshotters, but the snapshot worktree is **pipeline-internal**. Historical recipes that rsync into the worktree, reset it hard to origin/main, or run snapshot shell scripts by hand are obsolete and must not be copied.
|
|
228
210
|
|
|
229
211
|
## Stop conditions
|
|
230
|
-
- `skillwiki sync status` reports `not_a_repo` — the vault is not a git repository.
|
|
212
|
+
- `skillwiki sync status` reports `not_a_repo` — the vault is not a git repository. On protected snapshotters this is expected for the FUSE live path; do not switch to `/root/wiki-git` to force a push.
|
|
231
213
|
- Lint errors are found before a push — do not push until resolved.
|
|
232
214
|
- `git push` or `git pull` fails with a network error — report and stop.
|
|
233
215
|
- Peer lock is held or peer stashes exist — abort and ask the user to wait or pass `--force`.
|
|
234
216
|
- Untracked file collision detected on pull — surface to user for manual resolution.
|
|
217
|
+
- Host is a protected snapshotter and the requested operation would author or push via `/root/wiki-git` — refuse and use managed live-vault publication + timer promotion instead.
|
|
235
218
|
|
|
236
219
|
## Forbidden
|
|
237
220
|
- Pushing when lint errors exist.
|
|
238
221
|
- Auto-resolving body conflicts without user review.
|
|
239
222
|
- Force-pushing (`git push --force`).
|
|
240
|
-
-
|
|
223
|
+
- Rewriting raw content/frontmatter to resolve conflicts. Preserve-moves must stay under `raw/` (normally `raw/archived/` or `raw/duplicates/`) and require an attended approved structural command; scheduled/headless sync remains report-only.
|
|
241
224
|
- Stashing without the `wiki-sync:...` name format (breaks peer detection).
|
|
242
225
|
- Force-deleting a peer's lockfile (use `--force` only if peer is confirmed dead).
|
|
226
|
+
- Authoring, copying, editing, staging, committing, pulling, resetting, or pushing agent changes in `/root/wiki-git` (or any configured snapshot worktree).
|
|
227
|
+
- Running `skillwiki sync push` against a protected snapshot worktree or against a non-Git FUSE live vault.
|
|
228
|
+
- Invoking snapshot services/scripts or `git reset --hard` in the snapshot worktree as a recovery shortcut.
|
|
243
229
|
|
|
244
230
|
## Convergence safeguards (2026-07-11)
|
|
245
231
|
|
|
@@ -256,4 +242,3 @@ Drop a local commit from rebase only when every path is proven present on the ta
|
|
|
256
242
|
- CLI: `skillwiki sync lint-delta <vault> --base-ref origin/main`
|
|
257
243
|
- Block publication only when `new_errors > 0`; inherited full debt remains visible.
|
|
258
244
|
- Missing/malformed delta evidence blocks (never silent lint skip).
|
|
259
|
-
|
package/templates/SCHEMA.md
CHANGED
|
@@ -12,7 +12,7 @@ This sets the language of generated page prose. Frontmatter keys, schema section
|
|
|
12
12
|
|
|
13
13
|
## Layers
|
|
14
14
|
|
|
15
|
-
- `raw/` — immutable
|
|
15
|
+
- `raw/` — immutable evidence. Never rewrite existing content/frontmatter or autonomously remove an object. Attended rename/relocate/archive/dedup is allowed only when exact bytes remain somewhere under `raw/`.
|
|
16
16
|
- `entities/`, `concepts/`, `comparisons/`, `queries/` — typed knowledge unified across origin via `provenance:`.
|
|
17
17
|
- `meta/` — cross-project synthesis (notes naming ≥2 projects).
|
|
18
18
|
- `projects/{slug}/` — per-project lifecycle workspace.
|
|
@@ -42,6 +42,7 @@ Rule: every tag on every page MUST appear in this taxonomy. Add new tags here fi
|
|
|
42
42
|
- DO NOT create a page for passing mentions.
|
|
43
43
|
- Split a page when it exceeds ~200 lines.
|
|
44
44
|
- Archive a page when fully superseded — move to `_archive/`, remove from `index.md`.
|
|
45
|
+
- Raw source lifecycle is separate: preserve archived sources under `raw/archived/{articles,papers,transcripts}/` and preserved duplicates under `raw/duplicates/{articles,papers,transcripts}/`. Legacy `_archive/raw/` is read-only compatibility, never a new-write target.
|
|
45
46
|
|
|
46
47
|
## Update Policy
|
|
47
48
|
|
|
@@ -71,8 +72,9 @@ Obsidian-compatible Mermaid rules:
|
|
|
71
72
|
|
|
72
73
|
## Ad-Hoc Capture Format
|
|
73
74
|
|
|
74
|
-
Ad-hoc captures are
|
|
75
|
+
Ad-hoc captures are immutable completed evidence created during development
|
|
75
76
|
(via `/wiki-add-task` or filesystem drop). They live in `raw/transcripts/`.
|
|
77
|
+
Corrections create a new capture or a maintained work-item note; never edit an existing transcript.
|
|
76
78
|
|
|
77
79
|
### Frontmatter
|
|
78
80
|
|
|
@@ -98,15 +100,16 @@ project: # optional: "[[slug]]" for cross-reference
|
|
|
98
100
|
| Aspect | Ad-Hoc Capture | Ingested Source |
|
|
99
101
|
|--------|----------------|-----------------|
|
|
100
102
|
| Location | `raw/transcripts/` | `raw/articles/`, `raw/papers/`, etc. |
|
|
101
|
-
| Mutability |
|
|
103
|
+
| Mutability | Immutable after capture | Immutable after ingest |
|
|
102
104
|
| `sha256` | **Omitted** | Required |
|
|
103
105
|
| `created` | Required | Use `ingested` |
|
|
104
106
|
| Entry | `/wiki-add-task`, filesystem drop | `wiki-ingest`, `skillwiki fetch` |
|
|
105
107
|
|
|
106
108
|
## Obsidian Integration
|
|
107
109
|
|
|
108
|
-
- **
|
|
109
|
-
|
|
110
|
+
- **Stable asset pool:** binary assets may use any flat or URL-friendly nested path under `raw/assets/`; no fixed internal taxonomy such as papers/transcripts is required.
|
|
111
|
+
- Use explicit vault-root embeds such as `![[raw/assets/example/diagram.png]]` so Obsidian preview and GitHub browsing remain unambiguous.
|
|
112
|
+
- Resolve and preview a new local embed before finalizing its raw capture. Once referenced, the asset path freezes; source archive/dedup does not move it. Remote HTTP(S) images remain external dependencies unless separately captured.
|
|
110
113
|
- **Dataview queries** (read-only; do not replace index.md):
|
|
111
114
|
|
|
112
115
|
```dataview
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": "0.1.0",
|
|
3
|
+
"name": "llm-wiki-clippings",
|
|
4
|
+
"behavior": "create",
|
|
5
|
+
"noteContentFormat": "{{content}}",
|
|
6
|
+
"properties": [
|
|
7
|
+
{
|
|
8
|
+
"name": "title",
|
|
9
|
+
"value": "{{title}}",
|
|
10
|
+
"type": "text"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "source_url",
|
|
14
|
+
"value": "{{url}}",
|
|
15
|
+
"type": "text"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "author",
|
|
19
|
+
"value": "{{author|split:\", \"|wikilink|join}}",
|
|
20
|
+
"type": "multitext"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"name": "published",
|
|
24
|
+
"value": "{{published|date:\"YYYY-MM-DD\"}}",
|
|
25
|
+
"type": "date"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "created",
|
|
29
|
+
"value": "{{date|date:\"YYYY-MM-DD\"}}",
|
|
30
|
+
"type": "date"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"name": "ingested",
|
|
34
|
+
"value": "{{date|date:\"YYYY-MM-DD\"}}",
|
|
35
|
+
"type": "date"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "ingested_by",
|
|
39
|
+
"value": "manual",
|
|
40
|
+
"type": "text"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"name": "description",
|
|
44
|
+
"value": "{{description}}",
|
|
45
|
+
"type": "text"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "tags",
|
|
49
|
+
"value": "clippings",
|
|
50
|
+
"type": "multitext"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"triggers": [],
|
|
54
|
+
"noteNameFormat": "{{date|date:\"YYYY-MM-DD\"}}-{{title|safe_name}}",
|
|
55
|
+
"path": "raw/articles"
|
|
56
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
SkillWiki Obsidian Web Clipper template
|
|
2
|
+
|
|
3
|
+
1. Open Obsidian Web Clipper Settings in the browser profile that will capture this vault.
|
|
4
|
+
2. Import llm-wiki-clippings.json.
|
|
5
|
+
3. Confirm the destination path is raw/articles and the behavior is Create.
|
|
6
|
+
4. Repeat the import for every browser profile that should capture into this vault.
|
|
7
|
+
|
|
8
|
+
The generic template preserves Web Clipper's {{content}} output. Remote HTTP(S)
|
|
9
|
+
images remain external dependencies and are not guaranteed to be downloaded or
|
|
10
|
+
available offline.
|
|
11
|
+
|
|
12
|
+
For attended local asset materialization, an agent may choose any URL-friendly
|
|
13
|
+
path under raw/assets/. Write the asset first, use an explicit vault-qualified
|
|
14
|
+
Obsidian embed such as ![[raw/assets/example/diagram.png]], verify the target and
|
|
15
|
+
preview, and only then finalize the new raw capture. Referenced asset paths are
|
|
16
|
+
stable after capture.
|