ggen_domain/lib.rs
1//! # ggen-domain - Domain Logic Layer
2//!
3//! This crate contains all domain/business logic for ggen, completely separated
4//! from CLI concerns. It provides pure business logic functions that can be used
5//! by CLI, web APIs, or other interfaces.
6//!
7//! ## Architecture
8//!
9//! - **No CLI dependencies**: This crate has ZERO dependencies on clap or clap-noun-verb
10//! - **Infrastructure dependencies**: Uses ggen-core, ggen-ai, ggen-marketplace for operations
11//! - **Async by default**: Domain functions are async for non-blocking operations
12//!
13//! ## Module Organization
14//!
15//! Domain logic is organized by functional area:
16//! - `ai` - AI operations (code analysis, generation)
17//! - `graph` - Graph operations (RDF loading, SPARQL queries)
18//! - `marketplace` - Marketplace operations (search, install, publish)
19//! - `template` - Template operations (generate, lint, render)
20//! - `project` - Project operations (create, generate, plan)
21//! - `rdf` - RDF metadata operations
22//! - `audit` - Security auditing
23//! - `ci` - CI/CD operations
24//! - `shell` - Shell completion generation
25
26#![deny(warnings)] // Poka-Yoke: Prevent warnings at compile time - compiler enforces correctness
27
28#[cfg(feature = "ai")]
29pub mod ai;
30pub mod audit;
31pub mod ci;
32pub mod generation;
33pub mod graph;
34pub mod mape_k;
35#[cfg(feature = "marketplace-v2")]
36pub mod marketplace;
37pub mod ontology;
38#[cfg(feature = "marketplace-v2")]
39pub mod packs;
40pub mod project;
41pub mod rdf;
42pub mod shell;
43pub mod template;
44pub mod utils;
45
46// AHI (Autonomic Hyper-Intelligence) subsystem
47pub mod ahi_contract;
48pub mod auto_promotion_pipeline;
49pub mod doctrine_engine;
50#[cfg(feature = "marketplace-v2")]
51pub mod marketplace_scorer;
52pub mod ontology_proposal_engine;
53pub mod proof_carrier;
54
55// AHI Type-System Hardening (Phase 1-5)
56// Makes governance impossible-to-violate at compile time
57pub mod action_types; // Phase 1: Type-indexed actions (Risk, TickBudget, Mutation)
58pub mod capability_system; // Phase 3: Capability-based effects
59pub mod proof_types; // Phase 4: Proof-carrying decisions
60pub mod swarm_coordination;
61pub mod temporal_fabric; // Phase 2: MAPE-K typestate + causality // Phase 5: Lock-free snapshots + conflict-free aggregation
62
63// Re-export commonly used types for convenience
64pub use ggen_utils::error::{Error, Result};