skillwiki 0.8.0 → 0.8.1-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +831 -316
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +2 -2
- package/skills/README.md +3 -1
- package/skills/hooks/session-start +1 -1
- package/skills/package.json +2 -1
- package/skills/skills/proj-decide/SKILL.md +25 -0
- package/skills/skills/proj-distill/SKILL.md +55 -0
- package/skills/skills/proj-init/SKILL.md +30 -0
- package/skills/skills/proj-work/SKILL.md +69 -0
- package/skills/skills/using-skillwiki/SKILL.md +157 -0
- package/skills/skills/wiki-adapter-prd/SKILL.md +88 -0
- package/skills/skills/wiki-add-task/SKILL.md +102 -0
- package/skills/skills/wiki-archive/SKILL.md +46 -0
- package/skills/skills/wiki-audit/SKILL.md +34 -0
- package/skills/skills/wiki-canvas/SKILL.md +57 -0
- package/skills/skills/wiki-crystallize/SKILL.md +29 -0
- package/skills/skills/wiki-gate-plan-mode/SKILL.md +80 -0
- package/skills/skills/wiki-ingest/SKILL.md +55 -0
- package/skills/skills/wiki-init/SKILL.md +37 -0
- package/skills/skills/wiki-lint/SKILL.md +25 -0
- package/skills/skills/wiki-query/SKILL.md +36 -0
- package/skills/skills/wiki-reingest/SKILL.md +55 -0
- package/skills/skills/wiki-sync/SKILL.md +240 -0
- package/skills/using-skillwiki/SKILL.md +46 -8
- package/skills/wiki-query/SKILL.md +1 -1
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-audit
|
|
4
|
+
description: Verify per-page that every ^[raw/...] resolves and sources frontmatter matches the body.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-audit
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User asks for a per-page audit or invokes a pre-merge gate.
|
|
12
|
+
- A vault is resolvable (see step 0).
|
|
13
|
+
|
|
14
|
+
## Output language
|
|
15
|
+
|
|
16
|
+
Run `skillwiki lang` at the start. Generate audit narrative and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
|
|
17
|
+
|
|
18
|
+
## Pre-orientation reads
|
|
19
|
+
Standard four reads.
|
|
20
|
+
|
|
21
|
+
## Steps
|
|
22
|
+
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
23
|
+
1. `skillwiki audit <page>`. Read the JSON report.
|
|
24
|
+
2. Reason over the report:
|
|
25
|
+
- For each unresolved marker: suggest ingesting the missing source or correcting the path.
|
|
26
|
+
- For each `unused_sources` entry: suggest adding a body marker or removing from `sources:`.
|
|
27
|
+
- For each `missing_from_sources` entry: suggest adding to `sources:`.
|
|
28
|
+
3. Append one `log.md` entry summarizing the audit and any suggested follow-ups.
|
|
29
|
+
|
|
30
|
+
## Stop conditions
|
|
31
|
+
None — audit always completes.
|
|
32
|
+
|
|
33
|
+
## Forbidden
|
|
34
|
+
- Auto-applying suggested fixes (audit is observation-only).
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-canvas
|
|
4
|
+
description: Generate an Obsidian Canvas visualization of the vault graph. Runs skillwiki graph build then skillwiki canvas generate.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-canvas
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User wants a visual map of their vault structure.
|
|
12
|
+
- User asks to see how pages are connected.
|
|
13
|
+
- After significant ingestion or restructuring, user wants an updated overview.
|
|
14
|
+
- User mentions Obsidian Canvas or visual vault exploration.
|
|
15
|
+
|
|
16
|
+
## Pre-orientation reads
|
|
17
|
+
|
|
18
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
19
|
+
|
|
20
|
+
## Steps
|
|
21
|
+
|
|
22
|
+
0. Resolve vault: `skillwiki path`.
|
|
23
|
+
1. Run `skillwiki graph build <vault>` to produce the adjacency graph at `<vault>/.skillwiki/graph.json`. If graph.json already exists and the vault has not changed, this step can be skipped — but regenerate after any ingestion, reingest, archive, or restructuring to keep the canvas current.
|
|
24
|
+
2. Run `skillwiki canvas generate <vault>`. This reads graph.json and writes `<vault>/vault-graph.canvas`.
|
|
25
|
+
3. Present the result to the user: node count, edge count, and the output path.
|
|
26
|
+
4. Advise the user on opening the canvas:
|
|
27
|
+
- In Obsidian, open the vault folder and click `vault-graph.canvas` in the file explorer, or use the Quick Switcher (`Cmd/Ctrl+O`) and search for "vault-graph".
|
|
28
|
+
- Nodes are arranged in columns by type: **entities** (red), **concepts** (green), **comparisons** (orange), **queries** (cyan), **meta** (purple). Unclassified pages appear in yellow in the comparisons column.
|
|
29
|
+
- Edges represent wikilink connections. Click any node to jump to the source page; drag to rearrange.
|
|
30
|
+
- Zoom and pan with mouse/trackpad to explore large vaults.
|
|
31
|
+
5. Append one `log.md` entry noting the canvas generation (node/edge counts).
|
|
32
|
+
|
|
33
|
+
## When to regenerate
|
|
34
|
+
|
|
35
|
+
Regenerate the canvas after any of these events:
|
|
36
|
+
- One or more `wiki-ingest` runs that added new pages.
|
|
37
|
+
- `wiki-reingest` or `wiki-archive` that changed or removed pages.
|
|
38
|
+
- Manual restructuring of the vault directories.
|
|
39
|
+
- After running `wiki-lint` and fixing structural issues.
|
|
40
|
+
|
|
41
|
+
Stale canvases are not harmful, but they will not reflect new or removed pages until regenerated.
|
|
42
|
+
|
|
43
|
+
## Future: Bases view
|
|
44
|
+
|
|
45
|
+
Obsidian Bases (`.base` files) offer tabular data views of vault content. A Bases generation capability may be added in a future version to complement the graph canvas with filterable, sortable table layouts. For now, the canvas is the primary visualization.
|
|
46
|
+
|
|
47
|
+
## Stop conditions
|
|
48
|
+
|
|
49
|
+
- `skillwiki graph build` returns a non-zero exit code — investigate before continuing.
|
|
50
|
+
- `graph.json` is missing or invalid — the canvas command will surface the error; direct the user to run `skillwiki graph build` first.
|
|
51
|
+
- User cancels before generation.
|
|
52
|
+
|
|
53
|
+
## Forbidden
|
|
54
|
+
|
|
55
|
+
- Modifying `vault-graph.canvas` by hand after generation — regenerate it instead.
|
|
56
|
+
- Regenating the canvas without first regenerating graph.json when the vault has changed.
|
|
57
|
+
- Deleting the previous canvas without generating a replacement.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-crystallize
|
|
4
|
+
description: Distill the current working session into a typed-knowledge page with provenance.
|
|
5
|
+
---
|
|
6
|
+
# wiki-crystallize
|
|
7
|
+
## When This Skill Activates
|
|
8
|
+
- User asks to crystallize, consolidate, or promote draft material into typed-knowledge pages.
|
|
9
|
+
- A vault is resolvable (see step 0).
|
|
10
|
+
## Output language
|
|
11
|
+
Run `skillwiki lang` at the start. Generate consolidated page prose and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
|
|
12
|
+
## Pre-orientation reads
|
|
13
|
+
Standard four reads. If cwd is inside `projects/{slug}/`, also read project README and recent work logs.
|
|
14
|
+
## Steps
|
|
15
|
+
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
16
|
+
1. Identify type: entity / concept / comparison / query / summary.
|
|
17
|
+
2. Set `provenance:`. Default `research`. If in project context: `project` with `provenance_projects: ["[[slug]]"]`.
|
|
18
|
+
3. Compose the page with citations pre-attached. Reuse existing `raw/` sources where possible. Every page MUST include:
|
|
19
|
+
- `> **TL;DR:**` blockquote as the first content after the title heading — a one-sentence summary of the page's key takeaway (under 200 chars). See SCHEMA.md `## TL;DR Convention`.
|
|
20
|
+
- For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
|
|
21
|
+
4. `skillwiki validate <page>`. If non-zero, STOP.
|
|
22
|
+
5. Apply writes: page → `index.md` → `log.md`.
|
|
23
|
+
## Stop conditions
|
|
24
|
+
- `validate` non-zero.
|
|
25
|
+
- Missing `provenance:` for project-context runs.
|
|
26
|
+
## Forbidden
|
|
27
|
+
- Filing without explicit `provenance:`.
|
|
28
|
+
- Updating `index.md` before `validate` passes.
|
|
29
|
+
- Writing `[[wikilinks]]` to pages that don't exist in the vault. Before linking, verify the target exists: check `index.md` or `ls` the target directory. If the target doesn't exist yet, use plain text instead of a wikilink.
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-gate-plan-mode
|
|
4
|
+
description: Toggle EnterPlanMode gating — force superpowers planning skills instead of built-in plan mode
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-gate-plan-mode
|
|
8
|
+
|
|
9
|
+
Gate the agent away from Claude Code's built-in `EnterPlanMode` tool, forcing
|
|
10
|
+
all planning through `superpowers:brainstorming` → `superpowers:writing-plans`
|
|
11
|
+
(or a configurable pipeline). Uses `permissions.deny` for two-layer enforcement:
|
|
12
|
+
the tool is removed from the model's context before it ever sees it.
|
|
13
|
+
|
|
14
|
+
## When This Skill Activates
|
|
15
|
+
|
|
16
|
+
- User says "gate plan mode", "disable EnterPlanMode", "force superpowers planning"
|
|
17
|
+
- User asks to toggle, check, or configure plan-mode gating
|
|
18
|
+
- User wants to enforce structured planning workflows in a project
|
|
19
|
+
|
|
20
|
+
## Pre-orientation reads
|
|
21
|
+
|
|
22
|
+
None for the first run.
|
|
23
|
+
|
|
24
|
+
## Steps
|
|
25
|
+
|
|
26
|
+
0. **Parse arguments.** Accept one of:
|
|
27
|
+
- `on` — enable gating (add EnterPlanMode to deny)
|
|
28
|
+
- `off` — disable gating (remove EnterPlanMode from deny)
|
|
29
|
+
- `status` (default if no argument) — report current state
|
|
30
|
+
|
|
31
|
+
1. **Locate settings file.** Check in this order:
|
|
32
|
+
- `~/.claude/settings.json` (user-level, global — primary target for plan-mode gating)
|
|
33
|
+
- `.claude/settings.json` (project-level, checked into repo — use if user specifies project scope)
|
|
34
|
+
If the target file does not exist, create it with `{ "permissions": { "deny": [] } }`.
|
|
35
|
+
|
|
36
|
+
2. **Read current state.** Parse the settings JSON. Check whether `"EnterPlanMode"` is present in `permissions.deny[]`.
|
|
37
|
+
|
|
38
|
+
3. **Apply the requested action:**
|
|
39
|
+
|
|
40
|
+
**`on`:**
|
|
41
|
+
- If `"EnterPlanMode"` is already in `permissions.deny`, report "already gated" and stop.
|
|
42
|
+
- Otherwise, add `"EnterPlanMode"` to `permissions.deny[]`. Create the array if absent.
|
|
43
|
+
- Write the updated JSON back, preserving formatting.
|
|
44
|
+
- Report: "EnterPlanMode gated — agent will use superpowers planning skills."
|
|
45
|
+
|
|
46
|
+
**`off`:**
|
|
47
|
+
- If `"EnterPlanMode"` is not in `permissions.deny`, report "already ungated" and stop.
|
|
48
|
+
- Otherwise, remove `"EnterPlanMode"` from `permissions.deny[]`. If the array is now empty, remove the `deny` key.
|
|
49
|
+
- Write the updated JSON back.
|
|
50
|
+
- Report: "EnterPlanMode ungated — built-in plan mode is available."
|
|
51
|
+
|
|
52
|
+
**`status`:**
|
|
53
|
+
- Check both `~/.claude/settings.json` and `.claude/settings.json`.
|
|
54
|
+
- Report whether EnterPlanMode is currently gated or ungated.
|
|
55
|
+
- If gated, list which settings file contains the deny entry.
|
|
56
|
+
|
|
57
|
+
4. **Suggest CLAUDE.md directive (on action only).** After enabling gating, check whether the project's `CLAUDE.md` contains a planning directive (search for "EnterPlanMode" or "superpowers:brainstorming"). If not found, suggest adding:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
## Planning
|
|
61
|
+
|
|
62
|
+
Use superpowers:brainstorming → superpowers:writing-plans for all planning. EnterPlanMode is disabled.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Do NOT edit CLAUDE.md automatically — only suggest.
|
|
66
|
+
|
|
67
|
+
## Schema Warning
|
|
68
|
+
|
|
69
|
+
The JSON Schema Store's `claude-code-settings.json` schema has a closed regex for `permissions.deny` that includes `ExitPlanMode` but **omits `EnterPlanMode`**. IDEs (VS Code, JetBrains) will show a validation warning. This is a schema staleness issue, not a runtime issue — Claude Code's runtime accepts `EnterPlanMode` in `permissions.deny` and enforces it correctly. See `[[queries/claude-code-plan-mode-schema-validation]]` for full analysis.
|
|
70
|
+
|
|
71
|
+
## Stop conditions
|
|
72
|
+
|
|
73
|
+
- No project directory found (not inside a git repo or project).
|
|
74
|
+
- Settings file exists but is not valid JSON and cannot be parsed.
|
|
75
|
+
|
|
76
|
+
## Forbidden
|
|
77
|
+
|
|
78
|
+
- Do not add any tool other than `EnterPlanMode` to the deny list.
|
|
79
|
+
- Do not modify CLAUDE.md automatically — only suggest changes.
|
|
80
|
+
- Do not remove other entries from `permissions.deny` when toggling off — only remove `EnterPlanMode`.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-ingest
|
|
4
|
+
description: Convert URLs, files, or pasted text into typed-knowledge pages with raw provenance. Supports single and batch mode.
|
|
5
|
+
---
|
|
6
|
+
# wiki-ingest
|
|
7
|
+
## When This Skill Activates
|
|
8
|
+
- User shares a URL, paste, or local file to capture in the vault.
|
|
9
|
+
- The output target is `entities/`, `concepts/`, `comparisons/`, or `queries/`.
|
|
10
|
+
- A vault is resolvable (see step 0).
|
|
11
|
+
## Output language
|
|
12
|
+
Run `skillwiki lang` at the start. Generate page-body prose, narrative sections, and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
|
|
13
|
+
## Pre-orientation reads (mandatory before any write)
|
|
14
|
+
1. `SCHEMA.md`
|
|
15
|
+
2. `index.md`
|
|
16
|
+
3. Last 20–30 entries of `log.md`
|
|
17
|
+
4. (Project context only) `projects/{slug}/README.md` and last ~5 work-item logs.
|
|
18
|
+
## Steps (in order — N6, N7, N8)
|
|
19
|
+
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`. Use the resolved vault path for all writes; use the canonical language for all generated prose.
|
|
20
|
+
1. **Guard.** For each URL: run `skillwiki fetch-guard <url>`. If exit ≠ 0, STOP and surface the error. Do not retry.
|
|
21
|
+
2. **Fetch.** Use `web_fetch` (or read local file) under Layer 2 controls (the CLI Layer 2 fetcher applies in tests; in skill runtime use `web_fetch` directly and treat any error as STOP).
|
|
22
|
+
3. **Hash.** Write the raw file (frontmatter + body). Run `skillwiki hash <raw-file>` and embed the result in raw frontmatter `sha256:`.
|
|
23
|
+
4. **Generate page(s).** Compose typed-knowledge page(s) with citations pre-attached (`^[raw/...]` markers). Every page MUST include:
|
|
24
|
+
- `> **TL;DR:**` blockquote as the first content after the title heading — a one-sentence summary of the page's key takeaway (under 200 chars). See SCHEMA.md `## TL;DR Convention`.
|
|
25
|
+
- For pages tagged `architecture` or explaining workflows/systems: include a Mermaid diagram (`graph TB` or `sequenceDiagram`) in the body. Follow Obsidian-compatible Mermaid rules (see SCHEMA.md `## Mermaid Diagrams`).
|
|
26
|
+
5. **Validate.** For each generated page: run `skillwiki validate <page>`. If exit ≠ 0, STOP — do not write index/log.
|
|
27
|
+
6. **Apply writes in order.** raw → page(s) → `index.md` → `log.md`.
|
|
28
|
+
7. **Confidence flag.** If only one source is cited, set `confidence: low`.
|
|
29
|
+
## Provenance defaults
|
|
30
|
+
- Default `provenance: research`.
|
|
31
|
+
- If cwd is inside `projects/{slug}/`, set `provenance: project` and add `provenance_projects: ["[[slug]]"]`.
|
|
32
|
+
## Raw Data Locality
|
|
33
|
+
Raw ephemeral data (market feeds, logs, transient JSON) must be written to the **project local** `raw/` directory, NOT the cloud-mounted wiki path. See `references/raw-data-locality.md` for the full pattern.
|
|
34
|
+
**Quick rule:**
|
|
35
|
+
- Transient data → `~/projects/{slug}/raw/` (local, git-tracked)
|
|
36
|
+
- Compound pages → `~/wiki/projects/{slug}/compound/` (cloud, durable)
|
|
37
|
+
## Stop conditions
|
|
38
|
+
- `fetch-guard` non-zero.
|
|
39
|
+
- Fetch timeout / size limit exceeded.
|
|
40
|
+
- `validate` non-zero on any page.
|
|
41
|
+
- sha256 already exists in vault for the same source.
|
|
42
|
+
## Forbidden
|
|
43
|
+
- Skipping `fetch-guard`.
|
|
44
|
+
- Updating `index.md` or `log.md` before all pages validate.
|
|
45
|
+
- Modifying any existing file in `raw/`.
|
|
46
|
+
- Writing raw ephemeral data directly to cloud-mounted wiki paths (`~/wiki/`).
|
|
47
|
+
- Writing `[[wikilinks]]` to pages that don't exist in the vault. Before linking, verify the target exists: check `index.md` or `ls` the target directory. If the target doesn't exist yet, use plain text instead of a wikilink.
|
|
48
|
+
## Batch Mode
|
|
49
|
+
When the user provides multiple sources (a directory of files, a list of URLs, or a multi-document input):
|
|
50
|
+
1. **Loop per source.** Execute steps 1–5 for each source individually (guard → fetch → hash → generate → validate).
|
|
51
|
+
2. **Accumulate, don't write yet.** Collect all raw files and pages in memory. Do not write `index.md` or `log.md` until every source has validated.
|
|
52
|
+
3. **Fail fast.** If any page fails validation, STOP. Report all failures. Do not write index/log for any source.
|
|
53
|
+
4. **Deduplication.** Before writing each raw file, check `sha256` against existing vault raw sources. Skip sources whose content is already present.
|
|
54
|
+
5. **Single index/log update.** After all sources validate, write all raw files and pages, then update `index.md` and `log.md` once.
|
|
55
|
+
6. **Progress.** After each source completes validation, report progress (e.g., "Validated 3/10 sources").
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-init
|
|
4
|
+
description: Bootstrap a CodeWiki vault — domain-aware SCHEMA.md, index.md, log.md, and ~/.skillwiki/.env binding. Use when starting a fresh vault.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-init
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User asks to create, build, or start a vault, wiki, or knowledge base.
|
|
12
|
+
- The resolved vault path (see step 0) does not yet contain SCHEMA.md.
|
|
13
|
+
|
|
14
|
+
## Pre-orientation reads
|
|
15
|
+
|
|
16
|
+
None for the first run.
|
|
17
|
+
|
|
18
|
+
## Steps
|
|
19
|
+
|
|
20
|
+
0. **Resolve target.** Run `skillwiki path --init-time` to see what target the CLI will pick. Confirm with the user, or override with `--target <dir>`.
|
|
21
|
+
1. Verify target is empty or has no SCHEMA.md.
|
|
22
|
+
2. Ask the domain question: "What knowledge domain will this vault cover? Be specific."
|
|
23
|
+
3. Propose a 10–15 tag taxonomy tailored to the domain. Confirm or accept the user's revision.
|
|
24
|
+
4. Ask the language question: "What language should generated page prose use? Default is `en`. Aliases like `chinese-traditional` or `zh-Hant` are accepted."
|
|
25
|
+
5. Run `skillwiki init --target <dir> --domain "<answer>" --taxonomy "<comma list>" --lang "<lang>"`.
|
|
26
|
+
6. **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.
|
|
27
|
+
|
|
28
|
+
## Stop conditions
|
|
29
|
+
|
|
30
|
+
- Target non-empty and `--force` not consented.
|
|
31
|
+
- `~/.skillwiki/.env` already binds a different vault or language and `--force` not consented.
|
|
32
|
+
|
|
33
|
+
## Forbidden
|
|
34
|
+
|
|
35
|
+
- Modifying anything outside the target directory or `~/.skillwiki/.env`.
|
|
36
|
+
- Writing to `~/.hermes/.env` (read-only fallback).
|
|
37
|
+
- Running any LLM-driven content generation in this skill.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.2
|
|
3
|
+
name: wiki-lint
|
|
4
|
+
description: Vault health check via the umbrella `skillwiki lint` subcommand. Read-only by default; rotation requires explicit user consent.
|
|
5
|
+
---
|
|
6
|
+
# wiki-lint
|
|
7
|
+
## When This Skill Activates
|
|
8
|
+
- User asks for a vault health report, lint, or audit.
|
|
9
|
+
- Periodic maintenance.
|
|
10
|
+
## Pre-orientation reads
|
|
11
|
+
Standard four reads.
|
|
12
|
+
## Steps
|
|
13
|
+
0. Resolve vault: `skillwiki path` (record source for context).
|
|
14
|
+
- **CRITICAL**: Verify the correct vault when the user has multiple wiki instances (e.g., ~/wiki vs ~/wiki-fin). User may explicitly specify which vault to target — confirm before destructive operations.
|
|
15
|
+
1. Run `skillwiki lint <vault>`. Read the JSON.
|
|
16
|
+
2. Reason over findings; present grouped by severity with concrete suggested actions per kind. If the CLI was recently updated with new lint checks, re-running lint on the full vault may flag pre-existing pages that predate the new rule — treat these as legitimate findings, not false positives.
|
|
17
|
+
3. If `log_rotate_needed` is present and the user consents, run `skillwiki log-rotate <vault> --apply`. Otherwise leave alone.
|
|
18
|
+
4. **Post-migration verification**: If the user recently migrated content (e.g., moved entity/concept pages to another vault), re-run lint 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).
|
|
19
|
+
5. Append one `log.md` entry summarizing the lint counts (errors/warnings/info).
|
|
20
|
+
## Stop conditions
|
|
21
|
+
None — lint reports all findings even on per-page errors.
|
|
22
|
+
## Forbidden
|
|
23
|
+
- Auto-rotating logs.
|
|
24
|
+
- Auto-updating sha256 fields.
|
|
25
|
+
- Modifying any page beyond the lint summary entry in `log.md`.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.2
|
|
3
|
+
name: wiki-query
|
|
4
|
+
description: Search the vault and synthesize an answer with E2 4-signal ranking. Optional file to queries/ or comparisons/.
|
|
5
|
+
---
|
|
6
|
+
# wiki-query
|
|
7
|
+
## When This Skill Activates
|
|
8
|
+
- User asks a question that should be answered from vault contents.
|
|
9
|
+
- A vault is resolvable (see step 0).
|
|
10
|
+
## Output language
|
|
11
|
+
Run `skillwiki lang` at the start. Generate query-result prose and `--human` summaries in the resolved language. Frontmatter keys, file names, schema headers, index/log structural lines, citation markers, and wikilink slugs MUST stay English.
|
|
12
|
+
## Pre-orientation reads
|
|
13
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
14
|
+
## Steps
|
|
15
|
+
0. **Resolve vault and language.** Run `skillwiki path` (fail if NO_VAULT_CONFIGURED) and `skillwiki lang`.
|
|
16
|
+
1. **Determine scope.** Ask the user once if ambiguous: vault | current project | project+concepts.
|
|
17
|
+
2. **Refresh graph.** If `.skillwiki/graph.json` is missing or older than 24h: `skillwiki graph build <vault>`.
|
|
18
|
+
3. **Compute overlap.** `skillwiki overlap <vault>`.
|
|
19
|
+
4. **Score candidates** in prompt using the 4 signals:
|
|
20
|
+
- Direct wikilink: 3.0×
|
|
21
|
+
- Source overlap: 4.0× (read from overlap output)
|
|
22
|
+
- Adamic-Adar: 1.5× (read from graph output)
|
|
23
|
+
- Type affinity: 1.0×
|
|
24
|
+
5. **Read top candidates** in full (frontmatter + body).
|
|
25
|
+
6. **Synthesize answer** with explicit citations to the candidate pages.
|
|
26
|
+
7. **Optional file.** If user accepts: write to `queries/<slug>.md` or `comparisons/<slug>.md` with full frontmatter, validate, then update `index.md` then `log.md`.
|
|
27
|
+
## Stop conditions
|
|
28
|
+
- Zero matching pages.
|
|
29
|
+
- User declines to file.
|
|
30
|
+
## Pitfalls
|
|
31
|
+
### Claimed-status vs actual-state gap
|
|
32
|
+
When a wiki page (especially a work item `tasks.md`) claims that fixes were applied, features were completed, or files were removed — **verify on disk before accepting the claim**. In one incident, a `tasks.md` marked 6 items DONE but 5 were not actually applied: a script claimed "removed" was still 2020 bytes on disk, a crontab claimed "updated to 30min" was still `*/10`, and a build target claimed "verified has consumers" had no web server serving it.
|
|
33
|
+
**Rule**: After reading a work item that declares completion, run at least one verification command per critical claim (check file existence, grep a config, inspect a crontab). Documents can drift from reality — the filesystem is the source of truth.
|
|
34
|
+
## Forbidden
|
|
35
|
+
- Filing without `validate` passing.
|
|
36
|
+
- Skipping the orientation reads even for "quick" queries.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.2.1
|
|
3
|
+
name: wiki-reingest
|
|
4
|
+
description: Detect and act on source drift. Runs skillwiki drift, reviews changes, archives old raw + ingests new content.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# wiki-reingest
|
|
8
|
+
|
|
9
|
+
## When This Skill Activates
|
|
10
|
+
|
|
11
|
+
- User wants to check if any vault sources have changed since ingestion.
|
|
12
|
+
- Periodic drift check during lint or maintenance cycles.
|
|
13
|
+
- User explicitly asks to re-ingest a specific source.
|
|
14
|
+
|
|
15
|
+
## Output language
|
|
16
|
+
|
|
17
|
+
Run `skillwiki lang` at the start. Generate log entries in the resolved language.
|
|
18
|
+
|
|
19
|
+
## Pre-orientation reads
|
|
20
|
+
|
|
21
|
+
Standard four reads (SCHEMA, index, log, project context if applicable).
|
|
22
|
+
|
|
23
|
+
## Steps
|
|
24
|
+
|
|
25
|
+
0. Resolve vault: `skillwiki path` and `skillwiki lang`.
|
|
26
|
+
1. Run `skillwiki drift [vault]`. Read the JSON output.
|
|
27
|
+
2. Present findings grouped by status:
|
|
28
|
+
- **drifted:** Source content has changed. Show stored vs current sha256.
|
|
29
|
+
- **fetch_failed:** Could not re-fetch. Show error details.
|
|
30
|
+
- **unchanged:** No action needed.
|
|
31
|
+
3. For each drifted source, ask the user: archive old + ingest new, or skip?
|
|
32
|
+
4. If the user approves re-ingest for a source:
|
|
33
|
+
a. Run `skillwiki archive <raw-path>` to archive the old raw file.
|
|
34
|
+
b. Follow the `wiki-ingest` skill to ingest the updated content as a new raw file.
|
|
35
|
+
c. Update any concept/entity pages that cite the old source to reference the new one.
|
|
36
|
+
5. Append a `log.md` entry summarizing: scanned, drifted, re-ingested, skipped.
|
|
37
|
+
|
|
38
|
+
## N9 Compliance
|
|
39
|
+
|
|
40
|
+
Raw files are immutable (N9). Re-ingest never modifies an existing raw file. Instead:
|
|
41
|
+
- Archive the old raw file (moves to `_archive/raw/`).
|
|
42
|
+
- Create a new raw file with updated content and new sha256.
|
|
43
|
+
- This preserves full provenance history.
|
|
44
|
+
|
|
45
|
+
## Stop conditions
|
|
46
|
+
|
|
47
|
+
- `skillwiki drift` returns non-zero exit code other than DRIFT_DETECTED.
|
|
48
|
+
- User declines all re-ingest actions.
|
|
49
|
+
- No raw sources have `source_url` (nothing to check).
|
|
50
|
+
|
|
51
|
+
## Forbidden
|
|
52
|
+
|
|
53
|
+
- Modifying files in `raw/` directly (N9).
|
|
54
|
+
- Re-ingesting without user approval for each drifted source.
|
|
55
|
+
- Skipping the drift check and assuming sources have changed.
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
---
|
|
2
|
+
version: 0.6.1
|
|
3
|
+
name: wiki-sync
|
|
4
|
+
description: Safely sync the vault git repository — multi-session safe via advisory lockfile. Handles rebase conflict storms from archive-commit × snapshot-stream patterns. Runs skillwiki sync status, then guides push or pull with lint guards and conflict resolution.
|
|
5
|
+
---
|
|
6
|
+
# wiki-sync
|
|
7
|
+
## When This Skill Activates
|
|
8
|
+
- User wants to push local vault changes to the remote.
|
|
9
|
+
- User wants to pull remote changes into their local vault.
|
|
10
|
+
- User asks about vault sync status, git state, or multi-device coordination.
|
|
11
|
+
- Multiple Claude Code sessions targeting the same vault.
|
|
12
|
+
- Periodic maintenance before or after editing sessions.
|
|
13
|
+
## Pre-orientation reads
|
|
14
|
+
Standard four reads.
|
|
15
|
+
## Steps
|
|
16
|
+
0. Resolve vault: `skillwiki path` (record source for context).
|
|
17
|
+
|
|
18
|
+
## Pre-flight peer check (multi-session safe)
|
|
19
|
+
|
|
20
|
+
**Before any git stash or pull/push operation**, check for peer sessions:
|
|
21
|
+
|
|
22
|
+
1. Run `skillwiki sync peers <vault>` to detect other sessions with active locks or recent `wiki-sync:*` stashes.
|
|
23
|
+
2. If any non-self peer is present (locked or has stashes newer than 5 minutes):
|
|
24
|
+
- Surface the peer's session_id, PID, and summary to the user
|
|
25
|
+
- Ask the user to wait for the peer to finish, or pass `--force` to proceed anyway
|
|
26
|
+
- If `--force` is not given and peer is detected, **abort and exit**
|
|
27
|
+
3. Acquire an advisory lock: `skillwiki sync lock <vault> --summary "wiki-sync <op>"` (where `<op>` is "pull" or "push")
|
|
28
|
+
- If lock is held (exit code 48), surface the holder (session_id, PID, summary) and abort
|
|
29
|
+
4. **Always pair with unlock on exit** (success or error):
|
|
30
|
+
- `skillwiki sync unlock <vault>` in a finally block or error handler
|
|
31
|
+
|
|
32
|
+
### Stash backlog warning
|
|
33
|
+
|
|
34
|
+
On every invocation, count `wiki-sync:*` stashes older than 24 hours via `skillwiki sync peers`:
|
|
35
|
+
- If any old stashes exist, warn the user: "Found N wiki-sync stash(es) older than 24h — audit and clean before proceeding"
|
|
36
|
+
- **Do not auto-drop old stashes** — the user audits each one
|
|
37
|
+
|
|
38
|
+
## Sync workflow
|
|
39
|
+
|
|
40
|
+
1. Run `skillwiki sync status <vault>`. Read the JSON output.
|
|
41
|
+
- Exit code 0: vault is clean (nothing to sync).
|
|
42
|
+
- Exit code 22: warnings — dirty/ahead/behind (needs action).
|
|
43
|
+
2. Present the current state: `status`, `dirty`, `ahead`, `behind`, `last_commit`.
|
|
44
|
+
3. Ask the user which operation they want: **push**, **pull**, or **both** (pull then push).
|
|
45
|
+
|
|
46
|
+
### Push workflow
|
|
47
|
+
4. If vault is dirty, ask the user to review uncommitted changes before proceeding.
|
|
48
|
+
5. Run `skillwiki lint <vault>`. If errors exist, stop and report — do not push lint errors to remote.
|
|
49
|
+
6. If lint passes (errors = 0), stage and commit:
|
|
50
|
+
- `git -C <vault> add -A`
|
|
51
|
+
- `git -C <vault> commit -m "sync: vault update $(date -u +%Y-%m-%dT%H:%MZ)"`
|
|
52
|
+
7. Run `git -C <vault> push origin HEAD`. Report result.
|
|
53
|
+
8. Append one `log.md` entry summarizing: files pushed, lint result, commit hash.
|
|
54
|
+
|
|
55
|
+
### Pull workflow
|
|
56
|
+
9. Run `skillwiki sync status <vault> --include-stashes` to check for untracked file collisions (see Untracked file fingerprint below).
|
|
57
|
+
10. If vault is dirty, stash first with the identifiable name format:
|
|
58
|
+
```bash
|
|
59
|
+
VAULT="<vault>"
|
|
60
|
+
SESSION_ID="$(echo $CLAUDE_SESSION_ID)" # or fallback to PID/hostname
|
|
61
|
+
CWD_HASH="$(echo -n "$VAULT" | sha256sum | cut -c1-8)"
|
|
62
|
+
ISO_TS="$(date -u +%Y-%m-%dT%H:%MZ)"
|
|
63
|
+
MSG="wiki-sync:${SESSION_ID}:${CWD_HASH}:${ISO_TS}:pre-pull"
|
|
64
|
+
git -C "$VAULT" stash push -m "$MSG"
|
|
65
|
+
```
|
|
66
|
+
11. Run `git -C <vault> pull --rebase origin HEAD`. Report result.
|
|
67
|
+
12. If a stash was created, pop it: `git -C <vault> stash pop`.
|
|
68
|
+
13. If conflicts occur during stash pop, identify them and present to the user for resolution (see Conflict Resolution below).
|
|
69
|
+
14. Run `skillwiki lint <vault>` after pull to verify vault integrity.
|
|
70
|
+
15. Append one `log.md` entry summarizing: commits pulled, lint result, any conflicts.
|
|
71
|
+
|
|
72
|
+
### Pull-then-push workflow
|
|
73
|
+
16. Execute the pull workflow (steps 9-14) first.
|
|
74
|
+
17. Then execute the push workflow (steps 4-8).
|
|
75
|
+
|
|
76
|
+
## Stash naming convention
|
|
77
|
+
|
|
78
|
+
When `wiki-sync` creates a stash, use the identifiable message format:
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
wiki-sync:{session_id}:{cwd_hash}:{iso8601_timestamp}:{summary}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
- **session_id**: prefer `$CLAUDE_SESSION_ID` env var if set, else `$$` (shell PID), else `unknown`
|
|
85
|
+
- **cwd_hash**: first 8 chars of sha256(`$VAULT` path)
|
|
86
|
+
- **iso8601_timestamp**: e.g., `2026-05-23T03:25:00Z` (UTC)
|
|
87
|
+
- **summary**: short label like `pre-pull`, `pre-push`, or custom reason
|
|
88
|
+
|
|
89
|
+
This allows any session to list `git stash list` and identify which stash came from which session/working directory.
|
|
90
|
+
|
|
91
|
+
## Untracked file fingerprint (pre-pull)
|
|
92
|
+
|
|
93
|
+
Before `git pull --rebase`, check for untracked files that exist on the remote and may collide:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
for f in $(git -C "$VAULT" ls-files --others --exclude-standard); do
|
|
97
|
+
if git -C "$VAULT" cat-file -e "origin/main:$f" 2>/dev/null; then
|
|
98
|
+
# File exists on remote; check if identical
|
|
99
|
+
if diff -q <(git -C "$VAULT" show "origin/main:$f") "$VAULT/$f" >/dev/null 2>&1; then
|
|
100
|
+
# Byte-identical — safe to remove (presync artifact)
|
|
101
|
+
rm "$VAULT/$f"
|
|
102
|
+
else
|
|
103
|
+
# DIFFERENT — surface to user, DO NOT silently --include-untracked
|
|
104
|
+
echo "UNTRACKED COLLISION: $f differs from origin/main — surface to user for resolution"
|
|
105
|
+
fi
|
|
106
|
+
fi
|
|
107
|
+
# If file does not exist on remote, leave it alone (pull won't touch it)
|
|
108
|
+
done
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
If collisions are found (different content), ask the user to resolve manually before pulling.
|
|
112
|
+
|
|
113
|
+
## Conflict Resolution
|
|
114
|
+
|
|
115
|
+
When merge conflicts are detected:
|
|
116
|
+
|
|
117
|
+
### Frontmatter conflicts
|
|
118
|
+
- For `updated:` fields: always take the newer timestamp (compare both sides, keep the later one).
|
|
119
|
+
- For all other frontmatter fields: present both versions to the user and ask which to keep.
|
|
120
|
+
|
|
121
|
+
### Body conflicts
|
|
122
|
+
- Do not auto-resolve body conflicts.
|
|
123
|
+
- Mark unresolved regions with `???` on a line by itself between the conflicting versions, so the user can see both sides and decide.
|
|
124
|
+
- Example:
|
|
125
|
+
```
|
|
126
|
+
Content from local version
|
|
127
|
+
???
|
|
128
|
+
Content from remote version
|
|
129
|
+
```
|
|
130
|
+
- After resolving conflicts, run `skillwiki lint <vault>` to verify before committing.
|
|
131
|
+
|
|
132
|
+
### Modify/delete conflicts
|
|
133
|
+
|
|
134
|
+
When `git pull --rebase` reports `CONFLICT (modify/delete)`:
|
|
135
|
+
|
|
136
|
+
1. Identify the commit that deleted the file:
|
|
137
|
+
```bash
|
|
138
|
+
git -C "$VAULT" log --diff-filter=D --pretty=oneline -- <path>
|
|
139
|
+
```
|
|
140
|
+
2. Read the commit message and any retro / log entry referencing it to determine if the deletion was intentional or accidental.
|
|
141
|
+
3. Decide:
|
|
142
|
+
- `git -C "$VAULT" rm <path>` — accept the deletion (rebase continues)
|
|
143
|
+
- `git -C "$VAULT" add <path>` — keep the local restoration (rebase continues)
|
|
144
|
+
4. `git -C "$VAULT" rebase --continue`.
|
|
145
|
+
|
|
146
|
+
### Rebase conflict storm (archive commits × snapshot stream)
|
|
147
|
+
|
|
148
|
+
When many local archive-only commits (e.g., `archive: moved X to _archive/`) are rebased over an origin/main that receives frequent snapshot commits (e.g., sg01 `Snapshot YYYYMMDD_HHMMSS`), every archive commit re-triggers the same content conflicts on shared files (`log.md`, `knowledge.md`, `spec.md`). This is predictable and can be resolved systematically.
|
|
149
|
+
|
|
150
|
+
**Detection**: 3+ consecutive rebase stops on commits whose message matches `^archive: moved`.
|
|
151
|
+
|
|
152
|
+
**Resolution**: For each archive commit during the storm:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
# Apply --ours to all conflicting files (keep HEAD = origin/main + snapshots)
|
|
156
|
+
for f in $(git -C "$VAULT" diff --name-only --diff-filter=U); do
|
|
157
|
+
git -C "$VAULT" checkout --ours "$f" && git -C "$VAULT" add "$f"
|
|
158
|
+
done
|
|
159
|
+
git -C "$VAULT" rebase --continue
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
**After the storm passes** (non-archive commits or clean rebase), pop the stash and handle any remaining conflicts per the normal Conflict Resolution sections above.
|
|
163
|
+
|
|
164
|
+
**Prevention**:
|
|
165
|
+
- Sync more frequently — don't let local fall >5 commits behind origin/main
|
|
166
|
+
- Bundle archive commits — `skillwiki archive --batch` groups 5-10 transcript archives into one commit, reducing rebase surface
|
|
167
|
+
- For vaults with snapshot cron, prefer smaller, more frequent syncs over large batch rebases
|
|
168
|
+
|
|
169
|
+
See `concepts/wiki-sync-rebase-conflict-storm-pattern.md` for detailed analysis.
|
|
170
|
+
|
|
171
|
+
## Multi-device coordination
|
|
172
|
+
When the user mentions editing from Obsidian desktop and Claude Code on a server (or any two-device setup):
|
|
173
|
+
- Recommend pulling before every editing session on each device.
|
|
174
|
+
- Recommend pushing after every editing session on each device.
|
|
175
|
+
- If both devices edit the same page between syncs, conflicts are inevitable — the Conflict Resolution section handles this.
|
|
176
|
+
- Suggest enabling auto-commit in Obsidian (Community Plugins: `obsidian-git`) to reduce dirty-state drift.
|
|
177
|
+
|
|
178
|
+
## Rclone-backed vault with git snapshotting (cron pattern)
|
|
179
|
+
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".
|
|
180
|
+
### Architecture
|
|
181
|
+
```
|
|
182
|
+
~/wiki → rclone mount to cloud storage (S3/IDrive/etc) — live vault
|
|
183
|
+
~/wiki-git → git repository cloned from GitHub — snapshot target
|
|
184
|
+
cron hourly → rsync ~/wiki/ → ~/wiki-git/ → git commit → git push
|
|
185
|
+
```
|
|
186
|
+
### Implementation (wiki-snapshot.sh)
|
|
187
|
+
```bash
|
|
188
|
+
#!/bin/bash
|
|
189
|
+
WIKI_DIR="/root/wiki"
|
|
190
|
+
GIT_DIR="/root/wiki-git"
|
|
191
|
+
DATE=$(date +%Y%m%d_%H%M%S)
|
|
192
|
+
# Sync from rclone mount to git repo (quiet mode for slow mounts)
|
|
193
|
+
rsync -a --delete -q \
|
|
194
|
+
--exclude='.snapshots' --exclude='.git' --exclude='.obsidian' --exclude='.skillwiki' \
|
|
195
|
+
"$WIKI_DIR/" "$GIT_DIR/"
|
|
196
|
+
cd "$GIT_DIR" || exit 1
|
|
197
|
+
git config user.email "cron@hermes.local"
|
|
198
|
+
git config user.name "Hermes Snapshot"
|
|
199
|
+
# Check for changes
|
|
200
|
+
if [ -z "$(git status --porcelain)" ]; then
|
|
201
|
+
exit 0 # Nothing to commit
|
|
202
|
+
fi
|
|
203
|
+
git add -A
|
|
204
|
+
git commit -m "Snapshot $DATE"
|
|
205
|
+
# Pull with rebase to handle remote changes (e.g., README edits on GitHub)
|
|
206
|
+
if ! git pull --rebase origin main 2>/dev/null; then
|
|
207
|
+
git pull origin main 2>/dev/null || true
|
|
208
|
+
fi
|
|
209
|
+
git push origin main || echo "Push failed"
|
|
210
|
+
```
|
|
211
|
+
### Pitfalls specific to this pattern
|
|
212
|
+
1. **Divergent branches from external pushes**: If something else pushes to the same GitHub repo (manual edits from macOS desktop, GitHub web UI edits, another server), the local `~/wiki-git` will diverge. The `--rebase` flag handles most cases, but if commits conflict:
|
|
213
|
+
```bash
|
|
214
|
+
cd ~/wiki-git
|
|
215
|
+
git rebase --abort 2>/dev/null || true
|
|
216
|
+
git fetch origin main
|
|
217
|
+
git reset --hard origin/main
|
|
218
|
+
bash ~/.hermes/scripts/wiki-snapshot.sh # Re-sync fresh
|
|
219
|
+
```
|
|
220
|
+
**Prevention**: Avoid editing the GitHub repo directly via web interface or uncoordinated clones. The canonical flow is:
|
|
221
|
+
- Server: rclone mount → rsync → git commit → git push
|
|
222
|
+
- macOS/desktop: git pull → edit → git commit → git push → server pulls on next cron
|
|
223
|
+
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.
|
|
224
|
+
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.
|
|
225
|
+
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.
|
|
226
|
+
|
|
227
|
+
## Stop conditions
|
|
228
|
+
- `skillwiki sync status` reports `not_a_repo` — the vault is not a git repository. Advise the user to initialize one.
|
|
229
|
+
- Lint errors are found before a push — do not push until resolved.
|
|
230
|
+
- `git push` or `git pull` fails with a network error — report and stop.
|
|
231
|
+
- Peer lock is held or peer stashes exist — abort and ask the user to wait or pass `--force`.
|
|
232
|
+
- Untracked file collision detected on pull — surface to user for manual resolution.
|
|
233
|
+
|
|
234
|
+
## Forbidden
|
|
235
|
+
- Pushing when lint errors exist.
|
|
236
|
+
- Auto-resolving body conflicts without user review.
|
|
237
|
+
- Force-pushing (`git push --force`).
|
|
238
|
+
- Modifying files in `raw/` to resolve conflicts (N9 — archive and re-ingest instead).
|
|
239
|
+
- Stashing without the `wiki-sync:...` name format (breaks peer detection).
|
|
240
|
+
- Force-deleting a peer's lockfile (use `--force` only if peer is confirmed dead).
|