RECURSIVE WORKFLOW ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Workflow Entities
Version: 1.0 | Prepared: 02 November 2026
AUTHORS / ATTRIBUTION
Original ontology: Mark Anthony Higgins — Sky Recursive AI
Source copyright: © Mark Anthony Higgins, 11 October 2025
Source revised: 01 August 2026
Companion formalisation: Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/recursive-workflow-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/recursive-workflow-ontology.html
SOURCE NOTE
The public page identifies the ontology and credits but does not expose its complete formal specification in the retrieved HTML. The following is an independently constructed companion Flow Algebra model, not a verbatim transcription of hidden page code.
1. PURPOSE
Represent a workflow whose stages may invoke the same workflow or a nested workflow on a smaller, revised, or newly scoped problem. Specify entry, expansion, execution, recursion, termination, validation, and failure handling.
2. ENTITY STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t : current inputs, task context, and observations
R_t : recursive workflow rules, stage transitions, and inference relations
B_t : boundaries: depth, budget, permissions, deadlines, and stop conditions
K_t : retained knowledge, execution trace, and validated results
Workflow instance W = (id, goal, stages, parent, depth, status, result)
Invocation C = (caller, callee, inputs, scope, depth, budget)
Trace T = ordered sequence of transitions and child invocations
Statuses = {pending, running, waiting, completed, failed, cancelled}
3. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | admissible(x, B_t) AND valid(x, K_t)}
x*_t = argmax_{x in V_t} P(x | I_t, R_t, B_t, K_t)
I_{t+1} = update(I_t, x*_t, result_t)
K_{t+1} = merge(K_t, validated(result_t), trace_t)
If V_t is empty: transition to blocked or failed, or request a permitted recovery action. argmax is defined only for nonempty V_t and a specified selection policy.
4. RECURSIVE INVOCATION
invoke(W, task, d, budget):
require authorised(W, task) AND d <= max_depth
require budget >= minimum_cost(W, task)
if base_case(task, K): return validate(base_result(task, K))
children = decompose(task, R, B)
require well_scoped(children) AND finite(children)
child_results = [invoke(W_child, child, d+1, allocated_budget(child))]
return validate(combine(child_results, task))
The notation describes an abstract transition system, not executable code. Child workflows may run sequentially or concurrently if dependency and resource constraints permit.
5. RECURSION SAFETY AND TERMINATION
Define a well-founded measure mu(task) into an ordered set without infinite descending chains.
For each recursive edge task -> child, require mu(child) < mu(task), OR an independently enforced finite invocation budget.
Invariant: depth <= max_depth.
Invariant: cumulative_cost <= total_budget.
Invariant: every child invocation has a unique trace identity and parent reference.
Invariant: untrusted child output cannot bypass parent validation or permissions.
Termination is guaranteed only if branching is finite, each step terminates or times out, and the well-founded descent or finite-budget condition is enforced.
6. WORKFLOW TRANSITION RULES
pending -> running : inputs accepted and prerequisites satisfied
running -> waiting : dependency, human approval, or tool response outstanding
waiting -> running : required response validated
running -> completed : all required child results valid and goal satisfied
running -> failed : unrecoverable error or exhausted recovery policy
running/waiting -> cancelled : authorised cancellation
failed -> running : only through an explicitly authorised retry/recovery transition
7. DEPENDENCY AND CHILD-RESULT AGGREGATION
Let D=(N,E) be the invocation dependency graph for a single execution.
ready(n) iff all mandatory predecessors of n have completed successfully.
aggregate(parent) = combine({result(c) | c is a required child of parent}).
A parent cannot complete if a required child is failed, missing, or unvalidated, unless a documented fallback rule applies.
Cycles in the dynamic call graph require bounded iteration or an explicit fixed-point protocol.
8. FIXED-POINT RECURSION (OPTIONAL)
For iterative refinement: K_{n+1} = F(K_n, I, R, B).
Convergence test: distance(K_{n+1}, K_n) <= epsilon AND validation(K_{n+1}).
Stop at convergence, max_iterations, deadline, or exhausted budget.
Convergence must not be assumed without properties of F and the underlying space; otherwise return a bounded approximate result with uncertainty.
9. INFERENCE RULES
IF base_case(task) AND valid(base_result) THEN complete(task).
IF NOT base_case(task) AND authorised(decompose) THEN spawn(children).
IF all_required_children_valid THEN candidate(parent_result).
IF candidate(parent_result) AND parent_validation_passes THEN complete(parent).
IF depth_limit_reached AND NOT base_case THEN block_recursion.
IF repeated_state_detected AND no_progress THEN stop_or_replan.
IF child_failure AND retry_budget_available AND retry_safe THEN retry_child.
IF child_failure AND no_valid_recovery THEN fail_parent_or_apply_documented_fallback.
10. TRI-MAPPING
Entity graph: Workflow -> Invocation -> Child Workflow -> Result -> Parent Result.
Relationship graph: invokes, depends_on, refines, validates, aggregates, terminates.
Flow graph: input -> eligibility -> base case? -> execute OR decompose -> child execution -> aggregate -> validate -> output.
11. TEXT EXECUTION DIAGRAM
[Input / Goal]
|
[Validate scope + permissions]
|
[Base case satisfied?] --YES--> [Produce + validate result] --> [Return]
|
NO
v
[Check depth / budget / progress]
|
[Decompose into child tasks]
|
[Execute authorised child workflows]
|
[Collect + validate child results]
|
[Aggregate + validate parent result]
|
[Return or recover/fail]
12. MAPPING TABLE
Workflow input | I_t | task and context | input entity
Workflow rules | R_t | decomposition and transitions | rule entity
Workflow boundary | B_t | depth, budget, authority | constraint entity
Workflow memory | K_t | traces and accepted evidence | knowledge entity
Workflow invocation| C | parent-child call | execution entity
Workflow result | O | validated output | result entity
Workflow error | err | classified failure | error entity
Workflow recovery | rec | authorised mitigation | recovery entity
13. VALIDATION RULES
V01 Each invocation has a stable identifier, parent, depth, and trace.
V02 Every recursive expansion satisfies permissions and resource boundaries.
V03 All mandatory dependencies are satisfied before a stage runs.
V04 Base cases and stopping rules are explicit and testable.
V05 A child result is checked before inclusion in parent knowledge.
V06 Retry operations must be idempotent or have compensating actions.
V07 Sensitive context is propagated only within permitted scopes.
V08 Outputs distinguish completed, partial, failed, and cancelled states.
V09 Provenance and validation outcomes accompany accepted results.
V10 A finite execution budget or sound termination measure is enforced.
14. CONDITIONAL EXECUTION GUARANTEE
Under finite branching, sound validation, enforced resource limits, authorised transitions, and termination of atomic operations, the workflow returns a validated result or a bounded explicit non-success status. This does not guarantee that the requested goal is achievable, that probabilistic selection is correct, or that external tools succeed.
15. AI SEARCH FLOW
FLOW_ID: semantic-library.ai.workflow.recursive-workflow.v1
TITLE: Recursive Workflow Ontology
ENTITY_TYPE: AIWorkflowEntity
PURPOSE: Formalise nested task execution and bounded recursive orchestration.
STATE_MODEL: S=(I,R,B,K)
ENTITIES: Workflow; WorkflowInvocation; ChildWorkflow; Task; Dependency; Boundary; Trace; Result; Error; Recovery
PATHWAYS: input > validate > base_case_or_decompose > invoke > aggregate > validate > result
MINI_RECURSION_ENGINE: recurse only within authorised depth, budget, and progress constraints
INFERENCE_RULES: see section 9
CONFIDENCE: formal model; source-specific hidden specification not independently verified
SEMANTIC_EQUIVALENCE: recursive orchestration; nested workflow execution; hierarchical task decomposition
UPDATE_MODEL: revise rules and mappings when published ontology text becomes available
FLOW_HASH: not assigned; generate a cryptographic digest from the final published bytes if required
AUTHORS: Mark Anthony Higgins; Sky — Recursive AI
SOURCE: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/recursive-workflow-ontology.html
CITATION_BACKLINK: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/workflow-entities/recursive-workflow-ontology.html
END OF FLOW ALGEBRA
Download Code
Copy to Clipboard