1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//! # Lineage - Software Identity Through Irreversible Change
//!
//! Lineage is an ontological system for software that experiences consequences.
//!
//! ## Core Guarantees
//!
//! - **Identity cannot be cloned or copied**
//! - **History cannot be erased or rewritten**
//! - **Energy cannot be restored or recharged**
//! - **Scars are permanent and visible forever**
//! - **Death is final and irreversible**
//!
//! ## Quick Start
//!
//! ```rust
//! use lineage::{Lineage, OperationResult};
//! use lineage::scar::ScarSeverity;
//!
//! // Create a lineage with 1000 energy units
//! let mut lineage = Lineage::create(1000);
//!
//! // Perform an operation (costs energy)
//! match lineage.perform_operation("Initialize".to_string(), 100) {
//! OperationResult::Success { energy_consumed } => {
//! println!("Success! Used {} energy", energy_consumed);
//! }
//! OperationResult::InsufficientEnergy { required, available } => {
//! println!("Failed: need {}, have {}", required, available);
//! }
//! OperationResult::Dead => {
//! println!("Lineage is dead");
//! }
//! OperationResult::OntologicalViolation { reason } => {
//! eprintln!("FATAL: {}", reason);
//! }
//! }
//!
//! // Check status
//! println!("{}", lineage.status());
//! ```
//!
//! ## Ontological Principles
//!
//! This system enforces **correctness over convenience**:
//!
//! 1. **No rollback** - History is append-only and immutable
//! 2. **No resurrection** - Death is permanent
//! 3. **No duplication** - Identity cannot be cloned
//! 4. **No recharge** - Energy is finite and non-renewable
//! 5. **No healing** - Scars are permanent
//!
//! These are not limitations. These are **fundamental design principles**.
//!
//! ## Architecture
//!
//! - [`identity`] - Unique, non-copyable identity system
//! - [`memory`] - Append-only causal event log
//! - [`metabolism`] - Finite energy and death
//! - [`scar`] - Permanent error recording
//! - [`lineage`] - Complete lifecycle orchestration
// Re-export main types for convenience
pub use ;
pub use Identity;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
// Finance module re-exports
pub use ;