Skip to main content

kranz_engine/
lib.rs

1#![allow(rustdoc::private_intra_doc_links)]
2
3//! Kranz engine — orchestration core (no UI deps).
4//!
5//! Kranz is a local mission-control harness: an orchestrator plans, fresh
6//! Claude Code sessions implement features one at a time, independent
7//! validator sessions judge each milestone, and git is the source of truth.
8//! An append-only event log makes every mission resumable (`kill -9` safe).
9//!
10//! Module map (build order per plan §5 Phase 1):
11//! - contracts: [`types`], [`events`], [`error`], [`backend`]
12//! - foundation: [`paths`], [`event_log`], [`reducer`], [`scrub`], [`git_ops`],
13//!   [`config`], [`cost`], [`prompts`], [`backend_mock`]
14//! - orchestration: [`backend_claude`], [`permissions`], [`runner`],
15//!   [`control`], [`digest`], [`orchestrator`]
16
17pub mod backend;
18pub mod error;
19pub mod events;
20pub mod paths;
21pub mod plan_fit;
22pub mod types;
23
24pub mod agent_env;
25#[cfg(windows)]
26pub(crate) mod appcontainer_windows;
27pub mod auth_verify;
28pub mod backend_readiness;
29pub mod command_exec;
30pub mod comparison_metrics;
31pub mod config;
32pub mod container_egress;
33pub mod contract_controls;
34pub mod contract_gates;
35pub mod contract_health;
36pub mod contract_lint;
37pub mod contract_sweep;
38pub mod corpus_export;
39pub mod cost;
40pub mod decompose;
41pub mod deps;
42pub mod disk_preflight;
43pub mod domain_lint;
44pub mod egress_proxy;
45pub mod escalation_metrics;
46pub mod event_log;
47pub mod evidence_bundle;
48pub mod findings;
49pub mod gate;
50pub mod gate_results;
51pub mod gate_score_flags;
52pub mod gate_scores;
53pub mod git_ops;
54pub mod hook_gates;
55pub mod hook_status;
56pub mod hooks;
57pub mod judgement;
58pub mod knowledge;
59pub mod lessons;
60pub mod merge;
61pub mod merged;
62pub mod migrate_state;
63pub mod mission_catalog;
64pub mod outcomes;
65pub mod pack;
66pub mod planning;
67pub mod pr_handoff;
68pub mod preflight;
69pub mod prompts;
70pub mod provenance;
71pub mod pty_harness;
72pub mod queue;
73pub mod reducer;
74pub mod report_render;
75pub mod review_artifact;
76pub mod reviewer_independence;
77pub mod routing;
78pub mod routing_rules;
79pub mod sandbox;
80pub mod sandbox_container;
81pub mod sandbox_windows;
82pub mod scrub;
83pub mod standards_attestation;
84pub mod standards_coverage;
85pub mod standards_enforcement;
86pub mod standards_metrics;
87pub mod standards_waiver;
88mod stream_bounds;
89/// Runtime-gated test support: skip loudly, and fail where the capability is
90/// required, so a silent skip cannot masquerade as a pass.
91pub mod test_capability;
92/// Portable `sh`/`cmd` snippets for test fixtures; see the module docs for why
93/// literal `true`/`false`/`test`/`sleep` must not appear in one.
94#[cfg(test)]
95pub(crate) mod test_shell;
96pub mod ticket;
97pub mod ticket_notes;
98pub mod trace_export;
99pub mod validator_integrity;
100pub mod validator_snapshot;
101pub mod work;
102pub mod workspace_container;
103pub mod workspace_contract;
104pub mod workspace_data;
105pub mod workspace_gate;
106pub mod workspace_provider;
107pub mod workspace_remote;
108
109pub mod backend_acp;
110pub mod backend_claude;
111pub mod backend_codex;
112pub mod backend_cursor;
113pub mod backend_droid;
114pub mod backend_kimi;
115pub mod backend_local;
116pub mod backend_mock;
117mod backend_probe;
118pub mod control;
119pub mod digest;
120pub mod draft;
121pub mod merge_gate;
122pub mod orchestrator;
123pub mod permissions;
124pub mod runner;
125
126// Re-exported at the crate root so callers (and tests) that only need to
127// inject a scripted backend don't need the full `backend_mock` path.
128pub use backend_mock::MockBackend;