Knowledge files
How Markdown files, links, and claims in the Workspace repository become search results and the knowledge graph.
The knowledge of a Workspace is plain Markdown in its Workspace repository. ctxpipe keeps no hidden copy that can drift. Chat, search, and agents use what is on the default branch.
One file, one unit
Each Markdown file is one knowledge unit. Its path is its identity, so renaming a file creates a new unit. Keep units short and focused, and link to other units rather than copying them.
On an empty repository, use knowledge/<area>/<unit>.md. On an existing
repository, follow the folders already there.
workspace-repository/
├── AGENTS.md # Workspace name + folder map
├── .agents/skills/ctxpipe-knowledge/
│ └── SKILL.md # How agents should write knowledge here
├── knowledge/
│ ├── services/checkout.md
│ └── decisions/payments-provider.md
├── .ctxpipe/workspace.yaml # Repository format (host-only)
├── sources/ # One file for each source
│ ├── github/acme/checkout.md
│ └── linear/engineering.md
├── linear/ notion/ confluence/ # Connector mirrors
└── slack/ pagerduty/ plain/ github/Relationships
The knowledge graph has two layers.
Links. A relative Markdown link from one file to another becomes a
LINKS_TO relationship:
Checkout calls the [payments service](../services/payments.md).Claims. Optional claims: front matter states typed facts about the unit:
---
kind: Service
claims:
- to: ../services/payments.md
predicate: DEPENDS_ON
confidence: 0.7
valid_from: 2026-03-01
---
# Checkout| Field | Meaning |
|---|---|
to | Required. File-relative path of the related unit. Items without to are skipped. |
predicate | The relationship, for example DEPENDS_ON, PART_OF, OWNS, SUPERSEDES. |
confidence | How sure the author is: about 0.5 typical, 0.7 strong, 0.85 and above rare. |
valid_from, valid_to | When the fact holds. A missing valid_from defaults to the time of the commit that introduced it. |
source | Optional pointer to where the fact came from. |
kind is optional and sets the unit's node type in the graph (Service,
API, Library, Decision, Pattern, and so on). Without it, the unit
appears as a generic knowledge unit.
Older facts count for less over time. Recent, well-sourced facts rank highest in answers.
Skipped files
ctxpipe skips a file that has one of the errors below, and continues with the other files. One bad file does not stop the Workspace. A skipped file stays in Files, because it is in git, but chat, MCP, search, and the graph do not use it. The Knowledge graph card in Settings lists the skipped files of the latest commit under ctxpipe skipped N files.
| Reason | Cause | Fix |
|---|---|---|
| Front matter is not valid | The front matter has no closing --- line, or its YAML is not valid. | Correct the front matter. |
| Repeats a linked repository or the Workspace's own repository | Shows only in results from an earlier version, for a repositories/*.md file. ctxpipe no longer reads these files. | None. |
Push the fix to the default branch. When ctxpipe reads the new commit, the file is a knowledge unit again, and it leaves the list.
Other errors stop the read of the whole commit. For example, a set of files that is too large shows The knowledge graph did not load in Settings. See Workspace settings.
Sources and linked repositories
Each file under sources/ is a source. The GitHub source files link the code
repositories of a Workspace. See
Linked repositories and
Workspace settings. ctxpipe does not read
files in repositories/. When an organization moves to Workspaces, the upgrade
pull request turns those files into source files.
Extracted files
ctxpipe writes the knowledge that it
extracts from linked repositories
only to these folders: knowledge/codebases/, services/, apps/,
libraries/, apis/, operations/, databases/, infrastructure/,
streams/, decisions/, teams/, and instructions/. ctxpipe sets these
front matter fields. Do not change them by hand:
| Field | Meaning |
|---|---|
generated_by | ctxpipe-extract. ctxpipe extracted the file. |
sources | The source files that own the file, for example sources/github/acme/checkout.md. |
source_sha | The commit of the linked repository that ctxpipe read. |
root | The folder of the package in the linked repository. It is . for the whole repository. Only Repository, Service, App, and Library files have it. |
skill, bundle | The extraction step that wrote the file, and the version of the extraction. |
Each claim of an extracted file has evidence: a path in the linked
repository, and script or model. ctxpipe sets confidence from it: 0.7
for script and 0.5 for model.
To change an extracted file:
- Put your own text between
<!-- ctxpipe:human -->and<!-- /ctxpipe:human -->. Ingestion never changes it. - To take over the file, remove
generated_by. After that, ingestion can only add claims and new lines in its## Relatedsection.
A file that a source owns alone can change fully on the next run. When you remove a repository source, ctxpipe deletes the files that only that source owned. ctxpipe also removes the source from the files that it shares with other sources. A file with a human section stays. ctxpipe removes only its own fields and claims.
For all the commits that ctxpipe makes, see What ctxpipe writes.