Commit graph

22 commits

Author SHA1 Message Date
matt wilkie
46be5594d6
Add maintainer PR guidelines (bd-k0j) (#3665)
Turn the PR assessment workflow from @steveyegge 's Vibe Maintainer into an agent-neutral maintainer PR guidelines documents
2026-05-02 13:21:15 -07:00
Kevin Glynn
8b2f21745f
docs: fix stale agent instructions across 5 files (#3436)
Fix stale agent-facing documentation for Dolt-only storage, build/test commands, claiming work, and removed references. Includes maintainer cleanup to align remaining stale test guidance with the current make test / test-icu-path policy.\n\nCo-authored-by: Kevin Glynn <12972584+kevglynn@users.noreply.github.com>\nCo-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-25 11:45:39 -07:00
matt wilkie
6e506b6ddd
Add PR preflight and contributor intake guidance (#3470)
* Handle legacy PR status contexts

* docs: add contributor PR intake checklist

* docs: wire PR preflight into agent guidance
2026-04-24 15:44:06 -07:00
Ben Madore
3b39ce577a
docs: update user-facing URLs from steveyegge/beads to gastownhall/beads
Co-authored-by: Ben Madore <823868+madorb@users.noreply.github.com>
2026-04-24 08:17:42 -07:00
matt wilkie
b90ee4cf4c
ci: add nix build check to catch vendorHash drift (GH#3298) (#3364)
Adds a CI job that runs `nix build .#default` on PRs touching go.mod,
go.sum, default.nix, flake.nix, or flake.lock, so dependabot bumps
that invalidate vendorHash fail loudly in CI instead of silently
breaking Nix users on main (as happened in GH#3221).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 13:21:53 -07:00
matt wilkie
a315ffd4d3
docs: add ICU regex policy and update build deps (GH-3126)
docs: add ICU regex policy and update build deps (GH-3126)
2026-04-10 11:38:05 -07:00
matt wilkie
0ed8d0b271
docs: add contributor protection policy for AI agents (#3151)
Prevents agents from silently overwriting external contributor PRs.
Prompted by PR #3143 where bgjackma's work was reimplemented without
attribution.

- CONTRIBUTING.md: "Your PR Will Not Be Overwritten" section
- AGENT_INSTRUCTIONS.md: check-before-you-build procedure + CONTRIBUTING.md reference
- AGENTS.md: cross-reference to contributor protection
2026-04-09 12:41:43 -07:00
matt wilkie
d919e1aabe docs: add ICU regex policy and update build dependency guidance (GH-3126)
Add docs/ICU-POLICY.md as the authoritative reference for how ICU is
handled across all platforms. Update CONTRIBUTING.md and INSTALLING.md
to stop listing ICU as a build requirement (it's test-only since all
builds use gms_pure_go).

Resolves confusion from overlapping PRs (#2991, #3066, #3112) where
agents and contributors were doing/undoing each other's ICU fixes
without a written policy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 20:24:05 -07:00
Harry Miller
34a399bc9c
docs: remove dead dual-mode test framework references from CONTRIBUTING.md (#2958)
The dual-mode test framework (RunDualModeTest/DualModeTestEnv) was
deleted when the daemon/RPC layer was removed. Replace with
documentation of current testing patterns:

- CGO vs non-CGO test split and how to run each
- Test isolation with t.TempDir() and test helpers
- Table-driven test example

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-02 19:18:48 -07:00
Amp
47bcd0f44e docs: add PR hygiene and ZFC sections to CONTRIBUTING.md
- Add explicit 'one issue per PR, one PR per issue' rule
- Warn against including .beads/ data or unrelated changes
- Add ZFC section with link to Yegge's blog post

Amp-Thread-ID: https://ampcode.com/threads/T-019d20ed-0faa-762f-81dd-08f523c25ca2
Co-authored-by: Amp <amp@ampcode.com>
2026-03-24 10:43:41 -07: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
topaz
062aedbed7 docs: remove stale daemon references from all documentation (GH#1982)
Sweep 65 markdown files across docs/, website/, claude-plugin/, examples/,
integrations/, and root to replace removed `bd daemon` references with
current Dolt server mode equivalents. CHANGELOG.md preserved per policy.

Key replacements:
- `bd daemon start/stop/status` → `bd dolt start/stop` / `bd doctor`
- `bd daemons killall/health/logs` → `bd dolt stop` / `bd doctor`
- `--no-daemon` flag → removed (embedded mode is default)
- `BEADS_NO_DAEMON` / `BEADS_DAEMON_MODE` env vars → removed
- `.beads/bd.sock` → removed
- "daemon mode" / "direct mode" → "server mode" / "embedded mode"
- daemon.pid/daemon.log → .beads/dolt/sql-server.pid/.log

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

Executed-By: beads/polecats/topaz
Rig: beads
Role: polecats
2026-02-22 17:57:53 -08:00
emma
1feee20e95 docs: update stale sqlite references to dolt in key contributor docs
- CONTRIBUTING.md: update directory layout, test commands, database
  inspection, and dual-mode description to reference Dolt
- BENCHMARKS.md: update all benchmark commands from sqlite to dolt paths
- docs/ARCHITECTURE.md: update storage implementation table entry
- docs/CLAUDE.md: remove references to deleted sqlite/ and memory/
  storage backends

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

Executed-By: beads/crew/emma
Rig: beads
Role: crew
2026-02-16 00:56:29 -08:00
Joseph Turian
6ab2e294f1 docs: add Docker trick for updating flake.lock without nix
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 21:54:03 -05:00
Ryan
ffe0dca2a3
feat(daemon): unify auto-sync config for simpler agent workflows (#904)
* feat(daemon): unify auto-sync config for simpler agent workflows

## Problem

Agents running `bd sync` at session end caused delays in the Claude Code
"event loop", slowing development. The daemon was already auto-exporting
DB→JSONL instantly, but auto-commit and auto-push weren't enabled by
default when sync-branch was configured - requiring manual `bd sync`.

Additionally, having three separate config options (auto-commit, auto-push,
auto-pull) was confusing and could get out of sync.

## Solution

Simplify to two intuitive sync modes:

1. **Read/Write Mode** (`daemon.auto-sync: true` or `BEADS_AUTO_SYNC=true`)
   - Enables auto-commit + auto-push + auto-pull
   - Full bidirectional sync - eliminates need for manual `bd sync`
   - Default when sync-branch is configured

2. **Read-Only Mode** (`daemon.auto-pull: true` or `BEADS_AUTO_PULL=true`)
   - Only receives updates from team
   - Does NOT auto-publish changes
   - Useful for experimental work or manual review before sharing

## Benefits

- **Faster agent workflows**: No more `bd sync` delays at session end
- **Simpler config**: Two modes instead of three separate toggles
- **Backward compatible**: Legacy auto_commit/auto_push settings still work
  (treated as auto-sync=true)
- **Adaptive `bd prime`**: Session close protocol adapts when daemon is
  auto-syncing (shows simplified 4-step git workflow, no `bd sync`)
- **Doctor warnings**: `bd doctor` warns about deprecated legacy config

## Changes

- cmd/bd/daemon.go: Add loadDaemonAutoSettings() with unified config logic
- cmd/bd/doctor.go: Add CheckLegacyDaemonConfig call
- cmd/bd/doctor/daemon.go: Add CheckDaemonAutoSync, CheckLegacyDaemonConfig
- cmd/bd/init_team.go: Use daemon.auto-sync in team wizard
- cmd/bd/prime.go: Detect daemon auto-sync, adapt session close protocol
- cmd/bd/prime_test.go: Add stubIsDaemonAutoSyncing for testing

* docs: add comprehensive daemon technical analysis

Add daemon-summary.md documenting the beads daemon architecture,
memory analysis (explaining the 30-35MB footprint), platform support
comparison, historical problems and fixes, and architectural guidance
for other projects implementing similar daemon patterns.

Key sections:
- Architecture deep dive with component diagrams
- Memory breakdown (SQLite WASM runtime is the main contributor)
- Platform support matrix (macOS/Linux full, Windows partial)
- Historical bugs and their fixes with reusable patterns
- Analysis of daemon usefulness without database (verdict: low value)
- Expert-reviewed improvement proposals (3 recommended, 3 skipped)
- Technical design patterns for other implementations

* feat: add cross-platform CI matrix and dual-mode test framework

Cross-Platform CI:
- Add Windows, macOS, Linux matrix to catch platform-specific bugs
- Linux: full tests with race detector and coverage
- macOS: full tests with race detector
- Windows: full tests without race detector (performance)
- Catches bugs like GH#880 (macOS path casing) and GH#387 (Windows daemon)

Dual-Mode Test Framework (cmd/bd/dual_mode_test.go):
- Runs tests in both direct mode and daemon mode
- Prevents recurring bug pattern (GH#719, GH#751, bd-fu83)
- Provides DualModeTestEnv with helper methods for common operations
- Includes 5 example tests demonstrating the pattern

Documentation:
- Add dual-mode testing section to CONTRIBUTING.md
- Document RunDualModeTest API and available helpers

Test Fixes:
- Fix sync_local_only_test.go gitPull/gitPush calls
- Add gate_no_daemon_test.go for beads-70c4 investigation

* fix(test): isolate TestFindBeadsDir tests with BEADS_DIR env var

The tests were finding the real project's .beads directory instead of
the temp directory because FindBeadsDir() walks up the directory tree.
Using BEADS_DIR env var provides proper test isolation.

* fix(test): stop daemon before running test suite guard

The test suite guard checks that tests don't modify the real repo's .beads
directory. However, a background daemon running auto-sync would touch
issues.jsonl during test execution, causing false positives.

Changes:
- Set BEADS_NO_DAEMON=1 to prevent daemon auto-start from tests
- Stop any running daemon for the repo before taking the "before" snapshot
- Uses exec to call `bd daemon --stop` to avoid import cycle issues

* chore: revert .beads/issues.jsonl to upstream/main

Per CONTRIBUTING.md, .beads/issues.jsonl should not be modified in PRs.
2026-01-06 12:52:19 -08:00
Steve Yegge
9544558840 ci: add check to reject PRs with .beads/issues.jsonl changes
Contributors frequently fork the repo and accidentally include their local
.beads/issues.jsonl changes in PRs. This adds:

1. A new CI job that fails PRs containing .beads/issues.jsonl changes
2. Clear error message with fix instructions
3. Updated CONTRIBUTING.md with guidance

This should prevent the common issue of PRs including unintended database changes.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 23:43:30 -08:00
Logan Thomas
520e1007f1
fix/doc: Go version inconsistencies and broken documentation links (#535)
* docs: fix Go version typo in CONTRIBUTING.md (1.25 -> 1.24)

* docs: update Go version requirement to 1.24+ across docs

* docs: fix broken links to docs/ in npm-package/README.md

* docs: fix QUICKSTART.md path reference in AGENTS.md
2025-12-13 10:48:44 -08:00
Steve Yegge
9c3ab7fba9 Document -short flag, update linting baseline, clarify bd edit MCP exclusion
- Enhanced CONTRIBUTING.md with -short flag usage guidance
- Updated LINTING.md: 22 issues baseline (down from 34)
- Added MCP exclusion note for bd edit command in AGENTS.md

Closes bd-iov0, bd-aec5439f, bd-fd8753d9
2025-11-06 19:42:01 -08:00
Steve Yegge
b31bddc210 Optimize test suite performance - 45% reduction in integration tests
- Add testutil.TempDirInMemory() using /dev/shm on Linux for 20-30% I/O speedup
- Update slow hash multiclone tests to use in-memory filesystem
- Convert 17 scripttest tests (~200+s) to fast CLI tests (31s) with --no-daemon
- Disable slow scripttest suite behind build tag
- Add README_TESTING.md documenting test strategy and optimizations
- Update CI to use -short flag for PR checks, full tests nightly

Results:
- TestHashIDs_* reduced from ~20s to ~11s (45% reduction)
- Scripttest suite eliminated from default runs (massive speedup)
- Total integration test time significantly reduced

Closes bd-gm7p, bd-l5gq

Amp-Thread-ID: https://ampcode.com/threads/T-c2b9434a-cd29-4725-b8e0-cbea50b36fe2
Co-authored-by: Amp <amp@ampcode.com>
2025-11-04 11:25:36 -08:00
Steve Yegge
9a109902b4 Consolidate documentation: move maintainer docs to docs/, remove redundant files
- Move RELEASING.md and LINTING.md to docs/ (maintainer-only content)
- Delete WORKFLOW.md (agent workflow content belongs in AGENTS.md)
- Delete TEXT_FORMATS.md (technical details belong in ADVANCED.md)
- Update all cross-references to point to new locations
- Keep CLAUDE.md (required by Claude Code)

Reduces root-level docs from 20 to 16 files with clearer organization.

Amp-Thread-ID: https://ampcode.com/threads/T-fe1db4f3-16c6-4a79-8887-c7f4c1f11c43
Co-authored-by: Amp <amp@ampcode.com>
2025-10-28 15:46:12 -07:00
Steve Yegge
2c7708eaa7 Address remaining golangci-lint findings
- Add package comment to cmd/bd/dep.go
- Change directory permissions from 0755 to 0750 in init.go
- Simplify getNextID signature (remove unused error return)
- Configure golangci-lint exclusions for false positives
- Document linting policy in LINTING.md

The remaining ~100 lint warnings are documented false positives:
- 73 errcheck: deferred cleanup (idiomatic Go)
- 17 revive: Cobra interface requirements and naming choices
- 7 gosec: false positives on validated SQL and user file paths
- 2 dupl: acceptable test code duplication
- 1 goconst: test constant repetition

See LINTING.md for full rationale. Contributors should focus on
avoiding NEW issues rather than the documented baseline.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 09:48:22 -07:00
Steve Yegge
87ed7c8793 Polish for open-source release
Major improvements to code quality, documentation, and CI:

Code Quality:
- Add golangci-lint configuration with 13 linters
- Fix unchecked error returns in export/import/init
- Refactor duplicate scanIssues code
- Add package comments for all packages
- Add const block comments for exported constants
- Configure errcheck to allow idiomatic defer patterns

Documentation:
- Add comprehensive CONTRIBUTING.md with setup, testing, and workflow
- Fix QUICKSTART.md binary name references (beads → bd)
- Correct default database path documentation

CI/CD:
- Add GitHub Actions workflow for tests and linting
- Enable race detection and coverage reporting
- Automated quality checks on all PRs

All tests passing. Lint issues reduced from 117 to 103 (remaining are
idiomatic patterns and test code). Ready for open-source release.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-12 09:41:29 -07:00