Commit graph

54 commits

Author SHA1 Message Date
matt wilkie
64e504d541
fix: enable auto-export by default and add init prompt (GH#2973) (#3204)
* fix: enable auto-export by default with canonical issues.jsonl name (GH#2973)

Users expected JSONL export to refresh automatically but export.auto
defaulted to false, requiring explicit opt-in. Also the default filename
(export.jsonl) didn't match the canonical issues.jsonl used in docs and
git hooks. Change defaults: export.auto=true, export.path=issues.jsonl,
export.git-add=true so viewers (bv) and git workflows see fresh data
without extra configuration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat(init): add auto-export prompt and document export.* config (GH#2973)

Interactive bd init now asks whether to enable auto-export (default: yes).
Users can opt out during setup instead of discovering the setting later.

Also documents the export.* config namespace in bd config --help with
all four keys (export.auto, export.path, export.interval, export.git-add)
and adds export examples.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: document export.* auto-export config keys (GH#2973)

Document the export.auto/path/interval/git-add keys in docs/CONFIG.md
and note the default-on switch in CHANGELOG.md [Unreleased].

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(export): don't prime throttle on empty init and skip git-add without git (GH#2973)

Review feedback on #3204 surfaced two regressions in the default-on
auto-export path:

1. bd init's PersistentPostRun fired maybeAutoExport with zero issues,
   writing an empty .beads/issues.jsonl and saving export-state.json with
   the current dolt commit + timestamp. The next `bd create` was then
   throttled for up to export.interval (default 60s) because the
   timestamp check in maybeAutoExport returned before considering the new
   commit, leaving issues.jsonl stale on fresh repos.

   Skip saving state and remove the empty file when the export produced
   no issues and no memories. The next write runs a real export
   immediately.

2. export.git-add defaulting to true emitted
   `Warning: auto-export: git add failed: exit status 128` on every
   write in the supported standalone BEADS_DIR flow where init
   intentionally skips `git init`. Gate the git add call on isGitRepo()
   so standalone users get silent, working auto-export.

Adds a scripttest regression guard for the init -> immediate create
path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* test(memory): disable auto-export in concurrent test (GH#2973)

TestEmbeddedMemoryConcurrent started failing on this branch after
auto-export became the default: every concurrent 'bd remember'/'bd
forget' call now fires maybeAutoExport, which reads store state after
the write. Under 8-worker contention this intermittently leaves a
forgotten key visible to 'bd memories'.

The test exercises memory concurrency, not export behavior; opt it
out of auto-export so the signal stays focused. Followup: investigate
the race between write commit and post-write auto-export read in
embedded Dolt concurrent paths.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:02:58 -07:00
Harry Miller
7ada135baf
Add az:// (Azure Blob Storage) as a recognized Dolt remote URL scheme (#3101)
Add az:// (Azure Blob Storage) as a recognized Dolt remote URL scheme.

Azure Blob Storage URLs were already functional for bootstrap via sync.git-remote, but the URL validator didn't recognize az:// — so config validate and error hints were incomplete.

Thanks to @harry-miller-trimble for the contribution!
2026-04-10 14:03:16 -07:00
matt wilkie
b8ec14d29c
fix: surface auto-export and auto-backup errors to stderr (#3122)
* fix: make auto-export and auto-backup errors visible on stderr

Previously, failures in auto-export (JSONL flush) and auto-backup were
logged only via debug.Logf, invisible to normal users. One user lost 46
issues because JSONL export silently stopped working with no warnings.

Upgrade critical error paths from debug.Logf to fmt.Fprintf(os.Stderr)
so users see warnings when their backup/export pipeline breaks. Keep
debug.Logf for non-critical diagnostics (throttle, no-change skip).

Closes #2489

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* docs: remove stale sync references

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 20:37:13 -07:00
coffeegoddd☕️✨
fb8ff3b46d /{README,cmd}: go back to init 2026-03-28 13:47:20 -07:00
coffeegoddd☕️✨
9134355618 /{README.md,cmd,docs,internal,website}: doc updates 2026-03-28 13:47:20 -07:00
coffeegoddd☕️✨
33eed5d14f /{docs,website}: wip, updating docs 2026-03-28 13:47:20 -07:00
Harry
3ae2ef3a5a feat: multi-project/team support for Linear, Jira, and ADO
Add support for syncing issues across multiple projects/teams in all
three tracker integrations, with shared infrastructure to avoid
duplicating logic.

Shared infrastructure (internal/tracker/multiproject.go):
- ParseCommaSeparated: splits comma-separated config values
- DeduplicateStrings: removes duplicates preserving order
- ResolveProjectIDs: config precedence (CLI > plural > singular)

Linear (closes #2791):
- Tracker: map[string]*Client with per-team routing
- FetchIssues iterates all teams, deduplicates by issue ID
- UpdateIssue routes to owning team via FetchIssueByIdentifier
- Config: linear.team_ids / LINEAR_TEAM_IDS + --team flag

Jira:
- projectKey string → projectKeys []string
- FetchIssues uses JQL IN clause (single query, no iteration)
- Config: jira.projects / JIRA_PROJECTS + --project flag

ADO:
- project string → projects []string
- WIQL uses TeamProject IN clause (single query)
- Config: ado.projects / AZURE_DEVOPS_PROJECTS + --project flag

All singular config keys remain supported for backward compatibility.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 13:40:39 -07:00
emma
9b2c012e7e feat: custom status categories (active/wip/done/frozen)
Add category-aware custom statuses that control behavior in bd ready
and bd list. New config format: bd config set status.custom
"in_review:active,qa_testing:wip,archived:done,on_hold:frozen".
Backward compatible with old flat format. New bd statuses command
lists all statuses with --json support.

Also fix TestKillStaleServersPreservesOtherRepoServers to clear
BEADS_DOLT_AUTO_START env var, since the new IsAutoStartDisabled guard
in killStaleServersForDir short-circuits when set.

PR: #2665

Co-Authored-By: Harry Miller <harry-miller-trimble@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 12:35:03 -07:00
garnet
3dae6bb3df refactor: remove gastown/Gas Town string references from beads code and docs (bd-1ue8)
Replace gastown-specific references with generic alternatives throughout
the codebase:

- Rename --gastown flag to --orchestrator in bd doctor
- Rename gastownMode/gastownThreshold params to orchestratorMode/orchestratorThreshold
- Rename isGasTownTownRoot() to isOrchestratorRoot()
- Replace "gastown" in CLI examples with generic rig names (my-project, other-project)
- Update comments replacing "Gas Town" with "orchestrator" or "multi-agent workspace"
- Update active docs (DOLT.md, CONFIG.md, ADVANCED.md, etc.)
- Update test data to use generic names instead of "gastown"
- Update role templates (deacon, witness, refinery) to use generic language

Preserved as historical (not changed):
- CHANGELOG.md entries (historical record)
- ARTICLES.md (links to real published articles)
- info.go version notes (historical release notes)
- gastown/ file path references in dolt-concurrency.md (point to actual repo)
2026-03-20 18:39:50 -07:00
jade
13a83b080c refactor: make BEADS_ACTOR primary env var, BD_ACTOR deprecated fallback (bd-hm9r)
Simplify actor resolution chain to: --actor > BEADS_ACTOR > BD_ACTOR (deprecated) >
git config user.name > $USER > "unknown". BD_ACTOR still works for backwards compat
but BEADS_ACTOR is now the canonical beads-native env var. Updates all code paths,
tests, and documentation.
2026-03-20 18:30:20 -07:00
beads/crew/emma
0469a9ab18 docs: add Azure DevOps configuration reference
Document ADO config keys (ado.pat, ado.org, ado.project, ado.url),
environment variable mappings, state/type/priority mapping examples,
and pull filter options.

Co-Authored-By: Harry Miller <harry_miller@trimble.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-19 14:35:32 -07:00
emma
63432acf64 fix: --validate checks --acceptance field, add validation.on-close config (PR #2654)
Three fixes for validation consistency:

1. bd create --validate now uses LintIssue() instead of ValidateTemplate(),
   bringing it to parity with bd lint. A non-empty --acceptance field now
   satisfies the "Acceptance Criteria" requirement without needing the
   heading in --description. (GH#2468 parity)

2. --dry-run no longer bypasses --validate. Validation now runs before the
   dry-run exit, so users get feedback on template issues during preview.

3. New validation.on-close config option (none|warn|error, default: none).
   When enabled, warns on terse close reasons (<20 chars) or default
   "Closed" reasons. Mirrors existing validation.on-create pattern.

Co-Authored-By: seanmartinsmith <114885497+seanmartinsmith@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-18 22:21:23 -07:00
Joseph Turian
6f0e2208ec Add backup fetch-git and git snapshot follow-ups (bd-mtqql) 2026-03-14 23:12:47 -04:00
Amp
a333dcaa75 fix(docs): purge stale bd sync/import/--branch refs + add CI doc validation (GH#2522)
Systematic cleanup of stale documentation references left over from the
Dolt migration:

- Replace all 'bd sync' → 'bd dolt push' / 'bd dolt pull' across 40+ files
- Replace all 'bd import' → 'bd init --from-jsonl' or remove
- Replace 'bd init --branch' → note about refs/dolt/data separation
- Fix AGENT_INSTRUCTIONS.md (highest impact: agents read this directly)
- Fix npm-package, claude-plugin, integrations, examples, website docs

Add scripts/check-doc-flags.sh to catch stale doc references:
- Checks for removed commands (bd sync, bd import)
- Checks for removed flags (bd init --branch)
- Warns on legacy SQLite/beads.db references
- Compares CLI_REFERENCE.md against bd help --all

Add CI job (check-doc-flags) and Makefile target (check-docs) to gate
PRs against doc freshness.

Prior art: feat/help-doc-generator branch has bd help --doc/--list for
generating docs FROM CLI output. This script validates docs AGAINST CLI
output — complementary approaches.

Amp-Thread-ID: https://ampcode.com/threads/T-019cde77-0722-7353-b63a-1779a5773ca6
Co-authored-by: Amp <amp@ampcode.com>
2026-03-11 13:25:40 -07:00
beads/crew/emma
396c944a5e fix: add shared Dolt server mode for multi-repo/agent setups (GH#2416)
Introduces BEADS_DOLT_SHARED_SERVER mode where multiple beads projects
share a single Dolt server on a fixed port (3308), avoiding per-project
server sprawl. Includes `bd init --shared-server`, `bd dolt shared-*`
commands, doctor checks, and comprehensive tests.

Co-Authored-By: Shybko <shybko@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 17:38:00 -07:00
beads/crew/emma
97e0ee9a30 refactor: remove dead sync mode scaffolding (GH#2485)
Remove SyncMode type, SyncConfig struct, sync trigger constants, and
associated validation/defaults. Active code (ConflictStrategy, FieldStrategy,
Sovereignty tiers, federation) is unchanged.

Co-Authored-By: athosmartins <athosmartins@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 11:48:11 -07:00
matt wilkie
e05cd7ed13
docs: replace stale bd sync references with bd dolt push/pull (GH#2442, GH#2435)
Amp-Thread-ID: https://ampcode.com/threads/T-019cce5b-39df-740f-a8e1-5c6b3e389519

Co-authored-by: Amp <amp@ampcode.com>
2026-03-08 10:12:08 -07:00
Rudy Alvarez
df1e6bb08c fix: remove dead 3-way merge config remnants (GH#2353)
Remove ConflictStrategy, FieldStrategy types and all associated config
validation, getters, and tests. The 3-way merge engine was superseded by
Dolt-native cell-level merge. Also adds DOLT_ROOT_HOST=% to test containers
for Docker port-forwarding compatibility.

Co-Authored-By: Rudy Alvarez <rudygt@gmail.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-03-05 15:57:33 -08:00
dutch
f31acbb892 Remove stale sync mode documentation
Update documentation to reflect that only dolt-native sync mode is supported:

- docs/CONFIG.md: Remove git-portable and belt-and-suspenders references
- docs/DOLT-BACKEND.md: Simplify sync mode section
- FEDERATION-SETUP.md: Remove deprecated sync mode table
- agents.md.tmpl: Update "Git-friendly: JSONL" to "Version-controlled: Dolt"

The sync mode code was already cleaned up (only SyncModeDoltNative is valid
in internal/config/sync.go), but documentation still referenced removed modes.

w-bd-004

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-04 12:52:24 -05:00
quartz
f710909589 feat(dolt): auto-push to Dolt remote with 5-minute debounce
Add maybeAutoPush() in PersistentPostRun (after auto-commit and auto-backup)
that pushes to the Dolt remote when an origin is configured. Uses the same
pattern as maybeAutoBackup: debounce interval, change detection via commit
hash comparison, and non-fatal warnings on failure.

Config keys: dolt.auto-push (bool, auto-enabled when origin exists),
dolt.auto-push-interval (duration, default 5m).

This completes the Dolt replication story: users add a remote once and
data flows automatically.

Closes: bd-5x9

Executed-By: beads/polecats/quartz
Rig: beads
Role: polecats
2026-02-27 10:22:53 -08:00
beads/crew/emma
d82110945a feat(backup): add JSONL backup command and auto-backup support
Adds `bd backup` command that exports all database tables to sorted JSONL
files in .beads/backup/ for off-machine recovery. Events are exported
incrementally using a high-water mark. Each table is written atomically
via temp file + rename.

Auto-backup runs in PersistentPostRun when backup.enabled is true,
throttled by backup.interval (default 15m). Optional git-push mode
auto-commits and pushes backup files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-26 16:31:31 -08:00
Pablo LION
332b4f457b refactor(output): simplify title-length semantics and default to 255 2026-02-26 19:46:27 +01:00
Giulio Mecocci
87f32865cf
feat: support issue_id_mode=counter for sequential IDs (#2013)
* feat: support issue_id_mode=counter for sequential IDs (GH#2002)

When `issue_id_mode=counter` is set via `bd config set issue_id_mode counter`,
`bd create` now assigns monotonically increasing integer IDs instead of
hash-based IDs. The counter is stored in a new `issue_counter` table (one row
per prefix) and incremented atomically within the same transaction as the issue
insert.

- Add `issue_counter` table to schema (version bumped to 5)
- Add migration 006 to create `issue_counter` table on existing databases
- Add `GetNextIssueCounter()` to queries.go (standalone transaction, for
  callers outside CreateIssue)
- Modify `generateIssueID()` to check `issue_id_mode` config and use counter
  path when set to "counter"; hash mode remains the default when unset
- Explicit `--id` flag continues to take precedence over counter mode
- Tests: TestGetNextIssueCounter_Sequential, TestGetNextIssueCounter_MultiplePrefixes,
  TestCreateIssue_CounterMode, TestCreateIssue_ExplicitIDOverridesCounter,
  TestCreateIssue_HashModeDefault, TestMigrateIssueCounterTable

* docs: document issue_id_mode=counter feature (GH#2002)

Add documentation for the sequential counter ID mode across all relevant docs:
- docs/CONFIG.md: new issue_id_mode namespace entry and full example section
  with tradeoff table, migration guidance, and per-prefix counter isolation
- .beads/BD_GUIDE.md: counter mode section with when-to-use, migration
  considerations, and explicit --id override behavior
- docs/ADAPTIVE_IDS.md: alternative counter mode section with cross-reference
  to CONFIG.md
- website/docs/reference/configuration.md: issue_id_mode under ID Generation
  with comparison table

* fix: seed counter from existing issues when enabling counter mode (GH#2002)

When issue_id_mode=counter is enabled on a repo that already has manually-created
sequential IDs (e.g., plug-1 through plug-50), the counter used to start at 1,
causing immediate collisions.

Add seedCounterFromExistingIssuesTx() which scans existing issue IDs, finds the
highest numeric suffix for the given prefix, and seeds the issue_counter table
from there. The function is idempotent (skips if a counter row already exists)
and only counts purely-numeric suffixes (ignoring hash-based IDs like test-a3f2).

The seeding is called at first counter use: in generateIssueID() (issues.go) and
GetNextIssueCounter() (queries.go) when sql.ErrNoRows is returned for the prefix.

Add four tests covering: seeding from existing numeric IDs, mixed hash+numeric
IDs, fresh repos (counter starts at 1), and already-seeded counters (no regress).

* feat: add bd config schema and describe commands for agent discoverability (GH#2002)

Adds machine-readable config schema so agents can programmatically discover
all available configuration keys without reading source code.

- internal/config/schema.go: new ConfigKeyDef struct and Schema slice with
  43 entries covering core, sync, routing, jira, linear, gitlab, team, mail,
  and YAML-only keys; includes type, default, valid values, description, and
  storage location per key
- cmd/bd/config.go: adds 'bd config schema' (table + --json) and
  'bd config describe <key>' (single-key detail + --json) subcommands

Usage:
  bd config schema
  bd config schema --json | jq '.[] | select(.key == "issue_id_mode")'
  bd config describe issue_id_mode
  bd config describe jira.url --json

* refactor: remove overengineered config schema (keep docs only)

Remove the configSchemaCmd and configDescribeCmd subcommands added in
the previous commit, along with internal/config/schema.go (390 lines of
config key definitions). These are out of scope for GH#2002.
2026-02-22 23:49:46 -08:00
beads/crew/elinor
90da8f6028 docs: remove stale JSONL references from ~73 markdown files (bd-9ni.4)
Replace JSONL storage/sync references with Dolt-native equivalents across
documentation, plugin resources, website docs, agent instructions, and
example READMEs. Preserves legitimate JSONL references (bd import/export
commands, CHANGELOG history, routes.jsonl/interactions.jsonl concepts).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 22:18:02 -08:00
opal
da8f40b332 chore: audit sync mode complexity — remove stale refs and dead code (bd-shleu)
- Remove stale "realtime" references from comments, docs, and config
  (realtime mode was already removed from valid modes)
- Fix config validation to use actual mode/strategy/sovereignty values
  instead of stale names (local/git-branch/external → git-portable/
  dolt-native/belt-and-suspenders; lww → newest; none/isolated/federated
  → T1/T2/T3/T4)
- Remove 6 dead functions from config.go (IsSyncModeValid,
  IsConflictStrategyValid, IsSovereigntyValid, ShouldExportOnChange,
  ShouldImportOnChange, NeedsDoltRemote) — only used in tests,
  redundant with existing validators in sync.go
- Update tests and docs to match

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Executed-By: beads/polecats/opal
Rig: beads
Role: polecats
2026-02-19 21:33:22 -08:00
jane
139eb5a674 docs: update documentation for Dolt transition, remove SQLite/daemon references
Remove references to SQLite as primary backend, JSONL auto-sync daemon,
daemon configuration settings, and daemon-based architecture descriptions.
Replace with Dolt-native equivalents: Dolt as primary storage, git hooks
for JSONL portability, direct database access, and Dolt server mode for
multi-writer scenarios. (woho.6)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 11:56:16 -08:00
Steve Yegge
ab61b0956b
feat(dolt): auto-commit write commands and set explicit commit authors (#1270)
Adds Dolt auto-commit functionality for write commands and sets explicit commit authors.

Includes fix for race condition in commandDidWrite (converted to atomic.Bool).

Original PR: #1267 by @coffeegoddd
Co-authored-by: Dustin Brown <dustin@dolthub.com>
2026-01-22 20:52:20 -08:00
Test
b849f598d7 /{cmd,docs,internal}: support import export for dolt backends 2026-01-21 13:13:24 -08:00
Test
7ed6849d19 /{cmd,docs,internal,website}: make dolt backend explicitly single process 2026-01-20 16:51:14 -08:00
darcy
16f8c3d3ae feat(sync): add sync mode configuration (hq-ew1mbr.3)
Add configurable sync modes for Dolt storage integration:

Sync modes:
- git-portable (default): Export JSONL on push, import on pull
- realtime: Export JSONL on every database change
- dolt-native: Use Dolt remotes directly (no JSONL)
- belt-and-suspenders: Both Dolt remote AND JSONL backup

Configuration options in .beads/config.yaml:
- sync.mode: Select sync mode
- sync.export_on: push (default) or change
- sync.import_on: pull (default) or change
- conflict.strategy: newest (default), ours, theirs, manual
- federation.remote: Dolt remote URL for dolt-native mode
- federation.sovereignty: T1-T4 data sovereignty tier

The sync command now displays configuration in `bd sync --status`
and uses configured conflict strategy for resolution.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-17 10:52:29 -08:00
ohnotnow
bfae0e554c
feat: add git user.name to actor fallback chain (#994)
- Insert git config user.name in fallback chain before final $USER default
- Consolidate duplicate actor resolution logic into single function
- Add BEADS_ACTOR as env var alias for MCP compatibility
- Add tests for actor resolution priority
- Update CONFIG.md with Actor Identity Resolution section

The new fallback order is:
  --actor flag > BD_ACTOR > BEADS_ACTOR > git user.name > $USER > "unknown"

Co-authored-by: Ohffs <ohffsnotnow@gmail.com>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 12:43:46 -08:00
topaz
65fb0c6d77 feat(config): add validation.on-create and validation.on-sync config options (bd-t7jq)
Add .beads/config.yaml support for template validation settings:
- validation.on-create: warn|error|none (default: none)
- validation.on-sync: warn|error|none (default: none)

When set to "warn", issues missing required sections (based on type) show
warnings but operations proceed. When set to "error", operations fail.

Implementation:
- Add validation keys to YamlOnlyKeys in yaml_config.go
- Add defaults in config.go
- Wire up bd create to check validation.on-create config
- Wire up bd sync to run validation before export
- Add tests for config loading
- Update CONFIG.md documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-01 19:31:12 -08:00
Steve Yegge
d77a697cee feat: add bd admin parent command for cleanup/compact/reset (bd-3u8m)
Move cleanup, compact, and reset commands under `bd admin` namespace.
Creates hidden aliases for backwards compatibility that show deprecation
notice when used.

- Create cmd/bd/admin.go with parent command
- Create cmd/bd/admin_aliases.go for hidden backwards-compat aliases
- Update cleanup.go, compact.go, reset.go to remove rootCmd.AddCommand
- Update all documentation to use `bd admin <cmd>` syntax

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 16:21:08 -08:00
Steve Yegge
47cc84de3a fix(docs): standardize sync branch name and daemon syntax (GH#376)
- Replace beads-metadata with beads-sync throughout docs
  (matches code default and internal examples)
- Fix bd daemon start → bd daemon --start (correct flag syntax)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-25 16:22:09 -08:00
Steve Yegge
e67f27c092 bd sync: 2025-12-23 23:38:57 2025-12-24 00:06:41 -08:00
Steve Yegge
2de1695615 bd sync: 2025-12-23 22:33:32 2025-12-23 22:33:33 -08:00
Steve Yegge
cf9e5a597b bd sync: 2025-12-23 20:50:50 2025-12-23 20:50:50 -08:00
Steve Yegge
9c8761abc9 bd sync: 2025-12-23 20:45:19 2025-12-23 20:45:19 -08:00
Steve Yegge
7b671662aa bd sync: 2025-12-23 13:49:07 2025-12-23 14:39:07 -08:00
Steve Yegge
c46b1a0bbb Add config-based close hooks (bd-g4b4)
Implements on_close hooks in .beads/config.yaml for automation and
notifications. Hooks receive issue data via environment variables
(BEAD_ID, BEAD_TITLE, BEAD_TYPE, BEAD_PRIORITY, BEAD_CLOSE_REASON)
and run via sh -c.

Changes:
- internal/config: Add HookEntry type and GetCloseHooks()
- internal/hooks: Add RunConfigCloseHooks() for executing config hooks
- cmd/bd: Call RunConfigCloseHooks after successful close
- docs/CONFIG.md: Document hooks configuration with examples

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-23 13:39:51 -08:00
Steve Yegge
e7f09660c0 feat: add cross-project dependency support - config and external: prefix (bd-66w1, bd-om4a)
Config (bd-66w1):
- Add external_projects config for mapping project names to paths
- Add GetExternalProjects() and ResolveExternalProjectPath() functions
- Add config documentation and tests

External deps (bd-om4a):
- bd dep add accepts external:project:capability syntax
- External refs stored as-is in dependencies table
- GetBlockedIssues includes external deps in blocked_by list
- blocked_issues_cache includes external dependencies
- Add validation and parsing helpers for external refs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-21 23:08:00 -08:00
Steve Yegge
244ba1471b feat(config): add directory-aware label scoping for monorepos (fixes #541)
Adds automatic label filtering based on current working directory:
- New config option: directory.labels (maps directory patterns to labels)
- bd ready and bd list auto-apply label filtering when in matching directory
- Uses --label-any semantics (shows issues with any of the matching labels)

Config example:
```yaml
directory:
  labels:
    packages/maverick: maverick
    packages/agency: agency
```

When running `bd ready` from `packages/maverick/`, issues labeled
"maverick" are automatically shown first, without needing --label-any.

Closes #541

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 03:41:09 -08:00
Steve Yegge
c988b171e8 feat(config): add git.author and git.no-gpg-sign options (fixes #600)
Adds configuration options for beads git commits:
- git.author: Override commit author (e.g., "beads-bot <beads@example.com>")
- git.no-gpg-sign: Disable GPG signing for beads commits

This is useful for users with Touch ID commit signing (like Secretive)
who get prompted for every beads auto-commit.

Config example:
```yaml
git:
  author: "beads-bot <beads@example.com>"
  no-gpg-sign: true
```

Environment variables: BD_GIT_AUTHOR, BD_GIT_NO_GPG_SIGN

Closes #600

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 03:36:41 -08:00
Steve Yegge
b4bc682d93 feat(create): add require-description config option (GH#596)
Add create.require-description config option that enforces descriptions
when creating issues. When enabled, bd create will error if no
description is provided (except for test issues).

- Config in .beads/config.yaml or ~/.config/bd/config.yaml
- Also supports BD_CREATE_REQUIRE_DESCRIPTION env var
- Default: false (preserves current behavior with warning)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-20 02:38:56 -08:00
Justin Williams
df5ceb5d82
feat: Linear Integration (#655)
* Add Linear integration CLI with sync and status commands

- Add `bd linear sync` for bidirectional issue sync with Linear
- Add `bd linear status` to show configuration and sync state
- Stub pull/push functions pending GraphQL client (bd-b6b.2)

* Implement Linear GraphQL client with full sync support

- Add LinearClient with auth, fetch, create, update methods
- Implement pull/push operations with Beads type mapping
- Clean up redundant comments and remove unused code

* Add configurable data mapping and dependency sync for Linear

- Add LinearMappingConfig with configurable priority/state/label/relation maps
- Import parent-child and issue relations as Beads dependencies
- Support custom workflow states via linear.state_map.* config

* Add incremental sync support for Linear integration

- Add FetchIssuesSince() method using updatedAt filter in GraphQL
- Check linear.last_sync config to enable incremental pulls
- Track sync mode (incremental vs full) in LinearPullStats

* feat(linear): implement push updates for existing Linear issues

Add FetchIssueByIdentifier method to retrieve single issues by identifier
(e.g., "TEAM-123") for timestamp comparison during push.

Update doPushToLinear to:
- Fetch Linear issue to get internal ID and UpdatedAt timestamp
- Compare timestamps: only update if local is newer
- Build update payload with title, description, priority, and state
- Call UpdateIssue for issues where local has newer changes

Closes bd-b6b.5

* Implement Linear conflict resolution strategies

- Add true conflict detection by fetching Linear timestamps via API
- Implement --prefer-linear resolution (re-import from Linear)
- Implement timestamp-based resolution (newer wins as default)
- Fix linter issues: handle resp.Body.Close() and remove unused error return

* Add Linear integration tests and documentation

- Add comprehensive unit tests for Linear mapping (priority, state, labels, relations)
- Update docs/CONFIG.md with Linear configuration reference
- Add examples/linear-workflow guide for bidirectional sync
- Remove AI section header comments from tests

* Fix Linear GraphQL filter construction and improve test coverage

- Refactor filter handling to combine team ID into main filter object
- Add test for duplicate issue relation mapping
- Add HTTP round-trip helper for testing request payload validation

* Refactor Linear queries to use shared constant and add UUID validation

- Extract linearIssuesQuery to deduplicate FetchIssues/FetchIssuesSince
- Add linearMaxPageSize constant and UUID validation with regex
- Expand test coverage for new functionality

* Refactor Linear integration into internal/linear package

- Extract types, client, and mapping logic from cmd/bd/linear.go
- Create internal/linear/ package for better code organization
- Update tests to work with new package structure

* Add linear teams command to list available teams

- Add FetchTeams GraphQL query to Linear client
- Refactor config reading to support daemon mode
- Add tests for teams listing functionality

* Refactor Linear config to use getLinearConfig helper

- Consolidate config/env var lookup using getLinearConfig function
- Add LINEAR_TEAM_ID environment variable support
- Update error messages to include env var configuration options

* Add hash ID generation and improve Linear conflict detection

- Add configurable hash ID mode for Linear imports (matches bd/Jira)
- Improve conflict detection with content hash comparison
- Enhance conflict resolution with skip/force update tracking

* Fix test for updated doPushToLinear signature

- Add missing skipUpdateIDs parameter to test call
2025-12-19 17:58:24 -08:00
Doug Campos
eff58e494c feat: add no-push config to disable automatic git push
Wire up the existing --no-push flag to a config option so it can be
set as the default, and update bd prime output accordingly.

- Add no-push default to config.go, matching existing pattern
- Check config in sync.go when --no-push flag not explicitly set
- Update bd prime output to omit git push step when enabled
2025-12-18 00:49:07 -05:00
Steve Yegge
25ea1e7de3 docs: fix broken relative links across documentation
Fixes 46 broken relative links across 20 documentation files in docs/.

Changes:
- Added ../ prefix for root files (README.md, AGENTS.md)
- Removed ../ prefix for sibling docs files
- Removed dead links to non-existent files
- Fixed subdirectory paths

Based on PR #574 by chrisvaillancourt.

Co-Authored-By: Chris Vaillancourt <chrisvaillancourt@users.noreply.github.com>
2025-12-16 00:46:08 -08:00
matt wilkie
e01b7412d9 feat: add Git worktree compatibility (PR #478)
Adds comprehensive Git worktree support for beads issue tracking:

Core changes:
- New internal/git/gitdir.go package for worktree detection
- GetGitDir() returns proper .git location (main repo, not worktree)
- Updated all hooks to use git.GetGitDir() instead of local helper
- BeadsDir() now prioritizes main repository's .beads directory

Features:
- Hooks auto-install in main repo when run from worktree
- Shared .beads directory across all worktrees
- Config option no-install-hooks to disable auto-install
- New bd worktree subcommand for diagnostics

Documentation:
- New docs/WORKTREES.md with setup instructions
- Updated CHANGELOG.md and AGENT_INSTRUCTIONS.md

Testing:
- Updated tests to use exported git.GetGitDir()
- Added worktree detection tests

Co-authored-by: Claude <noreply@anthropic.com>
Closes: #478
2025-12-13 12:50:33 -08:00
Ryan Stortz
4254c3f2f5
feat(config): add BD_NO_INSTALL_HOOKS environment variable to disable git hook installation (#500)
* feat(config): add no-install-hooks config to disable git hook installation

Add `no-install-hooks` boolean config that prevents git hook installation
during `bd init`. This can be set via:
- Environment variable: BD_NO_INSTALL_HOOKS=1
- Global config: ~/.config/bd/config.yaml with `no-install-hooks: true`
- Local config: .beads/config.yaml with `no-install-hooks: true`

The existing `--skip-hooks` flag continues to work and takes precedence.
Default behavior unchanged: hooks install by default.

* docs: add no-install-hooks to configuration documentation

- Add no-install-hooks to Supported Settings table in CONFIG.md
- Add example in config file section
- Add "Disabling Hook Installation" section to GIT_INTEGRATION.md
  with examples for flag, env var, and config file methods
2025-12-13 06:38:26 -08:00
Steve Yegge
cd7830a5a6 fix: replace string(rune()) with strconv.Itoa in tests (bd-fmc)
Also updated CONFIG.md to clarify mass delete threshold requires >5 issues (bd-in6).

The string(rune('0'+i)) pattern produces incorrect characters when i >= 10.
Changed to strconv.Itoa(i) for reliable conversion.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-02 22:41:07 -08:00