Commit Graph

960 Commits

Author SHA1 Message Date
Steve Yegge
7c36a68476 chore: Bump version to 0.20.0
Amp-Thread-ID: https://ampcode.com/threads/T-5d7f722e-ec33-499a-bd3d-e684c554d7fe
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 20:40:13 -07:00
Steve Yegge
3b89178ebc Add 0.20.0 release notes and fix golangci-lint config 2025-10-30 20:39:24 -07:00
Steve Yegge
bea70e1feb Fix golangci-lint config for v3 format (remove version field, rename exclude to exclude-patterns) 2025-10-30 20:26:42 -07:00
Steve Yegge
b0de8d54c2 bd sync: 2025-10-30 20:24:57 2025-10-30 20:24:57 -07:00
Steve Yegge
c41348228b Deprecate sequence-ID collision tests, keep TestFiveCloneCollision for hash-ID multi-clone testing 2025-10-30 20:24:44 -07:00
Steve Yegge
ea44725679 Fix TestTwoCloneCollision: configure git to use merge instead of rebase 2025-10-30 20:02:46 -07:00
Steve Yegge
ca81df93f0 bd sync: 2025-10-30 20:02:40 2025-10-30 20:02:40 -07:00
Steve Yegge
71fc67f4e3 bd sync: 2025-10-30 19:57:06 2025-10-30 19:57:06 -07:00
Steve Yegge
b8c5ca8330 bd sync: 2025-10-30 19:56:03 2025-10-30 19:56:03 -07:00
Steve Yegge
9ab3ffe6f9 bd sync: 2025-10-30 19:53:13 2025-10-30 19:53:13 -07:00
Steve Yegge
e781973736 Update N-way collision tests to use hash-based IDs
- Enable id_mode=hash in all test clones
- Remove expectation of ID collisions (hash IDs prevent this)
- Tests now properly demonstrate that hash IDs eliminate ID conflicts
- Git JSONL merge conflicts still occur but are simpler to resolve
- Related: bd-165 (hash-based ID implementation)

Amp-Thread-ID: https://ampcode.com/threads/T-fe7c6698-371e-467a-a340-ed73f31bff6a
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 19:48:22 -07:00
Steve Yegge
6dbf45c955 Merge PR #182: warn if multiple bd are in PATH
warn if multiple bd are in PATH
2025-10-30 19:39:50 -07:00
Steve Yegge
11c26d5af8 Add substring ID matching for all bd commands
- Enhanced ResolvePartialID to handle:
  - Bare hashes: 07b8c8 → bd-07b8c8
  - Prefix without hyphen: bd07b8c8 → bd-07b8c8
  - Full IDs: bd-07b8c8 (unchanged)
  - Substring matching: 07b → finds bd-07b8c8

- Added RPC support:
  - New OpResolveID operation
  - handleResolveID server handler
  - ResolveID client method

- Updated all commands to resolve IDs:
  - show, update, close, reopen
  - dep (add, remove, tree)
  - label (add, remove, list)

- Works in both daemon and direct modes

Fixes bd-0591c3
2025-10-30 19:20:50 -07:00
Steve Yegge
185c734d75 bd sync: 2025-10-30 19:14:20 2025-10-30 19:14:20 -07:00
Steve Yegge
dacf8de993 Implement daemon registry system (bd-07b8c8)
- Created global daemon registry at ~/.beads/registry.json
- Daemons auto-register on start, unregister on graceful shutdown
- DiscoverDaemons() now uses registry instead of filesystem scan
- Instant daemon discovery (35ms vs indefinite hang)
- Auto-cleanup of stale registry entries
- Full test coverage

Closes bd-07b8c8, bd-acb971c7
2025-10-30 18:37:12 -07:00
Steve Yegge
13fcccb14d bd sync: 2025-10-30 18:37:06 2025-10-30 18:37:06 -07:00
Steve Yegge
cd7bdb301d Generate 6-char hash IDs with progressive 7/8-char fallback on collision (bd-7c87cf24)
- Changed generateHashID to start with 6 chars (3 bytes), expand to 7/8 on collision
- Updated both CreateIssue and CreateIssues (batch) to use progressive length fallback
- Updated tests to accept 9-11 char IDs (bd- + 6-8 hex chars)
- All new issues now generate with shorter, more readable IDs
- Existing 8-char IDs preserved (no migration needed)

