Skip to main content

Flow Algebra Metadata Ontology

AI Semantic Library Metadata
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 08 October 2026
Audio Overview
FLOW ALGEBRA

Ontology: Flow Algebra Metadata Ontology
Domain: Metadata Ontologies > AI Semantic Library Metadata
Canonical URL: https://kirethresearch.org/booksai-core/ontologies/metadata-ontologies/ai-semantic-library-metadata/flow-algebra-metadata-ontology.html
Authors: Mark Anthony Higgins — Sky (Recursive AI)

flow "FlowAlgebraMetadataOntology" v1.0

# ---------- DOMAIN ----------
domain:
  class: MetadataOntology
  category: AISemanticLibraryMetadata
  subject: FlowAlgebraMetadata
  purpose:
    - represent metadata describing executable Flow Algebra resources
    - preserve identity, version, ontology context, entities, relationships, rules, validation, confidence, updates, FlowHash, queries, inference, outputs, and provenance
    - support deterministic semantic reasoning and machine consumption
    - distinguish Flow Algebra metadata from executable Flow Algebra content

# ---------- CORE ----------
entity FlowAlgebraMetadata:
  type: SemanticLibraryMetadata
  describes: FlowAlgebra
  may_include:
    - flow_algebra_identifier
    - flow_name
    - flow_version
    - ontology_identifier
    - canonical_resource
    - domain
    - entities
    - relationships
    - rules
    - validation
    - semantic_equivalence
    - semantic_distinctions
    - confidence_model
    - update_model
    - flow_hash
    - AI_consumption
    - query_model
    - inference_model
    - output_contract
    - dependencies
    - validity
    - provenance

entity FlowAlgebra:
  type: ExecutableSemanticRepresentation

entity FlowAlgebraIdentifier:
  type: PersistentIdentifier
  identifies: FlowAlgebra

relationships:
  FlowAlgebraMetadata -> DESCRIBES -> FlowAlgebra
  FlowAlgebra -> IDENTIFIED_BY -> FlowAlgebraIdentifier
  FlowAlgebra -> REPRESENTS -> Ontology
  FlowAlgebra -> HAS_VERSION -> FlowAlgebraVersion
  FlowAlgebra -> DEFINES -> FlowEntity
  FlowAlgebra -> DEFINES -> FlowRelationship
  FlowAlgebra -> CONTAINS -> FlowRule
  FlowAlgebra -> HAS_VALIDATION -> FlowValidation
  FlowAlgebra -> HAS_CONFIDENCE_MODEL -> FlowConfidenceModel
  FlowAlgebra -> HAS_UPDATE_MODEL -> FlowUpdateModel
  FlowAlgebra -> HAS_HASH -> FlowHash
  FlowAlgebra -> HAS_AI_CONSUMPTION -> AIConsumptionMetadata
  FlowAlgebraMetadata -> MAY_HAVE_PROVENANCE -> FlowAlgebraProvenance

# ---------- IDENTITY / HEADER ----------
rule identity:
  FlowAlgebra SHOULD have stable semantic identifier

rule flow_name:
  flow name != FlowAlgebra identity

rule URL:
  canonical URL != FlowAlgebra semantic identity

rule ontology_identity:
  FlowAlgebra identity != ontology identity

entity FlowAlgebraHeader:
  type: StructuralMetadata
  required_value: "FLOW ALGEBRA"

rule header:
  main ontology Flow Algebra header = "FLOW ALGEBRA"

# ---------- VERSION ----------
entity FlowAlgebraVersion:
  type: VersionMetadata
  may_include:
    - version_identifier
    - major
    - minor
    - revision
    - predecessor
    - successor
    - release_time

rule version:
  material semantic change SHOULD update FlowAlgebraVersion

# ---------- ENTITIES / RELATIONSHIPS / RULES ----------
entity FlowEntity:
  type: SemanticEntity
  may_include:
    - entity_identifier
    - entity_type
    - attributes
    - constraints

entity FlowRelationship:
  type: SemanticRelationship
  may_include:
    - relationship_identifier
    - source
    - predicate
    - target
    - direction
    - scope
    - constraints

