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
59
60
61
62
63
64
65
66
67
//! `arc make` — code generators (A13 spec §"Generators"; AP2.1-11 adds the
//! transactional generators and `arc stubs`).
//!
//! Dispatches to a generator by kind. Generators create new `.rs` files using
//! string templates — NOT syntax-aware editing. They are safe: never overwrite
//! existing files, never modify non-generated code, create folders only when
//! necessary (PROGRAM.md §"Generators": deterministic, safe, compile-producing,
//! non-destructive).
//!
//! # Two writer paths
//!
//! * Per-file generators (`module`, `controller`, `request`, …) use
//! [`write::write_file`] — one file, refuse-overwrite. This is the default
//! and unchanged from A13.
//! * Multi-file transactional generators (`mail`, `test`, and the `arc stubs`
//! publisher) build a [`plan::Plan`] — plan → conflict-detect → dry-run →
//! stage → validate → rollback-on-failure (PROGRAM.md AP2.1-11). A `Plan`
//! never silently overwrites user files and rolls a partial multi-file
//! write back to the pre-plan state on failure.
//!
//! Implemented kinds (PROGRAM.md §"CLI experience"):
//! - `module` — `src/<name>/mod.rs` with a `module!` declaration
//! - `controller` — `src/<module>/<name>_controller.rs`
//! - `request` — `src/<module>/<name>_request.rs`
//! - `service` — `src/<module>/<name>_service.rs`
//! - `policy` — `src/<module>/<name>_policy.rs`
//! - `middleware` — `src/<module>/<name>.rs`
//! - `event` — `src/<module>/<name>_event.rs`
//! - `listener` — `src/<module>/<name>.rs`
//! - `job` — `src/<module>/<name>_job.rs`
//! - `command` — `src/<module>/<name>.rs`
//! - `resource` — `src/<module>/<name>_resource.rs`
//! - `test` — `tests/<name>_test.rs` (transactional: dry-run, conflict-detect)
//! - `mail` — `src/<module>/<name>_mail.rs` + `pub mod` declaration
//! (transactional, AP2.1-11)
//!
//! `arc stubs publish` (AP2.1-11) is exposed as a top-level subcommand but
//! implemented here ([`stubs`]) because it shares [`plan`] with the `make`
//! generators.
//!
//! Kinds not implemented here (`model --migration`, `crud`, `api-resource`,
//! `resource --full`) are deferred: they need the UAG read path and the
//! `#[model]` macro that AP2.1-6 freezes (AGENTS.md §7: no fake
//! implementations). They will consume the same [`plan::Plan`] transaction.
pub
pub use execute;
pub use execute_stubs;