Skip to main content

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
39mod error_bridge;
40
41/// Process execution boundary and default runner.
42pub mod process;
43
44/// Installers for project/home templates and harness assets.
45pub mod installers;
46
47/// List/query project entities (modules, changes, tasks).
48pub mod list;
49
50/// Filesystem-backed module repository implementation.
51pub mod module_repository;
52
53/// Planning directory initialization (filesystem I/O).
54pub mod planning_init;
55
56/// Filesystem-backed task repository implementation.
57pub mod task_repository;
58
59/// Clock helpers (`now_time`, `now_date`).
60pub mod time;
61
62/// Task-focused orchestration use-cases.
63pub mod tasks;
64
65/// Ralph Wiggum loop support.
66pub mod ralph;
67
68/// Indexing helpers for repository contents.
69pub mod repo_index;
70
71/// Display and inspection commands.
72pub mod show;
73
74/// Statistics collection and computation for command usage.
75pub mod stats;
76
77/// State management operations for `planning/STATE.md`.
78pub mod state;
79
80/// Validation utilities for on-disk state.
81pub mod validate;
82
83/// Schema templates execution and planning.
84pub mod templates;
85
86// Re-export domain types for CLI convenience
87pub use ito_domain::changes::{ChangeRepository, ChangeTargetResolution};
88pub use ito_domain::tasks::TaskRepository as DomainTaskRepository;
89
90/// Harness integrations for running AI-assisted workflows.
91pub mod harness;
92
93/// Re-exported schema types from [`ito_domain::schemas`].
94pub mod schemas {
95    pub use ito_domain::schemas::*;
96}
97
98/// Re-exported domain modules
99pub mod domain {
100    /// Planning domain module
101    pub use ito_domain::planning;
102    /// State domain module
103    pub use ito_domain::state;
104}
105
106// Re-export utility functions for CLI convenience
107pub use ito_common::id::parse_change_id;
108pub use ito_common::id::parse_module_id;
109pub use ito_common::match_::nearest_matches;
110
111/// Re-exported path utilities from [`ito_common::paths`].
112pub mod paths {
113    pub use ito_common::paths::changes_dir;
114    pub use ito_common::paths::spec_markdown_path;
115    pub use ito_common::paths::specs_dir;
116}