Tracks: core-cleanup audit 2026-04-18
Problem
pr4xis/src/engine/ contains a parallel primitive-typed runtime system that duplicates the formal/logic/derivation ontology and leaks Rust primitives across its public API.
Specific violations
engine/trace.rs:
pub struct TraceEntry {
pub step: usize,
pub situation_before: String, // primitive
pub action: String, // primitive
pub precondition_results: Vec<PreconditionResult>,
pub situation_after: Option<String>, // primitive
pub success: bool, // primitive bool
}
pub struct Trace { entries: Vec<TraceEntry> }
Trace + TraceEntry duplicate DerivationConcept::Derivation + DerivationConcept::DerivationStep (JSV 1996; Plotkin 1981; Lambek 1968).
engine/precondition.rs:
pub enum PreconditionResult {
Satisfied { rule: String, reason: String },
Violated { rule: String, reason: String, situation: String, attempted_action: String },
}
Every field is String. Satisfied maps to DerivationConcept::Witness (Martin-Löf 1984); Violated maps to ProofTheoryConcept::Counterexample. Both should be typed ontological entities.
engine/situation.rs:
pub trait Situation { fn describe(&self) -> String; ... }
describe() -> String is a primitive-leak. Situations ARE Hypothesis (pre-state) / Consequence (post-state) in Derivation.
engine/engine.rs:
pub enum EngineError<A: Action> {
LogicalError { reason: String }, // primitive string
...
}
Why this is an ontological issue
Violates feedback_api_ontological_from_day_one. Was surfaced in the prior-session summary as "Unify pr4xis::engine::Trace + PipelineTrace into one Derivation type".
Proposed direction
- Move / wire engine types through the
formal/logic/derivation ontology (or whichever core logic home Derivation ends up in).
Trace → uses DerivationConcept::Derivation (or is one).
TraceEntry → DerivationStep carrying typed Witness / Hypothesis / Consequence.
PreconditionResult::Satisfied → Witness; Violated → Counterexample.
Situation trait → returns typed representation (DOLCE Being or ontology-specific), not String.
EngineError::LogicalError → typed ontological entity.
Depends on
Tracks: core-cleanup audit 2026-04-18
Problem
pr4xis/src/engine/contains a parallel primitive-typed runtime system that duplicates theformal/logic/derivationontology and leaks Rust primitives across its public API.Specific violations
engine/trace.rs:Trace+TraceEntryduplicateDerivationConcept::Derivation+DerivationConcept::DerivationStep(JSV 1996; Plotkin 1981; Lambek 1968).engine/precondition.rs:Every field is
String.Satisfiedmaps toDerivationConcept::Witness(Martin-Löf 1984);Violatedmaps toProofTheoryConcept::Counterexample. Both should be typed ontological entities.engine/situation.rs:describe() -> Stringis a primitive-leak. Situations ARE Hypothesis (pre-state) / Consequence (post-state) in Derivation.engine/engine.rs:Why this is an ontological issue
Violates feedback_api_ontological_from_day_one. Was surfaced in the prior-session summary as "Unify pr4xis::engine::Trace + PipelineTrace into one Derivation type".
Proposed direction
formal/logic/derivationontology (or whichever core logic home Derivation ends up in).Trace→ usesDerivationConcept::Derivation(or is one).TraceEntry→DerivationStepcarrying typedWitness/Hypothesis/Consequence.PreconditionResult::Satisfied→Witness;Violated→Counterexample.Situationtrait → returns typed representation (DOLCE Being or ontology-specific), not String.EngineError::LogicalError→ typed ontological entity.Depends on