Steve Yegge
631c9236e7
Resolve merge conflict in beads.jsonl
...
Amp-Thread-ID: https://ampcode.com/threads/T-fc47ce9d-88a4-4bcd-b9cb-79327d98dee7
Co-authored-by: Amp <amp@ampcode.com >
2025-11-20 19:08:23 -05:00
Steve Yegge
8e05847d31
Fix TestRoutingIntegration and improve DetectUserRole robustness
...
Amp-Thread-ID: https://ampcode.com/threads/T-fc47ce9d-88a4-4bcd-b9cb-79327d98dee7
Co-authored-by: Amp <amp@ampcode.com >
2025-11-20 19:04:42 -05:00
Steve Yegge
7b865eb541
Remove legacy issues.jsonl and update defaults to beads.jsonl
...
Amp-Thread-ID: https://ampcode.com/threads/T-ae11b392-24b5-4060-b431-606dd81c1763
Co-authored-by: Amp <amp@ampcode.com >
2025-11-20 19:00:36 -05:00
Ryan
f7e80dd80c
feat: add context optimization features for AI agents ( #297 )
...
* feat: add bd prime and setup commands for AI agent integration
This commit consolidates context optimization features for AI agents:
## New Commands
**bd prime** - AI-optimized workflow context injection
- Outputs ~1-2k tokens of workflow context
- Context-aware: adapts to MCP vs CLI mode
- MCP mode: minimal reminders (~500 tokens)
- CLI mode: full command reference (~1-2k tokens)
- Warns against TodoWrite tool and markdown TODOs
- Designed for SessionStart/PreCompact hooks
**bd setup claude** - Claude Code integration installer
- Installs hooks via JSON configuration (not file scripts)
- Supports --project for project-only installation
- Supports --check to verify installation
- Supports --remove to uninstall hooks
- Idempotent (safe to run multiple times)
- Merges with existing settings
**bd setup cursor** - Cursor IDE integration installer
- Creates .cursor/rules/beads.mdc with workflow rules
- Simplified implementation (just overwrites file)
## bd doctor Enhancements
- New: CheckClaude() verifies Claude Code integration
- Detects plugin, MCP server, and hooks installation
- Provides actionable fix suggestions
- Extracted legacy pattern detection to doctor/legacy.go
- Detects JSONL-only mode and warns about legacy issues.jsonl
## Core Improvements
- FindBeadsDir() utility for cross-platform .beads/ discovery
- Works in JSONL-only mode (no database required)
- Sorted noDbCommands alphabetically (one per line for easy diffs)
## Testing
- Unit tests for setup command hook manipulation
- Tests for idempotency, adding/removing hooks
- All tests passing
## Documentation
- cmd/bd/doctor/claude.md - Documents why beads doesn't use Claude Skills
- commands/prime.md - Slash command for bd prime
- Fixed G304 gosec warnings with nosec comments
## Token Efficiency
The bd prime approach reduces AI context usage dramatically:
- MCP mode: ~500 tokens (vs ~10.5k for full MCP tool scan)
- CLI mode: ~1-2k tokens
- 80-99% reduction in standing context overhead
* fix: resolve linting errors in setup utils and remove obsolete test
- Add error check for tmpFile.Close() in setup/utils.go to fix golangci-lint G104
- Remove TestCheckMultipleJSONLFiles test that referenced deleted checkMultipleJSONLFiles function
Fixes golangci-lint errcheck violations introduced in the bd prime/setup feature.
2025-11-12 10:48:36 -08:00
Steve Yegge
3191c9c3da
Remove vc.db exclusion from FindDatabasePath filter
...
Only filter out backup files, allow vc.db to be a valid database
Amp-Thread-ID: https://ampcode.com/threads/T-8600ed89-42af-4785-b5dc-01ad37f1451d
Co-authored-by: Amp <amp@ampcode.com >
2025-11-07 14:55:01 -08:00
Steve Yegge
ca5e32e5f2
Remove commented-out code
...
Cleaned up old bd-160 export hash tracking code that was disabled.
Removed unnecessary test comments.
Amp-Thread-ID: https://ampcode.com/threads/T-de38a626-a425-414f-92d8-102bc1519c8b
Co-authored-by: Amp <amp@ampcode.com >
2025-11-06 20:15:34 -08:00
Steve Yegge
11fa142539
Optimize test suite with testing.Short() guards
...
- Add Short() guards to slow CLI tests (2-4s each)
- Add Short() guards to slow API/integration tests (3-11s)
- Add Short() guard to hanging daemon discovery test (29s timeout)
- Short test suite now runs in ~6s (down from 5+ minutes)
Run 'go test -short ./...' for fast iteration
Run 'go test ./...' for full coverage
Closes: bd-iov0
2025-11-06 17:31:15 -08:00
Steve Yegge
584c266684
Reorganize project structure: move Go files to internal/beads, docs to docs/
...
Amp-Thread-ID: https://ampcode.com/threads/T-7a71671d-dd5c-4c7c-b557-fa427fceb04f
Co-authored-by: Amp <amp@ampcode.com >
2025-11-05 21:04:00 -08:00