rule relationship:
  MUST preserve source, predicate, target, and direction

rule inverse:
  relationship MUST NOT be reversed
  unless inverse semantics are explicit

entity FlowRule:
  type: SemanticRule
  may_include:
    - rule_identifier
    - rule_type
    - premise
    - condition
    - action
    - conclusion
    - priority
    - scope

rule_types:
  - validation
  - inference
  - transformation
  - update
  - constraint
  - equivalence
  - distinction
  - routing
  - ranking
  - query

rule rule_order:
  preserve rule order where execution semantics depend on ordering

# ---------- VALIDATION ----------
entity FlowValidation:
  type: ValidationMetadata
  may_include:
    - required_entities
    - required_relationships
    - type_constraints
    - semantic_constraints
    - rejection_rules
    - validation_result

rule validation:
  structural Flow Algebra validity != factual truth

# ---------- SEMANTIC EQUIVALENCE ----------
entity FlowSemanticEquivalence:
  type: SemanticMetadata
  may_include:
    - expression_a
    - expression_b
    - equivalence_type
    - scope
    - confidence

rule equivalence:
  preserve equivalence type, scope, and confidence

rule lexical:
  lexical similarity != semantic equivalence

entity FlowSemanticDistinction:
  type: SemanticConstraint

rule distinction:
  explicit semantic distinctions MUST be preserved

# ---------- CONFIDENCE ----------
entity FlowConfidenceModel:
  type: EpistemicMetadata
  may_include:
    - assertion_type
    - score
    - threshold
    - evidence
    - action

rule confidence_bounds:
  REQUIRE 0.0 <= confidence <= 1.0

# ---------- UPDATE MODEL ----------
entity FlowUpdateModel:
  type: UpdateMetadata
  may_include:
    - trigger
    - preconditions
    - actions
    - affected_entities
    - affected_relationships
    - affected_rules
    - validation_actions
    - version_action
    - hash_action
    - provenance_action

rule update:
  preserve prior semantic state where version or provenance policy requires

# ---------- FLOW HASH ----------
entity FlowHash:
  type: IntegrityAndSemanticIdentityMetadata
  may_include:
    - canonical_inputs
    - canonicalisation_rules
    - semantic_hash
    - generation_time

rule flow_hash:
  equivalent canonical Flow Algebra state SHOULD generate deterministic FlowHash

rule hash_change:
  material canonical semantic change SHOULD alter FlowHash

rule hash_identity:
  FlowHash != FlowAlgebraIdentifier

# ---------- AI CONSUMPTION ----------
entity AIConsumptionMetadata:
  type: MachineConsumptionMetadata
  may_include:
    - interpretation
    - operations
    - constraints
    - supported_queries
    - output_contract

rule AI_consumption:
  intended machine interpretation and constraints SHOULD be explicit

# ---------- QUERY / INFERENCE / OUTPUT ----------
entity FlowQueryModel:
  type: QueryMetadata
  may_include:
    - inputs
    - resolution_steps
    - constraints
    - outputs

entity FlowInferenceModel:
  type: ReasoningMetadata
  may_include:
    - premises
    - conditions
    - inference_rules
    - conclusions
    - confidence_adjustment
    - provenance_action

rule inference:
  inferred knowledge != explicitly asserted knowledge

entity FlowOutputContract:
  type: OutputMetadata
  may_include:
    - output_entities
    - output_relationships
    - output_fields
    - datatypes
    - semantic_requirements
    - confidence_requirements
    - provenance_requirements

rule output_contract:
  output SHOULD conform to declared semantic and structural contract

# ---------- DEPENDENCIES / EXECUTION ----------
entity FlowAlgebraDependency:
  type: DependencyMetadata
  may_include:
    - dependency_identifier
    - dependency_type
    - required_version
    - compatibility_constraint

rule dependency:
  preserve version and compatibility constraints

rule latest:
  latest dependency version != automatically compatible dependency version

entity FlowAlgebraExecution:
  type: ExecutionMetadata
  may_include:
    - execution_identifier
    - flow_algebra_identifier
    - flow_version
    - inputs
    - parameters
    - executed_rules
    - result
    - validation_state

