nexcore_spliceosome/lib.rs
1// Copyright (c) 2026 NexVigilant LLC. All Rights Reserved.
2// Intellectual Property of Matthew Alexander Campion, PharmD
3
4//! # nexcore-spliceosome — Pre-Translation Structural Expectation Generator
5//!
6//! ## Biology Analog
7//!
8//! In biology, the spliceosome processes pre-mRNA by removing introns and
9//! depositing Exon Junction Complexes (EJCs) at exon-exon junctions.
10//! These EJC markers are later consumed by the Nonsense-Mediated mRNA Decay
11//! (NMD) surveillance system to detect translation errors.
12//!
13//! ## Purpose
14//!
15//! This crate generates structural expectations for LLM pipeline execution.
16//! Given a task specification, it produces EJC markers encoding expected
17//! phases, tool categories, grounding requirements, and checkpoint intervals.
18//!
19//! The spliceosome is **cognitively independent** from the pipeline it monitors.
20//! It never sees pipeline output — only task specifications. This orthogonality
21//! breaks the circularity of asking an LLM to detect its own hallucinations.
22//!
23//! ## Layer: Foundation (0-3 internal deps)
24//!
25//! ## Primitive Grounding: sigma(Sequence) + boundary(d) + mapping(mu)
26//!
27//! ## Usage
28//!
29//! ```rust
30//! use nexcore_spliceosome::Spliceosome;
31//!
32//! let spliceosome = Spliceosome::new();
33//! let expectation = spliceosome.splice("implement a new REST endpoint").unwrap();
34//! println!("Category: {:?}", expectation.task_category);
35//! println!("Markers: {}", expectation.markers.len());
36//! ```
37
38#![warn(missing_docs)]
39#![cfg_attr(
40 not(test),
41 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
42)]
43#![forbid(unsafe_code)]
44
45pub mod classifier;
46pub mod engine;
47pub mod error;
48pub mod templates;
49pub mod types;
50
51// Re-exports for ergonomic API
52pub use classifier::TaskClassifier;
53pub use engine::Spliceosome;
54pub use error::{Result, SpliceosomeError};
55pub use types::{EjcMarker, TaskCategory, TranscriptExpectation};