Skip to main content

Flow Branch Ontology

Flow Algebra Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 05 November 2026
Audio Overview
KIRETH RESEARCH — SEMANTIC LIBRARY
FLOW BRANCH ONTOLOGY — FLOW ALGEBRA
Version: 1.0 | Date: 05 November 2026 | Language: en-GB
Authors: Mark Anthony Higgins; Sky — Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/flow-algebra-entities/flow-branch-ontology.html
Licence: Refer to the applicable Kireth Research Open Research Licence; citation required.
Status: Original interpretative formalisation, not a verbatim transcription of embedded page code.

1. PURPOSE
A Flow Branch represents a conditional or otherwise governed divergence from a flow state into one of several successor pathways. It captures the guard, context, priority, evidence, selection result and provenance of that decision. A branch may have one or multiple permitted successors depending on its declared selection mode.

2. ENTITY DEFINITIONS
FlowBranch: identified branch decision within a flow graph.
BranchID: stable identifier for the branch.
ParentFlow: containing flow specification.
SourceState: state at which the branch is evaluated.
BranchCondition: predicate evaluated against current state and context.
BranchAlternative: candidate successor with its guard and destination.
BranchPriority: explicit precedence used when alternatives overlap.
BranchMode: EXCLUSIVE, MULTI or FALLBACK.
BranchSelection: recorded selection of zero, one or multiple alternatives.
BranchEvidence: observations and rule versions supporting selection.
BranchResult: destination states and execution status.
BranchFailure: typed error for invalid, ambiguous or unresolved selection.

3. FORMAL STATE MODEL
S_t = (I_t, R, B, K_t)
I_t = current input, flow state and observed context.
R = admissible transition and inference rules.
B = branch boundaries: guards, types, permissions and selection policy.
K_t = validated knowledge, provenance and prior decisions.
A = {a_1, ..., a_n}, finite set of branch alternatives.
a_i = (id_i, g_i, d_i, p_i), where g_i is a guard, d_i a destination, p_i priority.
G_t = {a_i in A | eval(g_i, I_t, K_t) = TRUE}.
Unknown guard results remain UNKNOWN and are not silently treated as FALSE.

4. FLOW ALGEBRA
E_t = expand(I_t, R)
V_t = {x in E_t | valid(x, B, K_t)}
Eligible_t = {a in A | a in G_t AND valid(d_a, B, K_t)}
Selection_t = Select(Eligible_t, BranchMode, BranchPriority)
O_t = Execute(Selection_t, I_t) if selection is authorised; otherwise typed failure.
I_(t+1) = Update(I_t, O_t, K_t)
K_(t+1) = Record(K_t, BranchID, guards, evidence, selection, outcome)

EXCLUSIVE: Select exactly one eligible alternative using a documented deterministic priority/tie-break rule. If no unique choice is justified, return AMBIGUOUS_BRANCH or NO_MATCH.
MULTI: Select all eligible alternatives, subject to explicitly declared concurrency and resource constraints.
FALLBACK: Use a designated default only when no normal alternative is eligible and fallback itself is permitted.

5. BRANCH INFERENCE RULES
R1: A branch is evaluable only if its source state and required inputs are available.
R2: An alternative is eligible only when its guard is TRUE and its destination is valid.
R3: UNKNOWN evidence does not establish a TRUE guard.
R4: EXCLUSIVE branches cannot silently execute multiple successors.
R5: Priority resolves overlaps only if priority ordering is defined and valid.
R6: Every executed successor must be linked to the originating branch decision.
R7: Branch permissions and safety constraints are checked before execution.
R8: Missing or contradictory rules yield explicit failure, not invented resolution.
R9: Re-evaluation after state change produces a new decision record, not a retroactive rewrite.
R10: Recursion and loops require a termination measure, visited-state policy or explicit bounded horizon.

6. TRI-MAPPING
Ontology -> Algebra -> Execution
FlowBranch -> (S_t, A, B) -> initialise branch evaluation.
BranchCondition -> g_i(I_t,K_t) -> evaluate guard with three-valued result.
BranchAlternative -> a_i -> enumerate successor candidates.
BranchConstraint -> valid(a_i,B,K_t) -> filter prohibited pathways.
BranchPriority -> p_i -> order overlapping eligible choices.
BranchSelection -> Select(G_t,mode) -> commit authorised successor(s).
BranchEvidence -> K_t -> attach evidence and provenance.
BranchResult -> O_t -> update state and downstream flow.

