stemedb/applications/aphoria/src/lib.rs
jordan 1cc453c97b feat: Aphoria policy source tracking + claim extraction pipeline
- Add PolicySourceStore for tracking where policies come from
- Implement claim extraction skill and API endpoints
- Add community UI text selection extractor component
- Create Go SDK aphoria client for policy operations
- Document patent specifications and legal disclosures
- Add guides: golden path loop, policy audit trails, pre-flight checks
- Expand Unreal Engine config extractor with source tracking
- Add UAT reports for policy source tracking validation
- Refactor tests.rs into modular test files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 02:35:02 -07:00

82 lines
3.3 KiB
Rust

//! Aphoria - A code-level truth linter powered by Episteme
//!
//! Aphoria scans a codebase, extracts the decisions embedded in config and code,
//! and checks them against authoritative sources. It finds the places where what
//! your code *does* contradicts what the specs *say*.
//!
//! # Architecture
//!
//! ```text
//! ┌──────────────────────────────────────────────────────────────┐
//! │ aphoria CLI │
//! │ │
//! │ ┌──────────┐ ┌────────────┐ ┌──────────┐ ┌────────┐ │
//! │ │ Walker │──▶│ Extractors │──▶│ Ingester │──▶│ Report │ │
//! │ └──────────┘ └────────────┘ └──────────┘ └────────┘ │
//! │ │ ▲ │
//! │ ▼ │ │
//! │ ┌──────────────┐ │ │
//! │ │ Episteme │────────┘ │
//! │ │ (local) │ │
//! │ └──────────────┘ │
//! └──────────────────────────────────────────────────────────────┘
//! ```
//!
//! # Example
//!
//! ```ignore
//! use aphoria::{run_scan, AphoriaConfig, ScanArgs};
//!
//! let args = ScanArgs {
//! path: ".".into(),
//! format: "table".to_string(),
//! exit_code_enabled: false,
//! };
//! let config = AphoriaConfig::default();
//! let result = run_scan(args, &config).await?;
//!
//! println!("{}", result.display());
//! ```
// Module declarations
mod baseline;
mod bridge;
mod config;
pub mod corpus;
mod corpus_build;
mod episteme;
mod error;
pub mod extractors;
mod init;
pub mod policy;
mod policy_ops;
pub mod report;
pub mod research;
mod research_commands;
mod scan;
mod types;
mod walker;
// Public re-exports
pub use baseline::{set_baseline, show_diff};
pub use config::{AphoriaConfig, CorpusConfig};
pub use corpus::{CorpusBuildResult, CorpusBuilderInfo, CorpusRegistry};
pub use corpus_build::{build_corpus, list_corpus_sources, CorpusBuildArgs};
pub use error::AphoriaError;
pub use init::{initialize, show_status};
pub use policy::{PolicyManager, TrustPack};
pub use policy_ops::{acknowledge, bless, export_policy, import_policy, parse_value, ImportStats};
pub use research::{
detect_gaps, Gap, GapRecord, GapStore, QualityReport, QualityValidator, ResearchConfig,
ResearchOutcome, Researcher,
};
pub use research_commands::{record_scan_gaps, run_research, show_research_status, ResearchArgs};
pub use scan::run_scan;
pub use types::{
AcknowledgeArgs, BlessArgs, ConflictResult, ConflictTrace, ExtractedClaim, PolicySourceInfo,
ScanArgs, ScanMode, ScanResult, Verdict,
};
#[cfg(test)]
mod tests;