Skip to content

refactor(config): simplify local config creation and loading (fixes #667)#668

Open
mickume wants to merge 1 commit into
mainfrom
refactor/issue-667-simplify-local-config
Open

refactor(config): simplify local config creation and loading (fixes #667)#668
mickume wants to merge 1 commit into
mainfrom
refactor/issue-667-simplify-local-config

Conversation

@mickume

@mickume mickume commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #667

  • Local config.toml is now opt-in via --config flag (replacing --force)
  • When local config exists, it is the sole config source — global ~/.agent-fox/config.toml is ignored entirely
  • Local config template uses the same promoted-fields style as the global config
  • Removed config merge logic from init_project.py and the save/restore hack from init_cmd

Changes

File Change
packages/af/af/init.py --force--config; local config creation opt-in
packages/agentfox/agentfox/core/config_gen.py generate_local_config_template() uses promoted-fields style
packages/agentfox/agentfox/core/config.py _load_config_global_local() checks local first; sole source when present
packages/agentfox/agentfox/workspace/init_project.py Removed force param and merge_existing_config call
docs/cli-reference.md Updated init docs for --config and config precedence

Tests

  • Updated ~15 tests in test_global_config_loading.py for sole-source semantics
  • Updated init integration tests for opt-in local config
  • All 5857 tests pass (1 pre-existing meta-test failure unrelated)

Verification

  • All existing tests pass: ✅
  • Linter / formatter: ✅
  • No regressions: ✅

Auto-generated by af-fix.

)

Local config.toml is now opt-in via --config flag (replacing --force).
When present, local config is the sole config source — global
~/.agent-fox/config.toml is ignored entirely. Local config template
now uses the same promoted-fields style as the global config.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: simplify local config.toml creation and loading semantics

1 participant