Skip to main content

Crate g8_core

Crate g8_core 

Source
Expand description

g8-core — canonical data model for the G8.

This crate is the root of the g8 crate DAG. It owns all shared types; every other workspace crate consumes them. No I/O, no tokio, no rusqlite.

§Modules

  • ids — typed ID newtypes (nanoid-backed)
  • model — domain structs: ConvergenceSpace, Project, Capability, Intent, Plan, Decision
  • annotation — Annotation, AnnotationKind, SourceLocation, RawAnnotation
  • plan — PlanStatus, PlanDraft, FitReport, Recommendation, and free functions
  • conflict — Conflict, ConflictKind, Severity, Evidence
  • contract — CheckPayload, CheckErrorItem, PairingReason (g8 check --json)
  • substrate — SubstrateName, SubstrateBudget
  • owner — Owner
  • error — G8Error top-level enum
  • time — EpochMillis newtype + helpers

Re-exports§

pub use annotation::Annotation;
pub use annotation::AnnotationKind;
pub use annotation::AnnotationValue;
pub use annotation::RawAnnotation;
pub use annotation::SourceLocation;
pub use conflict::Conflict;
pub use conflict::ConflictKind;
pub use conflict::Evidence;
pub use conflict::Severity;
pub use contract::CheckErrorItem;
pub use contract::CheckPayload;
pub use contract::PairingReason;
pub use error::G8Error;
pub use ids::AnnotationId;
pub use ids::CapabilityId;
pub use ids::DecisionId;
pub use ids::IntentId;
pub use ids::PlanId;
pub use ids::ProjectId;
pub use ids::SpaceId;
pub use model::Capability;
pub use model::CapabilityStatus;
pub use model::ConvergenceSpace;
pub use model::Decision;
pub use model::DecisionStatus;
pub use model::Intent;
pub use model::IntentKind;
pub use model::IntentSourceKind;
pub use model::Plan;
pub use model::Project;
pub use owner::Owner;
pub use plan::BottleneckPlan;
pub use plan::BudgetStatus;
pub use plan::DecisionInput;
pub use plan::DriftHint;
pub use plan::ExistingMatch;
pub use plan::FitReport;
pub use plan::IntentOverlap;
pub use plan::MatchKind;
pub use plan::OverlapKind;
pub use plan::ParkedIdeaMatch;
pub use plan::PlanDraft;
pub use plan::PlanIntentRelation;
pub use plan::PlanStatus;
pub use plan::Recommendation;
pub use substrate::SubstrateBudget;
pub use time::EpochMillis;

Modules§

annotation
Annotation types and the magic-comment grammar parser.
conflict
Conflict detection types: Conflict, ConflictKind, Severity, Evidence.
contract
g8 check --json output contract — shared types.
error
Top-level error enum for g8-core.
ids
Typed ID newtypes with deterministic, content-derived values.
model
Core domain structs: ConvergenceSpace, Project, Capability, Intent, Decision, Plan.
owner
Owner — optional attribution attached to Intent records.
plan
Plan lifecycle types: PlanStatus, PlanDraft, FitReport, Recommendation.
substrate
Substrate budget types.
time
Time utilities: EpochMillis newtype wrapping i64 epoch milliseconds.

Constants§

DEFAULT_WIP_CAP
Default WIP cap applied per-substrate when no override is configured.

Functions§

now_millis
Returns the current wall-clock time as epoch milliseconds.
parse_annotation_grammar
Parse a magic-comment annotation string into a RawAnnotation.
recommend
Derive a Recommendation from a DecisionInput via a fixed lookup table.
validate_status_transition
Validate a PlanStatus transition, returning an error if the transition is illegal per the plan lifecycle graph.