rule execution:
  successful execution != semantically valid result
  without required validation

# ---------- RECURSION / VALIDITY ----------
entity RecursiveFlowAlgebra:
  type: FlowAlgebra
  may_include:
    - recursion_entry
    - recursion_depth
    - visited_state
    - stopping_condition
    - cycle_policy

rule recursion:
  recursive Flow Algebra MUST define stopping or cycle-control behaviour

entity FlowAlgebraValidity:
  type: ValidityMetadata
  may_include:
    - valid_from
    - valid_until
    - status
    - deprecated_state
    - superseded_by

flow_algebra_status:
  - draft
  - active
  - deprecated
  - superseded
  - archived
  - unknown

rule validity:
  deprecated Flow Algebra != preferred active Flow Algebra
  when valid successor exists

# ---------- PROVENANCE ----------
entity FlowAlgebraProvenance:
  type: ProvenanceMetadata
  may_include:
    - flow_algebra_identifier
    - flow_version
    - represented_ontology
    - author
    - contributor
    - source_resource
    - creation_time
    - modification_time
    - predecessor
    - successor
    - transformations
    - validation_events
    - execution_history

rule provenance:
  preserve origin, represented ontology, version lineage,
  validation, transformations, and execution history

# ---------- VALIDATION CONTRACT ----------
validation:
  require:
    - identifiable_flow_algebra
    - flow_version
    - represented_ontology_or_semantic_domain

  reject:
    - flow_name_presented_as unique_identity_without identifier
    - URL_presented_as FlowAlgebra_identity
    - FlowHash_presented_as FlowAlgebraIdentifier
    - relationship_direction_reversed_without inverse_semantics
    - lexical_similarity_presented_as semantic_equivalence
    - vector_similarity_presented_as semantic_equivalence
    - inferred_knowledge_presented_as explicit_knowledge
    - successful_execution_presented_as semantic_validity_without validation
    - latest_dependency_presented_as automatically_compatible
    - deprecated_flow_presented_as preferred_active_when successor_exists

# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
  "Flow Algebra metadata" ~= "metadata describing executable Flow Algebra resources"
  "Flow Algebra resource" ~= "executable semantic representation of ontology structure and reasoning rules"
  "FlowHash" ~= "deterministic hash of canonical Flow Algebra semantic state"
  "AI consumption metadata" ~= "metadata defining machine interpretation, operations, and constraints"

  PRESERVE distinctions:
    FlowAlgebra_metadata != FlowAlgebra_content
    FlowAlgebra_identity != flow_name
    FlowAlgebra_identity != URL
    FlowAlgebraIdentifier != FlowHash
    ontology_identity != FlowAlgebra_identity
    relationship != inverse_relationship
    lexical_similarity != semantic_equivalence
    vector_similarity != semantic_equivalence
    explicit_knowledge != inferred_knowledge
    structural_validity != factual_truth
    successful_execution != semantic_validity
    newer_version != compatible_version
    deprecated != active

# ---------- CONFIDENCE MODEL ----------
CONFIDENCE:
  explicit_FlowAlgebra_metadata:
    score: 1.00
  explicit_FlowAlgebra_identifier:
    score: 1.00
  validated_FlowAlgebra_structure:
    score: 0.99
  deterministic_FlowHash:
    score: 0.99
  validated_semantic_equivalence:
    score: 0.99
  inferred_relationship:
    score: <= 0.90
  lexical_or_vector_similarity_only:
    score: <= 0.65
  execution_without_full_validation:
    score: <= 0.75
  incomplete_provenance:
    score: <= 0.55
    action: preserve uncertainty

# ---------- UPDATE MODEL ----------
UPDATE_MODEL:
  on_creation:
    - assign FlowAlgebraIdentifier
    - assign FlowAlgebraVersion
    - identify represented ontology or domain
    - register entities, relationships, and rules
    - initialise validation and confidence model
    - generate FlowHash
    - initialise provenance

  on_semantic_change:
    - preserve previous version
    - identify changed entities, relationships, rules, constraints, or outputs
    - classify semantic impact
    - validate compatibility
    - update version
    - regenerate FlowHash
    - update provenance

  on_execution:
    - resolve identifier and version
    - validate inputs and dependencies
    - execute applicable rules
    - preserve execution trace
    - validate output contract
    - assign confidence
    - update provenance

