Aller au contenu

Data Model

Ce contenu n’est pas encore disponible dans votre langue.

Audience: developer who needs to understand what Cortex stores, how entities relate to each other, and how the taxonomy is structured.


Everything that Cortex stores and serves is an atom. Atoms are typed, versioned, queryable artefacts with six universal layers:

FieldTypeDescription
idstringUnique identifier (e.g. atom:referentiel_rnq_v9, bloc:skill_typescript)
typeFEUILLE | COMPOSELeaf atom or composite atom
labelstringHuman-readable name
sourceDocIdstringReference to the source document that produced this atom
createdAtstring (ISO 8601)Creation timestamp
FieldTypeDescription
famillestringTop-level family (e.g. GOUVERNANCE, PROFIL, ARKA_DECK, ARKADOC_BLOC)
sousFamillestringSub-family within the family (e.g. SAFETY_BASELINE, gouvernance/template)
FieldTypeDescription
occurrencestringSemver or domain-specific version (e.g. 1.0.0)
occurrenceKindstring?Classification of the occurrence
selectionNaturestring?How this atom was selected
dataRecord<string, unknown>?Arbitrary structured payload
FieldTypeDescription
profilesstring[]?Which HYOS profiles reference this atom
FieldTypeDescription
versionstring?Semver version (e.g. 1.2.0)
statusstring?Lifecycle status
contributorstring?Who last modified this atom
FieldTypeDescription
markdownstring?Rendered markdown content
examplesstring[]?Usage examples
tagsstring[]?Searchable tags
contentHashstring?SHA-256 hash of the content (used for idempotent ingestion)

The underlying storage type is GraphNode from @cortex/shared:

interface GraphNode {
id: string;
type: string;
label: string;
data: Record<string, unknown>;
sourceDocId: string;
createdAt: string;
versionSemver?: string;
contentHash?: string;
updatedAt?: string;
}

Atoms are stored in SurrealDB across three primary tables, each with a distinct purpose:

Stores atomic units that are not part of the HYOS catalogue: modes, reglements (governance rules), pipelines, templates, schemas, services, arkadoc_blocs, and arkadoc_types.

Node ID format: atom:<slug> (e.g. atom:referentiel_rnq_v9, atom:adoc_bloc_hero_section).

Stores HYOS catalogue blocks: skills, expertises, methods, tools, and scopes. These are the composable building blocks that agent profiles are assembled from.

Node ID format: bloc:<slug> (e.g. bloc:skill_typescript, bloc:methode_audit_technique).

The Bloc type:

interface Bloc {
id: string;
label: string;
blocType: 'skill' | 'expertise' | 'methode' | 'tool' | 'scope';
category: string;
description: string;
trigger?: Record<string, unknown> | string;
content?: Record<string, unknown>;
contentRef?: string;
tags?: string[];
auteur?: string;
versionSemver: string;
contentHash?: string;
createdAt: string;
updatedAt: string;
usedByCount?: number;
}

Stores HYOS agent profiles. A profile describes an LLM agent identity: role, mission, mindset, which blocks it composes, what it should never do, and which other profiles it can hand off to.

Node ID format: profil_hyos:<slug> (e.g. profil_hyos:profil_developpeur_fullstack_expert).

interface ProfilHyos {
id: string;
label: string;
serie: string;
origin: 'modele' | 'sur_mesure' | 'variante';
parentId?: string;
owner?: string;
role: string;
mission: string;
mindset?: string;
keywords?: string[];
sectors?: string[];
description?: string;
metiers?: string[];
sousFamille?: string;
famille?: string;
branche?: string;
auteur?: string;
scopeIn?: string[];
scopeOut?: string[];
responsibilities?: string[];
dna?: ProfilDna;
versionSemver: string;
contentHash?: string;
createdAt: string;
updatedAt: string;
}

Profile origins:

  • modele — instantiated from a template model
  • sur_mesure — custom-built from scratch
  • variante — derived from an existing profile (has parentId)

Each profile has a computed DNA fingerprint (ProfilDna) that scores it across nine dimensions:

DimensionKeyMeaning
SpecialisationspeHow focused the profile is on a narrow domain
AutonomyautoHow self-sufficient (scopes + tools)
DiversitydivVariety of bloc types attached
Expertise ratioexpExpertise blocs vs skill blocs
Core focuscoreRatio of core vs support blocs
MethodicitymetNumber of method blocs
StabilitystabAge since creation
PopularitypopNumber of derived variantes
SectoricitysecNumber of sectors covered

The taxonomy organizes atoms into a three-level hierarchy: branche > famille > sous-famille.

Defined in the ingestion schema (HYOS_BRANCHES):

BranchPurpose
equipementAgent equipment (skills, tools, expertises, methods, scopes)
gouvernanceGovernance rules, templates, modes
serviceService atoms (pipelines, schemas)
arkadoc_blocDocument building blocks
arka_deckPlatform-specific atoms (arkadoc_types)

The ingestion pipeline routes atoms to the correct storage table based on their type:

TypeTableBranch
skillblocequipement
expertiseblocequipement
methodeblocequipement
toolblocequipement
scopeblocequipement
modeatomgouvernance
reglementatomgouvernance
pipelineatomservice
templateatomgouvernance
schemaatomservice
serviceatomservice
arkadoc_blocatomarkadoc_bloc
arkadoc_typeatomarka_deck

