beads/cmd/bd/setup
Harry e64dee561e feat(init): add --agents-file flag to customize agent instructions filename
Add --agents-file flag to bd init allowing users to specify a custom
filename for agent instructions (default remains AGENTS.md). This
addresses the use case where projects prefer different naming
conventions (e.g. BEADS.md) without requiring a post-init rename.

Changes:
- Add config.AgentsFile() accessor and config.ValidateAgentsFile()
  with security validation (path traversal, symlinks, extension check)
- Add --agents-file flag to bd init with config persistence
- Thread configured filename through init_agent.go
- Update setup/agents.go to use config.AgentsFile()
- Update doctor checks to search configured filename
- Update onboard messaging to reference configured filename
- Add DefaultAgentsFile constant for consistent fallback

The filename is persisted to .beads/config.yaml under agents.file
and read by all subsystems via config.AgentsFile().

Fixes #2737

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 11:17:43 -07:00
..
agents.go feat(init): add --agents-file flag to customize agent instructions filename 2026-03-22 11:17:43 -07:00
agents_marker_test.go feat(setup): target CLAUDE.md and GEMINI.md for hooks integrations 2026-03-15 15:02:52 -07:00
aider.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
aider_test.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
claude.go feat(setup): target CLAUDE.md and GEMINI.md for hooks integrations 2026-03-15 15:02:52 -07:00
claude_test.go feat(setup): target CLAUDE.md and GEMINI.md for hooks integrations 2026-03-15 15:02:52 -07:00
codex.go feat: explicit profile:full on all AGENTS.md integrations (#2139, task 4) 2026-03-15 15:02:52 -07:00
codex_test.go feat(setup): add Codex CLI setup recipe (#1243) 2026-01-21 21:50:01 -08:00
constants.go feat: add context optimization features for AI agents (#297) 2025-11-12 10:48:36 -08:00
cursor.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
cursor_test.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
exit.go refactor: standardize error handling with FatalError wrappers (bd-qioh) 2026-02-21 16:27:09 -08:00
factory.go feat: explicit profile:full on all AGENTS.md integrations (#2139, task 4) 2026-03-15 15:02:52 -07:00
factory_test.go fix: Windows Dolt server lifecycle — stale state files and false auto-stop warning (GH#2670) 2026-03-21 12:31:20 -07:00
gemini.go feat(setup): target CLAUDE.md and GEMINI.md for hooks integrations 2026-03-15 15:02:52 -07:00
gemini_test.go feat(setup): target CLAUDE.md and GEMINI.md for hooks integrations 2026-03-15 15:02:52 -07:00
junie.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
junie_test.go fix: replace stale 'bd sync' references with bd dolt push/commit (GH#2435) 2026-03-07 17:00:19 +01:00
mux.go feat: explicit profile:full on all AGENTS.md integrations (#2139, task 4) 2026-03-15 15:02:52 -07:00
mux_test.go feat(setup): add Mux setup recipe with layered AGENTS and managed hooks 2026-02-22 15:33:06 -08:00
opencode.go feat: explicit profile:full on all AGENTS.md integrations (#2139, task 4) 2026-03-15 15:02:52 -07:00
opencode_test.go feat: add OpenCode recipe to bd setup 2026-03-03 13:39:56 -07:00
setup_test_helpers.go test: refactor factory setup for coverage (#790) 2025-12-29 14:15:56 -08:00
utils.go feat: consolidate prime SSOT section replacement into canonical ReplaceSection (bd-jfe5) 2026-03-15 18:59:15 -07:00
utils_test.go feat: consolidate prime SSOT section replacement into canonical ReplaceSection (bd-jfe5) 2026-03-15 18:59:15 -07:00