Kinic Wiki

Console

Skip to main content
Skills

Safe mutation

Edit

Use edit workflows for remote wiki page corrections, redactions, leakage cleanup, and multi-node repair after reading the current node revision.

SKILL.md

Read the skill as documentation or switch to the exact source.

Frontmatter

name
kinic-wiki-edit
description
Kinic Wiki workflow skill for safe remote wiki page edits, redactions, leakage cleanup, and multi-node repair with etag-aware VFS commands.

Kinic Wiki Edit

Use this skill when the user wants to:

  • remove or redact leaked, stale, duplicated, or invalid text from wiki nodes
  • edit existing /Knowledge/... pages without new source ingestion
  • repair many existing nodes after a lint, search, or incident finding
  • apply the same text replacement across multiple wiki pages

Do not use this skill for:

  • answer-only wiki queries; use kinic-wiki-query
  • report-only health checks; use kinic-wiki-lint
  • evidence source ingestion or new evidence synthesis; use kinic-wiki-ingest

Core rules:

  • Read edit.md before mutating remote wiki nodes.
  • Treat the canister wiki as the source of truth.
  • Always read current node content and etag before editing.
  • Prefer etag-aware CLI commands for existing node repair.
  • Keep replacement scope explicit: path list, old text, new text, expected etag, verification.
  • Update the affected scope log.md for every page edit.
  • Stop and ask before destructive deletion, unclear redaction policy, or API-contract changes.

For bounded repeated inspection, repair, and reinspection, use kinic-wiki-maintain. index.md is an agent catalog; optional overview.md is the reader description.

Kinic Wiki Edit Workflow

Safely repair, redact, or update existing Kinic Wiki nodes via kinic-vfs-cli (--help / docs/CLI.md) only when requested or accepted.

Workflow

  1. Confirm target/access with status --json.
  2. Discover candidates via query-context --namespace <target-prefix>, search-remote, list-nodes, or link commands.
    • Use 2–4 space-separated 3+ char keywords (avoid unsegmented Japanese/CJK sentences or 1–2-char-only terms).
    • For query-context, inspect nodes and search_hits; if search_hits is empty with truncated: true, inspect nodes first and run independent search-remote with the same space-joined task + entities query, --prefix <target-prefix>, --top-k 10. Use list-nodes --prefix / when scope is unclear.
  3. Narrow 2+ known paths with query-sql.
  4. Read every accepted target immediately before mutation (read-node --json or path/etag/content). Never mutate from stale reads or unaccepted paths.
  5. Apply minimal safe mutation (write-node, append-node, edit-node, multi-edit-node, delete-node, delete-tree) with --expected-etag whenever supported.
    • delete-tree: inspect list-nodes --prefix <path> --recursive --json first; stop on unexpected paths. Ask before destructive deletion, unclear redaction, or API-contract changes.
    • Multi-node repairs: log path, old state, replacement, etag, command, and verification.
  6. Verify by reading saved bodies and rerunning narrow search / lint checks (write ack alone is not verification). Append to existing log.md only when required.

Boundaries

  • Answer-only: kinic-wiki-query · New source intake: kinic-wiki-ingest · Report-only health: kinic-wiki-lint.

Catalog & Maintenance Repairs

  • Authorized kinic-wiki-maintain repair runs cover non-destructive in-prefix repairs within budgets/exclusions without per-path re-approval; ordinary lint findings never authorize edits.
  • Update folder/parent indexes (in scope) only on creation, move, deletion, or substantive change — skip typos; never run broad rebuilds.
  • Keep <namespace>/index.md and subfolder index.md compact (target <= 2,000 chars) so combined canonical roots (index.md, facts.md, overview.md, summary.md, etc.) stay under half the tightest query_context budget (4 chars/token: MCP default 2,000 tokens ≈ 8,000 chars [max 8,000]; CLI default 8,000 ≈ 32,000; paths/metadata/links also count).
  • Crash-safe splits (never delete index.md, never overwrite existing overview/destination wholesale; failed split stays unresolved):
    • Mixed prose → overview.md: read both → merge unique prose/refs into overview.md → verify write → remove only transferred prose from index.md.
    • Bloated listings → subfolder index.md or <namespace>/catalog.md (without moving/deleting articles; keep destination to links + 1-line descriptions only): read destination → adjust relative links & merge unique links/claims → write & read back to verify destination links → shorten <namespace>/index.md with --expected-etag while adding a link to the split destination and verifying that link after saving.
  • For bloated-canonical-root splits, re-run query-context with the same task/entities and effective budget to confirm omitted matched paths now appear in nodes. Report conflicts, partial progress, and unresolved findings under the maintenance contract.