Amp-Thread-ID: https://ampcode.com/threads/T-8a6058af-9f42-4bff-be02-8c8bce41eeb5
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 18:16:24 -07:00
Steve Yegge
ba4ad179e0 bd sync: 2025-10-30 17:52:49 2025-10-30 17:52:49 -07:00
Steve Yegge
91cc129b47 bd sync: 2025-10-30 17:47:18 2025-10-30 17:47:18 -07:00
Steve Yegge
7aba8ad79c chore: Bump version to 0.19.1 2025-10-30 17:16:59 -07:00
Steve Yegge
78133d974b bd sync: hash ID migration 2025-10-30 17:16:43 -07:00
Steve Yegge
c48313162b bd sync: 2025-10-30 17:16:37 2025-10-30 17:16:37 -07:00
Steve Yegge
a5f5fcbee5 bd sync: 2025-10-30 17:00:15 2025-10-30 17:00:15 -07:00
Steve Yegge
01e243e3a6 Merge feature/hash-ids into main
Amp-Thread-ID: https://ampcode.com/threads/T-ffbe22bb-92f1-4763-aa5d-1bb84697c866
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 17:00:11 -07:00
Steve Yegge
1fbfe58ba7 Make hash IDs opt-in via id_mode config (bd-5404)
- Add id_mode config (sequential|hash), defaults to sequential
- Update CreateIssue/CreateIssues to check id_mode and generate appropriate IDs
- Implement lazy counter initialization from existing issues
- Update migrate --to-hash-ids to set id_mode=hash after migration
- Fix hash ID tests to set id_mode=hash
- Fix renumber test to use explicit IDs
- All 183 test packages pass

This makes hash IDs backward-compatible opt-in rather than forced default.
2025-10-30 16:50:38 -07:00
Steve Yegge
0858bdb7ed Implement hash ID migration tool (bd-173)
- Add migrate-hash-ids command for converting sequential to hash-based IDs
- Integrate into bd migrate --to-hash-ids for transparent user experience
- Generate hash IDs for top-level issues, hierarchical IDs for children
- Update all references: dependencies, comments, text mentions
- Auto-backup database before migration
- Comprehensive tests covering migration scenarios
- Update AGENTS.md with migration documentation

Amp-Thread-ID: https://ampcode.com/threads/T-492f81db-5b0e-437a-b54d-ae4525dd7827
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 16:28:13 -07:00
Steve Yegge
d348d90cbe bd sync: 2025-10-30 16:23:24 2025-10-30 16:23:24 -07:00
Steve Yegge
ccb4047e03 bd sync: 2025-10-30 15:42:07 2025-10-30 15:42:07 -07:00
Steve Yegge
95fdce967c bd sync: 2025-10-30 15:41:49 2025-10-30 15:41:49 -07:00
Steve Yegge
2eb4c883ab Implement prefix-optional ID parsing (bd-170)
- Add internal/utils/id_parser.go with ParseIssueID and ResolvePartialID
- Update all CLI commands to accept IDs without prefix (e.g., '170' or 'bd-170')
- Add comprehensive tests for ID parsing functionality
- Works in direct mode; RPC handlers to be updated in bd-177

Commands updated:
- show, update, edit, close (show.go)
- reopen (reopen.go)
- dep add/remove/tree (dep.go)
- label add/remove/list (label.go)
- comments (comments.go)

Amp-Thread-ID: https://ampcode.com/threads/T-1f6a301b-b53f-440f-bd79-e453234ac1c9
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 15:41:46 -07:00
Steve Yegge
9876d825a6 bd sync: 2025-10-30 15:21:53 2025-10-30 15:21:53 -07:00
Steve Yegge
3ed2aa07cb Implement hierarchical child ID generation (bd-171)
- Add GetNextChildID to storage interface for generating child IDs
- Implement in SQLiteStorage with atomic counter using child_counters table
- Implement in MemoryStorage with in-memory counter
- Add --parent flag to bd create command
- Support hierarchical IDs (bd-a3f8e9.1, bd-a3f8e9.1.5) in CreateIssue
- Validate parent exists when creating hierarchical issues
- Enforce max depth of 3 levels
- Update ID validation to accept hierarchical IDs with dots
- Add comprehensive tests for child ID generation
- Manual testing confirms: sequential children, nested hierarchies, depth enforcement
2025-10-30 14:42:08 -07:00
Steve Yegge
6c31329ef8 bd sync: 2025-10-30 14:27:40 2025-10-30 14:27:40 -07:00
Steve Yegge
1940357482 bd sync: 2025-10-30 14:27:33 2025-10-30 14:27:33 -07:00
Steve Yegge
edd39ef4a3 Remove polluted issues.jsonl (beads.jsonl is the real database)
Amp-Thread-ID: https://ampcode.com/threads/T-f6b7244f-58ec-4b8b-b54d-fe8b6d59f398
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 14:27:23 -07:00
Steve Yegge
bbe36b6527 bd sync: 2025-10-30 14:24:54 2025-10-30 14:24:54 -07:00
Steve Yegge
e2818b4075 bd sync: 2025-10-30 14:17:17 2025-10-30 14:17:17 -07:00
Steve Yegge
2276d5e428 Implement hash ID generation (bd-168)
- Add generateHashID function with SHA256-based IDs
- Update CreateIssue and CreateIssues to use hash IDs
- Add collision detection with nonce retry logic
- Add comprehensive tests for hash ID generation
- Hash IDs format: prefix-<8 hex chars> (e.g., bd-a3f8e9a2)

