DLP Specification
Part IX: Implementation

§28 Query Architecture

44 query patterns. Dual-language (Cypher + SQL). AI-native query stack.

§28 Query Architecture

This specification section defines implementation contracts for the Decision Lineage Protocol substrate.

The Decision Lineage Protocol substrate is AI-native infrastructure. Humans express intent in natural language; AI translates to substrate queries. No user — human or AI agent — writes Cypher or SQL directly. The query architecture defines a pattern-based query model with forty-four named patterns across eleven domain families, a dual-language execution strategy (Cypher for graph traversal, SQL for relational operations), canonical return structures with mandatory truth type metadata, an AI query generation layer that maps natural language to parameterized templates, and a three-format interchange layer exposing query results to external consumers.

This section specifies the query contracts — inputs, outputs, traversal semantics, governance constraints, and interchange mappings — that the SDK must implement. The forty-four patterns read the state produced by the two hundred and forty-four operations defined in §27. Transport protocol, wire format, and client-library ergonomics are DESIGN SPACE.

Figure 15: Query Architecture — Dual-language query model with Cypher graph traversal and SQL relational operations


§28.1 Query Architecture Overview

§28.1.1 Design Principles

The query architecture rests on five principles:

Pattern-based query model. Every query the substrate supports maps to a named pattern with typed inputs, a defined traversal strategy, a canonical return structure, and explicit governance constraints. Ad-hoc queries do not exist. AI agents and SDK consumers select patterns, supply parameters, and receive structured results. The pattern library is the complete query surface.

AI-native interface. The primary query interface is natural language. Humans describe what they want; the AI query generation layer identifies the matching pattern, extracts parameters, validates constraints, and executes the query. The AI layer never constructs raw query strings — it fills parameters into pre-validated templates.

Dual-language execution. The substrate uses two query languages with an architectural boundary. Cypher (Apache AGE) handles graph traversals — variable-depth paths along the thirteen cross-primitive relationships defined in §4.4. SQL (PostgreSQL) handles relational operations — lookups, filters, aggregations, and joins on fixed-schema tables. Hybrid patterns compose results from both engines at the SDK layer. The boundary is stable: if a pattern traverses variable-depth paths, it requires Cypher; everything else is SQL.

Truth type transparency. Every query result carries truth type metadata — truth_type, verification_state, and record_lifecycle_state — on every returned record. Consumers always know the epistemic status of the data they receive. Derived content is never presented as canonical without explicit marking.

Three interchange formats. Query results are exposed through three formats: MCP Server for AI agent interaction, JSON Export for integration pipelines, and RDF/OWL Export for formal compliance and archival. Not all patterns require all formats — internal governance patterns (scope validation, principal enforcement) are SDK-only.

§28.1.2 Query Stack

The query stack comprises four layers:

Table 28.1.1: Query Stack Layers

LayerRoleInputOutput
Natural LanguageHuman intent expressionFree-text question or commandPattern identification + parameter candidates
AI GenerationPattern selection, parameter extraction, validationNL input + substrate contextValidated, parameterized query template
Query EngineDual-language executionTemplate + parametersRaw result set
Return FormattingCanonical structure assembly, truth type annotation, paginationRaw result setTyped return structure with QueryMetadata

The AI Generation layer sits between the human and the query engine. It translates intent to parameterized templates, validates parameters against the substrate schema, enforces depth limits and access control, and handles disambiguation when multiple patterns match a natural language query.

§28.1.3 Pattern-to-Operation Correspondence

The forty-four query patterns read state produced by the two hundred and forty-four operations defined in §27 and the seventy-two cross-cutting operations spanning multiple primitives. Every operation postcondition creates or modifies queryable state:

  • Create operations produce records queryable by truth type filter (QP-TRU-01) and domain-specific patterns.
  • Transition operations advance lifecycle state queryable by status-filtered patterns (QP-ORC-01, QP-SIG-01, QP-SIG-02, QP-TMP-01).
  • Composite operations produce multi-primitive state queryable by graph traversal patterns (QP-AUTH-01 through QP-LIN-04) and governance state patterns (QP-GOV-01 through QP-GOV-05).
  • Invariant enforcement produces validation reports queryable by QP-INV-01 and QP-INV-02.
  • KPI operations produce measurement records queryable by QP-KPI-01 through QP-KPI-03.

No operation produces state that falls outside the forty-four pattern query surface.


§28.2 Dual-Language Strategy

§28.2.1 Language Selection

The substrate query engine uses two languages, each selected for a distinct structural reason.

Cypher (Apache AGE) handles graph traversals — queries that follow variable-depth paths along the thirteen cross-primitive relationships (§4.4). Authority delegation chains, decision lineage traces, impact radius computations, escalation path resolutions, and recursive instance hierarchies are graph-native operations. Cypher expresses these as declarative path patterns with per-hop filtering and depth control. Apache AGE runs as a PostgreSQL extension, keeping both languages within a single database system.

SQL (PostgreSQL) handles relational operations — lookups on fixed-schema tables, filtered queries with known join paths, aggregations, and temporal reconstructions. Governance state queries, truth type filtering, actor context loading, work specification retrieval, KPI metrics, and cycle management are relational by nature. SQL's mature optimization, window functions, and aggregation capabilities serve these patterns directly.

§28.2.2 Classification Rule

The classification rule is deterministic: if a pattern traverses variable-depth paths along cross-primitive relationships, it is Cypher-required. If it performs lookups, filters, or aggregations on fixed-schema tables with known joins, it is SQL-eligible. If it combines both, it is Hybrid-required.

Table 28.2.1: Language Classification Summary

ClassificationCountPercentageDiscriminator
Cypher-required1023%Variable-depth traversal along §4.4 relationships
SQL-eligible2455%Fixed-schema lookups, filters, aggregations
Hybrid-required1023%Graph traversal composed with relational filtering

§28.2.3 Language Distribution by Domain

Graph traversal concentrates in two domain families. Authority & Delegation and Decision Lineage account for seven of ten Cypher-required patterns. This reflects the substrate's core structural insight: authority chains and decision lineage are inherently graph problems — they involve variable-depth paths, multi-edge traversals, and per-hop validation.

Table 28.2.2: Language Classification by Domain Family

Domain FamilyCypherSQLHybridTotal
A — Authority & Delegation415
B — Decision Lineage314
C — Governance State325
D — Truth & Verification44
E — Actor & Instance314
F — Orchestration & Work415
G — Signal & IQ1214
H — Profile & Portfolio2114
I — Conservation & Invariant123
J — KPI & Measurement33
K — Temporal & Cycle33

§28.2.4 Hybrid Composition Model

All ten Hybrid patterns follow a consistent composition strategy: SQL identifies entities and filters records; Cypher validates structural relationships through graph traversal; the SDK composes results into the canonical return structure. The SDK query layer orchestrates this composition — it is not visible to query consumers.

Representative hybrid composition:

  • QP-AUTH-05 (AI-Cannot-Be-Principal Enforcement): SQL identifies AI actors by type. Cypher traverses each actor's authority chains to verify human-held root termination.
  • QP-GOV-04 (Conformance Test): SQL executes Pass 1 invariant checks (B1–B4, B5-immediate, B6-binding). Cypher executes Pass 2 checks (B5-T transitive chain, B8 signal routing). SDK aggregates into a unified conformance report.
  • QP-INV-01 (Conservation Law Compliance): SQL runs all single-node property checks. Cypher runs transitive closure and cross-instance validation. SDK merges into a compliance result.

§28.2.5 CTE Fallback Strategy

Recursive Common Table Expressions (CTEs) provide a fallback for deployments without Apache AGE. Simple single-edge-type chains — authority delegation (QP-AUTH-01, QP-AUTH-02), instance hierarchy (QP-PRO-02) — have clean CTE substitutions with acceptable performance up to depth twenty. Multi-edge patterns (QP-LIN-01 decision lineage) require multiple CTEs joined at the application layer. Impact radius (QP-LIN-03) with its thirteen-edge-type multi-directional traversal has no viable CTE fallback — Apache AGE is required for this pattern.

Table 28.2.3: CTE Fallback Viability

ViabilityPatternsNotes
FullQP-AUTH-01, QP-AUTH-02, QP-PRO-02Single FK chain; clean recursive CTE
PartialQP-AUTH-03, QP-AUTH-04, QP-LIN-01, QP-LIN-02, QP-LIN-04, QP-SIG-03, QP-PRO-03Multiple CTEs required; verbose and performance-sensitive
NoneQP-LIN-03Thirteen edge types; multi-directional traversal; graph-native only

§28.3 Query Pattern Library

§28.3.1 Pattern Taxonomy

The query pattern library comprises forty-four named patterns organized into eleven domain families. Each pattern specifies typed input parameters, a canonical return structure, traversal semantics, depth limits, governance constraints, and use cases. The families are not arbitrary groupings — they correspond to the structural domains of the governance substrate.

Table 28.3.1: Query Pattern Library

