Skip to content

Corpus layout ​

Every second-level content dir name is declared once in scripts/lib/layout.py (SEGMENTS). Scripts compose paths through that module — re-spelling "evidence/claims" at a call site is the bug class this module exists to kill. layout.seg() raises on undeclared names, so a new dir must be added to SEGMENTS first (plus the coordination points in "Adding a directory" below).

Corpus root resolution is fabric_config.CORPUS_ROOT (VAULT_ROOT is a legacy alias for the same value).

The tree ​

PathArtifactProducer(s)Consumers
evidence/raw/<slug>/immutable captures (docs + git/ PRs/issues/commits + chats/ sessions + obsidian/ harvests)capture, capture-git, capture-chat, hooksingest (--changed), threads index, lint SOURCE-DRIFT, review --verify-locators
evidence/raw/<slug>/git/pr-N.mdkind: pr-record source (github route: source_repo, pr, pr_state, merged_at; thread graph node)capture-gitingest --changed, threads index
evidence/raw/<slug>/git/issue-N.mdissues (same shape as pr-record minus merge fields)capture-gitingest --changed, threads index
evidence/raw/<slug>/git/commit-<sha>.mdkind: commit source (local route: sha + date + message body, metadata only)capture-gitingest --changed
evidence/raw/<slug>/chats/session-*.mdkind: chat-session source (session, harness, session_started, files_touched, related_sessions)capture-chatingest --changed, threads index, mine chats
evidence/raw/<slug>/issues/issue-N.mdkind: issue-record source (tracker capture, #176 — issue, issue_state, closed_at; the rationale channel)capture issuesingest --changed, threads index, query lineage
evidence/raw/<scope>-okf/imported OKF bundlesokf importingest --pending <scope>-okf
evidence/sources/src-*.mdsource records (sha256, resource locator)ingest, okf importreview, propose-domains, lint, threads
evidence/source-summaries/sum-*.mdfaithful summaries with locatorsingestretrieval, lint SOURCE-EMPTY
evidence/claims/claim-<slug>-NNN.mdatomic claims with source_refsingestquery, context, synthesize, export, lint, judgment, embed index
evidence/insights/chat-mined insight pages (type: synthesis)mine-chatsreview scan
evidence/traces/change-sets/<date>-<slug>/staging manifests + diffs (human gate)ingestapply-changeset, sync PR body
evidence/traces/wiki-runs/wiki-generation run checkpointswiki-generateresume protocol
evidence/_inbox/<scope>-okf/quarantine for foreign-bundle content needing reviewokf importhuman
evidence/experiments/typed experiment records (with baselines)— (reserved; policy + template exist)lint, sync plane
patterns/ + patterns/_inbox/ + patterns/_rejected/canonical patterns; staged candidates; rejection tombstonesmine-chats --propose (staging), promote-patterns --apply, promotemining suppression, context, gate
anti-patterns/canonical anti-patterns (type: anti-pattern)promote-patterns --applypromote.py, lint, retrieval
skills/durable procedures promoted as fabric skillspromotion pipelinecontext
concepts/unbound concepts (declares no ontology domain)synthesizeexport, harvest-questions, retrieval
domains/<name>/concepts/domain-bound concepts (S1 homes)synthesize, relocate-conceptsexport, harvest-questions, retrieval
domains/<name>/questions/domain-bound promoted questions (S1 homes)promote-questionsquery gaps, gate
domains/<name>/syntheses/reserved (S1 trio; query --save routes here when domain-bound)query --save (reserved)humans
domains/ontology.mddomain vocabulary (human-gated merges)promote-domainsdomain detection, lint scope
projects/<slug>/namespace pages: README, decisions/, experience-events/ee-*.md, commitments/, receipts/bootstrap-project, log-experience, wf contextmine-promotions, context precedence, lint SCOPE
registry/catalog.jsonpage index (derived)rebuild-indexquery, context, dispatch status
registry/threads.jsonPR/issue/chat thread graph (derived)rebuild-indexquery, thread, mining
registry/log.mdappend-only operation timeline (OKF §9)ingest, promote, okf import, synclint §9, doctor
registry/promotions/promotion dossiers (human-gated)mine-promotionspromote, gate
registry/effects/*.effects.jsonjudged-effect verdict artifacts (machine, never beside pages)verify-effectsingest agent
registry/receipts/context delivery receiptswf context --write-receiptgate --deliveries, mining
registry/pending-gate.mdcached gate report for session startwf gate (via hooks)agents
registry/conflicts/sync conflict recordssync pulllint SYNC-CONFLICT
registry/question-proposals/harvested open questions (gated)harvest-questionspromote-questions
registry/wiki-graph.jsonmachine edge layer behind the wikiexportmachine contract
registry/wiki-export-manifest.jsonobsidian export ledgerobsidian bridgeharvest-before-export
global/entities/entity index pages (derived, gitignored)build-entity-indexdispatch status
global/graphs/per-repo graphify graphs + hashesgraphify-bridge--diff staleness, deep dives
syntheses/saved query answers (excluded from retrieval)query --savehumans
questions/promoted question pages (open → answered)promote-questionsquery gaps, gate
wiki/human-facing generated wiki (output vault)export-wiki, wiki-generatehumans / Obsidian

Naming prefixes (the join contract) ​

src- / sum- / claim-<raw-rel-slug> (≤80 chars, shared by layout.claims_for_source) / ee- / pattern- / anti-pattern- / concept- / promotion- / tombstone- / entity- / question- / change-set- / receipt- — declared in layout.PREFIXES. Producers and consumers both derive slugs through layout helpers; the claim↔source join depends on claim- + the raw rel path, so raw paths under evidence/raw/ should never be renamed casually.

Rules ​

  1. Raw is immutable — evidence/raw/ is never edited in place; re-capture.
  2. Machine artifacts never sit beside pages — only .md pages live in content dirs; json/verdict artifacts go to registry/ subdirs (effects, receipts, indexes). .last-capture markers inside raw are the one sanctioned exception (state for the sha256-gated capture loop).
  3. Immutable vs derived: raw/ + sources/ = recorded evidence; claims/ + concepts/ = derived atoms; registry/ + global/entities = derived indexes. Derived content is regenerable; recorded evidence is not.
  4. Type decides the dir — anti-pattern candidates in patterns/_inbox/ apply to anti-patterns/ (not patterns/); promoted dossiers land in registry/promotions/.
  5. Sync planes (sync_lib/policy.py): evidence-plane (raw, sources, summaries, insights, traces, inbox) vs atom-plane (claims, patterns, concepts, projects). Layout changes must keep both classified.

Adding a directory ​

coordination checklist (all deterministic, 0 tokens):

  • layout.SEGMENTS (+ accessor + PREFIXES if the page type has an id shape)
  • scripts/cmd/lint.py — VALID_TYPES (if a new page type), CONCEPT_DIR_PREFIXES
  • scripts/lib/wf_common.py — SKIP_PARTS if non-concept
  • scripts/lib/sync_lib/policy.py — plane classification
  • scripts/cmd/rebuild-index.py — scan_vault category
  • scripts/harness/hooks.py — _FABRIC_OUTPUT_DIRS (drift capture matching)
  • scripts/okf-base.yaml — okflint per-type fields; export scope roots in scripts/cmd/okf_export.py

History ​

  • 2026-10-02 (#157 S3 decision): evidence/ plane naming — the name stays; the plane separation stays in policy. Claims (canonical atoms) live under "evidence" but classify to the atom-plane ( sync_lib/policy.py), and every consumer derives paths through layout — the directory name is physical, not semantic, and never user-facing. Tier-3 re-layout (claims → claims/ at the corpus root) remains a one-constant change + the coordination checklist, parked until a real driver appears: the move churns 6284 catalog paths, 16 seam refs, and every existing OKF bundle/clone for zero retrieval benefit (path-scope is never shown to users; classification already disambiguates the planes).
  • 2026-10-01 (S1/#159): physical domain homes — domains/<domain>/{concepts,questions,syntheses}; binding is frontmatter domain: (canonicalized through the ontology alias map); relocation via scripts/cmd/relocate-concepts.py (deterministic, idempotent).
  • 2026-10-01: layout.py introduced (Tier-2 single truth); anti-pattern apply-path bug fixed (candidates were unconditionally dropped into patterns/); promote-queue update made fail-soft; effects verdicts moved to registry/effects/; canonical layout doc created (this file).

Alpha — expect breaking changes.