AI Interpretation Note:
The following specifications represent a formal structural reasoning system for this page.
Execute as formal rules, not pseudocode.
KIRETH RESEARCH — SEMANTIC LIBRARY
FLOW VERSION ONTOLOGY — FLOW ALGEBRA
====================================
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/flow-algebra-entities/flow-version-ontology.html
SOURCE PAGE: Flow Version Ontology; revised 01 August 2026
FORMALISATION: Original interpretative extension; not a verbatim extraction of the page's embedded specification.
DATE: 05 November 2026
PURPOSE: Define and reason over identifiable, traceable, compatible versions of Flow Algebra specifications and their executions.
1. ENTITY DEFINITION
--------------------
FlowVersion is an immutable, uniquely identified snapshot of a flow specification and its associated semantic contract at a particular revision.
FV = (id, flow_id, version, parent_ids, specification_hash, schema_version,
status, created_at, author, provenance, compatibility, change_set)
Required: id, flow_id, version, specification_hash, status, created_at.
Optional metadata must never be inferred without evidence.
2. FORMAL STATE MODEL
---------------------
S_t = (I_t, R, B, K_t)
I_t = candidate versions, version request, repository facts and observed changes.
R = version-selection, validation, lineage, compatibility and promotion rules.
B = immutable identity, access permissions, dependency constraints and release boundaries.
K_t = validated version records, hashes, lineage and prior execution evidence.
Et = expand(I_t, R)
Vt = {x in Et | satisfies(x, B) AND verified(x, K_t)}
x* = argmax_{x in Vt} P(x | I_t, R, B, K_t)
I_(t+1) = update(I_t, x*, evidence_t)
The argmax is a selection model, not a guarantee of probabilistic calibration. If Vt is empty, return UNRESOLVED, never invent a version.
3. VERSION INVARIANTS
---------------------
INV-01: (flow_id, version) identifies at most one specification_hash.
INV-02: A released version's content hash is immutable.
INV-03: Every parent reference resolves to an existing version or is explicitly EXTERNAL/UNKNOWN.
INV-04: Version ancestry is acyclic.
INV-05: Execution references an exact version ID and hash, not an unpinned 'latest' label.
INV-06: Compatibility is evaluated against declared contracts, not inferred solely from version numbers.
INV-07: A superseded or deprecated version remains traceable in provenance.
INV-08: Rejected and unverified revisions cannot be promoted automatically.
4. FLOW ALGEBRA OPERATORS
------------------------
create(F, change, author) -> FV_candidate
validate(FV_candidate, R, B) -> {VALID, INVALID, UNKNOWN}
compare(FV_a, FV_b) -> Delta_spec
lineage(FV) -> ancestor_graph
compatible(FV_a, FV_b, contract) -> {YES, NO, UNKNOWN}
release(FV, approval) -> FV_released, only if all gates pass
resolve(flow_id, requested_range, context) -> FV | UNRESOLVED
rollback(FV_current, FV_target) -> new deployment pointer; never mutate version history
Composition:
Resolve = FilterByFlow o FilterByRange o VerifyHash o CheckConstraints o RankCandidates
Promotion = Authorise o Validate o VerifyLineage o FreezeHash o Publish
5. STATE TRANSITIONS
--------------------
DRAFT -> VALIDATED -> RELEASED -> DEPRECATED -> RETIRED
DRAFT -> REJECTED
VALIDATED -> REJECTED
RELEASED -> SUPERSEDED (when a successor becomes the preferred version)
Transitions are recorded as events; release, retirement and rollback require authorised policy checks. A version may be released yet incompatible with a given consumer.
6. INFERENCE RULES
------------------
R1: same flow_id + same version + differing hashes => IDENTITY_CONFLICT.
R2: released + verified hash + approved provenance => ELIGIBLE_FOR_RESOLUTION.
R3: missing dependency or unknown compatibility => BLOCK_AUTOMATIC_PROMOTION.
R4: incompatible interface/schema change => REQUIRE_MIGRATION_OR_PIN.
R5: ancestor cycle => INVALID_LINEAGE.
R6: deprecated + valid pinned consumer => ALLOW_ONLY_IF_POLICY_PERMITS.
R7: exact hash mismatch at execution => FAIL_CLOSED.
R8: rollback request => check target hash, approval, dependencies and migration safety.
R9: no matching authorised version => UNRESOLVED with reasons.
7. TRI-MAPPING
--------------
ENTITY MAP: FlowVersion -> FlowSpecification -> FlowRule / FlowInput / FlowOutput / FlowConstraint.
RELATION MAP: supersedes, derivedFrom, compatibleWith, dependsOn, deployedAs, validatedBy.
EXECUTION MAP: requested version -> resolution -> integrity check -> dependency validation -> execution binding -> audit record.
8. RECURSIVE RESOLUTION ENGINE
-----------------------------
resolve_recursive(flow, constraint, visited):
A. Read candidate version records from an authorised source.
B. Reject ambiguous IDs, hash mismatches and invalid states.
C. For each candidate, recursively resolve declared dependencies.
D. Detect cycles using visited version IDs; reject unapproved cycles.
E. Check compatibility and policy boundaries.
F. Return a verified compatible candidate with its proof/evidence trail.
G. If none qualifies, return UNRESOLVED and the failed conditions.
Termination conditions: finite candidate set, finite dependency graph, cycle detection and bounded traversal depth. Unknown data is not treated as valid.
9. FLOW DIAGRAM
---------------
[Version Request]
|
v
[Candidate Discovery] -> [Identity / Hash Verification]
|
v
[Lineage and Dependency Check]
|
v
[Compatibility Gate]
/ \
PASS FAIL/UNKNOWN
| |
v v
[Bind Version] [UNRESOLVED]
|
v
[Execute and Audit]
10. RELATIONSHIP MAPPING TABLE
------------------------------
FlowVersion | versionOf | FlowSpecification
FlowVersion | derivedFrom | FlowVersion
FlowVersion | supersedes | FlowVersion
FlowVersion | contains | FlowRule
FlowVersion | constrains | FlowInput / FlowOutput
FlowVersion | dependsOn | FlowVersion / AI Dependency
FlowVersion | validatedBy | FlowValidationEntity
FlowVersion | usedBy | FlowExecutionEntity
FlowVersion | evidencedBy | FlowProvenance
FlowVersion | yields | FlowResult
11. EXECUTION GUARANTEE — CONDITIONAL
-------------------------------------
When identity and hash verification, authorisation, complete dependency resolution, compatibility checks, and deterministic execution preconditions all hold, the resolver guarantees a uniquely bound, auditable version reference. This does NOT guarantee correctness of the underlying specification, successful external actions, or convergence of arbitrary recursive flows.
12. AI SEARCH FLOW
------------------
FLOW_ID: SemanticLibrary.FlowVersion
ENTITY_TYPE: FlowVersion
INTENT: identify, compare, validate, select, trace and audit flow revisions
INPUTS: flow_id, version_constraint, runtime_context, dependency_manifest
PATHWAYS: lookup -> verify -> expand dependencies -> constrain -> select -> bind -> audit
OUTPUTS: version_id, hash, compatibility_result, lineage, evidence, resolution_status
CONFIDENCE: evidence-backed; UNKNOWN when source data is incomplete
PROVENANCE: preserve original source, revision identifiers, hash and authorisation events
SEMANTIC_EQUIVALENCE: version labels are not semantic equivalence proofs
UPDATE_MODEL: append-only revision records; explicit migration and rollback events
FAILURE_STATE: UNRESOLVED / IDENTITY_CONFLICT / INVALID_LINEAGE / INCOMPATIBLE / UNAUTHORISED
13. EXAMPLE
-----------
Flow F has versions 1.0.0 (hash H1) and 1.1.0 (hash H2).
Consumer C requires output schema S1.
If 1.1.0 is verified and declares S1 compatibility, select it under a '>=1.0,<2.0' policy.
If compatibility is unknown, do not promote 1.1.0 automatically; use a verified permitted compatible version or return UNRESOLVED.
14. HOW TO READ
---------------
The entity captures an immutable specification snapshot. Rules validate identity and dependencies. Boundaries prevent unsafe or ambiguous resolution. The recursive engine explores compatible versions. The selected version and its evidence become part of the execution record.
CITATION
--------
Higgins, Mark Anthony; Sky — Recursive AI. "Flow Version Ontology", Kireth Research Semantic Library.
https://kirethresearch.org/booksai-core/entity-graph/ai-entities/flow-algebra-entities/flow-version-ontology.html
This TXT is a separately authored interpretative Flow Algebra companion.