skillwiki 0.10.21 → 0.10.22
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-I5JD3BQZ.js → chunk-54JVBNWK.js} +1 -1
- package/dist/{chunk-UNPZDCWN.js → chunk-7YDWC6D3.js} +12 -5
- package/dist/{chunk-65Q5UGND.js → chunk-BASWDOQB.js} +2 -2
- package/dist/{chunk-Y6KRDGI2.js → chunk-C2DKFJFA.js} +6 -1
- package/dist/{chunk-GNS2ZV5P.js → chunk-PQG26AGJ.js} +1 -1
- package/dist/cli.js +1788 -194
- package/dist/{index-projection-HAXDEM2F.js → index-projection-Q6WL76SO.js} +2 -2
- package/dist/{managed-write-preflight-CTXX2MHQ.js → managed-write-preflight-4LPVMP42.js} +3 -3
- package/dist/skillwiki-mcp.js +4 -4
- package/package.json +1 -1
- package/skills/.claude-plugin/plugin.json +1 -1
- package/skills/.codex-plugin/plugin.json +1 -1
- 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/wiki-sync/SKILL.md +37 -51
- package/skills/wiki-sync/SKILL.md +37 -51
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import {
|
|
3
3
|
runManagedWritePreflight,
|
|
4
4
|
runManagedWriteTransaction
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-BASWDOQB.js";
|
|
6
|
+
import "./chunk-PQG26AGJ.js";
|
|
7
|
+
import "./chunk-C2DKFJFA.js";
|
|
8
8
|
export {
|
|
9
9
|
runManagedWritePreflight,
|
|
10
10
|
runManagedWriteTransaction
|
package/dist/skillwiki-mcp.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
runSkillwikiMcpStdio
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-7YDWC6D3.js";
|
|
5
5
|
import "./chunk-7I2TPIV5.js";
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-54JVBNWK.js";
|
|
7
|
+
import "./chunk-PQG26AGJ.js";
|
|
8
|
+
import "./chunk-C2DKFJFA.js";
|
|
9
9
|
|
|
10
10
|
// src/mcp-entry.ts
|
|
11
11
|
runSkillwikiMcpStdio().catch((error) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "skillwiki",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.22",
|
|
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/package.json
CHANGED
|
@@ -12,13 +12,43 @@ description: Write an Architectural Decision Record (ADR). If the decision gener
|
|
|
12
12
|
Standard four + project context.
|
|
13
13
|
|
|
14
14
|
## Steps
|
|
15
|
-
1.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
1. Resolve vault with `skillwiki path`. Draft the ADR **outside** the authoritative target path (temp file or work-item draft). Prefer frontmatter compatible with typed-knowledge architecture pages:
|
|
16
|
+
- `type: concept`
|
|
17
|
+
- `tags` include `adr` for newly created architecture pages
|
|
18
|
+
- `provenance: project` or `mixed`
|
|
19
|
+
- `provenance_projects` includes `[[{slug}]]`
|
|
20
|
+
- Target path: `projects/{slug}/architecture/YYYY-MM-DD-{adr-slug}.md`
|
|
21
|
+
- If no project context exists, default to `playground`.
|
|
22
|
+
2. Dry-run the managed Layer-3 publisher (read-only; emits an approval token):
|
|
23
|
+
```bash
|
|
24
|
+
skillwiki project-page publish <draft> "$VAULT" \
|
|
25
|
+
--project <slug> \
|
|
26
|
+
--target projects/<slug>/architecture/YYYY-MM-DD-<adr-slug>.md \
|
|
27
|
+
--log-note "<one-line note>"
|
|
28
|
+
```
|
|
29
|
+
Review target state, draft SHA, prior target hash, and the returned `approval_token` with the human.
|
|
30
|
+
3. On human approval, publish with the exact token from the dry-run (do not re-author between dry-run and write):
|
|
31
|
+
```bash
|
|
32
|
+
skillwiki project-page publish <draft> "$VAULT" \
|
|
33
|
+
--project <slug> \
|
|
34
|
+
--target projects/<slug>/architecture/YYYY-MM-DD-<adr-slug>.md \
|
|
35
|
+
--log-note "<same one-line note>" \
|
|
36
|
+
--write --approve <token>
|
|
37
|
+
```
|
|
38
|
+
4. Verify the touched page and project knowledge index (`projects/{slug}/knowledge.md`). Do **not** hand-edit root `index.md` for architecture pages — the publisher owns project knowledge projection.
|
|
39
|
+
5. **Generalization check.** If the decision applies beyond this project, draft a `concepts/` page with `provenance: project` (or `mixed` if research-informed) and publish it with `skillwiki page publish` (prefer `--approve` for this workstream).
|
|
40
|
+
6. Host-aware promotion:
|
|
41
|
+
- Authorized Git leaf: `skillwiki sync` / `skillwiki sync push` after lint-delta.
|
|
42
|
+
- Protected snapshotter (sg01): leave promotion to `wiki-snapshot.timer`; never author or push via `/root/wiki-git`.
|
|
19
43
|
|
|
20
44
|
## Stop conditions
|
|
21
|
-
- `
|
|
45
|
+
- `project-page publish` dry-run or approved write exits non-zero.
|
|
46
|
+
- Approval token missing/mismatched — re-run dry-run; do not force a write.
|
|
47
|
+
- Host is a protected snapshotter and the operator asks to edit `/root/wiki-git` — refuse.
|
|
22
48
|
|
|
23
49
|
## Forbidden
|
|
50
|
+
- Direct writes into `projects/{slug}/architecture/` without `skillwiki project-page publish`.
|
|
51
|
+
- Hand-editing root `index.md` for architecture ADRs.
|
|
24
52
|
- Filing the concept page without explicit `provenance:`.
|
|
53
|
+
- Do not author, copy, edit, stage, commit, pull, reset, or push agent changes in `/root/wiki-git`.
|
|
54
|
+
- Running snapshot scripts or `git reset --hard` in the snapshot worktree as a publication shortcut.
|
|
@@ -12,13 +12,43 @@ description: Write an Architectural Decision Record (ADR). If the decision gener
|
|
|
12
12
|
Standard four + project context.
|
|
13
13
|
|
|
14
14
|
## Steps
|
|
15
|
-
1.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
1. Resolve vault with `skillwiki path`. Draft the ADR **outside** the authoritative target path (temp file or work-item draft). Prefer frontmatter compatible with typed-knowledge architecture pages:
|
|
16
|
+
- `type: concept`
|
|
17
|
+
- `tags` include `adr` for newly created architecture pages
|
|
18
|
+
- `provenance: project` or `mixed`
|
|
19
|
+
- `provenance_projects` includes `[[{slug}]]`
|
|
20
|
+
- Target path: `projects/{slug}/architecture/YYYY-MM-DD-{adr-slug}.md`
|
|
21
|
+
- If no project context exists, default to `playground`.
|
|
22
|
+
2. Dry-run the managed Layer-3 publisher (read-only; emits an approval token):
|
|
23
|
+
```bash
|
|
24
|
+
skillwiki project-page publish <draft> "$VAULT" \
|
|
25
|
+
--project <slug> \
|
|
26
|
+
--target projects/<slug>/architecture/YYYY-MM-DD-<adr-slug>.md \
|
|
27
|
+
--log-note "<one-line note>"
|
|
28
|
+
```
|
|
29
|
+
Review target state, draft SHA, prior target hash, and the returned `approval_token` with the human.
|
|
30
|
+
3. On human approval, publish with the exact token from the dry-run (do not re-author between dry-run and write):
|
|
31
|
+
```bash
|
|
32
|
+
skillwiki project-page publish <draft> "$VAULT" \
|
|
33
|
+
--project <slug> \
|
|
34
|
+
--target projects/<slug>/architecture/YYYY-MM-DD-<adr-slug>.md \
|
|
35
|
+
--log-note "<same one-line note>" \
|
|
36
|
+
--write --approve <token>
|
|
37
|
+
```
|
|
38
|
+
4. Verify the touched page and project knowledge index (`projects/{slug}/knowledge.md`). Do **not** hand-edit root `index.md` for architecture pages — the publisher owns project knowledge projection.
|
|
39
|
+
5. **Generalization check.** If the decision applies beyond this project, draft a `concepts/` page with `provenance: project` (or `mixed` if research-informed) and publish it with `skillwiki page publish` (prefer `--approve` for this workstream).
|
|
40
|
+
6. Host-aware promotion:
|
|
41
|
+
- Authorized Git leaf: `skillwiki sync` / `skillwiki sync push` after lint-delta.
|
|
42
|
+
- Protected snapshotter (sg01): leave promotion to `wiki-snapshot.timer`; never author or push via `/root/wiki-git`.
|
|
19
43
|
|
|
20
44
|
## Stop conditions
|
|
21
|
-
- `
|
|
45
|
+
- `project-page publish` dry-run or approved write exits non-zero.
|
|
46
|
+
- Approval token missing/mismatched — re-run dry-run; do not force a write.
|
|
47
|
+
- Host is a protected snapshotter and the operator asks to edit `/root/wiki-git` — refuse.
|
|
22
48
|
|
|
23
49
|
## Forbidden
|
|
50
|
+
- Direct writes into `projects/{slug}/architecture/` without `skillwiki project-page publish`.
|
|
51
|
+
- Hand-editing root `index.md` for architecture ADRs.
|
|
24
52
|
- Filing the concept page without explicit `provenance:`.
|
|
53
|
+
- Do not author, copy, edit, stage, commit, pull, reset, or push agent changes in `/root/wiki-git`.
|
|
54
|
+
- Running snapshot scripts or `git reset --hard` in the snapshot worktree as a publication shortcut.
|
|
@@ -174,64 +174,47 @@ 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.
|
|
@@ -240,6 +223,9 @@ bash ~/.hermes/scripts/wiki-snapshot.sh # Re-sync fresh
|
|
|
240
223
|
- Modifying files in `raw/` to resolve conflicts (N9 — archive and re-ingest instead).
|
|
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
|
|
|
@@ -174,64 +174,47 @@ 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.
|
|
@@ -240,6 +223,9 @@ bash ~/.hermes/scripts/wiki-snapshot.sh # Re-sync fresh
|
|
|
240
223
|
- Modifying files in `raw/` to resolve conflicts (N9 — archive and re-ingest instead).
|
|
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
|
|