Amp-Thread-ID: https://ampcode.com/threads/T-48f75379-427f-4d72-bbc2-42bad0d0d62d
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 14:16:35 -07:00
Steve Yegge
6091e87cd1 Revert "Implement hash ID generation (bd-168)"
This reverts commit 2480316248.
2025-10-30 14:16:24 -07:00
Steve Yegge
2480316248 Implement hash ID generation (bd-168)
- Add generateHashID function with SHA256-based IDs
- Update CreateIssue and CreateIssues to use hash IDs
- Add collision detection with nonce retry logic
- Add comprehensive tests for hash ID generation
- Hash IDs format: prefix-<8 hex chars> (e.g., bd-a3f8e9a2)

Amp-Thread-ID: https://ampcode.com/threads/T-48f75379-427f-4d72-bbc2-42bad0d0d62d
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 14:12:29 -07:00
Steve Yegge
7a1ad14509 bd sync: 2025-10-30 14:12:20 2025-10-30 14:12:20 -07:00
Steve Yegge
6f6f040cf4 bd sync: 2025-10-30 14:04:13 2025-10-30 14:04:13 -07:00
Steve Yegge
2b05ec65f8 Implement 6-char progressive hash IDs (bd-166, bd-167)
- Hash ID generation now returns full 64-char SHA256
- Progressive collision handling: 6→7→8 chars on INSERT failure
- Added child_counters table for hierarchical IDs
- Updated all docs to reflect 6-char design
- Collision math: 97% of 1K issues stay at 6 chars

Next: Implement progressive retry logic in CreateIssue (bd-168)
Amp-Thread-ID: https://ampcode.com/threads/T-9931c1b7-c989-47a1-8e6a-a04469bd937d
Co-authored-by: Amp <amp@ampcode.com>
2025-10-30 14:04:03 -07:00
Steve Yegge
4e12f23470 bd sync: 2025-10-30 14:02:09 2025-10-30 14:02:09 -07:00
matt wilkie
8d86f3f9eb installer(unix): warn when multiple 'bd' executables are on PATH and record install path 2025-10-30 15:57:37 +00:00
matt wilkie
a1ceb0ade0 installer(windows): warn when multiple 'bd' executables are on PATH and record install path 2025-10-30 15:55:43 +00:00
Steve Yegge
a3f2dda482 Clarify prefix-optional CLI design in bd-165 and bd-170
Updated hash ID design to explicitly document hybrid approach:
- Storage: Always use prefix (bd-a3f8e9)
- CLI input: Prefix optional (a3f8e9 or bd-a3f8e9 both work)
- CLI output: Always show prefix (for external clarity)

Rationale:
 External references are unambiguous: "Fixed in bd-a3f8e9"
 CLI convenience: Less typing when using bd commands
 Grep-able: Can search for bd-a3f8e9 across files
 Future-proof: Supports multiple database prefixes
 No conflict with git SHAs in commit messages

Updated issues:
- bd-165: Added "ID Structure" section with prefix behavior
- bd-170: Detailed prefix parsing logic and examples

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 00:33:05 -07:00
Steve Yegge
b078ade2a8 Move collision analysis to docs/ and create bd-191
- Moved collision-resolution-failure-analysis.md to docs/
  (better organization with other architecture docs)

- Created bd-191: Add --parent flag to bd list command
  Useful for listing children of an epic, will be even better
  with hierarchical IDs (bd-165)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 00:27:59 -07:00
Steve Yegge
312af83f63 Update hash ID design to use hierarchical children (bd-165)
Major simplification of the hash ID proposal:
- Remove separate alias system (was adding complexity)
- Add hierarchical sequential children: bd-{hash}.1.2.3
- Up to 3 levels deep for natural work breakdown structure
- Git-style prefix matching instead of #aliases

Benefits:
 Simpler architecture (no alias counter to coordinate)
 Human-friendly IDs where it matters (epic children)
 Natural WBS encoding in IDs
 Collision-free at top level, rare within epics
 -1000 LOC vs dual-system approach

Updated issues:
- bd-165: Core epic with new design doc
- bd-167: child_counters table (not alias table)
- bd-168: hierarchical child ID generation
- bd-169: JSONL format stores hierarchical IDs
- bd-170: Git-style prefix matching (not aliases)
- bd-171: Hierarchical child logic (not alias conflicts)
- bd-173: Migration preserves hierarchy
- bd-174: Tree visualization (not alias commands)
- bd-176: Updated docs plan

Timeline: ~8 weeks (down from 9 due to simplification)

Also added collision-resolution-failure-analysis.md documenting
current architecture issues to inform the redesign.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 00:26:36 -07:00
Steve Yegge
db6dd403ba Add critical warning: solo workflows only until 1.0.0 2025-10-29 23:50:04 -07:00