FLOW ALGEBRA — PATHOGENIC MICROORGANISM ONTOLOGY
Version: 1.0 | 23 October 2026 | Locale: en-GB
Authors: Mark Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/microbial-entities/pathogenic-microorganism-ontology.html
Status: Independent formalisation; source page's embedded specification was not exposed in retrieved text.
flow "PathogenicMicroorganismOntology" v1.0
# ---------- TYPE SYSTEM ----------
type Entity = {id:str, label:str, class:str, taxon:str?, source:str?, confidence:float}
type Relation = {subject:str, predicate:str, object:str, evidence:str?, confidence:float}
type Observation = {subject:str, property:str, value:any, context:str?, evidence:str?, confidence:float}
type Evidence = {id:str, method:str, reference:str?, quality:float, timestamp:str?}
type Claim = {id:str, proposition:str, evidence_ids:list[str], status:str, confidence:float}
# ---------- ONTOLOGY ----------
entity PathogenicMicroorganism <: Microorganism
entity BacterialPathogen <: PathogenicMicroorganism
entity ArchaealMicroorganism <: Microorganism
entity FungalPathogen <: PathogenicMicroorganism
entity ProtozoanPathogen <: PathogenicMicroorganism
entity MicrobialStrain <: BiologicalEntity
entity Host <: Organism
entity HostTissue <: Tissue
entity Infection <: BiologicalProcess
entity Colonisation <: BiologicalProcess
entity Disease <: BiologicalCondition
entity VirulenceFactor <: BiologicalFactor
entity Toxin <: MolecularEntity
entity Adhesin <: MolecularEntity
entity ImmuneResponse <: BiologicalProcess
entity TransmissionRoute <: EpidemiologicalEntity
entity Reservoir <: EcologicalEntity
entity Vector <: Organism
entity AntimicrobialAgent <: ChemicalEntity
entity ResistanceMechanism <: BiologicalMechanism
entity DiagnosticTest <: MeasurementProcedure
entity LaboratoryResult <: Observation
entity EvidenceSource <: InformationEntity
# Viruses are infectious acellular agents, not cellular microorganisms.
entity Virus <: AcellularInfectiousAgent
relation associated_with(Virus, Infection)
# ---------- TYPED RELATIONSHIPS ----------
relation belongs_to_taxon(Microorganism, Taxon)
relation has_strain(Microorganism, MicrobialStrain)
relation colonises(Microorganism, Host)
relation infects(PathogenicMicroorganism, Host)
relation targets_tissue(PathogenicMicroorganism, HostTissue)
relation may_cause(PathogenicMicroorganism, Disease)
relation expresses(Microorganism, VirulenceFactor)
relation produces(Microorganism, Toxin)
relation triggers(Infection, ImmuneResponse)
relation transmitted_via(PathogenicMicroorganism, TransmissionRoute)
relation maintained_in(PathogenicMicroorganism, Reservoir)
relation carried_by(PathogenicMicroorganism, Vector)
relation inhibited_by(Microorganism, AntimicrobialAgent)
relation has_resistance_mechanism(MicrobialStrain, ResistanceMechanism)
relation detected_by(Microorganism, DiagnosticTest)
relation supported_by(Claim, EvidenceSource)
# ---------- CONSTRAINTS ----------
constraint C1: confidence in [0.0, 1.0]
constraint C2: every asserted relation has typed subject and object
constraint C3: colonisation does not imply infection or disease
constraint C4: detection does not alone establish active infection
constraint C5: potential pathogenicity does not imply disease in every host
constraint C6: strain-level resistance must not automatically generalise to all members of a species
constraint C7: association does not imply causation
constraint C8: host, strain, environment and observation context must be preserved
constraint C9: negative test results are interpreted in light of sensitivity, sampling and timing
constraint C10: no clinical diagnosis or treatment recommendation is inferred from ontology membership alone
# ---------- INFERENCE RULES ----------
rule R1 "TaxonomicInheritance":
when belongs_to_taxon(x, t) and subclass_of(t, parent)
then infer belongs_to_broader_taxon(x, parent)
guard: taxonomy_version_valid(t)
rule R2 "EvidenceQualifiedPathogenicity":
when may_cause(x, d) and supported_by(claim(x,d), evidence)
then infer pathogen_disease_association(x, d)
confidence: combine_evidence(evidence)
guard: evidence_supports_association(evidence)
rule R3 "ObservedInfection":
when detected_in(x, host_sample) and clinical_evidence(host, infection)
then propose infection_hypothesis(x, host)
status: requires_confirmation
guard: compatible_sample(host_sample, host)
rule R4 "ResistanceScope":
when has_resistance_mechanism(strain, mechanism)
then infer possible_reduced_susceptibility(strain, relevant_agent(mechanism))
guard: mechanism_agent_link_validated(mechanism)
status: provisional_until_phenotypic_or_validated_genotypic_evidence
rule R5 "TransmissionHypothesis":
when transmitted_via(x, route) and exposure(host, route)
then propose possible_exposure(host, x)
status: hypothesis_not_infection
rule R6 "ConflictingEvidence":
when supports(e1, claim) and contradicts(e2, claim)
then flag_for_review(claim)
preserve: [e1, e2]
# ---------- SEMANTIC EQUIVALENCE ----------
SEMANTIC_EQUIVALENCE:
exact: ["pathogenic microorganism", "microbial pathogen"]
related_not_identical: ["infectious agent", "opportunistic pathogen", "disease-associated microbe"]
forbidden_equivalence: ["colonisation", "infection", "clinical disease"]
rule: match concepts by scope, organism type and evidence, not lexical similarity alone
# ---------- CONFIDENCE AND PROVENANCE ----------
CONFIDENCE:
evidence_weighting: quality_and_independence
aggregation: calibrated_nonduplicative
uncertainty: explicit
conflicting_sources: retain_and_flag
missing_evidence: do_not_assume_false_or_true
PROVENANCE:
retain: [source_id, method, observation_date, taxonomy_version, context, reviewer]
distinguish: [observed, inferred, hypothesised, disputed]
immutable_history: true
# ---------- FLOW HASH ----------
FLOW_HASH:
canonicalise: [entity_ids, relation_types, rules, constraints, evidence_references, version]
digest: SHA-256
exclude: [display_order, whitespace, presentation_only_metadata]
on_change: recalculate_and_record_previous_hash
# ---------- RECURSIVE UPDATE MODEL ----------
UPDATE_MODEL:
input: [new_observations, revised_taxonomy, updated_evidence]
steps:
- validate_types_and_sources
- reconcile_entity_identity_without_collapsing_strains
- recompute_affected_claims
- propagate_only_type_safe_inferences
- flag_conflicts_and_changed_confidence
- preserve_prior_versions_and_provenance
- recompute_flow_hash
termination: fixed_point_or_iteration_limit
safeguards: [no_unsupported_causal_inference, no_evidence_loss, no_unbounded_recursion]
# ---------- AI CONSUMPTION ----------
AI_CONSUMPTION:
interpretation: executable_formal_reasoning_specification
inputs: [entities, relations, observations, evidence]
outputs: [typed_graph, supported_claims, hypotheses, confidence, provenance, flow_hash]
requirements:
- separate known facts from inferred hypotheses
- disclose uncertainty and evidence gaps
- retain strain-level and host-specific distinctions
- avoid conflating viruses with cellular microorganisms
- do not provide clinical conclusions without appropriate external evidence
- return traceable inference paths
# ---------- VALIDATION EXAMPLES ----------
example E1:
given: [colonises(MicroorganismA, HostA)]
expected: [do_not_infer(Infection), do_not_infer(Disease)]
example E2:
given: [has_resistance_mechanism(StrainA, MechanismA)]
expected: [evaluate_relevant_agent_and_evidence, do_not_generalise_to_species]
example E3:
given: [detected_in(MicroorganismA, SampleA)]
expected: [record_detection, require_context_before_infection_claim]
end flow
Download Code
Copy to Clipboard