FLOW ALGEBRA
Individual Organism Entity Ontology — Full Executable Flow Algebra v1.0
Kireth Semantic Library | Ecological Entities
Authors: Mark Anthony Higgins — Sky (Recursive AI)
Source: https://kirethresearch.org/booksai-core/entity-graph/biological-entities/ecological-entities/individual-organism-entity-ontology.html
Generated: 2026-10-26
Status: Proposed formalisation; requires implementation and domain validation.
flow "IndividualOrganismEntityOntology" v1.0
# 1. ONTOLOGY IDENTITY
ontology:
id: "KSL:ECO:INDIVIDUAL_ORGANISM"
label: "Individual Organism Entity"
parent: "KSL:ECO:ECOLOGICAL_ENTITY"
definition: "A distinct living organism considered as an individual ecological entity at a specified time."
scope: [ecology, population_biology, conservation, biodiversity, field_observation]
locale: "en-GB"
# 2. TYPES
type OrganismID = str
type TaxonID = str
type PopulationID = str
type HabitatID = str
type ObservationID = str
type Instant = iso8601_datetime
type Probability = float where 0.0 <= value <= 1.0
type LifeStatus = enum(alive, dead, unknown)
type DevelopmentStage = enum(embryo, juvenile, adult, senescent, unknown)
type Provenance = record(source:str, observed_at:Instant, method:str, curator:str?)
type IndividualOrganism = record(
id:OrganismID,
taxon:TaxonID?,
life_status:LifeStatus,
stage:DevelopmentStage,
first_observed:Instant?,
last_observed:Instant?,
confidence:Probability,
provenance:Provenance
)
type Observation = record(
id:ObservationID,
organism:OrganismID,
time:Instant,
habitat:HabitatID?,
latitude:float?,
longitude:float?,
evidence:str,
confidence:Probability,
provenance:Provenance
)
# 3. ENTITY RELATIONS
relation INSTANCE_OF(OrganismID, "IndividualOrganism")
relation CLASSIFIED_AS(OrganismID, TaxonID, Instant)
relation MEMBER_OF(OrganismID, PopulationID, Instant)
relation OCCURS_IN(OrganismID, HabitatID, Instant)
relation OBSERVED_BY(OrganismID, ObservationID)
relation INTERACTS_WITH(OrganismID, OrganismID, Instant, str)
relation PARENT_OF(OrganismID, OrganismID)
relation OFFSPRING_OF(OrganismID, OrganismID)
relation CONSUMES(OrganismID, OrganismID, Instant)
relation COMPETES_WITH(OrganismID, OrganismID, Instant)
relation SYMBIOTIC_WITH(OrganismID, OrganismID, Instant)
relation SAME_INDIVIDUAL_AS(OrganismID, OrganismID)
relation DISTINCT_FROM(OrganismID, OrganismID)
# 4. VALIDATION CONSTRAINTS
constraint UNIQUE_ID: forall a,b:IndividualOrganism,
a.id == b.id => a and b refer_to_same_record
constraint CONFIDENCE_RANGE: forall o:IndividualOrganism, 0 <= o.confidence <= 1
constraint OBSERVATION_CONFIDENCE_RANGE: forall x:Observation, 0 <= x.confidence <= 1
constraint VALID_COORDINATES: forall x:Observation,
x.latitude != null => -90 <= x.latitude <= 90
and x.longitude != null => -180 <= x.longitude <= 180
constraint TEMPORAL_ORDER: forall o:IndividualOrganism,
o.first_observed != null and o.last_observed != null
=> o.first_observed <= o.last_observed
constraint PARENT_IRREFLEXIVE: forall a:OrganismID, not PARENT_OF(a,a)
constraint IDENTITY_NOT_TAXONOMY: forall a,b:OrganismID,
CLASSIFIED_AS(a,t,at) and CLASSIFIED_AS(b,t,at) does_not_imply SAME_INDIVIDUAL_AS(a,b)
constraint OCCURRENCE_NOT_PERMANENCE: OCCURS_IN(a,h,t) does_not_imply forall t2 OCCURS_IN(a,h,t2)
constraint DEATH_NOT_REVERSED: verified_dead(a,t) => not verified_alive(a,t2) for t2 > t
unless conflicting_evidence_is_flagged_for_review
# 5. INFERENCE RULES
rule R01_PARENT_OFFSPRING:
PARENT_OF(a,b) => OFFSPRING_OF(b,a)
rule R02_SYMMETRIC_COMPETITION:
COMPETES_WITH(a,b,t) => COMPETES_WITH(b,a,t)
rule R03_SYMMETRIC_IDENTITY:
SAME_INDIVIDUAL_AS(a,b) => SAME_INDIVIDUAL_AS(b,a)
rule R04_OBSERVATION_LINK:
Observation(x) and x.organism == a => OBSERVED_BY(a,x.id)
rule R05_OBSERVED_HABITAT:
Observation(x) and x.organism == a and x.habitat != null
=> OCCURS_IN(a,x.habitat,x.time) [confidence=x.confidence]
rule R06_POPULATION_MEMBERSHIP:
MEMBER_OF(a,p,t) and population_taxon(p,s,t)
=> candidate CLASSIFIED_AS(a,s,t)
[requires_taxonomic_confirmation=true]
rule R07_IDENTITY_CONFLICT:
SAME_INDIVIDUAL_AS(a,b) and DISTINCT_FROM(a,b)
=> emit identity_conflict(a,b) [no_auto_merge=true]
rule R08_TEMPORAL_CONFLICT:
verified_dead(a,t1) and verified_alive(a,t2) and t2 > t1
=> emit status_conflict(a,t1,t2) [no_auto_overwrite=true]
# 6. CONFIDENCE
confidence:
evidence_sources: [direct_observation, tag_or_mark, genetic_match, image_match, expert_review, inference]
combination: "Calibrated, provenance-aware aggregation; do not treat correlated evidence as independent."
thresholds:
accepted: 0.95
review: 0.70
uncertain: 0.00
rule: "Confidence values describe evidence strength, not biological truth."
# 7. SEMANTIC EQUIVALENCE
semantic_equivalence:
aliases: ["individual organism", "organism individual", "biological individual"]
conditional_aliases: ["specimen", "individual animal", "individual plant"]
not_equivalent_to: ["species", "population", "community", "habitat", "observation"]
identity_rule: "Two records refer to the same organism only when identity evidence supports co-reference."
note: "Clonal, colonial and modular organisms require explicit individuation criteria."
# 8. FLOW HASH
flow_hash:
canonical_fields: [ontology.id, organism.id, organism.taxon, organism.life_status, organism.stage, organism.provenance]
normalisation: "Unicode NFC; sorted keys; ISO-8601 UTC instants; stable identifier encoding"
algorithm: "SHA-256"
exclusion: ["display_label", "rendering_order", "volatile_cache_fields"]
property: "Equal canonical inputs produce equal hashes; hashes do not establish biological identity."
# 9. UPDATE MODEL
update_model:
mode: "append-only evidence events with versioned materialised views"
events: [OrganismRegistered, ObservationAdded, ClassificationRevised, HabitatOccurrenceAdded,
MembershipChanged, LifeStatusRevised, IdentityLinked, IdentitySplit, ConflictFlagged]
rules:
- "Preserve original observations and provenance."
- "Do not silently overwrite contradictory records."
- "Record effective time separately from ingestion time."
- "Recompute derived relationships after material changes."
- "Identity merges and splits require audit records."
# 10. AI CONSUMPTION
ai_consumption:
format: "typed entity and relation graph"
entry_point: "KSL:ECO:INDIVIDUAL_ORGANISM"
required_fields: [id, life_status, stage, confidence, provenance]
optional_fields: [taxon, first_observed, last_observed]
output_contract:
- "Separate observed facts from inferred statements."
- "Carry confidence, evidence, temporal context and source attribution."
- "Return unknown when evidence is insufficient."
- "Do not infer permanent habitat from one occurrence."
- "Avoid disclosing sensitive coordinates for threatened species."
# 11. EXAMPLE INSTANCE
example:
organism:
id: "organism:example:001"
taxon: "taxon:example:001"
life_status: alive
stage: adult
confidence: 0.98
provenance: {source: "illustrative record", observed_at: "2026-10-26T00:00:00Z", method: "example", curator: "Kireth"}
observation:
id: "observation:example:001"
organism: "organism:example:001"
time: "2026-10-26T00:00:00Z"
habitat: "habitat:example:001"
evidence: "illustrative observation"
confidence: 0.95
provenance: {source: "illustrative record", observed_at: "2026-10-26T00:00:00Z", method: "example", curator: "Kireth"}
expected_inference:
- OBSERVED_BY("organism:example:001", "observation:example:001")
- OCCURS_IN("organism:example:001", "habitat:example:001", "2026-10-26T00:00:00Z")
# 12. QUALITY GATES
assert no_duplicate_identifiers
assert all_probabilities_in_unit_interval
assert all_relationship_endpoints_exist
assert provenance_present_for_all_asserted_facts
assert identity_conflicts_not_auto_resolved
assert temporal_conflicts_flagged
assert deterministic_canonicalisation
assert inference_provenance_retained
end flow
Download Code
Copy to Clipboard