IDPattern NameFamilyLanguageReturn TypeMCP Tool
QP-AUTH-01Authority Chain TraversalACypherPathResultauthority_chain
QP-AUTH-02Delegation TreeACypherTreeResultdelegation_tree
QP-AUTH-03Multi-Path Authority CheckACypherPathResultcheck_authority
QP-AUTH-04Delegation Scope ValidationACypherConformanceResultSDK-only
QP-AUTH-05AI-Cannot-Be-Principal EnforcementAHybridConformanceResultSDK-only
QP-LIN-01Decision Lineage TraceBCypherPathResultdecision_lineage
QP-LIN-02Decision DescendantsBCypherTreeResultdecision_descendants
QP-LIN-03Impact RadiusBCypherSubgraphResultimpact_radius
QP-LIN-04Decision ReconstructionBHybridCompositereconstruct_decision
QP-GOV-01Governance Source RegistryCSQLPaginatedListgovernance_registry
QP-GOV-02Activation Pipeline StateCSQLPaginatedListactivation_pipeline
QP-GOV-03Gap Register QueryCSQLPaginatedListgap_register
QP-GOV-04Conformance TestCHybridConformanceResult[]conformance_check
QP-GOV-05Policy Surface QueryCHybridCompositepolicy_surface
QP-TRU-01Truth Type FilterDSQLPaginatedListfilter_by_truth_type
QP-TRU-02Verification State QueryDSQLPaginatedListverification_status
QP-TRU-03Claims Graduation StatusDSQLPaginatedListclaims_graduation
QP-TRU-04Promotion Pathway StatusDSQLPaginatedListpromotion_queue
QP-ACT-01Actor Context QueryESQLActorContextRecordactor_context
QP-ACT-02Actor Governance PortfolioEHybridPortfolioRecordactor_portfolio
QP-ACT-03RACIVG Role QueryESQLPaginatedListrole_assignments
QP-ACT-04Role Envelope QueryESQLRoleEnvelopeRecordSDK-only
QP-ORC-01Work Specification QueryFSQLPaginatedListwork_specifications
QP-ORC-02Routing Resolution QueryFSQLPaginatedListrouting_decisions
QP-ORC-03AICAR Classification QueryFSQLCountSummary[]SDK-only
QP-ORC-04Constraint Evaluation QueryFSQLPaginatedListSDK-only
QP-ORC-05Delegation Scope ResolutionFHybridDelegationScopeRecorddelegation_scope
QP-SIG-01Signal Routing QueryGHybridPaginatedListsignals
QP-SIG-02IQ Lifecycle QueryGSQLPaginatedListinvestigative_queries
QP-SIG-03Escalation Chain QueryGCypherPathResultescalation_chain
QP-SIG-04Pattern Detection QueryGSQLPaginatedListSDK-only
QP-PRO-01Profile Graduation StateHSQLGraduationAssessmentprofile_status
QP-PRO-02Recursive Instance TreeHCypherTreeResultinstance_tree
QP-PRO-03Constraint Cascade QueryHCypherCascadeResultSDK-only
QP-PRO-04Depth-Gated Visibility QueryHHybridFiltered resultSDK-only
QP-INV-01Conservation Law ComplianceIHybridConformanceResult[]invariant_compliance
QP-INV-02Violation History QueryISQLPaginatedListviolation_history
QP-INV-03Override Audit QueryIHybridPaginatedListoverride_audit
QP-KPI-01KPI Lifecycle QueryJSQLPaginatedListkpi_lifecycle
QP-KPI-02Invariant Signal QueryJSQLInvariantSignalReading[]invariant_signals
QP-KPI-03Control KPI StatusJSQLPaginatedListcontrol_kpis
QP-TMP-01Cycle-Scoped QueryKSQLPaginatedListcycles
QP-TMP-02Temporal AggregationKSQLTimelineResultSDK-only
QP-TMP-03Account Time-Window QueryKSQLAccountStateRecordaccount_history

MCP exposure. Thirty-five of forty-four patterns are exposed as MCP Server tools. Nine patterns are SDK-only: internal validation patterns (QP-AUTH-04, QP-AUTH-05), access control patterns (QP-ACT-04, QP-PRO-04), internal analytics (QP-ORC-03, QP-ORC-04, QP-SIG-04, QP-TMP-02), and structural validation (QP-PRO-03).

§28.3.2 Domain Family Descriptions

Table 28.3.2: Domain Families

FamilyDomainCore ConcernLanguage Tendency
AAuthority & DelegationChain traversals, scope validation, AI-Cannot-Be-PrincipalCypher-dominant
BDecision LineageCausal chains, impact radius, decision reconstructionCypher-dominant
CGovernance StateActivation pipeline, gap register, conformance, policy surfacesSQL with Hybrid for graph-backed tests
DTruth & VerificationTruth type filtering, verification state, claims graduationPure SQL
EActor & InstanceActor context, portfolio, RACIVG roles, role envelopesSQL with Hybrid for cross-instance
FOrchestration & WorkWork specifications, routing decisions, delegation scopeSQL with Hybrid for chain validation
GSignal & IQSignal routing (B8), IQ lifecycle (B9), escalation chainsMixed
HProfile & PortfolioGraduation state, recursive instances, constraint cascadeCypher for hierarchy; SQL for state
IConservation & InvariantConservation law compliance, violation history, override auditHybrid for validation; SQL for history
JKPI & MeasurementKPI lifecycle, invariant signals, control KPI statusPure SQL
KTemporal & CycleCycle-scoped queries, temporal aggregation, state reconstructionPure SQL

§28.4 Authority & Decision Patterns

Families A and B are the most graph-intensive domains. They traverse the cross-primitive relationships defined in §4.4 to answer the substrate's core structural questions: who has authority, how was it delegated, why was a decision made, and what does it affect.

§28.4.1 Authority Chain Traversal (QP-AUTH-01)

