Application orchestration for Ferrify.
agent-application is the crate that wires the rest of the workspace into a
single governed run. It owns task intake, repository modeling, policy
resolution, change planning, verification, review, trace generation, and the
final report returned to the operator.
The crate is intentionally orchestration-focused. It does not parse YAML, inspect Cargo manifests directly, or shell out to commands on its own. Instead, it coordinates the policy, context, syntax, infra, and eval layers so that each stage of the run stays explicit and inspectable.
Examples
use std::collections::BTreeSet;
use std::path::PathBuf;
use agent_application::{GovernedAgent, RunRequest};
use agent_domain::{ApprovalProfileSlug, Capability, TaskKind};
use agent_infra::ProcessVerificationBackend;
use agent_policy::{PolicyEngine, PolicyRepository};
# fn main() -> Result<(), Box<dyn std::error::Error>> {
let repository = PolicyRepository::load_from_root(std::path::Path::new("."))?;
let engine = PolicyEngine::new(repository);
let agent = GovernedAgent::new(engine, ProcessVerificationBackend);
let result = agent.run(RunRequest {
root: PathBuf::from("."),
goal: "tighten CLI reporting surface".to_owned(),
task_kind: TaskKind::CliEnhancement,
in_scope: vec!["crates/agent-cli/src/main.rs".to_owned()],
out_of_scope: Vec::new(),
approval_profile: ApprovalProfileSlug::new("default")?,
approval_grants: [Capability::EditWorkspace].into_iter().collect::<BTreeSet<_>>(),
untrusted_texts: Vec::new(),
})?;
println!("{}", result.final_report.outcome.headline);
# Ok(())
# }