beads/cmd/bd/setup
Steven Syrek e312332568
fix(setup): skip duplicate hooks when beads plugin is installed (GH#3192) (#3196)
When both the beads Claude Code plugin and `bd setup claude` are active,
bd prime fires twice per session — wasting ~1-2k tokens each time. The
plugin already declares identical SessionStart/PreCompact hooks in its
plugin.json, so project-level hooks are redundant.

Now `bd setup claude` detects the plugin via enabledPlugins in settings
files and skips writing hooks when the plugin is already providing them.
The CLAUDE.md integration section is still installed since the plugin
does not provide that. `bd setup claude --check` reports "plugin-managed"
as a valid success state instead of "No hooks installed".

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-20 17:40:31 -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 fix(setup): skip duplicate hooks when beads plugin is installed (GH#3192) (#3196) 2026-04-20 17:40:31 -07:00
claude_test.go fix(setup): skip duplicate hooks when beads plugin is installed (GH#3192) (#3196) 2026-04-20 17:40:31 -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(setup): add alwaysApply frontmatter to Cursor rules template (GH#3191) (#3193) 2026-04-20 17:40:28 -07:00
cursor_test.go fix(setup): add alwaysApply frontmatter to Cursor rules template (GH#3191) (#3193) 2026-04-20 17:40:28 -07: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