Authority chain traversal follows the delegates relationship (§4.4, relationship #11) upward from any authority to the root. This is the foundational graph pattern — every authorization check, audit trail, and scope validation relies on it.

Table 28.4.1: QP-AUTH-01 Specification

AttributeSpecification
Inputauthority_id: UUID, instance_id: UUID
OutputPathResult — ordered Authority nodes linked by delegates edges, terminating at root
TraversalUpward: child → parent via parent_authority_id. Terminates at is_root_authority = true.
Depth limitsEAS: 100, BAS: 25, PAS: inherited from parent instance
Invariants enforcedB5 (every non-root node has a parent), B5-T (chain terminates at root — cycles are violations)
GovernanceTruth type returned on every node. Scope metadata included per hop.

§28.4.2 Multi-Path Authority Check (QP-AUTH-03)

Multi-path authority check answers the question "can this actor do this?" by traversing from actor through holds and delegates edges to find any authority matching the required scope. The pattern uses eager termination — it returns the shortest valid path, not all paths.

Table 28.4.2: QP-AUTH-03 Specification

AttributeSpecification
Inputactor_id: UUID, required_scope: JSONB, instance_id: UUID
OutputPathResult — shortest valid path from actor to matching Authority, or empty
TraversalOutward: actor → (holds) → authority → (delegates) → authority. Scope filter: authority.scope @> required_scope at each node. Eager termination on first match.
Depth limitsDefault: 15. Configurable up to profile maximum.
Invariants enforcedB5 (chain validity). AI-Cannot-Be-Principal (§22): AI actors hold only delegated authority.

§28.4.3 Decision Lineage Trace (QP-LIN-01)

Decision lineage trace follows the causal chain from a decision backward through its antecedents — the intents that framed it, the evidence that informed it, the authority that legitimized it, and the account that contextualized it. This pattern traverses four of the thirteen cross-primitive relationships (§4.4): frames, evaluates, legitimizes, and contextualizes.

Table 28.4.3: QP-LIN-01 Specification

AttributeSpecification
Inputdecision_id: UUID, instance_id: UUID
OutputPathResult — ordered Decision nodes with causal edges toward root causes
TraversalUpward: effect → cause. Edge types: frames (Intent → Decision), evaluates (Decision → Evidence), legitimizes (Authority → Decision), contextualizes (Account → Decision). Terminates at nodes with no further causal antecedents.
Depth limitsDefault: unlimited (decision lineage is append-only; historical depth is valid). Configurable for performance.
Invariants enforcedB4 (every decision links to account). Truth type per node.

§28.4.4 Impact Radius (QP-LIN-03)

Impact radius is the most graph-intensive pattern. It traverses all thirteen cross-primitive relationships outward from a decision to compute the connected subgraph of affected entities within a configurable depth. This is not a tree — it is an arbitrary subgraph with multiple edge types, branching, and reconvergence.

Table 28.4.4: QP-LIN-03 Specification

AttributeSpecification
Inputdecision_id: UUID, instance_id: UUID, max_depth: INTEGER (default: profile-dependent — EAS: 10, BAS: 5, PAS: 3)
OutputSubgraphResult — connected component with all thirteen edge types, per-node depth from center
TraversalMulti-directional from decision. All thirteen §4.4 edge types. Collects distinct nodes within depth limit.
Depth limitsDefault: 5. Maximum: EAS: 20, BAS: 10, PAS: 5.
Invariants enforcedDepth-gated visibility (§23): respects instance boundary and actor visibility scope. Truth type per node.
CTE fallbackNone. Thirteen-edge-type multi-directional traversal is graph-native only.

§28.4.5 Decision Reconstruction (QP-LIN-04)

Decision reconstruction assembles the complete context of a decision for audit: the decision record, its authority chain, the account state at decision time, the evidence set evaluated, the intent framing, and the constraint set in scope. This is a hybrid pattern — graph traversal resolves structural relationships; SQL retrieves field-level details and the temporal constraint snapshot.

Table 28.4.5: QP-LIN-04 Specification

AttributeSpecification
Inputdecision_id: UUID, instance_id: UUID
OutputComposite: DecisionRecord + PathResult (authority chain) + AccountRecord (state snapshot) + EvidenceRecord[] + IntentRecord[] + ConstraintRecord[]
TraversalGraph: legitimizes (Authority), contextualizes (Account), evaluates (Evidence), frames (Intent). SQL: decision fields, constraint set active at decision.made_at.
Invariants enforcedB4 (account link), B5 (authority chain). Derived evidence clearly distinguished from Authoritative/Declared.

§28.4.6 Remaining Authority & Decision Patterns

Four additional patterns complete these families:

Table 28.4.6: Additional Authority & Decision Patterns

PatternPurposeKey Feature
QP-AUTH-02 (Delegation Tree)Enumerate all authorities delegated from a source, downwardTreeResult with fanout per level
QP-AUTH-04 (Delegation Scope Validation)Verify scope containment at every hop in a delegation chainPer-hop child.scope ⊆ parent.scope check
QP-AUTH-05 (AI-Cannot-Be-Principal)Verify every AI actor's authority traces to a human rootHybrid: SQL identifies AI actors, Cypher validates chains
QP-LIN-02 (Decision Descendants)Find all downstream decisions and work from a root decisionTreeResult via authorizes path (Decision → Commitment → Work)

§28.5 Governance & Compliance Patterns

Families C and I address governance infrastructure: what governance frameworks are active, where compliance gaps exist, whether behavioral invariants hold, and how violations are tracked and overridden.

§28.5.1 Conformance Test (QP-GOV-04)

The conformance test pattern executes the ten conformance tests defined in §13, each backed by one or more of the ten behavioral invariants. This is a hybrid pattern: Pass 1 tests (B1 through B4, B5-immediate, B6-binding) are relational single-node checks; Pass 2 tests (B5-T transitive chain, B8 signal routing) require graph traversal.

Table 28.5.1: QP-GOV-04 Specification

AttributeSpecification
Inputinstance_id: UUID, governance_domain: ENUM (optional, 1–7 per §13), conformance_level: ENUM (optional: structural, operational, governed, auditable, sovereign)
OutputConformanceResult[] — per-test: test_id, invariant_ref (B1–B10), result (pass/fail), validation_pass (pass_1_core, pass_2_sparql, schema), enforcement_action, sample_violations
TraversalPass 1: SQL single-node property checks. Pass 2: Cypher transitive closure (B5-T via QP-AUTH-01) and routing validation (B8 via QP-SIG-03).
Conformance levelsStructural: B1–B4. Operational: + B5, B6. Governed: + B7, B8. Auditable: + B9. Sovereign: all B1–B10 plus RATIFIED verification (§6.7).
Result truth typeConformance results are always Authoritative — the validation engine is a trusted system component.

§28.5.2 Gap Register (QP-GOV-03)

The gap register query retrieves governance gaps characterized by the seven verification types (§6.7): EXIST, COMPLETE, CURRENT, APPROVED, CONSISTENT, COMPLIANT, RATIFIED. Each gap records which verification types are present and which are missing, enabling graduated assessment of governance completeness.

Table 28.5.2: QP-GOV-03 Specification

AttributeSpecification
Inputinstance_id: UUID, verification_types_missing: ENUM[] (optional), closure_stage: ENUM (optional), governance_criticality: ENUM (optional)
OutputPaginatedList<GapRegisterEntry> — gap_id, pattern_ref, verification_types_present/missing, criticality_level, closure_stage, materiality_level
OrderingDefault: criticality DESC (conservation_critical → invariant_enforcing → standard → advisory), closure_stage ASC
Closure stagesAwareness → Enablement → Management → Governance (§12 four-stage closure progression)

§28.5.3 Conservation Law Compliance (QP-INV-01)

Conservation law compliance runs the full invariant test suite — Pass 1 relational checks and Pass 2 graph checks — mapped to the nine conservation laws (§9). Each conservation law maps to one or more behavioral invariants: organizational direction is enforced by B9; binding force by B1 and B2; feasibility truth by B2; epistemic status by B3; scope preservation by B5; rule universality by B6; emergency signaling by B7 and B8.

Table 28.5.3: QP-INV-01 Specification

AttributeSpecification
Inputinstance_id: UUID, conservation_law: TEXT (optional), invariant_id: ENUM (optional, B1–B10)
OutputConformanceResult[] — per conservation law: enforcing invariant(s), enforcement pass, result, violation count, sample violations
Pass 1B1 (commitment_id IS NOT NULL), B2 (EXISTS capacity_allocations), B3 (truth_type IS NOT NULL), B4 (account_id IS NOT NULL), B5-immediate, B6-binding
Pass 2B5-T (transitive chain via QP-AUTH-01), B6-U (cross-instance universality), B8 (routing via QP-SIG-03), B9 (resolved IQ → Decision/Work)

§28.5.4 Remaining Governance & Compliance Patterns

Table 28.5.4: Additional Governance Patterns

PatternPurposeLanguage
QP-GOV-01 (Governance Source Registry)List registered governance patterns by layer and criticalitySQL
QP-GOV-02 (Activation Pipeline State)Show activation state across governance sources through the six-stage pipeline (§12)SQL
QP-GOV-05 (Policy Surface)Generate a scoped governance projection — "what rules apply to me?"Hybrid
QP-INV-02 (Violation History)Query violation records with override tracking and enforcement action filteringSQL
QP-INV-03 (Override Audit)Audit invariant overrides: authority, rationale, scope of exceptionHybrid

§28.6 Truth & Verification Patterns

Family D enforces the epistemic boundary (§6) through queries. Every primitive record in the substrate carries a truth type (Authoritative, Declared, Derived, Opaque — §6.1), a verification state, and a record lifecycle state. These four patterns make the epistemic layer queryable.

§28.6.1 Truth Type Filter (QP-TRU-01)

The foundational epistemic query. It filters any of the nineteen primitive tables by truth type and lifecycle state. This pattern is invoked — directly or as a sub-query — by virtually every other pattern that returns primitive records.

Table 28.6.1: QP-TRU-01 Specification

AttributeSpecification
Inputinstance_id: UUID, primitive_type: ENUM (any of 19), truth_type: ENUM (authoritative, declared, derived, opaque), record_lifecycle_state: ENUM (optional, default: active)
OutputPaginatedList<PrimitiveRecord> — with truth_type, verification_state, and record_lifecycle_state on every record
Default behaviorExcludes superseded records unless explicitly requested. Derived content is clearly marked as non-canonical.
B3 enforcementEvery returned Evidence record carries exactly one truth type from the controlled vocabulary.

§28.6.2 Promotion Pathway Status (QP-TRU-04)

The promotion pathway query tracks AI-generated content through its lifecycle from staging to promotion or expiration. All AI output lands in staging with truth type Derived (§6.2). Promotion to Declared requires human review; promotion to Authoritative requires a Decision with traceable Authority (B5). No demotion path exists — the promotion direction is monotonic.

Table 28.6.2: QP-TRU-04 Specification

AttributeSpecification
Inputinstance_id: UUID, promotion_workflow_state: ENUM (optional: staging, human_review, promoted, archived), content_type: ENUM (optional)
OutputPaginatedList<PromotionRecord> — record_id, current_truth_type, promotion_state, ttl_expiry, reviewer, promotion_decision_ref
Epistemic boundaryDerived → Declared → Authoritative only. Staging requirement is structural, enforced by the type system.

§28.6.3 Remaining Truth & Verification Patterns

Table 28.6.3: Additional Truth Patterns

PatternPurposeKey Feature
QP-TRU-02 (Verification State)Query verification state (§6.4) by state and verification type (§6.7)Seven verification types: EXIST through RATIFIED
QP-TRU-03 (Claims Graduation)Query claims by graduation stage (§6.5)Five stages: Asserted → Investigating → Corroborated → Verified → Graduated

§28.7 Actor, Work & Orchestration Patterns

Families E and F provide the query surface for actor context, RACIVG role assignments, work specifications, routing decisions, and delegation scope. These patterns read the state produced by the orchestration operations (§27.7) and actor lifecycle operations (§27.2).

§28.7.1 Actor Context (QP-ACT-01)

Every actor action requires context loading — the actor's type, active roles, authority scope, constraints, governance posture, and delegation references. This is the most frequently invoked pattern. It is pure SQL: a lookup on the actors table joined with delegations and role envelopes.

Table 28.7.1: QP-ACT-01 Specification

AttributeSpecification
Inputactor_id: UUID, instance_id: UUID
OutputActorContextRecord — actor_type (Human, AI-Automation, AI-Agentic, AI-Assistive), active_roles (RACIVG[]), authority_scope, active_constraints[], governance_posture (Standard/Enhanced/Critical), delegation_refs[]
RACIVG constraintAI actors cannot hold A (Accountable) — the AI-Cannot-Be-Principal constraint (§22)
FrequencyVery high — every actor action triggers context loading

§28.7.2 Routing Resolution (QP-ORC-02)

Routing resolution queries audit the seven-step resolution engine (§A2): CLASSIFY → ACTIVATE → ROUTE → SELECT → COMPOSE → CONFIRM → EMIT. Each routing decision record captures the five-dimensional context (AICAR type, decision type, consequence level, operating posture, graduation stage), the alternatives considered, the selection rationale, and the computed human-in-the-loop level.

Table 28.7.2: QP-ORC-02 Specification

AttributeSpecification
Inputrouting_decision_id: UUID (optional), instance_id: UUID, aicar_type: ENUM (optional)
OutputPaginatedList<RoutingDecisionRecord> — alternatives_considered, selected_assignments, five_dimensional_position, computed_HITL_level, confidence_assessment, authority_basis
Five dimensionsAICAR type × Decision type × Consequence level × Operating posture × Graduation stage
HITL levels0 (no human involvement) through 3 (human makes decision; AI provides information only)

§28.7.3 Remaining Actor & Orchestration Patterns

Table 28.7.3: Additional Actor & Orchestration Patterns

PatternPurposeKey Feature
QP-ACT-02 (Portfolio)Actor participation across instances with per-instance authorityHybrid: SQL finds instances, Cypher resolves per-instance authority chains
QP-ACT-03 (RACIVG Roles)Query role assignments by role type, primitive scope, actor typeSQL filter on active_roles array; A (Accountable) is human-only
QP-ACT-04 (Role Envelope)Retrieve role envelope with context modifier adjustmentsSDK-only; deterministic modifier application
QP-ORC-01 (Work Specifications)Query work specifications by status and cognitive typeSM-4 lifecycle: draft → confirmed → active → completed → promoted/rejected
QP-ORC-03 (AICAR Classification)Distribution of work by cognitive type (A/B/C/D)SDK-only aggregate
QP-ORC-04 (Constraint Evaluation)Evaluate constraints bound to a work specificationThree constraint types: Routing, Behavioral, Activation
QP-ORC-05 (Delegation Scope)Resolve delegation scope for actor and work typeHybrid: SQL finds delegations, Cypher validates authority chains

§28.8 Signal, IQ & Emergence Patterns

Family G provides the query surface for the signal routing mechanism (B8), the investigative query lifecycle (B9), escalation chain resolution, and pattern detection. These patterns enforce the governance routing invariants — signals reach authority, and emergence converts to action.

§28.8.1 Signal Routing (QP-SIG-01)

Signal routing queries filter the signal register by status and object type, then validate that each signal's routing target is on the governance chain for the flagged object (B8). This is a hybrid pattern: SQL filters signals; Cypher traverses the governs edge (Authority → Primitive) and the delegates chain upward to verify routing compliance.

Table 28.8.1: QP-SIG-01 Specification

AttributeSpecification
Inputsignal_id: UUID (optional), instance_id: UUID, signal_status: ENUM (optional — seven SM-7 states), object_type: ENUM (optional — any of 19 primitives)
OutputPaginatedList<SignalRecord> — signal_type, flagged_object_ref, routed_to_authority, status, reservation_nature, escalation_history
B7 enforcementEvery primitive class has a signal attachment surface — any governed object can be flagged
B8 enforcementRouting target must be on the governance chain for the flagged object, at any depth
Signal lifecycleCreated → Routed → Processing → Escalated → Monitoring → Resolved or Dismissed (SM-7)

§28.8.2 Escalation Chain (QP-SIG-03)

The escalation chain query resolves the full authority path for a governed object — from the immediate governing authority to the root. This implements the algedonic channel: emergency signals can bypass intermediate hierarchy to reach any authority on the chain. The pattern is Cypher-required: it traverses the governs edge to find the immediate authority, then follows delegates upward.

Table 28.8.2: QP-SIG-03 Specification

AttributeSpecification
Inputobject_id: UUID, object_type: ENUM, instance_id: UUID
OutputPathResult — authority chain from immediate governing authority to root
TraversalFirst edge: governs (Authority → Primitive). Then: delegates chain upward.
B8 scopeSignals may route to any authority on this path — not restricted to the immediate governor

§28.8.3 IQ Lifecycle (QP-SIG-02)

Investigative queries are the emergence mechanism — context-attached or free-floating capture of questions that arise from governance activity. The IQ lifecycle query filters by status, intent type (eight types: explore, validate, disambiguate, fill_gap, challenge, connect, branch_inventory, confidence_probe), and origin type (claim, signal, capture, workflow). B9 enforcement requires that every resolved IQ produces a Decision or Work item — the gap between what the organization knows and what it does about it must close.

§28.8.4 Pattern Detection (QP-SIG-04)

Pattern detection aggregates signals and IQs within a time window to identify recurring patterns. Pattern detection evidence enters as Derived truth (§6) and requires human promotion before influencing routing decisions. This is an SDK-only pattern — not exposed via MCP.


§28.9 Profile, KPI & Temporal Patterns

Families H, J, and K cover the portfolio hierarchy, measurement framework, and temporal governance layer.

§28.9.1 Recursive Instance Tree (QP-PRO-02)

The recursive instance tree traverses the substrate's organizational hierarchy — parent-child relationships, spawning events, graduation topology changes, evidence feeds, and federation licenses. This is a Cypher-required pattern: instance relationships form a graph with five edge types (PARENT_CHILD, SPAWNS, GRADUATES_TO, FEEDS, LICENSES_FROM) and unknown depth.

Table 28.9.1: QP-PRO-02 Specification

AttributeSpecification
Inputinstance_id: UUID (root), relationship_type: ENUM (optional filter), max_depth: INTEGER (optional)
OutputTreeResult — hierarchical instance structure with relationship types and profile assignments per node
Depth limitsEAS: 10, BAS: 5, PAS: 2
GovernanceSpawning stage ceiling: child cannot start above parent's stage. Tighten-only constraint cascade.

§28.9.2 Invariant Signal Query (QP-KPI-02)

Invariant signals are the always-on diagnostic dimensions that protect the enterprise during change. Eight dimensions — cycle time distribution, quality/rework rate, variance/predictability, escalation frequency, judgment load, evidence completeness, semantic integrity, change failure rate — are monitored continuously regardless of phase. These are not targets; they are diagnostic signals that answer "is the system healthier or more fragile than before?"

Table 28.9.2: QP-KPI-02 Specification

AttributeSpecification
Inputinstance_id: UUID, dimension: ENUM (optional — one of eight), time_window: INTERVAL (optional)
OutputInvariantSignalReading[] — per dimension: current_value, trend (increasing/stable/decreasing), threshold_status (normal/warning/critical), historical_values
Three KPI classesInvariant Signals (IS) — always-on, longitudinal. Control KPIs (CKPI) — temporary, phase-specific. Intent Progress Indicators (IPI) — slow-moving, strategic.

§28.9.3 Remaining Profile, KPI & Temporal Patterns

Table 28.9.3: Additional Profile, KPI & Temporal Patterns

PatternPurposeKey Feature
QP-PRO-01 (Graduation State)Instance maturity assessment — current stage and trigger statusA → A+ → B → C; no stage skipping
QP-PRO-03 (Constraint Cascade)Verify tighten-only constraint inheritance through instance hierarchyPer-hop intersection: child threshold ≤ parent threshold
QP-PRO-04 (Depth-Gated Visibility)Filter query results by actor's visibility levelOwn detail, parent context, descendant aggregates; sibling isolation
QP-KPI-01 (KPI Lifecycle)Query KPI definitions by class, trigger type, and statusNo KPI silently disappears — retirement requires explicit event
QP-KPI-03 (Control KPI Status)Active control KPIs by phase and intent referenceExplicitly temporary; retire when phase ends
QP-TMP-01 (Cycle-Scoped)Cycle records by type and statusSix cycle types; cross-substrate temporal alignment
QP-TMP-02 (Temporal Aggregation)Aggregate primitives by time window with trendSDK-only; dashboard construction
QP-TMP-03 (Account History)Reconstruct account state at a point in timeTransaction replay for as-of queries

§28.10 Return Structure Specifications

§28.10.1 Design Principles

All return structures share four properties:

  1. Truth type metadata on every record. Fields truth_type, verification_state, and record_lifecycle_state appear on every primitive record and graph node. No consumer receives data without knowing its epistemic status.
  2. Pagination via cursor. List results use opaque cursor-based pagination with a configurable limit (default: 50, maximum: 500).
  3. Query metadata on every response. Every response includes a QueryMetadata envelope: query_id, pattern_id, execution timestamp, execution duration, language used, depth limit applied, profile type.
  4. Typed identifiers. All identifiers are UUID. All timestamps are ISO 8601 / TIMESTAMPTZ.

§28.10.2 Return Structure Categories

The forty-four patterns produce results from six structural categories.

Table 28.10.1: Return Structure Categories

CategoryStructuresUsed ByPagination
Primitive RecordsIntentRecord, CommitmentRecord, CapacityRecord, WorkRecord, EvidenceRecord, DecisionRecord, AuthorityRecord, AccountRecord, ConstraintRecordQP-TRU-01 (truth type filter), domain-specific patternsCursor + limit via PaginatedList
Graph ResultsPathResult, TreeResult, SubgraphResultAuthority chains, decision lineage, instance trees, escalationNot paginated — bounded by depth limit
Aggregate ResultsCountSummary, TimelineResultAICAR classification, temporal aggregationLimit on historical values
Governance StateGapRegisterEntry, ActivationStatusRecord, ConformanceResultGovernance domain patternsCursor + limit (except ConformanceResult — fixed test set)
OrchestrationRoutingDecisionRecord, WorkSpecificationRecord, GraduationAssessmentOrchestration and profile patternsCursor + limit
KPIInvariantSignalReading, KPILifecycleRecordKPI domain patternsLimit on historical values

§28.10.3 Graph Result Structures

Three structures represent graph query results, distinguished by topology:

PathResult. An ordered sequence of nodes and edges for linear traversal queries. Used by authority chains (QP-AUTH-01, QP-AUTH-03), decision lineage (QP-LIN-01), and escalation chains (QP-SIG-03). Fields: nodes[] (ordered, with node_type, truth_type, depth), edges[] (ordered, with edge_type from thirteen §4.4 relationships), total_depth, terminated_at (root_reached, max_depth, or no_further_nodes).

TreeResult. A hierarchical structure with recursive children for tree-shaped traversals. Used by delegation trees (QP-AUTH-02), decision descendants (QP-LIN-02), and instance trees (QP-PRO-02). Each TreeNode carries node_id, node_type, truth_type, depth, edge_type (relationship to parent), and children[].

SubgraphResult. An arbitrary graph structure for multi-directional traversals. Used by impact radius (QP-LIN-03) only. Fields: center (traversal origin), nodes[] (with node_type, truth_type, depth_from_center), edges[] (with edge_type, direction), total_nodes, total_edges, max_depth_reached.

Graph results are not paginated. They are bounded by depth limits — the query's max_depth parameter controls response size. For large trees, consumers reduce max_depth to control payload.

§28.10.4 Common Fields on Primitive Records

Every primitive record returned by any pattern includes the following fields:

Table 28.10.2: Common Record Fields

FieldTypeDescription
idUUIDPrimitive instance identifier
instance_idUUIDSubstrate instance
truth_typeENUM (authoritative, declared, derived)Epistemic origin (§6.1)
verification_stateENUMCurrent verification outcome (§6.4)
record_lifecycle_stateENUM (active, superseded)Whether this record is current
created_atTIMESTAMPTZRecord creation timestamp
created_byUUIDActor who created this record
versionINTEGERRecord version number

§28.10.5 Governance State Structures

Governance domain patterns return specialized structures that capture the compliance and activation state of the substrate.

GapRegisterEntry. Used by QP-GOV-03. Each entry characterizes a governance gap using the seven verification types (§6.7):

Table 28.10.3: GapRegisterEntry Fields

FieldTypeDescription
gap_idUUIDGap identifier
pattern_refTEXTReference to governance pattern signature
verification_types_presentENUM[]Which of seven verification types are satisfied
verification_types_missingENUM[]Which verification types are not satisfied
criticality_levelENUMconservation_critical, invariant_enforcing, standard, advisory (§11)
closure_stageENUMawareness, enablement, management, governance (§12)
materiality_levelENUMbaseline, high_risk, certification_grade (§12)
remediation_ownerUUIDFK → entities
truth_typeENUMEpistemic origin of gap assessment

ConformanceResult. Used by QP-GOV-04 and QP-INV-01. Each result records one conformance test execution:

Table 28.10.4: ConformanceResult Fields

FieldTypeDescription
test_idTEXTTest identifier
invariant_refENUM (B1–B10)Behavioral invariant tested
shape_uriTEXTSHACL shape URI
test_descriptionTEXTHuman-readable test description
resultENUM (pass, fail)Test outcome
validation_passENUMpass_1_core, pass_2_sparql, or schema
enforcement_actionENUMblocked, warned, or logged
violation_countINTEGERNumber of violations (if failed)
sample_violationsARRAYFocus node, node type, and violation detail per sample
truth_typeENUM (authoritative)Always Authoritative — the validation engine is a trusted system component

§28.10.6 Orchestration Structures

RoutingDecisionRecord. Used by QP-ORC-02. Captures the full context of a routing decision from the seven-step resolution engine (§A2):

Table 28.10.5: RoutingDecisionRecord Fields

FieldTypeDescription
routing_decision_idUUIDRouting decision identifier
alternatives_consideredARRAYActor ID, type, delegation ref, suitability score per alternative
selected_assignmentsARRAYActor ID, type, delegation ref, autonomy level per assignment
selection_rationaleTEXTAccount reference for rationale
five_dimensional_positionOBJECTAICAR type, decision type, consequence level, operating posture, graduation stage
computed_hitl_levelINTEGERHuman-in-the-loop level (0–3)
confidence_assessmentNUMERICRouting confidence (0.0–1.0)
authority_basisUUIDAuthority reference for the routing decision
truth_typeENUMEpistemic origin

WorkSpecificationRecord. Used by QP-ORC-01. Captures the cognitive decomposition and composition strategy for a work specification:

Table 28.10.6: WorkSpecificationRecord Fields

FieldTypeDescription
work_spec_idUUIDWork specification identifier
cognitive_decompositionARRAYComponent ID, cognitive type (A/B/C/D), dependencies, description per component
actor_assignmentsARRAYActor ID, type, delegation ref, autonomy level per assignment
effective_constraintsARRAYConstraint ID, type, enforcement mode per constraint
composition_strategyENUMsequential, parallel, iterative, conditional, delegated, federated (§A1)
five_dimensional_contextOBJECTAICAR type, decision type, consequence level, operating posture, graduation stage
statusENUMSM-4 lifecycle: draft, confirmed, active, completed, promoted, rejected
truth_typeENUMEpistemic origin

§28.10.7 Structure-to-Pattern Mapping

Table 28.10.7: Return Structure Usage

Return StructureUsed By Patterns
PathResultQP-AUTH-01, QP-AUTH-03, QP-LIN-01, QP-SIG-03
TreeResultQP-AUTH-02, QP-LIN-02, QP-PRO-02
SubgraphResultQP-LIN-03
ConformanceResultQP-AUTH-04, QP-AUTH-05, QP-GOV-04, QP-INV-01
PrimitiveRecord variantsQP-TRU-01, QP-LIN-01 (as nodes), QP-LIN-04 (composite)
ActorContextRecordQP-ACT-01
PortfolioRecordQP-ACT-02
RoleEnvelopeRecordQP-ACT-04
DelegationScopeRecordQP-ORC-05
GapRegisterEntryQP-GOV-03
ActivationStatusRecordQP-GOV-02
RoutingDecisionRecordQP-ORC-02
WorkSpecificationRecordQP-ORC-01
SignalRecordQP-SIG-01
GraduationAssessmentQP-PRO-01
CascadeResultQP-PRO-03
InvariantSignalReadingQP-KPI-02
KPILifecycleRecordQP-KPI-01, QP-KPI-03
AccountStateRecordQP-TMP-03
CountSummaryQP-ORC-03
TimelineResultQP-TMP-02
PaginatedList<T>All list-returning patterns
QueryMetadataAll patterns
ValidationErrorAll patterns (on validation failure)

Structures listed in Table 28.10.7 without field-level tables in §28.10.3–§28.10.6 (such as ActorContextRecord, PortfolioRecord, SignalRecord, InvariantSignalReading, and others) are specified by their pattern definitions in §28.4–§28.9. Field-level definitions for these structures are DESIGN SPACE.

§28.10.8 List Wrapper and Metadata

PaginatedList<T>. All patterns returning multiple records wrap them in a standard list envelope: items[], total (total matching records before pagination), cursor (opaque, null on last page), limit, has_more, instance_id.

QueryMetadata. Included on every query response:

Table 28.10.8: QueryMetadata Fields

FieldTypeDescription
query_idUUIDUnique query execution identifier
pattern_idTEXTPattern executed (e.g., QP-AUTH-01)
executed_atTIMESTAMPTZExecution timestamp
execution_msINTEGERExecution duration
language_usedENUM (cypher, sql, hybrid)Query engine(s) invoked
depth_limit_appliedINTEGERDepth limit used (graph queries)
profile_typeENUM (eas, bas, pas)Profile context
truth_type_filter_appliedENUMIf truth type filtering was active

ValidationError. Returned when a query fails validation before execution: error_code, error_message, parameter (which failed), constraint_violated, suggested_action.


§28.11 AI Query Generation

§28.11.1 Generation Architecture

The AI query generation layer translates natural language to parameterized query templates. The layer performs four functions: pattern identification, parameter extraction, validation, and execution. It never constructs raw Cypher or SQL strings — it fills typed parameters into pre-validated templates registered at SDK initialization.

§28.11.2 Template Catalog

High-frequency patterns use deterministic templates with no AI-generated query structure. The AI layer selects a template and fills parameters; the template itself is pre-validated.

Table 28.11.1: High-Frequency Templates

TemplatePatternFrequencyParametersDepth
T-AUTH-01QP-AUTH-01Very Highauthority_id, instance_idProfile-dependent
T-AUTH-03QP-AUTH-03Very Highactor_id, required_scope, instance_idDefault: 15
T-LIN-01QP-LIN-01Highdecision_id, instance_idUnlimited
T-LIN-03QP-LIN-03Highdecision_id, instance_id, max_depthDefault: 5
T-LIN-04QP-LIN-04Highdecision_id, instance_idPer-component
T-GOV-03QP-GOV-03Highinstance_id, closure_stage?, criticality?N/A
T-GOV-04QP-GOV-04Mediuminstance_id, domain?, level?Per-test
T-TRU-01QP-TRU-01Very Highinstance_id, primitive_type, truth_typeN/A
T-TRU-04QP-TRU-04Highinstance_id, workflow_state?N/A
T-ACT-01QP-ACT-01Very Highactor_id, instance_idN/A
T-ORC-01QP-ORC-01Highinstance_id, status?, cognitive_type?N/A
T-SIG-01QP-SIG-01Highinstance_id, status?, object_type?Per QP-AUTH-01
T-SIG-02QP-SIG-02Medium-Highinstance_id, status?, intent_type?N/A
T-KPI-02QP-KPI-02Highinstance_id, dimension?, time_window?N/A
T-TMP-03QP-TMP-03Medium-Highaccount_id, instance_id, as_of?N/A

§28.11.3 Validation Pipeline

Every AI-generated query passes through a six-step validation pipeline before execution:

Step 1: Pattern Selection. The AI layer identifies which pattern maps to the natural language query. If the query is ambiguous — "show me the authority" could mean QP-AUTH-01 (chain), QP-AUTH-03 (check), or QP-ACT-01 (context) — the AI layer disambiguates by conversational context or asks the user to clarify.

Step 2: Parameter Extraction. The AI layer extracts typed parameter values from natural language. Entity resolution maps names to UUID lookups ("Sarah" → actor_id). Scope resolution constructs JSONB from descriptions ("finance purchases" → scope object). Temporal resolution converts relative expressions ("last quarter" → INTERVAL).

Step 3: Parameter Validation. Type check: parameters match template type declarations. Existence check: referenced UUIDs exist in the substrate. Range check: numeric parameters within bounds. ENUM check: values in controlled vocabulary.

Step 4: Profile Check. Depth limits within profile maximum. Pattern available at this profile tier. Actor has visibility for requested scope (QP-PRO-04).

Step 5: Execute. Template instantiated with validated parameters. Query engine invoked — Cypher, SQL, or both per the pattern's language classification. Results returned in canonical structure.

Step 6: Post-Processing. Truth type metadata verified on all result records. Depth limits annotated in QueryMetadata. Pagination applied if result set exceeds limit.

§28.11.4 Natural Language Mapping

Each domain family defines representative natural language patterns that map to specific query patterns. The following examples are illustrative, not exhaustive:

Table 28.11.2: Natural Language → Pattern Mapping (Representative)

Natural LanguagePatternParameters Extracted
"Who authorized this decision?"QP-AUTH-01, QP-LIN-04decision_id → authority chain
"Can Sarah approve purchase orders over $50K?"QP-AUTH-03actor_id=Sarah, scope={action: approve, type: purchase_order, amount: >50000}
"What decisions resulted from the budget approval?"QP-LIN-02decision_id=budget approval
"What would be affected if we reverse the hiring decision?"QP-LIN-03decision_id=hiring decision
"What compliance gaps do we have?"QP-GOV-03instance_id
"Show me only the official records"QP-TRU-01truth_type=authoritative
"What AI-generated content is awaiting review?"QP-TRU-04workflow_state=human_review
"What's my current governance context?"QP-ACT-01actor_id=current user
"Why was this work routed to the AI agent?"QP-ORC-02routing_decision for specific work
"Are there any open signals?"QP-SIG-01status=created or routed
"How's the system health?"QP-KPI-02All eight dimensions
"What was the account state on January 15?"QP-TMP-03account_id, as_of=Jan 15

§28.11.5 Truth Type Awareness

The AI layer includes truth type filters appropriate to the query context. Default behavior: canonical queries filter to truth_type IN (authoritative, declared). Staging review queries filter to truth_type = derived. The AI layer overrides defaults only on explicit user request ("show me everything including AI drafts"). When Derived content is included in results, it is explicitly marked as non-canonical.

§28.11.6 Error Handling and Escalation

When validation fails, the AI layer follows a three-step fallback:

  1. Retry with correction. If a parameter fails validation (e.g., entity not found), the AI layer corrects or asks the user for clarification. One retry attempt.
  2. Offer alternative pattern. If the requested pattern is unavailable (access control, profile limitation), suggest related patterns within the actor's scope.
  3. Escalate to user. If no alternative exists, surface the failure with explanation: what was requested, why it failed, what the actor can do instead.

Table 28.11.3: Error Categories

CategoryExampleAI Response
Parameter validation failureInvalid UUID, ENUM not in vocabularyCorrect parameter and retry
Existence check failureReferenced entity not foundAsk user to clarify
Access deniedActor lacks visibility for scopeInform user of available scope
Depth limit exceededRequested depth exceeds profile maxUse profile maximum with notification
Graph traversal timeoutTraversal exceeds query timeoutReturn partial results; suggest narrowing scope
Ambiguous queryMultiple patterns matchOffer disambiguation options
No pattern matchOutside pattern libraryExplain capability boundary

§28.11.7 Profile Variations

Query behavior varies by substrate profile. Profiles affect available patterns, depth limits, RACIVG role scope, conformance level range, KPI class availability, and cycle type access.

Table 28.11.4: Query Behavior by Profile

DimensionEASBASPAS
Available patternsAll 44All 44 except QP-PRO-02 cross-federation queriesAll 44 except QP-PRO-02 cross-federation, QP-GOV-05 sovereign projections
Authority chain depth10025Inherited from parent
Impact radius default / max10 / 205 / 103 / 5
Decision lineage depthUnlimited10050
RACIVG scopeFull 6 roles (R, A, C, I, V, G)4 roles (R, A, C, I)R, A (Owner maps to R+A; Collaborator maps to C+I per §21)
Conformance level rangeStructural through SovereignStructural through GovernedStructural through Operational
KPI classesIS + CKPI + IPIIS + CKPICKPI (IS implicit)
Cycle typesAll sixexecution_pulse, weekly_review, commitment_reconciliationexecution_pulse, weekly_review
Instance tree depth1052

Profiles may override default depth limits within bounds through profile configuration (§28-C12). No override may exceed the stated maximums. Depth overrides deeper than the profile default require documented justification.

§28.11.8 Template Versioning

Templates are versioned independently of the substrate schema. Breaking changes — parameter type modifications, result structure changes — increment the major version. Non-breaking changes — new optional parameters, additional result fields — increment the minor version. Backward compatibility, deprecation availability, and deprecation notice requirements are specified in §28-C27 through §28-C29.


§28.12 Interchange Format Architecture

§28.12.1 Three Formats

Query results are exposed through three interchange formats, each optimized for a different consumer class.

Table 28.12.1: Interchange Format Summary

FormatPrimary ConsumerPurposeFidelityPagination
MCP ServerAI agents via MCP protocolRuntime query interface — "the badge"High (structured, typed)Yes (cursor-based)
JSON ExportIntegration pipelines, dashboardsSimple interop, general integrationsMedium (graph structure flattened)Yes (cursor-based)
RDF/OWL ExportArchival, reasoning engines, auditFull formal complianceFull (nothing lost)No (complete graph)

MCP Server is the primary AI agent interface. It signals that the substrate is infrastructure, not just an application. AI agents query authority, lineage, and governance context through MCP tools with structured input/output contracts.

JSON Export provides accessibility. Graph structures are flattened to arrays with parent references. OWL restrictions are simplified to constraints. Temporal semantics are simplified to timestamps. The trade-off is intentional: JSON is universally consumable.

RDF/OWL Export provides fidelity. The full internal model — including OWL class restrictions, SHACL shapes, PROV-O provenance chains, and SKOS concept schemes — is preserved. W3C standards ensure long-term archival stability. The trade-off: RDF requires specialized tooling.

§28.12.2 MCP Tool Catalog

Thirty-five of forty-four patterns are exposed as MCP Server tools. Each tool maps one-to-one to a query pattern with the same inputs and outputs.

Table 28.12.2: MCP Tool Summary

Tool NamePatternDomainDescription
authority_chainQP-AUTH-01AuthorityTrace delegation hierarchy to root
delegation_treeQP-AUTH-02AuthorityEnumerate delegated authorities
check_authorityQP-AUTH-03AuthorityVerify actor authority for scope
decision_lineageQP-LIN-01LineageTrace causal chain to root cause
decision_descendantsQP-LIN-02LineageFind downstream decisions and work
impact_radiusQP-LIN-03LineageFind all entities affected by decision
reconstruct_decisionQP-LIN-04LineageReconstruct complete decision context
governance_registryQP-GOV-01GovernanceList governance patterns by layer
activation_pipelineQP-GOV-02GovernanceShow activation state across sources
gap_registerQP-GOV-03GovernanceQuery gaps by verification type
conformance_checkQP-GOV-04GovernanceRun conformance tests
policy_surfaceQP-GOV-05GovernanceGenerate scoped governance projection
filter_by_truth_typeQP-TRU-01TruthFilter records by epistemic origin
verification_statusQP-TRU-02TruthQuery verification state
claims_graduationQP-TRU-03TruthQuery claims by graduation stage
promotion_queueQP-TRU-04TruthView Derived content awaiting promotion
actor_contextQP-ACT-01ActorGet current actor context
actor_portfolioQP-ACT-02ActorView actor participation across instances
role_assignmentsQP-ACT-03ActorQuery RACIVG role assignments
work_specificationsQP-ORC-01OrchestrationQuery work specifications by status
routing_decisionsQP-ORC-02OrchestrationAudit routing decisions
delegation_scopeQP-ORC-05OrchestrationResolve delegation scope
signalsQP-SIG-01SignalQuery signals by status
investigative_queriesQP-SIG-02SignalQuery IQs by status and intent
escalation_chainQP-SIG-03SignalResolve escalation path
profile_statusQP-PRO-01ProfileQuery graduation state
instance_treeQP-PRO-02ProfileTraverse instance hierarchy
invariant_complianceQP-INV-01InvariantRun conservation law checks
violation_historyQP-INV-02InvariantQuery violation history
override_auditQP-INV-03InvariantAudit invariant overrides
kpi_lifecycleQP-KPI-01KPIQuery KPI definitions
invariant_signalsQP-KPI-02KPIRead invariant signal dimensions
control_kpisQP-KPI-03KPIQuery active control KPIs
cyclesQP-TMP-01TemporalQuery cycle records
account_historyQP-TMP-03TemporalReconstruct account state

§28.12.3 SDK-Only Patterns

Nine patterns are not exposed via MCP. They serve internal governance functions consumed by other patterns or used by the SDK enforcement engine:

Table 28.12.3: SDK-Only Patterns

PatternReason for SDK-Only
QP-AUTH-04 (Delegation Scope Validation)Internal validation consumed by delegation grant operations
QP-AUTH-05 (AI-Cannot-Be-Principal)Internal enforcement consumed by actor registration
QP-ACT-04 (Role Envelope)Internal access control consumed by authorization checks
QP-ORC-03 (AICAR Classification)Internal analytics for capacity planning
QP-ORC-04 (Constraint Evaluation)Internal validation consumed by work specification lifecycle
QP-SIG-04 (Pattern Detection)Internal analytics; Derived truth requiring promotion
QP-PRO-03 (Constraint Cascade)Internal validation consumed by instance spawning
QP-PRO-04 (Depth-Gated Visibility)Internal access control applied to all query results
QP-TMP-02 (Temporal Aggregation)Internal analytics for dashboard construction

§28.12.4 Fidelity Analysis

The three formats differ in fidelity for graph-intensive patterns:

Table 28.12.4: Key Fidelity Gaps

PatternMCP/JSON LimitationRDF/OWL Preservation
QP-LIN-01 (Decision Lineage)Causal branching flattened to ordered arrays; reconvergence lostFull PROV-O derivation chains with branching
QP-LIN-03 (Impact Radius)Thirteen edge types collapsed to generic "related"All thirteen §4.4 relationships preserved as OWL object properties
QP-PRO-02 (Instance Tree)Five relationship types collapsed to parent referencesAll five instance relationship types preserved
QP-GOV-04 (Conformance)SHACL validation report simplified to pass/fail per testFull sh:ValidationReport with sh:result detail

For patterns returning primitive records and aggregates, MCP/JSON fidelity is sufficient — the information is inherently tabular. Graph-intensive patterns experience structural information loss in JSON that RDF/OWL preserves.


§28.13 SDK Constraints

The following table consolidates all §28 constraints. Supporting reference tables for depth limits (Table 28.13.2) and RACIVG access control (Table 28.13.3) follow the register.

Table 28.13.1: §28 Constraint Register

IDConstraintTypeRationale
§28-C1SDK implementations MUST implement all forty-four query patterns with the specified input parameters, return structures, and governance constraintsMUSTPattern library is the complete query surface; omission creates undiscoverable governance state
§28-C2Every query response MUST include truth_type, verification_state, and record_lifecycle_state on every primitive record and graph nodeMUSTB3 enforcement; epistemic transparency is non-negotiable
§28-C3Every query response MUST include QueryMetadata (Table 28.10.8)MUSTAudit trail and performance monitoring require execution context on every response
§28-C4Queries exceeding profile-dependent depth limits MUST be capped at the profile maximum, not rejected; the applied limit MUST be annotated in QueryMetadataMUSTGraceful degradation; consumers receive results within bounds rather than hard failures
§28-C5The AI generation layer MUST NOT construct raw Cypher or SQL — all query execution passes through parameterized templates (§28-C18, §28-C19)MUST NOTInjection prevention; template-only execution ensures pre-validated query structure
§28-C6SDK-only patterns (Table 28.12.3) MUST NOT be exposed through MCP or any external interchange formatMUST NOTInternal governance functions are not consumer-facing; exposure creates governance bypass risk
§28-C7All queries MUST default to record_lifecycle_state = active unless the consumer explicitly requests superseded recordsMUSTActive records are the canonical view; superseded records are historical context
§28-C8Canonical record queries MUST default to truth_type IN (authoritative, declared); Derived content included only on explicit requestMUSTDerived content is non-canonical; implicit inclusion risks epistemic confusion
§28-C9Derived content MUST be marked as non-canonical in all interchange formatsMUSTEpistemic boundary enforcement (§6); marking mechanism is DESIGN SPACE (§28-C37)
§28-C10Derived content MUST NOT be presented without epistemic marking in any formatMUST NOTPresentation without marking violates B3 and erodes trust in governance state
§28-C11SDK implementations MUST enforce default depth limits by profile per Table 28.13.2MUSTProfile-dependent limits prevent resource exhaustion and enforce visibility boundaries
§28-C12Profile depth limit overrides MUST NOT exceed the stated maximums in Table 28.13.2MUST NOTExceeding maximums violates the profile contract; overrides deeper than default require documented justification per §28.11.7
§28-C13Conformance level queries MUST NOT request levels exceeding the profile ceiling (EAS: Sovereign, BAS: Governed, PAS: Operational per Table 28.11.4)MUST NOTExecuting conformance tests above a profile's governance capacity produces structurally invalid results
§28-C14SDK implementations MUST expose thirty-five patterns as MCP Server tools with the tool names in Table 28.12.2MUSTMCP is the primary AI agent interface; tool names are the API contract
§28-C15MCP tools MUST use the same input parameters and return structures as SDK query methods; no MCP-specific transformationsMUSTOne query contract across all access paths
§28-C16All MCP tools returning PaginatedList results MUST support cursor-based paginationMUSTLarge result sets require pagination; cursor-based avoids offset performance degradation
§28-C17High-frequency templates (Table 28.11.1) MUST be registered at SDK initialization, pre-validated, and versionedMUSTStartup validation catches template errors before runtime; versioning enables backward compatibility
§28-C18Every AI-generated query MUST pass through the six-step validation pipeline (§28.11.3) before executionMUSTPre-execution validation prevents invalid queries from reaching the query engine
§28-C19The three-step fallback (retry → alternative → escalate) MUST be implemented when query validation failsMUSTGraceful failure handling; consumers receive guidance rather than raw validation errors
§28-C20AI actors MUST NOT override depth limits beyond profile maximums without human confirmationMUST NOTAI-Cannot-Be-Principal boundary applies to depth limit escalation
§28-C21SDK implementations MUST implement all three interchange formats: MCP Server, JSON Export, RDF/OWL ExportMUSTThree formats serve three consumer classes; omission blocks a consumer class
§28-C22Truth type metadata MUST be preserved in all three interchange formatsMUSTEpistemic transparency crosses format boundaries
§28-C23RDF/OWL Export MUST preserve full graph structure including all thirteen §4.4 relationship types as OWL object propertiesMUSTRDF/OWL is the fidelity-preserving format; graph structure loss defeats its purpose
§28-C24JSON Export fidelity gaps for graph-intensive patterns (QP-LIN-01, QP-LIN-03, QP-PRO-02, QP-GOV-04) MUST be documentedMUSTKnown fidelity losses must be explicit so consumers choose the appropriate format
§28-C25Depth-gated visibility (§23) MUST be enforced on all query results; actors see own instance detail, parent context, descendant aggregates; sibling isolation enforcedMUSTActors see only what their instance position permits; visibility is structural
§28-C26RACIVG-based access control MUST be enforced on query patterns per Table 28.13.3MUSTRole-based query access is the governance access model
§28-C27The AI layer MUST maintain backward compatibility with the current and immediately prior major template versionMUSTBreaking changes must not strand active consumers
§28-C28Deprecated templates MUST remain available for one major SDK version after deprecationMUSTGrace period for consumer migration
§28-C29The SDK MUST include a deprecation notice in QueryMetadata when a deprecated template is invokedMUSTConsumers need visibility into upcoming breaking changes
§28-C30Transport protocol (REST, GraphQL, gRPC, or other) for query endpointsDESIGN SPACEProtocol choice depends on deployment topology and client ecosystem
§28-C31Wire format for MCP Server communicationDESIGN SPACEPending MCP protocol evolution
§28-C32Caching strategy for frequently-accessed authority chains and actor contextsDESIGN SPACECache invalidation strategy depends on write volume and consistency requirements
§28-C33Materialized path optimization for graph queries exceeding latency thresholdsDESIGN SPACEOptimization approach depends on query profile and hardware characteristics
§28-C34Template versioning storage format and migration toolingDESIGN SPACEBehavioral requirements specified (§28-C27–§28-C29); storage mechanism is implementation choice
§28-C35Query monitoring, alerting, and performance threshold configurationDESIGN SPACEOperational concern; thresholds depend on deployment scale
§28-C36Indexing strategy for graph and relational query optimizationDESIGN SPACEIndex selection depends on query frequency distribution and storage engine capabilities
§28-C37Derived content non-canonical marking mechanism (visual indicator, metadata flag, separate section)DESIGN SPACEMultiple valid approaches per §28-C9; consumer experience is implementation-specific
§28-C38Field-level definitions for return structures specified only by pattern definitions (§28.4–§28.9)DESIGN SPACEPattern-level specification is sufficient for SDK implementation; field-level tables are optional

Table 28.13.2: Default Depth Limits by Profile

Traversal TypeEASBASPAS
Authority delegation (QP-AUTH-01/02)10025Inherited
Multi-path authority (QP-AUTH-03)151510
Decision lineage (QP-LIN-01)Unlimited10050
Decision descendants (QP-LIN-02)Unlimited5020
Impact radius (QP-LIN-03)10 (max: 20)5 (max: 10)3 (max: 5)
Escalation chain (QP-SIG-03)10025Inherited
Instance tree (QP-PRO-02)1052
Constraint cascade (QP-PRO-03)1052

Table 28.13.3: Query Access by RACIVG Role

Access LevelRolesAvailable Patterns
FullA (Accountable), G (Governs)All 44 patterns
OperationalR (Responsible), V (Verifies)All except QP-AUTH-05, QP-INV-03, QP-GOV-05 sovereign projections
InformationalC (Consulted), I (Informed)Families D, G (read-only), J, K; graph depth limited to 5
AI ActorAI-Automation, AI-Agentic, AI-AssistivePatterns within delegation scope; truth type metadata always visible; depth limited by delegation

§28.14 Terminology

Table 28.14.1: §28 Terminology Definitions

TermDefinition
CTE FallbackRecursive Common Table Expression substitution for Cypher graph queries in deployments without Apache AGE; viable for single-edge-type chains, non-viable for multi-edge traversals (§28.2.5)
Conformance LevelOne of five graduated governance thresholds — Structural, Operational, Governed, Auditable, Sovereign — each enforcing progressively more behavioral invariants (§28.5.1)
Depth-Gated VisibilityThe access control principle that actors see their own instance detail, parent context, and descendant aggregates; sibling isolation prevents lateral visibility (§23, §28-C25)
Domain FamilyOne of eleven structural groupings (A through K) that organize the forty-four query patterns by governance domain; families correspond to substrate structural domains, not arbitrary categories (§28.3.2)
Dual-Language ExecutionThe query architecture's use of Cypher (Apache AGE) for graph traversals and SQL (PostgreSQL) for relational operations within a single database system (§28.2)
Eager TerminationA traversal optimization that returns the shortest valid path on first match rather than enumerating all possible paths; used by QP-AUTH-03 (§28.4.2)
Interchange FormatOne of three output formats for query results — MCP Server (AI agent interface), JSON Export (integration pipelines), RDF/OWL Export (formal compliance and archival) — each optimized for a different consumer class (§28.12)
MCP ToolA query pattern exposed through the Model Context Protocol for AI agent interaction; thirty-five of forty-four patterns are MCP-exposed (Table 28.12.2)
Parameterized TemplateA pre-validated query structure with typed parameter slots; the AI generation layer fills parameters into templates rather than constructing raw query strings (§28-C5)
Pattern LibraryThe complete set of forty-four named query patterns that constitute the substrate's query surface; ad-hoc queries do not exist (§28.3)
Profile CeilingThe maximum depth limit, conformance level, KPI class, or pattern access permitted by a substrate profile (EAS, BAS, PAS); no override may exceed the ceiling (§28-C12, §28-C13)
Query TemplateA versioned, pre-validated query structure registered at SDK initialization; high-frequency patterns use deterministic templates to eliminate AI-generated query structure (Table 28.11.1)

§28.15 Cross-References

Table 28.15.1: §28 Cross-Reference Map

SectionRelationship to §28
§4 — Irreducible Primitives§28 query patterns read state across all nineteen primitives; the thirteen cross-primitive relationships (§4.4) define the graph edges traversed by Cypher-required and Hybrid patterns
§5 — Behavioral InvariantsB1–B10 invariants enforced by QP-GOV-04, QP-INV-01, and QP-INV-02; two-pass validation strategy (Pass 1 SHACL Core, Pass 2 SHACL-SPARQL) structures conformance test execution
§6 — Truth Type SystemEvery query result carries truth_type, verification_state, and record_lifecycle_state (§28-C2); truth type filtering defaults governed by §28-C7 through §28-C10; seven verification types (§6.7) structure gap register queries
§9 — Conservation LawsConservation law compliance (QP-INV-01) maps the nine conservation laws to enforcing invariants; §28.5.3 specifies the per-law invariant mapping
§12 — Governance Activation PipelineQP-GOV-02 queries the six-stage activation pipeline; four-stage closure progression structures gap register closure stages
§13 — Conformance FrameworkQP-GOV-04 executes the ten conformance tests defined in §13; conformance levels (Structural through Sovereign) gate which invariants are tested per query
§21 — Substrate ProfilesProfile types (EAS, BAS, PAS) determine depth limits (Table 28.13.2), available patterns, RACIVG scope, conformance level ceilings (§28-C13), KPI class availability, and cycle type access (Table 28.11.4)
§22 — Actor LayerRACIVG role model governs query access control (Table 28.13.3); AI-Cannot-Be-Principal constraint restricts AI actor query depth and pattern access; four actor types determine delegation scope
§23 — Portfolio PatternsDepth-gated visibility (§23.4) enforced on all query results (§28-C25); tighten-only constraint cascade queried by QP-PRO-03; instance hierarchy traversed by QP-PRO-02
§24 — Entity & Licensing StructureInvariant signal machinery defines signal routing, breach thresholds, and cascade logic consumed by KPI patterns QP-KPI-01 through QP-KPI-03; entity and license structure determines instance-scoped query access boundaries
§25 — License Terms ArchitectureLicense constraint queries leverage the dual-language query layer; Cypher traces license constraint chains; SQL computes license scope utilization
§26 — Implementation Schema§26 defines the logical data model (tables, ENUMs, relationships) that §28 patterns read; universal field set (Table 26.1.2) provides the common fields returned by all patterns (Table 28.10.2)
§27 — Operation Catalog§27 defines the two hundred and forty-four operations that produce queryable state; every operation postcondition creates or modifies state readable by §28 patterns (§28.1.3)
§A1 — AI Orchestration & GovernanceFive-dimensional routing context structures routing decision queries (QP-ORC-02); composition patterns inform work specification queries (QP-ORC-01)
§A2 — Work OrchestrationSeven-step resolution engine (CLASSIFY → ACTIVATE → ROUTE → SELECT → COMPOSE → CONFIRM → EMIT) produces routing decisions queryable by QP-ORC-02; HITL levels returned in RoutingDecisionRecord

Scope

Scope limited to logical model specification. Transport protocol, serialization format, and implementation languages are DESIGN SPACE.

Implementation Requirements

SDK implementations MUST respect all invariant shapes, enforce truth type boundaries, and validate all constraints at specified passes. Specification is immutable during lock period. SHACL two-pass validation is mandatory. Truth type boundaries are preserved through all operations. Session isolation is required for all writes.

On this page

§28 Query Architecture§28.1 Query Architecture Overview§28.1.1 Design Principles§28.1.2 Query StackTable 28.1.1: Query Stack Layers§28.1.3 Pattern-to-Operation Correspondence§28.2 Dual-Language Strategy§28.2.1 Language Selection§28.2.2 Classification RuleTable 28.2.1: Language Classification Summary§28.2.3 Language Distribution by DomainTable 28.2.2: Language Classification by Domain Family§28.2.4 Hybrid Composition Model§28.2.5 CTE Fallback StrategyTable 28.2.3: CTE Fallback Viability§28.3 Query Pattern Library§28.3.1 Pattern TaxonomyTable 28.3.1: Query Pattern Library§28.3.2 Domain Family DescriptionsTable 28.3.2: Domain Families§28.4 Authority & Decision Patterns§28.4.1 Authority Chain Traversal (QP-AUTH-01)Table 28.4.1: QP-AUTH-01 Specification§28.4.2 Multi-Path Authority Check (QP-AUTH-03)Table 28.4.2: QP-AUTH-03 Specification§28.4.3 Decision Lineage Trace (QP-LIN-01)Table 28.4.3: QP-LIN-01 Specification§28.4.4 Impact Radius (QP-LIN-03)Table 28.4.4: QP-LIN-03 Specification§28.4.5 Decision Reconstruction (QP-LIN-04)Table 28.4.5: QP-LIN-04 Specification§28.4.6 Remaining Authority & Decision PatternsTable 28.4.6: Additional Authority & Decision Patterns§28.5 Governance & Compliance Patterns§28.5.1 Conformance Test (QP-GOV-04)Table 28.5.1: QP-GOV-04 Specification§28.5.2 Gap Register (QP-GOV-03)Table 28.5.2: QP-GOV-03 Specification§28.5.3 Conservation Law Compliance (QP-INV-01)Table 28.5.3: QP-INV-01 Specification§28.5.4 Remaining Governance & Compliance PatternsTable 28.5.4: Additional Governance Patterns§28.6 Truth & Verification Patterns§28.6.1 Truth Type Filter (QP-TRU-01)Table 28.6.1: QP-TRU-01 Specification§28.6.2 Promotion Pathway Status (QP-TRU-04)Table 28.6.2: QP-TRU-04 Specification§28.6.3 Remaining Truth & Verification PatternsTable 28.6.3: Additional Truth Patterns§28.7 Actor, Work & Orchestration Patterns§28.7.1 Actor Context (QP-ACT-01)Table 28.7.1: QP-ACT-01 Specification§28.7.2 Routing Resolution (QP-ORC-02)Table 28.7.2: QP-ORC-02 Specification§28.7.3 Remaining Actor & Orchestration PatternsTable 28.7.3: Additional Actor & Orchestration Patterns§28.8 Signal, IQ & Emergence Patterns§28.8.1 Signal Routing (QP-SIG-01)Table 28.8.1: QP-SIG-01 Specification§28.8.2 Escalation Chain (QP-SIG-03)Table 28.8.2: QP-SIG-03 Specification§28.8.3 IQ Lifecycle (QP-SIG-02)§28.8.4 Pattern Detection (QP-SIG-04)§28.9 Profile, KPI & Temporal Patterns§28.9.1 Recursive Instance Tree (QP-PRO-02)Table 28.9.1: QP-PRO-02 Specification§28.9.2 Invariant Signal Query (QP-KPI-02)Table 28.9.2: QP-KPI-02 Specification§28.9.3 Remaining Profile, KPI & Temporal PatternsTable 28.9.3: Additional Profile, KPI & Temporal Patterns§28.10 Return Structure Specifications§28.10.1 Design Principles§28.10.2 Return Structure CategoriesTable 28.10.1: Return Structure Categories§28.10.3 Graph Result Structures§28.10.4 Common Fields on Primitive RecordsTable 28.10.2: Common Record Fields§28.10.5 Governance State StructuresTable 28.10.3: GapRegisterEntry FieldsTable 28.10.4: ConformanceResult Fields§28.10.6 Orchestration StructuresTable 28.10.5: RoutingDecisionRecord FieldsTable 28.10.6: WorkSpecificationRecord Fields§28.10.7 Structure-to-Pattern MappingTable 28.10.7: Return Structure Usage§28.10.8 List Wrapper and MetadataTable 28.10.8: QueryMetadata Fields§28.11 AI Query Generation§28.11.1 Generation Architecture§28.11.2 Template CatalogTable 28.11.1: High-Frequency Templates§28.11.3 Validation Pipeline§28.11.4 Natural Language MappingTable 28.11.2: Natural Language → Pattern Mapping (Representative)§28.11.5 Truth Type Awareness§28.11.6 Error Handling and EscalationTable 28.11.3: Error Categories§28.11.7 Profile VariationsTable 28.11.4: Query Behavior by Profile§28.11.8 Template Versioning§28.12 Interchange Format Architecture§28.12.1 Three FormatsTable 28.12.1: Interchange Format Summary§28.12.2 MCP Tool CatalogTable 28.12.2: MCP Tool Summary§28.12.3 SDK-Only PatternsTable 28.12.3: SDK-Only Patterns§28.12.4 Fidelity AnalysisTable 28.12.4: Key Fidelity Gaps§28.13 SDK ConstraintsTable 28.13.1: §28 Constraint RegisterTable 28.13.2: Default Depth Limits by ProfileTable 28.13.3: Query Access by RACIVG Role§28.14 TerminologyTable 28.14.1: §28 Terminology Definitions§28.15 Cross-ReferencesTable 28.15.1: §28 Cross-Reference MapScopeImplementation Requirements