Knowledge Platform — data model¶
Generated from the architecture model
This page is rendered from model/**/*.yaml by tools/docs_model during mkdocs build. Edit the YAML, not this page; hand-written design lives on the linked service, platform and plane pages.
ArtifactService¶
erDiagram
Artifact {
guid artifactId PK
string tenantId
string projectId
enum_ArtifactKind kind
string name
hash contentHash
string contentRef
long sizeBytes
string mediaType
string classification
json accessScope
guid producerRunId
guid producerAttemptId
string producerAgentId
guid chainId
int versionInChain
enum_ArtifactState state
string validationRef
datetime createdAt
}
LineageEdge {
guid edgeId
string inputKind
string inputRef
string relation
}
Artifact ||--o{ LineageEdge : contains
LineageEdge (entity)¶
A derivation edge from an input (artifact, source chunk, context snapshot) to this artifact.
| Field | Type | Required | Description |
|---|---|---|---|
edgeId |
guid |
yes | |
inputKind |
string |
yes | artifact |
inputRef |
string |
yes | |
relation |
string |
yes | derived-from |
Tables: dbo.VersionChains, dbo.Artifacts, dbo.LineageEdges — see the DDL appendix.
ContextBuilderService¶
erDiagram
ContextSnapshot {
guid contextSnapshotId PK
string tenantId
string projectId
guid runId
guid attemptId
string planRef
int tokenBudget
int tokensUsed
enum_SnapshotStatus status
list_guid indexRevisions
list_guid memoryItems
string contentRef
datetime assembledAt
}
ContextItem {
guid itemId
enum_ContextSection section
string sourceKind
string reference
string sourceVersion
string trustTier
decimal score
bool included
string dropReason
int tokens
bool compressed
}
ContextSnapshot ||--o{ ContextItem : contains
ContextItem (entity)¶
One included or dropped candidate.
| Field | Type | Required | Description |
|---|---|---|---|
itemId |
guid |
yes | |
section |
enum:ContextSection |
yes | |
sourceKind |
string |
yes | chunk |
reference |
string |
yes | chunk id, fact id, memory id, artifact id |
sourceVersion |
string |
no | |
trustTier |
string |
yes | |
score |
decimal |
yes | |
included |
bool |
yes | |
dropReason |
string |
no | |
tokens |
int |
yes | |
compressed |
bool |
yes |
Tables: dbo.ContextSnapshots, dbo.ContextItems — see the DDL appendix.
MemoryPromotionService¶
erDiagram
MemoryItem {
guid memoryId PK
string tenantId
string projectId
enum_MemoryScope scope
enum_MemoryClass class
enum_MemoryState state
string summaryRef
guid originRunId
guid originAttemptId
list_string evidenceRefs
decimal confidence
string trustTier
guid reviewApprovalId
int reinforcements
datetime lastUsedAt
datetime expiresAt
datetime promotedAt
long version
}
ReviewDecision {
guid decisionId
guid approvalId
hash contentHash
string decidedBy
datetime decidedAt
string outcome
string reason
}
MemoryItem ||--o{ ReviewDecision : contains
ReviewDecision (entity)¶
A reviewer's decision on promotion bound to the memory's content hash.
| Field | Type | Required | Description |
|---|---|---|---|
decisionId |
guid |
yes | |
approvalId |
guid |
yes | |
contentHash |
hash |
yes | |
decidedBy |
string |
yes | |
decidedAt |
datetime |
yes | |
outcome |
string |
yes | approved |
reason |
string |
no |
Tables: dbo.MemoryItems, dbo.ReviewDecisions, dbo.ConsentRecords — see the DDL appendix.
KnowledgeIngestionService¶
erDiagram
KnowledgeSource {
guid sourceId PK
string tenantId
string projectId
enum_SourceKind kind
string reference
guid connectionId
string extractor
string classification
json aclMapping
json syncPolicy
enum_SourceState state
guid lastSnapshotId
long version
}
SourceSnapshot {
guid snapshotId PK
guid sourceId
string tenantId
string sourceVersion
enum_SnapshotState state
int documentCount
int chunkCount
string contentRef
datetime takenAt
datetime publishedAt
}
Collection {
guid collectionId
string name
string projectId
list_guid sourceIds
string embeddingProfileVersion
}
Document {
guid documentId
string path
string mediaType
hash contentHash
json metadata
json aclScope
string classification
}
Chunk {
guid chunkId
guid documentId
int ordinal
hash contentHash
int tokenCount
enum_TrustTier trustTier
json metadata
}
KnowledgeSource ||--o{ Collection : contains
SourceSnapshot ||--o{ Document : contains
SourceSnapshot ||--o{ Chunk : contains
Collection (entity)¶
A named grouping of sources a project retrieves from (knowledge collection definition declared in the Control plane).
| Field | Type | Required | Description |
|---|---|---|---|
collectionId |
guid |
yes | |
name |
string |
yes | |
projectId |
string |
yes | |
sourceIds |
list:guid |
yes | |
embeddingProfileVersion |
string |
yes | Pins the index to an embedding profile version (BC-07). |
Document (entity)¶
One normalized document of a snapshot.
| Field | Type | Required | Description |
|---|---|---|---|
documentId |
guid |
yes | |
path |
string |
yes | |
mediaType |
string |
yes | |
contentHash |
hash |
yes | |
metadata |
json |
yes | |
aclScope |
json |
yes | |
classification |
string |
yes |
Chunk (entity)¶
A retrieval unit with position, hash and provenance.
| Field | Type | Required | Description |
|---|---|---|---|
chunkId |
guid |
yes | |
documentId |
guid |
yes | |
ordinal |
int |
yes | |
contentHash |
hash |
yes | |
tokenCount |
int |
yes | |
trustTier |
enum:TrustTier |
yes | |
metadata |
json |
yes |
Tables: dbo.KnowledgeSources, dbo.Collections, dbo.SourceSnapshots, dbo.Documents, dbo.Chunks — see the DDL appendix.
RepositoryIntelligenceService¶
erDiagram
RepositoryIndexSet {
guid indexSetId PK
string tenantId
guid sourceId
guid snapshotId
string revision
enum_RepoIndexState state
list_string kinds
int fileCount
int symbolCount
list_string languages
datetime builtAt
}
SymbolEntry {
guid symbolId
string name
string kind
string path
int startLine
int endLine
guid containerSymbolId
hash signatureHash
}
DependencyEdge {
guid edgeId
string kind
string fromRef
string toRef
string version
}
OwnershipEntry {
string path
list_string owners
string lastCommit
datetime lastChangedAt
int churn90d
}
RepositoryIndexSet ||--o{ SymbolEntry : contains
RepositoryIndexSet ||--o{ DependencyEdge : contains
RepositoryIndexSet ||--o{ OwnershipEntry : contains
SymbolEntry (entity)¶
A symbol with its kind, location and type.
| Field | Type | Required | Description |
|---|---|---|---|
symbolId |
guid |
yes | |
name |
string |
yes | |
kind |
string |
yes | namespace |
path |
string |
yes | |
startLine |
int |
yes | |
endLine |
int |
yes | |
containerSymbolId |
guid |
no | |
signatureHash |
hash |
yes |
DependencyEdge (entity)¶
A project, package, call or reference edge.
| Field | Type | Required | Description |
|---|---|---|---|
edgeId |
guid |
yes | |
kind |
string |
yes | project |
fromRef |
string |
yes | |
toRef |
string |
yes | |
version |
string |
no |
OwnershipEntry (entity)¶
Ownership and history facts per path.
| Field | Type | Required | Description |
|---|---|---|---|
path |
string |
yes | |
owners |
list:string |
yes | |
lastCommit |
string |
yes | |
lastChangedAt |
datetime |
yes | |
churn90d |
int |
yes |
Tables: dbo.RepositoryIndexSets, dbo.Symbols, dbo.DependencyEdges, dbo.Ownership — see the DDL appendix.
VectorMemoryService¶
erDiagram
IndexRevision {
guid indexRevisionId PK
string tenantId
guid collectionId
enum_IndexKind kind
int revision
string embeddingProfileVersion
string vectorProfile
enum_IndexState state
long itemCount
list_guid builtFromSnapshots
datetime builtAt
}
GraphFact {
guid factId PK
string tenantId
enum_GraphDomain domain
string subject
string predicate
string object
datetime validFrom
datetime validTo
datetime observedAt
guid sourceId
string sourceVersion
decimal confidence
string trustTier
bool verified
}
RetrievalQuery {
guid queryId PK
string tenantId
string projectId
guid runId
hash queryHash
json filters
list_guid indexesUsed
int resultCount
string citationsRef
int latencyMs
datetime executedAt
}
Tables: dbo.IndexRevisions, dbo.IndexItems, dbo.GraphFacts, dbo.RetrievalQueries — see the DDL appendix.