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
//! `lernie new` — create a workspace and author its first config commit
//! (ARCH §2.2). The descriptions-always snapshot (§3.3) means the
//! data-root pools are resolved at creation, so `roots` is always needed.
//!
//! Because the pools are an *input* to the first config commit, `new`
//! **founds the harness root first**, through the very routine
//! [`lernie prime`](crate::install::prime) runs (§2.2) — not a copy of
//! it. `prime` is seed-if-absent throughout and therefore idempotent, so
//! founding here is a no-op on a primed install and needs no flag: the
//! unseeded data root stops being a special case, and `new` can no
//! longer author a config commit with an empty `descriptions/**` (which
//! would hand every agent forked off it a toolless context, §3.3
//! descriptions-always). Seeding stays single-sourced in `prime`.
use ;
use crateharness_root;
use crate;
use crate;
use PathBuf;
/// `lernie new [<path>]`.
/// Found the harness root, scaffold at `path` (or
/// `<data-root>/workspaces/<auto-id>/`), and print the destination —
/// the verb's one product (§3.4). All failures — root resolution,
/// founding, or scaffolding — carry the `new` prefix through the one
/// conversion point ([`Error::new`]).
/// The one-product stdout line for a path-valued outcome — this verb's
/// destination and `replay`'s scratch path (§3.4). The single home of
/// the `Path`→`String` render, so covering it once (here) covers it for
/// both verbs; it lives beside its first caller rather than in the
/// surface module, which holds the seam and nothing else.
pub