Expand description
Repository modeling and working-context selection.
agent-context is the read-only exploration layer in Ferrify. It inspects a
repository, records structural facts such as workspace members and toolchain
files, and produces a bounded working set that later stages can use without
carrying the entire repo into memory.
The crate follows a structural-first read order. It looks at root manifests, toolchain configuration, CI files, repository policy, and only then expands into nearby code. That order matters because Ferrify treats current repository evidence as stronger than remembered conventions.
§Examples
use agent_context::RepoModeler;
use std::path::Path;
let model = RepoModeler::scan(Path::new("."))?;
assert!(!model.crates.is_empty());Structs§
- ApiBoundary
- A discovered public API boundary.
- Context
Budget - Limits for context selection before compaction.
- Context
Builder - Builds a compact working set from a
RepoModel. - Context
Snapshot - The compacted context snapshot that survives between stages.
- Crate
Facts - Facts collected for one Cargo crate.
- Open
Question - An unresolved question that should remain visible to later stages.
- Repo
Fact - A repository fact preserved across compaction.
- Repo
Model - The repository model built before planning.
- Repo
Modeler - Scans a repository root and builds a
RepoModel. - Toolchain
Facts - Toolchain files and CI entry points discovered at the root.
- Working
Set - The compact working set handed to planning.
Enums§
- Async
Model - The async runtime posture inferred from dependencies.
- CliStyle
- The CLI implementation style inferred from dependencies.
- Context
Error - Errors produced while scanning repository context.
- Error
Style - The error handling style inferred from dependencies.
- Logging
Style - The logging style inferred from dependencies.
- Test
Style - The testing style inferred from dependencies.
- Workspace
Kind - The broad workspace shape discovered during scanning.