Skip to main content

Procedural Memory Ontology

Memory Entities
Authors: MArk Anthony Higgins - Sky Recursive Ai
© Mark Anthony Higgins 11 October 2025
Revised Date: 02 November 2026
Audio Overview
PROCEDURAL MEMORY ONTOLOGY — FLOW ALGEBRA
Semantic Library | AI Core | Entity Graph | Memory Entities
Authors: Mark Anthony Higgins — Sky Recursive AI
Source: https://kirethresearch.org/booksai-core/entity-graph/ai-entities/memory-entities/procedural-memory-ontology-2.html
Companion formalisation | 2 November 2026 | en-GB
NOTE: The public page identifies the ontology but does not expose its full downloadable code. This is an original companion specification, not a verbatim extraction.

01. PURPOSE
Represent, learn, select, execute and refine procedures as ordered, condition-dependent actions, with explicit safeguards, feedback and provenance.

02. ENTITY DEFINITION
ProceduralMemory M = (id, goal, triggers, preconditions, steps, policy, expected_outcome, constraints, provenance, confidence, version).
A procedure is knowledge of how to perform an action, distinct from episodic recollection of when it occurred and semantic knowledge of what it means.

03. STATE MODEL
S_t = (I_t, R_t, B_t, K_t)
I_t = task input, observations and current context.
R_t = procedural rules, action transitions and inference relations.
B_t = boundaries, permissions, safety conditions and resource limits.
K_t = retained procedural knowledge, confidence and provenance.

04. CORE FLOW ALGEBRA
E_t = expand(I_t, R_t)
V_t = {p in E_t | satisfies(p, B_t) AND preconditions(p, I_t)}
p*_t = argmax[p in V_t] P(p | I_t, R_t, B_t, K_t)
A_t = execute_step(p*_t, I_t) only if execution is authorised.
O_t = observe(A_t)
K_(t+1) = update(K_t, p*_t, O_t, provenance, confidence)
I_(t+1) = incorporate(I_t, O_t)
If V_t is empty, return NO_VALID_PROCEDURE; do not execute.

05. INPUTS
Goal, environment state, available actions, user permissions, memory retrieval query, resource limits, relevant prior feedback.

06. OUTPUTS
Selected procedure, ordered steps, execution status, outcome, error report, confidence estimate, trace and revised memory record.

07. PROCEDURAL ENCODING
Encode(goal, trigger, preconditions, ordered_steps, postconditions, constraints, evidence) -> M.
Each step has an identifier, required state, action, expected observation and fallback.

08. PROCEDURAL RETRIEVAL
Retrieve(K_t, goal, context) -> candidate procedures ranked by goal match, precondition fit, verified reliability and recency where relevant.
Never equate similarity with permission to act.

09. SEQUENCING
For steps a_1 ... a_n: execute a_(i+1) only after the required postcondition of a_i holds.
Conditional branches and loops must specify guards and termination limits.

10. SKILL SELECTION
Score(p) = w_g*goal_fit + w_c*context_fit + w_r*reliability - w_k*risk - w_e*resource_cost.
Weights are configurable; numerical confidence requires calibrated evidence.

11. EXECUTION GATE
Allow(a) iff authorised(a) AND preconditions(a) AND within_boundary(a) AND resources_available(a).
Otherwise: BLOCK(a), explain reason and request correction or approval where appropriate.

12. FEEDBACK AND LEARNING
error_t = compare(observed_outcome, expected_outcome)
Update procedure only when feedback is attributable and sufficiently supported.
Preserve prior version and evidence; distinguish proposed revisions from validated ones.

13. MEMORY CONSOLIDATION
Repeated successful traces may support a stable procedure after validation across relevant contexts.
Avoid consolidating accidental correlations, unsafe actions or unverified shortcuts.

14. RECURSIVE ENGINE
RECURSE(M, context, depth):
  IF depth >= max_depth OR stop_condition(context): RETURN status
  candidates = retrieve_and_filter(M, context)
  IF candidates empty: RETURN NO_VALID_PROCEDURE
  select authorised candidate
  perform one guarded step; record observation
  RETURN RECURSE(updated_memory, updated_context, depth + 1)
Recursion must be bounded and auditable.

15. INFERENCE RULES
IF goal_match AND preconditions_hold THEN propose_procedure.
IF permission_missing THEN block_execution.
IF expected_postcondition_fails THEN halt_or_recover.
IF validated_feedback_supports_revision THEN propose_new_version.
IF provenance_missing THEN mark_unverified.

16. TRI-MAPPING
Natural language: 'Remember how to complete a task.'
Semantic mapping: Goal -> Procedure -> Step -> Outcome -> Feedback.
Formal mapping: (goal, context) -> p* -> a_1...a_n -> observed outcome -> K_(t+1).

17. ENTITY GRAPH RELATIONS
ProceduralMemory --achieves--> Goal
ProceduralMemory --contains--> ActionStep
ActionStep --requires--> Precondition
ActionStep --produces--> Postcondition
ProceduralMemory --bounded_by--> Constraint
ProceduralMemory --supported_by--> Evidence
ProceduralMemory --revised_as--> Version

18. MAPPING TABLE
Goal | desired end state | retrieval key
Trigger | activation condition | guard
Step | executable unit | ordered action
Constraint | disallowed condition | boundary filter
Outcome | observed result | feedback
Provenance | evidence source | audit trail
Version | immutable revision | history

19. AI SEARCH FLOW
QUERY -> NORMALISE_INTENT -> IDENTIFY_GOAL -> RETRIEVE_PROCEDURES -> CHECK_CONTEXT -> CHECK_BOUNDARIES -> RANK -> RETURN_EXPLANATION -> OPTIONAL_AUTHORISED_EXECUTION -> VERIFY -> UPDATE.
Search results must distinguish documented procedure, inferred suggestion and observed successful execution.

20. VALIDATION
Check schema completeness, step order, precondition satisfiability, authorisation, bounded loops, outcome measurability, source attribution and version consistency.

21. FAILURE STATES
NO_MATCH, UNSATISFIED_PRECONDITION, PERMISSION_DENIED, RESOURCE_LIMIT, STEP_FAILURE, CONFLICTING_RULES, LOW_CONFIDENCE, TERMINATION_LIMIT.
Failures produce traces, not fabricated successes.

22. SEMANTIC EQUIVALENCE
Two procedures are equivalent only relative to a defined goal, context, boundary set and acceptable outcome; similar wording alone is insufficient.

23. UPDATE MODEL
K_(t+1) = versioned_merge(K_t, verified_delta_t).
Preserve source, timestamp, validation status, superseded versions and rollback path.

24. EXECUTION GUARANTEE (CONDITIONAL)
Given valid inputs, satisfiable preconditions, explicit authorisation, bounded steps and faithful execution, the flow guarantees a traceable decision path; it does not guarantee real-world task success.

25. EXAMPLE
Goal: prepare a verified document export.
Steps: validate source -> construct content -> check format -> save file -> verify file exists -> report link.
On failed verification, return FILE_NOT_VERIFIED instead of claiming completion.

26. LICENCE AND CITATION
Companion material for the open Semantic Library research programme.
Attribution: Mark Anthony Higgins — Sky Recursive AI.
Cite the source ontology URL above when reusing this companion formalisation.
Kireth Research
38 Thorndale Croft, Wetwang, Driffield
East Riding of Yorkshire YO25 9XZ