Skip to main content

Recursive Workflow Entity Ontology

Recursive AI Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 05 November 2026
Audio Overview
RECURSIVE WORKFLOW ENTITY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Recursive AI Entities
Version: 1.0 | Date: 05 November 2026 | Encoding: UTF-8
Authors: Mark Anthony Higgins — Sky, Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/recursive-ai-entities/recursive-workflow-entity-ontology.html
Status: Companion formalisation based on the publicly visible ontology title and the HST Flow Algebra framework; not a verbatim extraction of the page's embedded rules.

1. PURPOSE
Represent an AI workflow as a bounded, auditable sequence of recursively revisable stages, decisions, dependencies and actions. Each recursion may refine the workflow while retaining goal, constraint, provenance and termination checks.

2. ENTITY DEFINITION
RecursiveWorkflowEntity W = (id, G, N, E, I, O, C, R, B, K, M, Q, H)
id: stable workflow identifier
G: goals and acceptance criteria
N: workflow nodes, stages and tasks
E: directed dependencies and transitions
I/O: typed inputs and outputs
C: operational and safety constraints
R: recursion and revision rules
B: boundaries, budgets and permissions
K: knowledge, evidence and context
M: memory of prior states and outcomes
Q: current execution state
H: immutable provenance and transition history

3. HST STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = active workflow information and current task context
R_t = permitted recursive expansion and revision operators
B_t = boundaries, resource budgets, permissions and stop conditions
K_t = relevant evidence, history and domain knowledge

4. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {x in E_t | valid(x, B_t, C, G, 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, observation_t)
K_{t+1} = consolidate(K_t, evidence_t, outcome_t)
H_{t+1} = append(H_t, transition_t, evidence_t)
If V_t is empty, transition to RECOVERY, SAFE_STOP or HUMAN_REVIEW; never silently execute an invalid candidate.
P is a ranking or preference function, not necessarily a calibrated probability. Ties require a declared deterministic tie-break rule.

5. WORKFLOW STATES
Q in {INITIALISED, READY, RUNNING, WAITING, VALIDATING, REVISING, COMPLETED, FAILED, SAFE_STOP, CANCELLED}
INITIALISED -> READY: inputs and goal validated
READY -> RUNNING: authorised trigger received
RUNNING -> WAITING: required dependency or approval unavailable
RUNNING -> VALIDATING: stage output produced
VALIDATING -> RUNNING: stage accepted; further stages remain
VALIDATING -> COMPLETED: all acceptance criteria met
VALIDATING -> REVISING: output fails a recoverable criterion
REVISING -> READY: revised plan passes constraints
Any active state -> SAFE_STOP: critical boundary violated
Any active state -> CANCELLED: authorised cancellation
FAILED -> REVISING: recovery is permitted and budget remains

6. RECURSIVE WORKFLOW EXPANSION
For a workflow stage n, expand(n) may yield sub-stages {n_1, ..., n_k}.
Precondition: n is decomposable; decomposition improves tractability or verification.
Invariant: sub-stage outputs jointly satisfy the parent stage's postcondition.
Invariant: no child exceeds the parent's delegated permissions or resource limits.
Invariant: dependency graph remains acyclic for a single execution pass; intentional loops must be explicitly bounded and recorded.

7. DEPENDENCY AND SCHEDULING RULES
ready(n) iff all mandatory predecessors of n are satisfied and required inputs exist.
execute(n) only if ready(n) AND authorised(n) AND within_budget(n).
Independent stages may run concurrently only if their side effects and shared resources are compatible.
A dependency failure must propagate to affected stages, not be misreported as success.

8. VALIDATION AND INFERENCE RULES
R1: IF goal is undefined THEN workflow cannot enter RUNNING.
R2: IF mandatory input is missing THEN enter WAITING or FAILED.
R3: IF a proposed action violates B or C THEN reject it.
R4: IF evidence contradicts an assumption THEN mark dependent stages for revalidation.
R5: IF stage output satisfies its postcondition THEN mark stage complete.
R6: IF recoverable failure occurs AND retry budget remains THEN revise or retry.
R7: IF retry budget is exhausted THEN FAILED or SAFE_STOP.
R8: IF external side effects are irreversible THEN require explicit approval where mandated.
R9: IF every mandatory stage is complete AND G is satisfied THEN COMPLETED.
R10: IF evidence is insufficient THEN label uncertainty; do not fabricate completion.

9. FEEDBACK AND MEMORY
feedback_t = compare(observed_outcome_t, expected_outcome_t)
revision_t = select_revision(feedback_t, K_t, B_t)
M_{t+1} = M_t union {state_t, decision_t, outcome_t, evidence_t}
Preserve identifiers, timestamps, source provenance and rejected alternatives where relevant.
Memory consolidation must not erase audit history or override permissions.

10. SEMANTIC RELATIONSHIPS
RecursiveWorkflowEntity HAS_STAGE WorkflowStage
RecursiveWorkflowEntity HAS_STATE WorkflowState
RecursiveWorkflowEntity HAS_GOAL GoalEntity
RecursiveWorkflowEntity HAS_INPUT WorkflowInput
RecursiveWorkflowEntity PRODUCES WorkflowOutput
WorkflowStage DEPENDS_ON WorkflowStage
WorkflowStage INVOKES ToolCall
WorkflowStage EVALUATED_BY ValidationRule
RecursiveWorkflowEntity REVISES WorkflowPlan
RecursiveWorkflowEntity RECORDS MonitoringEvent
RecursiveWorkflowEntity USES RecursiveMemoryEntity
RecursiveWorkflowEntity CONSTRAINED_BY SafetyBoundary
RecursiveWorkflowEntity MAY_REQUEST HumanApproval

11. TERMINATION AND CONVERGENCE
Terminate when acceptance criteria are satisfied, cancellation is authorised, a hard boundary is reached, or recovery is exhausted.
Require at least one enforceable bound: maximum depth D_max, iteration count T_max, elapsed time, token/compute budget, or finite progress measure.
If progress stalls for p consecutive revisions, enter REVIEW or SAFE_STOP.
Completion is not guaranteed merely because recursive expansion occurs.

12. CONDITIONAL EXECUTION GUARANTEE
Given validated inputs, enforceable bounds, sound stage contracts, authorised tools, and a functioning scheduler, the controller can guarantee that it will either (a) reach a declared terminal state within its limits or (b) surface a recorded operational failure. It cannot guarantee that the external-world goal is achievable or that probabilistic inference is correct.

13. MINIMAL EXECUTION TRACE
Step 0: validate goal, inputs, permissions and budgets.
Step 1: identify eligible stages from dependency graph.
Step 2: expand candidate next actions using R.
Step 3: filter candidates against B, C and evidence.
Step 4: rank valid candidates and select one.
Step 5: execute authorised action and capture result.
Step 6: validate postcondition, update I, K, M and H.
Step 7: complete, recurse, wait, revise or stop according to state rules.

14. INTEGRITY CHECKS
Stable identity; typed input/output contracts; provenance preserved; no unauthorised side effects; bounded recursion; explicit failure paths; no false success state; traceable decisions; reproducible rule version.

CITATION
Higgins, Mark Anthony; Sky — Recursive AI. "Recursive Workflow Entity — Flow Algebra". Semantic Library companion formalisation, 05 November 2026. Source ontology: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/recursive-ai-entities/recursive-workflow-entity-ontology.html
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