Externalize Default Configurations to .openfang Folder
Description
Default agents, models, and providers are hardcoded into the binary, preventing clean installations and easy customization without recompilation.
Alternatives Considered
Move all defaults to .openfang/ folder structure with JSON/YAML configs. Add --no-defaults flag for minimal installations.
Additional Context
- Clean installs without bundled defaults
- Easy customization via config files
- Smaller binary size (~20-40% reduction)
- No recompilation needed for updates
- Version-controllable configurations
Zero breaking changes. Auto-generate defaults on first run for existing users.
Feature Implementation Complete
I've completed the implementation of catalog and agent template externalization, split into three PRs:
- #546 - Core: Load models/providers from
~/.openfang/catalogfiles - #547 - Extension: Externalize agent templates + init seed mechanism
- #548 - Tests: Cover home-backed catalog bootstrapping behavior
All test plan items verified ✓
OpenFang already uses ~/.openfang/ as the home directory for config.toml, agents/, skills/, and database files. The default configuration is generated by openfang init and stored in ~/.openfang/config.toml. Agent templates live in ~/.openfang/agents/. Skills are in ~/.openfang/skills/. The compile-time defaults serve as fallbacks when no disk config exists. This is the intended design for zero-config startup with customization through the .openfang folder.