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
This commit is contained in:
Steve Yegge
2025-10-30 14:42:08 -07:00
parent 6c31329ef8
commit 3ed2aa07cb
6 changed files with 319 additions and 13 deletions

View File

@@ -65,6 +65,9 @@ type Storage interface {
GetJSONLFileHash(ctx context.Context) (string, error)
SetJSONLFileHash(ctx context.Context, fileHash string) error
// ID Generation
GetNextChildID(ctx context.Context, parentID string) (string, error)
// Config
SetConfig(ctx context.Context, key, value string) error
GetConfig(ctx context.Context, key string) (string, error)