FLOW ALGEBRA
TITLE: Flow Relationship Ontology
DOMAIN: Relationship Ontologies / AI Semantic Library Relationships
SOURCE: https://kirethresearch.org/booksai-core/ontologies/relationship-ontologies/ai-semantic-library-relationships/flow-relationship-ontology.html
VERSION: 1.0
AUTHORS: Mark Anthony Higgins — Sky (Recursive AI)
STATUS: Companion formalisation; source-page specification not independently verified.
flow "FlowRelationshipOntology" v1.0 {
ontology:
id: "flow-relationship-ontology"
parent: "ai-semantic-library-relationships"
purpose: "Model typed, directed and evidence-backed relationships between semantic flows, their inputs, outputs, dependencies and transformations."
types:
Flow: {id: string, version: string, purpose: string, status: enum[draft, validated, active, deprecated]}
FlowPort: {id: string, flow_id: string, direction: enum[input, output], data_type: string}
Artefact: {id: string, kind: string, schema: string?, version: string?}
Transformation: {id: string, operator: string, deterministic: boolean?, preconditions: string[], postconditions: string[]}
Evidence: {id: string, source: string, timestamp: datetime?, reliability: number?}
FlowRelationship: {id: string, source_id: string, predicate: string, target_id: string, context: string?, confidence: number, evidence_ids: string[]}
predicates:
depends_on(flow: Flow, prerequisite: Flow)
consumes(flow: Flow, artefact: Artefact)
produces(flow: Flow, artefact: Artefact)
transforms(flow: Flow, operation: Transformation)
connects(output: FlowPort, input: FlowPort)
derived_from(output: Artefact, input: Artefact)
precedes(upstream: Flow, downstream: Flow)
semantically_maps_to(source: Flow, target: Flow)
supersedes(new_flow: Flow, old_flow: Flow)
constraints:
- "All relationship endpoints must resolve to typed, versioned entities."
- "Confidence must be in [0, 1], with evidence and context retained."
- "Port connections must run output to input and satisfy declared schema compatibility."
- "Dependencies and temporal precedence must not automatically imply causation."
- "Semantic mapping must not imply identity or interchangeable execution."
- "Cyclic dependencies require explicit iteration semantics, termination guards or fixed-point policy."
- "Supersession must preserve historical versions and provenance."
- "Sensitive or restricted artefacts must retain access controls across derived outputs."
inference:
rule dependency_chain:
if depends_on(a,b) and depends_on(b,c) and acyclic_path(a,b,c)
then indirectly_depends_on(a,c)
confidence: "evidence-preserving; no automatic confidence inflation"
rule flow_lineage:
if produces(a,x) and consumes(b,x) and verified_identity(x)
then potential_upstream_of(a,b)
confidence: "requires verified artefact identity and execution context"
rule version_lineage:
if supersedes(a,b) and supersedes(b,c)
then has_version_ancestor(a,c)
confidence: "retain original version links"
SEMANTIC_EQUIVALENCE:
- "Normalise identifiers using versioned ontology mappings."
- "Distinguish equivalent intent from equivalent inputs, outputs and runtime behaviour."
- "Retain domain, execution context, schema versions and transformation semantics."
CONFIDENCE:
range: [0,1]
factors: [source_reliability, schema_compatibility, validation_coverage, execution_evidence, version_consistency]
policy: "Derived confidence must reflect the weakest relevant evidence and dependence assumptions."
VALIDATION:
- "Verify identifiers, endpoint types, version references and provenance."
- "Check port directions, data types, preconditions and postconditions."
- "Detect unsupported mappings, dangling references and unguarded cycles."
- "Check lineage consistency and preserve conflicting claims for review."
FLOW_HASH:
algorithm: "SHA-256"
input: "canonicalised ontology version, entity and relationship assertions, rules and provenance"
note: "Compute hash at execution; no hash value is claimed here."
UPDATE_MODEL:
strategy: "versioned, provenance-preserving incremental update"
steps: [ingest, normalise, validate, compare, reconcile, recompute_inferences, publish]
rollback: true
AI_CONSUMPTION:
representation: "typed semantic flow graph with provenance-backed edges"
outputs: [flow_links, dependency_paths, artefact_lineage, semantic_mappings, uncertainty_annotations, provenance_records]
safeguards: [no_unverified_identity_merges, no_unsupported_causal_claims, preserve_version_context, enforce_access_controls]
}
END FLOW ALGEBRA
Download Code
Copy to Clipboard