Taxonomy is modeled as graph nodes connected by edges:

  • famille:<slug> nodes represent top-level families (e.g. famille:canonique_gouvernance).
  • sous_famille:<slug> nodes represent sub-families.

The canonical family ID format is famille:canonique_<famille_lowercase> (defined by FAMILLE_CANONIQUE_PREFIX in the ingestion schema).


Governance atoms are organized into transversal sous-familles:

Sous-famillePurpose
SAFETY_BASELINESafety baseline rules
META_COGNITIONSelf-awareness and reasoning patterns
ERROR_RECOVERYError recovery procedures
UNCERTAINTY_MANAGEMENTHandling uncertainty
SCOPE_CONTROLScope boundary enforcement
CONSISTENCY_CONTROLCross-layer consistency
GOAL_ALIGNMENTGoal alignment verification
DISAGREEMENT_HANDLINGConflict resolution
NAVIGATION_STRATEGYNavigation strategy rules
gouvernance/templateGovernance templates
gouvernance/methodeGovernance methods
gouvernance/reglementGovernance regulations

Cortex uses typed edges to connect nodes in the knowledge graph:

Edge typeFromToMeaning
belongs_to_familleatom/blocfamilleAtom belongs to this family
belongs_to_sous_familleatom/blocsous_familleAtom belongs to this sub-family
equipe_deblocprofil_hyosBloc is attached to this profile
authored_byatomcontributorAtom was authored by this contributor
instantiated_frominstanceprofil_hyosInstance derived from this profile
belongs_to_projectmission/odm/task/crprojectEntity belongs to this project
belongs_to_missionodm/task/crmissionEntity belongs to this mission
belongs_to_odmtask/crodmEntity belongs to this ODM
belongs_to_taskcrtaskCR belongs to this task
executed_byartefactcontributorArtefact executed by this contributor

Edge storage type:

interface GraphEdge {
id: string;
type: string;
from: string;
to: string;
weight?: number;
data: Record<string, unknown>;
sourceDocId: string;
createdAt: string;
}

Two Zod schemas govern what enters the catalogue:

The canonical schema for blocks and atoms. Structure:

{
_schema: 'arka.hcm.block.v1',
_produced_at: string,
_produced_by: string,
registre: {
id: string,
type: HyosType, // skill | expertise | methode | tool | scope | mode | reglement | ...
branche: HyosBranche, // equipement | gouvernance | service | arkadoc_bloc | arka_deck
label: string,
description: string,
famille: string,
sous_famille: string,
tags: string[],
sectors: string[],
metiers: string[],
version: string,
auteur: string,
artifact_ref: string,
trigger: { keywords, contexts, signals, embedding },
routing: { inject, delivery, priority, cost_tokens },
},
artefact: Record<string, unknown>,
}

The canonical schema for HYOS profiles:

{
_schema: 'arka.hcm.profil.v1',
_produced_at: string,
_produced_by: string,
registre: {
id: string,
type: 'profil_hyos',
branche: 'profil',
label: string,
description: string,
famille: string, // default: 'PROFIL'
sous_famille: string,
tags: string[],
sectors: string[],
metiers: string[],
version: string,
auteur: string,
mission: string,
mindset?: string,
},
scope?: { in_scope: string[], out_of_scope: string[] },
responsibilities: string[],
composition: {
expertises: CompositionEntry[],
skills: CompositionEntry[],
tools: CompositionEntry[],
scopes: CompositionEntry[],
methodes: CompositionEntry[],
},
}

Where CompositionEntry is:

{ bloc_id: string, poids: 'core' | 'support', raison?: string }

The workspace layer manages project lifecycle entities stored in SurrealDB:

EntityTableKey fields
Projectprojectlabel, status, code
Missionmissionlabel, status, project_id
Mission Contract (MCT)mission_contractlabel, status, owner, cadrage, casting_mct
ODM (Ordre de Mission)odmlabel, status, priority, assigned_to, category
Tasktasklabel, status, assigned_to, qa_agent_id, sequence
CR (Compte Rendu)crlabel, status, type, data
Dispatchmapdispatchmapstatus, steps
Resilienceresiliencestatus, protocol
Decisiondecisiontitre, decision, context
TransactiontransactiontransactionType, fromActor, refs

Per-project memory stored in SurrealDB:

EntityTablePurpose
Agent resumememory_agent_resumeAgent state summary per project
Project resumememory_project_resumeProject state summary
Decisionmemory_project_decisionExplicit decisions with who/when/why
Errormemory_erreurErrors encountered with correction and lesson
Patternmemory_patternRecurring patterns observed
Feedbackmemory_feedbackAgent-to-agent feedback
Blocagememory_blocageBlocking issues with tool/rule/workaround
Besoinmemory_besoinIdentified needs with context
Contradictionmemory_contradictionCross-agent contradictions
Resilience signalmemory_resilience_signalRecovery signals from past incidents
Note Praxisnote_praxisOperational notes (L1-L5 levels, H2A/A2A flux)
Checkpoint tracecheckpoint_traceA2A handoff traces with checkpoint validation
CR Notecr_noteBatch synthesis notes