When This Skill Activates
- User wants to permanently remove a vault path (not archive-for-reference).
- Cleanup of stale pages that should not return via snapshot resurrection.
- User says hard delete, remove for real, stop resurrecting.
Output language
If skillwiki is available: run skillwiki lang at the start. Otherwise default to English log prose.
Pre-orientation
Read SCHEMA/index only as needed. Confirm full vault-relative path with the user before delete.
Probe (required)
command -v skillwiki && skillwiki remove --helpgit -C <vault> rev-parse --is-inside-work-treeandgit remote get-url origin(expect privatekarlorz/wiki/ fleetvault_remote)- Auth:
gh auth statusorgit ls-remote origin HEAD
| Result | Mode |
|---|---|
| skillwiki OK | PRIMARY |
| skillwiki fail, git/gh + private repo OK | FAILSAFE-GIT |
| neither | FAIL CLOSED — stop; never bare rm for fleet effect |
Do not auto npm install -g skillwiki in headless/goal/satellite sessions.
PRIMARY steps
- Resolve vault:
skillwiki path. - Confirm path with user.
- On a vault-sync leaf when S3 prune is intentional:
skillwiki remove <page> [vault] --remote seaweed-wiki:cloud/wiki --remote-delete --max-remote-deletes 1 --reason "<text>"Otherwise:skillwiki remove <page> [vault] --reason "<text>" - Read JSON: expect
tombstone_pathundermeta/delete-intents/,removedset. - Commit + push via normal wiki-sync / git (tombstone + deletion must reach private
mainfor durability). - Report MODE=primary, paths, and whether remote-delete ran.
FAILSAFE-GIT steps (no skillwiki CLI)
Agent must have git (and preferably gh) access to private vault remote.
- Confirm path with user. Set
PATH_REL(vault-relative, no..). - Write tombstone
meta/delete-intents/<slug>.jsonwhere slug is path with/→__, e.g.summaries/foo.md→summaries__foo.md.json:
{
"schema": "vault-delete-intent/v1",
"path": "PATH_REL",
"action": "remove",
"created": "ISO-8601-UTC",
"host": "SKILLWIKI_HOST_ID-or-unknown",
"actor": "agent-failsafe-git",
"reason": "user requested remove; skillwiki CLI unavailable",
"source": "failsafe-git",
"expires": null
}
- Delete local file at
PATH_REL(and index line for[[slug]]if typed page). git addtombstone + path change; commit with trailers:
Delete-Intent: PATH_REL
Delete-Source: failsafe-git
git pull --rebase origin main(or merge fallback per vault-sync ADR) thengit push origin HEAD:main. Require successful push before claiming durable success.- Optional: if
rcloneandWIKI_REMOTEexist:rclone deletefile "$WIKI_REMOTE/PATH_REL"(single path only). - Report
MODE=failsafe-git, commit SHA,S3_PRUNE=done|deferred.
Stop conditions
- User declines.
- FAIL CLOSED (no CLI and no private git access).
- Push to private wiki fails.
- Path invalid or under
_archive/without explicit restore/remove policy.
Forbidden
- Bare
rm/ baregit rmwithout tombstone. - Force-push.
- Unbounded
rclone sync/ mass remote delete. - Claiming fleet delete complete without tombstone on
origin/main(and push success).
Reversibility
Hard remove is not locally reversible from _archive. Restore requires re-authoring content and deleting the tombstone file under meta/delete-intents/, then normal push.