Commit Graph

2282 Commits

Author SHA1 Message Date
Steve Yegge
ebf6e36b31 bd sync: apply DB changes after import 2025-11-23 21:59:16 -08:00
Steve Yegge
a930fa35ac Refactor AGENTS.md: condense event-driven daemon section
Move detailed event-driven daemon documentation to docs/DAEMON.md.
Keep only brief mention in AGENTS.md with reference to full docs.
Reduces duplication and improves documentation organization.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:58:51 -08:00
Steve Yegge
62b5f5357f Add comprehensive error handling guidelines documentation 2025-11-23 21:54:08 -08:00
Steve Yegge
82b64e205c bd sync: 2025-11-23 21:54:01 2025-11-23 21:54:01 -08:00
Steve Yegge
bddc4a3d21 bd sync: apply DB changes after import 2025-11-23 21:52:14 -08:00
Steve Yegge
9e6a1b8af8 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:51:58 -08:00
Steve Yegge
4c483ae112 bd sync: 2025-11-23 21:51:52 2025-11-23 21:51:52 -08:00
Steve Yegge
7da626ca94 bd sync: apply DB changes after import 2025-11-23 21:49:07 -08:00
Steve Yegge
3804aa616f Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:49:07 -08:00
Steve Yegge
bcf7650c2c bd sync: 2025-11-23 21:49:06 2025-11-23 21:49:06 -08:00
Steve Yegge
3ef55ffc28 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:48:58 -08:00
Steve Yegge
3afafeff6f bd sync: 2025-11-23 21:48:58 2025-11-23 21:48:58 -08:00
Steve Yegge
1c715bc61c Fix bd-fwul: Add executable bit validation for git hooks
Added validation to hooksInstalled() to check if hook files have the
executable bit set. Previously we only checked for file existence and
marker strings, which meant hooks could appear installed but fail
silently if they weren't executable.

The fix adds Mode().Perm() & 0111 checks for both pre-commit and
post-merge hooks after verifying their content.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:48:54 -08:00
Steve Yegge
cf84eb85e1 removed artifact 2025-11-23 21:46:38 -08:00
Steve Yegge
5c7b1fa2d8 bd sync: apply DB changes after import 2025-11-23 21:46:22 -08:00
Steve Yegge
0711cd2aab Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:46:22 -08:00
Steve Yegge
d1c4c857a1 bd sync: 2025-11-23 21:46:21 2025-11-23 21:46:21 -08:00
Steve Yegge
344a3542e3 Merge remote changes
Resolved .beads/beads.jsonl conflict

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:43:24 -08:00
Steve Yegge
3369997a11 bd sync: apply DB changes after import 2025-11-23 21:42:50 -08:00
Steve Yegge
f77dc46e76 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:42:49 -08:00
Steve Yegge
d4f9a05bb2 Fix bd-pq5k: merge conflicts now prefer closed>open and deletion>modification
CHANGES:
1. Merge logic (internal/merge/merge.go):
   - Added mergeStatus() enforcing closed ALWAYS wins over open
   - Fixed closed_at handling: only set when status='closed'
   - Changed deletion handling: deletion ALWAYS wins over modification

2. Deletion tracking (cmd/bd/snapshot_manager.go):
   - Updated ComputeAcceptedDeletions to accept all merge deletions
   - Removed "unchanged locally" check (deletion wins regardless)

3. FK constraint helper (internal/storage/sqlite/util.go):
   - Added IsForeignKeyConstraintError() for bd-koab
   - Detects FK violations for graceful import handling

TESTS UPDATED:
- TestMergeStatus: comprehensive status merge tests
- TestIsForeignKeyConstraintError: FK constraint detection
- bd-pq5k test: validates no invalid state (status=open with closed_at)
- Deletion tests: reflect new deletion-wins behavior
- All tests pass ✓

This ensures issues never get stuck in invalid states and prevents
the insane situation where issues never die!

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:42:43 -08:00
Steve Yegge
60daea911d bd sync: 2025-11-23 21:42:36 2025-11-23 21:42:36 -08:00
Steve Yegge
64b54ce2bb Remove empty issues.jsonl file
Only beads.jsonl is used in this repo. The empty issues.jsonl was
causing doctor warnings.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:39:50 -08:00
Steve Yegge
d82cf0549a bd sync: apply DB changes after import 2025-11-23 21:38:39 -08:00
Steve Yegge
23f5c8f117 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:38:38 -08:00
Steve Yegge
39ce09172d bd sync: 2025-11-23 21:38:37 2025-11-23 21:38:37 -08:00
Steve Yegge
42430ea32e bd sync: 2025-11-23 21:37:58 2025-11-23 21:37:58 -08:00
Steve Yegge
0836575d9a Export clean JSONL after conflict resolution 2025-11-23 21:37:54 -08:00
Steve Yegge
9e9f9bc338 bd sync: 2025-11-23 21:37:19 2025-11-23 21:37:41 -08:00
Steve Yegge
f454b3dd1d Increase daemon log rotation limits for production use
- Max size: 10MB → 50MB per file
- Max backups: 3 → 7 files
- Max age: 7 → 30 days
- Updated tests and documentation

