ito_core/lib.rs
1//! Core Ito application behavior.
2//!
3//! `ito-core` implements the main orchestration logic behind the CLI: reading and
4//! writing Ito state on disk, running workflows, validating inputs, and
5//! delegating to installers and harness integrations.
6//!
7//! This crate is intentionally "policy heavy" but "UI light": it defines the
8//! core semantics of commands without owning the CLI argument surface.
9
10#![warn(missing_docs)]
11
12/// Archive completed changes and update specifications.
13pub mod archive;
14
15/// Audit log infrastructure: writer, reader, reconciliation, worktree discovery.
16pub mod audit;
17
18/// Filesystem-backed change repository implementation.
19pub mod change_repository;
20
21/// JSON configuration file CRUD operations.
22pub mod config;
23
24/// Create new modules/changes and initial scaffolding.
25pub mod create;
26
27/// Distribution/build metadata helpers.
28pub mod distribution;
29
30/// Core-layer error types and result alias.
31pub mod errors;
32
33/// Git synchronization helpers for coordination workflows.
34pub mod git;
35
36/// Resolve repository and worktree path roots.
37pub mod repo_paths;
38
39/// Infer Ito change/module target context for harness sessions.
40pub mod harness_context;
41
42mod error_bridge;
43
44/// Process execution boundary and default runner.
45pub mod process;
46
47/// Installers for project/home templates and harness assets.
48pub mod installers;
49
50/// List/query project entities (modules, changes, tasks).
51pub mod list;
52
53/// Filesystem-backed module repository implementation.
54pub mod module_repository;
55
56/// Planning directory initialization (filesystem I/O).
57pub mod planning_init;
58
59/// Filesystem-backed task repository implementation.
60pub mod task_repository;
61
62/// Clock helpers (`now_time`, `now_date`).
63pub mod time;
64
65/// Task-focused orchestration use-cases.
66pub mod tasks;
67
68/// Ralph Wiggum loop support.
69pub mod ralph;
70
71/// Indexing helpers for repository contents.
72pub mod repo_index;
73
74/// Display and inspection commands.
75pub mod show;
76
77/// Statistics collection and computation for command usage.
78pub mod stats;
79
80/// State management operations for `planning/STATE.md`.
81pub mod state;
82
83/// Validation utilities for on-disk state.
84pub mod validate;
85
86/// Schema templates execution and planning.
87pub mod templates;
88
89// Re-export domain types for CLI convenience
90pub use ito_domain::changes::{ChangeRepository, ChangeTargetResolution};
91pub use ito_domain::tasks::TaskRepository as DomainTaskRepository;
92
93/// Harness integrations for running AI-assisted workflows.
94pub mod harness;
95
96/// Re-exported schema types from [`ito_domain::schemas`].
97pub mod schemas {
98 pub use ito_domain::schemas::*;
99}
100
101/// Re-exported domain modules
102pub mod domain {
103 /// Planning domain module
104 pub use ito_domain::planning;
105 /// State domain module
106 pub use ito_domain::state;
107}
108
109// Re-export utility functions for CLI convenience
110pub use ito_common::id::parse_change_id;
111pub use ito_common::id::parse_module_id;
112pub use ito_common::match_::nearest_matches;
113
114/// Re-exported path utilities from [`ito_common::paths`].
115pub mod paths {
116 pub use ito_common::paths::changes_dir;
117 pub use ito_common::paths::spec_markdown_path;
118 pub use ito_common::paths::specs_dir;
119}