Docs · The knowledge model

The knowledge model

Each fact is an exhibit that cites its evidence, checked against an ontology. The files are the record; everything else is a projection of them.

The case file

docket init writes a config file at the root of the repository and a .docket/ tree beside your code. People and agents edit the same files, and Git keeps the history.

the case file
your-repo/
├── .docket.yaml        config: where the case file lives, which adapters to feed
└── .docket/
    ├── entities.yaml   the ontology: resource types, relationships, sources and trust policies
    ├── resources/      exhibits, one Markdown file per thing
    ├── decisions/      why things are the way they are
    ├── constraints/    rules the system must obey
    ├── notes/          anything else worth keeping
    ├── .index/         projections: generated, gitignored, disposable
    └── .cache/         chat answers and sync times: gitignored, disposable

Directories are only for people. An exhibit's identity is the id in its frontmatter, never its path, so files can move freely.

An exhibit

Each fact is an exhibit: a Markdown file with YAML frontmatter. It has a type, attributes, and links to other exhibits, and each claim, the exhibit itself or one of its links, cites its evidence.

.docket/resources/services/orders.md
---
id: service.orders            # <type>.<name>; stays the same when the file moves
type: service                 # a resource type from entities.yaml
title: Orders API

attributes:
  language: typescript
  lifecycle: active

links:
  - rel: owned_by
    target: team.platform
  - rel: depends_on
    target: datasource.orders-db
    evidence:                 # where this link was seen
      - source: code
        path: src/store/orders.ts
        lines: 12-40
        observedAt: 2026-10-05
        observedBy: claude

evidence:                     # where the service itself was seen
  - source: manifest
    path: services/orders/package.json
    key: name
---

# Orders API

Takes orders and keeps their state.

Only id, type and title are required. A link may point at an exhibit no file defines yet: the graph is built a piece at a time, so that is a warning until you validate with --strict.

Evidence and confidence

Evidence says exactly where something was seen: a source and its location (file, lines and symbol; config key; API method and endpoint; URL), with when and by whom. Seeing something again adds an entry and never rewrites an earlier one. The default ontology's sources are code, manifest, config, infrastructure, api, runtime, docs, conversation, human and person.

Confidence is computed, never written. A trust policy prices an observation - "when the source is X, about type T, it is worth S" - and the most specific matching policy sets the score:

.docket/entities.yaml
# .docket/entities.yaml
trust:
  policies:
    - name: code evidence of pod
      when: { about: pod, source: code }
      score: 0.3
    - name: infrastructure evidence of pod
      when: { about: pod, source: infrastructure }
      score: 0.7
    - name: runtime evidence of pod
      when: { about: pod, source: runtime }
      score: 0.9
    - name: manifest evidence of depends_on
      when: { about: depends_on, source: manifest }
      score: 0.95
    - name: code evidence of depends_on
      when: { about: depends_on, source: code }
      score: 0.65

Observations of one source instance do not corroborate each other, so the strongest counts. Independent sources combine as 1 - (1 - a)(1 - b): a pod read from code (0.3) and seen running (0.9) is 0.93. docket validate rejects evidence that does not give the location its source requires.

The ontology

.docket/entities.yaml says which resource types, relationships and evidence sources a docket has. It starts as the default SDLC ontology (services, APIs, pipelines, teams, decisions, constraints and more), and you extend it when you need a type it does not have.

docket init --template <name> starts from another domain instead: people-org, crm, research, personal-knowledge or product-catalogue. In Docket Cloud, New docket offers the same templates, with a lean service catalogue (the most-used part of SDLC) and a blank ontology, as a catalogue you search by name, record type or domain: each card says which record types the template holds, and a filter shows the built-in templates or your organisation's own.

Describe your domain instead, in a few sentences, and AI drafts the record types, their fields and the relationships between them, starting from the closest template and keeping its sources and policies. It runs on your organisation's AI model and counts against its monthly AI budget; when AI is not set up or the budget is spent, New docket says so and the templates still work. The draft opens in the ontology editor with the usual change check, and nothing is created until you review it and choose Create docket.

An owner or admin can save any docket's published ontology (its types, relationships, sources and policies, never its documents) as one of the organisation's templates, from the docket's settings or from Templates, where they also rename, re-describe, update from a docket and delete them. The built-in templates are read-only, and no other organisation ever sees yours. A docket started from a template keeps its ontology when the template changes or goes.

shell
docket ontology list            # resource types, relationships and evidence sources
docket ontology show service    # a type's attributes, links and what each source is worth

Files and projections

The files are the record. Search indexes, vector stores and graphs are projections of them: disposable, and rebuilt from the files with docket rebuild whenever you like. Projections covers each one.