gates

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultProfile Profile = "default"

	Error   Severity = "error"
	Warning Severity = "warning"

	Proposal Artifact = "proposal"
	Deltas   Artifact = "deltas"
	Design   Artifact = "design"
	Tasks    Artifact = "tasks"
	State    Artifact = "state"

	PlanningToApproved TransitionID = "planning_to_approved"
)
View Source
const CoreRegistryVersion = "core-v2"

CoreRegistryVersion changes whenever the gate inventory changes, so any approval bound to an older inventory is stale rather than silently reused.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact added in v1.1.0

type Artifact string

type Evaluator added in v1.1.0

type Evaluator func(Snapshot) []Issue

type Finding

type Finding struct {
	Gate     GateID
	Severity Severity
	Location plan.Location
	Problem  string
	Repair   string
}

func Production added in v1.1.0

func Production(snapshot Snapshot, required []evidence.RequiredCheck) []Finding

Production evaluates the production-only planning rules over the canonical planning projection. It is additive by construction: it never runs, replaces, or suppresses a core gate, and the caller keeps evaluating the core registry exactly as the default profile does. It is pure: no filesystem, clock, network, or LLM access.

type Gate

type Gate struct {
	ID          GateID
	Description string
	Transition  TransitionID
	Profile     Profile
	Artifacts   []Artifact
	Severity    Severity
	Evaluate    Evaluator
}

type GateID added in v1.1.0

type GateID string
const (
	ProductionPolicyGate     GateID = "production_policy"
	ProductionDesignGate     GateID = "production_design"
	ProductionTraceGate      GateID = "production_trace"
	ProductionAcceptanceGate GateID = "production_acceptance"
	ProductionCheckGate      GateID = "production_checks"
)
const (
	ProposalGate             GateID = "proposal"
	DeltaGate                GateID = "deltas"
	DesignGate               GateID = "design"
	TaskGate                 GateID = "tasks"
	TraceGate                GateID = "trace"
	VerificationGate         GateID = "verification"
	ApprovalPrerequisiteGate GateID = "approval_prerequisite"
	LifecycleGate            GateID = "lifecycle"
	RegistryGate             GateID = "gate_registry"
)

type Issue added in v1.1.0

type Issue struct {
	Location plan.Location
	Problem  string
	Repair   string
}

type Profile added in v1.1.0

type Profile string

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

func CoreRegistry

func CoreRegistry(evaluators map[GateID]Evaluator) (Registry, error)

func PlanningRegistry added in v1.1.0

func PlanningRegistry() (Registry, error)

func (Registry) Evaluate added in v1.1.0

func (registry Registry) Evaluate(snapshot Snapshot) []Finding

func (Registry) Gates added in v1.1.0

func (registry Registry) Gates() []Gate

func (Registry) Version added in v1.1.0

func (registry Registry) Version() string

type Severity

type Severity string

type Snapshot added in v1.1.0

type Snapshot struct {
	Plan            plan.Change
	Lifecycle       string
	StateRevision   uint64
	Transition      TransitionID
	RegistryVersion string
	PolicyDigest    string
}

Snapshot contains values assembled before gate evaluation. It deliberately exposes no filesystem, clock, mutation, network, or LLM capability.

type Transition added in v1.1.0

type Transition struct {
	ID      TransitionID
	GateIDs []GateID
}

type TransitionID added in v1.1.0

type TransitionID string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL