pub struct ProgressLattice {
pub review_depth: ProgressLevel,
pub design_maturity: ProgressLevel,
pub implementation: ProgressLevel,
pub test_coverage: ProgressLevel,
pub integration: ProgressLevel,
pub merge_readiness: ProgressLevel,
}Expand description
The work progress lattice: a product of 6 progress dimensions.
This is a bounded distributive lattice (and frame) with componentwise ordering. The partial order captures independence between dimensions: reviewed but untested code is incomparable with tested but unreviewed code.
§Lattice Properties
- Bottom
⊥: all dimensionsNone(raw prompt, no work done) - Top
⊤: all dimensionsValidated(fully validated, merged) - Meet
∧: componentwise min (most restrictive) - Join
∨: componentwise max (least restrictive) - Leq
≤: componentwise<=
§Height
height() = Σ dimension.ordinal(), ranging from 0 (bottom) to 24 (top).
The height function is a lattice homomorphism to (ℕ, min, max).
Fields§
§review_depth: ProgressLevelHow deeply the problem has been analyzed/reviewed.
design_maturity: ProgressLevelHow mature the design/proposal is.
implementation: ProgressLevelHow far along the implementation is.
test_coverage: ProgressLevelHow well tested the implementation is.
integration: ProgressLevelHow well integrated with the existing system.
merge_readiness: ProgressLevelHow ready for final merge (PR created, CI passing, etc.).
Implementations§
Source§impl ProgressLattice
impl ProgressLattice
Sourcepub fn height(&self) -> u32
pub fn height(&self) -> u32
Height of a lattice position: sum of dimension ordinals.
height(⊥) = 0, height(⊤) = 24.
Sourcepub fn signed_distance(&self, target: &Self) -> i32
pub fn signed_distance(&self, target: &Self) -> i32
Signed distance from self to target.
Positive means target is higher (forward progress).
Negative means target is lower (backtracking).
Zero means same height (not necessarily same position).
Sourcepub fn dimension(&self, dim: ProgressDimension) -> ProgressLevel
pub fn dimension(&self, dim: ProgressDimension) -> ProgressLevel
Get the level for a specific dimension.
Sourcepub fn set_dimension(&mut self, dim: ProgressDimension, level: ProgressLevel)
pub fn set_dimension(&mut self, dim: ProgressDimension, level: ProgressLevel)
Set the level for a specific dimension.
Sourcepub fn advance(&self, dim: ProgressDimension) -> Self
pub fn advance(&self, dim: ProgressDimension) -> Self
Advance a specific dimension by one level (saturating at Validated).
Returns a new lattice position. This is an inflationary operation:
self.advance(dim) >= self for all dim.
Sourcepub fn regress(&self, dim: ProgressDimension) -> Self
pub fn regress(&self, dim: ProgressDimension) -> Self
Regress a specific dimension by one level (saturating at None).
Returns a new lattice position. This is a deflationary operation:
self.regress(dim) <= self for all dim.
Sourcepub fn regressions(
&self,
target: &Self,
) -> Vec<(ProgressDimension, ProgressLevel, ProgressLevel)>
pub fn regressions( &self, target: &Self, ) -> Vec<(ProgressDimension, ProgressLevel, ProgressLevel)>
Per-dimension breakdown of which dimensions regressed between two positions.
Returns a list of (dimension, from_level, to_level) for each dimension
where target < self.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Check if this position is the terminal object (all Validated).
Sourcepub fn completion_fraction(&self) -> f64
pub fn completion_fraction(&self) -> f64
Fraction of progress toward the terminal object (0.0 to 1.0).
Trait Implementations§
Source§impl BoundedLattice for ProgressLattice
impl BoundedLattice for ProgressLattice
Source§impl Clone for ProgressLattice
impl Clone for ProgressLattice
Source§fn clone(&self) -> ProgressLattice
fn clone(&self) -> ProgressLattice
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more