1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
//! rhema-coding-agent — the coding-agent driver, the first consumer of
//! rhema-core's step engine.
//!
//! Wires a [`ModelProvider`](rhema_core::ModelProvider) into a
//! [`CodingAgent`] whose turns drive `rhema_core::run_turn` over the
//! shared toolkit (`rhema-agent-tools`): the approval-gated shell, its
//! spec and discovered skills presented in the system prompt, the model
//! loading skill bodies via the shell. Tool errors surface in-band to
//! the model (SPEC.md §4); approval arrives per turn through the
//! [`Approval`] hook; the session is plain data the driver can persist
//! and resume, with a commit hook so an intent is durable before its
//! first side effect, revive-on-resume for calls a crash left
//! unanswered, and cancel-path repair for those a user stopped.
//!
//! Layout:
//! - [`agent`] — `CodingAgent`, `CodingAgentError`, `stamped_system`
//! - [`config`] — `CodingAgentConfig` and the `Steering` seam
//! - [`prompt`] — the SYSTEM.md template and its default render
//! - [`environment`] — the startup environment report and the sandbox
//! notice, the prompt's environment section
//!
//! The toolkit itself — the `Approval` seam, `ShellTools`, skills, paste
//! expansion, dangling-call repair, the renderer — lives in
//! `rhema-agent-tools` and re-exports here: the TUI and ACP drivers
//! import these names from this crate, and the claw's forge handler
//! takes the approval policy the same way.
//!
//! # Skills
//!
//! A skill is a folder with a `SKILL.md` whose frontmatter carries a
//! `description` (the trigger). Only name, trigger, and file enter the
//! system prompt, as the [`prompt`] module's `skills` list; the model
//! reads a body itself through the bash tool when a trigger applies.
//! Skills live per-workspace under `.rhema/skills`, globally under the
//! config directory, and, at the lowest tier, in the cross-agent
//! `~/.agents/skills`. A name claimed by a higher tier hides the lower
//! copies, project over global over `.agents`.
pub use ;
pub use ;
pub use ;
pub use ;
// The toolkit the driver is built on, under this crate's name: every
// downstream driver (TUI, ACP, the claw) keeps its import paths.
pub use ;