| name | bcos-wiki |
| description | Wiki zone manager for BCOS. Ingests URLs / local docs / inbox captures into docs/_wiki/ as schema-validated pages with banner citations, three structural shapes for source-summary, and two-tier refresh. Schema-driven, CLEAR-governed, derived-artifact. Invoke with /wiki. |
| trigger | /wiki |
| version | 1.0.0 |
| last_updated | 2026-05-02 |
| authority-docs | ["docs/_bcos-framework/architecture/wiki-zone.md","docs/_bcos-framework/templates/_wiki.schema.yml.tmpl","docs/_planned/wiki-zone-integration/pre-flight-decisions.md"] |
/wiki
See also: context-ingest is the single public entry point for new material. If the user dropped raw content of unknown shape ("here's a doc", "save this"), prefer context-ingest ā it dispatches here automatically when the input is a URL or an _inbox/ capture. Use /wiki directly only when the user explicitly names the wiki (/wiki run, "promote to wiki", "add to the wiki").
Wiki-zone manager for BCOS. Routes URL ingests, local-document promotions, and inbox captures into docs/_wiki/ as first-class managed documents (schema-validated frontmatter, derived index.md, BCOS-compatible CLEAR ownership).
Trigger phrases
/wiki with subcommands: init, run, queue, promote, create, review, archive, refresh, lint, remove, schema, search
- "Add this URL to the wiki"
- "Promote this
_inbox/ capture into a wiki page"
- "Ingest this PDF as a wiki source-summary"
- "Run the wiki refresh"
- "Initialize the wiki zone"
Pipeline at a glance
queue.md (URLs, human-curated)
ā fetch (web | github | youtube) ā Path A
docs/_wiki/raw/<type>/ (immutable captures)
ā ingest (banner citation; 3 shapes)
docs/_wiki/source-summary/<slug>.md ā schema-validated
ā
refresh_wiki_index.py (derived index)
/wiki promote docs/_inbox/<file>.md ā Path B (inbox-promotion)
/wiki create from <path-or-paste> ā Path B (local-document)
ā
docs/_wiki/raw/local/<slug>.<ext> (binaries) + .md (extraction)
ā
docs/_wiki/pages/<slug>.md ā provenance frontmatter
ā
refresh_wiki_index.py
Subcommands
| Command | Status | Phase | What it does |
|---|
init | implemented | P3 | Scaffold docs/_wiki/ (config + schema + page templates + queue + log + overview); never overwrite |
run [<url>] | implemented | P3 | Path A: batch (no arg) processes all ## Pending queue items; single (with URL) auto-queues + ingests |
queue <url> [tags] | implemented | P3 | Append URL to ## Pending of queue.md without fetching |
ingest | shared protocol | P3 | Internal ā called by run/promote/create; shared pipeline. Not a user-facing entry |
promote <inbox-path> | implemented | P3 | Path B: convert an _inbox/ capture into a wiki page; provenance.kind = inbox-promotion |
create from <path-or-paste> | implemented | P3 | Path B: ingest a local file or pasted text; provenance.kind = local-document |
review <slug> | implemented | P3 | Bump last-reviewed; optionally re-pull builds-on data points to verify |
archive <slug> | implemented | P3 | Soft-delete to _wiki/.archive/ with dangling-reference scan |
refresh <slug> | implemented | P3 | Path A: re-fetch a source-summary page (refresh-must-rediscover applies, D-05 two-tier) |
lint | implemented | P3 | Run wiki-specific lint checks on demand (also runs via daily/scheduled jobs) |
remove <slug> | implemented | P3 | Hard remove (vs archive soft-delete) ā only when the user explicitly wants the page+raw gone |
schema list|add|rename|retire|validate|migrate | P4 | Vocabulary governance ā see schema.md (P4) | |
search <query> | implemented | P2 | Zone-scoped sugar over /context search --zone wiki (mechanical BM25; --semantic opt-in only) ā see search.md |
bundle <profile> | implemented | P5 | Zone-scoped sugar over /context bundle <profile> (mechanical task-driven routing; --resolve-conflicts / --verify-coverage opt-in only) ā see bundle.md |
Dispatch
- Identify the subcommand from the first word after
/wiki.
- Guard (every subcommand except
init): confirm docs/_wiki/.config.yml exists. If missing, stop with:
"No wiki zone here (docs/_wiki/.config.yml missing). Run /wiki init to scaffold one first."
Subcommand files repeat this guard by reference; you only enforce it once per invocation.
- Route ā read the sibling file in this skill directory and follow its instructions:
init ā init.md (no Guard)
run ā run.md
queue ā queue.md
promote ā promote.md
create ā create.md
review ā review.md
archive ā archive.md
refresh ā refresh.md
lint ā lint.md
remove ā remove.md
schema ā schema.md (P4)
search ā search.md (P2; zone-scoped sugar over /context search)
bundle ā bundle.md (P5; zone-scoped sugar over /context bundle)
- Do not proceed past dispatch before reading the target file.
Guard rails (universal ā apply to every subcommand)
Git policy (canonical)
Never run git commit or git push after init, run, ingest, promote, create, review, archive, refresh, lint, remove, or schema ā unless the human explicitly asked to commit in this conversation. List what changed and stop. The human reviews diffs and runs git commit / git push when ready.
This matches BCOS's broader convention (see docs/.session-diary.md and CLAUDE.md's "Auto-commit" policy).
Frontmatter discipline (D-04)
Every wiki page satisfies BCOS's standard required fields plus the wiki extensions defined in _wiki/.schema.yml. The PostToolUse hook validates this on every save and emits these IDs on violation: schema-violation, reference-format-mismatch, forbidden-builds-on-target, provenance-required, shape-conflict, folder-mismatch, schema-version-drift.
Reference-format rule (slugs intra-zone, paths cross-zone):
references:, subpages:, parent-slug:, body [[...]] ā bare slug, no .md
builds-on:, raw-files:, body [text](../path.md) ā relative path with .md
Derived artifacts (D-11)
docs/_wiki/index.md ā regenerated by .claude/scripts/refresh_wiki_index.py. Never hand-edit. All ingest subcommands call this script as their final step.
docs/_wiki/log.md ā append-only. Only ingest/refresh/remove/archive may add entries; never rewrite.
docs/_wiki/overview.md ā authored prose. Updated by ingest (one paragraph per source-summary, in sources: order).
Token guard (D-05)
Any single fetch projected to exceed 200,000 tokens halts and asks the user to confirm or downgrade detail-level. This applies to run, refresh, and create (when source content is large).
Path B writes never cross zones (D-06)
promote and create keep binaries in docs/_wiki/raw/local/<slug>.<ext> alongside their markdown extraction. They do not write to docs/_collections/. Users who want a binary in collections-as-evidence must run /collections add explicitly.
Cluster permissive default (D-03)
When _wiki/.schema.yml has clusters.allow-cluster-not-in-source: true (v1 default), wiki pages may declare a cluster: not yet in docs/document-index.md ā drift surfaces via the quarterly wiki-coverage-audit as INFO, not ERROR. Tighten to false only after the cluster-mint follow-up (FU_006) lands.
File layout (in this skill)
.claude/skills/bcos-wiki/
āāā SKILL.md ā this file
āāā init.md ā /wiki init
āāā run.md ā /wiki run [<url>]
āāā ingest.md ā shared ingest pipeline (called by run/promote/create/refresh)
āāā queue.md ā /wiki queue
āāā promote.md ā /wiki promote
āāā create.md ā /wiki create from
āāā review.md ā /wiki review
āāā archive.md ā /wiki archive
āāā refresh.md ā /wiki refresh
āāā lint.md ā /wiki lint
āāā remove.md ā /wiki remove
āāā schema.md ā /wiki schema (P4)
āāā references/
ā āāā migration-helpers.md ā schema-version migration recipes (P4)
āāā templates/
ā āāā protocols/
ā ā āāā common.md ā URL parsing, slug derivation, inbox-tag DSL
ā ā āāā web.md
ā ā āāā github.md
ā ā āāā youtube.md
ā ā āāā local.md ā Path B: binary handling, hash, extraction
ā āāā page-types/
ā ā āāā how-to.md
ā ā āāā glossary.md
ā ā āāā source-summary.md
ā āāā raw/
ā ā āāā web-README.md.tmpl
ā ā āāā github-README.md.tmpl
ā ā āāā youtube-README.md.tmpl
ā ā āāā local-README.md.tmpl
ā āāā queue.md.tmpl
ā āāā overview.md.tmpl
ā āāā log.md.tmpl
ā āāā README.md.tmpl
templates/page-types/ are starter bodies for each registered page-type. New types added via /wiki schema add page-type <name> get a stub auto-created.
What the skill does NOT do
- Write data points (those live in
docs/*.md ā use context-ingest and the data-point template)
- Touch
docs/_collections/ (evidence zone ā explicit user actions only, see D-06)
- Cross-tool adapter manuals (
AGENTS.md-style) ā BCOS uses one CLAUDE.md
- Auto-commit or auto-push (see Git policy above)
See also
docs/_bcos-framework/architecture/wiki-zone.md ā full architecture spec
docs/_bcos-framework/templates/_wiki.schema.yml.tmpl ā vocabulary registry
docs/_planned/wiki-zone-integration/pre-flight-decisions.md ā D-01 ā D-11 decision rationale