/cogni-knowledge:knowledge-updatefrom cogni-knowledge
Revises a single page in a cogni-knowledge base when knowledge changes, showing diffs and requiring source citations. Use for manual curation, contradiction fixes, or retiring pages.
Ships in cogni-knowledge. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Revise one page in a bound knowledge base because knowledge has changed, a contradiction was reported, or a new source refines a claim. This is the manual single-page curation half of the compounding loop — the inverted pipeline adds (ingest → distill → compose → finalize), and knowledge-update refines. Together they keep a Karpathy base live.
This is the standalone analog of cogni-wiki:wiki-update, computed natively against the bound wiki — it resolves the wiki root from .cogni-knowledge/binding.json and edits the page directly with the Edit tool, so a base is curatable with no cogni-wiki plugin installed. It does not dispatch cogni-wiki:wiki-update.
Read ${CLAUDE_PLUGIN_ROOT}/references/delegation-contract.md once at the start of a session so you remember the wiki-engine boundary — cogni-knowledge curates the page natively (the update logic is pure-LLM, Edit-driven; there is no engine script to resolve), it does not delegate to cogni-wiki:wiki-update.
knowledge-ingest-source detected that a single source collides with an existing page and handed control here for diff-before-write (the intended endpoint for that cross-skill handoff)knowledge-lint reported a contradiction or claim_drift the user wants reconciled.cogni-knowledge/binding.json — offer knowledge-setup instead.knowledge-ingest-source instead.Edit the page directly and bump its updated: field; you do not need this skill's full discipline.foundation: true in frontmatter (seeded by knowledge-prefill) and the user did not pass --force. Foundations are terminal pages — canonical textbook concepts (Porter's Five Forces, Jobs-to-be-Done, MECE, …) whose authority derives from the upstream source URL, not per-base synthesis. Stop and surface the refusal verbatim:
Page
{slug}is a foundation (canonical concept seeded byknowledge-prefill). Updates require--forceto preserve the terminal-page contract. Considerknowledge-ingest-sourcefor a base-specific page that links into [[{slug}]] instead.
knowledge-ingest-source adds one source page (with its own diff-before-write dedup on a covering collision); knowledge-update refines an existing page. The collision handoff is intended to flow ingest-source → here (the sibling's covering-collision branch still names cogni-wiki:wiki-update directly; rewiring it to name this skill is a tracked follow-up).knowledge-lint audits hygiene (stale/drift/reverse links) and repairs the mechanical classes; knowledge-update is where a human-judged semantic fix (a contradiction, a refined claim) lands. Run lint to find what is stale; run update to fix what needs prose judgment.knowledge-prefill seeds the foundation: true pages this skill refuses to edit without --force.| Parameter | Required | Description |
|---|---|---|
--knowledge-slug | Yes | Slug of the knowledge base. Resolves to cogni-knowledge/<slug>/ unless --knowledge-root overrides. |
--knowledge-root | No | Override the default knowledge-base directory. |
--page | Yes | Slug of the page to update, or a fuzzy title that resolves to one slug. |
--reason | Yes | Why the update is happening: new-source, contradiction, refinement, retype, retire. |
--source | Conditional | Required when --reason new-source — a URL or a path to a file the new claim is grounded in. |
--related-sweep | No | yes (default) / no — whether to check related pages for stale statements the update contradicts. |
--force | No | Override the foundation: true refusal in "Never run when". Required when the target is a foundation and the upstream canonical source has genuinely shifted. No effect on non-foundation pages. |
No engine to resolve — the update is pure-LLM, Edit-driven. The only pre-flight is the binding (Step 1): the wiki root (wiki_path) and the target page both resolve from .cogni-knowledge/binding.json, never from a cwd walk of the wiki tree (the divergence from cogni-wiki:wiki-update, which walks upward from the current directory to find the wiki). The --knowledge-root default in Step 1 is only how the binding file is located on disk — it is not a wiki-tree walk.
Resolve knowledge_root:
--knowledge-root is set, use it.knowledge_root = cogni-knowledge/<knowledge-slug>/ (relative to the current working directory). This locates the binding file, not the wiki — wiki_path is then read from the binding (sub-step 3 below), so the wiki root itself never comes from a cwd walk.Read the binding:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/knowledge-binding.py read \
--knowledge-root <knowledge_root>
On success: false, abort and offer knowledge-setup. Do not auto-create.
Extract from the binding: knowledge_slug, knowledge_title, wiki_path.
Validate the binding's knowledge_slug matches --knowledge-slug. Mismatch → abort.
Resolve --page to an actual file under <wiki_path>/wiki/<type>/<slug>.md (the cogni-wiki per-type page-dir convention — concepts/, entities/, sources/, syntheses/, questions/, notes/, …). Slugs are globally unique, so Glob <wiki_path>/wiki/*/<slug>.md resolves the type directory for you. If the slug does not resolve, attempt a title match against frontmatter title: fields across <wiki_path>/wiki/**/*.md. If still no match, stop and offer knowledge-ingest-source.
--reason new-source, read the new source fully (URL or file).--reason contradiction, read the lint/contradiction finding that surfaced it AND the other page involved.State in plain prose:
Show this to the user. For autonomous runs, still emit the synthesis in the response but proceed without waiting for explicit confirmation. Treat a run as autonomous when the dispatch is non-interactive — no AskUserQuestion-capable session, or an explicit autonomous / --yes flag was passed; otherwise wait for the user's confirmation before writing.
This is the diff-before-write discipline — the cogni-knowledge equivalent of git diff + manual inspection before commit.
Use the Edit tool (never Write) to preserve unchanged content byte-for-byte. For each planned change:
old_string with the new new_string.updated: frontmatter field to today's ISO date.sources: list — never replace existing sources unless the old source is being explicitly retracted.type, say so in the diff and justify the retype.Citation rule: every new factual claim the update adds must link to a source — an inline source link or a [[wikilink]] to another page (which in turn cites a source). If the user cannot produce a source, the update stops. Unsourced claims erode the provenance chain that distinguishes this base from unverifiable notes.
--related-sweep yes)For every page that contains a [[wikilink]] to the page being updated, plus every page in the updated page's related: frontmatter, plus every page that shares ≥2 tags with it:
## Stale (YYYY-MM-DD) marker at the top of the candidate so the next knowledge-lint catches it.When the update adds, removes, or reshapes [[wikilinks]], honour the forward → reverse link contract — every new forward [[B]] should be matched by a reverse [[A]] on B. The sweep is the primary path; knowledge-lint's reverse_link_missing repair is the safety net. The locked reverse-link write can be applied via the vendored backlink_audit.py --apply-plan that knowledge-ingest already calls (the locking is internal to that script); keep this lightweight — never hand-edit <wiki_path>/wiki/index.md or another shared-state file directly.
Never silently propagate contradictions. The sweep either resolves them or marks them.
--reason retire: do not delete the page. Set status: retired, prepend a ## Retired (YYYY-MM-DD) — replaced by [[new-slug]] note, and leave the body intact. Dangling [[wikilinks]] to retired pages still resolve, which is the point.--reason retype: change type: and rewrite body structure to match the new type conventions. A note → concept promotion typically condenses loose observations into a structured definition. (Per the per-type page-dir convention, a retype that changes type: should also move the file to the matching <wiki_path>/wiki/<new-type>/ directory.)Append one line to <wiki_path>/wiki/log.md (append-only — never a read-modify-write):
## [{YYYY-MM-DD}] update | {slug} — {reason}
An update is not a create. Leave .cogni-knowledge/.cogni-wiki counters untouched.
In ≤5 sentences: which page was updated and why, how many related pages were swept and how many were also modified, and the next recommended action (often knowledge-lint if this was a contradiction fix).
status: retired, not rm.Edit to preserve unchanged bytes — never rewrite a page in full unless the entire body is being replaced.cogni-wiki:wiki-update — the page is curated natively via the Edit tool.knowledge-ingest-source.knowledge-lint / knowledge-health.entries_count or write the binding.<wiki_path>/wiki/<type>/ (the target page), possibly N more from the related sweep.<wiki_path>/wiki/log.md.${CLAUDE_PLUGIN_ROOT}/references/delegation-contract.md — delegation boundary (the page is curated natively, not via cogni-wiki:wiki-update)${CLAUDE_PLUGIN_ROOT}/scripts/knowledge-binding.py --help — binding read (wiki_path resolution)What SKILL.md sets; muted values are Claude Code's defaults
21 skills in this plugin
/knowledge-composePhase 5 of the inverted pipeline. Reads <project>/.metadata/plan.json + <project>/.metadata/ingest-manifest.json + the populated cogni-wiki, dispatches a wiki-composer pass (plus ONE bounded fail-soft zero-network coverage-gated re-dispatch when a sub-question has ingested evidence the draft left uncited), and lands <project>/output/draft-vN.md + <project>/.metadata/citation-manifest.json. Supports --source wiki to compose a report grounded only in the bound wiki + fetch-cache with no web crawl (default web unchanged; local/hybrid staged). Use this skill whenever the user says 'compose the draft', 'write the report from the wiki', 'wiki-only report', 'compose from the wiki only', 'no web crawl report', 'phase 5 of the knowledge pipeline', 'knowledge compose', 'draft v1', or 'run the writer'. After compose, knowledge-verify will run the zero-network claim alignment./knowledge-curatePhase 2 of the inverted pipeline. Reads plan.json, dispatches one source-curator agent per sub-question to WebSearch + score candidate sources AND fetch each survivor's body via WebFetch into the shared fetch-cache, then merges the per-sub-question batches into candidates.json via candidate-store.py. Each candidate carries a fetch sub-object. Use this skill whenever the user says 'curate sources for the eu-ai-act plan', 'discover candidates for project X', 'run the curators on plan.json', 'knowledge curate', 'phase 2 of the knowledge pipeline'. After curate, run knowledge-fetch (cobrowse reconcile; a near no-op unless --cobrowse)./knowledge-dashboardRender an HTML dashboard for a bound cogni-knowledge base — runs the vendored wiki-dashboard scripts (render_dashboard.py + build_graph.py) natively against the bound wiki and writes a knowledge-overlay.md sidecar that lists deposited research projects and the latest lint-audit claim_drift count. Use this skill whenever the user says 'show the dashboard for my <slug> base', 'knowledge dashboard', 'visualize my eu-ai-act knowledge base', 'render the knowledge base as HTML', 'knowledge-dashboard <slug>'. The sidecar makes the binding's contribution visible alongside the wiki's own dashboard./knowledge-distillPhase 4.5 of the inverted pipeline (between ingest and compose). Distills the run's source claims into recurring type:concept / type:entity / type:person pages, creating-or-merging them under a lock with claim-level dedup so the bound wiki compounds across runs (distilled pages get enriched, not duplicated). Also synthesizes a citable answer_claims: surface onto each type:question node from its findings' claims (Step 6.1). An optional cross-lingual pass merges DE↔EN twin claims on mixed-language bases (auto-skips otherwise). Fail-soft and optional: a distill failure never blocks compose. Use this skill whenever the user says 'distill the concepts', 'build the concept web', 'phase 4.5', 'knowledge distill', 'extract entities and concepts', 'answer the question nodes', or 'dedupe claims'. After distill, knowledge-compose reads the distilled pages as framing context./knowledge-fetchPhase 3 of the inverted pipeline. Builds fetch-manifest.json from the fetch results the curators already produced in Phase 2 (bodies are already fetched during curate). Cobrowse is OPT-IN (--cobrowse): the skill walks the user through enabling the Claude-in-Chrome extension, then dispatches source-fetcher sequentially to recover WebFetch misses AND to additively top up thin primary-tier sources (reading the fuller browser body beyond WebFetch's cap, superseding only if strictly longer). Use this skill whenever the user says 'fetch candidates for project X', 'build the fetch manifest', 'phase 3 of the knowledge pipeline', 'recover the failed sources', 'deepen the primary sources', 'knowledge fetch'. After fetch, run knowledge-ingest to deposit per-URL wiki pages./knowledge-finalizePhase 7 of the inverted pipeline — deposits the verified draft as a wiki synthesis page, closing the compounding loop. Reads the latest verified draft plus its verify and citation manifests, refuses self-citing loops, atomically writes the synthesis page into the bound wiki, updates the surrounding index, log, and binding state, then runs a fail-soft conformance gate plus advisory contradiction and structural-quality passes. The deposited synthesis becomes visible to future knowledge-compose runs as cross-source framing. Use this skill whenever the user says 'finalize the draft', 'deposit the synthesis', 'phase 7 of the knowledge pipeline', 'knowledge finalize', or 'land the verified draft'.npx claudepluginhub cogni-work/insight-wave --plugin cogni-knowledgeOther plugins' skills for the same job