Documentation
¶
Overview ¶
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Package planning validates declared intent against evidence, without inventing a design.
Index ¶
- Constants
- func Approved(p Plan) bool
- func Digest(p Plan) string
- func IntentGraph(p Plan, s model.Snapshot, projected bool) (model.Snapshot, error)
- func NextSteps(findings []model.Finding) []string
- func Project(p Plan, s model.Snapshot) (model.Snapshot, error)
- func ValidateRule(r Rule) error
- type AgentFeedback
- type Approval
- type Assumption
- type Check
- type Constraint
- type Context
- type ContextMatch
- type ContractDelta
- type Criterion
- type Decision
- type Delta
- type Plan
- type Report
- type Requirement
- type Rule
- type Schedule
- type Task
- type TaskPacket
- type TaskStatus
Constants ¶
const ( AssumptionOpen = "open" AssumptionAccepted = "accepted" AssumptionResolved = "resolved" )
Assumption statuses. Open assumptions keep verification unknown; accepted (risk knowingly taken) and resolved (investigated) require a resolution.
const MaxBytes = 4 << 20
MaxBytes bounds policy/plan input reads and parsing.
const SchemaVersion = "1"
Variables ¶
This section is empty.
Functions ¶
func IntentGraph ¶
IntentGraph overlays declared planning entities with proposed provenance. It never converts approval or natural-language intent into source evidence.
func ValidateRule ¶
ValidateRule rejects unsupported verification requests rather than executing arbitrary commands.
Types ¶
type AgentFeedback ¶
type Approval ¶
type Approval struct {
Reviewer string `json:"reviewer"`
ReviewedAt string `json:"reviewed_at"`
Checkpoint string `json:"checkpoint"`
PlanDigest string `json:"plan_digest"`
}
Approval records a local review declaration bound to plan contents and a checkpoint. Radar cannot authenticate the reviewer. A recorded approval never authorizes Git operations.
type Assumption ¶
type Assumption struct {
ID string `json:"id,omitempty"`
Text string `json:"text"`
Status string `json:"status,omitempty"`
Resolution string `json:"resolution,omitempty"`
}
Assumption is an unverified design premise with an explicit lifecycle.
func (Assumption) Open ¶
func (a Assumption) Open() bool
Open reports whether the assumption still needs investigation.
func (*Assumption) UnmarshalJSON ¶
func (a *Assumption) UnmarshalJSON(b []byte) error
UnmarshalJSON also accepts the original plain-string form.
type Constraint ¶
type Context ¶
type ContextMatch ¶
type ContextMatch struct {
Entity string `json:"entity"`
Score int `json:"score"`
Explanation string `json:"explanation"`
Evidence model.Provenance `json:"evidence"`
}
type ContractDelta ¶
type ContractDelta struct {
Contract string `json:"contract"`
Schema string `json:"schema,omitempty"`
Pointer string `json:"pointer,omitempty"`
Expected json.RawMessage `json:"expected,omitempty"`
Operation string `json:"operation"`
Description string `json:"description"`
Consumers []string `json:"consumers,omitempty"`
}
type Plan ¶
type Plan struct {
SchemaVersion string `json:"schema_version"`
FeatureID string `json:"feature_id"`
Intent string `json:"intent"`
BaseRevision string `json:"base_revision"`
Requirements []Requirement `json:"requirements"`
Decisions []Decision `json:"decisions"`
Constraints []Constraint `json:"constraints"`
ContractDeltas []ContractDelta `json:"contract_deltas"`
Tasks []Task `json:"tasks"`
Acceptance []Criterion `json:"acceptance"`
GraphDeltas []Delta `json:"graph_deltas"`
Assumptions []Assumption `json:"assumptions"`
Evidence []model.Provenance `json:"evidence"`
Incomplete []string `json:"incomplete"`
Approval *Approval `json:"approval,omitempty"`
Context *Context `json:"context,omitempty"`
}
type Report ¶
type Report struct {
Revision string `json:"revision,omitempty"`
BaseRevision string `json:"base_revision,omitempty"`
PlanDigest string `json:"plan_digest,omitempty"`
Tasks []TaskStatus `json:"tasks,omitempty"`
Feedback []AgentFeedback `json:"feedback,omitempty"`
Status model.Status `json:"status"`
Authoritative bool `json:"authoritative"`
Findings []model.Finding `json:"findings"`
Checks []Check `json:"checks"`
NextSteps []string `json:"next_steps,omitempty"`
}
type Requirement ¶
type Rule ¶
type Rule struct {
CWD string `json:"cwd,omitempty"`
Kind string `json:"kind"`
Command []string `json:"command,omitempty"`
EvidenceID string `json:"evidence_id,omitempty"`
Path string `json:"path,omitempty"`
Entity string `json:"entity,omitempty"`
Pointer string `json:"pointer,omitempty"`
Property string `json:"property,omitempty"`
// test_run execution environment. Every field is part of the reviewed plan.
Setup [][]string `json:"setup,omitempty"` // commands run before Command in the snapshot
Env []string `json:"env,omitempty"` // caller environment variable names passed through
Link []string `json:"link,omitempty"` // untracked dependency paths linked from the checkout
JUnit string `json:"junit,omitempty"` // snapshot-relative JUnit XML report
}
type Schedule ¶
type Schedule struct {
PlanDigest string `json:"plan_digest"`
Instructions []TaskPacket `json:"instructions"`
Order []string `json:"order"`
ParallelGroups [][]string `json:"parallel_groups"`
}
type Task ¶
type Task struct {
ID string `json:"id"`
Intent string `json:"intent"`
Requirements []string `json:"requirements"`
Components []string `json:"components,omitempty"`
Contracts []string `json:"contracts,omitempty"`
DependsOn []string `json:"depends_on"`
Acceptance []string `json:"acceptance"`
Consequential bool `json:"consequential,omitempty"`
}
type TaskPacket ¶
type TaskPacket struct {
ContractDeltas []ContractDelta `json:"contract_deltas"`
GraphDeltas []Delta `json:"graph_deltas"`
PlanDigest string `json:"plan_digest"`
FeatureID string `json:"feature_id"`
Decisions []Decision `json:"decisions"`
Approval *Approval `json:"approval,omitempty"`
Task Task `json:"task"`
Requirements []Requirement `json:"requirements"`
Acceptance []Criterion `json:"acceptance"`
Constraints []Constraint `json:"constraints"`
BaseRevision string `json:"base_revision"`
Evidence []model.Provenance `json:"evidence"`
}