Skip to main content

kernel/
spine.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at https://mozilla.org/MPL/2.0/.
4// Copyright (c) 2026 2youg1 and the sprawling contributors
5
6//! The spine documents' grammar: how a row of `Roadmap.md` is written
7//! and read, and the six fields a Memo outline carries.
8//! The part `crates/kernel/spec/Spine.lean` specifies this module.
9//!
10//! Shape and truth are two doors. `check_*` answers "is this written
11//! like a roadmap"; what the rows then *mean* — how they hang together,
12//! what each is worth, what may be started — is `crate::plan`'s, and it
13//! is separate because a mistyped row is repaired by editing the line
14//! while a circular dependency is repaired by rethinking the work.
15//!
16//! **Six columns, and the index is a path.** `2.3.1` hangs under `2.3`,
17//! so the table states a tree without a second file to say so; `Weight`
18//! is a ratio among the rows that share a parent, never a quantity; and
19//! `Needs` names the rows that must finish first. The three columns the
20//! old four-column table lacked are what let one plan carry multi-level
21//! progress, a dependency graph and a ready set instead of pointing at a
22//! diagram file nobody parses.
23//!
24//! **Every write goes through this file.** Assembling a row of Markdown
25//! anywhere else would be a second opinion on what a row looks like, and
26//! a grammar may only have one.
27
28mod grammar;
29mod memo;
30mod rewrite;
31mod row;
32
33pub use grammar::check_roadmap_shape;
34pub use memo::{ScopeChange, WriteMoment};
35pub use rewrite::{insert_children, set_roadmap_status};
36pub use row::{
37    EvidenceCell, NewChild, ROADMAP_COLUMNS, ROADMAP_FILE, ROADMAP_STATUS_SPELLINGS, RoadmapRow,
38    RoadmapShape, RoadmapStatus,
39};