academy_forge/lib.rs
1// Copyright © 2026 NexVigilant LLC. All Rights Reserved.
2// Intellectual Property of Matthew Alexander Campion, PharmD
3
4//! # Academy Forge
5//!
6//! Extract structured knowledge from nexcore Rust source into a universal
7//! Intermediate Representation (IR) that feeds both Observatory (3D spatial
8//! rendering) and Academy (experiential learning pathways).
9//!
10//! ## MCP Tools
11//!
12//! | Tool | Input | Output |
13//! |------|-------|--------|
14//! | `forge_extract` | `crate_name, domain?` | `CrateAnalysis` JSON |
15//! | `forge_validate` | `content` (JSON) | `ValidationReport` JSON |
16//! | `forge_schema` | (none) | StaticPathway JSON Schema |
17//! | `forge_compile` | `input_path, output_dir` | TypeScript files |
18//!
19//! ## Workflow
20//!
21//! 1. `forge_extract(crate="nexcore-tov", domain="vigilance")` → IR
22//! 2. Claude writes academy content using IR + educational theory
23//! 3. `forge_validate(content)` → pass/fail + specific errors
24//! 4. Fix errors, re-validate until clean
25//! 5. `forge_compile(input, output_dir)` → Studio TypeScript files
26
27#![forbid(unsafe_code)]
28#![warn(missing_docs)]
29#![cfg_attr(
30 not(test),
31 deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)
32)]
33
34pub mod atomize;
35pub mod compile;
36pub mod domain;
37pub mod error;
38pub mod extract;
39pub mod graph;
40pub mod guidance;
41pub mod ir;
42pub mod scaffold;
43pub mod validate;
44
45// Re-exports
46pub use atomize::atomize;
47pub use compile::{CompileParams, CompileResult, compile as compile_pathway};
48pub use error::{ForgeError, ForgeResult};
49pub use extract::extract_crate;
50pub use graph::build_graph;
51pub use guidance::{GuidanceInput, GuidanceScaffoldParams, generate as guidance_scaffold};
52pub use ir::{
53 AloEdge, AloEdgeType, AloType, AtomicLearningObject, AtomizedPathway, BloomLevel,
54 CrateAnalysis, DomainAnalysis, GraphTopology, LearningGraph,
55};
56pub use scaffold::{ScaffoldParams, generate as scaffold};
57pub use validate::{ValidationReport, validate};