diff --git a/CONTEXT.md b/CONTEXT.md index 1074466890..00e21e6836 100644 --- a/CONTEXT.md +++ b/CONTEXT.md @@ -129,7 +129,16 @@ Terms the code, the specs and the docs use with one meaning. Architecture decisi for, or whose lines differ from that block's: what a migration lays out (`specforge_migrate`'s `layout::lay_out`, ADR 0235). A file with none is skipped as it is. - **Added error**: an error the edited compile reports that the checked report has no diagnostic left to pair, by code, - severity, file and message with its digits collapsed (ADR 0211), less a judged rule's finding (ADR 0297); the one rule behind E080 and a migration's refusal. + severity, file and message with its digits collapsed (ADR 0211), less a judged rule's finding (ADR 0297), a finding + the write revealed by moving its entity's owner state (ADR 0363) and a **settled-later** finding on an entity the + write creates or creates something under, altering nothing held there (ADR 0385); the one rule behind E080 and a + migration's refusal. +- **Settled later**: a code whose finding names a state a later step of the authoring settles (an open question a + later answer resolves, a phase's requirement the rest of its plans hold), declared by the extension that owns it + (`CodeDescriptor.settled_later`, SDK `CodeBuilder::settled_later()`, ADR 0385). E080 excuses its finding only on a + write whose plan creates the finding's subject or an entity under it and alters nothing the project held there (no + set, unset, link, unlink, delete or move at or under the subject); its severity, `check` and every gate are + unchanged. - **Migration verdict**: whether a planned migration is kept, decided before anything is written: its hooks pass, and the edited compile of its planned texts adds no **added error** and has the graph the project has, less the steps' declared changes (`specforge_ops::authoring::migrate::{judge, Verdict}`, ADR 0186). A dry run reports it; a refused migration writes @@ -732,6 +741,7 @@ Terms the code, the specs and the docs use with one meaning. Architecture decisi - **Entity snapshot**: every entity of one built graph as every check after the build reads it, taken once per compile and per session check (`specforge_registry::EntitySnapshot`, ADR 0019), taken of a graph build made in its Registry build, and of no other (ADR 0115, ADR 0123). Each entity's record holds: + - the title its header writes, absent for a fact written without one; a pass is sent it as `title` (ADR 0387); - what it writes, as field text, with each value's shape (quoted, bare, a number, a list of strings or references, …) and span beside it for the host's own checks (`specforge_graph::ValueShape`); @@ -1903,20 +1913,24 @@ Terms the code, the specs and the docs use with one meaning. Architecture decisi scope holds at any depth, and every entity one reference away from one of those, either way; a named route keeps those of its start kind (ADR 0355). - **Context route**: what an extension declares (the `contexts` category) for a role to read one entity of a subject - kind: ordered sections of named selectors, each core or enrich, the settings it carries, a default budget and an - optional agent. One the registry can't serve is E123; an agent binding that can't hold is E124 (ADR 0356). + kind: ordered sections of named selectors, each core or enrich, the settings it carries, its enrich allowance (its + `budget`: the tokens of enrich sections a pack may add beyond its core, 0 for a route of core sections only) and an + optional agent. The host does not bound its core: a read that states no cap serves it whatever it costs. One the + registry can't serve is E123; an agent binding that can't hold is E124 (ADR 0356, ADR 0386). - **Context pack**: one context route served for one entity: its sections as served, the subject and the served - entities as an export, the budget and what was cut, and the pack digest; `specforge context`, `specforge.context` - and `specforge://context/{+entity_id}?role=` answer the same bytes (ADR 0356). -- **Core section** / **Enrich section**: a context route's section a budget never cuts (core; below them the read is - E062), or one served whole in declared order while it fits, the first that does not fit keeping its most connected - entities and every later one dropped (enrich) (ADR 0356). + entities as an export, the cap it was fitted to and what was cut, and the pack digest; `specforge context`, + `specforge.context` and `specforge://context/{+entity_id}?role=` answer the same bytes (ADR 0356). +- **Core section** / **Enrich section**: a context route's section always served whole (core; only a cap a read states + below them is E062), or one served whole in declared order within the route's allowance or the stated cap, the first + that does not fit keeping its most connected entities and every later one dropped (enrich) (ADR 0356, ADR 0386). - **Pack digest**: the sha256 of a pack's route, subject and served sections, each section's digest the judged input digest of its selector over the members it served; the budget is recorded beside it, not in it (ADR 0356). - **Context record**: a `context`-written block `{route, digest, max_tokens}` the host writes when it records a - route's pack on an entity (ADR 0356). -- **Stale record**: a record whose pack, evaluated again at its budget, has another digest or no subject; reported - with the route's stale code (ADR 0356). + route's pack on an entity, `max_tokens` the cap its read stated, absent when it stated none; no pack shows one + (ADR 0356, ADR 0386). +- **Stale record**: a record whose pack, evaluated again under the budget its read had (its stated cap, else the core + whole and the route's allowance), has another digest, no subject or a core above the stated cap; reported with the + route's stale code (ADR 0356, ADR 0386). - **Field filter**: `kind[field=value|…]` in a selector: only entities whose field holds one of the values (ADR 0356). - **Result field**: the enum field of a collector-written kind that holds a fact's result, its values `TestStatus` names (`KindBuilder::result`, ADR 0329 D3); what a judged `test(..)` input and a reader of a reference to the fact diff --git a/crates/app/ops/src/authoring/apply/mod.rs b/crates/app/ops/src/authoring/apply/mod.rs index ce21ec4a98..84d232a220 100644 --- a/crates/app/ops/src/authoring/apply/mod.rs +++ b/crates/app/ops/src/authoring/apply/mod.rs @@ -359,8 +359,7 @@ fn rejudge( &before, &after, project.environment().registries(), - change.moved(), - &|id| change.renews(id), + change, host_only, ) .map_err(|refusal| refusal.error) diff --git a/crates/app/ops/src/authoring/apply/record.rs b/crates/app/ops/src/authoring/apply/record.rs index 4429be78f1..3acfbffc92 100644 --- a/crates/app/ops/src/authoring/apply/record.rs +++ b/crates/app/ops/src/authoring/apply/record.rs @@ -2,8 +2,10 @@ //! no origin can forge a record. In order: the route is registered (`unknown_route`); it records the entity's kind //! (`not_recorded`); the origin is a command, collector or hook of the route's extension or of one naming it a peer, //! or a core surface (`origin`); the record's selector derives exactly one subject (`no_subject`, -//! `several_subjects`); the pack fits its budget (`budget`). Each is `record_refused` with that `reason`. The write is -//! a set of the context field, which the ledger records as it records a harness value. +//! `several_subjects`); a stated cap holds the pack's core (`budget`). Each is `record_refused` with that `reason`. The +//! write is a set of the context field, which the ledger records as it records a harness value. Its `max_tokens` is +//! the cap the operation stated, and absent when it stated none (ADR 0386 D6): evaluating the record again reads its +//! pack under the same budget, so only a stated cap can refuse a core that grew. use super::{Origin, flags, invalid}; use crate::authoring::edit::{Edit, Input, Step}; @@ -40,8 +42,8 @@ pub(crate) fn refused(number: usize, reason: &str, message: impl std::fmt::Displ .with_data(json!({"op": number, "reason": reason})) } -/// A pack read for a record, its error as the record reports it: a budget below the route's core sections (E062) is -/// `record_refused` for `budget`, about operation `number`; any other error is itself. +/// A pack read for a record, its error as the record reports it: a stated cap below the route's core sections (E062) +/// is `record_refused` for `budget`, about operation `number`; any other error is itself. pub fn record_read_error(number: usize, error: OpError) -> OpError { if error.code == codes::E062.id() { refused(number, "budget", error.message) @@ -151,22 +153,23 @@ pub(crate) fn check( )); } let subject = recorded.subject(view, op.number)?; - let budget = op.max_tokens.unwrap_or(route.budget); // shortcut: the pack is computed over the project the plan is applied to, before the plan's other operations; // a plan that also edits what the pack serves records the pack it read, and the next check reports it stale. let request = ContextRequest { route: &route.name, subject: &subject, - max_tokens: Some(budget as usize), + max_tokens: op.max_tokens.map(|cap| cap as usize), format: Format::Context, }; let pack = context(view, &request) .map_err(|refusal| record_read_error(op.number, refusal.into_error()))?; - let value = BTreeMap::from([ + let mut value = BTreeMap::from([ ("route".to_string(), Input::One(route.name.clone())), ("digest".to_string(), Input::One(pack.digest)), - ("max_tokens".to_string(), Input::Number(budget.into())), ]); + if let Some(cap) = op.max_tokens { + value.insert("max_tokens".to_string(), Input::Number(cap.into())); + } Ok(Step::Edit(Edit::Set { entity_id: recorded.entity, field: recorded.record.field.clone(), diff --git a/crates/app/ops/src/authoring/edit/declared.rs b/crates/app/ops/src/authoring/edit/declared.rs index 5c307e2301..b08ae7f931 100644 --- a/crates/app/ops/src/authoring/edit/declared.rs +++ b/crates/app/ops/src/authoring/edit/declared.rs @@ -3,6 +3,7 @@ //! changes (ADR 0186). use super::Edit; +use crate::authoring::planned::at_or_under; use specforge_graph::{GraphDelta, NodeAspect}; use std::collections::{BTreeMap, BTreeSet}; @@ -15,6 +16,13 @@ pub(crate) struct Declared { /// The files a rename of the plan rewrites: it changes the graph by a substitution only (ADR 0198), so every /// entity of these files may read differently afterwards. renamed: BTreeSet, + /// The entities a create names, each at the id it has once the later moves are made, less those a later delete + /// removes: what the edits create (ADR 0385). + created: BTreeSet, + /// The entities the project held that the edits change: a field or an aspect set, a delete, either id of a move, + /// each at the id it has once the later moves are made. An edit of an entity the edits create is not one. A + /// settled-later finding at or above one may be the write's own doing, so it is counted (ADR 0385). + altered: BTreeSet, } #[derive(Debug, Default)] @@ -39,16 +47,62 @@ impl Declared { Edit::AddVerify { .. } | Edit::RemoveVerify { .. } => { self.aspect(path, NodeAspect::Obligations); } - Edit::Create { .. } | Edit::Delete { .. } => { + Edit::Create { .. } => { self.whole.insert(path.to_string()); + self.created.insert(path.to_string()); + } + Edit::Delete { .. } => { + self.whole.insert(path.to_string()); + self.alter(path); + let under = format!("{path}/"); + self.created + .retain(|id| id != path && !id.starts_with(&under)); } } } - /// The entity at `old` is now at `new` (a move, ADR 0284): both ids are declared whole. + /// The entity at `old` is now at `new` (a move, ADR 0284): both ids are declared whole, and an entity the edits + /// created at or under `old` is created at its new id. pub(crate) fn moved(&mut self, old: &str, new: &str) { self.whole.insert(old.to_string()); self.whole.insert(new.to_string()); + let held = !self.creates(old); + let moves = [(old.to_string(), new.to_string())]; + let relocate = |ids: &mut BTreeSet| { + *ids = std::mem::take(ids) + .into_iter() + .map(|id| super::steps::relocated(&id, &moves)) + .collect(); + }; + relocate(&mut self.created); + relocate(&mut self.altered); + // A held entity moved changes what both its old scope and its new one hold. + if held { + self.altered.insert(old.to_string()); + self.altered.insert(new.to_string()); + } + } + + /// Whether the edits create `id` or an entity it is under. + fn creates(&self, id: &str) -> bool { + self.created.iter().any(|created| at_or_under(id, created)) + } + + /// The edits change the entity at `id`: one the project held, unless the edits create it. + fn alter(&mut self, id: &str) { + if !self.creates(id) { + self.altered.insert(id.to_string()); + } + } + + /// The entities the edits create, at their ids once every move is made (ADR 0385). + pub(crate) fn created(&self) -> impl Iterator { + self.created.iter() + } + + /// The entities the project held that the edits change, at their ids once every move is made (ADR 0385). + pub(crate) fn altered(&self) -> impl Iterator { + self.altered.iter() } /// The entities a create, a delete or a move names, at either id of a move. @@ -63,6 +117,7 @@ impl Declared { /// `field` of `id` may change (also a delete's referrer, ADR 0163). pub(crate) fn field(&mut self, id: &str, field: &str) { + self.alter(id); self.changes .entry(id.to_string()) .or_default() @@ -71,6 +126,7 @@ impl Declared { } pub(crate) fn aspect(&mut self, id: &str, aspect: NodeAspect) { + self.alter(id); self.changes .entry(id.to_string()) .or_default() diff --git a/crates/app/ops/src/authoring/edit/declared/tests.rs b/crates/app/ops/src/authoring/edit/declared/tests.rs index 1a84cae49d..138c18314d 100644 --- a/crates/app/ops/src/authoring/edit/declared/tests.rs +++ b/crates/app/ops/src/authoring/edit/declared/tests.rs @@ -198,3 +198,71 @@ fn an_edge_between_two_undeclared_entities_is_beyond() { assert_eq!(declared.beyond(changed).added_edges.len(), 1); } + +#[specforge_test(requirement = "FEATURE-131")] +fn a_created_entity_is_followed_through_a_later_move() { + let create = Edit::Create { + kind: "plan".into(), + id: "P1".into(), + title: "P1".into(), + file: "f.spec".into(), + fields: Default::default(), + verify: Vec::new(), + }; + let delete = Edit::Delete { + entity_id: "Q1".into(), + unlink_references: false, + }; + let mut declared = Declared::default(); + declared.edit(&create, "PH/P1"); + declared.edit(&create, "Q1/T1"); + declared.edit(&create, "R1"); + // Moved, its new id is the created one; deleted, a created entity and what is under it are created no more. + declared.moved("PH", "PX"); + declared.edit(&delete, "Q1"); + // A delete creates nothing, and neither does a move. + declared.edit(&delete, "S1"); + declared.moved("U1", "U2"); + let created: Vec<&String> = declared.created().collect(); + assert_eq!(created, ["PX/P1", "R1"]); +} + +#[specforge_test(requirement = "FEATURE-131")] +fn an_entity_held_before_and_changed_is_altered_and_one_created_is_not() { + let create = Edit::Create { + kind: "plan".into(), + id: "P3".into(), + title: "P3".into(), + file: "f.spec".into(), + fields: Default::default(), + verify: Vec::new(), + }; + let delete = Edit::Delete { + entity_id: "PH/P2".into(), + unlink_references: false, + }; + let unset = Edit::Unset { + entity_id: "PH/P1".into(), + field: "requirements".into(), + }; + let mut declared = Declared::default(); + declared.edit(&create, "PH/P3"); + // A field of what the edits create, and a delete of it, alter nothing the project held. + declared.edit(&unset, "PH/P3"); + declared.edit(&delete, "PH/P3"); + declared.edit(&create, "PH/P4"); + declared.moved("PH/P4", "PX/P4"); + assert_eq!(declared.altered().count(), 0); + // A held entity's field, a held entity deleted, a held entity moved (both ids), a delete's referrer. + declared.edit(&unset, "PH/P1"); + declared.edit(&delete, "PH/P2"); + declared.moved("PH/P5", "PY/P5"); + declared.field("R1", "phase"); + // A later move of a scope carries what was altered under it. + declared.moved("PY", "PZ"); + let altered: Vec<&String> = declared.altered().collect(); + assert_eq!( + altered, + ["PH/P1", "PH/P2", "PH/P5", "PY", "PZ", "PZ/P5", "R1"] + ); +} diff --git a/crates/app/ops/src/authoring/edit/steps.rs b/crates/app/ops/src/authoring/edit/steps.rs index 35a4325c17..3cd72b81e9 100644 --- a/crates/app/ops/src/authoring/edit/steps.rs +++ b/crates/app/ops/src/authoring/edit/steps.rs @@ -261,6 +261,8 @@ fn conclude( .rewriting_sources(rewritten) .moving(raw_moves.clone()) .renewing(declared.whole().cloned()) + .creating(declared.created().cloned()) + .altering(declared.altered().cloned()) .keeping_ledger( project, LedgerChange { @@ -273,15 +275,7 @@ fn conclude( let added = if change.is_empty() { Vec::new() } else { - validate::check( - view, - &change.after(), - &declared, - change.ledger_after(), - change.moved(), - &|id| change.renews(id), - host_only, - )? + validate::check(view, &change, &declared, host_only)? }; let report = EditReport { entities: change.entities(), diff --git a/crates/app/ops/src/authoring/edit/validate.rs b/crates/app/ops/src/authoring/edit/validate.rs index f5ebbf3b2f..ed78024557 100644 --- a/crates/app/ops/src/authoring/edit/validate.rs +++ b/crates/app/ops/src/authoring/edit/validate.rs @@ -5,11 +5,14 @@ //! block moves every later one. An extension's finding is also keyed by its subject entity, relocated through the //! plan's moves, so a finding on another entity is another error (ADR 0302). A judged rule's finding is never such an //! error (ADR 0297): its judge settles it, not the edit; only a finding the judged evaluation made is one. Nor is a -//! finding the write revealed by moving its entity into the owner state its code waits for (ADR 0363). +//! finding the write revealed by moving its entity into the owner state its code waits for (ADR 0363), nor a finding +//! a later step settles on an entity the write creates or creates something under, altering nothing the project held +//! there (ADR 0385). use super::EditField; use super::declared::Declared; use super::steps::relocated; +use crate::authoring::planned::PlannedChange; use crate::view::ProjectView; use crate::{OpError, OpErrorKind, Refusal}; use specforge_common::{Diagnostic, DiagnosticList, Severity, codes}; @@ -17,7 +20,7 @@ use specforge_diagnostics::CodeRef; use specforge_graph::{GraphDelta, compute_graph_delta_over}; use specforge_project::CompiledProject; use specforge_registry::RegistryBuild; -use std::collections::{BTreeMap, HashMap}; +use std::collections::HashMap; type Key = (String, Severity, String, String, String); @@ -60,33 +63,55 @@ pub(crate) fn judged_finding(post: &CompiledProject) -> impl Fn(&Diagnostic) -> } /// Whether a diagnostic of `post`, the project a write leaves `before` as, is no error the write adds whatever its -/// key: a judged rule's finding ([`judged_finding`]), or one the write revealed ([`revealed`]). `renewed` names the -/// entities the write gives a new identity, as its plan says. -pub(crate) fn not_added<'a, R: Fn(&str) -> bool + 'a>( +/// key: a judged rule's finding ([`judged_finding`]), one the write revealed ([`revealed`]), or one a later step +/// settles on what the write creates ([`settled_later`]). `change` is the write's plan; a migration has none, so it +/// reveals and creates nothing. +pub(crate) fn not_added<'a>( before: &'a CompiledProject, post: &'a CompiledProject, - renewed: R, + change: Option<&'a PlannedChange>, ) -> impl Fn(&Diagnostic) -> bool + 'a { let judged = judged_finding(post); - move |d| judged(d) || revealed(before, post, &renewed, d) + move |d| { + judged(d) + || change.is_some_and(|change| { + revealed(before, post, change, d) || settled_later(post, change, d) + }) + } +} + +/// Whether `d` is a finding a later step of the authoring settles on what `change` creates (ADR 0385): its origin's +/// own catalog entry for its code declares `settled_later` (`Codebook::settled_later`), it names a subject, and the +/// change creates that subject or an entity under it and alters nothing the project held there +/// (`PlannedChange::opens`). +fn settled_later(post: &CompiledProject, change: &PlannedChange, d: &Diagnostic) -> bool { + let (Some(extension), Some(subject)) = (d.origin(), d.subject()) else { + return false; + }; + change.opens(subject) + && post + .environment() + .registries() + .codes() + .settled_later(extension, CodeRef::parse(&d.code).local) } /// Whether the write from `before` to `post` revealed `d` (ADR 0363): an extension's finding on an entity, whose code /// waits for an owner state (`Codebook::waits`), and the write moved that entity from the other state into it. /// `before` could not report it there, so the write did not add it: the owner's state moved. The entity must be the -/// one `before` held: never one the write's plan creates, deletes or moves, or is under one that it does (`renewed`), -/// whatever id `before` held; and both states must be known (`CompiledProject::owner_pending`: none after an update -/// that skipped the checks). +/// one `before` held: never one the write's plan creates, deletes or moves, or is under one that it does +/// (`PlannedChange::renews`), whatever id `before` held; and both states must be known +/// (`CompiledProject::owner_pending`: none after an update that skipped the checks). fn revealed( before: &CompiledProject, post: &CompiledProject, - renewed: &dyn Fn(&str) -> bool, + change: &PlannedChange, d: &Diagnostic, ) -> bool { let (Some(extension), Some(subject)) = (d.origin(), d.subject()) else { return false; }; - if renewed(subject) { + if change.renews(subject) { return false; } let codes = post.environment().registries().codes(); @@ -136,20 +161,19 @@ pub(crate) fn added( (errors, rest) } -/// Refuse (E080) when `after` has an error `before` does not. +/// Refuse (E080) when `after`, the project `change` leaves `before` as, has an error `before` does not. pub(crate) fn refuse_new_errors( before: &CompiledProject, after: &CompiledProject, registries: &RegistryBuild, - moved: &Moves, - renewed: &dyn Fn(&str) -> bool, + change: &PlannedChange, host_only: bool, ) -> Result<(), Refusal> { let (errors, _) = added( &before.judged_diagnostics(), after.diagnostics(), - not_added(before, after, renewed), - moved, + not_added(before, after, Some(change)), + change.moved(), host_only, ); if errors.is_empty() { @@ -159,29 +183,28 @@ pub(crate) fn refuse_new_errors( } } -/// What the project reports once `texts` are written that its checked report does not have now (`renewed`: the -/// entities the plan creates, deletes or moves, [`not_added`]): the warnings and infos; or E080 naming each new error; or, when the edited graph changes what `declared` does not name, +/// What the project reports once `change` is written that its checked report does not have now (the change's +/// moves, creations and deletions read by [`not_added`]): the warnings and infos, and the errors [`not_added`] +/// excuses; or E080 naming each new error; or, when the edited graph changes what `declared` does not name, /// `undeclared_change` (ADR 0198) naming the remainder. pub fn check( view: &ProjectView<'_>, - texts: &BTreeMap, + change: &PlannedChange, declared: &Declared, - ledger: Option<&[u8]>, - moved: &Moves, - renewed: &dyn Fn(&str) -> bool, host_only: bool, ) -> Result, Refusal> { let before = view.project().judged_diagnostics(); + let texts = change.after(); // The project the write would leave, judged: the guard passes read it and the project before it (ADR 0289). let post = view .project() - .edited_with(texts, ledger) + .edited_with(&texts, change.ledger_after()) .judged_against(view.project()); let (errors, rest) = added( &before, post.diagnostics(), - not_added(view.project(), &post, renewed), - moved, + not_added(view.project(), &post, Some(change)), + change.moved(), host_only, ); if !errors.is_empty() { diff --git a/crates/app/ops/src/authoring/migrate.rs b/crates/app/ops/src/authoring/migrate.rs index e821ad7823..fc32f0c5c3 100644 --- a/crates/app/ops/src/authoring/migrate.rs +++ b/crates/app/ops/src/authoring/migrate.rs @@ -367,8 +367,9 @@ pub fn judge( verdict.compared = true; verdict.graph_delta = beyond_steps(compute_graph_delta(pre.graph(), post.graph()), pre.graph()); verdict.post_diagnostics = post.diagnostics(); - // No plan says which entities a migration's texts create or delete: it reveals nothing (ADR 0363). - let judged = not_added(pre, &post, |_: &str| true); + // No plan says which entities a migration's texts create or delete: it reveals nothing (ADR 0363) and creates + // nothing, so a settled-later finding is counted (ADR 0385). + let judged = not_added(pre, &post, None); verdict.added_errors = added( &pre.checked_diagnostics(), verdict.post_diagnostics.clone(), diff --git a/crates/app/ops/src/authoring/planned.rs b/crates/app/ops/src/authoring/planned.rs index ca708475d5..edf294f888 100644 --- a/crates/app/ops/src/authoring/planned.rs +++ b/crates/app/ops/src/authoring/planned.rs @@ -36,6 +36,11 @@ pub struct PlannedChange { /// The entities the change creates or deletes, as its plan names them: with [`Self::moved`], what /// [`Self::renews`] reads. renewed: BTreeSet, + /// The entities the change creates, at their ids once its moves are made: what [`Self::opens`] reads. + created: BTreeSet, + /// The entities the project held that the change alters (a field, an aspect, a delete, a move), at their ids once + /// its moves are made: what [`Self::opens`] reads too. + altered: BTreeSet, /// Files outside the sources the change writes whatever they hold then, by path from the root: a collect's fact /// stores (ADR 0327). root_files: BTreeMap>, @@ -91,6 +96,12 @@ impl std::fmt::Debug for LedgerWrite { } } +/// Whether `id` is `scope` or an entity under it: `scope` followed by `/` (the scope path of ADR 0284). +pub(crate) fn at_or_under(id: &str, scope: &str) -> bool { + id.strip_prefix(scope) + .is_some_and(|rest| rest.is_empty() || rest.starts_with('/')) +} + impl PlannedChange { /// `files`: (path relative to the project root, planned-on text, after text); an unchanged one is dropped, and a new /// one whose after text is empty is unchanged. @@ -112,6 +123,8 @@ impl PlannedChange { locked: false, moved: Vec::new(), renewed: BTreeSet::new(), + created: BTreeSet::new(), + altered: BTreeSet::new(), root_files: BTreeMap::new(), superseded: Vec::new(), rewritten: BTreeMap::new(), @@ -191,6 +204,26 @@ impl PlannedChange { false } + /// This change creating `ids`, as its plan names them once its moves are made. + pub(crate) fn creating(mut self, ids: impl IntoIterator) -> Self { + self.created.extend(ids); + self + } + + /// This change altering `ids`, entities the project held, at their ids once its moves are made. + pub(crate) fn altering(mut self, ids: impl IntoIterator) -> Self { + self.altered.extend(ids); + self + } + + /// Whether the change creates the entity `id` or an entity under it, and alters nothing the project held at `id` + /// or under it (ADR 0385): a settled-later finding on `id` is then no error the change adds. A write that also + /// deletes, sets, unsets, links, unlinks or moves there may have made the finding itself, so it is counted. + pub(crate) fn opens(&self, id: &str) -> bool { + self.created.iter().any(|created| at_or_under(created, id)) + && !self.altered.iter().any(|altered| at_or_under(altered, id)) + } + /// This change keeping the harness ledger true to the project `before` (ADR 0287): the ledger as the host would /// rewrite it for the edited project, `change` having moved or set values. Nothing when no extension declares a /// harness field or the ledger stays as it is. @@ -569,6 +602,35 @@ mod tests { } } + #[test] + fn a_change_opens_what_it_creates_and_every_entity_it_is_under() { + let change = change(Vec::new()) + .creating(["v1/01/01-01".to_string(), "Q".to_string()]) + .renewing(["D".to_string()]); + for id in ["v1/01/01-01", "v1/01", "v1", "Q"] { + assert!(change.opens(id), "{id}"); + } + // Under what it creates, beside it, a prefix that is no scope, or only deleted: nothing it creates. + for id in ["v1/01/01-01/T1", "v1/02", "v1/0", "QQ", "D"] { + assert!(!change.opens(id), "{id}"); + } + } + + #[test] + fn a_change_that_alters_what_was_held_there_opens_nothing_there() { + let change = change(Vec::new()) + .creating(["v1/01/01-03".to_string(), "Q".to_string()]) + .altering(["v1/01/01-02".to_string()]); + // Created under, but a held plan of the same phase altered: the phase and its milestone are opened no more. + for id in ["v1/01", "v1"] { + assert!(!change.opens(id), "{id}"); + } + // What it creates is opened still, and so is what it creates beside the alteration. + for id in ["v1/01/01-03", "Q"] { + assert!(change.opens(id), "{id}"); + } + } + #[test] fn a_file_whose_after_is_its_planned_on_text_is_not_in_the_change() { let same = change(vec![("a.spec", text("x\n"), "x\n")]); diff --git a/crates/app/ops/src/host/sections.rs b/crates/app/ops/src/host/sections.rs index 54fe8c505a..0cea92d8a6 100644 --- a/crates/app/ops/src/host/sections.rs +++ b/crates/app/ops/src/host/sections.rs @@ -48,9 +48,10 @@ pub(crate) fn judged_section(view: &ProjectView<'_>, agent: &str) -> String { out } -/// The section a host adds after the body of an agent a context route names (ADR 0356): the route, its subject kind, -/// its sections in order (core marked), its budget, and the CLI line, the MCP tool and the resource that read the pack; -/// nothing for an agent no route names. +/// The section a host adds after the body of an agent a context route names (ADR 0356, ADR 0386): the route, its +/// subject kind, its sections in order (core marked), that the core is served whole and, when it has enrich sections, +/// the allowance they fill and how to read what did not fit, how to read a pack too large for the agent, and the CLI +/// line, the MCP tool and the resource that read the pack; nothing for an agent no route names. pub(crate) fn context_section(view: &ProjectView<'_>, agent: &str) -> String { let Some(route) = view.registries().contexts().of_agent(agent) else { return String::new(); @@ -64,15 +65,36 @@ pub(crate) fn context_section(view: &ProjectView<'_>, agent: &str) -> String { }) .collect(); let order = order.join(", "); + // The core is served whole whatever it costs (ADR 0386 D1): a brief read is how an agent shrinks one too large. + let brief = format!( + "`budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief \ + (`specforge context {} --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then \ + query the entities you need.", + route.name + ); + let fit = if route + .sections + .iter() + .any(|section| section.tier == ContextTier::Enrich) + { + format!( + "Sections, in order: {order}. The core sections are served whole; the others fill up to {} tokens beyond \ + them, in order.\n\n\ + Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a \ + `max_tokens` above its `budget.budget_tokens` when you need it. {brief}\n", + route.budget + ) + } else { + format!( + "Sections, in order: {order}, every one served whole whatever it costs, so no `max_tokens` shrinks it.\n\n\ + Cite the file digests it lists. {brief}\n" + ) + }; format!( "\n## Context\n\nBefore you start, read the context of the `{subject}` you were given: `specforge context {name} \ - ` (MCP: the tool `specforge.context`, or the resource `specforge://context/?role={name}`).\n\n\ - Sections, in order: {order} (as the budget of {budget} tokens allows).\n\n\ - Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger \ - `max_tokens` when you need it.\n", + ` (MCP: the tool `specforge.context`, or the resource `specforge://context/?role={name}`).\n\n{fit}", subject = route.subject, name = route.name, - budget = route.budget, ) } diff --git a/crates/app/ops/src/read/context.rs b/crates/app/ops/src/read/context.rs index 09d7527208..9ffb4491c8 100644 --- a/crates/app/ops/src/read/context.rs +++ b/crates/app/ops/src/read/context.rs @@ -1,11 +1,12 @@ //! A context route served for one entity (ADR 0356): the one function behind `specforge context`, the MCP //! `specforge.context` tool and the `specforge://context/{+entity_id}?role=` resource. Every caller gets the same -//! pack for the same request: the route's sections read from the subject, fitted to the budget in declared order, and -//! a digest over exactly what was served. +//! pack for the same request: the route's sections read from the subject, fitted in declared order (the core whole, +//! then enrich sections within the route's allowance or under the cap the request states), and a digest over exactly +//! what was served. use specforge_common::Sym; use specforge_emitter::EmitterError; -use specforge_emitter::pack; +use specforge_emitter::pack::{self, Budget}; use specforge_project::context; use specforge_registry::{ContextRoute, PlainDisk}; @@ -32,7 +33,8 @@ pub struct ContextRequest<'a> { pub route: &'a str, /// The entity the route is read for. pub subject: &'a str, - /// The token budget; `None`: the route's own. + /// A cap on the whole pack, refused below its core (E062); `None`: the core whole and the route's allowance of + /// enrich sections beyond it. pub max_tokens: Option, /// The format of the pack's `graph` member: one of [`PACK_FORMAT`]. pub format: Format, @@ -63,7 +65,8 @@ pub struct Pack { /// /// Refused: a subject the graph lacks (E003, about the subject); a route no loaded extension declares /// (`unknown_route`, about the route); a subject of another kind than the route's (`route_of_another_kind`, about the -/// subject); a budget below the subject and the core sections (E062, about `max_tokens`). +/// subject); a stated cap below the subject and the core sections (E062, about `max_tokens`). A request that states +/// no cap is never refused for its size. pub fn context( view: &ProjectView, request: &ContextRequest, @@ -82,7 +85,10 @@ pub fn context( ) .about(ContextField::Subject)); } - let budget = request.max_tokens.unwrap_or(route.budget as usize); + let budget = match request.max_tokens { + Some(cap) => Budget::Cap(cap), + None => Budget::Allowance(route.budget as usize), + }; seal(view, route, subject.id.raw, budget, request.format).map_err(failure) } @@ -108,12 +114,12 @@ fn named_route<'v>( }) } -/// The pack of `route` for `subject` at `budget`, fitted and sealed over the project, and the document rendered. +/// The pack of `route` for `subject` under `budget`, fitted and sealed over the project, and the document rendered. fn seal( view: &ProjectView, route: &ContextRoute, subject: Sym, - budget: usize, + budget: Budget, format: Format, ) -> Result { let schema = view.schema(); @@ -135,7 +141,7 @@ fn seal( }) } -/// The emitter's failure as the operation's: a budget too small is invalid input about `max_tokens` with its code +/// The emitter's failure as the operation's: a cap below the core is invalid input about `max_tokens` with its code /// (E062); a serialization failure is internal. fn failure(error: EmitterError) -> Refusal { match (&error, error.code()) { diff --git a/crates/app/ops/src/read/explain.rs b/crates/app/ops/src/read/explain.rs index a66a527301..103604cd8b 100644 --- a/crates/app/ops/src/read/explain.rs +++ b/crates/app/ops/src/read/explain.rs @@ -137,6 +137,7 @@ mod tests { docs: None, machine: false, reported_while: None, + settled_later: false, }) .collect(); book.add(extension, entries).unwrap(); diff --git a/crates/app/ops/tests/operations/context_records.rs b/crates/app/ops/tests/operations/context_records.rs index e202fb544b..99cf3e7f0e 100644 --- a/crates/app/ops/tests/operations/context_records.rs +++ b/crates/app/ops/tests/operations/context_records.rs @@ -1,6 +1,6 @@ -//! `record_context` (ADR 0356 D11): a context route's pack recorded on an entity by the host, over the GSD-shaped -//! executor route that records the plan's `context_pack`: the value and its ledger line, the refusals, and a verdict -//! the record leaves fresh. +//! `record_context` (ADR 0356 D11, ADR 0386): a context route's pack recorded on an entity by the host, over the +//! GSD-shaped executor route that records the plan's `context_pack`: the value (the cap the operation stated, none +//! when it stated none) and its ledger line, the refusals, and a verdict the record leaves fresh. use std::sync::Arc; @@ -8,7 +8,7 @@ use serde_json::{Value, json}; use specforge_ops::authoring::apply::{ HostJudgedRules, JudgedRules, Origin, SystemCalendar, apply_plan_with, }; -use specforge_ops::read::context::{ContextRequest, context}; +use specforge_ops::read::context::{ContextRequest, Pack, context}; use specforge_ops::read::export::Format; use specforge_ops::view::ProjectView; use specforge_project::testing::{ @@ -27,7 +27,6 @@ fn runtime() -> InProcessRuntime { let mut c = gsd_context_builder(); c.context("requirement-pack", |r| { r.subject("requirement") - .budget(2000) .core("requirement", "self") .record("plan.context_pack", "self.requirements") .stale(CONTEXT_STALE); @@ -80,8 +79,8 @@ fn record(entity: &str, route: &str, max_tokens: Option) -> Value { json!([op]) } -/// The digest the executor's pack of the plan has at `max_tokens`. -fn digest(project: &TestProject, max_tokens: Option) -> String { +/// The executor's pack of the plan under the cap `max_tokens` (`None`: its core and the route's allowance). +fn read(project: &TestProject, max_tokens: Option) -> Pack { let compiled = compile(project); let request = ContextRequest { route: "gsd/executor", @@ -91,7 +90,12 @@ fn digest(project: &TestProject, max_tokens: Option) -> String { }; context(&ProjectView::of(&compiled), &request) .unwrap_or_else(|refusal| panic!("context refused: {:?}", refusal.error)) - .digest +} + +/// The cap a pack was fitted to, as it renders it. +fn fitted(pack: &Pack) -> usize { + let document: Value = serde_json::from_str(&pack.text).expect("a pack is JSON"); + document["budget"]["budget_tokens"].as_u64().expect("a cap") as usize } /// The spec file, its runs of spaces one (the formatter aligns a block's values). @@ -103,7 +107,8 @@ fn spec(project: &TestProject) -> String { #[specforge_test(requirement = "FEATURE-012")] fn a_command_of_the_routes_extension_records_its_pack() { let project = gsd_context_project(); - let expected = digest(&project, Some(5000)); + let unrecorded = read(&project, None); + let expected = read(&project, Some(5000)).digest; assert_eq!( apply( &project, @@ -126,10 +131,18 @@ fn a_command_of_the_routes_extension_records_its_pack() { "{ledger}" ); // The record moves no digest of the pack it records, and the project holds it without E083. - assert_eq!(digest(&project, Some(5000)), expected); + assert_eq!(read(&project, Some(5000)).digest, expected); let reported = compile(&project).diagnostics().to_vec(); assert!(!reported.iter().any(|d| d.code == "E083"), "{reported:?}"); - // With no budget, the route's own; a core surface records too. + // With no cap, the core whole and the route's allowance: the cap it was fitted to reads the same pack. + let default = read(&project, None); + assert!(fitted(&default) > 6000, "{}", fitted(&default)); + // A pack shows no record of a pack, as no digest reads one: what it costs does not move when it is recorded. + assert_eq!(default, unrecorded); + assert!(!default.text.contains("context_pack"), "{}", default.text); + assert_eq!(read(&project, Some(fitted(&default))), default); + // A record that states no cap holds none, so it is read again under the route's allowance; a core surface records + // too. assert_eq!( apply( &project, @@ -138,8 +151,9 @@ fn a_command_of_the_routes_extension_records_its_pack() { ), "applied" ); + assert!(!spec(&project).contains("max_tokens"), "{}", spec(&project)); assert!( - spec(&project).contains("max_tokens 6000"), + spec(&project).contains(&format!("digest \"{}\"", default.digest)), "{}", spec(&project) ); diff --git a/crates/app/ops/tests/operations/context_routes.rs b/crates/app/ops/tests/operations/context_routes.rs index 545d59c31f..a6cf3c06a8 100644 --- a/crates/app/ops/tests/operations/context_routes.rs +++ b/crates/app/ops/tests/operations/context_routes.rs @@ -1,5 +1,6 @@ -//! `context`, a context route served for one entity (ADR 0356): the GSD-shaped executor and plan-checker routes over -//! the taskboard twin's plan `v1.0/02/02-01`, a budgeted read, the refusals, and the pack digest. +//! `context`, a context route served for one entity (ADR 0356, ADR 0386): the GSD-shaped executor and plan-checker +//! routes over the taskboard twin's plan `v1.0/02/02-01`, a read under a cap and one within the route's allowance, the +//! refusals, and the pack digest. use std::sync::Arc; @@ -11,7 +12,8 @@ use specforge_ops::read::export::Format; use specforge_ops::view::ProjectView; use specforge_project::testing::{ CODE_CORE, CONTEXT_INSTRUCTIONS, CONTEXT_PLAN, GSD_CONTEXT_SPEC, GSD_JUDGED, TestProject, - gsd_context_project, gsd_context_runtime, gsd_routed_project_over, + gsd_context_builder, gsd_context_project, gsd_context_runtime, gsd_routed_project_over, + gsd_routed_serving, }; use specforge_project::{CompiledProject, SharedRuntime}; use specforge_test_macros::test as specforge_test; @@ -42,6 +44,13 @@ fn document(pack: &Pack) -> Value { serde_json::from_str(&pack.text).expect("a pack is JSON") } +/// The cap a pack was fitted to, as it renders it. +fn fitted(pack: &Pack) -> usize { + document(pack)["budget"]["budget_tokens"] + .as_u64() + .expect("a cap") as usize +} + fn strings(value: &Value) -> Vec { value .as_array() @@ -81,7 +90,8 @@ fn a_route_serves_its_sections_for_a_subject_of_its_kind() { assert_eq!(document["route"], "gsd/executor"); assert_eq!(document["agent"], "gsd-executor"); assert_eq!(document["digest"], served.digest.as_str()); - assert_eq!(document["budget"]["budget_tokens"], 6000); + // Within the route's allowance of 6000, the pack states the cap it was fitted to: its core and the allowance. + assert!(fitted(&served) > 6000, "{}", fitted(&served)); assert_eq!( document["budget"]["truncated_sections"], serde_json::json!([]) @@ -170,6 +180,45 @@ fn a_budgeted_pack_keeps_its_core_and_cuts_in_declared_order() { } } +/// `@gsd/core` with the context routes and `tight`, whose allowance of one token is far below its core: the plan and +/// its body, then its sibling plans to enrich. +fn tight() -> SharedRuntime { + Arc::new(gsd_routed_serving(|| { + let mut c = gsd_context_builder(); + c.context("tight", |r| { + r.subject("plan") + .budget(1) + .core("plan", "self") + .core( + "body", + "self 100, "the core is far past the allowance: {budget}"); + assert_eq!(fitted(&served), core + 1, "{budget}"); + assert_eq!(strings(&budget["truncated_sections"]), ["siblings"]); + let body = strings(§ion(&document, "body").expect("the core is served")["members"]); + assert!(body.contains(&format!("{CONTEXT_PLAN}/T1")), "{body:?}"); + // Read again under the cap it states, it is the same pack; a cap one token below its core is refused. + assert_eq!(pack(&compiled, "gsd/tight", Some(fitted(&served))), served); + let view = ProjectView::of(&compiled); + let refused = context(&view, &request("gsd/tight", CONTEXT_PLAN, Some(core - 1))).unwrap_err(); + assert_eq!(refused.error.code, "E062"); + assert_eq!(refused.subject, Some(ContextField::MaxTokens)); +} + #[specforge_test(requirement = "FEATURE-012")] fn a_route_no_extension_declares_or_of_another_kind_is_refused() { let project = gsd_context_project(); @@ -264,7 +313,8 @@ fn an_agent_a_route_names_gets_a_context_section_and_others_none() { assert!( executor.contains( "Sections, in order: plan (core), body (core), phase (core), requirements (core), context, decisions, \ - instructions, research_items, siblings (as the budget of 6000 tokens allows)." + instructions, research_items, siblings. The core sections are served whole; the others fill up to 6000 \ + tokens beyond them, in order." ), "{executor}" ); @@ -276,5 +326,16 @@ fn an_agent_a_route_names_gets_a_context_section_and_others_none() { .expect("a Judged rules section"); assert!(context < judged, "{checker}"); assert!(checker.contains("gsd/plan-checker"), "{checker}"); + // Every section of the checker's route is core: no allowance to name, nothing to read again; a pack too large is + // read brief, as for every route. + assert!( + checker + .contains(", every one served whole whatever it costs, so no `max_tokens` shrinks it."), + "{checker}" + ); + assert!(!checker.contains("truncated_sections"), "{checker}"); + for body in [&checker, &executor] { + assert!(body.contains(" --format brief`"), "{body}"); + } assert!(!body("gsd-verifier").contains("## Context")); } diff --git a/crates/app/ops/tests/operations/main.rs b/crates/app/ops/tests/operations/main.rs index 677a02c7a7..627d376b04 100644 --- a/crates/app/ops/tests/operations/main.rs +++ b/crates/app/ops/tests/operations/main.rs @@ -126,6 +126,7 @@ mod selection; mod served_slashes; mod settings; mod settings_set; +mod settled_later; mod setup; mod spec_guard; mod spec_guard_patch; diff --git a/crates/app/ops/tests/operations/settled_later.rs b/crates/app/ops/tests/operations/settled_later.rs new file mode 100644 index 0000000000..ff92c76139 --- /dev/null +++ b/crates/app/ops/tests/operations/settled_later.rs @@ -0,0 +1,481 @@ +//! A code a later step of the authoring settles (ADR 0385): a typed edit whose plan creates the finding's subject, or +//! an entity under it, and alters nothing the project held there adds no error by that finding (E080), and the +//! finding is still reported. A write that creates neither (an edit, a delete, a creation elsewhere), one that also +//! deletes, sets, unsets or moves what the subject held, a code that does not declare it, another extension's code, a +//! host error and a migration are counted as before. + +use std::sync::Arc; + +use serde_json::json; +use specforge_extension_sdk::prelude::*; +use specforge_ops::authoring::apply::apply_plan; +use specforge_ops::authoring::edit::{self, Edit, Input, Step}; +use specforge_ops::authoring::migrate::{MigrationInput, judge}; +use specforge_ops::view::ProjectView; +use specforge_project::testing::TestProject; +use specforge_project::{CompiledProject, SharedRuntime}; +use specforge_protocol_types::EditPlan; +use specforge_test_macros::test as specforge_test; +use specforge_wasm::testing::InProcessRuntime; + +use crate::plans::revision; + +const EXT: &str = "@test/later"; +const OTHER: &str = "@test/other"; +/// A question no decision resolves: settled later. +const OPEN: &str = "test.later/E901"; +/// A flagged question: settled by the write that makes it. +const FLAGGED: &str = "test.later/E902"; +/// A requirement of a phase in none of its plans, from its first: settled later. +const SHORT: &str = "test.later/E903"; +/// A note not done: the other extension's own E901, which it does not declare settled later. +const UNDONE: &str = "test.other/E901"; + +/// `@test/later`: questions resolved by decisions; requirements of a phase, which its plans, scoped by it, hold. +fn later() -> ContributionsBuilder { + let mut c = ContributionsBuilder::new(ExtensionMeta::new(EXT, "1.0.0")); + c.code("E901", |d| { + d.title("Open question") + .explanation("Resolve the question with a decision.") + .settled_later(); + }); + c.code("E902", |d| { + d.title("Flagged question").explanation("Unflag it."); + }); + c.code("E903", |d| { + d.title("Requirement in no plan") + .explanation("Plan the rest of the phase.") + .settled_later(); + }); + c.kind("decision", |k| { + k.keyword("decision"); + }); + c.kind("question", |k| { + k.keyword("question") + .field("resolved_by", |f| { + f.field_type(FieldType::Reference).target_kind("decision"); + }) + .field("flag", |f| { + f.field_type(FieldType::Bool); + }); + }); + c.kind("phase", |k| { + k.keyword("phase"); + }); + c.kind("requirement", |k| { + k.keyword("requirement").field("phase", |f| { + f.field_type(FieldType::Reference).target_kind("phase"); + }); + }); + c.kind("plan", |k| { + k.keyword("plan") + .scoped_by("phase") + .field("phase", |f| { + f.field_type(FieldType::Reference).target_kind("phase"); + }) + .field("requirements", |f| { + f.field_type(FieldType::StringList); + }); + }); + c.pass("later", |p| { + p.phase("check").run(findings); + }); + c +} + +fn findings(input: &PassInput) -> Vec { + let of = |kind: &'static str| input.entities.iter().filter(move |e| e.kind == kind); + let field = |e: &PassEntity, name: &str| e.fields.get(name).cloned(); + let mut out = Vec::new(); + for question in of("question") { + if field(question, "resolved_by").is_none() { + out.push( + PassDiagnostic::new("E901", PassSeverity::Error, "the question is open") + .with_entity(&question.id), + ); + } + if field(question, "flag").as_deref() == Some("true") { + out.push( + PassDiagnostic::new("E902", PassSeverity::Error, "the question is flagged") + .with_entity(&question.id), + ); + } + } + for phase in of("phase") { + let plans: Vec<&PassEntity> = of("plan") + .filter(|plan| { + plan.id + .rsplit_once('/') + .is_some_and(|(scope, _)| scope == phase.id) + }) + .collect(); + if plans.is_empty() { + continue; + } + let held: Vec = plans + .iter() + .filter_map(|plan| field(plan, "requirements")) + .flat_map(|list| list.split(", ").map(String::from).collect::>()) + .collect(); + for requirement in of("requirement") { + if field(requirement, "phase").as_deref() == Some(phase.id.as_str()) + && !held.contains(&requirement.id) + { + let message = format!("requirement {} is in no plan", requirement.id); + out.push( + PassDiagnostic::new("E903", PassSeverity::Error, message) + .with_entity(&phase.id), + ); + } + } + } + out +} + +/// `@test/other`: notes, each not done one reported under its own `E901`, which is not settled later. +fn other() -> ContributionsBuilder { + let mut c = ContributionsBuilder::new(ExtensionMeta::new(OTHER, "1.0.0")); + c.code("E901", |d| { + d.title("Note not done").explanation("Do it."); + }); + c.kind("note", |k| { + k.keyword("note").field("done", |f| { + f.field_type(FieldType::Bool); + }); + }); + c.pass("notes", |p| { + p.phase("check").run(|input: &PassInput| { + input + .entities + .iter() + .filter(|e| { + e.kind == "note" && e.fields.get("done").map(String::as_str) != Some("true") + }) + .map(|e| { + PassDiagnostic::new("E901", PassSeverity::Error, "the note is not done") + .with_entity(&e.id) + }) + .collect::>() + }); + }); + c +} + +fn runtime() -> SharedRuntime { + Arc::new(InProcessRuntime::new().with(later).with(other)) +} + +fn project(spec: &str) -> TestProject { + TestProject::new() + .config(|c| c["name"] = "p".into()) + .enabling(&[EXT, OTHER]) + .installing_enabled() + .file("a.spec", spec) +} + +/// The codes of the extensions' findings `project` reports. +fn reported(project: &CompiledProject) -> Vec { + let mut found: Vec = project.diagnostics().into_iter().map(|d| d.code).collect(); + found.retain(|c| c.starts_with("test.")); + found +} + +/// `steps` planned over `spec`'s project: the codes of the findings the write would report (`Ok`), or of the errors +/// E080 refuses it with (`Err`). +fn planned(spec: &str, steps: &[Step]) -> Result, Vec> { + let compiled = project(spec).compile_in(runtime()); + match edit::plan_steps(&ProjectView::of(&compiled), steps, false) { + Ok(plan) => Ok(plan + .report() + .added + .0 + .iter() + .map(|d| d.code.clone()) + .collect()), + Err(refusal) => { + assert_eq!( + refusal.error.code.to_string(), + "E080", + "{}", + refusal.error.message + ); + // E080's message lists each added error, ` error[]: `. + let codes = refusal.error.message.lines().filter_map(|line| { + let rest = line.trim_start().strip_prefix("error[")?; + Some(rest.split_once(']')?.0.to_string()) + }); + Err(codes.collect()) + } + } +} + +fn create(kind: &str, id: &str, fields: &[(&str, &str)]) -> Step { + Step::Edit(Edit::Create { + kind: kind.into(), + id: id.into(), + title: id.into(), + file: "a.spec".into(), + fields: fields + .iter() + .map(|(f, v)| (f.to_string(), Input::One((*v).into()))) + .collect(), + verify: Vec::new(), + }) +} + +/// A plan of the phase `PH` holding `requirements`. +fn plan(id: &str, requirements: &[&str]) -> Step { + Step::Edit(Edit::Create { + kind: "plan".into(), + id: id.into(), + title: id.into(), + file: "a.spec".into(), + fields: [ + ("phase".to_string(), Input::One("PH".into())), + ("requirements".to_string(), crate::edit::many(requirements)), + ] + .into(), + verify: Vec::new(), + }) +} + +fn delete(id: &str) -> Step { + Step::Edit(Edit::Delete { + entity_id: id.into(), + unlink_references: false, + }) +} + +const DECISION: &str = "decision D1 \"D1\" {}\n"; +/// A phase and its two requirements, no plan yet. +const PHASE: &str = "phase PH \"PH\" {}\n\nrequirement R1 \"R1\" {\n phase PH\n}\n\nrequirement R2 \"R2\" {\n phase PH\n}\n"; +/// The phase planned: each requirement in one plan. +const PLANS: &str = "plan P1 \"P1\" {\n phase PH\n requirements [\"R1\"]\n}\n\nplan P2 \"P2\" {\n phase PH\n requirements [\"R2\"]\n}\n"; + +fn planned_phase() -> String { + format!("{PHASE}\n{PLANS}") +} + +#[specforge_test(requirement = "FEATURE-131")] +fn a_finding_on_an_entity_the_write_creates_adds_no_error() { + // The write lists the finding it leaves. + assert_eq!( + planned(DECISION, &[create("question", "Q1", &[])]), + Ok(vec![OPEN.to_string()]) + ); + // Created, then renamed in the same write: the plan creates it at its new id. + let rename = Step::Rename { + entity: "Q2".into(), + to: "Q3".into(), + }; + assert_eq!( + planned(DECISION, &[create("question", "Q2", &[]), rename]), + Ok(vec![OPEN.to_string()]) + ); + // Written, `check` reports it; the later step that answers the question settles it. + let p = project(DECISION); + let compiled = p.compile_in(runtime()); + let Step::Edit(question) = create("question", "Q1", &[]) else { + unreachable!() + }; + edit::run( + &ProjectView::of(&compiled), + &[question], + false, + &specforge_ops::authoring::apply::testing::origin(), + specforge_ops::testing::caller(), + ) + .expect("written"); + let written = p.compile_in(runtime()); + assert_eq!(reported(&written), [OPEN]); + edit::run( + &ProjectView::of(&written), + &[crate::edit::set( + "Q1", + "resolved_by", + Input::One("D1".into()), + )], + false, + &specforge_ops::authoring::apply::testing::origin(), + specforge_ops::testing::caller(), + ) + .expect("answered"); + assert_eq!(reported(&p.compile_in(runtime())), Vec::::new()); +} + +#[specforge_test(requirement = "FEATURE-131")] +fn a_finding_on_an_entity_the_write_creates_something_under_adds_no_error() { + // The phase's first plan: the finding is on the phase, the plan the write creates is under it. + assert_eq!( + planned(PHASE, &[plan("P1", &["R1"])]), + Ok(vec![SHORT.to_string()]) + ); + // A later edit of the plan the write creates alters nothing the project held. + let retarget = Step::Edit(crate::edit::set( + "PH/P1", + "requirements", + crate::edit::many(&["R2"]), + )); + assert_eq!( + planned(PHASE, &[plan("P1", &["R1"]), retarget]), + Ok(vec![SHORT.to_string()]) + ); +} + +#[specforge_test(requirement = "FEATURE-131")] +fn a_write_that_creates_nothing_there_still_adds_the_finding() { + // Unsetting the decision that resolves an existing question. + let resolved = format!("{DECISION}\nquestion Q1 \"Q1\" {{\n resolved_by D1\n}}\n"); + let unset = Step::Edit(Edit::Unset { + entity_id: "Q1".into(), + field: "resolved_by".into(), + }); + assert_eq!(planned(&resolved, &[unset]), Err(vec![OPEN.to_string()])); + // Deleting the one plan that holds a requirement. + assert_eq!( + planned(&planned_phase(), &[delete("PH/P2")]), + Err(vec![SHORT.to_string()]) + ); + // Creating elsewhere in the same write: the question's own finding is excused, the phase's is not. + assert_eq!( + planned( + &planned_phase(), + &[delete("PH/P2"), create("question", "Q9", &[])] + ), + Err(vec![SHORT.to_string()]) + ); +} + +#[specforge_test(requirement = "FEATURE-131")] +fn a_write_that_also_alters_what_the_subject_held_still_adds_the_finding() { + let refused = || Err(vec![SHORT.to_string()]); + // Deleting the plan that holds R2 and creating another under the phase: the creation does not excuse the delete. + assert_eq!( + planned(&planned_phase(), &[delete("PH/P2"), plan("P3", &["R1"])]), + refused() + ); + // Setting a held plan's requirements away from R1, or unsetting them, beside a plan created under the phase. + let away = Step::Edit(crate::edit::set( + "PH/P1", + "requirements", + crate::edit::many(&["R9"]), + )); + assert_eq!( + planned(&planned_phase(), &[away, plan("P3", &["R2"])]), + refused() + ); + let unset = Step::Edit(crate::edit::unset("PH/P1", "requirements")); + assert_eq!( + planned(&planned_phase(), &[unset, plan("P3", &["R2"])]), + refused() + ); + // Moving the plan that holds R2 to another phase (its scope field), beside a plan created under this one. + let other = format!("{}\nphase PO \"PO\" {{}}\n", planned_phase()); + let away = Step::Edit(crate::edit::set("PH/P2", "phase", Input::One("PO".into()))); + assert_eq!(planned(&other, &[away, plan("P3", &["R1"])]), refused()); +} + +#[specforge_test(requirement = "FEATURE-131")] +fn only_the_owners_settled_later_code_is_exempt() { + // A code that does not declare it, on the entity the write creates. + assert_eq!( + planned( + DECISION, + &[create( + "question", + "Q1", + &[("resolved_by", "D1"), ("flag", "true")] + )] + ), + Err(vec![FLAGGED.to_string()]) + ); + // Another extension's code, of the same local number, which it does not declare settled later. + assert_eq!( + planned(DECISION, &[create("note", "N1", &[])]), + Err(vec![UNDONE.to_string()]) + ); + // A host error on the entity the write creates: no extension's code. + let host = planned( + DECISION, + &[create("question", "Q1", &[("resolved_by", "nowhere")])], + ) + .expect_err("refused"); + assert!( + !host.is_empty() && host.iter().all(|code| !code.contains('/')), + "{host:?}" + ); +} + +/// `ops` planned over `spec`'s project at its revision, another writer landing `z.spec` (`landed`) after the compile: +/// the plan is judged again over the disk, under the lock. The project's diagnostics once written, or the refusal. +fn applied_after(spec: &str, ops: serde_json::Value, landed: &str) -> Result, String> { + let p = project(spec); + let compiled = p.compile_in(runtime()); + let at = revision(&p, "a.spec"); + let mut ops = ops; + for op in ops.as_array_mut().unwrap() { + op["revision"] = at.clone().into(); + } + let plan: EditPlan = serde_json::from_value(json!({ "ops": ops })).unwrap(); + p.write("z.spec", landed); + let edited = apply_plan( + &ProjectView::of(&compiled), + &plan, + &specforge_ops::authoring::apply::testing::origin(), + false, + specforge_ops::testing::caller(), + ) + .map_err(|refusal| { + assert_eq!(refusal.error.code.to_string(), "E080"); + refusal.error.message + })?; + assert!(!edited.wrote.previewed()); + Ok(reported(&p.compile_in(runtime()))) +} + +#[specforge_test(requirement = "FEATURE-131")] +fn the_re_judge_under_the_lock_exempts_it_too() { + let question = + json!([{"op": "create", "kind": "question", "id": "Q1", "title": "Q1", "file": "a.spec"}]); + assert_eq!( + applied_after(DECISION, question, "decision DZ \"DZ\" {}\n"), + Ok(vec![OPEN.to_string()]) + ); +} + +/// The write deletes a plan that holds only what another plan holds too, and creates a third: nothing it is judged +/// over when planned reports a finding. The other writer's requirement R3, which only the deleted plan held, lands +/// before the lock: only the re-judge sees R3 in no plan, and it counts it, since the write deleted a plan of the phase. +#[specforge_test(requirement = "FEATURE-131")] +fn the_re_judge_under_the_lock_counts_it_when_the_write_altered_the_subject() { + let spec = "phase PH \"PH\" {}\n\nrequirement R1 \"R1\" {\n phase PH\n}\n\nplan P1 \"P1\" {\n phase PH\n \ + requirements [\"R1\"]\n}\n\nplan P2 \"P2\" {\n phase PH\n requirements [\"R1\", \"R3\"]\n}\n"; + let ops = json!([ + {"op": "delete", "entity": "PH/P2"}, + {"op": "create", "kind": "plan", "id": "P3", "title": "P3", "file": "a.spec", + "fields": {"phase": "PH", "requirements": ["R1"]}}, + ]); + // Planned over the disk as compiled, the write is clean: it is refused under the lock alone. + assert_eq!( + planned(spec, &[delete("PH/P2"), plan("P3", &["R1"])]), + Ok(Vec::new()) + ); + let refused = applied_after(spec, ops, "requirement R3 \"R3\" {\n phase PH\n}\n") + .expect_err("refused under the lock"); + assert!(refused.contains(&format!("error[{SHORT}]")), "{refused}"); +} + +#[specforge_test(requirement = "FEATURE-122")] +fn a_migration_counts_it() { + let pre = project(DECISION).compile_in(runtime()); + let text = format!("{DECISION}\nquestion Q1 \"Q1\" {{}}\n"); + let planned = std::collections::BTreeMap::from([("a.spec".to_string(), text)]); + let input = MigrationInput { + from: "0.9".into(), + to: "1.0".into(), + files: vec![], + }; + let verdict = judge(&pre, &planned, &input); + assert!(verdict.compared); + assert_eq!(verdict.added_errors, 1, "{:?}", verdict.post_diagnostics); +} diff --git a/crates/kernel/common/tests/titled_list.rs b/crates/kernel/common/tests/titled_list.rs index e978c10e8d..1ae0bef642 100644 --- a/crates/kernel/common/tests/titled_list.rs +++ b/crates/kernel/common/tests/titled_list.rs @@ -15,6 +15,7 @@ fn a_list_and_a_document_title_a_code_from_the_code_book_they_were_built_with() docs: None, machine: false, reported_while: None, + settled_later: false, }], ) .unwrap(); diff --git a/crates/leaf/diagnostics/src/catalog.rs b/crates/leaf/diagnostics/src/catalog.rs index d0bc7ed135..0513c4b2ca 100644 --- a/crates/leaf/diagnostics/src/catalog.rs +++ b/crates/leaf/diagnostics/src/catalog.rs @@ -153,8 +153,8 @@ catalog! { "Field value is not the declared type", "The extension that registers a field declares its type, and the value given can't be that type. A string field takes text, a bare word, a date, a type union or an `expr { }` group; an enum one of its declared values (the suggestion names the closest one; the closed vocabularies the builtins declare, a feature's `status`, a failure mode's `severity`, a property's `property_type`, and the like, are enum fields); an integer field an integer, an integer difference like `2-1` or a date (the message names the operand that is no number, and a fraction is a number field's); a number field one decimal, `0.75`, `-0.25`, `1.5e3` (at most 15 significant digits, within the range a binary64 holds, ADR 0361); a bool field true or false; a date field one calendar day, `YYYY-MM-DD`, that exists (`2026-02-30` is none); a reference field one name, a number or a date written as one (`10`, `2026-10-26`) included, never one starting with `-`; a string_list, reference_list or enum_list field a list (an enum_list's words are each one of its declared values and appear once); a block field a block, whose members, when it declares them, are each read by their own type, and a block_list field a list of blocks, `[ { a 1 } { a 2 } ]`; a reference field with `target_kinds` names an entity of any of the listed kinds; an integer or number field with a `minimum` or `maximum` a value inside them. Values that can be read as the declared type are converted without a diagnostic: a single string, id, integer, boolean or date on a list field becomes a one-item list, a list is stored as written, a quoted integer, decimal, boolean or calendar day the number, boolean or date. Fix the value, or check the field's type with `specforge schema --kind `."; E062: Error core, - "Token budget too small for the export", - "`specforge export --max-tokens` (or the MCP `export` tool's `max_tokens`) keeps the most central entities that fit the budget, but some of the export never shrinks: the envelope (`format_version`, `schema_version`), the `token_budget` block listing the dropped entity IDs, and, with `--with-schema`, the embedded schema, which is never cut short, and, in a scoped export (`--scope`), the scope's own entity. The budget is below that fixed part, so no export fits. Raise the budget, or drop `--with-schema` when the schema alone is over it."; + "Token budget too small for the export or the context pack", + "`specforge export --max-tokens` (or the MCP `export` tool's `max_tokens`) keeps the most central entities that fit the budget, but some of the export never shrinks: the envelope (`format_version`, `schema_version`), the `token_budget` block listing the dropped entity IDs, and, with `--with-schema`, the embedded schema, which is never cut short, and, in a scoped export (`--scope`), the scope's own entity. The budget is below that fixed part, so no export fits. Raise the budget, or drop `--with-schema` when the schema alone is over it. A context pack (`specforge context`, the MCP `specforge.context` tool or the `role` of `specforge://context/{+entity_id}`, an edit plan's `record_context`) always serves its subject and its route's core sections whole, and a read that states no cap fills the route's allowance of enrich sections beyond them, so it is never refused for its size. Only a cap the read states (`--max-tokens`, `max_tokens`) below that core is E062, naming the route: raise the cap, or state none (ADR 0386)."; E063: Error core, "No registry configured", "`specforge add @scope/name@version`, `update`, `extensions search`, `publish` and `login` (and the MCP `add_extension` tool) talk to an extension registry, and SpecForge has no built-in one: the only registries are those the project's `specforge.json` lists. None is listed, so the command stopped before making any network call. Add a `registries` array, for example `\"registries\": [{\"alias\": \"main\", \"url\": \"\", \"default_registry\": true}]`; an entry with `\"scope_filter\": \"@acme\"` serves only that scope, and the entry marked `default_registry` serves the rest. For `login`, `--registry ` must name one of the entries, or one must be the default. Builtin extensions (`specforge add @specforge/product`) and local `.wasm` files need no registry."; @@ -205,7 +205,7 @@ catalog! { "An entity writes a field its kind does not declare, and that field is the other side of a relation a reference field owns, its own kind's included. A relation is written on its owning field only (ADR 0150): the one reference field an extension declares for it. The other side is derived, never written: `query` shows it as the incoming edges and `trace` as the upstream. The field is recognised in two ways: a reference field whose targets hold this kind names it in its `inverse_of`, a self-relation's and a union's included (so a documented reverse such as `behaviors` on a feature, or `superseded_by` on a decision, is refused even when its ids do not resolve), or every id it lists is one other kind's entity and that kind owns a single-kind reference field into this one (`journeys [..]` on a feature). By its values alone a self-relation's or a union's other side is not recognised, and a kind that accepts any field is not checked. The graph still carries the field's untyped edge, and `check` fails. Remove the field and write the owning field on each entity it listed; the suggestion names both."; E080: Error core, "Typed edit would add errors", - "A typed edit (`specforge new`, `set`, `unset`, `link`, `unlink`, `delete`, or MCP `specforge.edit`) was planned, and the project it would leave reports errors the project does not report now (the same error by code, severity, message shape, file and, for an extension's finding, its subject): the edit is refused and nothing is written. The refusal lists each new error (an unresolved reference, a missing required field, a value its field does not take, …). Fix what they name first: create the referenced entity, give the required field, or make both changes in one `specforge.edit` call. `delete --unlink-references` removes the references a delete would leave dangling. A judged rule's finding (no verdict, a stale or a failing verdict) is never one of them: its judge settles it, not the edit (ADR 0297). Nor is an extension's finding whose code waits for an owner state (`reported_while`) and that the edit revealed by moving its entity into that state: the edit is accepted and the finding is reported once it is written (ADR 0363). A writing collector's plan is compared with the project as its collect left it, and is refused for host errors only: an extension's error refuses no collected fact (ADR 0303)."; + "A typed edit (`specforge new`, `set`, `unset`, `link`, `unlink`, `delete`, or MCP `specforge.edit`) was planned, and the project it would leave reports errors the project does not report now (the same error by code, severity, message shape, file and, for an extension's finding, its subject): the edit is refused and nothing is written. The refusal lists each new error (an unresolved reference, a missing required field, a value its field does not take, …). Fix what they name first: create the referenced entity, give the required field, or make both changes in one `specforge.edit` call. `delete --unlink-references` removes the references a delete would leave dangling. A judged rule's finding (no verdict, a stale or a failing verdict) is never one of them: its judge settles it, not the edit (ADR 0297). Nor is an extension's finding whose code waits for an owner state (`reported_while`) and that the edit revealed by moving its entity into that state: the edit is accepted and the finding is reported once it is written (ADR 0363). Nor is an extension's finding whose code a later step of the authoring settles (`settled_later`) on an entity the edit creates, or creates something under, when the edit alters nothing the project held there: the edit is accepted, lists the finding, and `check` reports it until that step is written; an edit that creates neither, one that also sets, unsets, links, unlinks, deletes or moves at or under that entity, and a migration still count it (ADR 0385). A writing collector's plan is compared with the project as its collect left it, and is refused for host errors only: an extension's error refuses no collected fact (ADR 0303)."; E081: Error core, "Field written twice in one block", "A block writes one field (an entry of a block field, a member of a type) more than once. A field holds one value: the graph keeps the first and every output, check and rule reads it; the message names the first's line. Delete the later line, or give every value in the first: a list field takes all its items in one list (`ports [a, b]`), a block field all its entries in one block. A typed edit that changes the field (`set`, `unset`, `link`, `unlink`) removes the later lines itself. A repeat in a `defaults` block is E078."; @@ -268,7 +268,7 @@ catalog! { "A field value writes a reference holding `:` without its quotes (`notes [js:p1]`, `proof run:js:a.test.js#adds`), whatever its scheme (ADR 0346 D6). The grammar reads `js` and fails on the rest, so the reference is one E120 spanning the whole `word:rest`, and no word of it is kept in the value: nothing links as `js`. The file still counts as unparsed and cannot be rewritten until it is fixed. Write it quoted: `notes [\"js:p1\"]`. A provider ref in a list (`[jira.issue:PROJ-1]`, `scheme.kind:id`) is read as one and is not this."; E123: Error core, "Context route cannot be served", - "An extension declares a context route (`contexts`, protocol 2.1, ADR 0356) the host cannot serve: its name is not kebab case, repeats one of its extension's, or its qualified name (`/`) is an earlier extension's; its budget is 0; it has no core section; a section's name is not a word, repeats one, or is `settings`; a section's selector does not parse, its `file(\"…\")` path leaves the project, holds a glob or names a `.spec` source, or it does not type-check from the subject kind (a kind or field it names is not loaded or declared, or it crosses a field that is not a reference or that is computed or written by a verdict: such a reference makes no edge); its subject kind is not loaded; or a setting it names is not a setting of its extension (a secret is not one). The message names the extension, the route, the section and why. The route is not registered: `specforge context` and `specforge.context` refuse it as unknown, and its agent gets no Context section. A subject kind of an optional peer the project does not load drops the route without a diagnostic, and a section that reaches one is skipped and listed in the pack. Fix the route's declaration in the extension."; + "An extension declares a context route (`contexts`, protocol 2.1, ADR 0356) the host cannot serve: its name is not kebab case, repeats one of its extension's, or its qualified name (`/`) is an earlier extension's; it has an enrich section and its budget (the allowance enrich sections fill beyond the core, ADR 0386) is 0, or it has none and its budget is not 0; it has no core section; a section's name is not a word, repeats one, or is `settings`; a section's selector does not parse, its `file(\"…\")` path leaves the project, holds a glob or names a `.spec` source, or it does not type-check from the subject kind (a kind or field it names is not loaded or declared, or it crosses a field that is not a reference or that is computed or written by a verdict: such a reference makes no edge); its subject kind is not loaded; or a setting it names is not a setting of its extension (a secret is not one). The message names the extension, the route, the section and why. The route is not registered: `specforge context` and `specforge.context` refuse it as unknown, and its agent gets no Context section. A subject kind of an optional peer the project does not load drops the route without a diagnostic, and a section that reaches one is skipped and listed in the pack. Fix the route's declaration in the extension."; E124: Error core, "Context route's agent cannot be bound", "A context route (ADR 0356) names an `agent` its extension does not declare, or one an earlier context route (in load order) already binds. The message names the extension, the route and the agent. The route stays registered and serves on the CLI and MCP, but the binding is dropped: the agent's body carries no Context section for it. An agent reads one route, written by its own extension. Name an agent of the route's extension that no other context route names, or leave `agent` out."; diff --git a/crates/leaf/diagnostics/src/codebook.rs b/crates/leaf/diagnostics/src/codebook.rs index 9ef3d8efcb..7ffeed9dcd 100644 --- a/crates/leaf/diagnostics/src/codebook.rs +++ b/crates/leaf/diagnostics/src/codebook.rs @@ -22,6 +22,8 @@ pub struct ExtensionCode { /// The owner state a finding of it speaks in, `complete` or `pending` (`CodeDescriptor.reported_while`, ADR /// 0363), as the registry admitted it; `None` in either state. pub reported_while: Option, + /// A later step of the authoring settles a finding of it (`CodeDescriptor.settled_later`, ADR 0385). + pub settled_later: bool, } /// Two loaded extensions share one code namespace. @@ -184,6 +186,16 @@ impl Codebook { .is_some_and(|entry| entry.machine) } + /// Whether a later step of the authoring settles a finding of `code` that `extension` reports (ADR 0385): its own + /// catalog entry declares it. E080 then excuses the finding on a write that creates its subject, or under it, and + /// alters nothing held there. A first-party extension declares no `codes`, and another extension's entry is not + /// its own, so neither has one. + pub fn settled_later(&self, extension: &str, code: &str) -> bool { + self.owned_by(extension) + .and_then(|owned| owned.codes.get(&code.to_uppercase())) + .is_some_and(|entry| entry.settled_later) + } + /// Whether a finding of `code` that `extension` reports speaks on an entity whose owner is `pending` (ADR 0363): /// always, unless the extension's own catalog entry names the owner state its findings wait for, then only in /// that state. A first-party extension's code waits for none. @@ -291,6 +303,7 @@ mod tests { docs: None, machine: false, reported_while: None, + settled_later: false, }) .collect(); book.add(extension, entries).unwrap(); @@ -448,6 +461,7 @@ mod tests { docs: None, machine: true, reported_while: None, + settled_later: false, }], ) .unwrap(); @@ -474,6 +488,7 @@ mod tests { docs: None, machine: false, reported_while: Some(state.into()), + settled_later: false, }; book.add( "@acme/links", @@ -494,6 +509,35 @@ mod tests { ); } + #[test] + fn settled_later_reads_the_owners_own_entry() { + let mut book = book("@acme/plans", &["W900"]); + book.add( + "@acme/plans", + vec![ExtensionCode { + local: "E901".into(), + title: "t".into(), + explanation: "e".into(), + docs: None, + machine: false, + reported_while: None, + settled_later: true, + }], + ) + .unwrap(); + assert!(book.settled_later("@acme/plans", "e901"), "its own entry"); + assert!(!book.settled_later("@acme/plans", "W900"), "not declared"); + assert!(!book.settled_later("@acme/plans", "E902"), "not catalogued"); + assert!( + !book.settled_later("@acme/other", "E901"), + "not the owner of the namespace" + ); + assert!( + !book.settled_later("@specforge/checks", "I206"), + "a first-party extension declares none" + ); + } + #[test] fn a_first_party_extension_owns_only_the_static_catalogs_codes_it_is_owner_of() { let book = Codebook::default(); diff --git a/crates/leaf/diagnostics/src/tests/namespace.rs b/crates/leaf/diagnostics/src/tests/namespace.rs index 2b8869ba0f..6190e0cd13 100644 --- a/crates/leaf/diagnostics/src/tests/namespace.rs +++ b/crates/leaf/diagnostics/src/tests/namespace.rs @@ -60,6 +60,7 @@ fn code(local: &str) -> ExtensionCode { docs: Some("https://gsd.dev/codes#w304".into()), machine: false, reported_while: None, + settled_later: false, } } diff --git a/crates/leaf/protocol-types/src/calls.rs b/crates/leaf/protocol-types/src/calls.rs index 5142607aab..a707e50b7f 100644 --- a/crates/leaf/protocol-types/src/calls.rs +++ b/crates/leaf/protocol-types/src/calls.rs @@ -379,12 +379,16 @@ pub struct PassInput { pub delta: Option, } -/// One entity in the snapshot handed to a compiler pass: its id, kind, +/// One entity in the snapshot handed to a compiler pass: its id, kind, title, /// field texts, edge counts and span, and how the coverage rule sees it. #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct PassEntity { pub id: String, pub kind: String, + /// The title its header writes, as a command's `GraphNode::title` holds it (protocol 2.3.0, ADR 0387); absent for + /// a fact written without one. + #[serde(default, skip_serializing_if = "Option::is_none")] + pub title: Option, /// Every field the entity writes, by name, as its field text (ADR 0019, /// protocol 1.1.0): scalars as written; lists of strings or references /// and mixed lists joined by `", "`; variant lists and type unions by diff --git a/crates/leaf/protocol-types/src/code_catalog.rs b/crates/leaf/protocol-types/src/code_catalog.rs index 46cbcacfe2..75d14914f8 100644 --- a/crates/leaf/protocol-types/src/code_catalog.rs +++ b/crates/leaf/protocol-types/src/code_catalog.rs @@ -5,8 +5,8 @@ use serde::{Deserialize, Serialize}; /// One diagnostic code an extension reports: its local code (`E101`, never /// qualified; the host adds the namespace), a title, what it means and how -/// to fix it, an optional absolute `http(s)` documentation URL, whether this machine decides it (2.0.0), and the owner -/// state its findings wait for (2.2.0). +/// to fix it, an optional absolute `http(s)` documentation URL, whether this machine decides it (2.0.0), the owner +/// state its findings wait for (2.2.0), and whether a later step of the authoring settles its findings (2.3.0). #[derive(Debug, Clone, Default, Serialize, Deserialize, PartialEq, Eq)] pub struct CodeDescriptor { pub code: String, @@ -26,4 +26,10 @@ pub struct CodeDescriptor { /// (E080). Absent: in either state. #[serde(default, skip_serializing_if = "Option::is_none")] pub reported_while: Option, + /// A finding of this code names a state a later step of the authoring settles (2.3.0, ADR 0385): a typed edit + /// whose plan creates the finding's subject, or an entity under it, and alters nothing held there adds no error by + /// it (E080), so a workflow may create the entity before the step that settles it. Its severity does not change: + /// `check`, `--strict` and every gate read it. Serialized only when set. + #[serde(default, skip_serializing_if = "std::ops::Not::not")] + pub settled_later: bool, } diff --git a/crates/leaf/protocol-types/src/context.rs b/crates/leaf/protocol-types/src/context.rs index 5a4adf5661..87932fd7ff 100644 --- a/crates/leaf/protocol-types/src/context.rs +++ b/crates/leaf/protocol-types/src/context.rs @@ -1,5 +1,6 @@ //! The context routes an extension declares (protocol 2.1.0, ADR 0356): for one entity of a subject kind, the ordered -//! sections a role reads, each a named selector, cut to a token budget in declared order. +//! sections a role reads, each a named selector: the core whole, the enrich sections in declared order within the +//! route's allowance (ADR 0386). use serde::{Deserialize, Serialize}; @@ -19,9 +20,11 @@ pub struct ContextDescriptor { /// The extension's own agent that reads it: the host appends a Context section to its body. #[serde(default, skip_serializing_if = "Option::is_none")] pub agent: Option, - /// The token budget a read takes when it names none; positive. + /// The enrich allowance: the tokens of enrich sections a read that states no cap serves beyond its floor (the + /// subject and the core sections, served whole whatever they cost). Positive for a route with an enrich section, + /// 0 for a route of core sections only. pub budget: u32, - /// The sections, in the order a budget serves them. + /// The sections, in the order they are served. pub sections: Vec, /// Settings of the extension's own whose values the pack carries. #[serde(default, skip_serializing_if = "Vec::is_empty")] @@ -59,14 +62,14 @@ pub struct ContextSectionDescriptor { pub tier: ContextTier, } -/// Whether a budget may cut a section. +/// Whether a section is the floor of a pack or fills what is left. #[derive(Debug, Clone, Copy, Default, Serialize, Deserialize, PartialEq, Eq)] #[serde(rename_all = "lowercase")] pub enum ContextTier { - /// Never cut: a budget below the core sections is refused. + /// Never cut: served whole; a stated cap below the core sections is refused. #[default] Core, - /// Served whole while it fits, in declared order. + /// Served whole while it fits the allowance or the stated cap, in declared order. Enrich, } diff --git a/crates/leaf/protocol-types/src/plan.rs b/crates/leaf/protocol-types/src/plan.rs index 62897a1dca..7fc4fe69bb 100644 --- a/crates/leaf/protocol-types/src/plan.rs +++ b/crates/leaf/protocol-types/src/plan.rs @@ -148,8 +148,10 @@ pub enum PlanOp { basis: BTreeMap, }, /// Record a context route's pack on `entity` (ADR 0356 D11): the host derives the subject by the route's record of - /// the entity's kind, computes the pack at `max_tokens` (absent: the route's budget) and writes the route, the - /// digest and the budget with its ledger line. It has no file revision: the host computes what it writes. + /// the entity's kind, computes the pack under the cap `max_tokens` (absent: the core whole and the route's + /// allowance) and writes the route, the digest and the stated cap, when there is one, with its ledger line; the + /// record is read again under the same budget (ADR 0386 D6). It has no file revision: the host computes what it + /// writes. RecordContext { entity: String, route: String, diff --git a/crates/leaf/protocol-types/src/version.rs b/crates/leaf/protocol-types/src/version.rs index fa7deb08dd..9e9cedc24e 100644 --- a/crates/leaf/protocol-types/src/version.rs +++ b/crates/leaf/protocol-types/src/version.rs @@ -79,6 +79,11 @@ /// its content digests before and after, an added node its digest after, a removed node only its kind and id. The /// edges added and removed are those with an end of a named kind. The full content stays in `entities`; a pass /// that declares no `delta` input is sent no `delta`. +/// - a `codes` entry may declare `settled_later` (ADR 0385): a typed edit whose plan creates a finding's subject, or +/// an entity under it, and alters nothing held there adds no error by a finding of that code (E080); its severity +/// does not change. +/// - a pass entity carries `title` ([`PassEntity::title`](crate::PassEntity::title), ADR 0387), the title its header +/// writes, as a command's graph node does; absent for a fact written without one. /// /// A 2.2.0 guest still loads; a 2.3.0 guest is refused by a 2.2 host (E088, newer). /// diff --git a/crates/leaf/protocol-types/tests/calls_roundtrip.rs b/crates/leaf/protocol-types/tests/calls_roundtrip.rs index 6606d3661a..eb2831b471 100644 --- a/crates/leaf/protocol-types/tests/calls_roundtrip.rs +++ b/crates/leaf/protocol-types/tests/calls_roundtrip.rs @@ -331,6 +331,29 @@ fn a_pass_entity_carries_pending_and_its_unheld_spans_and_omits_them_when_absent ); } +/// A pass entity carries the title its header writes (protocol 2.3.0, ADR 0387); a fact written without one, as a +/// collector may send it, has no `title` key on the wire, never a `null`, and decodes as `None`. +#[test] +fn a_pass_entity_carries_its_title_and_a_fact_without_one_none() { + use specforge_protocol_types::PassEntity; + + let titled = json!({ + "id": "v1.0/03", "kind": "phase", "title": "Graph protocol", "fields": {}, "incoming_edge_count": 0, + "outgoing_edge_count": 0, "testable": false, "owes_none": false, "verify_kinds": [], "verify_texts": [] + }); + let entity: PassEntity = round_trips(&titled); + assert_eq!(entity.title.as_deref(), Some("Graph protocol")); + + let fact = json!({ + "id": "rust:core::lib", "kind": "item", "fields": {"name": "lib"}, "incoming_edge_count": 1, + "outgoing_edge_count": 0, "testable": false, "owes_none": true, "verify_kinds": [], "verify_texts": [] + }); + let entity: PassEntity = round_trips(&fact); + assert_eq!(entity.title, None); + let wire = serde_json::to_value(&entity).unwrap(); + assert!(wire.get("title").is_none(), "{wire}"); +} + /// A fact store's kinds by scheme and an unheld reference's collected kinds (ADR 0347 D9), each omitted when empty. #[test] fn a_fact_store_carries_its_held_kinds_and_an_unheld_reference_its_kinds() { diff --git a/crates/leaf/protocol-types/tests/declaration.rs b/crates/leaf/protocol-types/tests/declaration.rs index a9fa76e37a..121402e1ea 100644 --- a/crates/leaf/protocol-types/tests/declaration.rs +++ b/crates/leaf/protocol-types/tests/declaration.rs @@ -114,6 +114,7 @@ fn full() -> ExtensionDeclaration { docs: Some("https://acme.dev/codes#r001".to_string()), machine: true, reported_while: Some("complete".to_string()), + settled_later: true, }, CodeDescriptor { code: "R002".to_string(), @@ -499,6 +500,8 @@ fn codes_round_trip_on_the_wire() { assert_eq!(items[0]["code"], "R001"); assert_eq!(items[0]["docs"], "https://acme.dev/codes#r001"); assert!(items[1].get("docs").is_none(), "{}", items[1]); + assert_eq!(items[0]["settled_later"], true); + assert!(items[1].get("settled_later").is_none(), "{}", items[1]); assert!(declared.declares(DeclaredCategory::Codes)); let loaded = ExtensionDeclaration::from_wire( declared.handshake.clone(), diff --git a/crates/pipeline/emitter/src/pack.rs b/crates/pipeline/emitter/src/pack.rs index ba20930564..373696865d 100644 --- a/crates/pipeline/emitter/src/pack.rs +++ b/crates/pipeline/emitter/src/pack.rs @@ -1,11 +1,12 @@ -//! A context pack (ADR 0356): one context route served for one entity, its sections fitted to a token budget in -//! declared order. The fit and the render are two calls: the caller digests what the fit served between them, so the -//! kernel has one digest scheme and the emitter hashes nothing. +//! A context pack (ADR 0356, ADR 0386): one context route served for one entity, its sections fitted to a token +//! budget in declared order. The fit and the render are two calls: the caller digests what the fit served between them, +//! so the kernel has one digest scheme and the emitter hashes nothing. //! -//! The declared strategy: the subject and every core section are the floor, never cut (a budget below them is E062 -//! naming the route); enrich sections are served whole in declared order; the first that does not fit keeps its most -//! connected new entities that fit (a files, tests or settings section keeps nothing), and it and every later section -//! are listed as truncated. +//! The declared strategy: the subject and every core section are the floor, always served whole. The budget is either +//! the route's allowance, the tokens of enrich sections a pack may add beyond the floor, or a cap a caller states on +//! the whole pack, which is E062 naming the route when the floor is above it. Enrich sections are served whole in +//! declared order; the first that does not fit keeps its most connected new entities that fit (a files, tests or settings +//! section keeps nothing), and it and every later section are listed as truncated. use std::cmp::Reverse; use std::collections::{BTreeMap, BTreeSet}; @@ -16,7 +17,7 @@ use serde_json::value::RawValue; use specforge_common::Sym; use specforge_graph::{Computed, Graph}; use specforge_protocol_types::{ContextTier, JudgedFile}; -use specforge_registry::RegistryBuild; +use specforge_registry::{FieldRegistry, FieldWriter, RegistryBuild}; use crate::budget::fewest; use crate::emit::{EmitFormat, Shape}; @@ -64,6 +65,15 @@ pub struct PackSection { pub digest: String, } +/// What a pack's budget bounds. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum Budget { + /// The route's own: the floor is served whatever it costs, and enrich sections up to this many tokens beyond it. + Allowance(usize), + /// A cap a caller stated on the whole pack: a floor above it is E062. + Cap(usize), +} + /// What a pack is fitted and rendered from. pub struct PackPlan<'a> { /// The qualified route. @@ -72,8 +82,8 @@ pub struct PackPlan<'a> { pub agent: Option, /// The format of the pack's `graph` member: context, brief or graph (JSON). pub format: EmitFormat, - /// The token budget. - pub budget: usize, + /// The token budget: the route's allowance, or a cap the caller stated. + pub budget: Budget, /// The sections, in declared order, the settings section last. pub sections: Vec, /// The sections the registry skipped, each with the unloaded kind it reaches. @@ -104,6 +114,8 @@ pub struct Cut { pub truncated_entities: Vec, /// The cost of the pack the fit chose, by [`estimate_tokens`]. pub estimated_tokens: usize, + /// The cap the fit used: the stated one, or the floor and the allowance. Read at it as a cap, the pack is the same. + pub budget_tokens: usize, } /// The digests of what was served: each served section's (a part re-digested over its served members), in the plan's @@ -126,8 +138,8 @@ pub fn served_members(section: &PackSection, served: &Served) -> Vec { /// The plan fitted to its budget by the declared strategy. /// -/// Err: E062 when the subject and the core sections, with every enrich section listed as cut, cost more than the -/// budget. +/// Err: E062 when the budget is a cap and the subject and the core sections, with every enrich section listed as cut, +/// cost more than it. An allowance never refuses: the floor is served whatever it costs. pub fn fit(graph: &Graph, plan: &PackPlan<'_>) -> Result { let enrich: Vec = (0..plan.sections.len()) .filter(|&at| plan.sections[at].tier == ContextTier::Enrich) @@ -146,31 +158,39 @@ pub fn fit(graph: &Graph, plan: &PackPlan<'_>) -> Result { ContextTier::Enrich => Served::Cut, }) .collect(); + // A number is one token whatever its value, so the floor does not depend on the cap rendered with it. let floor = cost(graph, plan, &served, &names(0), &[])?; - if floor > plan.budget { - return Err(EmitterError::BudgetTooSmall { - reason: format!( - "the token budget of {} cannot hold route `{}`'s core sections for `{}` ({floor} tokens: the \ - envelope, the subject and its core sections); raise the budget", - plan.budget, plan.route, plan.subject - ), - }); - } + let cap = match plan.budget { + Budget::Allowance(allowance) => floor + allowance, + Budget::Cap(cap) if floor > cap => { + return Err(EmitterError::BudgetTooSmall { + reason: format!( + "the token cap of {cap} cannot hold route `{}`'s core sections for `{}` ({floor} tokens: the \ + envelope, the subject and its core sections); raise the cap, or state none: a read without \ + one serves the core whole", + plan.route, plan.subject + ), + }); + } + Budget::Cap(cap) => cap, + }; let mut cut = Cut { served: served.clone(), truncated_sections: names(0), truncated_entities: Vec::new(), estimated_tokens: floor, + budget_tokens: cap, }; for (nth, &at) in enrich.iter().enumerate() { served[at] = Served::Whole; let whole = cost(graph, plan, &served, &names(nth + 1), &[])?; - if whole <= plan.budget { + if whole <= cap { cut = Cut { served: served.clone(), truncated_sections: names(nth + 1), truncated_entities: Vec::new(), estimated_tokens: whole, + budget_tokens: cap, }; continue; } @@ -210,10 +230,10 @@ pub fn fit(graph: &Graph, plan: &PackPlan<'_>) -> Result { }; // Dropping one more new entity always lowers the cost; when even dropping them all does not fit (their IDs // listed cost more than the section's place), the section is cut whole. - if costs(fresh.len())? > plan.budget { + if costs(fresh.len())? > cap { break; } - let dropped = fewest(0, fresh.len(), |dropped| Ok(costs(dropped)? <= plan.budget))?; + let dropped = fewest(0, fresh.len(), |dropped| Ok(costs(dropped)? <= cap))?; let (part, truncated_entities) = part(dropped); // Nothing kept: the section is cut whole, as when nothing fits. if part == Served::Part(Vec::new()) { @@ -226,6 +246,7 @@ pub fn fit(graph: &Graph, plan: &PackPlan<'_>) -> Result { truncated_sections: truncated, truncated_entities, estimated_tokens, + budget_tokens: cap, }; break; } @@ -259,6 +280,7 @@ fn cost( truncated_sections: truncated_sections.to_vec(), truncated_entities: truncated_entities.to_vec(), estimated_tokens: 0, + budget_tokens: 0, }; let sealed = Sealed { sections: plan @@ -275,8 +297,32 @@ fn cost( Ok(estimate_tokens(&render(graph, plan, &cut, &sealed)?)) } -/// The pack document: the route, the subject, its digest, the budget and what was cut, the sections as served, the -/// sections skipped, and the export envelope of the subject and every served entity in the plan's format. +/// The subgraph a pack shows: `nodes` induced, each without the fields a context record gives (ADR 0386 D5). No digest +/// reads a record (ADR 0356), so a pack shows none either, and what it costs does not move when it is recorded. +fn shown(graph: &Graph, nodes: BTreeSet, fields: &FieldRegistry) -> Graph { + let induced = graph.induced(nodes); + let mut shown = Graph::new(); + for node in induced.nodes() { + let mut node = node.clone(); + let kind = node.kind.raw.as_str().to_string(); + for entry in std::mem::take(&mut node.fields).entries() { + let writer = fields + .get(&kind, entry.key.as_str()) + .and_then(|f| f.writer()); + if writer != Some(FieldWriter::Context) { + node.fields.push_entry(entry.clone()); + } + } + shown.add_node(node); + } + for edge in induced.edges() { + shown.add_edge(*edge); + } + shown +} + +/// The pack document: the route, the subject, its digest, the cap it was fitted to and what was cut, the sections as +/// served, the sections skipped, and the export envelope of the subject and every served entity in the plan's format. pub fn render( graph: &Graph, plan: &PackPlan<'_>, @@ -295,7 +341,7 @@ pub fn render( judgements: None, checks: None, }; - let exported = shape.render(&graph.induced(nodes), None)?; + let exported = shape.render(&shown(graph, nodes, plan.registries.fields()), None)?; let graph_json = RawValue::from_string(exported).map_err(|e| EmitterError::Serialization(e.to_string()))?; let sections: Vec> = plan @@ -313,7 +359,7 @@ pub fn render( digest: &sealed.pack, budget: BudgetJson { strategy: "declared", - budget_tokens: plan.budget, + budget_tokens: cut.budget_tokens, estimated_tokens: cut.estimated_tokens, truncated_sections: &cut.truncated_sections, truncated_entities: &cut.truncated_entities, @@ -343,7 +389,7 @@ struct PackJson<'a> { graph: &'a RawValue, } -/// A pack's budget: always written, cut or not, so the budget is recorded beside every digest. +/// A pack's budget: always written, cut or not, so the cap it was fitted to is recorded beside every digest. #[derive(Serialize)] struct BudgetJson<'a> { strategy: &'static str, diff --git a/crates/pipeline/emitter/tests/pack.rs b/crates/pipeline/emitter/tests/pack.rs index 4cbaced450..9d6c1f21ac 100644 --- a/crates/pipeline/emitter/tests/pack.rs +++ b/crates/pipeline/emitter/tests/pack.rs @@ -1,11 +1,13 @@ -//! A context pack fitted to its budget in declared order (ADR 0356): the subject and core sections are the floor, enrich -//! sections are served whole in order, and inside the first that does not fit its most connected entities are kept. +//! A context pack fitted to its budget in declared order (ADR 0356, ADR 0386): the subject and core sections are the +//! floor, served whole; a route's allowance adds enrich sections beyond it, a stated cap bounds the whole pack (a floor +//! above it is E062); enrich sections are served whole in order, and inside the first that does not fit its most +//! connected entities are kept. use serde_json::Value; use specforge_common::Sym; use specforge_diagnostics::codes; use specforge_emitter::pack::{ - Cut, PackPlan, PackSection, Sealed, SectionBody, Served, fit, render, + Budget, Cut, PackPlan, PackSection, Sealed, SectionBody, Served, fit, render, }; use specforge_emitter::{EmitFormat, GraphProtocolSchema}; use specforge_graph::Graph; @@ -45,7 +47,7 @@ fn entities(name: &str, tier: ContextTier, ids: &[&str], n: u8) -> PackSection { /// A route over `s`: core `hub`, then enrich `near`, `rest` (i1, i2, i3) and `late`. fn plan<'a>( - budget: usize, + budget: Budget, schema: &'a GraphProtocolSchema, registries: &'a RegistryBuild, ) -> PackPlan<'a> { @@ -85,14 +87,19 @@ fn sealed(plan: &PackPlan<'_>, cut: &Cut) -> Sealed { } } -/// The smallest budget `fit` accepts, searched upward from 1 (a counted search, at most 5,000 steps). +/// The smallest cap `fit` accepts, searched upward from 1 (a counted search, at most 5,000 steps). fn floor(graph: &Graph) -> usize { (1..5_000) .find(|&budget| fit(graph, &plan_at(budget)).is_ok()) .expect("a budget holds the core") } +/// The plan under the cap `budget`. fn plan_at(budget: usize) -> PackPlan<'static> { + plan_with(Budget::Cap(budget)) +} + +fn plan_with(budget: Budget) -> PackPlan<'static> { static SCHEMA: std::sync::LazyLock = std::sync::LazyLock::new(GraphProtocolSchema::empty); static REGISTRIES: std::sync::LazyLock = @@ -111,7 +118,7 @@ fn node_ids(pack: &str) -> Vec { } #[specforge_test_macros::test(requirement = "FEATURE-012")] -fn core_sections_are_never_cut_and_a_budget_below_them_is_e062_naming_the_route() { +fn core_sections_are_never_cut_and_a_cap_below_them_is_e062_naming_the_route() { let graph = graph(); let at = floor(&graph); let error = fit(&graph, &plan_at(at - 1)).unwrap_err(); @@ -123,6 +130,40 @@ fn core_sections_are_never_cut_and_a_budget_below_them_is_e062_naming_the_route( assert_eq!(cut.served[0], Served::Whole); assert_eq!(cut.truncated_sections, ["near", "rest", "late"]); assert!(cut.estimated_tokens <= at); + assert_eq!(cut.budget_tokens, at); +} + +#[specforge_test_macros::test(requirement = "FEATURE-012")] +fn an_allowance_serves_the_floor_whole_whatever_it_costs_and_enrich_up_to_the_allowance_beyond() { + let graph = graph(); + let at = floor(&graph); + // An allowance of one token: never E062, the core whole, every enrich section cut. + let cut = fit(&graph, &plan_with(Budget::Allowance(1))).unwrap(); + assert_eq!(cut.served[0], Served::Whole); + assert_eq!(cut.truncated_sections, ["near", "rest", "late"]); + assert_eq!(cut.budget_tokens, at + 1); + assert_eq!(cut.estimated_tokens, at); + // The pack states the cap it was fitted to, which a reader passes back as a cap to read the same pack. + let plan = plan_with(Budget::Allowance(1)); + let pack = render(&graph, &plan, &cut, &sealed(&plan, &cut)).unwrap(); + let document: Value = serde_json::from_str(&pack).unwrap(); + assert_eq!(document["budget"]["budget_tokens"], at + 1); +} + +#[specforge_test_macros::test(requirement = "FEATURE-012")] +fn an_allowance_serves_what_a_cap_of_the_floor_and_the_allowance_serves() { + let graph = graph(); + let at = floor(&graph); + for allowance in 1..2_000 { + let allowed = fit(&graph, &plan_with(Budget::Allowance(allowance))).unwrap(); + let capped = fit(&graph, &plan_at(at + allowance)).unwrap(); + assert_eq!(allowed, capped, "allowance {allowance}"); + assert!(allowed.estimated_tokens <= at + allowance, "{allowed:?}"); + if allowed.served.iter().all(|s| *s == Served::Whole) { + return; + } + } + panic!("no allowance served every section"); } #[specforge_test_macros::test(requirement = "FEATURE-012")] @@ -217,7 +258,7 @@ fn a_pack_renders_its_budget_sections_and_served_graph() { assert_eq!(nodes, ["hub", "i1", "i2", "i3", "late", "near", "s"]); } -/// The plan at `budget` over core `hub` and the enrich sections `enrich`, each `(name, members)`. +/// The plan under the cap `budget` over core `hub` and the enrich sections `enrich`, each `(name, members)`. fn plan_over(budget: usize, enrich: &[(&str, &[&str])]) -> PackPlan<'static> { let mut plan = plan_at(budget); plan.sections.truncate(1); diff --git a/crates/pipeline/registry/src/compilation/codes.rs b/crates/pipeline/registry/src/compilation/codes.rs index caf4641e87..29472b7764 100644 --- a/crates/pipeline/registry/src/compilation/codes.rs +++ b/crates/pipeline/registry/src/compilation/codes.rs @@ -52,6 +52,7 @@ pub fn extension_codes(declaration: &ExtensionDeclaration) -> Vec docs: entry.docs.clone(), machine: entry.machine, reported_while: entry.reported_while.clone(), + settled_later: entry.settled_later, }) .collect() } diff --git a/crates/pipeline/registry/src/entity.rs b/crates/pipeline/registry/src/entity.rs index e9fec88cf5..2b2198954b 100644 --- a/crates/pipeline/registry/src/entity.rs +++ b/crates/pipeline/registry/src/entity.rs @@ -19,6 +19,8 @@ pub struct EntityRecord { /// judges. Host-internal: never on the wire. pub name: String, pub kind: String, + /// The title its header writes; `None` for a fact written without one (ADR 0387). + pub title: Option, pub span: SourceSpan, /// Every field the entity writes, once each, in source order, each with /// its field text. @@ -228,6 +230,7 @@ impl EntityRecord { id: id.to_string(), name: id.to_string(), kind: kind.to_string(), + title: None, span: span.clone(), fields: Vec::new(), obligations: Vec::new(), diff --git a/crates/pipeline/registry/src/registries/context.rs b/crates/pipeline/registry/src/registries/context.rs index 7f67507f72..cf04d2a1fb 100644 --- a/crates/pipeline/registry/src/registries/context.rs +++ b/crates/pipeline/registry/src/registries/context.rs @@ -54,6 +54,8 @@ pub struct ContextRoute { pub subject: String, /// The extension's own agent it is bound to; `None` when it names none or its binding was refused (E124). pub agent: Option, + /// The enrich allowance: the tokens of enrich sections a read that states no cap serves beyond the core (ADR 0386); + /// 0 only for a route of core sections only. pub budget: u32, /// The registered sections, in declared order. pub sections: Vec, @@ -230,12 +232,23 @@ impl Check<'_> { if !is_valid_short(&d.name) { return Err("a context route's name is kebab case".into()); } - if d.budget == 0 { - return Err("a context route's budget is a positive number of tokens".into()); + // The allowance is what enrich sections fill beyond the core: a route of core sections only has none to give. + let enriched = d.sections.iter().any(|s| s.tier == ContextTier::Enrich); + if enriched && d.budget == 0 { + return Err( + "a context route with an enrich section allows it a positive number of tokens" + .into(), + ); } if !d.sections.iter().any(|s| s.tier == ContextTier::Core) { return Err("a context route has at least one core section".into()); } + if !enriched && d.budget > 0 { + return Err(format!( + "a context route of core sections only allows nothing beyond them: its budget of {} is 0", + d.budget + )); + } if !self.registries.kinds.contains(&d.subject) { return match self.unloaded.declare(&d.subject) { true => Ok(None), diff --git a/crates/pipeline/registry/src/snapshot/record.rs b/crates/pipeline/registry/src/snapshot/record.rs index a875820c0f..0ca53b6091 100644 --- a/crates/pipeline/registry/src/snapshot/record.rs +++ b/crates/pipeline/registry/src/snapshot/record.rs @@ -91,6 +91,7 @@ pub(super) fn record( id: id.to_string(), name: node.name().to_string(), kind: node.kind.raw.to_string(), + title: node.title.clone(), span: node.source_span.clone(), fields: entries .iter() diff --git a/crates/pipeline/registry/src/snapshot/tests/mod.rs b/crates/pipeline/registry/src/snapshot/tests/mod.rs index 514e9c4612..fb2548f07c 100644 --- a/crates/pipeline/registry/src/snapshot/tests/mod.rs +++ b/crates/pipeline/registry/src/snapshot/tests/mod.rs @@ -5,6 +5,7 @@ mod history; mod list_values; mod standing; mod text; +mod title; mod validator; use std::collections::HashSet; diff --git a/crates/pipeline/registry/src/snapshot/tests/title.rs b/crates/pipeline/registry/src/snapshot/tests/title.rs new file mode 100644 index 0000000000..b9b94ad199 --- /dev/null +++ b/crates/pipeline/registry/src/snapshot/tests/title.rs @@ -0,0 +1,22 @@ +//! A pass is sent each entity's title (ADR 0387), as a command's graph node carries it. + +use crate::snapshot::EntitySnapshot; + +#[test] +fn a_pass_entity_carries_the_title_its_header_writes() { + let registries = super::declared(&[("memo", false, false)], false, vec![]); + let source = "memo note \"Phase 3: Core\" {\n}\n\nmemo other \"Other\" {\n}\n"; + let snapshot = EntitySnapshot::of(&super::graph_of(source, ®istries), ®istries); + let titles: Vec<(String, Option)> = snapshot + .pass_entities(&[]) + .into_iter() + .map(|e| (e.id, e.title)) + .collect(); + assert_eq!( + titles, + [ + ("note".to_string(), Some("Phase 3: Core".to_string())), + ("other".to_string(), Some("Other".to_string())), + ] + ); +} diff --git a/crates/pipeline/registry/src/snapshot/wire.rs b/crates/pipeline/registry/src/snapshot/wire.rs index 603fc91bde..24964c213c 100644 --- a/crates/pipeline/registry/src/snapshot/wire.rs +++ b/crates/pipeline/registry/src/snapshot/wire.rs @@ -145,7 +145,7 @@ impl EntitySnapshot { } /// One entity as a pass receives it: -/// - its field texts by key; +/// - its title (ADR 0387) and its field texts by key; /// - its edge totals and span; /// - `testable`, and `owes_none` = it owes no obligations of its own; /// - `pending`, whether its owner is ([`EntitySnapshot::is_pending`]). @@ -153,6 +153,7 @@ pub(super) fn pass_entity(record: &EntityRecord, standing: &Standing, pending: b PassEntity { id: record.id.clone(), kind: record.kind.clone(), + title: record.title.clone(), fields: record .fields .iter() diff --git a/crates/pipeline/registry/tests/build/contexts.rs b/crates/pipeline/registry/tests/build/contexts.rs index 833fb572ae..b304ec5433 100644 --- a/crates/pipeline/registry/tests/build/contexts.rs +++ b/crates/pipeline/registry/tests/build/contexts.rs @@ -174,20 +174,56 @@ fn a_context_route_over_loaded_kinds_is_registered_with_its_sections_in_order() assert!(build_with([proof()], candidates(&[])).contexts().is_empty()); } +#[spec(requirement = "FEATURE-012")] +fn a_route_of_core_sections_only_is_registered_without_an_allowance() { + let build = build([ + proof(), + work(|c| { + c.context("checker", |r| { + r.subject("plan") + .core("plan", "self") + .core("tasks", "self = &'a [(&'a str, &'a str)]; /// A route over `plan` recording `records` (field, subject), its stale code `stale`. fn recording(c: &mut ContributionsBuilder, records: &[(&str, &str)], stale: Option<&str>) { c.context("r", |r| { - r.subject("plan").budget(10).core("plan", "self"); + r.subject("plan").core("plan", "self"); for (field, subject) in records { r.record(field, subject); } @@ -498,7 +520,6 @@ fn a_route_records_its_extensions_context_fields_and_names_a_catalogued_code() { work(|c| { c.context("r", |r| { r.subject("plan") - .budget(10) .core("plan", "self") .record("plan.pack", "self") .record_suggesting("note.pack", "self.task.plan", "redo {entity}") diff --git a/crates/pipeline/registry/tests/build/namespaces.rs b/crates/pipeline/registry/tests/build/namespaces.rs index d92962b829..5770ff98b3 100644 --- a/crates/pipeline/registry/tests/build/namespaces.rs +++ b/crates/pipeline/registry/tests/build/namespaces.rs @@ -93,3 +93,24 @@ fn a_malformed_code_entry_is_e030() { "Twice" ); } + +/// A code a later step of the authoring settles (ADR 0385 D1): a bool, so no word of it is E030, and the code book +/// keeps it on the owner's entry. +#[spec(requirement = "FEATURE-028")] +fn a_settled_later_code_reaches_the_code_book_and_no_e030() { + let plans = declare("@acme/plans", |c| { + c.code("E301", |d| { + d.title("Requirement in no plan") + .explanation("Plan it.") + .settled_later(); + }); + c.code("E302", |d| { + d.title("Plan without a task").explanation("Add one."); + }); + }); + let build = build([plans]); + assert!(coded(&build, "E030").is_empty(), "{:?}", codes(&build)); + let book = build.codes(); + assert!(book.settled_later("@acme/plans", "E301")); + assert!(!book.settled_later("@acme/plans", "E302")); +} diff --git a/crates/pipeline/registry/tests/rules/mod.rs b/crates/pipeline/registry/tests/rules/mod.rs index 296928a55e..a7d49e8f96 100644 --- a/crates/pipeline/registry/tests/rules/mod.rs +++ b/crates/pipeline/registry/tests/rules/mod.rs @@ -89,6 +89,7 @@ fn catalog_of(rules: &[ValidationRuleDescriptor]) -> Vec ExtensionD docs: None, machine: false, reported_while: None, + settled_later: false, }); } } diff --git a/crates/runtime/component/tests/blob_size.rs b/crates/runtime/component/tests/blob_size.rs index dbcc365431..bcbbb66c0c 100644 --- a/crates/runtime/component/tests/blob_size.rs +++ b/crates/runtime/component/tests/blob_size.rs @@ -9,11 +9,11 @@ use specforge_component::builtins::BUILTINS; use specforge_component::committed::COMMITTED; -// The fifteen builtins total 18,017,230 B, the sum of the `.wasm` files `revendor` commits (built with -// `--profile blob` on the pinned rustc): the fourteen under `extensions/` 12,297,809 B, the largest of them -// `@specforge/checks` at 2,451,629 B, and `gsd/core/wasm/gsd_core.wasm` 5,719,421 B, the one blob over the gate's cap, +// The fifteen builtins total 18,033,150 B, the sum of the `.wasm` files `revendor` commits (built with +// `--profile blob` on the pinned rustc): the fourteen under `extensions/` 12,304,701 B, the largest of them +// `@specforge/checks` at 2,452,015 B, and `gsd/core/wasm/gsd_core.wasm` 5,728,449 B, the one blob over the gate's cap, // held to its own allowance (ADR 0366 D3). The budget is that total rounded up to the next 100,000 B, here 18,100,000 -// (82,770 B of headroom): a change that grows the blobs past it re-measures and takes the rule's next step in the same +// (66,850 B of headroom): a change that grows the blobs past it re-measures and takes the rule's next step in the same // commit (ADR 0373 D3). A build without the profile is far larger, so this catches a profile regression. const TOTAL_BUDGET: usize = 18_100_000; diff --git a/crates/runtime/component/tests/declarations/gsd_core/describe_codes.json b/crates/runtime/component/tests/declarations/gsd_core/describe_codes.json index 6a06fb12d0..d1f46b793c 100644 --- a/crates/runtime/component/tests/declarations/gsd_core/describe_codes.json +++ b/crates/runtime/component/tests/declarations/gsd_core/describe_codes.json @@ -16,7 +16,7 @@ { "code": "W103", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#project-and-roadmap", - "explanation": "A phase has 2–5 success criteria. It is a warning, and an error under gsd-strict.", + "explanation": "A phase has 2–5 success criteria. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Phase success criteria out of range" }, { @@ -64,19 +64,20 @@ { "code": "W203", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A locked requirement has a falsifiable acceptance. It is a warning, and an error under gsd-strict.", + "explanation": "A locked requirement has a falsifiable acceptance. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Locked requirement is not falsifiable" }, { "code": "W204", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A research open question is resolved by a decision before planning. It is a warning, and an error under gsd-strict.", + "explanation": "A research open question is resolved by a decision before planning. It is a warning, and an error under gsd-strict and gsd-plus. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Open research question unresolved" }, { "code": "W205", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A package in research has a legitimacy verdict. It is a warning, and an error under gsd-strict.", + "explanation": "A package in research has a legitimacy verdict. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Package without a legitimacy verdict" }, { @@ -88,7 +89,8 @@ { "code": "E301", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Every requirement of a phase is in at least one of its plans. It is an error.", + "explanation": "Every requirement of a phase is in at least one of its plans. It is an error. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Phase requirement in no plan" }, { @@ -106,19 +108,19 @@ { "code": "W304", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan has at most 3 tasks (4 warns). It is a warning, and an error under gsd-strict.", + "explanation": "A plan has at most 3 tasks (4 warns). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan has too many tasks" }, { "code": "W305", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Plans of one wave share no path in files_modified ∪ files_deleted; under compat that wave runs sequentially. It is a warning, and an error under gsd-strict.", + "explanation": "Plans of one wave share no path in files_modified ∪ files_deleted; under compat that wave runs sequentially. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Same-wave plans overlap on files" }, { "code": "W306", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A task's files are among its plan's files_modified. It is a warning, and an error under gsd-strict.", + "explanation": "A task's files are among its plan's files_modified. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Task file outside the plan's files" }, { @@ -130,25 +132,27 @@ { "code": "W308", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A one_way task follows a decision checkpoint of its plan, or names the decision that settles it in reversibility.settled_by. It is a warning, and an error under gsd-strict.", + "explanation": "A one_way task follows a decision checkpoint of its plan, or names the decision that settles it in reversibility.settled_by. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "One-way task without a decision or a settled_by" }, { "code": "W309", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan has a truth and an artifact. It is a warning, and an error under gsd-strict.", + "explanation": "A plan has a truth and an artifact. It is a warning, and an error under gsd-strict and gsd-plus. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Plan lacks a truth or an artifact" }, { "code": "E310", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Every trackable decision of a planned phase's context (origin context) is cited by its id in the text of one of its plans. It is an error.", + "explanation": "Every trackable decision of a planned phase's context (origin context) is cited by its id in the text of one of its plans. It is an error. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Context decision cited by no plan" }, { "code": "W311", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "The plan achieves its phase goal, keeps to scope and contradicts no settled decision. It is a warning, and an error under gsd-strict.", + "explanation": "The plan achieves its phase goal, keeps to scope and contradicts no settled decision. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan does not achieve its phase goal" }, { @@ -160,7 +164,7 @@ { "code": "W313", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Key links are wired between artifacts the plan names. It is a warning, and an error under gsd-strict.", + "explanation": "Key links are wired between artifacts the plan names. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Key links not wired" }, { @@ -172,7 +176,7 @@ { "code": "W315", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Data contracts between plans match (requires / provides). It is a warning, and an error under gsd-strict.", + "explanation": "Data contracts between plans match (requires / provides). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Data contracts between plans mismatch" }, { @@ -190,7 +194,7 @@ { "code": "W318", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "The plan-check verdict is fresh before execution. It is a warning, and an error under gsd-strict.", + "explanation": "The plan-check verdict is fresh before execution. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan-check verdict is stale" }, { @@ -220,7 +224,7 @@ { "code": "W323", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan is named - in its phase, and by its quick id YYMMDD-xxx without one. It is a warning, and an error under gsd-strict.", + "explanation": "A plan is named - in its phase, and by its quick id YYMMDD-xxx without one. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan not named after its phase" }, { @@ -256,7 +260,7 @@ { "code": "W404", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "The TDD review checkpoint ran after execution. It is a warning, and an error under gsd-strict.", + "explanation": "The TDD review checkpoint ran after execution. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "TDD review checkpoint did not run" }, { @@ -268,7 +272,7 @@ { "code": "W406", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "A research, spec or validation records the pack of gsd/phase-context (a quick plan's research: gsd/quick-context) it was written against; the host reports it when that pack moves. It is a warning, and an error under gsd-strict.", + "explanation": "A research, spec or validation records the pack of gsd/phase-context (a quick plan's research: gsd/quick-context) it was written against; the host reports it when that pack moves. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Context drifted since the plan was written" }, { @@ -280,13 +284,13 @@ { "code": "W408", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "A deliverable's checks pass, or a person judged it and gave a rationale (a check no report speaks of is not judged). It is a warning, and an error under gsd-strict.", + "explanation": "A deliverable's checks pass, or a person judged it and gave a rationale (a check no report speaks of is not judged). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Deliverable checks neither pass nor are human-judged" }, { "code": "W409", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "The branch a phase or a milestone computes is a name git takes, with a slug when its template asks one. It is a warning, and an error under gsd-strict.", + "explanation": "The branch a phase or a milestone computes is a name git takes, with a slug when its template asks one. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Computed branch name refused" }, { @@ -334,7 +338,7 @@ { "code": "W510", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#verify", - "explanation": "A planned phase whose research asks for a validation has one, approved before its verification. It is a warning, and an error under gsd-strict.", + "explanation": "A planned phase whose research asks for a validation has one, approved before its verification. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Phase lacks a validation it needs" }, { @@ -432,6 +436,12 @@ "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#verify", "explanation": "On a check with a base (check --since a revision, read at its merge-base, or a session's last check), each truth whose verifier verdict is stale says what changed since that base: the spec it reads (the truth, its plan or its phase) or only the files its verdict cites; silent on a plain check. It is information.", "title": "What changed under a stale truth since the base" + }, + { + "code": "W109", + "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#project-and-roadmap", + "explanation": "A phase's title does not begin with a phase number: its label reads the number from its id. It is a warning, and an error under gsd-strict and gsd-plus.", + "title": "Phase title embeds a number" } ] } \ No newline at end of file diff --git a/crates/runtime/component/tests/declarations/gsd_core/describe_contexts.json b/crates/runtime/component/tests/declarations/gsd_core/describe_contexts.json index 9d05033c1c..04afc18179 100644 --- a/crates/runtime/component/tests/declarations/gsd_core/describe_contexts.json +++ b/crates/runtime/component/tests/declarations/gsd_core/describe_contexts.json @@ -80,7 +80,7 @@ }, { "agent": "gsd-plan-checker", - "budget": 8000, + "budget": 0, "name": "plan-checker", "sections": [ { @@ -109,8 +109,23 @@ "tier": "core" }, { - "name": "all_decisions", - "selector": "decision", + "name": "quick_decisions", + "selector": "self &mut Self { self.0.writer = Some(FieldWriter::Context.as_str().to_string()); self.field_type(FieldType::Block) @@ -432,6 +432,13 @@ impl CodeBuilder { self.0.reported_while = Some(OwnerState::Pending.as_str().to_string()); self } + /// A finding of this code names a state a later step of the authoring settles (ADR 0385): a typed edit whose plan + /// creates the finding's subject, or an entity under it, and alters nothing held there adds no error by it (E080). + /// Its severity does not change. + pub fn settled_later(&mut self) -> &mut Self { + self.0.settled_later = true; + self + } } /// Builder for [`ValidationRuleDescriptor`], with a `custom` rule's diff --git a/crates/runtime/extension-sdk/src/context.rs b/crates/runtime/extension-sdk/src/context.rs index b6050a9652..5857ac7ce6 100644 --- a/crates/runtime/extension-sdk/src/context.rs +++ b/crates/runtime/extension-sdk/src/context.rs @@ -52,12 +52,14 @@ impl ContextBuilder { self.0.agent = Some(agent.to_string()); self } - /// The token budget a read takes when it names none. + /// The enrich allowance: the tokens of enrich sections a read that states no cap serves beyond the core sections, + /// which are served whole whatever they cost. Positive for a route with an enrich section; a route of core + /// sections only declares none (E123 otherwise, ADR 0386 D4). pub fn budget(&mut self, tokens: u32) -> &mut Self { self.0.budget = tokens; self } - /// A section a budget never cuts: the entities, files or tests `selector` picks from the subject. + /// A section always served whole: the entities, files or tests `selector` picks from the subject. pub fn core(&mut self, name: &str, selector: &str) -> &mut Self { self.section(name, selector, ContextTier::Core) } diff --git a/crates/runtime/extension-sdk/src/plan.rs b/crates/runtime/extension-sdk/src/plan.rs index 58cf97a920..46bebac305 100644 --- a/crates/runtime/extension-sdk/src/plan.rs +++ b/crates/runtime/extension-sdk/src/plan.rs @@ -246,8 +246,9 @@ impl PlanBuilder { }) } - /// Record `route`'s pack on `entity` (ADR 0356): the host derives the subject, computes the pack at `max_tokens` - /// (`None`: the route's budget) and writes it. The route must record the entity's kind. + /// Record `route`'s pack on `entity` (ADR 0356): the host derives the subject, computes the pack under the cap + /// `max_tokens` (`None`: the core whole and the route's allowance) and writes it. The route must record the + /// entity's kind. pub fn record_context( &mut self, entity: &str, diff --git a/crates/runtime/extension-sdk/tests/declaration.rs b/crates/runtime/extension-sdk/tests/declaration.rs index a4f00b0a92..03a24630dc 100644 --- a/crates/runtime/extension-sdk/tests/declaration.rs +++ b/crates/runtime/extension-sdk/tests/declaration.rs @@ -327,6 +327,23 @@ fn a_code_entry_is_declared_with_its_title_explanation_and_docs() { assert!(declared.declares(DeclaredCategory::Codes)); } +#[specforge_test_macros::test(requirement = "FEATURE-028")] +fn a_code_entry_may_be_settled_later() { + let mut b = ContributionsBuilder::new(ExtensionMeta::new("@acme/plans", "0.1.0")); + b.code("W204", |d| { + d.title("Open question") + .explanation("Resolve it with a decision.") + .settled_later(); + }); + b.code("W205", |d| { + d.title("Plain") + .explanation("Settled by the write that makes it."); + }); + let declared = b.declaration(); + assert!(declared.codes[0].settled_later); + assert!(!declared.codes[1].settled_later); +} + #[specforge_test_macros::test(requirement = "FEATURE-028")] fn settings_presets_secrets_and_flags_are_declared() { let mut b = ContributionsBuilder::new(ExtensionMeta::new("@acme/gsd", "0.1.0")); diff --git a/crates/runtime/wasm/tests/wire/pass.check.input.json b/crates/runtime/wasm/tests/wire/pass.check.input.json index 4b59e2bcae..dc1dfe05b2 100644 --- a/crates/runtime/wasm/tests/wire/pass.check.input.json +++ b/crates/runtime/wasm/tests/wire/pass.check.input.json @@ -25,6 +25,7 @@ "start_line": 1 }, "testable": true, + "title": "A", "verify_kinds": [ "unit" ], @@ -49,6 +50,7 @@ "start_line": 7 }, "testable": true, + "title": "B", "verify_kinds": [], "verify_texts": [] }, @@ -69,6 +71,7 @@ "start_line": 11 }, "testable": true, + "title": "C", "verify_kinds": [], "verify_texts": [] } diff --git a/crates/runtime/wasm/tests/wire/pass.input.json b/crates/runtime/wasm/tests/wire/pass.input.json index dcbe1d34c9..7d4b6ef5d1 100644 --- a/crates/runtime/wasm/tests/wire/pass.input.json +++ b/crates/runtime/wasm/tests/wire/pass.input.json @@ -25,6 +25,7 @@ "start_line": 1 }, "testable": true, + "title": "A", "verify_kinds": [ "unit" ], @@ -49,6 +50,7 @@ "start_line": 7 }, "testable": true, + "title": "B", "verify_kinds": [], "verify_texts": [] }, @@ -69,6 +71,7 @@ "start_line": 11 }, "testable": true, + "title": "C", "verify_kinds": [], "verify_texts": [] } diff --git a/crates/session/project/src/context.rs b/crates/session/project/src/context.rs index 58c43ee8bd..8a5a739dc3 100644 --- a/crates/session/project/src/context.rs +++ b/crates/session/project/src/context.rs @@ -9,7 +9,9 @@ use std::collections::BTreeMap; use serde_json::{Value, json}; use specforge_common::Sym; -use specforge_emitter::pack::{self, Cut, PackPlan, PackSection, Sealed, SectionBody, Served}; +use specforge_emitter::pack::{ + self, Budget, Cut, PackPlan, PackSection, Sealed, SectionBody, Served, +}; use specforge_emitter::{EmitFormat, EmitterError, GraphProtocolSchema}; use specforge_graph::{Computed, Graph}; use specforge_protocol_types::{CONTEXT_SETTINGS, ContextTier, JudgedFile}; @@ -193,15 +195,16 @@ pub struct Packed<'a> { pub digest: String, } -/// The pack of `route` for `subject` (by path) at `budget`, its `graph` member in `format` (the fit counts what it -/// renders) and the schema `schema` gives: its sections read, fitted, each served section digested (a part over the -/// members it kept), and the pack digested over the subject and them. Files are read through `disk`. +/// The pack of `route` for `subject` (by path) under `budget` (the route's allowance or a stated cap), its `graph` +/// member in `format` (the fit counts what it renders) and the schema `schema` gives: its sections read, fitted, each +/// served section digested (a part over the members it kept), and the pack digested over the subject and them. Files +/// are read through `disk`. pub fn pack<'a>( project: &'a CompiledProject, disk: &'a dyn Disk, route: &'a ContextRoute, subject: &str, - budget: usize, + budget: Budget, format: EmitFormat, schema: &'a GraphProtocolSchema, ) -> Result, EmitterError> { @@ -220,7 +223,7 @@ pub(crate) fn pack_over<'a>( over: &Over<'a>, route: &'a ContextRoute, subject: &str, - budget: usize, + budget: Budget, format: EmitFormat, schema: &'a GraphProtocolSchema, ) -> Result, EmitterError> { diff --git a/crates/session/project/src/context/records.rs b/crates/session/project/src/context/records.rs index c55dde7588..bfb45a4913 100644 --- a/crates/session/project/src/context/records.rs +++ b/crates/session/project/src/context/records.rs @@ -1,10 +1,13 @@ -//! The records a context route keeps of its pack (ADR 0356 D12): on each check, every record of a route with a stale -//! code, when its field's owner gate admits it, is evaluated again at its recorded budget. A pack whose digest moved, -//! a record with no subject or several, or a core above its budget is one finding of the route's stale code at the -//! field, with the record's suggestion. A project that holds no record evaluates no pack. +//! The records a context route keeps of its pack (ADR 0356 D12, ADR 0386 D6): on each check, every record of a route +//! with a stale code, when its field's owner gate admits it, is evaluated again under the budget its pack was read +//! with: the cap the read stated, which the record holds, or, when it holds none, the core whole and the route's +//! allowance. A pack whose digest moved, a record with no subject or several, or a core above a stated cap is one +//! finding of the route's stale code at the field, with the record's suggestion; a record that states no cap is never +//! stale for its size. A project that holds no record evaluates no pack. use specforge_common::{Diagnostic, DiagnosticData, Severity}; use specforge_diagnostics::{CodeRef, Level, letter_level}; +use specforge_emitter::pack::Budget; use specforge_emitter::{EmitFormat, EmitterError, generate_schema}; use specforge_protocol_types::OwnerState; use specforge_registry::{ContextRecord, ContextRoute, EntityRecord, FieldRecord}; @@ -12,23 +15,38 @@ use specforge_registry::{ContextRecord, ContextRoute, EntityRecord, FieldRecord} use super::{Over, pack_over}; use crate::select::Selection; -/// A held record: the field written, the route it names, the digest and the budget it recorded. +/// A held record: the field written, the route it names, the digest and the cap its read stated, if any. struct Held<'a> { field: &'a FieldRecord, route: &'a str, digest: &'a str, - budget: usize, + cap: Option, } -/// The record `field` of `entity` holds, when it holds the three members. +impl Held<'_> { + /// The budget the record's pack was read with: its stated cap, or `route`'s allowance beyond the core. + fn budget(&self, route: &ContextRoute) -> Budget { + match self.cap { + Some(cap) => Budget::Cap(cap), + None => Budget::Allowance(route.budget as usize), + } + } +} + +/// The record `field` of `entity` holds, when it holds a route and a digest, and a cap that is a count when it holds +/// one. fn held<'a>(entity: &'a EntityRecord, field: &str) -> Option> { let field = entity.fields.iter().find(|f| f.key == field)?; let value = field.written.as_ref()?; + let cap = match value.get("max_tokens") { + None => None, + Some(cap) => Some(usize::try_from(cap.as_u64()?).ok()?), + }; Some(Held { field, route: value.get("route")?.as_str()?, digest: value.get("digest")?.as_str()?, - budget: usize::try_from(value.get("max_tokens")?.as_u64()?).ok()?, + cap, }) } @@ -37,7 +55,7 @@ enum Stale { Moved { subject: String, now: String }, NoSubject, Several(Vec), - OverBudget { subject: String, why: String }, + OverCap { subject: String, why: String }, } /// The findings of every stale record `over` holds. @@ -90,7 +108,7 @@ pub(crate) fn stale(over: &Over<'_>) -> Vec { over, route, &subject, - held.budget, + held.budget(route), EmitFormat::Context, schema, ) { @@ -99,12 +117,10 @@ pub(crate) fn stale(over: &Over<'_>) -> Vec { subject, now: packed.digest, }), - Err(error @ EmitterError::BudgetTooSmall { .. }) => { - Some(Stale::OverBudget { - subject, - why: error.to_string(), - }) - } + Err(error @ EmitterError::BudgetTooSmall { .. }) => Some(Stale::OverCap { + subject, + why: error.to_string(), + }), // A pack that cannot be rendered is a host failure, never the record's. Err(_) => None, } @@ -160,10 +176,10 @@ fn finding( ), route.subject.clone(), ), - Stale::OverBudget { subject, why } => ( + // Only a stated cap refuses a core. + Stale::OverCap { subject, why } => ( format!( - "{at} for '{subject}' at {} tokens, which no longer holds its core: {why}", - held.budget + "{at} for '{subject}' under its stated cap, which no longer holds its core: {why}" ), subject, ), diff --git a/crates/session/project/src/testing/contexts.rs b/crates/session/project/src/testing/contexts.rs index def12ed461..d912d64713 100644 --- a/crates/session/project/src/testing/contexts.rs +++ b/crates/session/project/src/testing/contexts.rs @@ -308,8 +308,7 @@ pub fn declare_gsd_contexts(c: &mut ContributionsBuilder) { c.context("plan-checker", |r| { r.subject("plan") .description("What the plan checker reads of a plan") - .agent("gsd-plan-checker") - .budget(8000); + .agent("gsd-plan-checker"); for (name, selector) in PLAN_CHECK_INPUTS { r.core(name, selector); } @@ -329,8 +328,9 @@ pub fn gsd_context_runtime() -> InProcessRuntime { } /// `project` (a [`gsd_context_project`] or one made from it) whose plan [`CONTEXT_PLAN`] holds the context record -/// `record` (the block as written, `{ route "gsd/executor" digest "sha256:…" max_tokens 6000 }`), with its ledger line, -/// as the host's record of the route leaves it. The ledger line is digested over the value `runtime` compiles. +/// `record` (the block as written, `{ route "gsd/executor" digest "sha256:…" max_tokens 6000 }`, the cap optional), +/// with its ledger line, as the host's record of the route leaves it. The ledger line is digested over the value +/// `runtime` compiles. pub fn recording(project: TestProject, record: &str, runtime: crate::SharedRuntime) -> TestProject { let plan = "plan 02-01 \"Save and load tasks.json\" {\n"; project.write( diff --git a/crates/session/project/src/testing/judged.rs b/crates/session/project/src/testing/judged.rs index fb3f2c3dd2..702ae9d239 100644 --- a/crates/session/project/src/testing/judged.rs +++ b/crates/session/project/src/testing/judged.rs @@ -1,6 +1,6 @@ -//! The GSD-shaped kinds and judged rules the K7 tests share (ADR 0290), served in process and written as the wire -//! carries them, so an attribute the host does not read yet is dropped by the descriptor and the test that needs it -//! fails, not the fixture. +//! The GSD-shaped kinds and judged rules the judged-rule tests share (ADR 0290), served in process and written as the +//! wire carries them, so an attribute the host does not read yet is dropped by the descriptor and the test that needs +//! it fails, not the fixture. //! //! `@gsd/core` (its codes print `gsd/..`) declares the plan kinds (`plan` and the kinds that belong to one), the //! decisions, contexts and research of a phase, the spec kinds (`phase_spec`, `locked_req`, `interview`), `package_audit` @@ -25,8 +25,9 @@ pub const GSD_JUDGED: &str = "@gsd/core"; /// process with [`code_core_tests`], the shape of the builtin's `test`. pub const CODE_CORE: &str = "@code/core"; -/// What the plan-check rules read of a plan (`rules.md`, K7 D8). -pub const PLAN_CHECK_INPUTS: [(&str, &str); 11] = [ +/// What the plan-check rules read of a plan, as `@gsd/core` declares it (`rules.md`, ADR 0386): the test +/// `the_twin_declares_the_shipped_plan_check` compares it to the shipped declaration. +pub const PLAN_CHECK_INPUTS: [(&str, &str); 14] = [ ("plan", "self"), ( "body", @@ -34,9 +35,21 @@ pub const PLAN_CHECK_INPUTS: [(&str, &str); 11] = [ ), ("phase", "self.phase"), ("requirements", "self.requirements"), - ("decisions", "self.phase Value { Some("phase"), vec![ reference("phase", "phase"), + reference("plan", "plan"), json!({"name": "text", "field_type": "string"}), json!({"name": "origin", "field_type": "enum", "enum_values": ["context", "project", "summary", "checkpoint"]}), @@ -89,7 +103,10 @@ pub fn gsd_judged_wire() -> Value { kind( "deferred_idea", Some("phase"), - vec![reference("phase", "phase")], + vec![ + reference("phase", "phase"), + json!({"name": "origin", "field_type": "enum", "enum_values": ["discussion", "execution"]}), + ], ), kind("research", Some("phase"), vec![reference("phase", "phase")]), kind( @@ -160,7 +177,16 @@ pub fn gsd_judged_wire() -> Value { ], ), ]; - for belongs_to_plan in ["task", "checkpoint", "prohibition", "user_setup"] { + kinds.push(kind( + "task", + Some("plan"), + vec![ + reference("plan", "plan"), + json!({"name": "reversibility", "field_type": "block", + "members": [reference("settled_by", "decision")]}), + ], + )); + for belongs_to_plan in ["checkpoint", "prohibition", "user_setup"] { kinds.push(kind( belongs_to_plan, Some("plan"), @@ -173,7 +199,6 @@ pub fn gsd_judged_wire() -> Value { "pattern", "pitfall", "dont_hand_roll", - "open_question", ] { kinds.push(kind( of_research, @@ -181,6 +206,14 @@ pub fn gsd_judged_wire() -> Value { vec![reference("research", "research")], )); } + kinds.push(kind( + "open_question", + Some("research"), + vec![ + reference("research", "research"), + reference("resolved_by", "decision"), + ], + )); Value::Array(kinds) } @@ -277,7 +310,7 @@ pub fn declare_gsd_judged(c: &mut ContributionsBuilder) { a.description("Judges what a rule asks of it"); }); } - // `workflow.plan_check`: while it is false the plan-check rules are gated and never evaluated (K6, K7 U10). + // `workflow.plan_check`: while it is false the plan-check rules are gated and never evaluated. c.setting("plan_check", |s| { s.bool() .default(true) diff --git a/crates/session/project/tests/check_passes.rs b/crates/session/project/tests/check_passes.rs index 3be613f8b9..ed0773aff5 100644 --- a/crates/session/project/tests/check_passes.rs +++ b/crates/session/project/tests/check_passes.rs @@ -445,6 +445,7 @@ fn a_pass_finding_with_a_code_it_may_not_use_is_reported() { docs: None, machine: false, reported_while: None, + settled_later: false, }], ) .unwrap(); @@ -524,6 +525,7 @@ fn a_pass_finding_of_a_machine_code_is_marked_machine() { docs: None, machine, reported_while: None, + settled_later: false, }; let mut book = specforge_diagnostics::Codebook::default(); book.add("@acme/links", vec![code("W950", false), code("W951", true)]) diff --git a/crates/session/project/tests/context_records.rs b/crates/session/project/tests/context_records.rs index ee85119184..0338dfdde1 100644 --- a/crates/session/project/tests/context_records.rs +++ b/crates/session/project/tests/context_records.rs @@ -1,12 +1,13 @@ //! The records a context route keeps of its pack (ADR 0356 D12): the GSD-shaped executor route records the plan's //! `context_pack` and raises `gsd/W910` when the pack it recorded has moved, when it reaches no subject or several, or -//! when its core outgrew the recorded budget; the plan's owner gate decides when it is checked, and a check evaluates -//! one pack per record and none without one. +//! when its core outgrew the cap it states; a record that states no cap is read again under the route's allowance; the +//! plan's owner gate decides when it is checked, and a check evaluates one pack per record and none without one. use std::sync::Arc; use serde_json::json; use specforge_common::{Diagnostic, DiagnosticData, Severity}; +use specforge_emitter::pack::Budget; use specforge_emitter::{EmitFormat, generate_schema}; use specforge_project::context::{pack, testing::packs_evaluated}; use specforge_project::testing::{ @@ -35,7 +36,6 @@ fn runtime(complete: &[&str]) -> SharedRuntime { let mut c = gsd_context_builder(); c.context("requirement-pack", |r| { r.subject("requirement") - .budget(2000) .core("requirement", "self") .record("plan.context_pack", "self.requirements") .stale(CONTEXT_STALE); @@ -55,8 +55,13 @@ fn runtime(complete: &[&str]) -> SharedRuntime { Arc::new(runtime) } -/// The digest the executor's pack of the plan has at `budget` in `project`. +/// The digest the executor's pack of the plan has under the cap `budget` in `project`. fn digest_at(project: &TestProject, budget: usize) -> String { + digest_under(project, Budget::Cap(budget)) +} + +/// The digest the executor's pack of the plan has under `budget` in `project`. +fn digest_under(project: &TestProject, budget: Budget) -> String { let compiled = project.compile_in(runtime(&[])); let route = compiled .environment() @@ -166,8 +171,8 @@ fn a_pending_gate_checks_a_record_only_while_its_owner_is_open() { } #[specforge_test(requirement = "FEATURE-012")] -fn a_record_whose_subject_is_gone_or_whose_core_outgrew_its_budget_is_stale() { - // Over its budget: the core of the executor's pack is far above ten tokens. +fn a_record_whose_subject_is_gone_or_whose_core_outgrew_its_stated_cap_is_stale() { + // Over its stated cap: the core of the executor's pack is far above ten tokens. let project = recording( gsd_context_project(), &record("gsd/executor", "sha256:0", 10), @@ -211,6 +216,29 @@ fn a_record_whose_subject_is_gone_or_whose_core_outgrew_its_budget_is_stale() { ); } +#[specforge_test(requirement = "FEATURE-012")] +fn a_record_that_states_no_cap_is_read_under_the_routes_allowance_and_stale_only_when_moved() { + // The executor route's allowance is 6000 tokens: a record of the default read holds no cap. + let digest = digest_under(&gsd_context_project(), Budget::Allowance(6000)); + let project = recording( + gsd_context_project(), + &format!("{{ route \"gsd/executor\" digest \"{digest}\" }}"), + runtime(&[]), + ); + let before = packs_evaluated(); + let fresh = project.compile_in(runtime(&[])); + assert_eq!(packs_evaluated() - before, 1, "the record is read"); + assert!(stale(&fresh).is_empty(), "{:?}", stale(&fresh)); + moved(&project); + let found = stale(&project.compile_in(runtime(&[]))); + assert_eq!(found.len(), 1, "{found:?}"); + assert!( + found[0].message.contains("has moved"), + "{}", + found[0].message + ); +} + #[specforge_test(requirement = "FEATURE-012")] fn a_check_evaluates_one_pack_per_record_and_none_without_records() { let bare = gsd_context_project(); diff --git a/crates/session/project/tests/judged.rs b/crates/session/project/tests/judged.rs index 9577b8989e..05935c61f3 100644 --- a/crates/session/project/tests/judged.rs +++ b/crates/session/project/tests/judged.rs @@ -282,7 +282,7 @@ fn a_stale_verdict_names_the_inputs_that_changed() { ); let (state, changed) = judgement(&compile(&project), PLAN, W311); assert_eq!(state, "stale"); - assert_eq!(changed, ["decisions"]); + assert_eq!(changed, ["phase_decisions"]); } #[specforge_test(requirement = "FEATURE-058")] diff --git a/crates/session/project/tests/judged_checked.rs b/crates/session/project/tests/judged_checked.rs index ee9f209400..c172da0b44 100644 --- a/crates/session/project/tests/judged_checked.rs +++ b/crates/session/project/tests/judged_checked.rs @@ -31,7 +31,7 @@ fn decision(project: &TestProject) -> String { let decisions = now .reports .iter() - .find(|r| r.name == "decisions") + .find(|r| r.name == "phase_decisions") .expect("an input"); decisions.members[0].clone() } @@ -68,13 +68,13 @@ fn an_entity_without_checked_values_digests_as_before() { let decisions = now .reports .iter() - .find(|r| r.name == "decisions") + .find(|r| r.name == "phase_decisions") .expect("an input"); assert_eq!(decisions.digest, PINNED_DECISIONS); assert!(now.unchecked.is_empty()); } -/// The `decisions` digest of the fixture plan, taken from this code, which builds the same bytes as before checked +/// The `phase_decisions` digest of the fixture plan, taken from this code, which builds the same bytes as before checked /// values existed (an entity with none digests as `[digest, id]`). That those bytes did not move is held by the /// committed verdicts of `gsd/parity/fixtures/taskboard/spec/plans.spec`, which /// `gsd/core/tests/cli/parity_verify.rs` (`the_twin_holds_its_verifier_verdicts`) still judges fresh. @@ -94,7 +94,7 @@ fn a_checked_value_turning_404_stales_the_verdict() { let (state, changed) = judgement(&stale, PLAN, W311); assert_eq!( (state.as_str(), changed.as_slice()), - ("stale", ["decisions".to_string()].as_slice()) + ("stale", ["phase_decisions".to_string()].as_slice()) ); } @@ -134,8 +134,8 @@ fn an_unknown_outcome_is_skipped_like_a_missing_report_and_i207() { let now = specforge_project::judged::inputs(&offline, &PlainDisk, PLAN, rule, &Cited::default()) .expect("W311 judges the plan"); - assert_eq!(now.unchecked, ["decisions"]); - assert!(now.unjudged.contains(&"decisions".to_string())); + assert_eq!(now.unchecked, ["phase_decisions"]); + assert!(now.unjudged.contains(&"phase_decisions".to_string())); } #[specforge_test(requirement = "FEATURE-058")] @@ -399,7 +399,7 @@ fn a_cached_baseline_judges_a_probe_the_journal_answers_later() { assert!(!Arc::ptr_eq(&unjudged, &judged), "compiled again"); assert_eq!( state(&judged), - ("stale".to_string(), vec!["decisions".to_string()]) + ("stale".to_string(), vec!["phase_decisions".to_string()]) ); assert!(Arc::ptr_eq(&judged, &at_commit()), "and cached again"); } diff --git a/crates/session/project/tests/main.rs b/crates/session/project/tests/main.rs index bdac32f5a7..ae9cb7276f 100644 --- a/crates/session/project/tests/main.rs +++ b/crates/session/project/tests/main.rs @@ -81,6 +81,7 @@ mod source_hops; mod structural_checks; mod symlinked_directory; mod test_report_passes; +mod twin_declaration; mod typed_fields; mod unresolved_cascade; mod update_bracket; diff --git a/crates/session/project/tests/namespaced_codes.rs b/crates/session/project/tests/namespaced_codes.rs index 070965fb94..afcc0c7595 100644 --- a/crates/session/project/tests/namespaced_codes.rs +++ b/crates/session/project/tests/namespaced_codes.rs @@ -19,6 +19,7 @@ fn findings( docs: None, machine: false, reported_while: None, + settled_later: false, }], ) .unwrap(); diff --git a/crates/session/project/tests/snapshots/tests__pass_inputs__check.snap b/crates/session/project/tests/snapshots/tests__pass_inputs__check.snap index ae673389ec..9086170da1 100644 --- a/crates/session/project/tests/snapshots/tests__pass_inputs__check.snap +++ b/crates/session/project/tests/snapshots/tests__pass_inputs__check.snap @@ -24,6 +24,7 @@ expression: check "start_line": 1 }, "testable": false, + "title": "One", "values": { "meta": { "owner": "ann" @@ -55,6 +56,7 @@ expression: check "start_line": 7 }, "testable": false, + "title": "Two", "verify_kinds": [], "verify_texts": [] } diff --git a/crates/session/project/tests/snapshots/tests__pass_inputs__compute.snap b/crates/session/project/tests/snapshots/tests__pass_inputs__compute.snap index a7edec862e..635fb36c4a 100644 --- a/crates/session/project/tests/snapshots/tests__pass_inputs__compute.snap +++ b/crates/session/project/tests/snapshots/tests__pass_inputs__compute.snap @@ -24,6 +24,7 @@ expression: compute "start_line": 1 }, "testable": false, + "title": "One", "values": { "meta": { "owner": "ann" @@ -55,6 +56,7 @@ expression: compute "start_line": 7 }, "testable": false, + "title": "Two", "verify_kinds": [], "verify_texts": [] } diff --git a/crates/session/project/tests/snapshots/tests__pass_inputs__guard.snap b/crates/session/project/tests/snapshots/tests__pass_inputs__guard.snap index d8712a2175..cfebe6f03b 100644 --- a/crates/session/project/tests/snapshots/tests__pass_inputs__guard.snap +++ b/crates/session/project/tests/snapshots/tests__pass_inputs__guard.snap @@ -24,6 +24,7 @@ expression: guard "start_line": 1 }, "testable": false, + "title": "One", "values": { "meta": { "owner": "ann" @@ -55,6 +56,7 @@ expression: guard "start_line": 7 }, "testable": false, + "title": "Two", "verify_kinds": [], "verify_texts": [] } diff --git a/crates/session/project/tests/snapshots/tests__registry_build_snapshot__all_builtins_gsd.snap b/crates/session/project/tests/snapshots/tests__registry_build_snapshot__all_builtins_gsd.snap index 65726cd30f..8bbfbaa47e 100644 --- a/crates/session/project/tests/snapshots/tests__registry_build_snapshot__all_builtins_gsd.snap +++ b/crates/session/project/tests/snapshots/tests__registry_build_snapshot__all_builtins_gsd.snap @@ -5738,22 +5738,6 @@ expression: "digest(&load(&runtime, &gsd))" "source_extension": "@gsd/core", "target_kind": null }, - "milestone.name": { - "derived_from": null, - "description": "MVP", - "edge": null, - "exempts_obligations": false, - "field_name": "name", - "field_type": "String", - "headline": false, - "inverse_of": null, - "kind_name": "milestone", - "normative": false, - "proof_role": null, - "required": true, - "source_extension": "@gsd/core", - "target_kind": null - }, "milestone.progress": { "derived_from": null, "description": "state json's `progress`: its phases and plans, and the smaller of the two fractions as a percent", @@ -6746,22 +6730,6 @@ expression: "digest(&load(&runtime, &gsd))" "source_extension": "@gsd/core", "target_kind": null }, - "phase.name": { - "derived_from": null, - "description": "heading text", - "edge": null, - "exempts_obligations": false, - "field_name": "name", - "field_type": "String", - "headline": false, - "inverse_of": null, - "kind_name": "phase", - "normative": false, - "proof_role": null, - "required": true, - "source_extension": "@gsd/core", - "target_kind": null - }, "phase.plans_complete": { "derived_from": null, "description": "Progress: Plans Complete, N/M", @@ -11596,7 +11564,6 @@ expression: "digest(&load(&runtime, &gsd))" "milestone.first_commit": "string", "milestone.git_range": "string", "milestone.goal": "string", - "milestone.name": "string", "milestone.progress": "block", "milestone.shipped": "date", "milestone.state": "enum (planned, in_progress, shipped, abandoned)", @@ -11659,7 +11626,6 @@ expression: "digest(&load(&runtime, &gsd))" "phase.inserted": "bool", "phase.milestone": "reference", "phase.mode": "enum (standard, mvp)", - "phase.name": "string", "phase.plans_complete": "string", "phase.requirements": "reference_list", "phase.slug": "string", @@ -13355,7 +13321,7 @@ expression: "digest(&load(&runtime, &gsd))" { "arg_type": "integer", "default_value": null, - "description": "the budget of the executor pack it records (default: the route's own)", + "description": "a cap on the executor pack it records, refused below its core (default: none, the core whole and the route's allowance)", "name": "max_tokens", "required": false } @@ -13984,7 +13950,7 @@ expression: "digest(&load(&runtime, &gsd))" { "arg_type": "string", "default_value": null, - "description": "the phase's name (required to add or insert)", + "description": "the phase's name, its title (required to add or insert; editing it retitles the phase)", "name": "name", "required": false }, @@ -15288,8 +15254,20 @@ expression: "digest(&load(&runtime, &gsd))" "selector": "self.phase; + +/// Each `(name, selector)` of the plan check `declaration` declares, and its plan checker's route: the allowance and +/// each section's `(name, selector)`, every one core. +fn plan_check(declaration: &ExtensionDeclaration) -> (Named, u32, Named) { + let judged = declaration + .validation_rules + .iter() + .filter_map(|rule| rule.judged.as_ref()) + .find(|judged| judged.judge == "gsd-plan-checker") + .expect("the plan check"); + let inputs = judged.targets[0] + .inputs + .iter() + .map(|input| (input.name.clone(), input.selector.clone())) + .collect(); + let route = declaration + .contexts + .iter() + .find(|route| route.name == "plan-checker") + .expect("the plan checker's route"); + assert!( + route.sections.iter().all(|s| s.tier == ContextTier::Core), + "{route:?}" + ); + let sections = route + .sections + .iter() + .map(|s| (s.name.clone(), s.selector.clone())) + .collect(); + (inputs, route.budget, sections) +} + +#[test] +fn the_twin_declares_the_shipped_plan_check() { + let shipped = pinned_builtin_declarations() + .expect("the pinned declarations") + .into_iter() + .find(|declaration| declaration.name() == "@gsd/core") + .expect("@gsd/core is a builtin"); + let twin = plan_check(&gsd_context_builder().declaration()); + let expected: Named = PLAN_CHECK_INPUTS + .iter() + .map(|(name, selector)| (name.to_string(), selector.to_string())) + .collect(); + assert_eq!(twin.0, expected); + assert_eq!(plan_check(&shipped), twin); + assert_eq!( + twin.1, 0, + "a route of core sections only allows nothing beyond them" + ); + assert_eq!(twin.2, expected, "the route serves what the check reads"); +} diff --git a/crates/surfaces/cli/src/context.rs b/crates/surfaces/cli/src/context.rs index c202d96fab..b9b6eb6092 100644 --- a/crates/surfaces/cli/src/context.rs +++ b/crates/surfaces/cli/src/context.rs @@ -19,9 +19,10 @@ pub(crate) struct Args { /// The entity to read it for: one of the route's subject kind subject: String, - /// Token budget for the pack (default: the route's own). The subject and the core sections are never cut, and a - /// budget below them fails (E062); enrich sections are served whole in declared order, the first that does not fit - /// keeps its most connected entities that fit, and the pack lists what was cut under `budget` + /// A cap on the whole pack. Without one, the subject and the core sections are served whole whatever they cost, + /// and enrich sections fill the route's allowance beyond them; a cap below the core fails (E062). Enrich sections + /// are served whole in declared order, the first that does not fit keeps its most connected entities that fit, and + /// the pack lists what was cut, and the cap it was fitted to, under `budget` #[arg(long)] max_tokens: Option, @@ -34,8 +35,8 @@ pub(crate) struct Args { format: Format, /// Record the pack on ENTITY, a kind the route records whose subject is : the host writes the route, the - /// pack's digest and its budget, with its ledger line, then prints the pack it recorded (in the context format, - /// which a record is fitted in) + /// pack's digest and the cap `--max-tokens` states, if any, with its ledger line, then prints the pack it recorded + /// (in the context format, which a record is fitted in) #[arg(long, value_name = "ENTITY", conflicts_with = "format")] record: Option, diff --git a/crates/surfaces/cli/src/main.rs b/crates/surfaces/cli/src/main.rs index 13b3e71068..709b86d992 100644 --- a/crates/surfaces/cli/src/main.rs +++ b/crates/surfaces/cli/src/main.rs @@ -116,8 +116,8 @@ enum Commands { Query(query::Args), /// Show an entity's thread along its kind's route, its traceability chain, or every entity's Trace(trace::Args), - /// Read the context a route of an extension declares for one entity: its sections fitted to a token budget in - /// declared order, with a digest + /// Read the context a route of an extension declares for one entity: its core sections whole, then its enrich + /// sections in declared order within the route's allowance, with a digest Context(context::Args), /// Format .spec files Format(format::Args), diff --git a/crates/surfaces/cli/src/snapshots/specforge__tests__help_context.snap b/crates/surfaces/cli/src/snapshots/specforge__tests__help_context.snap index d8a62909ac..a984eebe88 100644 --- a/crates/surfaces/cli/src/snapshots/specforge__tests__help_context.snap +++ b/crates/surfaces/cli/src/snapshots/specforge__tests__help_context.snap @@ -2,7 +2,7 @@ source: crates/surfaces/cli/src/main.rs expression: command.clone().render_long_help().to_string() --- -Read the context a route of an extension declares for one entity: its sections fitted to a token budget in declared order, with a digest +Read the context a route of an extension declares for one entity: its core sections whole, then its enrich sections in declared order within the route's allowance, with a digest Usage: specforge context [OPTIONS] @@ -15,7 +15,7 @@ Arguments: Options: --max-tokens - Token budget for the pack (default: the route's own). The subject and the core sections are never cut, and a budget below them fails (E062); enrich sections are served whole in declared order, the first that does not fit keeps its most connected entities that fit, and the pack lists what was cut under `budget` + A cap on the whole pack. Without one, the subject and the core sections are served whole whatever they cost, and enrich sections fill the route's allowance beyond them; a cap below the core fails (E062). Enrich sections are served whole in declared order, the first that does not fit keeps its most connected entities that fit, and the pack lists what was cut, and the cap it was fitted to, under `budget` --format Format of the pack's graph @@ -28,7 +28,7 @@ Options: [default: context] --record - Record the pack on ENTITY, a kind the route records whose subject is : the host writes the route, the pack's digest and its budget, with its ledger line, then prints the pack it recorded (in the context format, which a record is fitted in) + Record the pack on ENTITY, a kind the route records whose subject is : the host writes the route, the pack's digest and the cap `--max-tokens` states, if any, with its ledger line, then prints the pack it recorded (in the context format, which a record is fitted in) --path A path inside the project (the nearest directory at or above it holding specforge.json; none: the directory itself, with the default configuration) diff --git a/crates/surfaces/cli/src/snapshots/specforge__tests__help_root.snap b/crates/surfaces/cli/src/snapshots/specforge__tests__help_root.snap index 66011b548b..930d9fa957 100644 --- a/crates/surfaces/cli/src/snapshots/specforge__tests__help_root.snap +++ b/crates/surfaces/cli/src/snapshots/specforge__tests__help_root.snap @@ -15,7 +15,7 @@ Commands: outline Render the extension architecture (dependencies, enhancements, contributions) query Query the graph at multiple resolutions trace Show an entity's thread along its kind's route, its traceability chain, or every entity's - context Read the context a route of an extension declares for one entity: its sections fitted to a token budget in declared order, with a digest + context Read the context a route of an extension declares for one entity: its core sections whole, then its enrich sections in declared order within the route's allowance, with a digest format Format .spec files stats Show project statistics explore Where to start reading the graph: starting points, hubs and unconnected entities diff --git a/crates/surfaces/lsp/tests/hover_declared.rs b/crates/surfaces/lsp/tests/hover_declared.rs index 5df1367822..f6bea42bc1 100644 --- a/crates/surfaces/lsp/tests/hover_declared.rs +++ b/crates/surfaces/lsp/tests/hover_declared.rs @@ -18,6 +18,7 @@ fn hover_explains_a_third_party_code() { docs: Some("https://greet.dev/codes#e901".into()), machine: false, reported_while: None, + settled_later: false, }], ) .unwrap(); diff --git a/crates/surfaces/mcp/src/tool/tests.rs b/crates/surfaces/mcp/src/tool/tests.rs index d0cfa5922b..e5bea36a10 100644 --- a/crates/surfaces/mcp/src/tool/tests.rs +++ b/crates/surfaces/mcp/src/tool/tests.rs @@ -215,6 +215,7 @@ fn a_result_meta_titles_a_code_from_the_project_code_book() { docs: None, machine: false, reported_while: None, + settled_later: false, }], ) .unwrap(); diff --git a/crates/surfaces/mcp/src/tools/context.rs b/crates/surfaces/mcp/src/tools/context.rs index fb56521529..0f492c5b74 100644 --- a/crates/surfaces/mcp/src/tools/context.rs +++ b/crates/surfaces/mcp/src/tools/context.rs @@ -16,7 +16,8 @@ pub struct Args { route: String, /// The entity to read it for: one of the route's subject kind subject: String, - /// The token budget (default: the route's own); the subject and the core sections are never cut + /// A cap on the whole pack, refused below the subject and the core sections; without one they are served whole and + /// enrich sections fill the route's allowance max_tokens: Option, /// Format of the pack's graph #[arg(choice = specforge_ops::read::context::PACK_FORMAT)] @@ -37,7 +38,7 @@ impl ArgumentOf for Tool { impl CoreTool for Tool { const NAME: &'static str = "specforge.context"; - const DESCRIPTION: &'static str = "Read the context a route declares for one entity: its sections in declared order under a token budget, with a digest"; + const DESCRIPTION: &'static str = "Read the context a route declares for one entity: its core sections whole, then its enrich sections in declared order within the route's allowance, with a digest"; const EFFECT: Effect = Effect::Reads { group: ToolGroup::Core, }; diff --git a/crates/surfaces/mcp/tests/snapshots/tests__tool_arguments__core_tool_listing_today.snap b/crates/surfaces/mcp/tests/snapshots/tests__tool_arguments__core_tool_listing_today.snap index 0d071e363c..b266007a74 100644 --- a/crates/surfaces/mcp/tests/snapshots/tests__tool_arguments__core_tool_listing_today.snap +++ b/crates/surfaces/mcp/tests/snapshots/tests__tool_arguments__core_tool_listing_today.snap @@ -2046,7 +2046,7 @@ expression: listing }, { "name": "specforge.context", - "description": "Read the context a route declares for one entity: its sections in declared order under a token budget, with a digest", + "description": "Read the context a route declares for one entity: its core sections whole, then its enrich sections in declared order within the route's allowance, with a digest", "inputSchema": { "additionalProperties": false, "properties": { @@ -2062,7 +2062,7 @@ expression: listing "type": "string" }, "max_tokens": { - "description": "The token budget (default: the route's own); the subject and the core sections are never cut", + "description": "A cap on the whole pack, refused below the subject and the core sections; without one they are served whole and enrich sections fill the route's allowance", "minimum": 0, "type": "integer" }, diff --git a/docs/adr/0019-one-entity-snapshot-per-compile.md b/docs/adr/0019-one-entity-snapshot-per-compile.md index 036d313320..c6caf9a778 100644 --- a/docs/adr/0019-one-entity-snapshot-per-compile.md +++ b/docs/adr/0019-one-entity-snapshot-per-compile.md @@ -1,6 +1,6 @@ # One entity snapshot per compile -**Status:** accepted (2026-10-06). Extended by [ADR 0287](0287-who-writes-a-field-is-declared.md) (computed records join the snapshot). Amended by [ADR 0269](0269-the-formal-pass-reads-the-hosts-coverage-verdict.md): the formal pass reads the pass entity's counting facts unaltered, as every pass does. Amended by [ADR 0270](0270-an-edge-from-an-entity-to-itself-counts-in-no-edge-count.md) (an entity's edge counts leave out an edge from it to itself). Extended by [ADR 0219](0219-a-parsed-block-answers-its-body-shape.md): the union exemption reads the parse's answer (`FieldMap::is_union`). Amended by [ADR 0215](0215-a-field-written-twice-is-decided-by-the-graph-build.md) (a name written twice in one block is E081; every reader reads its first entry, the only one the node holds). Amended by [ADR 0094](0094-obligations-are-an-entitys-own-member.md) (field text has no statement row) and [ADR 0093](0093-a-fields-declared-type-decides-what-its-value-references.md) (the field text of an open-fields kind's list). Amended by [ADR 0107](0107-the-checks-read-through-the-disk-they-are-given.md) (`RuleInput` carries the disk the checks read through). Placement reopened by [ADR 0115](0115-the-entity-snapshot-is-made-in-the-registry.md): the snapshot is made in the registry crate, which depends on the graph. Amended by [ADR 0117](0117-a-reference-is-decided-in-the-linker.md) (the record holds no references; the snapshot keeps them for the validator context). Amended by [ADR 0216](0216-a-coverage-status-says-whether-its-entity-counts.md) (`Standing::status`; `Standing::exempt` is gone). Extended by [ADR 0228](0228-a-fields-text-is-read-by-the-field-text-rule.md): the read views read the field text too. Extended by [ADR 0290](0290-a-judged-rule-holds-while-a-fresh-verdict-says-so.md) (the snapshot's kinds are judged by verdicts). Amended by [ADR 0353](0353-a-pass-reads-the-facts-it-declares.md) (a pass is sent the authored entities and the facts of the kinds it declares; a rule that names no kind judges no fact). +**Status:** accepted (2026-10-06). Extended by [ADR 0287](0287-who-writes-a-field-is-declared.md) (computed records join the snapshot). Amended by [ADR 0269](0269-the-formal-pass-reads-the-hosts-coverage-verdict.md): the formal pass reads the pass entity's counting facts unaltered, as every pass does. Amended by [ADR 0270](0270-an-edge-from-an-entity-to-itself-counts-in-no-edge-count.md) (an entity's edge counts leave out an edge from it to itself). Extended by [ADR 0219](0219-a-parsed-block-answers-its-body-shape.md): the union exemption reads the parse's answer (`FieldMap::is_union`). Amended by [ADR 0215](0215-a-field-written-twice-is-decided-by-the-graph-build.md) (a name written twice in one block is E081; every reader reads its first entry, the only one the node holds). Amended by [ADR 0094](0094-obligations-are-an-entitys-own-member.md) (field text has no statement row) and [ADR 0093](0093-a-fields-declared-type-decides-what-its-value-references.md) (the field text of an open-fields kind's list). Amended by [ADR 0107](0107-the-checks-read-through-the-disk-they-are-given.md) (`RuleInput` carries the disk the checks read through). Placement reopened by [ADR 0115](0115-the-entity-snapshot-is-made-in-the-registry.md): the snapshot is made in the registry crate, which depends on the graph. Amended by [ADR 0117](0117-a-reference-is-decided-in-the-linker.md) (the record holds no references; the snapshot keeps them for the validator context). Amended by [ADR 0216](0216-a-coverage-status-says-whether-its-entity-counts.md) (`Standing::status`; `Standing::exempt` is gone). Extended by [ADR 0228](0228-a-fields-text-is-read-by-the-field-text-rule.md): the read views read the field text too. Extended by [ADR 0290](0290-a-judged-rule-holds-while-a-fresh-verdict-says-so.md) (the snapshot's kinds are judged by verdicts). Amended by [ADR 0353](0353-a-pass-reads-the-facts-it-declares.md) (a pass is sent the authored entities and the facts of the kinds it declares; a rule that names no kind judges no fact). Extended by [ADR 0387](0387-a-phase-is-named-by-its-title-alone-and-a-pass-reads-each-entitys-title.md) (the record, and the pass entity read from it, carry the entity's title). Every check that runs after the graph build read graph nodes its own way. Three walks flattened a node's fields: `entity_views` for the registry checks, `build_validation_entities` for the rules and diff --git a/docs/adr/0286-a-diagnostic-code-is-namespaced-by-its-extension.md b/docs/adr/0286-a-diagnostic-code-is-namespaced-by-its-extension.md index d1eb785eaf..0feeda4045 100644 --- a/docs/adr/0286-a-diagnostic-code-is-namespaced-by-its-extension.md +++ b/docs/adr/0286-a-diagnostic-code-is-namespaced-by-its-extension.md @@ -6,6 +6,8 @@ amends its D1 to D3. Extended by [ADR 0288](0288-an-extensions-settings-are-type D2 and D3 amended by [ADR 0328](0328-a-builtin-is-embedded-and-a-non-specforge-builtin-catalogues-its-codes.md): "first party" is the `@specforge/` scope; a builtin outside it catalogues its codes and prints them namespaced. Extended by [ADR 0363](0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md): a `codes` entry may declare `reported_while`, the owner state its findings wait for. +Extended by [ADR 0385](0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md): a `codes` entry may declare `settled_later`, a finding a later step of the +authoring settles. ## Context diff --git a/docs/adr/0297-a-judged-rules-finding-is-not-an-error-a-write-adds.md b/docs/adr/0297-a-judged-rules-finding-is-not-an-error-a-write-adds.md index 876b15485e..a62f8602df 100644 --- a/docs/adr/0297-a-judged-rules-finding-is-not-an-error-a-write-adds.md +++ b/docs/adr/0297-a-judged-rules-finding-is-not-an-error-a-write-adds.md @@ -3,7 +3,9 @@ **Status:** accepted (2026-10-29, kernel round K17, plan 07b). Extends [ADR 0290](0290-a-judged-rule-holds-while-a-fresh-verdict-says-so.md) and [ADR 0289](0289-an-extension-writes-through-an-edit-plan-the-host-applies.md). Amends [ADR 0151](0151-a-spec-file-is-changed-by-a-typed-edit.md) (D3), [ADR 0167](0167-a-typed-edit-is-compared-with-the-checked-report.md) -and [ADR 0211](0211-a-migration-is-judged-by-the-errors-it-adds-whatever-its-graph.md). No protocol change. Amended by [ADR 0302](0302-a-judged-finding-is-the-judged-evaluations-own-and-an-extensions-finding-is-paired-by-its-subject.md) (a judged finding is the evaluation's own) and [ADR 0303](0303-a-collectors-plan-is-judged-for-host-errors-only.md) (a collector's plan is judged for host errors only). D1 amended by [ADR 0363](0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md): a finding a write revealed, by moving its entity into the owner state its code waits for, is no error it adds either. +and [ADR 0211](0211-a-migration-is-judged-by-the-errors-it-adds-whatever-its-graph.md). No protocol change. Amended by [ADR 0302](0302-a-judged-finding-is-the-judged-evaluations-own-and-an-extensions-finding-is-paired-by-its-subject.md) (a judged finding is the evaluation's own) and [ADR 0303](0303-a-collectors-plan-is-judged-for-host-errors-only.md) (a collector's plan is judged for host errors only). D1 amended by [ADR 0363](0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md): a finding a write revealed, by moving its entity into the owner state its code waits for, is no error it adds either. D1 amended by +[ADR 0385](0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md): nor is a settled-later finding on an entity the write creates, +or creates something under, when it alters nothing held there. ## Context diff --git a/docs/adr/0356-an-extension-declares-the-context-a-role-reads.md b/docs/adr/0356-an-extension-declares-the-context-a-role-reads.md index 473c902aff..3af048184f 100644 --- a/docs/adr/0356-an-extension-declares-the-context-a-role-reads.md +++ b/docs/adr/0356-an-extension-declares-the-context-a-role-reads.md @@ -9,6 +9,10 @@ the catalogue row `context`). Amends [ADR 0050](0050-the-guest-wire-carries-only categories from 2.1) and [ADR 0024](0024-one-mcp-request-pipeline.md) D4 (`context/{+entity_id}` with `role` is the role's pack). Reopens [ADR 0190](0190-a-read-selection-decides-what-the-read-covers.md) through its clause: a pack's budget ranks by declared section order; R4 holds. An item of extension protocol 2.1.0, which ADR 0334 takes. +D2, D4, D5, D11, D12 and the Consequences line on a route's budget amended by +[ADR 0386](0386-a-context-pack-serves-its-core-whole-and-a-routes-budget-is-its-enrich-allowance.md): a read +that states no cap serves the core whole, a route's budget is its enrich allowance, and E062 is a stated cap below +the core. ## Context diff --git a/docs/adr/0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md b/docs/adr/0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md index c4b0fdab4e..1f2ec23700 100644 --- a/docs/adr/0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md +++ b/docs/adr/0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md @@ -5,7 +5,9 @@ [ADR 0286](0286-a-diagnostic-code-is-namespaced-by-its-extension.md) (a `codes` entry may declare `reported_while`). Extends [ADR 0362](0362-a-judged-target-may-wait-for-its-owner-state.md) from a judged target to a code, on the owner state of [ADR 0329](0329-code-core-holds-test-facts-and-their-ids.md) D4. Protocol 2.2.0, unreleased: the addition goes -into the 2.2.0 row, no bump. The wire and the SDK change, so the builtins are re-vendored. +into the 2.2.0 row, no bump. The wire and the SDK change, so the builtins are re-vendored. D3 amended by +[ADR 0385](0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md): a settled-later finding on an entity the write creates, or creates +something under, altering nothing held there, is no added error either. ## Context diff --git a/docs/adr/0371-links-come-from-gsds-fields-and-collected-data.md b/docs/adr/0371-links-come-from-gsds-fields-and-collected-data.md index bac7f25523..b252520c32 100644 --- a/docs/adr/0371-links-come-from-gsds-fields-and-collected-data.md +++ b/docs/adr/0371-links-come-from-gsds-fields-and-collected-data.md @@ -150,6 +150,10 @@ status on the start line. No kernel change is made in this milestone. Two reason ## D8. The judged inputs and the context packs +Amended by [ADR 0386](0386-a-context-pack-serves-its-core-whole-and-a-routes-budget-is-its-enrich-allowance.md): the +plan check reads `phase_decisions`, `quick_decisions`, `project_decisions`, `resolved_decisions` and +`settled_decisions` instead of `all_decisions`, 14 inputs. + The plan check's `decisions` input goes. `phase_decisions` and `all_decisions` stay, so the checker still sees every decision, and the plan check reads 11 inputs. The executor's `decisions` context section goes: the phase's context decisions are in its `context` section, which is enriching, so a small budget may cut them, and that is accepted. The diff --git a/docs/adr/0372-the-converter-gives-every-old-kind-one-fate-and-writes-gsds-ids.md b/docs/adr/0372-the-converter-gives-every-old-kind-one-fate-and-writes-gsds-ids.md index 314296b7e4..3183d6c262 100644 --- a/docs/adr/0372-the-converter-gives-every-old-kind-one-fate-and-writes-gsds-ids.md +++ b/docs/adr/0372-the-converter-gives-every-old-kind-one-fate-and-writes-gsds-ids.md @@ -14,6 +14,10 @@ bound is part of a requirement's text). No protocol, SDK or kernel change comes not change, and no builtin is re-vendored: the converter is `xtask/src/absorb/`. D8's root half retired by [ADR 0374](0374-the-root-spec-runs-on-gsd-core-and-its-tests-name-requirements.md) D7 after it last held. +D4 amended by [ADR 0387](0387-a-phase-is-named-by-its-title-alone-and-a-pass-reads-each-entitys-title.md): a +release's title is its milestone's title, and a listed milestone's title, less a leading `Phase N:`, is its phase's +title; no `name` is written. + ## Context **What was left.** ADR 0364 decided that the software kinds are dropped and that a census gives every old kind its diff --git a/docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md b/docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md index ecf52b5fa0..e66c2f28da 100644 --- a/docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md +++ b/docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md @@ -7,7 +7,9 @@ a judged rule's finding is not one), [ADR 0363](0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md) D3 (an entity a write creates reveals nothing) and the Not applicable table of [`gsd/core/spec/settings.md`](../../gsd/core/spec/settings.md#not-applicable). No protocol change, no kernel change, no -new code and no new setting. +new code and no new setting. Amended by +[ADR 0385](0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md) (a code may be +settled later): D1's reason reworded, D3 replaced, D4 amended and the Limits closed, in the kernel and in `@gsd/core`. ## Context @@ -35,47 +37,57 @@ planner fixes the list and sends the whole call again. A field the schema marks dependency found after the plans exist is linked. The other writers of a phase's plans (chunked single-plan mode, gap closure) use the same edit for the plans they -write. A quick plan, minted before its planner runs, is filled by typed edits: adding to an existing plan is not the -refused route. +write. A quick plan, minted before its planner runs, is filled by typed edits, its must-haves settling the mint's +`gsd/W309`. -The reason: coverage (`gsd/E301`) binds from a phase's first plan and, under gsd-strict, a plan's must-haves -(`gsd/W309`) from its first write, so the entities those rules judge together must arrive together. +The reason (reworded by ADR 0385): one edit is the atomic route. A phase's coverage (`gsd/E301`, `gsd/E310`) and, +under gsd-strict, its plans' must-haves (`gsd/W309`) hold from the edit that writes them, so the phase is never +half-planned. A plan written alone is accepted too: those codes are settled later, so the write reports them, `check` +fails on them until the rest of the phase is written, and `execute_phase` refuses the phase meanwhile. ## D2. The plan-phase steps commit the spec `commit_docs` is not a setting of `@gsd/core` (the Not applicable table): no step reads it, branches on it or asks for it. Each step that committed planning documents commits the spec files it changed, unconditionally, and a `specforge git commit` that finds nothing staged (`git_refused`, "nothing to commit") means an earlier commit of the -same run already holds them. A line naming `commit_docs`, or another key of its row of the Not applicable -table (`search_gitignored`, `pr_strict`), says it is not a setting here. +same run already holds them. A line naming `commit_docs`, or another key of the Not applicable table +(`search_gitignored`, `pr_strict`, `planning.sub_repos`, `graphify.*` and the other rows but the secrets one), says it +is not a setting here. The reason: the spec is source; a condition on an undeclared key is read differently by each agent. -## D3. An open question gsd-strict refuses is returned, and the user answers it +## D3. An open question is recorded open, and the user's answer resolves it -The researcher records every other item. A question the profile refuses with `gsd/W204` (no decision resolves it yet) -is not forced through with an invented decision and not dropped: it is returned under the research's Open Questions -with what is known, what is unclear and the recommendation. The workflow that ran the research (plan-phase, quick, -quick-batch) shows it and hands it to the planner, which records no decision for it and does not record it: it writes -plans that hold whatever the answer (a task that cannot follows a `decision` checkpoint) and lists the question in its -return. After the planner, the workflow asks the user and records the answer as a decision, then the question -resolved by it, the one order gsd-strict accepts. A question the user leaves open, and every one under `--auto`, is -shown as open and stays out of the graph. +Replaced by ADR 0385. The researcher records every open question open, with what is known, what is unclear and the +recommendation, and no `resolved_by`: it invents no decision, drops none and returns none in place of recording it. +`gsd/W204` is settled later, so the write is accepted and reports it. The workflow that ran the research (plan-phase, +quick, quick-batch) shows the questions and hands them to the planner, which records no decision for them: it writes +plans that hold whatever the answer (a task that cannot follows a `decision` checkpoint) and lists the questions in +its return. After the planner, the workflow asks the user, records the answer as a decision and sets it as the +question's `resolved_by`. A question the user leaves open, and every one under `--auto`, stays in the graph: under +gsd-strict `check` fails on it, and plan-phase's entry gate (`gsd/W204`) refuses the next run on the phase until it is +answered. -The reason: the decision that resolves a question is the user's answer. Neither agent may invent one, and the run lost -two questions the record should have kept. +The reason: the decision that resolves a question is the user's answer, and the question belongs in the record from +the moment it is found. The decision this replaces returned a question gsd-strict refused and recorded it only with +the answer, so a question left open was lost. ## D4. What does not change -E080 and what it counts; `gsd/W204`, `gsd/W309` and `gsd/E301` and their severity in each profile; the judged rules' -exemption; the gates of the plan prompts; the planner's git commit step. No CLI batch command and no new setting. +Amended by ADR 0385: E080 counts no settled-later finding on what a write creates, `@gsd/core` declares `gsd/W204`, +`gsd/E301`, `gsd/E310` and `gsd/W309` settled later (`gsd/E310` now on the phase, not the decision), and +`execute_phase` gates on `gsd/E301`, `gsd/E310` and `gsd/W309`. What still holds: those codes' severity in each +profile; the judged rules' exemption; the gates of the plan prompts; the planner's git commit step. No CLI batch +command and no new setting. -The reason: every refusal the run met was right about the project it would have left; the texts were wrong. +The reason: every refusal the run met was right about the project it would have left; the texts were wrong, and the +three no text could clear were answered in the kernel (ADR 0385). ## Rejected - **A CLI batch command.** A CLI and protocol change; MCP already has the atomic edit. -- **Keeping the per-plan route beside the edit.** It is refused in every profile for a phase's first plan. +- **Keeping the per-plan route beside the edit.** It was refused in every profile for a phase's first plan. Since + ADR 0385 a plan written alone is accepted, and chunked mode writes plan by plan; the edit stays the atomic route. - **Declaring `commit_docs` as a setting.** It would invent a mode in which the spec is not committed, which the Not applicable table rules out. - **Keeping the plan commit step's condition with a default.** An agent still reads a key nobody can set. @@ -89,20 +101,23 @@ The reason: every refusal the run met was right about the project it would have ## Limits -Three refusals no `@gsd/core` text can clear, each of the same shape: a rule a later step of the same workflow -settles, counted by E080 on the write that creates its entity. +Closed by ADR 0385. There were three refusals no `@gsd/core` text could clear, each of the same shape: a rule a later +step of the same workflow settles, counted by E080 on the write that creates its entity. Each write is accepted since, +its finding reported until the later step settles it: -- An open question at research time under gsd-strict (`gsd/W204`): returned, per D3, and recorded only with the - user's answer. Under `--auto`, or left open, it stays out of the graph. -- Chunked mode's first plan of a phase whose requirements span plans (`gsd/E301` in every profile): the planner - returns `## PLAN BLOCKED`, which chunked mode reads as blocked, not stalled, and it then offers to plan the rest of - the phase in one run, an edit of the plans the graph does not hold yet. -- Quick's plan mint under gsd-strict (`gsd/W309`): the mint writes the plan before its must-haves exist, so under - gsd-strict quick's and quick-batch's research and answer steps run only on a quick plan minted before the profile - was set. +- An open question at research time under gsd-strict (`gsd/W204`): recorded open, and resolved by the user's answer + later (`assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later`). +- Chunked mode's first plan of a phase whose requirements span plans (`gsd/E301` in every profile, and `gsd/E310` when + a later plan cites a decision of the phase's context): written, and the last plan settles the phase's coverage + (`assets_shell::planner_edit::a_phases_plans_written_one_at_a_time_are_each_accepted_and_the_last_settles_coverage`, + `assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles`); + `## PLAN BLOCKED` now means a refused call only. +- Quick's plan mint under gsd-strict (`gsd/W309`): written, and the planner's must-haves settle it + (`cmd_quick::a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict`). -The fix they share is a kernel one, outside this decision: E080 must not count, on a write, a finding a later step of -the same workflow settles. It is an owner question. +The fix they shared was a kernel one: E080 counts no settled-later finding on an entity the write creates or creates +something under, when it alters nothing held there (ADR 0385 D2). A phase left half-planned is refused by +`execute_phase` (`prompts_gates::e301_e310_w309_a_half_planned_phase_refuses_execute_phase`). ## What each decision becomes @@ -111,8 +126,8 @@ the same workflow settles. It is an owner question. | ADR or source | Decision | Outcome | Why | |---|---|---|---| | 0343 | D10 (a write is a typed edit or a `specforge.edit`) | kept, applied | a phase's plans are one edit (D1) | -| `gsd/core/spec/settings.md` | Not applicable (`commit_docs`) | kept, applied | every asset says so (D2) | -| 0363 | D3 (an entity a write creates reveals nothing) | kept | the Limits | +| `gsd/core/spec/settings.md` | Not applicable (every row but the secrets one) | kept, applied | every asset says so (D2) | +| 0363 | D3 (an entity a write creates reveals nothing) | kept | the Limits; ADR 0385 D3 keeps it too | | 0297 | Decision (a judged rule's finding is no added error) | kept | the plan edit adds only judged findings (D4) | ADR 0343: 1 kept. ADR 0363: 1 kept. ADR 0297: 1 kept. `gsd/core/spec/settings.md`: 1 kept. @@ -123,10 +138,11 @@ Each test fails when the decision or the limit it holds stops being true. They a | Decision or limit | Tests | |---|---| -| D1 | `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`, `assets_shell::planner_edit::a_dependency_found_later_is_linked`, `assets_shell::planner_edit::a_plan_written_alone_is_refused_and_nothing_is_written`, `assets_shell::planner_edit::the_plan_format_is_one_edit_of_the_whole_phase`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit` | -| D2 | `assets_shell::commits::the_plan_commit_step_commits_the_spec_and_an_empty_one_says_nothing_to_commit`, `settings_roster::the_plan_phase_family_reads_no_commit_docs`, `settings_roster::every_key_an_asset_calls_a_setting_is_a_key_of_the_roster`, `settings_roster::the_committed_spec_keys_are_named_only_as_not_a_setting_here`, `settings_roster::the_settings_workflow_counts_the_settings_of_its_section_layout`, `settings_roster::no_asset_makes_the_spec_commit_conditional_or_skips_an_ignored_spec`, `ported_text::every_setting_a_line_reads_is_a_key_of_the_roster` | -| D3 | `assets_shell::researchers::an_open_question_strict_refuses_is_returned_not_dropped`, `assets_shell::researchers::plan_phase_records_the_users_answer_then_the_question`, `assets_shell::researchers::quick_and_quick_batch_record_the_users_answer_then_the_question` | -| Limits | `assets_shell::researchers::an_open_question_strict_refuses_is_returned_not_dropped` (gsd/W204 at research under gsd-strict), `assets_shell::planner_edit::a_whole_plan_written_alone_is_refused_while_a_requirement_of_its_phase_is_in_no_plan` (chunked mode's first plan, gsd/E301), `assets_shell::planner_edit::the_rest_of_a_chunked_run_writes_only_the_plans_the_graph_lacks` (its recovery), `cmd_quick::a_quick_plan_minted_without_must_haves_is_refused_under_strict_only` (quick's mint under gsd-strict, gsd/W309) | +| D1 | `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`, `assets_shell::planner_edit::a_dependency_found_later_is_linked`, `assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles`, `assets_shell::planner_edit::the_plan_format_is_one_edit_of_the_whole_phase`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit` | +| D2 | `assets_shell::commits::the_plan_commit_step_commits_the_spec_and_an_empty_one_says_nothing_to_commit`, `settings_roster::the_plan_phase_family_reads_no_commit_docs`, `settings_roster::every_key_an_asset_calls_a_setting_is_a_key_of_the_roster`, `settings_roster::no_asset_names_a_not_applicable_key`, `settings_roster::the_settings_workflow_counts_the_settings_of_its_section_layout`, `settings_roster::the_advanced_settings_workflow_reads_and_confirms_only_settings`, `settings_roster::no_asset_makes_the_spec_commit_conditional_or_skips_an_ignored_spec`, `ported_text::every_setting_a_line_reads_is_a_key_of_the_roster` | +| D3 | `assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later`, `assets_shell::researchers::the_researcher_records_every_open_question_open`, `assets_shell::researchers::plan_phase_resolves_the_recorded_question_with_the_users_answer`, `assets_shell::researchers::quick_and_quick_batch_resolve_the_recorded_question_with_the_users_answer` | +| D4 | `declaration::the_settled_later_codes_are_the_rows_of_rules_md` (the four codes), `prompts_gates::e301_e310_w309_a_half_planned_phase_refuses_execute_phase` (the gate) | +| Limits (closed) | `assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later` (gsd/W204 at research under gsd-strict), `assets_shell::planner_edit::a_phases_plans_written_one_at_a_time_are_each_accepted_and_the_last_settles_coverage` and `assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles` (chunked mode's first plan, gsd/E301, gsd/E310), `assets_shell::planner_edit::the_rest_of_a_chunked_run_writes_only_the_plans_the_graph_lacks` (its recovery), `cmd_quick::a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict` (quick's mint under gsd-strict, gsd/W309) | The live run itself, with each refusal it met and the test that pins the same rule, is recorded in [`evaluation/gsd-live/plan-phase.md`](../../evaluation/gsd-live/plan-phase.md). @@ -136,10 +152,12 @@ The live run itself, with each refusal it met and the test that pins the same ru - The planner, its callers, the plan-phase steps, the researcher and every asset that named `commit_docs` change text. - The `@gsd/core` blob is re-vendored: its assets changed, its declarations did not. - The record of the live run cites the tests; "Tests that hold it" lists them by decision. +- ADR 0385 closes the Limits: the researcher, the planner, chunked mode, plan-phase, quick and quick-batch change text + again, and `execute_phase` gates on a half-planned phase. ## Would reopen it - A kernel mechanism for rules that stay open while authoring: the Limits close, and D3's return path may become a - recorded question. + recorded question. It happened: ADR 0385, which replaced D3. - A CLI batch edit. - A project whose spec is not source. diff --git a/docs/adr/0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md b/docs/adr/0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md new file mode 100644 index 0000000000..9f6f9e12e2 --- /dev/null +++ b/docs/adr/0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md @@ -0,0 +1,189 @@ +# A code may be settled later, and a write that creates its subject adds no error of it + +**Status:** accepted (2026-11-22). **Amends** [ADR 0297](0297-a-judged-rules-finding-is-not-an-error-a-write-adds.md) +(E080 counts a third finding as no error a write adds, beside a judged rule's), +[ADR 0363](0363-a-codes-findings-may-wait-for-its-owner-state-and-a-write-that-reveals-one-adds-no-error.md) D3 (an +unmatched error is counted unless it is judged, revealed or settled later) and +[ADR 0286](0286-a-diagnostic-code-is-namespaced-by-its-extension.md) D3 (a `codes` entry may declare +`settled_later`). Closes the Limits of +[ADR 0384](0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md), in the kernel and +in `@gsd/core`, rewords its D1's reason, replaces its D3 and amends its D4 ("E080 and what it counts" do not +change). Protocol 2.3.0 is unreleased: the key goes into its row, no bump. The wire and the SDK change, so every +builtin is re-vendored. + +## Context + +- E080 refuses a typed edit when the project it leaves reports an error the project does not (ADR 0167, keyed by code, + severity, message shape, file and, for an extension's finding, its subject, ADR 0302). Two findings are exempt: a + judged rule's (ADR 0297) and one a write revealed by moving its entity's owner state (ADR 0363). +- Some findings name a state an authoring workflow passes through on purpose: an entity is created first, and what + settles it comes in a later step. `@gsd/core`'s live run met three: an open question no decision resolves yet + (`gsd/W204`, on the question), a phase whose requirement is in no plan yet (`gsd/E301`, on the phase, from its first + plan) and, under gsd-strict, a plan with no truth and no artifact yet (`gsd/W309`, on the plan). Its audit found a + fourth (`@gsd/core`'s side). +- E080 refuses the write that creates such an entity, because the finding is new. The only accepted route is one edit + that also settles it. There is none when the settling is a person's later answer (the question's decision), a later + run (quick's plan, minted before its planner runs) or the rest of a phase planned plan by plan. ADR 0384 recorded + these three refusals as its Limits and named the fix a kernel one. +- The finding is right about the project the write leaves; it is not the write's mistake. The rule that says so is a + property of the code, which only the extension that owns the code knows. + +## D1. `settled_later`, a property of the code + +A `codes` entry may declare `settled_later` (`CodeDescriptor.settled_later`, a bool, absent when false). The SDK +writes it with `CodeBuilder::settled_later()`. The code book keeps it on the owner's own entry +(`ExtensionCode.settled_later`) and answers `Codebook::settled_later(extension, code)` for the extension that owns the +code's namespace only, as `Codebook::machine` does. A first-party extension declares no `codes` (ADR 0286), so no host +code is settled later. A bool has no malformed value: E030 does not change. + +The name says what the declaration means: a later step of the authoring settles the finding. `open` is taken +(`while_open()` writes `reported_while: pending`, ADR 0363), and a word about severity (deferred, lenient) would be +wrong: the finding's severity does not change. + +## D2. E080: a settled-later finding on what the write creates adds no error + +A typed edit's judge and the re-judge under the write lock count an unmatched finding as no added error when all hold: + +- its origin is an extension, and that extension's own entry for the code declares `settled_later` (another + extension's, a host diagnostic and a code that does not declare it are counted); +- it names a subject entity; +- the write's plan creates that subject, or an entity under it: an id that is the subject's followed by `/`, the + scope path of ADR 0284; +- the plan alters nothing the project held at the subject or under it: it sets, unsets, links, unlinks, appends, + removes, retitles or verifies no field or aspect of such an entity, deletes none and moves none in or out (either id + of a move). A delete's referrer it unlinks is altered too. An edit of an entity the plan creates alters nothing held. + +The plan creates what its `create` edits name, a typed one or an extension plan's, each at the id it has once the plan's +later moves are made, and alters what its other edits name, at their ids once the later moves are made +(`PlannedChange::opens` reads both). A move, a rename and a delete create nothing; a delete and a create of one id in +one write create it, and the delete alters what the project held there. A migration, the rule's other caller, has no +plan and creates nothing: it counts every such finding. + +The exemption goes by cause as far as the kernel can tell it without the kinds: a finding is excused when the only +thing the write did at or under its subject is create. The finding of an edit that only changes or removes is counted +as before: unsetting the decision that resolves an existing question, or deleting the one plan that holds a +requirement, is refused. So is that delete with a plan created under the same phase in the same write, and a held +plan's requirements set or unset beside a new plan: the creation does not excuse what the alteration made. So is a +write that creates an entity elsewhere: the creation must be the subject or under it. + +## D3. Nothing else changes + +The finding keeps its severity in `check`, `--strict` promotes it, every gate and a prompt's entry gate read it, a +profile's raise applies to it, and the write lists it among the findings it reports (`EditReport.added`). It is never +hidden: it stays in the project, failing `check` at its severity, until the step that settles it is written. A paired +finding (one the project already reports) is unchanged. ADR 0363 D3 holds: an entity a write creates reveals nothing. + +## `@gsd/core`'s side + +`@gsd/core` declares four codes settled later, after an audit of its code book: a code is one when a separate, later +write of the authoring settles its finding on an entity an earlier write creates. + +| Code | The finding's entity | The later write that settles it | +|---|---|---| +| `gsd/W204` | the open question | the user's answer, recorded as a decision and set as the question's `resolved_by` | +| `gsd/E301` | the phase | the plan that holds the requirement | +| `gsd/E310` | the phase | the plan that cites the decision | +| `gsd/W309` | the plan | its truth and its artifact, written by quick's planner after the mint | + +`gsd/E310` was reported on the decision; it is now on the phase, as `gsd/E301` is, its message still naming the +decision. On the decision a plan created under the phase is neither the subject nor under it, so chunked mode's first +plan stayed refused whenever the phase's context held a decision a later plan cites. + +Not settled later: `gsd/E101` (the roadmap edit, its settling write, creates a v1 requirement with the phase that +holds it; declaring it would let that edit leave one in no phase), the plan checker's `gsd/W311`, `gsd/W313`, +`gsd/W315` and `gsd/W316` and the other judged rules (no added error already, ADR 0297), `gsd/W317` (a warning in +every profile), `gsd/W510` (on the research, and the validation is written before the plans), and `gsd/E302`, +`gsd/E303` and `gsd/E314` (written whole by the edit that creates the plan or the task). `spec/rules.md` lists the four +in its Settled later section. + +The workflows follow: + +- The phase researcher records every open question open (no `resolved_by`); it invents no decision, drops none and + returns none in place of recording it. Plan-phase's step 9d, quick and quick-batch ask the user after the planner, + record the answer as a decision and set it as the question's `resolved_by`. A question left open, every one under + `--auto`, stays in the graph: under gsd-strict `check` fails on it, and plan-phase's entry gate (`gsd/W204`) refuses + the next run on the phase until it is answered. +- The planner's one `specforge.edit` stays the atomic route of a phase's plans. A plan written alone is accepted and + reports what a later plan settles; chunked mode writes plan by plan, and its `## PLAN BLOCKED` means a refused call + only. A run stopped midway leaves the phase half-planned, failing `check`. +- Quick mints its plan under gsd-strict too, reporting `gsd/W309` until its planner writes the must-haves. +- `execute_phase` gates on `gsd/E301`, `gsd/E310` and `gsd/W309`, so a half-planned phase is not executed. + +## Rejected + +- **Never counting a settled-later code** (the declaration alone): any write could leave such a finding anywhere, + edits and deletes included, and E080 would stop guarding the codes that declare it. +- **A per-request scope of open findings** (the caller names the codes a write may leave): the policy moves to every + caller, E080 becomes advisory, and the MCP tool, the CLI and the edit plan all change. +- **A transaction over several edits**: state across processes that every read must overlay, a collision with the + harness ledger and the one project change of ADR 0128, and a question the user leaves unanswered is still refused. +- **Rewriting the rules in `@gsd/core`** (hiding the findings from `check` while authoring, lowering a severity at + write time, a judged rule with a fake verdict): each hides from `check` what is true, or invents a verdict. +- **Widening ADR 0363's revealed finding to a creation**: a creation moves no owner state, and ADR 0363 D3 rules a + created entity out on purpose. +- **Keying the exemption by the entity kind** (only a plan under a phase, say): it needs a kind in the declaration + for a precision no case needs yet (Would reopen it). +- **Excusing by position alone** (any creation at or under the subject, whatever else the write does there): a write + that deletes the plan holding a requirement and creates any entity under the phase would be accepted, the delete's + finding excused by the creation beside it. +- **Excusing beside removals only** (counting the finding when the write deletes, unsets, unlinks or moves there, + not when it sets or appends): a set that replaces a plan's requirements drops one as surely as an unset, and a set + or an append that adds a requirement to the phase makes the same finding no creation settles. + +## Limits + +The exemption goes by what the write does at the subject, not by which rule the finding is of: a write that only +creates under a phase (a plan, a task, a research) also excuses a new settled-later finding of another rule on that +phase. `check` and every gate still report it. + +The other way, a write that alters anything the subject held is counted whole, even where the alteration could not +have made the finding: retitling a phase in the write that creates its first plan is refused when that plan leaves a +requirement in no plan. The two are written as two edits. + +## Consequences + +- A workflow may create an entity whose settled-later finding a later step settles: the write is accepted, and the + finding is reported by the write, by `check` and by every gate until then. +- A state left between two steps (a chunked run stopped midway, a question left open) is in the repository and fails + `check` at its severity, under gsd-strict and in CI too. That is intended; a workflow says so. +- `@gsd/core` declares `gsd/W204`, `gsd/E301`, `gsd/E310` and `gsd/W309` settled later. Its researcher records an + open question open and the user's answer resolves it later; a phase's plans may be written plan by plan, the + planner's one edit staying the atomic route; quick mints its plan under gsd-strict too. ADR 0384's D1 reason is + reworded, its D3 replaced, its D4 amended and its Limits closed. +- A half-planned phase is not executed: `execute_phase` gates on `gsd/E301`, `gsd/E310` and `gsd/W309`. A question + left open blocks the next plan-phase run on its phase under gsd-strict (`gsd/W204`, its entry gate). +- The record of the live run (`evaluation/gsd-live/plan-phase.md`) marks each refusal it met accepted since, with the + test that now holds it. + +## What each decision becomes + +| ADR | Decision | Outcome | Why | +|---|---|---|---| +| 0297 | Decision (a judged rule's finding is no added error) | kept, amended | a settled-later finding on what the write creates is not one either (D2) | +| 0363 | D3 (a revealed finding is no added error; every other is counted) | amended | the third exemption (D2) | +| 0363 | D3 (an entity a write creates reveals nothing) | kept | D3 | +| 0286 | D3 (an extension catalogs its codes) | amended | an entry may declare `settled_later` (D1) | +| 0384 | D4 (E080 and what it counts do not change) | amended | D2 | +| 0384 | D1 (a phase's plans are written in one edit) | kept, reason reworded | the edit is the atomic route; a plan alone is accepted (`@gsd/core`'s side) | +| 0384 | D3 (an open question gsd-strict refuses is returned) | replaced | it is recorded open, and the answer resolves it (`@gsd/core`'s side) | +| 0384 | Limits (a kernel fix, an owner decision) | closed | D1, D2 and `@gsd/core`'s side | + +ADR 0297: 1 amended. ADR 0363: 1 amended, 1 kept. ADR 0286: 1 amended. ADR 0384: 1 amended, 1 kept, 1 replaced, +1 closed. + +## Tests that hold it + +Each test fails when the decision it holds stops being true. + +| Decision | Tests | +|---|---| +| D1 | `specforge-protocol-types` `declaration::codes_round_trip_on_the_wire`, `specforge-extension-sdk` `declaration::a_code_entry_may_be_settled_later`, `specforge-diagnostics` `codebook::tests::settled_later_reads_the_owners_own_entry`, `specforge-registry` `build::namespaces::a_settled_later_code_reaches_the_code_book_and_no_e030` | +| D2 | `specforge-ops` `authoring::planned::tests::a_change_opens_what_it_creates_and_every_entity_it_is_under`, `authoring::planned::tests::a_change_that_alters_what_was_held_there_opens_nothing_there`, `authoring::edit::declared::tests::a_created_entity_is_followed_through_a_later_move`, `authoring::edit::declared::tests::an_entity_held_before_and_changed_is_altered_and_one_created_is_not`; in `operations::settled_later`: `a_finding_on_an_entity_the_write_creates_adds_no_error`, `a_finding_on_an_entity_the_write_creates_something_under_adds_no_error`, `a_write_that_creates_nothing_there_still_adds_the_finding`, `a_write_that_also_alters_what_the_subject_held_still_adds_the_finding`, `only_the_owners_settled_later_code_is_exempt`, `the_re_judge_under_the_lock_exempts_it_too`, `the_re_judge_under_the_lock_counts_it_when_the_write_altered_the_subject`, `a_migration_counts_it` | +| D3 | `operations::settled_later::a_finding_on_an_entity_the_write_creates_adds_no_error` (the write lists the finding, and `check` reports it once written) | +| `@gsd/core`'s side | in `gsd/core`: `declaration::the_settled_later_codes_are_the_rows_of_rules_md` (the four codes and `spec/rules.md`), `passes::cross_plan::tests::an_uncited_context_decision_is_e310_on_the_phase`; in `tests/cli`: `assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later` (and the unset that is refused), `assets_shell::researchers::the_researcher_records_every_open_question_open`, `assets_shell::researchers::plan_phase_resolves_the_recorded_question_with_the_users_answer`, `assets_shell::researchers::quick_and_quick_batch_resolve_the_recorded_question_with_the_users_answer`, `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`, `assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles`, `assets_shell::planner_edit::a_phases_plans_written_one_at_a_time_are_each_accepted_and_the_last_settles_coverage` (and the delete that is refused), `cmd_quick::a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict`, `prompts_gates::e301_e310_w309_a_half_planned_phase_refuses_execute_phase` | + +## Would reopen it + +- A settled-later finding that must be excused only for some kinds of what a write creates. +- A finding a later step settles on an entity the write neither creates nor holds anything new under. +- A workflow that must alter what a subject holds and create under it in one write, and cannot split the two. diff --git a/docs/adr/0386-a-context-pack-serves-its-core-whole-and-a-routes-budget-is-its-enrich-allowance.md b/docs/adr/0386-a-context-pack-serves-its-core-whole-and-a-routes-budget-is-its-enrich-allowance.md new file mode 100644 index 0000000000..abe7676d38 --- /dev/null +++ b/docs/adr/0386-a-context-pack-serves-its-core-whole-and-a-routes-budget-is-its-enrich-allowance.md @@ -0,0 +1,134 @@ +# A context pack serves its core whole, and a route's budget is its enrich allowance + +**Status:** accepted (2026-11-22). **Amends** [ADR 0356](0356-an-extension-declares-the-context-a-role-reads.md) D2 (a +budget of 0 is E123 only for a route with an enrich section), D4 (the floor is never refused by a read that states no +cap), D5 (`budget.budget_tokens` is the cap the fit used, and a pack shows no context record), D11 (a record holds the +cap its read stated, and none for a read that stated none), D12 (a record is evaluated again under the budget its read +had) and its Consequences line on a route's budget; amends +[ADR 0371](0371-links-come-from-gsds-fields-and-collected-data.md) D8 (the plan check reads 14 inputs, not +`all_decisions`). Protocol 2.3.0 is unreleased: the `budget` key and the record's `max_tokens` member keep their names +and their places, their meanings are narrowed, no bump. + +## Context + +- ADR 0356 D4 made a route's budget the size of the whole pack: its floor (the envelope, the subject and every core + section) and its enrich sections together, and a floor above it E062 naming the route. Its Consequences said a read + below the core "refuses loudly instead of dropping a task". +- A live run of `@gsd/core`'s plan-phase on a real repository met the refusal on the role that most needs its context. + The plan checker's route had a fixed budget of 8,000 tokens; its core for the run's plan cost 21,039, so every read + of `gsd/plan-checker` for that plan was E062 and the checker read the plan by hand. The repository's 100 project + decisions alone cost about 9,300 tokens, and `all_decisions` served every decision of every phase on top of them. +- The executor's route had 6,000. A plan of that phase's size (3 tasks with long actions, 11 truths, 7 artifacts, 3 + key links and 5 prohibitions) has a core of about 6,040 tokens, so `gsd start-plan` refused to record its pack: the + workflow could not start the plan at all. +- The parity fixtures every test ran on are 15 to 50 times smaller than a real phase, so no test met either refusal. +- A core section is, by ADR 0356's own definition, what the role cannot do without. A fixed number cannot know how + large a project's decisions or a plan's body will be; refusing the read leaves the role with nothing, which is worse + than any cut. + +## Decisions + +- **D1 The core is always served.** A read that states no cap serves the pack's floor whole, whatever it costs. No + surface refuses it: `specforge context`, `specforge.context`, `specforge://context/{+entity_id}?role=` and a + `record_context` without `max_tokens`. +- **D2 A route's budget is its enrich allowance.** The tokens of enrich sections a pack may add beyond its floor: the + fit's cap is the floor plus the allowance, and the enrich sections fill it in declared order as ADR 0356 D4 says. + The estimate counts each alphanumeric run as one token, so the cap a pack renders costs the same whatever its value, + and the floor does not depend on it. +- **D3 E062 only under a stated cap.** `--max-tokens`, the MCP `max_tokens` and `record_context`'s `max_tokens` cap + the whole pack, as before; a floor above a stated cap is E062 naming the route, the cap and the floor, and says that + a read without a cap serves the core whole. +- **D4 A route's budget is positive exactly when it has an enrich section.** A route of core sections only has + nothing to fill beyond its core, so its budget is 0; a positive one would be an allowance nothing reads, and is E123 + ("a context route of core sections only allows nothing beyond them"), as a budget of 0 on a route with an enrich + section is ("a context route with an enrich section allows it a positive number of tokens"). The agent section of a + route of core sections only says every section is served whole and no `max_tokens` shrinks it; every agent section + says that `budget.estimated_tokens` is what the pack costs and that a pack too large to read is read with + `--format brief` (each entity's id, kind and title), the entities it needs then queried. +- **D5 What a pack renders.** `budget.budget_tokens` is the cap the fit used: the stated one, or the floor and the + allowance. Read again with `--max-tokens `, the pack is the same byte for byte, so ADR 0356 D5's + recompute line holds with the rendered value. A pack shows no field a context record gives: no digest reads one + (ADR 0356 D9), so a pack shows none either, and what a pack costs does not move when it is recorded. +- **D6 Records and staleness.** A record keeps the budget its read had, in the one meaning `max_tokens` has on every + surface: the cap a caller states. A `record_context` that states `max_tokens` writes it in the record; one that + states none writes none. ADR 0356 D12 evaluates a record again under that budget: its cap when it holds one, else + the core whole and the route's allowance as the route declares it now. A moved digest, no subject or several + subjects is the route's stale code, as before, and so is a core grown above a cap the record holds; a record that + holds no cap is never stale for its size. A pack shows what no digest reads (a subject's computed fields: a phase's + critical path once it has plans, its completion date once it completes), so a core grows without anything the record + read having moved; held to the cost its pack had when it was recorded, every record of a route of core sections only + went stale the moment its phase gained a plan. The cap a pack was fitted to stays in the pack, as + `budget.budget_tokens`: a reader who wants that pack again states it. + +### `@gsd/core`'s side + +- The routes with enrich sections keep their numbers as allowances: the executor 6,000, the others as declared. The + four routes of core sections only (`plan-checker`, `integration-checker`, `phase-context`, `quick-context`) declare + 0. +- The plan check stops reading `all_decisions`. It reads `phase_decisions` (its phase's), `quick_decisions` (a quick + plan's own, `self/`) is an earlier extension's; its budget -is 0; it has no core section; a section's name is not a word, repeats one, or is -`settings`; a section's selector does not parse, its `file("…")` path leaves -the project, holds a glob or names a `.spec` source, or it does not type-check -from the subject kind (a kind or field it names is not loaded or declared, or it -crosses a field that is not a reference or that is computed or written by a -verdict: such a reference makes no edge); its subject kind is not loaded; or a -setting it names is not a setting of its extension (a secret is not one). The -message names the extension, the route, the section and why. The route is not -registered: `specforge context` and `specforge.context` refuse it as unknown, -and its agent gets no Context section. A subject kind of an optional peer the -project does not load drops the route without a diagnostic, and a section that -reaches one is skipped and listed in the pack. Fix the route's declaration in -the extension. +or its qualified name (`/`) is an earlier extension's; it has an +enrich section and its budget (the allowance enrich sections fill beyond the +core, ADR 0386) is 0, or it has none and its budget is not 0; it has no core +section; a section's name is not a word, repeats one, or is `settings`; a +section's selector does not parse, its `file("…")` path leaves the project, +holds a glob or names a `.spec` source, or it does not type-check from the +subject kind (a kind or field it names is not loaded or declared, or it crosses +a field that is not a reference or that is computed or written by a verdict: +such a reference makes no edge); its subject kind is not loaded; or a setting it +names is not a setting of its extension (a secret is not one). The message names +the extension, the route, the section and why. The route is not registered: +`specforge context` and `specforge.context` refuse it as unknown, and its agent +gets no Context section. A subject kind of an optional peer the project does not +load drops the route without a diagnostic, and a section that reaches one is +skipped and listed in the pack. Fix the route's declaration in the extension. Owner: core Level: error diff --git a/docs/extension-protocol.md b/docs/extension-protocol.md index 140df8d089..c5f6c8b9ce 100644 --- a/docs/extension-protocol.md +++ b/docs/extension-protocol.md @@ -249,7 +249,7 @@ which passes when one branch yields no error. A bare name is the extension's own `@acme/x:`, and that extension must be a declared peer (W019). A check of an optional peer that is not loaded is inert: the schema and the hover say so. The value stays plain in its field type's form: nothing about a check is written in a `.spec` file. A `.spec` path may name its root, `"/rest"` (`spec`, `project` or a root `specforge.json` names). -A field of 1.8.0 may also declare who writes it (ADR 0287): `writer`, `"computed"` (a compute pass gives the value; a value written by hand is E082) or `"harness"` (a command's plan sets it and the host records it in `specforge-harness`; a value with no line there is E083); `immutable` (a value that differs from its git baseline is E084; unset at the baseline, it may be set once); and `append_only` (a list that rewrites its baseline's items is E085). A kind may declare `append_only` too: an entity of it that the baseline holds and the project does not is E085. A field nested under `members` declares the same. A `computed` or `harness` field is never completed or offered by an editor, and a computed value is shown marked `computed`. `lifecycle_field` on a kind is read and ignored. A field of 2.1.0 may declare `writer: "context"` (ADR 0356 D9): only the host's record of a context route's pack writes it, a block of exactly `route` (string), `digest` (string) and `max_tokens` (integer) (any other shape, or one on a member, is W021 and the writer dropped); a typed edit of it from any origin is refused `context_field`, the ledger records it as a harness value (E083 without its line), and no entity, judged input or pack section digest reads it. A field, a block member or a kind of 1.9.0 may declare `writer: "human"` (ADR 0289): only a person writes it, and an extension's plan, the MCP tools and a non-interactive CLI are refused `human_only`; a `required` field of a kind that is not human-only is W021, since an agent could then create no entity. A set, unset or link of an existing human-only entity is refused the same way, and so is an agent's delete of an entity holding a value a person wrote (a human-only field, or a block member declared human); computed and harness values are not checked on delete (ADR 0298). +A field of 1.8.0 may also declare who writes it (ADR 0287): `writer`, `"computed"` (a compute pass gives the value; a value written by hand is E082) or `"harness"` (a command's plan sets it and the host records it in `specforge-harness`; a value with no line there is E083); `immutable` (a value that differs from its git baseline is E084; unset at the baseline, it may be set once); and `append_only` (a list that rewrites its baseline's items is E085). A kind may declare `append_only` too: an entity of it that the baseline holds and the project does not is E085. A field nested under `members` declares the same. A `computed` or `harness` field is never completed or offered by an editor, and a computed value is shown marked `computed`. `lifecycle_field` on a kind is read and ignored. A field of 2.1.0 may declare `writer: "context"` (ADR 0356 D9): only the host's record of a context route's pack writes it, a block of exactly `route` (string), `digest` (string) and `max_tokens` (integer; the cap the read stated, absent when it stated none) (any other shape, or one on a member, is W021 and the writer dropped); a typed edit of it from any origin is refused `context_field`, the ledger records it as a harness value (E083 without its line), and no entity, judged input or pack section digest reads it. A field, a block member or a kind of 1.9.0 may declare `writer: "human"` (ADR 0289): only a person writes it, and an extension's plan, the MCP tools and a non-interactive CLI are refused `human_only`; a `required` field of a kind that is not human-only is W021, since an agent could then create no entity. A set, unset or link of an existing human-only entity is refused the same way, and so is an agent's delete of an entity holding a value a person wrote (a human-only field, or a block member declared human); computed and harness values are not checked on delete (ADR 0298). A field of 2.0.0 that declares `checks` may also declare `checks_while` (ADR 0350): `"complete"`, its checks wait until its holder's owner is complete (`complete_when`, its kind's or its nearest scope ancestor's; a **planned** value, @@ -786,16 +786,16 @@ watch, the LSP, MCP). Passes with any other phase, or none, run only under "results": {"": {"tests": [TestResult]}}}`, sent to an analyze pass and, since 1.11.0, to a check, compute or guard pass that declares the `tests` input (ADR 0293: with no report recorded the host reports I205 once, with one that cannot be used E045; a pass that does not declare it is sent none, as before); -each entity is `{"id", "kind", "fields", "incoming_edge_count", +each entity is `{"id", "kind", "title"?, "fields", "incoming_edge_count", "outgoing_edge_count", "span"?, "testable", "owes_none", "verify_kinds", -"verify_texts"}`, `owes_none` meaning it owes no obligations of its own, decided -by the host from the registries; `incoming_edge_count` and `outgoing_edge_count` -count the edges from and to other entities, an edge from the entity to itself in -neither). `entities` holds the authored entities and, from 2.0.0 (ADR 0353), the facts of the kinds the pass's `facts` -input names: a pass that declares none is sent no fact, and `edges` holds the edges whose two ends it is sent; the edge -counts stay the graph's. An entity's `id`, and an edge's `source` and `target`, are entity paths: a scope's path and a name -(`v1.0/03/D-01`), or the name alone in the project scope; a name never holds `/`. The host re-keys -`test_results` by path: a key written as a path, a rooted path or a unique short form reaches its +"verify_texts"}`, `title` the title its header writes (2.3.0, ADR 0387; absent, never `null`, for a fact written +without one), `owes_none` meaning it owes no obligations of its own, decided by the host from the registries; +`incoming_edge_count` and `outgoing_edge_count` count the edges from and to other entities, an edge from the entity to +itself in neither). `entities` holds the authored entities and, from 2.0.0 (ADR 0353), the facts of the kinds the +pass's `facts` input names: a pass that declares none is sent no fact, and `edges` holds the edges whose two ends it is +sent; the edge counts stay the graph's. An entity's `id`, and an edge's `source` and `target`, are entity paths: a +scope's path and a name (`v1.0/03/D-01`), or the name alone in the project scope; a name never holds `/`. +The host re-keys `test_results` by path: a key written as a path, a rooted path or a unique short form reaches its entity (ADR 0284). A pass answers host diagnostics, bare or as `{"diagnostics", "summary"}` (a `PassAnswer`). A diagnostic may carry `"entity": ""`; with no `span`, the host attaches that entity's. @@ -935,7 +935,7 @@ A name is dotted, or a family with `*` segments. `field_type` is a field type of ### Category: codes -Returns the extension's diagnostic code catalog (protocol 1.7.0, ADR 0286): one entry per code the extension's rules and passes report. `code` is the extension's own code, `[EWI]` and three digits, never qualified (the host adds the extension's namespace). `title` and `explanation` are required; `docs` (optional) is an absolute `http(s)` URL. `machine` (optional, protocol 2.0.0, ADR 0337 D7) is `true` when this machine decides the code's finding (its approvals, its network or its effects journal), not the project: the diagnostic carries `machine`, `--strict` never promotes it and the gate's warning baseline never counts it. `reported_while` (optional, protocol 2.2.0, ADR 0363) is `complete` or `pending`, an owner state (ADR 0329 D4): a finding of the code on an entity speaks only while the entity's owner is in that state, read after the compute passes, and the host drops it otherwise; a typed edit that moves the entity into that state reveals the finding, which is no error the edit adds (E080). Another word is E030. +Returns the extension's diagnostic code catalog (protocol 1.7.0, ADR 0286): one entry per code the extension's rules and passes report. `code` is the extension's own code, `[EWI]` and three digits, never qualified (the host adds the extension's namespace). `title` and `explanation` are required; `docs` (optional) is an absolute `http(s)` URL. `machine` (optional, protocol 2.0.0, ADR 0337 D7) is `true` when this machine decides the code's finding (its approvals, its network or its effects journal), not the project: the diagnostic carries `machine`, `--strict` never promotes it and the gate's warning baseline never counts it. `reported_while` (optional, protocol 2.2.0, ADR 0363) is `complete` or `pending`, an owner state (ADR 0329 D4): a finding of the code on an entity speaks only while the entity's owner is in that state, read after the compute passes, and the host drops it otherwise; a typed edit that moves the entity into that state reveals the finding, which is no error the edit adds (E080). Another word is E030. `settled_later` (optional, protocol 2.3.0, ADR 0385) is `true` when a later step of the authoring settles the code's finding (an open question a later answer resolves, a phase's requirement the rest of its plans hold): a typed edit whose plan creates the finding's subject, or an entity under it, and alters nothing the project held there (sets, unsets, links, unlinks, deletes or moves nothing at or under the subject) adds no error by it (E080); an edit that creates neither, one that also alters what the subject held, and a migration still do. Its severity does not change: `check`, `--strict` and every gate read it, and the edit lists it among the findings it reports. ```json { @@ -951,7 +951,7 @@ Returns the extension's diagnostic code catalog (protocol 1.7.0, ADR 0286): one } ``` -SDK: `c.code("E901", |d| { d.title(..).explanation(..).docs(..); })`; `.machine()` marks a machine code; `.once_complete()` and `.while_open()` write `reported_while`. +SDK: `c.code("E901", |d| { d.title(..).explanation(..).docs(..); })`; `.machine()` marks a machine code; `.once_complete()` and `.while_open()` write `reported_while`; `.settled_later()` writes `settled_later`. ### Category: routes @@ -1151,8 +1151,9 @@ SDK: `c.checker("url", |k| { .. })`, `f.check("url")`. ### Category: contexts Returns the context routes a role reads (protocol 2.1.0, ADR 0356). A context route serves one entity of its `subject` -kind as a pack: its sections in declared order, cut to a token budget, with a digest (`specforge context -`, the MCP tool `specforge.context`, `specforge://context/{+entity_id}?role=`). +kind as a pack: its core sections whole, its enrich sections in declared order within a token allowance, with a +digest (`specforge context `, the MCP tool `specforge.context`, +`specforge://context/{+entity_id}?role=`). ```json { @@ -1180,8 +1181,11 @@ kind as a pack: its sections in declared order, cut to a token budget, with a di - `name` is kebab case, unique among the extension's context routes; the host qualifies it by the extension's short name (`gsd/executor`). Context routes and trace routes are separate namespaces. -- `budget` is the token budget a read takes when it names none, positive. `agent` is an agent of the extension's own: - the host appends a `## Context` section to its body on every host. +- `budget` is the route's enrich allowance (ADR 0386): the tokens of enrich sections a pack may add beyond its core + when the read states no cap; positive for a route with an enrich section, 0 for one of core sections only. The host + does not bound a core: a read that states no cap serves it whatever it costs, so a route keeps its core selectors + as narrow as its role needs, and a pack reports what it cost as `budget.estimated_tokens`. `agent` is an agent of + the extension's own: the host appends a `## Context` section to its body on every host. - A section's `name` is a word, unique in the route and never `settings`. `selector` is the judged rules' grammar with its head: an entity chain (`self --record `). On each check, every record of a route that names `stale`, when its field's owner gate admits the owner's state, is -evaluated again at its recorded budget, in the context format: a pack whose digest moved, a record that reaches no -subject or several, or a core above the budget is one finding of the route's stale code at the field, its severity by -its letter, with the record's `suggestion` (`{entity}`, `{subject}` and `{route}` filled in). The extension's settings +evaluated again in the context format under the budget its read had: the cap the record holds (`max_tokens`, written +only when the read stated one), or else the core whole and the route's allowance. A pack whose digest moved, a record +that reaches no subject or several, or a core above a stated cap is one finding of the route's stale code at the +field, its severity by its letter (a record that states no cap is never stale for its size, ADR 0386 D6), with the record's `suggestion` (`{entity}`, `{subject}` and `{route}` filled in). The extension's settings raise and gate it as any of its codes. A project that holds no record evaluates no pack. A subject kind of an optional peer the project does not load drops the route without a diagnostic; a section that reaches one is skipped and listed in the pack's `skipped`. An `agent` the extension does not declare, or one an earlier route binds, is E124: the binding is dropped, the route kept. @@ -1305,7 +1313,7 @@ sources, and every `graph` node carries its `file`. A writing collector is sent | `delete` | `entity`, `unlink_references`? | | `rename` | `entity`, `to` (the move record is written with the ledger) | | `set_verdict` | `entity`, `rule`, `outcome`, `judge`, `model`, `findings`?, `cited`? (`{"entity"}`, `{"file"}` or `{"test"}`), `values`?, `basis`? | -| `record_context` | `entity`, `route`, `max_tokens`? (2.1.0, ADR 0356 D11): the host derives the route's subject from the entity by its record, computes the pack at the budget (absent: the route's) over the project the plan is applied to, and writes the route, the digest and the budget in the record's field with its ledger line. A command, collector or hook of the route's extension (or of one naming it a peer) may ask | +| `record_context` | `entity`, `route`, `max_tokens`? (2.1.0, ADR 0356 D11): the host derives the route's subject from the entity by its record, computes the pack under `max_tokens` as a cap (absent: its core and the route's allowance, ADR 0386) over the project the plan is applied to, and writes the route, the digest and the stated `max_tokens`, when there is one, in the record's field with its ledger line. A command, collector or hook of the route's extension (or of one naming it a peer) may ask | Ops apply in order, each over the texts the ones before it left. An op's `revision` is the revision of the file it writes, as the call received it (`absent` for a file that is not there yet); an op with none is `invalid_plan`. If the @@ -1452,7 +1460,7 @@ or answered. | `2.0.0` | ADR 0337 (the ports round). A command, MCP tool or resource and a collector may call the five `specforge:host@0.1.0` ports (see [Host ports](#host-ports)), `syntax` parsing source with a tags query (ADR 0344, ADR 0345 D1). A pass, command, prompt, hook or collector declares what the host serves it as one tagged list, `inputs`: `files` (a `FileRead`), `tests`, `state`, `graph`, `slash_commands`, `git` (`status`, `when`) and `setting` (`extension`, `name`), replacing `reads`, `reads_tests`, `reads_state`, `reads_graph`, `reads_slash_commands`, `reads_git`, `reads_git_status`, `git_when` and `reads_settings` (see [Inputs](#inputs-200-adr-0337)); an input its call kind is not served, or a second one of a kind served once, is W021 and served empty. A hook's `git.status` is a typed `GitStatus` (`branch` with `oid`, `head`, `upstream`, `ahead`, `behind`; `entries` with `kind`, `path`, `orig_path`, `index`, `worktree`), not porcelain text. A `codes` entry may declare `machine` (`CodeDescriptor.machine`, see [codes](#category-codes)): its finding is this machine's, never promoted by `--strict` nor counted by the gate's warning baseline. A 1.x guest is E088 (older): its keys would be W138 and its inputs unserved. An extension declares `capabilities` (a describe category, see [capabilities](#category-capabilities)): what it may make the host do, each on one port under a scope name (ADR 0335 D2), and a collector names the process `capability` it runs instead of carrying `run`. An extension declares `checkers` (a describe category, see [checkers](#category-checkers)), a field its `checks`, and the host calls `__check_values` in a values phase that runs first (ADR 0336); `CollectInput` gains `check_outcomes`, for a collector declaring that input, and `facts`, for a collector declaring a `facts` input (`kinds`); a collector declares `answers`, the collected kinds whose facts it answers, which order the collect (E119 for a cycle) and admit its facts (E116 otherwise); a collector with no `capability` and no `report` reads through its ports (ADR 0345). A `Fact` carries `at` (a list of `FactLocation`: where it is written, a project-relative file, 1-based lines, 1-based byte columns, end exclusive) and `named_at` (field → id → places: where each name it holds is written); a `PassEntity` carries `dangling` (`DanglingReference`: `field`, `id`, `span`, `reason` `unresolved` \| `ambiguous` \| `mistyped`, `actual`, `did_you_mean`, `candidates`), a fact's references that name no entity, the wrong kind or several: sent to every pass, judged by the extension declaring the holder's kind (ADR 0346). An `UnheldReference` carries `kinds`, the collected kinds of its scheme its field admits, and a `FactStore` carries `held` (scheme → the kinds of its facts), replacing `schemes` (ADR 0347 D9). `CommandInput` gains `nonce`, 32 lowercase hex digits of the host's entropy, fresh per call (ADR 0341); a pass, prompt, hook or collector is not told one. A field may declare `checks_while`, `complete` or `pending` (ADR 0350), and a check row's status (`CheckOutcome.status`) may be `planned` or `closed`. The source scanners' describe category and their operation (and its request and response types) are gone: source code reaches the graph as the `item` facts a source pack collects (ADR 0199). A `process` capability may declare one `config` (`ProcessConfig`: `name`, `template`): the host writes it to `.specforge/reports/.` before the run, `{report}` expanded and escaped for a quoted string, and `{config}` in the argv names it; a `CollectorDescriptor` may declare `install`, the line said when its program is not found (ADR 0348). The git port answers `log` (a `log-query` of commit ids and paths from the repository's top: typed commits, their trailers and each signature's `name` and `seconds` (never an email address nor the signer's offset), as many as the answer holds, `truncated` past it or past the host's counted walk, which leaves no `count`; a pickaxe never reads a withheld file and is refused a withheld path) and `diff` (a `diff-query` from a commit or the empty tree to a commit, the index or the worktree, with `hunks`, a file's changed line ranges, and `renames`, searched by the host's rules: a file past the bytes the host reads for one diff says `truncated` and counts no lines; each `file-change` says `withheld` and then carries no `patch` nor `hunks`: a withheld name, or, against the worktree, a file the call's fs grant does not read) (ADR 0352). A collector's `auto_detect` may declare `repository`: it is detected when the git port locates the project root in a repository, git's ceilings kept, so a project in a subdirectory of its repository is (ADR 0352 D4). An `UnheldReference` carries `history` when its field is one the harness writes once (`writer: "harness"` and `immutable`): a pass reads it as what held then, never a missing fact (ADR 0352 D2). | | `2.1.0` | A contribution's `tools` may name the engine's tools (ADR 0334): `specforge:` (`specforge:trace`), `specforge:` (`specforge:reads`, `navigation`, `edits`, `output`, `setup`) and `specforge:.`, an extension command run as `specforge `. An unknown one, a human-attested or refused command, `mcp:specforge/…` and any `specforge:` class on a hook are W021. `specforge_protocol_types::engine_tools` is the catalogue they name. An extension declares `contexts`, the fifteenth describe category, read last: for one entity of a subject kind, the ordered sections a role reads, each a named selector, core or enrich (ADR 0356). A selector kind may carry a field filter, `kind[field=value|…]` (ADR 0356 D13). A context route may record its pack in a `context` field (`records`) and name the code a stale record raises (`stale`, ADR 0356 D10); an edit plan's `record_context` asks the host to record it (D11). A 2.0.0 guest still loads. | | `2.2.0` | A kind field or a block member may be `number` (ADR 0361): an exact decimal of at most 15 significant digits, written as one decimal word (`0.75`, `-0.25`, `1.5e3`), carried as a JSON number (an integer when whole and within `u64`) in the graph and a `FieldJson`; a pass entity carries a top-level number field as its canonical text in `fields` (`PassEntity::number` reads it) and a number member of a typed block as a JSON number in `values`; E061 refuses a word that is no decimal, has more digits or lies outside its bounds. A `number` field's `minimum` and `maximum` are decimals, compared exactly; a bound its type cannot read is W021 and dropped. `Decimal`, `GraphNode::number` and `PassEntity::number` read one. A judged target may declare `judged_while`, `complete` or `pending` (ADR 0362): an entity in the other owner state owes no verdict, decided on the merged snapshot after the compute passes; the SDK writes it with `once_complete()` and `while_open()`. A `codes` entry may declare `reported_while`, `complete` or `pending` (ADR 0363): its findings speak only on an entity in that owner state, and a typed edit that moves the entity into it reveals one rather than adding it (E080); the SDK's `CodeBuilder` writes it with `once_complete()` and `while_open()`. A `process` capability may declare `filter` (`ProcessScope.filter`): the arguments the host appends after `argv` only when a caller passes a filter (`specforge collect --filter`), `{filter}` in exactly one of them, approved with the command; no guest request is admitted on such a scope (ADR 0360). A declared `env` name may end in `*` after a namespace prefix (a letter, at least 4 characters, ending in `_`): the program inherits every variable with that prefix, and no guest sets a variable through it (ADR 0360). A program a guest runs and a collector's command the host runs go through one credential filter: a secret's name (now also `_AUTHTOKEN`, `_AUTH`, `PASSWORD` without its `_`, `_PASSWD`, `_PWD`, `_PAT`) and a cargo credential provider are withheld, and a URL's user and password, or a scheme-less proxy's, are removed (ADR 0360). A collector's command told its report path through `{report}` in its argv or config runs with `SPECFORGE_REPORT` removed from its environment, a value the caller exported included; one told it no other way gets it set to its report path over the caller's (ADR 0360). A 2.1.0 guest still loads; a 2.2.0 guest is refused by a 2.1 host (E088, newer). | -| `2.3.0` | A pass may declare the `delta` input (`kinds`, ADR 0376 D6; the SDK's `Input::delta(&["item"])`): its `PassInput` then carries `delta` (`DeltaPayload`), what changed of those kinds since a base the host names, and a pass that declares none is sent no `delta`. The payload names its `base`: `none`, the empty graph, so every node of the named kinds is `added` and a pass written for changes is correct on a cold run; `revision` with the full sha of the commit it is taken against (`check --since` and the MCP `validate` with `since`: the merge-base); or `previous`, the graph of a long-lived session's last completed check (ADR 0376 D7). `nodes` lists each changed node (`DeltaNode`: `kind`, `id`, `change` `added`, `removed` or `modified`), sorted by kind then id: a modified node names the `fields` and `aspects` (`title`, `methods`, `obligations`, `verdicts`, `edges`) that changed and its content digests `before` and `after` (`sha256:<64 hex>`), an added node its digest `after`, a removed node only its kind and id; a node whose kind changed is its old kind removed and its new kind added. `added_edges` and `removed_edges` list the edges with an end of a named kind. An empty list is absent, so a delta with nothing changed is its base alone. The full content stays in `entities`. A delta input declared twice, naming no kind or a kind no loaded extension declares is W021, as the `facts` input is. A 2.2.0 guest still loads; a 2.3.0 guest is refused by a 2.2 host (E088, newer). | +| `2.3.0` | A pass may declare the `delta` input (`kinds`, ADR 0376 D6; the SDK's `Input::delta(&["item"])`): its `PassInput` then carries `delta` (`DeltaPayload`), what changed of those kinds since a base the host names, and a pass that declares none is sent no `delta`. The payload names its `base`: `none`, the empty graph, so every node of the named kinds is `added` and a pass written for changes is correct on a cold run; `revision` with the full sha of the commit it is taken against (`check --since` and the MCP `validate` with `since`: the merge-base); or `previous`, the graph of a long-lived session's last completed check (ADR 0376 D7). `nodes` lists each changed node (`DeltaNode`: `kind`, `id`, `change` `added`, `removed` or `modified`), sorted by kind then id: a modified node names the `fields` and `aspects` (`title`, `methods`, `obligations`, `verdicts`, `edges`) that changed and its content digests `before` and `after` (`sha256:<64 hex>`), an added node its digest `after`, a removed node only its kind and id; a node whose kind changed is its old kind removed and its new kind added. `added_edges` and `removed_edges` list the edges with an end of a named kind. An empty list is absent, so a delta with nothing changed is its base alone. The full content stays in `entities`. A delta input declared twice, naming no kind or a kind no loaded extension declares is W021, as the `facts` input is. A `codes` entry may declare `settled_later` (ADR 0385; the SDK's `CodeBuilder::settled_later()`): a typed edit whose plan creates a finding's subject, or an entity under it, and alters nothing the project held there adds no error by a finding of that code (E080), and its severity does not change. A pass entity carries `title` (ADR 0387), the title its header writes, as a command's `GraphNode` does; absent for a fact written without one. A 2.2.0 guest still loads; a 2.3.0 guest is refused by a 2.2 host (E088, newer). | A host of `1.1.x` still loads a `1.0.0` guest and hands it the `1.1.0` values it knows; a host of `1.0.x` refuses a `1.1.0` guest (E088), and every host refuses a guest of another major (E088). A newer patch of the diff --git a/docs/extension-sdk.md b/docs/extension-sdk.md index 91f551d903..41722ab6bd 100644 --- a/docs/extension-sdk.md +++ b/docs/extension-sdk.md @@ -288,7 +288,7 @@ Every contribution is a builder call. The SDK adds the matching Wasm exports and | `c.setting(name, \|s\| ..)` | a typed setting: `bool()`, `integer()`, `number()`, `string()`, `enum_values(..)`, `string_list()`, `block()`, `block_list()`, `default(..)`, `describe(..)`, `gates(..)`, `gates_when_on(..)`, `keys(..)` for a family | `settings` | | `c.preset(source, \|p\| ..)` | what each value of an enum or bool setting presets and raises: `p.when(value, \|e\| e.set(..).raise(..))` | `settings` | | `c.secret(name, env, description)` | a secret read from an environment variable | `settings` | -| `c.code(code, \|d\| ..)` | a diagnostic code the extension reports: `title(..)`, `explanation(..)`, `docs(..)` (an `http(s)` URL) | `codes` | +| `c.code(code, \|d\| ..)` | a diagnostic code the extension reports: `title(..)`, `explanation(..)`, `docs(..)` (an `http(s)` URL), `machine()`, `once_complete()` or `while_open()` (its owner state), `settled_later()` (a later step of the authoring settles it: a write that creates its subject, or under it, and alters nothing held there adds no error by it, ADR 0385) | `codes` | | `c.route(name, \|r\| ..)` | a route `specforge trace` follows from a kind: `start(..)`, `step(name, via, \|s\| ..)`, annotations | `routes` | | `c.context(name, \|r\| ..)` | a context route a role reads one entity through: `subject(..)`, `agent(..)`, `budget(..)`, `core(name, selector)`, `enrich(name, selector)`, `settings(..)`, `record(field, subject)`, `record_suggesting(field, subject, help)`, `stale(code)` | `contexts` | | `c.peer(name, range)`, `c.optional_peer(name, range)` | a peer requirement | handshake | @@ -537,7 +537,7 @@ c.command("record", |cmd| { A judged rule is declared with `r.judged("judge", |j| { j.outcomes(..).passing(..); j.target("kind", |t| { t.input("name", "selector"); }) })` inside `c.rule(..)` and a field a verdict sets with `field.verdict()` (ADR 0290, [guide](guides/judged-rules.md)); a field the host's record of a context route's pack sets is declared with `field.context()`, which also declares its block of `route`, -`digest` and `max_tokens` (ADR 0356); a command's `GraphNode` +`digest` and `max_tokens`, the cap a read stated (ADR 0356, ADR 0386); a command's `GraphNode` lists its `judgements`, and `set_verdict` takes the `basis` the command read through `specforge query --inputs`. The judge is an agent of the extension or a declared peer, or `"prompt:"`, a prompt of the extension itself (protocol 1.11.0, ADR 0295); the prompt's rendered payload lists the rules it judges under `judged`. @@ -737,8 +737,10 @@ c.pass("changed", |p| { `Some`, its base and no node or edge. A delta input declared twice, naming no kind or a kind no loaded extension declares is W021. -A pass receives `PassInput`: `entities` (each with its field texts by name -([Field text](#field-text)), edge counts, span, `testable`, and `owes_none`: it +A pass receives `PassInput`: `entities` (each with its `title`, the title its header writes, `None` for a fact written +without one (protocol 2.3.0, +[ADR 0387](adr/0387-a-phase-is-named-by-its-title-alone-and-a-pass-reads-each-entitys-title.md)), its field texts by +name ([Field text](#field-text)), edge counts, span, `testable`, and `owes_none`: it owes no obligations of its own, decided by the host's one obligation rule), `edges`, `test_results` (the recorded test report as [`TestResults`]; `TestResults::of(id)` lists an entity's tests) and `proved_claims` (always absent for a check pass), and `previous`: when the pass names kinds in `.baseline(&[..])`, the project at the git commit `HEAD` names (under `check --since `, the merge-base, the diff --git a/docs/quick-reference.md b/docs/quick-reference.md index 84b4b87696..b6aa42c8c1 100644 --- a/docs/quick-reference.md +++ b/docs/quick-reference.md @@ -36,7 +36,7 @@ specforge trace --route # along the named route (`/ --reach # the traceability chain, whatever route starts at its kind specforge trace --in --route # every start entity within : its scope and one reference away specforge trace --plan plan.json # check an agent plan (AgentPlan JSON) against the graph -specforge context # the pack a context route declares for : sections fitted to its budget +specforge context # the pack a context route declares for : its core whole, then its allowance specforge context --pick .digest # the pack's digest, recomputable from what it served specforge context --record # record the pack on ; a moved pack is its route's stale code # MCP: specforge.context { route, subject, max_tokens?, format? }; the resource specforge://context/?role= diff --git a/evaluation/gsd-ab/tasks.json b/evaluation/gsd-ab/tasks.json index 57c0e4de47..1736cd3e5e 100644 --- a/evaluation/gsd-ab/tasks.json +++ b/evaluation/gsd-ab/tasks.json @@ -77,13 +77,13 @@ ] }, "fixtures": [ - { "id": "taskboard", "path": "gsd/parity/fixtures/taskboard", "tree": "601334ae1eaf46483229dc59dbfce60f24e810c6", "status": "ready", "thread": ["@code/core", "@javascript/node-test", "@javascript/source"], + { "id": "taskboard", "path": "gsd/parity/fixtures/taskboard", "tree": "e9d400f9ae7e0cf8f7c73f6495ed767677a7376d", "status": "ready", "thread": ["@code/core", "@javascript/node-test", "@javascript/source"], "baseline": [ "I213 -:0", "gsd/W311 spec/plans.spec:192", "gsd/W313 spec/plans.spec:192", "gsd/W315 spec/plans.spec:192", "gsd/W316 spec/plans.spec:192", "gsd/W407 spec/plans.spec:101", "gsd/W407 spec/plans.spec:110", "gsd/W407 spec/plans.spec:14", "gsd/W407 spec/plans.spec:23" ] }, - { "id": "vault", "path": "gsd/parity/fixtures/vault", "tree": "2f0f30421993c498d4d4fb946e2068c1ffbf897e", "status": "ready", "thread": ["@code/core", "@javascript/node-test", "@javascript/source"], "extensions": ["@gsd/security"], + { "id": "vault", "path": "gsd/parity/fixtures/vault", "tree": "a00b1dfc6e163d31e52bc7828a072a6455ad68ec", "status": "ready", "thread": ["@code/core", "@javascript/node-test", "@javascript/source"], "extensions": ["@gsd/security"], "baseline": [ "I213 -:0", "W019 -:0", "gsd.security/E101 spec/plans.spec:166", "gsd.security/E101 spec/plans.spec:82", "gsd.security/W302 spec/plans.spec:176", "gsd.security/W302 spec/plans.spec:187", "gsd.security/W302 spec/plans.spec:70", "gsd.security/W302 spec/plans.spec:82", @@ -92,7 +92,7 @@ "gsd/W103 spec/v1.0.spec:17", "gsd/W311 spec/plans.spec:199", "gsd/W313 spec/plans.spec:199", "gsd/W315 spec/plans.spec:199", "gsd/W316 spec/plans.spec:199", "gsd/W407 spec/plans.spec:120", "gsd/W407 spec/plans.spec:14", "gsd/W407 spec/plans.spec:23" ] }, - { "id": "ledger", "path": "gsd/parity/fixtures/ledger", "tree": "b463648ae3502b91f4f2722bf0fda77707d945ee", "status": "ready", "thread": ["@code/core", "@rust/cargo", "@rust/source", "@rust/test"], + { "id": "ledger", "path": "gsd/parity/fixtures/ledger", "tree": "4ac8c20bb145d803f6635ea60ddd8772c6f55da9", "status": "ready", "thread": ["@code/core", "@rust/cargo", "@rust/source", "@rust/test"], "baseline": [ "I213 -:0", "gsd/E501 spec/quick.spec:20", "gsd/E501 spec/quick.spec:25", "gsd/W311 spec/plans.spec:210", "gsd/W313 spec/plans.spec:210", "gsd/W315 spec/plans.spec:210", "gsd/W316 spec/plans.spec:210", "gsd/W407 spec/plans.spec:119", diff --git a/evaluation/gsd-live/plan-phase.md b/evaluation/gsd-live/plan-phase.md index cec7dd9c5c..4df867dbfd 100644 --- a/evaluation/gsd-live/plan-phase.md +++ b/evaluation/gsd-live/plan-phase.md @@ -9,7 +9,9 @@ Each statement about a refusal or a rule names the test of this repository that "observed in the run only". The transcripts and stream logs of the run are archived outside the repository. The run's spec writes are not in the repository either: their ledger lines are not, so they would not check on a fresh checkout. This record quotes their shape and counts. The decisions the run led to are -[ADR 0384](../../docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md). +[ADR 0384](../../docs/adr/0384-a-phases-plans-are-written-in-one-edit-and-its-spec-is-committed-like-code.md) and, for +the refusals no text could clear, +[ADR 0385](../../docs/adr/0385-a-code-may-be-settled-later-and-a-write-that-creates-its-subject-adds-no-error-of-it.md). ## Run @@ -87,9 +89,9 @@ step the prompt's step list runs between the planner and the plan checker. | Agent | Code | Message as the run printed it | The call | How it was cleared | Proof | |---|---|---|---|---|---| -| researcher | E080 (`compilation_failed`) with gsd/W204 twice | "the edit would leave the project with 2 errors it does not have; nothing was written"; "open question 'v1.0.0/03/03-RESEARCH/03-Q1' is resolved by no decision" (and 03-Q2) | one 9-op `specforge.edit`: four findings, three pitfalls, two open questions, batched against the researcher's rule of one item per call, so the two refused questions took the seven other items down with them | sent again as 7 ops without the two questions: they were lost | `assets_shell::researchers::an_open_question_strict_refuses_is_returned_not_dropped` (the rule now names a batch refused this way and says to send it again without the refused question); `assets_shell::researchers::plan_phase_records_the_users_answer_then_the_question` | +| researcher | E080 (`compilation_failed`) with gsd/W204 twice | "the edit would leave the project with 2 errors it does not have; nothing was written"; "open question 'v1.0.0/03/03-RESEARCH/03-Q1' is resolved by no decision" (and 03-Q2) | one 9-op `specforge.edit`: four findings, three pitfalls, two open questions, batched against the researcher's rule of one item per call, so the two refused questions took the seven other items down with them | sent again as 7 ops without the two questions: they were lost | accepted since ADR 0385: the questions are recorded open and the write reports gsd/W204 (`assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later`, `assets_shell::researchers::the_researcher_records_every_open_question_open`); the user's answer resolves them later (`assets_shell::researchers::plan_phase_resolves_the_recorded_question_with_the_users_answer`) | | planner | `invalid_input` | "'verify_paths' of task is computed by a pass of @gsd/core and is never written" | a 2-op dry run: the plan and one task | the field left out | observed in the run only | -| planner | E080 (`compilation_failed`) with gsd/W309 and gsd/E301 | "plan 'v1.0.0/03/03-01' has no truth and no artifact"; "requirement 'FEATURE-120' of phase 'v1.0.0/03' is in no plan of the phase" | the same 2-op dry run | the whole plan in one edit | `assets_shell::planner_edit::a_plan_written_alone_is_refused_and_nothing_is_written` | +| planner | E080 (`compilation_failed`) with gsd/W309 and gsd/E301 | "plan 'v1.0.0/03/03-01' has no truth and no artifact"; "requirement 'FEATURE-120' of phase 'v1.0.0/03' is in no plan of the phase" | the same 2-op dry run | the whole plan in one edit | accepted since ADR 0385: the plan is written and the write reports both until the rest of the phase settles them (`assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles`); the one edit stays the atomic route (`assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`) | | planner | `invalid_input` | "edit 2 (create task T1): 'rationale' is not a member of 'reversibility' (members: rating, why, settled_by)" | a 34-op dry run | the member renamed from the schema | observed in the run only | | planner | none: accepted | gsd/W311, gsd/W313, gsd/W315 (errors) and gsd/W316 (a warning): "is not checked ...: no verdict", and I213 | the 34-op dry run, then the same edit written | nothing to clear: judged rules, settled by the checker's verdicts | `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`: the edit accepted, each plan owing exactly these four, errors under gsd-strict (warnings under gsd-compat) but gsd/W316 | | plan checker | E062 | "the token budget of 8000 cannot hold route `gsd/plan-checker`'s core sections for `v1.0.0/03/03-01` (21039 tokens: the envelope, the subject and its core sections); raise the budget" | `specforge context gsd/plan-checker v1.0.0/03/03-01` | read the plan with `specforge query` instead | observed in the run only | @@ -135,13 +137,13 @@ The order the prompt prescribes, the thread step before the plan check, is pinne | What the run showed | Where | Fixed or logged | Commit on this branch | Tests or reproduction | |---|---|---|---|---| -| the planner was told to write plan by plan with typed creations, a route a phase refuses (gsd/E301 in every profile, gsd/W309 under gsd-strict); the agent found the one-edit route after refused dry runs | the planner's body and every writer of a phase's plans | fixed | `a28be302f` docs(adr): a phase's plans are written in one edit and its spec is committed like code (ADR 0384); `89fdcf147` fix(gsd): the planner writes a phase's plans in one specforge.edit, the only route a phase accepts; `85ed24dfd` fix(gsd): every writer of a phase's plans names the plan edit, and its uncleared refusals are pinned | `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`, `assets_shell::planner_edit::a_dependency_found_later_is_linked`, `assets_shell::planner_edit::a_plan_written_alone_is_refused_and_nothing_is_written`, `assets_shell::planner_edit::the_plan_format_is_one_edit_of_the_whole_phase`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit`, and the quick pin `cmd_quick::a_quick_plan_minted_without_must_haves_is_refused_under_strict_only` | -| the commit step read `commit_docs`, a key `@gsd/core` does not declare, and skipped; a dozen other steps called it a setting or branched on it | plan-phase step 13d and every asset naming it | fixed | `9fa0bcbac` fix(gsd): plan-phase commits its spec, and reads no commit_docs setting it does not have; `0e72efc5c` fix(gsd): no workflow calls commit_docs a setting or branches on it; the roster decides; `d3636f495` fix(gsd): every line naming commit_docs says it is not a setting here, and no read of it is allowed; `07e9f7547` fix(gsd): the settings workflow counts the settings of its section layout, and a test holds it; `bd7dea4aa` fix(gsd): the committed spec's row of keys is swept whole, uncommitted mode with it; `9379e76c7` fix(gsd): the executor surfaces a gitignored spec as an error, and no step commits it conditionally | `assets_shell::commits::the_plan_commit_step_commits_the_spec_and_an_empty_one_says_nothing_to_commit`, `settings_roster::the_plan_phase_family_reads_no_commit_docs`, `settings_roster::every_key_an_asset_calls_a_setting_is_a_key_of_the_roster`, `settings_roster::the_committed_spec_keys_are_named_only_as_not_a_setting_here`, `settings_roster::the_settings_workflow_counts_the_settings_of_its_section_layout`, `settings_roster::no_asset_makes_the_spec_commit_conditional_or_skips_an_ignored_spec`, `ported_text::every_setting_a_line_reads_is_a_key_of_the_roster` | -| the researcher dropped its two open questions to get the research written | the researcher's rule and the handling of its return by plan-phase, quick and quick-batch | the text fixed: the question is returned, the planner records no answer of its own, and the user's answer is recorded with the question after the planner; the refusal itself logged | `fd1a8d45e` fix(gsd): an open question gsd-strict refuses is returned to the planner, never dropped; `41b713f8e` fix(gsd): the planner leaves a research question to the user, whose answer is recorded with it | `assets_shell::researchers::an_open_question_strict_refuses_is_returned_not_dropped`, `assets_shell::researchers::plan_phase_records_the_users_answer_then_the_question`, `assets_shell::researchers::quick_and_quick_batch_record_the_users_answer_then_the_question`; reproduction under gsd-strict: `specforge new open_question OQ2 "Sort order" --in --research --question "..." --unclear "..."` without `--resolved_by` exits 1, E080 with gsd/W204, nothing written; the fix that would let it through is the kernel question below | -| the agents called the phase "Phase 12: Graph Protocol Schema Versioning" while every command said `v1.0.0/03` | the phase entity's own title | logged: not a product defect, the agents echoed the spec | none | `grep -n '"Phase 12: ' spec/product/milestones.spec` prints `237:phase 03 "Phase 12: Graph Protocol Schema Versioning" {`; 13 phases of that file carry a "Phase N:" title in a global numbering; the rendered prompt holds no "12" | -| found reading the same class, not met by the run: chunked mode writes a phase's first plan alone, refused gsd/E301 in every profile when the phase's requirements span plans | chunked planning mode | logged and pinned; chunked mode reads the planner's `## PLAN BLOCKED` as blocked and offers to plan the rest of the phase in one run | `85ed24dfd` (above); `63715598f` fix(gsd): chunked mode reads a blocked plan as blocked, and its recovery writes only missing plans | `assets_shell::planner_edit::a_whole_plan_written_alone_is_refused_while_a_requirement_of_its_phase_is_in_no_plan`, `assets_shell::planner_edit::the_rest_of_a_chunked_run_writes_only_the_plans_the_graph_lacks`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit` | -| found reading the same class, not met by the run: quick's plan mint is refused gsd/W309 under gsd-strict | quick's mint line | logged and pinned | `85ed24dfd` (above) | `cmd_quick::a_quick_plan_minted_without_must_haves_is_refused_under_strict_only` | -| the plan checker's context route could not hold its core sections for the run's plan (E062, 21039 tokens against 8000) | the `gsd/plan-checker` route's budget | logged | none | observed in the run only: the plan is not in the repository; `specforge context gsd/plan-checker ` on a plan of that size | +| the planner was told to write plan by plan with typed creations, a route a phase refuses (gsd/E301 in every profile, gsd/W309 under gsd-strict); the agent found the one-edit route after refused dry runs | the planner's body and every writer of a phase's plans | fixed | `a28be302f` docs(adr): a phase's plans are written in one edit and its spec is committed like code (ADR 0384); `89fdcf147` fix(gsd): the planner writes a phase's plans in one specforge.edit, the only route a phase accepts; `85ed24dfd` fix(gsd): every writer of a phase's plans names the plan edit, and its uncleared refusals are pinned; since ADR 0385 a plan written alone is accepted too, the edit staying the atomic route: `c5a950a59` feat(gsd): an open question, a phase's plan coverage and a plan's must-haves are settled later; `8112e112a` fix(gsd): a phase's plans may be written one at a time; the planner's one edit stays atomic | `assets_shell::planner_edit::the_planner_writes_a_phase_in_one_edit`, `assets_shell::planner_edit::a_dependency_found_later_is_linked`, `assets_shell::planner_edit::a_plan_written_alone_is_written_and_reports_what_a_later_write_settles`, `assets_shell::planner_edit::the_plan_format_is_one_edit_of_the_whole_phase`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit`, and the quick pin `cmd_quick::a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict` | +| the commit step read `commit_docs`, a key `@gsd/core` does not declare, and skipped; a dozen other steps called it a setting or branched on it | plan-phase step 13d and every asset naming it | fixed | `9fa0bcbac` fix(gsd): plan-phase commits its spec, and reads no commit_docs setting it does not have; `0e72efc5c` fix(gsd): no workflow calls commit_docs a setting or branches on it; the roster decides; `d3636f495` fix(gsd): every line naming commit_docs says it is not a setting here, and no read of it is allowed; `07e9f7547` fix(gsd): the settings workflow counts the settings of its section layout, and a test holds it; `bd7dea4aa` fix(gsd): the committed spec's row of keys is swept whole, uncommitted mode with it; `9379e76c7` fix(gsd): the executor surfaces a gitignored spec as an error, and no step commits it conditionally | `assets_shell::commits::the_plan_commit_step_commits_the_spec_and_an_empty_one_says_nothing_to_commit`, `settings_roster::the_plan_phase_family_reads_no_commit_docs`, `settings_roster::every_key_an_asset_calls_a_setting_is_a_key_of_the_roster`, `settings_roster::no_asset_names_a_not_applicable_key`, `settings_roster::the_settings_workflow_counts_the_settings_of_its_section_layout`, `settings_roster::no_asset_makes_the_spec_commit_conditional_or_skips_an_ignored_spec`, `ported_text::every_setting_a_line_reads_is_a_key_of_the_roster` | +| the researcher dropped its two open questions to get the research written | the researcher's rule and the handling of its return by plan-phase, quick and quick-batch | fixed: the text first returned the question and recorded it with the user's answer after the planner; since ADR 0385 the researcher records it open and the answer resolves it later | `fd1a8d45e` fix(gsd): an open question gsd-strict refuses is returned to the planner, never dropped; `41b713f8e` fix(gsd): the planner leaves a research question to the user, whose answer is recorded with it; `c5a950a59` feat(gsd): an open question, a phase's plan coverage and a plan's must-haves are settled later; `88fe3d70e` fix(gsd): the researcher records every open question open, and the user's answer resolves it later | `assets_shell::researchers::an_open_question_is_recorded_open_and_its_answer_resolves_it_later`, `assets_shell::researchers::the_researcher_records_every_open_question_open`, `assets_shell::researchers::plan_phase_resolves_the_recorded_question_with_the_users_answer`, `assets_shell::researchers::quick_and_quick_batch_resolve_the_recorded_question_with_the_users_answer`; reproduction under gsd-strict: `specforge new open_question OQ2 "Sort order" --in --research --question "..." --unclear "..."` without `--resolved_by` exits 0, writes the question and reports gsd/W204, and `specforge check` fails on it until a decision resolves it | +| the agents called the phase "Phase 12: Graph Protocol Schema Versioning" while every command said `v1.0.0/03` | the phase entity's own title | logged at the run: not a product defect, the agents echoed the spec; closed since (see Closed since the run) | none at the run | at the run, `grep -n '"Phase 12: ' spec/product/milestones.spec` printed `237:phase 03 "Phase 12: Graph Protocol Schema Versioning" {` and 13 phases of that file carried a "Phase N:" title in a global numbering; the rendered prompt held no "12". At HEAD the grep prints nothing | +| found reading the same class, not met by the run: chunked mode writes a phase's first plan alone, refused gsd/E301 in every profile when the phase's requirements span plans | chunked planning mode | fixed: since ADR 0385 each plan of a chunked run is written, reporting what a later plan settles; `## PLAN BLOCKED` means a refused call, and a run stopped midway leaves a half-planned phase that `execute_phase` refuses | `85ed24dfd` (above); `63715598f` fix(gsd): chunked mode reads a blocked plan as blocked, and its recovery writes only missing plans; `c5a950a59` feat(gsd): an open question, a phase's plan coverage and a plan's must-haves are settled later; `8112e112a` fix(gsd): a phase's plans may be written one at a time; the planner's one edit stays atomic; `e974b190a` feat(gsd): execute_phase refuses a half-planned phase (gsd/E301, gsd/W309, gsd/E310) | `assets_shell::planner_edit::a_phases_plans_written_one_at_a_time_are_each_accepted_and_the_last_settles_coverage`, `assets_shell::planner_edit::the_rest_of_a_chunked_run_writes_only_the_plans_the_graph_lacks`, `assets_shell::planner_edit::every_writer_of_a_phases_plans_names_the_plan_edit`, `prompts_gates::e301_e310_w309_a_half_planned_phase_refuses_execute_phase` | +| found reading the same class, not met by the run: quick's plan mint is refused gsd/W309 under gsd-strict | quick's mint line | fixed: since ADR 0385 the mint is written under gsd-strict, reporting gsd/W309 until the planner writes the must-haves | `85ed24dfd` (above); `c5a950a59` feat(gsd): an open question, a phase's plan coverage and a plan's must-haves are settled later | `cmd_quick::a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict` | +| the plan checker's context route could not hold its core sections for the run's plan (E062, 21039 tokens against 8000) | the `gsd/plan-checker` route's budget, and every route's | fixed: since ADR 0386 a read that states no cap serves the core whole, a route's budget is its enrich allowance, and E062 is a stated cap below the core; the plan check reads the project's decisions and those its research resolves, not every decision | `a531e90d7` docs(adr): a context pack serves its core whole, and a route's budget is its enrich allowance; `d8ccac10c` feat(context)!: a pack serves its core whole, and E062 is a stated cap below it; `31cb07b50` feat(gsd)!: the plan check reads the decisions its plan answers to, and a real-size plan starts | `contexts::the_plan_checker_serves_a_real_size_plan_whole_where_a_fixed_budget_refused_it` on `gsd/core/tests/projects/real-size` (the 100 project decisions and a plan of the run's size: a core of 20,724 tokens served, a cap of 8000 is E062); `contexts::start_plan_records_a_real_size_plans_executor_pack_and_only_a_stated_cap_refuses_it` | ## Limits of the run @@ -151,15 +153,28 @@ The order the prompt prescribes, the thread step before the plan check, is pinne - One phase, one host, one pair of models. - The phase's feature was already built: the plan closes requirement threads, it builds nothing. -## Open for the owner - -- The kernel question of ADR 0384's Limits: E080 counts, on the write that creates its entity, a finding a later step of - the same workflow settles (an open question under gsd-strict, chunked mode's first plan, quick's mint under - gsd-strict). Whether E080 should stop counting such a finding is a kernel decision. -- The other rows of the settings' Not applicable table. The row of `commit_docs` is swept whole (`search_gitignored` - and `pr_strict` with it, held by `settings_roster::the_committed_spec_keys_are_named_only_as_not_a_setting_here`); - asset lines still name keys of the other rows without saying so (`graphify.*`, whose build timeout - settings-advanced still asks, `planning.sub_repos`, `workflow.auto_prune_state`): whether to sweep each row the - same way. -- Whether to retitle the spec's phases that carry a global "Phase N:" number. -- The `gsd/plan-checker` route's budget against a plan of a real phase. +## Closed since the run + +- The `gsd/plan-checker` route's budget against a plan of a real phase, the run's one open point for the owner. + ADR 0386 answers it for every route: a read that states no cap serves the core whole, a route's budget is its + enrich allowance, and the plan check reads the project's decisions and those its research resolves. A real-size + fixture holds it (`contexts::every_route_serves_its_core_whole_within_its_allowance_in_each_fixture`), and the + executor, which refused at `gsd start-plan` on a plan of the run's size, now records its pack. + +- The kernel question of ADR 0384's Limits: E080 counted, on the write that creates its entity, a finding a later + step of the same workflow settles. ADR 0385 answers it: a code may be settled later, and `@gsd/core` declares + gsd/W204, gsd/E301, gsd/E310 and gsd/W309 so (`declaration::the_settled_later_codes_are_the_rows_of_rules_md`). + The open question, chunked mode's first plan and quick's mint under gsd-strict are written and their findings + reported (the Refusals and Defects above), and a half-planned phase is refused by `execute_phase` + (`prompts_gates::e301_e310_w309_a_half_planned_phase_refuses_execute_phase`). +- The other rows of the settings' Not applicable table are swept as the row of `commit_docs` was: one guard, + `settings_roster::no_asset_names_a_not_applicable_key`, reads every row but the secrets one from + `gsd/core/spec/settings.md` and scans the assets and the prompt and install goldens. The advanced settings no + longer ask for `graphify.build_timeout` or `workflow.auto_prune_state` + (`settings_roster::the_advanced_settings_workflow_reads_and_confirms_only_settings`). +- The spec's thirteen phases that carried a global "Phase N:" number are titled by their names, and absorb, which + wrote those titles, titles a converted phase by its name (`tests::roadmap` and `absorb_e2e` in `xtask`). +- A phase's label has one source: ADR 0387 drops `name` from `@gsd/core`'s phase and milestone, so a phase is + labelled `Phase : `, and a pass reads each entity's title. A title that begins + with a phase number is `gsd/W109` (`roadmap::a_numbered_phase_title_is_w109`), so the drift the run met is reported + wherever it is written. diff --git a/examples/marketing/extension/wasm/inputs.json b/examples/marketing/extension/wasm/inputs.json index 776750fd31..b84e52bba7 100644 --- a/examples/marketing/extension/wasm/inputs.json +++ b/examples/marketing/extension/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "marketing.wasm", - "artifact_sha256": "8ced7a2a3b9d4f2943d63b7144df2ef006ff4e4c6a73743df3cc8eb731250890", + "artifact_sha256": "cf2be6228d2c707a8ac0679ba26b3f0ecc5867d8e7bb638191d06f0d8911e102", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/examples/marketing/extension/wasm/marketing.wasm b/examples/marketing/extension/wasm/marketing.wasm index ab0ef6d0e4..85164218b5 100644 Binary files a/examples/marketing/extension/wasm/marketing.wasm and b/examples/marketing/extension/wasm/marketing.wasm differ diff --git a/extensions/cargo-test/wasm/inputs.json b/extensions/cargo-test/wasm/inputs.json index ab1884626f..3e3f98f319 100644 --- a/extensions/cargo-test/wasm/inputs.json +++ b/extensions/cargo-test/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_cargo_test.wasm", - "artifact_sha256": "8c108eecd3597fadf7ec95aae13af828a0d65a5e54ad5aab6b81a3762856af7f", + "artifact_sha256": "282a95c0215325c352df2ff54c1ff3dc34f134b821721bd484dee92945f9c146", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/cargo-test/wasm/specforge_ext_cargo_test.wasm b/extensions/cargo-test/wasm/specforge_ext_cargo_test.wasm index a87131dd10..17da1c1a60 100644 Binary files a/extensions/cargo-test/wasm/specforge_ext_cargo_test.wasm and b/extensions/cargo-test/wasm/specforge_ext_cargo_test.wasm differ diff --git a/extensions/checks/wasm/inputs.json b/extensions/checks/wasm/inputs.json index ddf6cb5314..d01c14a711 100644 --- a/extensions/checks/wasm/inputs.json +++ b/extensions/checks/wasm/inputs.json @@ -1,6 +1,6 @@ { "artifact": "specforge_ext_checks.wasm", - "artifact_sha256": "3f6f22c633642374f70e18ab75f7871a575f705a0f993b630556a2e070f87e28", + "artifact_sha256": "8a5ca53dda6d8dba09dd7519e622202db68f765d22deedbe399721bcfef7482e", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", @@ -36,15 +36,15 @@ "crates/leaf/checks-kit/src/tables/mod.rs": "af8aaee6fbf35380b7da6df68d2e93e44a1936f60b153a4f6da7b171ede3767d", "crates/leaf/checks-kit/src/tree.rs": "2123278c5975bfab982b1344d31066c19c28e782af894179852553647192dfb2", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -56,7 +56,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -69,16 +69,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -88,7 +88,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/checks/wasm/specforge_ext_checks.wasm b/extensions/checks/wasm/specforge_ext_checks.wasm index 9517aa9549..31badce49f 100644 Binary files a/extensions/checks/wasm/specforge_ext_checks.wasm and b/extensions/checks/wasm/specforge_ext_checks.wasm differ diff --git a/extensions/code/core/wasm/inputs.json b/extensions/code/core/wasm/inputs.json index 097d6053bc..e844cdca46 100644 --- a/extensions/code/core/wasm/inputs.json +++ b/extensions/code/core/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_code_core.wasm", - "artifact_sha256": "0d5d03632d848f6eaee95fb879a9fae90e299b006896cef2d2905753bed305f6", + "artifact_sha256": "9fe9327c90a23be46b1d23722d72b9118837e9a9e756d261f180384e2dcc5419", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/code/core/wasm/specforge_ext_code_core.wasm b/extensions/code/core/wasm/specforge_ext_code_core.wasm index debeb41f0f..6e157aea79 100644 Binary files a/extensions/code/core/wasm/specforge_ext_code_core.wasm and b/extensions/code/core/wasm/specforge_ext_code_core.wasm differ diff --git a/extensions/formal/wasm/inputs.json b/extensions/formal/wasm/inputs.json index c68b1bb1a8..4266582627 100644 --- a/extensions/formal/wasm/inputs.json +++ b/extensions/formal/wasm/inputs.json @@ -1,6 +1,6 @@ { "artifact": "specforge_ext_formal.wasm", - "artifact_sha256": "6effe82b55ccb1439ce75b363afdbc4a580d3e83f1e880dd75bcfa5d2df441d9", + "artifact_sha256": "950fa380cce952d7adb5ac98873cb37eae84d830a062fef098a166822e679fbc", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", @@ -9,15 +9,15 @@ "crates/leaf/cycles/Cargo.toml": "acca8d0cd53845b5ee733c9a90ec393e743a8bee2d4bc99f2e4255704014e70b", "crates/leaf/cycles/src/lib.rs": "18b6d9b085c507c2f0e52c1011d2d92526ac2e0e3f459d282d086ed5f497a920", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -29,7 +29,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -42,16 +42,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -61,7 +61,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/formal/wasm/specforge_ext_formal.wasm b/extensions/formal/wasm/specforge_ext_formal.wasm index 9772b3888e..3d806856fc 100755 Binary files a/extensions/formal/wasm/specforge_ext_formal.wasm and b/extensions/formal/wasm/specforge_ext_formal.wasm differ diff --git a/extensions/governance/wasm/inputs.json b/extensions/governance/wasm/inputs.json index 31b0a65ecd..1e1bb7e397 100644 --- a/extensions/governance/wasm/inputs.json +++ b/extensions/governance/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_governance.wasm", - "artifact_sha256": "7402d27f93d974297a3ec7a9a3c37fc2359a88ccfc52784c6ae7f2acf7d0ecb0", + "artifact_sha256": "ba345adf2ecb68271be942c289b198532a0c58fc5f031f207c05d79b68178b6b", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/governance/wasm/specforge_ext_governance.wasm b/extensions/governance/wasm/specforge_ext_governance.wasm index 63c8f28df6..67720bd861 100755 Binary files a/extensions/governance/wasm/specforge_ext_governance.wasm and b/extensions/governance/wasm/specforge_ext_governance.wasm differ diff --git a/extensions/javascript/node-test/wasm/inputs.json b/extensions/javascript/node-test/wasm/inputs.json index c1b5a85310..286e27d071 100644 --- a/extensions/javascript/node-test/wasm/inputs.json +++ b/extensions/javascript/node-test/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_javascript_node_test.wasm", - "artifact_sha256": "79f0e1a4aeb54e5702152516080d8233027f6cd0acfd9ace8bb19d7c0e077786", + "artifact_sha256": "a1ac345d8954f902f82b6aee52dd9849a1453454563e3286277a77bfe402e9e2", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/javascript/node-test/wasm/specforge_ext_javascript_node_test.wasm b/extensions/javascript/node-test/wasm/specforge_ext_javascript_node_test.wasm index 700600c0bf..2362e2ea54 100644 Binary files a/extensions/javascript/node-test/wasm/specforge_ext_javascript_node_test.wasm and b/extensions/javascript/node-test/wasm/specforge_ext_javascript_node_test.wasm differ diff --git a/extensions/javascript/source/wasm/inputs.json b/extensions/javascript/source/wasm/inputs.json index 2bb50da6f5..2980fa5688 100644 --- a/extensions/javascript/source/wasm/inputs.json +++ b/extensions/javascript/source/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_javascript_source.wasm", - "artifact_sha256": "855cd02a8c2fbdc3af4490cc25ebe00fa0fdf92fd37e58ea67ea1bf3dc50f476", + "artifact_sha256": "2cda95250c91ca49c5316bb310cf304c04d1b52de9d418d1d0bdd039519bdad1", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/javascript/source/wasm/specforge_ext_javascript_source.wasm b/extensions/javascript/source/wasm/specforge_ext_javascript_source.wasm index 8534ef2d72..65299e4d67 100644 Binary files a/extensions/javascript/source/wasm/specforge_ext_javascript_source.wasm and b/extensions/javascript/source/wasm/specforge_ext_javascript_source.wasm differ diff --git a/extensions/product/wasm/inputs.json b/extensions/product/wasm/inputs.json index 44dad74e91..c097479c12 100644 --- a/extensions/product/wasm/inputs.json +++ b/extensions/product/wasm/inputs.json @@ -1,6 +1,6 @@ { "artifact": "specforge_ext_product.wasm", - "artifact_sha256": "2ddc059e435a44259f31772534e31bfb3217d1460d35133bbe554ce04fc0e895", + "artifact_sha256": "710a9ae771873e72c43d0875ce6694056feea1e315a6f5c902bfaffe5b87b8f4", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", @@ -9,15 +9,15 @@ "crates/leaf/cycles/Cargo.toml": "acca8d0cd53845b5ee733c9a90ec393e743a8bee2d4bc99f2e4255704014e70b", "crates/leaf/cycles/src/lib.rs": "18b6d9b085c507c2f0e52c1011d2d92526ac2e0e3f459d282d086ed5f497a920", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -29,7 +29,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -42,16 +42,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -61,7 +61,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/product/wasm/specforge_ext_product.wasm b/extensions/product/wasm/specforge_ext_product.wasm index df3ee27d90..4a79003eb0 100755 Binary files a/extensions/product/wasm/specforge_ext_product.wasm and b/extensions/product/wasm/specforge_ext_product.wasm differ diff --git a/extensions/rust/cargo/wasm/inputs.json b/extensions/rust/cargo/wasm/inputs.json index fc4cbe110d..31ab9a0882 100644 --- a/extensions/rust/cargo/wasm/inputs.json +++ b/extensions/rust/cargo/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_rust_cargo.wasm", - "artifact_sha256": "0959cfe23cb6025ce76ef4828f68e99214c999c7c5baa21ed8b61ff6797e643e", + "artifact_sha256": "6095ae970f56d96142d71b11bad218d338365b2c261cf427a335b39874c1914f", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/rust/cargo/wasm/specforge_ext_rust_cargo.wasm b/extensions/rust/cargo/wasm/specforge_ext_rust_cargo.wasm index 5dbe28bdd6..8c7759c76b 100644 Binary files a/extensions/rust/cargo/wasm/specforge_ext_rust_cargo.wasm and b/extensions/rust/cargo/wasm/specforge_ext_rust_cargo.wasm differ diff --git a/extensions/rust/source/wasm/inputs.json b/extensions/rust/source/wasm/inputs.json index 72166d0bf0..e4f383ac14 100644 --- a/extensions/rust/source/wasm/inputs.json +++ b/extensions/rust/source/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_rust_source.wasm", - "artifact_sha256": "ec91aa307af1ffd76f5b8edbfb8ca1ad92dddcd051be319925b44b83f910784d", + "artifact_sha256": "6fdc50bcbe048696517ed28b2395c00317c2c255d54609f483d87f23bb7a8c0f", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/rust/source/wasm/specforge_ext_rust_source.wasm b/extensions/rust/source/wasm/specforge_ext_rust_source.wasm index 52f6a621b3..971ab5ceed 100644 Binary files a/extensions/rust/source/wasm/specforge_ext_rust_source.wasm and b/extensions/rust/source/wasm/specforge_ext_rust_source.wasm differ diff --git a/extensions/rust/test/wasm/inputs.json b/extensions/rust/test/wasm/inputs.json index fa288a2a0d..9961851fb8 100644 --- a/extensions/rust/test/wasm/inputs.json +++ b/extensions/rust/test/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_rust_test.wasm", - "artifact_sha256": "ae6d8d98e43eb6cd51acecc4a59f597300de929e9f95c7067355a746119f4343", + "artifact_sha256": "2b1416a6b212a90001d73c84cdb05125fa9d9f1deb8844ba9cb436d5308dd4ec", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/rust/test/wasm/specforge_ext_rust_test.wasm b/extensions/rust/test/wasm/specforge_ext_rust_test.wasm index 14b24dbdc5..81aa4c510b 100644 Binary files a/extensions/rust/test/wasm/specforge_ext_rust_test.wasm and b/extensions/rust/test/wasm/specforge_ext_rust_test.wasm differ diff --git a/extensions/software/wasm/inputs.json b/extensions/software/wasm/inputs.json index 7a6228f980..0eaa920709 100644 --- a/extensions/software/wasm/inputs.json +++ b/extensions/software/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_software.wasm", - "artifact_sha256": "4a0d293eb1be1dfd01979695d4945be6ab3d7559831dccc1ff647ebd2c3a4522", + "artifact_sha256": "e337a1f752043d4c69aec47668ef17dbe8f5297d383a5e17bd50261c0c11eb45", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/software/wasm/specforge_ext_software.wasm b/extensions/software/wasm/specforge_ext_software.wasm index 910a153653..1d8ba502e6 100755 Binary files a/extensions/software/wasm/specforge_ext_software.wasm and b/extensions/software/wasm/specforge_ext_software.wasm differ diff --git a/extensions/testing/wasm/inputs.json b/extensions/testing/wasm/inputs.json index 09ffc8c093..4fbab1e1c0 100644 --- a/extensions/testing/wasm/inputs.json +++ b/extensions/testing/wasm/inputs.json @@ -1,21 +1,21 @@ { "artifact": "specforge_ext_testing.wasm", - "artifact_sha256": "c41b5759424e4949000e068a7656362e27f69b45331189b734acea7dad6ccdd0", + "artifact_sha256": "13bcac623afdbf9989be3004c4ff99ec7e39ea09d26b69e64e59980ac93be5e8", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/coverage/Cargo.toml": "c1b44671e21c4038bfc87edd2e2d69943d257144c439ae9706ed80ba6a008859", "crates/leaf/coverage/src/lib.rs": "7f3ae9dfe19a63906be5d810f2d0106c955ca61580d6b73777f11758f5945e10", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -27,7 +27,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -40,16 +40,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -59,7 +59,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/testing/wasm/specforge_ext_testing.wasm b/extensions/testing/wasm/specforge_ext_testing.wasm index 4ab924dc94..f8a8e122cd 100644 Binary files a/extensions/testing/wasm/specforge_ext_testing.wasm and b/extensions/testing/wasm/specforge_ext_testing.wasm differ diff --git a/extensions/vitest/wasm/inputs.json b/extensions/vitest/wasm/inputs.json index 1ab15161cc..1096f5c236 100644 --- a/extensions/vitest/wasm/inputs.json +++ b/extensions/vitest/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "specforge_ext_vitest.wasm", - "artifact_sha256": "ebc00259d4b9c56431b42d29d46928c299c008ac9828bbb9299b381490c473aa", + "artifact_sha256": "30f87a155849a2eaed1655e43a6d3ebb9593ec0fd42903c19edc191573350914", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/extensions/vitest/wasm/specforge_ext_vitest.wasm b/extensions/vitest/wasm/specforge_ext_vitest.wasm index 6eeac6f4bc..2301bb4e40 100644 Binary files a/extensions/vitest/wasm/specforge_ext_vitest.wasm and b/extensions/vitest/wasm/specforge_ext_vitest.wasm differ diff --git a/fixtures/docref-extension/wasm/docref.wasm b/fixtures/docref-extension/wasm/docref.wasm index 16feb2a35b..aae38d00f2 100644 Binary files a/fixtures/docref-extension/wasm/docref.wasm and b/fixtures/docref-extension/wasm/docref.wasm differ diff --git a/fixtures/docref-extension/wasm/inputs.json b/fixtures/docref-extension/wasm/inputs.json index c8a713a6ba..98635e47bc 100644 --- a/fixtures/docref-extension/wasm/inputs.json +++ b/fixtures/docref-extension/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "docref.wasm", - "artifact_sha256": "991362c720d1bd319b5953fd046bf7b9ae6332b8d0d82aa3b9b472073e2a179c", + "artifact_sha256": "8664098a6f653a3d18f11cfc90ec39b4965da7e94e2d7482221448d10804288f", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/fixtures/greet-extension/wasm/greet.wasm b/fixtures/greet-extension/wasm/greet.wasm index 46233bf38c..5e6152b409 100644 Binary files a/fixtures/greet-extension/wasm/greet.wasm and b/fixtures/greet-extension/wasm/greet.wasm differ diff --git a/fixtures/greet-extension/wasm/inputs.json b/fixtures/greet-extension/wasm/inputs.json index c728bedd57..9bd8f1fff2 100644 --- a/fixtures/greet-extension/wasm/inputs.json +++ b/fixtures/greet-extension/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "greet.wasm", - "artifact_sha256": "cad5f6bf7b3c63ee3aa8656de672fe3539d82b86718fc30dd61e8784686bf30d", + "artifact_sha256": "529a48a87819e659359d8ee344dd2b46d024eb79999321bff96222e17190adfb", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/fixtures/sandbox-probe/wasm/inputs.json b/fixtures/sandbox-probe/wasm/inputs.json index 48b516967f..978152bad9 100644 --- a/fixtures/sandbox-probe/wasm/inputs.json +++ b/fixtures/sandbox-probe/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "sandbox_probe.wasm", - "artifact_sha256": "62447705e52b1eeb902422bf174267d92689065db8a06c4ab92f0e171e75dcdf", + "artifact_sha256": "49d7926ac15117871fb2b21130bb18d3d8e99bc0f781d1b5516ae2d3473840f9", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", diff --git a/fixtures/sandbox-probe/wasm/sandbox_probe.wasm b/fixtures/sandbox-probe/wasm/sandbox_probe.wasm index cd32d870ef..395bafb9f3 100644 Binary files a/fixtures/sandbox-probe/wasm/sandbox_probe.wasm and b/fixtures/sandbox-probe/wasm/sandbox_probe.wasm differ diff --git a/gate/src/blob_size.rs b/gate/src/blob_size.rs index a46d327f2a..516c1e289b 100644 --- a/gate/src/blob_size.rs +++ b/gate/src/blob_size.rs @@ -39,7 +39,16 @@ pub const CAP: u64 = cap!(); /// of runs, 5,717,309 B once a phase's plans were written in one edit, its spec was committed like code with no /// setting read for it, and an open question the strict profile refuses was returned to the planner, and 5,719,421 B /// once the user answered that question after the planner, chunked mode read a blocked plan as blocked and planned -/// only the rest, and the keys the committed spec rules out were swept whole. +/// only the rest, and the keys the committed spec rules out were swept whole, and 5,713,230 B once every key of the +/// Not applicable table was swept and a phase's label said where its number and name are read, and 5,721,094 B once +/// every asset that prints a phase label defined its placeholders and a phase's new name rewrote its slug, and +/// 5,722,710 B once four codes were settled later, the researcher recorded every open question open, a phase's plans +/// could be written one at a time and `execute_phase` refused a half-planned phase, 5,723,014 B once those codes said +/// a write that alters what their entity held is refused and an open question was answered at its own id, 5,723,184 B +/// once its routes stated enrich allowances and the plan check read the decisions its plan answers to, and 5,723,296 B +/// once a context record held only the cap its read stated and the plan check read the decisions a task names as +/// settling its door, and 5,727,088 B once a phase was named by its title alone, a numbered title was `gsd/W109` +/// and a pass entity carried its title, and 5,728,449 B once every line a person reads named a phase by its title. pub const ALLOWANCES: &[(&str, u64)] = &[("gsd/core/wasm/gsd_core.wasm", 5_800_000)]; /// The most bytes the committed blob at `path` may hold: its allowance, else [`CAP`]. diff --git a/gsd/core/README.md b/gsd/core/README.md index f1ff9c93a4..e6c9c45cda 100644 --- a/gsd/core/README.md +++ b/gsd/core/README.md @@ -14,12 +14,12 @@ extensions and the profiles declare it as their peer. |---|---|---| | Kinds | `project` (one per repository: the kernel keeps `singleton` as metadata, `gsd/E108` enforces it), `requirement` (named by its GSD id), `milestone` (scoped by workstream), `phase` (scoped by milestone, named `03`, `03.1` or `999.1`), `workstream`, `retrospective`, `lesson`, `methodology`; `context` (named `02-CONTEXT`, scoped by its phase), `decision` (`D-01`, scoped by its phase or the project, a project decision is `/D-01` from inside a scope; from outside, a phase's is `v1.0/02/D-01`), `deferred_idea`, `phase_spec`, `locked_req`, `interview` (append-only), `edge` and `spec_prohibition` (a spec's edge-coverage rows), `discussion` (its entries append-only, its checkpoint set and cleared), `research` and its eight item kinds (`finding`, `stack_choice`, `pattern`, `pitfall`, `dont_hand_roll`, `open_question`, `source`, `package_audit`), each item scoped by its research; `plan` (named `03-02`, scoped by its phase; a quick plan by its quick id), `task` and `checkpoint` (scoped by their plan, `T1`, `C1`), the must-haves `truth`, `artifact`, `key_link` and `prohibition`, `disposition` (append-only), `user_setup` and `plan_start` (what `start_plan` recorded); `review` (a cross-AI review round, scoped by its phase), `review_concern` (append-only, scoped by its round) and `revision_conflict`; `summary` (scoped by its plan), `deliverable` (scoped by its summary, with computed check statuses), `deviation` (append-only), `commit` (written only by the git collector), `pause`, `handoff`, `blocker` (its `gate` names a tripped TDD gate's task) and `quick_batch`; `verification`, `verify_gap`, `override` (human-only), `human_item`, `uat_session`, `uat_test`, `uat_gap`, `validation`, `validation_row`, `wave0_item`, `manual_check`, `milestone_audit` (its `debt_accepted` only a human sets), `broken_window` and `refactor_proposal`: 61 kinds in all | `src/kinds/`, model in [spec/project.md](spec/project.md), [spec/discuss.md](spec/discuss.md), [spec/plan.md](spec/plan.md), [spec/execute.md](spec/execute.md) and [spec/verify.md](spec/verify.md) | | Agents | the 15 core agents of gsd-core 1.19.0, bodies ported under MIT (`assets/agents/`), their tools mapped to host tool classes, ten with a compact variant (`specforge.agent_variant`) and each with a model line from `model_overrides.`. `specforge install ` writes them; a judge's file also lists the rules it judges: `gsd-plan-checker` (`gsd/W311`, `W313`, `W315`, `W316`), `gsd-verifier` (`gsd/E501`), `gsd-phase-researcher` (`gsd/W205`), `gsd-integration-checker` (`gsd/E518`); the other eleven judge nothing. A judge's body ends with a section that names `record_verdict`. **The bodies are runnable:** every `specforge gsd ` a ported line names is a declared command (`tests/port_tools.rs`), and a judge's body ends with a section that names `record_verdict` and the refusals of K17. The attribution notice always names the full file `agents/.md`, also when the compact body renders | `src/agents/`, `src/judged.rs` | -| Commands, prompts | 51 commands (31 write; `reference` prints an embedded workflow, reference or template, and `smart_entry` is read-only: it answers what `/gsd-next` routes by): `record_verdict` records a judge's verdict through `set_verdict`, the read-only `re_verify` lists the verifier's verdicts of a phase or a plan that are not fresh, and the read-only `thread_plan` answers a phase's plans and tasks in order as the agent plan `specforge trace --plan` checks; the plan, summary, checkpoint, UAT, validation, pause, blocker, broken-window, refactor, milestone, review, revision-conflict, quick-batch, lesson and commit-waiver commands write the `H` fields (31 of the 44 have a command writer and 13 are the `gsd-git` collector's; `contributions/README.md`); `health`, `stats` and `progress_report` read the computed values of the graph a command receives (ADR 0299); `phase`, `workstreams`, `cleanup`, `help`, `health`, `stats` and `surface` are also slash commands. 44 prompts and 50 slash commands (43 prompt-backed and 7 command-backed; `execute_plan` has no slash command): the lifecycle prompts `new_project`, `new_milestone`, `discuss_phase`, `spec_phase`, `mvp_phase`, `plan_phase`, `plan_review_convergence`, `ultraplan_phase`, `execute_phase`, `execute_plan`, `verify_work`, `validate_phase`, `add_tests`, `audit_uat`, `audit_milestone`, `complete_milestone`, `ship`, then `next`, `progress`, `manager`, `quick`, `quick_batch`, `fast`, `autonomous`, `pause_work`, `resume_work`, `review`, `review_backlog`, `settings`, `config`, `undo`, `pr_branch`, `milestone_summary`, `extract_learnings`, `ingest_docs`, `onboard`, `workspace`, `update` and the routers `ns_context`, `ns_ideate`, `ns_manage`, `ns_project`, `ns_review`, `ns_workflow`. Each renders upstream's workflow (287 ported assets under `assets/`, byte-equal to the vendored v1.19.0 text except the lines that named `.planning` or `gsd-tools`; `update` renders a text of ours, because upstream's installs upstream GSD over this one, and a router adds the route table of this install) for claude-code, codex and cursor. A prompt with a subject is gated: `plan_phase` and `ultraplan_phase` by `gsd/E201`, `W204`, `E206`, `W406`, `E516`; `execute_phase` by `W311`, `W313`, `W315`, `W318`, `E516`; `execute_plan` by `W318`, `E516`; `complete_milestone` by `E106`, `E511`, `E516`; `ship` by `E511`, `E512`, `E516`; the others by `E516`. `plan_phase` runs `thread_plan` as its step `thread`, between the planner and the plan checker, and feeds the answer to `specforge trace --plan`: an `ok: false` result is fixed, and the step run again, before the check. `gsd/W506` (a decision of a phase's context that no summary or commit mentions) gates `workflow.context_coverage_gate` | `src/commands/`, `src/prompts/` | +| Commands, prompts | 51 commands (31 write; `reference` prints an embedded workflow, reference or template, and `smart_entry` is read-only: it answers what `/gsd-next` routes by): `record_verdict` records a judge's verdict through `set_verdict`, the read-only `re_verify` lists the verifier's verdicts of a phase or a plan that are not fresh, and the read-only `thread_plan` answers a phase's plans and tasks in order as the agent plan `specforge trace --plan` checks; the plan, summary, checkpoint, UAT, validation, pause, blocker, broken-window, refactor, milestone, review, revision-conflict, quick-batch, lesson and commit-waiver commands write the `H` fields (31 of the 44 have a command writer and 13 are the `gsd-git` collector's; `contributions/README.md`); `health`, `stats` and `progress_report` read the computed values of the graph a command receives (ADR 0299); `phase`, `workstreams`, `cleanup`, `help`, `health`, `stats` and `surface` are also slash commands. 44 prompts and 50 slash commands (43 prompt-backed and 7 command-backed; `execute_plan` has no slash command): the lifecycle prompts `new_project`, `new_milestone`, `discuss_phase`, `spec_phase`, `mvp_phase`, `plan_phase`, `plan_review_convergence`, `ultraplan_phase`, `execute_phase`, `execute_plan`, `verify_work`, `validate_phase`, `add_tests`, `audit_uat`, `audit_milestone`, `complete_milestone`, `ship`, then `next`, `progress`, `manager`, `quick`, `quick_batch`, `fast`, `autonomous`, `pause_work`, `resume_work`, `review`, `review_backlog`, `settings`, `config`, `undo`, `pr_branch`, `milestone_summary`, `extract_learnings`, `ingest_docs`, `onboard`, `workspace`, `update` and the routers `ns_context`, `ns_ideate`, `ns_manage`, `ns_project`, `ns_review`, `ns_workflow`. Each renders upstream's workflow (287 ported assets under `assets/`, byte-equal to the vendored v1.19.0 text except the lines that named `.planning` or `gsd-tools`; `update` renders a text of ours, because upstream's installs upstream GSD over this one, and a router adds the route table of this install) for claude-code, codex and cursor. A prompt with a subject is gated: `plan_phase` and `ultraplan_phase` by `gsd/E201`, `W204`, `E206`, `W406`, `E516`; `execute_phase` by `E301`, `W309`, `E310` (a half-planned phase), `W311`, `W313`, `W315`, `W318`, `E516`; `execute_plan` by `W318`, `E516`; `complete_milestone` by `E106`, `E511`, `E516`; `ship` by `E511`, `E512`, `E516`; the others by `E516`. `plan_phase` runs `thread_plan` as its step `thread`, between the planner and the plan checker, and feeds the answer to `specforge trace --plan`: an `ok: false` result is fixed, and the step run again, before the check. `gsd/W506` (a decision of a phase's context that no summary or commit mentions) gates `workflow.context_coverage_gate` | `src/commands/`, `src/prompts/` | | Collectors | `gsd-git` records each commit that names a plan or task as a `commit` entity in its plan's file: `specforge collect --runner gsd-git --yes`, through the host's git port (no `git` program). Tests are not GSD's to collect: a runner pack (`@javascript/node-test`, `@rust/test`) records them as `@code/core`'s test facts (`specforge collect --runner node-test --no-run` reads node's JUnit report), a `[gsd:]` tag in a test's name names its entity, and a deliverable check's `ref` (GSD's `path#test name`, or a fact's id) names a fact | `src/collectors/` | -| Passes | `derive` (the computed fields: verification status, score and re-verification, UAT totals and status, validation coverage, audit status, the phase `completed` ladder and the window counts; plan, task, summary and deliverable-check status from the commits and the test facts; requirement, phase, milestone, project, workstream and context values), `execute` (`gsd/E401`, `gsd/W403`, `gsd/W407`, `gsd/W408`), `schema_drift` (`gsd/E405`), `roadmap` (`gsd/E101`, `gsd/E102`, `gsd/W103`, `gsd/W104`, `gsd/E108`, `gsd/E206`), `research` (`gsd/W204`), `plan_shape` (`gsd/W323`, `gsd/E302`, `gsd/E303`, `gsd/W304`, `gsd/E307`, `gsd/W308`, `gsd/W309`, `gsd/E322`), `waves` (the computed `plan.wave`, `plan.autonomous` and `plan.strict_wave`), `file_scope` (`gsd/W305`, `gsd/W306`), `wave_collision` (`gsd/W526`), `scope` (`gsd/E312`, `gsd/W317`), `cross_plan` (`gsd/E301`, `gsd/E310`, `gsd/I321`), `scan` (computes the file facts: anti-patterns, debt markers, artifact and key-link states) with `scan_check` (`gsd/E505`), `nyquist` (`gsd/E314`, `gsd/W510`), `verify_rules` (`gsd/E503`, `gsd/W504`, `gsd/E509`), `stale_truths` (`gsd/I527`, from the graph delta), `windows` (`gsd/E513`, `gsd/W514`), `gates` (the guards `gsd/E106`, `gsd/E511`, `gsd/E512`, `gsd/W318`, `gsd/W404`, `gsd/E515`, `gsd/E516`, which answer at a gate trigger and are silent on a write) and `verify_paths` (`gsd/E320`, `gsd/W324`; computes `task.verify_paths`, which it reads through the project's files) `fails_when` (`gsd/E507`) and `traceability` (`gsd/W520`, `gsd/E521`, `gsd/W522`; reads the files a complete plan deletes), `decision_coverage` (`gsd/W506`), `probe_rows` (`gsd/E523`) and `workstreams` (`gsd/E517`) | `src/passes/` | +| Passes | `derive` (the computed fields: verification status, score and re-verification, UAT totals and status, validation coverage, audit status, the phase `completed` ladder and the window counts; plan, task, summary and deliverable-check status from the commits and the test facts; requirement, phase, milestone, project, workstream and context values), `execute` (`gsd/E401`, `gsd/W403`, `gsd/W407`, `gsd/W408`), `schema_drift` (`gsd/E405`), `roadmap` (`gsd/E101`, `gsd/E102`, `gsd/W103`, `gsd/W104`, `gsd/E108`, `gsd/W109`, `gsd/E206`), `research` (`gsd/W204`), `plan_shape` (`gsd/W323`, `gsd/E302`, `gsd/E303`, `gsd/W304`, `gsd/E307`, `gsd/W308`, `gsd/W309`, `gsd/E322`), `waves` (the computed `plan.wave`, `plan.autonomous` and `plan.strict_wave`), `file_scope` (`gsd/W305`, `gsd/W306`), `wave_collision` (`gsd/W526`), `scope` (`gsd/E312`, `gsd/W317`), `cross_plan` (`gsd/E301`, `gsd/E310`, `gsd/I321`), `scan` (computes the file facts: anti-patterns, debt markers, artifact and key-link states) with `scan_check` (`gsd/E505`), `nyquist` (`gsd/E314`, `gsd/W510`), `verify_rules` (`gsd/E503`, `gsd/W504`, `gsd/E509`), `stale_truths` (`gsd/I527`, from the graph delta), `windows` (`gsd/E513`, `gsd/W514`), `gates` (the guards `gsd/E106`, `gsd/E511`, `gsd/E512`, `gsd/W318`, `gsd/W404`, `gsd/E515`, `gsd/E516`, which answer at a gate trigger and are silent on a write) and `verify_paths` (`gsd/E320`, `gsd/W324`; computes `task.verify_paths`, which it reads through the project's files) `fails_when` (`gsd/E507`) and `traceability` (`gsd/W520`, `gsd/E521`, `gsd/W522`; reads the files a complete plan deletes), `decision_coverage` (`gsd/W506`), `probe_rows` (`gsd/E523`) and `workstreams` (`gsd/E517`) | `src/passes/` | | Hooks | 15 hooks (r44, K20c): `read_guard`, `write_guard`, `secret_read_guard`, `injection_scanner`, `prompt_guard`, `worktree_path_guard`, `workflow_marker`, `workflow_guard`, `context_monitor`, `context_compacted`, `statusline`, `config_reload` and, under `hooks.community`, `validate_commit`, `phase_boundary`, `session_state`; what each does and does not do is in `contributions/README.md` | `src/hooks/` | | Rules | `gsd/E105` (an `out_of_scope` requirement has a reason), `gsd/E201` (a context has canonical refs: two declarative rules under one code), `gsd/E107` (generated for each authored timestamp field and block member: first `blocker.resolved.at`), `gsd/E402` (a halted summary says why), the seven declarative `gsd/E307` rules (what each checkpoint kind requires) and `gsd/E319` (a test-tier prohibition names a test) | `src/rules.rs`, `../kit/src/dsl.rs` | -| Code book | all 72 `gsd/` codes of [spec/rules.md](spec/rules.md), each with its `gsd-compat` severity and what `gsd-strict` raises it to; the rules of the others land with their kinds | `src/codes.rs` | +| Code book | all 73 `gsd/` codes of [spec/rules.md](spec/rules.md), each with its `gsd-compat` severity and what `gsd-strict` raises it to; the rules of the others land with their kinds | `src/codes.rs` | | Settings | the 181 GSD configuration keys `@gsd/core` declares (a count of declarations; ACCEPTANCE counts the inventory's 212 keys, 161 built here, on that basis), typed with GSD's default, and 12 families (`models.*`, `granularities.*`, …), `specforge.agent_variant`, the ten `specforge.surface.` settings that show or hide skills; the 15 `model_overrides.` keys belong to the `model_overrides.*` family and are set by a preset | `src/settings/keys.rs`, model in [spec/settings.md](spec/settings.md) | | Profiles | `profile` (`gsd-compat` by default, `gsd-strict`, `gsd-plus`), presetting seven settings (`workflow.windows_enforce` and six `specforge.*` gates) and raising rule severities; `model_profile` presets the 15 `model_overrides.` and `workflow.compact_content` presets `specforge.agent_variant` | `src/settings/profiles.rs` | | Gates | the six `specforge.*` settings and the `workflow.*` toggles switch off the rules [spec/rules.md](spec/rules.md#setting-gated-rules) lists | `src/settings/gates.rs` | diff --git a/gsd/core/assets/agents/gsd-executor.md b/gsd/core/assets/agents/gsd-executor.md index f304838376..1ae5bc2438 100644 --- a/gsd/core/assets/agents/gsd-executor.md +++ b/gsd/core/assets/agents/gsd-executor.md @@ -148,7 +148,7 @@ For each task: - Handle auth errors as authentication gates - Run verification, confirm done criteria - Commit (see task_commit_protocol) - - Track completion + commit hash for Summary + - Track completion and the commit's hash for the checks and the return (the summary names no hash) 2. **If `type="tracer"`:** (production-quality, never a throwaway) - Execute and commit exactly like `type="auto"`. @@ -558,11 +558,7 @@ specforge git add src/types/user.ts **4. Commit:** -**If `sub_repos` is configured (non-empty array from init context):** Use `commit-to-subrepo` to route files to their correct sub-repo: -```bash -specforge git --in "{sub_repo}" commit -m "{type}({phase}-{plan}): {concise task description}" -m "Gsd-Task: {phase}-{plan}/{task}" -- file1 file2 ... -``` -**0c. Plan commit ledger (#3968, single-repo):** nothing to run here. +**0c. Plan commit ledger (#3968):** nothing to run here. Each Bash call is a FRESH shell, so the ledger is in the graph: `record_start_time` above gave `start-plan` the plan's head, which its `plan_start` keeps once, across shells and worktrees. A rebase after the start can overcount: a commit collected before it keeps its entity and its old id. @@ -571,11 +567,9 @@ A rebase after the start can overcount: a commit collected before it keeps its e ``` The summary's `actuals.commits` is computed from this ledger, and `/gsd:verify-work` reads the same recorded -head for its same-instrument check. Multi-repo keeps commit-to-subrepo JSON hashes instead. - -Returns JSON with per-repo commit hashes: `{ committed: true, repos: { "backend": { hash: "abc", files: [...] }, ... } }`. The summary names no hash: the commits are collected (`specforge collect --runner gsd-git --yes`) and read from the graph. +head for its same-instrument check. -**Otherwise (standard single-repo):** +**The task commit:** ```bash specforge git commit -m "{type}({phase}-{plan}): {concise task description} @@ -584,9 +578,9 @@ specforge git commit -m "{type}({phase}-{plan}): {concise task description} " -m "Gsd-Task: {phase}-{plan}/{task}" ``` -**5. Record hash:** -- **Single-repo:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — track for SUMMARY. -- **Multi-repo (sub_repos):** Extract hashes from `commit-to-subrepo` JSON output (`repos.{name}.hash`). The summary names none of them: the collector reads the commits. +**5. Record hash:** `TASK_COMMIT=$(git rev-parse --short HEAD)` — for the post-commit check below and the return's +commit list (a checkpoint's Completed Tasks, the completion format's **Commits**). The summary names no hash: the +commits are collected (`specforge collect --runner gsd-git --yes`) and its `actuals.commits` is read from the graph. **6. Post-commit deletion check:** After recording the hash, verify the commit did not accidentally delete tracked files: ```bash diff --git a/gsd/core/assets/agents/gsd-phase-researcher.md b/gsd/core/assets/agents/gsd-phase-researcher.md index d37b1eb8a6..f3fc17253a 100644 --- a/gsd/core/assets/agents/gsd-phase-researcher.md +++ b/gsd/core/assets/agents/gsd-phase-researcher.md @@ -758,12 +758,25 @@ The `research` entity `{phase_id}/{phase_num}-RESEARCH` (`$RESEARCH_ID`) is the IFS= read -rd '' WHAT <<'TEXT' || true; WHAT=${WHAT%$'\n'} {what the pattern is} TEXT + IFS= read -rd '' QUESTION <<'TEXT' || true; QUESTION=${QUESTION%$'\n'} + {an open question} + TEXT + IFS= read -rd '' KNOWN <<'TEXT' || true; KNOWN=${KNOWN%$'\n'} + {what is known} + TEXT + IFS= read -rd '' UNCLEAR <<'TEXT' || true; UNCLEAR=${UNCLEAR%$'\n'} + {what is unclear} + TEXT + IFS= read -rd '' RECOMMENDATION <<'TEXT' || true; RECOMMENDATION=${RECOMMENDATION%$'\n'} + {your recommendation} + TEXT PHASE_FILE=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].file') || exit 1 RESEARCH_ID="$PHASE_ID/$RESEARCH" specforge new research "$RESEARCH" "$TITLE" --in "$PHASE_FILE" --phase "$PHASE_ID" --confidence "$CONFIDENCE" --summary "$SUMMARY" || exit 1 specforge new finding F1 "$FINDING" --in "$PHASE_FILE" --research "$RESEARCH_ID" --text "$FINDING" --confidence "$CONFIDENCE" || exit 1 specforge new pitfall PF1 "$PITFALL" --in "$PHASE_FILE" --research "$RESEARCH_ID" --name "$PITFALL" --goes_wrong "$GOES_WRONG" --why "$WHY" --avoid "$AVOID" || exit 1 specforge new pattern P1 "$PATTERN" --in "$PHASE_FILE" --research "$RESEARCH_ID" --name "$PATTERN" --what "$WHAT" || exit 1 + specforge new open_question Q1 "$QUESTION" --in "$PHASE_FILE" --research "$RESEARCH_ID" --question "$QUESTION" --known "$KNOWN" --unclear "$UNCLEAR" --recommendation "$RECOMMENDATION" || exit 1 ``` The orchestrator records the pack the research read when you return. @@ -772,12 +785,12 @@ The `research` entity `{phase_id}/{phase_num}-RESEARCH` (`$RESEARCH_ID`) is the 4. **One item per call.** Each item of the structure below is its own `specforge new` call, of its kind, with `--research "$RESEARCH_ID"` (`finding`, `stack_choice`, `pattern`, `pitfall`, `dont_hand_roll`, `open_question`, `source`, `package_audit`), as Step D records a finding: - no single call carries the whole research, so no tool call is cut mid-payload; - a refused call names the field it refused: fix that value and run the call again; - - an `open_question` refused with `gsd/W204` is the exception: no decision resolves it yet, and gsd-strict - raises that warning to an error, so the write is refused. Do not invent a decision to resolve it and never drop - it: record every other item, then return the question under `### Open Questions` with what is known, what is - unclear and your recommendation. The user answers it after the planner, and the orchestrator records the - answer with the question. A `specforge.edit` that batches items against this rule and is refused writes - nothing: send it again without the refused question; + - record every `open_question` open, as the `Q1` line above does: no `--resolved_by`, since no decision + resolves it yet, and you invent none. The write reports `gsd/W204` (an error under gsd-strict) and is not + refused for it: a later step settles it, the user's answer, recorded as a decision and set as the question's + `resolved_by`. Never drop a question and never return one in place of recording it; list each you recorded, + by its own id (`Q1`, the last segment of its path `$RESEARCH_ID/Q1`), under `### Open Questions` in your + return; - an item already recorded is not recorded twice: `specforge query "$RESEARCH_ID" --depth 1` lists them. 5. **If a call is still refused, surface its error in your return message.** **Do NOT silently fall back to returning content** — that hides the failure from the orchestrator. @@ -850,8 +863,8 @@ the `research` entity `{phase_id}/{phase_num}-RESEARCH` | Pitfalls | [level] | [why] | ### Open Questions -[Gaps that couldn't be resolved, and each open question the profile refused (gsd/W204): the question, what is known, -what is unclear, the recommendation] +[Each open question you recorded, by its own id under the research, e.g. `Q1` (gsd/W204 until the user's answer +resolves it): the question, what is known, what is unclear, the recommendation; and the gaps that couldn't be resolved] ### Ready for Planning Research complete. The planner can now write plan entities. diff --git a/gsd/core/assets/agents/gsd-planner.md b/gsd/core/assets/agents/gsd-planner.md index 3e8be7618a..d2e3a764d1 100644 --- a/gsd/core/assets/agents/gsd-planner.md +++ b/gsd/core/assets/agents/gsd-planner.md @@ -296,10 +296,13 @@ Full rules: @~/.claude/gsd-core/references/context-budget.md (Phase Sizing). Rea ## The Plan Edit A phase's plans are entities in the spec, written with **one** MCP `specforge.edit` call whose `edits` list is the -JSON below: all of it is written, or none of it. A phase's coverage (`gsd/E301`: each requirement of the phase is in a -plan of it) binds from its first plan and, under gsd-strict, a plan's must-haves (`gsd/W309`: a truth or an artifact) -from its first write, so the plans are never written one by one: a plan written alone is refused, and the whole call -writes nothing. Every plan of the phase, with its tasks, truths, artifacts and key links, goes in the one call. +JSON below: all of it is written, or none of it. It is the atomic route: every plan of the phase, with its tasks, +truths, artifacts and key links, goes in the one call, and the phase is never left half-planned. A phase's coverage +(`gsd/E301`: each requirement of the phase is in a plan of it; `gsd/E310`: each decision of its context is cited by +one) binds from its first plan and, under gsd-strict, a plan's must-haves (`gsd/W309`: a truth or an artifact) from +its first write. A later plan settles them, so a call that leaves one is written, not refused: it reports the finding, +and `check` fails on it until the rest of the phase is written. Chunked mode writes a phase that way, one plan per +call; write the whole phase here. Each plan has its own file, `plans/.spec` beside the phase's file (`specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].file'` prints the phase's file), so the executors of one @@ -766,13 +769,15 @@ message is a brief confirmation (see ``), never the plan's c The call is checked before it writes: a refusal names its codes (E080 carries the errors), and `specforge explain ` says what each code means and how to fix it. Fix the list and send the whole call again; a -refused call writes nothing, so nothing is left half-written. Never hand-edit a spec file instead. - -An open question the research could not record (the prompt's **Open questions the research returned:**: -gsd-strict refuses one that no decision resolves, `gsd/W204`) is the user's to answer, not yours. Record no decision -that resolves it and do not record the question. Write the plans so they hold whatever the answer; a task that -cannot follows a `decision` checkpoint that asks it. List each question, as you received it, under -`### Open Questions` in your return: the orchestrator asks the user and records the answer with the question. +refused call writes nothing, so nothing is left half-written. A written call that reports `gsd/E301`, `gsd/E310` or +`gsd/W309` left the phase incomplete: add what it names (a plan, a citation, a truth or an artifact) before you +return. Never hand-edit a spec file instead. + +An open question the research recorded (the prompt's **Open questions the research returned:**: no decision +resolves it yet, `gsd/W204`) is the user's to answer, not yours. Record no decision that resolves it and leave the +question as it is. Write the plans so they hold whatever the answer; a task that cannot follows a `decision` +checkpoint that asks it. List each question, by id, under `### Open Questions` in your return: the orchestrator asks +the user, records the answer as a decision and sets it as the question's `resolved_by`. diff --git a/gsd/core/assets/agents/gsd-roadmapper.compact.md b/gsd/core/assets/agents/gsd-roadmapper.compact.md index ec0c09ec4b..e43e3d645b 100644 --- a/gsd/core/assets/agents/gsd-roadmapper.compact.md +++ b/gsd/core/assets/agents/gsd-roadmapper.compact.md @@ -168,7 +168,7 @@ The phases' `requirements` and each requirement's computed `status`: nothing is ## The Roadmap's Entities -The roadmap is a `milestone` and its `phase` entities (`specforge schema --kind phase`, `specforge schema --kind milestone`), written in one `specforge.edit` call: the roadmap edit of ~/.claude/gsd-core/templates/roadmap.md. A phase carries `milestone`, `name`, `slug`, `goal`, `success_criteria`, `depends_on` (by number), `requirements` and, for a vertical-MVP project, `mode mvp`; its id is its number within the milestone, per `phase_id_convention`. The milestone carries `name` and `goal`. No title, checklist, detail section or progress table to write: the progress report renders them, and STATE is computed. +The roadmap is a `milestone` and its `phase` entities (`specforge schema --kind phase`, `specforge schema --kind milestone`), written in one `specforge.edit` call: the roadmap edit of ~/.claude/gsd-core/templates/roadmap.md. A phase carries its title (its name alone, no number: `gsd/W109`), `milestone`, `slug`, `goal`, `success_criteria`, `depends_on` (by number), `requirements` and, for a vertical-MVP project, `mode mvp`; its id is its number within the milestone, per `phase_id_convention`. The milestone carries its title (its name) and `goal`. No document title, checklist, detail section or progress table to write: the progress report renders them, and STATE is computed. ### UI Phase Detection A phase's `frontend` is computed by `@gsd/ui` from its goal/name/requirements/success criteria and the UI/frontend keywords (case-insensitive): `UI, interface, frontend, component, layout, page, screen, view, form, dashboard, widget, CSS, styling, responsive, navigation, menu, modal, sidebar, header, footer, theme, design system, Tailwind, React, Vue, Svelte, Next.js, Nuxt`. Write no `**UI hint**` annotation: `new-project` and `progress` read `frontend` to suggest `/gsd:ui-phase` at the right time. diff --git a/gsd/core/assets/agents/gsd-roadmapper.md b/gsd/core/assets/agents/gsd-roadmapper.md index bb18d28f2d..a72e777edb 100644 --- a/gsd/core/assets/agents/gsd-roadmapper.md +++ b/gsd/core/assets/agents/gsd-roadmapper.md @@ -313,7 +313,7 @@ Traceability is the phases' `requirements` and each requirement's computed `stat ## The Roadmap's Entities -The roadmap is a `milestone` and its `phase` entities (`specforge schema --kind phase`, `specforge schema --kind milestone`), written in one `specforge.edit` call: the roadmap edit of ~/.claude/gsd-core/templates/roadmap.md. A phase carries `milestone`, `name`, `slug`, `goal`, `success_criteria`, `depends_on` (by number), `requirements` and, for a vertical-MVP project, `mode mvp`; its id is its number within the milestone, in the form of `phase_id_convention`. The milestone carries `name` and `goal`. There is no title, checklist, detail section or progress table to write: the progress report renders them from the entities, and STATE is computed. +The roadmap is a `milestone` and its `phase` entities (`specforge schema --kind phase`, `specforge schema --kind milestone`), written in one `specforge.edit` call: the roadmap edit of ~/.claude/gsd-core/templates/roadmap.md. A phase carries its title (its name alone, no number: `gsd/W109`), `milestone`, `slug`, `goal`, `success_criteria`, `depends_on` (by number), `requirements` and, for a vertical-MVP project, `mode mvp`; its id is its number within the milestone, in the form of `phase_id_convention`. The milestone carries its title (its name) and `goal`. There is no document title, checklist, detail section or progress table to write: the progress report renders them from the entities, and STATE is computed. ### UI Phase Detection diff --git a/gsd/core/assets/agents/gsd-verifier.md b/gsd/core/assets/agents/gsd-verifier.md index 41361c71bf..7e430f9231 100644 --- a/gsd/core/assets/agents/gsd-verifier.md +++ b/gsd/core/assets/agents/gsd-verifier.md @@ -694,6 +694,9 @@ Read each truth's inputs with `specforge query --inputs gsd/E501 --cite- Then report in this shape: a message, not a file, and no frontmatter, since the verification's `status`, `score`, covered files and re-verification are computed from your verdicts (the header shows them for the reader): +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}` is +its `title`. + ```markdown # Phase {X}: {Name} Verification Report @@ -722,7 +725,7 @@ Only include this section if deferred items exist (from Step 9b). | # | Item | Addressed In | Evidence | |---|------|-------------|----------| -| 1 | {truth} | Phase {N} | {matching goal or success criteria} | +| 1 | {truth} | Phase {X} | {matching goal or success criteria} | ### Advisory (New Scope, Unevidenced) diff --git a/gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md b/gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md index 909af732dd..52860edc81 100644 --- a/gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md +++ b/gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md @@ -10,7 +10,7 @@ Smart discuss is the autonomous-optimized variant of `gsd-discuss-phase`. It pro PHASE_STATE=$(specforge query "$MILESTONE/${PHASE_NUM}" --depth 1 --format json) ``` -Read from `PHASE_STATE`: the node whose `id` is `$MILESTONE/${PHASE_NUM}` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields). +Read from `PHASE_STATE`: the node whose `id` is `$MILESTONE/${PHASE_NUM}` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`). --- diff --git a/gsd/core/assets/gsd-core/references/checkpoints.md b/gsd/core/assets/gsd-core/references/checkpoints.md index 06f0e25d50..95af975d17 100644 --- a/gsd/core/assets/gsd-core/references/checkpoints.md +++ b/gsd/core/assets/gsd-core/references/checkpoints.md @@ -811,6 +811,8 @@ specforge wait --for 30s --url http://localhost:3000 - Reviewing test quality (tests fail for the right reason) - Confirming minimal GREEN implementations +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + **Structure:** ```xml diff --git a/gsd/core/assets/gsd-core/references/execute-phase-response-language.md b/gsd/core/assets/gsd-core/references/execute-phase-response-language.md index 839f9f5e9c..7ae68d5a39 100644 --- a/gsd/core/assets/gsd-core/references/execute-phase-response-language.md +++ b/gsd/core/assets/gsd-core/references/execute-phase-response-language.md @@ -11,4 +11,7 @@ It lives here rather than inline in `workflows/execute-phase.md` for the same re The literal report templates embedded in this workflow (`## Execution Plan`, `## Phase {X}: {Name} Execution Complete`, `## ⚠ Phase {X}: {Name} — Gaps Found`, etc.) are a structural source, not literal output to copy verbatim — render their prose translated into `{response_language}` while keeping headings' structural markers, table columns, IDs, commands, and file paths unchanged. +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}` is +its `title`. + This directive was extracted from `workflows/execute-phase.md` to keep that file under the frozen pre-phase-6 byte ceiling (ADR-857 Phase 6 capstone, `tests/claude-orchestration.test.cjs`). The `@-reference` is eager, so the runtime still loads this content alongside the workflow — the extraction is purely a file-size discipline, not a lazy-load optimization. diff --git a/gsd/core/assets/gsd-core/references/gate-prompts.md b/gsd/core/assets/gsd-core/references/gate-prompts.md index f883756564..2ef8b100d6 100644 --- a/gsd/core/assets/gsd-core/references/gate-prompts.md +++ b/gsd/core/assets/gsd-core/references/gate-prompts.md @@ -3,6 +3,8 @@ Reusable prompt patterns for structured gate checks in workflows and agents. +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + **For checkpoint format details, see `gsd-core/references/ui-brand.md`** -- a checkpoint is a `### CHECKPOINT: {Type}` heading followed by its content, then a `---` break and the bolded action prompt. Never a fixed-width drawn border: it wraps in a narrow pane. ## Rules diff --git a/gsd/core/assets/gsd-core/references/git-integration.md b/gsd/core/assets/gsd-core/references/git-integration.md index 16ab5a6077..93f1f3f476 100644 --- a/gsd/core/assets/gsd-core/references/git-integration.md +++ b/gsd/core/assets/gsd-core/references/git-integration.md @@ -254,54 +254,3 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable. - "Commit noise" irrelevant when consumer is Claude, not humans - - - -## Multi-Repo Workspace Support (sub_repos) - -For workspaces with separate git repos (e.g., `backend/`, `frontend/`, `shared/`), GSD routes commits to each repo independently. - -### Configuration - -In the settings (`specforge settings`), list sub-repo directories under `planning.sub_repos`: - -```json -{ - "planning": { - "sub_repos": ["backend", "frontend", "shared"] - } -} -``` - -### How It Works - -1. **Auto-detection:** During `/gsd:new-project`, directories with their own `.git` folder are detected and offered for selection as sub-repos. On subsequent runs, `loadConfig` auto-syncs the `sub_repos` list with the filesystem — adding newly created repos and removing deleted ones. This means `config.json` may be rewritten automatically when repos change on disk. -2. **File grouping:** Code files are grouped by their sub-repo prefix (e.g., `backend/src/api/users.ts` belongs to the `backend/` repo). -3. **Independent commits:** Each sub-repo receives its own atomic commit via `specforge git commit --in `. File paths are made relative to the sub-repo root before staging. -4. **Planning stays local:** The the spec directory is not committed; it acts as cross-repo coordination. - -### Commit Routing - -Instead of the standard `commit` command, use `commit-to-subrepo` when `sub_repos` is configured: - -```bash -: "git -C commit -m \"feat(02-01): add user API\"; the files are" \ - --files backend/src/api/users.ts backend/src/types/user.ts frontend/src/components/UserForm.tsx -``` - -This stages `src/api/users.ts` and `src/types/user.ts` in the `backend/` repo, and `src/components/UserForm.tsx` in the `frontend/` repo, then commits each independently with the same message. - -Files that don't match any configured sub-repo are reported as unmatched. - -### Milestone Tagging Across Sub-Repos - -A GSD milestone version names planned work in the spec; it is not any repository's release version. Per-repository tagging (`git.repo_tagging: "per_repo"`, one release map entry per repository) is not part of @gsd/core: a SpecForge project has no sub-repositories, so `/gsd:complete-milestone` creates one `v[X.Y]` tag in the current directory. Upstream's flow, for reference: - -1. `milestone release-tags --map --dry-run` (not part of @gsd/core: no sub-repositories) checks every requested tag (repository listed in `sub_repos`, ref resolves, tag name valid, no tag at a different commit) before anything is written. -2. After one consolidated confirmation, `milestone release-tags --map ` (not part of @gsd/core) creates the annotated tags, each with the target repository as its working directory. Re-running the same map is idempotent (`already_tagged`). -3. `milestone complete --release-map ` archives the map by recorded value. -4. Nothing is pushed by default. Each repository's tag has its own confirmation naming the repository and its remote. - -With `git.create_tag: false` the map is still recorded and no tag is created. See [How to tag a multi-repository milestone](https://github.com/open-gsd/gsd-core/blob/v1.19.0/docs/how-to/tag-a-multi-repo-milestone.md). - - diff --git a/gsd/core/assets/gsd-core/references/nyquist-compliance.md b/gsd/core/assets/gsd-core/references/nyquist-compliance.md index 30a83c1241..3d94ff06e3 100644 --- a/gsd/core/assets/gsd-core/references/nyquist-compliance.md +++ b/gsd/core/assets/gsd-core/references/nyquist-compliance.md @@ -22,8 +22,10 @@ Before running checks 8a-8d, verify VALIDATION.md exists: specforge query "$PHASE_ID" --depth 1 --kinds validation --format brief ``` -**If missing:** **BLOCKING FAIL** — "VALIDATION.md not found for phase {N}. Re-run -`/gsd:plan-phase {N} --research` to regenerate." +In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + +**If missing:** **BLOCKING FAIL** — "No validation entity for phase {phase_number}. Re-run +`/gsd:plan-phase {phase_number} --research` to regenerate." Skip checks 8a-8d entirely. Report Dimension 8 as FAIL with this single issue. **If exists:** Proceed to checks 8a-8d. diff --git a/gsd/core/assets/gsd-core/references/phase-argument-parsing.md b/gsd/core/assets/gsd-core/references/phase-argument-parsing.md index 0bb1914ec0..815e04ff34 100644 --- a/gsd/core/assets/gsd-core/references/phase-argument-parsing.md +++ b/gsd/core/assets/gsd-core/references/phase-argument-parsing.md @@ -18,13 +18,11 @@ The `find-phase` command handles normalization and validation in one step: PHASE_INFO=$(specforge query "${PHASE}" --depth 0 --pick '.nodes[0]') # the phase node, compact: found when the query does not refuse it, phase_number is the last segment of its id, the rest are its fields ``` -Returns JSON with: -- `found`: true/false -- `directory`: Full path to phase directory -- `phase_number`: Normalized number (e.g., "06", "06.1") -- `phase_name`: Name portion (e.g., "foundation") -- `plans`: Array of PLAN.md files -- `summaries`: Array of SUMMARY.md files +Read from the phase node: +- `found`: true when the query does not refuse the id +- `phase_number`: the last segment of its `id`, normalized (e.g., "06", "06.1") +- `phase_name`: its `title`, the name its label shows (e.g., "Foundation") +- its plans and summaries: entities linked to it, not files; a phase has no directory ## Manual Normalization (Legacy) diff --git a/gsd/core/assets/gsd-core/references/planner-chunked.md b/gsd/core/assets/gsd-core/references/planner-chunked.md index e8a7e3f051..a028f933b4 100644 --- a/gsd/core/assets/gsd-core/references/planner-chunked.md +++ b/gsd/core/assets/gsd-core/references/planner-chunked.md @@ -34,10 +34,11 @@ supports it (#3777; see `gsd-core/workflows/plan-phase/steps/chunked-planning-mo ### single-plan Write **exactly one** plan entity, `{plan_id}`, with the plan edit of the planner's `` holding that plan -and its tasks, truths, artifacts and key links only, in its own file. Write no other plan. A plan written alone is -refused `gsd/E301` while another requirement of the phase is in no plan yet, and the refused call writes nothing: then -return `## PLAN BLOCKED` naming the refusal and its codes, and the orchestrator offers to plan the rest of the -phase in one run. +and its tasks, truths, artifacts and key links only, in its own file. Write no other plan. While a plan of the outline +is not written yet, the call reports `gsd/E301` (a requirement of the phase in no plan) or `gsd/E310` (a decision of +its context no plan cites) and is written: a later plan settles them, so they are not a refusal. A refused call +writes nothing: then return `## PLAN BLOCKED` naming the refusal and its codes, and the orchestrator offers to retry +this plan, to plan the rest of the phase in one run, or to stop. Return: ```markdown diff --git a/gsd/core/assets/gsd-core/references/planner-guidance.md b/gsd/core/assets/gsd-core/references/planner-guidance.md index ed5fde01eb..2717a9a3a7 100644 --- a/gsd/core/assets/gsd-core/references/planner-guidance.md +++ b/gsd/core/assets/gsd-core/references/planner-guidance.md @@ -160,8 +160,8 @@ Derive plans from actual work. Granularity determines compression tolerance, not ### Open Questions -{each open question the prompt handed you, as you received it, for the user to answer; leave the section out when -there is none} +{each open question the prompt handed you, by id, for the user to answer; leave the section out when there is +none} ### Next Steps diff --git a/gsd/core/assets/gsd-core/references/planning-config.md b/gsd/core/assets/gsd-core/references/planning-config.md index 62b9105433..ace5f59f0e 100644 --- a/gsd/core/assets/gsd-core/references/planning-config.md +++ b/gsd/core/assets/gsd-core/references/planning-config.md @@ -28,7 +28,6 @@ Configuration options for spec behavior. | `git.base_branch` | `null` (auto-detect) | Target branch for PRs and merges (e.g. `"master"`, `"develop"`). When `null`, auto-detects from `git symbolic-ref refs/remotes/origin/HEAD`, falling back to `"main"`. | | `git.protected_branches` | (none) | Optional array of non-empty strings naming additional shared branches that should trigger protected-branch warnings | | `git.create_tag` | `true` | Create git tags on milestone completion | -| `git.repo_tagging` | `"single"` | Milestone tagging mode: `"single"` (existing behavior) or `"per_repo"` (record one release per configured repository; each tag is pushed only after a per-repository confirmation); not applicable in @gsd/core: no sub-repositories | | `git.phase_branch_template` | `"gsd/phase-{phase}-{slug}"` | Branch template for phase strategy | | `git.milestone_branch_template` | `"gsd/{milestone}-{slug}"` | Branch template for milestone strategy | | `git.quick_branch_template` | `null` | Optional branch template for quick-task runs | @@ -68,6 +67,10 @@ still apply. `commit_docs`, `search_gitignored` and `pr_strict` (also under `planning.`) are not a setting here: the spec is source and is committed like code, never gitignored, so a search finds it and `/gsd:pr-branch` always leaves it out. +`planning.sub_repos`, `git.repo_tagging`, `workflow.auto_prune_state` and `graphify.*` are not settings here: +a sub-repository is another SpecForge project with its own milestone tags, the project state is computed and holds +nothing to prune, and SpecForge is the graph. + **Branching Strategies:** @@ -190,7 +193,6 @@ Set via `workflow.*` namespace in config.json (e.g., `"workflow": { "research": | `workflow.plan_check` | boolean | `true` | `true`, `false` | Run plan-checker agent to validate plans. _Alias:_ `plan_checker` is the flat-key form used in `CONFIG_DEFAULTS`; `workflow.plan_check` is the canonical namespaced form. | | `workflow.verifier` | boolean | `true` | `true`, `false` | Run verifier agent after execution | | `workflow.nyquist_validation` | boolean | `true` | `true`, `false` | Enable Nyquist-inspired validation gates | -| `workflow.auto_prune_state` | boolean | `false` | `true`, `false` | Automatically prune old STATE.md entries on phase completion (keeps 3 most recent phases) | | `workflow.auto_advance` | boolean | `false` | `true`, `false` | Auto-advance to next phase after completion | | `workflow.node_repair` | boolean | `true` | `true`, `false` | Attempt automatic repair of failed plan nodes | | `workflow.node_repair_budget` | number | `2` | Any positive integer | Max repair retries per failed node | @@ -250,7 +252,6 @@ Set via `git.*` namespace (e.g., `"git": { "branching_strategy": "phase" }`). | `git.base_branch` | string\|null | `null` (auto-detect) | Any branch name | Target branch for PRs and merges; auto-detects from `origin/HEAD` when `null` | | `git.protected_branches` | array of non-empty strings | (none) | Non-empty branch names | Optional protected names added to the resolved base branch for execute-phase and ship warnings | | `git.create_tag` | boolean | `true` | `true`, `false` | Create git tags on milestone completion | -| `git.repo_tagging` | string | `"single"` | `"single"`, `"per_repo"` | Milestone tagging mode; `"per_repo"` opts a multi-repo project into per-repository release records (not applicable in @gsd/core: no sub-repositories) | | `git.phase_branch_template` | string | `"gsd/phase-{phase}-{slug}"` | Template with `{phase}`, `{slug}` | Branch naming template for `phase` strategy | | `git.milestone_branch_template` | string | `"gsd/{milestone}-{slug}"` | Template with `{milestone}`, `{slug}` | Branch naming template for `milestone` strategy | | `git.quick_branch_template` | string\|null | `null` | Template with `{slug}` | Optional branch template for quick-task runs | @@ -317,7 +318,6 @@ Set via `manager.*` namespace (e.g., `"manager": { "flags": { "discuss": "--auto | `parallelization` | boolean\|object | `true` | `true`, `false`, `{ "enabled": true }` | Enable parallel wave execution; object form allows additional sub-keys | | `model_overrides` | object\|null | `null` | `{ "": "" }` | Override model selection per agent type | | `agent_skills` | object | `{}` | `{ "": "" }` or `{ "": ["", "", ...] }` | Assign skill sets to specific agent types. Each value is a single skill-set path (string) or an array of skill-set paths — the array form assigns multiple skill sets to one agent type. Paths cannot be comma-joined into one string; each path must be its own array element | -| `sub_repos` | array | `[]` | Array of relative path strings | Child directories with independent `.git` repos (auto-detected) | ### Planning Fields @@ -343,9 +343,7 @@ Several config fields affect each other or trigger special behavior: 5. **`depth` to `granularity` migration** -- The deprecated `depth` key (`quick`/`standard`/`comprehensive`) is automatically migrated to `granularity` (`coarse`/`standard`/`fine`) on config load and persisted back to disk. -6. **`sub_repos` auto-sync** -- On every config load, GSD scans for child directories with `.git` and updates the `sub_repos` array if the filesystem has changed. Legacy `multiRepo: true` is automatically migrated to a detected `sub_repos` array. - -7. **`workflow.use_worktrees` and branch divergence** -- When `use_worktrees` is `true` (default) and `worktree.baseRef` is unset, executor worktrees are forked from `origin/HEAD` -- by the host's own harness on `dispatch.isolation: harness-worktree` runtimes (Claude Code, Cursor), or by GSD itself on `orchestrator-worktree` runtimes (Codex, OpenCode, Kimi, Kimi Code). The divergence behavior below is identical either way, because the fork base is a property of the repository rather than of whoever creates the worktree. If your current branch has commits that `origin/HEAD` does not (for example an unmerged milestone or feature branch), GSD automatically degrades to sequential execution for that run and prints a one-line `⚠ Worktree base mismatch` warning. To restore parallel execution permanently, set `worktree.baseRef:"head"` in `.claude/settings.local.json` (set it in that file by hand). GSD-created worktrees then fork from the live HEAD instead of `origin/HEAD` by construction, and the Claude Code harness does the same as measured from every settings layer (#4588; Cursor has not been measured — its exit-42 spawn-time guard is the backstop). A configured Claude Code `WorktreeCreate` hook is the exception: it creates the worktree without applying the setting, so GSD keeps comparing against `origin/HEAD` on such a host (#4588). A prior harness worktree at the current HEAD does not lift that comparison — it records no creator, so one left there before the hook was configured would read as evidence for the hook; pass `--observed-fork-base` for a trusted verdict (#4881). Both fresh installs and upgrades of GSD Core set this automatically (no-clobber) when `use_worktrees` is enabled; you can also run the command manually at any time. Setting `workflow.use_worktrees: false` is the alternative if worktrees are not needed at all. On a runtime whose declared `dispatch.isolation` is `none`, an explicit `true` is a config the execution workflows fail closed on; `/gsd:health` reports it as warning `W025` and `/gsd:settings` offers to repair it (#2486). +6. **`workflow.use_worktrees` and branch divergence** -- When `use_worktrees` is `true` (default) and `worktree.baseRef` is unset, executor worktrees are forked from `origin/HEAD` -- by the host's own harness on `dispatch.isolation: harness-worktree` runtimes (Claude Code, Cursor), or by GSD itself on `orchestrator-worktree` runtimes (Codex, OpenCode, Kimi, Kimi Code). The divergence behavior below is identical either way, because the fork base is a property of the repository rather than of whoever creates the worktree. If your current branch has commits that `origin/HEAD` does not (for example an unmerged milestone or feature branch), GSD automatically degrades to sequential execution for that run and prints a one-line `⚠ Worktree base mismatch` warning. To restore parallel execution permanently, set `worktree.baseRef:"head"` in `.claude/settings.local.json` (set it in that file by hand). GSD-created worktrees then fork from the live HEAD instead of `origin/HEAD` by construction, and the Claude Code harness does the same as measured from every settings layer (#4588; Cursor has not been measured — its exit-42 spawn-time guard is the backstop). A configured Claude Code `WorktreeCreate` hook is the exception: it creates the worktree without applying the setting, so GSD keeps comparing against `origin/HEAD` on such a host (#4588). A prior harness worktree at the current HEAD does not lift that comparison — it records no creator, so one left there before the hook was configured would read as evidence for the hook; pass `--observed-fork-base` for a trusted verdict (#4881). Both fresh installs and upgrades of GSD Core set this automatically (no-clobber) when `use_worktrees` is enabled; you can also run the command manually at any time. Setting `workflow.use_worktrees: false` is the alternative if worktrees are not needed at all. On a runtime whose declared `dispatch.isolation` is `none`, an explicit `true` is a config the execution workflows fail closed on; `/gsd:health` reports it as warning `W025` and `/gsd:settings` offers to repair it (#2486). --- diff --git a/gsd/core/assets/gsd-core/references/tdd.md b/gsd/core/assets/gsd-core/references/tdd.md index c2c67651c1..2e53891c1e 100644 --- a/gsd/core/assets/gsd-core/references/tdd.md +++ b/gsd/core/assets/gsd-core/references/tdd.md @@ -327,6 +327,8 @@ When `workflow.tdd_mode` is enabled, the execute-phase orchestrator inserts a co ### Review Checkpoint Format +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + ``` ### TDD REVIEW — Phase {X} diff --git a/gsd/core/assets/gsd-core/references/ui-brand.md b/gsd/core/assets/gsd-core/references/ui-brand.md index 7137f90732..ce1ec552e2 100644 --- a/gsd/core/assets/gsd-core/references/ui-brand.md +++ b/gsd/core/assets/gsd-core/references/ui-brand.md @@ -49,16 +49,18 @@ Use for major workflow transitions. ``` ### GSD ► {STAGE NAME} ``` +In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + **Stage names (uppercase):** ```text QUESTIONING RESEARCHING DEFINING REQUIREMENTS CREATING ROADMAP -PLANNING PHASE {N} +PLANNING PHASE {phase_number} EXECUTING WAVE {N} VERIFYING -PHASE {N} COMPLETE ✓ +PHASE {phase_number} COMPLETE ✓ MILESTONE COMPLETE 🎉 ``` --- diff --git a/gsd/core/assets/gsd-core/references/worktree-path-safety.md b/gsd/core/assets/gsd-core/references/worktree-path-safety.md index fc85c1bac9..a9244b6253 100644 --- a/gsd/core/assets/gsd-core/references/worktree-path-safety.md +++ b/gsd/core/assets/gsd-core/references/worktree-path-safety.md @@ -101,7 +101,7 @@ if [ -z "$PINNED_TL" ]; then gsd_pin_fail fi if [ "$ACTUAL_ROOT" != "$PINNED_TL" ]; then - # Registered-submodule allowance: sub_repos plans legitimately commit inside an + # Registered-submodule allowance: a task may legitimately commit inside an # immediate submodule of the pinned checkout. The superproject working tree is # answered by the same reader as PINNED_TL, so the equality is # representation-safe on every platform. diff --git a/gsd/core/assets/gsd-core/templates/VALIDATION.md b/gsd/core/assets/gsd-core/templates/VALIDATION.md index 028efb9757..895316e2cd 100644 --- a/gsd/core/assets/gsd-core/templates/VALIDATION.md +++ b/gsd/core/assets/gsd-core/templates/VALIDATION.md @@ -1,8 +1,10 @@ -# Phase {N} — Validation Strategy +# Phase {phase_number} — Validation Strategy > Per-phase validation contract for feedback sampling during execution. +In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + ## The Validation's Typed Edits A phase's validation strategy is its `validation` entity, with one `validation_row` per task of the Per-Task Verification Map and one `wave0_item` per file wave 0 creates. A row's `status` is computed from the task's linked tests; the validation's `nyquist_compliant` (every row green and every task covered) and `wave_0_complete` are computed, and its `status` reads validated once a person approves it with `specforge gsd approve-validation`: none is written. While a phase has a validation, each of its tasks needs an automated verify or a wave-0 item for its requirements (`gsd/E314`). `specforge schema --kind validation` (likewise `validation_row` and `wave0_item`) lists the fields. Fill the values: free text in its quoted heredoc, as written, and an id, enum or path in its assignment. A refusal names its code: read it with `specforge explain `. diff --git a/gsd/core/assets/gsd-core/templates/milestone.md b/gsd/core/assets/gsd-core/templates/milestone.md index 7546ba426a..3e7f73a9c4 100644 --- a/gsd/core/assets/gsd-core/templates/milestone.md +++ b/gsd/core/assets/gsd-core/templates/milestone.md @@ -24,7 +24,7 @@ TEXT IFS= read -rd '' PHASE_CRITERIA <<'TEXT' || true; PHASE_CRITERIA=${PHASE_CRITERIA%$'\n'} {a JSON list of 2 to 5 observable behaviours that show the phase is done, e.g. ["A board has a share link", "The link opens the board read-only"]} TEXT -specforge new milestone "$VERSION" "$NAME" --in "spec/$VERSION.spec" --name "$NAME" --goal "$GOAL" || exit 1 +specforge new milestone "$VERSION" "$NAME" --in "spec/$VERSION.spec" --goal "$GOAL" || exit 1 specforge gsd phase --milestone "$VERSION" --name "$PHASE_NAME" --goal "$PHASE_GOAL" --criteria "$PHASE_CRITERIA" || exit 1 ``` diff --git a/gsd/core/assets/gsd-core/templates/roadmap.md b/gsd/core/assets/gsd-core/templates/roadmap.md index 8b8a4b4b58..a9e2b2ae81 100644 --- a/gsd/core/assets/gsd-core/templates/roadmap.md +++ b/gsd/core/assets/gsd-core/templates/roadmap.md @@ -19,16 +19,18 @@ create ops ahead of the milestone (their fields: `templates/project.md`, `templa ```json [ - {"op": "create", "kind": "milestone", "id": "{the milestone version, e.g. v1.1}", "title": "{the milestone name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"name": "{the milestone name}", "goal": "{the milestone goal}"}}, + {"op": "create", "kind": "milestone", "id": "{the milestone version, e.g. v1.1}", "title": "{the milestone name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"goal": "{the milestone goal}"}}, {"op": "create", "kind": "requirement", "id": "{the first phase's requirement, e.g. SYNC-02}", "title": "{the first requirement's text}", "file": "spec/requirements.spec", "fields": {"text": "{the first requirement's text}", "category": "{the requirements' category}", "tier": "v1"}}, {"op": "create", "kind": "requirement", "id": "{the second phase's requirement, e.g. SYNC-03}", "title": "{the second requirement's text}", "file": "spec/requirements.spec", "fields": {"text": "{the second requirement's text}", "category": "{the requirements' category}", "tier": "v1"}}, - {"op": "create", "kind": "phase", "id": "{the first phase's number, e.g. 04}", "title": "{the first phase's name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"milestone": "{the milestone version, e.g. v1.1}", "name": "{the first phase's name}", "slug": "{the first phase's slug}", "goal": "{the first phase's goal}", "success_criteria": ["{an observable behavior the first phase makes true}", "{another observable behavior of the first phase}"], "requirements": ["{the first phase's requirement, e.g. SYNC-02}"], "mode": "{standard or mvp}"}}, - {"op": "create", "kind": "phase", "id": "{the second phase's number, e.g. 05}", "title": "{the second phase's name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"milestone": "{the milestone version, e.g. v1.1}", "name": "{the second phase's name}", "slug": "{the second phase's slug}", "goal": "{the second phase's goal}", "success_criteria": ["{an observable behavior the second phase makes true}", "{another observable behavior of the second phase}"], "depends_on": ["{the first phase's number, e.g. 04}"], "requirements": ["{the second phase's requirement, e.g. SYNC-03}"], "mode": "{standard or mvp}"}} + {"op": "create", "kind": "phase", "id": "{the first phase's number, e.g. 04}", "title": "{the first phase's name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"milestone": "{the milestone version, e.g. v1.1}", "slug": "{the first phase's slug}", "goal": "{the first phase's goal}", "success_criteria": ["{an observable behavior the first phase makes true}", "{another observable behavior of the first phase}"], "requirements": ["{the first phase's requirement, e.g. SYNC-02}"], "mode": "{standard or mvp}"}}, + {"op": "create", "kind": "phase", "id": "{the second phase's number, e.g. 05}", "title": "{the second phase's name}", "file": "spec/{the milestone version, e.g. v1.1}.spec", "fields": {"milestone": "{the milestone version, e.g. v1.1}", "slug": "{the second phase's slug}", "goal": "{the second phase's goal}", "success_criteria": ["{an observable behavior the second phase makes true}", "{another observable behavior of the second phase}"], "depends_on": ["{the first phase's number, e.g. 04}"], "requirements": ["{the second phase's requirement, e.g. SYNC-03}"], "mode": "{standard or mvp}"}} ] ``` A phase id is its number within the milestone (`04`), and a `depends_on` names the phases it needs by number; the -milestone scopes them (`v1.1/04`). In a workstream the milestone's id is +milestone scopes them (`v1.1/04`). A phase's title is its name alone (`Offline sync`, not `Phase 4: Offline sync`): +its label is `Phase : `, so a title that begins with a phase number prints it twice +(`gsd/W109`). A milestone's title is its name too. In a workstream the milestone's id is `/` (`api/v1.1`, which `specforge new milestone --workstream` gives it), and each phase's `milestone` names that id. `mode` is `mvp` for a vertical-MVP project (`PROJECT_MODE=mvp`) and `standard` otherwise. A phase's status, its plans and the milestone's progress are computed: `specforge gsd progress-report` diff --git a/gsd/core/assets/gsd-core/workflows/add-tests.md b/gsd/core/assets/gsd-core/workflows/add-tests.md index e33c26ae78..51f24bb45b 100644 --- a/gsd/core/assets/gsd-core/workflows/add-tests.md +++ b/gsd/core/assets/gsd-core/workflows/add-tests.md @@ -41,7 +41,7 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; `name` is its field). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`. +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; its name is its `title`). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`. **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. diff --git a/gsd/core/assets/gsd-core/workflows/audit-milestone.md b/gsd/core/assets/gsd-core/workflows/audit-milestone.md index 250804d924..7ffeb2534a 100644 --- a/gsd/core/assets/gsd-core/workflows/audit-milestone.md +++ b/gsd/core/assets/gsd-core/workflows/audit-milestone.md @@ -27,7 +27,7 @@ INIT=$(specforge query "$MILESTONE" --depth 1 --format json) AGENT_SKILLS_CHECKER="" # the host install carries the skills of gsd-integration-checker ``` -Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; `name` and `progress` are its fields, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes. +Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; its name is its `title`, `progress` is its field, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes. Resolve integration checker model: ```bash @@ -280,6 +280,9 @@ All requirements covered. Cross-phase integration verified. E2E flows complete. **Score:** {N}/{M} requirements satisfied **Report:** the spec +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is +its `title`. + ### Unsatisfied Requirements {For each unsatisfied requirement:} diff --git a/gsd/core/assets/gsd-core/workflows/audit-uat.md b/gsd/core/assets/gsd-core/workflows/audit-uat.md index 79c455b9e1..8d3f05b373 100644 --- a/gsd/core/assets/gsd-core/workflows/audit-uat.md +++ b/gsd/core/assets/gsd-core/workflows/audit-uat.md @@ -105,6 +105,8 @@ Present the audit report: Generate a human UAT test plan for "Testable Now" + "active" items only: +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + Group by what can be tested together (same screen, same feature, same prerequisite): ``` diff --git a/gsd/core/assets/gsd-core/workflows/autonomous.md b/gsd/core/assets/gsd-core/workflows/autonomous.md index a3380ad3e5..9d74114645 100644 --- a/gsd/core/assets/gsd-core/workflows/autonomous.md +++ b/gsd/core/assets/gsd-core/workflows/autonomous.md @@ -170,7 +170,8 @@ Exit cleanly. Exit cleanly. -**Display phase plan:** +**Display phase plan** (the Phase column is each phase's `title`, from the details fetched below, never the report's +`name`, which is the phase's slug read as words): ``` ## Phase Plan @@ -191,7 +192,9 @@ Exit cleanly. DETAIL=$(specforge query "$MILESTONE/${PHASE_NUM}" --depth 0 --format json) ``` -Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in execute_phase and transition messages. +From each node: `PHASE_NAME` (`phase_name`) is its `title`, `goal` and `success_criteria` are its fields of those +names, and `PHASE_NUM` is the last segment of its `id`, so a phase's label reads "Phase ${PHASE_NUM}: ${PHASE_NAME}". +Store them for use in execute_phase and transition messages. @@ -202,10 +205,10 @@ Extract `phase_name`, `goal`, `success_criteria` from each. Store for use in exe For the current phase, display the progress banner: ``` -### GSD ► AUTONOMOUS ▸ Phase {N}/{T}: {Name} [████░░░░] {P}% +### GSD ► AUTONOMOUS ▸ Phase ${PHASE_NUM}/{T}: ${PHASE_NAME} [████░░░░] {P}% ``` -Where N is the ROADMAP phase number, T is the milestone `phase_count`, and P = completed milestone phases / T × 100. Use `phase_count`, not remaining phases: phase 63 in a 7-phase milestone is `Phase 63/7`, not `Phase 63/3`. If N > T, render "Phase {N} ({position}/{T})". Use an 8-character bar with █ and ░. +Where `${PHASE_NUM}` is the phase number, T is the milestone `phase_count`, and P = completed milestone phases / T × 100. Use `phase_count`, not remaining phases: phase 63 in a 7-phase milestone is `Phase 63/7`, not `Phase 63/3`. If `${PHASE_NUM}` > T, render "Phase ${PHASE_NUM} ({position}/{T})", where `{position}` is its place among the milestone's phases. Use an 8-character bar with █ and ░. **3a. Smart Discuss** @@ -244,7 +247,7 @@ Record a minimal phase context so downstream plan-phase has valid input. Get pha DETAIL=$(specforge query "$MILESTONE/${PHASE_NUM}" --depth 0 --format json) ``` -Read `gsd-core/workflows/autonomous/templates/minimal-context.md` and write it as the phase's `context` entity (`specforge new context ${padded_phase}-CONTEXT "{Phase Name}" --in spec/context.spec --phase "$MILESTONE/${PHASE_NUM}" --gathered {date} --boundary "{goal}" --canonical_refs '[{"topic":"No external specs: the roadmap phase goal and success criteria","paths":[]}]'`; the entity is refused without `canonical_refs`), filling its placeholders (`{PHASE_NUM}`, `{Phase Name}`, `{date}`, the goal) from the roadmap phase. +Read `gsd-core/workflows/autonomous/templates/minimal-context.md` and write it as the phase's `context` entity (`specforge new context ${padded_phase}-CONTEXT "{Phase Name}" --in spec/context.spec --phase "$MILESTONE/${PHASE_NUM}" --gathered {date} --boundary "{goal}" --canonical_refs '[{"topic":"No external specs: the roadmap phase goal and success criteria","paths":[]}]'`; the entity is refused without `canonical_refs`), filling its placeholders (`{PHASE_NUM}`, `{Phase Name}`, `{date}`, the goal) from the roadmap phase: `{Phase Name}` is its `title`, `PHASE_NAME`. Commit the minimal context: @@ -706,16 +709,16 @@ Display final completion banner: When any phase operation fails or a blocker is detected, present 3 options via AskUserQuestion: -**Prompt:** "Phase {N} ({Name}) encountered an issue: {description}" +**Prompt:** "Phase ${PHASE_NUM} (${PHASE_NAME}) encountered an issue: {description}" **Options:** 1. **"Fix and retry"** — Re-run the failed step (discuss, plan, or execute) for this phase 2. **"Skip this phase"** — Mark phase as skipped, continue to the next incomplete phase 3. **"Stop autonomous mode"** — Display summary of progress so far and exit cleanly -**On "Fix and retry":** Loop back to the failed step within execute_phase. Track the retry count per phase + step (`RETRY_COUNT`, kept in memory for the run). If the same step fails again after retry, re-present these options. **Retry ceiling (#3210):** once the same phase step has failed 3 "Fix and retry" attempts, do NOT re-present the options — escalate to a terminal `needs_human` halt: display "Phase {N} ⛔ {Name} — needs_human", list the unmet items (the blocker description from each attempt), raise it as a blocker (`specforge gsd raise-blocker "needs_human: resolve blocker, then /gsd:autonomous --from ${PHASE_NUM}" --phase "$MILESTONE/${PHASE_NUM}" || exit 1`), and stop autonomous mode with the standard stopped-summary banner. A blocker that survives 3 fix attempts is an operator gate, not an executable gap. +**On "Fix and retry":** Loop back to the failed step within execute_phase. Track the retry count per phase + step (`RETRY_COUNT`, kept in memory for the run). If the same step fails again after retry, re-present these options. **Retry ceiling (#3210):** once the same phase step has failed 3 "Fix and retry" attempts, do NOT re-present the options — escalate to a terminal `needs_human` halt: display "Phase ${PHASE_NUM} ⛔ ${PHASE_NAME} — needs_human", list the unmet items (the blocker description from each attempt), raise it as a blocker (`specforge gsd raise-blocker "needs_human: resolve blocker, then /gsd:autonomous --from ${PHASE_NUM}" --phase "$MILESTONE/${PHASE_NUM}" || exit 1`), and stop autonomous mode with the standard stopped-summary banner. A blocker that survives 3 fix attempts is an operator gate, not an executable gap. -**On "Skip this phase":** Log "Phase {N} ⏭ {Name} — Skipped by user" and proceed to iterate. +**On "Skip this phase":** Log "Phase ${PHASE_NUM} ⏭ ${PHASE_NAME} — Skipped by user" and proceed to iterate. **On "Stop autonomous mode":** Display progress summary: diff --git a/gsd/core/assets/gsd-core/workflows/complete-milestone.md b/gsd/core/assets/gsd-core/workflows/complete-milestone.md index b020efb7b2..5f859931d5 100644 --- a/gsd/core/assets/gsd-core/workflows/complete-milestone.md +++ b/gsd/core/assets/gsd-core/workflows/complete-milestone.md @@ -121,6 +121,9 @@ Closeout type: {closeout_type} Requirements: {N}/{M} v1 requirements checked off ``` +In a phase's label, `{X}` and `{Y}` are phases' numbers, each the last segment of its phase's `id` (`v1.0/03` gives +`03`). + **If requirements incomplete** (N < M): ``` @@ -356,15 +359,11 @@ Exact bash for each of the four options (squash, history-preserving merge, delet -`PER_REPO_TAGGING` is always `false` in @gsd/core (no sub-repositories, no per-repository tags), so this section is never skipped for it. If `section_manifest` is `null` or `"git-tag"` is in its `included` list: read and execute `gsd-core/workflows/complete-milestone/steps/git-tag.md`. Otherwise skip — do not read the file; proceed to `git_commit_milestone`. +If `section_manifest` is `null` or `"git-tag"` is in its `included` list: read and execute +`gsd-core/workflows/complete-milestone/steps/git-tag.md`. Otherwise skip — do not read the file; proceed to +`git_commit_milestone`. - - -**Per-repository tag push (#3628): not part of @gsd/core.** `PER_REPO_TAGGING` is always `false` (a SpecForge project has no sub-repositories), so there are no per-repository tags to push and no release map to read. Skip this step. - - - Commit what is left (the close was already committed in the safety commit of `reorganize_roadmap_and_delete_originals`). @@ -375,8 +374,6 @@ specforge git commit -m "chore: complete v[X.Y] milestone" Confirm: "Committed: chore: complete v[X.Y] milestone" -`PER_REPO_TAGGING` is always `false` in @gsd/core: there is no release-map scratch directory to remove. - @@ -446,8 +443,7 @@ Milestone completion is successful when: - [ ] Key Decisions updated with outcomes - [ ] Safety commit made BEFORE the final commit - [ ] `requirement` entities kept with the completed milestone (none deleted) -- [ ] Git tag created (v[X.Y]) (if `git.create_tag` enabled and `PER_REPO_TAGGING` is not `true`) -- [ ] Release map archived and per-repository tags created (if `PER_REPO_TAGGING` is `true`); no tag pushed without a per-repository confirmation +- [ ] Git tag created (v[X.Y]) (if `git.create_tag` enabled) - [ ] Milestone commit made (includes archive files and deletion) - [ ] Requirements completion checked against REQUIREMENTS.md traceability table - [ ] Incomplete requirements surfaced with proceed/audit/abort options diff --git a/gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md b/gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md index 1c7e7cc50c..b10fe9f11f 100644 --- a/gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md +++ b/gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md @@ -77,9 +77,12 @@ AGENT_SKILLS_ANALYZER="" # the host install carries the skills of gsd-assumpti **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields; a phase not in the graph is an E003 error), +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`; a phase not in the graph is an E003 error), and its `plan`, `research`, `context` and `verification` entities, when it has them, are among the other nodes (`plan_count` counts the plans). The phase's spec is read in `check_spec`, from the graph. +In a phase's label, `{PHASE}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and +`{phase_name}` is its `title`. + **If `phase_found` is false:** ``` Phase [X] not found in roadmap. diff --git a/gsd/core/assets/gsd-core/workflows/discuss-phase-power.md b/gsd/core/assets/gsd-core/workflows/discuss-phase-power.md index 60a2f1288e..9ed50e0976 100644 --- a/gsd/core/assets/gsd-core/workflows/discuss-phase-power.md +++ b/gsd/core/assets/gsd-core/workflows/discuss-phase-power.md @@ -23,7 +23,7 @@ Check whether the phase has a spec (from the spec-phase workflow): it locks requ **If `has_spec` is true:** 1. Read the spec and its locked requirements: `specforge query "$SPEC_ID" --depth 1 --format context`. 2. Count its `locked_req` entities: `specforge query "$SPEC_ID" --depth 1 --pick '.nodes[kind=locked_req].id' --count`. -3. Display: `{N} requirements are locked by the phase spec; this discussion covers implementation decisions only.` +3. Display: `{count} requirements are locked by the phase spec; this discussion covers implementation decisions only.` 4. Set `spec_loaded = true`. 5. Hold the requirements, boundaries and acceptance criteria as ``: the context names the spec, and they are not asked again. @@ -121,6 +121,9 @@ Write a self-contained HTML companion file to: The file must be a single self-contained HTML file with inline CSS and JavaScript. No external dependencies. +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{phase_name}` +is its `title`. + **Layout:** ``` @@ -237,7 +240,7 @@ Proceed to the **finalize** step. --- -**"explain Q-{N}"** (or "more info on Q-{N}", "elaborate Q-{N}"): +**"explain Q-{NN}"** (or "more info on Q-{NN}", "elaborate Q-{NN}"): 1. Find the question by ID in the JSON 2. Provide a detailed explanation: why this decision matters, how it affects the downstream plan, what additional context from the codebase is relevant diff --git a/gsd/core/assets/gsd-core/workflows/discuss-phase.md b/gsd/core/assets/gsd-core/workflows/discuss-phase.md index f1f798ba3d..f0bd74e121 100644 --- a/gsd/core/assets/gsd-core/workflows/discuss-phase.md +++ b/gsd/core/assets/gsd-core/workflows/discuss-phase.md @@ -123,7 +123,7 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) AGENT_SKILLS_ADVISOR="" # the host install carries the skills of gsd-advisor-researcher ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields; a phase not in the graph is an E003 error), and its `plan`, `research`, `context` and `verification` entities, when it has them, are among the other nodes (`plan_count` counts the plans). `response_language` is a setting: `specforge settings --format json --extension @gsd/core` (the phase's spec is read in `check_spec`, from the graph). +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`; a phase not in the graph is an E003 error), and its `plan`, `research`, `context` and `verification` entities, when it has them, are among the other nodes (`plan_count` counts the plans). `response_language` is a setting: `specforge settings --format json --extension @gsd/core` (the phase's spec is read in `check_spec`, from the graph). **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. diff --git a/gsd/core/assets/gsd-core/workflows/execute-phase.md b/gsd/core/assets/gsd-core/workflows/execute-phase.md index 921715770b..293dd19f4b 100644 --- a/gsd/core/assets/gsd-core/workflows/execute-phase.md +++ b/gsd/core/assets/gsd-core/workflows/execute-phase.md @@ -94,7 +94,10 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) AGENT_SKILLS="" # the host install carries the skills of gsd-executor ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name`, `slug` and `requirements` (`phase_req_ids`) are its fields; a phase not in the graph is an E003 error), and its `plan` entities are among the other nodes (`plan_count` is their number; `incomplete_plans` are those whose `status` is not `complete` and `incomplete_count` their number). `parallelization` and `response_language` are settings: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. No init bundle prints a section manifest, so it is null and every step below is read. +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` and `requirements` (`phase_req_ids`) are its fields and its name its `title`; a phase not in the graph is an E003 error), and its `plan` entities are among the other nodes (`plan_count` is their number; `incomplete_plans` are those whose `status` is not `complete` and `incomplete_count` their number). `parallelization` and `response_language` are settings: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. No init bundle prints a section manifest, so it is null and every step below is read. + +In a phase's label, `{X}`, `{phase_number}` and `{PHASE_NUMBER}` are the phase's number, the last segment of its `id` +(`v1.0/03` gives `03`), and `{Name}` and `phase_name` are its `title`. **Threat-ID gate (#4683):** run `THREAT_IDS_JSON=$(specforge gsd threat-ids "$PHASE_ID" --format json 2>/dev/null || if [ $? -eq 2 ]; then echo '{"threat_id_duplicates":[],"threat_id_duplicate_count":0}'; else echo '{"threat_id_duplicates":[],"threat_id_duplicate_count":null,"error":"threat-ids failed"}'; fi)`; if `threat_id_duplicate_count` from `THREAT_IDS_JSON` is non-zero, read and execute `execute-phase/steps/threat-id-gate.md` BEFORE any dispatch — if `error` is set (a loaded `@gsd/security` could not answer; exit 2 is "not loaded" and means no duplicates) stop and report it, never read it as no duplicates; it is a hard stop (the full duplicate list is `threat_id_duplicates` of `THREAT_IDS_JSON`). diff --git a/gsd/core/assets/gsd-core/workflows/execute-plan.md b/gsd/core/assets/gsd-core/workflows/execute-plan.md index 4656563d67..d806cdb203 100644 --- a/gsd/core/assets/gsd-core/workflows/execute-plan.md +++ b/gsd/core/assets/gsd-core/workflows/execute-plan.md @@ -315,7 +315,9 @@ If a commit is BLOCKED by a hook: ## Task Commit Protocol -Canonical per-task commit rules live in **`agents/gsd-executor.md`** (``). Follow that section for staging, `{type}({phase}-{plan})` messages, `commit-to-subrepo` when `sub_repos` is set, post-commit checks, and untracked-file handling — do not duplicate or paraphrase the full protocol here (single source of truth). +Canonical per-task commit rules live in **`agents/gsd-executor.md`** (``). Follow that section +for staging, `{type}({phase}-{plan})` messages, post-commit checks, and untracked-file handling — do not duplicate or +paraphrase the full protocol here (single source of truth). **Orchestrator note:** After each task, the spawned executor reports commit hashes; this workflow does not re-specify commit semantics beyond pointing at the executor. diff --git a/gsd/core/assets/gsd-core/workflows/extract-learnings.md b/gsd/core/assets/gsd-core/workflows/extract-learnings.md index 22af781ab6..fea8170673 100644 --- a/gsd/core/assets/gsd-core/workflows/extract-learnings.md +++ b/gsd/core/assets/gsd-core/workflows/extract-learnings.md @@ -26,7 +26,8 @@ INIT=$(specforge query "$PHASE_ID" --depth 2 --format json) PHASE_NUMBER="${PHASE_ID##*/}" # the phase number is the last segment of its id ``` -Parse from the query JSON: the phase's `name` (its number is the last segment of `$PHASE_ID`, kept in `PHASE_NUMBER`). +Parse from the query JSON: in a phase's label, `{PHASE_NUMBER}` is the phase's number, the last segment of `$PHASE_ID` +(kept in `PHASE_NUMBER`), and `{PHASE_NAME}` is its `title`; `{PHASE_ID}` is its `id`. If phase not found, exit with error: "Phase {PHASE_ID} not found." @@ -219,7 +220,7 @@ The project state is computed from the entities, so there is nothing to update: ``` --------------------------------------------------------------- -## Learnings Extracted: Phase {X} — {Name} +## Learnings Extracted: Phase {PHASE_NUMBER} — {PHASE_NAME} Decisions: {N} Lessons: {N} diff --git a/gsd/core/assets/gsd-core/workflows/manager.md b/gsd/core/assets/gsd-core/workflows/manager.md index 609e35eac0..bc9afa3327 100644 --- a/gsd/core/assets/gsd-core/workflows/manager.md +++ b/gsd/core/assets/gsd-core/workflows/manager.md @@ -29,6 +29,10 @@ INIT=$(specforge gsd progress-report --format json) Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints; each phase has `number`, `name`, `plans`, `summaries`, `status`). The rest is derived, there is no init JSON: `phase_count` is the length of `phases`; `completed_count` counts status `Complete`; `in_progress_count` counts `In Progress`; `all_complete` is `completed_count == phase_count`; `recommended_actions` has one entry per phase that is not `Complete`, in order (`Pending` → `/gsd-discuss-phase N`, or `/gsd-plan-phase N` once a `context` entity exists, `specforge query "$MILESTONE/N" --depth 1 --kinds context`; `Planned` or `In Progress` → `/gsd-execute-phase N`); `waiting_signal` is always absent (no background-work signal here); `queued_milestone_version`, `queued_milestone_name` and `queued_phases` are absent (skip the Queued section); `response_language` is `{{setting:response_language|}}`; `manager_flags` are the settings `{{setting:manager.flags.discuss|}}`, `{{setting:manager.flags.plan|}}` and `{{setting:manager.flags.execute|}}`. +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{phase_name}` +is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as +words, so a label reads the title from the phase node (`specforge query "$MILESTONE" --kinds phase --depth 1`). + **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. Subagent dispatches (discuss/plan/execute) stay in English at the prompt level; include `response_language` in their spawn args per the workflow being dispatched. `manager_flags` are the per-step passthrough flags from the settings: @@ -88,7 +92,7 @@ Build dashboard from JSON. Symbols: `✓` done, `◆` active, `○` pending, `· If any `is_active` phases, show: `◆ Background: {action} Phase {N}, ...` above grid. -Use `display_name` (not `name`) for the Phase column — it's pre-truncated to 20 chars with `…` if clipped. Pad all phase names to the same width for alignment. +The Phase column is the phase's `title`, read as a label's `{phase_name}` is (not the report's `name`), cut to 20 chars with `…` when longer. Pad all phase names to the same width for alignment. Use `deps_display` from init JSON for the Deps column — shows which phases this phase depends on (e.g. `1,3`) or `—` for none. diff --git a/gsd/core/assets/gsd-core/workflows/milestone-summary.md b/gsd/core/assets/gsd-core/workflows/milestone-summary.md index 0795e8656b..779c472c27 100644 --- a/gsd/core/assets/gsd-core/workflows/milestone-summary.md +++ b/gsd/core/assets/gsd-core/workflows/milestone-summary.md @@ -140,7 +140,7 @@ Present as a bulleted list of decisions with brief rationale: | Phase | Name | Status | One-Liner | |-------|------|--------|-----------| -{For each phase: number, name, status (complete/in-progress/planned), one_liner from SUMMARY.md} +{For each phase: number, name (its node's `title`, not the report's slug read as words), status (complete/in-progress/planned), one_liner from SUMMARY.md} ## 4. Requirements Coverage diff --git a/gsd/core/assets/gsd-core/workflows/mvp-phase.md b/gsd/core/assets/gsd-core/workflows/mvp-phase.md index c6dbbface6..563171e9f9 100644 --- a/gsd/core/assets/gsd-core/workflows/mvp-phase.md +++ b/gsd/core/assets/gsd-core/workflows/mvp-phase.md @@ -39,7 +39,7 @@ Normalize per `@~/.claude/gsd-core/references/phase-argument-parsing.md` (zero-p RESPONSE_LANGUAGE="{{setting:response_language|}}" # response_language (the settings) PHASE_FOUND=true; specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].id' >/dev/null 2>&1 || PHASE_FOUND=false -PHASE_NAME=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].fields.name' 2>/dev/null) +PHASE_NAME=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].title' 2>/dev/null) PHASE_GOAL=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].fields.goal' 2>/dev/null) PHASE_MODE=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].fields.mode' 2>/dev/null) diff --git a/gsd/core/assets/gsd-core/workflows/new-milestone.md b/gsd/core/assets/gsd-core/workflows/new-milestone.md index dce6d00bde..1bb068971f 100644 --- a/gsd/core/assets/gsd-core/workflows/new-milestone.md +++ b/gsd/core/assets/gsd-core/workflows/new-milestone.md @@ -197,7 +197,7 @@ AGENT_SKILLS_ROADMAPPER="" # the host install carries the skills of gsd-roadma needs it sets WS from the ws argument itself, so no file holds it and none is removed in Step 10. --> -Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (`name` and `state` are its fields), and its phases are among the other nodes. `workflow.research` is a setting: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model; the project, its roadmap and its requirements are entities, read with `specforge query`, so no path is read. +Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its name is its `title` and `state` its field), and its phases are among the other nodes. `workflow.research` is a setting: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model; the project, its roadmap and its requirements are entities, read with `specforge query`, so no path is read. **If `agents_installed` is false:** Display a warning before proceeding: ``` @@ -511,7 +511,8 @@ Write the roadmap first, then return. **If `## ROADMAP BLOCKED`:** Present blocker, work with user, re-spawn. -**If `## ROADMAP CREATED`:** Read the milestone's phases (`specforge export --kinds milestone,phase --format context`), present inline: +**If `## ROADMAP CREATED`:** Read the milestone's phases (`specforge export --kinds milestone,phase --format context`). In a phase's label below, `[N]` is the phase's number, the last segment of its `id`, and `[Name]` +and `[Phase Name]` are its `title`, the name the roadmap gave it. Present inline: ``` ## Proposed Roadmap diff --git a/gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md b/gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md index f398e84458..f8c194bb56 100644 --- a/gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md +++ b/gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md @@ -13,7 +13,7 @@ TEXT IFS= read -rd '' FEATURE <<'TEXT' || true; FEATURE=${FEATURE%$'\n'} {a target feature: one --target_features per feature} TEXT -specforge new milestone "$VERSION" "$NAME" --in "spec/$VERSION.spec" --name "$NAME" --goal "$GOAL" --target_features "$FEATURE" ${WS:+--workstream "$WS"} || exit 1 +specforge new milestone "$VERSION" "$NAME" --in "spec/$VERSION.spec" --goal "$GOAL" --target_features "$FEATURE" ${WS:+--workstream "$WS"} || exit 1 ``` The project's active requirements are computed: there is no section or footer to update. diff --git a/gsd/core/assets/gsd-core/workflows/new-project.md b/gsd/core/assets/gsd-core/workflows/new-project.md index c63ea590fc..42a294b204 100644 --- a/gsd/core/assets/gsd-core/workflows/new-project.md +++ b/gsd/core/assets/gsd-core/workflows/new-project.md @@ -531,10 +531,10 @@ this also finds linked git worktree children, whose `.git` is a file rather than directory, unlike a plain directory walk would): ```bash -SUB_REPOS=$(specforge git repos . --pick '.repos[]' --fields name) || exit 1 # each child directory that is a repository or a linked worktree, one per line: a failed listing stops here, and a name holding a newline is refused, never split +CHILD_REPOS=$(specforge git repos . --pick '.repos[]' --fields name) || exit 1 # each child directory that is a repository or a linked worktree, one per line: a failed listing stops here, and a name holding a newline is refused, never split ``` -Each line of `SUB_REPOS` is a bare directory name relative to the workspace root +Each line of `CHILD_REPOS` is a bare directory name relative to the workspace root (e.g. `backend`); none means no sub-repos. **If sub-repos found:** @@ -549,12 +549,12 @@ Use AskUserQuestion: **If user selects one or more directories:** each is a repository of its own, so it is a SpecForge project of its own: -- Write nothing here: `planning.sub_repos` is not a setting of the port, and this project's commits never reach a sub-repository +- Write nothing here: no setting lists child repositories, and this project's commits never reach one - Suggest running `/gsd:new-project` inside each selected directory, so its own spec tracks its work The spec stays committed like code: `commit_docs` is not a setting here. -**If no sub-repos found or user selects none:** Continue with no changes to config. +**If no sub-repos found or user selects none:** Continue. ## 5.5. Resolve Model Profile diff --git a/gsd/core/assets/gsd-core/workflows/next.md b/gsd/core/assets/gsd-core/workflows/next.md index 0014502e06..c735bd1886 100644 --- a/gsd/core/assets/gsd-core/workflows/next.md +++ b/gsd/core/assets/gsd-core/workflows/next.md @@ -74,6 +74,9 @@ Use `--force` to bypass this check. ``` Exit. +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is +its `title`. `{src}` is the number of the phase whose items are deferred (`$SRC`). + **Gate 3: Unchecked verification** Check if the current phase has a VERIFICATION.md with any `FAIL` items that don't have overrides: If found: diff --git a/gsd/core/assets/gsd-core/workflows/plan-phase.md b/gsd/core/assets/gsd-core/workflows/plan-phase.md index c11b8f4663..a7f426063e 100644 --- a/gsd/core/assets/gsd-core/workflows/plan-phase.md +++ b/gsd/core/assets/gsd-core/workflows/plan-phase.md @@ -95,11 +95,11 @@ MVP_MODE_CFG="{{setting:workflow.mvp_mode|false}}" # workflow.mvp_mode (the se When the tdd capability's `workflow.tdd_mode` is active (resolved via the plan:pre render-hooks), the planner agent is instructed to apply `type: tdd` to eligible tasks using heuristics from `gsd-core/references/tdd.md`. The TDD guidance is injected via the tdd capability's contribution hook at §5.6; no inline config-get is needed. -The planner reads the planner pack (`specforge context gsd/planner`) at the route's budget: the summaries of the plans its phase depends on are among its sections, whatever the context window. +The planner reads the planner pack (`specforge context gsd/planner`), its core whole and its enrich sections within the route's allowance: the summaries of the plans its phase depends on are among its sections, whatever the context window. **#2401 — `prior_verify_commands` is NOT part of that pack and is never gated on the context window.** It is a handful of one-line `` commands harvested from the nearest prior phase that had any; the payload is tiny and its absence at 200k is exactly what made the planner re-invent a verify command and author an unrunnable path. Surface it at every context window. -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name`, `slug`, `goal`, `status` and `requirements` are its fields; a phase not in the graph is an E003 error), and the other nodes are what links to it or from it: its milestone, its requirements, its `plan` entities and its `context`, `research`, `verification` and `uat_session` when it has them. `phase_status` (#3569) is the phase's `status`, `phase_req_ids` its `requirements`, `plan_count` the number of its plans, and `has_research`, `has_context` and `has_plans` whether one is there. `workflow.research`, `workflow.plan_check`, `workflow.nyquist_validation`, `workflow.text_mode`, `response_language` and `granularity` are settings: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. `prior_verify_commands` (#2401) are the `verification` of each plan of the nearest earlier phase that has plans, read with a depth-1 query of that phase. +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug`, `goal`, `status` and `requirements` are its fields and its name its `title`; a phase not in the graph is an E003 error), and the other nodes are what links to it or from it: its milestone, its requirements, its `plan` entities and its `context`, `research`, `verification` and `uat_session` when it has them. `phase_status` (#3569) is the phase's `status`, `phase_req_ids` its `requirements`, `plan_count` the number of its plans, and `has_research`, `has_context` and `has_plans` whether one is there. `workflow.research`, `workflow.plan_check`, `workflow.nyquist_validation`, `workflow.text_mode`, `response_language` and `granularity` are settings: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. `prior_verify_commands` (#2401) are the `verification` of each plan of the nearest earlier phase that has plans, read with a depth-1 query of that phase. **#2517:** omit the `model=` param from an `Agent()` call when its `researcher`/`planner`/`checker`_model is `"inherit"` or empty — passing `model=""` 404s on non-Claude runtimes; omitting inherits the orchestrator model (mirrors execute-phase). @@ -213,7 +213,10 @@ If `section_manifest` is `null` or `"reviews-prerequisite"` is in its `included` PHASE_INFO=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0]') # the phase node, compact: found when the query does not refuse it, phase_number is the last segment of its id, the rest are its fields ``` -**If `found` is false:** Error with available phases. **If `found` is true:** Extract `phase_number`, `phase_name`, `goal` from JSON. +**If `found` is false:** Error with available phases. **If `found` is true:** read the phase from that node: +`phase_number` is the last segment of its `id` (`v1.0/03` gives `03`), `phase_name` is its `title` and `goal` its +`.fields.goal`. Below, `{X}` is `phase_number`, and a phase's label reads "Phase {phase_number}: {phase_name}"; in the +planner's proven verify commands, `{phase}` is the number of the earlier phase that ran each one. Now that `PHASE` is finalized, resolve MVP mode: ```bash @@ -410,7 +413,7 @@ Agent( prompt=filled_research_hook_fragment, subagent_type=research_hook.ref.agent, model="{researcher_model}", - description="Research Phase {phase}" + description="Research Phase {X}" ) ``` @@ -427,9 +430,9 @@ Agent( specforge gsd record-research "$RESEARCH_ID" || exit 1 ``` - When the return lists `### Open Questions`, display them: each is a question the profile kept out of the graph - (gsd/W204: no decision resolves it yet), for the user to answer at step 9d. Keep them for step 8, which hands - them to the planner. + When the return lists `### Open Questions`, display them: each is an open question the research recorded with no + decision that resolves it yet (gsd/W204, an error under gsd-strict), for the user to answer at step 9d. Keep + their ids for step 8, which hands them to the planner. - **`## RESEARCH BLOCKED`:** Display blocker, offer: 1) Provide context, 2) Skip research, 3) Abort @@ -517,7 +520,7 @@ Read the `activeHooks` of every line of `PLAN_PRE_HOOKS_JSON` / `HOOKS_JSON`, on **AI integration capability:** If the active `ai-integration` step hook is present, `AI_SPEC_PATH` is empty, and the phase goal contains AI keywords (`agent`, `llm`, `rag`, `chatbot`, `embedding`, `langchain`, `llamaindex`, `crewai`, `langgraph`, `openai`, `anthropic`, `vector`, `llm eval`), then: - In pipeline / `--auto` mode, invoke the hook's `ref.skill` via `Skill(skill="gsd-${ref.skill}", args="${PHASE} --auto")`. -- In manual mode, display the existing non-blocking `/gsd:ai-integration-phase {N}` recommendation and let the user continue planning without AI-SPEC or stop to run the capability workflow first. +- In manual mode, display the existing non-blocking `/gsd:ai-integration-phase {X}` recommendation and let the user continue planning without AI-SPEC or stop to run the capability workflow first. Run the UI deterministic gate whenever **any** `plan:pre` UI hook is active — including the step-only case (`workflow.ui_safety_gate` off). (`check.query` = `"ui.plan-gate"`, dot-normalized to `ui-plan-gate` per `loop-hook-dispatch.md` § `gate`.) @@ -569,13 +572,13 @@ Continue to step 6. Output this markdown directly (not as a code block): ``` -## ⚠ UI-SPEC.md missing for Phase {N} +## ⚠ No UI spec for Phase {X} ▶ Recommended next step: -`/gsd:ui-phase {N}` — generate UI design contract before planning +`/gsd:ui-phase {X}` — generate UI design contract before planning --- Also available: -- `/gsd:plan-phase {N} --skip-ui` — plan without UI-SPEC (not recommended for frontend phases) +- `/gsd:plan-phase {X} --skip-ui` — plan without UI-SPEC (not recommended for frontend phases) ``` **Exit the plan-phase workflow. Do not continue.** @@ -754,9 +757,9 @@ Planner prompt: **Phase:** {phase_number} **Mode:** {standard | gap_closure | reviews} **Graph context:** {the `/gsd-graphify` line of "Graph context on this install" at the end of the plan-phase prompt} -**Open questions the research returned:** {the items of the researcher's `### Open Questions`, or none}. -Each is the user's to answer, not yours: record no decision that resolves it and do not record it; write the -plans so they hold whatever the answer, and list it under `### Open Questions` in your return. +**Open questions the research returned:** {the ids of the researcher's `### Open Questions`, or none}. +Each is recorded open and is the user's to answer, not yours: record no decision that resolves it and leave it as +it is; write the plans so they hold whatever the answer, and list it under `### Open Questions` in your return. - `specforge context gsd/planner {PHASE_ID}` (the planner pack: the phase, its requirements, USER DECISIONS from /gsd:discuss-phase, the research and its items, the plans, the milestone, verification and UAT gaps, the summaries of the plans it depends on, the project and its decisions, `CLAUDE.md` / `AGENTS.md` and the settings; `--pick .budget` lists what the budget cut, read with `specforge query --format context`) - `specforge export --kinds lesson --format context` (Lessons, which the pack does not select) @@ -947,7 +950,7 @@ Agent( prompt=filled_prompt, subagent_type="gsd-planner", model="{planner_model}", - description="Plan Phase {phase}", + description="Plan Phase {X}", run_in_background=true ) ``` @@ -992,32 +995,27 @@ When the planner returns `## ⚠ Source Audit: Unplanned Items Found`, some of t ## 9d. Record the Answers to the Open Questions -The planner lists the research's open questions it was handed (step 8), unanswered: they are the user's. Ask the +The planner lists the research's open questions it was handed (step 8), recorded open: they are the user's. Ask the user each one (AskUserQuestion, or a numbered list in text mode); under `--auto` ask nothing. For each answer, -record the answer as a decision, then the question resolved by it, in that order: gsd-strict refuses the question -while no decision resolves it (`gsd/W204`), and accepts it once the decision exists. +record the answer as a decision, then set it as the question's `resolved_by`: the research recorded the question, +and the set settles its `gsd/W204`. ```bash PHASE_ID="{the phase id, e.g. v1.0/02}" -RESEARCH_ID="{the research id, e.g. v1.0/02/02-RESEARCH}" +RESEARCH_ID="{the research id the researcher returned, e.g. v1.0/02/02-RESEARCH}" DECISION_ID="{the phase's next decision id, e.g. D-03}" -QUESTION_ID="{the question's id, e.g. 02-Q1}" +QUESTION_ID="{the question's id as the researcher's return lists it, under the research, e.g. Q1}" IFS= read -rd '' ANSWER <<'TEXT' || true; ANSWER=${ANSWER%$'\n'} {the user's answer} TEXT -IFS= read -rd '' QUESTION <<'TEXT' || true; QUESTION=${QUESTION%$'\n'} -{the question, as the research returned it} -TEXT -IFS= read -rd '' UNCLEAR <<'TEXT' || true; UNCLEAR=${UNCLEAR%$'\n'} -{what was unclear, as the research returned it} -TEXT SPEC_FILE=$(specforge query "$PHASE_ID" --depth 0 --pick '.nodes[0].file') || exit 1 specforge new decision "$DECISION_ID" "$ANSWER" --in "$SPEC_FILE" --phase "$PHASE_ID" --text "$ANSWER" --origin checkpoint || exit 1 -specforge new open_question "$QUESTION_ID" "$QUESTION" --in "$SPEC_FILE" --research "$RESEARCH_ID" --question "$QUESTION" --unclear "$UNCLEAR" --resolved_by "$DECISION_ID" || exit 1 +specforge set "$RESEARCH_ID/$QUESTION_ID" resolved_by "$DECISION_ID" || exit 1 ``` -A question the user leaves open (every one, under `--auto`) is not recorded, since gsd-strict refuses it: step 14 -shows it again as open. +A question the user leaves open (every one, under `--auto`) stays open in the graph. Under gsd-strict its +`gsd/W204` is an error: `check` fails on it, and the entry gate of plan-phase refuses the next run on this phase +until the two lines above answer it. Step 14 shows it as open. ## 10. Spawn gsd-plan-checker Agent @@ -1109,7 +1107,7 @@ Agent( prompt=checker_prompt, subagent_type="gsd-plan-checker", model="{checker_model}", - description="Verify Phase {phase} plans", + description="Verify Phase {X} plans", run_in_background=true ) ```` @@ -1205,7 +1203,7 @@ Agent( prompt=revision_prompt, subagent_type="gsd-planner", model="{planner_model}", - description="Revise Phase {phase} plans", + description="Revise Phase {X} plans", run_in_background=true ) ``` @@ -1491,7 +1489,8 @@ If the check command failed (non-zero `CHECK_EXIT`, empty output, or unparseable ## 14. Present Final Status -List each open question step 9d left unanswered: it is not in the graph. Route to +List each open question step 9d left unanswered: it is open in the graph, and under gsd-strict `check` fails on it +and plan-phase's entry gate refuses the next run on this phase until step 9d's two lines answer it. Route to `` OR `auto_advance` depending on flags/config. ## 15. Auto-Advance Check @@ -1507,7 +1506,7 @@ Output this markdown directly (not as a code block): ### GSD ► PHASE {X} PLANNED ✓ -**Phase {X}: {Name}** — {N} plan(s) in {M} wave(s) +**Phase {X}: {phase_name}** — {N} plan(s) in {M} wave(s) | Wave | Plans | What it builds | |------|-------|----------------| diff --git a/gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md b/gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md index 7ead1be704..cf8b62204b 100644 --- a/gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md +++ b/gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md @@ -70,7 +70,7 @@ Agent( Return: ## OUTLINE COMPLETE with plan count.", subagent_type="gsd-planner", model="{planner_model}", - description="Outline Phase {phase} (chunked)", + description="Outline Phase {X} (chunked)", run_in_background=true ) ``` @@ -152,8 +152,8 @@ path regardless of `CHUNKED_PARALLEL` — there is nothing to batch. **Chunked mode: single-plan.** Write exactly ONE plan: the plan entity `{phase_id}/{plan_id}`, with the plan edit of `` holding this plan alone. - A plan written alone is refused `gsd/E301` while another requirement of the phase is in no plan: - then return ## PLAN BLOCKED with the codes. + While a later plan of the outline is not written, the call reports `gsd/E301` or `gsd/E310` and is + written, not refused. Return ## PLAN BLOCKED with the codes only when the call is refused. Plan to write: {plan_id} — {objective} Wave: {wave} | Depends on: {depends_on} Phase requirement IDs to cover in this plan: {plan_requirements} @@ -205,14 +205,20 @@ specforge git commit --add spec -m "docs(${PADDED_PHASE}): plan ${plan_id} (chun 8. **Recovery:** an entry that is `stalled` in step 5, or whose plan is missing in step 6, offers 1) Retry, 2) Stop — scoped to that one plan. Sibling entries in the same batch that already verified and committed keep their commits either way; only the failed/stalled plan is retried - or the run stopped. A `blocked` entry (its `## PLAN BLOCKED` names `gsd/E301`: a requirement of - the phase is in no plan yet, so this plan cannot be written alone, and a retry is refused the - same way) offers instead 1) Plan the rest of the phase in one run, 2) Stop. Option 1 is step 8's - single planner spawn with `CHUNKED_MODE` false, whose prompt names the plans the graph already - holds (`specforge query "$PHASE_ID" --kinds plan --pick '.nodes[kind=plan].id'`): its plan edit + or the run stopped. A `blocked` entry (its `## PLAN BLOCKED` names the codes of a refused call, + which wrote nothing; `gsd/E301` and `gsd/E310` never block, since a later plan settles them) + offers instead 1) Retry, with the codes in the planner's prompt, + 2) Plan the rest of the phase in one run, 3) Stop. Option 2 is step 8's single planner spawn with + `CHUNKED_MODE` false, whose prompt names the plans the graph already holds + (`specforge query "$PHASE_ID" --kinds plan --pick '.nodes[kind=plan].id'`): its plan edit creates every plan the outline still lists and none of those, since an id that exists is refused as a conflict. The plans already committed stay. + A run stopped before the outline's last plan leaves the phase half-planned: the `gsd/E301` and + `gsd/E310` its plans reported stay in the repository, `check` fails on them, and the gate of + `/gsd-execute-phase` refuses the phase until the rest is planned (this mode again, whose resume + skips the plans that exist, or option 2). + Move to the next Wave only once every entry in the current Wave is committed or the run was stopped. After every Wave's plans are written and committed, treat this as `## PLANNING COMPLETE` and continue to step 9. diff --git a/gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md b/gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md index 6ae0ab8b0a..3652637e2f 100644 --- a/gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md +++ b/gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md @@ -9,10 +9,10 @@ Error: ``` -No REVIEWS.md found for Phase {N}. Run reviews first: +No review recorded for Phase {X}. Run reviews first: -/gsd:review --phase {N} +/gsd:review --phase {X} -Then re-run /gsd:plan-phase {N} --reviews +Then re-run /gsd:plan-phase {X} --reviews ``` Exit workflow. diff --git a/gsd/core/assets/gsd-core/workflows/plan-review-convergence.md b/gsd/core/assets/gsd-core/workflows/plan-review-convergence.md index ea8c130e6a..4932591245 100644 --- a/gsd/core/assets/gsd-core/workflows/plan-review-convergence.md +++ b/gsd/core/assets/gsd-core/workflows/plan-review-convergence.md @@ -125,7 +125,10 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error), and its `plan` entities are among the other nodes (`plan_count` is their number; `has_plans` is whether there is one). `workflow.text_mode` and `response_language` are settings: `specforge settings --format json --extension @gsd/core`. +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error), and its `plan` entities are among the other nodes (`plan_count` is their number; `has_plans` is whether there is one). `workflow.text_mode` and `response_language` are settings: `specforge settings --format json --extension @gsd/core`. + +In a phase's label, `{phase_number}` and `{PHASE}` are the phase's number, the last segment of its `id` (`v1.0/03` gives +`03`). **If `response_language` is set:** All user-facing output — narration between tool calls, status updates, progress notes, findings, questions, and report prose — should be in `{response_language}`. diff --git a/gsd/core/assets/gsd-core/workflows/pr-branch.md b/gsd/core/assets/gsd-core/workflows/pr-branch.md index a00b42642f..fea4b8a308 100644 --- a/gsd/core/assets/gsd-core/workflows/pr-branch.md +++ b/gsd/core/assets/gsd-core/workflows/pr-branch.md @@ -67,11 +67,6 @@ Mode: {PR_MODE} ``` - -There are no sub-repositories: a sub-repository is another SpecForge project, and `planning.sub_repos` is not a setting here. Continue to `analyze_commits`. - - - Classify commits: diff --git a/gsd/core/assets/gsd-core/workflows/progress.md b/gsd/core/assets/gsd-core/workflows/progress.md index aab81adecd..53b2c2cb07 100644 --- a/gsd/core/assets/gsd-core/workflows/progress.md +++ b/gsd/core/assets/gsd-core/workflows/progress.md @@ -24,6 +24,11 @@ INIT=$(specforge gsd progress-report --format json) Read from the answer (what `progress-report` prints): `milestone_version`, `milestone_name`, `phases` (each `number`, `name`, `plans`, `summaries`, `status`), `total_plans`, `total_summaries`, `percent` and `phase_scope`. `phase_count` is the length of `phases` and `completed_count` counts those with status `Complete`; the current phase is the first that is not, and the next phase the one after it; `roadmap_exists` is `phases` non-empty and `state_exists` is `milestone_version` non-null (the project state is computed, so no path is read); a pause is a `pause` entity, and a phase's mode its `mode` field. +In a phase's label, `{phase}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}` +is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as +words, so a label reads the title from the phase node (`specforge query "$MILESTONE" --kinds phase --depth 1`). `{Z}` is +the number of the phase just completed, and `{Z+1}` the next one's. + ```bash DISCUSS_MODE="{{setting:workflow.discuss_mode|}}" # workflow.discuss_mode (the settings) ``` @@ -365,7 +370,7 @@ Read its `` section. **Route B: Phase needs planning** -Check if `{phase_num}-CONTEXT.md` exists in phase directory. +Check whether the phase has a `context` entity (`has_context`). Check if current phase has UI indicators: @@ -381,7 +386,7 @@ PHASE_HAS_UI=${PHASE_HAS_UI:-false} # @gsd/ui computes frontend: false when it ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE} -**Phase {N}: {Name}** — {Goal from ROADMAP.md} +**Phase {phase}: {Name}** — {Goal from ROADMAP.md} ✓ Context gathered, ready to plan `/clear` then: @@ -398,7 +403,7 @@ PHASE_HAS_UI=${PHASE_HAS_UI:-false} # @gsd/ui computes frontend: false when it ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE} -**Phase {N}: {Name}** — {Goal from ROADMAP.md} +**Phase {phase}: {Name}** — {Goal from ROADMAP.md} `/clear` then: @@ -421,7 +426,7 @@ PHASE_HAS_UI=${PHASE_HAS_UI:-false} # @gsd/ui computes frontend: false when it ## ▶ Next Up — [${PROJECT_CODE}] ${PROJECT_TITLE} -**Phase {N}: {Name}** — {Goal from ROADMAP.md} +**Phase {phase}: {Name}** — {Goal from ROADMAP.md} `/clear` then: @@ -447,7 +452,7 @@ UAT.md exists with gaps (diagnosed issues). User needs to plan fixes. ## ⚠ UAT Gaps Found -**{phase_num}-UAT.md** has {N} gaps requiring fixes. +**{phase}-UAT.md** has {N} gaps requiring fixes. `/clear` then: @@ -473,7 +478,7 @@ UAT.md exists with `status: partial` — testing session ended before all items ## Incomplete UAT Testing -**{phase_num}-UAT.md** has {N} unresolved tests (pending, blocked, or skipped). +**{phase}-UAT.md** has {N} unresolved tests (pending, blocked, or skipped). `/clear` then: @@ -519,7 +524,7 @@ The phase's verification reports `gaps_found`: it identified gaps that need fix ## ⚠ Verification Gaps Found -**Phase {phase_num}'s verification** reports `gaps_found`. Plan the gap fixes, then execute them. +**Phase {phase}'s verification** reports `gaps_found`. Plan the gap fixes, then execute them. `/clear` then: @@ -539,7 +544,7 @@ The phase's verification reports `human_needed`: automated checks passed but man ## Human Verification Required -**Phase {phase_num}'s verification** reports `human_needed`. Resolve the remaining manual checks. +**Phase {phase}'s verification** reports `human_needed`. Resolve the remaining manual checks. `/clear` then: diff --git a/gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md b/gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md index a0d5cf8e8d..c3015fa023 100644 --- a/gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md +++ b/gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md @@ -92,9 +92,9 @@ PLAN_CONCURRENCY=1 # quick-batch effective-concurrency: the batch router is no ${RESEARCH_MODE ? '- `specforge query ' + quick_id + '-RESEARCH --depth 1 --format context` (Research findings, if present)' : ''} - **Open questions the research returned:** {the item's researcher's `### Open Questions`, or none}. - Each is the user's to answer, not yours: record no decision that resolves it and do not record it; write the - plans so they hold whatever the answer, and list it under `### Open Questions` in your return. + **Open questions the research returned:** {the ids of the item's researcher's `### Open Questions`, or none}. + Each is recorded open and is the user's to answer, not yours: record no decision that resolves it and leave it + as it is; write the plans so they hold whatever the answer, and list it under `### Open Questions` in your return. ${AGENT_SKILLS_PLANNER} @@ -139,30 +139,24 @@ PLAN_CONCURRENCY=1 # quick-batch effective-concurrency: the batch router is no block unrelated items (row 33). When an item's planner lists `### Open Questions`, ask the user each one (under `--auto`, ask nothing and - report them as open). For each answer, record the answer as a decision, then the question resolved by it, in - that order: gsd-strict refuses the question while no decision resolves it (`gsd/W204`), and accepts it - once the decision exists. + report them as open). For each answer, record the answer as a decision, then set it as the question's + `resolved_by`: the research recorded the question, and the set settles its `gsd/W204`. ```bash QUICK_ID="{the item's quick id, e.g. 261121-abc}" RESEARCH_ID="{the research id, e.g. 261121-abc-RESEARCH}" DECISION_ID="{the quick plan's next decision id, e.g. 261121-abc-D-01}" -QUESTION_ID="{the question's id, e.g. 261121-abc-Q1}" +QUESTION_ID="{the question's id as the research's return lists it, under the research, e.g. Q1}" IFS= read -rd '' ANSWER <<'TEXT' || true; ANSWER=${ANSWER%$'\n'} {the user's answer} TEXT -IFS= read -rd '' QUESTION <<'TEXT' || true; QUESTION=${QUESTION%$'\n'} -{the question, as the research returned it} -TEXT -IFS= read -rd '' UNCLEAR <<'TEXT' || true; UNCLEAR=${UNCLEAR%$'\n'} -{what was unclear, as the research returned it} -TEXT SPEC_FILE=spec/quick.spec specforge new decision "$DECISION_ID" "$ANSWER" --in "$SPEC_FILE" --plan "$QUICK_ID" --text "$ANSWER" --origin checkpoint || exit 1 -specforge new open_question "$QUESTION_ID" "$QUESTION" --in "$SPEC_FILE" --research "$RESEARCH_ID" --question "$QUESTION" --unclear "$UNCLEAR" --resolved_by "$DECISION_ID" || exit 1 +specforge set "$RESEARCH_ID/$QUESTION_ID" resolved_by "$DECISION_ID" || exit 1 ``` - A question the user leaves open is not recorded, since gsd-strict refuses it. + A question the user leaves open stays open in the graph: under gsd-strict its `gsd/W204` is an error, and + `check` fails on it until the two lines above answer it. 7. **If `$VALIDATE_MODE`:** read and execute `gsd-core/workflows/quick-batch/steps/plan-checker-loop.md` for this layer's items now, before persisting diff --git a/gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md b/gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md index 8ae46dc076..b7ab569623 100644 --- a/gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md +++ b/gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md @@ -91,9 +91,9 @@ researcher does not produce research `${quick_id}-RESEARCH`, warn but continue — mirrors `/gsd:quick`'s own tolerant fallback (research is advisory input to planning, never a hard gate). When an item's researcher returns `### Open Questions` (questions the -profile refused to record, gsd/W204: no decision resolves them yet), report -them and pass them to that item's planner prompt (its **Open questions the -research returned:**). The user answers them after the planner returns. +research recorded open, gsd/W204: no decision resolves them yet), report +them and pass their ids to that item's planner prompt (its **Open questions +the research returned:**). The user answers them after the planner returns. Continue to Step 4 once every item has either a RESEARCH.md or a logged warning. diff --git a/gsd/core/assets/gsd-core/workflows/quick.md b/gsd/core/assets/gsd-core/workflows/quick.md index 753115e600..ee24ad6ab8 100644 --- a/gsd/core/assets/gsd-core/workflows/quick.md +++ b/gsd/core/assets/gsd-core/workflows/quick.md @@ -318,9 +318,9 @@ ${DISCUSS_MODE ? '- `specforge query ' + quick_id + '-CONTEXT --depth 2 --kinds ${RESEARCH_MODE ? '- `specforge query ' + quick_id + '-RESEARCH --depth 1 --format context` (Research findings — use to inform implementation choices)' : ''} -**Open questions the research returned:** {the items of the researcher's `### Open Questions`, or none}. -Each is the user's to answer, not yours: record no decision that resolves it and do not record it; write the -plans so they hold whatever the answer, and list it under `### Open Questions` in your return. +**Open questions the research returned:** {the ids of the researcher's `### Open Questions`, or none}. +Each is recorded open and is the user's to answer, not yours: record no decision that resolves it and leave it as +it is; write the plans so they hold whatever the answer, and list it under `### Open Questions` in your return. ${AGENT_SKILLS_PLANNER} @@ -359,30 +359,24 @@ After planner returns: 2. Extract plan count (typically 1 for quick tasks) 3. Report: "Plan created: plan ${quick_id}" 4. When the return lists `### Open Questions`, ask the user each one (under `--auto`, ask nothing and report - them as open). For each answer, record the answer as a decision, then the question resolved by it, in - that order: gsd-strict refuses the question while no decision resolves it (`gsd/W204`), and accepts it - once the decision exists. + them as open). For each answer, record the answer as a decision, then set it as the question's + `resolved_by`: the research recorded the question, and the set settles its `gsd/W204`. ```bash QUICK_ID="{the quick plan's id, e.g. 261121-abc}" RESEARCH_ID="{the research id, e.g. 261121-abc-RESEARCH}" DECISION_ID="{the quick plan's next decision id, e.g. 261121-abc-D-01}" -QUESTION_ID="{the question's id, e.g. 261121-abc-Q1}" +QUESTION_ID="{the question's id as the research's return lists it, under the research, e.g. Q1}" IFS= read -rd '' ANSWER <<'TEXT' || true; ANSWER=${ANSWER%$'\n'} {the user's answer} TEXT -IFS= read -rd '' QUESTION <<'TEXT' || true; QUESTION=${QUESTION%$'\n'} -{the question, as the research returned it} -TEXT -IFS= read -rd '' UNCLEAR <<'TEXT' || true; UNCLEAR=${UNCLEAR%$'\n'} -{what was unclear, as the research returned it} -TEXT SPEC_FILE=spec/quick.spec specforge new decision "$DECISION_ID" "$ANSWER" --in "$SPEC_FILE" --plan "$QUICK_ID" --text "$ANSWER" --origin checkpoint || exit 1 -specforge new open_question "$QUESTION_ID" "$QUESTION" --in "$SPEC_FILE" --research "$RESEARCH_ID" --question "$QUESTION" --unclear "$UNCLEAR" --resolved_by "$DECISION_ID" || exit 1 +specforge set "$RESEARCH_ID/$QUESTION_ID" resolved_by "$DECISION_ID" || exit 1 ``` - A question the user leaves open is not recorded, since gsd-strict refuses it. + A question the user leaves open stays open in the graph: under gsd-strict its `gsd/W204` is an error, and + `check` fails on it until the two lines above answer it. If the plan holds no task, error: "Planner failed to create plan ${quick_id}" diff --git a/gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md b/gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md index 34ef9e049f..2fa4348aa7 100644 --- a/gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md +++ b/gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md @@ -67,8 +67,8 @@ Return: ## RESEARCH COMPLETE with file path After researcher returns: 1. Verify the research exists: `specforge query "${quick_id}-RESEARCH" --depth 0 >/dev/null` 2. Report: "Research complete: research ${quick_id}-RESEARCH" -3. When the return lists `### Open Questions` (questions the profile refused to record, gsd/W204: no decision - resolves them yet), report them and pass them to the planner's prompt (its **Open questions the research +3. When the return lists `### Open Questions` (questions the research recorded open, gsd/W204: no decision + resolves them yet), report them and pass their ids to the planner's prompt (its **Open questions the research returned:**). The user answers them after the planner returns. If research file not found, warn but continue: "Research agent did not produce output — proceeding to planning without research." diff --git a/gsd/core/assets/gsd-core/workflows/resume-project.md b/gsd/core/assets/gsd-core/workflows/resume-project.md index aae1c4522f..da54c87b4e 100644 --- a/gsd/core/assets/gsd-core/workflows/resume-project.md +++ b/gsd/core/assets/gsd-core/workflows/resume-project.md @@ -32,6 +32,10 @@ INIT=$(specforge gsd progress-report --format json) Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints). The routing facts below are not in it, they come from the graph: `state_exists` is `milestone_version` non-null (the project state is computed); `roadmap_exists` is `phases` non-empty; `project_exists` and `planning_exists` are `[ -n "$(specforge export --kinds project --pick '.nodes[].id')" ]`; `requirements_exists` is the same with `--kinds requirement`; `init_incomplete` is a project without a roadmap or without requirements; `has_interrupted_agent` is false (this extension keeps no agent registry). +In a phase's label, `[X]` and `[N]` are the phase's number, the last segment of its `id`, and `[Name]` and `[Phase name]` +are its `title`, read from its node (`specforge query "$MILESTONE/${N}" --depth 0 --pick '.nodes[0].title'`, `N` its +number): a phase's `name` in `phases` is its slug read as words, never a label's name. + **If `init_incomplete` is true (#4040 — interrupted bootstrap):** the spec exists but initialization never finished — the `requirement` entities, the `milestone` and `phase` entities or the project were never created. This is NOT a state-reconstruction case (the project state is computed). Route to initialization recovery: resume `/gsd:new-project`, which continues from the first missing entity and keeps the existing `project` entity and any already-created ones. Do not proceed to load_state. **If `state_exists` is true:** Proceed to load_state diff --git a/gsd/core/assets/gsd-core/workflows/review.md b/gsd/core/assets/gsd-core/workflows/review.md index a42f7cbf6c..a2fec3a5fe 100644 --- a/gsd/core/assets/gsd-core/workflows/review.md +++ b/gsd/core/assets/gsd-core/workflows/review.md @@ -139,7 +139,9 @@ RUN_DIR=$(specforge files temp --dir --prefix gsd-review- --pick .path) echo "RUN_DIR=$RUN_DIR" ``` -Read from the query: the phase's `name` and goal, and its plans, contexts and research notes. +Read from the query: the phase's title and goal, and its plans, contexts and research notes. + +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). Capture `RUN_DIR` above (created ONCE) and thread it into every `{run_dir}` placeholder and `$RUN_DIR`/`${RUN_DIR}` reference within a bash block. Do NOT diff --git a/gsd/core/assets/gsd-core/workflows/settings-advanced.md b/gsd/core/assets/gsd-core/workflows/settings-advanced.md index b23d3d3e96..9e46dffedf 100644 --- a/gsd/core/assets/gsd-core/workflows/settings-advanced.md +++ b/gsd/core/assets/gsd-core/workflows/settings-advanced.md @@ -4,7 +4,7 @@ Apply response_language to all user-facing prose — narration between tool call Interactive configuration of GSD power-user knobs — plan bounce, planner stall detection, node repair, subagent timeouts, inline plan threshold, cross-AI execution, base branch, branch templates, response language, -context window, graphify build timeout, runtime model tier overrides, and +context window, runtime model tier overrides, and model policy configuration (provider + budget → canonical tier mapping, or manual model ID assignment per cost tier). @@ -60,7 +60,6 @@ Planning Tuning: Execution Tuning: - `workflow.node_repair` (default: `true`) - `workflow.node_repair_budget` (default: `2`) -- `workflow.auto_prune_state` (default: `false`) Discussion Tuning: - `workflow.max_discuss_passes` (default: `3`) @@ -78,7 +77,6 @@ Git Customization: Runtime / Output: - `response_language` (default: `null`) - `context_window` (default: `200000`) -- `graphify.build_timeout` (default: `300`) Runtime Model Tiers: - `runtime` (default: `null` — reads as `"claude"`) @@ -106,7 +104,7 @@ in `$ARGUMENTS` OR `text_mode` is true in config. When `TEXT_MODE=true`, replace choice number or free-text value. **Numeric-input validation.** For any numeric field (`*_passes`, `*_budget`, `*_timeout`, -`*_threshold`, `context_window`, `graphify.build_timeout`), if the user types a value that +`*_threshold`, `context_window`), if the user types a value that is not a non-negative integer, the workflow MUST reject it, state which value was invalid, and re-prompt that single field. The minimum accepted value is field-specific and is stated in each field's prompt below — `workflow.plan_bounce_passes` and `workflow.max_discuss_passes` @@ -212,15 +210,6 @@ AskUserQuestion([ { label: "Keep current", description: "Leave existing budget unchanged." }, { label: "Enter number", description: "Integer >= 0. Non-numeric rejected. Default: 2" } ] - }, - { - question: "Auto-prune stale STATE.md entries at phase boundaries? (current: )", - header: "Auto Prune", - multiSelect: false, - options: [ - { label: "No (default: false)", description: "Prompt before pruning." }, - { label: "Yes", description: "Prune stale entries without prompting." } - ] } ]) ``` @@ -332,15 +321,6 @@ AskUserQuestion([ { label: "Keep current", description: "Leave unchanged." }, { label: "Enter number", description: "Integer. Non-numeric rejected. Default: 200000. Use 1000000 for 1M-context models. Values >= 500000 enable adaptive enrichment." } ] - }, - { - question: "Graphify build timeout (seconds)? (current: )", - header: "Graphify Timeout", - multiSelect: false, - options: [ - { label: "Keep current", description: "Leave timeout unchanged." }, - { label: "Enter seconds", description: "Integer seconds. Non-numeric rejected. Default: 300" } - ] } ]) ``` @@ -537,7 +517,6 @@ anything not listed in Sections 1–8 MUST survive the update): "inline_plan_threshold": , "node_repair": , "node_repair_budget": , - "auto_prune_state": , "max_discuss_passes": , "cross_ai_execution": , "cross_ai_command": , @@ -551,10 +530,6 @@ anything not listed in Sections 1–8 MUST survive the update): }, "response_language": , "context_window": , - "graphify": { - ...existing_graphify, - "build_timeout": - }, "runtime": , "model_profile_overrides": { ...existing_model_profile_overrides, @@ -769,7 +744,6 @@ Display: | workflow.inline_plan_threshold | {n} | | workflow.node_repair | {on/off} | | workflow.node_repair_budget | {n} | -| workflow.auto_prune_state | {on/off} | | workflow.max_discuss_passes | {n} | | workflow.cross_ai_execution | {on/off} | | workflow.cross_ai_command | {cmd/null} | @@ -779,7 +753,6 @@ Display: | git.milestone_branch_template | {template} | | response_language | {lang/null} | | context_window | {tokens} | -| graphify.build_timeout | {seconds} | | runtime | {runtime/null} | | model_profile_overrides..opus | {model/built-in/null} | | model_profile_overrides..sonnet | {model/built-in/null} | diff --git a/gsd/core/assets/gsd-core/workflows/settings.md b/gsd/core/assets/gsd-core/workflows/settings.md index 0fb5144c4c..c44c0722f9 100644 --- a/gsd/core/assets/gsd-core/workflows/settings.md +++ b/gsd/core/assets/gsd-core/workflows/settings.md @@ -48,7 +48,6 @@ Parse current values (default to `true` if not present): - `intel.enabled` — enable queryable codebase intelligence (/gsd:map-codebase --query) (default: false if absent) - `model_profile` — which model each agent uses (default: `balanced`) - `git.branching_strategy` — branching approach (default: `"none"`) -- `git.repo_tagging` — milestone tagging mode: not applicable in @gsd/core (a SpecForge project has no `planning.sub_repos`), so a milestone gets one `v[X.Y]` tag, #3628 - `workflow.use_worktrees` — whether parallel executor agents run in worktree isolation (honored when the runtime declares a `dispatch.isolation` primitive — `harness-worktree` or `orchestrator-worktree`; runtimes declaring `none` default it to `false` and fail closed on an explicit `true` — #1521, #2486, #2584) - `workflow.compact_content` — load token-minimized instruction variants where they exist, trading rarely-needed elaboration for a smaller always-loaded instruction window (default: false if absent; #4139) - `model_policy.provider` — provider slug for model policy (default: `null`; known values: anthropic, openai, google, qwen; set via /gsd:config --advanced) diff --git a/gsd/core/assets/gsd-core/workflows/ship.md b/gsd/core/assets/gsd-core/workflows/ship.md index 4ced7552ce..8a00752865 100644 --- a/gsd/core/assets/gsd-core/workflows/ship.md +++ b/gsd/core/assets/gsd-core/workflows/ship.md @@ -36,7 +36,10 @@ PHASE_NUMBER="${PHASE_ID##*/}" # the phase number is the last segment of its i **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error). +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error). + +In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and +`{phase_name}` is its `title`. Also load config for branching strategy: ```bash @@ -220,7 +223,7 @@ Read ROADMAP.md for phase goal. Read VERIFICATION.md for verification status. ```markdown ## Summary -**Phase {N}: {Name}** +**Phase {phase_number}: {phase_name}** **Goal:** {goal from ROADMAP.md} **Status:** Verified ✓ @@ -575,7 +578,7 @@ Each dispatch is best-effort: if it errors, record a warning and continue — ne ``` --- -## ✓ Phase {X}: {Name} — Shipped +## ✓ Phase {phase_number}: {phase_name} — Shipped PR: #{number} ({url}) Branch: {branch} → ${BASE_BRANCH} diff --git a/gsd/core/assets/gsd-core/workflows/spec-phase.md b/gsd/core/assets/gsd-core/workflows/spec-phase.md index c92a96614f..7efeb21424 100644 --- a/gsd/core/assets/gsd-core/workflows/spec-phase.md +++ b/gsd/core/assets/gsd-core/workflows/spec-phase.md @@ -62,7 +62,10 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name`, `slug` and `requirements` are its fields; a phase not in the graph is an E003 error); the project state is computed and the roadmap and the requirements are entities, so no path is read. `response_language` is a setting: `specforge settings --format json --extension @gsd/core` (the phase's spec is read below, from the graph). +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` and `requirements` are its fields and its name its `title`; a phase not in the graph is an E003 error); the project state is computed and the roadmap and the requirements are entities, so no path is read. `response_language` is a setting: `specforge settings --format json --extension @gsd/core` (the phase's spec is read below, from the graph). + +In a phase's label, `{X}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is +its `title`. **If `response_language` is set:** All user-facing text in this workflow — narration between tool calls, status updates, progress notes, findings, questions, and report prose — MUST be in `{response_language}`. Technical terms, code, and file paths stay in English. diff --git a/gsd/core/assets/gsd-core/workflows/transition.md b/gsd/core/assets/gsd-core/workflows/transition.md index ade41aed8e..98ff8dd1b4 100644 --- a/gsd/core/assets/gsd-core/workflows/transition.md +++ b/gsd/core/assets/gsd-core/workflows/transition.md @@ -74,6 +74,10 @@ specforge query "$PROJECT" --depth 0 --format context 2>/dev/null || true Parse current position to verify we're transitioning the right phase. Note accumulated context that may need updating after transition. +In a phase's label, `{X}` and `[X]` are the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and +`[X+1]` is the next phase's. `{Phase Name}` is the phase's `title`, as the context above prints it: `progress-report`'s +phase `name` is its slug read as words, never a label's name. + @@ -193,7 +197,10 @@ There is nothing to write: the phase's status is computed (complete once its ver specforge gsd progress-report --format json ``` -Extract from result: `phases[].number`, `phases[].name`, `phases[].status`. +Extract from result: `phases[].number` and `phases[].status`. + +A phase's `name` in that answer is its slug read as words, so a label reads the phase's name, its `title`, from the +phase node (`offer_next_phase`). The next phase is the first phase after this one whose `status` is not `Complete`. When there is none, this was the last phase of the milestone. @@ -351,7 +358,7 @@ Review the accumulated context: the open blockers and this phase's decisions, `s - a phase after this one whose `status` is not `Complete` → More phases remain → Go to **Route A** - none → Last phase done → **Check for workstream collisions first** -The next phase's `number` and `name` give you the next phase details. +The next phase's `number` gives its id, `$MILESTONE/`; its name is that node's `title` (Route A reads it). If you need additional context, use: ```bash @@ -380,12 +387,14 @@ If `section_manifest` (from `INIT_TRANSITION`) is `null` or `"workstream-collisi **Route A: More phases remain in milestone** -The next phase's name is in the phases read above; its goal is the phase entity's `goal`. +The next phase's name is its `title`, read from its node (`NEXT_NAME` below); its goal is the phase entity's `goal`. +In the labels below, `[Name]` is the next phase's `title`, `NEXT_NAME`. **Check if next phase has CONTEXT.md:** ```bash NEXT_PHASE="{next_phase}" # the next phase's number as its id writes it (02, 02.1), from the phases read above +NEXT_NAME=$(specforge query "$MILESTONE/$NEXT_PHASE" --depth 0 --pick '.nodes[0].title') # its name: the phase's title NEXT_CONTEXT=$(specforge query "$MILESTONE/$NEXT_PHASE" --depth 1 --kinds context --pick '.nodes[kind=context].id' --first 1) # its context entity; empty when it has none ``` diff --git a/gsd/core/assets/gsd-core/workflows/ultraplan-phase.md b/gsd/core/assets/gsd-core/workflows/ultraplan-phase.md index a567b71288..8372dc8c80 100644 --- a/gsd/core/assets/gsd-core/workflows/ultraplan-phase.md +++ b/gsd/core/assets/gsd-core/workflows/ultraplan-phase.md @@ -72,9 +72,12 @@ INIT=$(specforge query "$PHASE_ID" --depth 1 --format json) ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields; a phase not in the graph is an E003 error), +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`; a phase not in the graph is an E003 error), and its milestone, its requirements and its `research` are among the other nodes; the project is an entity, so no path is read. +In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and +`{phase_name}` is its `title`. + **If `planning_exists` is false:** Error and exit: ```text @@ -88,7 +91,7 @@ No spec found. Initialize the project first: Display detected phase: ```text -Phase {N}: {phase name} +Phase {phase_number}: {phase_name} ``` @@ -175,7 +178,7 @@ When ◆ ultraplan ready appears in your terminal: /gsd:import will run conflict detection, convert to GSD format, validate via plan-checker, record the phase's plans, and commit. -### Launching ultraplan for Phase {N}: {phase_name}... +### Launching ultraplan for Phase {phase_number}: {phase_name}... ``` diff --git a/gsd/core/assets/gsd-core/workflows/validate-phase.md b/gsd/core/assets/gsd-core/workflows/validate-phase.md index 8ad37519c3..79190d8593 100644 --- a/gsd/core/assets/gsd-core/workflows/validate-phase.md +++ b/gsd/core/assets/gsd-core/workflows/validate-phase.md @@ -28,7 +28,10 @@ AGENT_SKILLS_AUDITOR="" # the host install carries the skills of gsd-nyquist-a **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields). +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`). + +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is +its `title`. ```bash AUDITOR_MODEL="" # resolve-model is not part of @gsd/core: the host picks the model @@ -168,7 +171,7 @@ specforge new validation_row "$ROW_ID" "$TASK" --in "$PHASE_FILE" --validation " ```bash : "verification.append-audit: record the audit in the validation entity (specforge gsd record-validation)" \ --heading "Validation Audit" \ - --rows "{\"Gaps found\": {N}, \"Resolved\": {M}, \"Escalated\": {K}}" + --rows "{\"Gaps found\": {found}, \"Resolved\": {resolved}, \"Escalated\": {escalated}}" ``` ## 7. Commit diff --git a/gsd/core/assets/gsd-core/workflows/verify-work.md b/gsd/core/assets/gsd-core/workflows/verify-work.md index 150e2e064e..ea61c9ffd2 100644 --- a/gsd/core/assets/gsd-core/workflows/verify-work.md +++ b/gsd/core/assets/gsd-core/workflows/verify-work.md @@ -49,7 +49,10 @@ AGENT_SKILLS_PLANNER="" # the host install carries the skills of gsd-planner AGENT_SKILLS_CHECKER="" # the host install carries the skills of gsd-plan-checker ``` -Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error), and its `verification` and `uat_session` entities, when it has them, are among the other nodes. `response_language` is a setting: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. +Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error), and its `verification` and `uat_session` entities, when it has them, are among the other nodes. `response_language` is a setting: `specforge settings --format json --extension @gsd/core`; an installed agent carries its own model. + +In a phase's label, `{phase}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}` +is its `title`. **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. @@ -438,7 +441,7 @@ echo "open tests: ${OPEN_TESTS:-none}" Commit the recorded results when the person's lines or the gaps changed the spec: ```bash -specforge git commit --add spec -m "test({phase_num}): complete UAT - {passed} passed, {issues} issues" && specforge collect --runner gsd-git --yes +specforge git commit --add spec -m "test({phase}): complete UAT - {passed} passed, {issues} issues" && specforge collect --runner gsd-git --yes ``` **If the session holds deferred follow-ups,** offer to promote them to backlog phases so they stay visible at the project level (#4546). Count them: @@ -455,7 +458,7 @@ When the count is above 0, read them with `specforge query "$UAT_SESSION" --dept ``` Deferred follow-ups recorded: {N} -They currently live only on the session {phase_num}-UAT. Promote them to backlog phases? +They currently live only on the session {phase}-UAT. Promote them to backlog phases? [P] Promote to 999.x backlog phases [K] Keep them on the session only @@ -477,7 +480,7 @@ specforge gsd phase --backlog --name "Follow-up — Phase ${PHASE_ID##*/} deferr Then commit the deferral record: ```bash -specforge git commit --add spec -m "docs: defer Phase {phase_num} UAT follow-ups to backlog" && specforge collect --runner gsd-git --yes +specforge git commit --add spec -m "docs: defer Phase {phase} UAT follow-ups to backlog" && specforge collect --runner gsd-git --yes ``` **If the user chooses [K]:** continue to the summary unchanged — the deferred items stay in the session's `follow_ups`. @@ -656,7 +659,7 @@ Parse the JSON output. For the CURRENT PHASE ONLY, surface: If any are found, display: ``` -Phase {N} Artifact Check +Phase {phase} Artifact Check --- @@ -762,7 +765,7 @@ Exact Agent() prompt fields (revision_context, required_reading): `gsd-core/work ``` ### GSD ► FIXES READY ✓ -**Phase {X}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created +**Phase {phase}: {Name}** — {N} gap(s) diagnosed, {M} fix plan(s) created | Gap | Root Cause | Fix Plan | |-----|------------|----------| diff --git a/gsd/core/contributions/README.md b/gsd/core/contributions/README.md index 4bf794ba46..4d712272b5 100644 --- a/gsd/core/contributions/README.md +++ b/gsd/core/contributions/README.md @@ -141,7 +141,7 @@ templates a prompt does not inline (`specforge gsd reference gsd-core/references | `plan_phase` | E201, W204, E206, W406, E516 | phase researcher, pattern mapper, planner, plan checker; `record_research`, `thread_plan` (the step `thread` between the planner and the plan checker, its answer checked by `specforge trace --plan`), `record_verdict`, `record_conflict`, `resolve_conflict`; `execute_phase` | | `plan_review_convergence` | E201, W204, E206, W406, E516 | `plan_phase`; plan checker | | `ultraplan_phase` | E201, W204, E206, W406, E516 | plan checker; `record_verdict` | -| `execute_phase` | W311, W313, W315, W318, E516 | `execute_plan`; `re_verify`; verifier; `record_verdict`, `record_window`, `raise_blocker` (a tripped TDD gate); `verify_work` | +| `execute_phase` | E301, W309, E310, W311, W313, W315, W318, E516 | `execute_plan`; `re_verify`; verifier; `record_verdict`, `record_window`, `raise_blocker` (a tripped TDD gate); `verify_work` | | `execute_plan` (no slash command) | W318, E516 | `start_plan`, `answer_checkpoint`, `confirm_setup`, `raise_blocker`, `complete_plan`; executor | | `verify_work` | E516 | `set_uat_result` (`--follow-up` keeps a deferred follow-up), `record_automated_uat`; planner, plan checker | | `validate_phase` | E516 | nyquist auditor; `record_validation`, `approve_validation` | diff --git a/gsd/core/spec/README.md b/gsd/core/spec/README.md index 334f04b937..637a67cff9 100644 --- a/gsd/core/spec/README.md +++ b/gsd/core/spec/README.md @@ -38,7 +38,7 @@ nothing is kept as Markdown. | `+` | append-only list: the baseline list is a prefix of the new one, items compared by value. On a kind (deviation, disposition, interview): no entity of the baseline is removed, and their fields are immutable | K4 | | `C` | **computed**: derived by a compute pass (a collector files a report the pass reads), held in the compiled graph only, never in `.spec`; writing it is an error. A value that compares with the past (`re_verification`) compares with the git baseline | K4 | | `H` | set only by a command's or a collector's plan; its digest goes in `specforge-harness`; any other value is an error | K4 | -| `P` | a context route's record of its pack (`route`, `digest`, `max_tokens`), written only by the host's `record_context` (ADR 0356); its digest goes in `specforge-harness`, it moves no entity digest, and a pack that moved since is the route's stale code. `O`: checked only while its owner is open | ADR 0356 | +| `P` | a context route's record of its pack (`route`, `digest`, and `max_tokens` when the read stated a cap), written only by the host's `record_context` (ADR 0356, ADR 0386); its digest goes in `specforge-harness`, it moves no entity digest, and a pack that moved since is the route's stale code. `O`: checked only while its owner is open | ADR 0356 | | `V` | its value comes from the fresh, recorded verdict of the judged rule that binds it (its outcome or a value it records); absent otherwise; written by hand it is an error (K4 E082) | K7 | | `U` | human-only: refused in every extension's plan and every MCP write when it is created, deleted or retitled (an agent also cannot set, unset or link an existing one, nor delete an entity holding a person's value: ADR 0298); the CLI writes it only from an interactive terminal; hand edits stay free (a field the host must also refuse an agent's direct edit of is `H`, written by a command that takes a reason) | K5 | diff --git a/gsd/core/spec/plan.md b/gsd/core/spec/plan.md index f9f75da54b..a320d049ec 100644 --- a/gsd/core/spec/plan.md +++ b/gsd/core/spec/plan.md @@ -215,7 +215,9 @@ reported (ADR 0377). The mapping is in cited [AUTH-07, "src/http/middleware.ts"] cited_tests [] inputs { plan "sha256:9f1c…" body "sha256:41d7…" phase "sha256:04ab…" requirements "sha256:5e21…" - phase_decisions "sha256:5b17…" all_decisions "sha256:e0b9…" + phase_decisions "sha256:5b17…" quick_decisions "sha256:3c09…" + project_decisions "sha256:e0b9…" resolved_decisions "sha256:d14e…" + settled_decisions "sha256:6a3e…" context "sha256:7a4f…" research "sha256:19cd…" research_items "sha256:b6a2…" siblings "sha256:2f80…" instructions "sha256:77e0…" cited "sha256:a8f3…" } findings [] diff --git a/gsd/core/spec/project.md b/gsd/core/spec/project.md index 17316d93af..c889960388 100644 --- a/gsd/core/spec/project.md +++ b/gsd/core/spec/project.md @@ -53,11 +53,11 @@ is written from one side, never both (W162). ## milestone -GSD: a milestone section of `ROADMAP.md`, `MILESTONES.md`, `milestones/-*`. Name: `v1.0`. +GSD: a milestone section of `ROADMAP.md`, `MILESTONES.md`, `milestones/-*`. Name: `v1.0`. Its title is its name +(`MVP`): no field repeats it (ADR 0387), and `progress-report`'s `milestone_name` reads it. | Field | Type | Flags | GSD | |---|---|---|---| -| name | str | R | `MVP` | | delivered | str | | `**Delivered:**` | | accomplishments | strs | | `**Key accomplishments:**` | | whats_next | str | | `**What's next:**` | @@ -72,21 +72,22 @@ GSD: a milestone section of `ROADMAP.md`, `MILESTONES.md`, `milestones/-*`. N | stats | {files int, loc int, phases int, plans int, tasks int, days int} | C | `**Stats:**`: from the graph and the recorded commits (`loc` sums their `insertions` and `deletions`; `files` counts distinct paths; `days` runs from the first commit to `completion.at`, or to the last commit); the commit-based members are absent with no commit | | git_range | str | C | `**Git range:**`: the first and last recorded `feat` commit as `` `feat(01-01)` → `feat(01-02)` `` (the scope is the name of the plan the commit names); absent with none | | progress | {phases int, phases_complete int, plans int, plans_complete int, percent int} | C | `STATE.md`'s `progress`, per milestone: `percent` is the smaller of plans_complete/plans and phases_complete/phases (a side with nothing counts 1, `state-document.cts:861-878`); `phases_complete` counts the phases whose verification passed, which needs r40's verdicts. `plans_complete` counts every plan with a summary, a halted one too (#2830), and the sentinel `999.x` backlog phases are left out (#3167) | -| branch | str | C | the branch it is executed on, from `git.branching_strategy` and its template (`{milestone}`, `{slug}`); under the `milestone` strategy, else absent | +| branch | str | C | the branch it is executed on, from `git.branching_strategy` and its template (`{milestone}`, `{slug}`: its title's slug); under the `milestone` strategy, else absent | GSD's archive copies (`milestones/-ROADMAP.md` …) have no counterpart: a shipped milestone's entities stay where they are, and `specforge query` answers what an archive answered. ## phase -GSD: `### Phase N: Name` in `ROADMAP.md` and its directory. Name: `03`, `03.1` (inserted), `999.1` (backlog; `/gsd-phase --promote 999.1` renames it, and its children, to the next integer of the milestone, and `--remove 999.1` deletes it without renumbering). -Scoped by milestone. +GSD: `### Phase N: Name` in `ROADMAP.md` and its directory. `Name` is its title and `N` the last segment of its id, so +its label is `Phase {N}: {title}` and no field repeats either (ADR 0387); a title that begins with a phase number is +`gsd/W109`. Name: `03`, `03.1` (inserted), `999.1` (backlog; `/gsd-phase --promote 999.1` renames it, and its children, +to the next integer of the milestone, and `--remove 999.1` deletes it without renumbering). Scoped by milestone. | Field | Type | Flags | GSD | |---|---|---|---| | milestone | → milestone | R I | the section it sits in | -| name | str | R | heading text | -| slug | str | R | directory `NN-slug` | +| slug | str | R | directory `NN-slug`: `phase` writes it from the title it gives (`--add`, `--insert`, `--backlog`, `--edit --name`) | | goal | str | R | `**Goal**:` | | depends_on | →* phase | | `**Depends on**:` | | requirements | →* requirement | | `**Requirements**:`; a requirement reads its phase back as `phase` | diff --git a/gsd/core/spec/provenance.md b/gsd/core/spec/provenance.md index bcae84cf20..0308160dae 100644 --- a/gsd/core/spec/provenance.md +++ b/gsd/core/spec/provenance.md @@ -43,7 +43,6 @@ one row per authored field, no row for another field, every upstream line holdin | requirement | defined | gsd-core/templates/requirements.md:10 | **Defined:** [date] | | requirement | shapes | gsd-core/references/specless-probe-fallback.md:88 | REQUIREMENTS.md: {"id","text","shapes"?} | | requirement | text_en | src/edge-probe.cts:63 | text_en?: string; | -| milestone | name | gsd-core/templates/milestone.md:6 | ## v[X.Y] [Name] (Shipped: YYYY-MM-DD) | | milestone | delivered | gsd-core/templates/milestone.md:8 | **Delivered:** [One sentence describing what shipped] | | milestone | accomplishments | gsd-core/templates/milestone.md:12 | **Key accomplishments:** | | milestone | whats_next | gsd-core/templates/milestone.md:26 | **What's next:** | @@ -52,7 +51,6 @@ one row per authored field, no row for another field, every upstream line holdin | milestone | abandoned | computed:milestone.state | | | milestone | workstream | gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md:1 | .planning/workstreams//STATE.md | | phase | milestone | gsd-core/templates/roadmap.md:167 | ### 🚧 v1.1 [Name] (In Progress) | -| phase | name | gsd-core/templates/roadmap.md:29 | ### Phase 1: [Name] | | phase | slug | gsd-core/templates/spec.md:3 | .planning/phases/XX-name/ | | phase | goal | gsd-core/templates/roadmap.md:30 | **Goal**: [What this phase delivers] | | phase | depends_on | gsd-core/templates/roadmap.md:31 | **Depends on**: Nothing (first phase) | diff --git a/gsd/core/spec/rules.md b/gsd/core/spec/rules.md index 8678f42314..24ed40dcab 100644 --- a/gsd/core/spec/rules.md +++ b/gsd/core/spec/rules.md @@ -32,6 +32,7 @@ every profile, while that setting is false; its letter is still the severity it | gsd/E106 | a milestone completes only with a passing (or accepted) audit: at the gate, the subject milestone's latest audit is `passed`, or `tech_debt` with a person's `debt_accepted`; no audit is refused too. Silent outside a gate | guard | E | E | complete-milestone | | gsd/E107 | a timestamp field holds an RFC 3339 UTC time (every authored `ts` field, and every authored `ts` member of an authored block, is a `str` that `matches` `YYYY-MM-DDTHH:MM:SS[.f]Z` with ASCII digits and RFC 3339's ranges for month, day, hour, minute and second; the day is not checked against the month; generated per field and member. `project.updated` is computed, so the first is `blocker.resolved.at` (r38, fired by a black-box test); `answer.at`, `done.at`, `pause.at` and `blocker.raised` are harness values and get none) | decl | E | E | (new: SpecForge has no timestamp type) | | gsd/E108 | a repository has one `project` (the kernel keeps `singleton` as metadata, so the second and later `project` entities, by id, are reported) | pass | E | E | (new: `PROJECT.md` is one file) | +| gsd/W109 | a phase's title does not begin with a phase number: `Phase` (any case) and a number in GSD's grammar, `\d+[A-Z]?(\.\d+)*`, then no letter or digit (`Phase 12: Core`, `phase 03.1 - Core`, `PHASE 12A: Core`, `Phase 3:Core`, `Phase 4`), or a bare number of digits and dots before `:` or `.` and a space, `)` or a spaced dash (`03: Core`, `3. Core`, `2) Core`, `04 - Core`). The rule reads that label grammar and no wider: a number inside the title (`HTTP 2 support`, `2FA login`, `v2.0 migration`, `3:00 standup`), a number joined to a word by a dash, a colon or a dot with no space (`03-Core`, `3-way merge`, `03:Core`, `3.Core`), a bare number before a word (`3 Core`, `#3 Core`, `(3) Core`), another word before a number (`Step 3: Core`, `Phase-3 cleanup`) and a lower-case letter after the number (`Phase 3a rollout`) are not one. A phase is labelled `Phase : ` (ADR 0387), so a numbered title prints a second number, which a renumber leaves behind. A `999.x` backlog phase is read too | pass | W | E | (new: GSD's heading `### Phase N: Name` keeps the number out of the name) | ## Discuss, spec, research @@ -40,7 +41,7 @@ every profile, while that setting is false; its letter is still the severity it | gsd/E201 | a context has canonical refs (`missing_required_field` and `non_empty` under one code) | decl | E | E | `gate-phase-context`, context template | | gsd/E202 | a phase spec meets its ambiguity gates | judged (prompt `spec_phase`) | E | E | spec-phase | | gsd/W203 | a locked requirement has a falsifiable acceptance | judged (prompt `spec_phase`) | W | E | spec template | -| gsd/W204 | an open question of a phase's research, or a quick plan's, is resolved by a decision before planning (the project's research, the one named `RESEARCH`, is exempt: the plan checker reads the phase's `RESEARCH.md` only; a quick plan's research, which names it in `plan`, is judged as a phase's, since upstream's quick planner reads its `RESEARCH.md` too; a research with neither `phase` nor `plan` and another name is E206 and is judged as a phase's. Upstream's plan checker reports this as `severity: blocker`; here it is a warning by design (D-r36-12), an Error under `gsd-strict`, where it blocks `/gsd-plan-phase`) | pass | W | E | plan checker (research resolution) | +| gsd/W204 | an open question of a phase's research, or a quick plan's, is resolved by a decision before planning (the project's research, the one named `RESEARCH`, is exempt: the plan checker reads the phase's `RESEARCH.md` only; a quick plan's research, which names it in `plan`, is judged as a phase's, since upstream's quick planner reads its `RESEARCH.md` too; a research with neither `phase` nor `plan` and another name is E206 and is judged as a phase's. Upstream's plan checker reports this as `severity: blocker`; here it is a warning by design (D-r36-12), an Error under `gsd-strict`, where it blocks `/gsd-plan-phase`). [Settled later](#settled-later): the edit that records the question reports it | pass | W | E | plan checker (research resolution) | | gsd/W205 | a package in research has a legitimacy verdict | judged (phase researcher) | W | E | package-legitimacy audit | | gsd/E206 | a phase has at most one context, phase spec, discussion log, research, verification and validation, a quick plan at most one context and research, and the project at most one research, which must be named `RESEARCH` (the kernel's scopes would allow two; the second and later, by id, are reported, a quick plan's counted by the `plan` they name, since they share the project scope; a research with neither `phase` nor `plan` that is not named `RESEARCH` is always reported, with the suggestion to add its `phase`). It also holds the owner: a context names exactly one of `phase` and `plan`, a decision and a research at most one, a `plan` must be a quick plan, one with no phase, and a quick plan's research is not named `RESEARCH`, the project's research's name, which gsd/W204 exempts (widened in G3 rather than a new code: E206 already held the owner rule of a phaseless research; widened again to the verification and the validation, one `NN-VERIFICATION.md` and one `NN-VALIDATION.md` in the phase directory, rather than a new code: the rule is the same, and a second was read silently before) | pass | E | E | (new: each is one file of the phase or quick task directory) | | gsd/E523 | an edge or spec prohibition of a phase spec carries what its status allows: a resolved row its tier (and an edge its resolution), a dismissed row its reason, an unresolved row neither; its requirement is a locked requirement of its spec, and one edge per requirement and category (ADR 0333; the `check_*` descriptor is not judged) | pass | E | E | probe-core validateResolution, edge-probe analyzeCoverage | @@ -51,7 +52,7 @@ The plan checker's dimensions, and the gates `gsd-tools check` runs at `plan:pos | Code | Rule | Kind | compat | strict | GSD source | |---|---|---|---|---|---| -| gsd/E301 | every requirement of a planned phase is in at least one of its plans' `requirements`; one error per requirement, on the phase. A phase with no plan is not judged (GSD runs the checker at `plan:post`) | pass | E | E | D1 | +| gsd/E301 | every requirement of a planned phase is in at least one of its plans' `requirements`; one error per requirement, on the phase. A phase with no plan is not judged (GSD runs the checker at `plan:post`). [Settled later](#settled-later): an edit that creates under the phase (some of its plans) and alters none of what it held reports it | pass | E | E | D1 | | gsd/E302 | a plan of a phase names at least one requirement; a quick plan (no `phase`) is exempt, it names no roadmap requirement (no declarative check reads "`phase` is unset") | pass | E | E | plan template (`requirements` non-empty), D1 | | gsd/E303 | an `auto`, `tdd` or `tracer` task has `files` and a verify of some form (`verify`, `verify_text` or `verify_human`); `action` and `done` are required fields, so the host reports those; `manual` is exempt. Severity divergence: GSD's `verify plan-structure` warns on a missing `<verify>`, `<files>` and `<done>` and errors on a missing `<action>`; the plan checker's D2 blocks all four, and that is the severity kept | pass | E | E | D2, `verify plan-structure` | | gsd/W304 | a plan has at most 3 tasks (4 warns; the count is GSD's `task_count`: tasks plus checkpoints). Not ported: GSD's `verify plan-structure` warns "No <task> elements found" for a plan with none. Here tasks are separate entities declared after their plan, and a plan with none (a plan being drafted, the quick plan of the `plan` fixture) is not an error; E303, W309 and the judged plan check (r40) catch an empty plan that is executed | pass | W | E | D5 | @@ -60,8 +61,8 @@ The plan checker's dimensions, and the gates `gsd-tools check` runs at `plan:pos | gsd/W526 | a plan runs in its declared wave: one warning per plan whose `strict_wave` is above its `wave` (ADR 0378 D2), on that plan. The plan that binds the push is the one it runs after with the highest strict wave, ties to the smaller id as a person reads it (`01-2` before `01-10`). A direct push (that plan shares a path in `files_modified`, `files_deleted` or a task's `files` and is not one of its `depends_on`) names the shared paths, the earlier plan, the tasks of either plan that name them and both strict waves; it co-fires with gsd/W305 on a same-wave collision, and fires alone across declared waves when the earlier plan is itself pushed. A transitive push (the binding plan is one it depends on) names that plan and its strict wave. No exemption: `coupling_justified` covers only non-file coupling | pass | W | W | (new: the strict wave) | | gsd/E307 | `auto_select` (of a `decision` checkpoint that has options, as GSD) and `answer.option` name one of the checkpoint's options, option names are unique, and a checkpoint's `after` names a task of its own plan (pass); each checkpoint kind has its fields: `human_verify` `what_built` and `how_to_verify`, `decision` `decision` and `options`, `human_action` `instructions`, `action` and `verification` (seven `conditional_field_required` rules under one code; `resume_signal` is a required field) | decl + pass | E | E | checkpoint validation (`src/verify.cts:1206-1232`) | | gsd/W308 | a `one_way` task follows a decision checkpoint of its plan (a checkpoint without `after` stands before the first task; tasks are ordered by the number in their name, so an `after` without one, or naming a task of another plan, stands before nothing), or names the decision that already settles it in `reversibility.settled_by`: GSD warns, "never error", and sees no "settled" (the model first made it an error; renamed to a warning for GSD's severity) | pass | W | E | `src/verify.cts:1397-1415` (reversibility), `planner-reversibility.md` | -| gsd/W309 | a plan (a quick plan too) has a truth and an artifact | pass | W | E | must-haves | -| gsd/E310 | every trackable decision of a planned phase's context (a `decision` scoped by the phase with `origin context`: a CONTEXT `D-NN` bullet; discretion items and deferred ideas are not decisions) is cited by its id in the text of one of the phase's plans (ADR 0371 D2): the id as a whole word, case as written (`\bD-NN\b`), in the plan's objective, purpose, output and the fields of its tasks, checkpoints and must-haves, read with the path written before it and resolved from the plan by its scope chain, so a bare `D-01` is the plan's own phase's, another phase's decision is cited by its path (`01/D-01`), and a path that names no decision cites nothing; a `/` after an id (`D-01/D-02`, `REQ-01/D-02`) or after the mark closing one (`(D-01)/D-02`) joins two words and is no path, so the id after it is read bare. Upstream also counts the first six normalised words of the decision's text and matches the id inside any path: SpecForge reads the id alone, with its path (ACCEPTANCE.md `[decision-citation-id-only]`). `settled` plays no part (GSD reads none; it is `gsd/W311`'s input). GSD's `[informational]` and `[folded]` tags are not modelled. One error per uncited decision, on the decision. Judges a phase only once it has a plan | pass | E | E | `gate-decision-coverage-plan`, `src/decisions.cts:70`, `:525-551` | +| gsd/W309 | a plan (a quick plan too) has a truth and an artifact. [Settled later](#settled-later): the edit that writes the plan before its must-haves (quick's mint) reports it | pass | W | E | must-haves | +| gsd/E310 | every trackable decision of a planned phase's context (a `decision` scoped by the phase with `origin context`: a CONTEXT `D-NN` bullet; discretion items and deferred ideas are not decisions) is cited by its id in the text of one of the phase's plans (ADR 0371 D2): the id as a whole word, case as written (`\bD-NN\b`), in the plan's objective, purpose, output and the fields of its tasks, checkpoints and must-haves, read with the path written before it and resolved from the plan by its scope chain, so a bare `D-01` is the plan's own phase's, another phase's decision is cited by its path (`01/D-01`), and a path that names no decision cites nothing; a `/` after an id (`D-01/D-02`, `REQ-01/D-02`) or after the mark closing one (`(D-01)/D-02`) joins two words and is no path, so the id after it is read bare. Upstream also counts the first six normalised words of the decision's text and matches the id inside any path: SpecForge reads the id alone, with its path (ACCEPTANCE.md `[decision-citation-id-only]`). `settled` plays no part (GSD reads none; it is `gsd/W311`'s input). GSD's `[informational]` and `[folded]` tags are not modelled. One error per uncited decision, on the phase, as gsd/E301's (its message names the decision). Judges a phase only once it has a plan. [Settled later](#settled-later): an edit that creates under the phase (some of its plans) and alters none of what it held reports it | pass | E | E | `gate-decision-coverage-plan`, `src/decisions.cts:70`, `:525-551` | | gsd/W311 | the plan achieves its phase goal, keeps to scope and contradicts no settled decision | judged (plan checker) | W | E | D7 and the goal and scope dimensions | | gsd/E312 | no task action reduces scope: the planner's twelve prohibited phrases ("v1", "v2", "simplified version", "static for now", "hardcoded for now", "future enhancement", "placeholder", "basic version", "minimal implementation", "will be wired later", "dynamic in future phase", "skip for now"), case-insensitive and word-bounded (`v10` and `placeholders` do not match; `api v1` does, as the planner forbids it outright; a dotted version such as `v1.0` is not a hit). A hit is exempt only when a decision the task's plan cites (its id anywhere in the plan's text, read as `gsd/E310` reads it, ADR 0371 D3) says the same phrase in its `text`, by the rule of the hit (ADR 0351): upstream's checker cross-references each hit with the decision the plan claims to implement and asks whether the task delivers it or a reduced version; citing a decision that does not say the phrase excuses nothing (upstream's own red flag, "D-26 cost references (v1, static labels)", is ALWAYS BLOCKER). Each hit is excused on its own. One error per task, naming the first phrase not excused. The checker's wider list (stub, hours, too complex) is judgment, `gsd/W311` | pass | E | E | `agents/gsd-planner.md:81-85` (no code matcher exists upstream), D7b | | gsd/W313 | key links are wired between artifacts the plan names | judged (plan checker) | W | E | plan checker (key links) | @@ -143,6 +144,8 @@ The plan checker's dimensions, and the gates `gsd-tools check` runs at `plan:pos own, and the delta of the truth, its plan and its phase, so it names exactly the truths `re_verify --stale-only` lists as stale (a missing, unrecorded or unreadable verdict, which it also lists, is gsd/E501's alone); a file edit is not in the delta, so the files it names come from the truth's judgement at the base and now. +- `gsd/W109` reads a phase's title, which a pass is sent since protocol 2.3.0 (ADR 0387): `phase` and `milestone` + declare no `name`, so the title is a phase's one name and the rule watches the drift two copies once allowed. - A judge that is a prompt, not an agent (`gsd/E202`, `gsd/W203`), is built (r40): `prompt:spec_phase`, a short judging prompt that names the two rules and how to record; r42 ports GSD's spec-phase workflow into the same id. - **Kernel behaviour the rules rely on.** The host's E080 no longer counts a judged rule's finding as an error a write adds (K17, ADR 0297), and pairs an extension's finding by its subject (ADR 0302); a collector's plan is judged for host errors only (ADR 0303). The human-only guarantee holds for every existing entity of a human-only kind and against deleting a person's value (K17, ADR 0298): an agent cannot change an `override` or delete a `milestone_audit` that carries a `debt_accepted`. @@ -172,6 +175,32 @@ is off while the setting is false, whatever the profile; a profile only presets `gsd/W514` is gated the other way (`gates_when_on`, ADR 0305): `workflow.windows_enforce` silences it while it is on, and it is reported while the setting is off. +## Settled later + +A code whose finding a later step of the authoring settles declares `settled_later` (ADR 0385): an edit that creates +the entity the finding names, or an entity under it, and alters nothing the project held there (it sets, unsets, +links, unlinks, deletes and moves nothing at or under that entity) reports the finding and is not refused for it +(E080). Nothing else changes: `check` reports it at its severity, gsd-strict raises it, every gate reads it, and it +stays in the repository, failing `check`, until the step that settles it is written. + +| Code | The finding's entity | What settles it | +|---|---|---| +| gsd/W204 | the open question | the decision that answers it, set as the question's `resolved_by` | +| gsd/E301 | the phase | the plan that holds the requirement | +| gsd/E310 | the phase | the plan that cites the decision | +| gsd/W309 | the plan | its truth and its artifact | + +The table names the write that settles each finding, which clears it. What lets an edit leave the finding is where the +edit writes, not what it creates: any entity it creates at or under the finding's entity (a plan, a task, a research +under a phase) does, so long as the edit alters nothing held there. An edit that deletes the plan holding a +requirement, or sets or unsets a held plan's `requirements`, is refused for the finding it leaves, even when it also +creates a plan under the phase. + +Every other code is counted on the edit that creates its entity. `gsd/E101` is the nearest: the roadmap edit, the step +that settles it, writes a v1 requirement with the phase that holds it, so an edit that leaves one in no phase is +refused. The plan checker's rules (`gsd/W311`, `gsd/W313`, `gsd/W315`, `gsd/W316`) are judged and no added error +already (ADR 0297); `gsd/W317` is a warning in every profile; `gsd/W510`'s validation is written before the plans. + ## Judged rules' inputs Each judged rule's named inputs (K7 D8), and the fields its verdict binds (`V`). Every verdict also digests its `cited` @@ -181,7 +210,7 @@ is neither fresh nor stale. | Rules | Target | Inputs | Binds | |---|---|---|---| -| gsd/W311, W313, W315, W316 (plan check) | plan | `plan` self · `body` self<task\|checkpoint\|truth\|artifact\|key_link\|prohibition\|user_setup.plan · `phase` self.phase · `requirements` self.requirements · `phase_decisions` self.phase<decision.phase · `all_decisions` decision (a superset: the selector grammar cannot filter on an unset `phase`, so any decision change stales the plan check, the safe side, and the checker sees a contradiction with a decision of another phase or of the project) · `context` self.phase<context\|deferred_idea[origin=discussion].phase · `research` self.phase<research.phase · `research_items` self.phase<research.phase<finding\|stack_choice\|pattern\|pitfall\|dont_hand_roll\|open_question.research · `siblings` self.phase<plan.phase · `instructions` file("CLAUDE.md", "AGENTS.md"); judged while the plan is open (`judged_while pending`) | — | +| gsd/W311, W313, W315, W316 (plan check) | plan | `plan` self · `body` self<task\|checkpoint\|truth\|artifact\|key_link\|prohibition\|user_setup.plan · `phase` self.phase · `requirements` self.requirements · `phase_decisions` self.phase<decision.phase · `quick_decisions` self<decision.plan (a quick plan's own) · `project_decisions` decision[origin=project] · `resolved_decisions` self.phase<research.phase<open_question.research.resolved_by (a decision of another phase that answers a question of the phase's research; ADR 0386: every decision of every phase was read before, so a large project's decisions refused the pack and a decision of an unrelated phase staled the check) · `settled_decisions` self<task.plan.reversibility.settled_by (the decisions its tasks name as settling a one-way door, another phase's included; a decision the plan only cites by path in its text is not read) · `context` self.phase<context\|deferred_idea[origin=discussion].phase · `research` self.phase<research.phase · `research_items` self.phase<research.phase<finding\|stack_choice\|pattern\|pitfall\|dont_hand_roll\|open_question.research · `siblings` self.phase<plan.phase · `instructions` file("CLAUDE.md", "AGENTS.md"); judged while the plan is open (`judged_while pending`) | — | | gsd/E501 | truth | `truth` self · `plan` self.plan · `phase` self.plan.phase · `tests` test(self<test.names); judged once its plan is complete (`judged_while complete`) | — | | gsd/E501 | artifact | `artifact` self · `plan` self.plan · `file` file(self.path); judged once its plan is complete (`judged_while complete`) | — | | gsd/E501 | key_link | `link` self · `plan` self.plan · `from` file(self.from) · `to` file(self.to); not judged while `pattern` is set (`unless_set pattern`: a pass searches it). A literal pattern the scan finds (`wired`) verifies the link; a regular expression is `unchecked`, which is neither a pass nor a failure, so the phase stays `pending` until the pattern is literal; judged once its plan is complete (`judged_while complete`) | — | @@ -209,18 +238,20 @@ are not evidence). ## Context routes -What each role reads of the entity it is spawned for (ADR 0356), as `specforge context gsd/<route> <id>` serves it: -the core sections are never cut and a budget below them fails; the enrich sections are served whole in order while the -budget lasts. A route bound to an agent gives the agent's installed body a `## Context` section naming it. The plan +What each role reads of the entity it is spawned for (ADR 0356, ADR 0386), as `specforge context gsd/<route> <id>` +serves it: the core sections are always served whole, whatever they cost; the enrich sections are served whole in order +within the route's allowance, the tokens a read adds beyond the core. Only a cap a read states (`--max-tokens`) below +the core fails (E062). A route of core sections only allows nothing (`—`). A route bound to an agent gives the agent's +installed body a `## Context` section naming it. The plan checker's and the integration checker's sections are their judged rules' inputs, so a pack digests as the verdict's basis. The executor reads no `files_modified`: it edits those files. `phase-context` and `quick-context` are read by no agent; they bound the context a research, a spec or a validation is written against. -| Route | Subject | Agent | Core | Enrich | Budget | +| Route | Subject | Agent | Core | Enrich | Allowance | |---|---|---|---|---|---| | `gsd/executor` | plan | gsd-executor | `plan` self · `body` self<task\|checkpoint\|truth\|artifact\|key_link\|prohibition\|user_setup.plan · `phase` self.phase · `requirements` self.requirements | `context` self.phase<context\|decision[origin=context]\|deferred_idea[origin=discussion].phase · `quick` self<context\|decision[origin=context]\|research.plan · `prior` self.depends_on<summary.plan · `research` self.phase<research.phase<pitfall\|pattern\|dont_hand_roll.research · `project` project · `instructions` file("CLAUDE.md", "AGENTS.md"); settings `workflow.auto_advance`, `workflow.human_verify_mode`, `workflow.tdd_mode`, `git.allow_default_branch_commits` | 6000 | -| `gsd/plan-checker` | plan | gsd-plan-checker | the plan check's inputs (above) | — | 8000 | -| `gsd/integration-checker` | milestone_audit | gsd-integration-checker | gsd/E518's inputs (above) | — | 8000 | +| `gsd/plan-checker` | plan | gsd-plan-checker | the plan check's inputs (above) | — | — | +| `gsd/integration-checker` | milestone_audit | gsd-integration-checker | gsd/E518's inputs (above) | — | — | | `gsd/planner` | phase | gsd-planner | `phase` self · `requirements` self.requirements · `context` self<context\|deferred_idea[origin=discussion].phase · `decisions` self<decision[origin=context].phase | `research` self<research.phase · `research_items` its findings, choices, patterns, pitfalls and questions · `plans` self<plan.phase · `milestone` self.milestone · `gaps` self<verification.phase<verify_gap.verification · `uat_gaps` self<uat_session.phase<uat_test.session<uat_gap.test · `prior` self.depends_on<plan.phase<summary.plan · `project_decisions` decision[origin=project] · `project` · `instructions`; settings `workflow.tdd_mode`, `workflow.human_verify_mode` | 8000 | | `gsd/verifier` | phase | gsd-verifier | `phase` self · `requirements` self.requirements · `must_haves` self<plan.phase<truth\|artifact\|key_link.plan · `plans` self<plan.phase · `summaries` self<plan.phase<summary.plan | `files` file(self<plan.phase.files_modified) · `context` self<context\|decision[origin=context]\|deferred_idea[origin=discussion].phase · `pitfalls` self<research.phase<pitfall.research | 8000 | | `gsd/phase-researcher` | phase | gsd-phase-researcher | `phase` self · `requirements` self.requirements · `context` self<context\|deferred_idea[origin=discussion].phase · `decisions` self<decision[origin=context].phase | `milestone` self.milestone · `siblings` self.milestone<phase.milestone · `project` · `instructions` | 6000 | @@ -229,8 +260,8 @@ no agent; they bound the context a research, a spec or a validation is written a | `gsd/project-researcher` | project | gsd-project-researcher | `project` self · `requirements` requirement · `decisions` decision[origin=project] | `milestones` milestone | 8000 | | `gsd/research-synthesizer` | project | gsd-research-synthesizer | `project` self · `research` research · `research_items` research<finding\|stack_choice\|pattern\|pitfall\|dont_hand_roll\|open_question.research | `requirements` requirement | 8000 | | `gsd/roadmapper` | project | gsd-roadmapper | `project` self · `requirements` requirement · `decisions` decision[origin=project] | `research` research · `research_items` (as the synthesizer's) · `milestones` milestone | 8000 | -| `gsd/phase-context` | phase | — | `context` self<context.phase · `decisions` self<decision[origin=context].phase · `deferred` self<deferred_idea[origin=discussion].phase | — | 50000 | -| `gsd/quick-context` | plan | — | `context` self<context.plan · `decisions` self<decision[origin=context].plan | — | 50000 | +| `gsd/phase-context` | phase | — | `context` self<context.phase · `decisions` self<decision[origin=context].phase · `deferred` self<deferred_idea[origin=discussion].phase | — | — | +| `gsd/quick-context` | plan | — | `context` self<context.plan · `decisions` self<decision[origin=context].plan | — | — | ## Derivations, not rules diff --git a/gsd/core/src/codes.rs b/gsd/core/src/codes.rs index b3143ceffc..5bdc5b2195 100644 --- a/gsd/core/src/codes.rs +++ b/gsd/core/src/codes.rs @@ -43,6 +43,9 @@ pub struct Code { pub severity: Severity, /// The severity under `gsd-strict` and `gsd-plus`; never below `severity`. pub strict: Severity, + /// A later step of the authoring settles the code's finding (ADR 0385): an edit that creates the entity it names, + /// or one under it, reports the finding and is not refused for it. + pub settled_later: bool, } impl Code { @@ -50,9 +53,27 @@ impl Code { let raised = if self.strict == self.severity { String::new() } else { - format!(", and {} under gsd-strict", self.strict.noun()) + format!(", and {} under gsd-strict and gsd-plus", self.strict.noun()) }; - format!("{}. It is {}{raised}.", self.rule, self.severity.noun()) + let settled = if self.settled_later { + " A later step of the authoring settles it: an edit that creates the entity it names, or one under that \ + entity, and alters nothing held there reports the finding and is not refused for it." + } else { + "" + }; + format!( + "{}. It is {}{raised}.{settled}", + self.rule, + self.severity.noun() + ) + } + + /// The code as one a later step of the authoring settles. + const fn settled_later(self) -> Code { + Code { + settled_later: true, + ..self + } } fn docs(&self) -> String { @@ -79,6 +100,7 @@ const fn code( section, severity, strict, + settled_later: false, } } @@ -179,7 +201,8 @@ pub static CODES: &[Code] = &[ "discuss-spec-research", Severity::Warning, Severity::Error, - ), + ) + .settled_later(), code( "W205", "Package without a legitimacy verdict", @@ -203,7 +226,8 @@ pub static CODES: &[Code] = &[ "plan", Severity::Error, Severity::Error, - ), + ) + .settled_later(), code( "E302", "Plan names no requirement", @@ -267,7 +291,8 @@ pub static CODES: &[Code] = &[ "plan", Severity::Warning, Severity::Error, - ), + ) + .settled_later(), code( "E310", "Context decision cited by no plan", @@ -275,7 +300,8 @@ pub static CODES: &[Code] = &[ "plan", Severity::Error, Severity::Error, - ), + ) + .settled_later(), code( "W311", "Plan does not achieve its phase goal", @@ -660,6 +686,14 @@ pub static CODES: &[Code] = &[ Severity::Info, Severity::Info, ), + code( + "W109", + "Phase title embeds a number", + "A phase's title does not begin with a phase number: its label reads the number from its id", + "project-and-roadmap", + Severity::Warning, + Severity::Error, + ), ]; pub fn declare(c: &mut ContributionsBuilder) { @@ -668,6 +702,9 @@ pub fn declare(c: &mut ContributionsBuilder) { d.title(k.title) .explanation(&k.explanation()) .docs(&k.docs()); + if k.settled_later { + d.settled_later(); + } }); } } diff --git a/gsd/core/src/commands/execute.rs b/gsd/core/src/commands/execute.rs index 401a6a3783..ee526d0858 100644 --- a/gsd/core/src/commands/execute.rs +++ b/gsd/core/src/commands/execute.rs @@ -37,7 +37,8 @@ fn head_given<'a>(call: &'a CommandCall<'_>) -> Result<Option<&'a str>, String> /// The route whose pack `start-plan` records on its plan, each call. const EXECUTOR: &str = "gsd/executor"; -/// `start_plan <plan> [--head <sha>] [--max-tokens <n>]`: gated. Records the host's `now` and the commit in the plan's +/// `start_plan <plan> [--head <sha>] [--max-tokens <n>]`: gated (`--max-tokens` caps the recorded pack, which without +/// it holds the plan's core whole, however large the plan). Records the host's `now` and the commit in the plan's /// `plan_start`, each once: a second call answers the first values and leaves them, so re-running the step never makes /// a false duration or a false commit count. A prompt's step opens a plan with no head and the executor names it next, /// so a head comes once whichever call brings it. Every call records the plan's executor pack, so the continuation @@ -237,7 +238,9 @@ pub fn declare(c: &mut ContributionsBuilder) { a.description("the commit it opens at, in full (`specforge git head --pick .sha`); empty on an unborn branch, which has none"); }) .arg("max_tokens", |a| { - a.count().description("the budget of the executor pack it records (default: the route's own)"); + a.count().description( + "a cap on the executor pack it records, refused below its core (default: none, the core whole and the route's allowance)", + ); }) .handler(|call| run(call, start)); }); diff --git a/gsd/core/src/commands/phase.rs b/gsd/core/src/commands/phase.rs index e9cd51633d..e4a69aee06 100644 --- a/gsd/core/src/commands/phase.rs +++ b/gsd/core/src/commands/phase.rs @@ -1,7 +1,8 @@ //! `phase` (D-r41-8): the roadmap's phase CRUD behind `/gsd-phase`. The action is chosen by flag, as upstream's //! `[--insert X|--remove N|--edit N]`: none adds, `--insert` makes a decimal phase, `--remove` deletes a phase and -//! renumbers the later ones in one plan, `--edit` sets fields, `--promote` moves a backlog phase (999.x) into the -//! numbered phases, and `--backlog` adds a phase to the backlog at the first free 999.x number. +//! renumbers the later ones in one plan, `--edit` sets fields (a new name retitles the phase and rewrites its slug), +//! `--promote` moves a backlog phase (999.x) into the numbered phases, and `--backlog` adds a phase to the backlog at +//! the first free 999.x number. //! //! Also ports gsd-core bin/lib modules: phase-estimation.cjs, phase-id-card.cjs, phase-id-display.cjs, phase- //! id.cjs, phase-lifecycle.cjs, phase-locator.cjs, phase-status.cjs. @@ -16,7 +17,7 @@ use std::cmp::Ordering; use serde_json::{Value, json}; use specforge_extension_sdk::prelude::*; -use super::support::{self, answer, fields, given, required, run, text, texts, title}; +use super::support::{self, answer, fields, given, required, run, text, texts}; use crate::branch::slug; const TO_BE_PLANNED: &str = "[To be planned]"; @@ -142,6 +143,33 @@ pub(super) fn target<'a, 'p>(phases: &'p [Phase<'a>], name: &str) -> Result<&'p find(phases, name) } +/// What a phase's name sets, for `--add` and `--edit` alike: its title, the name a person calls it by (ADR 0387), and +/// the slug derived from it, which names the phase's branch (`git.phase_branch_template`'s `{slug}`). +struct Named { + title: String, + slug: Value, +} + +/// Refused, on `--add` as on `--edit`: a name of more than one line (a carriage return as a line feed), and one with no +/// ASCII letter or digit, whose slug, the phase's directory and branch word, would be empty. +fn named(name: &str) -> Result<Named, String> { + let name = name.trim(); + if name.contains(['\n', '\r']) { + return Err("a phase's name is one line: it is the phase's title".into()); + } + let slug = slug(name); + if slug.is_empty() { + return Err(format!( + "a phase's name holds an ASCII letter or digit: '{name}' gives no slug, the word that names the phase's \ + directory and branch" + )); + } + Ok(Named { + title: name.to_string(), + slug: json!(slug), + }) +} + /// Creates the phase `number` after `previous`, in the milestone's own file. fn create( call: &CommandCall<'_>, @@ -154,26 +182,32 @@ fn create( let goal = given(call, "goal")?.unwrap_or(goal_default); let criteria = texts(call, "criteria")?.unwrap_or_else(|| vec![TO_BE_PLANNED.to_string()]); let id = format!("{}/{}", ms.id, number.name()); + let mut held = fields([ + ("milestone", json!(ms.id)), + ("goal", json!(goal)), + ("success_criteria", json!(criteria)), + ("depends_on", previous.map_or(Value::Null, |p| json!([p]))), + ]); + let named = named(name)?; + held.insert("slug".to_string(), named.slug); let mut plan = call.plan(); plan.create( "phase", &number.name(), - &title(name), + &named.title, ms.file.as_deref().unwrap_or_default(), - fields([ - ("milestone", json!(ms.id)), - ("name", json!(name)), - ("slug", json!(slug(name))), - ("goal", json!(goal)), - ("success_criteria", json!(criteria)), - ("depends_on", previous.map_or(Value::Null, |p| json!([p]))), - ]), + held, Vec::new(), ); Ok(answer( call, json!({ "wrote": [id], "phase": number.name() }), - format!("phase {} \"{name}\" added to {}\n", number.name(), ms.id), + format!( + "phase {} \"{}\" added to {}\n", + number.name(), + named.title, + ms.id + ), Some(&plan), )) } @@ -252,8 +286,14 @@ fn edit( let mut plan = call.plan(); let mut set = Vec::new(); if let Some(v) = given(call, "name")? { - plan.set(&phase.node.id, "name", v); - set.push("name"); + // as `create` writes them: a new name retitles the phase and rewrites its slug. A branch already cut under the + // old slug keeps its name: the phase's computed `branch` names the new slug, so the next execute-phase opens + // the branch of the new name and `milestone_branches` lists it, not the old one; `git branch -m` moves the + // work. + let named = named(v)?; + plan.retitle(&phase.node.id, &named.title); + plan.set(&phase.node.id, "slug", named.slug); + set.extend(["title", "slug"]); } if let Some(v) = given(call, "goal")? { plan.set(&phase.node.id, "goal", v); @@ -336,7 +376,7 @@ pub fn declare(c: &mut ContributionsBuilder) { a.flag().description("add the phase to the backlog at the first free 999.x number"); }) .arg("name", |a| { - a.description("the phase's name (required to add or insert)"); + a.description("the phase's name, its title (required to add or insert; editing it retitles the phase)"); }) .arg("goal", |a| { a.description("the phase's goal"); diff --git a/gsd/core/src/commands/reports.rs b/gsd/core/src/commands/reports.rs index e2e631b8e3..131756bad1 100644 --- a/gsd/core/src/commands/reports.rs +++ b/gsd/core/src/commands/reports.rs @@ -24,14 +24,20 @@ pub(crate) fn label(status: &str) -> Option<&'static str> { } /// One phase of the current milestone, as the graph's computed values give it. -struct Phase { +pub(crate) struct Phase { /// The phase's entity id: `v1.0/02`. id: String, - number: String, + /// The last segment of its id: `02`. + pub(crate) number: String, + /// Its slug read as words, as GSD reads its directory's name: `progress json`'s `name`, kept for parity. A person + /// reads the phase by its title (ADR 0387). name: String, - plans: u64, - summaries: u64, - status: &'static str, + /// Its title, its one name (ADR 0387): what a line a person reads prints. + pub(crate) title: String, + pub(crate) plans: u64, + pub(crate) summaries: u64, + /// Its status label: `Pending`, `In Progress`, `Complete`, … + pub(crate) status: &'static str, } impl Phase { @@ -83,6 +89,7 @@ fn phases(graph: &CommandGraph, milestone: Option<&GraphNode>) -> Result<Vec<Pha id: p.id.clone(), number: p.id.rsplit('/').next().unwrap_or_default().to_string(), name: p.text("slug").unwrap_or_default().replace('-', " "), + title: p.title.clone().unwrap_or_default(), summaries: counts.0, plans: counts.1, status, @@ -100,12 +107,19 @@ fn percent(part: u64, whole: u64) -> u64 { } /// What `progress json` answers: the phases with their plans, summaries and status label, and the plan-based percent. -/// `milestone_version` and `milestone_name` are the milestone's (upstream reads them from STATE.md, which a project of -/// this extension has none of). +/// `milestone_version` and `milestone_name` are the milestone's id and title (upstream reads them from STATE.md, which +/// a project of this extension has none of). pub(crate) fn progress(graph: &CommandGraph) -> Result<Value, String> { progress_of(graph, None) } +/// The first phase of the current milestone that is not complete, as [`progress`] reports it; none when every phase is +/// complete or the graph carries no computed values. +pub(crate) fn open_phase(graph: &CommandGraph) -> Option<Phase> { + let (_, found) = reported(graph, None).ok()?; + found.into_iter().find(|p| p.status != "Complete") +} + /// [`progress`] of `phase` alone, from its own milestone (which need not be the current one), when it is given. fn progress_of(graph: &CommandGraph, phase: Option<&str>) -> Result<Value, String> { let (milestone, found) = reported(graph, phase)?; @@ -142,7 +156,7 @@ fn progress_json(milestone: Option<&GraphNode>, found: &[Phase]) -> Value { let summaries: u64 = found.iter().map(|p| p.summaries).sum(); json!({ "milestone_version": milestone.map(|m| m.id.as_str()), - "milestone_name": milestone.and_then(|m| m.text("name")), + "milestone_name": milestone.and_then(|m| m.title.as_deref()), "phases": found.iter().map(|p| json!({ "number": p.number, "name": p.name, "plans": p.plans, "summaries": p.summaries, "status": p.status, })).collect::<Vec<_>>(), @@ -204,7 +218,7 @@ fn progress_report(call: &CommandCall<'_>) -> Result<CommandOutput, String> { for p in &found { human.push_str(&format!( "{:<6} {:<12} {}/{} plans {}\n", - p.number, p.status, p.summaries, p.plans, p.name + p.number, p.status, p.summaries, p.plans, p.title )); human.push_str(&estimate_errors(graph, &p.id)); } @@ -373,26 +387,37 @@ mod tests { fn a_phase_reads_its_computed_values() { let graph = CommandGraph::new( vec![ - node( - "v1.0", - "milestone", - &[("state", "in_progress"), ("name", "One")], - ), - node( - "v1.0/02.1", - "phase", - &[ - ("slug", "a-fix"), - ("status", "planned"), - ("plans_complete", "1/3"), - ], - ), + GraphNode { + title: Some("One".to_string()), + ..node("v1.0", "milestone", &[("state", "in_progress")]) + }, + GraphNode { + title: Some("Saves survive a reload".to_string()), + ..node( + "v1.0/02.1", + "phase", + &[ + ("slug", "a-fix"), + ("status", "planned"), + ("plans_complete", "1/3"), + ], + ) + }, ], Vec::new(), ); let report = progress(&graph).unwrap(); assert_eq!(report["phases"][0]["number"], "02.1"); - assert_eq!(report["phases"][0]["name"], "a fix"); + assert_eq!( + report["phases"][0]["name"], "a fix", + "`progress json`'s name is the slug read as words, GSD's directory name" + ); + let open = open_phase(&graph).unwrap(); + assert_eq!( + (open.number.as_str(), open.title.as_str()), + ("02.1", "Saves survive a reload"), + "a line a person reads names the phase by its title" + ); assert_eq!(report["phases"][0]["status"], "Planned"); assert_eq!( (report["total_plans"].clone(), report["percent"].clone()), diff --git a/gsd/core/src/contexts.rs b/gsd/core/src/contexts.rs index 5f41d20653..0755016a9f 100644 --- a/gsd/core/src/contexts.rs +++ b/gsd/core/src/contexts.rs @@ -1,5 +1,7 @@ -//! The context routes `@gsd/core` declares (ADR 0356): for each role it spawns, what the role reads of the entity it -//! is spawned for, in order, core sections first and never cut, enrich sections served whole while the budget lasts. +//! The context routes `@gsd/core` declares (ADR 0356, ADR 0386): for each role it spawns, what the role reads of the +//! entity it is spawned for, in order: the core sections, always served whole whatever they cost, then the enrich +//! sections, served whole in order within the route's allowance, the tokens a read adds beyond the core. A route of +//! core sections only allows nothing. //! Twelve are bound to their agent, whose installed body gains a `## Context` section naming the route; two, //! `phase-context` and `quick-context`, are read by no agent: they bound the context a research, a spec or a //! validation is written against (`spec/rules.md`, "Context routes"): a research, a spec or a validation records the @@ -87,19 +89,20 @@ const STALE: &[(&str, &str)] = &[ /// A route's sections, each `(name, selector, core)`. type Sections<'a> = &'a [(&'a str, &'a str, bool)]; -/// Declare `name` over `subject`, bound to `agent` when it names one, at `budget`, with `sections` in order, then what -/// `more` adds (its settings); its [`RECORDS`] and stale code when it records. +/// Declare `name` over `subject`, bound to `agent` when it names one, allowing `allowance` tokens of enrich sections +/// beyond its core (0 for a route of core sections only), with `sections` in order, then what `more` adds (its +/// settings); its [`RECORDS`] and stale code when it records. fn route( c: &mut ContributionsBuilder, name: &str, subject: &str, agent: Option<&str>, - budget: u32, + allowance: u32, sections: Sections<'_>, more: impl FnOnce(&mut ContextBuilder), ) { c.context(name, |r| { - r.subject(subject).budget(budget); + r.subject(subject).budget(allowance); if let Some(agent) = agent { r.agent(agent); } @@ -195,7 +198,7 @@ pub(crate) fn declare(c: &mut ContributionsBuilder) { "plan-checker", "plan", Some("gsd-plan-checker"), - 8000, + 0, &core(PLAN_CHECK_INPUTS), |_| {}, ); @@ -204,7 +207,7 @@ pub(crate) fn declare(c: &mut ContributionsBuilder) { "integration-checker", "milestone_audit", Some("gsd-integration-checker"), - 8000, + 0, &core(INTEGRATION_INPUTS), |_| {}, ); @@ -363,7 +366,7 @@ pub(crate) fn declare(c: &mut ContributionsBuilder) { "phase-context", "phase", None, - 50000, + 0, &[ ("context", "self<context.phase", true), ("decisions", "self<decision[origin=context].phase", true), @@ -380,7 +383,7 @@ pub(crate) fn declare(c: &mut ContributionsBuilder) { "quick-context", "plan", None, - 50000, + 0, &[ ("context", "self<context.plan", true), ("decisions", "self<decision[origin=context].plan", true), diff --git a/gsd/core/src/hooks/community.rs b/gsd/core/src/hooks/community.rs index 73af2d8c65..111e7e7f27 100644 --- a/gsd/core/src/hooks/community.rs +++ b/gsd/core/src/hooks/community.rs @@ -201,17 +201,10 @@ fn progress_line(graph: &CommandGraph) -> Option<String> { if let Some(p) = seg.percent { line.push_str(&format!(" ({p}%)")); } - if let Ok(report) = reports::progress(graph) - && let Some(open) = report["phases"] - .as_array() - .and_then(|ps| ps.iter().find(|p| p["status"] != "Complete")) - { + if let Some(open) = reports::open_phase(graph) { line.push_str(&format!( "; phase {} {}: {} plan(s), {} summary(ies)", - open["number"].as_str().unwrap_or_default(), - open["name"].as_str().unwrap_or_default(), - open["plans"], - open["summaries"] + open.number, open.title, open.plans, open.summaries )); } Some(line) diff --git a/gsd/core/src/hooks/community/tests.rs b/gsd/core/src/hooks/community/tests.rs index b1844191b4..743ee8bbb5 100644 --- a/gsd/core/src/hooks/community/tests.rs +++ b/gsd/core/src/hooks/community/tests.rs @@ -361,17 +361,17 @@ fn node(id: &str, kind: &str, fields: &[(&str, serde_json::Value)]) -> GraphNode fn project_graph(extra: Vec<GraphNode>) -> CommandGraph { let mut nodes = vec![ node("taskboard", "project", &[]), - node( - "v1.0", - "milestone", - &[ - ("name", json!("Taskboard")), - ( + GraphNode { + title: Some("Taskboard".into()), + ..node( + "v1.0", + "milestone", + &[( "progress", json!({"phases": 4, "phases_complete": 1, "plans": 3, "plans_complete": 1, "percent": 25}), - ), - ], - ), + )], + ) + }, node( "v1.0/01", "phase", @@ -381,15 +381,18 @@ fn project_graph(extra: Vec<GraphNode>) -> CommandGraph { ("plans_complete", json!("1/1")), ], ), - node( - "v1.0/02", - "phase", - &[ - ("slug", json!("persistence")), - ("status", json!("planned")), - ("plans_complete", json!("0/1")), - ], - ), + GraphNode { + title: Some("Saved tasks".into()), + ..node( + "v1.0/02", + "phase", + &[ + ("slug", json!("persistence")), + ("status", json!("planned")), + ("plans_complete", json!("0/1")), + ], + ) + }, ]; nodes.extend(extra); CommandGraph::new(nodes, Vec::new()) @@ -416,7 +419,10 @@ fn a_session_starts_with_the_progress_line() { ctx.starts_with("## Project State Reminder\n\nv1.0 Taskboard: 1/4 phases complete (25%)"), "{ctx}" ); - assert!(ctx.contains("phase 02 persistence"), "{ctx}"); + assert!( + ctx.contains("phase 02 Saved tasks: 1 plan(s), 0 summary(ies)"), + "the phase is named by its title, not its slug: {ctx}" + ); assert!(ctx.contains("Active workstream: ui"), "{ctx}"); assert!(ctx.ends_with("Config: \"mode\": \"yolo\""), "{ctx}"); assert!( diff --git a/gsd/core/src/hooks/statusline.rs b/gsd/core/src/hooks/statusline.rs index 0862d14b96..b688cc2c41 100644 --- a/gsd/core/src/hooks/statusline.rs +++ b/gsd/core/src/hooks/statusline.rs @@ -53,7 +53,7 @@ pub(super) fn state_of(graph: &CommandGraph) -> StateSeg { let mut seg = StateSeg::default(); if let Some(m) = reports::current(graph) { seg.milestone = m.id.clone(); - seg.milestone_name = m.text("name").unwrap_or_default().to_string(); + seg.milestone_name = m.title.clone().unwrap_or_default(); if let Some(p) = m.fields.get("progress") { seg.percent = count(p, "percent"); seg.completed_phases = count(p, "phases_complete"); @@ -65,13 +65,9 @@ pub(super) fn state_of(graph: &CommandGraph) -> StateSeg { seg.phase_total = seg.total_phases.map(|n| n.to_string()).unwrap_or_default(); } } - if let Ok(report) = reports::progress(graph) - && let Some(open) = report["phases"] - .as_array() - .and_then(|ps| ps.iter().find(|p| p["status"] != "Complete")) - { - seg.phase_name = open["name"].as_str().unwrap_or_default().to_string(); - seg.status = status_word(open["status"].as_str().unwrap_or_default()).into(); + if let Some(open) = reports::open_phase(graph) { + seg.phase_name = open.title; + seg.status = status_word(open.status).into(); } if seg.milestone.is_empty() { seg.phase_num.clear(); diff --git a/gsd/core/src/hooks/statusline/tests/graph.rs b/gsd/core/src/hooks/statusline/tests/graph.rs index 7a2a065292..7dd2620798 100644 --- a/gsd/core/src/hooks/statusline/tests/graph.rs +++ b/gsd/core/src/hooks/statusline/tests/graph.rs @@ -11,20 +11,26 @@ fn graph(done: usize, plans: &[(&str, &str)]) -> CommandGraph { let mut nodes = vec![GraphNode { id: "v1.0".into(), kind: "milestone".into(), + title: Some("Taskboard".into()), fields: [ ("state".to_string(), json!("in_progress")), - ("name".to_string(), json!("Taskboard")), ("progress".to_string(), json!({"phases": 4, "phases_complete": done, "plans": 3, "plans_complete": 2, "percent": done * 25})), ] .into(), ..GraphNode::default() }]; - let names = ["scaffold", "persistence", "views", "polish"]; - for (i, name) in names.iter().enumerate() { + let names = [ + ("scaffold", "Scaffold"), + ("persistence", "Saved tasks"), + ("views", "Board views"), + ("polish", "Polish"), + ]; + for (i, (name, title)) in names.iter().enumerate() { let (status, counts) = plans.get(i).copied().unwrap_or(("not_started", "0/0")); nodes.push(GraphNode { id: format!("v1.0/0{}", i + 1), kind: "phase".into(), + title: Some((*title).into()), fields: [ ("slug".to_string(), json!(name)), ( @@ -56,11 +62,11 @@ fn the_state_segment_reads_the_graph() { s.phase_num.as_str(), s.phase_total.as_str() ), - ("v1.0", "persistence", "executing", Some(25.0), "1", "4") + ("v1.0", "Saved tasks", "executing", Some(25.0), "1", "4") ); assert_eq!( format_full(&s), - "v1.0 Taskboard [██░░░░░░░░] 25% · executing · persistence (1/4)" + "v1.0 Taskboard [██░░░░░░░░] 25% · executing · Saved tasks (1/4)" ); assert_eq!(format_compact(&s), "v1.0 · P1/4 · executing"); // every phase complete: the milestone is done and no phase is named @@ -90,7 +96,7 @@ fn the_line_names_the_workstream_and_the_last_command() { let mut o = opts("end", false, false); let out = plain(&statusline(&f, &o).statusline.expect("a line")); assert!( - out.contains("persistence (1/4) · ws billing") && !out.contains("last:"), + out.contains("Saved tasks (1/4) · ws billing") && !out.contains("last:"), "{out}" ); o.last_command = true; diff --git a/gsd/core/src/judged.rs b/gsd/core/src/judged.rs index ce34cd1d10..70dd473116 100644 --- a/gsd/core/src/judged.rs +++ b/gsd/core/src/judged.rs @@ -10,7 +10,9 @@ use gsd_kit::judged::{Judged, Owed, Target}; use crate::codes::{CODES, Severity}; -/// What the plan checks read of a plan; the `gsd/plan-checker` route serves the same sections. +/// What the plan checks read of a plan; the `gsd/plan-checker` route serves the same sections. Of the decisions: its +/// phase's, a quick plan's own, the project's, those that resolve a question of its phase's research, and those a task +/// of the plan names as settling its one-way door, never every decision of every phase. pub(crate) const PLAN_CHECK_INPUTS: &[(&str, &str)] = &[ ("plan", "self"), ( @@ -20,7 +22,16 @@ pub(crate) const PLAN_CHECK_INPUTS: &[(&str, &str)] = &[ ("phase", "self.phase"), ("requirements", "self.requirements"), ("phase_decisions", "self.phase<decision.phase"), - ("all_decisions", "decision"), + ("quick_decisions", "self<decision.plan"), + ("project_decisions", "decision[origin=project]"), + ( + "resolved_decisions", + "self.phase<research.phase<open_question.research.resolved_by", + ), + ( + "settled_decisions", + "self<task.plan.reversibility.settled_by", + ), ( "context", "self.phase<context|deferred_idea[origin=discussion].phase", diff --git a/gsd/core/src/kinds/roadmap.rs b/gsd/core/src/kinds/roadmap.rs index 97abdd2551..59b218b175 100644 --- a/gsd/core/src/kinds/roadmap.rs +++ b/gsd/core/src/kinds/roadmap.rs @@ -21,12 +21,12 @@ const PROGRESS: &[Field] = &[ ]; const MILESTONE_STATE: &[&str] = &["planned", "in_progress", "shipped", "abandoned"]; -/// A milestone section of `ROADMAP.md`, named `v1.0` and scoped by its workstream when it has one. +/// A milestone section of `ROADMAP.md`, named `v1.0` and scoped by its workstream when it has one. Its title is its +/// name (`MVP`): it declares no field for it (ADR 0387). pub const MILESTONE: Kind = Kind::new( "milestone", "A milestone: a shippable version of the project (GSD ROADMAP.md, MILESTONES.md)", &[ - str("name").r().doc("MVP"), str("delivered").doc("Delivered"), strs("accomplishments").doc("Key accomplishments"), str("whats_next").doc("What's next"), @@ -76,7 +76,8 @@ const PHASE_STATUS: &[&str] = &[ "deferred", ]; -/// `### Phase N: Name`, named `03`, `03.1` (inserted) or `999.1` (backlog), scoped by its milestone. +/// `### Phase N: Name`, named `03`, `03.1` (inserted) or `999.1` (backlog), scoped by its milestone. `Name` is its +/// title and `N` its name: its label is `Phase {name}: {title}`, so it declares no field for either (ADR 0387). pub const PHASE: Kind = Kind::new( "phase", "A phase of a milestone, named 03, 03.1 (inserted) or 999.1 (backlog) (GSD ROADMAP.md)", @@ -85,7 +86,6 @@ pub const PHASE: Kind = Kind::new( .r() .i() .doc("the section it sits in"), - str("name").r().doc("heading text"), str("slug").r().doc("directory NN-slug"), str("goal").r().doc("Goal"), rfs("depends_on", "phase").doc("Depends on"), diff --git a/gsd/core/src/passes/citations.rs b/gsd/core/src/passes/citations.rs index 21d2a75aa5..cc3c15b7f3 100644 --- a/gsd/core/src/passes/citations.rs +++ b/gsd/core/src/passes/citations.rs @@ -35,7 +35,7 @@ pub fn decisions(input: &PassInput) -> BTreeSet<&str> { /// `src/decision-coverage-support.cts`), which are `<objective>`, the tasks and the must-haves. Here the plan's /// `objective`, `purpose` and `output`, then every field of its tasks, checkpoints, truths, artifacts, key links and /// prohibitions, joined by a line break. Not its context references, its verification or its success criteria, and no -/// title (the pass input carries none). Fenced code and HTML comments are not stripped. +/// title (upstream's sections hold none). Fenced code and HTML comments are not stripped. pub fn plan_text(input: &PassInput, plan: &PassEntity) -> String { let mut parts: Vec<String> = ["objective", "purpose", "output"] .iter() diff --git a/gsd/core/src/passes/cross_plan.rs b/gsd/core/src/passes/cross_plan.rs index 154f4f54a1..ccbbbbf3fb 100644 --- a/gsd/core/src/passes/cross_plan.rs +++ b/gsd/core/src/passes/cross_plan.rs @@ -66,7 +66,8 @@ fn uncovered_requirements( /// E310: every trackable decision of the phase's context, a `decision` with `origin context`, is cited by its id in the /// text of one of its plans (`citations::cited_by`): a bare id resolves in the plan's own phase, so another phase's /// decision is cited by its path (`01/D-01`) and a paraphrase cites nothing. `settled` plays no part; discretion items -/// are not decisions. +/// are not decisions. The finding is on the phase, as E301's is: it judges the phase's plans together, and a plan the +/// write creates under the phase is the step that settles it (ADR 0385). fn uncited_decisions( input: &PassInput, phase: &PassEntity, @@ -90,7 +91,7 @@ fn uncited_decisions( name_of(&decision.id), name_of(&decision.id) )) - .with_entity(&decision.id) + .with_entity(&phase.id) }) .collect() } diff --git a/gsd/core/src/passes/cross_plan/tests.rs b/gsd/core/src/passes/cross_plan/tests.rs index 76a3e4c461..41e9f1dd28 100644 --- a/gsd/core/src/passes/cross_plan/tests.rs +++ b/gsd/core/src/passes/cross_plan/tests.rs @@ -84,9 +84,9 @@ fn decision_input(text: &str, objective: &str, task_action: &str) -> PassInput { } #[test] -fn an_uncited_context_decision_is_e310_on_the_decision() { +fn an_uncited_context_decision_is_e310_on_the_phase() { let found = check(&decision_input("Log every retry", "Build it", "Write it")); - assert_eq!(codes_of(&found), [("E310", Some("v/1/D-03"))]); + assert_eq!(codes_of(&found), [("E310", Some("v/1"))]); assert_eq!( found[0].message, "decision 'v/1/D-03' is cited by no plan of phase 'v/1'" @@ -111,14 +111,14 @@ fn a_decision_is_covered_by_its_id_in_a_plans_text() { ] { assert_eq!( codes_of(&check(&decision_input(text, objective, action))), - [("E310", Some("v/1/D-03"))], + [("E310", Some("v/1"))], "{objective} / {action}" ); } // The project's namesake, cited by its rooted path, covers nothing of the phase. assert_eq!( codes_of(&check(&decision_input(text, "Honour /D-03", "Write it"))), - [("E310", Some("v/1/D-03"))] + [("E310", Some("v/1"))] ); } @@ -153,7 +153,7 @@ fn phase_two_citing_01_d_01_leaves_its_own_d_01_uncited() { ], ..Default::default() }; - assert_eq!(codes_of(&check(&input)), [("E310", Some("v1.0/02/D-01"))]); + assert_eq!(codes_of(&check(&input)), [("E310", Some("v1.0/02"))]); assert!( check(&input)[0] .suggestion @@ -300,7 +300,7 @@ fn every_context_decision_is_counted_with_no_supersession() { }; assert_eq!( codes_of(&check(&input)), - [("E310", Some("v/1/D-03"))], + [("E310", Some("v/1"))], "{origin}, settled {settled}" ); } diff --git a/gsd/core/src/passes/derive/branch.rs b/gsd/core/src/passes/derive/branch.rs index afe79c59a6..31064561fd 100644 --- a/gsd/core/src/passes/derive/branch.rs +++ b/gsd/core/src/passes/derive/branch.rs @@ -31,11 +31,16 @@ fn checked(template: &str, key: (&str, &str), slug: &str) -> Result<String, Stri } } -/// The phase strategy's name of `phase`: its local name and its slug, else the slug of its name. +/// An entity's title, the name a person calls it by (ADR 0387); empty when it has none. +fn title(entity: &PassEntity) -> &str { + entity.title.as_deref().unwrap_or_default() +} + +/// The phase strategy's name of `phase`: its local name and its slug, else the slug of its title. fn phase_branch(naming: &Naming<'_>, phase: &PassEntity) -> Result<String, String> { let slugged = text(phase, "slug") .map(str::to_string) - .unwrap_or_else(|| slug(text(phase, "name").unwrap_or_default())); + .unwrap_or_else(|| slug(title(phase))); checked(naming.phase, ("phase", name_of(&phase.id)), &slugged) } @@ -43,7 +48,7 @@ fn milestone_branch(naming: &Naming<'_>, milestone: &PassEntity) -> Result<Strin checked( naming.milestone, ("milestone", name_of(&milestone.id)), - &slug(text(milestone, "name").unwrap_or_default()), + &slug(title(milestone)), ) } @@ -95,7 +100,7 @@ fn refusals(input: &PassInput, naming: &Naming<'_>) -> Vec<PassDiagnostic> { format!("'{id}' has no branch: {why}"), ) .with_suggestion( - "change its name or slug, or git.phase_branch_template or git.milestone_branch_template", + "change its title or slug, or git.phase_branch_template or git.milestone_branch_template", ) .with_entity(&id), ) @@ -137,10 +142,11 @@ mod tests { milestone: "gsd/{milestone}-{slug}", }; - fn entity(id: &str, kind: &str, fields: &[(&str, &str)]) -> PassEntity { + fn entity(id: &str, kind: &str, title: &str, fields: &[(&str, &str)]) -> PassEntity { PassEntity { id: id.into(), kind: kind.into(), + title: Some(title.into()), fields: fields .iter() .map(|(k, v)| (k.to_string(), v.to_string())) @@ -152,14 +158,10 @@ mod tests { fn input() -> PassInput { PassInput { entities: vec![ - entity("v1.0", "milestone", &[("name", "Task Board!")]), - entity( - "v1.0/01", - "phase", - &[("name", "Core"), ("slug", "core-tasks")], - ), - entity("v1.0/02", "phase", &[("name", "User Auth & Login")]), - entity("v1.0/999.1", "phase", &[("name", "Later")]), + entity("v1.0", "milestone", "Task Board!", &[]), + entity("v1.0/01", "phase", "Core", &[("slug", "core-tasks")]), + entity("v1.0/02", "phase", "User Auth & Login", &[]), + entity("v1.0/999.1", "phase", "Later", &[]), ], edges: ["v1.0/01", "v1.0/02", "v1.0/999.1"] .iter() @@ -218,7 +220,7 @@ mod tests { #[test] fn an_empty_slug_names_no_branch() { let empty = PassInput { - entities: vec![entity("v1.0/01", "phase", &[("name", "!!!")])], + entities: vec![entity("v1.0/01", "phase", "!!!", &[])], ..Default::default() }; assert!(named(&empty, &NAMING).is_empty()); @@ -237,7 +239,7 @@ mod tests { fn a_long_title_shortens() { let title = "word ".repeat(80); let long = PassInput { - entities: vec![entity("v1.0/01", "phase", &[("name", title.as_str())])], + entities: vec![entity("v1.0/01", "phase", &title, &[])], ..Default::default() }; let named = pairs(named(&long, &NAMING)); @@ -254,7 +256,7 @@ mod tests { assert!(named(&input(), &naming).is_empty(), "{strategy:?}"); } let backlog = PassInput { - entities: vec![entity("v1.0/999.1", "phase", &[("name", "Later")])], + entities: vec![entity("v1.0/999.1", "phase", "Later", &[])], ..Default::default() }; assert!(named(&backlog, &NAMING).is_empty()); diff --git a/gsd/core/src/passes/plans.rs b/gsd/core/src/passes/plans.rs index d3338d54a1..8f3632df38 100644 --- a/gsd/core/src/passes/plans.rs +++ b/gsd/core/src/passes/plans.rs @@ -205,7 +205,7 @@ fn walk<'a, V>(value: &'a V, shape: &impl Fn(&'a V) -> Shape<'a, V>, out: &mut V } /// Every string an entity writes, field by field: the structured value of a list or block (its strings, recursively) -/// when the host sends one, the field text otherwise. The pass input carries no title, so a title is not here. +/// when the host sends one, the field text otherwise. An entity's title is no field, so it is not here. pub fn texts(entity: &PassEntity) -> Vec<String> { let mut out = Vec::new(); for (name, text) in &entity.fields { diff --git a/gsd/core/src/passes/roadmap.rs b/gsd/core/src/passes/roadmap.rs index 6bcaa60b69..8c12e87356 100644 --- a/gsd/core/src/passes/roadmap.rs +++ b/gsd/core/src/passes/roadmap.rs @@ -1,6 +1,6 @@ -//! The roadmap pass: `gsd/E101`, `gsd/E102`, `gsd/W103`, `gsd/W104`, `gsd/E108` and `gsd/E206` over the project, -//! requirements, phases and their references. Pure functions over the pass input; the plan half of E102 is `plans` -//! and E106 is a gate guard (r39). +//! The roadmap pass: `gsd/E101`, `gsd/E102`, `gsd/W103`, `gsd/W104`, `gsd/E108`, `gsd/W109` and `gsd/E206` over the +//! project, requirements, phases and their references. Pure functions over the pass input; the plan half of E102 is +//! `plans` and E106 is a gate guard. //! //! Also ports gsd-core bin/lib modules: gap-checker.cjs, roadmap-parser.cjs, roadmap-upgrade.cjs. //! @@ -10,6 +10,7 @@ mod criteria; pub(crate) mod numbering; mod one_per_phase; mod plans; +mod titles; use std::collections::{BTreeMap, BTreeSet}; @@ -29,6 +30,7 @@ fn check(input: &PassInput) -> Vec<PassDiagnostic> { found.extend(dependencies(input)); found.extend(criteria::check(input)); found.extend(numbering::check(input)); + found.extend(titles::check(input)); found.extend(one_per_phase::check(input)); found.extend(plans::check(input)); found diff --git a/gsd/core/src/passes/roadmap/tests.rs b/gsd/core/src/passes/roadmap/tests.rs index 866a35cf45..fae80061d1 100644 --- a/gsd/core/src/passes/roadmap/tests.rs +++ b/gsd/core/src/passes/roadmap/tests.rs @@ -611,3 +611,96 @@ fn a_workstream_sharing_a_requirements_id_hides_no_phase_of_it() { assert!(found.is_empty(), "workstream after: {after}: {found:?}"); } } + +fn titled(id: &str, title: &str) -> PassEntity { + PassEntity { + title: Some(title.into()), + ..phase(id) + } +} + +#[test] +fn a_title_that_begins_with_a_phase_number_is_w109() { + for (title, number, rest) in [ + ("Phase 12: Graph Protocol", "Phase 12", "Graph Protocol"), + ("phase 03.1 - Hotfix", "phase 03.1", "Hotfix"), + ("PHASE 12A: Split", "PHASE 12A", "Split"), + ("Phase 4", "Phase 4", ""), + ("03: Core", "03", "Core"), + ("3. Core", "3", "Core"), + ("1.5: Hotfix", "1.5", "Hotfix"), + ("2) Core", "2", "Core"), + ("04 - Core", "04", "Core"), + ("04 — Core", "04", "Core"), + ("Phase 2.1: Hotfix", "Phase 2.1", "Hotfix"), + ("Phase 3 - Listing", "Phase 3", "Listing"), + ("Phase 3:Core", "Phase 3", "Core"), + ("Phase 07", "Phase 07", ""), + ] { + assert_eq!(titles::numbered(title), Some((number, rest)), "{title}"); + } + let found = check(&input( + vec![ + titled("v1.0/01", "Phase 1: Core"), + titled("v1.0/999.1", "3. Later"), + ], + vec![], + )); + assert_eq!( + codes(&found), + [("W109", "v1.0/01"), ("W109", "v1.0/999.1")], + "a backlog phase prints the same label" + ); + assert!( + found[0] + .message + .contains("begins with the phase number 'Phase 1'"), + "{found:?}" + ); + assert_eq!( + found[0].suggestion.as_deref(), + Some("retitle it 'Core': its label then reads 'Phase 01: Core'") + ); +} + +#[test] +fn a_number_inside_a_title_is_not_w109() { + for title in [ + "Core", + "HTTP 2 support", + "2FA login", + "3D view", + "v2.0 migration", + "2.0 migration", + "10 things to ship", + "3:00 standup notes", + "Phases of the release", + "Phase one", + "Phase 3a rollout", + ] { + assert_eq!(titles::numbered(title), None, "{title}"); + } + let found = check(&input(vec![titled("v1.0/01", "HTTP 2 support")], vec![])); + assert!(found.is_empty(), "{found:?}"); +} + +/// The rule reads GSD's label grammar and no wider (ADR 0387 D3): a number joined to a word by a dash or a colon with +/// no space, a number before a bare word, and another word than `Phase` before a number are titles, not labels. +#[test] +fn a_form_outside_the_label_grammar_is_not_w109() { + for title in [ + "03-Core", + "3-way merge", + "Phase-3 cleanup", + "03:Core", + "3.Core", + "3 Core", + "#3 Core", + "(3) Core", + "Step 3: Core", + "Milestone 2: Core", + "1.5.2 release notes", + ] { + assert_eq!(titles::numbered(title), None, "{title}"); + } +} diff --git a/gsd/core/src/passes/roadmap/titles.rs b/gsd/core/src/passes/roadmap/titles.rs new file mode 100644 index 0000000000..c39b3810f5 --- /dev/null +++ b/gsd/core/src/passes/roadmap/titles.rs @@ -0,0 +1,101 @@ +//! W109: a phase's title does not begin with a phase number. A phase is labelled `Phase {its id's last segment}: +//! {title}` (ADR 0387), so a title that carries a number of its own prints a second one, and a renumber (`phase +//! --remove` renames the later ids, never their titles) makes the two disagree. Every phase is read, a `999.x` backlog +//! phase too: it prints the same label. + +use specforge_extension_sdk::prelude::*; + +use super::of_kind; + +pub fn check(input: &PassInput) -> Vec<PassDiagnostic> { + of_kind(input, "phase") + .filter_map(|phase| { + let title = phase.title.as_deref()?; + let (number, rest) = numbered(title)?; + let own = phase.id.rsplit('/').next().unwrap_or_default(); + let suggestion = if rest.is_empty() { + format!("title it by what it delivers: its label reads 'Phase {own}: <title>'") + } else { + format!("retitle it '{rest}': its label then reads 'Phase {own}: {rest}'") + }; + Some( + PassDiagnostic::new( + "W109", + PassSeverity::Warning, + format!( + "phase '{}' is titled '{title}', which begins with the phase number '{number}': its label \ + reads its number from its id", + phase.id + ), + ) + .with_suggestion(suggestion) + .with_entity(&phase.id), + ) + }) + .collect() +} + +/// The phase number `title` begins with and what follows it, separators dropped, when it begins with one: `Phase` +/// (any case) and a number in GSD's grammar (`\d+[A-Z]?(\.\d+)*`), then no letter or digit; or a bare number of +/// digits and dots, then `:` or `.` before a space or the end, `)`, or a dash between spaces (`03: Core`, `3. Core`, +/// `2) Core`, `04 - Core`). A number inside the title (`HTTP 2 support`, `2FA login`, `v2.0 migration`) is none. +pub(super) fn numbered(title: &str) -> Option<(&str, &str)> { + let text = title.trim_start(); + let end = match text.get(..5) { + Some(word) if word.eq_ignore_ascii_case("phase") => worded(&text[5..]).map(|n| 5 + n)?, + _ => bare(text)?, + }; + let rest = text[end..].trim_start_matches(|c: char| { + c.is_whitespace() || matches!(c, ':' | '.' | ')' | '-' | '–' | '—') + }); + Some((text[..end].trim_end(), rest.trim_end())) +} + +/// The length of `rest` up to the end of the number after `Phase`: spaces, then a number in GSD's grammar, not +/// followed by a letter or a digit. +fn worded(rest: &str) -> Option<usize> { + let spaces = rest.len() - rest.trim_start().len(); + let number = grammar(&rest[spaces..], true)?; + let end = spaces + number; + match rest[end..].chars().next() { + Some(c) if c.is_alphanumeric() => None, + _ => Some(end), + } +} + +/// The length of a bare number at the start of `text` when a label's separator follows it. +fn bare(text: &str) -> Option<usize> { + let end = grammar(text, false)?; + let after = &text[end..]; + let spaced = |tail: &str| tail.is_empty() || tail.starts_with(char::is_whitespace); + let separated = match after.chars().next()? { + ':' | '.' => spaced(&after[1..]), + ')' => true, + c if c.is_whitespace() => { + let dash = after.trim_start(); + dash.starts_with(['-', '–', '—']) && spaced(&dash[dash.chars().next()?.len_utf8()..]) + } + _ => false, + }; + separated.then_some(end) +} + +/// The length of the number at the start of `text`: digits, an optional capital letter when `lettered`, then any +/// `.digits`. +fn grammar(text: &str, lettered: bool) -> Option<usize> { + let digits = |s: &str| s.len() - s.trim_start_matches(|c: char| c.is_ascii_digit()).len(); + let mut end = digits(text); + if end == 0 { + return None; + } + if lettered && text[end..].starts_with(|c: char| c.is_ascii_uppercase()) { + end += 1; + } + while let Some(tail) = text[end..].strip_prefix('.') { + match digits(tail) { + 0 => break, + n => end += 1 + n, + } + } + Some(end) +} diff --git a/gsd/core/src/prompts/configure.rs b/gsd/core/src/prompts/configure.rs index 887a5448db..70b8a5d910 100644 --- a/gsd/core/src/prompts/configure.rs +++ b/gsd/core/src/prompts/configure.rs @@ -18,8 +18,8 @@ fn writes(call: &PromptCall<'_>) -> String { `specforge settings set @gsd/ui workflow.ui_phase false`.\n\ - A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment \ variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.\n\ - - `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is \ - committed like code. Skip their questions.\n", + - `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like \ + code.\n", ); if let Some(profile) = call.str("profile") { text.push_str(&format!( diff --git a/gsd/core/src/prompts/execute.rs b/gsd/core/src/prompts/execute.rs index 301fcd0863..a5633ee840 100644 --- a/gsd/core/src/prompts/execute.rs +++ b/gsd/core/src/prompts/execute.rs @@ -113,7 +113,11 @@ static EXECUTE_PHASE: Spec = Spec { command: "execute-phase", args: PHASE_ARGS, subject: Some("phase"), - gates: &["W311", "W313", "W315", "W318", "E516"], + // A half-planned phase is not executed: its coverage and its plans' must-haves are settled later (ADR 0385), so + // the plan writes report them and this gate reads them. + gates: &[ + "E301", "W309", "E310", "W311", "W313", "W315", "W318", "E516", + ], steps: PHASE_STEPS, slash: Some(Slash { hint: "<phase> [--wave N] [--gaps-only] [--interactive] [--tdd]", diff --git a/gsd/core/tests/cli/assets_shell/answers.rs b/gsd/core/tests/cli/assets_shell/answers.rs index 7205a88e41..3c188440da 100644 --- a/gsd/core/tests/cli/assets_shell/answers.rs +++ b/gsd/core/tests/cli/assets_shell/answers.rs @@ -628,8 +628,8 @@ fn a_phases_counts_are_read_by_its_own_id() { let p = taskboard(); p.write( "spec/v2.0.spec", - "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\n\ - phase 01 \"Sync\" {\n milestone v2.0\n name \"Sync\"\n slug \"sync\"\n goal \"Tasks sync\"\n}\n\n\ + "milestone v2.0 \"Taskboard 2.0\" {\n}\n\n\ + phase 01 \"Sync\" {\n milestone v2.0\n slug \"sync\"\n goal \"Tasks sync\"\n}\n\n\ plan 01-01 \"Sync model\" {\n phase v2.0/01\n type execute\n objective \"Sync\"\n}\n\n\ plan 01-02 \"Sync command\" {\n phase v2.0/01\n type execute\n objective \"Sync\"\n}\n", ); diff --git a/gsd/core/tests/cli/assets_shell/commits.rs b/gsd/core/tests/cli/assets_shell/commits.rs index bda02dd798..82831f4758 100644 --- a/gsd/core/tests/cli/assets_shell/commits.rs +++ b/gsd/core/tests/cli/assets_shell/commits.rs @@ -6,7 +6,7 @@ use crate::harness::Project; const AT: &str = "2026-10-29T09:00:00Z"; -/// The single-repo commit block of `gsd-executor.md`, with its placeholders filled, run under bash with nothing but +/// The task commit block of `gsd-executor.md`, with its placeholders filled, run under bash with nothing but /// `specforge` on `PATH` (ADR 0343); the gsd-git collector then records the commit against `01-01`'s task `T1`. #[test] fn the_executors_task_commit_links_its_task_by_trailer() { @@ -17,10 +17,7 @@ fn the_executors_task_commit_links_its_task_by_trailer() { let (_, err, code) = sh.run_in(p.root(), "specforge git add src/tasks.js"); assert_eq!(code, 0, "{err}"); - let block = fence_after( - &asset("agents/gsd-executor.md"), - "**Otherwise (standard single-repo):**", - ); + let block = fence_after(&asset("agents/gsd-executor.md"), "**The task commit:**"); let script = [ ("{type}", "feat"), ("{phase}-{plan}", "01-01"), diff --git a/gsd/core/tests/cli/assets_shell/counts.rs b/gsd/core/tests/cli/assets_shell/counts.rs index ff172fbde4..60cee77987 100644 --- a/gsd/core/tests/cli/assets_shell/counts.rs +++ b/gsd/core/tests/cli/assets_shell/counts.rs @@ -93,7 +93,7 @@ fn the_walking_skeleton_gate_reads_its_own_answers() { let p = crate::harness::taskboard(); p.write( "spec/v2.spec", - "milestone v2.0 \"Next\" {\n name \"Next\"\n}\n\nphase 01 \"Start\" {\n milestone v2.0\n name \"Start\"\n slug \"start\"\n goal \"Start again\"\n mode mvp\n}\n\nphase 02 \"More\" {\n milestone v2.0\n name \"More\"\n slug \"more\"\n goal \"More\"\n mode mvp\n}\n", + "milestone v2.0 \"Next\" {\n}\n\nphase 01 \"Start\" {\n milestone v2.0\n slug \"start\"\n goal \"Start again\"\n mode mvp\n}\n\nphase 02 \"More\" {\n milestone v2.0\n slug \"more\"\n goal \"More\"\n mode mvp\n}\n", ); let gate = |phase: &str, mvp: &str| { let filled = fence.replace("{{arg:mvp|false}}", mvp); diff --git a/gsd/core/tests/cli/assets_shell/milestone_edits.rs b/gsd/core/tests/cli/assets_shell/milestone_edits.rs index 291987c6db..a808d3a6f8 100644 --- a/gsd/core/tests/cli/assets_shell/milestone_edits.rs +++ b/gsd/core/tests/cli/assets_shell/milestone_edits.rs @@ -37,7 +37,8 @@ fn extracted(text: &str) -> Vec<String> { } /// The transition's roadmap step reads the milestone's phases from `progress-report`: on a taskboard its fence prints -/// JSON whose every `phases` item carries each key the step's "Extract from result" line names. +/// JSON whose every `phases` item carries each key the step's "Extract from result" line names. The next phase's name +/// is its title, which Route A reads from its node (ADR 0387): the report's `name` is its slug read as words. #[test] fn the_transition_reads_the_next_phase_from_progress() { let sh = Shell::only(&[]); @@ -51,7 +52,7 @@ fn the_transition_reads_the_next_phase_from_progress() { let phases = answer["phases"].as_array().expect("the phases"); assert!(phases.len() > 1, "{answer}"); let keys = extracted(&step); - assert_eq!(keys.len(), 3, "{keys:?}"); + assert_eq!(keys, ["phases[].number", "phases[].status"]); for key in &keys { let key = key.strip_prefix("phases[].").expect("a phases key"); for phase in phases { @@ -66,7 +67,14 @@ fn the_transition_reads_the_next_phase_from_progress() { .find(|phase| phase["status"] != "Complete") .expect("a phase after 01"); assert_eq!(next["number"], "02", "{answer}"); - assert_eq!(next["name"], "persistence", "{answer}"); + assert_eq!( + next["name"], "persistence", + "the slug read as words: {answer}" + ); + let read = super::line(&text, "NEXT_NAME=$("); + let route = format!("MILESTONE=v1.0\nNEXT_PHASE=02\n{read}\nprintf '%s' \"$NEXT_NAME\""); + let (out, err, status) = sh.run_in(p.root(), &route); + assert_eq!((status, out.as_str()), (0, "Persistence"), "{err}"); } /// The transition's `evolve_project` fences, filled, on a taskboard: an invalidated requirement moves out of scope @@ -224,7 +232,7 @@ fn the_milestone_templates_record_a_milestone_its_close_and_a_lesson() { assert_eq!(done.code, 0, "{}{}", done.out, done.err); assert!(done.added.is_empty(), "{:?}", done.added); assert_eq!(p.fields_of("v1.1")["goal"], "Share a board with a link"); - assert_eq!(p.fields_of("v1.1/01")["name"], "Links"); + assert_eq!(p.title_of("v1.1/01"), "Links"); let shipped = typed::filled( &fence_holding(&template, "whats_next"), &[ diff --git a/gsd/core/tests/cli/assets_shell/new_project.rs b/gsd/core/tests/cli/assets_shell/new_project.rs index 98627da924..f5d4b85fd4 100644 --- a/gsd/core/tests/cli/assets_shell/new_project.rs +++ b/gsd/core/tests/cli/assets_shell/new_project.rs @@ -1,5 +1,6 @@ -//! new-project's sub-repo step, run as the asset holds it under bash with only `specforge` and the shell's tools, and -//! the project and requirement fences its steps 4 and 7 run, as the templates hold them. +//! new-project's child-repos step (its "Sub-Repo Detection"), run as the asset holds it under bash with only +//! `specforge` and the shell's tools, and the project and requirement fences its steps 4 and 7 run, as the templates +//! hold them. use super::{Shell, asset, fence_after, typed}; use crate::harness::taskboard; @@ -7,7 +8,7 @@ use crate::harness::taskboard; /// The fence of new-project's "5.1. Sub-Repo Detection" step, then `show`, run in a project holding a directory repo (`backend`), a /// linked worktree (`linked-wt`, whose `.git` is a file) and a plain directory (`docs`), then what `setup` adds: /// `(stdout, stderr, exit code)`. -fn sub_repo_step( +fn child_repos_step( sh: &Shell, show: &str, setup: impl Fn(&std::path::Path), @@ -38,19 +39,19 @@ fn sub_repo_step( /// The step lists each child directory that is a repository, a directory repo and a linked worktree alike, by its /// bare name, and not a plain directory. #[test] -fn new_project_lists_the_sub_repos() { +fn new_project_lists_the_child_repos() { let sh = Shell::without_jq(); - let (out, err, _) = sub_repo_step(&sh, "printf '%s\\n' \"$SUB_REPOS\"", |_| {}); + let (out, err, _) = child_repos_step(&sh, "printf '%s\\n' \"$CHILD_REPOS\"", |_| {}); assert_eq!(out, "backend\nlinked-wt\n", "{err}"); } /// A listing that fails (the workspace cannot be read) stops the step: it is not "no sub-repos". #[cfg(unix)] #[test] -fn a_failed_sub_repo_listing_stops_the_step() { +fn a_failed_child_repo_listing_stops_the_step() { use std::os::unix::fs::PermissionsExt; let sh = Shell::without_jq(); - let (out, err, code) = sub_repo_step(&sh, "echo listed", |root| { + let (out, err, code) = child_repos_step(&sh, "echo listed", |root| { std::fs::set_permissions(root, std::fs::Permissions::from_mode(0o300)).expect("a mode"); }); assert!(!out.contains("listed") && code != 0, "{out}{err}"); @@ -59,9 +60,9 @@ fn a_failed_sub_repo_listing_stops_the_step() { /// A directory name holding a newline is refused whole, and the step stops, never reading it as two names. #[cfg(unix)] #[test] -fn a_sub_repo_name_holding_a_newline_stops_the_step() { +fn a_child_repo_name_holding_a_newline_stops_the_step() { let sh = Shell::without_jq(); - let (out, err, code) = sub_repo_step(&sh, "printf '%s\\n' \"$SUB_REPOS\"", |root| { + let (out, err, code) = child_repos_step(&sh, "printf '%s\\n' \"$CHILD_REPOS\"", |root| { let odd = root.join("we\nird"); std::fs::create_dir_all(odd.join(".git")).expect("a dir"); }); diff --git a/gsd/core/tests/cli/assets_shell/plan_edits.rs b/gsd/core/tests/cli/assets_shell/plan_edits.rs index d75458ee7b..550ee7f337 100644 --- a/gsd/core/tests/cli/assets_shell/plan_edits.rs +++ b/gsd/core/tests/cli/assets_shell/plan_edits.rs @@ -220,34 +220,18 @@ fn a_review_is_recorded_with_its_concerns() { assert_eq!(subject.trim(), "docs(review): record the review of v1.0/02"); } -/// The researcher records the phase's research and its items as typed edits, and plan-phase records the pack the -/// research read when the researcher returns. +/// The researcher records the phase's research and its items as typed edits, its open question open, and plan-phase +/// records the pack the research read when the researcher returns. #[test] fn the_research_fence_records_the_phase_research() { let sh = Shell::only(&[]); let p = taskboard(); - let text = asset("agents/gsd-phase-researcher.md"); - let fence = typed::filled( - &typed::typed_fence(&text, "1. **Create the entity first**"), - &[ - ("PHASE_ID", "v1.0/03"), - ("RESEARCH", "03-RESEARCH"), - ("TITLE", "Listing research"), - ("CONFIDENCE", "high"), - ("SUMMARY", "Filter in memory; the board is small"), - ("FINDING", "The board fits in memory"), - ("PITFALL", "Case-sensitive filters"), - ("GOES_WRONG", "A filter misses a title in another case"), - ("WHY", "String includes is case-sensitive"), - ("AVOID", "Lower-case both sides"), - ("PATTERN", "Filter then sort"), - ("WHAT", "Filter the open tasks, then sort them by id"), - ], - ); + let fence = super::researchers::research_fence("v1.0/03"); let run = typed::apply(&sh, &p, &fence); assert_eq!(run.code, 0, "{}{}", run.out, run.err); - assert!(run.added.is_empty(), "{:?}", run.added); - for id in ["", "/F1", "/PF1", "/P1"] { + // The open question is recorded open: gsd/W204 until the user's answer resolves it. + assert_eq!(run.added, ["gsd/W204"]); + for id in ["", "/F1", "/PF1", "/P1", "/Q1"] { let id = format!("v1.0/03/03-RESEARCH{id}"); assert!(p.fields_of(&id).is_object(), "{id} is missing"); } diff --git a/gsd/core/tests/cli/assets_shell/planner_edit.rs b/gsd/core/tests/cli/assets_shell/planner_edit.rs index 07dc73a73e..4c0de8a84a 100644 --- a/gsd/core/tests/cli/assets_shell/planner_edit.rs +++ b/gsd/core/tests/cli/assets_shell/planner_edit.rs @@ -1,11 +1,11 @@ //! The planner's plan edit: the `json` fence of its `<plan_format>`, filled and sent as one MCP `specforge.edit` call //! on the taskboard twin's planless phase v1.0/03 (requirements TASK-03 and LIST-01) under gsd-compat and gsd-strict, -//! and the refusals of the plan-by-plan route it replaces. +//! and the plan-by-plan route beside it, whose findings a later plan settles (ADR 0385). use serde_json::{Value, json}; use super::{Shell, asset, block, line, mcp_edit, span, typed}; -use crate::commands_support::{refused, strict}; +use crate::commands_support::{checked, refused, strict}; use crate::harness::{Project, is_judged, taskboard}; /// The planner's body. @@ -247,13 +247,15 @@ fn owed(p: &Project, prefix: &str) -> Vec<(String, String, String)> { /// The two plan files the edit writes. const FILES: [&str; 2] = ["spec/plans/03-01.spec", "spec/plans/03-02.spec"]; -/// On the planless phase, under gsd-compat and under gsd-strict, the plan edit with 03-02's requirements emptied is -/// refused whole (`gsd/E301`) and writes no file; the edit as filled is accepted in one call, writes both plans with -/// their task, truth, artifact and key link (and 03-02's checkpoint, prohibition and user setup step), reads the task -/// action back exactly and adds no code outside the judged rules. It leaves each plan owing exactly the plan checker's -/// four judged findings (`gsd/W311`, `gsd/W313`, `gsd/W315`: errors under gsd-strict, warnings under gsd-compat; -/// `gsd/W316`: a warning in both), which E080 does not count (ADR 0297). Sent again, it is refused as a conflict and -/// leaves both files byte for byte. +/// On the planless phase, under gsd-compat and under gsd-strict, the plan edit with 03-02 naming TASK-03 in place of +/// LIST-01 is written and reports `gsd/E301` (LIST-01 is in no plan of the phase), which `check` fails on: the finding +/// is settled later (ADR 0385), by the plan that holds LIST-01. With 03-02 naming no requirement it is refused whole +/// (`gsd/E302`, which no later step settles) and writes no file. The edit as filled is accepted in one call, writes +/// both plans with their task, truth, artifact and key link (and 03-02's checkpoint, prohibition and user setup step), +/// reads the task action back exactly and adds no code outside the judged rules. It leaves each plan owing exactly the +/// plan checker's four judged findings (`gsd/W311`, `gsd/W313`, `gsd/W315`: errors under gsd-strict, warnings under +/// gsd-compat; `gsd/W316`: a warning in both), which E080 does not count (ADR 0297). Sent again, it is refused as a +/// conflict and leaves both files byte for byte. #[test] fn the_planner_writes_a_phase_in_one_edit() { for profile in ["gsd-compat", "gsd-strict"] { @@ -263,17 +265,43 @@ fn the_planner_writes_a_phase_in_one_edit() { } let before = p.codes(); assert_eq!(owed(&p, "v1.0/03/"), Vec::new(), "{profile}"); + let uncovered = taskboard(); + if profile == "gsd-strict" { + strict(&uncovered); + } let mut empty = whole_edit(); op(&mut empty, "plan", "03-02")["fields"]["requirements"] = json!([]); - let refusal = mcp_edit(&p, &empty); + let refusal = mcp_edit(&uncovered, &empty); assert_eq!(refusal["isError"], true, "{profile}: {refusal}"); assert!( - refusal.to_string().contains("gsd/E301"), + refusal.to_string().contains("gsd/E302"), "{profile}: {refusal}" ); for file in FILES { - assert!(!p.exists(file), "{profile}: a refused edit wrote {file}"); + assert!( + !uncovered.exists(file), + "{profile}: a refused edit wrote {file}" + ); + } + let mut short = whole_edit(); + op(&mut short, "plan", "03-02")["fields"]["requirements"] = json!(["TASK-03"]); + let reported = mcp_edit(&uncovered, &short); + assert_ne!(reported["isError"], true, "{profile}: {reported}"); + assert!( + reported.to_string().contains("gsd/E301"), + "{profile}: {reported}" + ); + for file in FILES { + assert!( + uncovered.exists(file), + "{profile}: the edit wrote no {file}" + ); } + assert_eq!( + checked(&uncovered, "gsd/E301"), + (true, vec![("Error".to_string(), "v1.0/03".to_string())]), + "{profile}" + ); let edit = whole_edit(); let written = mcp_edit(&p, &edit); @@ -393,12 +421,13 @@ fn a_dependency_found_later_is_linked() { assert_eq!(p.fields_of("v1.0/03/03-02")["depends_on"], json!(["03-01"])); } -/// The first line of the plan-by-plan route the planner used to be told is refused in every profile: under gsd-compat -/// E080 carries `gsd/E301` (LIST-01 is in no plan of the phase) and no `gsd/W309`, under gsd-strict both; nothing is -/// written, so the phase has no plan and the plan's file does not exist. +/// A plan written alone by a typed creation, before the phase's other plans, is accepted in every profile: the phase's +/// coverage (`gsd/E301`: LIST-01 is in no plan of the phase) and, under gsd-strict, the plan's must-haves (`gsd/W309`) +/// are settled later (ADR 0385), so the write reports them and `check` fails on them until the rest is written. Under +/// gsd-compat `gsd/W309` is a warning. #[test] -fn a_plan_written_alone_is_refused_and_nothing_is_written() { - for profile in ["gsd-compat", "gsd-strict"] { +fn a_plan_written_alone_is_written_and_reports_what_a_later_write_settles() { + for (profile, must_haves) in [("gsd-compat", "Warning"), ("gsd-strict", "Error")] { let p = taskboard(); if profile == "gsd-strict" { strict(&p); @@ -421,25 +450,33 @@ fn a_plan_written_alone_is_refused_and_nothing_is_written() { "--objective", "List open tasks oldest first", ]); - refused(&run, "E080", &["gsd/E301", "nothing was written"]); + assert_eq!(run.code, 0, "{profile}: {}", run.all()); + for code in ["gsd/E301", "gsd/W309"] { + assert!(run.all().contains(code), "{profile}: {code}: {}", run.all()); + } + assert!( + ids(&p, "plan").iter().any(|id| id == "v1.0/03/03-01"), + "{profile}" + ); + assert!(p.exists("spec/plans/03-01.spec"), "{profile}"); assert_eq!( - run.all().contains("gsd/W309"), - profile == "gsd-strict", - "{profile}: {}", - run.all() + checked(&p, "gsd/E301"), + (true, vec![("Error".to_string(), "v1.0/03".to_string())]), + "{profile}" ); - let plans = ids(&p, "plan"); - assert!( - plans.iter().all(|id| !id.starts_with("v1.0/03/")), - "{profile}: {plans:?}" + assert_eq!( + checked(&p, "gsd/W309").1, + [(must_haves.to_string(), "v1.0/03/03-01".to_string())], + "{profile}" ); - assert!(!p.exists("spec/plans/03-01.spec"), "{profile}"); } } -/// The planner's `<plan_format>` is the plan edit: one `json` fence sent as **one** `specforge.edit` call, no typed -/// creation, the computed fields left out; the write step says to fix the list and send the whole call again, and the -/// critical rule names `specforge.edit`. +/// The planner's `<plan_format>` is the plan edit: one `json` fence sent as **one** `specforge.edit` call, the atomic +/// route, no typed creation, the computed fields left out. It says a call that leaves a finding a later plan settles +/// (gsd/E301, gsd/E310, gsd/W309) is written, not refused, and no longer that a plan written alone is refused; the +/// write step says to fix a refused list and send the whole call again, and to complete a phase a written call left +/// incomplete; the critical rule names `specforge.edit`. #[test] fn the_plan_format_is_one_edit_of_the_whole_phase() { let format = plan_format(); @@ -459,11 +496,25 @@ fn the_plan_format_is_one_edit_of_the_whole_phase() { .collect(); assert!(typed.is_empty(), "{typed:?}"); assert!(format.contains("computed"), "{format}"); + let flat = format.split_whitespace().collect::<Vec<_>>().join(" "); + for words in [ + "It is the atomic route", + "`gsd/E310`", + "a call that leaves one is written, not refused", + "`check` fails on it until the rest of the phase is written", + ] { + assert!( + flat.contains(words), + "the plan format lacks {words}:\n{flat}" + ); + } + assert!(!flat.contains("a plan written alone is refused"), "{flat}"); let body = planner(); let write = block(&body, "<step name=\"write_phase_prompt\">", "</step>"); assert!( write.contains("`specforge.edit`") && write.contains("send the whole call again") + && write.contains("left the phase incomplete") && !write.contains("run the line again"), "{write}" ); @@ -471,27 +522,13 @@ fn the_plan_format_is_one_edit_of_the_whole_phase() { assert!(rule.contains("`specforge.edit`"), "{rule}"); } -/// The codes of the diagnostics a refused `specforge.edit` call carries. -fn refusal_codes(result: &Value) -> Vec<String> { - let text = result["content"][0]["text"] - .as_str() - .expect("the call's text"); - let body: Value = - serde_json::from_str(text).unwrap_or_else(|e| panic!("the refusal is JSON ({e}): {text}")); - body["data"]["diagnostics"] - .as_array() - .unwrap_or_else(|| panic!("no diagnostics in {body}")) - .iter() - .filter_map(|d| d["code"].as_str().map(str::to_string)) - .collect() -} - /// Every other writer of a phase's plans names the plan edit and none points at the planner's typed edits: chunked /// single-plan mode (its reference and its spawn prompt, which names no typed plan creation), gap closure and the -/// quick-batch planner wave. Chunked mode says a plan written alone is refused `gsd/E301` while another requirement of -/// the phase is in no plan; its wait reads a `## PLAN BLOCKED` return as `blocked`, in both of its paths, never as a -/// stall; and its recovery of a blocked entry plans the rest of the phase in one run, naming the plans the graph holds -/// with a query line, since the planner's plan edit creates only the others. +/// quick-batch planner wave. Chunked mode says a plan written alone reports `gsd/E301` or `gsd/E310` and is written, +/// and that `## PLAN BLOCKED` is a refused call only; its wait reads a `## PLAN BLOCKED` return as `blocked`, in both +/// of its paths, never as a stall; its recovery of a blocked entry retries the plan or plans the rest of the phase in +/// one run, naming the plans the graph holds with a query line, since the planner's plan edit creates only the others; +/// and it says a run stopped midway leaves the phase half-planned, failing `check` and refused by execute-phase. #[test] fn every_writer_of_a_phases_plans_names_the_plan_edit() { let chunked = asset("gsd-core/references/planner-chunked.md"); @@ -532,10 +569,17 @@ fn every_writer_of_a_phases_plans_names_the_plan_edit() { } assert!(!spawn.contains("`specforge new plan`"), "{spawn}"); for (name, text) in [("single-plan", &single), ("the chunked spawn", &spawn)] { - assert!( - text.contains("gsd/E301") && text.contains("## PLAN BLOCKED"), - "{name}: {text}" - ); + let flat = text.split_whitespace().collect::<Vec<_>>().join(" "); + for words in [ + "gsd/E301", + "gsd/E310", + "## PLAN BLOCKED", + "written", + "refused", + ] { + assert!(flat.contains(words), "{name} lacks {words}: {flat}"); + } + assert!(!flat.contains("is refused `gsd/E301`"), "{name}: {flat}"); } assert!( spawn.contains("holding this plan alone.\n"), @@ -551,6 +595,8 @@ fn every_writer_of_a_phases_plans_names_the_plan_edit() { for words in [ "## PLAN BLOCKED", "gsd/E301", + "never block", + "1) Retry", "Plan the rest of the phase in one run", "specforge query \"$PHASE_ID\" --kinds plan", "conflict", @@ -561,54 +607,79 @@ fn every_writer_of_a_phases_plans_names_the_plan_edit() { ); } assert!( - single.contains("plan the rest of the\nphase in one run"), + single + .split_whitespace() + .collect::<Vec<_>>() + .join(" ") + .contains("to retry this plan, to plan the rest of the phase in one run, or to stop"), "{single}" ); + let stopped = block(&mode, "A run stopped before", "Move to the next Wave"); + assert!( + stopped.contains("half-planned") && stopped.contains("`/gsd-execute-phase`"), + "{stopped}" + ); assert!( plan_format().contains("the edit creates only the others"), "the plan edit says nothing of the plans that exist" ); } -/// A whole plan written alone, with its task, truth, artifact and key link (the plan edit's ops of plan 03-01, taken -/// by their file), is refused `gsd/E301` under gsd-compat and under gsd-strict while LIST-01 is in no plan, and names -/// no `gsd/W309`, since the plan has its must-haves; nothing is written. It pins a limit ADR 0384 names: chunked mode's -/// first plan of such a phase cannot be written, whatever its text; it flips when a rule a later step settles may wait. +/// The plan edit's plans written one at a time, as chunked mode writes them: plan 03-01 alone, with its task, truth, +/// artifact and key link (the plan edit's ops of plan 03-01, taken by their file), is accepted under gsd-compat and +/// under gsd-strict while LIST-01 is in no plan; the edit reports `gsd/E301` and no `gsd/W309` (the plan has its +/// must-haves), and `check` fails on the phase until plan 03-02, written next, holds LIST-01. Deleting 03-02 again is +/// refused: a delete creates nothing, so the coverage it would break is an error it adds (E080). #[test] -fn a_whole_plan_written_alone_is_refused_while_a_requirement_of_its_phase_is_in_no_plan() { - let mut edit = plan_edit(); - let file = op(&mut edit, "plan", "03-01")["file"].clone(); - let alone: Vec<Value> = edit - .as_array() - .expect("a list of edits") - .iter() - .filter(|e| e["file"] == file) - .cloned() - .collect(); - let kinds: Vec<&str> = alone.iter().filter_map(|e| e["kind"].as_str()).collect(); +fn a_phases_plans_written_one_at_a_time_are_each_accepted_and_the_last_settles_coverage() { + let edit = plan_edit(); + let of_plan = |plan: &str| -> Vec<Value> { + let mut edit = edit.clone(); + let file = op(&mut edit, "plan", plan)["file"].clone(); + edit.as_array() + .expect("a list of edits") + .iter() + .filter(|e| e["file"] == file) + .cloned() + .collect() + }; + let first = of_plan("03-01"); + let kinds: Vec<&str> = first.iter().filter_map(|e| e["kind"].as_str()).collect(); assert_eq!(kinds, ["plan", "task", "truth", "artifact", "key_link"]); for profile in ["gsd-compat", "gsd-strict"] { let p = taskboard(); if profile == "gsd-strict" { strict(&p); } - let refusal = mcp_edit(&p, &Value::Array(alone.clone())); - assert_eq!(refusal["isError"], true, "{profile}: {refusal}"); - let codes = refusal_codes(&refusal); - assert!( - codes.iter().any(|c| c == "gsd/E301"), - "{profile}: {codes:?}" + let written = mcp_edit(&p, &Value::Array(first.clone())); + assert_ne!(written["isError"], true, "{profile}: {written}"); + let text = written.to_string(); + assert!(text.contains("gsd/E301"), "{profile}: {text}"); + assert!(!text.contains("gsd/W309"), "{profile}: {text}"); + assert!(p.exists(FILES[0]), "{profile}"); + assert_eq!( + checked(&p, "gsd/E301"), + (true, vec![("Error".to_string(), "v1.0/03".to_string())]), + "{profile}" ); + + let written = mcp_edit(&p, &Value::Array(of_plan("03-02"))); + assert_ne!(written["isError"], true, "{profile}: {written}"); assert!( - codes.iter().all(|c| c != "gsd/W309"), - "{profile}: {codes:?}" + !written.to_string().contains("gsd/E301"), + "{profile}: {written}" ); - let plans = ids(&p, "plan"); - assert!( - plans.iter().all(|id| !id.starts_with("v1.0/03/")), - "{profile}: {plans:?}" + assert_eq!(checked(&p, "gsd/E301").1, Vec::new(), "{profile}"); + + let file = p.read(FILES[1]); + let deleted = p.run(&["delete", "v1.0/03/03-02"]); + refused(&deleted, "E080", &["gsd/E301"]); + assert_eq!( + p.read(FILES[1]), + file, + "{profile}: a refused delete changed {}", + FILES[1] ); - assert!(!p.exists("spec/plans/03-01.spec"), "{profile}"); } } diff --git a/gsd/core/tests/cli/assets_shell/researchers.rs b/gsd/core/tests/cli/assets_shell/researchers.rs index 77185bf985..bd5867ff3c 100644 --- a/gsd/core/tests/cli/assets_shell/researchers.rs +++ b/gsd/core/tests/cli/assets_shell/researchers.rs @@ -1,10 +1,11 @@ //! The discuss and project researchers' reads, run as the agents hold them under bash with only `specforge`: each //! names its context pack, and the analyzer's search and anchors find the earlier phases' work; and the route of an -//! open question gsd-strict refuses, from the phase researcher through the planner to the user's answer. +//! open question, recorded open by the phase researcher and resolved later by the user's answer (ADR 0385). use super::{Shell, asset, block, line, span, typed}; -use crate::commands_support::{refused, strict}; +use crate::commands_support::{checked, refused, strict}; use crate::harness::{Project, Run, taskboard}; +use crate::prompts_gates::{not_refused_by, refused_by}; /// The command of the code span in agent `name` that starts with `prefix`, its placeholder (from the first `<` or /// `"` on: `<phase>`, `"$PHASE_ID"`, `"<goal terms>"`) replaced by `subject`. @@ -152,59 +153,13 @@ fn record_question(p: &Project, file: &str, extra: &[&str]) -> Run { p.run(&args) } -/// The refusal the live run met at research and its return path. Under gsd-strict an open question no decision -/// resolves is refused (E080 with gsd/W204) and nothing is written; with the decision that resolves it the same write -/// is accepted and the question reads back exactly; under gsd-compat it is accepted with a gsd/W204 warning. So the -/// phase researcher returns such a question under `### Open Questions` instead of dropping it, plan-phase shows it and -/// hands it to the planner, and quick's and quick-batch's research steps hand it on the same way; the user answers it -/// after the planner (the tests below). +/// An open question no decision resolves is `gsd/W204`, settled later (ADR 0385): the researcher records it open, in +/// every profile. Under gsd-strict the write reports it as an error, `check` fails on it, and the plan-phase entry gate +/// refuses the next run on the phase; the user's answer, recorded as a decision and set as the question's +/// `resolved_by`, settles it and adds nothing. Unsetting that `resolved_by` again creates nothing, so it is refused +/// (E080 with gsd/W204) and changes nothing. Under gsd-compat the question is a warning. #[test] -fn an_open_question_strict_refuses_is_returned_not_dropped() { - let researcher = asset("agents/gsd-phase-researcher.md"); - assert!( - researcher.contains("specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].file'"), - "the researcher reads its phase file as this test does" - ); - let rule = block( - &researcher, - "4. **One item per call.**", - "5. **If a call is still refused", - ) - .split_whitespace() - .collect::<Vec<_>>() - .join(" "); - for words in [ - "`gsd/W204`", - "### Open Questions", - "what is known, what is unclear", - "send it again without the refused question", - ] { - assert!( - rule.contains(words), - "the researcher's rule 4 lacks {words}:\n{rule}" - ); - } - let template = block(&researcher, "### Open Questions", "### Ready for Planning"); - assert!(template.contains("gsd/W204"), "{template}"); - let plan_phase = asset("gsd-core/workflows/plan-phase.md"); - let handle = block( - &plan_phase, - "### Handle Researcher Return", - "<!-- gsd:section id=\"research-only-early-exit\"", - ); - assert!(handle.contains("### Open Questions"), "{handle}"); - let context = block(&plan_phase, "<planning_context>", "</planning_context>"); - assert!( - context.contains("**Open questions the research returned:**"), - "{context}" - ); - for step in [ - "gsd-core/workflows/quick/steps/research-phase.md", - "gsd-core/workflows/quick-batch/steps/research-phase.md", - ] { - assert!(asset(step).contains("### Open Questions"), "{step}"); - } - +fn an_open_question_is_recorded_open_and_its_answer_resolves_it_later() { let id = "v1.0/02/02-RESEARCH/OQ2"; let held = |p: &Project| { p.nodes_of("open_question") @@ -214,27 +169,57 @@ fn an_open_question_strict_refuses_is_returned_not_dropped() { let p = taskboard(); strict(&p); let file = phase_file(&p); - let kept = p.read(&file); let run = record_question(&p, &file, &[]); - refused(&run, "E080", &["gsd/W204", "nothing was written"]); - assert!(!held(&p), "a refused question was written"); - assert_eq!(p.read(&file), kept, "the refused run changed {file}"); - let run = record_question(&p, &file, &["--resolved_by", "D-02"]); assert_eq!(run.code, 0, "{}", run.all()); + assert!(run.all().contains("gsd/W204"), "{}", run.all()); assert!(held(&p)); assert_eq!(p.fields_of(id)["question"], QUESTION); + assert_eq!( + checked(&p, "gsd/W204"), + (true, vec![("Error".to_string(), id.to_string())]) + ); + refused_by(&p, "plan_phase", &["v1.0/02"], "W204"); + + let decided = p.run(&[ + "new", + "decision", + "D-04", + ANSWER, + "--in", + &file, + "--phase", + "v1.0/02", + "--text", + ANSWER, + "--origin", + "checkpoint", + ]); + assert_eq!(decided.code, 0, "{}", decided.all()); + let set = p.run(&["set", id, "resolved_by", "D-04"]); + assert_eq!(set.code, 0, "{}", set.all()); + assert_eq!(checked(&p, "gsd/W204").1, Vec::new()); + not_refused_by(&p, "plan_phase", &["v1.0/02"], "W204"); + + let kept = p.read(&file); + let unset = p.run(&["unset", id, "resolved_by"]); + refused(&unset, "E080", &["gsd/W204", "nothing was written"]); + assert_eq!(p.read(&file), kept, "the refused unset changed {file}"); let p = taskboard(); let run = record_question(&p, &phase_file(&p), &[]); assert_eq!(run.code, 0, "{}", run.all()); assert!(run.all().contains("gsd/W204"), "{}", run.all()); + assert_eq!( + checked(&p, "gsd/W204").1, + [("Warning".to_string(), id.to_string())] + ); } /// The user's answer to [`QUESTION`]. const ANSWER: &str = "Sort by due date — then by title"; -/// `fence`, a record-the-answer fence of a workflow, filled for `question` of `research`, answered by `decision`, in -/// the scope `(variable, id)` the fence names. +/// `fence`, a record-the-answer fence of a workflow, filled for the recorded question `question` of `research`, +/// answered by `decision`, in the scope `(variable, id)` the fence names. fn answered( fence: &str, scope: (&str, &str), @@ -250,62 +235,142 @@ fn answered( ("DECISION_ID", decision), ("QUESTION_ID", question), ("ANSWER", ANSWER), - ("QUESTION", QUESTION), - ("UNCLEAR", "which order users expect"), ], ) } -/// Runs `fence` under gsd-strict on `p`: first without its decision (the decision line and the question's -/// `--resolved_by`), which is refused gsd/W204 and writes nothing, then whole, which records the user's answer as -/// decision `decision` and the question `question` resolved by it, adding no code. -fn records_the_answer_then_the_question( +/// Runs `fence` under gsd-strict on `p`, where the research recorded `question` open (gsd/W204, an error): without its +/// decision line the set names no decision and is refused, leaving the question open; whole, it records the user's +/// answer as decision `decision`, sets it as the question's `resolved_by`, settles its gsd/W204 and adds no code. +fn the_answer_resolves_the_recorded_question( sh: &Shell, p: &Project, fence: &str, decision: &str, question: &str, ) { + let open = |p: &Project| { + checked(p, "gsd/W204") + .1 + .iter() + .any(|(severity, entity)| severity == "Error" && entity == question) + }; + assert!(open(p), "{question} is not recorded open"); let alone: String = fence .lines() .filter(|l| !l.starts_with("specforge new decision ")) .collect::<Vec<_>>() - .join("\n") - .replace(" --resolved_by \"$DECISION_ID\"", ""); + .join("\n"); assert_ne!(alone, fence, "the fence records a decision"); let refused = typed::apply(sh, p, &alone); assert_ne!(refused.code, 0, "{}{}", refused.out, refused.err); - assert!( - refused.err.contains("gsd/W204") || refused.out.contains("gsd/W204"), - "{}{}", - refused.out, - refused.err - ); - assert!( - p.nodes_of("open_question") - .iter() - .all(|n| n["id"] != question) - ); + assert!(p.fields_of(question)["resolved_by"].is_null()); let applied = typed::apply(sh, p, fence); assert_eq!(applied.code, 0, "{}{}", applied.out, applied.err); assert!(applied.added.is_empty(), "{:?}", applied.added); assert_eq!(p.fields_of(decision)["text"], ANSWER); - let fields = p.fields_of(question); - assert_eq!(fields["question"], QUESTION); - let resolved = fields["resolved_by"].to_string(); + let resolved = p.fields_of(question)["resolved_by"].to_string(); assert!( resolved.contains(decision.rsplit('/').next().expect("a name")), "{question} is resolved by {resolved}" ); + assert!(!open(p), "{question} is still open"); } -/// The open question gsd-strict refuses at research is the user's to answer, on plan-phase's path: the planner is -/// told to record no decision for it and to list it in its return, and plan-phase's step 9d asks the user and records -/// the answer, then the question; that fence, run as written under gsd-strict, is refused without its decision line -/// and records both with it. +/// The phase researcher's record fence (its rule 1), filled for the research `03-RESEARCH` of phase `phase` (one +/// numbered 03) and its open question `Q1`, recorded open. +pub(super) fn research_fence(phase: &str) -> String { + typed::filled( + &typed::typed_fence( + &asset("agents/gsd-phase-researcher.md"), + "1. **Create the entity first**", + ), + &[ + ("PHASE_ID", phase), + ("RESEARCH", "03-RESEARCH"), + ("TITLE", "Listing research"), + ("CONFIDENCE", "high"), + ("SUMMARY", "Filter in memory; the board is small"), + ("FINDING", "The board fits in memory"), + ("PITFALL", "Case-sensitive filters"), + ("GOES_WRONG", "A filter misses a title in another case"), + ("WHY", "String includes is case-sensitive"), + ("AVOID", "Lower-case both sides"), + ("PATTERN", "Filter then sort"), + ("WHAT", "Filter the open tasks, then sort them by id"), + ("QUESTION", QUESTION), + ("KNOWN", "users sort by hand today"), + ("UNCLEAR", "which order users expect"), + ("RECOMMENDATION", "ask the user"), + ], + ) +} + +/// The phase researcher records every open question open: its rule names no exception and no return in place of the +/// record, and its fence records `Q1` with no `resolved_by`. Under gsd-strict the fence is accepted and adds gsd/W204 +/// only; plan-phase displays the returned ids and the quick steps pass them on as questions the research recorded. +#[test] +fn the_researcher_records_every_open_question_open() { + let researcher = asset("agents/gsd-phase-researcher.md"); + let rule = block( + &researcher, + "4. **One item per call.**", + "5. **If a call is still refused", + ) + .split_whitespace() + .collect::<Vec<_>>() + .join(" "); + for words in [ + "record every `open_question` open", + "no `--resolved_by`", + "`gsd/W204`", + "is not refused for it", + "never return one in place of recording it", + "by its own id (`Q1`, the last segment of its path `$RESEARCH_ID/Q1`), under `### Open Questions`", + ] { + assert!(rule.contains(words), "rule 4 lacks {words}:\n{rule}"); + } + assert!(!rule.contains("send it again without"), "{rule}"); + let template = block(&researcher, "### Open Questions", "### Ready for Planning"); + assert!( + template.contains("you recorded, by its own id under the research, e.g. `Q1`"), + "{template}" + ); + let handle = block( + &asset("gsd-core/workflows/plan-phase.md"), + "### Handle Researcher Return", + "<!-- gsd:section id=\"research-only-early-exit\"", + ); + assert!(handle.contains("the research recorded"), "{handle}"); + for step in [ + "gsd-core/workflows/quick/steps/research-phase.md", + "gsd-core/workflows/quick-batch/steps/research-phase.md", + ] { + let text = asset(step).split_whitespace().collect::<Vec<_>>().join(" "); + assert!( + text.contains("questions the research recorded open"), + "{step}" + ); + } + + let sh = Shell::only(&[]); + let p = taskboard(); + strict(&p); + let run = typed::apply(&sh, &p, &research_fence("v1.0/03")); + assert_eq!(run.code, 0, "{}{}", run.out, run.err); + assert_eq!(run.added, ["gsd/W204"]); + let question = "v1.0/03/03-RESEARCH/Q1"; + assert_eq!(p.fields_of(question)["question"], QUESTION); + assert!(p.fields_of(question)["resolved_by"].is_null()); +} + +/// A recorded open question is the user's to answer, on plan-phase's path: the planner is told to record no decision +/// for it and to list it in its return, and plan-phase's step 9d asks the user, records the answer as a decision and +/// sets it as the question's `resolved_by`. Under gsd-strict the researcher's fence records the question open, the +/// plan-phase entry gate then refuses the phase, step 9d's fence settles it, and the gate lets the phase through. #[test] -fn plan_phase_records_the_users_answer_then_the_question() { +fn plan_phase_resolves_the_recorded_question_with_the_users_answer() { let sh = Shell::only(&[]); let plan_phase = asset("gsd-core/workflows/plan-phase.md"); let context = block(&plan_phase, "<planning_context>", "</planning_context>"); @@ -326,7 +391,15 @@ fn plan_phase_records_the_users_answer_then_the_question() { let complete = line(&plan_phase, "- **`## PLANNING COMPLETE`:**"); assert!(complete.contains("step 9d"), "{complete}"); let status = block(&plan_phase, "## 14. Present Final Status", "## 15."); - assert!(status.contains("open question"), "{status}"); + assert!( + status.contains("open in the graph") && status.contains("entry gate"), + "{status}" + ); + let answers = block(&plan_phase, "## 9d.", "## 10."); + assert!( + answers.contains("stays open in the graph") && answers.contains("entry gate of plan-phase"), + "{answers}" + ); let planner = asset("agents/gsd-planner.md"); let write = block(&planner, "<step name=\"write_phase_prompt\">", "</step>"); for words in [ @@ -348,26 +421,33 @@ fn plan_phase_records_the_users_answer_then_the_question() { let p = taskboard(); strict(&p); + let run = typed::apply(&sh, &p, &research_fence("v1.0/03")); + assert_eq!(run.code, 0, "{}{}", run.out, run.err); + refused_by(&p, "plan_phase", &["v1.0/03"], "W204"); let fence = answered( &typed::typed_fence(&plan_phase, "## 9d."), - ("PHASE_ID", "v1.0/02"), - "v1.0/02/02-RESEARCH", + ("PHASE_ID", "v1.0/03"), + "v1.0/03/03-RESEARCH", + // Not D-01: a bare D-01 would resolve to the project's own decision while the phase has none. "D-04", - "02-Q1", + "Q1", ); - records_the_answer_then_the_question( + the_answer_resolves_the_recorded_question( &sh, &p, &fence, - "v1.0/02/D-04", - "v1.0/02/02-RESEARCH/02-Q1", + "v1.0/03/D-04", + "v1.0/03/03-RESEARCH/Q1", ); + not_refused_by(&p, "plan_phase", &["v1.0/03"], "W204"); } -/// The quick plan `261121-abc` with its research, minted as quick's init step and research step write them, under -/// gsd-compat (gsd-strict refuses the mint: ADR 0384's Limits), then the project set to gsd-strict. +/// The quick plan `261121-abc` with its research and the research's open question, minted under gsd-strict as quick's +/// init step and research step write them (the mint reports `gsd/W309`, settled later by the planner; the question +/// `gsd/W204`, settled later by the user's answer). fn quick_with_research() -> Project { let p = taskboard(); + strict(&p); for args in [ &[ "new", @@ -402,20 +482,33 @@ fn quick_with_research() -> Project { "--summary", "Titles are trimmed", ], + &[ + "new", + "open_question", + "Q1", + QUESTION, + "--in", + "spec/quick.spec", + "--research", + "261121-abc-RESEARCH", + "--question", + QUESTION, + "--unclear", + "which order users expect", + ], ] { let run = p.run(args); assert_eq!(run.code, 0, "{}", run.all()); } - strict(&p); p } -/// On quick's and quick-batch's paths the research step hands a returned question to the planner's prompt, which -/// carries it with the same rule, and the step after the planner asks the user and records the answer, then the -/// question: each workflow's fence, run as written under gsd-strict on a quick plan with research, is refused without -/// its decision line and records both with it. +/// On quick's and quick-batch's paths the research step hands a recorded question to the planner's prompt, which +/// carries it with the same rule, and the step after the planner asks the user, records the answer as a decision and +/// sets it as the question's `resolved_by`: each workflow's fence, run as written under gsd-strict on a quick plan +/// whose research recorded the question open, is refused without its decision line and settles the question with it. #[test] -fn quick_and_quick_batch_record_the_users_answer_then_the_question() { +fn quick_and_quick_batch_resolve_the_recorded_question_with_the_users_answer() { let sh = Shell::only(&[]); for (research, prompt, after, heading) in [ ( @@ -467,14 +560,14 @@ fn quick_and_quick_batch_record_the_users_answer_then_the_question() { ("QUICK_ID", "261121-abc"), "261121-abc-RESEARCH", "261121-abc-D-01", - "261121-abc-Q1", + "Q1", ); - records_the_answer_then_the_question( + the_answer_resolves_the_recorded_question( &sh, &p, &fence, "261121-abc-D-01", - "261121-abc-RESEARCH/261121-abc-Q1", + "261121-abc-RESEARCH/Q1", ); } } diff --git a/gsd/core/tests/cli/assets_shell/search.rs b/gsd/core/tests/cli/assets_shell/search.rs index be5612b806..0a8341d62c 100644 --- a/gsd/core/tests/cli/assets_shell/search.rs +++ b/gsd/core/tests/cli/assets_shell/search.rs @@ -457,7 +457,7 @@ fn two_milestones() -> crate::harness::Project { let p = crate::harness::taskboard(); std::fs::write( p.root().join("spec/v2.spec"), - "milestone v2.0 \"Next\" {\n name \"Next\"\n}\n\nphase 01 \"Later\" {\n milestone v2.0\n name \"Later\"\n slug \"later\"\n goal \"A later goal\"\n success_criteria [\"It works\"]\n}\n", + "milestone v2.0 \"Next\" {\n}\n\nphase 01 \"Later\" {\n milestone v2.0\n slug \"later\"\n goal \"A later goal\"\n success_criteria [\"It works\"]\n}\n", ) .expect("a second milestone"); p diff --git a/gsd/core/tests/cli/cmd_digest.rs b/gsd/core/tests/cli/cmd_digest.rs index 37b7c2f8dd..0830f3f236 100644 --- a/gsd/core/tests/cli/cmd_digest.rs +++ b/gsd/core/tests/cli/cmd_digest.rs @@ -1,5 +1,6 @@ //! `record_research`, `record_spec` and `record_validation`: the host records, in the entity's `context_pack`, the pack -//! of `gsd/phase-context` (a quick research: `gsd/quick-context`) with its digest and budget (ADR 0356). +//! of `gsd/phase-context` (a quick research: `gsd/quick-context`) with its digest, and the cap its read stated when it +//! stated one (ADR 0356, ADR 0386). use super::commands_support::*; use super::harness::{Project, project}; @@ -81,7 +82,8 @@ fn the_recorded_digest_is_what_specforge_context_prints() { let record = &p.fields_of(entity)["context_pack"]; assert_eq!(record["route"], "gsd/phase-context", "{kind}: {record}"); assert_eq!(record["digest"], printed["digest"], "{kind}: {record}"); - assert_eq!(record["max_tokens"], 50000, "{kind}: {record}"); + // A read that states no cap records none: the route is all core, read again whole (ADR 0386). + assert!(record.get("max_tokens").is_none(), "{kind}: {record}"); } assert!( !p.codes().contains(&"gsd/W406".to_string()), @@ -90,6 +92,41 @@ fn the_recorded_digest_is_what_specforge_context_prints() { ); } +/// Two plans of phase 02 in a strict wave: the phase gains computed fields (its critical path) that its pack shows +/// and no digest reads. +const PLANS: &str = "plan 02-01 \"Store file\" {\n phase v1.0/02\n type execute\n objective \"Save the board\"\n}\n\n\ + plan 02-02 \"Load on start\" {\n phase v1.0/02\n type execute\n depends_on [02-01]\n \ + objective \"Load the board\"\n}\n"; + +#[test] +fn a_record_read_with_no_cap_stays_fresh_while_its_phase_grows_what_no_digest_reads() { + let p = project("discuss"); + let before = pack(&p, "gsd/phase-context", "v1.0/02"); + for (command, entity) in [ + ("record-research", RESEARCH), + ("record-spec", "v1.0/02/02-SPEC"), + ] { + let run = gsd(&p, command, &[entity]); + assert_eq!(run.code, 0, "{command}: {}", run.all()); + } + plant(&p, "spec/plans.spec", PLANS); + let after = pack(&p, "gsd/phase-context", "v1.0/02"); + // The phase's pack costs more and no digest it covers moved: nothing the records read has changed. + assert_eq!(after["digest"], before["digest"]); + let cost = |pack: &serde_json::Value| pack["budget"]["estimated_tokens"].as_u64(); + assert!( + cost(&after) > cost(&before), + "before {}, after {}", + before["budget"], + after["budget"] + ); + assert!( + !p.codes().contains(&"gsd/W406".to_string()), + "{:?}", + p.report() + ); +} + #[test] fn record_spec_leaves_its_e202_verdict_fresh() { let p = project("discuss"); diff --git a/gsd/core/tests/cli/cmd_edge_probe.rs b/gsd/core/tests/cli/cmd_edge_probe.rs index bd35acc01c..3448426285 100644 --- a/gsd/core/tests/cli/cmd_edge_probe.rs +++ b/gsd/core/tests/cli/cmd_edge_probe.rs @@ -405,7 +405,7 @@ fn an_ambiguous_subject_names_each_entity() { let p = project("discuss"); p.write( "spec/n.spec", - "milestone v1.1 \"N\" {\n name \"N\"\n}\n\nphase 02 \"P02\" {\n milestone v1.1\n name \"P02\"\n slug \"p02\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n\nphase_spec 02-SPEC \"Other spec\" {\n phase v1.1/02\n created 2026-10-28\n goal \"g\"\n}\n", + "milestone v1.1 \"N\" {\n}\n\nphase 02 \"P02\" {\n milestone v1.1\n slug \"p02\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n\nphase_spec 02-SPEC \"Other spec\" {\n phase v1.1/02\n created 2026-10-28\n goal \"g\"\n}\n", ); for (subject, needle) in [ ( diff --git a/gsd/core/tests/cli/cmd_execute.rs b/gsd/core/tests/cli/cmd_execute.rs index 2802831fae..dfec394c7c 100644 --- a/gsd/core/tests/cli/cmd_execute.rs +++ b/gsd/core/tests/cli/cmd_execute.rs @@ -81,8 +81,9 @@ fn executor_pack(p: &crate::harness::Project, budget: Option<&str>) -> serde_jso serde_json::from_str(&run.stdout).expect("a pack") } -/// Every call records the plan's executor pack, at the route's budget or at `--max-tokens`; a re-run leaves -/// `plan_start` as the first call wrote it. +/// Every call records the plan's executor pack, by default the core whole and the route's allowance (its record holds +/// no cap), or under the cap `--max-tokens` states, which its record holds; a re-run leaves `plan_start` as the first +/// call wrote it. #[test] fn start_plan_records_the_executor_pack_on_every_call() { let p = twin(); @@ -96,7 +97,7 @@ fn start_plan_records_the_executor_pack_on_every_call() { executor_pack(&p, None)["digest"], "{record}" ); - assert_eq!(record["max_tokens"], 6000, "{record}"); + assert!(record.get("max_tokens").is_none(), "{record}"); let start = p.fields_of(&format!("{PLAN}/START")); let run = gsd(&p, "start-plan", &[PLAN, "--max-tokens", "4000"]); assert_eq!(run.code, 0, "{}", run.all()); diff --git a/gsd/core/tests/cli/cmd_milestone.rs b/gsd/core/tests/cli/cmd_milestone.rs index 7c270e415e..f900a15f2d 100644 --- a/gsd/core/tests/cli/cmd_milestone.rs +++ b/gsd/core/tests/cli/cmd_milestone.rs @@ -26,7 +26,7 @@ pub(super) fn ready() -> Project { let p = project("empty"); p.write( "spec/m.spec", - "milestone v1.0 \"M\" {\n name \"M\"\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n name \"Core\"\n slug \"core\"\n goal \"Do it\"\n success_criteria [\"It is done\"]\n}\n\nplan 01-01 \"P\" {\n phase v1.0/01\n type execute\n objective \"Do it\"\n files_modified [\"src/done.js\"]\n}\n\ntruth TR1 \"T\" {\n plan v1.0/01/01-01\n text \"It is done\"\n}\n\nverification 01-VERIFICATION \"V\" {\n phase v1.0/01\n}\n\nmilestone_audit A1 \"A\" {\n milestone v1.0\n}\n", + "milestone v1.0 \"M\" {\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n slug \"core\"\n goal \"Do it\"\n success_criteria [\"It is done\"]\n}\n\nplan 01-01 \"P\" {\n phase v1.0/01\n type execute\n objective \"Do it\"\n files_modified [\"src/done.js\"]\n}\n\ntruth TR1 \"T\" {\n plan v1.0/01/01-01\n text \"It is done\"\n}\n\nverification 01-VERIFICATION \"V\" {\n phase v1.0/01\n}\n\nmilestone_audit A1 \"A\" {\n milestone v1.0\n}\n", ); // The plan is executed, so its truth owes the verifier a verdict, which cites the file the plan modifies // (`Project::cites`). diff --git a/gsd/core/tests/cli/cmd_phase.rs b/gsd/core/tests/cli/cmd_phase.rs index efa56d37ec..ec8fcef1fa 100644 --- a/gsd/core/tests/cli/cmd_phase.rs +++ b/gsd/core/tests/cli/cmd_phase.rs @@ -9,7 +9,7 @@ use super::harness::{Project, project}; /// a context `NN-CONTEXT`, each depending on the one before. pub(super) fn twelve() -> Project { let p = project("empty"); - let mut text = String::from("milestone v1.0 \"M\" {\n name \"M\"\n}\n\n"); + let mut text = String::from("milestone v1.0 \"M\" {\n}\n\n"); let phase = |name: &str, depends: &str| { let deps = if depends.is_empty() { String::new() @@ -17,7 +17,7 @@ pub(super) fn twelve() -> Project { format!(" depends_on [{depends}]\n") }; format!( - "phase {name} \"P{name}\" {{\n milestone v1.0\n name \"P{name}\"\n slug \"p{name}\"\n goal \"Goal {name}\"\n success_criteria [\"a\", \"b\"]\n{deps}}}\n\n" + "phase {name} \"P{name}\" {{\n milestone v1.0\n slug \"p{name}\"\n goal \"Goal {name}\"\n success_criteria [\"a\", \"b\"]\n{deps}}}\n\n" ) }; for n in 1..=12 { @@ -171,12 +171,40 @@ fn insert_after_02_on_the_twin_makes_02_2() { assert!(ids(&p, "phase").contains(&"v1.0/02.1".to_string())); } +/// A phase is named by its title alone (ADR 0387): `--edit --name` retitles it, so a title that began with a phase +/// number (gsd/W109) is fixed by naming the phase again, and no field repeats the title. +#[test] +fn edit_name_retitles_the_phase() { + let p = twin(); + let run = p.run(&["set", "v1.0/02", "--title", "Phase 2: Persistence"]); + assert_eq!(run.code, 0, "{}", run.all()); + assert!( + p.codes().contains(&"gsd/W109".to_string()), + "{:?}", + p.codes() + ); + let run = gsd(&p, "phase", &["--edit", "02", "--name", "Persistence"]); + assert_eq!(run.code, 0, "{}", run.all()); + assert_eq!(p.title_of("v1.0/02"), "Persistence"); + assert!(p.fields_of("v1.0/02").get("name").is_none()); + assert!( + !p.codes().contains(&"gsd/W109".to_string()), + "{:?}", + p.codes() + ); + let run = gsd(&p, "phase", &["--edit", "02", "--name", "Two\nlines"]); + assert_ne!(run.code, 0, "a name is one line: {}", run.all()); + assert!(run.all().contains("one line"), "{}", run.all()); +} + #[test] fn add_appends_with_to_be_planned() { let p = twin(); let run = gsd(&p, "phase", &["--name", "Sharing"]); assert_eq!(run.code, 0, "{}", run.all()); + assert_eq!(p.title_of("v1.0/04"), "Sharing"); let fields = p.fields_of("v1.0/04"); + assert_eq!(fields["slug"], "sharing"); assert_eq!(fields["goal"], "[To be planned]"); assert_eq!(fields["success_criteria"], json!(["[To be planned]"])); assert_eq!(fields["depends_on"], json!(["03"])); @@ -300,6 +328,69 @@ fn edit_sets_goal_and_criteria() { assert_eq!(fields["success_criteria"], json!(["saved", "loaded"])); } +/// A new name rewrites the title and the slug, as `--add` writes them: the title is the phase's label and the slug +/// names its branch, so neither keeps the old name. A branch cut under the old slug keeps its name, and is no longer +/// the phase's branch. +#[test] +fn a_new_name_rewrites_the_title_and_the_slug() { + const AT: &str = "2026-01-01T00:00:00Z"; + let p = twin(); + p.commit(); + p.settings(json!({"git.branching_strategy": "phase"})); + let phase = |p: &Project| { + let query = p.run(&["query", "v1.0/02", "--depth", "0", "--format", "json"]); + let graph: serde_json::Value = serde_json::from_str(&query.stdout).expect("JSON"); + let nodes = graph["nodes"].as_array().expect("nodes"); + let found = nodes.iter().find(|n| n["id"] == "v1.0/02"); + found + .unwrap_or_else(|| panic!("no v1.0/02: {graph}")) + .clone() + }; + let branches = |p: &Project| json(&gsd(p, "milestone-branches", &["v1.0", "--format", "json"])); + assert_eq!(phase(&p)["fields"]["slug"], "persistence"); + assert_eq!(phase(&p)["fields"]["branch"], "gsd/phase-02-persistence"); + p.git(&["branch", "gsd/phase-02-persistence"], AT); + assert_eq!( + branches(&p)["branches"], + json!(["gsd/phase-02-persistence"]) + ); + let run = gsd( + &p, + "phase", + &[ + "--edit", + "02", + "--name", + "Durable tasks", + "--format", + "json", + ], + ); + assert_eq!(run.code, 0, "{}", run.all()); + let answer = json(&run); + assert_eq!( + answer["output"]["set"], + json!(["title", "slug"]), + "{answer}" + ); + let node = phase(&p); + assert_eq!(node["title"], "Durable tasks", "{node}"); + assert!( + node["fields"].get("name").is_none(), + "no field repeats the title: {node}" + ); + assert_eq!(node["fields"]["slug"], "durable-tasks", "{node}"); + assert_eq!( + node["fields"]["branch"], "gsd/phase-02-durable-tasks", + "{node}" + ); + assert_eq!( + branches(&p)["branches"], + json!([]), + "the old branch is not the phase's any more, and the new one is not cut yet" + ); +} + #[test] fn insert_and_edit_refuse_a_backlog_phase() { let p = twelve(); @@ -318,7 +409,7 @@ fn insert_and_edit_refuse_a_backlog_phase() { pub(super) fn backlogged() -> Project { let p = twelve(); let mut text = p.read("spec/m.spec"); - text.push_str("context 999.1-CONTEXT \"Idea\" {\n phase v1.0/999.1\n gathered 2026-10-28\n boundary \"b\"\n canonical_refs [{ topic \"none\" paths [] }]\n}\n\nphase 999.2 \"P999.2\" {\n milestone v1.0\n name \"P999.2\"\n slug \"p999-2\"\n goal \"Goal 999.2\"\n success_criteria [\"a\"]\n}\n"); + text.push_str("context 999.1-CONTEXT \"Idea\" {\n phase v1.0/999.1\n gathered 2026-10-28\n boundary \"b\"\n canonical_refs [{ topic \"none\" paths [] }]\n}\n\nphase 999.2 \"P999.2\" {\n milestone v1.0\n slug \"p999-2\"\n goal \"Goal 999.2\"\n success_criteria [\"a\"]\n}\n"); p.write("spec/m.spec", &text); p } @@ -431,17 +522,46 @@ fn a_criterion_with_a_control_character_or_an_empty_name_is_refused() { } } +/// A name is one line and gives a slug, on `--add`, `--insert` and `--backlog` as on `--edit`: a carriage return is a +/// line break, and a name with no ASCII letter or digit gives no slug, the phase's directory and branch word. An added +/// phase's message prints its name as it is stored, trimmed. +#[test] +fn a_name_of_two_lines_or_without_a_slug_is_refused_and_one_is_printed_as_stored() { + let p = twin(); + let before = bytes(&p); + for (args, words) in [ + (vec!["--edit", "02", "--name", "Two\rlines"], "(U+000D)"), + (vec!["--edit", "02", "--name", "日本語"], "gives no slug"), + (vec!["--name", "—?!"], "gives no slug"), + (vec!["--insert", "02", "--name", "…"], "gives no slug"), + (vec!["--backlog", "--name", "¿?"], "gives no slug"), + ] { + let run = gsd(&p, "phase", &args); + assert_ne!(run.code, 0, "{args:?}: {}", run.all()); + assert!(run.all().contains(words), "{args:?}: {}", run.all()); + unchanged(&p, &before); + } + let run = gsd(&p, "phase", &["--name", " Sharing "]); + assert_eq!(run.code, 0, "{}", run.all()); + assert!( + run.stdout.contains("phase 04 \"Sharing\" added to v1.0"), + "{}", + run.all() + ); + assert_eq!(p.title_of("v1.0/04"), "Sharing"); +} + /// `backlogged()` with a second milestone `v1.1` that holds phase `01` (or nothing, when `empty`). fn two_milestones(empty: bool) -> Project { let p = backlogged(); let phase = if empty { "" } else { - "\nphase 01 \"P01\" {\n milestone v1.1\n name \"P01\"\n slug \"p01\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n" + "\nphase 01 \"P01\" {\n milestone v1.1\n slug \"p01\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n" }; p.write( "spec/n.spec", - &format!("milestone v1.1 \"N\" {{\n name \"N\"\n}}\n{phase}"), + &format!("milestone v1.1 \"N\" {{\n}}\n{phase}"), ); p } @@ -478,7 +598,7 @@ fn promote_into_a_milestone_without_phases_depends_on_nothing() { fn promote_names_the_milestone_when_two_backlogs_share_a_number() { let p = two_milestones(false); let mut text = p.read("spec/n.spec"); - text.push_str("\nphase 999.1 \"Other\" {\n milestone v1.1\n name \"Other\"\n slug \"other\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n"); + text.push_str("\nphase 999.1 \"Other\" {\n milestone v1.1\n slug \"other\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n"); p.write("spec/n.spec", &text); // v1.1's own 999.1 wins for --milestone v1.1; the other milestone's is named with its id let before = bytes(&p); @@ -527,7 +647,7 @@ fn a_backlog_phase_takes_the_first_free_999_number() { let run = gsd(&p, "phase", &["--backlog", "--name", name]); assert_eq!(run.code, 0, "{}", run.all()); assert!(run.stdout.contains(at), "{}", run.all()); - assert_eq!(p.fields_of(&format!("v1.0/{at}"))["name"], name); + assert_eq!(p.title_of(&format!("v1.0/{at}")), name); } assert_eq!(p.codes(), before); let run = gsd(&p, "phase", &["--remove", "999.2"]); @@ -535,7 +655,7 @@ fn a_backlog_phase_takes_the_first_free_999_number() { let run = gsd(&p, "phase", &["--backlog", "--name", "Again"]); assert_eq!(run.code, 0, "{}", run.all()); assert!(run.stdout.contains("999.2"), "{}", run.all()); - assert_eq!(p.fields_of("v1.0/999.2")["name"], "Again"); + assert_eq!(p.title_of("v1.0/999.2"), "Again"); let before = bytes(&p); let run = gsd(&p, "phase", &["--backlog", "--insert", "01", "--name", "X"]); refused(&run, "invalid_input", &["--backlog", "--insert"]); diff --git a/gsd/core/tests/cli/cmd_quick.rs b/gsd/core/tests/cli/cmd_quick.rs index ea2974ca9d..bd9cd8eb97 100644 --- a/gsd/core/tests/cli/cmd_quick.rs +++ b/gsd/core/tests/cli/cmd_quick.rs @@ -236,13 +236,13 @@ fn a_taken_batch_id_or_a_phase_plan_is_refused() { super::commands_support::unchanged(&p, &before); } -/// Quick's mint (the init step of `workflows/quick.md`) writes the plan before its must-haves exist: accepted under -/// gsd-compat; under gsd-strict a plan with no truth and no artifact is `gsd/W309`, raised to an error that E080 -/// counts, so the mint is refused and writes nothing. It pins a limit ADR 0384 names; it flips when a rule a later -/// step of the same workflow settles may wait. +/// Quick's mint (the init step of `workflows/quick.md`) writes the plan before its must-haves exist, and its planner +/// adds them later: a plan with no truth and no artifact is `gsd/W309`, settled later (ADR 0385), so the mint is +/// accepted under gsd-compat and under gsd-strict alike. Under gsd-strict the finding is an error the mint reports and +/// `check` fails on, until the planner writes the plan's must-haves. #[test] -fn a_quick_plan_minted_without_must_haves_is_refused_under_strict_only() { - use super::commands_support::{refused, strict, twin}; +fn a_quick_plan_minted_without_must_haves_is_accepted_and_its_finding_reported_under_strict() { + use super::commands_support::{checked, strict, twin}; let mint = "specforge new --in spec/quick.spec --field type=execute --field files_modified= \ --field \"objective=$DESCRIPTION\" --field \"slug=$slug\" -- plan \"$quick_id\" \"$title\""; assert!( @@ -268,13 +268,21 @@ fn a_quick_plan_minted_without_must_haves_is_refused_under_strict_only() { ]; let minted = |p: &crate::harness::Project| p.nodes_of("plan").iter().any(|n| n["id"] == "261121-abc"); - let compat = twin(); - let run = compat.run(&args); - assert_eq!(run.code, 0, "{}", run.all()); - assert!(minted(&compat)); - let p = twin(); - strict(&p); - let run = p.run(&args); - refused(&run, "E080", &["gsd/W309", "nothing was written"]); - assert!(!minted(&p)); + for (profile, severity) in [("gsd-compat", "Warning"), ("gsd-strict", "Error")] { + let p = twin(); + if profile == "gsd-strict" { + strict(&p); + } + let run = p.run(&args); + assert_eq!(run.code, 0, "{profile}: {}", run.all()); + assert!(minted(&p), "{profile}"); + assert!(run.all().contains("gsd/W309"), "{profile}: {}", run.all()); + let (failed, found) = checked(&p, "gsd/W309"); + assert_eq!( + found, + [(severity.to_string(), "261121-abc".to_string())], + "{profile}" + ); + assert_eq!(failed, profile == "gsd-strict", "{profile}"); + } } diff --git a/gsd/core/tests/cli/cmd_reports.rs b/gsd/core/tests/cli/cmd_reports.rs index 4f1a66e2ed..ab2777efc6 100644 --- a/gsd/core/tests/cli/cmd_reports.rs +++ b/gsd/core/tests/cli/cmd_reports.rs @@ -133,7 +133,7 @@ fn stats_on_the_twin_leave_a_backlog_phase_out() { plant( &p, "spec/v1.0.spec", - "phase 999.1 \"Someday\" {\n milestone v1.0\n name \"Someday\"\n slug \"someday\"\n}\n", + "phase 999.1 \"Someday\" {\n milestone v1.0\n slug \"someday\"\n}\n", ); let got = report(&p, "stats"); assert_eq!(got["phases_total"], 4, "{got}"); diff --git a/gsd/core/tests/cli/cmd_smart_entry.rs b/gsd/core/tests/cli/cmd_smart_entry.rs index ae45d770e3..36a01d607c 100644 --- a/gsd/core/tests/cli/cmd_smart_entry.rs +++ b/gsd/core/tests/cli/cmd_smart_entry.rs @@ -169,7 +169,7 @@ fn a_backlog_phase_is_in_no_count() { let p = twin(); let before = entry(&p, &[]); let mut text = p.read("spec/v1.0.spec"); - text.push_str("\nphase 999.1 \"Idea\" {\n milestone v1.0\n name \"Idea\"\n slug \"idea\"\n goal \"later\"\n success_criteria [\"a\"]\n}\n"); + text.push_str("\nphase 999.1 \"Idea\" {\n milestone v1.0\n slug \"idea\"\n goal \"later\"\n success_criteria [\"a\"]\n}\n"); p.write("spec/v1.0.spec", &text); let after = entry(&p, &[]); for key in ["total_phases", "current_phase", "progress"] { diff --git a/gsd/core/tests/cli/cmd_workstreams.rs b/gsd/core/tests/cli/cmd_workstreams.rs index eee2651fa4..a604233dd4 100644 --- a/gsd/core/tests/cli/cmd_workstreams.rs +++ b/gsd/core/tests/cli/cmd_workstreams.rs @@ -186,8 +186,8 @@ fn cleanup_lists_a_shipped_milestone_and_writes_nothing() { let p = project("workstreams"); p.edit( "spec/streams.spec", - " name \"Auth 1.0\"\n workstream auth\n", - " name \"Auth 1.0\"\n workstream auth\n completion { at 2026-10-29 }\n", + " workstream auth\n", + " workstream auth\n completion { at 2026-10-29 }\n", ); p.record_harness("auth/v1.0", "completion", "{\"at\":\"2026-10-29\"}"); let before = bytes(&p); diff --git a/gsd/core/tests/cli/collect.rs b/gsd/core/tests/cli/collect.rs index 2143b0db89..e34017ffb1 100644 --- a/gsd/core/tests/cli/collect.rs +++ b/gsd/core/tests/cli/collect.rs @@ -175,7 +175,7 @@ fn an_ambiguous_plan_scope_is_skipped() { let p = repository(); p.write( "spec/v2.0.spec", - "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\nrequirement SHARE-02 \"Share a board\" {\n text \"A board is shared by link\"\n category \"Sharing\"\n tier v2\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n name \"Sharing\"\n slug \"sharing\"\n goal \"Boards are shared\"\n requirements [SHARE-02]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Share link\" {\n phase v2.0/01\n type execute\n files_modified [\"src/share.js\"]\n requirements [SHARE-02]\n objective \"A board has a share link\"\n}\n\ntruth TR1 \"A link\" {\n plan v2.0/01/01-01\n text \"A board has a link\"\n}\n\nartifact AR1 \"Link\" {\n plan v2.0/01/01-01\n path \"src/share.js\"\n provides \"share()\"\n}\n", + "milestone v2.0 \"Taskboard 2.0\" {\n}\n\nrequirement SHARE-02 \"Share a board\" {\n text \"A board is shared by link\"\n category \"Sharing\"\n tier v2\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n slug \"sharing\"\n goal \"Boards are shared\"\n requirements [SHARE-02]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Share link\" {\n phase v2.0/01\n type execute\n files_modified [\"src/share.js\"]\n requirements [SHARE-02]\n objective \"A board has a share link\"\n}\n\ntruth TR1 \"A link\" {\n plan v2.0/01/01-01\n text \"A board has a link\"\n}\n\nartifact AR1 \"Link\" {\n plan v2.0/01/01-01\n path \"src/share.js\"\n provides \"share()\"\n}\n", ); assert_eq!(p.run(&["format", "spec"]).code, 0); p.commit(); diff --git a/gsd/core/tests/cli/commands_support.rs b/gsd/core/tests/cli/commands_support.rs index 70179c33b8..4a64e2ce77 100644 --- a/gsd/core/tests/cli/commands_support.rs +++ b/gsd/core/tests/cli/commands_support.rs @@ -125,6 +125,27 @@ pub fn refused(run: &Run, code: &str, words: &[&str]) { } } +/// What `specforge check` says of `code` (qualified, `gsd/W309`): whether the check failed, and the `(severity, +/// entity)` of each of its diagnostics, in report order. A settled-later finding a write reports stays in the project +/// until the step that settles it is written (ADR 0385), so the check reads it. +pub fn checked(p: &Project, code: &str) -> (bool, Vec<(String, String)>) { + let failed = p.run(&["check"]).code != 0; + let run = p.run(&["check", "--format", "json"]); + let found: serde_json::Value = serde_json::from_str(&run.stdout) + .unwrap_or_else(|e| panic!("check prints JSON ({e}): {}", run.all())); + let rows = found + .as_array() + .expect("a list of diagnostics") + .iter() + .filter(|d| d["code"] == code) + .map(|d| { + let text = |v: &serde_json::Value| v.as_str().unwrap_or_default().to_string(); + (text(&d["severity"]), text(&d["data"]["entity"])) + }) + .collect(); + (failed, rows) +} + /// The taskboard twin. pub fn twin() -> Project { taskboard() diff --git a/gsd/core/tests/cli/contexts.rs b/gsd/core/tests/cli/contexts.rs index 17ba0f90ce..be851b7fec 100644 --- a/gsd/core/tests/cli/contexts.rs +++ b/gsd/core/tests/cli/contexts.rs @@ -1,11 +1,15 @@ -//! The context routes `@gsd/core` declares (ADR 0356), read with `specforge context` on the parity fixtures: each -//! serves a subject of its kind; the checkers' packs digest as the inputs their judged rules read; the executor's keeps -//! every task of its plan and no file; the phase context holds what its discussion settled. +//! The context routes `@gsd/core` declares (ADR 0356, ADR 0386), read with `specforge context` on the parity fixtures +//! and on a real-size one: each serves a subject of its kind, its core whole and its enrich sections within its +//! allowance, its cap the floor a refusal names plus the allowance; the checkers' packs digest as the inputs their +//! judged rules read; the plan check reads the project's decisions, those its phase's research resolves and those its +//! tasks name as settling a door, never an unrelated phase's; the executor's keeps every task of its plan and no file, +//! and a real-size plan starts; the phase context holds what its discussion settled. use crate::cmd_execute::{PLANTED, SUMMARY}; use crate::commands_support::plant; -use crate::harness::{Project, ledger, taskboard, vault}; +use crate::harness::{Project, ledger, project, taskboard, vault}; use serde_json::Value; +use std::collections::BTreeMap; /// Every route and its subject kind. const ROUTES: [(&str, &str); 14] = [ @@ -25,7 +29,8 @@ const ROUTES: [(&str, &str); 14] = [ ("quick-context", "plan"), ]; -/// A milestone audit of `v1.0`: no fixture holds one, and the integration checker reads nothing else. +/// A milestone audit of `v1.0` (of a fixture's first milestone, replaced): no fixture holds one, and the integration +/// checker reads nothing else. const AUDIT: &str = "milestone_audit A1 \"Audit\" {\n milestone v1.0\n}\n"; /// `specforge context gsd/<route> <subject>`, its pack. @@ -84,21 +89,253 @@ fn input_digests(p: &Project, entity: &str, code: &str) -> Vec<(String, String)> .collect() } +/// The real-size fixture: the 100 project decisions of a real repository and one phase planned at the size a live run +/// met (one plan of 3 tasks, 11 truths, 7 artifacts, 3 key links and 5 prohibitions), beside a research and contexts. +fn real_size() -> Project { + project("real-size") +} + +/// Its plan and phase of that size. +const REAL_PLAN: &str = "v1.0.0/03/03-01"; +const REAL_PHASE: &str = "v1.0.0/03"; + +/// The most a route's core may cost in a fixture: a role reads its core whole, so a core past this is a route to trim. +const ROLE_CEILING: u64 = 100_000; + +/// Each route's allowance and its core sections, as `@gsd/core` declares them. +fn declared() -> BTreeMap<String, (u64, Vec<String>)> { + let host = specforge_extension_sdk::testing::MockHost::new(gsd_core::build()); + let contexts: Value = + serde_json::from_str(&host.describe_json("contexts").expect("contexts")).expect("JSON"); + contexts["items"] + .as_array() + .expect("items") + .iter() + .map(|route| { + let core = route["sections"] + .as_array() + .expect("sections") + .iter() + .filter(|s| s["tier"] != "enrich") + .map(|s| s["name"].as_str().expect("a name").to_string()) + .collect(); + let name = route["name"].as_str().expect("a name").to_string(); + (name, (route["budget"].as_u64().expect("a budget"), core)) + }) + .collect() +} + +/// The floor of `gsd/<route>`'s pack for `subject` as the host measures it, independently of a default read: a cap +/// of one token is refused (E062), and the refusal names the floor's cost. +fn floor(p: &Project, route: &str, subject: &str) -> u64 { + let run = p.run(&[ + "context", + &format!("gsd/{route}"), + subject, + "--max-tokens", + "1", + ]); + let all = run.all(); + assert!(run.code != 0 && all.contains("E062"), "{route}: {all}"); + let end = all + .find(" tokens: the envelope") + .unwrap_or_else(|| panic!("{route}: E062 names the floor: {all}")); + let start = all[..end].rfind('(').expect("the floor's parenthesis") + 1; + all[start..end] + .parse() + .unwrap_or_else(|e| panic!("{route}: a count ({e}): {all}")) +} + +/// A default read `pack` of `route` for `subject` measured: its cap is the floor E062 names plus the route's +/// allowance, its cost lies between the two, every core section is served and none truncated, and the core is under +/// the role ceiling. The core's cost. +fn measured( + p: &Project, + subject: &str, + pack: &Value, + route: &str, + (allowance, core): &(u64, Vec<String>), +) -> u64 { + let budget = &pack["budget"]; + let cap = budget["budget_tokens"].as_u64().expect("a cap"); + let estimated = budget["estimated_tokens"].as_u64().expect("an estimate"); + let floor = floor(p, route, subject); + assert_eq!(cap, floor + allowance, "{route}: {budget}"); + assert!(floor <= estimated && estimated <= cap, "{route}: {budget}"); + assert!(floor <= ROLE_CEILING, "{route}: a core of {floor} tokens"); + let served: Vec<&str> = pack["sections"] + .as_array() + .expect("sections") + .iter() + .map(|s| s["name"].as_str().expect("a name")) + .collect(); + let truncated = budget["truncated_sections"].as_array().expect("a list"); + for section in core { + assert!( + served.contains(§ion.as_str()), + "{route}: {section} not served" + ); + assert!( + !truncated.contains(&Value::from(section.as_str())), + "{route}: {section} cut" + ); + } + floor +} + #[test] -fn every_route_serves_a_subject_of_its_kind_in_each_fixture() { +fn every_route_serves_its_core_whole_within_its_allowance_in_each_fixture() { + let declared = declared(); let mut served = 0; - for p in [taskboard(), vault(), ledger()] { - p.write("spec/audit.spec", AUDIT); + for p in [taskboard(), vault(), ledger(), real_size()] { + let milestone = p.nodes_of("milestone")[0]["id"] + .as_str() + .expect("an id") + .to_string(); + p.write("spec/audit.spec", &AUDIT.replace("v1.0", &milestone)); for (route, kind) in ROUTES { let nodes = p.nodes_of(kind); let subject = nodes[0]["id"].as_str().expect("an id"); let pack = pack(&p, route, subject); assert_eq!(pack["route"], format!("gsd/{route}")); assert!(!digests(&pack).is_empty(), "{route}: {pack}"); + measured(&p, subject, &pack, route, &declared[route]); served += 1; } } - assert_eq!(served, 42); + assert_eq!(served, 56); +} + +#[test] +fn the_plan_checker_serves_a_real_size_plan_whole_where_a_fixed_budget_refused_it() { + let p = real_size(); + let pack = pack(&p, "plan-checker", REAL_PLAN); + let floor = measured( + &p, + REAL_PLAN, + &pack, + "plan-checker", + &declared()["plan-checker"], + ); + // The old route's fixed budget was 8000 tokens: the project's decisions alone cost more. + assert!(floor > 8000, "a core of {floor} tokens"); + assert_eq!(members(&pack, "project_decisions").len(), 100); + assert_eq!(digests(&pack), input_digests(&p, REAL_PLAN, "W311")); + // Only a cap the read states below the core is refused. + let capped = p.run(&[ + "context", + "gsd/plan-checker", + REAL_PLAN, + "--max-tokens", + "8000", + ]); + assert_ne!(capped.code, 0, "{}", capped.all()); + assert!(capped.all().contains("E062"), "{}", capped.all()); +} + +#[test] +fn the_plan_check_reads_the_project_decisions_and_those_its_phase_research_resolves() { + let p = real_size(); + let pack = pack(&p, "plan-checker", REAL_PLAN); + let mut resolved = members(&pack, "resolved_decisions"); + resolved.sort(); + assert_eq!(resolved, ["v1.0.0/02/D-01", "v1.0.0/03/D-02"]); + let phase: Vec<String> = members(&pack, "phase_decisions"); + assert_eq!(phase.len(), 4, "{phase:?}"); + assert!(members(&pack, "quick_decisions").is_empty()); + // A decision of another phase that answers no question of this one is read by no section, and moving it stales + // no plan check of this phase. + let read = |pack: &Value| -> Vec<String> { + [ + "phase_decisions", + "quick_decisions", + "project_decisions", + "resolved_decisions", + ] + .iter() + .flat_map(|section| members(pack, section)) + .collect() + }; + assert!(!read(&pack).contains(&"v1.0.0/02/D-02".to_string())); + let before = input_digests(&p, REAL_PLAN, "W311"); + unrelated_decision_edited(&p); + assert_eq!(input_digests(&p, REAL_PLAN, "W311"), before); +} + +/// Phase 02's decision D-02 reworded, its meaning kept. +fn unrelated_decision_edited(p: &Project) { + p.edit( + "spec/discuss.spec", + "Nodes are sorted by id and edges by source, label and target", + "Nodes are sorted by id, edges by source, label and target", + ); +} + +#[test] +fn the_plan_check_reads_the_decision_a_task_names_as_settling_its_door() { + let p = real_size(); + let settled = |p: &Project| members(&pack(p, "plan-checker", REAL_PLAN), "settled_decisions"); + assert_eq!(settled(&p), ["v1.0.0/02/D-01"]); + // Another phase's decision, answering no question of this phase's research: read once a task names it. + p.edit( + "spec/plans.spec", + "settled_by v1.0.0/02/D-01", + "settled_by v1.0.0/02/D-02", + ); + assert_eq!(settled(&p), ["v1.0.0/02/D-02"]); + let before = input_digests(&p, REAL_PLAN, "W311"); + unrelated_decision_edited(&p); + let after = input_digests(&p, REAL_PLAN, "W311"); + let moved: Vec<&str> = before + .iter() + .zip(&after) + .filter(|(was, now)| was != now) + .map(|(was, _)| was.0.as_str()) + .collect(); + assert_eq!(moved, ["settled_decisions"]); +} + +#[test] +fn start_plan_records_a_real_size_plans_executor_pack_and_only_a_stated_cap_refuses_it() { + let p = real_size(); + let read = pack(&p, "executor", REAL_PLAN); + let floor = measured(&p, REAL_PLAN, &read, "executor", &declared()["executor"]); + // The old route's fixed budget was 6000 tokens, below this plan's core: the record was refused. + assert!(floor > 6000, "a core of {floor} tokens"); + let run = p.run(&["gsd", "start-plan", REAL_PLAN]); + assert_eq!(run.code, 0, "{}", run.all()); + let record = &p.fields_of(REAL_PLAN)["context_pack"]; + assert_eq!(record["digest"], read["digest"], "{record}"); + // A read that states no cap records none: the record is read again under the route's allowance. + assert!(record.get("max_tokens").is_none(), "{record}"); + assert!( + !p.codes().contains(&"gsd/W524".to_string()), + "{:?}", + p.codes() + ); + let refused = p.run(&["gsd", "start-plan", REAL_PLAN, "--max-tokens", "100"]); + assert_ne!(refused.code, 0, "{}", refused.all()); + assert!( + refused.all().contains("record_refused"), + "{}", + refused.all() + ); +} + +#[test] +fn the_real_size_phase_is_served_whole_to_the_roles_that_read_it() { + let p = real_size(); + let declared = declared(); + for route in [ + "planner", + "verifier", + "phase-researcher", + "nyquist-auditor", + "phase-context", + ] { + let pack = pack(&p, route, REAL_PHASE); + measured(&p, REAL_PHASE, &pack, route, &declared[route]); + } } #[test] diff --git a/gsd/core/tests/cli/discuss.rs b/gsd/core/tests/cli/discuss.rs index d9d932daf3..60db0dcb4e 100644 --- a/gsd/core/tests/cli/discuss.rs +++ b/gsd/core/tests/cli/discuss.rs @@ -47,7 +47,7 @@ fn two_phases_may_each_have_a_d_01() { p.write( "spec/v1.0.spec", &(fixture("v1.0.spec") - + "\nphase 03 \"Sharing\" {\n milestone v1.0\n name \"Sharing\"\n slug \"sharing\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n"), + + "\nphase 03 \"Sharing\" {\n milestone v1.0\n slug \"sharing\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n"), ); p.write( "spec/more.spec", diff --git a/gsd/core/tests/cli/estimate_error.rs b/gsd/core/tests/cli/estimate_error.rs index 1ba34964f1..e5555c4f38 100644 --- a/gsd/core/tests/cli/estimate_error.rs +++ b/gsd/core/tests/cli/estimate_error.rs @@ -101,10 +101,10 @@ fn report_json(p: &Project) -> Value { /// The progress report of the unedited twin, byte for byte as it printed before a plan was measured. const UNMEASURED: &str = "\ -01 Complete 2/2 plans core -02 Planned 0/1 plans persistence -02.1 Pending 0/0 plans hotfix titles survive a reload -03 Pending 0/0 plans listing +01 Complete 2/2 plans Core +02 Planned 0/1 plans Persistence +02.1 Pending 0/0 plans Hotfix: titles survive a reload +03 Pending 0/0 plans Listing 67% of plans have a summary "; diff --git a/gsd/core/tests/cli/harness.rs b/gsd/core/tests/cli/harness.rs index 09bebe1d95..5810be02bd 100644 --- a/gsd/core/tests/cli/harness.rs +++ b/gsd/core/tests/cli/harness.rs @@ -489,6 +489,14 @@ impl Project { graph["nodes"][0]["fields"].clone() } + /// The title of the entity `id`, as `specforge query` prints it: a phase's and a milestone's name (ADR 0387). + pub fn title_of(&self, id: &str) -> serde_json::Value { + let query = self.run(&["query", id, "--depth", "0", "--format", "json"]); + let graph: serde_json::Value = serde_json::from_str(&query.stdout) + .unwrap_or_else(|e| panic!("query is JSON ({e}): {}", query.all())); + graph["nodes"][0]["title"].clone() + } + /// The nodes of `kind` in the graph, as `specforge export --format graph` writes them. pub fn nodes_of(&self, kind: &str) -> Vec<serde_json::Value> { let run = self.run(&["export", "--format", "graph"]); diff --git a/gsd/core/tests/cli/hooks_community.rs b/gsd/core/tests/cli/hooks_community.rs index b304485ebe..14709163c6 100644 --- a/gsd/core/tests/cli/hooks_community.rs +++ b/gsd/core/tests/cli/hooks_community.rs @@ -232,7 +232,7 @@ fn session_start_injects_the_progress_line() { "{host}: {text}" ); assert!( - text.contains("phase 02 persistence: 1 plan(s), 0 summary(ies)"), + text.contains("phase 02 Persistence: 1 plan(s), 0 summary(ies)"), "{host}: {text}" ); assert!(text.contains("Active workstream: ui"), "{host}: {text}"); diff --git a/gsd/core/tests/cli/hooks_statusline.rs b/gsd/core/tests/cli/hooks_statusline.rs index 7a72303bd6..b21efe38c4 100644 --- a/gsd/core/tests/cli/hooks_statusline.rs +++ b/gsd/core/tests/cli/hooks_statusline.rs @@ -89,7 +89,10 @@ fn statusline_answers_on_claude_code() { let progress = golden("state-json")["progress"].clone(); assert!(out.starts_with("Opus 4 │ "), "{out}"); assert!(out.contains("v1.0"), "{out}"); - assert!(out.contains("persistence"), "{out}"); + assert!( + out.contains("· Persistence ("), + "the phase is named by its title: {out}" + ); let counts = format!( "{}/{}", progress["completed_phases"], progress["total_phases"] diff --git a/gsd/core/tests/cli/judged.rs b/gsd/core/tests/cli/judged.rs index f93e65dce2..b1c3683041 100644 --- a/gsd/core/tests/cli/judged.rs +++ b/gsd/core/tests/cli/judged.rs @@ -498,7 +498,7 @@ fn e518_reads_only_its_milestones_requirements() { let p = project("execute"); p.write( "spec/v2.spec", - "milestone v2.0 \"Two\" {\n name \"Two\"\n}\n\nphase 01 \"Next\" {\n milestone v2.0\n name \"Next\"\n slug \"next\"\n goal \"Later\"\n requirements [OTHER-01]\n success_criteria [\"Done\"]\n}\n\nrequirement OTHER-01 \"Other\" {\n text \"Another milestone\"\n category \"Other\"\n tier v1\n}\n\nmilestone_audit A1 \"A\" {\n milestone v1.0\n}\n", + "milestone v2.0 \"Two\" {\n}\n\nphase 01 \"Next\" {\n milestone v2.0\n slug \"next\"\n goal \"Later\"\n requirements [OTHER-01]\n success_criteria [\"Done\"]\n}\n\nrequirement OTHER-01 \"Other\" {\n text \"Another milestone\"\n category \"Other\"\n tier v1\n}\n\nmilestone_audit A1 \"A\" {\n milestone v1.0\n}\n", ); let audit = "v1.0/A1"; let run = p.record(audit, "E518", "passed", &[]); diff --git a/gsd/core/tests/cli/main.rs b/gsd/core/tests/cli/main.rs index e28d3e46f5..e2d98ccd6c 100644 --- a/gsd/core/tests/cli/main.rs +++ b/gsd/core/tests/cli/main.rs @@ -259,7 +259,7 @@ fn two_milestones_may_each_have_a_phase_01() { let p = project("roadmap"); p.write( "spec/v2.0.spec", - "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n name \"Sharing\"\n slug \"sharing\"\n goal \"Boards are shared\"\n success_criteria [\"a\", \"b\"]\n}\n", + "milestone v2.0 \"Taskboard 2.0\" {\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n slug \"sharing\"\n goal \"Boards are shared\"\n success_criteria [\"a\", \"b\"]\n}\n", ); let check = p.run(&["check"]); assert_eq!(check.code, 0, "check: {}", check.all()); @@ -274,7 +274,7 @@ fn an_ambiguous_short_form_names_each_candidate() { let p = project("roadmap"); p.write( "spec/v2.0.spec", - "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n name \"Sharing\"\n slug \"sharing\"\n goal \"Boards are shared\"\n success_criteria [\"a\", \"b\"]\n}\n", + "milestone v2.0 \"Taskboard 2.0\" {\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n slug \"sharing\"\n goal \"Boards are shared\"\n success_criteria [\"a\", \"b\"]\n}\n", ); let query = p.run(&["query", "01", "--depth", "0", "--format", "brief"]); assert_ne!( @@ -296,7 +296,7 @@ fn a_milestone_in_a_workstream_is_named_by_its_workstream() { // `v1.0` of the workstream is a second milestone beside the project's own `v1.0`. p.write( "spec/learning.spec", - "workstream auth-rework \"Auth rework\" {\n purpose \"Replace the session store\"\n}\n\nmilestone v1.0 \"Auth rework 1.0\" {\n name \"Auth rework 1.0\"\n workstream auth-rework\n}\n\nphase 01 \"Store\" {\n milestone auth-rework/v1.0\n name \"Store\"\n slug \"store\"\n goal \"The store is replaced\"\n success_criteria [\"a\", \"b\"]\n}\n", + "workstream auth-rework \"Auth rework\" {\n purpose \"Replace the session store\"\n}\n\nmilestone v1.0 \"Auth rework 1.0\" {\n workstream auth-rework\n}\n\nphase 01 \"Store\" {\n milestone auth-rework/v1.0\n slug \"store\"\n goal \"The store is replaced\"\n success_criteria [\"a\", \"b\"]\n}\n", ); let check = p.run(&["check"]); assert_eq!(check.code, 0, "check: {}", check.all()); diff --git a/gsd/core/tests/cli/parity_ledger.rs b/gsd/core/tests/cli/parity_ledger.rs index b2bfaf9e45..fa2c2bc154 100644 --- a/gsd/core/tests/cli/parity_ledger.rs +++ b/gsd/core/tests/cli/parity_ledger.rs @@ -205,7 +205,7 @@ fn the_twin_holds_what_its_planning_holds() { let mut twin_phases: Vec<String> = p .nodes_of("phase") .iter() - .map(|n| text(n, "name")) + .map(|n| n["title"].as_str().expect("a title").to_string()) .collect(); twin_phases.sort(); let mut twin_truths: Vec<(String, String)> = p diff --git a/gsd/core/tests/cli/parity_plans.rs b/gsd/core/tests/cli/parity_plans.rs index 2828d9ad5e..6641563e0c 100644 --- a/gsd/core/tests/cli/parity_plans.rs +++ b/gsd/core/tests/cli/parity_plans.rs @@ -206,11 +206,15 @@ pub(super) fn without_decision(p: &Project, name: &str) { ); } +/// The decision each E310 names: the finding is on the phase, and its message names the decision first. pub(super) fn e310_ids(p: &Project) -> Vec<String> { diagnostics(p) .iter() .filter(|(c, ..)| c == "gsd/E310") - .map(|(_, entity, _)| entity.rsplit('/').next().unwrap_or_default().to_string()) + .map(|(_, _, message)| { + let decision = message.split('\'').nth(1).unwrap_or_default(); + decision.rsplit('/').next().unwrap_or_default().to_string() + }) .collect() } @@ -226,8 +230,8 @@ fn gate_cutover_plan_verdicts_reproduce() { ] ); - // Decision coverage: the uncovered ids are the E310 entities. The project's plans cite their decisions by id in - // their prose, as upstream's fixture does; the verdicts' items are equal. + // Decision coverage: the uncovered ids are the decisions the E310s name. The project's plans cite their decisions + // by id in their prose, as upstream's fixture does; the verdicts' items are equal. let uncovered: Vec<String> = printed("decision-coverage-plan-uncovered")["uncovered"] .as_array() .expect("uncovered") diff --git a/gsd/core/tests/cli/parity_roadmap.rs b/gsd/core/tests/cli/parity_roadmap.rs index c9937731e9..9c51d7c46f 100644 --- a/gsd/core/tests/cli/parity_roadmap.rs +++ b/gsd/core/tests/cli/parity_roadmap.rs @@ -141,7 +141,7 @@ fn taskboard_roadmap_matches_gsd_tools() { .expect("an id") .trim_start_matches("v1.0/") .to_string(), - &n["fields"], + n, ) }) .collect(); @@ -160,9 +160,10 @@ fn taskboard_roadmap_matches_gsd_tools() { } for gsd in gsd_phases { let number = padded(gsd["number"].as_str().expect("a number")); - let Some(fields) = twin.get(&number) else { + let Some(node) = twin.get(&number) else { continue; }; + let fields = &node["fields"]; let mut compare = |what: &str, gsd_value: String, twin_value: String| { if gsd_value != twin_value { mismatches.push(format!( @@ -170,10 +171,11 @@ fn taskboard_roadmap_matches_gsd_tools() { )); } }; + // GSD's heading name is the phase's title (ADR 0387). compare( "name", gsd["name"].as_str().unwrap_or_default().into(), - fields["name"].as_str().unwrap_or_default().into(), + node["title"].as_str().unwrap_or_default().into(), ); compare( "goal", diff --git a/gsd/core/tests/cli/plan.rs b/gsd/core/tests/cli/plan.rs index a46e8ed27e..fa0e096dbc 100644 --- a/gsd/core/tests/cli/plan.rs +++ b/gsd/core/tests/cli/plan.rs @@ -41,7 +41,7 @@ fn two_phases_may_each_have_a_plan_01() { let p = project("plan"); p.write( "spec/v2.0.spec", - "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\nrequirement SHARE-02 \"Share a board\" {\n text \"A board is shared by link\"\n category \"Sharing\"\n tier v2\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n name \"Sharing\"\n slug \"sharing\"\n goal \"Boards are shared\"\n requirements [SHARE-02]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Share link\" {\n phase v2.0/01\n type execute\n files_modified [\"src/share.js\"]\n requirements [SHARE-02]\n objective \"A board has a share link\"\n}\n\ntruth TR1 \"A link\" {\n plan v2.0/01/01-01\n text \"A board has a link\"\n}\n\nartifact AR1 \"Link\" {\n plan v2.0/01/01-01\n path \"src/share.js\"\n provides \"share()\"\n}\n", + "milestone v2.0 \"Taskboard 2.0\" {\n}\n\nrequirement SHARE-02 \"Share a board\" {\n text \"A board is shared by link\"\n category \"Sharing\"\n tier v2\n}\n\nphase 01 \"Sharing\" {\n milestone v2.0\n slug \"sharing\"\n goal \"Boards are shared\"\n requirements [SHARE-02]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Share link\" {\n phase v2.0/01\n type execute\n files_modified [\"src/share.js\"]\n requirements [SHARE-02]\n objective \"A board has a share link\"\n}\n\ntruth TR1 \"A link\" {\n plan v2.0/01/01-01\n text \"A board has a link\"\n}\n\nartifact AR1 \"Link\" {\n plan v2.0/01/01-01\n path \"src/share.js\"\n provides \"share()\"\n}\n", ); assert_eq!(p.codes(), Vec::<String>::new()); for name in ["v1.0/01/01-01", "v2.0/01/01-01"] { @@ -244,7 +244,7 @@ fn the_readme_example_checks_clean() { let p = project("plan"); p.write( "spec/auth.spec", - "requirement AUTH-02 \"Sessions\" {\n text \"A user has a session\"\n category \"Auth\"\n tier v1\n}\n\nrequirement AUTH-03 \"Rotation\" {\n text \"A session token rotates\"\n category \"Auth\"\n tier v1\n}\n\nphase 03 \"Auth\" {\n milestone v1.0\n name \"Auth\"\n slug \"auth\"\n goal \"Users sign in\"\n depends_on [02]\n requirements [AUTH-02, AUTH-03]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 03-01 \"Sign-in\" {\n phase 03\n type execute\n files_modified [\"src/auth/signin.ts\"]\n requirements [AUTH-02]\n objective \"Users sign in\"\n}\n\ntruth TR1 \"A user signs in\" {\n plan 03-01\n text \"A user signs in\"\n}\n\nartifact AR1 \"Sign-in\" {\n plan 03-01\n path \"src/auth/signin.ts\"\n provides \"sign-in\"\n}\n", + "requirement AUTH-02 \"Sessions\" {\n text \"A user has a session\"\n category \"Auth\"\n tier v1\n}\n\nrequirement AUTH-03 \"Rotation\" {\n text \"A session token rotates\"\n category \"Auth\"\n tier v1\n}\n\nphase 03 \"Auth\" {\n milestone v1.0\n slug \"auth\"\n goal \"Users sign in\"\n depends_on [02]\n requirements [AUTH-02, AUTH-03]\n success_criteria [\"a\", \"b\"]\n}\n\nplan 03-01 \"Sign-in\" {\n phase 03\n type execute\n files_modified [\"src/auth/signin.ts\"]\n requirements [AUTH-02]\n objective \"Users sign in\"\n}\n\ntruth TR1 \"A user signs in\" {\n plan 03-01\n text \"A user signs in\"\n}\n\nartifact AR1 \"Sign-in\" {\n plan 03-01\n path \"src/auth/signin.ts\"\n provides \"sign-in\"\n}\n", ); p.write("spec/readme.spec", &format!("{block}\n")); p.check_exact(&[]); diff --git a/gsd/core/tests/cli/plan_rules.rs b/gsd/core/tests/cli/plan_rules.rs index 4ca1ac92a8..952ec13424 100644 --- a/gsd/core/tests/cli/plan_rules.rs +++ b/gsd/core/tests/cli/plan_rules.rs @@ -438,7 +438,7 @@ fn an_unplanned_phase_is_not_w317() { let p = project("plan"); p.write( "spec/third.spec", - "requirement SYNC-01 \"Sync\" {\n text \"Tasks sync\"\n category \"Sync\"\n tier v1\n}\n\nphase 03 \"Sync\" {\n milestone v1.0\n name \"Sync\"\n slug \"sync\"\n goal \"Tasks sync between machines\"\n depends_on [02]\n requirements [SYNC-01]\n success_criteria [\"a\", \"b\"]\n}\n", + "requirement SYNC-01 \"Sync\" {\n text \"Tasks sync\"\n category \"Sync\"\n tier v1\n}\n\nphase 03 \"Sync\" {\n milestone v1.0\n slug \"sync\"\n goal \"Tasks sync between machines\"\n depends_on [02]\n requirements [SYNC-01]\n success_criteria [\"a\", \"b\"]\n}\n", ); assert_eq!(p.codes(), CLEAN); } @@ -466,7 +466,7 @@ fn an_unplanned_phase_is_not_e301() { let p = project("plan"); p.write( "spec/third.spec", - "requirement SYNC-01 \"Sync\" {\n text \"Tasks sync\"\n category \"Sync\"\n tier v1\n}\n\nphase 03 \"Sync\" {\n milestone v1.0\n name \"Sync\"\n slug \"sync\"\n goal \"Tasks sync between machines\"\n depends_on [02]\n requirements [SYNC-01]\n success_criteria [\"a\", \"b\"]\n}\n\ncontext 03-CONTEXT \"Sync context\" {\n phase v1.0/03\n gathered 2026-10-28\n boundary \"Sync\"\n canonical_refs [{ topic \"No external specs: none\" paths [] }]\n}\n\ndecision D-01 \"Sync by file\" {\n phase v1.0/03\n text \"Tasks sync through one shared file\"\n origin context\n}\n", + "requirement SYNC-01 \"Sync\" {\n text \"Tasks sync\"\n category \"Sync\"\n tier v1\n}\n\nphase 03 \"Sync\" {\n milestone v1.0\n slug \"sync\"\n goal \"Tasks sync between machines\"\n depends_on [02]\n requirements [SYNC-01]\n success_criteria [\"a\", \"b\"]\n}\n\ncontext 03-CONTEXT \"Sync context\" {\n phase v1.0/03\n gathered 2026-10-28\n boundary \"Sync\"\n canonical_refs [{ topic \"No external specs: none\" paths [] }]\n}\n\ndecision D-01 \"Sync by file\" {\n phase v1.0/03\n text \"Tasks sync through one shared file\"\n origin context\n}\n", ); assert_eq!(p.codes(), CLEAN, "an unplanned phase has nothing to cover"); } diff --git a/gsd/core/tests/cli/progress.rs b/gsd/core/tests/cli/progress.rs index a725ee26d9..1970229859 100644 --- a/gsd/core/tests/cli/progress.rs +++ b/gsd/core/tests/cli/progress.rs @@ -100,7 +100,7 @@ fn an_inserted_and_a_backlog_phase_are_flagged() { append( &p, "spec/v1.0.spec", - "phase 999.1 \"Someday\" {\n milestone v1.0\n name \"Someday\"\n slug \"someday\"\n goal \"Later\"\n success_criteria [\"a\", \"b\"]\n}\n", + "phase 999.1 \"Someday\" {\n milestone v1.0\n slug \"someday\"\n goal \"Later\"\n success_criteria [\"a\", \"b\"]\n}\n", ); let flags = |id: &str| (field(&p, id, "inserted"), field(&p, id, "backlog")); assert_eq!(flags("v1.0/02"), (json!(false), json!(false))); @@ -220,7 +220,7 @@ fn a_workstream_is_complete_when_its_milestones_shipped() { append( &p, "spec/v1.0.spec", - "workstream auth \"Auth\" {\n purpose \"Replace the store\"\n}\n\nmilestone v1.0 \"Auth 1.0\" {\n name \"Auth 1.0\"\n workstream auth\n completion { at 2026-10-30 }\n}\n", + "workstream auth \"Auth\" {\n purpose \"Replace the store\"\n}\n\nmilestone v1.0 \"Auth 1.0\" {\n workstream auth\n completion { at 2026-10-30 }\n}\n", ); p.record_harness("auth/v1.0", "completion", "{\"at\":\"2026-10-30\"}"); assert_eq!( diff --git a/gsd/core/tests/cli/prompts_discuss.rs b/gsd/core/tests/cli/prompts_discuss.rs index 6658e2d1d3..8a4be2807a 100644 --- a/gsd/core/tests/cli/prompts_discuss.rs +++ b/gsd/core/tests/cli/prompts_discuss.rs @@ -178,7 +178,7 @@ fn the_shell_ids_skip_an_abandoned_milestone() { let p = twin(); p.write( "spec/v0.spec", - "milestone v0.5 \"Dropped\" {\n name \"Dropped\"\n abandoned { reason \"dropped\" ruled_by \"tester\" at 2026-10-01 }\n}\n", + "milestone v0.5 \"Dropped\" {\n abandoned { reason \"dropped\" ruled_by \"tester\" at 2026-10-01 }\n}\n", ); let text = text_of(&payload(&prompt( &p, diff --git a/gsd/core/tests/cli/prompts_gates.rs b/gsd/core/tests/cli/prompts_gates.rs index 0e25f1c332..1cc6cb01d1 100644 --- a/gsd/core/tests/cli/prompts_gates.rs +++ b/gsd/core/tests/cli/prompts_gates.rs @@ -241,7 +241,7 @@ fn e516_a_stale_verdict_refuses_complete_milestone_and_ship_under_strict() { let p = ready(); p.write( "spec/next.spec", - "milestone v2.0 \"N\" {\n name \"N\"\n}\n\nphase 01 \"Next\" {\n milestone v2.0\n name \"Next\"\n slug \"next\"\n goal \"Do more\"\n success_criteria [\"More is done\"]\n}\n\nplan 01-01 \"Q\" {\n phase v2.0/01\n type execute\n objective \"Do more\"\n}\n", + "milestone v2.0 \"N\" {\n}\n\nphase 01 \"Next\" {\n milestone v2.0\n slug \"next\"\n goal \"Do more\"\n success_criteria [\"More is done\"]\n}\n\nplan 01-01 \"Q\" {\n phase v2.0/01\n type execute\n objective \"Do more\"\n}\n", ); stale_plan_check(&p, "v2.0/01/01-01"); assert_eq!( @@ -350,6 +350,103 @@ fn the_convergence_gates_are_the_planning_gates() { } } +/// A half-planned phase is not executed (ADR 0385): its plans written one at a time leave findings a later plan +/// settles, and `execute_phase` gates on them. On the taskboard's planless phase v1.0/03, with a decision of its +/// context, plan 03-01 written alone (TASK-03, citing nothing) leaves LIST-01 in no plan (gsd/E301) and the decision +/// uncited (gsd/E310): the prompt is refused by both. Under gsd-strict the plan's missing must-haves (gsd/W309) refuse +/// it too. Plan 03-02, holding LIST-01 and citing the decision, clears E301 and E310, and the must-haves clear W309. +#[test] +fn e301_e310_w309_a_half_planned_phase_refuses_execute_phase() { + let p = twin(); + let phase = "v1.0/03"; + let run = |args: &[&str]| { + let run = p.run(args); + assert_eq!(run.code, 0, "{args:?}: {}", run.all()); + }; + run(&[ + "new", + "decision", + "D-01", + "Lists are sorted by id", + "--in", + "spec/plans/03-01.spec", + "--phase", + phase, + "--text", + "Lists are sorted by id", + "--origin", + "context", + ]); + let plan = |id: &str, requirement: &str, objective: &str| { + run(&[ + "new", + "plan", + id, + objective, + "--in", + &format!("spec/plans/{id}.spec"), + "--phase", + phase, + "--type", + "execute", + "--files_modified", + "src/cli.js", + "--requirements", + requirement, + "--objective", + objective, + ]); + }; + plan("03-01", "TASK-03", "List open tasks"); + for code in ["E301", "E310"] { + refused_by(&p, "execute_phase", &[phase], code); + } + not_refused_by(&p, "execute_phase", &[phase], "W309"); + strict(&p); + refused_by(&p, "execute_phase", &[phase], "W309"); + p.settings(json!({})); + + plan("03-02", "LIST-01", "Filter tasks as D-01 sorts them"); + for code in ["E301", "E310"] { + not_refused_by(&p, "execute_phase", &[phase], code); + } + strict(&p); + refused_by(&p, "execute_phase", &[phase], "W309"); + for id in ["03-01", "03-02"] { + let plan = format!("{phase}/{id}"); + let file = format!("spec/plans/{id}.spec"); + run(&[ + "new", + "truth", + "TR1", + "Tasks list", + "--in", + &file, + "--plan", + &plan, + "--text", + "Tasks list", + ]); + run(&[ + "new", + "artifact", + "AR1", + "The command", + "--in", + &file, + "--plan", + &plan, + "--field", + "path=src/cli.js", + "--provides", + "the command", + ]); + } + for code in ["E301", "E310", "W309"] { + not_refused_by(&p, "execute_phase", &[phase], code); + } +} + /// A refusal leaves a project exactly as it was, whatever it asked for (`gate_failed` is not a partial write). #[test] fn a_refusal_in_the_twin_writes_nothing() { diff --git a/gsd/core/tests/cli/prompts_git.rs b/gsd/core/tests/cli/prompts_git.rs index 72866cc4c9..cea9f10b2f 100644 --- a/gsd/core/tests/cli/prompts_git.rs +++ b/gsd/core/tests/cli/prompts_git.rs @@ -89,7 +89,7 @@ fn two_milestones(closed: bool) -> Project { p.write( "spec/v2.spec", &format!( - "milestone v2.0 \"Next\" {{\n name \"Next\"\n{ruling}}}\n\nphase 01 \"Next one\" {{\n milestone v2.0\n name \"Next one\"\n slug \"next-one\"\n goal \"g\"\n success_criteria [\"a\"]\n}}\n" + "milestone v2.0 \"Next\" {{\n{ruling}}}\n\nphase 01 \"Next one\" {{\n milestone v2.0\n slug \"next-one\"\n goal \"g\"\n success_criteria [\"a\"]\n}}\n" ), ); p diff --git a/gsd/core/tests/cli/prompts_plan.rs b/gsd/core/tests/cli/prompts_plan.rs index ab7b78d757..a7be5d7fb1 100644 --- a/gsd/core/tests/cli/prompts_plan.rs +++ b/gsd/core/tests/cli/prompts_plan.rs @@ -387,7 +387,7 @@ fn the_picked_phase_is_in_the_milestone_the_report_is_about() { let plans = p.read("spec/plans.spec"); p.write( "spec/plans.spec", - &format!("{plans}\nmilestone v2.0 \"Taskboard 2.0\" {{\n name \"Taskboard 2.0\"\n}}\n\nphase 01 \"Later\" {{\n milestone v2.0\n name \"Later\"\n slug \"later\"\n goal \"Later.\"\n requirements [TASK-01]\n success_criteria [\"x\"]\n}}\n"), + &format!("{plans}\nmilestone v2.0 \"Taskboard 2.0\" {{\n}}\n\nphase 01 \"Later\" {{\n milestone v2.0\n slug \"later\"\n goal \"Later.\"\n requirements [TASK-01]\n success_criteria [\"x\"]\n}}\n"), ); let report = json(&p.run(&["gsd", "progress-report", "--format", "json"])); let picked = payload(&prompt(&p, "plan_phase", &[], "claude-code")); diff --git a/gsd/core/tests/cli/prompts_review.rs b/gsd/core/tests/cli/prompts_review.rs index 43086355b1..2623076807 100644 --- a/gsd/core/tests/cli/prompts_review.rs +++ b/gsd/core/tests/cli/prompts_review.rs @@ -64,7 +64,7 @@ fn the_backlog_review_lists_and_promotes_across_milestones() { let p = backlogged(); p.write( "spec/n.spec", - "milestone v1.1 \"N\" {\n name \"N\"\n}\n\nphase 01 \"P01\" {\n milestone v1.1\n name \"P01\"\n slug \"p01\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n", + "milestone v1.1 \"N\" {\n}\n\nphase 01 \"P01\" {\n milestone v1.1\n slug \"p01\"\n goal \"g\"\n success_criteria [\"a\"]\n}\n", ); let text = text_of(&payload(&prompt(&p, "review_backlog", &[], "claude-code"))); assert!( diff --git a/gsd/core/tests/cli/quick_context.rs b/gsd/core/tests/cli/quick_context.rs index 796bc2f74d..5d2d72d62d 100644 --- a/gsd/core/tests/cli/quick_context.rs +++ b/gsd/core/tests/cli/quick_context.rs @@ -43,7 +43,7 @@ fn a_context_naming_both_a_phase_and_a_plan_is_e206() { let p = project("quick-context"); p.write( "spec/v1.0.spec", - "milestone v1.0 \"One\" {\n name \"One\"\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n name \"Core\"\n slug \"core\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n", + "milestone v1.0 \"One\" {\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n slug \"core\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n", ); p.edit( QUICK, @@ -64,7 +64,7 @@ fn a_context_of_a_phases_plan_is_e206() { let p = project("quick-context"); p.write( "spec/v1.0.spec", - "milestone v1.0 \"One\" {\n name \"One\"\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n name \"Core\"\n slug \"core\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Core plan\" {\n phase v1.0/01\n type execute\n files_modified [\"src/a.js\"]\n objective \"o\"\n}\n", + "milestone v1.0 \"One\" {\n}\n\nphase 01 \"Core\" {\n milestone v1.0\n slug \"core\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n\nplan 01-01 \"Core plan\" {\n phase v1.0/01\n type execute\n files_modified [\"src/a.js\"]\n objective \"o\"\n}\n", ); p.edit( QUICK, diff --git a/gsd/core/tests/cli/roadmap.rs b/gsd/core/tests/cli/roadmap.rs index e446bfc1aa..f8c3515171 100644 --- a/gsd/core/tests/cli/roadmap.rs +++ b/gsd/core/tests/cli/roadmap.rs @@ -11,7 +11,8 @@ fn roadmap_errors_report_each_code_once() { assert_eq!( codes, [ - "gsd/E101", "gsd/E101", "gsd/E102", "gsd/E102", "gsd/E102", "gsd/E105", "gsd/W104" + "gsd/E101", "gsd/E101", "gsd/E102", "gsd/E102", "gsd/E102", "gsd/E105", "gsd/W104", + "gsd/W109" ], "{found:#?}" ); @@ -28,6 +29,7 @@ fn roadmap_errors_report_each_code_once() { "phase 'v1.0/05' is on a dependency cycle", "requirement 'GONE-01' is out of scope but gives no reason", "phase numbers skip 03, before 'v1.0/04'", + "phase 'v1.0/02' is titled 'Phase 02: Second', which begins with the phase number 'Phase 02'", ] { assert!(text.contains(expected), "missing `{expected}` in:\n{text}"); } @@ -53,7 +55,7 @@ fn a_second_project_is_e108() { fn phase_spec(number: &str) -> String { format!( - "phase {number} \"P{number}\" {{\n milestone v1.0\n name \"P{number}\"\n slug \"p\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}}\n\n" + "phase {number} \"P{number}\" {{\n milestone v1.0\n slug \"p\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}}\n\n" ) } @@ -89,7 +91,7 @@ fn a_far_phase_number_is_one_warning() { fn phase_with_criteria(number: &str, criteria: &[&str]) -> String { let items: Vec<String> = criteria.iter().map(|c| format!("{c:?}")).collect(); format!( - "phase {number} \"P{number}\" {{\n milestone v1.0\n name \"P{number}\"\n slug \"p\"\n goal \"g\"\n success_criteria [{}]\n}}\n", + "phase {number} \"P{number}\" {{\n milestone v1.0\n slug \"p\"\n goal \"g\"\n success_criteria [{}]\n}}\n", items.join(", ") ) } @@ -151,6 +153,101 @@ fn w103_is_an_error_under_gsd_strict() { assert!(check.all().contains("W103"), "check: {}", check.all()); } +fn titled_phase(number: &str, title: &str) -> String { + format!( + "phase {number} {title:?} {{\n milestone v1.0\n slug \"p\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}}\n\n" + ) +} + +/// A phase is labelled `Phase <its id's last segment>: <title>` (ADR 0387): a title that begins with a phase number +/// prints a second one, which a renumber leaves behind. +#[test] +fn a_numbered_phase_title_is_w109() { + let p = project("roadmap"); + p.write( + "spec/more.spec", + &[ + titled_phase("02", "Phase 12: Graph Protocol"), + titled_phase("03", "3. Listing"), + ] + .concat(), + ); + let found = p.findings(); + let codes: Vec<&str> = found.iter().map(|(code, _)| code.as_str()).collect(); + assert_eq!(codes, ["gsd/W109", "gsd/W109"], "{found:#?}"); + assert!( + found[0].1.contains( + "phase 'v1.0/02' is titled 'Phase 12: Graph Protocol', which begins with the phase number 'Phase 12'" + ), + "{found:#?}" + ); + let check = p.run(&["check", "--format", "json"]); + assert!( + check.stdout.contains( + "retitle it 'Graph Protocol': its label then reads 'Phase 02: Graph Protocol'" + ), + "the suggestion names the title without its number: {}", + check.all() + ); + assert_eq!(p.run(&["check"]).code, 0, "a warning under gsd-compat"); +} + +#[test] +fn a_title_with_a_number_inside_is_not_w109() { + let p = project("roadmap"); + p.write( + "spec/more.spec", + &[ + titled_phase("02", "HTTP 2 support"), + titled_phase("03", "2FA login"), + titled_phase("04", "v2.0 migration"), + ] + .concat(), + ); + assert_eq!(p.findings(), []); +} + +#[test] +fn w109_is_an_error_under_gsd_strict_and_gsd_plus() { + for profile in ["gsd-strict", "gsd-plus"] { + let p = project("roadmap"); + p.write( + "spec/more.spec", + &titled_phase("02", "Phase 2: Persistence"), + ); + p.settings(serde_json::json!({ "profile": profile })); + let check = p.run(&["check"]); + assert_eq!(check.code, 1, "{profile}: {}", check.all()); + assert!(check.all().contains("W109"), "{profile}: {}", check.all()); + } +} + +/// `phase` and `milestone` declare no `name` (ADR 0387): a project written for the old declaration is told, by the +/// kernel's W020 on each line, that the field is not its kind's. +#[test] +fn a_name_line_on_a_phase_or_a_milestone_is_w020() { + let p = project("roadmap"); + p.write( + "spec/more.spec", + "milestone v2.0 \"Taskboard 2.0\" {\n name \"Taskboard 2.0\"\n}\n\nphase 02 \"Listing\" {\n milestone v1.0\n \ + name \"Listing\"\n slug \"listing\"\n goal \"g\"\n success_criteria [\"a\", \"b\"]\n}\n", + ); + let w020: Vec<String> = p + .checked() + .into_iter() + .filter(|(code, _)| code.ends_with("W020")) + .map(|(_, message)| message) + .collect(); + assert_eq!(w020.len(), 2, "{w020:#?}"); + for (entity, kind) in [("v2.0", "milestone"), ("v1.0/02", "phase")] { + assert!( + w020.iter() + .any(|m| m.contains("name") && m.contains(entity)), + "no W020 on {kind} {entity}'s name: {w020:#?}" + ); + } +} + #[test] fn a_phase_with_two_contexts_is_e206() { let p = project("discuss"); diff --git a/gsd/core/tests/cli/rules_silent.rs b/gsd/core/tests/cli/rules_silent.rs index d7f595a725..976122b373 100644 --- a/gsd/core/tests/cli/rules_silent.rs +++ b/gsd/core/tests/cli/rules_silent.rs @@ -10,13 +10,13 @@ use super::harness::{judged, project, taskboard}; fn the_clean_twin_is_silent_for_the_unjudged_codes() { /// The unjudged codes the taskboard twin must never report, under any of the three profiles. `W407` is the one the /// twin reports under strict and plus (its tasks carry no commit), so `task_without_commit_is_w407_...` holds it. - const SILENT_ON_THE_TWIN: [&str; 60] = [ + const SILENT_ON_THE_TWIN: [&str; 61] = [ "E101", "E102", "W103", "W104", "E105", "E106", "E107", "E108", "E201", "W204", "E206", "E301", "E302", "E303", "W304", "W305", "W306", "E307", "W308", "W309", "E310", "E312", "E314", "W317", "W318", "E319", "E320", "I321", "E322", "W323", "W324", "E507", "E401", "E402", "W403", "W404", "E405", "W406", "W408", "W409", "E502", "E503", "W504", "E505", "W506", "E509", "W510", "E511", "E512", "E513", "E515", "E516", "E517", "W520", "E521", - "W522", "E523", "W524", "W526", "I527", + "W522", "E523", "W524", "W526", "I527", "W109", ]; for profile in ["gsd-compat", "gsd-strict", "gsd-plus"] { let p = taskboard(); diff --git a/gsd/core/tests/common/mod.rs b/gsd/core/tests/common/mod.rs index ddeafc827c..10dfc47736 100644 --- a/gsd/core/tests/common/mod.rs +++ b/gsd/core/tests/common/mod.rs @@ -21,6 +21,7 @@ pub struct RuleRow { const NOT_CODE_TABLES: &[&str] = &[ "Judged rules' inputs", "Setting-gated rules", + "Settled later", "Retired and kernel-provided", ]; diff --git a/gsd/core/tests/common/prompt_combos.rs b/gsd/core/tests/common/prompt_combos.rs new file mode 100644 index 0000000000..a402eb3e5c --- /dev/null +++ b/gsd/core/tests/common/prompt_combos.rs @@ -0,0 +1,58 @@ +//! Every lifecycle prompt with the argument combinations a sweep renders it with. + +use gsd_kit::prompt::args::Values; + +/// One render's input: the argument text and every declared name with its placeholder value (`args::values`). +pub type Combo = (String, Values); + +/// Every prompt as `(command stem, combinations)`: none, every flag, every enum value, text and integer options. +pub fn prompts() -> Vec<(String, Vec<Combo>)> { + let declaration = gsd_core::build().declaration(); + declaration + .surfaces + .prompts + .iter() + .map(|p| { + // `(name, words, value)` of each given argument + let combo = |given: &[(String, String, String)]| -> Combo { + let words: Vec<&str> = given.iter().map(|(_, w, _)| w.as_str()).collect(); + let values = p + .args + .iter() + .map(|a| { + let value = given.iter().find(|(n, _, _)| *n == a.name); + (a.name.clone(), value.map(|(_, _, v)| v.clone())) + }) + .collect(); + (words.join(" "), values) + }; + let mut base = Vec::new(); + for a in p.args.iter().filter(|a| a.required) { + base.push((a.name.clone(), "03".to_string(), "03".to_string())); + } + let mut texts = vec![combo(&base)]; + let mut flags = base.clone(); + for a in &p.args { + let option = format!("--{}", a.name.replace('_', "-")); + let name = a.name.clone(); + match a.field_type.as_str() { + "bool" => flags.push((name, option, "true".to_string())), + "integer" => flags.push((name, format!("{option} 2"), "2".to_string())), + "string" => { + flags.push((name, format!("{option} \"text\""), "text".to_string())) + } + "enum" => { + for value in &a.enum_values { + let mut one = base.clone(); + one.push((name.clone(), format!("{option} {value}"), value.clone())); + texts.push(combo(&one)); + } + } + _ => {} + } + } + texts.push(combo(&flags)); + (p.id.replace('_', "-"), texts) + }) + .collect() +} diff --git a/gsd/core/tests/declaration.rs b/gsd/core/tests/declaration.rs index a2bf7de867..c81a7b2aeb 100644 --- a/gsd/core/tests/declaration.rs +++ b/gsd/core/tests/declaration.rs @@ -162,7 +162,7 @@ fn the_code_book_matches_rules_md() { from_book, from_md, "the code book and rules.md list different codes" ); - assert_eq!(book.len(), 72); + assert_eq!(book.len(), 73); for row in &rows { let code = book .iter() @@ -200,6 +200,44 @@ fn the_code_book_matches_rules_md() { } } +/// ADR 0385: the codes the book declares settled later are the rows of rules.md's Settled later table, and each says so +/// in its explanation. +#[test] +fn the_settled_later_codes_are_the_rows_of_rules_md() { + let table = gsd_kit::markdown::tables(include_str!("../spec/rules.md")) + .into_iter() + .find(|t| t.heading == "Settled later") + .expect("rules.md has a Settled later table"); + let from_md: Vec<&str> = table + .rows + .iter() + .filter_map(|cells| cells.first()?.strip_prefix("gsd/")) + .collect(); + let from_book: Vec<&str> = gsd_core::codes::CODES + .iter() + .filter(|c| c.settled_later) + .map(|c| c.id) + .collect(); + assert_eq!(from_book, ["W204", "E301", "W309", "E310"]); + assert_eq!(from_md, ["W204", "E301", "E310", "W309"]); + let codes = describe("codes"); + for item in codes["items"].as_array().expect("the code items") { + let id = item["code"].as_str().expect("a code"); + let settled = from_book.contains(&id); + assert_eq!( + item["settled_later"].as_bool().unwrap_or(false), + settled, + "{id}: {item}" + ); + let explanation = item["explanation"].as_str().expect("an explanation"); + assert_eq!( + explanation.contains("A later step of the authoring settles it"), + settled, + "{id}: {explanation}" + ); + } +} + #[test] fn the_code_book_golden() { common::golden("codebook.json", &describe("codes")); diff --git a/gsd/core/tests/declaration_judged.rs b/gsd/core/tests/declaration_judged.rs index cea434b5eb..d3b4e08ef1 100644 --- a/gsd/core/tests/declaration_judged.rs +++ b/gsd/core/tests/declaration_judged.rs @@ -15,7 +15,7 @@ fn plan_checker_inputs_match_rules_md() { .find(|r| r.codes.iter().any(|c| c == "W311")) .expect("the plan check row"); assert_eq!(row.codes, ["W311", "W313", "W315", "W316"]); - assert_eq!(row.inputs.len(), 11, "{:?}", row.inputs); + assert_eq!(row.inputs.len(), 14, "{:?}", row.inputs); for code in &row.codes { assert_inputs_match_rules_md(code); let judged = judged_descriptor(code).expect("judged"); diff --git a/gsd/core/tests/declaration_project.rs b/gsd/core/tests/declaration_project.rs index 4511b10081..989efdd363 100644 --- a/gsd/core/tests/declaration_project.rs +++ b/gsd/core/tests/declaration_project.rs @@ -52,9 +52,19 @@ fn project_and_requirement_declare_the_fields_of_the_model() { ); } +/// The title is a phase's and a milestone's one name (ADR 0387): a phase is labelled `Phase {its id's last segment}: +/// {title}`, so no field repeats the title. +#[test] +fn phase_and_milestone_are_named_by_their_title() { + for kind in ["milestone", "phase"] { + let fields = fields_of(kind); + assert!(!fields.iter().any(|f| f == "name"), "{kind}: {fields:?}"); + } +} + #[test] fn milestone_and_phase_declare_the_fields_of_the_model() { - let milestone = "name delivered accomplishments whats_next goal target_features abandoned workstream completion \ + let milestone = "delivered accomplishments whats_next goal target_features abandoned workstream completion \ state first_commit shipped stats git_range progress branch"; let milestone: Vec<&str> = milestone.split_whitespace().collect(); assert_eq!(fields_of("milestone"), milestone); @@ -62,7 +72,6 @@ fn milestone_and_phase_declare_the_fields_of_the_model() { fields_of("phase"), [ "milestone", - "name", "slug", "goal", "depends_on", @@ -146,9 +155,10 @@ fn the_roadmap_kinds_declare_every_field_of_project_md() { // + 2: the lesson's `graduated` and `status`; + 2: the milestone's `goal` and `target_features`. // + 2: the requirement's computed `proof` (its thread's state) and `satisfied_by` (the items its tasks' commits changed). // + 2: the phase's computed `critical_path` and `critical_weight` (its heaviest chain of plans). + // - 2: the milestone's and the phase's `name`: each is named by its title (ADR 0387). assert_eq!( total, - 68 + 3 - 2 + 1 + 2 + 2 + 2 + 2 + 2 + 2, + 68 + 3 - 2 + 1 + 2 + 2 + 2 + 2 + 2 + 2 - 2, "the kinds' fields" ); } diff --git a/gsd/core/tests/golden/codebook.json b/gsd/core/tests/golden/codebook.json index d3eb52029e..1e507b0158 100644 --- a/gsd/core/tests/golden/codebook.json +++ b/gsd/core/tests/golden/codebook.json @@ -16,7 +16,7 @@ { "code": "W103", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#project-and-roadmap", - "explanation": "A phase has 2–5 success criteria. It is a warning, and an error under gsd-strict.", + "explanation": "A phase has 2–5 success criteria. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Phase success criteria out of range" }, { @@ -64,19 +64,20 @@ { "code": "W203", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A locked requirement has a falsifiable acceptance. It is a warning, and an error under gsd-strict.", + "explanation": "A locked requirement has a falsifiable acceptance. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Locked requirement is not falsifiable" }, { "code": "W204", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A research open question is resolved by a decision before planning. It is a warning, and an error under gsd-strict.", + "explanation": "A research open question is resolved by a decision before planning. It is a warning, and an error under gsd-strict and gsd-plus. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Open research question unresolved" }, { "code": "W205", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#discuss-spec-research", - "explanation": "A package in research has a legitimacy verdict. It is a warning, and an error under gsd-strict.", + "explanation": "A package in research has a legitimacy verdict. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Package without a legitimacy verdict" }, { @@ -88,7 +89,8 @@ { "code": "E301", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Every requirement of a phase is in at least one of its plans. It is an error.", + "explanation": "Every requirement of a phase is in at least one of its plans. It is an error. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Phase requirement in no plan" }, { @@ -106,19 +108,19 @@ { "code": "W304", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan has at most 3 tasks (4 warns). It is a warning, and an error under gsd-strict.", + "explanation": "A plan has at most 3 tasks (4 warns). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan has too many tasks" }, { "code": "W305", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Plans of one wave share no path in files_modified ∪ files_deleted; under compat that wave runs sequentially. It is a warning, and an error under gsd-strict.", + "explanation": "Plans of one wave share no path in files_modified ∪ files_deleted; under compat that wave runs sequentially. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Same-wave plans overlap on files" }, { "code": "W306", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A task's files are among its plan's files_modified. It is a warning, and an error under gsd-strict.", + "explanation": "A task's files are among its plan's files_modified. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Task file outside the plan's files" }, { @@ -130,25 +132,27 @@ { "code": "W308", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A one_way task follows a decision checkpoint of its plan, or names the decision that settles it in reversibility.settled_by. It is a warning, and an error under gsd-strict.", + "explanation": "A one_way task follows a decision checkpoint of its plan, or names the decision that settles it in reversibility.settled_by. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "One-way task without a decision or a settled_by" }, { "code": "W309", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan has a truth and an artifact. It is a warning, and an error under gsd-strict.", + "explanation": "A plan has a truth and an artifact. It is a warning, and an error under gsd-strict and gsd-plus. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Plan lacks a truth or an artifact" }, { "code": "E310", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Every trackable decision of a planned phase's context (origin context) is cited by its id in the text of one of its plans. It is an error.", + "explanation": "Every trackable decision of a planned phase's context (origin context) is cited by its id in the text of one of its plans. It is an error. A later step of the authoring settles it: an edit that creates the entity it names, or one under that entity, and alters nothing held there reports the finding and is not refused for it.", + "settled_later": true, "title": "Context decision cited by no plan" }, { "code": "W311", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "The plan achieves its phase goal, keeps to scope and contradicts no settled decision. It is a warning, and an error under gsd-strict.", + "explanation": "The plan achieves its phase goal, keeps to scope and contradicts no settled decision. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan does not achieve its phase goal" }, { @@ -160,7 +164,7 @@ { "code": "W313", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Key links are wired between artifacts the plan names. It is a warning, and an error under gsd-strict.", + "explanation": "Key links are wired between artifacts the plan names. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Key links not wired" }, { @@ -172,7 +176,7 @@ { "code": "W315", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "Data contracts between plans match (requires / provides). It is a warning, and an error under gsd-strict.", + "explanation": "Data contracts between plans match (requires / provides). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Data contracts between plans mismatch" }, { @@ -190,7 +194,7 @@ { "code": "W318", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "The plan-check verdict is fresh before execution. It is a warning, and an error under gsd-strict.", + "explanation": "The plan-check verdict is fresh before execution. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan-check verdict is stale" }, { @@ -220,7 +224,7 @@ { "code": "W323", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#plan", - "explanation": "A plan is named <phase>-<NN> in its phase, and by its quick id YYMMDD-xxx without one. It is a warning, and an error under gsd-strict.", + "explanation": "A plan is named <phase>-<NN> in its phase, and by its quick id YYMMDD-xxx without one. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Plan not named after its phase" }, { @@ -256,7 +260,7 @@ { "code": "W404", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "The TDD review checkpoint ran after execution. It is a warning, and an error under gsd-strict.", + "explanation": "The TDD review checkpoint ran after execution. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "TDD review checkpoint did not run" }, { @@ -268,7 +272,7 @@ { "code": "W406", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "A research, spec or validation records the pack of gsd/phase-context (a quick plan's research: gsd/quick-context) it was written against; the host reports it when that pack moves. It is a warning, and an error under gsd-strict.", + "explanation": "A research, spec or validation records the pack of gsd/phase-context (a quick plan's research: gsd/quick-context) it was written against; the host reports it when that pack moves. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Context drifted since the plan was written" }, { @@ -280,13 +284,13 @@ { "code": "W408", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "A deliverable's checks pass, or a person judged it and gave a rationale (a check no report speaks of is not judged). It is a warning, and an error under gsd-strict.", + "explanation": "A deliverable's checks pass, or a person judged it and gave a rationale (a check no report speaks of is not judged). It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Deliverable checks neither pass nor are human-judged" }, { "code": "W409", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#execute", - "explanation": "The branch a phase or a milestone computes is a name git takes, with a slug when its template asks one. It is a warning, and an error under gsd-strict.", + "explanation": "The branch a phase or a milestone computes is a name git takes, with a slug when its template asks one. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Computed branch name refused" }, { @@ -334,7 +338,7 @@ { "code": "W510", "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#verify", - "explanation": "A planned phase whose research asks for a validation has one, approved before its verification. It is a warning, and an error under gsd-strict.", + "explanation": "A planned phase whose research asks for a validation has one, approved before its verification. It is a warning, and an error under gsd-strict and gsd-plus.", "title": "Phase lacks a validation it needs" }, { @@ -432,6 +436,12 @@ "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#verify", "explanation": "On a check with a base (check --since a revision, read at its merge-base, or a session's last check), each truth whose verifier verdict is stale says what changed since that base: the spec it reads (the truth, its plan or its phase) or only the files its verdict cites; silent on a plain check. It is information.", "title": "What changed under a stale truth since the base" + }, + { + "code": "W109", + "docs": "https://github.com/leaderiop/SpecForge/blob/main/gsd/core/spec/rules.md#project-and-roadmap", + "explanation": "A phase's title does not begin with a phase number: its label reads the number from its id. It is a warning, and an error under gsd-strict and gsd-plus.", + "title": "Phase title embeds a number" } ] } diff --git a/gsd/core/tests/golden/contexts.json b/gsd/core/tests/golden/contexts.json index 21eab5b0e6..996f7eb948 100644 --- a/gsd/core/tests/golden/contexts.json +++ b/gsd/core/tests/golden/contexts.json @@ -80,7 +80,7 @@ }, { "agent": "gsd-plan-checker", - "budget": 8000, + "budget": 0, "name": "plan-checker", "sections": [ { @@ -109,8 +109,23 @@ "tier": "core" }, { - "name": "all_decisions", - "selector": "decision", + "name": "quick_decisions", + "selector": "self<decision.plan", + "tier": "core" + }, + { + "name": "project_decisions", + "selector": "decision[origin=project]", + "tier": "core" + }, + { + "name": "resolved_decisions", + "selector": "self.phase<research.phase<open_question.research.resolved_by", + "tier": "core" + }, + { + "name": "settled_decisions", + "selector": "self<task.plan.reversibility.settled_by", "tier": "core" }, { @@ -143,7 +158,7 @@ }, { "agent": "gsd-integration-checker", - "budget": 8000, + "budget": 0, "name": "integration-checker", "sections": [ { @@ -566,7 +581,7 @@ "subject": "project" }, { - "budget": 50000, + "budget": 0, "name": "phase-context", "records": [ { @@ -606,7 +621,7 @@ "subject": "phase" }, { - "budget": 50000, + "budget": 0, "name": "quick-context", "records": [ { diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-advisor-researcher.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-advisor-researcher.md index b822013d87..34e119b2c8 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-advisor-researcher.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-advisor-researcher.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-advisor-researcher; edits are overwritten; sha256: b68a2975d937462b8b0618e28740b08d8d559025d92908eccda44576584feec6 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-advisor-researcher; edits are overwritten; sha256: f29e2fc4f3cf45b39751a3e8ab3b421b562db3ea05cae4211d02e4f3cbc4732c name: gsd-advisor-researcher description: Researches a single gray area decision and returns a structured comparison table with rationale. Spawned by discuss-phase advisor mode. tools: Read, Bash, Glob, Grep, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__plugin_context7_context7__*, mcp__specforge__specforge_query, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_inspect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source @@ -25,9 +25,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/advisor-researcher <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/advisor-researcher`). -Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings (as the budget of 6000 tokens allows). +Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings. The core sections are served whole; the others fill up to 6000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/advisor-researcher <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. body sha256: a474aec247737d6d1d76b1868c9b7d26e8fd0d760f7420109c59e77aac7a28d5 body bytes: 4824 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-assumptions-analyzer.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-assumptions-analyzer.md index 62b325a45f..9ba036dcd2 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-assumptions-analyzer.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-assumptions-analyzer.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-assumptions-analyzer; edits are overwritten; sha256: 401fd5391964da4881a55dfdad5882a6b78ab7570cba24240c65156beded572d +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-assumptions-analyzer; edits are overwritten; sha256: 3216c062a4bcbf417cc3a4c63def6359ff61c3beb75930f71d41b2797e3f4355 name: gsd-assumptions-analyzer description: Deeply analyzes codebase for a phase and returns structured assumptions with evidence. Spawned by discuss-phase assumptions mode. tools: Read, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_inspect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source @@ -25,9 +25,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/assumptions-analyzer <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/assumptions-analyzer`). -Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings (as the budget of 6000 tokens allows). +Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings. The core sections are served whole; the others fill up to 6000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/assumptions-analyzer <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. body sha256: 1832f62e159a509d50e33a6d9d09100f246da15abe4d3a5442932a4f51768528 body bytes: 5006 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-executor.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-executor.md index cef72a75c6..08c1aeb26e 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-executor.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-executor.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-executor; edits are overwritten; sha256: 2f40de676818d206c958ba039ee37b9ef37f13b6fd5c84a0e66ea2bd68be2521 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-executor; edits are overwritten; sha256: 142f77725f17509944b2fe358cddba66c2274d5324c9a56a4254f8dd9e78e128 name: gsd-executor description: Executes GSD plans with atomic commits, deviation handling, checkpoint protocols, and state management. Spawned by execute-phase orchestrator or execute-plan command. tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Skill, mcp__context7__*, mcp__plugin_context7_context7__*, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_context, mcp__specforge__specforge_explain, mcp__specforge__specforge_edit, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_branch_check, mcp__specforge__specforge_gsd_complete_plan, mcp__specforge__specforge_gsd_pause, mcp__specforge__specforge_gsd_raise_blocker, mcp__specforge__specforge_gsd_record_window, mcp__specforge__specforge_gsd_resolve_blocker, mcp__specforge__specforge_gsd_start_plan @@ -31,9 +31,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `plan` you were given: `specforge context gsd/executor <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/executor`). -Sections, in order: plan (core), body (core), phase (core), requirements (core), context, quick, quick_research, prior, research, project, instructions (as the budget of 6000 tokens allows). +Sections, in order: plan (core), body (core), phase (core), requirements (core), context, quick, quick_research, prior, research, project, instructions. The core sections are served whole; the others fill up to 6000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/executor <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. -body sha256: 1cc148af59426315241114f91e17cd6eb85e5a8b81c3afc26d273646ea0969b1 -body bytes: 45560 +body sha256: 90f88aacdcfe22a964e2e486fca8412586440eab0b1e4c32ff03649710a48c13 +body bytes: 45054 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-integration-checker.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-integration-checker.md index bc8c0656fc..94af49ed2a 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-integration-checker.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-integration-checker.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-integration-checker; edits are overwritten; sha256: e97b0794cde88cc1aed41818cb032b54fe16d29e1d4ddfbc3041a87a069877bf +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-integration-checker; edits are overwritten; sha256: e98011634314528e97cfbd8e2b740771ca98a96e94e3d44e8cd9ccfbc073ee9e name: gsd-integration-checker description: Verifies cross-phase integration and E2E flows. Checks that phases connect properly and user workflows complete end-to-end. tools: Read, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_find_references, mcp__specforge__specforge_verdict_inputs, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_gsd_record_verdict @@ -26,9 +26,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `milestone_audit` you were given: `specforge context gsd/integration-checker <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/integration-checker`). -Sections, in order: audit (core), phases (core), verifications (core), requirements (core) (as the budget of 8000 tokens allows). +Sections, in order: audit (core), phases (core), verifications (core), requirements (core), every one served whole whatever it costs, so no `max_tokens` shrinks it. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/integration-checker <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. ## Judged rules diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-nyquist-auditor.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-nyquist-auditor.md index d2abe0b6ba..f58533d8c1 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-nyquist-auditor.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-nyquist-auditor.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-nyquist-auditor; edits are overwritten; sha256: b7cd3e978021db935f5d695adf2b333c33e7f6132ad4df1d0f928364af7ec57c +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-nyquist-auditor; edits are overwritten; sha256: 57a56f08e3cef51c5bdf9ee512f205208e05fd979823e94370a5fc96f70863e2 name: gsd-nyquist-auditor description: Fills Nyquist validation gaps by generating tests and verifying coverage for phase requirements tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_explain, mcp__specforge__specforge_find_references, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_user_story_validate @@ -26,9 +26,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/nyquist-auditor <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/nyquist-auditor`). -Sections, in order: phase (core), plans (core), tasks (core), validation (core), rows (core), requirements, research, summaries (as the budget of 8000 tokens allows). +Sections, in order: phase (core), plans (core), tasks (core), validation (core), rows (core), requirements, research, summaries. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/nyquist-auditor <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. body sha256: e95effc22b472eb47c93992c33974b7f7b6f58db4eae82ddfc949a2d3521a06f body bytes: 7420 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-phase-researcher.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-phase-researcher.md index ddebf17a4d..8b8076a7d5 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-phase-researcher.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-phase-researcher.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-phase-researcher; edits are overwritten; sha256: bc65ab7d0335c67e67822d39f6dada9d7c6c7fb62ad481163a449a266044c207 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-phase-researcher; edits are overwritten; sha256: c32f4047354df31b30365178b542125597c48796e6a55a263258e7df4bd051c4 name: gsd-phase-researcher description: Researches how to implement a phase before planning. Produces RESEARCH.md consumed by gsd-planner. Spawned by /gsd:plan-phase orchestrator. tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__plugin_context7_context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*, mcp__perplexity__*, mcp__specforge__specforge_query, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_inspect, mcp__specforge__specforge_edit, mcp__specforge__specforge_verdict_inputs, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_record_verdict @@ -29,13 +29,13 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/phase-researcher <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/phase-researcher`). -Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings, project, instructions (as the budget of 6000 tokens allows). +Sections, in order: phase (core), requirements (core), context (core), decisions (core), milestone, siblings, project, instructions. The core sections are served whole; the others fill up to 6000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/phase-researcher <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. ## Judged rules - `gsd/W205`: read the inputs with `specforge.verdict_inputs`; the outcomes are legitimate, suspicious, unknown (passing: legitimate). -body sha256: 64a3683f0d07d08ede943fd35b4345988f4083d5c40614691ad57bb81e922146 -body bytes: 46264 +body sha256: 836263ce871e21b0a12bf1d0a86096bf95264c9776edc2f44279b79893af6914 +body bytes: 46910 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-plan-checker.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-plan-checker.md index 09d371a9bd..bf04c2f03e 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-plan-checker.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-plan-checker.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-plan-checker; edits are overwritten; sha256: 7146e4942140dc69a443a0b27701dc020bbf458c668b8651e0f23f223a15c06c +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-plan-checker; edits are overwritten; sha256: bfbca26c4bb511991d30fb8b1942916c43287fb009d085607483ffca527bb890 name: gsd-plan-checker description: Verifies plans will achieve phase goal before execution. Goal-backward analysis of plan quality. Spawned by /gsd:plan-phase orchestrator. tools: Read, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_find_references, mcp__specforge__specforge_verdict_inputs, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_gsd_record_verdict, mcp__specforge__specforge_gsd_thread_plan @@ -27,9 +27,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `plan` you were given: `specforge context gsd/plan-checker <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/plan-checker`). -Sections, in order: plan (core), body (core), phase (core), requirements (core), phase_decisions (core), all_decisions (core), context (core), research (core), research_items (core), siblings (core), instructions (core) (as the budget of 8000 tokens allows). +Sections, in order: plan (core), body (core), phase (core), requirements (core), phase_decisions (core), quick_decisions (core), project_decisions (core), resolved_decisions (core), settled_decisions (core), context (core), research (core), research_items (core), siblings (core), instructions (core), every one served whole whatever it costs, so no `max_tokens` shrinks it. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/plan-checker <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. ## Judged rules diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-planner.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-planner.md index 646fd45957..4d49ac9627 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-planner.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-planner.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-planner; edits are overwritten; sha256: ab1798dbfd6d394e35bfe265f4b0c196f5141413be30a75a2c3edbf1fc8da3b4 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-planner; edits are overwritten; sha256: e6539e5becace9c30166a43871ea806788dce47a4d1e21b65964eb42528d844c name: gsd-planner description: Creates executable phase plans with task breakdown, dependency analysis, and goal-backward verification. Spawned by /gsd:plan-phase orchestrator. tools: Read, Write, Edit, MultiEdit, Bash, Glob, Grep, Skill, WebFetch, mcp__context7__*, mcp__plugin_context7_context7__*, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_export, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_find_references, mcp__specforge__specforge_edit, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_phase, mcp__specforge__specforge_gsd_thread_plan @@ -31,9 +31,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/planner <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/planner`). -Sections, in order: phase (core), requirements (core), context (core), decisions (core), research, research_items, plans, milestone, gaps, uat_gaps, prior, project_decisions, project, instructions (as the budget of 8000 tokens allows). +Sections, in order: phase (core), requirements (core), context (core), decisions (core), research, research_items, plans, milestone, gaps, uat_gaps, prior, project_decisions, project, instructions. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/planner <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. -body sha256: 721043685019556b4154e4c61bc533d08234256ae5897ca53d7d904cd55bd162 -body bytes: 52685 +body sha256: b925dd969e0c30c99e7873981c59cb2f9bf204028aa50194f105c5049beb6970 +body bytes: 53119 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-project-researcher.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-project-researcher.md index 687d0f0caa..72eea8f733 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-project-researcher.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-project-researcher.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-project-researcher; edits are overwritten; sha256: e1b0e8ef8e437821fb2908657c747a9059f70ca44b1c20d26fc757da97030a7a +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-project-researcher; edits are overwritten; sha256: 806fd99ce6eb93826185c6102319e9c61ceaef6569c317ad5698e619a808c3be name: gsd-project-researcher description: Researches domain ecosystem before roadmap creation. Produces files in spec/gsd/research/ consumed during roadmap creation. Spawned by /gsd:new-project or /gsd:new-milestone orchestrators. tools: Read, Write, Bash, Glob, Grep, Skill, WebSearch, WebFetch, mcp__context7__*, mcp__plugin_context7_context7__*, mcp__firecrawl__*, mcp__exa__*, mcp__tavily__*, mcp__ref__*, mcp__jina__*, mcp__perplexity__*, mcp__specforge__specforge_query, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_inspect, mcp__specforge__specforge_edit, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source @@ -27,9 +27,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `project` you were given: `specforge context gsd/project-researcher <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/project-researcher`). -Sections, in order: project (core), requirements (core), decisions (core), milestones (as the budget of 8000 tokens allows). +Sections, in order: project (core), requirements (core), decisions (core), milestones. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/project-researcher <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. body sha256: fc11a1f8ecc587021d04d562918ec6eab1b317b155717f08d4f91c3ff38e146d body bytes: 13662 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-research-synthesizer.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-research-synthesizer.md index 22a9afee32..f18e7a698c 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-research-synthesizer.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-research-synthesizer.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-research-synthesizer; edits are overwritten; sha256: 75ec26eaf15e601c9d36863389a7a5ef10106b02d271de44a97508ee49d60d59 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-research-synthesizer; edits are overwritten; sha256: eddcb1019cdd821e54ff55cb62e6258f7640cc1529c8439fc96423831cbff934 name: gsd-research-synthesizer description: Synthesizes research outputs from parallel researcher agents into SUMMARY.md. Spawned by /gsd:new-project after 4 researcher agents complete. tools: Read, Write, Bash, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_inspect, mcp__specforge__specforge_edit, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source @@ -27,9 +27,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `project` you were given: `specforge context gsd/research-synthesizer <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/research-synthesizer`). -Sections, in order: project (core), research (core), research_items (core), requirements (as the budget of 8000 tokens allows). +Sections, in order: project (core), research (core), research_items (core), requirements. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/research-synthesizer <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. body sha256: 0c023dc10c9c2245767f83e1f8f365ccc03be14eb45730b369672e731765a4a9 body bytes: 9069 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-roadmapper.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-roadmapper.md index f4904ce5af..9c4516591e 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-roadmapper.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-roadmapper.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-roadmapper; edits are overwritten; sha256: 1d778067dce63fa7a7a1077528530f14fe536cdfd9062b415d60bc67dc3df078 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-roadmapper; edits are overwritten; sha256: 82aeb78be0165ccc29aa21c195c147813d4a2b2e2d813a9f2aa72c0ec3b9172b name: gsd-roadmapper description: Creates project roadmaps with phase breakdown, requirement mapping, success criteria derivation, and coverage validation. Spawned by /gsd:new-project orchestrator. tools: Read, Write, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_export, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_search, mcp__specforge__specforge_explain, mcp__specforge__specforge_schema, mcp__specforge__specforge_find_references, mcp__specforge__specforge_edit, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_phase @@ -30,9 +30,9 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `project` you were given: `specforge context gsd/roadmapper <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/roadmapper`). -Sections, in order: project (core), requirements (core), decisions (core), research, research_items, milestones (as the budget of 8000 tokens allows). +Sections, in order: project (core), requirements (core), decisions (core), research, research_items, milestones. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/roadmapper <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. -body sha256: df9fc7712606d0f28465baffdad3614d750a018d56b92837afcb9bdc48c8fffd -body bytes: 21459 +body sha256: 29a22a07d60ce91cc341186bda29525bb032b7a63c83f7b9f9232c862ae53ed7 +body bytes: 21525 diff --git a/gsd/core/tests/golden/install/claude-code/agents/gsd-verifier.md b/gsd/core/tests/golden/install/claude-code/agents/gsd-verifier.md index 3fb506e49b..dd937a6e5f 100644 --- a/gsd/core/tests/golden/install/claude-code/agents/gsd-verifier.md +++ b/gsd/core/tests/golden/install/claude-code/agents/gsd-verifier.md @@ -1,5 +1,5 @@ --- -# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-verifier; edits are overwritten; sha256: dfc7d77f0afc232d87b01937f124025bc8cb1af404dc8bc2a60abcadd97ca4e8 +# generated by specforge install (claude-code) from @gsd/core@VERSION agent gsd-verifier; edits are overwritten; sha256: 23ebebbbc4bd5d64b20cfa1b8022dcf9e762042f57d0ad996085a4e7b717af13 name: gsd-verifier description: Verifies phase goal achievement through goal-backward analysis. Checks codebase delivers what phase promised, not just that tasks completed. Creates VERIFICATION.md report. tools: Read, Write, Bash, Glob, Grep, Skill, mcp__specforge__specforge_query, mcp__specforge__specforge_validate, mcp__specforge__specforge_trace, mcp__specforge__specforge_context, mcp__specforge__specforge_explain, mcp__specforge__specforge_find_references, mcp__specforge__specforge_edit, mcp__specforge__specforge_verdict_inputs, mcp__specforge__specforge_collect, mcp__specforge__specforge_find_implementation, mcp__specforge__specforge_find_spec_for_source, mcp__specforge__specforge_gsd_re_verify, mcp__specforge__specforge_gsd_record_verdict, mcp__specforge__specforge_gsd_user_story_validate @@ -30,14 +30,14 @@ Call these through the SpecForge MCP server by the tool's name, or run the CLI l Before you start, read the context of the `phase` you were given: `specforge context gsd/verifier <id>` (MCP: the tool `specforge.context`, or the resource `specforge://context/<id>?role=gsd/verifier`). -Sections, in order: phase (core), requirements (core), must_haves (core), plans (core), summaries (core), files, context, pitfalls (as the budget of 8000 tokens allows). +Sections, in order: phase (core), requirements (core), must_haves (core), plans (core), summaries (core), files, context, pitfalls. The core sections are served whole; the others fill up to 8000 tokens beyond them, in order. -Cite the file digests it lists; `budget.truncated_sections` names what did not fit, read it with a larger `max_tokens` when you need it. +Cite the file digests it lists; `budget.truncated_sections` names what did not fit: read it again with a `max_tokens` above its `budget.budget_tokens` when you need it. `budget.estimated_tokens` is what the pack costs: when that is more than you can read, read it brief (`specforge context gsd/verifier <id> --format brief`; MCP: `format` `brief`), each entity's id, kind and title, then query the entities you need. ## Judged rules - `gsd/E501`: read the inputs with `specforge.verdict_inputs`; the outcomes are verified, verified_coincidental, failed, uncertain, present_behavior_unverified (passing: verified, verified_coincidental). - `gsd/W525`: read the inputs with `specforge.verdict_inputs`; the outcomes are held, violated, unverified (passing: held). -body sha256: 334c1685975e2f73d7c46a67138f8f4cbe02dea5c9a5ddf6f655c153fb9c0f1b -body bytes: 54201 +body sha256: d93c667495236891a030915f576fc88f2afca43e01b3c6305484152d4e997f8e +body bytes: 54333 diff --git a/gsd/core/tests/golden/install/claude-code/tree.json b/gsd/core/tests/golden/install/claude-code/tree.json index ce7fe59b9e..b505316565 100644 --- a/gsd/core/tests/golden/install/claude-code/tree.json +++ b/gsd/core/tests/golden/install/claude-code/tree.json @@ -1,11 +1,11 @@ { ".claude/agents/gsd-advisor-researcher.md": { - "bytes": 7513, - "sha256": "c6218fe0b0c413644ff2dc2676b5b1acd120b3922634e73595945f03d7b5eb46" + "bytes": 7858, + "sha256": "f1c727735c0f827953dcdee40a25cbd6b095fe6a92bfce08339327e04a770498" }, ".claude/agents/gsd-assumptions-analyzer.md": { - "bytes": 7626, - "sha256": "713a2b3a06ee712ffaa3dfd6d87a9c43b3145421c6d5367f078df1087d06e471" + "bytes": 7973, + "sha256": "bc082dba7f0625834e094331adc54bdc96c1c16c169c462ee92fe8bfb38ee488" }, ".claude/agents/gsd-doc-classifier.md": { "bytes": 14073, @@ -16,48 +16,48 @@ "sha256": "673eef6149d23deed083fe45e7747cc4ea917773e19d8793b6fbd2541fca4789" }, ".claude/agents/gsd-executor.md": { - "bytes": 49844, - "sha256": "18d041520b065488588da0c6fb07baaa8b9bd97b44bcf7b1f69f5e18c598c668" + "bytes": 49673, + "sha256": "c3d0c5c4cd1f1e8b0e301be1943c98e259ea8eba33312ef734f109466a8e0067" }, ".claude/agents/gsd-integration-checker.md": { - "bytes": 21278, - "sha256": "a3da5b098a7f7497cbe17abf56fff0ad1645df67d003aa7ecc4dbde0e32c4b04" + "bytes": 21467, + "sha256": "d9a2f92a69ff3c07f4ecc8bb164e9848387a98a0ac4e3f2d5222826332fa996d" }, ".claude/agents/gsd-nyquist-auditor.md": { - "bytes": 10375, - "sha256": "f53db99245c8f47966c364b23e5abf7bd9fe0addae453d3bb20876c2527e8c40" + "bytes": 10717, + "sha256": "c3aed4236920cac402978e39cd2344390389e4e7e6b575097f3c49e6236854a9" }, ".claude/agents/gsd-pattern-mapper.md": { "bytes": 15715, "sha256": "192802b5dad86a2c6bac10380b4c46a0180c355114d8f5a98cc0e0f92a90be80" }, ".claude/agents/gsd-phase-researcher.md": { - "bytes": 50130, - "sha256": "2745c1167374a0fe57d76e142bffe0fda74f9d8841c8b22d300890d70e1d5db8" + "bytes": 51119, + "sha256": "4675b24e0d00c94f549d0116caf4e5287572806fcd265558847e8c3efd2adb09" }, ".claude/agents/gsd-plan-checker.md": { - "bytes": 54030, - "sha256": "b7d84c8f73ca329fe5d610e47a4318ebc657a2a6ef08582497c3495502a92789" + "bytes": 54293, + "sha256": "406030462eb922d8f1d4027e02e114fb8366fa8d8237dabd91a8fe46eea772e0" }, ".claude/agents/gsd-planner.md": { - "bytes": 56679, - "sha256": "6573db6aee89040d9d9baaa98d4a97cc584e29c2f11aa8a8738c60c300bbfe9e" + "bytes": 57447, + "sha256": "10e4a98bb5128589397939174352b845b6e0dee67eb891bb63b1aac486322a7a" }, ".claude/agents/gsd-project-researcher.md": { - "bytes": 16901, - "sha256": "ccf7dfbde0b697ef3b822e4f992f87bb32ee73dc76ee0c32654ab83b6319e7b8" + "bytes": 17246, + "sha256": "715d7f85b2c78d2c71898be7002ed19b94a4f70cac1268b85e72ce34bdeaa8f2" }, ".claude/agents/gsd-research-synthesizer.md": { - "bytes": 12096, - "sha256": "3f294bb84dbbe9c1020e328e781c41d7557bc00b4ef02233b5ec28ace0b85333" + "bytes": 12443, + "sha256": "c42fa6aacdb776a4e381f939d284b9e38ed55197e5b7cb1cdab3221bdbc39107" }, ".claude/agents/gsd-roadmapper.md": { - "bytes": 25060, - "sha256": "6cc4b13710f47eaa298082488dd3f3c78b00f2aac48753c8c288f33e25cd0759" + "bytes": 25463, + "sha256": "68c35cafb3be5c9e5a750cbcb780af28ac6e3c8fa8e0bcbae450ddd6f93e7355" }, ".claude/agents/gsd-verifier.md": { - "bytes": 58608, - "sha256": "44080c2056d898ede59abde1f5360ee0726100bde9ba1c838f83f563e0f1f43e" + "bytes": 59075, + "sha256": "2b5c1355036613bd61839a7e441cd563d81c8d7f077bb75838cd8c18625f5894" }, ".claude/settings.json": { "bytes": 3736, diff --git a/gsd/core/tests/golden/install/codex/tree.json b/gsd/core/tests/golden/install/codex/tree.json index bf2b7676e5..2c701da0b5 100644 --- a/gsd/core/tests/golden/install/codex/tree.json +++ b/gsd/core/tests/golden/install/codex/tree.json @@ -1,11 +1,11 @@ { ".codex/agents/gsd-advisor-researcher.toml": { - "bytes": 7092, - "sha256": "d0617a7e675b226183e19f6718957d8e3ef5366b7242ab66b7c9c770015aa328" + "bytes": 7437, + "sha256": "f3ff6d652bd82167577beecf9509ce8bf4fd74e1f13e748fc40ffb1a38920a15" }, ".codex/agents/gsd-assumptions-analyzer.toml": { - "bytes": 7278, - "sha256": "22bf8ea9336bd09b84728d0e998dff4f06745d62341cc77cf65c8a637ff9e16c" + "bytes": 7625, + "sha256": "8d983a8b1867fa599210dfb9d70404952780afe3eae36b524d7ff231bdd66609" }, ".codex/agents/gsd-doc-classifier.toml": { "bytes": 13663, @@ -16,48 +16,48 @@ "sha256": "a8854c54ef0f3873eb424b58df05cc1fe94f2b37103d38cf4ac2f892e15449df" }, ".codex/agents/gsd-executor.toml": { - "bytes": 49146, - "sha256": "c97321ce41588202e35d901aabc3213bd3a3950f6f3d5fcdce41d7401db17895" + "bytes": 48975, + "sha256": "db6915591255ce4a8d799a25dd81a21616e6ad0d14530b5b382ce4762895f74c" }, ".codex/agents/gsd-integration-checker.toml": { - "bytes": 20880, - "sha256": "0829a31ec7cbc3ee05919f2d1c1dddf1262119f1366e0696a900fe9fb4244626" + "bytes": 21069, + "sha256": "6e860f9834c1a734d13b22faeade7ad0739a76cf6780d5d0438a1cb933ab61c9" }, ".codex/agents/gsd-nyquist-auditor.toml": { - "bytes": 9939, - "sha256": "57bc61c21be3ec69b766cc6e91db5a1820e6178688b62077bb9429450b3b330a" + "bytes": 10281, + "sha256": "5c5dc573f43a5ee3f05c423a41196581137c4a266fed35b77beee9c99381f3cd" }, ".codex/agents/gsd-pattern-mapper.toml": { "bytes": 15298, "sha256": "ffe5274ec8a19e2c8e9e52c7bf95a8a0303b211c5689f0b61261991493b5147d" }, ".codex/agents/gsd-phase-researcher.toml": { - "bytes": 49435, - "sha256": "5fd9ef63918bf0f2b3f70fd0de154b5e186bc84e71dc30ad519b1d6cd86ad678" + "bytes": 50424, + "sha256": "133afed27d40eb414fa8e0dd7fd21187398f29fa0e0cee3babfd93437832b76a" }, ".codex/agents/gsd-plan-checker.toml": { - "bytes": 53588, - "sha256": "c4cf137558c814cd30a1e752d6a5635d38879db84083ee6d606ec3e3c9946173" + "bytes": 53851, + "sha256": "a181cb540d1defb1a3356f0edbfe74e58f8fd38a426fcc1ef8afdfd0b5450132" }, ".codex/agents/gsd-planner.toml": { - "bytes": 56021, - "sha256": "9a8ada3e8c77ea2101cea277c6658f4c8984e093212668576f57746466e0a93c" + "bytes": 56789, + "sha256": "2a0970dcdf3e98ba63e861530b5dac2dc29a309693ab693a9f724346b448f540" }, ".codex/agents/gsd-project-researcher.toml": { - "bytes": 16311, - "sha256": "119928e873d03a679fcaff690b1809472ddbd1251f93d7c8bc74df359167ebbf" + "bytes": 16656, + "sha256": "1d4ad7ff215ed1efe9e6d0ce0bfeb846006b49c2d8c2b3d16338218627627909" }, ".codex/agents/gsd-research-synthesizer.toml": { - "bytes": 11684, - "sha256": "0cca4cff20f7c8dcaa3e56c0ec72706b018d16460ab86aa3d3e9b6fba596fbe2" + "bytes": 12031, + "sha256": "3e35c807a0cedc71d9e9df8b03e2ee6ff95f1563b08ad70d73379d6da4af8ef1" }, ".codex/agents/gsd-roadmapper.toml": { - "bytes": 24521, - "sha256": "1e88813603a572bac3be1ea8cacbe3c6b8d5d3196e3438ea954593af55145ba3" + "bytes": 24924, + "sha256": "6a50286a9621b325e6731e0a96d0b2a4ebc4eda6c1dc91f7c21303d86db2675c" }, ".codex/agents/gsd-verifier.toml": { - "bytes": 58029, - "sha256": "306c888dfda6146aa8685f7bb951281a36fb07b31fbd14984853cd682796dd60" + "bytes": 58496, + "sha256": "65f3bdaadae957fa5b50b1c7c60f9534d5135d2a89d510673e0f4c2aeaacce41" }, ".codex/config.toml": { "bytes": 124, diff --git a/gsd/core/tests/golden/install/cursor/tree.json b/gsd/core/tests/golden/install/cursor/tree.json index a7d6ade621..167f41b4bf 100644 --- a/gsd/core/tests/golden/install/cursor/tree.json +++ b/gsd/core/tests/golden/install/cursor/tree.json @@ -1,11 +1,11 @@ { ".cursor/agents/gsd-advisor-researcher.md": { - "bytes": 7038, - "sha256": "c2a65d9e119c2cb166757df09b7439009024a865910ad10d6cd7428e4e8cbe40" + "bytes": 7383, + "sha256": "ad5743b2c94471760951eaa147da4d56d648f7f32c806ef4e36a74865d3c7078" }, ".cursor/agents/gsd-assumptions-analyzer.md": { - "bytes": 7224, - "sha256": "79287ce6f6791b0f865b18c3206674750c86ee9f85673f59e0b2046258dd8388" + "bytes": 7571, + "sha256": "cd4a63aeb59d652e8493fb95b87f6a180c90e1b4df63994a9e26653e532a9f00" }, ".cursor/agents/gsd-doc-classifier.md": { "bytes": 13609, @@ -16,48 +16,48 @@ "sha256": "e4371d53f9976c5aff66aeb5a92d540ecc4e07e1167b39aead90a900dd18b6ca" }, ".cursor/agents/gsd-executor.md": { - "bytes": 49092, - "sha256": "b9bda8f2680ca821709d502fa80281fb7f88c316cfcd9578de4c689c61e1747d" + "bytes": 48921, + "sha256": "bb044e014c521a6cd10914bdae3dc1a428f18f3fe9e83611d539b94f0ee61940" }, ".cursor/agents/gsd-integration-checker.md": { - "bytes": 20826, - "sha256": "a486c4a6a45a44271b8c2d970f3af673b6fdf532d18ffef7484adbcb152c8a0f" + "bytes": 21015, + "sha256": "9f691083faf4fd8b32793d62b809765c880066e6afcef61549f37e5a9b342b88" }, ".cursor/agents/gsd-nyquist-auditor.md": { - "bytes": 9885, - "sha256": "ea4a8897b23112d0d2fc9bbd873ba6639b4ff674b047589fc4e64b358227ad99" + "bytes": 10227, + "sha256": "27f63114700aedd3a464aa03e9d2f705ffe99cc8c81bbb88d726b88cecfe10eb" }, ".cursor/agents/gsd-pattern-mapper.md": { "bytes": 15244, "sha256": "e41cb084a53d141fa518bc2e76dce4a0031b705176d2d999d9ae99c332b1bd7e" }, ".cursor/agents/gsd-phase-researcher.md": { - "bytes": 49381, - "sha256": "e7b45d2c5ddce7f3cc841297fd29c21d2c5eba6a085ec13c897fdc42881e14f0" + "bytes": 50370, + "sha256": "9db9fef31b85f04ac6d27aab02be8776bf9f2b1b0d60510cf6edb95d617b0baf" }, ".cursor/agents/gsd-plan-checker.md": { - "bytes": 53534, - "sha256": "a498899ab040672eedc5b22a711d706f1e5fb6250ca0b04ab1030d750a7ed69b" + "bytes": 53797, + "sha256": "452dbf36c707b9a31982f136c88b0b27a1794a0ecc06fc942a837776684b03ee" }, ".cursor/agents/gsd-planner.md": { - "bytes": 55967, - "sha256": "a6a373441077562d51003d52dd6cdabc58de4d517250a2d2abee34969b5c2d02" + "bytes": 56735, + "sha256": "990652cee5f25a4dd65e5c344a82f8917c8f962362516c5496b80e24a612cc05" }, ".cursor/agents/gsd-project-researcher.md": { - "bytes": 16257, - "sha256": "d283f254b397fa83a998497bf659af31f5bc4c3b21fdfe36b610bc62787eae9c" + "bytes": 16602, + "sha256": "c4a175c49e78b3635d0269807fb4f9ff9e9c927e7956822d6259fb67ca747b42" }, ".cursor/agents/gsd-research-synthesizer.md": { - "bytes": 11630, - "sha256": "6d545e0c1a955049b9c62ad58387a29d4e7cc7eb6146b2023ad79b32059ce021" + "bytes": 11977, + "sha256": "1ba1ddd318bc5ff4a45df0fcdd29775bb6b8a9a927e8192d2406c496a7cfa496" }, ".cursor/agents/gsd-roadmapper.md": { - "bytes": 24467, - "sha256": "108b991418aff5b7e4683bb91290836a9641887ef8e2c32c1f0cc7dc918c0d26" + "bytes": 24870, + "sha256": "eb5371c154fbe90dfe3402e80432a2c978fdc24454a14011a523cd29304f0061" }, ".cursor/agents/gsd-verifier.md": { - "bytes": 57975, - "sha256": "5b8a75722a73948059ec2167999c72fa9ffdd1f95f0736df53042b189d0352e3" + "bytes": 58442, + "sha256": "bdb22eb96c1caf44aff1a454fa481467c9c5d4e7e1bd9073647c6a417ef91e41" }, ".cursor/hooks.json": { "bytes": 2050, diff --git a/gsd/core/tests/golden/kinds.json b/gsd/core/tests/golden/kinds.json index 9b75efbdf4..7dafe8e6dc 100644 --- a/gsd/core/tests/golden/kinds.json +++ b/gsd/core/tests/golden/kinds.json @@ -1488,16 +1488,6 @@ "dot_fillcolor": null, "dot_shape": null, "fields": [ - { - "default_value": null, - "description": "MVP", - "edge": null, - "field_type": "string", - "inverse_of": null, - "name": "name", - "required": true, - "target_kind": null - }, { "default_value": null, "description": "Delivered", @@ -1871,16 +1861,6 @@ "required": true, "target_kind": "milestone" }, - { - "default_value": null, - "description": "heading text", - "edge": null, - "field_type": "string", - "inverse_of": null, - "name": "name", - "required": true, - "target_kind": null - }, { "default_value": null, "description": "directory NN-slug", diff --git a/gsd/core/tests/golden/prompts/claude-code/add_tests.json b/gsd/core/tests/golden/prompts/claude-code/add_tests.json index c53e96170c..1ca6d6119b 100644 --- a/gsd/core/tests/golden/prompts/claude-code/add_tests.json +++ b/gsd/core/tests/golden/prompts/claude-code/add_tests.json @@ -58,10 +58,10 @@ "", "```", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; `name` is its field). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; its name is its `title`). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", "" ], - "bytes": 22550, + "bytes": 22554, "end": [ "", "---", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:15fd6e5851c1c277cc5da083764f1390b67015bc2d015ec81e5ff1a40049f4fb", + "digest": "sha256:f2d4ed313f3ccb09dcbd809197b48091275815eee5b731b31e8c08f9bd5e4d14", "prompt": "@gsd/core@VERSION:add_tests", "subject": "v1.0/02" }, - "sha256": "15fd6e5851c1c277cc5da083764f1390b67015bc2d015ec81e5ff1a40049f4fb" + "sha256": "f2d4ed313f3ccb09dcbd809197b48091275815eee5b731b31e8c08f9bd5e4d14" } diff --git a/gsd/core/tests/golden/prompts/claude-code/audit_milestone.json b/gsd/core/tests/golden/prompts/claude-code/audit_milestone.json index e152474d51..8aceccfe90 100644 --- a/gsd/core/tests/golden/prompts/claude-code/audit_milestone.json +++ b/gsd/core/tests/golden/prompts/claude-code/audit_milestone.json @@ -42,7 +42,7 @@ "AGENT_SKILLS_CHECKER=\"\" # the host install carries the skills of gsd-integration-checker", "```", "", - "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; `name` and `progress` are its fields, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", + "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; its name is its `title`, `progress` is its field, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", "", "Resolve integration checker model:", "```bash", @@ -61,7 +61,7 @@ "Resolve the milestone's audit, the `milestone_audit` entity this workflow records into. A re-audit reuses it; the first audit creates `<milestone>/A1`, before the integration checker is spawned, since its verdict is recorded on it:", "" ], - "bytes": 28285, + "bytes": 28429, "end": [ "", "<success_criteria>", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 616, + "lines": 619, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:8fe691b8db18e44fe7ad0fb4eba2e253558576702a7e9d7634afe310c51cb2b8", + "digest": "sha256:49ff889c0e106b5c9b1bab62ff17e8f34e975de3f8ae1911f2d4e42be34df94e", "prompt": "@gsd/core@VERSION:audit_milestone", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0" }, - "sha256": "8fe691b8db18e44fe7ad0fb4eba2e253558576702a7e9d7634afe310c51cb2b8" + "sha256": "49ff889c0e106b5c9b1bab62ff17e8f34e975de3f8ae1911f2d4e42be34df94e" } diff --git a/gsd/core/tests/golden/prompts/claude-code/audit_uat.json b/gsd/core/tests/golden/prompts/claude-code/audit_uat.json index e22c45dba6..b4be7872ea 100644 --- a/gsd/core/tests/golden/prompts/claude-code/audit_uat.json +++ b/gsd/core/tests/golden/prompts/claude-code/audit_uat.json @@ -61,10 +61,10 @@ "", "If `summary.parse_gap_files` is greater than 0, render this section FIRST (before the `## UAT Audit Report` below, or standalone if `total_items` is also 0). Filter `results` for entries with `parse_gap: true`:" ], - "bytes": 14140, + "bytes": 14243, "end": [ - "<step name=\"test_plan\">", - "Generate a human UAT test plan for \"Testable Now\" + \"active\" items only:", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", "", "Group by what can be tested together (same screen, same feature, same prerequisite):", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 330, + "lines": 332, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:60fe82ea8c022e3e9015df18014260b8e684cb4fae5755ea889b09d6b7de4dd7", + "digest": "sha256:74870d0e470ee2e5e09356215f01c4e420d24a42aea7c810180b1e659d2d2d07", "prompt": "@gsd/core@VERSION:audit_uat", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "60fe82ea8c022e3e9015df18014260b8e684cb4fae5755ea889b09d6b7de4dd7" + "sha256": "74870d0e470ee2e5e09356215f01c4e420d24a42aea7c810180b1e659d2d2d07" } diff --git a/gsd/core/tests/golden/prompts/claude-code/autonomous.json b/gsd/core/tests/golden/prompts/claude-code/autonomous.json index 6ca56a90fa..dce5322730 100644 --- a/gsd/core/tests/golden/prompts/claude-code/autonomous.json +++ b/gsd/core/tests/golden/prompts/claude-code/autonomous.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 55089, + "bytes": 55743, "end": [ "- Missing Next Up block after completions", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1221, + "lines": 1226, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:c1db46616f5815b4bebeb85353beea3db3a5038258c9f1ab4799e6e7f4040df4", + "digest": "sha256:fcf75a89bbd2ac8781f61afa968eaac5c6dd3279747988371852b57f533e6528", "prompt": "@gsd/core@VERSION:autonomous", "steps": [ { @@ -242,5 +242,5 @@ } ] }, - "sha256": "c1db46616f5815b4bebeb85353beea3db3a5038258c9f1ab4799e6e7f4040df4" + "sha256": "fcf75a89bbd2ac8781f61afa968eaac5c6dd3279747988371852b57f533e6528" } diff --git a/gsd/core/tests/golden/prompts/claude-code/config.json b/gsd/core/tests/golden/prompts/claude-code/config.json index fbc3780966..492be161f2 100644 --- a/gsd/core/tests/golden/prompts/claude-code/config.json +++ b/gsd/core/tests/golden/prompts/claude-code/config.json @@ -61,7 +61,7 @@ "specforge settings --format json --extension @gsd/core", "```" ], - "bytes": 95131, + "bytes": 93865, "end": [ "- [ ] `agent_skills.<agent-type>` slugs validated against `[a-zA-Z0-9_-]+` before write; `review.models.<cli>` slugs accepted only from the registry-derived settable set; skill lists written as JSON arrays (never comma-joined strings)", "- [ ] Config merge preserves all keys outside the three sections this workflow owns", @@ -98,7 +98,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions.", + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code.", "", "## The profile", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1979, + "lines": 1951, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:23f6dd16faa638cefe69e1f1f6d30d6bbbd57128d29b650ffac7dfda6d139a9e", + "digest": "sha256:81be1b425a024d340c30e763fa9870bb2fc97cb294d10c867ec4cfb2d66b75d3", "prompt": "@gsd/core@VERSION:config" }, - "sha256": "23f6dd16faa638cefe69e1f1f6d30d6bbbd57128d29b650ffac7dfda6d139a9e" + "sha256": "81be1b425a024d340c30e763fa9870bb2fc97cb294d10c867ec4cfb2d66b75d3" } diff --git a/gsd/core/tests/golden/prompts/claude-code/execute_phase.json b/gsd/core/tests/golden/prompts/claude-code/execute_phase.json index eb68044900..165c7e64d2 100644 --- a/gsd/core/tests/golden/prompts/claude-code/execute_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/execute_phase.json @@ -61,7 +61,7 @@ " Code), you MUST spawn gsd-executor agents — inline execution is not authorized. Check for", " actual tool availability, not runtime name." ], - "bytes": 89585, + "bytes": 89928, "end": [ "- Random emoji (`🚀`, `✨`, `💫`)", "- Missing Next Up block after completions", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1566, + "lines": 1571, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:10c3616768a8258966523123fa8033fe4558f37a28df00dddacd3ce23a64e5f4", + "digest": "sha256:a733d89236c6c1cd3eaadee6fca1674a248b95fdb6981e69b87b18de5506953e", "prompt": "@gsd/core@VERSION:execute_phase", "steps": [ { @@ -237,5 +237,5 @@ ], "subject": "v1.0/02" }, - "sha256": "10c3616768a8258966523123fa8033fe4558f37a28df00dddacd3ce23a64e5f4" + "sha256": "a733d89236c6c1cd3eaadee6fca1674a248b95fdb6981e69b87b18de5506953e" } diff --git a/gsd/core/tests/golden/prompts/claude-code/execute_plan.json b/gsd/core/tests/golden/prompts/claude-code/execute_plan.json index 5bb4c53d3f..55f8a1cb7f 100644 --- a/gsd/core/tests/golden/prompts/claude-code/execute_plan.json +++ b/gsd/core/tests/golden/prompts/claude-code/execute_plan.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 42272, + "bytes": 42227, "end": [ "SUMMARY_COUNT=$(specforge gsd progress-report --phase \"$PHASE_ID\" --pick '.phases[0].summaries')", "```", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 685, + "lines": 687, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:0d9105a651537266857b2ce44dcf41ce924e630ad7f01a1b572635b18ef2cd37", + "digest": "sha256:9bad704e6214f5593915b7791cede550aab052fb5c26cc506779fe5951d34530", "prompt": "@gsd/core@VERSION:execute_plan", "steps": [ { @@ -258,5 +258,5 @@ ], "subject": "v1.0/02/02-01" }, - "sha256": "0d9105a651537266857b2ce44dcf41ce924e630ad7f01a1b572635b18ef2cd37" + "sha256": "9bad704e6214f5593915b7791cede550aab052fb5c26cc506779fe5951d34530" } diff --git a/gsd/core/tests/golden/prompts/claude-code/extract_learnings.json b/gsd/core/tests/golden/prompts/claude-code/extract_learnings.json index bdc4b66859..a3358f4097 100644 --- a/gsd/core/tests/golden/prompts/claude-code/extract_learnings.json +++ b/gsd/core/tests/golden/prompts/claude-code/extract_learnings.json @@ -39,7 +39,8 @@ "PHASE_NUMBER=\"${PHASE_ID##*/}\" # the phase number is the last segment of its id", "```", "", - "Parse from the query JSON: the phase's `name` (its number is the last segment of `$PHASE_ID`, kept in `PHASE_NUMBER`).", + "Parse from the query JSON: in a phase's label, `{PHASE_NUMBER}` is the phase's number, the last segment of `$PHASE_ID`", + "(kept in `PHASE_NUMBER`), and `{PHASE_NAME}` is its `title`; `{PHASE_ID}` is its `id`.", "", "If phase not found, exit with error: \"Phase {PHASE_ID} not found.\"", "</step>", @@ -58,10 +59,9 @@ "- the phase's `uat_session` entities (`specforge query \"$PHASE_ID\" --depth 2 --kinds uat_session --format context`) — user acceptance test results", "- the project state (`specforge gsd progress-report --format json`) — with decisions and blockers", "", - "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field.", - "</step>" + "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field." ], - "bytes": 21003, + "bytes": 21107, "end": [ "", "---------------------------------------------------------------", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 468, + "lines": 469, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:abbf4cfeeeeb9da5dd084244c06323a386f1298866be1a9bdbeba7a73a5ac17c", + "digest": "sha256:c01b615a08398f9295f8e3bce01580afe455ef939adab66ac8f787ea096cc689", "prompt": "@gsd/core@VERSION:extract_learnings", "subject": "v1.0/02" }, - "sha256": "abbf4cfeeeeb9da5dd084244c06323a386f1298866be1a9bdbeba7a73a5ac17c" + "sha256": "c01b615a08398f9295f8e3bce01580afe455ef939adab66ac8f787ea096cc689" } diff --git a/gsd/core/tests/golden/prompts/claude-code/ingest_docs.json b/gsd/core/tests/golden/prompts/claude-code/ingest_docs.json index f94d1c315c..f37fd2c27d 100644 --- a/gsd/core/tests/golden/prompts/claude-code/ingest_docs.json +++ b/gsd/core/tests/golden/prompts/claude-code/ingest_docs.json @@ -61,7 +61,7 @@ " test -f \"{MANIFEST_PATH}\" || echo \"MANIFEST_NOT_FOUND\"", "fi" ], - "bytes": 44141, + "bytes": 44380, "end": [ "1. **Its own check list per bucket** — which conditions are BLOCKER vs WARNING vs INFO. These are domain-specific (plan ingestion checks are not doc ingestion checks).", "2. **The loaded context** — what it reads (ROADMAP.md, PROJECT.md, REQUIREMENTS.md, CONTEXT.md, intel files) before running checks.", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1003, + "lines": 1007, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:81626dfc3553e95ab510216ca692bf4ad61749d0244fe9258f6d3a8c534bbd1c", + "digest": "sha256:415ad9e66e2526f3a1164f73ead9f14dc15d3f447c71050be6309fd064170e62", "prompt": "@gsd/core@VERSION:ingest_docs", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "81626dfc3553e95ab510216ca692bf4ad61749d0244fe9258f6d3a8c534bbd1c" + "sha256": "415ad9e66e2526f3a1164f73ead9f14dc15d3f447c71050be6309fd064170e62" } diff --git a/gsd/core/tests/golden/prompts/claude-code/manager.json b/gsd/core/tests/golden/prompts/claude-code/manager.json index b9a88dfe3f..007a9af652 100644 --- a/gsd/core/tests/golden/prompts/claude-code/manager.json +++ b/gsd/core/tests/golden/prompts/claude-code/manager.json @@ -50,18 +50,18 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints; each phase has `number`, `name`, `plans`, `summaries`, `status`). The rest is derived, there is no init JSON: `phase_count` is the length of `phases`; `completed_count` counts status `Complete`; `in_progress_count` counts `In Progress`; `all_complete` is `completed_count == phase_count`; `recommended_actions` has one entry per phase that is not `Complete`, in order (`Pending` → `/gsd-discuss-phase N`, or `/gsd-plan-phase N` once a `context` entity exists, `specforge query \"$MILESTONE/N\" --depth 1 --kinds context`; `Planned` or `In Progress` → `/gsd-execute-phase N`); `waiting_signal` is always absent (no background-work signal here); `queued_milestone_version`, `queued_milestone_name` and `queued_phases` are absent (skip the Queued section); `response_language` is ``; `manager_flags` are the settings ``, `` and ``.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{phase_name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`).", + "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. Subagent dispatches (discuss/plan/execute) stay in English at the prompt level; include `response_language` in their spawn args per the workflow being dispatched.", "", "`manager_flags` are the per-step passthrough flags from the settings:", "- `manager_flags.discuss` — appended to `/gsd-discuss-phase` args (e.g. `\"--auto --analyze\"`)", "- `manager_flags.plan` — appended to plan agent init command", - "- `manager_flags.execute` — appended to execute agent init command", - "", - "These are empty strings by default. Set via: `specforge settings set @gsd/core manager.flags.discuss -- \"--auto --analyze\"`", - "", - "**If error:** Display the error message and exit." + "- `manager_flags.execute` — appended to execute agent init command" ], - "bytes": 38212, + "bytes": 38730, "end": [ "", "Table rules use ASCII `-`, never box-drawing characters.", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 868, + "lines": 874, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:1a4d4dca061545d4b36b5d4932c1e6342fc532184a531a75cf5e6915a78ad8af", + "digest": "sha256:3d9637b4a9669d8985b12586155530feea8d873de49a43b7344ec86a0ef6e711", "prompt": "@gsd/core@VERSION:manager", "steps": [ { @@ -232,5 +232,5 @@ } ] }, - "sha256": "1a4d4dca061545d4b36b5d4932c1e6342fc532184a531a75cf5e6915a78ad8af" + "sha256": "3d9637b4a9669d8985b12586155530feea8d873de49a43b7344ec86a0ef6e711" } diff --git a/gsd/core/tests/golden/prompts/claude-code/milestone_summary.json b/gsd/core/tests/golden/prompts/claude-code/milestone_summary.json index 0a26bc5796..17287d2545 100644 --- a/gsd/core/tests/golden/prompts/claude-code/milestone_summary.json +++ b/gsd/core/tests/golden/prompts/claude-code/milestone_summary.json @@ -61,7 +61,7 @@ "", "**Always available:**" ], - "bytes": 19853, + "bytes": 19911, "end": [ "```", "</file>", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:e780373f86fb3f4404cf3bb9056fed792918107e0b06c4d9457ccdd05f92836a", + "digest": "sha256:de772139e11201d3cf57c2410c1edd2bc14cb640377de93a23aa84f2a6cd3e79", "prompt": "@gsd/core@VERSION:milestone_summary", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "e780373f86fb3f4404cf3bb9056fed792918107e0b06c4d9457ccdd05f92836a" + "sha256": "de772139e11201d3cf57c2410c1edd2bc14cb640377de93a23aa84f2a6cd3e79" } diff --git a/gsd/core/tests/golden/prompts/claude-code/mvp_phase.json b/gsd/core/tests/golden/prompts/claude-code/mvp_phase.json index 9c414de58e..c73a5268e8 100644 --- a/gsd/core/tests/golden/prompts/claude-code/mvp_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/mvp_phase.json @@ -57,11 +57,11 @@ "RESPONSE_LANGUAGE=\"\" # response_language (the settings)", "", "PHASE_FOUND=true; specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].id' >/dev/null 2>&1 || PHASE_FOUND=false", - "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.name' 2>/dev/null)", + "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].title' 2>/dev/null)", "PHASE_GOAL=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.goal' 2>/dev/null)", "PHASE_MODE=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.mode' 2>/dev/null)" ], - "bytes": 26281, + "bytes": 26275, "end": [ "1. The `**Goal:**` line stays on a single line (no line breaks inside the story). If the story is longer than ~120 chars, it should be split into multiple phases via SPIDR (see `spidr-splitting.md`).", "2. The `**Mode:** mvp` line is added immediately below `**Goal:**`. If `**Mode:**` already exists, it is replaced (not duplicated).", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:e74b1c1c45940e749aa837f0b32150c5e680d24d9c3b82cf1732bca34bd03f8d", + "digest": "sha256:35fff33cb43487065bc17575889b64fc683df1ccd0d5e5b2a9b00287d07deff5", "prompt": "@gsd/core@VERSION:mvp_phase", "steps": [ { @@ -206,5 +206,5 @@ ], "subject": "v1.0/02" }, - "sha256": "e74b1c1c45940e749aa837f0b32150c5e680d24d9c3b82cf1732bca34bd03f8d" + "sha256": "35fff33cb43487065bc17575889b64fc683df1ccd0d5e5b2a9b00287d07deff5" } diff --git a/gsd/core/tests/golden/prompts/claude-code/new_milestone.json b/gsd/core/tests/golden/prompts/claude-code/new_milestone.json index 234de669d2..55619f4a55 100644 --- a/gsd/core/tests/golden/prompts/claude-code/new_milestone.json +++ b/gsd/core/tests/golden/prompts/claude-code/new_milestone.json @@ -61,7 +61,7 @@ "", "MILESTONE_NAME=\"Next\"" ], - "bytes": 62315, + "bytes": 62627, "end": [ "the roadmap wait for it, and the roadmapper maps each `v1` requirement to exactly one phase (the phase's", "`requirements`). Coverage, traceability and status are computed from the phases, plans and verifications that cover a", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1371, + "lines": 1374, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:b0697173d28aeb66d4e801c3745642bb6cadbe869c98a6ed2ba4e0252c1e23ad", + "digest": "sha256:f25cf0024e193bd096c7edb5b736402b4802080e9b189323c99f244b17ee8c22", "prompt": "@gsd/core@VERSION:new_milestone", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "b0697173d28aeb66d4e801c3745642bb6cadbe869c98a6ed2ba4e0252c1e23ad" + "sha256": "f25cf0024e193bd096c7edb5b736402b4802080e9b189323c99f244b17ee8c22" } diff --git a/gsd/core/tests/golden/prompts/claude-code/new_project.json b/gsd/core/tests/golden/prompts/claude-code/new_project.json index a1771bd595..87e5a2d633 100644 --- a/gsd/core/tests/golden/prompts/claude-code/new_project.json +++ b/gsd/core/tests/golden/prompts/claude-code/new_project.json @@ -61,7 +61,7 @@ "```bash", "" ], - "bytes": 75877, + "bytes": 75964, "end": [ "TIER=\"{v1, v2 or out_of_scope}\"", "IFS= read -rd '' REASON <<'TEXT' || true; REASON=${REASON%$'\\n'}", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1849, + "lines": 1851, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d9ced6ff2e3a878c2830383c0c3374722cb4b8c9902f2b226b02b4eda5b9b47f", + "digest": "sha256:5b59cac6d2b9fd95e7c63940197706ccf2ed769f4e22ceabf9bdfd9ccc89e15d", "prompt": "@gsd/core@VERSION:new_project", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "d9ced6ff2e3a878c2830383c0c3374722cb4b8c9902f2b226b02b4eda5b9b47f" + "sha256": "5b59cac6d2b9fd95e7c63940197706ccf2ed769f4e22ceabf9bdfd9ccc89e15d" } diff --git a/gsd/core/tests/golden/prompts/claude-code/next.json b/gsd/core/tests/golden/prompts/claude-code/next.json index b55b32cca2..5e5c228b32 100644 --- a/gsd/core/tests/golden/prompts/claude-code/next.json +++ b/gsd/core/tests/golden/prompts/claude-code/next.json @@ -61,7 +61,7 @@ " \"summary\": \"Phase 2 of 5 · 60% · executing\",", " \"signals\": { \"...\": \"...\" }," ], - "bytes": 22950, + "bytes": 23086, "end": [ "## Anti-Patterns", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 549, + "lines": 551, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:a6227f57712a50a78a76751febece5818a25c23867a73adb5132e71c6aadc026", + "digest": "sha256:0f6160707f1e3656b5657efa4ad5e6c20b824daaffe09ac3d990906708f27b5f", "prompt": "@gsd/core@VERSION:next", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "a6227f57712a50a78a76751febece5818a25c23867a73adb5132e71c6aadc026" + "sha256": "0f6160707f1e3656b5657efa4ad5e6c20b824daaffe09ac3d990906708f27b5f" } diff --git a/gsd/core/tests/golden/prompts/claude-code/onboard.json b/gsd/core/tests/golden/prompts/claude-code/onboard.json index b988e0c44c..2c152b8336 100644 --- a/gsd/core/tests/golden/prompts/claude-code/onboard.json +++ b/gsd/core/tests/golden/prompts/claude-code/onboard.json @@ -61,7 +61,7 @@ "Set:", "- `TEXT_MODE=true` if `--text` is present or `text_mode` is true. When `TEXT_MODE` is active, replace every `AskUserQuestion` call below with a plain-text numbered list and ask the user to type their choice number — required for non-Claude runtimes (OpenAI Codex, Antigravity, etc.) where `AskUserQuestion` is not available." ], - "bytes": 30571, + "bytes": 30810, "end": [ "- options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 790, + "lines": 794, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:94ee9d6e40590a1f38bbf3696dcb083d6788916318a5d6cf32c3f3a37e4afa49", + "digest": "sha256:e05e563814ea3c91ed55131db1619129eb6be07a2161811555c29e51bc67ba3a", "prompt": "@gsd/core@VERSION:onboard", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "94ee9d6e40590a1f38bbf3696dcb083d6788916318a5d6cf32c3f3a37e4afa49" + "sha256": "e05e563814ea3c91ed55131db1619129eb6be07a2161811555c29e51bc67ba3a" } diff --git a/gsd/core/tests/golden/prompts/claude-code/plan_phase.json b/gsd/core/tests/golden/prompts/claude-code/plan_phase.json index 616f598b22..1c9ad423dd 100644 --- a/gsd/core/tests/golden/prompts/claude-code/plan_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/plan_phase.json @@ -61,7 +61,7 @@ "collapsing plan roles into the orchestrator context.", "" ], - "bytes": 118097, + "bytes": 118613, "end": [ "- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)", "- `--skip-verify` — Skip verification loop", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 2010, + "lines": 2011, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:2cd818a4f30db6da6058f65b9330d522f0640dec6e2007c563e397b9e3271a97", + "digest": "sha256:5453de200f342ef590050c88cb39e6722a5ef11e84578721c146d578cbb9881a", "prompt": "@gsd/core@VERSION:plan_phase", "steps": [ { @@ -247,5 +247,5 @@ ], "subject": "v1.0/02" }, - "sha256": "2cd818a4f30db6da6058f65b9330d522f0640dec6e2007c563e397b9e3271a97" + "sha256": "5453de200f342ef590050c88cb39e6722a5ef11e84578721c146d578cbb9881a" } diff --git a/gsd/core/tests/golden/prompts/claude-code/plan_review_convergence.json b/gsd/core/tests/golden/prompts/claude-code/plan_review_convergence.json index 9bc0cc4268..4ae979147f 100644 --- a/gsd/core/tests/golden/prompts/claude-code/plan_review_convergence.json +++ b/gsd/core/tests/golden/prompts/claude-code/plan_review_convergence.json @@ -61,7 +61,7 @@ "operator's explicit flag overrides this gate for that run. Standalone invocation carries no such", "flag and remains gated by the config below." ], - "bytes": 67447, + "bytes": 67580, "end": [ "- `## Self-Check: FAILED` (summary self-check)", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1114, + "lines": 1117, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:09cb4b4166d550d843a1e8e8ac9827a3d8cae171c599011bff8e1d90a281449e", + "digest": "sha256:c4a6556683110624498864464363778916a34e8b4d973e64a78edcc0728189a7", "prompt": "@gsd/core@VERSION:plan_review_convergence", "steps": [ { @@ -211,5 +211,5 @@ ], "subject": "v1.0/02" }, - "sha256": "09cb4b4166d550d843a1e8e8ac9827a3d8cae171c599011bff8e1d90a281449e" + "sha256": "c4a6556683110624498864464363778916a34e8b4d973e64a78edcc0728189a7" } diff --git a/gsd/core/tests/golden/prompts/claude-code/pr_branch.json b/gsd/core/tests/golden/prompts/claude-code/pr_branch.json index 885cd53e03..be70de6961 100644 --- a/gsd/core/tests/golden/prompts/claude-code/pr_branch.json +++ b/gsd/core/tests/golden/prompts/claude-code/pr_branch.json @@ -61,7 +61,7 @@ "if [ -n \"$DIRTY\" ]; then", " echo \"Working tree has uncommitted changes — commit or stash them first:\" >&2" ], - "bytes": 22270, + "bytes": 22072, "end": [ "Planning paths in diff: {FORBIDDEN} — must be 0", "Planning deletions: {PLANNING_DELETIONS} (must be 0 — #3679)", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 500, + "lines": 495, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:63c269a0cafb748ffd22fc336dd25bc51b960025685c616d0ff9dc14a95f25aa", + "digest": "sha256:1da375bd5f1eda1e264a89126fc7f50196133cf056c3b57193aa89e46003c4d5", "prompt": "@gsd/core@VERSION:pr_branch" }, - "sha256": "63c269a0cafb748ffd22fc336dd25bc51b960025685c616d0ff9dc14a95f25aa" + "sha256": "1da375bd5f1eda1e264a89126fc7f50196133cf056c3b57193aa89e46003c4d5" } diff --git a/gsd/core/tests/golden/prompts/claude-code/progress.json b/gsd/core/tests/golden/prompts/claude-code/progress.json index 2e3d717978..333d8c75f2 100644 --- a/gsd/core/tests/golden/prompts/claude-code/progress.json +++ b/gsd/core/tests/golden/prompts/claude-code/progress.json @@ -52,16 +52,16 @@ "", "Read from the answer (what `progress-report` prints): `milestone_version`, `milestone_name`, `phases` (each `number`, `name`, `plans`, `summaries`, `status`), `total_plans`, `total_summaries`, `percent` and `phase_scope`. `phase_count` is the length of `phases` and `completed_count` counts those with status `Complete`; the current phase is the first that is not, and the next phase the one after it; `roadmap_exists` is `phases` non-empty and `state_exists` is `milestone_version` non-null (the project state is computed, so no path is read); a pause is a `pause` entity, and a phase's mode its `mode` field.", "", + "In a phase's label, `{phase}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`). `{Z}` is", + "the number of the phase just completed, and `{Z+1}` the next one's.", + "", "```bash", "DISCUSS_MODE=\"discuss\" # workflow.discuss_mode (the settings)", - "```", - "", - "**If `init_incomplete` is true (#4040 — interrupted bootstrap):**", - "", - "the spec exists but the core initialization entities are missing (one or more of the requirement, milestone and phase entities were never created — a bootstrap that stopped partway, e.g. after the `project` entity). This is NOT a new project, NOT a missing project state, and NOT a between-milestones state — do not fall through to any of those routes. Route to initialization recovery:", - "" + "```" ], - "bytes": 69139, + "bytes": 69900, "end": [ "| 3 | ○ | 0/2 | 0% |", "```", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1637, + "lines": 1647, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:a9d259b853fd93a948f6c9c1b6b09f7aa7d7123060e97ed13987f907f0669b69", + "digest": "sha256:8e739c2f0ddb880e85eedfcc6f2d7a76b50aae94ceea180b8542cdbb27ef8cde", "prompt": "@gsd/core@VERSION:progress", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "a9d259b853fd93a948f6c9c1b6b09f7aa7d7123060e97ed13987f907f0669b69" + "sha256": "8e739c2f0ddb880e85eedfcc6f2d7a76b50aae94ceea180b8542cdbb27ef8cde" } diff --git a/gsd/core/tests/golden/prompts/claude-code/quick.json b/gsd/core/tests/golden/prompts/claude-code/quick.json index c26abac788..d2b53b2716 100644 --- a/gsd/core/tests/golden/prompts/claude-code/quick.json +++ b/gsd/core/tests/golden/prompts/claude-code/quick.json @@ -61,7 +61,7 @@ "- gsd-verifier — Verifies phase completion, checks quality gates", "- gsd-code-reviewer — Reviews source files for bugs, security issues, and code quality" ], - "bytes": 59082, + "bytes": 58837, "end": [ "Execute end-to-end.", "Preserve all workflow gates (validation, task description, planning, execution, state updates, commits).", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1097, + "lines": 1091, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:95c7c0002187c454c26781a6061dc40d3af6766bfca340afafa6a0be5e1f3984", + "digest": "sha256:4e14363bc58a5ec7af1f6d18a5adb325a632eb990f5415f164306ef04e139f72", "prompt": "@gsd/core@VERSION:quick", "steps": [ { @@ -263,5 +263,5 @@ } ] }, - "sha256": "95c7c0002187c454c26781a6061dc40d3af6766bfca340afafa6a0be5e1f3984" + "sha256": "4e14363bc58a5ec7af1f6d18a5adb325a632eb990f5415f164306ef04e139f72" } diff --git a/gsd/core/tests/golden/prompts/claude-code/resume_work.json b/gsd/core/tests/golden/prompts/claude-code/resume_work.json index c660eabcb8..c3341f12ac 100644 --- a/gsd/core/tests/golden/prompts/claude-code/resume_work.json +++ b/gsd/core/tests/golden/prompts/claude-code/resume_work.json @@ -49,19 +49,19 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints). The routing facts below are not in it, they come from the graph: `state_exists` is `milestone_version` non-null (the project state is computed); `roadmap_exists` is `phases` non-empty; `project_exists` and `planning_exists` are `[ -n \"$(specforge export --kinds project --pick '.nodes[].id')\" ]`; `requirements_exists` is the same with `--kinds requirement`; `init_incomplete` is a project without a roadmap or without requirements; `has_interrupted_agent` is false (this extension keeps no agent registry).", "", + "In a phase's label, `[X]` and `[N]` are the phase's number, the last segment of its `id`, and `[Name]` and `[Phase name]`", + "are its `title`, read from its node (`specforge query \"$MILESTONE/${N}\" --depth 0 --pick '.nodes[0].title'`, `N` its", + "number): a phase's `name` in `phases` is its slug read as words, never a label's name.", + "", "**If `init_incomplete` is true (#4040 — interrupted bootstrap):** the spec exists but initialization never finished — the `requirement` entities, the `milestone` and `phase` entities or the project were never created. This is NOT a state-reconstruction case (the project state is computed). Route to initialization recovery: resume `/gsd-new-project`, which continues from the first missing entity and keeps the existing `project` entity and any already-created ones. Do not proceed to load_state.", "", "**If `state_exists` is true:** Proceed to load_state", "**If `state_exists` is false but `roadmap_exists` or `project_exists` is true (and `init_incomplete` is false):** Offer to reconstruct STATE.md", "**If `planning_exists` is false:** This is a new project - route to /gsd-new-project", "</step>", - "", - "<step name=\"load_state\">", - "", - "Read and parse STATE.md, then PROJECT.md:", "" ], - "bytes": 20558, + "bytes": 20885, "end": [ "", "</process>", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 524, + "lines": 528, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:ed6bbd733074c94add8cb306b2ed4f18d03f74447a3a0cc5c0f3183d70873c00", + "digest": "sha256:f53fda8e2c65edb1f8fec9a872e8f559859d85a68c5bb4a6bb31a0aa0bd5ca5a", "prompt": "@gsd/core@VERSION:resume_work", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "ed6bbd733074c94add8cb306b2ed4f18d03f74447a3a0cc5c0f3183d70873c00" + "sha256": "f53fda8e2c65edb1f8fec9a872e8f559859d85a68c5bb4a6bb31a0aa0bd5ca5a" } diff --git a/gsd/core/tests/golden/prompts/claude-code/review.json b/gsd/core/tests/golden/prompts/claude-code/review.json index 96a58383ab..d54ef7c90f 100644 --- a/gsd/core/tests/golden/prompts/claude-code/review.json +++ b/gsd/core/tests/golden/prompts/claude-code/review.json @@ -61,7 +61,7 @@ "", "Parse flags from `02 --codex`:" ], - "bytes": 56320, + "bytes": 56422, "end": [ "- [ ] At least one external CLI invoked successfully", "- [ ] The review round recorded with its concerns", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1013, + "lines": 1015, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:3a6ee735a3ebdf6f6f330797a27f5fa403910332525623e938e7f36ad6f8d263", + "digest": "sha256:0c8a14286e88083b42f1fd8a75c61f693d980d7cc6ef5364cd8065b32501dd04", "prompt": "@gsd/core@VERSION:review", "subject": "v1.0/02" }, - "sha256": "3a6ee735a3ebdf6f6f330797a27f5fa403910332525623e938e7f36ad6f8d263" + "sha256": "0c8a14286e88083b42f1fd8a75c61f693d980d7cc6ef5364cd8065b32501dd04" } diff --git a/gsd/core/tests/golden/prompts/claude-code/settings.json b/gsd/core/tests/golden/prompts/claude-code/settings.json index bc9dc1b9c3..4b6c3865bc 100644 --- a/gsd/core/tests/golden/prompts/claude-code/settings.json +++ b/gsd/core/tests/golden/prompts/claude-code/settings.json @@ -61,7 +61,7 @@ "- `workflow.code_review` — enable /gsd-code-review and /gsd-code-review --fix commands (default: true if absent)", "- `workflow.code_review_depth` — default depth for /gsd-code-review: `quick`, `standard`, or `deep` (default: `\"standard\"` if absent; only relevant when `code_review` is on)" ], - "bytes": 43612, + "bytes": 43404, "end": [ "These settings apply to future /gsd-plan-phase and /gsd-execute-phase runs.", "", @@ -102,7 +102,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions." + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code." ], "head": [ "<specforge_gsd_preamble>", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 781, + "lines": 780, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:635afd561e42a03164854115b5f45a4b5d1c0c36ac22e4aa2820112f2956a130", + "digest": "sha256:e50451f6c1fd54731a7e3d25c129caad3810741d283636f0d395459993078c76", "prompt": "@gsd/core@VERSION:settings" }, - "sha256": "635afd561e42a03164854115b5f45a4b5d1c0c36ac22e4aa2820112f2956a130" + "sha256": "e50451f6c1fd54731a7e3d25c129caad3810741d283636f0d395459993078c76" } diff --git a/gsd/core/tests/golden/prompts/claude-code/ship.json b/gsd/core/tests/golden/prompts/claude-code/ship.json index ee63b1fc58..e253c9d11c 100644 --- a/gsd/core/tests/golden/prompts/claude-code/ship.json +++ b/gsd/core/tests/golden/prompts/claude-code/ship.json @@ -51,17 +51,17 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error).", + "", + "In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and", + "`{phase_name}` is its `title`.", "", "Also load config for branching strategy:", "```bash", "CONFIG=$(specforge settings)", - "```", - "", - "The strategy is `git.branching_strategy` in these settings; the branch is the phase's computed `branch`.", - "" + "```" ], - "bytes": 45977, + "bytes": 46164, "end": [ "Branch: {branch} → ${BASE_BRANCH}", "Commits: {count}", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 813, + "lines": 816, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:b4accc599f5cc0d10e924c7c49d8bbcc4de9fd53c7feb56b82d661ad619de806", + "digest": "sha256:5e858ad3d0134ae77b83de21ae661a1fbc97d595a3534ae9402a05164ef8dbab", "prompt": "@gsd/core@VERSION:ship", "steps": [ { @@ -215,5 +215,5 @@ ], "subject": "v1.0/01" }, - "sha256": "b4accc599f5cc0d10e924c7c49d8bbcc4de9fd53c7feb56b82d661ad619de806" + "sha256": "5e858ad3d0134ae77b83de21ae661a1fbc97d595a3534ae9402a05164ef8dbab" } diff --git a/gsd/core/tests/golden/prompts/claude-code/spec_phase.json b/gsd/core/tests/golden/prompts/claude-code/spec_phase.json index cfa14ae825..7a3e433080 100644 --- a/gsd/core/tests/golden/prompts/claude-code/spec_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/spec_phase.json @@ -61,7 +61,7 @@ "- \"If you had to cut 50%, what's the irreducible core?\"", "- \"What would make this phase a success even without the nice-to-haves?\"" ], - "bytes": 52689, + "bytes": 52838, "end": [ "<context>", "Phase number: the `<arguments>` block (required)", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 934, + "lines": 937, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:55b4ed0fd7712975ad2a674f1b95664bc9bbe0f923be85fc810fc7a5b6d8111f", + "digest": "sha256:e8b2e6fecc48e4ad8ff8c1768c9ac4e21621921a9104bd044f879b7155986cc6", "judged": [ { "outcomes": [ @@ -235,5 +235,5 @@ ], "subject": "v1.0/02" }, - "sha256": "55b4ed0fd7712975ad2a674f1b95664bc9bbe0f923be85fc810fc7a5b6d8111f" + "sha256": "e8b2e6fecc48e4ad8ff8c1768c9ac4e21621921a9104bd044f879b7155986cc6" } diff --git a/gsd/core/tests/golden/prompts/claude-code/ultraplan_phase.json b/gsd/core/tests/golden/prompts/claude-code/ultraplan_phase.json index a781a7680c..e90da5429b 100644 --- a/gsd/core/tests/golden/prompts/claude-code/ultraplan_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/ultraplan_phase.json @@ -61,7 +61,7 @@ "fi", "```" ], - "bytes": 20463, + "bytes": 20782, "end": [ "| Phase | Status | Plans | Progress |", "|-------|--------|-------|----------|", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 616, + "lines": 621, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d4eb79d41e99b8702e2489051e964f811e4c711035f8275f98f262fbc3ed8745", + "digest": "sha256:37d32718324c27312eb245efaaa027bf494aa14d7956d4f38e272194f2da00eb", "prompt": "@gsd/core@VERSION:ultraplan_phase", "steps": [ { @@ -213,5 +213,5 @@ ], "subject": "v1.0/02" }, - "sha256": "d4eb79d41e99b8702e2489051e964f811e4c711035f8275f98f262fbc3ed8745" + "sha256": "37d32718324c27312eb245efaaa027bf494aa14d7956d4f38e272194f2da00eb" } diff --git a/gsd/core/tests/golden/prompts/claude-code/undo.json b/gsd/core/tests/golden/prompts/claude-code/undo.json index f7a63fe9c2..a5b9b24c76 100644 --- a/gsd/core/tests/golden/prompts/claude-code/undo.json +++ b/gsd/core/tests/golden/prompts/claude-code/undo.json @@ -61,7 +61,7 @@ "", "Examples:" ], - "bytes": 47690, + "bytes": 47929, "end": [ "- question: \"How thorough should planning be?\"", "- header: \"Depth\"", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1123, + "lines": 1127, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:847832304c014b6b11b1ea01677c0d72f0da4f1dc7c76f2eb43dc6d42e09090f", + "digest": "sha256:f5e5bcdc53d2fcb85bc8c7a36f1d2e00474df1ba53c4c4cd186d84e458dba7fe", "prompt": "@gsd/core@VERSION:undo" }, - "sha256": "847832304c014b6b11b1ea01677c0d72f0da4f1dc7c76f2eb43dc6d42e09090f" + "sha256": "f5e5bcdc53d2fcb85bc8c7a36f1d2e00474df1ba53c4c4cd186d84e458dba7fe" } diff --git a/gsd/core/tests/golden/prompts/claude-code/validate_phase.json b/gsd/core/tests/golden/prompts/claude-code/validate_phase.json index d6b8e7a547..4628b2d152 100644 --- a/gsd/core/tests/golden/prompts/claude-code/validate_phase.json +++ b/gsd/core/tests/golden/prompts/claude-code/validate_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`).", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/core: the host picks the model", @@ -56,12 +59,9 @@ "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"validate-phase\"`.", "", "If no active validate-phase step hook exists: exit with \"Nyquist validation is disabled. Enable via /gsd-settings.\"", - "", - "Display banner: `GSD > VALIDATE PHASE {N}: {name}`", - "", - "## 1. Detect Input State" + "" ], - "bytes": 20438, + "bytes": 20601, "end": [ "```", "GSD > PHASE {N} VALIDATED (PARTIAL)", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 429, + "lines": 432, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:375c1b9d5223bc3b21fb73dcd4d668233873adfc2845d6be1e091e406b12fd21", + "digest": "sha256:ae817d253d55f4403a52d1e98be2118a1344dc507fd66e908cca7ee450a6b30e", "prompt": "@gsd/core@VERSION:validate_phase", "steps": [ { @@ -220,5 +220,5 @@ ], "subject": "v1.0/02" }, - "sha256": "375c1b9d5223bc3b21fb73dcd4d668233873adfc2845d6be1e091e406b12fd21" + "sha256": "ae817d253d55f4403a52d1e98be2118a1344dc507fd66e908cca7ee450a6b30e" } diff --git a/gsd/core/tests/golden/prompts/claude-code/verify_work.json b/gsd/core/tests/golden/prompts/claude-code/verify_work.json index 7924649314..1a98fcd9f7 100644 --- a/gsd/core/tests/golden/prompts/claude-code/verify_work.json +++ b/gsd/core/tests/golden/prompts/claude-code/verify_work.json @@ -61,7 +61,7 @@ "# the commands below are specforge commands: there is no launcher to define", "" ], - "bytes": 62996, + "bytes": 63132, "end": [ "</section_rules>", "", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 1149, + "lines": 1152, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:9d0755e17ea6ae65ac55ebc8be92c54e4ddd3c9d0911a5c5e9bb7bbb0441780c", + "digest": "sha256:428afb884df96e92515b4a6c59563b6a98483e5176dd7be10b2fbe884a8d5a98", "prompt": "@gsd/core@VERSION:verify_work", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0/02" }, - "sha256": "9d0755e17ea6ae65ac55ebc8be92c54e4ddd3c9d0911a5c5e9bb7bbb0441780c" + "sha256": "428afb884df96e92515b4a6c59563b6a98483e5176dd7be10b2fbe884a8d5a98" } diff --git a/gsd/core/tests/golden/prompts/claude-code/workspace.json b/gsd/core/tests/golden/prompts/claude-code/workspace.json index cbd6aad5a0..d3403bba80 100644 --- a/gsd/core/tests/golden/prompts/claude-code/workspace.json +++ b/gsd/core/tests/golden/prompts/claude-code/workspace.json @@ -61,7 +61,7 @@ "- `--branch` → `BRANCH_NAME` (defaults to `workspace/$WORKSPACE_NAME`)", "- `--auto` → skip interactive questions" ], - "bytes": 31934, + "bytes": 32070, "end": [ "- Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.", "- A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above", @@ -186,7 +186,7 @@ " \"features.global_learnings\": false,", " \"features.thinking_partner\": false," ], - "lines": 837, + "lines": 839, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:cb73d2f1d765d720b373edf740c3725219bc7e95029dbfeabb800b119463e9b7", + "digest": "sha256:d4256cd534804b7097caab643807cc1f4c2a57bb6d742183c48204a1891c77cf", "prompt": "@gsd/core@VERSION:workspace" }, - "sha256": "cb73d2f1d765d720b373edf740c3725219bc7e95029dbfeabb800b119463e9b7" + "sha256": "d4256cd534804b7097caab643807cc1f4c2a57bb6d742183c48204a1891c77cf" } diff --git a/gsd/core/tests/golden/prompts/codex/add_tests.json b/gsd/core/tests/golden/prompts/codex/add_tests.json index 3f04b0cd63..8561504498 100644 --- a/gsd/core/tests/golden/prompts/codex/add_tests.json +++ b/gsd/core/tests/golden/prompts/codex/add_tests.json @@ -58,10 +58,10 @@ "", "```", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; `name` is its field). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; its name is its `title`). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", "" ], - "bytes": 31022, + "bytes": 31026, "end": [ "", "---", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:753ab504907b6b05ab12648ebe1810b081e78208cbb3309fef60e45af120abc6", + "digest": "sha256:db15a09268b79c84d94da97a673b607e1d8df60c146f1f70981fb2515609e578", "prompt": "@gsd/core@VERSION:add_tests", "subject": "v1.0/02" }, - "sha256": "753ab504907b6b05ab12648ebe1810b081e78208cbb3309fef60e45af120abc6" + "sha256": "db15a09268b79c84d94da97a673b607e1d8df60c146f1f70981fb2515609e578" } diff --git a/gsd/core/tests/golden/prompts/codex/audit_milestone.json b/gsd/core/tests/golden/prompts/codex/audit_milestone.json index 7fb91b53b4..f8d3ee286a 100644 --- a/gsd/core/tests/golden/prompts/codex/audit_milestone.json +++ b/gsd/core/tests/golden/prompts/codex/audit_milestone.json @@ -42,7 +42,7 @@ "AGENT_SKILLS_CHECKER=\"\" # the host install carries the skills of gsd-integration-checker", "```", "", - "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; `name` and `progress` are its fields, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", + "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; its name is its `title`, `progress` is its field, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", "", "Resolve integration checker model:", "```bash", @@ -61,7 +61,7 @@ "Resolve the milestone's audit, the `milestone_audit` entity this workflow records into. A re-audit reuses it; the first audit creates `<milestone>/A1`, before the integration checker is spawned, since its verdict is recorded on it:", "" ], - "bytes": 36731, + "bytes": 36875, "end": [ "", "<success_criteria>", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 728, + "lines": 731, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:29280b2cd5f9548522075fedad7d4c9d66fea67a70054633026d5a9203c371e5", + "digest": "sha256:4637587b25db5cf7889714f9679e06d85b31c38b0e89b77cd16a671ab94d2e9b", "prompt": "@gsd/core@VERSION:audit_milestone", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0" }, - "sha256": "29280b2cd5f9548522075fedad7d4c9d66fea67a70054633026d5a9203c371e5" + "sha256": "4637587b25db5cf7889714f9679e06d85b31c38b0e89b77cd16a671ab94d2e9b" } diff --git a/gsd/core/tests/golden/prompts/codex/audit_uat.json b/gsd/core/tests/golden/prompts/codex/audit_uat.json index 596a8e31b0..e49f9ce2c0 100644 --- a/gsd/core/tests/golden/prompts/codex/audit_uat.json +++ b/gsd/core/tests/golden/prompts/codex/audit_uat.json @@ -61,10 +61,10 @@ "", "If `summary.parse_gap_files` is greater than 0, render this section FIRST (before the `## UAT Audit Report` below, or standalone if `total_items` is also 0). Filter `results` for entries with `parse_gap: true`:" ], - "bytes": 22622, + "bytes": 22725, "end": [ - "<step name=\"test_plan\">", - "Generate a human UAT test plan for \"Testable Now\" + \"active\" items only:", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", "", "Group by what can be tested together (same screen, same feature, same prerequisite):", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 448, + "lines": 450, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:a2bab3d608070d222e975859b8f066cb74b4b016bf4188d27638e7717015035f", + "digest": "sha256:5854395726bda63f85009d586de8c693c8bb413258760f798261fed2b0b5c9a1", "prompt": "@gsd/core@VERSION:audit_uat", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "a2bab3d608070d222e975859b8f066cb74b4b016bf4188d27638e7717015035f" + "sha256": "5854395726bda63f85009d586de8c693c8bb413258760f798261fed2b0b5c9a1" } diff --git a/gsd/core/tests/golden/prompts/codex/autonomous.json b/gsd/core/tests/golden/prompts/codex/autonomous.json index 78f9f13808..616efab059 100644 --- a/gsd/core/tests/golden/prompts/codex/autonomous.json +++ b/gsd/core/tests/golden/prompts/codex/autonomous.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 63620, + "bytes": 64274, "end": [ "- Missing Next Up block after completions", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1337, + "lines": 1342, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:4c3e9b52f55193595929cb0f39d2932a72b73e45ba8cb33f8b0d71ca0d95ec35", + "digest": "sha256:5b2917cf2ac98b78e8d81da914951dda55a32ba29302bb8b270527c4481b50e5", "prompt": "@gsd/core@VERSION:autonomous", "steps": [ { @@ -242,5 +242,5 @@ } ] }, - "sha256": "4c3e9b52f55193595929cb0f39d2932a72b73e45ba8cb33f8b0d71ca0d95ec35" + "sha256": "5b2917cf2ac98b78e8d81da914951dda55a32ba29302bb8b270527c4481b50e5" } diff --git a/gsd/core/tests/golden/prompts/codex/config.json b/gsd/core/tests/golden/prompts/codex/config.json index 0aaa4c1c71..6e76341e77 100644 --- a/gsd/core/tests/golden/prompts/codex/config.json +++ b/gsd/core/tests/golden/prompts/codex/config.json @@ -61,7 +61,7 @@ "specforge settings --format json --extension @gsd/core", "```" ], - "bytes": 103648, + "bytes": 102382, "end": [ "- [ ] `agent_skills.<agent-type>` slugs validated against `[a-zA-Z0-9_-]+` before write; `review.models.<cli>` slugs accepted only from the registry-derived settable set; skill lists written as JSON arrays (never comma-joined strings)", "- [ ] Config merge preserves all keys outside the three sections this workflow owns", @@ -98,7 +98,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions.", + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code.", "", "## The profile", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 2097, + "lines": 2069, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:cc1249587410223bfcd9dced7887ed571a85769f035948d6d84a66f229cda7c1", + "digest": "sha256:c48d92a253fc8bbf20a79101010affc4a331f15b83b7d7dd97ba105989e70e44", "prompt": "@gsd/core@VERSION:config" }, - "sha256": "cc1249587410223bfcd9dced7887ed571a85769f035948d6d84a66f229cda7c1" + "sha256": "c48d92a253fc8bbf20a79101010affc4a331f15b83b7d7dd97ba105989e70e44" } diff --git a/gsd/core/tests/golden/prompts/codex/execute_phase.json b/gsd/core/tests/golden/prompts/codex/execute_phase.json index c5219b5c78..7bc1406371 100644 --- a/gsd/core/tests/golden/prompts/codex/execute_phase.json +++ b/gsd/core/tests/golden/prompts/codex/execute_phase.json @@ -61,7 +61,7 @@ " Code), you MUST spawn gsd-executor agents — inline execution is not authorized. Check for", " actual tool availability, not runtime name." ], - "bytes": 98244, + "bytes": 98587, "end": [ "- Random emoji (`🚀`, `✨`, `💫`)", "- Missing Next Up block after completions", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1680, + "lines": 1685, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:92110df55f270e183c0a0d90a614e2a7d5102784011f4df882c5c47b052d4f0d", + "digest": "sha256:50d5fe2a516d9f799cf552a6650c8d73ae4601dd5b930be58cce6dd4d59a665c", "prompt": "@gsd/core@VERSION:execute_phase", "steps": [ { @@ -237,5 +237,5 @@ ], "subject": "v1.0/02" }, - "sha256": "92110df55f270e183c0a0d90a614e2a7d5102784011f4df882c5c47b052d4f0d" + "sha256": "50d5fe2a516d9f799cf552a6650c8d73ae4601dd5b930be58cce6dd4d59a665c" } diff --git a/gsd/core/tests/golden/prompts/codex/execute_plan.json b/gsd/core/tests/golden/prompts/codex/execute_plan.json index 99af85e5d9..b4de6158af 100644 --- a/gsd/core/tests/golden/prompts/codex/execute_plan.json +++ b/gsd/core/tests/golden/prompts/codex/execute_plan.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 50850, + "bytes": 50805, "end": [ "SUMMARY_COUNT=$(specforge gsd progress-report --phase \"$PHASE_ID\" --pick '.phases[0].summaries')", "```", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 803, + "lines": 805, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d71f0f7b2eeb468d1829480facec5ba7ab1b9ef9f9e139e5012eedb8a46dd59d", + "digest": "sha256:2c29908c5e9ac195dc9a701eefea47683e0c7bd509a31ce980d8e2ba78074534", "prompt": "@gsd/core@VERSION:execute_plan", "steps": [ { @@ -258,5 +258,5 @@ ], "subject": "v1.0/02/02-01" }, - "sha256": "d71f0f7b2eeb468d1829480facec5ba7ab1b9ef9f9e139e5012eedb8a46dd59d" + "sha256": "2c29908c5e9ac195dc9a701eefea47683e0c7bd509a31ce980d8e2ba78074534" } diff --git a/gsd/core/tests/golden/prompts/codex/extract_learnings.json b/gsd/core/tests/golden/prompts/codex/extract_learnings.json index cc4238284a..a8204203f0 100644 --- a/gsd/core/tests/golden/prompts/codex/extract_learnings.json +++ b/gsd/core/tests/golden/prompts/codex/extract_learnings.json @@ -39,7 +39,8 @@ "PHASE_NUMBER=\"${PHASE_ID##*/}\" # the phase number is the last segment of its id", "```", "", - "Parse from the query JSON: the phase's `name` (its number is the last segment of `$PHASE_ID`, kept in `PHASE_NUMBER`).", + "Parse from the query JSON: in a phase's label, `{PHASE_NUMBER}` is the phase's number, the last segment of `$PHASE_ID`", + "(kept in `PHASE_NUMBER`), and `{PHASE_NAME}` is its `title`; `{PHASE_ID}` is its `id`.", "", "If phase not found, exit with error: \"Phase {PHASE_ID} not found.\"", "</step>", @@ -58,10 +59,9 @@ "- the phase's `uat_session` entities (`specforge query \"$PHASE_ID\" --depth 2 --kinds uat_session --format context`) — user acceptance test results", "- the project state (`specforge gsd progress-report --format json`) — with decisions and blockers", "", - "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field.", - "</step>" + "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field." ], - "bytes": 29498, + "bytes": 29602, "end": [ "", "---------------------------------------------------------------", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 586, + "lines": 587, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:c575baf75f215f3109edfbd90ec4da6639e2411bbc85be1515112fb3f1e48319", + "digest": "sha256:7eedc42697e0f44c68398805c65beca6b455e3ca91a5c53edc21ea0492cf13ab", "prompt": "@gsd/core@VERSION:extract_learnings", "subject": "v1.0/02" }, - "sha256": "c575baf75f215f3109edfbd90ec4da6639e2411bbc85be1515112fb3f1e48319" + "sha256": "7eedc42697e0f44c68398805c65beca6b455e3ca91a5c53edc21ea0492cf13ab" } diff --git a/gsd/core/tests/golden/prompts/codex/ingest_docs.json b/gsd/core/tests/golden/prompts/codex/ingest_docs.json index 732d879cdc..5b978ec700 100644 --- a/gsd/core/tests/golden/prompts/codex/ingest_docs.json +++ b/gsd/core/tests/golden/prompts/codex/ingest_docs.json @@ -61,7 +61,7 @@ " test -f \"{MANIFEST_PATH}\" || echo \"MANIFEST_NOT_FOUND\"", "fi" ], - "bytes": 52603, + "bytes": 52842, "end": [ "1. **Its own check list per bucket** — which conditions are BLOCKER vs WARNING vs INFO. These are domain-specific (plan ingestion checks are not doc ingestion checks).", "2. **The loaded context** — what it reads (ROADMAP.md, PROJECT.md, REQUIREMENTS.md, CONTEXT.md, intel files) before running checks.", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1119, + "lines": 1123, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:3125c9833d6b8ce97b45de7e661c081aa6c6dabe14e6fda7c721127827ffb36d", + "digest": "sha256:a0a3f18b77b7f2ae924650d1586fd5cfe29fdfbd7a3a507f05a291a1b8521aab", "prompt": "@gsd/core@VERSION:ingest_docs", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "3125c9833d6b8ce97b45de7e661c081aa6c6dabe14e6fda7c721127827ffb36d" + "sha256": "a0a3f18b77b7f2ae924650d1586fd5cfe29fdfbd7a3a507f05a291a1b8521aab" } diff --git a/gsd/core/tests/golden/prompts/codex/manager.json b/gsd/core/tests/golden/prompts/codex/manager.json index 21c1589cef..d4a36f4d41 100644 --- a/gsd/core/tests/golden/prompts/codex/manager.json +++ b/gsd/core/tests/golden/prompts/codex/manager.json @@ -50,18 +50,18 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints; each phase has `number`, `name`, `plans`, `summaries`, `status`). The rest is derived, there is no init JSON: `phase_count` is the length of `phases`; `completed_count` counts status `Complete`; `in_progress_count` counts `In Progress`; `all_complete` is `completed_count == phase_count`; `recommended_actions` has one entry per phase that is not `Complete`, in order (`Pending` → `$gsd-discuss-phase N`, or `$gsd-plan-phase N` once a `context` entity exists, `specforge query \"$MILESTONE/N\" --depth 1 --kinds context`; `Planned` or `In Progress` → `$gsd-execute-phase N`); `waiting_signal` is always absent (no background-work signal here); `queued_milestone_version`, `queued_milestone_name` and `queued_phases` are absent (skip the Queued section); `response_language` is ``; `manager_flags` are the settings ``, `` and ``.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{phase_name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`).", + "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. Subagent dispatches (discuss/plan/execute) stay in English at the prompt level; include `response_language` in their spawn args per the workflow being dispatched.", "", "`manager_flags` are the per-step passthrough flags from the settings:", "- `manager_flags.discuss` — appended to `$gsd-discuss-phase` args (e.g. `\"--auto --analyze\"`)", "- `manager_flags.plan` — appended to plan agent init command", - "- `manager_flags.execute` — appended to execute agent init command", - "", - "These are empty strings by default. Set via: `specforge settings set @gsd/core manager.flags.discuss -- \"--auto --analyze\"`", - "", - "**If error:** Display the error message and exit." + "- `manager_flags.execute` — appended to execute agent init command" ], - "bytes": 46681, + "bytes": 47199, "end": [ "", "Table rules use ASCII `-`, never box-drawing characters.", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 984, + "lines": 990, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:eb309e3644359815154426e2f97474242b0b5304d3a0ee0e0bd6f4dae021a8a3", + "digest": "sha256:1e7b1860e11a03972493d780ef433bef1be20c5a4da920f6c5222d96572fb217", "prompt": "@gsd/core@VERSION:manager", "steps": [ { @@ -232,5 +232,5 @@ } ] }, - "sha256": "eb309e3644359815154426e2f97474242b0b5304d3a0ee0e0bd6f4dae021a8a3" + "sha256": "1e7b1860e11a03972493d780ef433bef1be20c5a4da920f6c5222d96572fb217" } diff --git a/gsd/core/tests/golden/prompts/codex/milestone_summary.json b/gsd/core/tests/golden/prompts/codex/milestone_summary.json index 4854851e20..2e373d6d17 100644 --- a/gsd/core/tests/golden/prompts/codex/milestone_summary.json +++ b/gsd/core/tests/golden/prompts/codex/milestone_summary.json @@ -61,7 +61,7 @@ "", "**Always available:**" ], - "bytes": 28335, + "bytes": 28393, "end": [ "```", "</file>", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:ff1e5c3b542d2c9e80d19d94280deccb85430f2ab29e4994e4bc0f3513947b53", + "digest": "sha256:39559373299177fdc72f88a560cc297f1275fb5b780090de698b79e742ab3013", "prompt": "@gsd/core@VERSION:milestone_summary", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "ff1e5c3b542d2c9e80d19d94280deccb85430f2ab29e4994e4bc0f3513947b53" + "sha256": "39559373299177fdc72f88a560cc297f1275fb5b780090de698b79e742ab3013" } diff --git a/gsd/core/tests/golden/prompts/codex/mvp_phase.json b/gsd/core/tests/golden/prompts/codex/mvp_phase.json index aae18bd6c5..334be4b84a 100644 --- a/gsd/core/tests/golden/prompts/codex/mvp_phase.json +++ b/gsd/core/tests/golden/prompts/codex/mvp_phase.json @@ -57,11 +57,11 @@ "RESPONSE_LANGUAGE=\"\" # response_language (the settings)", "", "PHASE_FOUND=true; specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].id' >/dev/null 2>&1 || PHASE_FOUND=false", - "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.name' 2>/dev/null)", + "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].title' 2>/dev/null)", "PHASE_GOAL=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.goal' 2>/dev/null)", "PHASE_MODE=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.mode' 2>/dev/null)" ], - "bytes": 34841, + "bytes": 34835, "end": [ "1. The `**Goal:**` line stays on a single line (no line breaks inside the story). If the story is longer than ~120 chars, it should be split into multiple phases via SPIDR (see `spidr-splitting.md`).", "2. The `**Mode:** mvp` line is added immediately below `**Goal:**`. If `**Mode:**` already exists, it is replaced (not duplicated).", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:a4ea4d88114d1e100f413fca797ef95cfc841a664fe66c478421c4a30a44201b", + "digest": "sha256:2d7a24c252096730850d2788c61fc75439d3ed116fc69220077677279071b1b3", "prompt": "@gsd/core@VERSION:mvp_phase", "steps": [ { @@ -206,5 +206,5 @@ ], "subject": "v1.0/02" }, - "sha256": "a4ea4d88114d1e100f413fca797ef95cfc841a664fe66c478421c4a30a44201b" + "sha256": "2d7a24c252096730850d2788c61fc75439d3ed116fc69220077677279071b1b3" } diff --git a/gsd/core/tests/golden/prompts/codex/new_milestone.json b/gsd/core/tests/golden/prompts/codex/new_milestone.json index fbe38d6ec4..79428070b1 100644 --- a/gsd/core/tests/golden/prompts/codex/new_milestone.json +++ b/gsd/core/tests/golden/prompts/codex/new_milestone.json @@ -61,7 +61,7 @@ "", "MILESTONE_NAME=\"Next\"" ], - "bytes": 70829, + "bytes": 71141, "end": [ "the roadmap wait for it, and the roadmapper maps each `v1` requirement to exactly one phase (the phase's", "`requirements`). Coverage, traceability and status are computed from the phases, plans and verifications that cover a", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1485, + "lines": 1488, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:f62d1fb65c861ae72f5e4befd6046114b24d853c68cc583dfe63ccfc8c5e801d", + "digest": "sha256:5540852d8689fadca39743acd53c31f6b2bbee6745aa20482c366a3649f6fc12", "prompt": "@gsd/core@VERSION:new_milestone", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "f62d1fb65c861ae72f5e4befd6046114b24d853c68cc583dfe63ccfc8c5e801d" + "sha256": "5540852d8689fadca39743acd53c31f6b2bbee6745aa20482c366a3649f6fc12" } diff --git a/gsd/core/tests/golden/prompts/codex/new_project.json b/gsd/core/tests/golden/prompts/codex/new_project.json index 484e36f69d..c78c580145 100644 --- a/gsd/core/tests/golden/prompts/codex/new_project.json +++ b/gsd/core/tests/golden/prompts/codex/new_project.json @@ -61,7 +61,7 @@ "```bash", "" ], - "bytes": 84356, + "bytes": 84443, "end": [ "TIER=\"{v1, v2 or out_of_scope}\"", "IFS= read -rd '' REASON <<'TEXT' || true; REASON=${REASON%$'\\n'}", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1961, + "lines": 1963, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d5a7a0213d5c01e7a2a85b693b08c2fa13b34384fae24bbbee336b1556f3b5ee", + "digest": "sha256:54ab05566c6f2177baa90d3991285153f87d4984f3f6334be3193378b700fbc2", "prompt": "@gsd/core@VERSION:new_project", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "d5a7a0213d5c01e7a2a85b693b08c2fa13b34384fae24bbbee336b1556f3b5ee" + "sha256": "54ab05566c6f2177baa90d3991285153f87d4984f3f6334be3193378b700fbc2" } diff --git a/gsd/core/tests/golden/prompts/codex/next.json b/gsd/core/tests/golden/prompts/codex/next.json index 4fafa4f9ef..0318c8aaf0 100644 --- a/gsd/core/tests/golden/prompts/codex/next.json +++ b/gsd/core/tests/golden/prompts/codex/next.json @@ -61,7 +61,7 @@ " \"summary\": \"Phase 2 of 5 · 60% · executing\",", " \"signals\": { \"...\": \"...\" }," ], - "bytes": 31486, + "bytes": 31622, "end": [ "## Anti-Patterns", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 665, + "lines": 667, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:2702e876574df1ed2338c69617f518831e9db007ad3898f26628aac9ef879a94", + "digest": "sha256:7b9fd003c641bdbc649a10b460722894fe9aeaeb06744c5872cb7d572a1e1f2a", "prompt": "@gsd/core@VERSION:next", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "2702e876574df1ed2338c69617f518831e9db007ad3898f26628aac9ef879a94" + "sha256": "7b9fd003c641bdbc649a10b460722894fe9aeaeb06744c5872cb7d572a1e1f2a" } diff --git a/gsd/core/tests/golden/prompts/codex/onboard.json b/gsd/core/tests/golden/prompts/codex/onboard.json index e7d52d1bde..dbf97e6851 100644 --- a/gsd/core/tests/golden/prompts/codex/onboard.json +++ b/gsd/core/tests/golden/prompts/codex/onboard.json @@ -61,7 +61,7 @@ "Set:", "- `TEXT_MODE=true` if `--text` is present or `text_mode` is true. When `TEXT_MODE` is active, replace every `AskUserQuestion` call below with a plain-text numbered list and ask the user to type their choice number — required for non-the agent runtimes (OpenAI Codex, Antigravity, etc.) where `AskUserQuestion` is not available." ], - "bytes": 39043, + "bytes": 39282, "end": [ "- options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 906, + "lines": 910, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:c514ca4229fc606e8a540b4eebd80b2875a942d957fd71da59abfb80881dbb42", + "digest": "sha256:dbc318a1ac82430fbe6bbfb3ff526cf628b51f6a058d3d6f33b366948cd8c81a", "prompt": "@gsd/core@VERSION:onboard", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "c514ca4229fc606e8a540b4eebd80b2875a942d957fd71da59abfb80881dbb42" + "sha256": "dbc318a1ac82430fbe6bbfb3ff526cf628b51f6a058d3d6f33b366948cd8c81a" } diff --git a/gsd/core/tests/golden/prompts/codex/plan_phase.json b/gsd/core/tests/golden/prompts/codex/plan_phase.json index f6c1cce19f..282d7a4b0a 100644 --- a/gsd/core/tests/golden/prompts/codex/plan_phase.json +++ b/gsd/core/tests/golden/prompts/codex/plan_phase.json @@ -61,7 +61,7 @@ "collapsing plan roles into the orchestrator context.", "" ], - "bytes": 126695, + "bytes": 127211, "end": [ "- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)", "- `--skip-verify` — Skip verification loop", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 2124, + "lines": 2125, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:fe860af3a53c59c5165c10c49af15b5ca3172e4f5f626d96b9d319f8d416a09a", + "digest": "sha256:1573b72c784b439ba2a323924d4dbf41435ad77fb6bb031029bda71c2796fb00", "prompt": "@gsd/core@VERSION:plan_phase", "steps": [ { @@ -247,5 +247,5 @@ ], "subject": "v1.0/02" }, - "sha256": "fe860af3a53c59c5165c10c49af15b5ca3172e4f5f626d96b9d319f8d416a09a" + "sha256": "1573b72c784b439ba2a323924d4dbf41435ad77fb6bb031029bda71c2796fb00" } diff --git a/gsd/core/tests/golden/prompts/codex/plan_review_convergence.json b/gsd/core/tests/golden/prompts/codex/plan_review_convergence.json index a9b8998fec..03ee1620ab 100644 --- a/gsd/core/tests/golden/prompts/codex/plan_review_convergence.json +++ b/gsd/core/tests/golden/prompts/codex/plan_review_convergence.json @@ -61,7 +61,7 @@ "operator's explicit flag overrides this gate for that run. Standalone invocation carries no such", "flag and remains gated by the config below." ], - "bytes": 75958, + "bytes": 76091, "end": [ "- `## Self-Check: FAILED` (summary self-check)", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1232, + "lines": 1235, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:389aa022ba5885be67db3ed3250d93836f332aa009fa0ec4d9865c284d1fff3b", + "digest": "sha256:3b0e1a77a747629c7e193792229e9bc86414dfdd26643a6418f2dd0df94f5dd7", "prompt": "@gsd/core@VERSION:plan_review_convergence", "steps": [ { @@ -211,5 +211,5 @@ ], "subject": "v1.0/02" }, - "sha256": "389aa022ba5885be67db3ed3250d93836f332aa009fa0ec4d9865c284d1fff3b" + "sha256": "3b0e1a77a747629c7e193792229e9bc86414dfdd26643a6418f2dd0df94f5dd7" } diff --git a/gsd/core/tests/golden/prompts/codex/pr_branch.json b/gsd/core/tests/golden/prompts/codex/pr_branch.json index 69ae3f401d..ba4835f08d 100644 --- a/gsd/core/tests/golden/prompts/codex/pr_branch.json +++ b/gsd/core/tests/golden/prompts/codex/pr_branch.json @@ -61,7 +61,7 @@ "if [ -n \"$DIRTY\" ]; then", " echo \"Working tree has uncommitted changes — commit or stash them first:\" >&2" ], - "bytes": 30752, + "bytes": 30554, "end": [ "Planning paths in diff: {FORBIDDEN} — must be 0", "Planning deletions: {PLANNING_DELETIONS} (must be 0 — #3679)", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 618, + "lines": 613, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:2df54340160470c0f0a1b4b7c53b7e9fd824ea993abe01b9c31704698465ba2e", + "digest": "sha256:a2ff2c00f399fae8e49051443c7d22e0e47431444f9e8ead99f66d6add439e22", "prompt": "@gsd/core@VERSION:pr_branch" }, - "sha256": "2df54340160470c0f0a1b4b7c53b7e9fd824ea993abe01b9c31704698465ba2e" + "sha256": "a2ff2c00f399fae8e49051443c7d22e0e47431444f9e8ead99f66d6add439e22" } diff --git a/gsd/core/tests/golden/prompts/codex/progress.json b/gsd/core/tests/golden/prompts/codex/progress.json index 1adec2c88e..4fabc670a3 100644 --- a/gsd/core/tests/golden/prompts/codex/progress.json +++ b/gsd/core/tests/golden/prompts/codex/progress.json @@ -52,16 +52,16 @@ "", "Read from the answer (what `progress-report` prints): `milestone_version`, `milestone_name`, `phases` (each `number`, `name`, `plans`, `summaries`, `status`), `total_plans`, `total_summaries`, `percent` and `phase_scope`. `phase_count` is the length of `phases` and `completed_count` counts those with status `Complete`; the current phase is the first that is not, and the next phase the one after it; `roadmap_exists` is `phases` non-empty and `state_exists` is `milestone_version` non-null (the project state is computed, so no path is read); a pause is a `pause` entity, and a phase's mode its `mode` field.", "", + "In a phase's label, `{phase}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`). `{Z}` is", + "the number of the phase just completed, and `{Z+1}` the next one's.", + "", "```bash", "DISCUSS_MODE=\"discuss\" # workflow.discuss_mode (the settings)", - "```", - "", - "**If `init_incomplete` is true (#4040 — interrupted bootstrap):**", - "", - "the spec exists but the core initialization entities are missing (one or more of the requirement, milestone and phase entities were never created — a bootstrap that stopped partway, e.g. after the `project` entity). This is NOT a new project, NOT a missing project state, and NOT a between-milestones state — do not fall through to any of those routes. Route to initialization recovery:", - "" + "```" ], - "bytes": 77381, + "bytes": 78142, "end": [ "| 3 | ○ | 0/2 | 0% |", "```", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1723, + "lines": 1733, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:c5a876acb07e4b79e812ecce5cbdbb04d8a19d44c3aa71490f129f87bcbfde4c", + "digest": "sha256:170f2cdef2f817e3d0cd2077f777153d145b5e196c7fd978d83ad9a89663563f", "prompt": "@gsd/core@VERSION:progress", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "c5a876acb07e4b79e812ecce5cbdbb04d8a19d44c3aa71490f129f87bcbfde4c" + "sha256": "170f2cdef2f817e3d0cd2077f777153d145b5e196c7fd978d83ad9a89663563f" } diff --git a/gsd/core/tests/golden/prompts/codex/quick.json b/gsd/core/tests/golden/prompts/codex/quick.json index 972de67e37..95a5552ea1 100644 --- a/gsd/core/tests/golden/prompts/codex/quick.json +++ b/gsd/core/tests/golden/prompts/codex/quick.json @@ -61,7 +61,7 @@ "- gsd-verifier — Verifies phase completion, checks quality gates", "- gsd-code-reviewer — Reviews source files for bugs, security issues, and code quality" ], - "bytes": 67564, + "bytes": 67319, "end": [ "Execute end-to-end.", "Preserve all workflow gates (validation, task description, planning, execution, state updates, commits).", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1215, + "lines": 1209, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:7fd9462c3f71b6fb1f0c4f39da997caa6de067b9bb5507d55d2950fd07ab866f", + "digest": "sha256:994c168433b2154106b5c2629932deaa4689b8eba457e4f561dd5a0b6d8d16db", "prompt": "@gsd/core@VERSION:quick", "steps": [ { @@ -263,5 +263,5 @@ } ] }, - "sha256": "7fd9462c3f71b6fb1f0c4f39da997caa6de067b9bb5507d55d2950fd07ab866f" + "sha256": "994c168433b2154106b5c2629932deaa4689b8eba457e4f561dd5a0b6d8d16db" } diff --git a/gsd/core/tests/golden/prompts/codex/resume_work.json b/gsd/core/tests/golden/prompts/codex/resume_work.json index e6cf0596b8..15321d6ef1 100644 --- a/gsd/core/tests/golden/prompts/codex/resume_work.json +++ b/gsd/core/tests/golden/prompts/codex/resume_work.json @@ -49,19 +49,19 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints). The routing facts below are not in it, they come from the graph: `state_exists` is `milestone_version` non-null (the project state is computed); `roadmap_exists` is `phases` non-empty; `project_exists` and `planning_exists` are `[ -n \"$(specforge export --kinds project --pick '.nodes[].id')\" ]`; `requirements_exists` is the same with `--kinds requirement`; `init_incomplete` is a project without a roadmap or without requirements; `has_interrupted_agent` is false (this extension keeps no agent registry).", "", + "In a phase's label, `[X]` and `[N]` are the phase's number, the last segment of its `id`, and `[Name]` and `[Phase name]`", + "are its `title`, read from its node (`specforge query \"$MILESTONE/${N}\" --depth 0 --pick '.nodes[0].title'`, `N` its", + "number): a phase's `name` in `phases` is its slug read as words, never a label's name.", + "", "**If `init_incomplete` is true (#4040 — interrupted bootstrap):** the spec exists but initialization never finished — the `requirement` entities, the `milestone` and `phase` entities or the project were never created. This is NOT a state-reconstruction case (the project state is computed). Route to initialization recovery: resume `$gsd-new-project`, which continues from the first missing entity and keeps the existing `project` entity and any already-created ones. Do not proceed to load_state.", "", "**If `state_exists` is true:** Proceed to load_state", "**If `state_exists` is false but `roadmap_exists` or `project_exists` is true (and `init_incomplete` is false):** Offer to reconstruct STATE.md", "**If `planning_exists` is false:** This is a new project - route to $gsd-new-project", "</step>", - "", - "<step name=\"load_state\">", - "", - "Read and parse STATE.md, then PROJECT.md:", "" ], - "bytes": 29040, + "bytes": 29367, "end": [ "", "</process>", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 642, + "lines": 646, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:b7fa6fdd043c222e5601d4331f18e136383b02248a4cdab8ccd593058d9f0695", + "digest": "sha256:39819be3e42d389457cb22c45111164e4fea3817a380de08ceb2918575063424", "prompt": "@gsd/core@VERSION:resume_work", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "b7fa6fdd043c222e5601d4331f18e136383b02248a4cdab8ccd593058d9f0695" + "sha256": "39819be3e42d389457cb22c45111164e4fea3817a380de08ceb2918575063424" } diff --git a/gsd/core/tests/golden/prompts/codex/review.json b/gsd/core/tests/golden/prompts/codex/review.json index 93ccbf58c0..b4890f15c6 100644 --- a/gsd/core/tests/golden/prompts/codex/review.json +++ b/gsd/core/tests/golden/prompts/codex/review.json @@ -61,7 +61,7 @@ "", "Parse flags from `02 --codex`:" ], - "bytes": 64817, + "bytes": 64919, "end": [ "- [ ] At least one external CLI invoked successfully", "- [ ] The review round recorded with its concerns", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1131, + "lines": 1133, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:abc5415eae09a72aab6533b2361c1dcef916b51ea3db960a3373db5a8e01b953", + "digest": "sha256:60af7492d41b684ebcdcde03ab44c0e1b7f9ec4e2abe7da828b1ba93843714c5", "prompt": "@gsd/core@VERSION:review", "subject": "v1.0/02" }, - "sha256": "abc5415eae09a72aab6533b2361c1dcef916b51ea3db960a3373db5a8e01b953" + "sha256": "60af7492d41b684ebcdcde03ab44c0e1b7f9ec4e2abe7da828b1ba93843714c5" } diff --git a/gsd/core/tests/golden/prompts/codex/settings.json b/gsd/core/tests/golden/prompts/codex/settings.json index 927f27cc76..91c65c31a3 100644 --- a/gsd/core/tests/golden/prompts/codex/settings.json +++ b/gsd/core/tests/golden/prompts/codex/settings.json @@ -61,7 +61,7 @@ "- `workflow.code_review` — enable $gsd-code-review and $gsd-code-review --fix commands (default: true if absent)", "- `workflow.code_review_depth` — default depth for $gsd-code-review: `quick`, `standard`, or `deep` (default: `\"standard\"` if absent; only relevant when `code_review` is on)" ], - "bytes": 52111, + "bytes": 51903, "end": [ "These settings apply to future $gsd-plan-phase and $gsd-execute-phase runs.", "", @@ -102,7 +102,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions." + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code." ], "head": [ "<codex_skill_adapter>", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 899, + "lines": 898, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:7214af8ad67945797f4788d19d1bd43dd08765a7853e2b25399db453f144b791", + "digest": "sha256:b0f59b6fb1df8b8a2fae98f51f3df0146fac0c0e129591b405c680162b745bb6", "prompt": "@gsd/core@VERSION:settings" }, - "sha256": "7214af8ad67945797f4788d19d1bd43dd08765a7853e2b25399db453f144b791" + "sha256": "b0f59b6fb1df8b8a2fae98f51f3df0146fac0c0e129591b405c680162b745bb6" } diff --git a/gsd/core/tests/golden/prompts/codex/ship.json b/gsd/core/tests/golden/prompts/codex/ship.json index efbd07ae43..be214899fb 100644 --- a/gsd/core/tests/golden/prompts/codex/ship.json +++ b/gsd/core/tests/golden/prompts/codex/ship.json @@ -51,17 +51,17 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error).", + "", + "In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and", + "`{phase_name}` is its `title`.", "", "Also load config for branching strategy:", "```bash", "CONFIG=$(specforge settings)", - "```", - "", - "The strategy is `git.branching_strategy` in these settings; the branch is the phase's computed `branch`.", - "" + "```" ], - "bytes": 54468, + "bytes": 54655, "end": [ "Branch: {branch} → ${BASE_BRANCH}", "Commits: {count}", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 931, + "lines": 934, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:dd910c54a5b90fcc9190b433d98c0c0e17a1f11fc6cc1ef777fe484494f8ebeb", + "digest": "sha256:fa21d66cf92f565402cf8e1948b8fa41a145f3171264722d6cb1e67225155555", "prompt": "@gsd/core@VERSION:ship", "steps": [ { @@ -215,5 +215,5 @@ ], "subject": "v1.0/01" }, - "sha256": "dd910c54a5b90fcc9190b433d98c0c0e17a1f11fc6cc1ef777fe484494f8ebeb" + "sha256": "fa21d66cf92f565402cf8e1948b8fa41a145f3171264722d6cb1e67225155555" } diff --git a/gsd/core/tests/golden/prompts/codex/spec_phase.json b/gsd/core/tests/golden/prompts/codex/spec_phase.json index 499788ef04..276a87a94a 100644 --- a/gsd/core/tests/golden/prompts/codex/spec_phase.json +++ b/gsd/core/tests/golden/prompts/codex/spec_phase.json @@ -61,7 +61,7 @@ "- \"If you had to cut 50%, what's the irreducible core?\"", "- \"What would make this phase a success even without the nice-to-haves?\"" ], - "bytes": 61193, + "bytes": 61342, "end": [ "<context>", "Phase number: the `<arguments>` block (required)", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1052, + "lines": 1055, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:339e50ea7f8337dea542462731e89716673915e32a1d18c39df76e798d59e93c", + "digest": "sha256:8b4ca287dc5e849e99b1f0280d495217c544f9c4910cdc05f26775f0780410e4", "judged": [ { "outcomes": [ @@ -235,5 +235,5 @@ ], "subject": "v1.0/02" }, - "sha256": "339e50ea7f8337dea542462731e89716673915e32a1d18c39df76e798d59e93c" + "sha256": "8b4ca287dc5e849e99b1f0280d495217c544f9c4910cdc05f26775f0780410e4" } diff --git a/gsd/core/tests/golden/prompts/codex/ultraplan_phase.json b/gsd/core/tests/golden/prompts/codex/ultraplan_phase.json index a5d1749868..97a4e42da9 100644 --- a/gsd/core/tests/golden/prompts/codex/ultraplan_phase.json +++ b/gsd/core/tests/golden/prompts/codex/ultraplan_phase.json @@ -61,7 +61,7 @@ "fi", "```" ], - "bytes": 28935, + "bytes": 29254, "end": [ "| Phase | Status | Plans | Progress |", "|-------|--------|-------|----------|", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 732, + "lines": 737, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:02e2fd5286b5a45de14439a159208d8eb9414c7720c357c161f4b261f7be8a06", + "digest": "sha256:3bf99e6bb46d38f0e82768ff5aa5cbebaee914a266204ee8b9f30eb59415e269", "prompt": "@gsd/core@VERSION:ultraplan_phase", "steps": [ { @@ -213,5 +213,5 @@ ], "subject": "v1.0/02" }, - "sha256": "02e2fd5286b5a45de14439a159208d8eb9414c7720c357c161f4b261f7be8a06" + "sha256": "3bf99e6bb46d38f0e82768ff5aa5cbebaee914a266204ee8b9f30eb59415e269" } diff --git a/gsd/core/tests/golden/prompts/codex/undo.json b/gsd/core/tests/golden/prompts/codex/undo.json index ce3ab54769..c113be47f6 100644 --- a/gsd/core/tests/golden/prompts/codex/undo.json +++ b/gsd/core/tests/golden/prompts/codex/undo.json @@ -61,7 +61,7 @@ "", "Examples:" ], - "bytes": 56161, + "bytes": 56400, "end": [ "- question: \"How thorough should planning be?\"", "- header: \"Depth\"", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1237, + "lines": 1241, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:6a3c9be0f2a186fa3931f8ae5b68d2d029d6374e8571cd1ec8d90b51ca32f0f8", + "digest": "sha256:7d18e8da83cf461266b68a79b20092c13646147fa8b3084ccde0763918c999ab", "prompt": "@gsd/core@VERSION:undo" }, - "sha256": "6a3c9be0f2a186fa3931f8ae5b68d2d029d6374e8571cd1ec8d90b51ca32f0f8" + "sha256": "7d18e8da83cf461266b68a79b20092c13646147fa8b3084ccde0763918c999ab" } diff --git a/gsd/core/tests/golden/prompts/codex/validate_phase.json b/gsd/core/tests/golden/prompts/codex/validate_phase.json index 7893f01975..9c4bc2c8c2 100644 --- a/gsd/core/tests/golden/prompts/codex/validate_phase.json +++ b/gsd/core/tests/golden/prompts/codex/validate_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`).", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/core: the host picks the model", @@ -56,12 +59,9 @@ "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"validate-phase\"`.", "", "If no active validate-phase step hook exists: exit with \"Nyquist validation is disabled. Enable via $gsd-settings.\"", - "", - "Display banner: `GSD > VALIDATE PHASE {N}: {name}`", - "", - "## 1. Detect Input State" + "" ], - "bytes": 28928, + "bytes": 29091, "end": [ "```", "GSD > PHASE {N} VALIDATED (PARTIAL)", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 547, + "lines": 550, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:98735f38f030d4b4258ebdeaa6c54d0eec2e21891e6196b4f0c443e1881f6b46", + "digest": "sha256:4c42865d6c76a45865bfc89bdaf0c46bba72fd69e49f2e8f7553aa5db18cdd59", "prompt": "@gsd/core@VERSION:validate_phase", "steps": [ { @@ -220,5 +220,5 @@ ], "subject": "v1.0/02" }, - "sha256": "98735f38f030d4b4258ebdeaa6c54d0eec2e21891e6196b4f0c443e1881f6b46" + "sha256": "4c42865d6c76a45865bfc89bdaf0c46bba72fd69e49f2e8f7553aa5db18cdd59" } diff --git a/gsd/core/tests/golden/prompts/codex/verify_work.json b/gsd/core/tests/golden/prompts/codex/verify_work.json index 0b56645eb9..1785a02d32 100644 --- a/gsd/core/tests/golden/prompts/codex/verify_work.json +++ b/gsd/core/tests/golden/prompts/codex/verify_work.json @@ -61,7 +61,7 @@ "# the commands below are specforge commands: there is no launcher to define", "" ], - "bytes": 71489, + "bytes": 71625, "end": [ "</section_rules>", "", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 1267, + "lines": 1270, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:c9010ccc8e61e01ac854a1e301d6c36d2d0df186c25986a2ea16051aa3901e18", + "digest": "sha256:be08d1606600cacac4ac171e40f491c19fb78d801c5ffd0087cd6c0d9edf2c10", "prompt": "@gsd/core@VERSION:verify_work", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0/02" }, - "sha256": "c9010ccc8e61e01ac854a1e301d6c36d2d0df186c25986a2ea16051aa3901e18" + "sha256": "be08d1606600cacac4ac171e40f491c19fb78d801c5ffd0087cd6c0d9edf2c10" } diff --git a/gsd/core/tests/golden/prompts/codex/workspace.json b/gsd/core/tests/golden/prompts/codex/workspace.json index bc33d2ee12..43c5187a2c 100644 --- a/gsd/core/tests/golden/prompts/codex/workspace.json +++ b/gsd/core/tests/golden/prompts/codex/workspace.json @@ -61,7 +61,7 @@ "- `--branch` → `BRANCH_NAME` (defaults to `workspace/$WORKSPACE_NAME`)", "- `--auto` → skip interactive questions" ], - "bytes": 40406, + "bytes": 40542, "end": [ "- Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.", "- A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 953, + "lines": 955, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:e63857773bfc9e0a910a5a45fa8f4186dbbdee4507e2d86f001b7b5db561f7d1", + "digest": "sha256:ec716fda4f657c9f24913ec2cecd0cd61106307d4d9bc6ac64f23f72fb311946", "prompt": "@gsd/core@VERSION:workspace" }, - "sha256": "e63857773bfc9e0a910a5a45fa8f4186dbbdee4507e2d86f001b7b5db561f7d1" + "sha256": "ec716fda4f657c9f24913ec2cecd0cd61106307d4d9bc6ac64f23f72fb311946" } diff --git a/gsd/core/tests/golden/prompts/cursor/add_tests.json b/gsd/core/tests/golden/prompts/cursor/add_tests.json index 42c4be31e9..62500fb6a0 100644 --- a/gsd/core/tests/golden/prompts/cursor/add_tests.json +++ b/gsd/core/tests/golden/prompts/cursor/add_tests.json @@ -58,10 +58,10 @@ "", "```", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; `name` is its field). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number is the last segment of that id; its name is its `title`). `response_language` is a setting: `specforge settings --format json --extension @gsd/core`.", "" ], - "bytes": 23326, + "bytes": 23330, "end": [ "", "---", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:9f217e87df6bf9a7773ed2fe814827bed6ca202e8f187c613beb61813f1b527a", + "digest": "sha256:0240f1f70c26f444e81cc4e5d5ec763ae0fab9e883f9e679328c26b2e110dc11", "prompt": "@gsd/core@VERSION:add_tests", "subject": "v1.0/02" }, - "sha256": "9f217e87df6bf9a7773ed2fe814827bed6ca202e8f187c613beb61813f1b527a" + "sha256": "0240f1f70c26f444e81cc4e5d5ec763ae0fab9e883f9e679328c26b2e110dc11" } diff --git a/gsd/core/tests/golden/prompts/cursor/audit_milestone.json b/gsd/core/tests/golden/prompts/cursor/audit_milestone.json index 5697d0159e..1b5e65e6cb 100644 --- a/gsd/core/tests/golden/prompts/cursor/audit_milestone.json +++ b/gsd/core/tests/golden/prompts/cursor/audit_milestone.json @@ -42,7 +42,7 @@ "AGENT_SKILLS_CHECKER=\"\" # the host install carries the skills of gsd-integration-checker", "```", "", - "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; `name` and `progress` are its fields, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", + "Read from the answer: the node whose `id` is `$MILESTONE` is the milestone (its version is that id; its name is its `title`, `progress` is its field, and `phase_count` and `completed_phases` are its `progress`'s `phases` and `phases_complete`), and its phases are among the other nodes.", "", "Resolve integration checker model:", "```bash", @@ -61,7 +61,7 @@ "Resolve the milestone's audit, the `milestone_audit` entity this workflow records into. A re-audit reuses it; the first audit creates `<milestone>/A1`, before the integration checker is spawned, since its verdict is recorded on it:", "" ], - "bytes": 29030, + "bytes": 29174, "end": [ "", "<success_criteria>", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 635, + "lines": 638, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:fc82ecd9f01688c557f277f4b0ec7629f1a6f466abacd7732badbf371908c78c", + "digest": "sha256:4c2bf36cf37651965e8ed219d208d182592b989c797956e7a103edfb5bb8c652", "prompt": "@gsd/core@VERSION:audit_milestone", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0" }, - "sha256": "fc82ecd9f01688c557f277f4b0ec7629f1a6f466abacd7732badbf371908c78c" + "sha256": "4c2bf36cf37651965e8ed219d208d182592b989c797956e7a103edfb5bb8c652" } diff --git a/gsd/core/tests/golden/prompts/cursor/audit_uat.json b/gsd/core/tests/golden/prompts/cursor/audit_uat.json index 42cf868713..16a8ff3e4b 100644 --- a/gsd/core/tests/golden/prompts/cursor/audit_uat.json +++ b/gsd/core/tests/golden/prompts/cursor/audit_uat.json @@ -61,10 +61,10 @@ "", "If `summary.parse_gap_files` is greater than 0, render this section FIRST (before the `## UAT Audit Report` below, or standalone if `total_items` is also 0). Filter `results` for entries with `parse_gap: true`:" ], - "bytes": 14885, + "bytes": 14988, "end": [ - "<step name=\"test_plan\">", - "Generate a human UAT test plan for \"Testable Now\" + \"active\" items only:", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", "", "Group by what can be tested together (same screen, same feature, same prerequisite):", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 349, + "lines": 351, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:95477fc595752f4f5632f989e14e436b7ab20b96ba03c7f274ed50b413b8ed7d", + "digest": "sha256:ec5435647958d997b34673a72316581f0c6a61a9ddc9f1ce3ed56ba070e8b1a1", "prompt": "@gsd/core@VERSION:audit_uat", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "95477fc595752f4f5632f989e14e436b7ab20b96ba03c7f274ed50b413b8ed7d" + "sha256": "ec5435647958d997b34673a72316581f0c6a61a9ddc9f1ce3ed56ba070e8b1a1" } diff --git a/gsd/core/tests/golden/prompts/cursor/autonomous.json b/gsd/core/tests/golden/prompts/cursor/autonomous.json index cabc731dc0..1389292728 100644 --- a/gsd/core/tests/golden/prompts/cursor/autonomous.json +++ b/gsd/core/tests/golden/prompts/cursor/autonomous.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 55935, + "bytes": 56589, "end": [ "- Missing Next Up block after completions", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1240, + "lines": 1245, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:6b01880bf2e7539869f8e691b783253a9c7b8111744140a358522437724d1df1", + "digest": "sha256:c9f3d22bd6f7b7430d74e33eea66d148d26d3a891c7770646ccaa882dda84835", "prompt": "@gsd/core@VERSION:autonomous", "steps": [ { @@ -242,5 +242,5 @@ } ] }, - "sha256": "6b01880bf2e7539869f8e691b783253a9c7b8111744140a358522437724d1df1" + "sha256": "c9f3d22bd6f7b7430d74e33eea66d148d26d3a891c7770646ccaa882dda84835" } diff --git a/gsd/core/tests/golden/prompts/cursor/config.json b/gsd/core/tests/golden/prompts/cursor/config.json index 099ea30d9f..457f005687 100644 --- a/gsd/core/tests/golden/prompts/cursor/config.json +++ b/gsd/core/tests/golden/prompts/cursor/config.json @@ -61,7 +61,7 @@ "specforge settings --format json --extension @gsd/core", "```" ], - "bytes": 96149, + "bytes": 94883, "end": [ "- [ ] `agent_skills.<agent-type>` slugs validated against `[a-zA-Z0-9_-]+` before write; `review.models.<cli>` slugs accepted only from the registry-derived settable set; skill lists written as JSON arrays (never comma-joined strings)", "- [ ] Config merge preserves all keys outside the three sections this workflow owns", @@ -98,7 +98,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions.", + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code.", "", "## The profile", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1998, + "lines": 1970, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:62e34d7870cbb5dd6428730c77bde15a126640778dfaed11081593831f8d7ca2", + "digest": "sha256:c1aafb3de7cea0d125738343d44871d8c3494ce6b2edd170782f4ec3c66058dd", "prompt": "@gsd/core@VERSION:config" }, - "sha256": "62e34d7870cbb5dd6428730c77bde15a126640778dfaed11081593831f8d7ca2" + "sha256": "c1aafb3de7cea0d125738343d44871d8c3494ce6b2edd170782f4ec3c66058dd" } diff --git a/gsd/core/tests/golden/prompts/cursor/execute_phase.json b/gsd/core/tests/golden/prompts/cursor/execute_phase.json index f63b6619fe..e46fb278e2 100644 --- a/gsd/core/tests/golden/prompts/cursor/execute_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/execute_phase.json @@ -61,7 +61,7 @@ " Code), you MUST spawn gsd-executor agents — inline execution is not authorized. Check for", " actual tool availability, not runtime name." ], - "bytes": 90291, + "bytes": 90634, "end": [ "- Random emoji (`🚀`, `✨`, `💫`)", "- Missing Next Up block after completions", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1584, + "lines": 1589, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:6d90091a2365425c355c3841d691df4e35daa9f3ec5b4a779c53514f58c70b55", + "digest": "sha256:6cc76ebd73a10cbdfb1970405996f41a6e79e3d7352698b6ad36dc75bd234a44", "prompt": "@gsd/core@VERSION:execute_phase", "steps": [ { @@ -237,5 +237,5 @@ ], "subject": "v1.0/02" }, - "sha256": "6d90091a2365425c355c3841d691df4e35daa9f3ec5b4a779c53514f58c70b55" + "sha256": "6cc76ebd73a10cbdfb1970405996f41a6e79e3d7352698b6ad36dc75bd234a44" } diff --git a/gsd/core/tests/golden/prompts/cursor/execute_plan.json b/gsd/core/tests/golden/prompts/cursor/execute_plan.json index 7f86727f1a..e0fcf74b66 100644 --- a/gsd/core/tests/golden/prompts/cursor/execute_plan.json +++ b/gsd/core/tests/golden/prompts/cursor/execute_plan.json @@ -61,7 +61,7 @@ "```", "" ], - "bytes": 42889, + "bytes": 42844, "end": [ "SUMMARY_COUNT=$(specforge gsd progress-report --phase \"$PHASE_ID\" --pick '.phases[0].summaries')", "```", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 703, + "lines": 705, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:f4e5bf0400cd359db24f86d33154a7c881bc3fc4b14feca935f1c52b32a58e19", + "digest": "sha256:5e5688a78f3d1deab68fd06c3438c895bb12432afc56aa15ccafeb6a6a31e1f0", "prompt": "@gsd/core@VERSION:execute_plan", "steps": [ { @@ -258,5 +258,5 @@ ], "subject": "v1.0/02/02-01" }, - "sha256": "f4e5bf0400cd359db24f86d33154a7c881bc3fc4b14feca935f1c52b32a58e19" + "sha256": "5e5688a78f3d1deab68fd06c3438c895bb12432afc56aa15ccafeb6a6a31e1f0" } diff --git a/gsd/core/tests/golden/prompts/cursor/extract_learnings.json b/gsd/core/tests/golden/prompts/cursor/extract_learnings.json index 09acbca244..295eb36700 100644 --- a/gsd/core/tests/golden/prompts/cursor/extract_learnings.json +++ b/gsd/core/tests/golden/prompts/cursor/extract_learnings.json @@ -39,7 +39,8 @@ "PHASE_NUMBER=\"${PHASE_ID##*/}\" # the phase number is the last segment of its id", "```", "", - "Parse from the query JSON: the phase's `name` (its number is the last segment of `$PHASE_ID`, kept in `PHASE_NUMBER`).", + "Parse from the query JSON: in a phase's label, `{PHASE_NUMBER}` is the phase's number, the last segment of `$PHASE_ID`", + "(kept in `PHASE_NUMBER`), and `{PHASE_NAME}` is its `title`; `{PHASE_ID}` is its `id`.", "", "If phase not found, exit with error: \"Phase {PHASE_ID} not found.\"", "</step>", @@ -58,10 +59,9 @@ "- the phase's `uat_session` entities (`specforge query \"$PHASE_ID\" --depth 2 --kinds uat_session --format context`) — user acceptance test results", "- the project state (`specforge gsd progress-report --format json`) — with decisions and blockers", "", - "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field.", - "</step>" + "Track which optional artifacts are missing for the `missing_artifacts` frontmatter field." ], - "bytes": 21762, + "bytes": 21866, "end": [ "", "---------------------------------------------------------------", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 487, + "lines": 488, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:0d253d5081febbb9bdc2caf6be2fa59095bed5792800749b92bdebc881a8f173", + "digest": "sha256:4ffb1f3fb22246996b9b42bb5fef164af0c9c4a21c752051680a316b94bfd1c7", "prompt": "@gsd/core@VERSION:extract_learnings", "subject": "v1.0/02" }, - "sha256": "0d253d5081febbb9bdc2caf6be2fa59095bed5792800749b92bdebc881a8f173" + "sha256": "4ffb1f3fb22246996b9b42bb5fef164af0c9c4a21c752051680a316b94bfd1c7" } diff --git a/gsd/core/tests/golden/prompts/cursor/ingest_docs.json b/gsd/core/tests/golden/prompts/cursor/ingest_docs.json index 21093fb948..a17e27b658 100644 --- a/gsd/core/tests/golden/prompts/cursor/ingest_docs.json +++ b/gsd/core/tests/golden/prompts/cursor/ingest_docs.json @@ -61,7 +61,7 @@ " test -f \"{MANIFEST_PATH}\" || echo \"MANIFEST_NOT_FOUND\"", "fi" ], - "bytes": 44921, + "bytes": 45160, "end": [ "1. **Its own check list per bucket** — which conditions are BLOCKER vs WARNING vs INFO. These are domain-specific (plan ingestion checks are not doc ingestion checks).", "2. **The loaded context** — what it reads (ROADMAP.md, PROJECT.md, REQUIREMENTS.md, CONTEXT.md, intel files) before running checks.", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1022, + "lines": 1026, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:8390bbfbb36119ac7a0a38b9a0b30f2fbb618f49f6c20f0a5f96aea0bbef6978", + "digest": "sha256:baf67fbad590a36928ec1d20b253252adac0e85e2386658f73f0da88855242d0", "prompt": "@gsd/core@VERSION:ingest_docs", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "8390bbfbb36119ac7a0a38b9a0b30f2fbb618f49f6c20f0a5f96aea0bbef6978" + "sha256": "baf67fbad590a36928ec1d20b253252adac0e85e2386658f73f0da88855242d0" } diff --git a/gsd/core/tests/golden/prompts/cursor/manager.json b/gsd/core/tests/golden/prompts/cursor/manager.json index 3fa019fef2..95be04a205 100644 --- a/gsd/core/tests/golden/prompts/cursor/manager.json +++ b/gsd/core/tests/golden/prompts/cursor/manager.json @@ -50,18 +50,18 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints; each phase has `number`, `name`, `plans`, `summaries`, `status`). The rest is derived, there is no init JSON: `phase_count` is the length of `phases`; `completed_count` counts status `Complete`; `in_progress_count` counts `In Progress`; `all_complete` is `completed_count == phase_count`; `recommended_actions` has one entry per phase that is not `Complete`, in order (`Pending` → `/gsd-discuss-phase N`, or `/gsd-plan-phase N` once a `context` entity exists, `specforge query \"$MILESTONE/N\" --depth 1 --kinds context`; `Planned` or `In Progress` → `/gsd-execute-phase N`); `waiting_signal` is always absent (no background-work signal here); `queued_milestone_version`, `queued_milestone_name` and `queued_phases` are absent (skip the Queued section); `response_language` is ``; `manager_flags` are the settings ``, `` and ``.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{phase_name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`).", + "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. Subagent dispatches (discuss/plan/execute) stay in English at the prompt level; include `response_language` in their spawn args per the workflow being dispatched.", "", "`manager_flags` are the per-step passthrough flags from the settings:", "- `manager_flags.discuss` — appended to `/gsd-discuss-phase` args (e.g. `\"--auto --analyze\"`)", "- `manager_flags.plan` — appended to plan agent init command", - "- `manager_flags.execute` — appended to execute agent init command", - "", - "These are empty strings by default. Set via: `specforge settings set @gsd/core manager.flags.discuss -- \"--auto --analyze\"`", - "", - "**If error:** Display the error message and exit." + "- `manager_flags.execute` — appended to execute agent init command" ], - "bytes": 39019, + "bytes": 39537, "end": [ "", "Table rules use ASCII `-`, never box-drawing characters.", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 887, + "lines": 893, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:2513eff8f7a3f45b34766179700b75edfc5b511dfa0dade45e3d8212aafdea7c", + "digest": "sha256:eba4d8a8e2c39a8dc5bb6dabf63b9d9921dc4144500b30a3342510346a85dc27", "prompt": "@gsd/core@VERSION:manager", "steps": [ { @@ -232,5 +232,5 @@ } ] }, - "sha256": "2513eff8f7a3f45b34766179700b75edfc5b511dfa0dade45e3d8212aafdea7c" + "sha256": "eba4d8a8e2c39a8dc5bb6dabf63b9d9921dc4144500b30a3342510346a85dc27" } diff --git a/gsd/core/tests/golden/prompts/cursor/milestone_summary.json b/gsd/core/tests/golden/prompts/cursor/milestone_summary.json index 16326a3a74..e65f5720bc 100644 --- a/gsd/core/tests/golden/prompts/cursor/milestone_summary.json +++ b/gsd/core/tests/golden/prompts/cursor/milestone_summary.json @@ -61,7 +61,7 @@ "", "**Always available:**" ], - "bytes": 20603, + "bytes": 20661, "end": [ "```", "</file>", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:e511079b4a7edd1dedd7022902cbaf5bf2ec26f87d1c7c7802fbd0b2412b1e61", + "digest": "sha256:661b0a1b75aaeec84c8175248f10e2a5b95fc025e20351e79b85003984535b65", "prompt": "@gsd/core@VERSION:milestone_summary", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "e511079b4a7edd1dedd7022902cbaf5bf2ec26f87d1c7c7802fbd0b2412b1e61" + "sha256": "661b0a1b75aaeec84c8175248f10e2a5b95fc025e20351e79b85003984535b65" } diff --git a/gsd/core/tests/golden/prompts/cursor/mvp_phase.json b/gsd/core/tests/golden/prompts/cursor/mvp_phase.json index 165b3ce250..69e77f2c7f 100644 --- a/gsd/core/tests/golden/prompts/cursor/mvp_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/mvp_phase.json @@ -57,11 +57,11 @@ "RESPONSE_LANGUAGE=\"\" # response_language (the settings)", "", "PHASE_FOUND=true; specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].id' >/dev/null 2>&1 || PHASE_FOUND=false", - "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.name' 2>/dev/null)", + "PHASE_NAME=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].title' 2>/dev/null)", "PHASE_GOAL=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.goal' 2>/dev/null)", "PHASE_MODE=$(specforge query \"$PHASE_ID\" --depth 0 --pick '.nodes[0].fields.mode' 2>/dev/null)" ], - "bytes": 27173, + "bytes": 27167, "end": [ "1. The `**Goal:**` line stays on a single line (no line breaks inside the story). If the story is longer than ~120 chars, it should be split into multiple phases via SPIDR (see `spidr-splitting.md`).", "2. The `**Mode:** mvp` line is added immediately below `**Goal:**`. If `**Mode:**` already exists, it is replaced (not duplicated).", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:26f9e552162d32f015b23b6fa7592df4c0774731b325dc2d1c9250abefd441cb", + "digest": "sha256:2fd48195f76b24c8275114a959b79da46340d06648f0c0fc5b2314a0ffda8871", "prompt": "@gsd/core@VERSION:mvp_phase", "steps": [ { @@ -206,5 +206,5 @@ ], "subject": "v1.0/02" }, - "sha256": "26f9e552162d32f015b23b6fa7592df4c0774731b325dc2d1c9250abefd441cb" + "sha256": "2fd48195f76b24c8275114a959b79da46340d06648f0c0fc5b2314a0ffda8871" } diff --git a/gsd/core/tests/golden/prompts/cursor/new_milestone.json b/gsd/core/tests/golden/prompts/cursor/new_milestone.json index cf056ba16e..f60e6dc82b 100644 --- a/gsd/core/tests/golden/prompts/cursor/new_milestone.json +++ b/gsd/core/tests/golden/prompts/cursor/new_milestone.json @@ -61,7 +61,7 @@ "", "MILESTONE_NAME=\"Next\"" ], - "bytes": 63287, + "bytes": 63599, "end": [ "the roadmap wait for it, and the roadmapper maps each `v1` requirement to exactly one phase (the phase's", "`requirements`). Coverage, traceability and status are computed from the phases, plans and verifications that cover a", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1390, + "lines": 1393, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:4c46d2e5e7ccbbd4619983bf5a7f9f11c372cdaf3dbb6b1a8e37ff6ba5ec598e", + "digest": "sha256:ca9194f01ea24de94ddf1193a501bb0dc5919b97144ba401dac4455cb2e93d0c", "prompt": "@gsd/core@VERSION:new_milestone", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "4c46d2e5e7ccbbd4619983bf5a7f9f11c372cdaf3dbb6b1a8e37ff6ba5ec598e" + "sha256": "ca9194f01ea24de94ddf1193a501bb0dc5919b97144ba401dac4455cb2e93d0c" } diff --git a/gsd/core/tests/golden/prompts/cursor/new_project.json b/gsd/core/tests/golden/prompts/cursor/new_project.json index eba7e84bc1..e7e073b467 100644 --- a/gsd/core/tests/golden/prompts/cursor/new_project.json +++ b/gsd/core/tests/golden/prompts/cursor/new_project.json @@ -61,7 +61,7 @@ "```bash", "" ], - "bytes": 76853, + "bytes": 76940, "end": [ "TIER=\"{v1, v2 or out_of_scope}\"", "IFS= read -rd '' REASON <<'TEXT' || true; REASON=${REASON%$'\\n'}", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1868, + "lines": 1870, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:7d03913ddd697bc3d5ca3be88520c8290f8d3eab555e508bd1f4f33b56e382ce", + "digest": "sha256:e9d24491c3f2b150b1edf5f86c6db881f87a000e1f59c4951efa453997f58f96", "prompt": "@gsd/core@VERSION:new_project", "steps": [ { @@ -227,5 +227,5 @@ } ] }, - "sha256": "7d03913ddd697bc3d5ca3be88520c8290f8d3eab555e508bd1f4f33b56e382ce" + "sha256": "e9d24491c3f2b150b1edf5f86c6db881f87a000e1f59c4951efa453997f58f96" } diff --git a/gsd/core/tests/golden/prompts/cursor/next.json b/gsd/core/tests/golden/prompts/cursor/next.json index f214255f53..73d82fea66 100644 --- a/gsd/core/tests/golden/prompts/cursor/next.json +++ b/gsd/core/tests/golden/prompts/cursor/next.json @@ -61,7 +61,7 @@ " \"summary\": \"Phase 2 of 5 · 60% · executing\",", " \"signals\": { \"...\": \"...\" }," ], - "bytes": 23801, + "bytes": 23937, "end": [ "## Anti-Patterns", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 568, + "lines": 570, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:555b64717a777301914b0a93534a94e0e59b74b0802a8fd080e55759c433b12d", + "digest": "sha256:542c7319e724b970b8ceb1a687e2b95f71cdd30b8d0777317d76dace2cc17e5c", "prompt": "@gsd/core@VERSION:next", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "555b64717a777301914b0a93534a94e0e59b74b0802a8fd080e55759c433b12d" + "sha256": "542c7319e724b970b8ceb1a687e2b95f71cdd30b8d0777317d76dace2cc17e5c" } diff --git a/gsd/core/tests/golden/prompts/cursor/onboard.json b/gsd/core/tests/golden/prompts/cursor/onboard.json index de74665f5c..f1aa765eb6 100644 --- a/gsd/core/tests/golden/prompts/cursor/onboard.json +++ b/gsd/core/tests/golden/prompts/cursor/onboard.json @@ -61,7 +61,7 @@ "Set:", "- `TEXT_MODE=true` if `--text` is present or `text_mode` is true. When `TEXT_MODE` is active, replace every `conversational prompting` call below with a plain-text numbered list and ask the user to type their choice number — required for non-Claude runtimes (OpenAI Codex, Antigravity, etc.) where `conversational prompting` is not available." ], - "bytes": 31352, + "bytes": 31591, "end": [ "- options: Quick (3-5 phases, skip research) | Standard (5-8 phases, default) | Comprehensive (8-12 phases, deep research)", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 809, + "lines": 813, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:29ceb29351368e2ebafac690daf1ec4801c839917c92fc9020d59dcd28216790", + "digest": "sha256:0641178fbb71ff15eadbe0800d05b259529157179b28d49164b94f04fe556a42", "prompt": "@gsd/core@VERSION:onboard", "steps": [ { @@ -215,5 +215,5 @@ } ] }, - "sha256": "29ceb29351368e2ebafac690daf1ec4801c839917c92fc9020d59dcd28216790" + "sha256": "0641178fbb71ff15eadbe0800d05b259529157179b28d49164b94f04fe556a42" } diff --git a/gsd/core/tests/golden/prompts/cursor/plan_phase.json b/gsd/core/tests/golden/prompts/cursor/plan_phase.json index 3531bdf3ed..f298e6c444 100644 --- a/gsd/core/tests/golden/prompts/cursor/plan_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/plan_phase.json @@ -61,7 +61,7 @@ "collapsing plan roles into the orchestrator context.", "" ], - "bytes": 119107, + "bytes": 119623, "end": [ "- `--gaps` — Gap closure mode (reads VERIFICATION.md, skips research)", "- `--skip-verify` — Skip verification loop", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 2029, + "lines": 2030, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:140906ffeb169e82e73a7cc17393f368e2066ad9852e8947b230ba38e5e2a962", + "digest": "sha256:0ba1c62c7b56de1ed41952e5cacced4d70b0aa3ac8a12257327ecd6bc0a6f21c", "prompt": "@gsd/core@VERSION:plan_phase", "steps": [ { @@ -247,5 +247,5 @@ ], "subject": "v1.0/02" }, - "sha256": "140906ffeb169e82e73a7cc17393f368e2066ad9852e8947b230ba38e5e2a962" + "sha256": "0ba1c62c7b56de1ed41952e5cacced4d70b0aa3ac8a12257327ecd6bc0a6f21c" } diff --git a/gsd/core/tests/golden/prompts/cursor/plan_review_convergence.json b/gsd/core/tests/golden/prompts/cursor/plan_review_convergence.json index 66664bd865..83b78581e7 100644 --- a/gsd/core/tests/golden/prompts/cursor/plan_review_convergence.json +++ b/gsd/core/tests/golden/prompts/cursor/plan_review_convergence.json @@ -61,7 +61,7 @@ "operator's explicit flag overrides this gate for that run. Standalone invocation carries no such", "flag and remains gated by the config below." ], - "bytes": 68247, + "bytes": 68380, "end": [ "- `## Self-Check: FAILED` (summary self-check)", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1133, + "lines": 1136, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:f1dc90cae25ad2a13430cab963792dba3384536a62c2efc9d87e58622caa6b29", + "digest": "sha256:3d5e03664229e9ecc2d3e7c8ae9f8a8cc070eb884558041efbf9f8ec4796bfed", "prompt": "@gsd/core@VERSION:plan_review_convergence", "steps": [ { @@ -211,5 +211,5 @@ ], "subject": "v1.0/02" }, - "sha256": "f1dc90cae25ad2a13430cab963792dba3384536a62c2efc9d87e58622caa6b29" + "sha256": "3d5e03664229e9ecc2d3e7c8ae9f8a8cc070eb884558041efbf9f8ec4796bfed" } diff --git a/gsd/core/tests/golden/prompts/cursor/pr_branch.json b/gsd/core/tests/golden/prompts/cursor/pr_branch.json index 43fbe212fe..bf0a1a8777 100644 --- a/gsd/core/tests/golden/prompts/cursor/pr_branch.json +++ b/gsd/core/tests/golden/prompts/cursor/pr_branch.json @@ -61,7 +61,7 @@ "if [ -n \"$DIRTY\" ]; then", " echo \"Working tree has uncommitted changes — commit or stash them first:\" >&2" ], - "bytes": 23015, + "bytes": 22817, "end": [ "Planning paths in diff: {FORBIDDEN} — must be 0", "Planning deletions: {PLANNING_DELETIONS} (must be 0 — #3679)", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 519, + "lines": 514, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:beebc0510bfcc9d4067fdd4566cf8086c475e2a3bde160d5a542ef6fa217d375", + "digest": "sha256:700f6a9feaa70fb24ae6e12699cdb650d73d6a3d790ed22a7ea993b51f0b2c61", "prompt": "@gsd/core@VERSION:pr_branch" }, - "sha256": "beebc0510bfcc9d4067fdd4566cf8086c475e2a3bde160d5a542ef6fa217d375" + "sha256": "700f6a9feaa70fb24ae6e12699cdb650d73d6a3d790ed22a7ea993b51f0b2c61" } diff --git a/gsd/core/tests/golden/prompts/cursor/progress.json b/gsd/core/tests/golden/prompts/cursor/progress.json index 71b98da6f2..984ccabc44 100644 --- a/gsd/core/tests/golden/prompts/cursor/progress.json +++ b/gsd/core/tests/golden/prompts/cursor/progress.json @@ -52,16 +52,16 @@ "", "Read from the answer (what `progress-report` prints): `milestone_version`, `milestone_name`, `phases` (each `number`, `name`, `plans`, `summaries`, `status`), `total_plans`, `total_summaries`, `percent` and `phase_scope`. `phase_count` is the length of `phases` and `completed_count` counts those with status `Complete`; the current phase is the first that is not, and the next phase the one after it; `roadmap_exists` is `phases` non-empty and `state_exists` is `milestone_version` non-null (the project state is computed, so no path is read); a pause is a `pause` entity, and a phase's mode its `mode` field.", "", + "In a phase's label, `{phase}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{Name}`", + "is its `title`. The number is the `number` `progress-report` prints for it; its `name` is the phase's slug read as", + "words, so a label reads the title from the phase node (`specforge query \"$MILESTONE\" --kinds phase --depth 1`). `{Z}` is", + "the number of the phase just completed, and `{Z+1}` the next one's.", + "", "```bash", "DISCUSS_MODE=\"discuss\" # workflow.discuss_mode (the settings)", - "```", - "", - "**If `init_incomplete` is true (#4040 — interrupted bootstrap):**", - "", - "the spec exists but the core initialization entities are missing (one or more of the requirement, milestone and phase entities were never created — a bootstrap that stopped partway, e.g. after the `project` entity). This is NOT a new project, NOT a missing project state, and NOT a between-milestones state — do not fall through to any of those routes. Route to initialization recovery:", - "" + "```" ], - "bytes": 69971, + "bytes": 70732, "end": [ "| 3 | ○ | 0/2 | 0% |", "```", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1656, + "lines": 1666, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d903a24dc52e6657bf7442d198d61b5e76d92a4ed73af89ccd047ed8a3799c4b", + "digest": "sha256:689ea98969eb13af9f99cbdcade8356f300f68d992c531ef4d277bfdbff1a665", "prompt": "@gsd/core@VERSION:progress", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "d903a24dc52e6657bf7442d198d61b5e76d92a4ed73af89ccd047ed8a3799c4b" + "sha256": "689ea98969eb13af9f99cbdcade8356f300f68d992c531ef4d277bfdbff1a665" } diff --git a/gsd/core/tests/golden/prompts/cursor/quick.json b/gsd/core/tests/golden/prompts/cursor/quick.json index 50353f3cc4..09c647d017 100644 --- a/gsd/core/tests/golden/prompts/cursor/quick.json +++ b/gsd/core/tests/golden/prompts/cursor/quick.json @@ -61,7 +61,7 @@ "- gsd-verifier — Verifies phase completion, checks quality gates", "- gsd-code-reviewer — Reviews source files for bugs, security issues, and code quality" ], - "bytes": 59585, + "bytes": 59340, "end": [ "Execute end-to-end.", "Preserve all workflow gates (validation, task description, planning, execution, state updates, commits).", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1115, + "lines": 1109, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:e5fc2a6b83d66b95dff82c1af6e7fce11a2b3a9a86daa31a07e7f3f9802a3cf2", + "digest": "sha256:4f62d86d1d91dfbf49cf499bdb2ca225b67a00d7f77f622f5a0408b460e7ea9f", "prompt": "@gsd/core@VERSION:quick", "steps": [ { @@ -263,5 +263,5 @@ } ] }, - "sha256": "e5fc2a6b83d66b95dff82c1af6e7fce11a2b3a9a86daa31a07e7f3f9802a3cf2" + "sha256": "4f62d86d1d91dfbf49cf499bdb2ca225b67a00d7f77f622f5a0408b460e7ea9f" } diff --git a/gsd/core/tests/golden/prompts/cursor/resume_work.json b/gsd/core/tests/golden/prompts/cursor/resume_work.json index 5b72578f0a..b86910e9b1 100644 --- a/gsd/core/tests/golden/prompts/cursor/resume_work.json +++ b/gsd/core/tests/golden/prompts/cursor/resume_work.json @@ -49,19 +49,19 @@ "", "Parse JSON for: `milestone_version`, `milestone_name`, `phases`, `percent`, `total_plans`, `total_summaries` (what `progress-report` prints). The routing facts below are not in it, they come from the graph: `state_exists` is `milestone_version` non-null (the project state is computed); `roadmap_exists` is `phases` non-empty; `project_exists` and `planning_exists` are `[ -n \"$(specforge export --kinds project --pick '.nodes[].id')\" ]`; `requirements_exists` is the same with `--kinds requirement`; `init_incomplete` is a project without a roadmap or without requirements; `has_interrupted_agent` is false (this extension keeps no agent registry).", "", + "In a phase's label, `[X]` and `[N]` are the phase's number, the last segment of its `id`, and `[Name]` and `[Phase name]`", + "are its `title`, read from its node (`specforge query \"$MILESTONE/${N}\" --depth 0 --pick '.nodes[0].title'`, `N` its", + "number): a phase's `name` in `phases` is its slug read as words, never a label's name.", + "", "**If `init_incomplete` is true (#4040 — interrupted bootstrap):** the spec exists but initialization never finished — the `requirement` entities, the `milestone` and `phase` entities or the project were never created. This is NOT a state-reconstruction case (the project state is computed). Route to initialization recovery: resume `/gsd-new-project`, which continues from the first missing entity and keeps the existing `project` entity and any already-created ones. Do not proceed to load_state.", "", "**If `state_exists` is true:** Proceed to load_state", "**If `state_exists` is false but `roadmap_exists` or `project_exists` is true (and `init_incomplete` is false):** Offer to reconstruct STATE.md", "**If `planning_exists` is false:** This is a new project - route to /gsd-new-project", "</step>", - "", - "<step name=\"load_state\">", - "", - "Read and parse STATE.md, then PROJECT.md:", "" ], - "bytes": 21317, + "bytes": 21644, "end": [ "", "</process>", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 543, + "lines": 547, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:5830333b283f30d99ed1d5276ea459d5b3d4a86d13a5af38841bf816b91abd5a", + "digest": "sha256:78e72b0e33e229628825675cae7f79f05bc23d95789395fd7c0fe9f3d781e61e", "prompt": "@gsd/core@VERSION:resume_work", "steps": [ { @@ -207,5 +207,5 @@ } ] }, - "sha256": "5830333b283f30d99ed1d5276ea459d5b3d4a86d13a5af38841bf816b91abd5a" + "sha256": "78e72b0e33e229628825675cae7f79f05bc23d95789395fd7c0fe9f3d781e61e" } diff --git a/gsd/core/tests/golden/prompts/cursor/review.json b/gsd/core/tests/golden/prompts/cursor/review.json index 731915b7a0..9003e219a6 100644 --- a/gsd/core/tests/golden/prompts/cursor/review.json +++ b/gsd/core/tests/golden/prompts/cursor/review.json @@ -61,7 +61,7 @@ "", "Parse flags from `02 --codex`:" ], - "bytes": 57055, + "bytes": 57157, "end": [ "- [ ] At least one external CLI invoked successfully", "- [ ] The review round recorded with its concerns", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1032, + "lines": 1034, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,9 +195,9 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:04839796d67b5f840dcb6a34914556f4e528d9def9f872238c02c32e8f72fb07", + "digest": "sha256:8b30d7cc37999833c84dfaef7a049b127ae4ed3e0320ae2707b99f85cc0ecf5c", "prompt": "@gsd/core@VERSION:review", "subject": "v1.0/02" }, - "sha256": "04839796d67b5f840dcb6a34914556f4e528d9def9f872238c02c32e8f72fb07" + "sha256": "8b30d7cc37999833c84dfaef7a049b127ae4ed3e0320ae2707b99f85cc0ecf5c" } diff --git a/gsd/core/tests/golden/prompts/cursor/settings.json b/gsd/core/tests/golden/prompts/cursor/settings.json index 2ebb112481..e0d1aac424 100644 --- a/gsd/core/tests/golden/prompts/cursor/settings.json +++ b/gsd/core/tests/golden/prompts/cursor/settings.json @@ -61,7 +61,7 @@ "- `workflow.code_review` — enable /gsd-code-review and /gsd-code-review --fix commands (default: true if absent)", "- `workflow.code_review_depth` — default depth for /gsd-code-review: `quick`, `standard`, or `deep` (default: `\"standard\"` if absent; only relevant when `code_review` is on)" ], - "bytes": 44442, + "bytes": 44234, "end": [ "These settings apply to future /gsd-plan-phase and /gsd-execute-phase runs.", "", @@ -102,7 +102,7 @@ "", "- A key another extension declares (`workflow.ui_*`, `workflow.code_review*`, `security_*`) is refused while that extension is not installed. Once it is, set it with its name: `specforge settings set @gsd/ui workflow.ui_phase false`.", "- A search key (`brave_search`, `firecrawl`, `exa_search` and the others) is a secret: it is an environment variable, and `settings set` never writes it. `brave_search true|false` only forces the source on or off.", - "- `commit_docs`, `search_gitignored` and `graphify.*` are not settings here: the spec is source and is committed like code. Skip their questions." + "- `commit_docs` and `search_gitignored` are not settings here: the spec is source and is committed like code." ], "head": [ "<cursor_skill_adapter>", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 800, + "lines": 799, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:14f11edd44472a4aaa366341dfad85ab60484840cc3ef03fac55ae90f0d06155", + "digest": "sha256:605705b25f471c08dc796dbee50ff02d1fd64a9c1602a762f6860af513137083", "prompt": "@gsd/core@VERSION:settings" }, - "sha256": "14f11edd44472a4aaa366341dfad85ab60484840cc3ef03fac55ae90f0d06155" + "sha256": "605705b25f471c08dc796dbee50ff02d1fd64a9c1602a762f6860af513137083" } diff --git a/gsd/core/tests/golden/prompts/cursor/ship.json b/gsd/core/tests/golden/prompts/cursor/ship.json index 60cc61c9b7..8372f4cca9 100644 --- a/gsd/core/tests/golden/prompts/cursor/ship.json +++ b/gsd/core/tests/golden/prompts/cursor/ship.json @@ -51,17 +51,17 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` is its field; a phase not in the graph is an E003 error).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; its name is its `title`; a phase not in the graph is an E003 error).", + "", + "In a phase's label, `{phase_number}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and", + "`{phase_name}` is its `title`.", "", "Also load config for branching strategy:", "```bash", "CONFIG=$(specforge settings)", - "```", - "", - "The strategy is `git.branching_strategy` in these settings; the branch is the phase's computed `branch`.", - "" + "```" ], - "bytes": 46749, + "bytes": 46936, "end": [ "Branch: {branch} → ${BASE_BRANCH}", "Commits: {count}", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 832, + "lines": 835, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:ea5787b7580152ec81a701a2a2bb0667555e60ca309ad92a757e3b814fcdfc4a", + "digest": "sha256:dc9caffd22b476bc94808065af96bca9f022908a62870c49dcad0a5d0c07cb9f", "prompt": "@gsd/core@VERSION:ship", "steps": [ { @@ -215,5 +215,5 @@ ], "subject": "v1.0/01" }, - "sha256": "ea5787b7580152ec81a701a2a2bb0667555e60ca309ad92a757e3b814fcdfc4a" + "sha256": "dc9caffd22b476bc94808065af96bca9f022908a62870c49dcad0a5d0c07cb9f" } diff --git a/gsd/core/tests/golden/prompts/cursor/spec_phase.json b/gsd/core/tests/golden/prompts/cursor/spec_phase.json index 4f9afc9084..1472ea54d1 100644 --- a/gsd/core/tests/golden/prompts/cursor/spec_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/spec_phase.json @@ -61,7 +61,7 @@ "- \"If you had to cut 50%, what's the irreducible core?\"", "- \"What would make this phase a success even without the nice-to-haves?\"" ], - "bytes": 53556, + "bytes": 53705, "end": [ "<context>", "Phase number: the `<arguments>` block (required)", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 953, + "lines": 956, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:1c0ab99a7043bcebe2aa0a43148896c259678d7baa3a059329614692c9658dbb", + "digest": "sha256:c000359ba4a176f55b898920bdd4a57cc82cf2b4ce7ada2c42714c0feaa31b36", "judged": [ { "outcomes": [ @@ -235,5 +235,5 @@ ], "subject": "v1.0/02" }, - "sha256": "1c0ab99a7043bcebe2aa0a43148896c259678d7baa3a059329614692c9658dbb" + "sha256": "c000359ba4a176f55b898920bdd4a57cc82cf2b4ce7ada2c42714c0feaa31b36" } diff --git a/gsd/core/tests/golden/prompts/cursor/ultraplan_phase.json b/gsd/core/tests/golden/prompts/cursor/ultraplan_phase.json index 6c779e6704..10f3d9d1b3 100644 --- a/gsd/core/tests/golden/prompts/cursor/ultraplan_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/ultraplan_phase.json @@ -61,7 +61,7 @@ "fi", "```" ], - "bytes": 21178, + "bytes": 21497, "end": [ "| Phase | Status | Plans | Progress |", "|-------|--------|-------|----------|", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 635, + "lines": 640, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:d5e98c3b28cc7c4855301e06d3f98b646bc60a20babc41ba0373fe8708195197", + "digest": "sha256:84d32dddeb069160c54f7b1bf1f40f6fda8aa231004543c5955f3f469f774761", "prompt": "@gsd/core@VERSION:ultraplan_phase", "steps": [ { @@ -213,5 +213,5 @@ ], "subject": "v1.0/02" }, - "sha256": "d5e98c3b28cc7c4855301e06d3f98b646bc60a20babc41ba0373fe8708195197" + "sha256": "84d32dddeb069160c54f7b1bf1f40f6fda8aa231004543c5955f3f469f774761" } diff --git a/gsd/core/tests/golden/prompts/cursor/undo.json b/gsd/core/tests/golden/prompts/cursor/undo.json index e8bb356cfc..248cf3f886 100644 --- a/gsd/core/tests/golden/prompts/cursor/undo.json +++ b/gsd/core/tests/golden/prompts/cursor/undo.json @@ -61,7 +61,7 @@ "", "Examples:" ], - "bytes": 48503, + "bytes": 48742, "end": [ "- question: \"How thorough should planning be?\"", "- header: \"Depth\"", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1142, + "lines": 1146, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:b0c6235184579fb1871a70e0d06819613bd501b5574dd319ea8b9081b73e897f", + "digest": "sha256:4c26da7dfad1090c04e67e1ef3b8663b507e617e25d60768357c780f2caba6d9", "prompt": "@gsd/core@VERSION:undo" }, - "sha256": "b0c6235184579fb1871a70e0d06819613bd501b5574dd319ea8b9081b73e897f" + "sha256": "4c26da7dfad1090c04e67e1ef3b8663b507e617e25d60768357c780f2caba6d9" } diff --git a/gsd/core/tests/golden/prompts/cursor/validate_phase.json b/gsd/core/tests/golden/prompts/cursor/validate_phase.json index e2d06ffc94..ac3d6dbe63 100644 --- a/gsd/core/tests/golden/prompts/cursor/validate_phase.json +++ b/gsd/core/tests/golden/prompts/cursor/validate_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `name` and `slug` are its fields).", + "Read from the answer: the node whose `id` is `$PHASE_ID` is the phase (its number, two digits, is the last segment of that id; `slug` is its field and its name its `title`).", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/core: the host picks the model", @@ -56,12 +59,9 @@ "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"validate-phase\"`.", "", "If no active validate-phase step hook exists: exit with \"Nyquist validation is disabled. Enable via /gsd-settings.\"", - "", - "Display banner: `GSD > VALIDATE PHASE {N}: {name}`", - "", - "## 1. Detect Input State" + "" ], - "bytes": 21210, + "bytes": 21373, "end": [ "```", "GSD > PHASE {N} VALIDATED (PARTIAL)", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 448, + "lines": 451, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:4fcfff3a7375df8a7c29550f1382c59d05d2bf24338a2a990f5106194665fdf4", + "digest": "sha256:e47f7d62c3bc88161ded6207636b706b1cb0a131eebd23a3e005b3e8d2b6124d", "prompt": "@gsd/core@VERSION:validate_phase", "steps": [ { @@ -220,5 +220,5 @@ ], "subject": "v1.0/02" }, - "sha256": "4fcfff3a7375df8a7c29550f1382c59d05d2bf24338a2a990f5106194665fdf4" + "sha256": "e47f7d62c3bc88161ded6207636b706b1cb0a131eebd23a3e005b3e8d2b6124d" } diff --git a/gsd/core/tests/golden/prompts/cursor/verify_work.json b/gsd/core/tests/golden/prompts/cursor/verify_work.json index 1c244efb37..a49226494b 100644 --- a/gsd/core/tests/golden/prompts/cursor/verify_work.json +++ b/gsd/core/tests/golden/prompts/cursor/verify_work.json @@ -61,7 +61,7 @@ "# the commands below are specforge commands: there is no launcher to define", "" ], - "bytes": 63787, + "bytes": 63923, "end": [ "</section_rules>", "", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 1168, + "lines": 1171, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:35e5d222ad419c18799c07b61b9a3f8b463d5919d15cf98363735a4c4c61a60b", + "digest": "sha256:b3479580cb8085211e5058e96070d15190c99e444dd27df12338588f193d1b5b", "prompt": "@gsd/core@VERSION:verify_work", "steps": [ { @@ -218,5 +218,5 @@ ], "subject": "v1.0/02" }, - "sha256": "35e5d222ad419c18799c07b61b9a3f8b463d5919d15cf98363735a4c4c61a60b" + "sha256": "b3479580cb8085211e5058e96070d15190c99e444dd27df12338588f193d1b5b" } diff --git a/gsd/core/tests/golden/prompts/cursor/workspace.json b/gsd/core/tests/golden/prompts/cursor/workspace.json index 6974266f03..28543cd211 100644 --- a/gsd/core/tests/golden/prompts/cursor/workspace.json +++ b/gsd/core/tests/golden/prompts/cursor/workspace.json @@ -61,7 +61,7 @@ "- `--branch` → `BRANCH_NAME` (defaults to `workspace/$WORKSPACE_NAME`)", "- `--auto` → skip interactive questions" ], - "bytes": 32778, + "bytes": 32914, "end": [ "- Box panels drawn with double-line box characters (U+2554, U+2557, U+255A, U+255D, U+2551, U+2560, U+2563) — the borders wrap independently of their contents. They are named here by code point rather than shown, because the guard below rejects the characters themselves anywhere in shipped content.", "- A `---` directly under a line of text with no blank line between — that is a setext heading underline, not a break, and it swallows the line above", @@ -186,7 +186,7 @@ "<name> <value>`.", "" ], - "lines": 856, + "lines": 858, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,8 +195,8 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:b1320f0fb750e5735542b8598aa238f9914fc52b95f80d605b444bd8bbefa22b", + "digest": "sha256:a01fa0f777f3cf4a000724cb868930d25aafe8809058aaffef23e1f3e54ea545", "prompt": "@gsd/core@VERSION:workspace" }, - "sha256": "b1320f0fb750e5735542b8598aa238f9914fc52b95f80d605b444bd8bbefa22b" + "sha256": "a01fa0f777f3cf4a000724cb868930d25aafe8809058aaffef23e1f3e54ea545" } diff --git a/gsd/core/tests/parity_roster.rs b/gsd/core/tests/parity_roster.rs index ccab26d787..97f7efc0c1 100644 --- a/gsd/core/tests/parity_roster.rs +++ b/gsd/core/tests/parity_roster.rs @@ -466,7 +466,7 @@ fn the_acceptance_counts_match() { assert_eq!(accept::hooks(), [29, 16, 0, 11, 2]); assert_eq!(accept::capabilities(), [45, 17, 10, 0, 18]); assert_eq!(accept::gate_cutover(), [171, 93, 51, 14, 13]); - assert_eq!(accept::codes(), [72, 72, 0, 0, 0]); + assert_eq!(accept::codes(), [73, 73, 0, 0, 0]); assert_eq!(accept::config_keys()[0], 212); } diff --git a/gsd/core/tests/parity_rules.rs b/gsd/core/tests/parity_rules.rs index 614daa2170..72b3772ca9 100644 --- a/gsd/core/tests/parity_rules.rs +++ b/gsd/core/tests/parity_rules.rs @@ -1,6 +1,6 @@ //! The parity rules check (D-r44-3, D-r44-22): the code book and the gate-cutover verdicts are accounted in one place. //! -//! `evidence.rs` names, for each of the code book's 72 codes, a test that makes it fire and a test that keeps it +//! `evidence.rs` names, for each of the code book's 73 codes, a test that makes it fire and a test that keeps it //! silent; `cutover.rs` classifies each of the 171 recorded verdicts of gsd-core's `gate-cutover` fixtures. The //! black-box half, which runs the twin projects, is `tests/cli/parity_gate_cutover.rs`. @@ -100,7 +100,7 @@ fn names_code(fns: &[(String, String)], name: &str, code: &str) -> bool { fn every_code_fires_and_stays_silent() { let fns = test_fns(); let book = codes(); - assert_eq!(book.len(), 72, "the code book has 72 codes"); + assert_eq!(book.len(), 73, "the code book has 73 codes"); let listed: Vec<&str> = RULE_EVIDENCE.iter().map(|(c, _)| *c).collect(); assert_eq!(listed, book, "RULE_EVIDENCE lists the code book, in order"); let mut bad = Vec::new(); diff --git a/gsd/core/tests/parity_rules/evidence.rs b/gsd/core/tests/parity_rules/evidence.rs index f57212656d..64f087ad8d 100644 --- a/gsd/core/tests/parity_rules/evidence.rs +++ b/gsd/core/tests/parity_rules/evidence.rs @@ -9,7 +9,7 @@ pub enum Evidence { }, } -pub const RULE_EVIDENCE: [(&str, Evidence); 72] = [ +pub const RULE_EVIDENCE: [(&str, Evidence); 73] = [ ( "E101", Evidence::Tests { @@ -514,4 +514,11 @@ pub const RULE_EVIDENCE: [(&str, Evidence); 72] = [ silent: "a_plain_check_of_an_edited_twin_says_nothing", }, ), + ( + "W109", + Evidence::Tests { + fires: "a_numbered_phase_title_is_w109", + silent: "the_clean_twin_is_silent_for_the_unjudged_codes", + }, + ), ]; diff --git a/gsd/core/tests/port.lock b/gsd/core/tests/port.lock index f39b611f75..eacad39b6f 100644 --- a/gsd/core/tests/port.lock +++ b/gsd/core/tests/port.lock @@ -32,7 +32,7 @@ ../security/assets/commands/gsd/secure-phase.md kept 28+15 6bed261f2c0b ../security/assets/gsd-core/templates/SECURITY.md own 1+10 0 cfc2f77097c4 e3b0c44298fc relic ../security/assets/gsd-core/templates/SECURITY.md kept 11+4 27e8937e85a4 -../security/assets/gsd-core/templates/SECURITY.md own 15+15 5 c7a548ba2963 019fe693948a prose +../security/assets/gsd-core/templates/SECURITY.md own 15+15 7 c7a548ba2963 140a65602e7c prose ../security/assets/gsd-core/templates/SECURITY.md kept 30+5 06ee564dc24c ../security/assets/gsd-core/templates/SECURITY.md own 35+7 0 a4b422e33c80 e3b0c44298fc served ../security/assets/gsd-core/templates/SECURITY.md kept 42+2 1044910ba70c @@ -47,8 +47,8 @@ ../security/assets/gsd-core/workflows/secure-phase.md kept 3+16 123c8c8b60ee ../security/assets/gsd-core/workflows/secure-phase.md own 19+11 7 2ce8e1827b45 c495fb7bf1ab ported-name ../security/assets/gsd-core/workflows/secure-phase.md kept 30+4 b28fac2a3468 -../security/assets/gsd-core/workflows/secure-phase.md own 34+1 1 dd0387bea9e4 7365c1a09f32 prose -../security/assets/gsd-core/workflows/secure-phase.md kept 35+2 5f046190424d +../security/assets/gsd-core/workflows/secure-phase.md own 34+2 5 489d0a2af442 ca650637d055 prose +../security/assets/gsd-core/workflows/secure-phase.md kept 36+1 ad332335cfaa ../security/assets/gsd-core/workflows/secure-phase.md own 37+4 4 fb5324c8c4be 5b1c11924fc3 ported-name ../security/assets/gsd-core/workflows/secure-phase.md kept 41+11 71dd22820358 ../security/assets/gsd-core/workflows/secure-phase.md own 52+7 7 609a531e2adf 17170aa75446 relic @@ -165,7 +165,9 @@ agents/gsd-executor.md kept 108+14 93b6477a48aa agents/gsd-executor.md own 122+3 3 ee78dfb1d1d2 745506e1f931 served agents/gsd-executor.md kept 125+6 6f1cd221ec52 agents/gsd-executor.md own 131+4 4 270269f22421 58229bb88836 served -agents/gsd-executor.md kept 135+130 6b4ad3852512 +agents/gsd-executor.md kept 135+25 682a24f8cd73 +agents/gsd-executor.md own 160+1 1 f65b2865ec6a 4088ea0b75ad review +agents/gsd-executor.md kept 161+104 6984f586389a agents/gsd-executor.md own 265+1 5 6378f092b76e dd510c61d4c3 agent agents/gsd-executor.md kept 266+5 b096bbe8df8d agents/gsd-executor.md own 271+1 1 1a8cf58ac29b ed1eba1506f2 agent @@ -199,16 +201,14 @@ agents/gsd-executor.md kept 504+10 df71a36d3a69 agents/gsd-executor.md own 514+1 1 fb6918b4c623 0316ebfb5708 served agents/gsd-executor.md kept 515+11 8fcb22a426aa agents/gsd-executor.md own 526+2 2 9ae1e31d2492 581a7a2245aa served -agents/gsd-executor.md kept 528+19 285d734d4342 -agents/gsd-executor.md own 547+6 6 c56f381bd82d 0277503d9fff ported-name +agents/gsd-executor.md kept 528+17 7d0bed13fc91 +agents/gsd-executor.md own 545+8 4 e3338a179947 71813ababc2c ported-name agents/gsd-executor.md kept 553+1 ad332335cfaa -agents/gsd-executor.md own 554+8 7 b10ae9faae7e 3216a34e98df review -agents/gsd-executor.md kept 562+3 8c6c7a172e70 +agents/gsd-executor.md own 554+10 7 0167aef9ed33 6e1040e5d65f relic +agents/gsd-executor.md kept 564+1 ad332335cfaa agents/gsd-executor.md own 565+1 1 765d60237c65 9b52da7b606a served agents/gsd-executor.md kept 566+3 3c1505c0f61e -agents/gsd-executor.md own 569+1 1 8a331fdde703 f97f87cd75b2 thread -agents/gsd-executor.md kept 570+4 4d7e60cdc263 -agents/gsd-executor.md own 574+1 1 25ae3866a45f 001f2300942f served +agents/gsd-executor.md own 569+6 6 00cb2082d05d 3e8a6eb4a6cb review agents/gsd-executor.md kept 575+3 ef06832c93d1 agents/gsd-executor.md own 578+1 1 45112a019f85 e1c5aa32277a served agents/gsd-executor.md kept 579+6 eaaadde66552 @@ -439,7 +439,7 @@ agents/gsd-phase-researcher.md own 702+1 1 ae4c5c7cbc69 7803549aaebb agent agents/gsd-phase-researcher.md kept 703+28 bb605c9eae2d agents/gsd-phase-researcher.md own 731+1 1 db8dc47bc34e cf9fe9f6ee8e ported-name agents/gsd-phase-researcher.md kept 732+22 1d85c5ece93f -agents/gsd-phase-researcher.md own 754+16 65 ff2a71303f6c c2e36eed7d07 typed-edit +agents/gsd-phase-researcher.md own 754+16 78 ff2a71303f6c cc9f61442063 typed-edit agents/gsd-phase-researcher.md kept 770+32 18913e4d0779 agents/gsd-phase-researcher.md own 802+3 3 1a822f25e883 9fff29926ea0 typed-edit agents/gsd-phase-researcher.md kept 805+4 c3b5e58593ad @@ -447,7 +447,7 @@ agents/gsd-phase-researcher.md own 809+1 1 08975eddfc55 d4f349dc8ddd ported-name agents/gsd-phase-researcher.md kept 810+20 efc04d348bbf agents/gsd-phase-researcher.md own 830+1 1 df98dbe9acd1 0ca9e038b82b agent agents/gsd-phase-researcher.md kept 831+9 e8e15eef40d9 -agents/gsd-phase-researcher.md own 840+1 2 caa27c963aa2 27107a654a9e review +agents/gsd-phase-researcher.md own 840+1 2 caa27c963aa2 98deca9bf09b review agents/gsd-phase-researcher.md kept 841+2 8bbcfa884edf agents/gsd-phase-researcher.md own 843+1 1 32265ebaf12d e76472b4387c agent agents/gsd-phase-researcher.md kept 844+44 54b4e197a445 @@ -539,7 +539,7 @@ agents/gsd-planner.md own 195+1 1 6778a4d30bca e3145f37d3b1 served agents/gsd-planner.md kept 196+81 df2c47ffce78 agents/gsd-planner.md own 277+1 1 7c6eee157d11 77d8d6ac8238 agent agents/gsd-planner.md kept 278+29 ac1c144b972b -agents/gsd-planner.md own 307+89 58 783bd45a0789 0fda1f9fbede ported-name +agents/gsd-planner.md own 307+89 61 783bd45a0789 f2699b00f9dd ported-name agents/gsd-planner.md kept 396+8 bac43ee40ea5 agents/gsd-planner.md own 404+1 1 d32f932706f6 6c6ee48ec884 thread agents/gsd-planner.md kept 405+2 db1c4f5c0c4f @@ -577,7 +577,7 @@ agents/gsd-planner.md own 744+0 1 e3b0c44298fc e3b0c44298fc markdown agents/gsd-planner.md kept 744+28 a1c21bfa588d agents/gsd-planner.md own 772+1 1 13b2f9242400 e70a2aecb042 thread agents/gsd-planner.md kept 773+30 1deab3d8d2e6 -agents/gsd-planner.md own 803+42 18 3271a0c6b0a2 519e5b5b4600 ported-name +agents/gsd-planner.md own 803+42 20 3271a0c6b0a2 e6c5e95fcaae ported-name agents/gsd-planner.md kept 845+3 3868e46b9748 agents/gsd-planner.md own 848+1 1 21f24256ab24 184080ecde7e agent agents/gsd-planner.md kept 849+2 5f046190424d @@ -776,7 +776,7 @@ agents/gsd-roadmapper.compact.md own 173+3 2 fc1fb1c155c8 db7bf3facc16 agent agents/gsd-roadmapper.compact.md kept 176+1 5a8df318624c agents/gsd-roadmapper.compact.md own 177+4 1 dbb7e0e1b1d5 e7b46ccb91b7 agent agents/gsd-roadmapper.compact.md kept 181+5 6c1cb37ae3db -agents/gsd-roadmapper.compact.md own 186+42 2 795fe17e9d4a 2d1c69f0a805 agent +agents/gsd-roadmapper.compact.md own 186+42 2 795fe17e9d4a dcc8a438770e agent agents/gsd-roadmapper.compact.md kept 228+2 c23401ca27ac agents/gsd-roadmapper.compact.md own 230+12 1 4976a8b94753 8c19ec39aeb6 agent agents/gsd-roadmapper.compact.md kept 242+7 cc13bf18e901 @@ -827,7 +827,7 @@ agents/gsd-roadmapper.md own 311+5 6 97577c38c7e9 d5412d9f1104 agent agents/gsd-roadmapper.md kept 316+2 64a466ac8df5 agents/gsd-roadmapper.md own 318+7 1 3020fa7eb38a c0de55e7ccc2 agent agents/gsd-roadmapper.md kept 325+5 6c1cb37ae3db -agents/gsd-roadmapper.md own 330+80 3 1dee2523f2e6 73af3c35da36 agent +agents/gsd-roadmapper.md own 330+80 3 1dee2523f2e6 fe4eba7165e0 agent agents/gsd-roadmapper.md kept 410+3 e93ec0961a23 agents/gsd-roadmapper.md own 413+1 1 b049b9cf7ce0 388baac9df56 agent agents/gsd-roadmapper.md kept 414+10 9d7b974943fd @@ -956,10 +956,10 @@ agents/gsd-verifier.md own 661+1 1 4f37d21590b4 5116ea3c4334 agent agents/gsd-verifier.md kept 662+2 5f046190424d agents/gsd-verifier.md own 664+4 4 5048e977d2e1 f71f8756fc2f ported-name agents/gsd-verifier.md kept 668+9 1867a925d5a5 -agents/gsd-verifier.md own 677+7 7 0c6f243fa1e2 e6f375a777d7 ported-name -agents/gsd-verifier.md kept 684+2 aad9c46d9e9f -agents/gsd-verifier.md own 686+54 0 fb9d60e9e7c2 e3b0c44298fc served -agents/gsd-verifier.md kept 740+90 d430a136a258 +agents/gsd-verifier.md own 677+63 12 ea7459cbbf0f e1fd1a16596c ported-name +agents/gsd-verifier.md kept 740+27 13955b17f60d +agents/gsd-verifier.md own 767+1 1 c02c88e1608d aafdc13b06b6 review +agents/gsd-verifier.md kept 768+62 da0d02296c42 agents/gsd-verifier.md own 830+1 1 a1a1a49fccce 72d7898c76f0 agent agents/gsd-verifier.md kept 831+2 5f046190424d agents/gsd-verifier.md own 833+7 5 e28e084bcab6 82ad484d7cd2 ported-name @@ -1209,7 +1209,7 @@ gsd-core/references/agent-skills-bootstrap.md kept 40+41 71490e1c9537 gsd-core/references/autonomous-smart-discuss.md kept 1+2 7fb9f4645fc1 gsd-core/references/autonomous-smart-discuss.md own 3+1 1 566f5f70aa73 77909475d9a1 prose gsd-core/references/autonomous-smart-discuss.md kept 4+4 e00a88fe285c -gsd-core/references/autonomous-smart-discuss.md own 8+5 5 de2a8a389eb3 f41ffddee7bb ported-name +gsd-core/references/autonomous-smart-discuss.md own 8+5 5 de2a8a389eb3 12af34101e70 ported-name gsd-core/references/autonomous-smart-discuss.md kept 13+10 cb4f2a7f8860 gsd-core/references/autonomous-smart-discuss.md own 23+3 3 33d93372cafb e09b3421bb1b ported-name gsd-core/references/autonomous-smart-discuss.md kept 26+10 875ba79ad681 @@ -1250,7 +1250,9 @@ gsd-core/references/checkpoints.md kept 133+363 57093ecae10a gsd-core/references/checkpoints.md own 496+5 5 fb0ddbb19765 dd3855e77cf5 ported-name gsd-core/references/checkpoints.md kept 501+31 a5d4c51a8579 gsd-core/references/checkpoints.md own 532+1 1 a637aea9d1bf e38d7ee89ece wait -gsd-core/references/checkpoints.md kept 533+315 cf99e26e169c +gsd-core/references/checkpoints.md kept 533+280 3429efc9dc50 +gsd-core/references/checkpoints.md own 813+0 2 e3b0c44298fc 10d4e3820cac review +gsd-core/references/checkpoints.md kept 813+35 b35f664b5ece gsd-core/references/compact-content-gate.md kept 1+10 3daed2e5e59e gsd-core/references/compact-content-gate.md own 11+1 1 244b8153c78c e4876b1f362f ported-name gsd-core/references/compact-content-gate.md kept 12+40 c3ce05fceab5 @@ -1317,7 +1319,9 @@ gsd-core/references/execute-phase-requirement-revert.md own 5+2 2 75af56a77529 d gsd-core/references/execute-phase-requirement-revert.md kept 7+3 3caf5dfe6cbf gsd-core/references/execute-phase-response-language.md kept 1+4 2f71cb28a8ac gsd-core/references/execute-phase-response-language.md own 5+1 1 97bd3ee70dd4 541478f82bc6 prose -gsd-core/references/execute-phase-response-language.md kept 6+9 ebcd45cb673e +gsd-core/references/execute-phase-response-language.md kept 6+7 18dac1e74ee3 +gsd-core/references/execute-phase-response-language.md own 13+0 3 e3b0c44298fc cd15b58e9c73 review +gsd-core/references/execute-phase-response-language.md kept 13+2 df19abb92b64 gsd-core/references/execute-phase-wave-guard.md own 1+50 2 984269f1d4d5 c93bdca780a8 ported-name gsd-core/references/execute-phase-wave-guard.md kept 51+1 e3b0c44298fc gsd-core/references/executor-examples.md kept 1+69 5749972c3899 @@ -1338,7 +1342,9 @@ gsd-core/references/few-shot-examples/verifier.md own 57+2 2 daeb32d41e8e e07b5f gsd-core/references/few-shot-examples/verifier.md kept 59+11 0d0849da7965 gsd-core/references/few-shot-examples/verifier.md own 70+1 1 488f83b3b12a c7f5a1a25355 served gsd-core/references/few-shot-examples/verifier.md kept 71+40 c094eb70063f -gsd-core/references/gate-prompts.md kept 1+104 c49339fde70d +gsd-core/references/gate-prompts.md kept 1+4 3e00f43f1291 +gsd-core/references/gate-prompts.md own 5+0 2 e3b0c44298fc 8be4a31dc2e6 review +gsd-core/references/gate-prompts.md kept 5+100 548fc04a7d8f gsd-core/references/gates.md kept 1+71 bd79c7f90c8c gsd-core/references/git-integration.md kept 1+16 1e682a91871c gsd-core/references/git-integration.md own 17+2 2 5fac6798129d 5a786e141649 prose @@ -1366,21 +1372,8 @@ gsd-core/references/git-integration.md kept 134+5 b5d6374557d3 gsd-core/references/git-integration.md own 139+1 1 f98c8223572f 62321d2c7733 ported-name gsd-core/references/git-integration.md kept 140+19 59e26d9559e6 gsd-core/references/git-integration.md own 159+1 1 23b641f2d122 8842cb27c4b7 ported-name -gsd-core/references/git-integration.md kept 160+105 f99bba9a3478 -gsd-core/references/git-integration.md own 265+1 1 626cb348c028 15c272863f26 ported-name -gsd-core/references/git-integration.md kept 266+4 47984d9990f4 -gsd-core/references/git-integration.md own 270+1 0 2207a4e56b00 e3b0c44298fc review -gsd-core/references/git-integration.md kept 271+5 7ebf8db56be2 -gsd-core/references/git-integration.md own 276+2 0 887790c1bf02 e3b0c44298fc served -gsd-core/references/git-integration.md kept 278+4 880bd2b67ad6 -gsd-core/references/git-integration.md own 282+2 2 019ddc40d418 5cd16ade5cfa ported-name -gsd-core/references/git-integration.md kept 284+6 98d167f445c2 -gsd-core/references/git-integration.md own 290+1 1 4d6f9fa0f811 3696c4b1946b ported-name -gsd-core/references/git-integration.md kept 291+9 a007ce95cef1 -gsd-core/references/git-integration.md own 300+4 4 8ecc5df851ce c4bc2b3d7650 ported-name -gsd-core/references/git-integration.md kept 304+3 b7086472cb09 -gsd-core/references/git-integration.md own 307+1 1 c3ab7ce6316c f4db5e9e2c2f served -gsd-core/references/git-integration.md kept 308+3 e875155695b5 +gsd-core/references/git-integration.md kept 160+97 1de6a740b83a +gsd-core/references/git-integration.md own 257+54 0 dbec8a3b92c0 e3b0c44298fc ported-name gsd-core/references/gsd-run-resolver.md own 1+3 3 6a15b5587cfa b833a6a94826 ported-name gsd-core/references/gsd-run-resolver.md kept 4+3 8ecbd04699a2 gsd-core/references/gsd-run-resolver.md own 7+1 1 c71090e895dc ea4bf2e52305 ported-name @@ -1443,15 +1436,15 @@ gsd-core/references/mvp-concepts.md kept 30+4 ffe5f8f414b0 gsd-core/references/mvp-concepts.md own 34+1 1 8b35571462e7 cac12c7af9fe served gsd-core/references/mvp-concepts.md kept 35+16 87f2c5a31de2 gsd-core/references/nyquist-compliance.md kept 1+20 b7117ff7a0ce -gsd-core/references/nyquist-compliance.md own 21+1 1 9e9d36c7de07 04bd1607af22 served -gsd-core/references/nyquist-compliance.md kept 22+54 22d0f06bae62 +gsd-core/references/nyquist-compliance.md own 21+5 7 937fab22bd2b ddbdeb09b80e review +gsd-core/references/nyquist-compliance.md kept 26+50 900b4251c847 gsd-core/references/phase-argument-parsing.md kept 1+6 b5d7762f98e7 gsd-core/references/phase-argument-parsing.md own 7+1 1 cd015aeb776c 3b25caba894a args gsd-core/references/phase-argument-parsing.md kept 8+4 22800ef9a9de gsd-core/references/phase-argument-parsing.md own 12+1 1 bf49090eb942 b634af85d36c ported-name gsd-core/references/phase-argument-parsing.md kept 13+4 148c43a1487b -gsd-core/references/phase-argument-parsing.md own 17+1 1 d36bab596242 111a344617a1 ported-name -gsd-core/references/phase-argument-parsing.md kept 18+32 fc70d55876c5 +gsd-core/references/phase-argument-parsing.md own 17+10 8 b61a12edeff2 e49aa6cafec8 ported-name +gsd-core/references/phase-argument-parsing.md kept 27+23 1181e000ea2f gsd-core/references/phase-argument-parsing.md own 50+1 1 9ac092857abc ed177de60aa8 ported-name gsd-core/references/phase-argument-parsing.md kept 51+11 9abe6b81268b gsd-core/references/phase-argument-parsing.md own 62+1 1 49fff52d8cb3 795787c62ca4 ported-name @@ -1493,7 +1486,7 @@ gsd-core/references/planner-antipatterns.md kept 222+35 db910477d9ba gsd-core/references/planner-chunked.md kept 1+10 86be6ea0f1ec gsd-core/references/planner-chunked.md own 11+1 2 ceaa30df472b 7944035b3eec prose gsd-core/references/planner-chunked.md kept 12+22 a4b167f71227 -gsd-core/references/planner-chunked.md own 34+1 5 23dfd78cb85d 455038d7d6ec review +gsd-core/references/planner-chunked.md own 34+1 6 23dfd78cb85d 2e1ab6bf0b45 review gsd-core/references/planner-chunked.md kept 35+7 792fae059829 gsd-core/references/planner-chunked.md own 42+1 1 1e1594c63e17 b12b37868960 prose gsd-core/references/planner-chunked.md kept 43+3 cd89b7295a10 @@ -1517,7 +1510,7 @@ gsd-core/references/planner-gap-closure.md kept 17+32 5dd9a8e0606d gsd-core/references/planner-gap-closure.md own 49+16 9 d8677aee106b bcccf77b9db2 typed-edit gsd-core/references/planner-gap-closure.md kept 65+1 e3b0c44298fc gsd-core/references/planner-guidance.md kept 1+159 2e8bd94ac00f -gsd-core/references/planner-guidance.md own 160+0 5 e3b0c44298fc fe06fcda358d review +gsd-core/references/planner-guidance.md own 160+0 5 e3b0c44298fc 4c82550826ef review gsd-core/references/planner-guidance.md kept 160+88 c27650fe8bbb gsd-core/references/planner-interface-context.md kept 1+11 dcb7dd27e40c gsd-core/references/planner-interface-context.md own 12+1 1 b8c85a0f48c7 38b5a8a44cb9 served @@ -1584,9 +1577,9 @@ gsd-core/references/planning-config.md own 7+5 0 fd2b963b57b2 e3b0c44298fc revie gsd-core/references/planning-config.md kept 12+19 f0efb7b5a0d7 gsd-core/references/planning-config.md own 31+3 0 161e6cc1ba66 e3b0c44298fc ported-name gsd-core/references/planning-config.md kept 34+4 16ba2286bc64 -gsd-core/references/planning-config.md own 38+1 1 d1061523ace8 dc9bd8835a6d workflow +gsd-core/references/planning-config.md own 38+1 0 d1061523ace8 e3b0c44298fc served gsd-core/references/planning-config.md kept 39+36 d38edcdcbc01 -gsd-core/references/planning-config.md own 75+84 2 0552e128d4a0 7ec700bcc46c ported-name +gsd-core/references/planning-config.md own 75+84 6 0552e128d4a0 607f140d2a5a ported-name gsd-core/references/planning-config.md kept 159+38 5ce6afe5d22c gsd-core/references/planning-config.md own 197+1 1 37aa4c6f5de6 f969b0a20454 answer gsd-core/references/planning-config.md kept 198+1 ad332335cfaa @@ -1601,7 +1594,9 @@ gsd-core/references/planning-config.md kept 219+4 0d8aa6649ab0 gsd-core/references/planning-config.md own 223+3 3 d57f19310190 640bc1cec556 served gsd-core/references/planning-config.md kept 226+37 cd57fb3f8176 gsd-core/references/planning-config.md own 263+2 0 ca9f9c29cdd5 e3b0c44298fc ported-name -gsd-core/references/planning-config.md kept 265+26 1637b97aec1c +gsd-core/references/planning-config.md kept 265+19 4b273cb1eb80 +gsd-core/references/planning-config.md own 284+1 0 8931a997b451 e3b0c44298fc served +gsd-core/references/planning-config.md kept 285+6 5db2352c48f4 gsd-core/references/planning-config.md own 291+1 1 82a759ccbfd9 052011e5135e prose gsd-core/references/planning-config.md kept 292+2 5cf2622a6508 gsd-core/references/planning-config.md own 294+1 1 5613bbc25298 be103ee5146d ported-name @@ -1612,17 +1607,19 @@ gsd-core/references/planning-config.md own 316+1 1 7202781f4738 a5509082ec29 pro gsd-core/references/planning-config.md kept 317+7 cc4ff5743f23 gsd-core/references/planning-config.md own 324+1 1 6d290be2ea11 267eddd958fb served gsd-core/references/planning-config.md kept 325+19 8363a6bad48b -gsd-core/references/planning-config.md own 344+1 1 5e9d7f3e67c3 0bb9866ed1e7 workflow +gsd-core/references/planning-config.md own 344+1 0 5e9d7f3e67c3 e3b0c44298fc served gsd-core/references/planning-config.md kept 345+30 b4fdb60f5ea2 gsd-core/references/planning-config.md own 375+1 1 a961bad968e1 3a42bb62e49d workflow gsd-core/references/planning-config.md kept 376+16 532f2e8f17b8 gsd-core/references/planning-config.md own 392+1 1 dae67a42a852 008ca1996629 ported-name -gsd-core/references/planning-config.md kept 393+22 1be831fdcd75 +gsd-core/references/planning-config.md kept 393+18 8d67decbcbdc +gsd-core/references/planning-config.md own 411+1 0 8c1453f3b18f e3b0c44298fc served +gsd-core/references/planning-config.md kept 412+3 1fae436cd2d2 gsd-core/references/planning-config.md own 415+1 1 d4850b7753c2 3b09afffc952 review gsd-core/references/planning-config.md kept 416+3 b804ab35a712 gsd-core/references/planning-config.md own 419+2 0 e4e047c86dc0 e3b0c44298fc served gsd-core/references/planning-config.md kept 421+8 03467ca51afe -gsd-core/references/planning-config.md own 429+17 13 7dc8d74242e4 3b33b1e65d64 ported-name +gsd-core/references/planning-config.md own 429+17 11 7dc8d74242e4 843b2c1ba890 ported-name gsd-core/references/planning-config.md kept 446+10 aa2d8d419c1a gsd-core/references/planning-config.md own 456+1 0 65e8cf206b89 e3b0c44298fc review gsd-core/references/planning-config.md kept 457+14 98ed10cb8088 @@ -1744,7 +1741,9 @@ gsd-core/references/tdd.md kept 313+1 366a55846121 gsd-core/references/tdd.md own 314+1 1 197f903fb098 cd8df070a7cc served gsd-core/references/tdd.md kept 315+1 9459b6afbaa8 gsd-core/references/tdd.md own 316+4 6 6f79b5821b23 a5f04312f082 git -gsd-core/references/tdd.md kept 320+25 56befe1ba52e +gsd-core/references/tdd.md kept 320+9 e086f8349d55 +gsd-core/references/tdd.md own 329+0 2 e3b0c44298fc 10d4e3820cac review +gsd-core/references/tdd.md kept 329+16 8805adef02de gsd-core/references/tdd.md own 345+1 1 df4b8ea7ce4f eeea9f89cc1a served gsd-core/references/tdd.md kept 346+22 34138d48bd65 gsd-core/references/thinking-models-execution.md kept 1+38 b212695d3467 @@ -1761,9 +1760,9 @@ gsd-core/references/thinking-partner.md kept 1+2 b5826fce1191 gsd-core/references/thinking-partner.md own 3+1 1 8399c9eba31a 87341108983a ported-name gsd-core/references/thinking-partner.md kept 4+94 f3d75468da1d gsd-core/references/ui-brand.md kept 1+50 de198acf01cb -gsd-core/references/ui-brand.md own 51+1 0 e3b0c44298fc e3b0c44298fc markdown -gsd-core/references/ui-brand.md kept 52+1 04ce7c5bfdda -gsd-core/references/ui-brand.md own 53+10 11 73150d29baee 082e2a4b0141 prose +gsd-core/references/ui-brand.md own 51+0 1 e3b0c44298fc 7dee7d32e8db review +gsd-core/references/ui-brand.md kept 51+2 e86f0dd5c339 +gsd-core/references/ui-brand.md own 53+10 11 73150d29baee 97ffb6835aee prose gsd-core/references/ui-brand.md kept 63+145 46beb19a57dd gsd-core/references/universal-anti-patterns.md kept 1+10 4439b857f858 gsd-core/references/universal-anti-patterns.md own 11+1 1 b532fef10195 74209814f2bc ported-name @@ -1983,7 +1982,9 @@ gsd-core/references/worktree-path-safety.md kept 94+2 f14aa7869346 gsd-core/references/worktree-path-safety.md own 96+1 1 83e47e03b8e9 8fd5f0b08e89 served gsd-core/references/worktree-path-safety.md kept 97+2 48f06375035e gsd-core/references/worktree-path-safety.md own 99+1 1 41277ccb67e1 6f40a91aebe6 served -gsd-core/references/worktree-path-safety.md kept 100+5 74b693f86936 +gsd-core/references/worktree-path-safety.md kept 100+3 137a4777456d +gsd-core/references/worktree-path-safety.md own 103+1 1 eb1a3d52870a 3c20be268e95 relic +gsd-core/references/worktree-path-safety.md kept 104+1 61566a6627e3 gsd-core/references/worktree-path-safety.md own 105+1 1 3a129591c877 ecdab7d8663b git gsd-core/references/worktree-path-safety.md kept 106+1 ca6e87c4259a gsd-core/references/worktree-path-safety.md own 107+1 1 4667e43aa47a a2e4ef9e1843 served @@ -2022,9 +2023,9 @@ gsd-core/templates/UAT.md kept 126+3 022b453d5e73 gsd-core/templates/UAT.md own 129+72 0 0b168422ad99 e3b0c44298fc ported-name gsd-core/templates/UAT.md kept 201+15 a8a5bce73598 gsd-core/templates/UAT.md own 216+67 0 7f7af96c279d e3b0c44298fc ported-name -gsd-core/templates/VALIDATION.md own 1+11 0 7a6567bca503 e3b0c44298fc relic -gsd-core/templates/VALIDATION.md kept 12+4 558727874da5 -gsd-core/templates/VALIDATION.md own 16+11 33 1f64b71c681f a4953e1486e5 prose +gsd-core/templates/VALIDATION.md own 1+12 1 e9a52f522285 c256a535ca24 relic +gsd-core/templates/VALIDATION.md kept 13+3 cd8498fcf4fc +gsd-core/templates/VALIDATION.md own 16+11 35 1f64b71c681f 1a5d144141b0 prose gsd-core/templates/VALIDATION.md kept 27+12 fa1676176de9 gsd-core/templates/VALIDATION.md own 39+30 0 f8e4f1ce757e e3b0c44298fc served gsd-core/templates/VALIDATION.md kept 69+7 236d934737a5 @@ -2041,7 +2042,7 @@ gsd-core/templates/milestone-archive.md kept 1+2 48f5dd45e5a6 gsd-core/templates/milestone-archive.md own 3+121 1 a0925a81c63b 23c7361abbc5 ported-name gsd-core/templates/milestone-archive.md kept 124+1 e3b0c44298fc gsd-core/templates/milestone.md kept 1+2 d23da2973a8f -gsd-core/templates/milestone.md own 3+37 44 7fb4b027e05f 2f202b320f55 ported-name +gsd-core/templates/milestone.md own 3+37 44 7fb4b027e05f a8fe33fb008c ported-name gsd-core/templates/milestone.md kept 40+6 425325f16a8b gsd-core/templates/milestone.md own 46+1 0 5d5740185721 e3b0c44298fc served gsd-core/templates/milestone.md kept 47+5 ccee0180257f @@ -2086,7 +2087,7 @@ gsd-core/templates/retrospective.md kept 1+2 627fd13feaee gsd-core/templates/retrospective.md own 3+52 43 e4bd471ac6b8 603736446b1b prose gsd-core/templates/retrospective.md kept 55+1 e3b0c44298fc gsd-core/templates/roadmap.md kept 1+2 f712c1693da0 -gsd-core/templates/roadmap.md own 3+200 44 a553c27b2f6f a5de38a6aa0c ported-name +gsd-core/templates/roadmap.md own 3+200 46 a553c27b2f6f bd1da84c8df4 ported-name gsd-core/templates/roadmap.md kept 203+1 e3b0c44298fc gsd-core/templates/spec.md kept 1+2 f714433f3c7b gsd-core/templates/spec.md own 3+3 3 15286ccbd93e d0cbbd0f6b94 ported-name @@ -2169,7 +2170,7 @@ gsd-core/workflows/add-tests.md own 15+1 1 610c39df4a69 50639440ca40 args gsd-core/workflows/add-tests.md kept 16+2 8ff58960e6f3 gsd-core/workflows/add-tests.md own 18+1 1 68169837c70a e45faf812dbb args gsd-core/workflows/add-tests.md kept 19+17 701dcd93dabd -gsd-core/workflows/add-tests.md own 36+11 8 5dac36310490 8668cbbb7f04 ported-name +gsd-core/workflows/add-tests.md own 36+11 8 5dac36310490 fe7c03814a42 ported-name gsd-core/workflows/add-tests.md kept 47+5 91ef51d89790 gsd-core/workflows/add-tests.md own 52+2 2 83a77dc32c46 fc8f8c84b2d1 ported-name gsd-core/workflows/add-tests.md kept 54+10 bf4766100a2b @@ -2203,7 +2204,7 @@ gsd-core/workflows/analyze-dependencies.md kept 97+3 c95d594b0139 gsd-core/workflows/audit-milestone.md kept 1+3 941df86109c2 gsd-core/workflows/audit-milestone.md own 4+1 1 8ee24b184304 5eddf2494c7b prose gsd-core/workflows/audit-milestone.md kept 5+16 dcfd9d80e8d1 -gsd-core/workflows/audit-milestone.md own 21+12 9 c3f3ef1e2428 6fd4aed1e52c ported-name +gsd-core/workflows/audit-milestone.md own 21+12 9 c3f3ef1e2428 c5c73a6f7531 ported-name gsd-core/workflows/audit-milestone.md kept 33+3 052fe63be0bc gsd-core/workflows/audit-milestone.md own 36+1 1 ebaba0c6bc27 0e67fffdc23e ported-name gsd-core/workflows/audit-milestone.md kept 37+6 4d878207a6e6 @@ -2239,7 +2240,7 @@ gsd-core/workflows/audit-milestone.md own 191+37 15 912153df8470 2c0ab818cb7c po gsd-core/workflows/audit-milestone.md kept 228+22 5ca8ec069dc6 gsd-core/workflows/audit-milestone.md own 250+1 1 db81ca156e16 ed8c63fc4d72 ported-name gsd-core/workflows/audit-milestone.md kept 251+22 02a2c08b2774 -gsd-core/workflows/audit-milestone.md own 273+1 1 db81ca156e16 ed8c63fc4d72 ported-name +gsd-core/workflows/audit-milestone.md own 273+1 4 db81ca156e16 7805c5aabf10 ported-name gsd-core/workflows/audit-milestone.md kept 274+47 75d0bf7356b2 gsd-core/workflows/audit-milestone.md own 321+1 1 1aae3b756175 aca3122037e1 workflow gsd-core/workflows/audit-milestone.md kept 322+5 0e59a0360ffa @@ -2255,7 +2256,9 @@ gsd-core/workflows/audit-uat.md kept 1+12 7bdd6d21255e gsd-core/workflows/audit-uat.md own 13+2 2 f00801985261 8354c226236c ported-name gsd-core/workflows/audit-uat.md kept 15+37 cc0971eb7d36 gsd-core/workflows/audit-uat.md own 52+0 1 e3b0c44298fc e3b0c44298fc markdown -gsd-core/workflows/audit-uat.md kept 52+77 506fd794fd25 +gsd-core/workflows/audit-uat.md kept 52+54 027531de093b +gsd-core/workflows/audit-uat.md own 106+0 2 e3b0c44298fc 8be4a31dc2e6 review +gsd-core/workflows/audit-uat.md kept 106+23 ded1dc35e0f3 gsd-core/workflows/autonomous.md kept 1+4 fcf6ea8860ae gsd-core/workflows/autonomous.md own 5+1 1 e5bfd8f18dce 90adfd3ddb25 served gsd-core/workflows/autonomous.md kept 6+15 06fd5fad3f64 @@ -2288,12 +2291,14 @@ gsd-core/workflows/autonomous.md kept 169+4 708e29c1ad7a gsd-core/workflows/autonomous.md own 173+1 8 6c3fca018669 a2403cf43d3a prose gsd-core/workflows/autonomous.md kept 174+2 435f4e61d014 gsd-core/workflows/autonomous.md own 176+4 5 40909d1b418c 27b5f054cd45 prose -gsd-core/workflows/autonomous.md kept 180+48 74220499d10c +gsd-core/workflows/autonomous.md kept 180+35 c721215afaaf +gsd-core/workflows/autonomous.md own 215+1 2 ef32425c35a4 7cc013988071 review +gsd-core/workflows/autonomous.md kept 216+12 fb7357646ee3 gsd-core/workflows/autonomous.md own 228+1 1 22e79ac0d0a7 7b8541a40a2c served gsd-core/workflows/autonomous.md kept 229+4 45ea607a405e -gsd-core/workflows/autonomous.md own 233+1 1 89be3e3d06fe 8b524ce5964a ported-name -gsd-core/workflows/autonomous.md kept 234+16 33a7581efee0 -gsd-core/workflows/autonomous.md own 250+1 1 fce050f81f5e 9ebaca097eaa prose +gsd-core/workflows/autonomous.md own 233+4 6 7944201eb984 9a9ae35caa44 ported-name +gsd-core/workflows/autonomous.md kept 237+10 a08817b9786c +gsd-core/workflows/autonomous.md own 247+4 4 28f449407db8 4160b2d10df7 prose gsd-core/workflows/autonomous.md kept 251+6 75220f83a11d gsd-core/workflows/autonomous.md own 257+6 2 aeedfe7ff0c2 4ed6a2a58c21 ported-name gsd-core/workflows/autonomous.md kept 263+15 0923e7500960 @@ -2301,7 +2306,7 @@ gsd-core/workflows/autonomous.md own 278+1 1 97b3d8253dcb 1781f9865b2a ported-na gsd-core/workflows/autonomous.md kept 279+8 c8d6c48dba3f gsd-core/workflows/autonomous.md own 287+1 1 1afcd563261e 78a0971125c6 prose gsd-core/workflows/autonomous.md kept 288+2 5f046190424d -gsd-core/workflows/autonomous.md own 290+4 4 29e81ac9d9d0 2ed414825d67 ported-name +gsd-core/workflows/autonomous.md own 290+4 4 29e81ac9d9d0 23ba5967ffac ported-name gsd-core/workflows/autonomous.md kept 294+4 e817e179eb81 gsd-core/workflows/autonomous.md own 298+1 1 d811b59046a1 ace3593df57e ported-name gsd-core/workflows/autonomous.md kept 299+20 e91aa2dcb94e @@ -2358,8 +2363,10 @@ gsd-core/workflows/autonomous.md kept 705+14 e2757ade77a9 gsd-core/workflows/autonomous.md own 719+1 1 4e2278674896 b369f3623272 served gsd-core/workflows/autonomous.md kept 720+12 901f9acd1639 gsd-core/workflows/autonomous.md own 732+13 4 2cf05cc612f9 21023fd8b46e ported-name -gsd-core/workflows/autonomous.md kept 745+38 345cfa1a5008 -gsd-core/workflows/autonomous.md own 783+3 3 887ceb2277eb 4812398bd3dc served +gsd-core/workflows/autonomous.md kept 745+31 36f67e570647 +gsd-core/workflows/autonomous.md own 776+1 1 f81007f72c52 d3a92152497e review +gsd-core/workflows/autonomous.md kept 777+6 7de1af284ad7 +gsd-core/workflows/autonomous.md own 783+3 3 887ceb2277eb 202fa8d1485b served gsd-core/workflows/autonomous.md kept 786+21 f5a8372aacc0 gsd-core/workflows/autonomous.md own 807+1 1 4d1294c187d8 6cb15ee081ba served gsd-core/workflows/autonomous.md kept 808+6 75ed9c85b167 @@ -2399,7 +2406,9 @@ gsd-core/workflows/complete-milestone.md kept 87+10 2017350a1ee2 gsd-core/workflows/complete-milestone.md own 97+4 2 255637f5a6d0 1c9eec012477 served gsd-core/workflows/complete-milestone.md kept 101+3 96b1a4eb7396 gsd-core/workflows/complete-milestone.md own 104+1 1 dd655e1a7793 2ad29dedbaab prose -gsd-core/workflows/complete-milestone.md kept 105+42 36caaef64532 +gsd-core/workflows/complete-milestone.md kept 105+28 b9bf0329c242 +gsd-core/workflows/complete-milestone.md own 133+0 3 e3b0c44298fc c377cde11a7f review +gsd-core/workflows/complete-milestone.md kept 133+14 d5e1dd252906 gsd-core/workflows/complete-milestone.md own 147+1 1 41a8ddc4b16e 4e92267df688 served gsd-core/workflows/complete-milestone.md kept 148+4 cbb2461dd916 gsd-core/workflows/complete-milestone.md own 152+1 1 daf0ac84ae8f 3421abda3c90 ported-name @@ -2448,20 +2457,20 @@ gsd-core/workflows/complete-milestone.md own 525+1 1 7465dc85e59c 4271851e1cc5 a gsd-core/workflows/complete-milestone.md kept 526+1 ad332335cfaa gsd-core/workflows/complete-milestone.md own 527+4 4 76489f4b2857 516beea9f8b8 ported-name gsd-core/workflows/complete-milestone.md kept 531+6 3fa7475a4951 -gsd-core/workflows/complete-milestone.md own 537+1 1 5ce1c04d769f ee8fa0ab191b workflow -gsd-core/workflows/complete-milestone.md kept 538+4 6e3cfcd0d153 -gsd-core/workflows/complete-milestone.md own 542+1 1 007bdef54952 db9332a9ac85 served -gsd-core/workflows/complete-milestone.md kept 543+5 34023add4d05 +gsd-core/workflows/complete-milestone.md own 537+1 3 5ce1c04d769f 5129158f9d6d served +gsd-core/workflows/complete-milestone.md kept 538+1 0cb799edbed9 +gsd-core/workflows/complete-milestone.md own 539+6 0 f02d71d88cf4 e3b0c44298fc served +gsd-core/workflows/complete-milestone.md kept 545+3 0fa2acd16ead gsd-core/workflows/complete-milestone.md own 548+1 1 ce9fba6b7abe a0c00f596594 prose gsd-core/workflows/complete-milestone.md kept 549+2 5f046190424d -gsd-core/workflows/complete-milestone.md own 551+6 6 f14af0f39403 915b2a3b5e9b ported-name +gsd-core/workflows/complete-milestone.md own 551+6 4 f14af0f39403 38bca3d9f473 ported-name gsd-core/workflows/complete-milestone.md kept 557+16 be791341167a gsd-core/workflows/complete-milestone.md own 573+1 1 25f685789b87 0bf93dc99ace ported-name gsd-core/workflows/complete-milestone.md kept 574+45 c6863245c5be gsd-core/workflows/complete-milestone.md own 619+6 5 7f51b56f750e 1c51b0624d66 prose gsd-core/workflows/complete-milestone.md kept 625+1 8234b70baad3 -gsd-core/workflows/complete-milestone.md own 626+7 2 ca31ae77e479 a2d1b24015d2 prose -gsd-core/workflows/complete-milestone.md kept 633+5 2ae39f5af76d +gsd-core/workflows/complete-milestone.md own 626+9 3 a5450d41fc88 9e603804072a relic +gsd-core/workflows/complete-milestone.md kept 635+3 9293e0db8d3c gsd-core/workflows/complete-milestone.md own 638+2 2 a7d12d5b7b3f 459cf8709810 prose gsd-core/workflows/complete-milestone.md kept 640+5 2a328612a480 gsd-core/workflows/complete-milestone/detail/elaboration.md kept 1+9 f11312356871 @@ -2539,7 +2548,7 @@ gsd-core/workflows/discuss-phase-assumptions.md own 65+11 7 9e57b64dfd3a e6f47ef gsd-core/workflows/discuss-phase-assumptions.md kept 76+2 7cba6c91b260 gsd-core/workflows/discuss-phase-assumptions.md own 78+1 1 9bf2c8f70629 42b2ebeb68e9 ported-name gsd-core/workflows/discuss-phase-assumptions.md kept 79+4 b28fac2a3468 -gsd-core/workflows/discuss-phase-assumptions.md own 83+3 2 88961c4ba089 5d24664ad1a6 review +gsd-core/workflows/discuss-phase-assumptions.md own 83+3 5 88961c4ba089 2040cbc7c483 review gsd-core/workflows/discuss-phase-assumptions.md kept 86+13 b6d612a749cc gsd-core/workflows/discuss-phase-assumptions.md own 99+1 1 5d82ebb4b889 90c43a377576 prose gsd-core/workflows/discuss-phase-assumptions.md kept 100+6 bd1027d8b09d @@ -2611,14 +2620,18 @@ gsd-core/workflows/discuss-phase-power.md own 14+1 1 252bb48d7465 faeed619708a w gsd-core/workflows/discuss-phase-power.md kept 15+5 640521c7f240 gsd-core/workflows/discuss-phase-power.md own 20+1 1 629d5e7114b9 6392ec1f364f served gsd-core/workflows/discuss-phase-power.md kept 21+2 03420accb5cb -gsd-core/workflows/discuss-phase-power.md own 23+3 3 268e01c94a51 ba75797a68da prose +gsd-core/workflows/discuss-phase-power.md own 23+3 3 268e01c94a51 e4de49649a37 prose gsd-core/workflows/discuss-phase-power.md kept 26+1 63cec3752567 gsd-core/workflows/discuss-phase-power.md own 27+1 1 f76d7c6f525b 42a0fe7362fe prose gsd-core/workflows/discuss-phase-power.md kept 28+79 d41f6f106484 gsd-core/workflows/discuss-phase-power.md own 107+1 1 45495eb79341 aa536aebe00a prose -gsd-core/workflows/discuss-phase-power.md kept 108+93 de28a63d286a +gsd-core/workflows/discuss-phase-power.md kept 108+15 cb04e0d47198 +gsd-core/workflows/discuss-phase-power.md own 123+0 3 e3b0c44298fc 0015eba6c742 review +gsd-core/workflows/discuss-phase-power.md kept 123+78 ecbe30964859 gsd-core/workflows/discuss-phase-power.md own 201+1 1 551efabe466a 6db009063500 prose -gsd-core/workflows/discuss-phase-power.md kept 202+50 fcd77609e153 +gsd-core/workflows/discuss-phase-power.md kept 202+37 52daa5a3edbb +gsd-core/workflows/discuss-phase-power.md own 239+1 1 017db52122ca 8a40f3806657 review +gsd-core/workflows/discuss-phase-power.md kept 240+12 4edbb1e3e688 gsd-core/workflows/discuss-phase-power.md own 252+1 1 0c89a72b48bc 6c6904430e5a prose gsd-core/workflows/discuss-phase-power.md kept 253+11 92e4946ff464 gsd-core/workflows/discuss-phase-power.md own 264+1 1 dcec4fcf4274 b3d4c39607f0 prose @@ -2634,7 +2647,7 @@ gsd-core/workflows/discuss-phase-power.md kept 307+5 07e4dd189f9f gsd-core/workflows/discuss-phase.md kept 1+36 b7f32ac1b682 gsd-core/workflows/discuss-phase.md own 37+1 1 6b9b4c2e086d f71cdb0def1c prose gsd-core/workflows/discuss-phase.md kept 38+80 8269447c9ac6 -gsd-core/workflows/discuss-phase.md own 118+11 8 eb7616f2ab78 8c56f5026966 ported-name +gsd-core/workflows/discuss-phase.md own 118+11 8 eb7616f2ab78 c046c39dfc80 ported-name gsd-core/workflows/discuss-phase.md kept 129+6 0a92e10c4d54 gsd-core/workflows/discuss-phase.md own 135+1 1 94c4967453e9 6d2555b940d1 args gsd-core/workflows/discuss-phase.md kept 136+31 e456be22e65a @@ -2787,7 +2800,7 @@ gsd-core/workflows/execute-phase.md own 54+1 1 77f354f25b62 9ef461dfdf9a prose gsd-core/workflows/execute-phase.md kept 55+23 06568a439cd1 gsd-core/workflows/execute-phase.md own 78+2 2 eec052fef93b b8177b1a66f5 prose gsd-core/workflows/execute-phase.md kept 80+10 53df92cd5b51 -gsd-core/workflows/execute-phase.md own 90+14 9 2b426303e45a daee3c168e13 ported-name +gsd-core/workflows/execute-phase.md own 90+14 12 2b426303e45a 2589a77adb22 ported-name gsd-core/workflows/execute-phase.md kept 104+11 b04f37dfe305 gsd-core/workflows/execute-phase.md own 115+1 1 d2555079d60d bceeb3a24ce4 served gsd-core/workflows/execute-phase.md kept 116+7 1ef917a7a602 @@ -3204,7 +3217,9 @@ gsd-core/workflows/execute-plan.md kept 231+35 7321fd1fc6c2 gsd-core/workflows/execute-plan.md own 266+1 1 4adb97b002bd 476e02ba85b8 review gsd-core/workflows/execute-plan.md kept 267+20 c3b1455e747c gsd-core/workflows/execute-plan.md own 287+1 1 bbab1f41e5c9 bba9e92aaaf3 review -gsd-core/workflows/execute-plan.md kept 288+68 0467d7510c0e +gsd-core/workflows/execute-plan.md kept 288+49 78a64a5b9a13 +gsd-core/workflows/execute-plan.md own 337+1 3 c9a42f57bf32 14f71e84a697 review +gsd-core/workflows/execute-plan.md kept 338+18 09398d7f26a7 gsd-core/workflows/execute-plan.md own 356+0 6 e3b0c44298fc c88177ce2f34 prose gsd-core/workflows/execute-plan.md kept 356+8 20d26f4e8678 gsd-core/workflows/execute-plan.md own 364+1 1 2a2286acf2bb f52919281ae9 prose @@ -3248,7 +3263,7 @@ gsd-core/workflows/extract-learnings.md own 4+1 1 6d2fecff81e3 1376663fabba work gsd-core/workflows/extract-learnings.md kept 5+7 5da18e3eff7c gsd-core/workflows/extract-learnings.md own 12+1 1 2a23b793c49f 9cce418d1c23 prose gsd-core/workflows/extract-learnings.md kept 13+8 cc40a9f6c567 -gsd-core/workflows/extract-learnings.md own 21+14 10 23477366eadc e511923ba7ff ported-name +gsd-core/workflows/extract-learnings.md own 21+14 11 23477366eadc f9f28653b51b ported-name gsd-core/workflows/extract-learnings.md kept 35+6 11e3affeed0f gsd-core/workflows/extract-learnings.md own 41+2 2 f9be206fba5a f517998132b9 workflow gsd-core/workflows/extract-learnings.md kept 43+4 bd831ed9fa18 @@ -3269,7 +3284,9 @@ gsd-core/workflows/extract-learnings.md kept 220+2 5f046190424d gsd-core/workflows/extract-learnings.md own 222+1 1 d60de19bc570 4a0cc2ee8c29 ported-name gsd-core/workflows/extract-learnings.md kept 223+4 f3c9324704c4 gsd-core/workflows/extract-learnings.md own 227+0 1 e3b0c44298fc e3b0c44298fc markdown -gsd-core/workflows/extract-learnings.md kept 227+11 cfc391d3cfac +gsd-core/workflows/extract-learnings.md kept 227+3 302276c36da5 +gsd-core/workflows/extract-learnings.md own 230+1 1 f25456a8ee80 305bb71491b2 review +gsd-core/workflows/extract-learnings.md kept 231+7 92f6d93abef6 gsd-core/workflows/extract-learnings.md own 238+1 1 6b57a4b13cfc 38c79c34139b workflow gsd-core/workflows/extract-learnings.md kept 239+18 bab056190f9b gsd-core/workflows/extract-learnings.md own 257+2 2 b134554af240 5661dd2d8c9a workflow @@ -3384,14 +3401,16 @@ gsd-core/workflows/list-workspaces.md kept 22+34 203684a8938a gsd-core/workflows/list-workspaces.md own 56+2 2 14e3b77b9705 fb8b4bc7de3c ported-name gsd-core/workflows/list-workspaces.md kept 58+3 c95d594b0139 gsd-core/workflows/manager.md kept 1+21 dccdec44cf71 -gsd-core/workflows/manager.md own 22+11 8 a084c1b45b39 836296e29f1c ported-name +gsd-core/workflows/manager.md own 22+11 12 a084c1b45b39 7cd57017835e ported-name gsd-core/workflows/manager.md kept 33+3 e3e158d960c7 gsd-core/workflows/manager.md own 36+1 1 45421a1ba41d 8d4d7e26518a workflow gsd-core/workflows/manager.md kept 37+4 9e7cfd10fde0 gsd-core/workflows/manager.md own 41+1 1 9b9f06094f9b 81230f28ea04 ported-name gsd-core/workflows/manager.md kept 42+28 eee2ba16ba39 gsd-core/workflows/manager.md own 70+7 3 dccbe81ce224 ba5e3266322a ported-name -gsd-core/workflows/manager.md kept 77+150 f455caf9cae8 +gsd-core/workflows/manager.md kept 77+20 2730eb90be9b +gsd-core/workflows/manager.md own 97+1 1 7448faa14791 7347a8091fae review +gsd-core/workflows/manager.md kept 98+129 89f9e3d08d6c gsd-core/workflows/manager.md own 227+1 1 39eaeb67319b 95d85a18c370 ported-name gsd-core/workflows/manager.md kept 228+34 76720ac46daf gsd-core/workflows/manager.md own 262+1 1 5ae23fbc9cfd e18044d33310 ported-name @@ -3424,7 +3443,9 @@ gsd-core/workflows/milestone-summary.md kept 98+1 ad332335cfaa gsd-core/workflows/milestone-summary.md own 99+9 7 9d62d4d1fd7a 7a014b13f7ef ported-name gsd-core/workflows/milestone-summary.md kept 108+12 b4e6c9590eeb gsd-core/workflows/milestone-summary.md own 120+1 1 d2546662762f c04d5a5616bf ported-name -gsd-core/workflows/milestone-summary.md kept 121+42 4b53ae9afb8f +gsd-core/workflows/milestone-summary.md kept 121+29 716ecce5ebcd +gsd-core/workflows/milestone-summary.md own 150+1 1 033d625df1ed dea8e9f9dd73 review +gsd-core/workflows/milestone-summary.md kept 151+12 93d1f2e0bc05 gsd-core/workflows/milestone-summary.md own 163+1 1 d21207fa86ea a2bce1aba9bd prose gsd-core/workflows/milestone-summary.md kept 164+4 af7d5fb92495 gsd-core/workflows/milestone-summary.md own 168+1 1 da93855f5f15 47bea798591c prose @@ -3446,7 +3467,7 @@ gsd-core/workflows/milestone-summary.md kept 235+2 47c06c561d5c gsd-core/workflows/mvp-phase.md kept 1+1 67c8626203ca gsd-core/workflows/mvp-phase.md own 2+1 1 46e45c0a7e4f 756ea51e1834 prose gsd-core/workflows/mvp-phase.md kept 3+34 db6990dfe2f0 -gsd-core/workflows/mvp-phase.md own 37+10 9 94730b24589d d91910d8b162 ported-name +gsd-core/workflows/mvp-phase.md own 37+10 9 94730b24589d 3da15832254b ported-name gsd-core/workflows/mvp-phase.md kept 47+58 1497f5c6ca0d gsd-core/workflows/mvp-phase.md own 105+1 1 bd9ea5cec462 0312397ddc6c jq gsd-core/workflows/mvp-phase.md kept 106+2 5f046190424d @@ -3489,7 +3510,7 @@ gsd-core/workflows/new-milestone.md own 178+94 10 a1b74f607cdf e24c28c41b87 port gsd-core/workflows/new-milestone.md kept 272+2 5f046190424d gsd-core/workflows/new-milestone.md own 274+24 1 9aa57c3777cd 0c8751661510 ported-name gsd-core/workflows/new-milestone.md kept 298+5 36eaef62affb -gsd-core/workflows/new-milestone.md own 303+18 12 c773d981c5af e6bd363c07c0 ported-name +gsd-core/workflows/new-milestone.md own 303+18 12 c773d981c5af 3e86993edc21 ported-name gsd-core/workflows/new-milestone.md kept 321+7 545a6f038062 gsd-core/workflows/new-milestone.md own 328+3 3 403f45877360 111c77abb103 prose gsd-core/workflows/new-milestone.md kept 331+25 25ae14afd2e5 @@ -3543,7 +3564,7 @@ gsd-core/workflows/new-milestone.md own 577+1 1 babbe30c43d0 a49b417a248b typed- gsd-core/workflows/new-milestone.md kept 578+2 43b974320e15 gsd-core/workflows/new-milestone.md own 580+1 1 65f07449c0c9 a668bf37d57f prose gsd-core/workflows/new-milestone.md kept 581+10 fbc6c3b0a533 -gsd-core/workflows/new-milestone.md own 591+1 1 2a2e84e1499f 1849599500d6 prose +gsd-core/workflows/new-milestone.md own 591+1 2 2a2e84e1499f 5c328abbbfd6 prose gsd-core/workflows/new-milestone.md kept 592+23 06a91cdf6b7a gsd-core/workflows/new-milestone.md own 615+1 1 d4fae933101c f510e39667ca prose gsd-core/workflows/new-milestone.md kept 616+2 9e56c1721314 @@ -3569,7 +3590,7 @@ gsd-core/workflows/new-milestone.md own 725+1 1 98205a92446b 6a1acc13841e review gsd-core/workflows/new-milestone.md kept 726+1 77cdde528018 gsd-core/workflows/new-milestone.md own 727+1 1 eb0791774912 037927832c0b args gsd-core/workflows/new-milestone.md kept 728+5 044544179f02 -gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md own 1+16 18 d3f3bdd853b8 6ad7806cd694 ported-name +gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md own 1+16 18 d3f3bdd853b8 ff94480e8d8f ported-name gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md kept 17+1 e3b0c44298fc gsd-core/workflows/new-milestone/steps/reset-phase-safety.md kept 1+10 f95b633f3ea6 gsd-core/workflows/new-milestone/steps/reset-phase-safety.md own 11+5 5 752c6ec0cf2e 32f92c7a502a ported-name @@ -3631,10 +3652,10 @@ gsd-core/workflows/new-project.md own 642+1 1 8f9559ad9278 3c7f0fa2b86e ported-n gsd-core/workflows/new-project.md kept 643+8 cdb0f4b6e21f gsd-core/workflows/new-project.md own 651+1 1 b881db5614a7 9415e450a36e served gsd-core/workflows/new-project.md kept 652+2 5f046190424d -gsd-core/workflows/new-project.md own 654+5 5 3fba837013b9 8dc3263bdab1 ported-name +gsd-core/workflows/new-project.md own 654+5 5 3fba837013b9 c8a729eab1f6 ported-name gsd-core/workflows/new-project.md kept 659+11 e519c651333c -gsd-core/workflows/new-project.md own 670+7 6 5a561c0f1855 d2b65babf9da ported-name -gsd-core/workflows/new-project.md kept 677+29 c1f3e444f956 +gsd-core/workflows/new-project.md own 670+9 8 09b94a1d3723 c7f123504828 ported-name +gsd-core/workflows/new-project.md kept 679+27 0b2c80781b8a gsd-core/workflows/new-project.md own 706+1 1 d0d3416a8b37 0cf1d1fd4f78 prose gsd-core/workflows/new-project.md kept 707+2 5f046190424d gsd-core/workflows/new-project.md own 709+1 10 64a3f6f424a2 f8d5ced62931 ported-name @@ -3798,7 +3819,9 @@ gsd-core/workflows/next.md kept 49+1 ad332335cfaa gsd-core/workflows/next.md own 50+1 1 edddb800d94f ce73d81e3525 ported-name gsd-core/workflows/next.md kept 51+5 fd65975b4979 gsd-core/workflows/next.md own 56+1 1 20e004166ca9 72cb35a849d1 ported-name -gsd-core/workflows/next.md kept 57+43 c3d6403fd407 +gsd-core/workflows/next.md kept 57+19 743a979ecacd +gsd-core/workflows/next.md own 76+0 3 e3b0c44298fc 5c4226f3c7a7 review +gsd-core/workflows/next.md kept 76+24 7e57e2687f15 gsd-core/workflows/next.md own 100+1 1 bc24d20dcaf9 6049ce9c814f ported-name gsd-core/workflows/next.md kept 101+7 2aa348f5ba24 gsd-core/workflows/next.md own 108+2 2 1e9d4a0f8ca7 414a7cb14d70 ported-name @@ -3912,7 +3935,7 @@ gsd-core/workflows/plan-phase.md own 88+2 2 28c9893ca9c7 bbea5bc14c32 args gsd-core/workflows/plan-phase.md kept 90+2 b7349b514038 gsd-core/workflows/plan-phase.md own 92+8 7 603468349fe5 8a5914519d85 ported-name gsd-core/workflows/plan-phase.md kept 100+4 e78c0ab23def -gsd-core/workflows/plan-phase.md own 104+5 5 1e17e6cb256a 1f732d117453 review +gsd-core/workflows/plan-phase.md own 104+5 5 1e17e6cb256a 15665d70c2b2 review gsd-core/workflows/plan-phase.md kept 109+5 eec253415c87 gsd-core/workflows/plan-phase.md own 114+1 1 0ad8dc5ef1be d65d0a2a4ce1 prose gsd-core/workflows/plan-phase.md kept 115+5 14d516cf073a @@ -3948,8 +3971,8 @@ gsd-core/workflows/plan-phase.md own 210+5 2 7c9339a6244f a5a2e430d08f ported-na gsd-core/workflows/plan-phase.md kept 215+1 47597e7be384 gsd-core/workflows/plan-phase.md own 216+1 1 915251152b7c ac81aa9e57ae args gsd-core/workflows/plan-phase.md kept 217+11 f3d1e5d57eb7 -gsd-core/workflows/plan-phase.md own 228+1 1 4e8ecd7262b3 9075379f2700 ported-name -gsd-core/workflows/plan-phase.md kept 229+6 b322a563f93b +gsd-core/workflows/plan-phase.md own 228+4 7 765ce2fb10f3 64cd30b04937 ported-name +gsd-core/workflows/plan-phase.md kept 232+3 93e8c08e90fd gsd-core/workflows/plan-phase.md own 235+1 1 91b15134c8a0 744f302dc87d ported-name gsd-core/workflows/plan-phase.md kept 236+12 1d3220abd5fb gsd-core/workflows/plan-phase.md own 248+7 7 8722ae4b14b1 72e1f31af843 prose @@ -3973,8 +3996,10 @@ gsd-core/workflows/plan-phase.md kept 409+5 feb34088fb59 gsd-core/workflows/plan-phase.md own 414+1 1 62c091501e55 bb77cafddd4a ported-name gsd-core/workflows/plan-phase.md kept 415+1 2fe91229ed87 gsd-core/workflows/plan-phase.md own 416+1 1 a21bd339d8ae 8f135aa264e3 ported-name -gsd-core/workflows/plan-phase.md kept 417+23 3daf91c1f4aa -gsd-core/workflows/plan-phase.md own 440+1 11 11e35e174e1b 63d83183efe3 review +gsd-core/workflows/plan-phase.md kept 417+14 82b78fdb933b +gsd-core/workflows/plan-phase.md own 431+1 1 dbab03bcd277 6513416c60ca review +gsd-core/workflows/plan-phase.md kept 432+8 4a4670f0ed15 +gsd-core/workflows/plan-phase.md own 440+1 11 11e35e174e1b 1c4020f64911 review gsd-core/workflows/plan-phase.md kept 441+10 9fa442bd8905 gsd-core/workflows/plan-phase.md own 451+1 1 8357ad127d40 99589cf686f1 prose gsd-core/workflows/plan-phase.md kept 452+6 a158cba9f1fa @@ -3996,8 +4021,8 @@ gsd-core/workflows/plan-phase.md own 518+1 1 2f86d4d10444 df3625f6c468 jq gsd-core/workflows/plan-phase.md kept 519+4 4d609631b11b gsd-core/workflows/plan-phase.md own 523+1 1 86b3a6e569b1 86d379c8d2aa args gsd-core/workflows/plan-phase.md kept 524+4 978304aa5735 -gsd-core/workflows/plan-phase.md own 528+1 1 ed10d852d481 c068f826180c args -gsd-core/workflows/plan-phase.md kept 529+5 30d9399760e4 +gsd-core/workflows/plan-phase.md own 528+2 2 e2104e7847a0 271b92588d2b args +gsd-core/workflows/plan-phase.md kept 530+4 adbc9760e408 gsd-core/workflows/plan-phase.md own 534+1 1 f77a04fc7c0c 171dc2ee16a2 ported-name gsd-core/workflows/plan-phase.md kept 535+9 eeec49e7f7b7 gsd-core/workflows/plan-phase.md own 544+1 1 fc02fcfae6ff d68e2b546b07 served @@ -4007,10 +4032,12 @@ gsd-core/workflows/plan-phase.md kept 558+6 1908972721f0 gsd-core/workflows/plan-phase.md own 564+1 1 3a02ad9f3080 ee0b6520bd5e args gsd-core/workflows/plan-phase.md kept 565+5 563f0710dbca gsd-core/workflows/plan-phase.md own 570+1 1 fc02fcfae6ff d68e2b546b07 served -gsd-core/workflows/plan-phase.md kept 571+12 7ef3a6eed65a -gsd-core/workflows/plan-phase.md own 583+1 1 e566e251c715 167a7e83e3af args +gsd-core/workflows/plan-phase.md kept 571+10 9bc5f60ac78d +gsd-core/workflows/plan-phase.md own 581+1 1 e793fcef6e2d c7e5eaada611 review +gsd-core/workflows/plan-phase.md kept 582+1 4981ac778906 +gsd-core/workflows/plan-phase.md own 583+1 1 e566e251c715 3a3d725a2aee args gsd-core/workflows/plan-phase.md kept 584+3 b673f827ccda -gsd-core/workflows/plan-phase.md own 587+1 1 95ed9ae192de ce9dd660070a args +gsd-core/workflows/plan-phase.md own 587+1 1 95ed9ae192de 4b4d234cdfbf args gsd-core/workflows/plan-phase.md kept 588+11 574e8aa88027 gsd-core/workflows/plan-phase.md own 599+1 1 1c93c64d3a14 bec0e47d1920 ported-name gsd-core/workflows/plan-phase.md kept 600+10 7ff6c1643d75 @@ -4042,7 +4069,7 @@ gsd-core/workflows/plan-phase.md own 747+2 2 429243add2a3 09dca53c7b21 wait gsd-core/workflows/plan-phase.md kept 749+13 47262067949b gsd-core/workflows/plan-phase.md own 762+1 1 307c96a4d2ab 307c96a4d2ab markdown gsd-core/workflows/plan-phase.md kept 763+3 5105cdc8e3f6 -gsd-core/workflows/plan-phase.md own 766+14 12 ca9d90b5f738 edc8e6ad7c28 review +gsd-core/workflows/plan-phase.md own 766+14 12 ca9d90b5f738 ab9f0d044918 review gsd-core/workflows/plan-phase.md kept 780+3 82960f6be81c gsd-core/workflows/plan-phase.md own 783+8 0 61a0b0aa3af1 e3b0c44298fc served gsd-core/workflows/plan-phase.md kept 791+7 fe178a1d9ab8 @@ -4067,7 +4094,9 @@ gsd-core/workflows/plan-phase.md kept 954+5 bae819de4614 gsd-core/workflows/plan-phase.md own 959+1 1 f1b901847390 f1b901847390 markdown gsd-core/workflows/plan-phase.md kept 960+4 37c168c3e8c5 gsd-core/workflows/plan-phase.md own 964+1 1 e244468fa11c 3aedeb39aabc wait -gsd-core/workflows/plan-phase.md kept 965+11 d7ea5892c5b5 +gsd-core/workflows/plan-phase.md kept 965+6 62842cfe0c48 +gsd-core/workflows/plan-phase.md own 971+1 1 d053d94ebfcb 8dbe26ba0107 review +gsd-core/workflows/plan-phase.md kept 972+4 f0ead38b123e gsd-core/workflows/plan-phase.md own 976+3 3 983943e8e9c0 7838efa7a537 wait gsd-core/workflows/plan-phase.md kept 979+9 4dacdc7f851a gsd-core/workflows/plan-phase.md own 988+1 2 727a98e17736 2def94acb299 review @@ -4076,7 +4105,7 @@ gsd-core/workflows/plan-phase.md own 1000+1 1 e508f4643c24 49f04f2ca22a ported-n gsd-core/workflows/plan-phase.md kept 1001+6 e3a6708f8849 gsd-core/workflows/plan-phase.md own 1007+1 1 8ef552f335a5 9e2817cd4d06 prose gsd-core/workflows/plan-phase.md kept 1008+3 c91c34d65e63 -gsd-core/workflows/plan-phase.md own 1011+1 30 1b621c8a591e d615fa0d5986 review +gsd-core/workflows/plan-phase.md own 1011+1 25 1b621c8a591e 8671ad1de4f0 review gsd-core/workflows/plan-phase.md kept 1012+19 784e50e89aaa gsd-core/workflows/plan-phase.md own 1031+2 2 3f6ee30c7042 188ac03bf321 ported-name gsd-core/workflows/plan-phase.md kept 1033+9 9d66beb2ef7e @@ -4085,7 +4114,9 @@ gsd-core/workflows/plan-phase.md kept 1043+6 3e495962a339 gsd-core/workflows/plan-phase.md own 1049+6 2 55d145b92095 f0c9ea84b064 prose gsd-core/workflows/plan-phase.md kept 1055+30 0e3a7a43e33a gsd-core/workflows/plan-phase.md own 1085+3 3 e27f847e53ca efbe6e8fd587 prose -gsd-core/workflows/plan-phase.md kept 1088+22 1bce028bf7c9 +gsd-core/workflows/plan-phase.md kept 1088+19 482b9d5b8894 +gsd-core/workflows/plan-phase.md own 1107+1 1 9161c5468f6b f9657aeba7b7 review +gsd-core/workflows/plan-phase.md kept 1108+2 d324af965371 gsd-core/workflows/plan-phase.md own 1110+1 1 f1b901847390 f1b901847390 markdown gsd-core/workflows/plan-phase.md kept 1111+2 9394338f94f6 gsd-core/workflows/plan-phase.md own 1113+5 5 20ae2900799b 3677da63e94e wait @@ -4093,7 +4124,9 @@ gsd-core/workflows/plan-phase.md kept 1118+15 d32245d4d4b4 gsd-core/workflows/plan-phase.md own 1133+1 1 e508f4643c24 49f04f2ca22a ported-name gsd-core/workflows/plan-phase.md kept 1134+44 626aaacb5ed1 gsd-core/workflows/plan-phase.md own 1178+2 1 17368efa2f19 4ecbfa223868 prose -gsd-core/workflows/plan-phase.md kept 1180+30 24033fddc1a7 +gsd-core/workflows/plan-phase.md kept 1180+24 d23b92c561a4 +gsd-core/workflows/plan-phase.md own 1204+1 1 7453e7f88db6 f078c3017332 review +gsd-core/workflows/plan-phase.md kept 1205+5 9cf59b3c9471 gsd-core/workflows/plan-phase.md own 1210+5 5 99c5bc04c3f5 f2c410ac5544 wait gsd-core/workflows/plan-phase.md kept 1215+5 c012ff7be27d gsd-core/workflows/plan-phase.md own 1220+1 1 ee7f838d61f1 fcf022f421bd ported-name @@ -4146,8 +4179,10 @@ gsd-core/workflows/plan-phase.md own 1487+1 1 ebf25a5e0673 17ab79dc9faa ported-n gsd-core/workflows/plan-phase.md kept 1488+3 b888b3ad6568 gsd-core/workflows/plan-phase.md own 1491+1 1 ac97f8f721c3 0f17ff10657e ported-name gsd-core/workflows/plan-phase.md kept 1492+16 f605ae87f954 -gsd-core/workflows/plan-phase.md own 1508+1 2 c9b5b03b89c1 1397ada8c519 review -gsd-core/workflows/plan-phase.md kept 1509+32 8b2877ec0ae8 +gsd-core/workflows/plan-phase.md own 1508+1 3 c9b5b03b89c1 1e4f161cc9e4 review +gsd-core/workflows/plan-phase.md kept 1509+14 54ce6d873f45 +gsd-core/workflows/plan-phase.md own 1523+1 1 feb1a1178519 0e2023199b16 review +gsd-core/workflows/plan-phase.md kept 1524+17 0e417ff875ff gsd-core/workflows/plan-phase.md own 1541+1 1 5501d8735797 2a9da5bba9bd args gsd-core/workflows/plan-phase.md kept 1542+4 0cb6ac40b83c gsd-core/workflows/plan-phase.md own 1546+1 1 c5e03d4f96a6 773194c15d1c ported-name @@ -4195,7 +4230,9 @@ gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 52+2 9394338f9 gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 54+1 1 6da80e2d5f66 6c1c29bf4e05 wait gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 55+6 9a857c4d981f gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 61+2 2 6a9a45af65f0 b3fe2ff8b62a served -gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 63+14 b604c9370c95 +gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 63+9 5849a26fa536 +gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 72+1 1 9ecf4885b5c0 e494c51819b8 review +gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 73+4 f0ead38b123e gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 77+3 3 bf99922bed7c 263075fe1c92 wait gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 80+2 76d8d71ad78b gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 82+1 1 f03608bddcb7 306f0464e37f served @@ -4208,7 +4245,7 @@ gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 125+6 3 dd28ef5 gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 131+15 33bf4586f25d gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 146+1 1 b4a9bb5e51f2 ffb48df336da prose gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 147+9 d348edd5ad12 -gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 156+1 4 ba53416989a6 ea4ccbf1415d review +gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 156+1 4 ba53416989a6 082bf9c672a4 review gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 157+18 5e0bce91d2ca gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 175+2 5 652512b3e803 8fdfc1302b63 wait gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 177+2 7854629a8cb0 @@ -4218,7 +4255,7 @@ gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 184+1 1 7e5034a gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 185+2 bdf284389182 gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 187+4 5 4b4567ac01c5 424e2810d39c review gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 191+7 0112cf152b73 -gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 198+7 13 24d979542cc2 9c9135ac9c59 ported-name +gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md own 198+7 19 24d979542cc2 94472cf35abb ported-name gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md kept 205+5 1a3f74c3857a gsd-core/workflows/plan-phase/steps/closed-phase-gate.md kept 1+2 560f00672a3c gsd-core/workflows/plan-phase/steps/closed-phase-gate.md own 3+3 3 5292b4e63756 ae6f6aed0b86 args @@ -4255,7 +4292,9 @@ gsd-core/workflows/plan-phase/steps/research-only-modifiers.md own 9+1 1 14aba70 gsd-core/workflows/plan-phase/steps/research-only-modifiers.md kept 10+3 c0a8b2f787c0 gsd-core/workflows/plan-phase/steps/research-only-modifiers.md own 13+2 2 ce992bf77e21 144ad0f79f2a served gsd-core/workflows/plan-phase/steps/research-only-modifiers.md kept 15+3 3caf5dfe6cbf -gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md kept 1+18 d0d084ad6a1f +gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md kept 1+10 e13743f33cae +gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md own 11+5 5 495a24f459ee 9a756c5a02df review +gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md kept 16+3 c54fc0de405c gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md kept 1+4 cbcf85d0ec9f gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md own 5+3 3 b7e2563ecbf0 3280c3fa582e wait gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md kept 8+2 d325c655646f @@ -4315,7 +4354,7 @@ gsd-core/workflows/plan-review-convergence.md own 128+1 1 23690726fe60 6132ebcd4 gsd-core/workflows/plan-review-convergence.md kept 129+4 22e924b54745 gsd-core/workflows/plan-review-convergence.md own 133+1 1 78c0770dcd09 e3b0c44298fc jq gsd-core/workflows/plan-review-convergence.md kept 134+10 d7b67b29d8a4 -gsd-core/workflows/plan-review-convergence.md own 144+5 5 0cc3cc933fdf 4e70d8c785f8 ported-name +gsd-core/workflows/plan-review-convergence.md own 144+5 8 0cc3cc933fdf aa6ef1162835 ported-name gsd-core/workflows/plan-review-convergence.md kept 149+8 6b01856f5a1a gsd-core/workflows/plan-review-convergence.md own 157+1 1 27600dd0ea2e 9075379f2700 ported-name gsd-core/workflows/plan-review-convergence.md kept 158+22 f229255f9937 @@ -4402,9 +4441,7 @@ gsd-core/workflows/pr-branch.md own 58+2 2 f82906ce9543 d045bf236670 workflow gsd-core/workflows/pr-branch.md kept 60+2 5f046190424d gsd-core/workflows/pr-branch.md own 62+2 2 1c8b1db2b156 2c8cb955aa20 ported-name gsd-core/workflows/pr-branch.md kept 64+9 0b1e148c62ac -gsd-core/workflows/pr-branch.md own 73+1 1 fb78bcb18ed5 338e6adc9406 workflow -gsd-core/workflows/pr-branch.md kept 74+4 2ade159fa717 -gsd-core/workflows/pr-branch.md own 78+153 2 e90d0950c234 9d09b89bc1e6 ported-name +gsd-core/workflows/pr-branch.md own 73+158 2 1030325c1756 f6bdc4566615 ported-name gsd-core/workflows/pr-branch.md kept 231+7 d72bd9d8de75 gsd-core/workflows/pr-branch.md own 238+10 10 677b4e2a3b26 00acbed511e7 git gsd-core/workflows/pr-branch.md kept 248+2 5f046190424d @@ -4455,8 +4492,8 @@ gsd-core/workflows/pr-branch.md kept 557+8 18a6de6e68d8 gsd-core/workflows/pr-branch.md own 565+3 3 85f5739d303e ced4696fb276 ported-name gsd-core/workflows/pr-branch.md kept 568+5 5a0b87452d9f gsd-core/workflows/progress.md kept 1+16 d1bc3264f6a0 -gsd-core/workflows/progress.md own 17+12 8 3fdefb186bbd 17d8d8cbd840 ported-name -gsd-core/workflows/progress.md kept 29+2 5f046190424d +gsd-core/workflows/progress.md own 17+13 14 436735694c95 16ca09fdfd7f ported-name +gsd-core/workflows/progress.md kept 30+1 ad332335cfaa gsd-core/workflows/progress.md own 31+1 1 d5b0f53121d9 883ca6799d4b ported-name gsd-core/workflows/progress.md kept 32+4 bee41e798250 gsd-core/workflows/progress.md own 36+1 1 61c39aa2decc d20ef600470d ported-name @@ -4514,19 +4551,31 @@ gsd-core/workflows/progress.md kept 321+2 5f046190424d gsd-core/workflows/progress.md own 323+8 7 f079648edf11 90f0401152c5 ported-name gsd-core/workflows/progress.md kept 331+32 09407f8aea1f gsd-core/workflows/progress.md own 363+1 1 57c830857620 a411adf0e2d7 args -gsd-core/workflows/progress.md kept 364+13 3ae506b21145 +gsd-core/workflows/progress.md kept 364+8 23c6d3396801 +gsd-core/workflows/progress.md own 372+1 1 c4e14a97dd46 d0a6a412abfd review +gsd-core/workflows/progress.md kept 373+4 6fad467d0e01 gsd-core/workflows/progress.md own 377+2 2 4e3be5e9e431 24061c6f9de7 ported-name -gsd-core/workflows/progress.md kept 379+14 267483f56c15 +gsd-core/workflows/progress.md kept 379+9 53efc5a9cdc5 +gsd-core/workflows/progress.md own 388+1 1 efe86f53b2f1 a9a63f9aa9e6 review +gsd-core/workflows/progress.md kept 389+4 dfbaef3d18b7 gsd-core/workflows/progress.md own 393+1 1 a69c82e1b291 24dd2563a9f9 args -gsd-core/workflows/progress.md kept 394+38 28a5c3db96ab +gsd-core/workflows/progress.md kept 394+11 3b742c7b1b0b +gsd-core/workflows/progress.md own 405+1 1 efe86f53b2f1 a9a63f9aa9e6 review +gsd-core/workflows/progress.md kept 406+22 14d4a8ef257d +gsd-core/workflows/progress.md own 428+1 1 efe86f53b2f1 a9a63f9aa9e6 review +gsd-core/workflows/progress.md kept 429+3 95255f50bc07 gsd-core/workflows/progress.md own 432+1 1 376751422b3b 2acaefb86d6d args gsd-core/workflows/progress.md kept 433+4 0cb6ac40b83c gsd-core/workflows/progress.md own 437+2 2 f8647dcad370 5bf7d881fa6d args -gsd-core/workflows/progress.md kept 439+19 4a457c85b49c +gsd-core/workflows/progress.md kept 439+15 cff769b6bdff +gsd-core/workflows/progress.md own 454+1 1 3ad61179abb0 81534b614f18 review +gsd-core/workflows/progress.md kept 455+3 95255f50bc07 gsd-core/workflows/progress.md own 458+1 1 61fcdd8564c2 03d37869cd5e args gsd-core/workflows/progress.md kept 459+4 0cb6ac40b83c gsd-core/workflows/progress.md own 463+2 2 fc3ada776499 12789c94acc6 args -gsd-core/workflows/progress.md kept 465+19 3dbe470f1477 +gsd-core/workflows/progress.md kept 465+15 6112126cef61 +gsd-core/workflows/progress.md own 480+1 1 61963edda995 967ffab82225 review +gsd-core/workflows/progress.md kept 481+3 95255f50bc07 gsd-core/workflows/progress.md own 484+1 1 51d2711c26f5 eaa27f081310 args gsd-core/workflows/progress.md kept 485+4 0cb6ac40b83c gsd-core/workflows/progress.md own 489+2 2 80646b73e161 7264edc53774 args @@ -4537,13 +4586,13 @@ gsd-core/workflows/progress.md own 510+1 1 163a6b43bffc ba1c11d26e3b served gsd-core/workflows/progress.md kept 511+8 4f02d549ef40 gsd-core/workflows/progress.md own 519+1 1 c770b18ba6e0 8218deb434a5 prose gsd-core/workflows/progress.md kept 520+6 0a35076c6af2 -gsd-core/workflows/progress.md own 526+1 1 0edb0b4c664d 771a3fb8e419 served +gsd-core/workflows/progress.md own 526+1 1 0edb0b4c664d 45608169ff85 served gsd-core/workflows/progress.md kept 527+3 95255f50bc07 gsd-core/workflows/progress.md own 530+1 1 9026ccd7c505 99b6f58b9fe9 served gsd-core/workflows/progress.md kept 531+8 e8d07b983e1d gsd-core/workflows/progress.md own 539+1 1 116a859ca3d7 4e42c53fe2f3 prose gsd-core/workflows/progress.md kept 540+6 11bc44f30712 -gsd-core/workflows/progress.md own 546+1 1 8e29ec51b003 97588672f4fb served +gsd-core/workflows/progress.md own 546+1 1 8e29ec51b003 da3877d7966c served gsd-core/workflows/progress.md kept 547+3 95255f50bc07 gsd-core/workflows/progress.md own 550+1 1 b17da974c94b de68031b5771 served gsd-core/workflows/progress.md kept 551+32 7fd9c6373876 @@ -4672,7 +4721,7 @@ gsd-core/workflows/quick-batch/steps/planner-wave.md own 89+1 1 35ab1d89430a e3b gsd-core/workflows/quick-batch/steps/planner-wave.md kept 90+1 27da12b4303e gsd-core/workflows/quick-batch/steps/planner-wave.md own 91+1 1 699cd0d0f68e 3eaa16f57740 quick gsd-core/workflows/quick-batch/steps/planner-wave.md kept 92+2 32217ef09419 -gsd-core/workflows/quick-batch/steps/planner-wave.md own 94+0 4 e3b0c44298fc bfdfd39374c9 review +gsd-core/workflows/quick-batch/steps/planner-wave.md own 94+0 4 e3b0c44298fc 5711b22f2805 review gsd-core/workflows/quick-batch/steps/planner-wave.md kept 94+7 feb6517dacfc gsd-core/workflows/quick-batch/steps/planner-wave.md own 101+1 1 382c5ed9d513 a40e518efc6d quick gsd-core/workflows/quick-batch/steps/planner-wave.md kept 102+13 fa9cb53d2e4f @@ -4680,7 +4729,7 @@ gsd-core/workflows/quick-batch/steps/planner-wave.md own 115+2 4 ded99c8aad4d 2c gsd-core/workflows/quick-batch/steps/planner-wave.md kept 117+12 5a2f18e76edb gsd-core/workflows/quick-batch/steps/planner-wave.md own 129+1 1 b9f79ea5d2df ac9d7b058861 quick gsd-core/workflows/quick-batch/steps/planner-wave.md kept 130+4 616edf193d8b -gsd-core/workflows/quick-batch/steps/planner-wave.md own 134+0 26 e3b0c44298fc d038891f84a5 review +gsd-core/workflows/quick-batch/steps/planner-wave.md own 134+0 20 e3b0c44298fc 1bd02b050ed3 review gsd-core/workflows/quick-batch/steps/planner-wave.md kept 134+6 96b6957962f9 gsd-core/workflows/quick-batch/steps/planner-wave.md own 140+1 1 7181fff36197 65d12f3b5a29 prose gsd-core/workflows/quick-batch/steps/planner-wave.md kept 141+1 dd7bc996c6b8 @@ -4705,7 +4754,7 @@ gsd-core/workflows/quick-batch/steps/research-phase.md own 77+1 1 87d0aa709fe7 f gsd-core/workflows/quick-batch/steps/research-phase.md kept 78+12 36fb22298df2 gsd-core/workflows/quick-batch/steps/research-phase.md own 90+1 1 189098c3074e 0610be80ac36 quick gsd-core/workflows/quick-batch/steps/research-phase.md kept 91+2 fcde1dd2dcad -gsd-core/workflows/quick-batch/steps/research-phase.md own 93+0 4 e3b0c44298fc 91c2dafe8dc7 review +gsd-core/workflows/quick-batch/steps/research-phase.md own 93+0 4 e3b0c44298fc d2a818a39dc8 review gsd-core/workflows/quick-batch/steps/research-phase.md kept 93+4 cda1e40c7dfc gsd-core/workflows/quick-batch/steps/resume-mode.md kept 1+10 3f036a3c1962 gsd-core/workflows/quick-batch/steps/resume-mode.md own 11+5 14 f1fdd3103079 e9c25cb0ea40 ported-name @@ -4814,7 +4863,7 @@ gsd-core/workflows/quick.md own 324+1 0 43cee618a962 e3b0c44298fc served gsd-core/workflows/quick.md kept 325+1 157463f30942 gsd-core/workflows/quick.md own 326+2 2 434092bff61d a84bda852e23 quick gsd-core/workflows/quick.md kept 328+2 340ff0f23090 -gsd-core/workflows/quick.md own 330+0 4 e3b0c44298fc f51a5e0891a8 review +gsd-core/workflows/quick.md own 330+0 4 e3b0c44298fc 576eb58f00d6 review gsd-core/workflows/quick.md kept 330+9 2ead85831436 gsd-core/workflows/quick.md own 339+1 1 33a497628ada fada3a5b3b80 quick gsd-core/workflows/quick.md kept 340+2 4a57ae07eef1 @@ -4824,7 +4873,7 @@ gsd-core/workflows/quick.md own 350+2 2 100c177685f0 7775adf6e787 prose gsd-core/workflows/quick.md kept 352+11 21ededfb0f07 gsd-core/workflows/quick.md own 363+1 1 b9272f04e1d9 09ce38c6c7b1 quick gsd-core/workflows/quick.md kept 364+1 a82649ff3482 -gsd-core/workflows/quick.md own 365+3 28 51280188b940 4db17a392d04 typed-edit +gsd-core/workflows/quick.md own 365+3 22 51280188b940 41ddd515a6c8 typed-edit gsd-core/workflows/quick.md kept 368+27 c662c0b0ac5b gsd-core/workflows/quick.md own 395+1 1 ff4ed2575e77 526d1ab54425 ported-name gsd-core/workflows/quick.md kept 396+1 53988bed5da9 @@ -4948,7 +4997,7 @@ gsd-core/workflows/quick/steps/research-phase.md own 35+1 1 1f7c6c014826 9c9a0db gsd-core/workflows/quick/steps/research-phase.md kept 36+17 51a40bffef62 gsd-core/workflows/quick/steps/research-phase.md own 53+1 1 9c1fa56c490b e2bbac82a5ed typed-edit gsd-core/workflows/quick/steps/research-phase.md kept 54+13 2dc2cfac689d -gsd-core/workflows/quick/steps/research-phase.md own 67+2 5 ce190f1bc506 d2fa0e147d05 review +gsd-core/workflows/quick/steps/research-phase.md own 67+2 5 ce190f1bc506 2f685bf750f1 review gsd-core/workflows/quick/steps/research-phase.md kept 69+3 ae6d36e59d60 gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md kept 1+2 e854054f92d6 gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md own 3+7 7 ccc84325a42d 59ae51501876 workflow @@ -4985,7 +5034,7 @@ gsd-core/workflows/remove-workspace.md kept 100+13 3bcacdca6803 gsd-core/workflows/resume-project.md kept 1+6 a927dfb0d651 gsd-core/workflows/resume-project.md own 7+1 1 9577fb269ee6 f1bf0fc66994 ported-name gsd-core/workflows/resume-project.md kept 8+17 8d87b90d8459 -gsd-core/workflows/resume-project.md own 25+13 10 d3bb3f30a728 3c90fdbbac49 ported-name +gsd-core/workflows/resume-project.md own 25+13 14 d3bb3f30a728 866620f4a0b1 ported-name gsd-core/workflows/resume-project.md kept 38+11 7394be3162de gsd-core/workflows/resume-project.md own 49+2 2 d816e84bd704 06cb6b028866 ported-name gsd-core/workflows/resume-project.md kept 51+29 1fee7a241b7e @@ -5046,7 +5095,7 @@ gsd-core/workflows/review.md own 150+4 3 f1a1f61e251c 928a4d693eb5 served gsd-core/workflows/review.md kept 159+2 d0966c7d28d5 gsd-core/workflows/review.md own 161+1 1 db432a1e0825 27aeeb864eb9 served gsd-core/workflows/review.md kept 162+3 56381965bef2 -gsd-core/workflows/review.md own 165+1 1 5225716a86fa 51d28b529911 served +gsd-core/workflows/review.md own 165+1 3 5225716a86fa d2f7740c005c review gsd-core/workflows/review.md kept 166+3 aa836136abe3 gsd-core/workflows/review.md own 169+1 1 06c33fe8febd 07c111a1347a served gsd-core/workflows/review.md kept 170+3 972337f59de1 @@ -5178,7 +5227,7 @@ gsd-core/workflows/session-report.md kept 146+1 9ed795ff80bc gsd-core/workflows/session-report.md own 147+1 0 223b316e02af e3b0c44298fc relic gsd-core/workflows/session-report.md kept 148+3 bb96f2b88c65 gsd-core/workflows/settings-advanced.md kept 1+5 99b6001955b5 -gsd-core/workflows/settings-advanced.md own 6+1 1 c4990231d7b0 e208d3d38319 review +gsd-core/workflows/settings-advanced.md own 6+1 1 c4990231d7b0 c4791b3aac98 review gsd-core/workflows/settings-advanced.md kept 7+20 d7007db426e8 gsd-core/workflows/settings-advanced.md own 27+2 2 0766de41e23f 927b20f22338 ported-name gsd-core/workflows/settings-advanced.md kept 29+1 3ba628c0f678 @@ -5189,13 +5238,19 @@ gsd-core/workflows/settings-advanced.md kept 35+5 d10c82b99671 gsd-core/workflows/settings-advanced.md own 40+1 1 763cb525ab90 d22e7449e688 ported-name gsd-core/workflows/settings-advanced.md kept 41+4 a29f1adeeca3 gsd-core/workflows/settings-advanced.md own 45+1 1 73d670c20410 70ee961572e1 served -gsd-core/workflows/settings-advanced.md kept 46+34 49070d837ee6 -gsd-core/workflows/settings-advanced.md own 80+1 0 e076c12ff5f6 e3b0c44298fc served -gsd-core/workflows/settings-advanced.md kept 81+65 245a425c9756 +gsd-core/workflows/settings-advanced.md kept 46+16 9a18b1581ea2 +gsd-core/workflows/settings-advanced.md own 62+1 0 bd51bb2914ca e3b0c44298fc served +gsd-core/workflows/settings-advanced.md kept 63+17 baeb590c0062 +gsd-core/workflows/settings-advanced.md own 80+2 0 3501a7a6c4c0 e3b0c44298fc served +gsd-core/workflows/settings-advanced.md kept 82+27 15abe8136de9 +gsd-core/workflows/settings-advanced.md own 109+1 1 d0b35ef2c99c a1de5927ad73 served +gsd-core/workflows/settings-advanced.md kept 110+36 1629638e1d58 gsd-core/workflows/settings-advanced.md own 146+1 1 1612b2758d91 7505caa93da4 prose -gsd-core/workflows/settings-advanced.md kept 147+190 d6a304528a64 -gsd-core/workflows/settings-advanced.md own 337+9 0 20c6694ef369 e3b0c44298fc ported-name -gsd-core/workflows/settings-advanced.md kept 346+105 6366325944af +gsd-core/workflows/settings-advanced.md kept 147+68 ee40df9a6b87 +gsd-core/workflows/settings-advanced.md own 215+9 0 ec96607cc507 e3b0c44298fc relic +gsd-core/workflows/settings-advanced.md kept 224+111 ff5d2ac42b51 +gsd-core/workflows/settings-advanced.md own 335+18 0 f0c6a3275fa8 e3b0c44298fc ported-name +gsd-core/workflows/settings-advanced.md kept 353+98 bc7baaa66307 gsd-core/workflows/settings-advanced.md own 451+1 1 ec8e5cfe3ace 72573a54bccf ported-name gsd-core/workflows/settings-advanced.md kept 452+42 03ce0c28b93f gsd-core/workflows/settings-advanced.md own 494+4 4 e238a166f0cf cb1ac0144e0c ported-name @@ -5207,9 +5262,11 @@ gsd-core/workflows/settings-advanced.md kept 512+5 12d0d9f5e3a8 gsd-core/workflows/settings-advanced.md own 517+5 5 159c2118b76b 20432b0945db ported-name gsd-core/workflows/settings-advanced.md kept 522+2 c58207640893 gsd-core/workflows/settings-advanced.md own 524+3 3 17b59e7278cf b7f9ad776432 ported-name -gsd-core/workflows/settings-advanced.md kept 527+36 ee15d3b2357e -gsd-core/workflows/settings-advanced.md own 563+1 0 2f7f14e35348 e3b0c44298fc review -gsd-core/workflows/settings-advanced.md kept 564+26 d62e1662b299 +gsd-core/workflows/settings-advanced.md kept 527+22 9327e07502dd +gsd-core/workflows/settings-advanced.md own 549+1 0 801cf2e0bae1 e3b0c44298fc relic +gsd-core/workflows/settings-advanced.md kept 550+13 9cbecefc66d7 +gsd-core/workflows/settings-advanced.md own 563+5 0 e7418e7832e5 e3b0c44298fc served +gsd-core/workflows/settings-advanced.md kept 568+22 30a07818f6e1 gsd-core/workflows/settings-advanced.md own 590+1 1 3b0bc37ed045 bcfe1d53dab4 ported-name gsd-core/workflows/settings-advanced.md kept 591+7 ba038874115d gsd-core/workflows/settings-advanced.md own 598+1 1 3b582c2b9bba c8b1f03fcb96 ported-name @@ -5221,9 +5278,11 @@ gsd-core/workflows/settings-advanced.md kept 752+2 6e160c562971 gsd-core/workflows/settings-advanced.md own 754+2 2 bb8e08be2145 5b47217330e0 ported-name gsd-core/workflows/settings-advanced.md kept 756+1 9fbb2ab751d3 gsd-core/workflows/settings-advanced.md own 757+3 3 abd1753cba4e 84d993a5b92d ported-name -gsd-core/workflows/settings-advanced.md kept 760+32 8a2afa8cb07b -gsd-core/workflows/settings-advanced.md own 792+1 0 f12b87dd01fd e3b0c44298fc served -gsd-core/workflows/settings-advanced.md kept 793+39 7e413dd51a24 +gsd-core/workflows/settings-advanced.md kept 760+22 254ccfd4a01e +gsd-core/workflows/settings-advanced.md own 782+1 0 da498d68a79b e3b0c44298fc served +gsd-core/workflows/settings-advanced.md kept 783+9 4b3691025d8c +gsd-core/workflows/settings-advanced.md own 792+2 0 dab3c580cbec e3b0c44298fc served +gsd-core/workflows/settings-advanced.md kept 794+38 9aa927a253a7 gsd-core/workflows/settings-advanced.md own 832+1 1 05f5f6998dd2 65ab93ff0c6f ported-name gsd-core/workflows/settings-advanced.md kept 833+10 007b9cdb5041 gsd-core/workflows/settings-integrations.md kept 1+4 6fb9c4c5690e @@ -5280,7 +5339,7 @@ gsd-core/workflows/settings.md own 56+1 0 93decfccfb6c e3b0c44298fc ported-name gsd-core/workflows/settings.md kept 57+1 d4f234eab4a6 gsd-core/workflows/settings.md own 58+2 0 ce1d074570fe e3b0c44298fc served gsd-core/workflows/settings.md kept 60+2 4e60a595d8be -gsd-core/workflows/settings.md own 62+1 1 6944540124ce 4dea7b43ad28 ported-name +gsd-core/workflows/settings.md own 62+1 0 6944540124ce e3b0c44298fc ported-name gsd-core/workflows/settings.md kept 63+17 bfae9c2aabb2 gsd-core/workflows/settings.md own 80+1 1 d0da01e34fe3 293152cdf967 ported-name gsd-core/workflows/settings.md kept 81+7 e3613fb68a82 @@ -5343,7 +5402,7 @@ gsd-core/workflows/settings.md kept 670+3 b75f7be1d6e5 gsd-core/workflows/ship.md kept 1+26 6d72d05fb9b8 gsd-core/workflows/ship.md own 27+10 7 6c8903ffe0a4 280552b16bda ported-name gsd-core/workflows/ship.md kept 37+4 b28fac2a3468 -gsd-core/workflows/ship.md own 41+1 1 4feb163f7ec8 aa7b43f63391 review +gsd-core/workflows/ship.md own 41+1 4 4feb163f7ec8 a239b9641373 review gsd-core/workflows/ship.md kept 42+3 c5afce15376a gsd-core/workflows/ship.md own 45+4 4 1c8ecd0d8da5 4149e9ad3542 ported-name gsd-core/workflows/ship.md kept 49+3 a09c907e1f7c @@ -5388,7 +5447,9 @@ gsd-core/workflows/ship.md kept 175+3 2f2de1b8a348 gsd-core/workflows/ship.md own 178+1 1 520f24c7f081 0e90272043c0 workflow gsd-core/workflows/ship.md kept 179+38 a05fc6bc9d56 gsd-core/workflows/ship.md own 217+1 1 10063a274aa1 1713ec5ca926 served -gsd-core/workflows/ship.md kept 218+23 e8fcc13c7d93 +gsd-core/workflows/ship.md kept 218+7 705dcaabfe50 +gsd-core/workflows/ship.md own 225+1 1 d25a3f957fd3 3d722bb0a5a0 review +gsd-core/workflows/ship.md kept 226+15 b70b52416d2e gsd-core/workflows/ship.md own 241+1 1 f6b5e6cb2efe ddd5c89f381d prose gsd-core/workflows/ship.md kept 242+28 7992f37b5f6c gsd-core/workflows/ship.md own 270+1 1 76d3cdbefee4 aa92559c661b ported-name @@ -5450,7 +5511,9 @@ gsd-core/workflows/ship.md kept 572+3 7c9f5263999a gsd-core/workflows/ship.md own 575+2 2 437877ccb238 c723a9cdda28 relic gsd-core/workflows/ship.md kept 577+5 0da7f070b330 gsd-core/workflows/ship.md own 582+0 1 e3b0c44298fc e3b0c44298fc markdown -gsd-core/workflows/ship.md kept 582+35 3d5dcf7e1b26 +gsd-core/workflows/ship.md kept 582+3 67191b0e7fbd +gsd-core/workflows/ship.md own 585+1 1 a168ef04d68c 1928ff4e4a8b review +gsd-core/workflows/ship.md kept 586+31 2c42e0b46897 gsd-core/workflows/ship.md own 617+1 0 ce6512471ffc e3b0c44298fc relic gsd-core/workflows/ship.md kept 618+3 42aa931b8015 gsd-core/workflows/smart-entry.md kept 1+1 67c8626203ca @@ -5471,7 +5534,7 @@ gsd-core/workflows/spec-phase.md own 3+1 1 26116e97a8f8 fb285d9ac8e3 prose gsd-core/workflows/spec-phase.md kept 4+16 997c0cb312bd gsd-core/workflows/spec-phase.md own 20+1 1 aaa6878b4c16 8583eeab5e81 prose gsd-core/workflows/spec-phase.md kept 21+38 e1b1dd03076e -gsd-core/workflows/spec-phase.md own 59+6 6 2b2a26aa6d17 b1d23bd2d983 ported-name +gsd-core/workflows/spec-phase.md own 59+6 9 2b2a26aa6d17 ef0c5a61f14f ported-name gsd-core/workflows/spec-phase.md kept 65+10 1a5aacbf7a24 gsd-core/workflows/spec-phase.md own 75+1 1 354bb413d7f0 9e29d0c33a19 served gsd-core/workflows/spec-phase.md kept 76+3 92cd7a5cc5c8 @@ -5567,7 +5630,9 @@ gsd-core/workflows/transition.md kept 48+3 298a74dcaacd gsd-core/workflows/transition.md own 51+8 6 033a321634c2 749cbcbffa5b prose gsd-core/workflows/transition.md kept 59+12 a28bd3424eef gsd-core/workflows/transition.md own 71+2 2 a7598ac72e0b e1d7637d8d7e ported-name -gsd-core/workflows/transition.md kept 73+12 340ac0989859 +gsd-core/workflows/transition.md kept 73+5 6b9f1e172989 +gsd-core/workflows/transition.md own 78+0 4 e3b0c44298fc 6ce430b94eef review +gsd-core/workflows/transition.md kept 78+7 4f78ce4bf551 gsd-core/workflows/transition.md own 85+2 2 cad965ff78b0 6f77e48a811a ported-name gsd-core/workflows/transition.md kept 87+12 ab54947b5538 gsd-core/workflows/transition.md own 99+1 1 daf0ac84ae8f 3421abda3c90 ported-name @@ -5582,7 +5647,7 @@ gsd-core/workflows/transition.md own 182+1 1 28a1b00e0998 d85fea4dbad4 ported-na gsd-core/workflows/transition.md kept 183+8 18e9f6c56cf3 gsd-core/workflows/transition.md own 191+1 1 d00046cbee6c 8d7626df4814 ported-name gsd-core/workflows/transition.md kept 192+2 5f046190424d -gsd-core/workflows/transition.md own 194+11 6 178e79842087 69a1862b529e ported-name +gsd-core/workflows/transition.md own 194+11 9 178e79842087 7aa88f2f4d2f ported-name gsd-core/workflows/transition.md kept 205+12 dc0792316343 gsd-core/workflows/transition.md own 217+1 1 21ea5f27ed37 400a81bea7de prose gsd-core/workflows/transition.md kept 218+4 672576aa2a70 @@ -5614,7 +5679,7 @@ gsd-core/workflows/transition.md own 375+23 4 0d03b10b5fcd d092c0dcb992 prose gsd-core/workflows/transition.md kept 398+2 3c9313db96e6 gsd-core/workflows/transition.md own 400+24 3 2272581ebead 460935a9dd23 prose gsd-core/workflows/transition.md kept 424+7 deeaf281e5b6 -gsd-core/workflows/transition.md own 431+7 6 0b69cd7a4e77 ba9a969a95ed ported-name +gsd-core/workflows/transition.md own 431+7 6 0b69cd7a4e77 6f738da5909f ported-name gsd-core/workflows/transition.md kept 438+3 8ba5515d257c gsd-core/workflows/transition.md own 441+1 1 402b8d39e2d3 7b56679c20da ported-name gsd-core/workflows/transition.md kept 442+4 a24b7248acea @@ -5622,9 +5687,9 @@ gsd-core/workflows/transition.md own 446+1 1 9a1cb9b8e18c 7c787b5bfd7b ported-na gsd-core/workflows/transition.md kept 447+2 5f046190424d gsd-core/workflows/transition.md own 449+10 6 85f78642019c 6e9134327046 ported-name gsd-core/workflows/transition.md kept 459+11 6ae4cc96f047 -gsd-core/workflows/transition.md own 470+1 1 278308c84e2e f9399f02cd5b prose +gsd-core/workflows/transition.md own 470+1 2 278308c84e2e a43ae6972051 review gsd-core/workflows/transition.md kept 471+4 3b2d93888078 -gsd-core/workflows/transition.md own 475+1 2 5a67418606b7 a568f69e01c1 ported-name +gsd-core/workflows/transition.md own 475+1 3 5a67418606b7 8bde97e37c60 ported-name gsd-core/workflows/transition.md kept 476+16 063f75bf20b4 gsd-core/workflows/transition.md own 492+1 1 e0a84ae3b234 f9c7669b2116 args gsd-core/workflows/transition.md kept 493+11 745e356beba2 @@ -5662,14 +5727,16 @@ gsd-core/workflows/transition/steps/workstream-collision-check.md kept 1+10 515b gsd-core/workflows/transition/steps/workstream-collision-check.md own 11+1 1 59770c62dfce 84489c2691bf ported-name gsd-core/workflows/transition/steps/workstream-collision-check.md kept 12+7 c80960d6b87f gsd-core/workflows/ultraplan-phase.md kept 1+66 3ca0aa1e8dc2 -gsd-core/workflows/ultraplan-phase.md own 67+12 9 c23fd08a2db6 f9eea83ef067 ported-name +gsd-core/workflows/ultraplan-phase.md own 67+12 12 c23fd08a2db6 edd6fc1dd1da ported-name gsd-core/workflows/ultraplan-phase.md kept 79+4 a514e951f449 gsd-core/workflows/ultraplan-phase.md own 83+1 1 888b87cd4a11 a208f39ba6a2 ported-name -gsd-core/workflows/ultraplan-phase.md kept 84+48 aefebc132c42 +gsd-core/workflows/ultraplan-phase.md kept 84+9 b3891febf793 +gsd-core/workflows/ultraplan-phase.md own 93+1 1 eafa118e91e1 f26cc1b856ac review +gsd-core/workflows/ultraplan-phase.md kept 94+38 567afc75d710 gsd-core/workflows/ultraplan-phase.md own 132+1 1 ca67fd8d632a 81ac9fa2ead5 prose gsd-core/workflows/ultraplan-phase.md kept 133+45 030e044dace9 -gsd-core/workflows/ultraplan-phase.md own 178+1 1 d1ccc3c45c57 598ab4abb102 prose -gsd-core/workflows/ultraplan-phase.md kept 179+21 2b654729bff0 +gsd-core/workflows/ultraplan-phase.md own 178+3 3 08a685e2d5ae 69ac0aab4c2d prose +gsd-core/workflows/ultraplan-phase.md kept 181+19 ef02a93b1faa gsd-core/workflows/undo.md kept 1+11 2d5c99f3db14 gsd-core/workflows/undo.md own 12+2 2 ba492cb89236 de227a767a7b ported-name gsd-core/workflows/undo.md kept 14+16 295ec649401b @@ -5744,7 +5811,7 @@ gsd-core/workflows/validate-phase.md own 2+1 1 f92a7d57b260 5632eb554d58 prose gsd-core/workflows/validate-phase.md kept 3+16 e07e106b063f gsd-core/workflows/validate-phase.md own 19+11 7 a38c96847cb7 72c68c2acca7 ported-name gsd-core/workflows/validate-phase.md kept 30+4 b28fac2a3468 -gsd-core/workflows/validate-phase.md own 34+1 1 dd0387bea9e4 d77fa669d95a prose +gsd-core/workflows/validate-phase.md own 34+1 4 dd0387bea9e4 cc65fb646382 prose gsd-core/workflows/validate-phase.md kept 35+2 5f046190424d gsd-core/workflows/validate-phase.md own 37+2 2 21ac501f135f 372cbf6a4873 ported-name gsd-core/workflows/validate-phase.md kept 39+11 890156cb4d8e @@ -5765,7 +5832,9 @@ gsd-core/workflows/validate-phase.md kept 143+2 eee598b8f4e9 gsd-core/workflows/validate-phase.md own 145+1 1 0526c25c6c16 dc244ab5b033 prose gsd-core/workflows/validate-phase.md kept 146+3 8a2745df745d gsd-core/workflows/validate-phase.md own 149+1 1 addab178b75d ad674364e50f ported-name -gsd-core/workflows/validate-phase.md kept 150+7 ae245c3c23fe +gsd-core/workflows/validate-phase.md kept 150+1 b6978ffc1e5e +gsd-core/workflows/validate-phase.md own 151+1 1 8567b2798cdd 0fadbcedb3a7 review +gsd-core/workflows/validate-phase.md kept 152+5 384de3eeaa06 gsd-core/workflows/validate-phase.md own 157+5 5 b83f59372fe3 4a584b2a63ed ported-name gsd-core/workflows/validate-phase.md kept 162+8 4fff19b3eeb6 gsd-core/workflows/validate-phase.md own 170+1 1 e5d889e2ab75 eaf3074bcd6a args @@ -5777,7 +5846,7 @@ gsd-core/workflows/validate-phase.md kept 195+4 5ba473f640ba gsd-core/workflows/verify-work.md kept 1+8 7a474580d009 gsd-core/workflows/verify-work.md own 9+1 1 4c712f8249f0 0476151d60be prose gsd-core/workflows/verify-work.md kept 10+32 16cb499fc020 -gsd-core/workflows/verify-work.md own 42+16 9 2ee1f61e4143 2a6e4b82574c ported-name +gsd-core/workflows/verify-work.md own 42+16 13 2ee1f61e4143 ac15730275f0 ported-name gsd-core/workflows/verify-work.md kept 58+7 d31c7c934987 gsd-core/workflows/verify-work.md own 65+1 1 982b4b840871 05c0330f3d18 ported-name gsd-core/workflows/verify-work.md kept 66+10 1d9699f9db3a @@ -5831,13 +5900,13 @@ gsd-core/workflows/verify-work.md own 531+6 13 9796fddfae62 b41003264713 answer gsd-core/workflows/verify-work.md kept 537+2 0f74fe36ce84 gsd-core/workflows/verify-work.md own 539+1 1 26f2f8a25cf7 3dff81345865 prose gsd-core/workflows/verify-work.md kept 540+2 5f046190424d -gsd-core/workflows/verify-work.md own 542+6 13 819860422885 15738ed003e7 ported-name +gsd-core/workflows/verify-work.md own 542+6 13 819860422885 193dddc93fc1 ported-name gsd-core/workflows/verify-work.md kept 548+4 e174f3432d93 -gsd-core/workflows/verify-work.md own 552+4 4 1be593657b56 94bb8a8f7c54 prose +gsd-core/workflows/verify-work.md own 552+4 4 1be593657b56 fc36ee9b2619 prose gsd-core/workflows/verify-work.md kept 556+6 8edc848a277b gsd-core/workflows/verify-work.md own 562+15 11 94a7f7be94ba 5483854fe943 ported-name gsd-core/workflows/verify-work.md kept 577+1 ad332335cfaa -gsd-core/workflows/verify-work.md own 578+4 4 682f3eb6f9cf 166f89acaf4d ported-name +gsd-core/workflows/verify-work.md own 578+4 4 682f3eb6f9cf 65f4dd350955 ported-name gsd-core/workflows/verify-work.md kept 582+14 bfa04ced2ac4 gsd-core/workflows/verify-work.md own 596+1 1 82f2caae4e2b f8273c107857 prose gsd-core/workflows/verify-work.md kept 597+9 910bc31f7ca6 @@ -5876,7 +5945,9 @@ gsd-core/workflows/verify-work.md kept 734+20 9de91d63a53f gsd-core/workflows/verify-work.md own 754+1 1 4c7b8f2727c0 98fe1b4bbdeb ported-name gsd-core/workflows/verify-work.md kept 755+2 5f046190424d gsd-core/workflows/verify-work.md own 757+1 1 5cd2d458f836 8191e0369a85 ported-name -gsd-core/workflows/verify-work.md kept 758+19 931d3db93e52 +gsd-core/workflows/verify-work.md kept 758+9 bb4dd374bb3b +gsd-core/workflows/verify-work.md own 767+1 1 248db9641fd9 d5c5a0bae49e review +gsd-core/workflows/verify-work.md kept 768+9 e7c495306b77 gsd-core/workflows/verify-work.md own 777+1 1 585ff324b1ab d25dffb4f653 prose gsd-core/workflows/verify-work.md kept 778+6 689198e8c813 gsd-core/workflows/verify-work.md own 784+1 1 635c4d49a5db 7e546d8a69ee prose @@ -5890,7 +5961,9 @@ gsd-core/workflows/verify-work.md kept 815+3 111a24488523 gsd-core/workflows/verify-work.md own 818+1 1 4d9aae727500 d395184b110f relic gsd-core/workflows/verify-work.md kept 819+35 fb62a938a0d0 gsd-core/workflows/verify-work.md own 854+1 1 100142d583e1 b65b11d10768 served -gsd-core/workflows/verify-work.md kept 855+42 a03d238039a8 +gsd-core/workflows/verify-work.md kept 855+18 ab43b1837537 +gsd-core/workflows/verify-work.md own 873+1 1 dbc5f9cffdad b5748ce6a45c review +gsd-core/workflows/verify-work.md kept 874+23 768d8407a96f gsd-core/workflows/verify-work.md own 897+17 3 4db52c8f883b cc5252818c66 relic gsd-core/workflows/verify-work.md kept 914+18 16654ff78efd gsd-core/workflows/verify-work.md own 932+1 1 aa6862e5c0d9 5dcaad6969d3 prose diff --git a/gsd/core/tests/ported_labels.rs b/gsd/core/tests/ported_labels.rs new file mode 100644 index 0000000000..2893e2fd4b --- /dev/null +++ b/gsd/core/tests/ported_labels.rs @@ -0,0 +1,301 @@ +//! The phase labels the lifecycle prompts print: where each prompt reads a phase's number and name, and every +//! placeholder a label holds is defined in the asset that prints it. + +use std::collections::BTreeSet; +use std::path::Path; + +use gsd_core::prompts::{asset, render_text}; +use regex::Regex; + +#[path = "common/files.rs"] +mod files; +#[path = "common/prompt_combos.rs"] +mod prompt_combos; + +use prompt_combos::prompts; + +/// A phase label as an asset prints it: `Phase` in any case, not after a word character, a `$` or a `-` (so neither a +/// command such as `/gsd:plan-phase {X}` nor a branch template), then a `{placeholder}` (`{Z+1}` reads as `{Z}`), an +/// optional `/{total}`, and a second placeholder after `:`, `—`, `–`, `(` or `⏭`. A `${VARIABLE}` is the shell's: the +/// asset's own code sets it, so it is not read here. +const LABEL: &str = + r"(?im)(?:^|[^\w$-])phase \{(\w+)(?:\+1)?\}(?:/\{\w+\})?(?:\s*(?::|—|–|\(|⏭)\s*\{(\w+)\})?"; + +/// A phase label that prints a name, in braces or brackets: `Phase {X}: {Name}`, `Phase [X+1] — [Name]`, `Phase {X}: +/// {Phase Name}`, `Phase {N} — "{name}"`. The name placeholder may hold spaces. +const NAMED_LABEL: &str = concat!( + r"(?im)(?:^|[^\w$-])phase [\[{]\w+(?:\+1)?[\]}](?:(?:/| of )[\[{]\w+[\]}])?", + r#"\s*(?::|—|–|-|\(|⏭)\s*"?[\[{]([\w ]+)[\]}]"# +); + +/// A definition: backticked names joined by `, ` or ` and `, then `is` or `are`, wrapped or not (`` `{X}` is ``, +/// `` `{X}`, `{N}` and `PHASE` are ``). +const DEFINITION: &str = r"(?:`[^`\n]+`(?:,\s+|\s+and\s+))*`[^`\n]+`\s+(?:is|are)\b"; + +/// A definition that says a name is the phase's title: `` `{Name}` is its `title` ``, `` `[Name]` is the next phase's +/// `title` ``. +const TITLED: &str = concat!( + r"(?:`[^`\n]+`(?:,\s+|\s+and\s+))*`[^`\n]+`", + r"\s+(?:is|are)\s+(?:its|the(?:\s+\w+)?\s+phase's)\s+`title`" +); + +/// The placeholders each label of `text` holds, as `(line, name)`. +fn labels(text: &str) -> Vec<(usize, String)> { + let label = Regex::new(LABEL).expect("the label pattern"); + text.lines() + .enumerate() + .flat_map(|(n, line)| { + label + .captures_iter(line) + .flat_map(|c| [c.get(1), c.get(2)]) + .flatten() + .map(|m| (n + 1, m.as_str().to_string())) + .collect::<Vec<_>>() + }) + .collect() +} + +/// The name each label of `text` that prints one holds, as `(line, name)`. +fn named_labels(text: &str) -> Vec<(usize, String)> { + let label = Regex::new(NAMED_LABEL).expect("the named label pattern"); + text.lines() + .enumerate() + .flat_map(|(n, line)| { + label + .captures_iter(line) + .map(|c| (n + 1, c[1].to_string())) + .collect::<Vec<_>>() + }) + .collect() +} + +/// The names `text` defines: each backticked name of a definition, its braces and `$` dropped. +fn defined(text: &str) -> BTreeSet<String> { + names_of(DEFINITION, text) +} + +/// The names `text` defines as the phase's `title`, their braces or brackets dropped. +fn titled(text: &str) -> BTreeSet<String> { + names_of(TITLED, text) +} + +/// Each backticked name of a match of `pattern` in `text` but `title`, its braces, brackets and `$` dropped. +fn names_of(pattern: &str, text: &str) -> BTreeSet<String> { + let definition = Regex::new(pattern).expect("a definition pattern"); + let name = Regex::new(r"`([^`\n]+)`").expect("a name pattern"); + definition + .find_iter(text) + .flat_map(|d| name.captures_iter(d.as_str()).map(|c| c[1].to_string())) + .filter(|n| n != "title") + .map(|n| { + n.trim_start_matches('$') + .trim_matches(['{', '}', '[', ']']) + .to_string() + }) + .collect() +} + +/// Every asset of `@gsd/core` and `@gsd/security` as `(tree, path in it, text)`. +fn assets() -> Vec<(String, String, String)> { + let root = Path::new(env!("CARGO_MANIFEST_DIR")); + let mut all = Vec::new(); + for tree in [root.join("assets"), root.join("../security/assets")] { + for path in files::under(&tree) { + if path.extension().is_some_and(|ext| ext == "md") { + let text = std::fs::read_to_string(&path) + .unwrap_or_else(|e| panic!("{}: {e}", path.display())); + let rel = path.strip_prefix(&tree).expect("under its tree"); + all.push((tree.display().to_string(), rel.display().to_string(), text)); + } + } + } + all +} + +#[test] +fn a_label_and_a_definition_read_as_written() { + let names = |text: &str| -> Vec<String> { labels(text).into_iter().map(|(_, n)| n).collect() }; + assert_eq!(names("**Phase {X}: {Name}** — {N} plan(s)"), ["X", "Name"]); + assert_eq!( + names("GSD ► AUTONOMOUS ▸ Phase {N}/{T}: {Name}"), + ["N", "Name"] + ); + assert_eq!( + names("## ✓ Phase {Z} Complete, then Phase {Z+1}"), + ["Z", "Z"] + ); + assert_eq!(names("Log \"Phase {N} ⏭ {Name} — Skipped\""), ["N", "Name"]); + assert_eq!(names("PLANNING PHASE {phase_number}"), ["phase_number"]); + for none in [ + "/gsd:plan-phase {X}", + "gsd/phase-{phase}-{slug}", + "Phase ${PHASE}: ${PHASE_NAME}", + ] { + assert!(names(none).is_empty(), "{none}"); + } + let said = "`{X}`, `{phase_number}` and `{PHASE_NUMBER}` are the phase's number, and `{Name}` is its name"; + assert_eq!( + defined(said), + BTreeSet::from(["X", "phase_number", "PHASE_NUMBER", "Name"].map(String::from)) + ); + assert!( + defined("and `{Name}`\nis its `title`").contains("Name"), + "a wrapped one" + ); + assert!(defined("the `{X}` placeholder").is_empty()); + let named = + |text: &str| -> Vec<String> { named_labels(text).into_iter().map(|(_, n)| n).collect() }; + assert_eq!(named("**Phase [X+1]: [Name]** — [Goal]"), ["Name"]); + assert_eq!(named("Next: Phase [X+1] — [Name]"), ["Name"]); + assert_eq!( + named("## ✓ Phase {X}: {Phase Name} Complete"), + ["Phase Name"] + ); + assert_eq!( + named("Phase {N} — \"{name}\" has unresolved items"), + ["name"] + ); + assert!(named("Phase [X] marked complete").is_empty()); + assert_eq!( + titled("`{Name}`\nis its `title`, and `[Name]` is the next phase's `title`"), + BTreeSet::from(["Name".to_string()]) + ); + assert!(titled("`{name}` is the phase's slug read as words").is_empty()); +} + +/// `progress-report`'s phase `name` is the phase's slug read as words (ADR 0387 D2): it is GSD's directory name, kept +/// for the parity of `progress json`. An asset that reads the report and prints a phase label with a name says the +/// name is the phase's `title`, read from its node, and never cites `phases[].name`; a step or template under a +/// workflow's folder also reads its workflow's. +#[test] +fn a_label_reads_its_name_from_the_phase_title_not_the_report() { + let all = assets(); + let text_of = |tree: &str, path: &str| { + all.iter() + .find(|(t, p, _)| t == tree && p == path) + .map(|(_, _, text)| text.as_str()) + }; + let (mut reading, mut wrong) = (0, Vec::new()); + for (tree, path, text) in &all { + let parts: Vec<&str> = path.split('/').collect(); + let parent = (parts.len() > 3 && parts[..2] == ["gsd-core", "workflows"]) + .then(|| text_of(tree, &format!("gsd-core/workflows/{}.md", parts[2]))) + .flatten() + .unwrap_or_default(); + if !text.contains("progress-report") && !parent.contains("progress-report") { + continue; + } + reading += 1; + if text.contains("phases[].name") { + wrong.push(format!( + "{path}: cites `phases[].name`, the slug read as words" + )); + } + let mut known = titled(text); + known.extend(titled(parent)); + for (line, name) in named_labels(text) { + if !known.contains(&name) { + wrong.push(format!( + "{path}:{line}: {name} is not said to be the phase's `title`" + )); + } + } + } + assert!(reading >= 20, "{reading} assets read progress-report"); + assert!( + wrong.is_empty(), + "a label's name read from the report:\n{}", + wrong.join("\n") + ); +} + +/// Every placeholder a phase label holds is defined in the asset that prints it, by a sentence that says what it is +/// (`` `{X}` is the phase's number, the last segment of its `id` ``); a step, mode or template file under a workflow's +/// folder also reads its workflow's. A label with an undefined placeholder leaves the agent to guess a number of +/// another numbering, or a name no step set. +#[test] +fn every_phase_label_defines_its_placeholders() { + let all = assets(); + let text_of = |tree: &str, path: &str| { + all.iter() + .find(|(t, p, _)| t == tree && p == path) + .map(|(_, _, text)| text.as_str()) + }; + let (mut printing, mut seen, mut undefined) = (0, 0, Vec::new()); + for (tree, path, text) in &all { + let found = labels(text); + if found.is_empty() { + continue; + } + printing += 1; + seen += found.len(); + let mut known = defined(text); + // gsd-core/workflows/<workflow>/... reads gsd-core/workflows/<workflow>.md + let parts: Vec<&str> = path.split('/').collect(); + if parts.len() > 3 && parts[..2] == ["gsd-core", "workflows"] { + let parent = format!("gsd-core/workflows/{}.md", parts[2]); + known.extend(text_of(tree, &parent).map(defined).unwrap_or_default()); + } + for (line, name) in found { + if !known.contains(&name) { + undefined.push(format!("{path}:{line}: {{{name}}}")); + } + } + } + assert!( + printing >= 35 && seen >= 150, + "{printing} assets, {seen} placeholders" + ); + assert!( + undefined.is_empty(), + "undefined in a phase label:\n{}", + undefined.join("\n") + ); +} + +/// A phase's label is `Phase <its id's last segment>: <its title>` (ADR 0387): plan-phase's step 3 and autonomous's +/// phase details say which part of the node each value is (a node holds no `phase_number` key), `{X}` is defined, and +/// plan-phase's own body prints no `{Name}` that no step sets. +#[test] +fn the_phase_label_is_read_from_the_id_and_the_title() { + let all = prompts(); + let rendered = |command: &str| { + let (_, combos) = all.iter().find(|(c, _)| c == command).expect("the prompt"); + render_text(command, "claude-code", &combos[0].0, &combos[0].1).expect("a render") + }; + // a sentence wrapped over lines reads as one + let one_line = |text: &str| text.split_whitespace().collect::<Vec<_>>().join(" "); + let plan = rendered("plan-phase"); + let (_, step) = plan.split_once("## 3. Validate Phase").expect("step 3"); + let step = one_line(step.split_once("\n## ").expect("step 4").0); + let step = step.as_str(); + let autonomous = one_line(&rendered("autonomous")); + for (text, said) in [ + (step, "`phase_number` is the last segment of its `id`"), + (step, "`phase_name` is its `title`"), + (step, "`{X}` is `phase_number`"), + ( + step, + "a phase's label reads \"Phase {phase_number}: {phase_name}\"", + ), + (&autonomous, "`PHASE_NAME` (`phase_name`) is its `title`"), + (&autonomous, "`PHASE_NUM` is the last segment of its `id`"), + ( + &autonomous, + "a phase's label reads \"Phase ${PHASE_NUM}: ${PHASE_NAME}\"", + ), + ] { + assert!(text.contains(said), "{said:?} is not said"); + } + let own = asset("gsd-core/workflows/plan-phase.md").expect("an asset"); + assert!(!own.contains("{Name}"), "plan-phase prints a `{{Name}}`"); + let named: Vec<String> = assets() + .into_iter() + .filter(|(_, _, text)| text.contains(".fields.name")) + .map(|(_, path, _)| path) + .collect(); + assert!( + named.is_empty(), + "no phase or milestone has a name field: {named:?}" + ); +} diff --git a/gsd/core/tests/ported_text.rs b/gsd/core/tests/ported_text.rs index 3f6f16db7a..dbe7d02c35 100644 --- a/gsd/core/tests/ported_text.rs +++ b/gsd/core/tests/ported_text.rs @@ -5,7 +5,7 @@ use std::collections::BTreeSet; use std::path::Path; use gsd_core::prompts::{asset, asset_paths, render_text, repoint, without_notice}; -use gsd_kit::prompt::args::Values; +use prompt_combos::prompts; use regex::Regex; use roster::ROSTER; @@ -19,6 +19,8 @@ mod command_word; mod files; #[path = "common/ledger.rs"] mod ledger; +#[path = "common/prompt_combos.rs"] +mod prompt_combos; #[path = "common/roster.rs"] mod roster; #[path = "common/specforge_only.rs"] @@ -54,61 +56,6 @@ const NOT_COMMANDS: &[&str] = &[ /// Files of upstream's tree that no ticket of r34-r44 ports: a rendered text names them as "not part of @gsd/core". const NOT_PORTED: &[&str] = &["gsd-core/workflows/node-repair.md"]; -/// One render's input: the argument text and every declared name with its placeholder value (`args::values`). -type Combo = (String, Values); - -/// Every prompt as `(command stem, combinations)`: none, every flag, every enum value, text and integer options. -fn prompts() -> Vec<(String, Vec<Combo>)> { - let declaration = gsd_core::build().declaration(); - declaration - .surfaces - .prompts - .iter() - .map(|p| { - // `(name, words, value)` of each given argument - let combo = |given: &[(String, String, String)]| -> Combo { - let words: Vec<&str> = given.iter().map(|(_, w, _)| w.as_str()).collect(); - let values = p - .args - .iter() - .map(|a| { - let value = given.iter().find(|(n, _, _)| *n == a.name); - (a.name.clone(), value.map(|(_, _, v)| v.clone())) - }) - .collect(); - (words.join(" "), values) - }; - let mut base = Vec::new(); - for a in p.args.iter().filter(|a| a.required) { - base.push((a.name.clone(), "03".to_string(), "03".to_string())); - } - let mut texts = vec![combo(&base)]; - let mut flags = base.clone(); - for a in &p.args { - let option = format!("--{}", a.name.replace('_', "-")); - let name = a.name.clone(); - match a.field_type.as_str() { - "bool" => flags.push((name, option, "true".to_string())), - "integer" => flags.push((name, format!("{option} 2"), "2".to_string())), - "string" => { - flags.push((name, format!("{option} \"text\""), "text".to_string())) - } - "enum" => { - for value in &a.enum_values { - let mut one = base.clone(); - one.push((name.clone(), format!("{option} {value}"), value.clone())); - texts.push(combo(&one)); - } - } - _ => {} - } - } - texts.push(combo(&flags)); - (p.id.replace('_', "-"), texts) - }) - .collect() -} - /// `(command, host, arguments, text)` for the whole sweep. fn sweep() -> Vec<(String, &'static str, String, String)> { let mut all = Vec::new(); diff --git a/gsd/core/tests/projects/discuss/spec/v1.0.spec b/gsd/core/tests/projects/discuss/spec/v1.0.spec index c471c26470..ec5986a009 100644 --- a/gsd/core/tests/projects/discuss/spec/v1.0.spec +++ b/gsd/core/tests/projects/discuss/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 01.1 "Hotfix" { milestone v1.0 - name "Hotfix" slug "hotfix" goal "Titles survive a reload" depends_on [01] @@ -22,7 +19,6 @@ phase 01.1 "Hotfix" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks survive a restart" depends_on [01] diff --git a/gsd/core/tests/projects/execute/spec/v1.0.spec b/gsd/core/tests/projects/execute/spec/v1.0.spec index b130c4fa88..dc4916b2a7 100644 --- a/gsd/core/tests/projects/execute/spec/v1.0.spec +++ b/gsd/core/tests/projects/execute/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and loaded on start" depends_on [01] diff --git a/gsd/core/tests/projects/gate_cutover/spec/v1.0.spec b/gsd/core/tests/projects/gate_cutover/spec/v1.0.spec index 4cb912cc48..5634f24d87 100644 --- a/gsd/core/tests/projects/gate_cutover/spec/v1.0.spec +++ b/gsd/core/tests/projects/gate_cutover/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Gate cutover 1.0" { - name "Gate cutover 1.0" } phase 01 "Decisions" { milestone v1.0 - name "Decisions" slug "decisions" goal "Decisions are cited by plans" requirements [REQ-00] @@ -13,7 +11,6 @@ phase 01 "Decisions" { phase 02 "Verify" { milestone v1.0 - name "Verify" slug "verify" goal "Verify commands run in directories that exist" depends_on [01] @@ -23,7 +20,6 @@ phase 02 "Verify" { phase 03 "Clean" { milestone v1.0 - name "Clean" slug "clean" goal "A clean verify phase" depends_on [02] @@ -33,7 +29,6 @@ phase 03 "Clean" { phase 04 "Gap" { milestone v1.0 - name "Gap" slug "gap" goal "Users can sign in and out" depends_on [03] diff --git a/gsd/core/tests/projects/plan/spec/v1.0.spec b/gsd/core/tests/projects/plan/spec/v1.0.spec index b130c4fa88..dc4916b2a7 100644 --- a/gsd/core/tests/projects/plan/spec/v1.0.spec +++ b/gsd/core/tests/projects/plan/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and loaded on start" depends_on [01] diff --git a/gsd/core/tests/projects/real-size/spec/decisions-1.spec b/gsd/core/tests/projects/real-size/spec/decisions-1.spec new file mode 100644 index 0000000000..3991b9cd84 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/decisions-1.spec @@ -0,0 +1,702 @@ +decision D-096 "Tree-sitter for Parsing" { + settled true + origin project + text """ + Use Tree-sitter for the .spec grammar. It provides error recovery, + incremental parsing, and a mature ecosystem with editor integrations. + No hand-written recursive descent fallback. + """ +} + +decision D-002 "Multi-Error Collection" { + settled true + origin project + text """ + The compiler collects all errors, warnings, and info diagnostics during + a compilation pass and emits them together. No fail-fast behavior. + Diagnostics are sorted by (file_path, line, column, code) — source + order within each file, not grouped by severity. This matches the + rustc convention where developers see diagnostics in the order they + appear in the source. + """ +} + +decision D-093 "String Interning with lasso" { + settled true + origin project + text """ + Use the lasso crate for string interning. Intern all entity IDs, file + paths, and frequently compared strings. Use interned keys for all + comparison and hashing operations. + """ +} + +decision D-027 "Mutable In-Memory Graph" { + settled true + origin project + text """ + The in-memory graph is mutable. It supports adding/removing nodes and + edges. Incremental compilation mutates the graph in place, removing + stale entries and inserting new ones from re-parsed files. + """ +} + +decision D-091 "Snapshot Testing with insta" { + settled true + origin project + text """ + Use the insta crate for snapshot testing. Diagnostic output and rendered + markdown are tested via inline and file-based + snapshots. cargo insta review for interactive approval. + """ +} + +decision D-095 "Three-Layer Traceability Model" { + settled true + origin project + text """ + Three-layer traceability: intent (verify declarations and extension-declared test file fields in .spec + files), linkage (each test names the entity it proves, in its runner's + idiom), and proof (the pass/fail results `specforge collect` records in + specforge-report.json). `specforge analyze coverage` scores all three + layers. (Linkage was first a `tests` field in .spec files; ADR 0002 + moved it into the tests themselves.) + """ +} + +decision D-098 "Wasm Component Model Extension Runtime" { + settled true + origin project + text """ + Use WebAssembly components (wasmtime Component Model, wasip2 guests) + as the unified extension runtime for all contribution types. The + guest contract is the specforge:bridge WIT world: one `call` export + dispatching the JSON wire protocol by host-function name. + Extensions expose host functions (specforge.query_graph, + specforge.emit_diagnostic) — components never touch the OS directly + beyond their WASI grants. + Renderers use specforge.emit_file(path, content) instead of raw + filesystem access, with the host validating paths and enforcing + sandboxing. Providers use specforge.http_get for external + service validation. Universal .wasm components are distributed via npm, + GitHub Releases, or OCI registries. Wasmtime's on-disk compile cache + makes CLI cold starts cheap; LSP and MCP keep one engine with + instantiated components alive per session. + """ +} + +decision D-014 "Extension Peer Dependencies" { + settled true + origin project + text """ + Wasm extension manifests declare peer_dependencies with semver ranges. The + registry build judges every peer dependency by one rule and loads each + extension after the peers it declares, otherwise in specforge.json order + (ADR 0041). All extensions share the same in-process graph via + specforge.query_graph host function — no serialization between extensions. + When a manifest declares a peer dependency that is not installed, the + host emits a hard error. The existing I004 soft resolution remains for + implicit cross-module references (fields without a manifest declaration). + """ +} + +decision D-006 "Config-Driven Kind Registry" { + settled true + origin project + text """ + Entity kind names are unique across the loaded extensions: the + registry build rejects any extension's kind already registered by a + previously loaded extension, emitting E026, and the first registration + wins. Entity ids that collide with the grammar's structural keywords + or an extension's kind keyword are E013. Conflict resolution is the + extension author's responsibility — rename the kind or declare a peer + dependency. The compiler never arbitrates domain-level conflicts; + if two installed extensions declare the same kind, it is a hard error + at startup, not a runtime policy decision. + """ +} + +decision D-011 "Entity Enhancement Model" { + settled true + origin project + text """ + Extension manifests declare entity enhancements with target entity kind, + field name, field type, and optional edge mappings. The compiler builds + a FieldRegistry combining extension-defined and enhanced fields, threads + it through the resolve/graph-build/validate pipeline. An enhancement + never overwrites a field the kind already has: the first registration + in load order wins. specforge doctor provides visibility into all + enhancements. + """ +} + +decision D-097 "Wasm Compile Cache Strategy" { + settled true + origin project + text """ + Use wasmtime's native on-disk compilation cache, configured when the + engine is constructed (CacheConfig on Config::cache — after Engine + creation the setting is inert, so the constructor is the only wiring + point). The cache directory is selected by SPECFORGE_WASMTIME_CACHE + (default $HOME/.cache/specforge/wasmtime; 'off' disables) with a + 500MB files-total-size soft limit. Entries are keyed by component + bytes and engine config; integrity and cleanup are engine-owned. + Host-side concerns stay separate: installed-binary integrity is the + specforge.lock hash pin (E070) at load time. + """ +} + +decision D-007 "Contribution-Based Extension Model" { + settled true + origin project + text """ + Structured manifest with typed objects: entity_kinds EntityKindDescriptor[], + validation_rules ValidationRulePattern[], edge_types EdgeTypeDescriptor[]. + Each extension declares a contributes key listing what it provides: + entities, validators, renderers, providers, parsers. The compiler routes to + namespaced Wasm exports based on contributions. Per-call-site host + function permissions enforce least-privilege for each export. + """ +} + +decision D-001 "Extension Source Resolution" { + settled true + origin project + text """ + Three extension source types: registry (@scope/name@version for npm), + local (./path for filesystem), and git (git:url#ref for repositories). + The specifier format supports both string shorthand ("@specforge/product@^1.0") + and object form ({ source: "local", path: "./my-extension" }) in + specforge.json. Resolution produces a manifest + .wasm binary pair. + """ +} + +decision D-015 "Extension Version Pinning" { + settled true + origin project + text """ + specforge.lock pins exact resolved versions with SHA256 wasm_hash for + each installed extension. The lock file format is deterministic — same + inputs always produce byte-identical output. Integrity verification + compares .wasm binary hashes against lock entries. specforge update + explicitly bumps versions and refreshes the lock file. + """ +} + +decision D-092 "SpecForge is a Specification Language" { + settled true + origin project + text """ + SpecForge is a specification language that provides structured context + for AI agents and humans to do their jobs better. SpecForge is + domain-agnostic — it serves coding agents, compliance agents, PM agents, + and any domain that benefits from validated entity graphs. The `verify` + keyword declares test intent inside testable entity blocks. The renderer + contribution type in Wasm extensions produces non-code outputs only + (reports, dashboards, traceability matrices). The `collect` command and + all spec validation/coverage features provide test traceability. + """ +} + +decision D-100 "Zero-Entity Core Architecture" { + settled true + origin project + text """ + The SpecForge compiler core has ZERO built-in entity types. All domain + vocabulary comes from installable extensions. The core is a pure typed-graph + engine: it parses any keyword-name-body block via the generic_entity_block + grammar rule, resolves references, builds graphs, and validates constraints. + Extensions declare entity_kinds, edge_types, validation_rules, and testability + flags in their manifest. @specforge/software provides 6 entity kinds + (behavior, invariant, feature, event, type, port), + @specforge/product provides 5, @specforge/governance provides 3 — together + reproducing all 14 domain entity kinds (6+5+3). ref remains a core + structural keyword with a dedicated grammar rule. New domain + extensions: @specforge/atomic-design, @specforge/compliance, @specforge/api-design, + etc. This is the Terraform-exact model: core has zero domain knowledge. + """ +} + +decision D-088 "Per-Call-Site Sandbox" { + settled true + origin project + text """ + Host function permissions are enforced per export call site, not per + extension. Each contribution type has a fixed permission set: validators + get query_graph + emit_diagnostic, renderers additionally get emit_file, + providers additionally get http_get, parsers get read_file + + emit_diagnostic + add_graph_node + add_graph_edge (but NOT query_graph, + since they run during graph construction). The runtime checks the current + export context before dispatching host function calls. + """ +} + +decision D-004 "Auth Failure vs Offline Fallback" { + settled true + origin project + text """ + Authentication failures (HTTP 401/403) MUST NOT fall back to cached + binaries. Only network-level failures (DNS, TCP, TLS errors) trigger + the offline cache fallback path. When a registry returns 401 or 403, + the system MUST emit an E-level diagnostic identifying the registry + and extension, and MUST NOT load the extension from cache. This treats + auth rejection as an explicit server decision that the client must + respect, even when a cached copy exists locally. + """ +} + +decision D-022 "Gherkin as Extension-Declared Field" { + settled true + origin project + text """ + gherkin is removed from the core grammar. It becomes a regular + extension-declared field: @specforge/software declares a gherkin field + with type string_list and file_reference=true on entity kinds that + support BDD traceability. The supportsGherkin manifest flag is removed. + The GherkinList AST type is removed — gherkin fields are parsed as + standard StringList values. File existence was validated by + validate_file_reference_paths on any field with file_reference=true; + that behavior and file_reference are gone, and a field now declares + the @specforge/checks:file check instead (ck_files_family, ADR 0336), + which reports E016. verify REMAINS as a + core grammar construct — it is a domain-agnostic traceability primitive. + """ +} + +decision D-005 "Builtin Vocabulary, Generated Beside the Builtins" { + settled true + origin project + text """ + The candidate vocabulary of the builtins (each kind keyword with every + builtin that declares it, and each enhancement field with its one + declaring extension) is generated by revendor from + their pinned declarations, embedded by specforge-component, and handed to + the registry build by the session. E024, W151 and W020 (and the reference + I004 after plan 06) read it for their suggestion only. It decides no check's + diagnostic and no ownership (ADR 0096): the compiler does not use it to + validate, resolve, or register entity kinds. Beside the suggestions it decides + one thing: whether a kind that an extension's route, context section, judged + chain or facts input reaches is an unloaded optional peer's, which makes that + part inert instead of E118, W112 or W021 (ADR 0331 D7, ADR 0369 D2). The + vocabulary is a convenience layer for P8 compliance, not a domain + knowledge backdoor (ADR 0122). + """ +} + +decision D-017 "Finite Validation Pattern Kinds" { + settled true + origin project + text """ + The declarative validation pattern kinds are graph-structural primitives + that operate on the generic entity graph. They are finite because they + correspond to fundamental graph operations (node degree, field presence, + cycle detection, file existence). For validation logic that cannot be + expressed as a declarative pattern, extensions MAY export Wasm validator + functions using the emit_diagnostic host function. This is the explicit + escape hatch. The pattern kind set MAY grow when new graph-structural + primitives are identified, but MUST NOT grow to accommodate domain-specific + checks — those belong in Wasm validators. + """ +} + +decision D-026 "Multi-Event Consumption Pattern" { + settled true + origin project + text """ + Behaviors that act as barrier-joins (waiting for multiple prerequisite + events) are preferred over splitting into single-event consumers when + the behavior's contract is semantically indivisible. The consumes list + on a behavior declares a join barrier: ALL listed events MUST fire + before the behavior executes. This is documented in each behavior's + contract with an explicit barrier comment. Splitting would force + intermediate state management and partial execution, which is more + error-prone than a clean barrier-join. + """ +} + +decision D-013 "Extension File Parsers" { + settled true + origin project + text """ + A new contribution type "parser" allows extensions to read and parse + domain-specific files referenced by file-reference fields, injecting + structured data back into the graph. Parser contributions declare which + file patterns they handle (e.g., *.feature, *.proto, *.yaml). When the + compiler encounters a file-reference field matching a registered pattern, + it dispatches to the owning extension's parser export. + + Parser host function permissions (per-call-site, extending ADR + per_call_site_sandbox): read_file (scoped to spec root, read-only, + restricted to patterns declared in manifest), emit_diagnostic, + add_graph_node, add_graph_edge. Parsers do NOT get query_graph, + emit_file, or http_get. + + query_graph is excluded because: (1) parsers extract and inject + content — consistency checking is the validator's job (validators + CAN query_graph); (2) other parsers may not have run yet, so + query results are incomplete and ordering-dependent; (3) edges + to not-yet-existing targets are valid — validation catches + dangling edges after all parsers complete; (4) granting + query_graph would blur the parser/validator boundary, encouraging + parsers to embed domain-specific validation logic. + + The read_file host function enforces: path must be under spec root, + path must match the parser's declared file patterns, read-only access + only, maximum file size enforced by SandboxPolicy (default 1MB). + + Compilation pipeline placement: parsers run AFTER initial .spec parsing + and reference resolution, but BEFORE validation. This lets parsed + content participate in the full validation pass. + """ +} + +decision D-090 "Progressive Design-by-Contract Adoption" { + settled true + origin project + text """ + Apply DbC progressively: start with 8 critical-path behaviors identified + by the spec audit, then expand in subsequent audit cycles. Priority + criteria: (1) behaviors that gate pipeline phase transitions, (2) behaviors + with complex pre-conditions that are easy to violate, (3) behaviors + referenced by multiple invariants. Each audit cycle identifies the next + batch of behaviors for DbC application based on these criteria. + """ +} + +decision D-025 "Migration as Core Infrastructure" { + settled true + origin project + text """ + Migration is core infrastructure, not domain knowledge. It operates on + .spec file syntax structure (indentation, field ordering, block layout) + before extensions are loaded. Migration transforms are purely syntactic — + they do not inspect entity kinds, field semantics, or domain vocabulary. + Extension-specific migration is delegated to extension authors via Wasm + migration hooks (ExtensionDeclaration.migration_hook). + + This parallels the formatting precedent: core owns generic CST-level + operations; extensions contribute domain-specific behavior via hooks. + The P7 test — "does this require a compiler change when a new domain + appears?" — is satisfied: adding @specforge/compliance requires zero + changes to the migration engine. + + Migration types (FormatVersion, MigrationResult, MigrationBackup, + MigrationSummary) are extracted to types/migration.spec to keep + types/core.spec focused on fundamental compiler data shapes. + + See also: zero_entity_core_architecture ADR, formatting P7 justification + in features/formatting.spec. + """ +} + +decision D-008 "Diagnostic Code I016 Allocation" { + settled true + origin project + text """ + Reallocate core schema-cache-not-found to I016 (first reserved slot). Follows non-contiguous pattern established by Wasm I013 and Migration W053. + """ +} + +decision D-024 "Graph Protocol Version Management" { + settled true + origin project + text """ + Schema version is derived automatically from registry state, against + the schema the last export recorded. Major = something a reader of the + recorded schema relies on was removed or reshaped; minor = something + was added; patch = documentation or provenance changed (ADR 0067). + First export without a cache = version 1.0.0. A requested version is + admitted when its readers read the current schema (same major, not + newer); there is no configured supported range. + """ +} + +decision D-003 "Surface Contribution Model" { + settled true + origin project + text """ + Extensions declare surface contributions in their manifest's surfaces + field with three contribution types: commands[] (CLI), mcp_tools[] + (MCP tools), mcp_resources[] (MCP resources). The compiler discovers + contributions from manifests at startup (manifest-driven, no code + execution). Wasm modules are loaded lazily on first invocation. + + Naming conventions: CLI exports use cmd__{id}, MCP exports use + mcp__{name}. CLI commands are auto-promoted to MCP tools with the + specforge.{ext_short}.{cmd_id} naming convention, giving agents + automatic access to all extension CLI commands. + + Every surface export runs with no capability; a per-contribution + sandbox override was dropped (ADR 0037): with nothing granted it had + nothing to restrict. + + Phase 1 covers CLI commands, MCP tools, and MCP resources. LSP + providers are deferred to Phase 2. + + P7 compliance: Surface contribution dispatch (register, validate, dispatch + behaviors) is core infrastructure, not domain logic. This parallels + call_extension_exports, the generic mechanism by which the core calls + extension-provided Wasm exports without inspecting content. The content of each surface contribution is extension-defined; + the dispatch mechanism is structural plumbing. Extracting dispatch into + a separate extension would create a bootstrap paradox: the dispatch + extension would need to be loaded before any other extension could + register surfaces. Per the Terraform analogy: Terraform's provider + loading is core, not a provider itself. + """ +} + +decision D-099 "All Extensions Execute as wasip2 Components" { + settled true + origin project + text """ + Every extension - builtin or third-party - is a WIT-typed wasip2 + component executed through a single wasmtime component engine + (crates/runtime/component). The native tier is deleted; a gate test + prevents its reintroduction. The guest boundary is the + specforge:bridge world (call: name, export-name, input -> result). + Every call gets a deterministic fuel budget and a wall-clock + deadline, and every instance a memory limit (ADR 0037). + The committed blobs (specforge_component::committed: the builtins + under extensions/<name>/wasm/, embedded at compile time, the test + fixtures under fixtures/<name>/wasm/, and each example project's own + extension under examples/<name>/extension/wasm/) each carry an inputs.json + fingerprint of the sources they were built from; `cargo run -p xtask + --bin revendor` rebuilds and re-vendors every one of them + (wasm32-wasip2 target) in a staged workspace that holds each crate and + its path crates at their repo-relative paths, with the cargo home + remapped, so a blob's bytes depend only on its sources and the + toolchain, never on the checkout path. `build-blobs --check` fails + when a committed blob drifts from its sources, and `--verify` rebuilds + every blob and fails when one differs. + """ +} + +decision D-012 "A Project Example's Own Extension Is a Committed Blob" { + settled true + origin project + text """ + Each example project's own extension is listed in specforge_component::committed::EXAMPLES and vendored at examples/<name>/extension/wasm/ beside its inputs.json; the blob stage drops a staged crate's own [workspace] and [profile] tables; the gate expands prefix/*/rest patterns once, so the extension is rustfmt- and wasm-clippy-checked and fed to the builtins check. + """ +} + +decision D-094 "Tests Belong to @specforge/testing and One Extension per Runner" { + settled true + origin project + text """ + A runner-agnostic @specforge/testing builtin owns the test vocabulary: + testability of kinds and their verify kinds (contributed to other + extensions' kinds through enhancements), W004/W009, coverage, and the + normalized result format. One extension per test runner + (@specforge/cargo-test, @specforge/vitest first) declares a collector: + how to detect the runner, one command to run it, and a pure export that + maps its report to entity results. The compiler still never executes + anything; `specforge collect` runs a runner extension's declared + command after per-project consent. Tests link to entities by + annotation in the runner's own idiom; the spec-side `tests` field is + retired. + """ +} + +decision D-019 "Split Formal Analysis from Software Extension" { + settled true + origin project + text """ + Extract all formal analysis content from @specforge/software into a + new @specforge/formal extension. The formal extension operates through + entity_enhancements on @specforge/software entities for inline + condition blocks (requires/ensures/maintains). This follows the + "extensions over built-ins" principle (P5) and keeps the software + extension focused on core entity registration. Users opt into formal + analysis by installing @specforge/formal and setting warning_level=strict. + """ +} + +decision D-018 "Expand Formal Extension to 4 Entity Kinds" { + settled true + origin project + text """ + Expand @specforge/formal to 3 entity kinds: property, axiom, + protocol. All 3 are testable=false, supports_verify=false. + Add 3 new edge types: AssumedBy (invariant → axiom), Satisfies + (behavior → property), FollowsProtocol (event → protocol). + PropertyDependsOn (property → invariant) added for property-invariant + dependency tracking. + + Remove the arbitrary 20-entity budget cap. Quality and readability + over artificial limits. New entity total: 2 structural + 20 domain + = 22. + + Renumber formal diagnostic codes from W042-W044 to W058-W060 to + resolve collision with @specforge/product. New diagnostic range: + W058-W068 for the formal extension. + + Later (ADR 0040): the range was not kept. W059-W060 were removed + with the condition entity kind, W058 (feature coverage mismatch) + was trimmed for want of a sound algorithm, and W060-W062 are core + codes now. Formal's entity validation uses W123-W136. + """ +} + +decision D-020 "Add Refinement and Process Entity Kinds" { + settled true + origin project + text """ + Add refinement and process as entity kinds 4 and 5. Both testable=false, + supports_verify=false. 4 new edge types: RefinesTo, RefinementChainLink, + ParticipatesIn, ProcessComposition. 2 new error codes: E041 (refinement + chain cycle), E042 (process composition cycle). 6 new warnings: W069-W074, + since renumbered W131-W136 (refinement W131-W133, process W134-W136). + Entity enhancements: behavior gets refinement field, event gets process field. + Total: 5 entity kinds, 8 edge types, 23 project entities. + """ +} + +decision D-021 "Rename Formal Methods Terminology" { + settled true + origin project + text """ + Rename all formal methods vocabulary to accurately describe the + structural analysis being performed: + - "Design by Contract" -> "Structured Conditions" + - "B-Method Refinement" -> "Specification Layering" + - "CSP Event Flow Analysis" -> "Event Graph Linting" + - "Verification Obligations" -> "Coverage Tracking Items" + - "FormalityLevel" -> "SpecificationDepthLevel" + - "Deadlock detection" -> "Unmitigated cycle detection" + - "Livelock risk" -> "Unmitigated retry cycle" + - "Starvation risk" -> "Asymmetric connectivity warning" + - E033 downgraded to W058 (structural check, not semantic verification); + W058 was later trimmed (ADR 0040) + - E034 now checks for mitigations before firing; the mitigation is a + declared sync on a member of the cycle (ADR 0040) + """ +} + +decision D-010 "Drop-Based Test Guard" { + settled true + origin project + text """ + Use a Drop-based TestGuard. On creation, record entity ID and test name. + On drop, check std::thread::panicking() — false means pass, true means + fail, inverted under #[should_panic] (the attribute reads the + expectation). Write results to target/specforge/ via atexit handler. + """ +} + +decision D-009 "Double Underscore Entity Separator" { + settled true + origin project + text """ + Use double underscore (__) as the separator between entity ID and + description slug: {entity_id}__{description_slug}. Example: + validate_input__rejects_empty_name. The entity ID is everything + before the first __. + """ +} + +decision D-089 "Phased Rust Delivery" { + settled true + origin project + text """ + Three-phase delivery: Phase 1 ships test collection with + convention-based mapping (zero Rust dependencies). Phase 2 ships the + proc macro crate for explicit annotation. Phase 3 adds advanced + features (watch, LSP, suspect links). + """ +} + +decision D-056 "Nine Entity Kinds" { + settled true + origin project + text """ + Register 9 entity kinds: feature, journey, deliverable, milestone, module, + term, persona, channel, release. All have testable=false — they are planning + constructs tested indirectly through behavior chains from domain extensions. + Connected by 20 edge types forming a complete traceability graph from user + need to shipped artifact. Release was added in v1.1 to coordinate + multi-deliverable shipping with ReleaseIncludesDeliverable, + ReleaseCompletesMilestone and ReleaseDependsOn edges. + """ +} + +decision D-063 "Persona and Channel as First-Class Entities" { + settled true + origin project + text """ + Declare persona and channel as first-class entity kinds in + @specforge/product. Journeys reference them via JourneyTargetsPersona and + JourneyUsesChannel edges. Both are testable=false. Unreferenced detection + via I046 (persona) and I047 (channel) at info level to support + incremental adoption. + """ +} + +decision D-046 "Feature as Domain-Neutral Product Concept" { + settled true + origin project + text """ + Feature entities use domain-neutral problem/solution framing only. + No domain-specific fields in the base feature type. Domain extensions + reference features via their own fields and peer dependencies, creating + cross-extension edges. Product features work standalone. + """ +} + +decision D-030 "All Product Entities Non-Testable" { + settled true + origin project + text """ + All 9 product entity kinds declare testable=false in the manifest. + Product entities are tested indirectly through the behavior chains + from domain extensions that reference features. Direct testability + would create false obligations on + planning constructs that have no executable contract. + """ +} + +decision D-083 "TermReferencesRelatedTerm Edge Restricted to Term-to-Term" { + settled true + origin project + text """ + Only term-to-term references in see_also produce TermReferencesRelatedTerm edges. + Cross-kind references are rejected (E022): see_also accepts only terms. + Terms are navigation aids for + vocabulary consistency, not dependency-tracking nodes. Cross-kind + edges from terms would pollute dependency analysis, cycle detection, + and graph traversal with non-structural relationships. + """ +} + +decision D-028 "Acceptance Criteria as Free-Form Prose" { + settled true + origin project + text """ + The acceptance field on features is free-form string[] — each entry + is a prose acceptance criterion with no enforced structure. Machine + verification of feature completeness belongs to behavior verify + statements, not feature acceptance criteria. This preserves domain + neutrality: any domain can express acceptance in its own vocabulary. + """ +} + +decision D-048 "Interaction Model as Metadata" { + settled true + origin project + text """ + The interaction_model field is metadata for tooling and AI agents, not + a flow-step validation constraint. interaction_model is an open + identifier with suggested words (ADR 0279), and the compiler does + NOT enforce that journey flow steps are compatible with the + referenced channel's interaction model. Flow-step compatibility is + domain-specific and belongs to domain extensions or agent reasoning. + """ +} + +decision D-035 "Milestone Completion via Feature Status" { + settled true + origin project + text """ + Milestone completion uses the FeatureStatus field: done_count / total_features. + Features with status=done are complete. No cross-extension edges are needed. + """ +} diff --git a/gsd/core/tests/projects/real-size/spec/decisions-2.spec b/gsd/core/tests/projects/real-size/spec/decisions-2.spec new file mode 100644 index 0000000000..48e70a5230 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/decisions-2.spec @@ -0,0 +1,556 @@ +decision D-057 "No Migration Hook in v1" { + settled true + origin project + text """ + Omit migration_hook from the v1 manifest. Add migration hooks when + the entity model evolves in a breaking way. + """ +} + +decision D-080 "Tags Field on All Entity Kinds" { + settled true + origin project + text """ + All 9 product entity kinds get the tags field (string[] @optional) as a + shared field. + """ +} + +decision D-049 "Journey Description Field" { + settled true + origin project + text """ + Add an optional description field (string) to the ProductJourney type. + This provides a summary of the journey's purpose without requiring + agents to parse individual flow steps. + """ +} + +decision D-041 "Intentional Diagnostic Code Gaps" { + settled true + origin project + text """ + Diagnostic code gaps are intentional and reserved for future validation rules. + No existing code will be reassigned. New validation rules receive the next + available code in the appropriate range (E, W, or I). + """ +} + +decision D-086 "Validation Behavior Naming Convention" { + settled true + origin project + text """ + Adopt the detect_/validate_ prefix convention as a stable naming pattern: + - detect_* behaviors check structural graph properties (edge presence, cycles, + field emptiness, cross-entity consistency) + - validate_* behaviors check individual field values against known enums, + formats, or constraints + Both prefixes use category=validation and produce diagnostics. + """ +} + +decision D-047 "Feature Ordering Takes No Entity ID Argument" { + settled true + origin project + text """ + queryFeatureOrdering() is a global query that returns all features in + topological order. Scoping would require a subgraph extraction step that + adds complexity without clear user value. Agents can filter the result + by milestone or module membership after receiving the full ordering. + """ +} + +decision D-076 "Product Extension Fully Standalone" { + settled true + origin project + text """ + All product queries operate purely on product entity kinds, edge types, + and the FeatureStatus field. No query requires peer extensions. Domain + extensions that want to link to product features do so via their own + manifests and peer_dependency declarations. + """ +} + +decision D-084 "Term Weak Connectivity" { + settled true + origin project + text """ + Terms are vocabulary aids, not dependency nodes. TermReferencesRelatedTerm edges are + optional navigation links — a term is valid without any see_also + references. I010 detects terms with no edges at all at info level for awareness, + but term isolation is not a structural defect. Terms serve a fundamentally + different role than deliverables, modules, or milestones: they define + vocabulary, not dependencies. + """ +} + +decision D-051 "Journey Flow Steps are Opaque" { + settled true + origin project + text """ + Journey flow steps are intentionally opaque prose strings. Structured + flow semantics (step typing, conditional branching, loop detection) + belong to domain extensions that understand the interaction patterns + of their specific domain. The base product extension only requires + flow to be present (core E006: flow is a required field) and leaves + content interpretation to + consumers. This preserves domain neutrality. + """ +} + +decision D-037 "Deliverable Lifecycle via Status Field" { + settled true + origin project + text """ + Add DeliverableStatus (draft, in_progress, shipped, deprecated) and + a reason field to ProductDeliverable. The core refuses another value (E061). I066 detects + deprecated deliverables without a documented reason. Status defaults + to absent (treated as draft) for incremental adoption. + """ +} + +decision D-082 "Term Isolation as Design Boundary" { + settled true + origin project + text """ + Term isolation is an intentional design boundary in v1. Terms are + vocabulary aids consumed by humans and agents via text — they are NOT + dependency nodes. Extensions that need term-to-entity graph connectivity + (e.g., a glossary-powered documentation renderer) can add a `terms` + reference field to any entity kind via entity_enhancements in their + own manifest, creating extension-owned edges without polluting the + base product model. The product extension intentionally does not + pre-wire term references on all entity kinds because most domains + do not need graph-level term connectivity. + """ +} + +decision D-074 "Scalability Tiers" { + settled true + origin project + text """ + Define three scalability tiers with corresponding performance targets: + - Tier 1 (≤500 entities): validation <50ms, queries <100ms (MUST) + - Tier 2 (≤5000 entities): validation <500ms, queries <1s (SHOULD) + - Tier 3 (>5000 entities): validation <2s, queries <2s or timeout (SHOULD) + Cycle detection and unreferenced detection MUST remain O(V+E) at all tiers. + Feature ordering (global topological sort) is the most expensive query + and gets a dedicated 2-second budget at Tier 2. + """ +} + +decision D-058 "No Direct PersonaChannel Edge" { + settled true + origin project + text """ + No PersonaChannel edge in v1. The journey is the authoritative source + of persona-channel binding. A direct edge would duplicate information + and create sync issues when journeys change. Extensions can add this + via entity_enhancements if needed. A composite query + (pe_query_persona_channels) provides the convenience of a direct edge + without the denormalization risk. + """ +} + +decision D-085 "Typed Surface Schemas" { + settled true + origin project + text """ + Define per-surface input and output types in the spec DSL (Option C). + List commands use ProductListFilter input and per-kind list result types + (FeatureListResult, JourneyListResult, etc.) with pagination. Query commands + use per-command input types and return existing query payload types. + All commands share consistent error handling via ProductSurfaceError with + two error codes: ENTITY_NOT_FOUND (exit 1) and INVALID_INPUT (exit 2). + GRAPH_NOT_READY and the MCP resource envelope (ProductSurfaceResponse) + were dropped by ADR 0011: a command only runs over a built graph, and + product declares no MCP resources. + """ +} + +decision D-052 "List Command Pagination" { + settled true + origin project + text """ + Use offset/limit pagination (Option C). Default limit is 100, max is 1000. + total reflects the filtered (pre-pagination) count. has_more indicates + whether more results exist beyond the current page. Pagination is stateless + — clients can request any page without server-side cursors. The matrix + queries page the same way (ADR 0011). + """ +} + +decision D-071 "Reason Field Content is Opaque" { + settled true + origin project + text """ + Reason content is intentionally opaque prose. Quality validation + belongs to domain extensions or human review. The product extension + validates presence, not content, consistent with pe_acceptance_free_form + and pe_journey_flow_opaque. + """ +} + +decision D-029 "Cross-Extension Query Isolation" { + settled true + origin project + text """ + Product queries MUST NOT traverse edges owned by other extensions. Product + queries operate exclusively on the 20 product-owned edge types. The BehaviorImplementsFeature + edge is owned by @specforge/software and is invisible to product queries. + This ensures: + 1. Product extension is fully standalone — works without any peer extension + 2. Query results are deterministic regardless of which other extensions are installed + 3. No coupling between product query logic and other extensions' edge schemas + 4. Extensions that need cross-extension traversal implement it in their own queries + + Agents that want to combine product and software graph data should issue + separate queries to each extension's surface and merge results client-side. + """ +} + +decision D-036 "Cross-Extension Enhancement Receiving" { + settled true + origin project + text """ + Product entity kinds MAY receive entity_enhancements from peer extensions. + Enhanced fields are visible in the entity graph and queryable via the + graph protocol, but product-owned queries and validation rules do NOT + inspect enhancement fields. Enhancement fields are the responsibility of + the enhancing extension. Product validation rules only check fields + declared in the product manifest's field definitions. + """ +} + +decision D-079 "Tag Naming Conventions" { + settled true + origin project + text """ + Tags are case-sensitive, lowercase, hyphen-separated strings matching + the pattern [a-z0-9][a-z0-9-]*[a-z0-9] (min 2 chars, max 50 chars). + Tags that violate this pattern produce an I068 info diagnostic with + a suggested normalized form. Empty strings in the tags array are silently + ignored. Tags are NOT namespaced — there are no reserved prefixes. + This convention is enforced at info level to support incremental adoption + without blocking compilation. + """ +} + +decision D-045 "Extension Versioning Strategy" { + settled true + origin project + text """ + The extension version follows semver (major.minor.patch) starting at 1.0.0. + Breaking changes (removing entity kinds, edge types, or fields; changing + query return types; renaming diagnostic codes) require a major version bump. + Additive changes (new entity kinds, edge types, fields, queries, diagnostics) + require a minor version bump. Bug fixes and documentation changes require a + patch version bump. The extension version is declared in the manifest and + included in the graph protocol output. Peer dependencies reference extension + versions using semver ranges (e.g., ^1.0). + """ +} + +decision D-067 "Priority Algorithm Null Handling" { + settled true + origin project + text """ + Null-priority entities are excluded from the derivation. Only milestones + and journeys with an explicit priority field contribute to the derived + deliverable priority. If ALL constituent entities have null priority, + the deliverable priority is null. source_count reflects only entities + WITH explicit priority, not total entities. + """ +} + +decision D-039 "Description Field on Planning Entities" { + settled true + origin project + text """ + Add an optional description field (string) to ProductFeature, + ProductMilestone, and ProductDeliverable. For features, description + complements problem/solution — it serves as a human/agent-readable + summary when the problem/solution framing is too verbose. For milestones + and deliverables, description fills a gap where no summary field existed. + All three fields are optional to preserve incremental adoption. + """ +} + +decision D-065 "Reason Field on Persona and Channel" { + settled true + origin project + text """ + Add an optional reason field (string) to ProductPersona and + ProductChannel. I069 detects deprecated personas without a reason. + I070 detects deprecated channels without a reason. Both are info-level + to support incremental adoption. This completes the lifecycle consistency + pattern across all entity kinds with deprecation states. + """ +} + +decision D-078 "Tag Cross-Kind Awareness" { + settled true + origin project + text """ + Add I084 to detect tags used on entities of 3 or more different + kinds. The threshold of 3 avoids noise for common cross-cutting tags + used on 2 kinds (e.g., "mvp" on features and milestones). I084 is + info-level — cross-kind tags are valid and often intentional for + cross-cutting categorization. The diagnostic suggests kind-specific + prefixes (e.g., "core-module", "core-feature") as an opt-in + convention, not a requirement. + """ +} + +decision D-068 "Priority Field Asymmetry" { + settled true + origin project + text """ + Priority is only meaningful on planning-active entities that compete for + scheduling attention: features (what to build first), journeys (which + user flows to prioritize), and milestones (which phases are critical). + Deliverables inherit priority from their milestones and journeys. Modules + are structural — they exist or don't, independent of priority. Terms, + personas, and channels are reference entities that describe vocabulary, + roles, and mediums — they are not prioritized against each other. + """ +} + +decision D-075 "Schema Evolution Strategy" { + settled true + origin project + text """ + Adopt additive-only evolution for minor versions (1.x): new fields are + always @optional, no fields are removed or renamed. Breaking changes + (field removal, field rename, type change) require a major version bump + (2.0) and a migration_hook that transforms existing entities. The + migration_hook is a Wasm export (migrate__product) that receives the + old entity JSON and returns the new entity JSON. Migration hooks run + during specforge migrate and are tested with before/after fixture pairs. + The extension_versioning decision (pe_extension_versioning) governs the + version numbering; this decision governs the schema-level contract. + """ +} + +decision D-069 "Priority Propagation Algorithm" { + settled true + origin project + text """ + The priority propagation algorithm uses max-priority semantics: + 1. Collect priorities from all milestones (via DeliverableTrackedByMilestone) + and journeys (via DeliverableSupportsJourney) referencing the deliverable. + 2. Filter out null priorities — only explicit priorities participate. + 3. If no explicit priorities exist, return null (priority unknown). + 4. Otherwise, return the highest priority: critical > high > medium > low. + 5. source_count is the number of entities with explicit (non-null) priority. + This is max-priority, not average or majority-vote. The rationale is + that a deliverable containing even one critical milestone is itself + critical — the highest-urgency component dominates. + """ +} + +decision D-054 "Module Reason Field" { + settled true + origin project + text """ + Add reason as string @optional to ProductModule. No new validation + rule is needed in v1 — the field is documentation-only, consistent + with pe_reason_content_opaque. Future versions may add I-level + diagnostics for deprecated modules without a reason. + """ +} + +decision D-055 "Module and Term Lack Status Lifecycle" { + settled true + origin project + text """ + Module and term intentionally have no status lifecycle field. + + Module rationale: modules map to code components (crates, packages). + Their lifecycle is observable from the codebase itself — a module either + exists in the dependency graph or it doesn't. Adding draft/active/deprecated + would duplicate what the build system already knows. Module has a reason + field for documenting deprecation intent, but status is the build artifact's + responsibility, not the spec's. + + Term rationale: terms are vocabulary definitions. They are either defined + or they are not. A term has no meaningful lifecycle stages between those + two states. Deprecated terms should be removed and replaced with updated + definitions — the see_also field handles term evolution by pointing to + successor terms. Adding status to terms would create validation noise + without improving planning outcomes. + + Future versions may add status if a concrete use case emerges (e.g., + "proposed" terms in a review workflow), but the bar is high: the status + must enable a query or validation rule that cannot be achieved otherwise. + """ +} + +decision D-034 "Channel URL Field" { + settled true + origin project + text """ + Add url as string @optional to ProductChannel. This field links to + the canonical documentation, API endpoint, or configuration URL for + the channel. It is informational only — no validation of URL format + in v1 to avoid false positives on internal URIs and custom schemes. + """ +} + +decision D-043 "Entity Kind Addition Migration" { + settled true + origin project + text """ + New entity kinds are a minor version addition (1.x), NOT a breaking change. + The protocol: + 1. New kind is added to entity_kinds[] in the manifest (e.g., 9 kinds) + 2. New edge types connecting the kind are added to edge_types[] + 3. New validation rules and diagnostic codes are allocated from reserved gaps + 4. The manifest version bumps to 1.x (minor) + 5. Existing .spec files are unaffected — no migration needed + 6. The invariant pe_manifest_nine_entity_kinds covers the + pe_manifest_entity_kinds_match_manifest (count matches manifest declaration) + + Removal of an existing entity kind is a major version change (2.0) requiring + a migration_hook. Renaming a kind is also a major change. Only addition + is minor-compatible. + + Edge type additions follow the same pattern: new edges are minor, removal + is major. + """ +} + +decision D-038 "Deliverable-Persona Composite Query" { + settled true + origin project + text """ + Add pe_query_deliverable_personas as a composite query on ProductQueryPort. + The query traverses deliverable->journey->persona edges, deduplicates + personas, and includes via_journey_ids for traceability. This mirrors + the pe_query_persona_channels pattern: composite queries provide + convenience without denormalizing edges. No new edge type is needed. + """ +} + +decision D-060 "Observability Events Are Fire-and-Forget" { + settled true + origin project + text """ + Observability events are intentionally fire-and-forget. They exist for external + consumers: CI dashboards, monitoring systems, extension analytics, and debugging tools. + The product extension does NOT consume its own observability events — this would create + circular dependencies. Consumers subscribe at the channel level (product.*) and filter + by event type. The events carry structured payloads (typed via ProductXxxPayload types) + so consumers can deserialize without parsing. No runtime cost when no consumers + subscribe — events are lazy (emitted only when a listener exists on the channel). + Future extensions (e.g., @specforge/analytics) can declare consumers for these events. + """ +} + +decision D-064 "Persona and Channel Entities Are Intentionally Shallow" { + settled true + origin project + text """ + Personas and channels are intentionally shallow leaf entities. Their purpose is + to provide identity and classification for journey references, not to carry + complex graph structure. Adding priority/weighting to personas would duplicate + journey priority (which already captures persona-specific importance). Adding + throughput to channels would conflate specification (what the system does) with + infrastructure (how it performs) — violating the domain-neutral principle. + Depth is added through journeys: a persona's importance is measured by the + number and priority of journeys referencing it (core's + `specforge query <persona> --depth 1 --kind journey`). A channel's + utilization is measured by journey count and coverage. If a project needs richer persona modeling + (e.g., weighted scoring, persona segments), an extension can use + entity_enhancements to add fields to the persona kind without modifying + the product manifest. + """ +} + +decision D-044 "Only Deliverables Track Versions" { + settled true + origin project + text """ + Only deliverables track versions because they are shippable artifacts with + external consumers who depend on version numbers. Milestones, modules, and + journeys are internal planning constructs — their evolution is tracked by + version control (git diff on .spec files). Adding version fields to + internal entities would create maintenance burden without consumer value. + Temporal tracking (when status changed) is deliberately excluded from v1 — + it requires either a changelog field or event sourcing, both of which add + significant complexity. If per-entity temporal tracking is needed, an + extension can add a changelog field via entity_enhancements. + """ +} + +decision D-053 "Additive-Only Schema Evolution" { + settled true + origin project + text """ + Minor versions (1.x) follow additive-only schema evolution: + - New optional fields can be added to any entity kind + - New diagnostic codes are allocated in the core catalog (a + third-party code is namespaced) and added to the diagnostic catalog + - New edge types require manifest version field bump but not major version + - New entity kinds require major version bump + - Field removal, kind removal, or edge type removal require major version + bump with a migration hook + The migration hook (introduced in v2) receives the old manifest version + and returns a list of graph transformations (add_field, remove_field, + rename_field, add_edge_type, remove_edge_type). Until v2, migration_hook + remains null. Spec files authored for v1.0 parse without error under v1.x. + """ +} + +decision D-059 "Product Uses Core Emitter, No Custom Renderer" { + settled true + origin project + text """ + Product entities render through the core emitter's uniform node rendering. + All entity kinds registered in KindRegistry are rendered identically: kind, + id, fields (per FieldRegistry order), edges (per EdgeTypeRegistry order). + No product-specific rendering is needed because: + (1) The graph protocol is kind-agnostic — consumers use the kind field to + interpret entities, not format-specific rendering. + (2) Product entities have no structured body content (unlike behaviors with + Design-by-Contract blocks) — all data is in typed fields. + (3) The three export formats (context, graph, brief) apply uniformly to + all entity kinds. + Entities with validation errors include a _diagnostics array in context + format. This is a core emitter feature, not product-specific. + """ +} + +decision D-066 "Advanced Planning Queries" { + settled true + origin project + text """ + Add four new query methods to ProductQueryPort: + 1. queryUnscheduledFeatures — features with zero MilestoneDeliversFeature edges + 2. queryFeatureOverlap — features reachable from 2+ deliverables + 3. queryPersonaCoverageMatrix — per-persona feature reachability matrix + 4. queryCriticalPath — longest incomplete milestone chain with slack + + All four are specforge product commands (unscheduled-features, + feature-overlap, coverage-matrix, critical-path), auto-promoted to MCP + tools; product declares no MCP resources (ADR 0011). + """ +} + +decision D-033 "End-to-End Chain Validation Rules" { + settled true + origin project + text """ + Add four new I-level diagnostics: + - I076: Deliverable end-to-end chain gap (milestone features not in modules) + - I077: Feature in multiple milestones (informational awareness) + - I078: Priority escalation gap (critical feature in low milestone) + - I079: Implicit milestone ordering (shared features, conflicting dates) + + All are info-level to support incremental adoption. I077 is intentionally + informational — multi-milestone scheduling is valid for phased delivery. + I078 requires explicit priority on both feature and milestone (absent + priority suppresses the check). I079 requires target_date on both + milestones. + """ +} diff --git a/gsd/core/tests/projects/real-size/spec/decisions-3.spec b/gsd/core/tests/projects/real-size/spec/decisions-3.spec new file mode 100644 index 0000000000..f0288fb50e --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/decisions-3.spec @@ -0,0 +1,241 @@ +decision D-061 "Ownership as String Fields" { + settled true + origin project + text """ + Owner is a free-form string field (@optional) on feature, milestone, + deliverable, and release. Contributors is a string list field. No entity + references — supports any naming convention. + """ +} + +decision D-042 "Effort as T-Shirt Sizes" { + settled true + origin project + text """ + T-shirt sizes (xs, s, m, l, xl) mapped to Fibonacci weights (1, 2, 3, 5, 8). + Applied to features only. Features without effort default to m=3 in queries. + """ +} + +decision D-072 "Release as Ninth Entity Kind" { + settled true + origin project + text """ + Add release as the 9th product entity kind. Releases group deliverables + via ReleaseIncludesDeliverable edges, complete milestones via + ReleaseCompletesMilestone edges, and order releases via ReleaseDependsOn. + Lifecycle: planned->in_progress->released->recalled. Three new edge + types (total 20). Previous 8-kinds invariant updated to 9. + """ +} + +decision D-081 "Start Date on Milestones" { + settled true + origin project + text """ + Add start_date (date @optional, ISO 8601) to milestones. E061 reports + a start_date that is no calendar day; no rule checks its order. + """ +} + +decision D-032 "External Blockers on Milestones" { + settled true + origin project + text """ + Add blockers (string[] @optional) to milestones. Free-text descriptions + of external impediments. I060 reports a blocked milestone with no + blockers (depends_on doesn't count). + """ +} + +decision D-050 "Journey Flow Feature Linking" { + settled true + origin project + text """ + Validate bracketed references in flow steps against the journey's declared + features list. I090 for unresolvable references. Lightweight structure + without requiring a flow DSL. + """ +} + +decision D-073 "Release Entity v1.1 Migration Path" { + settled true + origin project + text """ + Release entity adoption is fully additive and requires zero migration: + 1. The release kind is registered during pe_register_entity_kinds alongside + the other 8 kinds — no conditional registration path. + 2. Every release field except version is optional; a project with zero + release blocks parses and validates identically to v1.0. + 3. ReleaseIncludesDeliverable, ReleaseCompletesMilestone and + ReleaseDependsOn edge types are registered but + produce zero edges when no release entities exist — no phantom edges. + 4. Validation rules targeting releases (W092, W093) fire only + when release entities are present in the graph. Zero releases = zero + release diagnostics. + 5. CLI commands (specforge product releases, release-completion, etc.) + return empty lists when no releases exist — consistent with other + entity listing behavior. + 6. pe_query_release_completion returns null when no releases exist. + No migration_hook is needed. No spec file changes are required. The + pe_migration_additive_only decision governs: v1.1 is a minor version + bump with additive-only changes. + """ +} + +decision D-062 "Ownership Field Exclusion Rationale" { + settled true + origin project + text """ + Ownership fields are intentionally limited to the 4 entity kinds that + represent actionable work items with individual accountability: + + - feature: someone owns the capability being built + - milestone: someone owns the phase deadline and exit criteria + - deliverable: someone owns the shippable artifact + - release: someone owns the coordinated shipping event + + The 5 excluded kinds are excluded for specific reasons: + + - module: structural grouping, not a work item. Module ownership is + implicit — the owner of the features within the module owns the module. + Adding owner to modules would create redundant data that drifts from + feature-level ownership. + - term: vocabulary definitions are shared knowledge, not owned work. + Terms evolve through consensus, not individual accountability. + - journey: cross-functional flows spanning personas and channels. + Journey ownership is ambiguous — is it the UX designer, the PM, + or the engineer implementing the flow? The persona and feature + owners are the accountable parties. + - persona: user role archetypes are research artifacts, not work items. + Persona definitions are owned by the product team collectively. + - channel: interaction mediums are infrastructure concerns, not work + items. Channel ownership is an ops/platform concern outside the + product planning scope. + + Extensions can add ownership fields to any kind via entity_enhancements + if a specific domain requires it. The product extension does not + pre-wire ownership on kinds where it creates noise. + """ +} + +decision D-070 "Product Queries as Derived Convenience Layer" { + settled true + origin project + text """ + Product queries are explicitly a derived convenience layer, NOT part of + the Graph Protocol standard. Each query behavior contract documents its + exact traversal algorithm — the edge types followed, the traversal + direction, the aggregation logic — enabling any Graph Protocol consumer + to independently derive the same results from the exported graph. + + The Graph Protocol output contains all raw entity fields and edges + required for independent derivation. No query result depends on data + absent from the graph export. Alternative compilers that produce a + compliant Graph Protocol JSON are NOT required to implement these + queries — they are extension-provided conveniences, not standard + obligations. + + Each query method's contract serves as a reference algorithm + specification. A different compiler, an agent, or a downstream tool + can implement any query by following the documented traversal pattern + against the standard graph export. + """ +} + +decision D-077 "Status Transitions via the Git Baseline" { + settled true + origin project + text """ + Status transition validation reads the git baseline (ADR 0287): the + project compiled at HEAD, handed to a pass as `previous`. It records + entity statuses from the previous commit. When there is a baseline, + W087-W091/W094 compare current status against the baseline status. + When there is none, transition rules are suppressed and only + vocabulary validity (E061) is checked. + + The baseline is a deterministic function of the commit and the + loaded extensions. It is NOT hidden compiler state — it is what git + already holds. This preserves deterministic compilation: identical + inputs (spec files + HEAD) always produce identical outputs. + + CI pipelines that want transition checking fetch enough history to + name HEAD or the merge-base. Pipelines that want stateless builds + run outside a repository. Both modes are first-class supported. + """ +} + +decision D-031 "Analytics Namespace Separate from Graph Protocol" { + settled true + origin project + text """ + Computed analytics are NEVER included in the Graph Protocol standard + output. The graph export contains raw entities and edges only. Analytics + are available exclusively through extension query endpoints (CLI commands, + auto-promoted MCP tools, ProductQueryPort). This keeps the Graph Protocol + clean and portable while making analytics available to consumers who + want them. + """ +} + +decision D-040 "Deterministic Time-Dependent Queries" { + settled true + origin project + text """ + All time-dependent commands accept an explicit --as-of date that + defaults to the date the host passes in CommandInput (today, UTC, + YYYY-MM-DD; ADR 0011). The same spec files + the same --as-of always + produce the same results. + + Overdue detection (I058) is moved from compile-time validation to + query-time only. It fires when the milestone timeline query is + executed (either via CLI command or MCP tool), NOT during + specforge check. This means specforge check is fully deterministic — + it never depends on wall-clock time. Overdue markers appear only in + query results, not in the validation diagnostic set. + + The milestone velocity query likewise accepts as_of_date, making + velocity calculations reproducible for testing and CI. + """ +} + +decision D-087 "Product Vocabularies Are Enum Fields" { + settled true + origin project + text """ + Each vocabulary is one constant (ADR 0071). Its field is declared an + enum of it, with the value an absent status counts as as its default; + a value outside it is the core's E061. The list filters, their help, + the sorts, the lifecycle pass and the rollups read the same constant. + W077-W080, W083-W085 and W095 are retired to E061. + """ +} + +decision D-023 "Gherkin Bridge for Traceability" { + settled true + origin project + text """ + The @specforge/software extension declares a gherkin field with type + string_list and file_reference=true on behavior entities. This field + references external .feature files. Feature files use + `@specforge:entity_id` tags to bind to spec entities. `verify` remains + as a core grammar construct for unit/property/contract test intent + declarations. `specforge collect cucumber` command consumes Cucumber + JSON reports for traceability proof. Two traceability paths: gherkin + field for behavior entities, convention-based matching for + invariant/event/constraint entities. + """ +} + +decision D-016 "Federation as Extension" { + settled true + origin project + text """ + Federation functionality extracted from core into @specforge/federation + extension. Federation behaviors reference federation-local invariants + (federated_graph_traversal_integrity, federated_schema_completeness, + cross_project_reference_safety) instead of core invariants. Generic + qualified-reference hooks remain in core for any extension to use. + Core compiler has zero federation knowledge. + """ +} diff --git a/gsd/core/tests/projects/real-size/spec/discuss.spec b/gsd/core/tests/projects/real-size/spec/discuss.spec new file mode 100644 index 0000000000..f71492d9ea --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/discuss.spec @@ -0,0 +1,78 @@ +context 02-CONTEXT "Graph Protocol Export context" { + phase v1.0.0/02 + gathered 2026-11-02 + boundary "The graph is exported as Graph Protocol JSON, nodes and edges in a stable order. A schema in the export is phase 3." + canonical_refs [ + { topic "The export envelope" paths ["docs/graph-protocol.md"] } + ] +} + +decision D-01 "The schema cache lives under .specforge" { + phase v1.0.0/02 + area "Caches" + text "Every cache an export keeps lives under .specforge/ in the project root, ignored by git, one JSON file per cache, rewritten whole after each export" + origin context +} + +decision D-02 "Nodes are sorted by id" { + phase v1.0.0/02 + area "Order" + text "Nodes are sorted by id and edges by source, label and target, so two exports of one graph are byte-identical" + origin context +} + +context 03-CONTEXT "Graph Protocol Schema Versioning context" { + phase v1.0.0/03 + gathered 2026-11-12 + boundary "The schema is embedded in graph exports, versioned against the last export's cached schema, and a consumer can name the version it reads. Publishing the schema to a registry is out of scope." + discretion ["The order of kinds inside the schema", "The wording of W053's message"] + specifics "The version is computed, never written by hand: a person never edits a schema version" + canonical_refs [ + { topic "The Graph Protocol envelope and its format_version" paths ["docs/graph-protocol.md"] } + { topic "Diagnostic codes and their catalog" paths ["docs/diagnostics.md"] } + ] + reusable_assets [ + "`crates/pipeline/emitter/src/schema.rs`: GraphProtocolSchema and generate_schema", + "`crates/pipeline/emitter/src/emit.rs`: the export shapes and their envelope", + ] + patterns ["One reader per format: the cache is read with serde_json, never a hand parser"] + integration_points [ + "`specforge export` writes the cache after a graph export", + "the MCP export tool takes schema_version beside format", + ] +} + +decision D-01 "The version is derived from the cached schema" { + phase v1.0.0/03 + area "Versioning" + text "Each export versions its schema against the schema the last export recorded in .specforge/schema-cache.json: major for anything a reader of the recorded schema relies on that is removed or reshaped, minor for additions, patch for documentation and provenance; 1.0.0 when no cache exists" + origin context +} + +decision D-02 "A breaking change warns, it never fails" { + phase v1.0.0/03 + area "Versioning" + text "A major bump is W053, a warning naming the two versions and the first change that broke compatibility; the export is written either way" + origin context +} + +decision D-03 "The schema is embedded by default in graph exports" { + phase v1.0.0/03 + area "Embedding" + text "A graph export embeds the schema unless --no-schema; context, brief and budgeted exports leave it out unless --with-schema, since the schema can be larger than the entities they keep" + origin context +} + +decision D-04 "A named version is admitted or refused, never relabelled" { + phase v1.0.0/03 + area "Negotiation" + text "--schema-version and the export tool's schema_version admit a version whose readers read the current schema and refuse any other; an admitted export still states the current version" + origin context +} + +deferred_idea DI1 "Publish the schema to the registry" { + phase v1.0.0/03 + origin discussion + text "Publishing each schema version to the extension registry so consumers can fetch old versions" + why "Needs the registry's artifact store first" +} diff --git a/gsd/core/tests/projects/real-size/spec/plans.spec b/gsd/core/tests/projects/real-size/spec/plans.spec new file mode 100644 index 0000000000..9d0af2b175 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/plans.spec @@ -0,0 +1,390 @@ +plan 02-01 "Deterministic export" { + phase v1.0.0/02 + type execute + files_modified ["crates/pipeline/emitter/src/json.rs"] + requirements [FEATURE-047] + objective "The graph is exported as Graph Protocol JSON in a stable order (D-02)" +} + +task T1 "Sort the export" { + plan v1.0.0/02/02-01 + type auto + files ["crates/pipeline/emitter/src/json.rs"] + action "Sort nodes by id and edges by source, label and target before serializing" + verify [ + { + automated "cargo nextest run -p specforge-emitter json" + fails_when "a test fails or none runs" + } + ] + done "Two exports of one graph are byte-identical" +} + +truth TR1 "Two exports of one graph are byte-identical" { + plan v1.0.0/02/02-01 + text "Two exports of one graph are byte-identical" +} + +artifact AR1 "The JSON export" { + plan v1.0.0/02/02-01 + path "crates/pipeline/emitter/src/json.rs" + provides "the sorted Graph Protocol JSON export" +} + +plan 03-01 "Embedded, versioned and negotiated schema" { + phase v1.0.0/03 + type execute + files_modified [ + "crates/pipeline/emitter/src/schema.rs", + "crates/pipeline/emitter/src/schema/version.rs", + "crates/pipeline/emitter/src/schema/cache.rs", + "crates/pipeline/emitter/src/emit.rs", + "crates/surfaces/cli/src/export.rs", + "crates/surfaces/cli/src/schema.rs", + "crates/surfaces/mcp/src/tools/export.rs", + "crates/pipeline/emitter/tests/schema_version.rs", + "crates/surfaces/cli/tests/export.rs", + ] + requirements [FEATURE-120, FEATURE-048] + objective "Every graph export carries the schema the registries describe, versioned against the last export's cached schema, and a consumer can name the version it reads (D-01, D-02, D-03, D-04)" + purpose "An agent reads the graph's shape from the graph itself, and a consumer pinned to a schema version learns when the shape moved under it" + output "The schema module, its version and cache, the export's schema flags, specforge schema --publish, and their tests" + verification [ + "cargo nextest run -p specforge-emitter schema", + "cargo nextest run -p specforge-cli export", + "cargo gate full --only rustfmt,layers,links", + ] + success_criteria [ + "A graph export embeds the schema and states its version", + "A removed field moves the major version and warns W053", + "A named version a reader of the current schema reads is admitted, any other refused", + ] +} + +task T1 "Generate and embed the schema" { + plan v1.0.0/03/03-01 + type tdd + files [ + "crates/pipeline/emitter/src/schema.rs", + "crates/pipeline/emitter/src/emit.rs", + "crates/surfaces/cli/src/export.rs", + ] + read_first [ + "crates/pipeline/registry/src/registries/kind.rs", + "crates/pipeline/registry/src/registries/field.rs", + "docs/graph-protocol.md", + ] + precondition "Every extension's kinds, fields and edge types are registered before the first export runs: the registry build completes before any emitter call" + action """ + Write generate_schema(registries) in crates/pipeline/emitter/src/schema.rs: one SchemaEntityKind per + registered kind (its name, description, owning extension, fields in declared order with type, required flag, + enum values and target kinds) and one SchemaEdgeType per edge type (label, source kinds, target kinds, + cardinality), each map a BTreeMap keyed by name so the document prints in one order. Call it once per + compilation, after every extension is loaded, and keep the value on the compiled project so every export reads + the same schema. In emit.rs, embed it as the top-level "schema" key of a graph export, beside format_version + 2.0 and schema_version; leave it out of context, brief and budgeted exports unless --with-schema is given, and + out of a graph export when --no-schema is. Add --with-schema and --no-schema to specforge export + (crates/surfaces/cli/src/export.rs), conflicting with each other, and with_schema to the MCP export tool. Write + the tests first: a graph export of the taskboard twin holds a schema whose kinds are exactly the registered + kinds; a context export holds none; --with-schema adds it; --no-schema removes it; two compilations print the + same schema bytes. + """ + acceptance [ + "generate_schema lists every registered kind and edge type, sorted by name", + "a graph export embeds the schema unless --no-schema", + "a context, brief or budgeted export embeds it only with --with-schema", + "--with-schema and --no-schema conflict, and the MCP export tool takes with_schema with the same meaning", + "two compilations of the taskboard twin print byte-identical schemas, kinds, fields and edge types in name order", + "a kind an optional peer would declare, with that peer not loaded, is absent from the schema, not listed empty", + ] + verify [ + { + automated "cargo nextest run -p specforge-emitter schema" + fails_when "a test fails or none runs" + } + { automated "cargo nextest run -p specforge-cli export" fails_when "a test fails or none runs" } + ] + done "Every graph export carries the schema the registries describe" +} + +task T2 "Version the schema against the cache" { + plan v1.0.0/03/03-01 + type tdd + files [ + "crates/pipeline/emitter/src/schema/version.rs", + "crates/pipeline/emitter/src/schema/cache.rs", + "crates/pipeline/emitter/tests/schema_version.rs", + ] + read_first ["crates/pipeline/emitter/src/schema.rs", "docs/diagnostics.md"] + reversibility { + rating costly + why "the cache format is read by every later export" + settled_by v1.0.0/02/D-01 + } + precondition "generate_schema answers one GraphProtocolSchema per compilation, its maps sorted by name, so two schemas compare attribute by attribute" + action """ + Write the cache in crates/pipeline/emitter/src/schema/cache.rs: .specforge/schema-cache.json holds the last + export's schema and the version it had, read with serde_json and rewritten whole, only after the export's bytes + are written (a failed export leaves the cache as it was). Write the version in schema/version.rs: compare the + current schema with the cached one attribute by attribute and classify each difference. A removed kind, edge + type or field, a new required field, a changed field type, required flag, edge type or target kind, a lost enum + value or a lost edge end is major; an added kind, field, edge type, enum value or edge end is minor; a changed + description, doc or provenance is patch. The highest class bumps the cached version; no cache is 1.0.0; no + difference keeps the cached version. A major bump is W053, a warning naming both versions and the first + breaking change in path order; the export is written either way. Write the tests first, one per class, each + over two schemas that differ by one attribute, plus the no-cache and no-change cases and a failed export that + leaves the cache untouched. A cache that does not parse is reported once, as a warning naming its path, and + replaced: the export versions its schema as if no cache existed and writes a fresh cache after its bytes. Keep the + diff a pure function of the two schema documents, with no clock and no file read inside it, so the tests build + both schemas in memory and never touch the disk; the cache module is the only code that reads or writes the + file, through the project's file port, never std::fs directly. + """ + acceptance [ + "each class of change bumps its part of the version and resets the parts below it", + "a major bump warns W053 naming both versions and the first breaking change", + "the cache is written only after the export succeeds", + "a cache that does not parse is reported and replaced, and the export versions its schema as if no cache existed", + "an enum value added and another removed in one change is major, the removal deciding the class", + "W053's message names the old and the new version and the path of the first breaking change, kind then field", + ] + verify [ + { + automated "cargo nextest run -p specforge-emitter schema_version" + fails_when "a test fails or none runs" + } + ] + done "The schema version is computed from the cached schema and a breaking change warns W053" +} + +task T3 "Negotiate and publish the schema" { + plan v1.0.0/03/03-01 + type auto + files [ + "crates/surfaces/cli/src/export.rs", + "crates/surfaces/cli/src/schema.rs", + "crates/surfaces/mcp/src/tools/export.rs", + "crates/surfaces/cli/tests/export.rs", + ] + read_first [ + "crates/pipeline/emitter/src/schema/version.rs", + "crates/surfaces/mcp/src/tools/export.rs", + ] + precondition "The version of the current schema is known before any byte of the export is written, so a refused version writes nothing" + action """ + Add --schema-version <X.Y.Z> to specforge export and schema_version to the MCP export tool. A named version is + admitted when a reader of that version reads the current schema: same major, and a minor at or below the + current one. Anything else is refused with an invalid-input error naming the current version and the oldest + version it still admits; an admitted export still states the current version, never the named one. Add + specforge schema --publish, which prints the schema as a standalone JSON Schema (draft 2020-12): one + definition per kind, its fields as properties with their types, required fields listed, enum values as enum, + references as strings with a pattern and x-specforge-target, and one top-level schema each for graph, context + and brief exports. Cover each in crates/surfaces/cli/tests/export.rs: an admitted version, a refused newer + minor, a refused other major, and a published schema that validates against the draft 2020-12 meta-schema. + Decide the version before any byte of the export is written, so a refused version writes no file and leaves + the cache as it was; the refusal is the surface's invalid-input error, with the argument it is about + (--schema-version on the CLI, schema_version on the MCP tool) and the oldest version the current schema still + admits, so a consumer pinned to an old major learns which version to move to. + """ + acceptance [ + "a version a reader of the current schema reads is admitted and the export states the current version", + "any other version is refused naming the current version", + "specforge schema --publish prints a schema that validates against the draft 2020-12 meta-schema", + "a refused version writes no export file and leaves the schema cache untouched", + "the MCP export tool refuses a version as invalid input naming the argument schema_version", + "the published schema defines one top-level schema each for graph, context and brief exports", + ] + verify [ + { automated "cargo nextest run -p specforge-cli export" fails_when "a test fails or none runs" } + { automated "cargo nextest run -p specforge-cli schema" fails_when "a test fails or none runs" } + ] + done "A consumer can name the version it reads, and the schema is published as JSON Schema" +} + +truth TR1 "A graph export holds the schema of every loaded extension" { + plan v1.0.0/03/03-01 + text "Exporting the graph of a project prints a schema whose kinds are exactly the kinds its loaded extensions register, with their fields and edge types" + verification explicit +} + +truth TR2 "A context export holds no schema unless asked" { + plan v1.0.0/03/03-01 + text "A context, brief or budgeted export prints no schema, and prints it when --with-schema is given" +} + +truth TR3 "--no-schema leaves the schema out of a graph export" { + plan v1.0.0/03/03-01 + text "A graph export with --no-schema prints the nodes and edges and no schema key" +} + +truth TR4 "Two compilations print the same schema" { + plan v1.0.0/03/03-01 + text "Exporting the same project twice prints byte-identical schemas" +} + +truth TR5 "The first export is version 1.0.0" { + plan v1.0.0/03/03-01 + text "A project with no schema cache exports schema version 1.0.0 and writes the cache" +} + +truth TR6 "An added field bumps the minor version" { + plan v1.0.0/03/03-01 + text "After an extension adds a field, the next export states the cached version with its minor part raised and its patch reset" +} + +truth TR7 "A removed field bumps the major version and warns" { + plan v1.0.0/03/03-01 + text "After an extension removes a field, the next export states the next major version and warns W053 naming the old and new versions and the removed field" +} + +truth TR8 "A changed description bumps the patch version" { + plan v1.0.0/03/03-01 + text "After a kind's description changes and nothing else, the next export states the cached version with its patch part raised" +} + +truth TR9 "A failed export leaves the cache as it was" { + plan v1.0.0/03/03-01 + text "When an export fails after computing its version, the schema cache still holds the previous schema and version" +} + +truth TR10 "A named version is admitted or refused" { + plan v1.0.0/03/03-01 + text "An export with --schema-version naming an older minor of the current major succeeds and states the current version; a newer minor or another major is refused naming the current version" +} + +truth TR11 "The published schema is valid JSON Schema" { + plan v1.0.0/03/03-01 + text "specforge schema --publish prints a document that validates against the draft 2020-12 meta-schema and defines graph, context and brief exports" +} + +artifact AR1 "Schema generation" { + plan v1.0.0/03/03-01 + path "crates/pipeline/emitter/src/schema.rs" + provides "generate_schema and the GraphProtocolSchema document" + exports ["generate_schema", "GraphProtocolSchema", "SchemaEntityKind", "SchemaEdgeType"] +} + +artifact AR2 "Schema version" { + plan v1.0.0/03/03-01 + path "crates/pipeline/emitter/src/schema/version.rs" + provides "the attribute diff and its classification into major, minor and patch" + exports ["version_against", "Change", "Bump"] +} + +artifact AR3 "Schema cache" { + plan v1.0.0/03/03-01 + path "crates/pipeline/emitter/src/schema/cache.rs" + provides "reading and writing .specforge/schema-cache.json" + contains "schema-cache.json" +} + +artifact AR4 "The export's schema embedding" { + plan v1.0.0/03/03-01 + path "crates/pipeline/emitter/src/emit.rs" + provides "the schema key of a graph export and the rule for context, brief and budgeted exports" +} + +artifact AR5 "The export flags" { + plan v1.0.0/03/03-01 + path "crates/surfaces/cli/src/export.rs" + provides "--with-schema, --no-schema and --schema-version" +} + +artifact AR6 "The schema command" { + plan v1.0.0/03/03-01 + path "crates/surfaces/cli/src/schema.rs" + provides "specforge schema --publish" +} + +artifact AR7 "The version tests" { + plan v1.0.0/03/03-01 + path "crates/pipeline/emitter/tests/schema_version.rs" + provides "one test per class of change, the no-cache and no-change cases" + min_lines 120 +} + +key_link KL1 "The export embeds the generated schema" { + plan v1.0.0/03/03-01 + from "crates/pipeline/emitter/src/emit.rs" + to "crates/pipeline/emitter/src/schema.rs" + via "generate_schema's value on the compiled project" + pattern "GraphProtocolSchema" +} + +key_link KL2 "The version reads the cache" { + plan v1.0.0/03/03-01 + from "crates/pipeline/emitter/src/schema/version.rs" + to "crates/pipeline/emitter/src/schema/cache.rs" + via "the cached schema and version" + pattern "cache::read" +} + +key_link KL3 "The CLI negotiates through the version" { + plan v1.0.0/03/03-01 + from "crates/surfaces/cli/src/export.rs" + to "crates/pipeline/emitter/src/schema/version.rs" + via "the admitted-version check" + pattern "admits" +} + +prohibition PR1 "No hand-written schema" { + plan v1.0.0/03/03-01 + statement "No code keeps a hand-written list of kinds, fields or edge types: the schema is generated from the registries" + verification judgment +} + +prohibition PR2 "No relabelled export" { + plan v1.0.0/03/03-01 + statement "An export never states the version a consumer named instead of the current one" + verification test + test "export::a_named_version_is_admitted_and_the_export_states_the_current_one" +} + +prohibition PR3 "No cache before the export" { + plan v1.0.0/03/03-01 + statement "The schema cache is never written before the export's bytes are written" + verification test + test "schema_version::a_failed_export_leaves_the_cache_as_it_was" +} + +prohibition PR4 "No hand-rolled JSON reader" { + plan v1.0.0/03/03-01 + statement "The cache is read and written with serde_json only, never a hand parser" + verification judgment +} + +prohibition PR5 "No unordered map in the schema" { + plan v1.0.0/03/03-01 + statement "No HashMap or HashSet decides the order the schema prints in" + verification judgment +} + +plan 03-02 "Schema documentation" { + phase v1.0.0/03 + type execute + depends_on [03-01] + files_modified ["docs/graph-protocol.md"] + requirements [FEATURE-048] + objective "The Graph Protocol document describes the schema, its version and negotiation" +} + +task T1 "Document the schema" { + plan v1.0.0/03/03-02 + type auto + files ["docs/graph-protocol.md"] + action "Describe the schema key, how its version is computed, W053 and --schema-version in docs/graph-protocol.md" + verify [ + { automated "cargo gate full --only links,doc-links" fails_when "the gate exits non-zero" } + ] + done "The document describes the schema and its version" +} + +truth TR1 "The document describes the schema version" { + plan v1.0.0/03/03-02 + text "A reader of docs/graph-protocol.md learns how the schema version is computed and negotiated" +} + +artifact AR1 "Graph Protocol document" { + plan v1.0.0/03/03-02 + path "docs/graph-protocol.md" + provides "the schema, its version and negotiation" +} diff --git a/gsd/core/tests/projects/real-size/spec/project.spec b/gsd/core/tests/projects/real-size/spec/project.spec new file mode 100644 index 0000000000..9d9a0df7d5 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/project.spec @@ -0,0 +1,78 @@ +project specforge "SpecForge" { + name "SpecForge" + what "A compiler that turns .spec files into a typed, validated graph agents and people read" + core_value "The graph is the one state: every read, check and edit goes through it" + context "A Rust workspace: a kernel, extensions compiled to WebAssembly components, a CLI and an MCP server" + constraints [ + { + kind tech_stack + what "Rust, one workspace, extensions as wasm32-wasip2 components" + why "one toolchain, nothing to install" + } + { + kind compatibility + what "Linux, macOS and Windows" + why "the CLI ships as one binary per platform" + } + ] +} + +requirement FEATURE-047 "Graph Protocol Export" { + category "Feature" + tier v1 + text """ + The compiled graph is exported as Graph Protocol JSON: every node with + its kind, title, fields, file and line, every edge with its label, and + a format version. The export is deterministic: two compilations of the + same files export the same bytes, so a diff of two exports is a diff of + the specification. + """ +} + +requirement FEATURE-120 "Self-Describing Graph Protocol" { + category "Feature" + tier v1 + text """ + The Graph Protocol JSON export contains nodes and edges but no schema + describing what entity kinds exist, what fields they have, or what edge + types connect them. Agents consuming the graph must rely on external + documentation or heuristics to understand the graph structure, reducing + first-attempt accuracy. + + Self-describing schema embedded in Graph Protocol exports. After all + extension registries are populated, the compiler serializes the + KindRegistry and FieldRegistry into a GraphProtocolSchema object. + Each registered entity kind produces a SchemaEntityKind entry; each + registered edge type produces a SchemaEdgeType entry. The schema is + generated once per compilation and embedded as a top-level "schema" + key in JSON exports (format_version 2.0). specforge schema CLI command + and specforge://schema MCP resource provide standalone schema access + for agent introspection. The schema dynamically reflects whichever + extensions are installed — no static maintenance required. + """ +} + +requirement FEATURE-048 "Graph Protocol Versioning" { + category "Feature" + tier v1 + text """ + The Graph Protocol schema evolves as extensions add entity kinds and edge + types, but there is no versioning mechanism. Agents consuming the graph + cannot negotiate compatible versions, and breaking changes are undetectable. + + Semantic versioning for the Graph Protocol schema, derived from the + extensions: each export versions the schema against the one the last + export recorded in .specforge/schema-cache.json, comparing every + attribute. Additions bump the minor version, documentation and + provenance the patch version, and anything a reader of the recorded + schema relies on that is removed or reshaped (removed kinds, edge types + or fields, a new required field, a changed field type, required flag, + edge type or target kind, a lost enum value or edge end) the major + version, warned as W053. One version names one document. A consumer + may name the version it reads (--schema-version, the export tool's + schema_version): it is admitted when a reader of that version reads the + current schema, and refused otherwise. specforge schema --publish + exports the schema as a standalone JSON Schema (draft 2020-12) for + graph, context and brief exports. + """ +} diff --git a/gsd/core/tests/projects/real-size/spec/research.spec b/gsd/core/tests/projects/real-size/spec/research.spec new file mode 100644 index 0000000000..f5071a39f8 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/research.spec @@ -0,0 +1,99 @@ +research 03-RESEARCH "Graph Protocol Schema Versioning research" { + phase v1.0.0/03 + domain "Versioning a self-describing JSON schema that WebAssembly extensions extend at load time" + researched 2026-11-13 + confidence high + summary "The registries already hold every kind, field and edge type after load, so the schema is a projection of them. Versioning is a structural diff of two schema documents; serde_json reads the cache, and the JSON Schema draft 2020-12 vocabulary covers every field type the registries declare." + user_constraints [D-01, D-02, D-03, D-04] + responsibility_map [ + { capability "Generate the schema" tier "Compiler" } + { capability "Version the schema" tier "Compiler" } + { capability "Negotiate a version" tier "CLI and MCP surfaces" } + ] +} + +finding F1 "The registries hold everything the schema needs" { + research v1.0.0/03/03-RESEARCH + topic architecture + text "After every extension is loaded, KindRegistry, FieldRegistry and the edge types are complete and immutable for the compilation, so generate_schema can run once per compilation and every export reads the same value" + confidence high +} + +finding F2 "A structural diff classifies every change" { + research v1.0.0/03/03-RESEARCH + topic architecture + text "Comparing two schema documents attribute by attribute (kinds, fields, field types, required flags, enum values, edge types and their ends, docs, provenance) gives one class per change; the highest class decides the bump" + confidence high +} + +finding F3 "Draft 2020-12 covers the field types" { + research v1.0.0/03/03-RESEARCH + topic stack + text "String, integer, number, bool, date, enum, reference, list and block fields each map to a draft 2020-12 construct; a reference is a string with a pattern and an x-specforge-target keyword" + confidence medium +} + +stack_choice SC1 "serde_json" { + research v1.0.0/03/03-RESEARCH + name "serde_json" + version "1" + purpose "Read and write the schema cache and the published JSON Schema" + tier core +} + +pattern P1 "Projection, not maintenance" { + research v1.0.0/03/03-RESEARCH + name "Projection, not maintenance" + what "Generate the schema from the registries at every compilation instead of keeping a hand-written copy in step with them" + when "Every compilation that exports" +} + +pattern P2 "Version stored beside the document" { + research v1.0.0/03/03-RESEARCH + name "Version stored beside the document" + what "Write the version a document had into the cache with the document, so the next export compares against exactly what was read" + when "After each graph export" +} + +pitfall PF1 "A cache written before the export succeeds" { + research v1.0.0/03/03-RESEARCH + name "A cache written before the export succeeds" + goes_wrong "An export that fails after the cache is written leaves a cache whose version no consumer ever saw" + why "The cache write and the export are two writes" + avoid "Write the cache only after the export's bytes are written" + warning_signs "A minor bump with no change in the export" +} + +pitfall PF2 "Unordered maps in the schema" { + research v1.0.0/03/03-RESEARCH + name "Unordered maps in the schema" + goes_wrong "Two compilations print the schema's kinds in different orders, so the diff sees changes that are not there" + why "HashMap iteration order is not stable" + avoid "Keep kinds, fields and edge types in BTreeMaps, sorted by name" + warning_signs "A patch bump on an unchanged project" +} + +dont_hand_roll DH1 "JSON Schema validation" { + research v1.0.0/03/03-RESEARCH + problem "Checking that the published schema is valid draft 2020-12" + instead "Validate it in the tests with the jsonschema crate's meta-schema" + why "The meta-schema has corner cases a hand check misses" +} + +open_question OQ1 "Where does the schema cache live?" { + research v1.0.0/03/03-RESEARCH + question "Does the schema cache live beside the export or under .specforge?" + known "Exports may be written anywhere, or to stdout" + unclear "Whether two exports to different files share one cache" + recommendation "One cache per project, under .specforge, as every other cache" + resolved_by v1.0.0/02/D-01 +} + +open_question OQ2 "Does a breaking change fail the export?" { + research v1.0.0/03/03-RESEARCH + question "Does a major bump fail the export or warn?" + known "CI runs export on every change" + unclear "Whether a consumer would rather see a failed build" + recommendation "Warn, and let --strict fail it" + resolved_by v1.0.0/03/D-02 +} diff --git a/gsd/core/tests/projects/real-size/spec/v1.0.0.spec b/gsd/core/tests/projects/real-size/spec/v1.0.0.spec new file mode 100644 index 0000000000..b9c2bc9d21 --- /dev/null +++ b/gsd/core/tests/projects/real-size/spec/v1.0.0.spec @@ -0,0 +1,30 @@ +milestone v1.0.0 "Graph Protocol 1.0" { +} + +phase 02 "Graph Protocol Export" { + milestone v1.0.0 + slug "graph-protocol-export" + goal "The compiled graph is exported as deterministic Graph Protocol JSON" + requirements [FEATURE-047] + success_criteria [ + "specforge export prints every node and edge with a format version", + "Two compilations of the same files export the same bytes", + ] +} + +phase 03 "Graph Protocol Schema Versioning" { + milestone v1.0.0 + slug "graph-protocol-schema-versioning" + depends_on [02] + requirements [FEATURE-120, FEATURE-048] + success_criteria [ + "The schema is embedded in graph exports by default (opt out with --no-schema; opt in for context, brief or budgeted exports with --with-schema)", + "Schema version is computed by diffing every attribute against the last export's cached schema (major for breaking, minor for additions, patch for documentation and provenance; 1.0.0 with no cache)", + "Breaking changes warn W053 with the versions they move between", + "--schema-version admits a version whose readers read the current schema and refuses others; the export is never relabelled", + "specforge schema --publish emits a JSON Schema (draft 2020-12) for graph, context and brief exports", + ] + goal """ + Self-describing graph protocol schema embedded in exports with version auto-computation, breaking change detection, and schema negotiation. + """ +} diff --git a/gsd/core/tests/projects/roadmap/spec/v1.0.spec b/gsd/core/tests/projects/roadmap/spec/v1.0.spec index da7b825520..c4fe27210a 100644 --- a/gsd/core/tests/projects/roadmap/spec/v1.0.spec +++ b/gsd/core/tests/projects/roadmap/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 01.1 "Hotfix" { milestone v1.0 - name "Hotfix" slug "hotfix" goal "Titles survive a reload" depends_on [01] diff --git a/gsd/core/tests/projects/roadmap_errors/spec/v1.0.spec b/gsd/core/tests/projects/roadmap_errors/spec/v1.0.spec index a17d4bbe2a..99a83986f0 100644 --- a/gsd/core/tests/projects/roadmap_errors/spec/v1.0.spec +++ b/gsd/core/tests/projects/roadmap_errors/spec/v1.0.spec @@ -27,21 +27,18 @@ requirement GONE-01 "Out of scope, no reason" { } milestone v1.0 "Errors 1.0" { - name "Errors 1.0" } phase 01 "First" { milestone v1.0 - name "First" slug "first" goal "First" requirements [TWICE-01] success_criteria ["a", "b"] } -phase 02 "Second" { +phase 02 "Phase 02: Second" { milestone v1.0 - name "Second" slug "second" goal "Second" requirements [TWICE-01] @@ -50,7 +47,6 @@ phase 02 "Second" { phase 04 "Fourth" { milestone v1.0 - name "Fourth" slug "fourth" goal "Fourth" depends_on [05] @@ -59,7 +55,6 @@ phase 04 "Fourth" { phase 05 "Fifth" { milestone v1.0 - name "Fifth" slug "fifth" goal "Fifth" depends_on [04] diff --git a/gsd/core/tests/projects/verify/spec/v1.0.spec b/gsd/core/tests/projects/verify/spec/v1.0.spec index b130c4fa88..dc4916b2a7 100644 --- a/gsd/core/tests/projects/verify/spec/v1.0.spec +++ b/gsd/core/tests/projects/verify/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and loaded on start" depends_on [01] diff --git a/gsd/core/tests/projects/workstreams/spec/streams.spec b/gsd/core/tests/projects/workstreams/spec/streams.spec index 03973b1fab..5921153c15 100644 --- a/gsd/core/tests/projects/workstreams/spec/streams.spec +++ b/gsd/core/tests/projects/workstreams/spec/streams.spec @@ -23,18 +23,15 @@ workstream store "Store" { } milestone v1.0 "Auth 1.0" { - name "Auth 1.0" workstream auth } milestone v1.0 "Store 1.0" { - name "Store 1.0" workstream store } phase 01 "Login" { milestone auth/v1.0 - name "Login" slug "login" goal "A user can sign in" requirements [TASK-01] @@ -43,7 +40,6 @@ phase 01 "Login" { phase 01 "Files" { milestone store/v1.0 - name "Files" slug "files" goal "The board is saved" success_criteria ["The board is saved", "The board is loaded"] diff --git a/gsd/core/tests/roster/agent_tools.rs b/gsd/core/tests/roster/agent_tools.rs index 71b55d6cac..1635f60632 100644 --- a/gsd/core/tests/roster/agent_tools.rs +++ b/gsd/core/tests/roster/agent_tools.rs @@ -78,8 +78,9 @@ fn every_specforge_command_an_agent_runs_is_a_tool_its_role_grants() { // Counted work: a scan that lost commands would pass vacuously, so the count is pinned to the bodies'. The four // judges' recording sections name three each (`query --inputs`, `gsd record-verdict`, `trace`), the three granted // `validate` a fourth (`check`), and the verifier's a fifth (`gsd re-verify`); the plan checker's thread section - // names four (`trace --plan` and `gsd thread-plan`, twice each). - assert_eq!(checked, 223, "commands checked"); + // names four (`trace --plan` and `gsd thread-plan`, twice each). The phase researcher's record fence names its + // open question's `new open_question` line. + assert_eq!(checked, 224, "commands checked"); assert_eq!( cli_only.into_iter().collect::<Vec<_>>(), ["files", "git", "http", "run", "settings"], diff --git a/gsd/core/tests/settings_roster.rs b/gsd/core/tests/settings_roster.rs index d22af95244..2daa99ec7d 100644 --- a/gsd/core/tests/settings_roster.rs +++ b/gsd/core/tests/settings_roster.rs @@ -466,64 +466,234 @@ fn the_settings_workflow_counts_the_settings_of_its_section_layout() { assert_eq!(seen, 2, "the statements of the section count"); } -/// The keys of the Not applicable table's row that holds `commit_docs`, by their last name: `planning.pr_strict` is -/// `pr_strict`, `phase_commit_docs.<phase-id>` is `phase_commit_docs`. -fn committed_spec_keys() -> BTreeSet<String> { - let row = table(|t| t.heading == "Not applicable") - .rows +/// One key of the Not applicable table, as a line names it: a key by its last name (not `planning`, not a `<..>` +/// placeholder) in any case and anywhere in the line, so `sub_repos` also finds `SUB_REPOS` and `handle_sub_repos`; a +/// family `x.*` by a member written after it (`x.y`), by its object key quoted or bare (`"x":`, `x: {`, `x = {`), or +/// named as settings (`the x settings`, `x config`). A bare `x` alone is not a key: `graphify` is also the +/// `/gsd-graphify` command's name, and `capabilities` a word of plain prose. +struct NotApplicable { + token: String, + matcher: regex::Regex, +} + +/// A matcher for each key of the Not applicable table, the secrets row left out: the table is the guard's one source. +fn not_applicable_matchers() -> Vec<NotApplicable> { + not_applicable() .into_iter() - .find(|cells| backticked(&cells[0]).iter().any(|t| t == "commit_docs")) - .expect("the row of `commit_docs`"); - backticked(&row[0]) - .iter() - .filter_map(|token| { - token - .split('.') - .rfind(|segment| *segment != "planning" && !segment.starts_with('<')) - .map(str::to_string) + .map(|token| { + let pattern = match token.strip_suffix(".*") { + Some(family) => { + let family = regex::escape(family); + let member = format!(r"\b{family}\.[a-z_]"); + let quoted = format!(r#""{family}"\s*:"#); + let named = + r"\s+(?:settings?|config(?:uration)?|section|block|keys?|options?)\b"; + let bare = format!(r"(?:^|[^-/\w.]){family}(?:\s*:|\s*=?\s*\{{|{named})"); + format!("(?i){member}|{quoted}|{bare}") + } + None => { + let leaf = token + .split('.') + .rfind(|segment| *segment != "planning" && !segment.starts_with('<')) + .unwrap_or_else(|| panic!("`{token}` has no last name")); + format!("(?i){}", regex::escape(leaf)) + } + }; + let matcher = regex::Regex::new(&pattern).expect("a key pattern"); + NotApplicable { token, matcher } }) .collect() } -/// `commit_docs`, `search_gitignored` and `pr_strict` are not settings of `@gsd/core` (the spec is source and is -/// committed like code: nothing of it is gitignored, and a PR branch always leaves it out), so an asset names one only -/// to say so: every line of every asset that names a key of that row of the Not applicable table, in any case, says -/// "not a setting here". The row is read from `spec/settings.md`, and the lines that say it (new-project's, -/// planning-config's and pr-branch's) are seen, so the scan cannot pass on an empty tree. +/// A family's matcher reads its member, its object key quoted or bare and its settings named, never the command or +/// the word that shares its name. #[test] -fn the_committed_spec_keys_are_named_only_as_not_a_setting_here() { - let keys = committed_spec_keys(); +fn a_family_matcher_reads_a_key_not_a_command() { + let matchers = not_applicable_matchers(); + let graphify = &matchers + .iter() + .find(|m| m.token == "graphify.*") + .expect("the graphify row") + .matcher; for key in [ + "graphify.enabled", + "\"graphify\": {", + "graphify: {", + "graphify = {", + "the graphify settings", + "Graphify config", + ] { + assert!(graphify.is_match(key), "{key}"); + } + for not in ["/gsd-graphify", "run gsd-graphify", "map graphify docs"] { + assert!(!graphify.is_match(not), "{not}"); + } +} + +/// The keys upstream writes: the roster's, and each dynamic pattern's written form (`phase_commit_docs.<phase-id>`). +fn upstream_keys() -> Vec<String> { + let (mut keys, _) = upstream(); + let manifest: Value = serde_json::from_str(MANIFEST).expect("manifest"); + keys.extend( + manifest["dynamicKeyPatterns"] + .as_array() + .expect("patterns") + .iter() + .filter_map(|p| p["description"].as_str()?.split_whitespace().next()) + .map(str::to_string), + ); + keys +} + +/// What the guard reads, `(path, text)`: every asset, every prompt golden and every install golden. +fn guarded_texts() -> Vec<(String, String)> { + let root = Path::new(env!("CARGO_MANIFEST_DIR")); + let prompts = root.join("tests/golden/prompts"); + let goldens = files::under(&prompts) + .into_iter() + .filter(|path| { + path.extension().is_some_and(|ext| ext == "json") + && path.parent().and_then(Path::parent) == Some(prompts.as_path()) + }) + .chain(files::under(&root.join("tests/golden/install"))); + let mut texts: Vec<(String, String)> = asset_texts() + .into_iter() + .map(|(path, text)| (format!("assets/{path}"), text)) + .collect(); + for path in goldens { + let text = + std::fs::read_to_string(&path).unwrap_or_else(|e| panic!("{}: {e}", path.display())); + let rel = path.strip_prefix(root).expect("under the crate"); + texts.push((rel.display().to_string(), text)); + } + texts +} + +/// No key the Not applicable table lists is named by an asset or a golden as if it were a setting: `@gsd/core` does +/// not declare it, so one agent reads it as unset and another as on. A line names such a key only to say "not a setting +/// here" (or "not settings here"). The keys are read from `spec/settings.md`, the secrets row left out, and the scan +/// cannot pass empty: every matcher finds the upstream keys its row lists and a line of the upstream snapshot, and +/// the lines that say `commit_docs`, `search_gitignored` and `pr_strict` are not settings here are seen. +#[test] +fn no_asset_names_a_not_applicable_key() { + let matchers = not_applicable_matchers(); + for token in [ "commit_docs", - "phase_commit_docs", - "search_gitignored", - "pr_strict", + "phase_commit_docs.<phase-id>", + "planning.search_gitignored", + "planning.pr_strict", + "planning.sub_repos", + "graphify.*", ] { - assert!(keys.contains(key), "the row lacks {key}: {keys:?}"); + assert!( + matchers.iter().any(|m| m.token == token), + "the table lacks `{token}`" + ); + } + + let upstream = upstream_keys(); + let snapshot: Vec<String> = files::under(Path::new(gsd_kit::snapshot!())) + .iter() + .filter_map(|path| std::fs::read_to_string(path).ok()) + .collect(); + for m in &matchers { + let own: Vec<&String> = upstream.iter().filter(|k| names(&m.token, k)).collect(); + assert!(!own.is_empty(), "`{}` is no upstream key", m.token); + for key in own { + assert!(m.matcher.is_match(key), "`{}` misses `{key}`", m.token); + } + assert!( + snapshot + .iter() + .any(|text| text.lines().any(|l| m.matcher.is_match(l))), + "`{}` matches no line of the upstream snapshot", + m.token + ); } + + let says = regex::Regex::new(r"(?i)not (a setting|settings) here").expect("the allowance"); let mut allowed = BTreeSet::new(); let mut named = Vec::new(); - for (path, text) in asset_texts() { + for (path, text) in guarded_texts() { for (n, line) in text.lines().enumerate() { - let lower = line.to_lowercase(); - let hits: Vec<&String> = keys.iter().filter(|k| lower.contains(k.as_str())).collect(); + let hits: Vec<&str> = matchers + .iter() + .filter(|m| m.matcher.is_match(line)) + .map(|m| m.token.as_str()) + .collect(); if hits.is_empty() { continue; } - if lower.contains("not a setting here") { - allowed.extend(hits.into_iter().cloned()); + if says.is_match(line) { + allowed.extend(hits); } else { named.push(format!("{path}:{}: {line}", n + 1)); } } } assert!(named.is_empty(), "{}", named.join("\n")); - for key in ["commit_docs", "search_gitignored", "pr_strict"] { + for token in ["commit_docs", "search_gitignored", "planning.pr_strict"] { + assert!( + allowed.contains(token), + "no line says `{token}` is not a setting here" + ); + } +} + +/// The advanced settings workflow reads and confirms only settings: every `- `key` (default: …)` line of its +/// `read_current` step and every row of its confirmation names a key `@gsd/core` declares (a static key or one of a +/// family's) or one the owner table gives another `@gsd/*` extension, never a key the Not applicable table lists, and +/// every key it reads has its row. Its questions are asked by header, so this is what holds a question's key. +#[test] +fn the_advanced_settings_workflow_reads_and_confirms_only_settings() { + let text = asset("gsd-core/workflows/settings-advanced.md"); + let read_line = regex::Regex::new(r"^- `([^`]+)` \(default:").expect("the read pattern"); + let read: Vec<String> = settings_step(&text, "read_current") + .lines() + .filter_map(|line| read_line.captures(line).map(|c| c[1].to_string())) + .collect(); + // the confirmation is a table inside the step's text fence, read as one + let confirm = settings_step(&text, "confirm"); + let fence = confirm + .split_once("```text\n") + .and_then(|(_, rest)| rest.split_once("\n```")) + .expect("the confirmation's fence") + .0; + let rows: Vec<String> = gsd_kit::markdown::tables(fence) + .into_iter() + .find(|t| t.header[0] == "Setting") + .expect("the confirmation table") + .rows + .into_iter() + .map(|cells| cells[0].clone()) + .collect(); + assert!( + read.len() >= 20 && rows.len() >= read.len(), + "{read:?} {rows:?}" + ); + + let roster: BTreeSet<&str> = gsd_core::settings::key_names().collect(); + let settings = declared(); + let families: Vec<&Declared> = settings.iter().filter(|s| s.name.contains('*')).collect(); + let owners = other_owners(); + let na = not_applicable(); + for key in read.iter().chain(&rows) { + let owned = roster.contains(key.as_str()) + || families.iter().any(|f| family_matches(f, key)) + || owners + .iter() + .any(|(_, tokens)| tokens.iter().any(|t| names(t, key))); + assert!(owned, "`{key}` is no setting of a `@gsd/*` extension"); assert!( - allowed.contains(key), - "no line says `{key}` is not a setting here" + !na.iter().any(|t| names(t, key)), + "`{key}` is not applicable" ); } + let unconfirmed: Vec<&String> = read.iter().filter(|k| !rows.contains(k)).collect(); + assert!( + unconfirmed.is_empty(), + "read but not confirmed: {unconfirmed:?}" + ); } /// The spec is committed like code, so no asset makes its commit conditional or treats an ignored spec as a skip: no diff --git a/gsd/core/wasm/gsd_core.wasm b/gsd/core/wasm/gsd_core.wasm index 37f235dcb2..27b7b1230c 100644 Binary files a/gsd/core/wasm/gsd_core.wasm and b/gsd/core/wasm/gsd_core.wasm differ diff --git a/gsd/core/wasm/inputs.json b/gsd/core/wasm/inputs.json index 3a2519c0ff..c129f0f6ae 100644 --- a/gsd/core/wasm/inputs.json +++ b/gsd/core/wasm/inputs.json @@ -1,19 +1,19 @@ { "artifact": "gsd_core.wasm", - "artifact_sha256": "0ef1b4800e898bab9de11f4da71bbefe903f68d4554ebc55ce365e71d1614f70", + "artifact_sha256": "4852d627412b4c8694f31fdd97d0db73bac35de8fcd02be688efd56f74c28813", "built_with": "rustc 1.99.1 (58cf8f9c3 2026-10-13)", "inputs": { "Cargo.toml#workspace-inherited": "9e0489b27be2c7fd7820cd1d3b2e145c1a7793b4d2dca8320df80d1c29c0e984", "crates/leaf/protocol-types/Cargo.toml": "e8afa3ac4c33d7a09f8c9879d9d87ca2cc0e8d23961abdf867051496f874c176", - "crates/leaf/protocol-types/src/calls.rs": "291591d4f2af05bccc28aaf9eb0ca85d8713a4ded15c7e083931d9e7432dd93c", + "crates/leaf/protocol-types/src/calls.rs": "39f197fe1698bbb655c58b2db4fc2dcf87308087a225273cbb4d4ba355a930ab", "crates/leaf/protocol-types/src/calls/collect.rs": "0c3c76ea80dd4c6a05396627fc20a209022ae8dbe34640be3790fd4f06269b50", "crates/leaf/protocol-types/src/calls/evidence.rs": "f10687676e8c14a0cf4046bf35e57366087df4b698104329efd164e707a4d983", "crates/leaf/protocol-types/src/calls/facts.rs": "9aa11df0902f2393c0f758d2ddb0e8747cc4d4afda5a0faff8b20e31ec6d710e", "crates/leaf/protocol-types/src/capability.rs": "4627081c09404e932df880773cfc6dc9784b443866228b02c25e6248cc68b59e", "crates/leaf/protocol-types/src/checks.rs": "ee4ed29565dc59dcfd60d7b024f2353c0786cee4bbadb444fbe3a9ef42fbfe66", - "crates/leaf/protocol-types/src/code_catalog.rs": "de6900b40ec736a8dbcc88073914de8db54c1d80a35ad482b4a092c2b19d5ea4", + "crates/leaf/protocol-types/src/code_catalog.rs": "cc778e521f7d531d586495b6b3635d010335074d86a5648264cca8288df95008", "crates/leaf/protocol-types/src/command_args.rs": "ec81e38e7b000cc15b4b7c26e9fe5de602f0d98764c3af4f466e6225c41866b1", - "crates/leaf/protocol-types/src/context.rs": "8a46bafc21c692caa5f1513672cdc6dd65de6ea4af48d09076f47e7953522130", + "crates/leaf/protocol-types/src/context.rs": "021031ef574b54813a7b407c26fb9cfd03eb03028a27f9881f0d12c008e05b79", "crates/leaf/protocol-types/src/contrib.rs": "85269d1993bdfdfda5aae190f5702a645e8a570cc0deb91941b30600f00e9c50", "crates/leaf/protocol-types/src/decimal.rs": "0a603f97eee8f30bc3d5aacfe50f0fa1988386e1a4c64da30be317a707c01204", "crates/leaf/protocol-types/src/declaration.rs": "18175c760d067247a089ded8ca770fca8f8825d20ae329e35eb52f114b9e7963", @@ -25,7 +25,7 @@ "crates/leaf/protocol-types/src/judged.rs": "9e7f691b8b9d646332518c093757645a7c1672132ef0c95b516b9c3e25f6e317", "crates/leaf/protocol-types/src/lib.rs": "44361061188f992f56bec699d749a431997c10309622246bc9ae714e42649d43", "crates/leaf/protocol-types/src/operation.rs": "55e6b1e358c026ca56d6324410806f8cd4cce697f1f361abfe9ad624985012a5", - "crates/leaf/protocol-types/src/plan.rs": "46c6410e982993e0adfc55709b69583ec8414e3d170249d0922749cc20e4af76", + "crates/leaf/protocol-types/src/plan.rs": "7a41d42b439411283e08ef8fc270b6fdd86eedf8aceea6b190264fe11e4ff54a", "crates/leaf/protocol-types/src/ports.rs": "fe253dac3665743f6cd9435f38410a211f914a3f46cb3a7469071b9ed76106dd", "crates/leaf/protocol-types/src/prompt.rs": "bf7b8aac6fa77da1df46b14eaa14f81c1e98bfeae4a97b2c582878765b36d20e", "crates/leaf/protocol-types/src/reads.rs": "f9fd2b408d3946551bbbe8bcdd6c29e985216512d839967ef384b7c70317c772", @@ -38,16 +38,16 @@ "crates/leaf/protocol-types/src/tokens.rs": "712d002d00fec879b8f594f775bb25513ead53ee61d11978478c36d83bfbe9b1", "crates/leaf/protocol-types/src/tool_input.rs": "0e7e9603b820339efea2266baafcd42ba39323b287b0f682a2bb509227590b17", "crates/leaf/protocol-types/src/trigger.rs": "4e76e4d280ed72934f33b823c9c2bb2a80648b1fb227c594ba9385ee2c60d422", - "crates/leaf/protocol-types/src/version.rs": "0d1e08bd120b7a8ab343543533b0946070f9d1428f3d31a8cba188890c05b858", + "crates/leaf/protocol-types/src/version.rs": "83c7e996a370da5fe1ad1966521d6a67803a5d8e0a62b3dee6ce4ccf00e3fe1e", "crates/leaf/protocol-types/src/vocabulary.rs": "c3bea56db4bb5cfc84ce400db7750b2eb33c58dcbf11e5b3f2761683341675b5", "crates/runtime/extension-sdk-macros/Cargo.toml": "2845656f0847efeddb37aecc91031adc3396747949aa0e090cdad31644824544", "crates/runtime/extension-sdk-macros/src/lib.rs": "05b9dfd092444a55acc0993f35172ee3d0e4db9b6b1bed77682ce912ba54f67a", "crates/runtime/extension-sdk/Cargo.toml": "41c03d21f457d3e7394d86a625742a525700ac1ddcb92b49487e0fc5dcaa2797", - "crates/runtime/extension-sdk/src/builders.rs": "e47433bc3d3036efd7046f6c53f415efe17c16a79c073c107488d21be0ac79b4", + "crates/runtime/extension-sdk/src/builders.rs": "712ce82c6d226ff013d182d06e5fe6c64eafd2bf262bf12b24ff491828cbfe0a", "crates/runtime/extension-sdk/src/capability.rs": "e6c88ecbe2e9ce2a5c6da397559ec9f846183bb9142f37765b1b329a0bf16667", "crates/runtime/extension-sdk/src/checker.rs": "4d89b64155c3a6fce020c07e432eb9f6d38320e14b3d4623fd89a3f7ae7ea3e7", "crates/runtime/extension-sdk/src/command_graph.rs": "e88d26d3134c7591aa1afeee1f432ecdf0437a191c23b5d2eb50a50a0b7e5562", - "crates/runtime/extension-sdk/src/context.rs": "f497b31a63b06b8211cad5b4d46ad9439218d7e5e8240833d9f6d8328411e64e", + "crates/runtime/extension-sdk/src/context.rs": "a4c25a5f8ae610ac6a24c0e493729c7c2e206d43fc716a67c9f346dc023fc1d1", "crates/runtime/extension-sdk/src/contrib.rs": "68d63b1213a97250f15f6483640adff7aa887c10bb862db47d8bbfc476f10a68", "crates/runtime/extension-sdk/src/guest.rs": "e18eb17771e02eedc6e907d4fd31a0f7987e1a68cbe07470acf3cc5efdc74280", "crates/runtime/extension-sdk/src/host.rs": "0a93b725e2c10697667feb0df0728651d58ea8eebad2f879906d87779494928a", @@ -57,7 +57,7 @@ "crates/runtime/extension-sdk/src/judged.rs": "4d5ca738008c0aaa9cc88e70de2051778928021efe2c2b251ae6f4fcfd57190c", "crates/runtime/extension-sdk/src/lib.rs": "73ea8baf8b13f290a8161e1328ba7c1bdb3335ab036a2fea234340fa5aaf3ba4", "crates/runtime/extension-sdk/src/operations.rs": "231bea810e55f51e00d818843b75aa64013afd16a40f3a088a55fee9a2b68b50", - "crates/runtime/extension-sdk/src/plan.rs": "fa82351f666b7e42c301701872da54b0311a5c90fa53ed94545f68ee11992b34", + "crates/runtime/extension-sdk/src/plan.rs": "858a4310f5d5dc861aa135f126d499ef01eedd201565bc5b96ba305d7d1180af", "crates/runtime/extension-sdk/src/prompt.rs": "bf47ef66a158c9830beff1570619fc16029b8a8589bfde475eb4741a09034c95", "crates/runtime/extension-sdk/src/reads.rs": "41f590418a4571c222647aa1e3ff3c5f54d2aa59c92bbd4c251f3450b908195d", "crates/runtime/extension-sdk/src/route.rs": "a81851e96dc1df5b2b325497e34f301f016e15b6743fd9a49eef9aeb9b8f80f6", @@ -77,23 +77,23 @@ "gsd/core/assets/agents/gsd-doc-classifier.md": "5fbd627cce97a770faba497f00c38a1d27abb032c1ac17942e90008f09614836", "gsd/core/assets/agents/gsd-doc-synthesizer.compact.md": "a920f397a884fcdc43eb125ac2d9339bf25a8950d3c44ad7b68d52008e1ce76d", "gsd/core/assets/agents/gsd-doc-synthesizer.md": "942675a174ee04f5ef0140d49009126f04082892cdc4f638e021efc05c9f0ed8", - "gsd/core/assets/agents/gsd-executor.md": "13bec1b7efdd5ddd68479357dc4af800a33b5c7c59dafc59d1bf0edcff877a05", + "gsd/core/assets/agents/gsd-executor.md": "935e4c92f240c39936f0c56ea84f235c109973485fbf147095fb92866154d2d2", "gsd/core/assets/agents/gsd-integration-checker.compact.md": "10d678fc27dd1e3cad6ba895740cc99b3b78ae916a29d237e32c0181af9553d4", "gsd/core/assets/agents/gsd-integration-checker.md": "7f076dc9395cda53bc1296c6343f076761b597828a0495008ad5e73eb7e3aecb", "gsd/core/assets/agents/gsd-nyquist-auditor.compact.md": "57b3be398e2ad56021dd18be3af7bfcfef82e331d6bc22fafa730a09fbe173f8", "gsd/core/assets/agents/gsd-nyquist-auditor.md": "43f9ff711ea3c8f86a7ab6cb9a1369151f4bc3ea41eca38ab0e35297de681969", "gsd/core/assets/agents/gsd-pattern-mapper.compact.md": "d6ace1e2bdd25c2b4d9b36c52ee58c2131e10428ea74be499521af02a1b415b6", "gsd/core/assets/agents/gsd-pattern-mapper.md": "0dac7ee2ebbcc2d9ee09a5fa62a9744b63ca0aaf202e7a3c385d0ecf1e5afda7", - "gsd/core/assets/agents/gsd-phase-researcher.md": "06b395a8c409dd49f21373846dd10b1d0a340579cb823f0932525ccef97b3c79", + "gsd/core/assets/agents/gsd-phase-researcher.md": "9041e60bb1c0187ee8b1da09a64a81ce889687bd5d54a08c43e51e8e284ece78", "gsd/core/assets/agents/gsd-plan-checker.md": "c8a5d65076be93e2bbc6dfdfc747de0bafd7a0a7b80941f5a0557cea6229468e", - "gsd/core/assets/agents/gsd-planner.md": "ed15722e6a395de29f06ac00b619f7928b0c4bb271117d766190e08a5001c2ea", + "gsd/core/assets/agents/gsd-planner.md": "5d01cff404020d54204bb0bdb4a1866418834c08ff1d765ee21437fa710b0b24", "gsd/core/assets/agents/gsd-project-researcher.compact.md": "5789c2bf238beb219c96459c7d92629559c73ef9cf0840f906e8e6420861f723", "gsd/core/assets/agents/gsd-project-researcher.md": "7c34a405045f18a7b34e1c8863a7f6cd7002bd96364122b7a8eefa4cd1e401e9", "gsd/core/assets/agents/gsd-research-synthesizer.compact.md": "46b8d343428f3342925112155bfdd547c4ad69f1e15d347bee814620124f3cc8", "gsd/core/assets/agents/gsd-research-synthesizer.md": "5bdca3be65d6bbe24d7868995afeeddd65f93106a81eb7fc8642c30df1660097", - "gsd/core/assets/agents/gsd-roadmapper.compact.md": "62f197021d5a3cfb405c7aaf1f6ee5cf57078f0e4b4cb95f87c911d49a84f760", - "gsd/core/assets/agents/gsd-roadmapper.md": "d57cd9c9d702973e959d4271ee1023034cb12dc6b8451c71912544f3319b8d33", - "gsd/core/assets/agents/gsd-verifier.md": "da28eab7b1da1314ad4fcce64781e4b452e2e6af4828867e7aea6dc2b253b254", + "gsd/core/assets/agents/gsd-roadmapper.compact.md": "0e5017f1709e28906d3d802055ba093cae2dae6c492d7f1f6e172e5046bc5351", + "gsd/core/assets/agents/gsd-roadmapper.md": "81b700f319b91d2e9cc81ed9f35ad3641e3946f984d2ced14ac3d10098265008", + "gsd/core/assets/agents/gsd-verifier.md": "5ded6849067ec827e86b62a6e20cea94db58aa1c2deb448d65e135ed2eba67db", "gsd/core/assets/commands/gsd/add-tests.md": "784641ab46b60bfca024c74bb223583101978c752b1fe2f3c170429157c5e015", "gsd/core/assets/commands/gsd/audit-milestone.md": "9fb3baafba1ca2f456cefbeffbec918f20f0a94354c57c2c2c2452a0e358bc82", "gsd/core/assets/commands/gsd/audit-uat.md": "19ee291e7318c427b272e184f162dead621a02d3ebfda8d5ede447384ea8b987", @@ -138,9 +138,9 @@ "gsd/core/assets/commands/gsd/workspace.md": "d8c93eb2b61b411d91a59e4492f63a6158ba1e13f1c877602b96d399cea9b6c0", "gsd/core/assets/gsd-core/references/agent-contracts.md": "f4b1a7aea742d9e0f127ca5daffdc1e9654a0f2ed55d84130eb60ecdc76e7c45", "gsd/core/assets/gsd-core/references/agent-skills-bootstrap.md": "8b3e4bef122f1cd228edcf8fae6c167b66864617894bf13b33dd8300f28a070b", - "gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md": "5e5baabb7a50ba47fee01b61bb83a6594554001f056b064156a10e6af3d83767", + "gsd/core/assets/gsd-core/references/autonomous-smart-discuss.md": "f49f1ce1f9b166f7e1494df7b395cf421eff3bb12b516ec201c5ba140cfe7ec5", "gsd/core/assets/gsd-core/references/autonomous-ui-design-contract.md": "c9aac3eac59b007187365ecf62e4caac6e2db4d725b1d73975f0003930f2101c", - "gsd/core/assets/gsd-core/references/checkpoints.md": "b5688ee79a2cf65b146d0c4a7fd1ba6e9be94c97557331c5a5369af4d235ea97", + "gsd/core/assets/gsd-core/references/checkpoints.md": "0ebfeb669ffcc3936c7b0e83daef3cd4f5807b81635d5470fbd76e6e7d7f58fd", "gsd/core/assets/gsd-core/references/compact-content-gate.md": "c4f2782f9a7c728a6e53e9abc109b4ba8517f01362c5bd403ba3c5992c16124d", "gsd/core/assets/gsd-core/references/context-budget.md": "d6c8435aefa5fefddb8c027cc5b22410c825a26512647a221752a39fb8cc19d6", "gsd/core/assets/gsd-core/references/continuation-format.md": "bc91a590dff4f3ae231865447aee85f9ffdbbc27bee6ac65cd999305aec6888a", @@ -153,15 +153,15 @@ "gsd/core/assets/gsd-core/references/execute-phase-context-guard.md": "065c70211050ff0eafda589ef3652a1f7fb00ea9cdbee8326af513802f5d5f5e", "gsd/core/assets/gsd-core/references/execute-phase-quota-recovery.md": "2e0860582198bfe8da72d724fa5e80c66b1abf67360dd02d90ed1f4f891bc1bf", "gsd/core/assets/gsd-core/references/execute-phase-requirement-revert.md": "a9976e6a30772a34482c635eb890a13042b474a5657b566bc8a46014b88e178e", - "gsd/core/assets/gsd-core/references/execute-phase-response-language.md": "b43931b35e406dbbeb8ef9785e4b0b5d29db7c65ac6106e282f4fd3b393e6ec2", + "gsd/core/assets/gsd-core/references/execute-phase-response-language.md": "0a8075a05f0aec25425df7bad50edd590228d54186c57fe95cf429c09b63d1a2", "gsd/core/assets/gsd-core/references/execute-phase-wave-guard.md": "218929681f81590090e313691a13ace359adcd825d8b5f0ea1b389e2dae9e279", "gsd/core/assets/gsd-core/references/executor-examples.md": "1372e272f2ddaa923cbae209baae71864472b753fc5bf7be973c1c7ea2172101", "gsd/core/assets/gsd-core/references/failing-direction.md": "9ec8893b11131b1a796f0c0e2d96f76cd1d597cf227b7f6be0a4208ce9b36c1a", "gsd/core/assets/gsd-core/references/few-shot-examples/plan-checker.md": "5a60543b630699d54929300dfc5ab595bec48b5cc8f5a3cb625fefce675fab28", "gsd/core/assets/gsd-core/references/few-shot-examples/verifier.md": "46763bd6c542b5a49f381038bda29781dc08d8f80c02d5635003c9da75a85c8c", - "gsd/core/assets/gsd-core/references/gate-prompts.md": "75c02dbd51970c25a61a42d18908304e2b568aaafd2d59b433559c3c8a9f6ac1", + "gsd/core/assets/gsd-core/references/gate-prompts.md": "144eec92b19838a64a18f9e76d4d324c8fccf1e664d8967cde5a9ff7b0199442", "gsd/core/assets/gsd-core/references/gates.md": "ecbf809e53bdd59f809b34d013b58ac554d1f7de2ddc345e955b2b9db7c21bce", - "gsd/core/assets/gsd-core/references/git-integration.md": "fe8b00422917f6b54d3fec34402ae50a5889528bd951bc53ea704936ebe28330", + "gsd/core/assets/gsd-core/references/git-integration.md": "f31ec92282ddc522a826df2f73d634c8ae6a9447a53b3725a1c8e4b7706a3e82", "gsd/core/assets/gsd-core/references/gsd-run-resolver.md": "b897d84c277ad309a50e4c1a26352c1304abf7af3c1c485158b90467c0e70588", "gsd/core/assets/gsd-core/references/honest-verifier.md": "92a4b29b0dc7288292d01fad782c3f6ef10a62cab52c7ba3888fee3e82b64dc3", "gsd/core/assets/gsd-core/references/ios-scaffold.md": "4b6f35da5699a386edb11283a06c29ec835538536d265566d725823839850e0b", @@ -170,15 +170,15 @@ "gsd/core/assets/gsd-core/references/model-profile-resolution.md": "824418d86564ea7d9e37746b566ade7672dd4e8fc48c65c3fd07dffb819bac3b", "gsd/core/assets/gsd-core/references/model-profiles.md": "c7857363b163e61ce5c5519a950fd76bc87491729321f29edf5e59dcc3c18e11", "gsd/core/assets/gsd-core/references/mvp-concepts.md": "04ed53e166c3434fe1f1ccb8ebe43fc31ee168ffd05c82a7f6fe19d06890a007", - "gsd/core/assets/gsd-core/references/nyquist-compliance.md": "b6a5733276474fd66cbec0fb5b83c052df5db48e72615e79a7bf94573c4dfd06", - "gsd/core/assets/gsd-core/references/phase-argument-parsing.md": "6fef04c0f53ea1cf96e7619450ef15fd7b5dc419a3f0e4f71faab59ee9d0eb93", + "gsd/core/assets/gsd-core/references/nyquist-compliance.md": "580e2221fa669dd042ecf7890fea955cb2c7b88a7dd77030e5e33af074a729c6", + "gsd/core/assets/gsd-core/references/phase-argument-parsing.md": "e1da689db22b2204a0e673aff7e235a959afcbbb4c0930fc28015ec13db7388a", "gsd/core/assets/gsd-core/references/plan-checker-examples.md": "cb0fcb8bb17d5d1f05e5b82d01018ee4aea0f1ab78a3ef17f84af59dfe61e15f", "gsd/core/assets/gsd-core/references/planner-antipatterns.md": "241b3247115b0b39b3e944043cbbe0795fe8efe50ca4664bf2d7021cacf70369", - "gsd/core/assets/gsd-core/references/planner-chunked.md": "1a1306fdc827aff719faa8926abc6d944275416399e7504f996172a1006aa275", + "gsd/core/assets/gsd-core/references/planner-chunked.md": "435fdb7b7438249751c87e48e5e9f320104d43356cb051c40f397f2f6632017a", "gsd/core/assets/gsd-core/references/planner-coupling.md": "905cf33c40cbd5ce3009ca8f92110bb867aafef970544bdf2e1853a8e624724f", "gsd/core/assets/gsd-core/references/planner-failing-direction.md": "61405e055eae4cd63cd7825758bdb36a6fa4f586bcaff0501088e5a52231d84b", "gsd/core/assets/gsd-core/references/planner-gap-closure.md": "68f4405885e689fbd9791c41273c0fb7af63d1e2e33fb2ebc81ea203fe2136b8", - "gsd/core/assets/gsd-core/references/planner-guidance.md": "6dd8227f19576217b71a4edbdad076796b5073ea2272bb9892dc03bd7ccbd0b4", + "gsd/core/assets/gsd-core/references/planner-guidance.md": "d765d7d001a6c71ad6cd9b54230c624649a7e8dd360580f6b4e66ebb33d70dc0", "gsd/core/assets/gsd-core/references/planner-interface-context.md": "83c3a216f2ef59363cad344636fbfb5649a06db438e859c2cee22bb86b020ce5", "gsd/core/assets/gsd-core/references/planner-load-graph-context.md": "4498acf05214f80e0b07d19c22ca3d29375d91bba8c1cd794ff28a0f0c48bb21", "gsd/core/assets/gsd-core/references/planner-mvp-mode.md": "13c2fab8b52c6c55a70b9f1b4e23ec9a825dcfcf948666b3eac0a0a35db2627a", @@ -189,7 +189,7 @@ "gsd/core/assets/gsd-core/references/planner-revision.md": "5be7b7321059085ced4893e9bb27e38e8b925339ef2911c3646be7970a93344c", "gsd/core/assets/gsd-core/references/planner-source-audit.md": "312679e4a156b4225e32f1f06d81d9b07dd6ab2fd034ad0997281345fcbd3c94", "gsd/core/assets/gsd-core/references/planner-verify-command-grounding.md": "7c17a4de8b22414931fccff988d8cbf82b530b06f8c895243f7f1f5c91db5984", - "gsd/core/assets/gsd-core/references/planning-config.md": "7b7dd96423818584528e1f7d3738fa16ed609aae7758d806ce8375e7d5feceec", + "gsd/core/assets/gsd-core/references/planning-config.md": "7772fad53eede1dd5bbf36d37a1c55c392d99fd1a803ffb05c85894a38b918d0", "gsd/core/assets/gsd-core/references/prohibition-probe-fixtures/01-streak-reminder/expected.json": "f10df472f2846cc62779f4cb686d7abfc76e5b66571e4d13d84f80aced83408a", "gsd/core/assets/gsd-core/references/prohibition-probe-fixtures/02-clean-utility/expected.json": "31e8a781eeffe02099947f62a0de445af72b07a2cf444bcfa882a8d234f10018", "gsd/core/assets/gsd-core/references/prohibition-probe-fixtures/03-multi-prohibition/expected.json": "70a532a7cc1b6ae8b71ac16c959bcaba49261b2df550b7bc92dca669c2759459", @@ -208,13 +208,13 @@ "gsd/core/assets/gsd-core/references/skeleton-template.md": "9d1c5ba61042457d8f15917744bb28396a6272066066b116038ab40a62ea504f", "gsd/core/assets/gsd-core/references/specless-probe-fallback.md": "ca145f35752dc0fc77676cde18f3448f9f778664e41943f93117f6f94c4b93fe", "gsd/core/assets/gsd-core/references/spidr-splitting.md": "2c92dc43de5a74643686d4da7827a014f35d9d0e15fc760119c00486d7c1eb2e", - "gsd/core/assets/gsd-core/references/tdd.md": "2bd1c2678913c94aa5e33d2192c567034081ddf6778c8d60ef10f7d85990527c", + "gsd/core/assets/gsd-core/references/tdd.md": "c2080269f5a7679b704afb981b1b14cb3d2c6618c9b8e70e0f959e021421cf6f", "gsd/core/assets/gsd-core/references/thinking-models-execution.md": "81c67d4b2caca399e7ad4c2c7c44f1d4d1df753224fdffee4cceeed132eb6abb", "gsd/core/assets/gsd-core/references/thinking-models-planning.md": "d71e5051d27db5a9d17055e090d4e4401535d3b04a2d372434f3f1bed849fa44", "gsd/core/assets/gsd-core/references/thinking-models-research.md": "bfa708e1a23301bfd1a2ebff63f0cde7911a88a874c06a8e8dd03a7c41f6a72f", "gsd/core/assets/gsd-core/references/thinking-models-verification.md": "8cf8281b5fba6e2980e9729052b69c10e2030937f938daad06b3de4e64a8b2d0", "gsd/core/assets/gsd-core/references/thinking-partner.md": "5be5247e20a70a821eed4f193835fbdaf44f2e16f0875fcc53164f37b0a4fb53", - "gsd/core/assets/gsd-core/references/ui-brand.md": "b93a4f1315c9c4dc7f81c346814f3b25d193a69e60ab97de73764f2c055fbd3c", + "gsd/core/assets/gsd-core/references/ui-brand.md": "f776e0f969ebeb57b772866cc4283a524ed1b5e675455d0c565fcdaf2341d241", "gsd/core/assets/gsd-core/references/universal-anti-patterns.md": "1d22bd4e1f3d7da760616aa21cf5714adfd3020e617a527fe81a45b486f36c24", "gsd/core/assets/gsd-core/references/untrusted-input-boundary.md": "25e076115c2378fbcdcf02162d0b8b09cda475e39872fde45aa4c22d391334d1", "gsd/core/assets/gsd-core/references/user-story-template.md": "b9fc07991300fa6e3f6c4ba0a98c309adc6fb4288b85720eb70972b9b9bb2e1f", @@ -227,12 +227,12 @@ "gsd/core/assets/gsd-core/references/verify-mvp-mode.md": "e5cdc95f4d26d2abd9f027d5a7a1dd49ad92ee31b4ca647ed41a44975d3ae0d9", "gsd/core/assets/gsd-core/references/workstream-flag.md": "dd6ec14528af307198c17f6057c182b720f04aec773b830b76f7343676dfd093", "gsd/core/assets/gsd-core/references/worktree-branch-check.md": "4057e0979e66dea4f6dee8a2061ad7600a729e54b0dd987134737bccc29e0953", - "gsd/core/assets/gsd-core/references/worktree-path-safety.md": "535b0ab15ba50b5226268e8faf970e063658d98193ef5280ac2fe6a855ee3454", + "gsd/core/assets/gsd-core/references/worktree-path-safety.md": "25f7db586a2ac12e6bba4330ba386c8110b46584c5b8a6fcda44fd226f039510", "gsd/core/assets/gsd-core/templates/UAT.md": "763829b34c3795cc5463214b37b3a84f5b6c53c7a6f3dd12408cabde62c78619", - "gsd/core/assets/gsd-core/templates/VALIDATION.md": "57cff7ed56eba3af0bfce88e315f9099700b9855202b2b505dcf0c1f0433e674", + "gsd/core/assets/gsd-core/templates/VALIDATION.md": "f41d12019d89270edd88292e0c741977c9b673017ba84f28da5dbad1c5ed4ef6", "gsd/core/assets/gsd-core/templates/context.md": "277952a786ea463429b18868e9f92d6ae768a8d37819086dc0e56932e06c2b51", "gsd/core/assets/gsd-core/templates/milestone-archive.md": "f90a994fd7bfba8dba83ca5a29ea7e7afe8656414c685d58fc07bdb999e8ede6", - "gsd/core/assets/gsd-core/templates/milestone.md": "e721b8cd22c6eb67a8c67a31d14170ba393ae46d249378649a5d38918ac84f43", + "gsd/core/assets/gsd-core/templates/milestone.md": "e5525ca4bd0b70bdb246b3ee2af663285720ec862e6f7e94495ffcbb00a1c201", "gsd/core/assets/gsd-core/templates/project.md": "99ef8b0675469331f3247bde5c35e82346ca4ed21a9d86452d97d9b0ad820b0d", "gsd/core/assets/gsd-core/templates/requirements.md": "1c55917a63207e34dd1b120b06da77a3165350cdf19a6c9673eea6d53161b1c5", "gsd/core/assets/gsd-core/templates/research-project/ARCHITECTURE.md": "26eb2d194c69f85240b5581eb4ee2e63c7ecff5ce688a8d14b2e6dde1e44db36", @@ -241,33 +241,33 @@ "gsd/core/assets/gsd-core/templates/research-project/STACK.md": "3d412a0df7546f37ed903f458815c25d4fab7f5fe5284dc30f25cd98ec7108fa", "gsd/core/assets/gsd-core/templates/research-project/SUMMARY.md": "ae1771aa09034fe37fb1ebdca5dc10ab6b24d10e6642d2d66870fffad4879846", "gsd/core/assets/gsd-core/templates/retrospective.md": "148e4cdf7877d37e2f1442021363a81b3e69718eecc014ef71b44728ea7f1045", - "gsd/core/assets/gsd-core/templates/roadmap.md": "2e1da37b6b64eb6feae3e1fd9b5274a0676b01a7650a3bc28131160b5823a464", + "gsd/core/assets/gsd-core/templates/roadmap.md": "b0edaf20cd8ee40c080574d360300e4faf272588e3008611b7a91bdde944aef1", "gsd/core/assets/gsd-core/templates/spec.md": "a421fbc9f83533813909e91857ea75c7dea49ff5ff390ae88547bfb448f304c1", "gsd/core/assets/gsd-core/templates/state.md": "596ab17033db590840c865c437b862f2f75a6a6357e3b9956cbe71d4bd90615e", "gsd/core/assets/gsd-core/templates/summary.md": "4eb0d4f054821a0dd688832830de19641829e70487422144e6f5cda0f7cc9520", "gsd/core/assets/gsd-core/templates/user-setup.compact.md": "f6079d92a8be7928b10549416285018d0373c21f05ee29768f916b3a222b1751", "gsd/core/assets/gsd-core/templates/user-setup.md": "517bbea171680735145390d5b2e1c4559798c5b5615ad3bf06afa7a221048838", "gsd/core/assets/gsd-core/templates/verification-report.md": "9e2877b1c43dfbeafd32f27911e15d1acae2011156a1f6bfb64fe85d7f696f21", - "gsd/core/assets/gsd-core/workflows/add-tests.md": "88858b58df2eb98da868068fb942271ab5b94020bb0af96ffb7f4c061e2f8179", + "gsd/core/assets/gsd-core/workflows/add-tests.md": "82e2451a3bbe7d5b3429a09f63e59553a204f5f7bc3d9a68216c021d4f28c0d8", "gsd/core/assets/gsd-core/workflows/analyze-dependencies.md": "04f63a3265d2a33d1c9d4f53de7076caf3cf9957ca2e0991ffc2c472453a010a", - "gsd/core/assets/gsd-core/workflows/audit-milestone.md": "821f60014b1b7b82e1368991b109bb54cd99b071ab1838f5daf4a15a556c85ba", - "gsd/core/assets/gsd-core/workflows/audit-uat.md": "f0a2acf932125af91bf482b65cfdc97b1abee11a40b5d7ffc7de5b660c3855a8", - "gsd/core/assets/gsd-core/workflows/autonomous.md": "4c52eb823520f0da1adb50364cc082cb8b3ffcdf911d8ec82e85492da5379381", + "gsd/core/assets/gsd-core/workflows/audit-milestone.md": "c2734a3602775a019a296949948339feb28459357555c88156aec2ab38dc1563", + "gsd/core/assets/gsd-core/workflows/audit-uat.md": "ee13d1c66521d83b26d6b3e0de47a4f026b432f741b4a71b0c833e3433098a48", + "gsd/core/assets/gsd-core/workflows/autonomous.md": "46061f829549b652252f76d0c5c95840705618910e958f0361903b93f161e69a", "gsd/core/assets/gsd-core/workflows/autonomous/steps/converge-banner.md": "09f54d9f276e20f9774960c3bed018d2f8d686a248fe247064a2d4faf873e5a8", "gsd/core/assets/gsd-core/workflows/autonomous/steps/converge-dispatch-bg.md": "6b6dec65d049ceb70f37c3791398db246d97dfc8e3e17bdb4090c917342d995d", "gsd/core/assets/gsd-core/workflows/autonomous/steps/converge-dispatch-inline.md": "0d1ebcae5a40d7701ccfb189a5597a46479d9a2f6e2bce6386237b3d3191f4e2", "gsd/core/assets/gsd-core/workflows/autonomous/steps/converge-fail-fast.md": "58adde31e7147daca8064bbe59ba8c4bbedd719b1d3d37cf85c4bc961f374a0b", "gsd/core/assets/gsd-core/workflows/autonomous/steps/converge-loop.md": "f4af5e69b726a77156275d5d92336f3901cf572de93216a8eef1d800309eca7e", "gsd/core/assets/gsd-core/workflows/autonomous/templates/minimal-context.md": "2119bf1b3fd7fb7b53b1a5bc6ee3a9bbd31c4f8bb0505482ac28b580043d80cd", - "gsd/core/assets/gsd-core/workflows/complete-milestone.md": "6b413c9c0179798e55d89f57729733bba70f97261bd5c0e6a2f9c1b1ffd096ef", + "gsd/core/assets/gsd-core/workflows/complete-milestone.md": "54efe7361746b62d28d9e2f3bd63fa3d72bf8a619ab2f307fdb6c53af7aaa262", "gsd/core/assets/gsd-core/workflows/complete-milestone/detail/elaboration.md": "40c2addaa6574b5168e0ac4adc1394aee9949189e4d8ea070160e04809d7716f", "gsd/core/assets/gsd-core/workflows/complete-milestone/steps/git-tag.md": "a5bc22f85803f45c9875704d3f8e09e6c457a073c1be4d3262103aa6bc0109b5", "gsd/core/assets/gsd-core/workflows/complete-milestone/steps/project-md-evolution-review.md": "0727c707c8377a19ccc0567b066d59ed00d9e23f6d33faef63d2e288229dcf77", "gsd/core/assets/gsd-core/workflows/diagnose-issues.md": "f49f924e86debddd0f29b2dc2579a4a86be76f4e859ffe6458b38efdee8eb235", - "gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md": "f59236cbd5dd05ab84265b87a577cee2db890eda744847bbc31b3175ef718d39", + "gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions.md": "418f9d81d51792aecaca550fce1ab8a251e9d9fe101f1aaf3f0392c4a50346e0", "gsd/core/assets/gsd-core/workflows/discuss-phase-assumptions/steps/auto-advance-dispatch.md": "7725af9cfc87feecc721c2c80bc0e80b56f2c220d898913c9d96e6f137201443", - "gsd/core/assets/gsd-core/workflows/discuss-phase-power.md": "c5ae2661b95cdc311613c46c677623ed291f086466568cf1d28ff49a75dc5d2f", - "gsd/core/assets/gsd-core/workflows/discuss-phase.md": "92f6f58e0c6665aa3b54b60fb9f23ed71be9afb346b76ff10f469b2931f324da", + "gsd/core/assets/gsd-core/workflows/discuss-phase-power.md": "7e91a2699d9a207b1073c33bb16f144be3c07b2d85e8766b3df31976e1992711", + "gsd/core/assets/gsd-core/workflows/discuss-phase.md": "167735e603539b634ee0a27bc09b2c3127477459a6d21480b57c2ee989668234", "gsd/core/assets/gsd-core/workflows/discuss-phase/modes/advisor.md": "2244cac0376da63716ef4d3fbae927e54bb0dfe6cfe6b7d0f0ba4fcd5f1276f5", "gsd/core/assets/gsd-core/workflows/discuss-phase/modes/all.md": "1c4ad1123dec184b74fda1594858616922a51501ba88887e7aba33594de03ee6", "gsd/core/assets/gsd-core/workflows/discuss-phase/modes/analyze.md": "009859e1e5965ee63d827bea2b49e3b9495f105a80306408e893d38ec927c371", @@ -280,7 +280,7 @@ "gsd/core/assets/gsd-core/workflows/discuss-phase/templates/context.md": "4418d56f2ccf309093e6024adfd0c1d839d09586bdc6193d602001c9ec871e17", "gsd/core/assets/gsd-core/workflows/discuss-phase/templates/discussion-log.md": "ed20ec208dc1fbcdd7b115878d0bca0487cb0066022851933215eca648dcfdfc", "gsd/core/assets/gsd-core/workflows/do.md": "64ef53ceee395f693568239b900d5ca09b5bbf73e64f36b84927f35a4efcf1c3", - "gsd/core/assets/gsd-core/workflows/execute-phase.md": "1c548817a242c83588163624586335682612359327480b190d0f980c12f6c6df", + "gsd/core/assets/gsd-core/workflows/execute-phase.md": "e4e74a0055449a4f05e2541b8532f283a0c8bfcfdb2b9977bd3b5722c3062dcf", "gsd/core/assets/gsd-core/workflows/execute-phase/detail/elaboration.md": "fe38ac23bf9807eacca18f55f95af5f41a3cffa94c888fe92148ed0766515ff8", "gsd/core/assets/gsd-core/workflows/execute-phase/steps/code-review-disposition.md": "7151ef8de587da28fc8ad07827b61127496d359290913889787358cee33a63fc", "gsd/core/assets/gsd-core/workflows/execute-phase/steps/codebase-drift-gate.md": "35d0758a795070066ad44149e0f35af89538836f250adbf6e0e3789fe3d8ca93", @@ -303,44 +303,44 @@ "gsd/core/assets/gsd-core/workflows/execute-phase/steps/wave-post-gate-hooks.md": "aeb445829d6d153a788e94f8fae2c240c85e9b79e77946b51d6eddd86e843096", "gsd/core/assets/gsd-core/workflows/execute-phase/steps/worktree-base-check.md": "52232f5c7d2f13c470bd6f1568ddfaa318d9f7baa39447a06127eb4ad6dcdb7d", "gsd/core/assets/gsd-core/workflows/execute-phase/steps/worktree-recovery-policy.md": "424ebddbc86775c7e376c64a0a3b4c786fb6c11f222a32e0a2c2a8ff59e2f757", - "gsd/core/assets/gsd-core/workflows/execute-plan.md": "eedb5e2e9b725e11a347a58ac2161e79ba3d084a74200bfeda75d94f7038921b", - "gsd/core/assets/gsd-core/workflows/extract-learnings.md": "824f2cd0c689b8bd53444cba2d1824c20b276bad5318c55dc09f23ac7f098546", + "gsd/core/assets/gsd-core/workflows/execute-plan.md": "b07f6c2319cb42ed301fe9aea35286bb852c205d7fac19253e6b9c8e0c35601d", + "gsd/core/assets/gsd-core/workflows/extract-learnings.md": "588e77b7cee8002b7108a26c5bed14a6e04f5e6415079a698c5cd306d400ef96", "gsd/core/assets/gsd-core/workflows/fast.md": "974b976a41544f22a55fcd76800a3ccaf86fdddf4e8e4737d22a6380fbefb511", "gsd/core/assets/gsd-core/workflows/graduation.md": "557ab19095c813ffa8e5a1968b1cad6c4895f3ae1c0bd332bfb23460cd57d760", "gsd/core/assets/gsd-core/workflows/ingest-docs.md": "74d15ee239edd4b2a7eb3ec1f2571ab0dc1aaa27a5bf8aeaab52e156ed9e7119", "gsd/core/assets/gsd-core/workflows/list-phase-assumptions.md": "e30d10b4603da9a316bc14d38a847b4dfcde2ce2eb9bbc2418b4aeb134009656", "gsd/core/assets/gsd-core/workflows/list-workspaces.md": "051b120acb7a1656bc1f92094da56575d7d8552da137d5e456cd7afb35ed93a8", - "gsd/core/assets/gsd-core/workflows/manager.md": "8dce914012a0a3ce525cdd45335d1133ca7b6358da9f644e3e6c868f2da787bd", - "gsd/core/assets/gsd-core/workflows/milestone-summary.md": "81b04d5d74d86402506f098e01367743765f467005f6664e4f2f462b394c26ca", - "gsd/core/assets/gsd-core/workflows/mvp-phase.md": "ef9d67da8bfae9d78be4ee6a2008a112fc70db2a0c0680e47329c733b6c3b5a1", - "gsd/core/assets/gsd-core/workflows/new-milestone.md": "c3984249505ecd3d6f51d7a49ba666ea96a1f8a790c121b5ddf68ee9db36b1a6", - "gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md": "2c01ab5aeca2ec53358c78ce839000887f19c9012ab1e7079065320716e82ca0", + "gsd/core/assets/gsd-core/workflows/manager.md": "dea967c792434792ae4d3420555a55a561db882aedc567943a5445a35c0ac5f9", + "gsd/core/assets/gsd-core/workflows/milestone-summary.md": "75ad6e5a63dc98a985e96f803a72ea7ca6cf740a38eeeb4cbb3d01e567b24e94", + "gsd/core/assets/gsd-core/workflows/mvp-phase.md": "f03f5e8a2a5a93b4e45642c5b2162b874896b89803406305d6a7235d46b2b083", + "gsd/core/assets/gsd-core/workflows/new-milestone.md": "f7afe5b161d4469ba704d3d0e5fc0bdb09783084facc35a98ff7c0d46f7407b9", + "gsd/core/assets/gsd-core/workflows/new-milestone/steps/project-md-milestone-write.md": "b5777ec09a68d2d4e0881a1cae81812cb9185e43038d17fef000c842b39b4512", "gsd/core/assets/gsd-core/workflows/new-milestone/steps/reset-phase-safety.md": "e4fe52c328c0b8ddd5b2b63f30decce857732602b7366ef6966b4e164dafd983", - "gsd/core/assets/gsd-core/workflows/new-project.md": "aea230553561936a1b96ae0b99fa6560b0711543034ac817d4d320f31bc80ff9", + "gsd/core/assets/gsd-core/workflows/new-project.md": "3862077cf6ca1e8b6d56864e65fd5c777b84df133314b0f310dcbee869b5b3ae", "gsd/core/assets/gsd-core/workflows/new-project/detail/elaboration.md": "da1c140fbb3b623123d1043f1fb493bbb386d7b8db7d76e71737eeb448591c84", "gsd/core/assets/gsd-core/workflows/new-project/steps/auto-mode-config.md": "633133cc3d92591b367b1ca5dfd927ee8b339b608f0e9069673cd033b85a174b", "gsd/core/assets/gsd-core/workflows/new-project/steps/auto-mode-detection.md": "a522ac60fbd47bc5e8070b626396cbce0e1d0cd9d7274d15a2604d237b957857", "gsd/core/assets/gsd-core/workflows/new-project/steps/codebase-map-offer.md": "f224e4b7125bb2b7694150ab850053541e726f207fb49f2a2e5603e67835d10c", "gsd/core/assets/gsd-core/workflows/new-workspace.md": "61b94ec8e4d5766020fbfb98861d21b1a5027ca2a9a6f24b10d0e0fb4d049ba4", - "gsd/core/assets/gsd-core/workflows/next.md": "094bda378fa039a495644837f67b91dfd779988a24d5162a1cd29e69813b9faf", + "gsd/core/assets/gsd-core/workflows/next.md": "cdf3a71dbe9284bf7aa1533e6b8fd170e69e0ccf75253140df6aa5a89a7c782e", "gsd/core/assets/gsd-core/workflows/onboard.md": "c54d936e7278fe011a378fdb0ccdfb35ae88b7eaebb2b0e24d9c89b44d3bc61a", "gsd/core/assets/gsd-core/workflows/pause-work.md": "6d8894eb56d29c71442912999a1016c12e160d3a132718582f8b773624bcd884", - "gsd/core/assets/gsd-core/workflows/plan-phase.md": "5b70aecde1cf01b04ef879f5fb0994a59143d00a96e43daf7dc50999b8e2c624", + "gsd/core/assets/gsd-core/workflows/plan-phase.md": "1c167ca59f24ab15c31d02055b7ed6f7dd639be15ac84f66229350225f21f2f2", "gsd/core/assets/gsd-core/workflows/plan-phase/detail/elaboration.md": "a30c00d7a0e13078bc5979696542e55c8e59708f8c7c3f992b871e0212d21b6e", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/adr-ingest-express-path.md": "e70823c92daf10faafaf46662f823da6c18f4380539b965f7140106c9757ae3c", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/auto-advance-check.md": "d596c52dd65d9915dff3d1905a483e256a47ae5189b69b86ee7bd3f0f4b263fa", - "gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md": "408995147afbc833e34a5edc5bf4591dafa0f11e358e13d4a8e17f0ee2a034a6", + "gsd/core/assets/gsd-core/workflows/plan-phase/steps/chunked-planning-mode.md": "6412ad4e65a87098da11b1e1cbea33b5788404b1ca00068cac48c5bffe15ed6e", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/closed-phase-gate.md": "aed2139d5640ad01e4fcc733aa84f32a359dab787293f0b36fb7a8c37bb5d79c", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/prd-express-gate.md": "ee3b61a9fa887852d14f9e9b66bb88f9aac7b1c79f96f6e71d2d1cae2f778fba", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/prd-express-path.md": "363485b4ffc77d988f1cfa4e57b32d2e2df1e14d4f9bde5565ec81a98ee7c505", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/research-only-early-exit.md": "3ccb768509f5b838cfdfac441253b7436547ed37a6bb91188606c196075b3c53", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/research-only-modifiers.md": "54f0d0eaed1ec70d88569e8904ac0be02488bdf38a776908b2b54269df2953be", - "gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md": "5df842cc29dadd64aaf291a74c7a591a3b5d285cef36af847d964abbb23236d5", + "gsd/core/assets/gsd-core/workflows/plan-phase/steps/reviews-prerequisite.md": "2bfc2be4ad8075e3b382e0b673064746d3d02f0e0432e1e5ee32d3e087a45e0e", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/stall-detection-helpers.md": "be0597b46d89ec2f6f320e6cf18d661db9d84da95a3f1083d1a1a2c240a0c8dc", "gsd/core/assets/gsd-core/workflows/plan-phase/steps/windows-troubleshooting.md": "c1e181ef881afa001f9e3b68f52a2946b5b0e67618016bdee971f72a51398cf8", - "gsd/core/assets/gsd-core/workflows/plan-review-convergence.md": "8d42330edbbd7a87fa804d4b33a18075172ff7759af3573355e88535d7975c67", - "gsd/core/assets/gsd-core/workflows/pr-branch.md": "cc24938545d95c8595498bb89724412287a6beddbb91c66cb468c89b45cba7cb", - "gsd/core/assets/gsd-core/workflows/progress.md": "8e2f844f3bc70aa8bc94679d8edba235dd9d2c75b5765809d9696b723dc00820", + "gsd/core/assets/gsd-core/workflows/plan-review-convergence.md": "476d3ddc184b6440b5adf87c1a0970f171cd21b3bbafe82e4b8bbc26b652c5ec", + "gsd/core/assets/gsd-core/workflows/pr-branch.md": "7a5673bc46d26164e8ee8c75c7a4e43cfae25d55cc8542ae56a353aa2c376461", + "gsd/core/assets/gsd-core/workflows/progress.md": "7e0d33ce2eba8faa86359fe1e1a4b6ba57e183bfefa7d6888b912b834942caae", "gsd/core/assets/gsd-core/workflows/progress/steps/forensic-audit.md": "20e435d8539324ccfb4f9e2c87f8cf00d5e5e23e0aef2c766e88124f6e6abf61", "gsd/core/assets/gsd-core/workflows/progress/steps/mvp-display.md": "99d908c518a78be679d2131dcbb8918c52bef27d5fa774cae296c265ffd60717", "gsd/core/assets/gsd-core/workflows/quick-batch.md": "f68757d1be3a88b5b61a9378c1bc490718cbfcb62fac1099f57db0749bb7480b", @@ -348,42 +348,42 @@ "gsd/core/assets/gsd-core/workflows/quick-batch/steps/completion.md": "4436738d225a89b877196acc1cfe91f9b2648a3a3431fb58fd8f51a0ddeed323", "gsd/core/assets/gsd-core/workflows/quick-batch/steps/merge-wave.md": "d935cfd6a7f5d36be435de9780eaaebcf544e43466b56067eb3c994ff6e9df86", "gsd/core/assets/gsd-core/workflows/quick-batch/steps/plan-checker-loop.md": "bccda96bfc4f903f1a4387d106029a84420ca7bc1c89855a027a92951a4e4132", - "gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md": "00cff39573d970a3cccc076eba6cc0866df03e48dec4fdb22d26ecab34260851", - "gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md": "8ec87964997c04bbd7a5eb795ebbd2a6df61895ff68235c2e54370d786390c0d", + "gsd/core/assets/gsd-core/workflows/quick-batch/steps/planner-wave.md": "8fc1ff374a9833793e6930b7e08810f9e9ab37638a469b3095a9d61c5bb84f57", + "gsd/core/assets/gsd-core/workflows/quick-batch/steps/research-phase.md": "8b888a3d3361ff330136b782de924ebc2885047465580dc7c5446d908e5bbaa1", "gsd/core/assets/gsd-core/workflows/quick-batch/steps/resume-mode.md": "de27881d3f490f23f0cac7e294312b3a2bb7c39fe539f6c793999e78ae45e5c0", "gsd/core/assets/gsd-core/workflows/quick-batch/steps/verification-wave.md": "0dc1fb3db21b69976ea9a5829cfad209e8740ee642e04400f38897eca9ab299e", "gsd/core/assets/gsd-core/workflows/quick-batch/steps/worktree-dispatch.md": "975505b32006329678e571fa91d8661234b2c063c0bf965cbd937dbc80e27cdb", - "gsd/core/assets/gsd-core/workflows/quick.md": "fc130e8f1a7ab84bc082eb534750d2a3f539ba0a993dbaee7c6efd09650c1df1", + "gsd/core/assets/gsd-core/workflows/quick.md": "8fea8264fe3990e5e11a2e2fc9a39c47181055482842b7a3925adeb18c62ac14", "gsd/core/assets/gsd-core/workflows/quick/steps/discussion-phase.md": "aec3bf30b33713c8654fd249573936500fabdbc3ba9bb9c2d15bfb8cb260977e", "gsd/core/assets/gsd-core/workflows/quick/steps/plan-checker-loop.md": "5f9dbf30c88e7e2b4134807503315fd698915cc945b560444a7656fa7b970732", "gsd/core/assets/gsd-core/workflows/quick/steps/quick-verification.md": "58b0ad9beb80836842f2e3f56d0e224c7c8e321c53b4ce6b55246899005c6f3b", - "gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md": "d27f7e906f2a9b8d3a9fd308fbb0be047b5c99f5ec029eed3562f2e486d752a7", + "gsd/core/assets/gsd-core/workflows/quick/steps/research-phase.md": "c10ae38d866293d95bc5be2bc5520d4de016a6a31092b508df1be86fa72ca5a3", "gsd/core/assets/gsd-core/workflows/quick/steps/worktree-pre-dispatch-commit.md": "fae96992ab92531b3b5ca48e6107f4b2264ad1d19ab957c5c12da2f01c926ee7", "gsd/core/assets/gsd-core/workflows/remove-workspace.md": "23eafade3a0d6c85a27fd57c870f9d5afdf89aaa4252668c6018b858b980cc4f", - "gsd/core/assets/gsd-core/workflows/resume-project.md": "8f12d709c9f53201bf1ec80c7f06badb9ed5a304c4c1a5243b8f8fa445322571", - "gsd/core/assets/gsd-core/workflows/review.md": "7f282f619f97a0568ce44b94856812f89f64b5987f4b9a1c8df801666d47e6e9", + "gsd/core/assets/gsd-core/workflows/resume-project.md": "761b468fc4aaeafbe9c91b4b135c9fccbdec5e3e53b3aaab4b9e5062a26c8828", + "gsd/core/assets/gsd-core/workflows/review.md": "d28a19a9a0f9be0636f7a78452eab1d5914a0a37fb58c7a2cc4fb2775d00f59b", "gsd/core/assets/gsd-core/workflows/review/steps/reviewer-instances-note-1.md": "de9360b2208d6a75de51bff3735b13900fd6f101f07433f1ec0d5003bcc52e41", "gsd/core/assets/gsd-core/workflows/review/steps/reviewer-instances-note-2.md": "e818b917fcb2eed975a4515d0ae26c76e46f495032ba84e04031ec77f788affb", "gsd/core/assets/gsd-core/workflows/session-report.md": "2b756aaf1da9aee0df94228c5cfab9ceec068a8503b5b55ca70f5090a14157ec", - "gsd/core/assets/gsd-core/workflows/settings-advanced.md": "184bea885146447efc93d0590163bd034f492a0c4b76a297e3104e60ca8382ab", + "gsd/core/assets/gsd-core/workflows/settings-advanced.md": "94d5e8731caf5dc1f9cfdb54ee431a9e8b1db448d7de03bb9d42697cc303914f", "gsd/core/assets/gsd-core/workflows/settings-integrations.md": "d68659b4e2cfc848fbec78c404bd6cd9faef6fa338b6f60c8a97a971dcb053d1", - "gsd/core/assets/gsd-core/workflows/settings.md": "301b94aa55531e5a77e924106b200c82efb1c9c85d829af45921aa378a7c3e6b", - "gsd/core/assets/gsd-core/workflows/ship.md": "e08b14c18c6158a48c7bb55a51fc6d95a6ba815e7a876dc58633abf1cf522c1a", + "gsd/core/assets/gsd-core/workflows/settings.md": "e5d0cd7042e4ffbf5572722fd6c374c7a69ed37f9ea86773c54e5d4c656bb7bb", + "gsd/core/assets/gsd-core/workflows/ship.md": "cb69d58daae861a5653104ed6b1cab873b553383d3596ef51b6cdea85d2931d2", "gsd/core/assets/gsd-core/workflows/smart-entry.md": "75afa07e28b3af29ce0f76a519acce6edd7b90d05ac6ed761e18790daf279ed1", - "gsd/core/assets/gsd-core/workflows/spec-phase.md": "82bf738baa4b03a4edf8abd4790c64cc12bc76acfb15450180b439326aec4646", - "gsd/core/assets/gsd-core/workflows/transition.md": "8a2b035b4830be62a919f04c8fb4d89f3b1568635a448cf0a03420f24aed75b9", + "gsd/core/assets/gsd-core/workflows/spec-phase.md": "b0b7f71161678b0791e1c689888904cd3bd15ce726139298daee2fa9b495bc15", + "gsd/core/assets/gsd-core/workflows/transition.md": "d70c626292b81d96920fec0101dec50e214884be10d8a151b09372affe1b8b2a", "gsd/core/assets/gsd-core/workflows/transition/steps/workstream-collision-check.md": "f2a97b8892f74e9b724fdc2052f0ad36f8c6586131e184337f695a8b41018f77", - "gsd/core/assets/gsd-core/workflows/ultraplan-phase.md": "e26dc63dd6381595b7a25c218f7ae56e30c24526f90292d99aab8ad8fd1f5165", + "gsd/core/assets/gsd-core/workflows/ultraplan-phase.md": "c5c3c3dfaa2e3c6f91725e5f5c26c9d46eed56ed7a083ac237a6d020ed54a6ec", "gsd/core/assets/gsd-core/workflows/undo.md": "e4b742a35ee89dbdbf3b33ab570183827bca8559f1229f6906d2db902a1d22d7", - "gsd/core/assets/gsd-core/workflows/validate-phase.md": "0f1b22f09d522ca7a545ec70c3c168c2b4932a32c4b8cec2245748b09591fd18", - "gsd/core/assets/gsd-core/workflows/verify-work.md": "80322e3b30a006ed7dfcf6b6d213f35963bf057ab3e1af0c1cc0f363933a37cc", + "gsd/core/assets/gsd-core/workflows/validate-phase.md": "307de043abf36705e78b106169bb59a1b3384ff8db4b05ea3c9834b3f81faa3d", + "gsd/core/assets/gsd-core/workflows/verify-work.md": "0840d521cbd4dc7bd1a2a78aad8b6d1a1b37f79abb87ab795f1f0b9e3f53047b", "gsd/core/assets/gsd-core/workflows/verify-work/detail/elaboration.md": "3b2f2c64119928abc249bbf1df448589748afe1352f978486a9959099cc3bce2", "gsd/core/assets/gsd-core/workflows/verify-work/steps/automated-ui-verification.md": "0a2a737ed635fe41de4ea630779b7eefb0d9dc5dc14b75856ae877e167f71acd", "gsd/core/assets/gsd-core/workflows/verify-work/steps/mvp-uat-framing.md": "7e0e7501313605ad0a0322090063d145f6a5663b62406237af01d359d69d0b68", "gsd/core/src/agents/mod.rs": "a3a1648efda60e64639788cd08daab705d55a5b44d9fbccd1ac7988d4fe06d58", "gsd/core/src/agents/roster.rs": "e82db6b21ce7e570e7ecc48b1d278bffcbd80d427e96ac1d648f322964592e58", "gsd/core/src/branch.rs": "3fcd8200fd2849bac0a8bee40bf87c9bb213b4cf57798605f2c985c89c67abc5", - "gsd/core/src/codes.rs": "f0e6a3a9f38f5df5a089758b95b48eeff6ede9f8b5148cbaf701fb274fd29541", + "gsd/core/src/codes.rs": "332ff92af8165c6672b58057185e42162f02a22d75cafbc903e4cef2a1ccaae8", "gsd/core/src/collectors/git.rs": "0eb9d845dbd70a30d861292a07c8671d9dbc4d1ab413c2a8322793662ac6ba24", "gsd/core/src/collectors/git/items.rs": "36e68c3b0283a258f68330fb54a4c86121c92eb653a9a854dd802cd70fa8f4ab", "gsd/core/src/collectors/git/subject.rs": "e0bba2609da4dc8cffd9b13218c2cd8950b162489b7b38254605dc90877e621c", @@ -397,14 +397,14 @@ "gsd/core/src/commands/complexity/strip.rs": "edc5f933b118f9166e71a8dd4f2e0f1cfe2f229e3775e97a638d5826b5a6d16c", "gsd/core/src/commands/digest.rs": "f0573a1b9273c9d631f7ba03f0c660f2424827200de11db5f3a0805587d9a80e", "gsd/core/src/commands/edge_probe.rs": "9a99ca0862dccc621f694d2a0a06c547a3b925465432d9cadbea951eff0e9860", - "gsd/core/src/commands/execute.rs": "4434ba1dad64612934a7b9f2b04868539cc1af3a52a74ae728460d4a1967ba51", + "gsd/core/src/commands/execute.rs": "89e30fa5688a7e40eb4931e9e42faf923246a20180052a9d0a580847b3982057", "gsd/core/src/commands/gate.rs": "a70bf0ba8d6bd6d3a583786937006d4bf900f07728f297687493cf942b955cb1", "gsd/core/src/commands/help.rs": "2158488d83ebdb03d6575862d0376c9b9bcc84e9830da77a3307edd25006b269", "gsd/core/src/commands/learning.rs": "607f54bfa6bb7ccaca92ed136ee10fb70c6db9839e65602f6e6b079cc31a0754", "gsd/core/src/commands/milestone.rs": "bc377fa59ecbe395bee6ba31f410b99c492cbfd08e14d9527f9db92b9ab1adc4", "gsd/core/src/commands/milestone_branches.rs": "b133e0e00127dc68d308217d65ac19d1420a1c6f838117a9a32ac9e2c54b381d", "gsd/core/src/commands/mod.rs": "d8c2a8d3bdcde880ea84f73cf0c429e2215aa6b5d347fa0fe362f21de444adba", - "gsd/core/src/commands/phase.rs": "da71460f424d6f203fbc6ab456cb489813c145068a1bec4b1e7d9e31c06a9059", + "gsd/core/src/commands/phase.rs": "c1da17c86d52ec7cf486c092cadae62f7a441f641d93e656df36ca9e3dd1e973", "gsd/core/src/commands/phase/promote.rs": "5cf1c306432caf436b49888813f11490610305bc27c9105dde3ec1b4797bc1b7", "gsd/core/src/commands/phase/remove.rs": "054b9b4008b13f79e2d34488d822ded5f63805f54496c48c1c82951a19a3a117", "gsd/core/src/commands/plan_coverage.rs": "8d33b2f0624436e583491621383edad0a9576bfc7bc6834c0e3a835cfa2d8eb0", @@ -413,7 +413,7 @@ "gsd/core/src/commands/re_verify.rs": "7b794222c419faa5a64fcb67433917996564537bcba6248b882946eba61dd4c5", "gsd/core/src/commands/refactor.rs": "5b4e9add1b95aaea0287208cdde722a1b8bc729eb4badb9fd0adcb33b4e68aef", "gsd/core/src/commands/reference.rs": "5d9ad1702c50b44a12d2e46de46fbb992d55a321a2c2d8e09cc7887853b433bd", - "gsd/core/src/commands/reports.rs": "60c2873e349871a26195bbf7179ff4eea041c2af226e8f65b2b105691f37a5ea", + "gsd/core/src/commands/reports.rs": "abf740f82cc42ad0b12e2f0b1033025c50d38f081e40fceac619b63709bf9e36", "gsd/core/src/commands/review.rs": "6a7df44109878598237e9254f505dc0399d27aae8e54152b011d061a262d5d90", "gsd/core/src/commands/smart_entry.rs": "580bf8a6ac3e9dd7380abd18764f3efb299b2ae609c0f065a606cc5ae818d1e4", "gsd/core/src/commands/state.rs": "5113f4ac7265c9b82179250e3a22afe669f3d42fdc97c739e568c515d554d4e8", @@ -427,8 +427,8 @@ "gsd/core/src/commands/waive_trailer.rs": "7d9af3ff19cdf359473e28eea706236a4333b4e8b318a85295a9d605422f2b08", "gsd/core/src/commands/windows.rs": "7d76c742255c43e1e744d7098dd25f0c1f133eea491df5b55d65f18006a21235", "gsd/core/src/commands/workstreams.rs": "2373515bc72bd57f04e272160a72d8ae67eb49d537c107f8a939e148e48b9ab8", - "gsd/core/src/contexts.rs": "7fb251f0dab6f64e0a07c42300744a7c52b7961b2eb720decb95fe6685c27af8", - "gsd/core/src/hooks/community.rs": "eaa5fe048f682f7e391788b7e36082adf66bcd37bdc20eb1fe211d122655e8ed", + "gsd/core/src/contexts.rs": "6ba35754242f95ef314f148c720818b858c73a915e6e588b931d5e2f382411fa", + "gsd/core/src/hooks/community.rs": "6627644595e93467d6194996394b46d6dd4da7f7b3a4041c1002fc095159cd29", "gsd/core/src/hooks/config.rs": "727e98e4e8ac303e596819e54c753edc73b2d9e0711d3a61d813f8a2b15e1f3e", "gsd/core/src/hooks/context.rs": "7c553983e68c877d9b22248cd1041aded2718d2ba46cb1c11d9889627012be78", "gsd/core/src/hooks/facts.rs": "716feb12e491bda149d2d7d2c84ce2ee8a29eb20822b4e375fee4dc508427f56", @@ -444,11 +444,11 @@ "gsd/core/src/hooks/secrets/names.rs": "9c4f2a5e34201ef283cb3756f576a2716df40c9e23c5da0c49f7a8ec4c54cba6", "gsd/core/src/hooks/secrets/scan.rs": "f25f9be1236f408f85eeac7717d3c34641a85fed20468398adb10c4ba8a3085a", "gsd/core/src/hooks/secrets/shell.rs": "ea3730a6937ac632fc23009c755103b9f4643c4c7b20a01bf09486146c23d99c", - "gsd/core/src/hooks/statusline.rs": "56c7bd121e186501a570a00c1c2d8da0ca2cbc75d85b22b59e845a7d7f9d5418", + "gsd/core/src/hooks/statusline.rs": "163bdc8edbb40b2f6b209527352759ccdb7509144b02d6bcd94aa51f839df23e", "gsd/core/src/hooks/statusline/format.rs": "960b554ed82e3ce5ed3d70eea468b6b6f0744d7d60a3945e0554c5fa3ed729a4", "gsd/core/src/hooks/workflow.rs": "731fc6750ff5e31ffd6879629ad1f91cb1a6017f6de11e1edd4521125bccd84d", "gsd/core/src/js_regex.rs": "a029a0550459f12405c451ab047124d9bd28dbfd9f70455ccd039a14e934f0cb", - "gsd/core/src/judged.rs": "f2c276ec1a8472c586d024f39bb909f172130938dad6d35a252954084b9c1766", + "gsd/core/src/judged.rs": "62812bb08f27d4e71489a0fbcb3fb0b1a9af1815ef483b0b03b7e1072afa5492", "gsd/core/src/kinds/audit.rs": "6ec2f1d418253c91ce136957a2b0b131c5cd8521e4aa0cc682ff1cc8ad26b759", "gsd/core/src/kinds/commit.rs": "6cacd99fd9392965818536006664bdded637bb36f91d255f0a736974e16e4330", "gsd/core/src/kinds/discuss.rs": "4d569ba92337a3512071b41b9d5b21760eae1cb0a9b6cbbdd948346bdec0bdcc", @@ -460,20 +460,20 @@ "gsd/core/src/kinds/project.rs": "96d0005834ad81e760dd29d821a726b8d3824783391f51006c1522b8c8e6f03d", "gsd/core/src/kinds/research.rs": "a76b2e7a7378f241dbbc19295fc5e563360ca1d99193f2234a959f29c38f5bd6", "gsd/core/src/kinds/review.rs": "777a3ffad104e9651e97dab67e8c037b56440bcd587a45ca66c37597d9a8df9b", - "gsd/core/src/kinds/roadmap.rs": "c2e2c2fdb85408f06284a518088532a06931720a2b008409aa8dbc129d8e6ce5", + "gsd/core/src/kinds/roadmap.rs": "aa7271bf87cc9ce0f6de774c7d3d50690b5282fe3b3ebfe0c38cde891d84b3f0", "gsd/core/src/kinds/spec.rs": "d22993f109eeb3936953ef12f4ac98f5dc4f0c4d26768d6019779b275c4a32f4", "gsd/core/src/kinds/uat.rs": "6cec431c4c37a404fe24a2bbc7d62f9a5113fc289e8ae47e721bce6f12a5b4c8", "gsd/core/src/kinds/validation.rs": "60c8ce7adb6d1e7523bb1dab6005b2bb71f344d690b0e5ef563cf4fc15717b9f", "gsd/core/src/kinds/verify.rs": "1e9212cc2836344d89cfe3489d486ca45f5fd5da665f53f2297a8ed274d9d643", "gsd/core/src/kinds/windows.rs": "cbe296e9f9288e41b91d701a82d99f2b3fb5a3ff32b3f98457a555d37eef9dce", "gsd/core/src/lib.rs": "7c349cea36d6072cdbcf3576ae86cfc72e178751736136abbd236728d67ea266", - "gsd/core/src/passes/citations.rs": "b2a6bcb8917aa0e75173542c5740c377262d7ad1b5460434c618d58040c5f8e6", + "gsd/core/src/passes/citations.rs": "844de1439dbe1e785d203d7ba5a9a827286e5d1ebe5447ef67e22752851a9475", "gsd/core/src/passes/commits.rs": "ac5fc9d2419a60734be3530dfd557c499f7cf4bab159aa2e694dbc1a27ea6a9e", - "gsd/core/src/passes/cross_plan.rs": "0eab1c750822fc6eeeaa6700a99eba011b30cd3831828b25511379e32dde3526", + "gsd/core/src/passes/cross_plan.rs": "ac874654262ee5523a16881c8c2da24973956ff68be3ac7e205735d608c1725a", "gsd/core/src/passes/decision_coverage.rs": "c1c88668374bb9982fab7379188fecf2becaac65667926c9a44e0ef15c0c72ec", "gsd/core/src/passes/derive/audit.rs": "897e0031b72baa2b0800e6636c90537c43a6550d337f1443a2846ff13730d0da", "gsd/core/src/passes/derive/batch.rs": "bce826e1dacfd42be732a41cf39f3b5bbfe1abb520c04d8277e11e6a2da1d52c", - "gsd/core/src/passes/derive/branch.rs": "08c38355373b0e07881741d51df62c00cd1da532c961bf0705be2164030bacc7", + "gsd/core/src/passes/derive/branch.rs": "3d72164b90a7bf343a75a0be5a84232da63221de76bac670ee8f75806dd18425", "gsd/core/src/passes/derive/critical_path.rs": "ba06e113b7fae7afddc545dd711f9ddce037738d3ae0733145aca41dd0de4bfa", "gsd/core/src/passes/derive/estimate.rs": "bc41a9e27cbff1da463b8033c71e085cd74588d6cbc380b80c15fe706ec5dd7e", "gsd/core/src/passes/derive/estimate_error.rs": "d05b67f4ee9199beb44e67145e43a9a6be5d07b6c79237eb4b690ccd421b806c", @@ -496,14 +496,15 @@ "gsd/core/src/passes/nyquist.rs": "4e7c5c01988561f121ff449c6e0ce1ee8c6bf34ef6e7e4714fbde658b03f98e8", "gsd/core/src/passes/plan_shape.rs": "a4d08d1052633e254c82dfd5c443f786be9b4081e76434f984ece4ae6db4bb4e", "gsd/core/src/passes/plan_shape/checkpoint.rs": "738c8b9459aeb606d34a5368d1ae2bff09e59f9cbe31e34ee96d73d603901b93", - "gsd/core/src/passes/plans.rs": "74d73ac7359a66a86cc060251d0de46a86d3b3f368e84335225298e446f3ed75", + "gsd/core/src/passes/plans.rs": "0b94a5dbca91a8bd059410115328320f0d196d596f222d554ed6cc4c9ef76883", "gsd/core/src/passes/probe_rows.rs": "8aac6d4a74910890a8b1704a3540e5441868865032555b66c1e627032310f66b", "gsd/core/src/passes/research.rs": "2d885378200cb658dafcdd0c2c1514de0040adb5c1033a4351cd154b794e4669", - "gsd/core/src/passes/roadmap.rs": "a7f9632d62b3b348175fdf0d3571206a5e09288887afde5489032bb88da4166e", + "gsd/core/src/passes/roadmap.rs": "0f00f7d8cf7b6a305b7c78c61ba412270013a0a19771f9f8e9f4af4e93ddaa9a", "gsd/core/src/passes/roadmap/criteria.rs": "cd8f64fcef677e8cccf666d1615992602bf58392e4176761a4855a96bcfb3218", "gsd/core/src/passes/roadmap/numbering.rs": "66283e4343c5abe9c8840bcdf685c27ac1cdea076a4e7ca20e21917034c8f4ef", "gsd/core/src/passes/roadmap/one_per_phase.rs": "cecfdb6c1849ca863bb855a30675dbfd4163f771643cf409c34d3ef9b965814c", "gsd/core/src/passes/roadmap/plans.rs": "b4b5c2adf730af1e43e4d02248e14da9e21216fe68a243290980eba50e57813c", + "gsd/core/src/passes/roadmap/titles.rs": "3ae679db14ba8a2b6e650bf924cc7cf1c600e9df0c534c38b2c516b31b4605d5", "gsd/core/src/passes/scan.rs": "a707db036c231960f316bb20f145821b99b1132d8e5ab2b681ddb8f54b45de90", "gsd/core/src/passes/scan/facts.rs": "69277df78f3db68356f7611cbf7f497654d98399afe9b9610d5ef1c89456f6fc", "gsd/core/src/passes/scan/patterns.rs": "33c1cb492ab275da361e095e623290f1725c6c4f74d52669ff727449edfee197", @@ -526,9 +527,9 @@ "gsd/core/src/prompts/assets.rs": "0e2631bad94442f1475013d6af7212c88892408d58de23db4e9bb3a7aa299fa9", "gsd/core/src/prompts/audit.rs": "426464dc582f9fb707bd2d8a1fc27cfe97ee01edd2b352ee5487a2676a0a6e8f", "gsd/core/src/prompts/autonomous.rs": "6a59af934f93ffe840a35fdce7547e3a8af69f1661bc067e518c00c170409183", - "gsd/core/src/prompts/configure.rs": "af11ba27dd8e666de839192a8f5742dd88959c573eb47789661de29d83b7a369", + "gsd/core/src/prompts/configure.rs": "1e8b3063d03c20e1572b0144a64fd1398200fd595dc5e7a4fa059fc7c649df29", "gsd/core/src/prompts/discuss.rs": "857b4ba38c4f5af1a9dd2bf355e59a7e6bcd842fdd5e423ca2cbe0d9a218cee6", - "gsd/core/src/prompts/execute.rs": "390c0a1916553866c424f503668c60a76b691006d5d8c4b92f525904f52a4fc4", + "gsd/core/src/prompts/execute.rs": "e3c7cc55e4a33eb7608e7b24bbf1f66be36b53c5a94665e3bae0839395acb1d3", "gsd/core/src/prompts/git.rs": "dc161e9a47faa3fe14e743bf975d67678f4792cdb33e0a4babde1a6df14f5edc", "gsd/core/src/prompts/learning.rs": "9814cbc32420e94884a2b919111ea21d4bc69e27568d3cca5485dd25248dd4c3", "gsd/core/src/prompts/mod.rs": "b04522960a7b702287e0ef14993ec2ac960733cfc90cbb9187cc2b0c0df7f3be", @@ -565,7 +566,7 @@ "gsd/kit/Cargo.toml": "781ee881790d5b6923177d78d11ad13033eecd5a04aa6c3dc8a7e35dab225094", "gsd/kit/src/agent.rs": "6bbca2b6c8e83d80179c10914c54fe96bcd404c23d519110998af2d0175b970b", "gsd/kit/src/capability.rs": "b406fe48a9db5e42183cdddca550efcc3d365b084206ae82fd2fbf255f3971d0", - "gsd/kit/src/dsl.rs": "8482bec442969d07fe46d5b183195b7a5b802632ab7b43d3e82d6746f89770cc", + "gsd/kit/src/dsl.rs": "34d1b34a17a04467c9a6461d3e3e8a8f981615306d9bbe8a7a02069e4fe6c864", "gsd/kit/src/files.rs": "18f51e12f43ba47ee911ec3e5a3d37da7ca702f907ff686e246dbfea2381c51a", "gsd/kit/src/judged.rs": "5dede3d81904cd2e03c759c263743f146000da1b982160a071d4cb42c3be0a82", "gsd/kit/src/judged/record.rs": "13ad01c1c91949dc241fb349e95af9f1124a0feacb175a7a572f1cad446593e0", diff --git a/gsd/kit/src/dsl.rs b/gsd/kit/src/dsl.rs index ec86159e12..6bf84bd938 100644 --- a/gsd/kit/src/dsl.rs +++ b/gsd/kit/src/dsl.rs @@ -213,7 +213,8 @@ pub const fn rfs_any(name: &'static str, kinds: &'static [&'static str]) -> Fiel pub const fn block(name: &'static str, members: &'static [Field]) -> Field { Field::new(name, Ty::Block(members)) } -/// The members a context record holds: the route that recorded it, its pack's digest and its budget. +/// The members a context record holds: the route that recorded it, its pack's digest and the cap its read stated, when +/// it stated one. const CONTEXT_RECORD: &[Field] = &[str("route"), str("digest"), int("max_tokens")]; /// A context route's record of its pack (ADR 0356): `route`, `digest` and `max_tokens`, written by the host. diff --git a/gsd/parity/ACCEPTANCE.md b/gsd/parity/ACCEPTANCE.md index 5353a43d25..b0af89db67 100644 --- a/gsd/parity/ACCEPTANCE.md +++ b/gsd/parity/ACCEPTANCE.md @@ -17,7 +17,7 @@ disagrees. Every row but Capabilities is computed from tables of code; Capabilit | CLI modules | 288 | 170 | 21 | 97 | 0 | `core/tests/parity_roster/modules.rs` | | Config keys | 212 | 161 | 35 | 16 | 0 | `core/spec/settings.md` | | Gate-cutover verdicts | 171 | 93 | 51 | 14 | 13 | `core/tests/parity_rules/cutover.rs` | -| Codes | 72 | 72 | 0 | 0 | 0 | `core/tests/parity_rules/evidence.rs` | +| Codes | 73 | 73 | 0 | 0 | 0 | `core/tests/parity_rules/evidence.rs` | Concepts (the model: phases, plans, milestones, requirements, decisions, UAT, verification) are the kinds of `core/spec/*.md`; they have no inventory family, so no count. They are exercised by every row above. @@ -48,7 +48,7 @@ Concepts (the model: phases, plans, milestones, requirements, decisions, UAT, ve argument shape); 51 belong to an extension, 14 are the gate engine, and 13 are core codes whose verdict is not reproduced: 10 that no twin reaches, and 3 that a twin reaches and answers differently (`Diverges`, below). Each is named, with its reason, in `core/tests/parity_rules/cutover.rs`. -- Codes: 72 of the 72 codes fire and stay silent in a named test. +- Codes: 73 of the 73 codes fire and stay silent in a named test. - Verification: the verifier's `gsd/E501` verdict on a truth reads what it cites, files and tests, and one that cites nothing is refused; an artifact's reads its `path` and a key link's its `from` and `to` (ADR 0377). A must-have owes its verdict once its plan is complete, a plan check while its plan is open, and a judgment-tier prohibition owes @@ -228,7 +228,7 @@ Not verified: judgment-tier prohibition without evidence and halts or marks it unverified; here W525 warns at `check` until the verifier records a fresh verdict, which is a model's and not authoritative, so it never halts). - The 10 other unreached verdicts are named in `cutover.rs`. -- The "silent" evidence of 38 of the 72 built codes is the unedited twin (`rules_silent.rs`): it proves the code is not +- The "silent" evidence of 39 of the 73 built codes is the unedited twin (`rules_silent.rs`): it proves the code is not raised there, not that the rule judged a clean case. - `[agent-namespace-one-rule]` `workflow_guard` reads the agent namespace as `worktree_path_guard` does, with `worktree-wf_` and the charset; upstream's workflow guard has the two prefixes `agent-` and `worktree-agent-`. - `[protected-set]` `branch_check` protects `main`, `master`, `develop`, `trunk`, `release/…`, `git.protected_branches` and `git.base_branch`, and `git.allow_default_branch_commits` changes `blocks_commit`, not `protected`, so ship's and the `none` strategy's warnings still show on `main`. Upstream also reads the real default branch; the git port answers no remotes, so `origin/HEAD` is not read here. diff --git a/gsd/parity/fixtures/ledger/spec/plans.spec b/gsd/parity/fixtures/ledger/spec/plans.spec index 5bb9783a0f..724b4581cd 100644 --- a/gsd/parity/fixtures/ledger/spec/plans.spec +++ b/gsd/parity/fixtures/ledger/spec/plans.spec @@ -35,11 +35,11 @@ truth TR1 "An added entry keeps its cents and its memo" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:57Z" + at "2026-11-22T11:16:26Z" cited ["src/lib.rs", "tests/entries.rs"] inputs { cited "sha256:8d806444455bbedadb383ff90ddb7cfd47df1d254ada5fe8785579e4ba25d527" - phase "sha256:84aaf6320ed2bbd8075c56f2f02c954c7956acff131015d4eee3bcfe6c61a2a5" + phase "sha256:76ba62b7f83934de8bc00643622e1759620cbfdddc86d1b000431e3de8e5cf2e" plan "sha256:fc63a9fa2a8e09fb34f9f285adebef3eb37a13c03085efc69b57269e0154be43" tests "none" truth "sha256:c86d96a51c86b58f8cf68be094c1a9f9d1c78e6ac9eb553f638d48f68ecf2976" @@ -53,11 +53,11 @@ truth TR2 "A memo with a tab or a line break is refused" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:58Z" + at "2026-11-22T11:16:29Z" cited ["src/lib.rs", "tests/entries.rs"] inputs { cited "sha256:8d806444455bbedadb383ff90ddb7cfd47df1d254ada5fe8785579e4ba25d527" - phase "sha256:84aaf6320ed2bbd8075c56f2f02c954c7956acff131015d4eee3bcfe6c61a2a5" + phase "sha256:76ba62b7f83934de8bc00643622e1759620cbfdddc86d1b000431e3de8e5cf2e" plan "sha256:fc63a9fa2a8e09fb34f9f285adebef3eb37a13c03085efc69b57269e0154be43" tests "none" truth "sha256:0b08cbb8ca3fa0d3951e1ca3cd4316628ac2163fd927c664865c8b6424e4cc17" @@ -73,7 +73,7 @@ artifact AR1 "Entry and add" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:56Z" + at "2026-11-22T11:16:22Z" inputs { artifact "sha256:8ebd47d01e81cc35b478dbacf6145ce45ed675719044f750c5a37c93c61e4e53" cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" @@ -91,7 +91,7 @@ key_link KL1 "The tests use the entries" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:56Z" + at "2026-11-22T11:16:24Z" inputs { cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" from "sha256:85bd846176bf7d526981cd2346f7cedcb481ca2d439329d82c3a3512e78e8997" @@ -140,11 +140,11 @@ truth TR1 "The total is the sum of every entry" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:17:00Z" + at "2026-11-22T11:16:37Z" cited ["src/lib.rs", "tests/totals.rs"] inputs { cited "sha256:3803df3719927c59068f89f563a255937c82a6c0de55e21a42891fde04c05680" - phase "sha256:84aaf6320ed2bbd8075c56f2f02c954c7956acff131015d4eee3bcfe6c61a2a5" + phase "sha256:76ba62b7f83934de8bc00643622e1759620cbfdddc86d1b000431e3de8e5cf2e" plan "sha256:241622c4d942d74ac5cc08d6342c247077ac968e0b2c156ae47f973f54c4911e" tests "none" truth "sha256:061ad3a412efd9bdbc230a2fcd74bc658ce7ab317750b1f39824b05cc29b699d" @@ -158,11 +158,11 @@ truth TR2 "A total beyond the range of an i32 is exact" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:17:01Z" + at "2026-11-22T11:16:39Z" cited ["src/lib.rs", "tests/totals.rs"] inputs { cited "sha256:3803df3719927c59068f89f563a255937c82a6c0de55e21a42891fde04c05680" - phase "sha256:84aaf6320ed2bbd8075c56f2f02c954c7956acff131015d4eee3bcfe6c61a2a5" + phase "sha256:76ba62b7f83934de8bc00643622e1759620cbfdddc86d1b000431e3de8e5cf2e" plan "sha256:241622c4d942d74ac5cc08d6342c247077ac968e0b2c156ae47f973f54c4911e" tests "none" truth "sha256:921c9b02fd8892671461c808fec33466cc5a3defab925cc766b6b1e65e8f87d2" @@ -178,7 +178,7 @@ artifact AR1 "ledger add and ledger total" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:59Z" + at "2026-11-22T11:16:32Z" inputs { artifact "sha256:7de8537a704d13adb5a6fb269e0b6aba85ce72bb143aa74d9a153fcd7c82c141" cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" @@ -196,7 +196,7 @@ key_link KL1 "The command line totals through the library" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:59Z" + at "2026-11-22T11:16:34Z" inputs { cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" from "sha256:46c00d71d061cb6854c44001f4941db663cac3b28065dd4cffd10acd38e2bac2" diff --git a/gsd/parity/fixtures/ledger/spec/v1.0.spec b/gsd/parity/fixtures/ledger/spec/v1.0.spec index b037aad33f..0be4414baf 100644 --- a/gsd/parity/fixtures/ledger/spec/v1.0.spec +++ b/gsd/parity/fixtures/ledger/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Ledger 1.0" { - name "Ledger 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Entries can be added and totalled" requirements [LEDG-01, LEDG-02] @@ -16,7 +14,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Entries are saved to disk and read back" depends_on [01] @@ -29,7 +26,6 @@ phase 02 "Persistence" { phase 03 "Listing" { milestone v1.0 - name "Listing" slug "listing" goal "Entries are listed in the order they were added" depends_on [02] diff --git a/gsd/parity/fixtures/ledger/specforge-harness b/gsd/parity/fixtures/ledger/specforge-harness index f9c954c280..ac98bfd970 100644 --- a/gsd/parity/fixtures/ledger/specforge-harness +++ b/gsd/parity/fixtures/ledger/specforge-harness @@ -1,9 +1,9 @@ # specforge-harness 1 -v1.0/01/01-01/AR1 verdict:gsd/E501 2999b12e613bc33455f719ef22f439c26b87abb9653e9038dab4be98abcf96d3 -v1.0/01/01-01/KL1 verdict:gsd/E501 f5c098ccac35807046fd71463c942182d56474f948f256764f26456bf834e6bb -v1.0/01/01-01/TR1 verdict:gsd/E501 45c078ee15d21d40ca92623fb15bccf7166acc5ce30a506a871b816164cfef9d -v1.0/01/01-01/TR2 verdict:gsd/E501 8eb9f576d95569ceadda0d92602dfcfed2c16376fd11e6ac1b117a6b1e9acccd -v1.0/01/01-02/AR1 verdict:gsd/E501 7d6d58e0d6d538ddb6ec3766b7d8d1556a4ca5dc944faa9970bf09e9a16a7f63 -v1.0/01/01-02/KL1 verdict:gsd/E501 54a7b9a3897feeed8c05bbd09ebd0cb4dfc6acce9fb7316316ca4754808d6b67 -v1.0/01/01-02/TR1 verdict:gsd/E501 5b56eecb9a4fb5bbc4cc5fc5459515248f7cc15744da826bf807fb76c8807bc3 -v1.0/01/01-02/TR2 verdict:gsd/E501 8bae5585abca438ab91310ada830e040492d1add455de2e40a6b9ab3dbda07ff +v1.0/01/01-01/AR1 verdict:gsd/E501 1f192cd0dfc454ad37c8c894c0859e4126517575eec7d564ad832a30be394a27 +v1.0/01/01-01/KL1 verdict:gsd/E501 37c8ad48b858eb2dbec311ecfb44af98c99f1562402251bda106178bd3613e9f +v1.0/01/01-01/TR1 verdict:gsd/E501 c80b84665bcd3c4f1ba79975670017fb3d13a63d28e422f9fcea672e9df23827 +v1.0/01/01-01/TR2 verdict:gsd/E501 ff3cc6582632699bf33286c85ce18cdda7009fa6a25b6a7750e603925bddbcde +v1.0/01/01-02/AR1 verdict:gsd/E501 093ef10e1b2ae44c2a82942da97e2d149b01589f3fd7ea7dfc5fd1e84ec823fe +v1.0/01/01-02/KL1 verdict:gsd/E501 7ea01327b4f1db8be5379b2289bf878987406b5f084c39b79e770bf32d63d803 +v1.0/01/01-02/TR1 verdict:gsd/E501 376465d6d2d778fd5f0806b0f31cb84d05c4071adb6b1da26e783cdf191c1a4f +v1.0/01/01-02/TR2 verdict:gsd/E501 07604b21e7d47f113b34a02db7c346842c6c85a8404a56244417a06a68d9ec86 diff --git a/gsd/parity/fixtures/taskboard/spec/discuss.spec b/gsd/parity/fixtures/taskboard/spec/discuss.spec index a21aaf503f..99bdb7f26d 100644 --- a/gsd/parity/fixtures/taskboard/spec/discuss.spec +++ b/gsd/parity/fixtures/taskboard/spec/discuss.spec @@ -83,9 +83,8 @@ research 02-RESEARCH "Persistence research" { { capability "Persist the board" tier "Database/Storage" } ] context_pack { - route "gsd/phase-context" - digest "sha256:6b581dc0ec29be698b84ebe813ad16dc1241d5b16d86cce89be01fdddbd469a2" - max_tokens 50000 + route "gsd/phase-context" + digest "sha256:d4f9ad9ec2946fd212df4ddd5bd22b6059ec3a24ab254a8cac9b9f6a78c9ad59" } } diff --git a/gsd/parity/fixtures/taskboard/spec/plans.spec b/gsd/parity/fixtures/taskboard/spec/plans.spec index d2885e095c..893b6dcfb4 100644 --- a/gsd/parity/fixtures/taskboard/spec/plans.spec +++ b/gsd/parity/fixtures/taskboard/spec/plans.spec @@ -35,11 +35,11 @@ truth TR1 "A task added to a board has the next integer id" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:57Z" + at "2026-11-22T11:16:33Z" cited ["src/tasks.js", "test/tasks.test.js"] inputs { cited "sha256:158dff8d759f519da0fc2d646aeab3a2ccfa6f4b0c8febd2e4ddde6b98304bce" - phase "sha256:c76e530da600fb14ee69f0793892a7a8f0c915f5bb56c4dcdeff3a58da1cb08b" + phase "sha256:61a66e19cc7d023d515ee34988807f8da5a1defe0a4037f971f7e467c7294351" plan "sha256:f1d2f5eae220cf0ed8230cbc47826bb8bff020bbe749fd78df89dcb002fce92d" tests "none" truth "sha256:82e482debddf8b2d7881c81af042596716d39fb4b88eb8d8b6155e74f1495887" @@ -55,7 +55,7 @@ artifact AR1 "createBoard and addTask" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:55Z" + at "2026-11-22T11:16:28Z" inputs { artifact "sha256:2c2662f92037f318a2e106bb106ae80b92c215d6bfe23b2aca2ad23daae190fb" cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" @@ -73,7 +73,7 @@ key_link KL1 "The tests import addTask" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:56Z" + at "2026-11-22T11:16:31Z" inputs { cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" from "sha256:801e738cc1c232ce0a0cd71c3bc4908b74acbc510ab26c919df97f5010c4a32f" @@ -122,11 +122,11 @@ truth TR1 "A task is completed by its id" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:59Z" + at "2026-11-22T11:16:40Z" cited ["src/tasks.js", "test/tasks.test.js"] inputs { cited "sha256:158dff8d759f519da0fc2d646aeab3a2ccfa6f4b0c8febd2e4ddde6b98304bce" - phase "sha256:c76e530da600fb14ee69f0793892a7a8f0c915f5bb56c4dcdeff3a58da1cb08b" + phase "sha256:61a66e19cc7d023d515ee34988807f8da5a1defe0a4037f971f7e467c7294351" plan "sha256:6e995c187f75bcb70a652b755b78f7e192a6a0d4ce527e6de525c85989712591" tests "none" truth "sha256:763b12751147077b109fe5950ae9ccea81adcecaa06af3f56dd2f730795ef2a6" @@ -140,11 +140,11 @@ truth TR2 "Completing a missing id fails with a message naming it" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:17:00Z" + at "2026-11-22T11:16:42Z" cited ["src/tasks.js", "test/tasks.test.js"] inputs { cited "sha256:158dff8d759f519da0fc2d646aeab3a2ccfa6f4b0c8febd2e4ddde6b98304bce" - phase "sha256:c76e530da600fb14ee69f0793892a7a8f0c915f5bb56c4dcdeff3a58da1cb08b" + phase "sha256:61a66e19cc7d023d515ee34988807f8da5a1defe0a4037f971f7e467c7294351" plan "sha256:6e995c187f75bcb70a652b755b78f7e192a6a0d4ce527e6de525c85989712591" tests "none" truth "sha256:918969b1bd1300b0825039eecced772755e43bc0b1fd3ed67cda32a3381d9411" @@ -160,7 +160,7 @@ artifact AR1 "taskboard add and taskboard done" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:57Z" + at "2026-11-22T11:16:36Z" inputs { artifact "sha256:43db50d0eafcf823c83ca4a8561f1b0739fd042cba54aa5c95e3dc5e9287e932" cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" @@ -178,7 +178,7 @@ key_link KL1 "The command line imports the board" { verdict gsd/E501 verified { judge "gsd-verifier@1.1.0" model "test-model" - at "2026-11-19T02:16:58Z" + at "2026-11-22T11:16:38Z" inputs { cited "sha256:e02204fbbdd3035a64321ee96a30990a9af1f26d9ee1a344a1232a2b0020f2ff" from "sha256:4b5da11f8e1e1d3bd76d7914e1bde0454baf6016f337ab229cd75b96f764836c" diff --git a/gsd/parity/fixtures/taskboard/spec/v1.0.spec b/gsd/parity/fixtures/taskboard/spec/v1.0.spec index 35dcf5f2c8..7968c5d433 100644 --- a/gsd/parity/fixtures/taskboard/spec/v1.0.spec +++ b/gsd/parity/fixtures/taskboard/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -16,7 +14,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and read back" depends_on [01] @@ -30,7 +27,6 @@ phase 02 "Persistence" { phase 02.1 "Hotfix: titles survive a reload" { milestone v1.0 - name "Hotfix: titles survive a reload" slug "hotfix-titles-survive-a-reload" goal "A title is written to disk and read back unchanged" depends_on [02] @@ -42,7 +38,6 @@ phase 02.1 "Hotfix: titles survive a reload" { phase 03 "Listing" { milestone v1.0 - name "Listing" slug "listing" goal "Open tasks are listed and filtered" depends_on [02] diff --git a/gsd/parity/fixtures/taskboard/specforge-harness b/gsd/parity/fixtures/taskboard/specforge-harness index 72eceaad21..2873a78f37 100644 --- a/gsd/parity/fixtures/taskboard/specforge-harness +++ b/gsd/parity/fixtures/taskboard/specforge-harness @@ -1,12 +1,12 @@ # specforge-harness 1 -v1.0/01/01-01/AR1 verdict:gsd/E501 77fbdce7a5ad03f62449c411238f585a420ff1e487e4f558e5a2ff7835676492 -v1.0/01/01-01/KL1 verdict:gsd/E501 dde41e9f70a0a3d4ac32ef3b6785d648dfa5c339a7c49cd1cc2af6571a6ccd00 -v1.0/01/01-01/TR1 verdict:gsd/E501 4acff99a9f52d05d7f9c176f9f6fb43bf06dcc357483edbe2839a5a8a6b12fb8 -v1.0/01/01-02/AR1 verdict:gsd/E501 54b9371098f6f8c2a30f63f6e3562a6de89624cdff80616f1a16c23079c51d10 -v1.0/01/01-02/KL1 verdict:gsd/E501 de3f1d936b01383ba0e4ce9b1aac90e3c510239650068a8b18c40d45806ceea6 -v1.0/01/01-02/TR1 verdict:gsd/E501 5c8aa6f84f80a0bc28a5bb65e13f3d8e14c0daf5a66683d30e15902f6b6cc39a -v1.0/01/01-02/TR2 verdict:gsd/E501 657a05c8e1a04b24a45ae19ae4751d668255378a9ec2d8cfa4ebf7f2bf0f68f8 +v1.0/01/01-01/AR1 verdict:gsd/E501 a69359c0079d14126387777f1350b2b9f3abcd2a37f1ba3a514a0ddcdc001a80 +v1.0/01/01-01/KL1 verdict:gsd/E501 c481f912b670a66e940a5ab3e82d28cb541d4157aea5c482d024119471a97469 +v1.0/01/01-01/TR1 verdict:gsd/E501 401dc7a9dc73b60c7cb29309866a036f1c08333289f820e54f47816252bde231 +v1.0/01/01-02/AR1 verdict:gsd/E501 06735c3149f075eaa6ee8a768bb58d03cb8787e99a8e9bbcb98ad5b0c51eb5f3 +v1.0/01/01-02/KL1 verdict:gsd/E501 b1364c38bb95ac1b5ac056ed72778ded4f8cfe389ac6c127837df6528d92ee1f +v1.0/01/01-02/TR1 verdict:gsd/E501 fda3a6c4ef026b1946d5faaa6b489b45f9be13bf5bce0b2f628c69a9accffd77 +v1.0/01/01-02/TR2 verdict:gsd/E501 118e8dd372defcbf683a438297e5a79979c50a0ac3683cbb01747c3664ca6f28 v1.0/01/01-UAT/U1 result 21eb67fd26156190cbf698b737b75ceacadc918fbb7691eaad6a03bd6cd3ffb0 v1.0/01/01-UAT/U2 result 8bbf09ace72e1e210d0739e6ce078f370aab0582b3a4952049ea4b3c0fd67f84 v1.0/01/01-UAT/U3 result 826f34f9e6ca53dd55e33a0afb250d3bbf8d33296b220b8421a801352ab31f33 -v1.0/02/02-RESEARCH context_pack 423f09bc2f1859aa16efbd78a8f483d2cdeb8ec2e850337f5a299e0c33ed7b9b +v1.0/02/02-RESEARCH context_pack ca8adfa7a75ee88523278e0cc508b3a4b94f894786196fd9c0df8c4766dfec2c diff --git a/gsd/parity/fixtures/vault/spec/v1.0.spec b/gsd/parity/fixtures/vault/spec/v1.0.spec index ddbc798e3d..c097a87432 100644 --- a/gsd/parity/fixtures/vault/spec/v1.0.spec +++ b/gsd/parity/fixtures/vault/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Vault 1.0" { - name "Vault 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Secrets can be stored and read back" requirements [SEC-01, SEC-02] @@ -16,7 +14,6 @@ phase 01 "Core" { phase 02 "Sharing" { milestone v1.0 - name "Sharing" slug "sharing" goal "A secret can be shared with another person" depends_on [01] diff --git a/gsd/security/assets/gsd-core/templates/SECURITY.md b/gsd/security/assets/gsd-core/templates/SECURITY.md index d5c34e778e..448d51ae58 100644 --- a/gsd/security/assets/gsd-core/templates/SECURITY.md +++ b/gsd/security/assets/gsd-core/templates/SECURITY.md @@ -3,6 +3,8 @@ > Per-phase security contract: threat register, accepted risks, and audit trail. +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`). + A phase's security audit is entities: its `security_audit` (`<phase>/NN-SECURITY`), the `trust_boundary` and `threat` entities of its plans, one `accepted_risk` per accepted risk and one `audit_run` per audit that changed the counts. `specforge schema --kind security_audit` (likewise `trust_boundary`, `threat`, `accepted_risk` and `audit_run`) lists diff --git a/gsd/security/assets/gsd-core/workflows/secure-phase.md b/gsd/security/assets/gsd-core/workflows/secure-phase.md index 06ceb7cd00..8ca3d78aab 100644 --- a/gsd/security/assets/gsd-core/workflows/secure-phase.md +++ b/gsd/security/assets/gsd-core/workflows/secure-phase.md @@ -28,7 +28,10 @@ AGENT_SKILLS_AUDITOR="" # the host install carries the skills of gsd-security- **If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated. -The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `name` in `INIT`. +The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `title` in `INIT`. + +In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is +its `title`. ```bash AUDITOR_MODEL="" # resolve-model is not part of @gsd/security: the host picks the model diff --git a/gsd/security/tests/cli/record.rs b/gsd/security/tests/cli/record.rs index 8616f1dc4c..081325b44f 100644 --- a/gsd/security/tests/cli/record.rs +++ b/gsd/security/tests/cli/record.rs @@ -242,7 +242,7 @@ fn each_phases_audit_lands_beside_its_own_plans() { p.write( "spec/v1.0.spec", &format!( - "{milestone}\nphase 03 \"Later\" {{\n milestone v1.0\n name \"Later\"\n slug \"later\"\n goal \"Later\"\n}}\n" + "{milestone}\nphase 03 \"Later\" {{\n milestone v1.0\n slug \"later\"\n goal \"Later\"\n}}\n" ), ); p.write( diff --git a/gsd/security/tests/golden/prompts/claude-code/secure_phase.json b/gsd/security/tests/golden/prompts/claude-code/secure_phase.json index aa47daff50..5e20403ae1 100644 --- a/gsd/security/tests/golden/prompts/claude-code/secure_phase.json +++ b/gsd/security/tests/golden/prompts/claude-code/secure_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `name` in `INIT`.", + "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `title` in `INIT`.", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/security: the host picks the model", @@ -56,15 +59,10 @@ "```", "", "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"secure-phase\"`.", - "", - "If no active secure-phase step hook exists: exit with \"Security enforcement disabled. Enable via /gsd-settings.\"", - "", - "Display banner: `GSD > SECURE PHASE {N}: {name}`" + "" ], - "bytes": 19604, + "bytes": 19840, "end": [ - "", - "## The judged verdicts here (@gsd/security)", "", "This prompt judges two rules. The auditor returns its findings and records nothing; after the audit is recorded, you record each verdict:", "", @@ -86,6 +84,8 @@ "", "> Per-phase security contract: threat register, accepted risks, and audit trail.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", + "", "A phase's security audit is entities: its `security_audit` (`<phase>/NN-SECURITY`), the `trust_boundary` and `threat`", "entities of its plans, one `accepted_risk` per accepted risk and one `audit_run` per audit that changed the counts.", "`specforge schema --kind security_audit` (likewise `trust_boundary`, `threat`, `accepted_risk` and `audit_run`) lists", @@ -186,7 +186,7 @@ "", "<process>" ], - "lines": 331, + "lines": 336, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:4130be3cf2502b50867dfd2b47ad586b5ceef223f50acdd305988613f961fc7b", + "digest": "sha256:5ea7b9f9d78eed8d2ff2f82e306788fff7ee11c23afb60461be221a5eb4ad3e8", "judged": [ { "outcomes": [ @@ -249,5 +249,5 @@ ], "subject": "v1.0/01" }, - "sha256": "4130be3cf2502b50867dfd2b47ad586b5ceef223f50acdd305988613f961fc7b" + "sha256": "5ea7b9f9d78eed8d2ff2f82e306788fff7ee11c23afb60461be221a5eb4ad3e8" } diff --git a/gsd/security/tests/golden/prompts/codex/secure_phase.json b/gsd/security/tests/golden/prompts/codex/secure_phase.json index dfb58540d0..76de070304 100644 --- a/gsd/security/tests/golden/prompts/codex/secure_phase.json +++ b/gsd/security/tests/golden/prompts/codex/secure_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `name` in `INIT`.", + "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `title` in `INIT`.", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/security: the host picks the model", @@ -56,15 +59,10 @@ "```", "", "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"secure-phase\"`.", - "", - "If no active secure-phase step hook exists: exit with \"Security enforcement disabled. Enable via $gsd-settings.\"", - "", - "Display banner: `GSD > SECURE PHASE {N}: {name}`" + "" ], - "bytes": 28094, + "bytes": 28330, "end": [ - "", - "## The judged verdicts here (@gsd/security)", "", "This prompt judges two rules. The auditor returns its findings and records nothing; after the audit is recorded, you record each verdict:", "", @@ -86,6 +84,8 @@ "", "> Per-phase security contract: threat register, accepted risks, and audit trail.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", + "", "A phase's security audit is entities: its `security_audit` (`<phase>/NN-SECURITY`), the `trust_boundary` and `threat`", "entities of its plans, one `accepted_risk` per accepted risk and one `audit_run` per audit that changed the counts.", "`specforge schema --kind security_audit` (likewise `trust_boundary`, `threat`, `accepted_risk` and `audit_run`) lists", @@ -186,7 +186,7 @@ "", "Generic-agent workaround (multi_agent_v1 schema — NO agent_type field):" ], - "lines": 449, + "lines": 454, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:dd1cbebe828948307c27342f98fc6feb2b8d5974560c19b53d4aead5f7cf6060", + "digest": "sha256:a070c90857a2a4d991566a375fc53043bb574e4ce022d63e7ae347589abf82ba", "judged": [ { "outcomes": [ @@ -249,5 +249,5 @@ ], "subject": "v1.0/01" }, - "sha256": "dd1cbebe828948307c27342f98fc6feb2b8d5974560c19b53d4aead5f7cf6060" + "sha256": "a070c90857a2a4d991566a375fc53043bb574e4ce022d63e7ae347589abf82ba" } diff --git a/gsd/security/tests/golden/prompts/cursor/secure_phase.json b/gsd/security/tests/golden/prompts/cursor/secure_phase.json index 8798e0bdb5..c5b2a966ba 100644 --- a/gsd/security/tests/golden/prompts/cursor/secure_phase.json +++ b/gsd/security/tests/golden/prompts/cursor/secure_phase.json @@ -46,7 +46,10 @@ "", "**If `response_language` is set:** All user-facing output of this workflow — narration between tool calls, status updates, progress notes, findings, questions, prompts, and explanations — MUST be presented in `{response_language}`. Technical terms, code, file paths, and subagent prompts stay in English — only user-facing output is translated.", "", - "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `name` in `INIT`.", + "The phase is `$PHASE_ID`: its number is the id's last segment, and its name the phase entity's `title` in `INIT`.", + "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`), and `{name}` is", + "its `title`.", "", "```bash", "AUDITOR_MODEL=\"\" # resolve-model is not part of @gsd/security: the host picks the model", @@ -56,15 +59,10 @@ "```", "", "Resolve active step hooks from `VERIFY_POST_HOOKS_JSON` where `kind == \"step\"` and `ref.skill == \"secure-phase\"`.", - "", - "If no active secure-phase step hook exists: exit with \"Security enforcement disabled. Enable via /gsd-settings.\"", - "", - "Display banner: `GSD > SECURE PHASE {N}: {name}`" + "" ], - "bytes": 20376, + "bytes": 20612, "end": [ - "", - "## The judged verdicts here (@gsd/security)", "", "This prompt judges two rules. The auditor returns its findings and records nothing; after the audit is recorded, you record each verdict:", "", @@ -86,6 +84,8 @@ "", "> Per-phase security contract: threat register, accepted risks, and audit trail.", "", + "In a phase's label, `{N}` is the phase's number, the last segment of its `id` (`v1.0/03` gives `03`).", + "", "A phase's security audit is entities: its `security_audit` (`<phase>/NN-SECURITY`), the `trust_boundary` and `threat`", "entities of its plans, one `accepted_risk` per accepted risk and one `audit_run` per audit that changed the counts.", "`specforge schema --kind security_audit` (likewise `trust_boundary`, `threat`, `accepted_risk` and `audit_run`) lists", @@ -186,7 +186,7 @@ "- (C) Phase not executed — exit with guidance", "" ], - "lines": 350, + "lines": 355, "payload": { "attribution": { "copyright": "Copyright (c) 2026 Open GSD", @@ -195,7 +195,7 @@ "upstream": "gsd-core", "version": "v1.19.0" }, - "digest": "sha256:46b3d9e34dbbaa6486535e71a8329890bd72acd28a51f86da8e4da376e93abb9", + "digest": "sha256:0e2697ce44c4e3eb7096227b4fc52406f8134bdc576a615cf80000b4c5931a2a", "judged": [ { "outcomes": [ @@ -249,5 +249,5 @@ ], "subject": "v1.0/01" }, - "sha256": "46b3d9e34dbbaa6486535e71a8329890bd72acd28a51f86da8e4da376e93abb9" + "sha256": "0e2697ce44c4e3eb7096227b4fc52406f8134bdc576a615cf80000b4c5931a2a" } diff --git a/gsd/security/tests/projects/model/spec/v1.0.spec b/gsd/security/tests/projects/model/spec/v1.0.spec index b130c4fa88..dc4916b2a7 100644 --- a/gsd/security/tests/projects/model/spec/v1.0.spec +++ b/gsd/security/tests/projects/model/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and loaded on start" depends_on [01] diff --git a/gsd/security/tests/projects/recording/spec/v1.0.spec b/gsd/security/tests/projects/recording/spec/v1.0.spec index b130c4fa88..dc4916b2a7 100644 --- a/gsd/security/tests/projects/recording/spec/v1.0.spec +++ b/gsd/security/tests/projects/recording/spec/v1.0.spec @@ -1,10 +1,8 @@ milestone v1.0 "Taskboard 1.0" { - name "Taskboard 1.0" } phase 01 "Core" { milestone v1.0 - name "Core" slug "core" goal "Tasks can be added and completed" requirements [TASK-01, TASK-02] @@ -13,7 +11,6 @@ phase 01 "Core" { phase 02 "Persistence" { milestone v1.0 - name "Persistence" slug "persistence" goal "Tasks are saved to disk and loaded on start" depends_on [01] diff --git a/spec/behaviors/context-routes.spec b/spec/behaviors/context-routes.spec index 2e56ca49b8..b79b812aa0 100644 --- a/spec/behaviors/context-routes.spec +++ b/spec/behaviors/context-routes.spec @@ -6,8 +6,8 @@ requirement FEATURE-012 "Context Routes" { connected they are: a small slice of a plan drops the plan's own first task while it keeps other phases. An extension declares context routes: for a subject kind, ordered sections of named selectors, each core or - enrich, and the settings the role reads. The kernel serves one route for one entity as a pack: its sections in - declared order under a token budget, core never cut, with a digest anyone can recompute, on the CLI, the MCP tool - and the context resource. + enrich, and the settings the role reads. The kernel serves one route for one entity as a pack: its core sections + whole whatever they cost, then its enrich sections in declared order within the route's allowance or a cap the read + states, with a digest anyone can recompute, on the CLI, the MCP tool and the context resource. """ } diff --git a/spec/governance/constraints.spec b/spec/governance/constraints.spec index 7a5f7d73cd..1796b2f70b 100644 --- a/spec/governance/constraints.spec +++ b/spec/governance/constraints.spec @@ -256,7 +256,7 @@ requirement PORTABILITY-01 "Wasm Binary Size Limit" { Each extension .wasm binary SHOULD be under 5MB. Binaries exceeding 10MB MUST produce a warning diagnostic at install time. This ensures reasonable download times and first-compilation latency. - One exception: the vendored builtin @gsd/core (5,719,421 B, about + One exception: the vendored builtin @gsd/core (5,728,449 B, about half of it its prompt and agent assets) is held to its own allowance, 5,800,000 B, which the blob-size check enforces (gate/src/blob_size.rs, ADR 0366 D3). diff --git a/spec/product/milestones.spec b/spec/product/milestones.spec index c9c57343ca..bba7b1c780 100644 --- a/spec/product/milestones.spec +++ b/spec/product/milestones.spec @@ -1,6 +1,5 @@ -phase 01 "Phase 1: Structural Parsing" { +phase 01 "Structural Parsing" { milestone v0.1.0 - name "Structural Parsing" slug "structural-parsing" requirements [FEATURE-123, FEATURE-023, FEATURE-019] success_criteria [ @@ -14,9 +13,8 @@ phase 01 "Phase 1: Structural Parsing" { """ } -phase 02 "Phase 2: Resolution & Graph Construction" { +phase 02 "Resolution & Graph Construction" { milestone v0.1.0 - name "Resolution & Graph Construction" slug "resolution-graph-construction" depends_on [01] requirements [FEATURE-109, FEATURE-047] @@ -32,9 +30,8 @@ phase 02 "Phase 2: Resolution & Graph Construction" { """ } -phase 03 "Phase 3: Validation & Error Reporting" { +phase 03 "Validation & Error Reporting" { milestone v0.1.0 - name "Validation & Error Reporting" slug "validation-error-reporting" depends_on [02] requirements [FEATURE-124, FEATURE-017, FEATURE-006, FEATURE-105] @@ -50,9 +47,8 @@ phase 03 "Phase 3: Validation & Error Reporting" { """ } -phase 04 "Phase 4: Output & Agent Export" { +phase 04 "Output & Agent Export" { milestone v0.1.0 - name "Output & Agent Export" slug "output-agent-export" depends_on [03] requirements [FEATURE-057, FEATURE-130, FEATURE-001, FEATURE-101] @@ -68,9 +64,8 @@ phase 04 "Phase 4: Output & Agent Export" { """ } -phase 05 "Phase 5: Project Initialization" { +phase 05 "Project Initialization" { milestone v0.1.0 - name "Project Initialization" slug "project-initialization" depends_on [04] requirements [FEATURE-106] @@ -86,9 +81,8 @@ phase 05 "Phase 5: Project Initialization" { """ } -phase 01 "Phase 6: Incremental Compilation" { +phase 01 "Incremental Compilation" { milestone v0.5.0 - name "Incremental Compilation" slug "incremental-compilation" requirements [FEATURE-050, FEATURE-051, FEATURE-142] success_criteria [ @@ -103,9 +97,8 @@ phase 01 "Phase 6: Incremental Compilation" { """ } -phase 02 "Phase 7: LSP Server" { +phase 02 "LSP Server" { milestone v0.5.0 - name "LSP Server" slug "lsp-server" depends_on [01] requirements [ @@ -130,9 +123,8 @@ phase 02 "Phase 7: LSP Server" { """ } -phase 03 "Phase 8: Code Formatting" { +phase 03 "Code Formatting" { milestone v0.5.0 - name "Code Formatting" slug "code-formatting" requirements [FEATURE-009, FEATURE-061] success_criteria [ @@ -147,9 +139,8 @@ phase 03 "Phase 8: Code Formatting" { """ } -phase 04 "Phase 9: Zero-Entity Core Architecture" { +phase 04 "Zero-Entity Core Architecture" { milestone v0.5.0 - name "Zero-Entity Core Architecture" slug "zero-entity-core-architecture" depends_on [03] requirements [ @@ -177,9 +168,8 @@ phase 04 "Phase 9: Zero-Entity Core Architecture" { """ } -phase 01 "Phase 10: Wasm Extension Runtime" { +phase 01 "Wasm Extension Runtime" { milestone v1.0.0 - name "Wasm Extension Runtime" slug "wasm-extension-runtime" requirements [ FEATURE-136, @@ -205,9 +195,8 @@ phase 01 "Phase 10: Wasm Extension Runtime" { """ } -phase 02 "Phase 11: Extension Ecosystem" { +phase 02 "Extension Ecosystem" { milestone v1.0.0 - name "Extension Ecosystem" slug "extension-ecosystem" depends_on [01] requirements [ @@ -234,9 +223,8 @@ phase 02 "Phase 11: Extension Ecosystem" { """ } -phase 03 "Phase 12: Graph Protocol Schema Versioning" { +phase 03 "Graph Protocol Schema Versioning" { milestone v1.0.0 - name "Graph Protocol Schema Versioning" slug "graph-protocol-schema-versioning" requirements [FEATURE-120, FEATURE-048] success_criteria [ @@ -251,9 +239,8 @@ phase 03 "Phase 12: Graph Protocol Schema Versioning" { """ } -phase 05 "Phase 13: MCP Server" { +phase 05 "MCP Server" { milestone v0.5.0 - name "MCP Server" slug "mcp-server" requirements [ FEATURE-067, diff --git a/spec/product/releases.spec b/spec/product/releases.spec index d486be16a4..82c49ee0cc 100644 --- a/spec/product/releases.spec +++ b/spec/product/releases.spec @@ -1,5 +1,4 @@ milestone v0.1.0 "SpecForge Alpha" { - name "SpecForge Alpha" delivered """ Initial alpha with core compiler pipeline, CLI binary, and basic validation. Includes tree-sitter grammar for .spec files, import @@ -16,7 +15,6 @@ milestone v0.1.0 "SpecForge Alpha" { } milestone v0.5.0 "SpecForge Beta" { - name "SpecForge Beta" goal """ Feature-complete release adding LSP, MCP, incremental compilation, formatting, and the zero-entity core architecture. Enables full @@ -25,7 +23,6 @@ milestone v0.5.0 "SpecForge Beta" { } milestone v1.0.0 "SpecForge 1.0" { - name "SpecForge 1.0" goal """ Production release with Wasm extension runtime, first-party extensions, and schema versioning. The graph protocol schema diff --git a/xtask/src/absorb/how.rs b/xtask/src/absorb/how.rs index f1d69ffe73..1a6b4e2aea 100644 --- a/xtask/src/absorb/how.rs +++ b/xtask/src/absorb/how.rs @@ -97,23 +97,71 @@ pub fn slug(text: &str) -> String { slug.trim_end_matches('-').to_string() } -/// A phase's name from its old milestone's title: the title less a leading `Phase `, its digits, an optional letter, -/// `:` and the spaces after it (GSD renders the number from the phase's id), else the title as written. -pub fn phase_name(title: &str) -> String { - numbered(title).unwrap_or(title).to_string() +/// The phase number `title` begins with and what follows it, separators dropped, when it begins with one: `Phase` +/// (any case) and a number in GSD's grammar (`\d+[A-Z]?(\.\d+)*`), then no letter or digit; or a bare number of +/// digits and dots, then `:` or `.` before a space or the end, `)`, or a dash between spaces (`03: Core`, `3. Core`, +/// `2) Core`, `04 - Core`). A number inside the title (`HTTP 2 support`, `2FA login`, `v2.0 migration`) is none. +/// +/// Copied from `gsd/core/src/passes/roadmap/titles.rs` `numbered`, as [`slug`] is, since no crate outside `gsd/` +/// depends on the gsd crates: a converted phase's title is its name alone (ADR 0387), so the converter drops exactly +/// the number `gsd/W109` would flag. +pub fn numbered(title: &str) -> Option<(&str, &str)> { + let text = title.trim_start(); + let end = match text.get(..5) { + Some(word) if word.eq_ignore_ascii_case("phase") => worded(&text[5..]).map(|n| 5 + n)?, + _ => bare(text)?, + }; + let rest = text[end..].trim_start_matches(|c: char| { + c.is_whitespace() || matches!(c, ':' | '.' | ')' | '-' | '–' | '—') + }); + Some((text[..end].trim_end(), rest.trim_end())) } -/// What follows a leading `Phase <digits><letter?>: ` in `title`, when it does and something follows. -fn numbered(title: &str) -> Option<&str> { - let rest = title.strip_prefix("Phase ")?; - let after = rest.trim_start_matches(|c: char| c.is_ascii_digit()); - if after.len() == rest.len() { +/// The length of `rest` up to the end of the number after `Phase`: spaces, then a number in GSD's grammar, not +/// followed by a letter or a digit. +fn worded(rest: &str) -> Option<usize> { + let spaces = rest.len() - rest.trim_start().len(); + let number = grammar(&rest[spaces..], true)?; + let end = spaces + number; + match rest[end..].chars().next() { + Some(c) if c.is_alphanumeric() => None, + _ => Some(end), + } +} + +/// The length of a bare number at the start of `text` when a label's separator follows it. +fn bare(text: &str) -> Option<usize> { + let end = grammar(text, false)?; + let after = &text[end..]; + let spaced = |tail: &str| tail.is_empty() || tail.starts_with(char::is_whitespace); + let separated = match after.chars().next()? { + ':' | '.' => spaced(&after[1..]), + ')' => true, + c if c.is_whitespace() => { + let dash = after.trim_start(); + dash.starts_with(['-', '–', '—']) && spaced(&dash[dash.chars().next()?.len_utf8()..]) + } + _ => false, + }; + separated.then_some(end) +} + +/// The length of the number at the start of `text`: digits, an optional capital letter when `lettered`, then any +/// `.digits`. +fn grammar(text: &str, lettered: bool) -> Option<usize> { + let digits = |s: &str| s.len() - s.trim_start_matches(|c: char| c.is_ascii_digit()).len(); + let mut end = digits(text); + if end == 0 { return None; } - let after = after - .strip_prefix(|c: char| c.is_ascii_alphabetic()) - .filter(|tail| tail.starts_with(':')) - .unwrap_or(after); - let name = after.strip_prefix(':')?.trim_start(); - (!name.is_empty()).then_some(name) + if lettered && text[end..].starts_with(|c: char| c.is_ascii_uppercase()) { + end += 1; + } + while let Some(tail) = text[end..].strip_prefix('.') { + match digits(tail) { + 0 => break, + n => end += 1 + n, + } + } + Some(end) } diff --git a/xtask/src/absorb/plan.rs b/xtask/src/absorb/plan.rs index fc358dc073..0992424b74 100644 --- a/xtask/src/absorb/plan.rs +++ b/xtask/src/absorb/plan.rs @@ -65,6 +65,10 @@ pub const NOT_IN_FORCE: &str = "a decision not in force (its status is not accep longer holds: it converts to nothing, and its ADR under docs/adr/ is its record \ (ADR 0372 D5)"; +/// Why a phase's title loses its leading `Phase N:`: the label GSD prints computes the number from the id. +pub const NUMBERED: &str = "a number of the old milestones' numbering: GSD labels a phase `Phase <the last segment \ + of its id>: <its title>`, so the title holds the name only"; + /// The ledger's field for one `method` member of an entity dropped whole. const METHOD: &str = "method"; /// The ledger's field for an entity's field annotations, dropped whole: one entry, each field to its annotations. @@ -367,38 +371,39 @@ impl Planner { } } - /// The entity `e` converts to, empty but for its header, its name and its scope field, keyed by its new path. + /// The entity `e` converts to, empty but for its header and its scope field, keyed by its new path. Its title is + /// a milestone's and a phase's one name (ADR 0387): GSD labels a phase `Phase <its id's last segment>: <title>`, + /// so an old title's leading phase number (`Phase 12:`, `03:`, `3.`, the forms `gsd/W109` flags) would print a + /// second number, of another numbering: it is ledgered `dropped`, and a title that held only a number is filled + /// with the old id, as a missing one is. fn draft(&mut self, e: &OldEntity) { let Some(new) = self.ids.get(&e.kind, &e.id).cloned() else { return; }; let kind = new.kind; - let title = match &e.title { - Some(title) if !title.trim().is_empty() => title.clone(), - _ => { - self.ledger.record( - &e.kind, - &e.id, - "title", - Value::Null, - Why::Filled { - field: format!("{kind}.title"), - value: json!(e.id), - }, - ); - e.id.clone() - } - }; - let mut fields = BTreeMap::new(); - match kind { - "milestone" => { - fields.insert("name".to_string(), Input::One(title.clone())); - } - "phase" => { - fields.insert("name".to_string(), Input::One(how::phase_name(&title))); - } - _ => {} + let mut title = e.title.clone().unwrap_or_default(); + if kind == "phase" + && let Some((number, name)) = how::numbered(&title) + { + let (number, name) = (json!(number), name.to_string()); + let why = Why::Dropped(NUMBERED.to_string()); + self.ledger.record(&e.kind, &e.id, "title", number, why); + title = name; + } + if title.trim().is_empty() { + self.ledger.record( + &e.kind, + &e.id, + "title", + Value::Null, + Why::Filled { + field: format!("{kind}.title"), + value: json!(e.id), + }, + ); + title = e.id.clone(); } + let mut fields = BTreeMap::new(); if let Some((field, scope)) = &new.scope { fields.insert((*field).to_string(), Input::One(scope.clone())); } diff --git a/xtask/src/absorb/plan/roadmap.rs b/xtask/src/absorb/plan/roadmap.rs index 74a166c3f4..80f655ac26 100644 --- a/xtask/src/absorb/plan/roadmap.rs +++ b/xtask/src/absorb/plan/roadmap.rs @@ -74,7 +74,7 @@ impl Planner { } } - /// A phase's required values its old milestone lacks: its slug, from its name (none when the name holds no ASCII + /// A phase's required values its old milestone lacks: its slug, from its title (none when the title holds no ASCII /// letter or digit, so the missing-value stop names the phase); its one success criterion, its description, when it /// has no exit criteria (none when it has no description either). pub(super) fn phase_fills(&mut self, e: &OldEntity) -> Vec<(&'static str, Input)> { @@ -82,11 +82,9 @@ impl Planner { return Vec::new(); }; let mut fills = Vec::new(); - if let Some(Input::One(name)) = draft.fields.get("name") { - let slug = how::slug(name); - if !slug.is_empty() { - fills.push(("slug", Input::One(slug))); - } + let slug = how::slug(&draft.title); + if !slug.is_empty() { + fills.push(("slug", Input::One(slug))); } let description = e.fields.get("description").and_then(Value::as_str); if !draft.fields.contains_key("success_criteria") diff --git a/xtask/src/absorb/tests/decision.rs b/xtask/src/absorb/tests/decision.rs index 174f99615d..1c4bd416e9 100644 --- a/xtask/src/absorb/tests/decision.rs +++ b/xtask/src/absorb/tests/decision.rs @@ -18,7 +18,7 @@ fn a_decision_becomes_one_create_keeping_its_title_and_file() { let entities = old.entities(); plan::prechecks(&entities).expect("the fixture converts"); let planned = plan::plan(&entities); - let headers: Vec<(&str, String, &str, &str)> = planned + let headers: Vec<(&str, String, String, &str)> = planned .creates .iter() .map(|edit| match edit { @@ -27,27 +27,34 @@ fn a_decision_becomes_one_create_keeping_its_title_and_file() { } => ( kind.as_str(), super::path_of(edit), - title.as_str(), + title.clone(), file.as_str(), ), other => panic!("only creates: {other:?}"), }) .collect(); - let expected: Vec<(&str, String, &str, &str)> = entities + let expected: Vec<(&str, String, String, &str)> = entities .iter() .filter_map(|e| { let new = planned.ids.get(&e.kind, &e.id)?; - Some(( - new.kind, - new.path(), - e.title.as_deref().unwrap(), - e.file.as_str(), - )) + let title = match e.id.as_str() { + // the fixture's one numbered title: the phase is titled by its name + "third_cut" => { + assert_eq!(e.title.as_deref(), Some("Phase 3: Third Cut")); + "Third Cut".to_string() + } + _ => e.title.clone().unwrap(), + }; + Some((new.kind, new.path(), title, e.file.as_str())) }) .collect(); assert_eq!( headers, expected, - "every converted entity, once, in the old order, by its new path" + "every converted entity, once, in the old order, by its new path, a phase titled by its name" + ); + assert!( + headers.iter().any(|h| h.0 == "phase" && h.2 == "Third Cut"), + "the numbered title converts: {headers:?}" ); let decisions: Vec<_> = headers.iter().filter(|h| h.0 == "decision").collect(); assert_eq!( diff --git a/xtask/src/absorb/tests/roadmap.rs b/xtask/src/absorb/tests/roadmap.rs index 4b61adbf03..0c24d439b0 100644 --- a/xtask/src/absorb/tests/roadmap.rs +++ b/xtask/src/absorb/tests/roadmap.rs @@ -2,14 +2,13 @@ //! references written through the id map; a requirement no written phase lists is `v2` (ADR 0372 D3, D4, D7). use serde_json::{Value, json}; -use specforge_ops::authoring::edit::Input; use std::collections::{BTreeMap, BTreeSet}; use super::super::ledger::Why; -use super::super::plan::Planned; +use super::super::plan::{self, Planned}; use super::super::read::OldEntity; use super::super::table; -use super::{create, field, field_of, ledgered, many, old, one, paths, planned, stops}; +use super::{create, field, field_of, ledgered, many, old, one, path_of, paths, planned, stops}; /// `e` written at `line` of `file`. fn at(mut e: OldEntity, file: &str, line: usize) -> OldEntity { @@ -43,6 +42,20 @@ fn why_of(planned: &Planned, id: &str, field: &str) -> Vec<Why> { .collect() } +/// The title the create of `path` writes: a milestone's and a phase's one name (ADR 0387). +fn title_of<'a>(planned: &'a Planned, path: &str) -> &'a str { + planned + .creates + .iter() + .find_map(|edit| match edit { + specforge_ops::authoring::edit::Edit::Create { title, .. } if path_of(edit) == path => { + Some(title.as_str()) + } + _ => None, + }) + .unwrap_or_else(|| panic!("no create of {path}")) +} + /// The dropped entries of `id`'s `field`: (value, reason), a text value as itself. fn dropped(planned: &Planned, id: &str, field: &str) -> Vec<(String, String)> { planned @@ -82,11 +95,15 @@ fn a_release_becomes_a_version_milestone_named_by_its_version() { assert_eq!( fields, &BTreeMap::from([ - ("name".to_string(), one("The first")), ("goal".to_string(), one("Usable every day.")), ("delivered".to_string(), one("Entries are saved.")), ]) ); + assert_eq!( + title_of(&planned, "v0.1.0"), + "The first", + "no field repeats the title" + ); let check = planned.checks.iter().find(|c| c.id == "first").unwrap(); assert_eq!( ( @@ -148,20 +165,42 @@ fn a_listed_milestone_becomes_a_phase_numbered_in_source_order_under_its_release ids.contains(&("milestone", "third", "v0.2.0/01")), "{ids:?}" ); - let specforge_ops::authoring::edit::Edit::Create { id, .. } = &planned.creates[4] else { - panic!("a create") + let Some(specforge_ops::authoring::edit::Edit::Create { id, title, .. }) = planned + .creates + .iter() + .find(|edit| path_of(edit) == "v0.2.0/01") + else { + panic!("no create of v0.2.0/01") }; assert_eq!( id, "01", "a name holds no `/`: the milestone field places it" ); + assert_eq!( + title, "Third Cut", + "a phase is titled by its name: GSD prints its number from its id" + ); + assert_eq!( + ledgered(&planned, "third") + .into_iter() + .filter(|(f, _)| f == "title") + .collect::<Vec<_>>(), + [( + "title".to_string(), + Why::Dropped(plan::NUMBERED.to_string()) + )], + "the old title's `Phase 3:` is not written: GSD's label prints the number from the id" + ); + assert!( + why_of(&planned, "first", "title").is_empty(), + "a title with no `Phase N:` is written as itself" + ); let (kind, fields) = create(&planned, "v0.2.0/01"); assert_eq!(kind, "phase"); assert_eq!( fields, &BTreeMap::from([ ("milestone".to_string(), one("v0.2.0")), - ("name".to_string(), one("Third Cut")), ("slug".to_string(), one("third-cut")), ("goal".to_string(), one("The third cut")), ("success_criteria".to_string(), many(&["One", "Two"])), @@ -174,10 +213,15 @@ fn a_listed_milestone_becomes_a_phase_numbered_in_source_order_under_its_release value: json!("third-cut") }] ); + assert_eq!( + title_of(&planned, "v0.1.0/01"), + "The first", + "a title with no `Phase N:` is written as itself" + ); assert_eq!( field(&planned, "v0.1.0/01", "name"), - Some(&one("The first")), - "a title with no `Phase N:` keeps its name" + None, + "no field repeats the title" ); } @@ -307,11 +351,106 @@ fn a_name_with_no_ascii_letter_fills_no_slug() { first.title = Some("第一段".to_string()); let planned = planned(&[release("one", "0.1.0", &["first"]), first]); let fields = create(&planned, "v0.1.0/01").1; - assert_eq!(fields.get("name"), Some(&one("第一段"))); + assert_eq!(title_of(&planned, "v0.1.0/01"), "第一段"); assert!(!fields.contains_key("slug"), "{fields:?}"); assert_eq!(why_of(&planned, "first", "slug"), []); } +/// A phase's title drops every leading number `gsd/W109` flags (ADR 0387 D3), each ledgered `dropped`, so a converted +/// project is never W109; a title that held only a number is filled with the old id, as a missing one is; a number +/// inside a title, or one outside the label grammar, is kept. +#[test] +fn a_phase_title_drops_every_number_w109_flags() { + let cases = [ + ("a", "Phase 2.1: Hotfix", "Hotfix", Some("Phase 2.1")), + ("b", "Phase 3 - Listing", "Listing", Some("Phase 3")), + ("c", "phase 4: Sharing", "Sharing", Some("phase 4")), + ("d", "PHASE 12A: Split", "Split", Some("PHASE 12A")), + ("e", "03: Core", "Core", Some("03")), + ("f", "3. Core", "Core", Some("3")), + ("g", "2) Search", "Search", Some("2")), + ("h", "04 - Export", "Export", Some("04")), + ("i", "Phase 5", "i", Some("Phase 5")), + ("j", "HTTP 2 support", "HTTP 2 support", None), + ("k", "3-way merge", "3-way merge", None), + ]; + let mut old: Vec<OldEntity> = cases + .iter() + .enumerate() + .map(|(n, (id, title, _, _))| { + let mut e = milestone(id, 10 * (n + 1), json!({})); + e.title = Some((*title).to_string()); + e + }) + .collect(); + let ids: Vec<&str> = cases.iter().map(|(id, ..)| *id).collect(); + old.insert(0, release("one", "0.1.0", &ids)); + let planned = planned(&old); + for (n, (id, written, title, number)) in cases.iter().enumerate() { + let path = format!("v0.1.0/{:02}", n + 1); + assert_eq!(title_of(&planned, &path), *title, "{written}"); + let numbers: Vec<String> = dropped(&planned, id, "title") + .into_iter() + .map(|(value, reason)| { + assert_eq!(reason, plan::NUMBERED, "{written}"); + value + }) + .collect(); + assert_eq!( + numbers, + number.map(String::from).into_iter().collect::<Vec<_>>(), + "{written}" + ); + } + assert_eq!( + why_of(&planned, "i", "title"), + [ + Why::Dropped(plan::NUMBERED.to_string()), + Why::Filled { + field: "phase.title".to_string(), + value: json!("i") + } + ], + "a title that held only a number is filled with the old id" + ); +} + +/// `how::numbered` and `how::slug` are copies of `@gsd/core`'s, which no crate outside `gsd/` may depend on: each +/// function's text is the original's, so the converter drops exactly what `gsd/W109` flags and names a directory as +/// `phase` does. +#[test] +fn the_copied_grammar_is_the_gsd_original() { + let read = |path: &str| { + std::fs::read_to_string(format!("{}/../{path}", env!("CARGO_MANIFEST_DIR"))) + .unwrap_or_else(|e| panic!("{path}: {e}")) + }; + // the text of `fn name` up to its closing brace at the start of a line, its visibility dropped + let body = |text: &str, name: &str| -> String { + let start = text + .find(&format!("fn {name}(")) + .unwrap_or_else(|| panic!("no fn {name}")); + let end = start + text[start..].find("\n}\n").expect("a closing brace"); + text[start..end].to_string() + }; + let how = read("xtask/src/absorb/how.rs"); + for (path, names) in [ + ( + "gsd/core/src/passes/roadmap/titles.rs", + &["numbered", "worded", "bare", "grammar"][..], + ), + ("gsd/core/src/branch.rs", &["slug"][..]), + ] { + let original = read(path); + for name in names { + assert_eq!( + body(&how, name), + body(&original, name), + "{name} drifted from {path}" + ); + } + } +} + #[test] fn when_a_phase_is_written_a_requirement_no_phase_lists_is_v2() { let requirements = [ @@ -562,10 +701,7 @@ fn a_milestone_two_releases_list_stops_the_run_naming_both() { fn a_release_version_is_the_milestone_id_as_written() { let planned = planned(&[old("release", "odd", json!({"version": "1.0 beta"}))]); assert_eq!(paths(&planned), ["v1.0 beta"]); - assert!(matches!( - field(&planned, "v1.0 beta", "name"), - Some(Input::One(_)) - )); + assert_eq!(title_of(&planned, "v1.0 beta"), "The odd"); } /// A scheme reference in a written list cannot be written (bare, it names a `ref`, which a typed edit cannot create): diff --git a/xtask/tests/absorb_e2e.rs b/xtask/tests/absorb_e2e.rs index 5ece69c926..c6c092d42d 100644 --- a/xtask/tests/absorb_e2e.rs +++ b/xtask/tests/absorb_e2e.rs @@ -258,10 +258,10 @@ fn releases_become_version_milestones_and_their_milestones_phases(to: &Path, led second.contains("depends_on [01]"), "a dependency within one version milestone, as the writer prints v0.1.0/01 there: {second}" ); - let third = block("phase 01 \"Phase 3: Third Cut\""); + let third = block("phase 01 \"Third Cut\""); assert!( third.contains("milestone v0.2.0") - && third.contains("name \"Third Cut\"") + && !third.contains("\n name ") && !third.contains("depends_on"), "{third}" ); @@ -319,6 +319,19 @@ fn releases_become_version_milestones_and_their_milestones_phases(to: &Path, led "{id} on {on}" ); } + let numbered = entry("third_cut", "title"); + assert_eq!( + (numbered.len(), &numbered[0]["value"]), + (1, &json!("Phase 3")), + "the old title's number, not written, is in the ledger: {numbered:?}" + ); + assert!( + numbered[0]["why"]["dropped"] + .as_str() + .unwrap() + .contains("GSD labels a phase"), + "{numbered:?}" + ); assert_eq!( entry("first_cut", "status")[0]["why"], json!({"computed": {"field": "phase.status", "new": "not_started"}}), diff --git a/xtask/tests/snapshots/absorb_e2e__ledger.snap b/xtask/tests/snapshots/absorb_e2e__ledger.snap index 5dce393746..5fda8e539f 100644 --- a/xtask/tests/snapshots/absorb_e2e__ledger.snap +++ b/xtask/tests/snapshots/absorb_e2e__ledger.snap @@ -1380,6 +1380,15 @@ expression: ledger } } }, + { + "kind": "milestone", + "id": "third_cut", + "field": "title", + "value": "Phase 3", + "why": { + "dropped": "a number of the old milestones' numbering: GSD labels a phase `Phase <the last segment of its id>: <its title>`, so the title holds the name only" + } + }, { "kind": "module", "id": "store_module",