Documentation
¶
Overview ¶
Package review implements the review engine: deterministic PRD checks, the approval bar, and conversion of adversarial-review output into structured Findings (§11, §13–§16).
Index ¶
- Constants
- func AllDispositioned(findings []domain.Finding) bool
- func DeterministicChecks(initiativeID string, reqs []domain.Requirement) []domain.Finding
- func EvaluateApproval(findings []domain.Finding) (blocked bool, reason string)
- func OutcomeChecks(initiativeID string, reqs []domain.Requirement, objectives []domain.Objective, ...) []domain.Finding
- func ParseFindings(reviewRunID, targetType, targetID string, obj map[string]any) ([]domain.Finding, error)
- func VagueTarget(target string) bool
Constants ¶
const OutcomeCategory = "outcome"
OutcomeCategory is the Finding.Category of every outcome-chain finding.
Variables ¶
This section is empty.
Functions ¶
func AllDispositioned ¶
AllDispositioned reports whether every finding has a disposition (§11, §16).
func DeterministicChecks ¶
func DeterministicChecks(initiativeID string, reqs []domain.Requirement) []domain.Finding
DeterministicChecks runs the cheap, deterministic PRD checks (§11, §16): (1) no empty acceptance criteria, (2) no vague-only criteria, (3) unique REQ codes. These run before the adversarial reviewer.
func EvaluateApproval ¶
EvaluateApproval implements the approval bar (§11): an initiative may not be approved while any critical/high finding is not resolved (Finding. ResolvesBlocking -- fixed, accepted_risk, or a human's rejected on a reviewer's own judgment call; see its doc comment, ICP re-run defect #2). An Advisory finding never blocks, whatever its severity (review B1's rigor-cap note, and review B2's "about code this change set did not touch").
func OutcomeChecks ¶ added in v0.7.0
func OutcomeChecks(initiativeID string, reqs []domain.Requirement, objectives []domain.Objective, metrics []domain.OutcomeMetric) []domain.Finding
OutcomeChecks are the deterministic outcome-chain checks on a PRD:
- with at least one active objective, every active requirement must serve one (high, targeted at -- and so citing -- the requirement): work with no stated outcome is exactly what verification cannot catch, since it can pass every test and still not matter;
- every active objective must have at least one live metric (high, targeted at the objective): an objective nobody can measure is a promise nobody can check;
- a PRD that defines no active objective at all gets one medium finding, not a block per requirement. It is a gap a human should see, and a PRD written before objectives existed (or by a model that ignored the field) must not wedge in review over it.
They run with the other deterministic checks, before the adversarial reviewer, so -- like a missing acceptance criterion -- they gate approval at every rigor and the reviser is told about them by label (D1, D2, ...). objectives and metrics are the LIVE (non-superseded) ones; requirements carry ObjectiveIDs from the store.
func ParseFindings ¶
func ParseFindings(reviewRunID, targetType, targetID string, obj map[string]any) ([]domain.Finding, error)
ParseFindings converts a validated adversarial-review object into Findings.
func VagueTarget ¶
VagueTarget reports whether a target is a bare evaluative adjective with no quantified predicate.
Types ¶
This section is empty.