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