- 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>
- 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
- 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>
- 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.
- 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>
- 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
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>
- 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>
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>