Documentation
¶
Overview ¶
Package domain defines the typed entities and controlled vocabularies of the idea-harness product graph (Milestone 1 subset). It contains no I/O and no LLM logic: it is the single source of truth for enums and invariants that other packages enforce.
Index ¶
- func CriterionKey(requirementID string, i int) string
- type AcceptanceCriterion
- type ApplyJournalEntry
- type ApplyState
- type Artifact
- type ArtifactKind
- type ArtifactVersion
- type Assertion
- type AssertionStatus
- type AssertionType
- type ChangeSet
- type ChangeSetStatus
- type Confidence
- type ContextDoc
- type ContextEntry
- type Decision
- type DecisionDiscussion
- type DecisionDissent
- type DecisionStatus
- type DecisionType
- type DenyCode
- type Disposition
- type DocComment
- type EdgeType
- type Event
- type ExecutorTrust
- type FileChange
- type FileChangeKind
- type Finding
- type GraphEdge
- type Initiative
- type InitiativeStatus
- type JudgmentReason
- type Operation
- type OperationStatus
- type ProvenanceRef
- type Question
- type QuestionStatus
- type Requirement
- type RequirementPriority
- type RequirementStatus
- type RiskProfile
- type RiskSignal
- type RiskTier
- type RunKind
- type RunManifest
- type RunStatus
- type RunUsage
- type SandboxMode
- type Severity
- type SuggestedAnswer
- type Task
- type TaskStatus
- type TrustLevel
- type VerificationEvidence
- type VerificationKind
- type VerificationStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CriterionKey ¶
CriterionKey returns the stable key for the i-th acceptance criterion of a requirement. The thin slice treats every criterion as mandatory and keys evidence by requirement + index (§70, review B4).
Types ¶
type AcceptanceCriterion ¶
type AcceptanceCriterion struct {
Metric string `json:"metric"`
Target string `json:"target"`
Condition string `json:"condition"`
}
AcceptanceCriterion is a structurally verifiable acceptance criterion: a measurable predicate with a metric, a target, and a condition (§11, §18).
func (AcceptanceCriterion) Verifiable ¶
func (c AcceptanceCriterion) Verifiable() bool
Verifiable reports whether the criterion has a quantified target, not a bare evaluative adjective. This is the deterministic structural check (§11).
type ApplyJournalEntry ¶
type ApplyJournalEntry struct {
ID string `json:"id"`
ChangeSetID string `json:"change_set_id"`
State ApplyState `json:"state"`
WorkspaceSnapshotDigest string `json:"workspace_snapshot_digest,omitempty"`
AppliedAt *time.Time `json:"applied_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ApplyJournalEntry is one durable apply-journal record (§39).
type ApplyState ¶
type ApplyState string
ApplyState is the durable apply-journal state (§39).
const ( ApplyPrepared ApplyState = "prepared" ApplyWorkspaceMutated ApplyState = "workspace_mutated" ApplyCommitted ApplyState = "committed" ApplyRolledBack ApplyState = "rolled_back" ApplyRecoveryRequired ApplyState = "recovery_required" )
func (ApplyState) Valid ¶
func (s ApplyState) Valid() bool
type Artifact ¶
type Artifact struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Kind ArtifactKind `json:"kind"`
CreatedAt time.Time `json:"created_at"`
}
Artifact is an immutable-versioned artifact family (§20).
type ArtifactKind ¶
type ArtifactKind string
ArtifactKind enumerates the core artifacts (§20).
const ( ArtifactIdeaBrief ArtifactKind = "idea_brief" ArtifactResearchBrief ArtifactKind = "research_brief" ArtifactPRD ArtifactKind = "prd" ArtifactTechnicalDesign ArtifactKind = "technical_design" ArtifactDesignSpec ArtifactKind = "design_spec" ArtifactVerificationPlan ArtifactKind = "verification_plan" ArtifactThreatModel ArtifactKind = "threat_model" ArtifactExecutionPlan ArtifactKind = "execution_plan" ArtifactOperationalReadiness ArtifactKind = "operational_readiness" ArtifactVerificationReport ArtifactKind = "verification_report" )
func (ArtifactKind) Valid ¶
func (k ArtifactKind) Valid() bool
type ArtifactVersion ¶
type ArtifactVersion struct {
ID string `json:"id"`
ArtifactID string `json:"artifact_id"`
Version int `json:"version"`
Status string `json:"status"`
BodyDigest string `json:"body_digest"`
ProducedByRun string `json:"produced_by_run,omitempty"`
SupersededBy string `json:"superseded_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ArtifactVersion is one immutable version of an Artifact.
type Assertion ¶
type Assertion struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Type AssertionType `json:"type"`
Status AssertionStatus `json:"status"`
Statement string `json:"statement"`
EvidenceDigest string `json:"evidence_digest,omitempty"`
Confidence Confidence `json:"confidence"`
Source string `json:"source"`
Provenance []ProvenanceRef `json:"provenance"`
ProducedByRun string `json:"produced_by_run,omitempty"`
SupersededBy string `json:"superseded_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Assertion is a structured Fact/Assumption/Hypothesis (§18).
type AssertionStatus ¶
type AssertionStatus string
AssertionStatus is the lifecycle state of an Assertion (§18).
const ( AssertionCandidate AssertionStatus = "candidate" AssertionAccepted AssertionStatus = "accepted" AssertionDisputed AssertionStatus = "disputed" AssertionRetracted AssertionStatus = "retracted" AssertionSuperseded AssertionStatus = "superseded" )
func (AssertionStatus) Valid ¶
func (s AssertionStatus) Valid() bool
type AssertionType ¶
type AssertionType string
AssertionType discriminates Facts from Assumptions from Hypotheses (constitution §18).
const ( AssertionFact AssertionType = "fact" AssertionAssumption AssertionType = "assumption" AssertionHypothesis AssertionType = "hypothesis" )
func (AssertionType) Valid ¶
func (t AssertionType) Valid() bool
type ChangeSet ¶
type ChangeSet struct {
ID string `json:"id"`
HumanID string `json:"human_id"`
InitiativeID string `json:"initiative_id"`
TaskID string `json:"task_id"`
BaseSnapshotID string `json:"base_snapshot_id,omitempty"`
Status ChangeSetStatus `json:"status"`
PatchDigest string `json:"patch_digest"`
ReviewID string `json:"review_id,omitempty"`
GitCommitSHA string `json:"git_commit_sha,omitempty"`
CreatedByRunID string `json:"created_by_run_id,omitempty"`
// Model is the actual model spec that produced this change set (e.g.
// "openai/gpt-5"), or "demo" when no real provider was configured. The UI
// keys model=="demo" to label the change "Shipped (demo)" / "Placeholder
// change" rather than real agent output.
Model string `json:"model,omitempty"`
// Executor is the executor kind that produced the change set ("internal"
// output is a placeholder whatever the model).
Executor string `json:"executor,omitempty"`
// AgentOutput is the end of the coding agent's own output for the run
// that produced this change set: redacted, sanitized, at most 100 lines.
AgentOutput string `json:"agent_output,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ChangeSet is the source mutation primitive (§36).
type ChangeSetStatus ¶
type ChangeSetStatus string
ChangeSetStatus is the lifecycle of a ChangeSet (§38).
const ( ChangeSetDraft ChangeSetStatus = "draft" ChangeSetChecksRunning ChangeSetStatus = "checks_running" ChangeSetReviewRequired ChangeSetStatus = "review_required" ChangeSetRejected ChangeSetStatus = "rejected" ChangeSetChangesRequested ChangeSetStatus = "changes_requested" ChangeSetSuperseded ChangeSetStatus = "superseded" ChangeSetApproved ChangeSetStatus = "approved" ChangeSetApplying ChangeSetStatus = "applying" ChangeSetApplied ChangeSetStatus = "applied" ChangeSetReverted ChangeSetStatus = "reverted" ChangeSetConflicted ChangeSetStatus = "conflicted" )
func (ChangeSetStatus) HoldsWork ¶ added in v0.4.0
func (s ChangeSetStatus) HoldsWork() bool
HoldsWork reports whether a change set in this state is work a plan-level command must not disturb.
`rejected` and `superseded` are absorbing states minted on ordinary paths -- every credential-sweep reject leaves one behind and reopens the task, and a re-execution supersedes its predecessor -- so a plan carrying only those has no work in flight and is legitimately revisable. Counting them made `revise-plan`, `approve-plan` and `reopen-phase` refuse forever, and the refusal named `idea review` and `idea apply`, both of which are closed for a rejected change set.
This is the same distinction that got audit 5's A2 rejected: it proposed gating completion on `{applied, reverted}` and review pointed out that the absorbing states are minted on ordinary paths, so the predicate would wedge any initiative that ever tripped the sweep. Here it is stated once and read by every site rather than re-derived at each.
func (ChangeSetStatus) Valid ¶
func (s ChangeSetStatus) Valid() bool
type Confidence ¶
type Confidence string
Confidence is the review-finding confidence (§15).
const ( ConfidenceHigh Confidence = "high" ConfidenceMedium Confidence = "medium" ConfidenceLow Confidence = "low" )
func (Confidence) Valid ¶
func (c Confidence) Valid() bool
type ContextDoc ¶
type ContextDoc struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Kind string `json:"kind"`
Title string `json:"title"`
Digest string `json:"digest"`
Preview string `json:"preview"`
Format string `json:"format"`
DescriptionDigest string `json:"description_digest,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
ContextDoc is one source document attached to an initiative: a PRD, design note, technical spec, market research, a wireframe/mockup image, or other free-form labeled context. The body is stored as a content-addressed blob; this row records its digest plus a short redacted text preview. Image docs (Format=="image") carry the raw image in Digest and, once described by a vision model, the description text digest in DescriptionDigest.
type ContextEntry ¶
type ContextEntry struct {
Priority int `json:"priority"`
Source string `json:"source"`
Digest string `json:"digest,omitempty"`
Trust TrustLevel `json:"trust"`
InclusionReason string `json:"inclusion_reason"`
Selector string `json:"selector"`
Transformation string `json:"transformation"`
Size int64 `json:"size"`
}
ContextEntry is one compiled context entry (§37).
type Decision ¶
type Decision struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Code string `json:"code"`
Type DecisionType `json:"type"`
Question string `json:"question"`
Options []string `json:"options"`
Recommendation string `json:"recommendation"`
Status DecisionStatus `json:"status"`
Resolution string `json:"resolution,omitempty"`
ResolvedBy string `json:"resolved_by,omitempty"`
Provenance []ProvenanceRef `json:"provenance"`
SupersededBy string `json:"superseded_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Decision is a structured decision with a recommendation (§8, §19).
type DecisionDiscussion ¶
type DecisionDiscussion struct {
ID string `json:"id"`
DecisionID string `json:"decision_id"`
Author string `json:"author"`
Message string `json:"message"`
CreatedAt time.Time `json:"created_at"`
}
DecisionDiscussion is one message in a human↔AI discussion thread attached to a decision (§8): the human asks for context or proposes an alternative, and the model replies.
type DecisionDissent ¶
type DecisionDissent struct {
ID string `json:"id"`
DecisionID string `json:"decision_id"`
ProponentRole string `json:"proponent_role"`
Position string `json:"position"`
ReasoningDigest string `json:"reasoning_digest,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
DecisionDissent preserves a dissenting view so it is never erased (§8).
type DecisionStatus ¶
type DecisionStatus string
DecisionStatus is the lifecycle of a Decision (§19).
const ( DecisionOpen DecisionStatus = "open" DecisionDecided DecisionStatus = "decided" DecisionSuperseded DecisionStatus = "superseded" )
func (DecisionStatus) Valid ¶
func (s DecisionStatus) Valid() bool
type DecisionType ¶
type DecisionType string
DecisionType categorizes a Decision (§19).
const ( DecisionProduct DecisionType = "product" DecisionArchitecture DecisionType = "architecture" DecisionDesign DecisionType = "design" DecisionSecurity DecisionType = "security" DecisionOperations DecisionType = "operations" )
func (DecisionType) Valid ¶
func (t DecisionType) Valid() bool
type DenyCode ¶
type DenyCode string
DenyCode is a machine-readable system-deny reason (security model, §system deny). It is set on a Finding.Code when a deterministic, non-overridable boundary rejects or blocks an action — independent of executor trust or human approval ("system deny beats human approve").
const ( DenyCodeSecretSweep DenyCode = "secret_sweep" DenyCodePII DenyCode = "pii" DenyCodePathEscape DenyCode = "path_escape" DenyCodeHostExec DenyCode = "host_exec" DenyCodeBlobDigestMismatch DenyCode = "blob_digest_mismatch" DenyCodeTrustDeny DenyCode = "trust_deny" DenyCodeReviewOpenBlocking DenyCode = "review_open_blocking" )
type Disposition ¶
type Disposition string
Disposition is the review-finding disposition (§15 seven-value enum).
const ( DispositionFixed Disposition = "fixed" DispositionAcceptedRisk Disposition = "accepted_risk" DispositionNotApplicable Disposition = "not_applicable" DispositionDuplicate Disposition = "duplicate" DispositionDeferred Disposition = "deferred" DispositionRejected Disposition = "rejected" DispositionMitigate Disposition = "mitigate" )
func (Disposition) Valid ¶
func (d Disposition) Valid() bool
type DocComment ¶
type DocComment struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
ArtifactVersionID string `json:"artifact_version_id"`
Section string `json:"section,omitempty"`
Text string `json:"text"`
Author string `json:"author"`
PromotedQuestionID string `json:"promoted_question_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
DocComment is a human comment anchored to a section of an artifact version. It can be promoted into an open Question for the initiative's judgment flow.
type EdgeType ¶
type EdgeType string
EdgeType is a Product Graph edge kind (§25). M2 wires the five traceability edges; the rest are declared now and written in later milestones.
const ( EdgeSupports EdgeType = "supports" EdgeContradicts EdgeType = "contradicts" EdgeDerivedFrom EdgeType = "derived_from" EdgeDependsOn EdgeType = "depends_on" EdgeImplements EdgeType = "implements" EdgeAddresses EdgeType = "addresses" EdgeTests EdgeType = "tests" EdgeVerifies EdgeType = "verifies" EdgeReviews EdgeType = "reviews" EdgeSupersedes EdgeType = "supersedes" EdgeInvalidates EdgeType = "invalidates" EdgeProducedBy EdgeType = "produced_by" EdgeConsumes EdgeType = "consumes" )
type Event ¶
type Event struct {
Seq int64 `json:"seq"`
AggregateType string `json:"aggregate_type"`
AggregateID string `json:"aggregate_id"`
Actor string `json:"actor"`
CorrelationID string `json:"correlation_id"`
CausationID string `json:"causation_id"`
Operation string `json:"operation"`
EventType string `json:"event_type"`
PayloadDigest string `json:"payload_digest"`
CreatedAt time.Time `json:"created_at"`
}
Event is an append-only event record (§32).
type ExecutorTrust ¶
type ExecutorTrust string
ExecutorTrust is the executor trust tier (§49).
const ( ExecutorInternal ExecutorTrust = "internal" ExecutorLocalExternal ExecutorTrust = "local_external" ExecutorRemoteExternal ExecutorTrust = "remote_external" )
func (ExecutorTrust) Valid ¶
func (t ExecutorTrust) Valid() bool
type FileChange ¶
type FileChange struct {
Path string `json:"path"`
Digest string `json:"digest"`
Mode string `json:"mode,omitempty"`
ChangeType FileChangeKind `json:"change_type,omitempty"`
// BaseDigest is the digest of the file this change was made against, for a
// modified or deleted file. Apply refuses when the workspace file no longer
// matches it, rather than overwriting an edit made after the agent ran.
BaseDigest string `json:"base_digest,omitempty"`
}
FileChange is one file-level change in a source diff (§36). Path is relative to the workspace root. A non-empty Digest is the SHA-256 of the file's post-image content; an empty Digest denotes deletion. Mode is "file" for the M4 thin slice (the internal implementer produces only regular files). ChangeType records whether the file was added, modified, or deleted (computed by the orchestrator's Diff); it is empty for patches persisted before the field existed, in which case callers fall back to IsDelete.
func (FileChange) IsDelete ¶
func (f FileChange) IsDelete() bool
IsDelete reports whether this change removes the file at Path.
type FileChangeKind ¶
type FileChangeKind string
FileChangeKind classifies a single FileChange for display (add/modify/delete).
const ( FileAdded FileChangeKind = "add" FileModified FileChangeKind = "modify" FileDeleted FileChangeKind = "delete" )
type Finding ¶
type Finding struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id,omitempty"`
ReviewRunID string `json:"review_run_id"`
TargetType string `json:"target_type"`
TargetID string `json:"target_id"`
Severity Severity `json:"severity"`
Confidence Confidence `json:"confidence"`
Category string `json:"category"`
Code DenyCode `json:"code,omitempty"`
Finding string `json:"finding"`
Evidence string `json:"evidence"`
Impact string `json:"impact"`
Recommendation string `json:"recommendation"`
Disposition Disposition `json:"disposition,omitempty"`
DispositionActor string `json:"disposition_actor,omitempty"`
Note string `json:"note,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Finding is a structured review finding (§15).
type GraphEdge ¶
type GraphEdge struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id,omitempty"`
FromType string `json:"from_type"`
FromID string `json:"from_id"`
EdgeType EdgeType `json:"edge_type"`
ToType string `json:"to_type"`
ToID string `json:"to_id"`
Metadata map[string]any `json:"metadata,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
GraphEdge is a Product Graph edge linking two typed nodes (§25).
type Initiative ¶
type Initiative struct {
ID string `json:"id"`
ProjectID string `json:"project_id,omitempty"`
Title string `json:"title"`
Description string `json:"description"`
Status InitiativeStatus `json:"status"`
FailureReason string `json:"failure_reason,omitempty"`
// JudgmentReason is set only while Status is needs_human_judgment. It is
// not cleared when the status moves on -- nothing reads it in any other
// status, and clearing it on every transition would mean touching the claim
// path, which failure_reason already showed to be the wrong place.
JudgmentReason JudgmentReason `json:"judgment_reason,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
Initiative is the user-facing idea under development.
type InitiativeStatus ¶
type InitiativeStatus string
InitiativeStatus is the initiative/workflow lifecycle (§11).
const ( InitiativeRunning InitiativeStatus = "running" InitiativeNeedsHumanJudgment InitiativeStatus = "needs_human_judgment" InitiativeApproved InitiativeStatus = "approved" InitiativePlanApproved InitiativeStatus = "plan_approved" InitiativeFailed InitiativeStatus = "failed" InitiativeComplete InitiativeStatus = "complete" )
func (InitiativeStatus) Valid ¶
func (s InitiativeStatus) Valid() bool
type JudgmentReason ¶ added in v0.4.0
type JudgmentReason string
JudgmentReason says why an initiative is in `needs_human_judgment`.
The status has six producers and they need different answers from the user: a stalled PRD review is approved or revised, a plan whose dependency graph did not resolve can only be regenerated, and a requirement failed after completion is re-verified. Recording the reason is what lets `idea next` name a command instead of guessing. It was guessed before, from the presence of the execution-plan artifact, which is written *before* the unresolved- dependency check that produces two of the six -- so the guess named `approve-plan` for a plan known to be incomplete.
const ( // JudgmentPRDReview: the adversarial PRD review did not converge within // max_cycles. Resolve by accepting the PRD or regenerating it. JudgmentPRDReview JudgmentReason = "prd_review" // JudgmentPlanDependencies: the execution plan has tasks whose dependencies // were never satisfied. Only regenerating the plan resolves this -- approving // it would set plan_approved over a known-incomplete graph and leave an // undisposed blocking finding that wedges completion. JudgmentPlanDependencies JudgmentReason = "plan_dependencies" // JudgmentPlanReview: the adversarial plan review raised blocking findings. JudgmentPlanReview JudgmentReason = "plan_review" // JudgmentVerification: a requirement was failed after the initiative had // already completed, so it dropped back out of `complete`. Resolve by // recording verification evidence, not by touching the plan. JudgmentVerification JudgmentReason = "verification" )
func (JudgmentReason) Valid ¶ added in v0.4.0
func (r JudgmentReason) Valid() bool
Valid reports whether r is a known judgment reason. The empty string is valid and means "not recorded": initiatives written before this was introduced, and any producer that has not been taught to set it.
type Operation ¶
type Operation struct {
ID string `json:"id"`
ProjectID string `json:"project_id"`
InitiativeID string `json:"initiative_id,omitempty"`
Type string `json:"type"`
Status OperationStatus `json:"status"`
ResultRef string `json:"result_ref,omitempty"`
// Error is the reason a failed or cancelled operation ended that way,
// redacted and length-capped before it is persisted (B2). Before this
// field existed, a failed execute left the initiative at plan_approved,
// the Build page's running card simply vanished, and the only record of
// why was a line in daemon.log — invisible to anyone not tailing it.
Error string `json:"error,omitempty"`
CreatedAt time.Time `json:"created_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
Operation is a durable long-running operation (§34).
type OperationStatus ¶
type OperationStatus string
OperationStatus is the lifecycle of a durable Operation (§34).
const ( OperationPending OperationStatus = "pending" OperationRunning OperationStatus = "running" OperationSucceeded OperationStatus = "succeeded" OperationFailed OperationStatus = "failed" OperationCancelled OperationStatus = "cancelled" )
func (OperationStatus) Valid ¶
func (s OperationStatus) Valid() bool
type ProvenanceRef ¶
type ProvenanceRef struct {
Kind string `json:"kind"`
ID string `json:"id"`
Digest string `json:"digest,omitempty"`
Trust TrustLevel `json:"trust"`
}
ProvenanceRef is a structured reference to the object that produced or supports a statement (§5, §6). It is a typed reference, never free text.
type Question ¶
type Question struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Question string `json:"question"`
Status QuestionStatus `json:"status"`
AnswerDigest string `json:"answer_digest,omitempty"`
AnsweredBy string `json:"answered_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
ResolvedAt *time.Time `json:"resolved_at,omitempty"`
}
Question is an open question (§4, §9).
type QuestionStatus ¶
type QuestionStatus string
QuestionStatus is the lifecycle of an Open Question.
const ( QuestionOpen QuestionStatus = "open" QuestionResolved QuestionStatus = "resolved" )
func (QuestionStatus) Valid ¶
func (s QuestionStatus) Valid() bool
type Requirement ¶
type Requirement struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Code string `json:"code"`
Statement string `json:"statement"`
AcceptanceCriteria []AcceptanceCriterion `json:"acceptance_criteria"`
Priority RequirementPriority `json:"priority"`
Status RequirementStatus `json:"status"`
SourceAssertionID string `json:"source_assertion_id,omitempty"`
Provenance []ProvenanceRef `json:"provenance"`
ProducedByRun string `json:"produced_by_run,omitempty"`
SupersededBy string `json:"superseded_by,omitempty"`
VerifiedAt *time.Time `json:"verified_at,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Requirement is a first-class structured requirement (§17).
type RequirementPriority ¶
type RequirementPriority string
RequirementPriority is the requirement priority level.
const ( PriorityMust RequirementPriority = "must" PriorityShould RequirementPriority = "should" PriorityCould RequirementPriority = "could" )
func (RequirementPriority) Valid ¶
func (p RequirementPriority) Valid() bool
type RequirementStatus ¶
type RequirementStatus string
RequirementStatus is the lifecycle of a Requirement (§17).
const ( RequirementDraft RequirementStatus = "draft" RequirementApproved RequirementStatus = "approved" RequirementVerified RequirementStatus = "verified" // RequirementFailed records a human "fail" judgment: the requirement stays in // the active set and blocks completion until re-verified (a human pass). RequirementFailed RequirementStatus = "failed" // RequirementWaived records a human "waive" judgment: the requirement is out // of scope and is excluded from the completion gate (like removed), but is // retained as a visible, recorded judgment rather than deleted. RequirementWaived RequirementStatus = "waived" RequirementRemoved RequirementStatus = "removed" )
func (RequirementStatus) Valid ¶
func (s RequirementStatus) Valid() bool
type RiskProfile ¶
type RiskProfile struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Tier RiskTier `json:"tier"`
Signals []RiskSignal `json:"signals"`
Reason []string `json:"reason,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
RiskProfile is a coarse risk tiering for an initiative (§31).
type RiskSignal ¶
type RiskSignal struct {
Name string `json:"name"`
Detected bool `json:"detected"`
Detail string `json:"detail,omitempty"`
}
RiskSignal is one deterministic security signal (§31).
type RunManifest ¶
type RunManifest struct {
ID string `json:"id"`
RunID string `json:"run_id"`
SnapshotDigest string `json:"snapshot_digest,omitempty"`
ConfigDigest string `json:"config_digest,omitempty"`
WorkflowDigest string `json:"workflow_digest,omitempty"`
RoleVersion string `json:"role_version,omitempty"`
RequestedModel string `json:"requested_model"`
ActualModel string `json:"actual_model"`
ContextDigest string `json:"context_digest,omitempty"`
SkillDigests []string `json:"skill_digests,omitempty"`
ToolVersions map[string]string `json:"tool_versions,omitempty"`
Usage RunUsage `json:"usage"`
ResultDigest string `json:"result_digest,omitempty"`
StartedAt time.Time `json:"started_at"`
FinishedAt time.Time `json:"finished_at"`
}
RunManifest records immutable provenance for a Run (§36).
type RunUsage ¶
type RunUsage struct {
InputTokens int64 `json:"input_tokens,omitempty"`
OutputTokens int64 `json:"output_tokens,omitempty"`
CostUSD float64 `json:"cost_usd,omitempty"`
DurationMS int64 `json:"duration_ms,omitempty"`
}
RunUsage records token/cost/duration for a run (§17, §36).
type SandboxMode ¶
type SandboxMode string
SandboxMode is the OS-level sandbox mode (§52).
const ( SandboxContainer SandboxMode = "container" SandboxLocalRestricted SandboxMode = "local_restricted" SandboxHostApproved SandboxMode = "host_approved" )
func (SandboxMode) Valid ¶
func (m SandboxMode) Valid() bool
type Severity ¶
type Severity string
Severity is the review-finding severity (§15).
type SuggestedAnswer ¶
type SuggestedAnswer struct {
QuestionID string `json:"question_id"`
Question string `json:"question"`
Answer string `json:"answer"`
}
SuggestedAnswer is one AI-proposed answer to an open question.
type Task ¶
type Task struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
Code string `json:"code"`
Title string `json:"title"`
Statement string `json:"statement"`
Status TaskStatus `json:"status"`
Priority RequirementPriority `json:"priority"`
Estimate string `json:"estimate,omitempty"`
ProducedByRun string `json:"produced_by_run,omitempty"`
SupersededBy string `json:"superseded_by,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
Task is one unit of the execution plan (§12, M2).
type TaskStatus ¶
type TaskStatus string
TaskStatus is the lifecycle of an execution-plan Task.
const ( TaskProposed TaskStatus = "proposed" TaskReady TaskStatus = "ready" TaskBlocked TaskStatus = "blocked" TaskDone TaskStatus = "done" TaskCancelled TaskStatus = "cancelled" )
func (TaskStatus) Valid ¶
func (s TaskStatus) Valid() bool
type TrustLevel ¶
type TrustLevel string
TrustLevel is the context trust level (§38). It is assigned by deterministic code, never by model output.
const ( TrustSystem TrustLevel = "system" TrustPolicy TrustLevel = "policy" TrustHumanApproved TrustLevel = "human_approved" TrustReviewedAgentOutput TrustLevel = "reviewed_agent_output" TrustUnreviewedAgentOutput TrustLevel = "unreviewed_agent_output" TrustExternalUntrusted TrustLevel = "external_untrusted" )
func (TrustLevel) Valid ¶
func (t TrustLevel) Valid() bool
type VerificationEvidence ¶
type VerificationEvidence struct {
ID string `json:"id"`
InitiativeID string `json:"initiative_id"`
RequirementID string `json:"requirement_id"`
CriterionKey string `json:"criterion_key"`
Kind VerificationKind `json:"kind"`
Status VerificationStatus `json:"status"`
EvidenceDigest string `json:"evidence_digest,omitempty"`
RunID string `json:"run_id,omitempty"`
VerifiedBy string `json:"verified_by,omitempty"` // role name or "human:<actor>"
Note string `json:"note,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
VerificationEvidence is one piece of evidence for an acceptance criterion (§70). CriterionKey is a stable per-criterion key (see CriterionKey). A requirement is verified only when every mandatory criterion has a pass evidence — never merely because tests exist.
type VerificationKind ¶
type VerificationKind string
VerificationKind is the evidence category for a verification (§70).
const ( VerificationAcceptance VerificationKind = "acceptance" VerificationSecurity VerificationKind = "security" VerificationUX VerificationKind = "ux" )
func (VerificationKind) Valid ¶
func (k VerificationKind) Valid() bool
type VerificationStatus ¶
type VerificationStatus string
VerificationStatus is the outcome of one piece of evidence (§70).
const ( VerificationPass VerificationStatus = "pass" VerificationFail VerificationStatus = "fail" VerificationBlocked VerificationStatus = "blocked" VerificationNeedsManual VerificationStatus = "needs_manual" // VerificationWaived records a human waiver judgment at evidence level (the // corresponding requirement is marked waived, not verified). VerificationWaived VerificationStatus = "waived" )
func (VerificationStatus) Valid ¶
func (s VerificationStatus) Valid() bool