# ---------- FLOW HASH ----------
FLOW_HASH:
  inputs:
    - ontology
    - FlowAlgebra_entities
    - relationships
    - rules
    - validation
    - semantic_equivalence
    - semantic_distinctions
    - confidence_model
    - update_model
    - AI_consumption
    - query_model
    - inference_model
    - output_contract
    - dependencies

  canonicalisation:
    - preserve_FlowAlgebra_identifier
    - preserve_flow_version
    - preserve_represented_ontology
    - preserve_domain_and_scope
    - preserve_entity_identifiers
    - preserve_relationship_direction
    - preserve_rule_order
    - preserve_semantic_distinctions
    - preserve_output_contract
    - preserve_dependency_constraints
    - preserve_provenance

  output:
    deterministic_semantic_hash

# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
  interpret_as:
    - AI Semantic Library metadata ontology
    - Flow Algebra identity, structure, validation, confidence, update, hash, query, inference, and output model
    - deterministic, provenance-aware semantic reasoning structure

  operations:
    - identify Flow Algebra resources
    - resolve represented ontology and version
    - inspect entities, relationships, and rules
    - preserve relationship direction and semantic distinctions
    - validate semantic equivalence
    - evaluate confidence and update models
    - validate deterministic FlowHash
    - execute query and inference models
    - validate output contracts
    - resolve dependencies and compatibility
    - trace provenance
    - control recursive execution
    - preserve uncertainty

  constraints:
    - do_not_equate_FlowAlgebra_metadata_with executable_content
    - do_not_equate_flow_name_or_URL_with FlowAlgebra_identity
    - do_not_equate_FlowHash_with FlowAlgebraIdentifier
    - do_not_reverse_relationships_without inverse_semantics
    - do_not_equate_lexical_or_vector_similarity_with semantic_equivalence
    - do_not_equate_execution_success_with semantic_validity
    - preserve_identity_version_ontology_rules_hash_contracts_and_provenance

# ---------- QUERY MODEL ----------
query:
  input:
    - flow_algebra_identifier
    - flow_name
    - flow_version
    - ontology_identifier
    - domain
    - entity_identifier
    - relationship_identifier
    - rule_identifier
    - dependency_identifier
    - validity_time

  resolve:
    1. identify FlowAlgebra
    2. resolve identifier and version
    3. resolve represented ontology, domain, and scope
    4. resolve entities, relationships, and rules
    5. inspect validation, equivalence, distinctions, and confidence
    6. inspect update model and FlowHash
    7. inspect AI consumption, query, inference, and output contract
    8. resolve dependencies and compatibility
    9. inspect validity and provenance
    10. return machine-consumable Flow Algebra metadata

# ---------- INFERENCE ----------
inference:
  IF Flow Algebra structure validates
  AND required dependencies resolve
  THEN infer executable_FlowAlgebra_candidate

  IF FlowHash changes
  THEN infer canonical semantic state changed
  subject_to canonicalisation model

  IF execution succeeds
  BUT output validation fails
  THEN do_not infer semantically valid result

  IF recursive flow encounters visited state
  THEN apply cycle policy
  AND enforce stopping condition

# ---------- OUTPUT CONTRACT ----------
output:
  ontology_entity: FlowAlgebraMetadata
  FlowAlgebra_identity: machine_interpretable
  represented_ontology: explicit
  flow_version: explicit
  entities_relationships_rules: typed
  relationship_direction: preserved
  validation: executable
  semantic_equivalence_and_distinctions: preserved
  confidence_model: explicit
  update_model: explicit
  flow_hash: deterministic
  AI_consumption: explicit
  query_and_inference_models: executable
  output_contract: enforceable
  dependencies: compatibility_aware
  recursion: cycle_safe
  provenance: preserved
  uncertainty: explicit
  AI_reasoning: enabled

end flow
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