Resolves bd-t7ds

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:33:00 -08:00
Steve Yegge
278d90bc97 bd sync: apply DB changes after import 2025-11-23 21:31:18 -08:00
Steve Yegge
6924f417c3 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:31:18 -08:00
Steve Yegge
229918970a bd sync: 2025-11-23 21:31:17 2025-11-23 21:31:17 -08:00
Steve Yegge
b428254f89 Fix bd-1rh: remove invalid closed_at for open status 2025-11-23 21:30:40 -08:00
Steve Yegge
5fdbd7785a Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:29:25 -08:00
Steve Yegge
cb604da09c bd sync: 2025-11-23 21:28:33 2025-11-23 21:28:33 -08:00
Steve Yegge
aa2df73f6d Merge web-ui: UX improvements to monitor-webui example
- Interactive stats cards as filters
- Multi-select priority filtering with P0 support
- Find-as-you-type search
- Modern card-based UI design
- Better mobile responsiveness
- Dev mode flag for easier development

Co-authored-by: matt wilkie <maphew@gmail.com>
2025-11-23 21:27:21 -08:00
Steve Yegge
035a0c7e66 bd sync: 2025-11-23 21:26:05 2025-11-23 21:26:05 -08:00
Steve Yegge
c969252bf1 bd sync: 2025-11-23 21:24:48 2025-11-23 21:24:48 -08:00
Steve Yegge
21893ed148 bd sync: 2025-11-23 21:21:48 2025-11-23 21:21:48 -08:00
Steve Yegge
342073098d bd sync: 2025-11-23 21:15:55 2025-11-23 21:20:32 -08:00
Steve Yegge
6e97b08b7d Update bd JSONL after rebase 2025-11-23 21:19:24 -08:00
Steve Yegge
ae5a4ac6ea Add security tests for WriteFile permissions in doctor command
Resolves bd-ee1: Add security tests for WriteFile permissions in doctor command

Added comprehensive security tests for the FixGitignore function to verify:
- Files are created with 0600 permissions (secure, owner-only read/write)
- Existing files with insecure permissions are fixed
- Read-only files can be updated (permissions fixed first)
- File ownership is correct
- Permissions are enforced even on systems that respect umask

Also improved FixGitignore implementation to:
- Handle read-only files by fixing permissions before writing
- Explicitly set permissions after write to ensure 0600 regardless of umask
- Maintain secure permissions throughout the operation

Tests verify the gosec G306 security concern is properly addressed.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-23 21:19:14 -08:00
Steve Yegge
4f15e66599 bd sync: apply DB changes after import 2025-11-23 21:16:33 -08:00
Steve Yegge
6f90fe4a2d Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:16:32 -08:00
Steve Yegge
732c23c608 bd sync: 2025-11-23 21:16:31 2025-11-23 21:16:31 -08:00
Steve Yegge
9e16469b2e Implement BD_GUIDE.md generation for version-stamped documentation (bd-woro)
This implements the ability to separate bd-specific instructions from
project-specific instructions by generating a canonical BD_GUIDE.md file.

## Changes

1. Added `--output` flag to `bd onboard` command
   - Generates version-stamped BD_GUIDE.md at specified path
   - Includes both agentsContent and copilotInstructionsContent
   - Auto-generated header warns against manual editing

2. Version tracking integration
   - checkAndSuggestBDGuideUpdate() detects outdated BD_GUIDE.md
   - Suggests regeneration when bd version changes
   - Integrated with maybeShowUpgradeNotification()

3. Comprehensive test coverage
   - Tests for BD_GUIDE.md generation
   - Tests for version stamp validation
   - Tests for content inclusion

4. Documentation updates
   - Updated AGENTS.md with BD_GUIDE.md workflow
   - Added regeneration instructions to upgrade workflow

## Benefits

- Clear separation of concerns (bd vs project instructions)
- Deterministic updates (no LLM involved)
- Git-trackable diffs show exactly what changed
- Progressive disclosure (agents read when needed)

## Usage

\`\`\`bash
# Generate BD_GUIDE.md
bd onboard --output .beads/BD_GUIDE.md

# After upgrading bd
bd onboard --output .beads/BD_GUIDE.md  # Regenerate
\`\`\`

Closes bd-woro
2025-11-23 21:16:09 -08:00
Steve Yegge
2637a7bde0 bd sync: apply DB changes after import 2025-11-23 21:12:08 -08:00
Steve Yegge
b9531d4cf3 Merge branch 'main' of https://github.com/steveyegge/beads 2025-11-23 21:12:08 -08:00
Steve Yegge
0e0dc3a753 bd sync: 2025-11-23 21:12:07 2025-11-23 21:12:07 -08:00