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/// Workflow execution and planning.
78pub mod workflow;
79
80/// Workflow template I/O: init, list, load workflow files from disk.
81pub mod workflow_templates;
82
83// Re-export domain types for CLI convenience
84pub use ito_domain::changes::{ChangeRepository, ChangeTargetResolution};
85pub use ito_domain::tasks::TaskRepository as DomainTaskRepository;
86
87/// Harness integrations for running AI-assisted workflows.
88pub mod harness;
89
90/// Re-exported schema types from [`ito_domain::schemas`].
91pub mod schemas {
92 pub use ito_domain::schemas::*;
93}
94
95/// Re-exported workflow domain modules
96pub mod domain {
97 /// Planning domain module
98 pub use ito_domain::planning;
99 /// State domain module
100 pub use ito_domain::state;
101 /// Workflow domain module
102 pub use ito_domain::workflow;
103}
104
105// Re-export utility functions for CLI convenience
106pub use ito_common::id::parse_change_id;
107pub use ito_common::id::parse_module_id;
108pub use ito_common::match_::nearest_matches;
109
110/// Re-exported path utilities from [`ito_common::paths`].
111pub mod paths {
112 pub use ito_common::paths::changes_dir;
113 pub use ito_common::paths::spec_markdown_path;
114 pub use ito_common::paths::specs_dir;
115}