ferrify-domain
ferrify-domain defines the core vocabulary for Ferrify.
This crate exists so the rest of the workspace can talk about policy, scope, trust, provenance, plans, and reports using explicit Rust types instead of meaning-bearing raw primitives. If Ferrify's control plane has a language, this crate is that language.
What This Crate Owns
- validated identifiers such as
RepoPath,ModeSlug, andApprovalProfileSlug - policy and trust types such as
PolicyLayer,TrustLevel, andCapability - intake and planning types such as
ChangeIntent,ChangePlan, andPatchPlan - provenance labels such as
InputRoleandClassifiedInput - reporting types such as
FinalChangeReportandValidationReceipt
Why It Exists
Ferrify is built around explicit governance. That only works if the most important invariants are encoded as values that can be validated early and carried across crate boundaries without ambiguity.
For example:
- a repository path must not escape the workspace
- a mode name must be a stable slug, not arbitrary text
- a final report must be able to point to concrete verification receipts
ferrify-domain makes those constraints structural.
Example
Add the package:
[]
= "0.1.1"
Use the validated value objects:
use ;
Design Notes
- Prefer types that explain intent over generic strings and booleans.
- Keep serialization straightforward so plans and reports remain easy to emit as JSON.
- Treat policy, trust, and evidence as first-class data rather than prompt conventions.
Relationship To The Workspace
Every other Ferrify crate depends on this crate either directly or indirectly. If a type belongs to the shared control-plane model, it should usually live here rather than in an orchestration or infrastructure crate.