Skip to main content
A Document scan curates the documents of every source in the workspace into one corpus. There is one scan per workspace. It belongs to no repository, so on Agent it is listed without one.

Starting a scan

  • Press Scan in the header of any Context page. The button carries an amber dot when the context has moved since the corpus was built. It reads Scanning… while a scan runs.
  • A source sync that added, changed or removed documents starts a scan on its own.
A scan calls a model, so the workspace needs a provider on Settings › Models. Without one, TrueCourse tells you so and points you there. See LLM transport.

What a scan does

1

Read the documents

The scan reads the documents every source synced. A deterministic prefilter drops material that is not documentation of the product.
2

Set the scope

At most one scope session decides the scan’s standing instructions. Every later session follows them.
3

Curate each document

One session per document decides whether to keep it and tags the areas it describes. A session may page through a long document and look at a document it references.
4

Settle the areas

One session settles the area names across the whole corpus.
5

Find disagreements

Sections from different documents that cover the same ground are grouped into clusters. One session per cluster decides where two documents disagree. Each disagreement becomes a conflict.
6

Fold the results

A deterministic pass re-anchors section pointers, removes duplicates across areas, and applies the verdicts the scan is highly confident about. Then the corpus is stored.
Two rules keep a corpus safe:
  • A session that fails never drops a document. The document stays in the corpus.
  • If every session of one kind failed to reach the model, the scan stops before it writes anything. The previous corpus stays as it was.

What a repository reads

A repository reads its slice of the corpus: the documents that come from the sources it links. When a scan changes the corpus and no conflict is open, TrueCourse starts work for every repository whose slice moved. A repository that was never set up gets Flow setup. A repository that is already set up gets Flow generation.

Which files become documents

A source decides which files it yields. A Repository source keeps the files its include patterns select and its exclude patterns do not remove. The defaults include docs/** and **/*.md, and exclude changelog and license files. Build and tooling directories are always skipped, and a .truecourseignore file in the repository is honored. A YAML or JSON file that the patterns select, and whose top level declares openapi or swagger, is read as an OpenAPI document. See Sources.

Documents

Context › Documents lists every document the workspace knows, including the ones the corpus does not hold. The columns are Document, Area, Source, Repositories, Status and Updated. Filter by Area, Status, Inclusion, Source and Repository. Every filter is kept in the page address, so a filtered view can be shared as a link. A document’s status folds the results of every repository that reads it: Proved, Failed, Blocked, Not testable, Not run or Not linked. Its inclusion is In corpus, Not included when the scan left it out, or Excluded when someone excluded it. Hover the status to read why. Open a document to see it painted section by section. When several repositories read it, chips in the header switch between them. Click a section to see the claims it states and the tests that prove them. A document no repository reads opens as plain text.

Include or exclude a document

A document’s page has one action in its header: The decision belongs to the workspace. It changes nothing until the next Document scan applies it, and the Scan button lights up to say so.

Next steps

Sources

Add a repository’s markdown or a documentation site, and choose who reads it.

Resolving conflicts

Settle the disagreements the scan found.