scc_engine/startup_model.rs
1//! Structured startup decomposition (spec §75): the startup artifact as
2//! addressable model data instead of rendered text only.
3//!
4//! `StartupContext` already carries atlas text + skeleton + surface +
5//! coverage + omissions + artifact; this struct re-exports those fields
6//! under stable names so external programs bind to JSON keys instead of
7//! scraping `# SECTION` headers. No new derivation — pure projection.
8
9/// Startup artifact as structured data (§75): every section of the
10/// rendered startup text addressable by key.
11#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
12// trace:v1 id=impl.scc-engine-startup-model work=WORK-SI-MMMJA4G6 satisfies=REQ-SI-503JSBGP
13pub struct StartupModel {
14 pub atlas_text: String,
15 pub atlas_budget_used: usize,
16 pub skeleton: String,
17 pub surface_text: String,
18 pub important_text: String,
19 pub surface_render: scc_core::SurfaceRenderResult,
20 pub coverage: Vec<String>,
21 pub omissions: Vec<String>,
22 pub artifact: scc_core::ContextArtifact,
23}
24
25// trace:exempt reason=internal-detail
26impl StartupModel {
27 // trace:exempt reason=internal-detail
28 pub fn from_context(
29 ctx: scc_context::startup::StartupContext,
30 ) -> Self {
31 StartupModel {
32 atlas_text: ctx.atlas,
33 atlas_budget_used: ctx.atlas_budget_used,
34 skeleton: ctx.skeleton,
35 surface_text: ctx.surface,
36 important_text: ctx.important,
37 surface_render: ctx.surface_render,
38 coverage: ctx.coverage,
39 omissions: ctx.omissions,
40 artifact: ctx.artifact,
41 }
42 }
43}