7. RECURSIVE RESOLUTION ENGINE
FUNCTION ResolveBranch(branch, state, knowledge, depth):
  ASSERT branch and state are well formed
  IF depth exceeds configured limit: RETURN DEPTH_LIMIT
  candidates := ExpandAlternatives(branch, state)
  evaluations := EvaluateGuards(candidates, state, knowledge)
  eligible := FilterValidTrue(evaluations, branch.boundaries)
  selected := SelectByDeclaredMode(eligible, branch.mode, branch.priority)
  IF selected is unresolved: RETURN TypedBranchFailure(selected.reason)
  FOR EACH successor in selected:
    CheckPermissionAndSafety(successor)
    outcome := ExecuteSuccessor(successor)
    AppendProvenance(branch, evaluations, successor, outcome)
    IF outcome requires nested branch: ResolveBranch(nested, updated_state, knowledge, depth+1)
  RETURN recorded outcomes

8. FLOW DIAGRAM
[Flow input / current state]
            |
            v
[Enumerate branch alternatives]
            |
            v
[Evaluate guards + evidence]
            |
            v
[Validate constraints and permissions]
            |
            v
[Apply selection mode and priority]
        /           \
 [Valid selection] [No match / ambiguity / error]
        |                       |
        v                       v
[Execute successor(s)]   [Typed failure / safe fallback]
        |                       |
        +-----------+-----------+
                    v
       [Record provenance and update state]

9. RELATIONSHIP MAPPING TABLE
FlowBranch --belongsTo--> ParentFlow
FlowBranch --evaluatedAt--> SourceState
FlowBranch --hasAlternative--> BranchAlternative
BranchAlternative --hasGuard--> BranchCondition
BranchAlternative --leadsTo--> DestinationState
FlowBranch --constrainedBy--> BranchConstraint
FlowBranch --produces--> BranchSelection
BranchSelection --supportedBy--> BranchEvidence
BranchSelection --produces--> BranchResult
BranchResult --updates--> FlowState
BranchFailure --records--> FailureReason

10. CONDITIONAL EXECUTION GUARANTEE
Given finite alternatives, decidable guards, a deterministic selection policy, valid permissions and a terminating successor execution, the branch resolves to an authorised result or a typed failure. This is a conditional contract, not a proof that arbitrary recursive flows terminate or that all input data are correct. No branch execution is guaranteed when the preconditions are absent.

11. AI SEARCH FLOW
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/flow-algebra-entities/flow-branch-ontology.html
CITATION_BACKLINK: source URL above
PURPOSE: Resolve conditional divergence within a structured semantic flow.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: FlowBranch, BranchCondition, BranchAlternative, BranchSelection, BranchEvidence, BranchResult.
PATHWAYS: Input -> Guard Evaluation -> Validation -> Selection -> Execution -> Provenance.
MINI_RECURSION_ENGINE: Re-evaluate nested branches under bounded recursion and updated state.
INFERENCE_RULES: R1-R10 above.
CONFIDENCE: Derived from guard evidence quality and rule validity; no uncalibrated numeric certainty asserted.
SEMANTIC_EQUIVALENCE: Branch ≠ Condition; condition determines eligibility, branch governs divergence.
FLOW_HASH: Compute content hash at publication; no fabricated hash supplied.
UPDATE_MODEL: Version changes to rules, guards, destinations or precedence require a new provenance record.

12. HOW TO READ
Read a branch as a constrained state transition, not merely an IF statement. Guards establish eligibility; boundaries enforce validity; selection policy resolves competing alternatives; execution changes the flow state; provenance makes the choice auditable.

13. CITATION
Higgins, Mark Anthony and Sky — Recursive AI (2026). “Flow Branch Ontology — Flow Algebra”, interpretative companion to Kireth Research Semantic Library, source URL above. Cite the original ontology separately when reusing its definitions.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