Expand description
Core domain types for Ferrify.
agent-domain is the vocabulary crate for the rest of the workspace. It
defines the value objects, planning records, policy types, provenance
labels, and reporting structures that let Ferrify describe a governed
software-change run without reaching into filesystem or process concerns.
The main design goal is to keep meaning-bearing concepts explicit. A path
that must stay inside the repository is represented by RepoPath, not a
raw String. A mode identifier is a validated ModeSlug, not a free-form
label. The result is a control plane that can encode authority and scope in
the type system before any command is run.
§Core Concepts
PolicyLayer,TrustLevel, andCapabilitydescribe who may do what, and why.ChangeIntent,ChangePlan, andPatchPlancarry work from intake into a bounded implementation strategy.InputRoleandClassifiedInputexplain how Ferrify separates operator goals, repository policy, code, evidence, and untrusted text.FinalChangeReportandValidationReceiptmake reporting evidence-backed instead of speculative.
§Examples
use agent_domain::{ModeSlug, RepoPath, TrustLevel};
let target = RepoPath::new("crates/agent-cli/src/main.rs")?;
let mode = ModeSlug::new("architect")?;
assert_eq!(target.as_str(), "crates/agent-cli/src/main.rs");
assert_eq!(mode.as_str(), "architect");
assert!(TrustLevel::RepoPolicy.can_define_policy());Structs§
- Approval
Profile Slug - A stable slug identifying an approval profile.
- Artifact
Ref - A reference to evidence captured during a verification step.
- Assumption
- An assumption that influenced the run.
- Change
Intent - The intake object that describes the requested software change.
- Change
Plan - The architect-stage change plan.
- Change
Summary - The high-level change outcome shown to the operator.
- Classified
Input - A lightweight provenance record for an input observed during a run.
- Effective
Policy - The fully resolved policy used by a run.
- Evidence
Requirement - A verification requirement requested by the operator or planner.
- Final
Change Report - The evidence-backed final report.
- Mode
Slug - A stable slug identifying an execution mode.
- Outcome
Spec - The desired outcome stated for the task.
- Patch
Anchor - A file-level anchor used by patch planning.
- Patch
Budget - The patch budget used to keep edits bounded.
- Patch
Plan - The implementer-stage patch plan.
- Path
Pattern - A repository-relative path restriction.
- Repo
Path - A repository-relative path that cannot escape the workspace root.
- Reporting
Policy - Reporting rules that constrain what the runtime may claim.
- Risk
Item - A risk item preserved across planning and reporting.
- Scope
Boundary - The explicit scope boundary for a task.
- Scope
Item - A repository item used to bound scope.
- Touched
Area - A touched area that should appear in the final report.
- Validation
Minimums - Minimum verification requirements imposed by policy.
- Validation
Receipt - A receipt proving which verification command ran and how it ended.
- Verification
Plan - The verification steps required for a plan.
Enums§
- ApiImpact
- The expected API impact for the change.
- Approval
Rule - The approval policy attached to a capability.
- Blast
Radius - The maximum acceptable blast radius for a change.
- Capability
- A capability that can be granted, denied, or approval-gated.
- Change
Status - The overall status for the final report.
- Dependency
Policy - The repository stance on dependency changes.
- Domain
Type Error - Validation failures for domain value objects.
- Input
Role - The operational role an input plays in Ferrify.
- Policy
Layer - The precedence layer that introduced a policy fragment.
- Risk
Level - The severity attached to a residual risk.
- Semantic
Concern - The semantic concern for a patch.
- Task
Kind - The kind of change the operator is requesting.
- Trust
Level - The trust classification attached to inputs and observations.
- Verification
Kind - The verification steps supported by Ferrify.
- Verification
Status - The result of an individual verification step.