Commit Graph

4282 Commits

Author SHA1 Message Date
Steve Yegge
302964b0f6 bd sync: 2025-12-28 21:31:23 2025-12-28 21:31:23 -08:00
Steve Yegge
2b8d9bc751 bd sync: 2025-12-28 21:28:27 2025-12-28 21:28:27 -08:00
Steve Yegge
a1ac42aca9 feat: add bd swarm status command (bd-5x0j)
Show current swarm status computed from beads:
- Completed: closed issues with timestamps
- Active: in_progress issues with assignees
- Ready: open issues with all deps satisfied
- Blocked: open issues waiting on deps
- Progress percentage

State is COMPUTED from beads, not stored separately.
Supports --json for programmatic use.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 21:28:14 -08:00
Steve Yegge
7ff5481966 fix: resolve golangci-lint errors (errcheck, gosec, unparam)
- orphans.go: check fmt.Scanln return value
- edit.go: #nosec G204 for trusted $EDITOR execution
- sync_git.go: #nosec G204 for git commands with internal branch names
- worktree_cmd.go: #nosec G304/G306 for .gitignore file operations
- migrations: handle rows.Close() error
- doctor_pollution.go: mark unused path parameter

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 20:50:54 -08:00
Jordan Hubbard
713c569e6e test: add git helper and guard annotations 2025-12-28 20:48:37 -08:00
Steve Yegge
f3dcafca66 feat: Add mol_type schema field for molecule type classification (bd-oxgi)
Add mol_type field to beads for swarm coordination:
- Values: 'swarm' (multi-polecat), 'patrol' (recurring ops), 'work' (default)
- Nullable, defaults to empty string (treated as 'work')

Changes:
- Add mol_type column to SQLite schema and migration 031
- Add MolType type with IsValid() validation in types.go
- Update insertIssue/GetIssue to handle mol_type
- Add --mol-type flag to create command
- Add mol_type filtering to list and ready commands
- Update RPC protocol for daemon mode support
- Update test schema in migrations_test.go

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:52:51 -08:00
Steve Yegge
77ba8f3d10 feat: Add bd swarm validate command (bd-nkqx)
Adds validation of epic structure for swarm execution:
- Computes ready fronts (waves of parallel work)
- Detects structural issues (cycles, orphans, missing deps)
- Reports estimated worker-sessions and max parallelism
- Warns about potential dependency inversions
- Returns exit code for CI integration

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 19:35:28 -08:00
Steve Yegge
27101a4f57 bd sync: 2025-12-28 19:04:53 2025-12-28 19:04:53 -08:00
Steve Yegge
8ed12091ab bd sync: code review round 2 issues 2025-12-28 19:00:43 -08:00
Steve Yegge
36ae647599 bd sync: 2025-12-28 19:00:28 2025-12-28 19:00:28 -08:00
Steve Yegge
b5beedbeda bd sync: 2025-12-28 18:45:30 2025-12-28 18:45:30 -08:00
Steve Yegge
6c14fd2225 refactor: Split large cmd/bd files to meet 800-line limit (bd-xtf5)
Split 6 files exceeding 800 lines by extracting cohesive function groups:

- show.go (1592→578): extracted show_thread.go, close.go, edit.go, update.go
- doctor.go (1295→690): extracted doctor_fix.go, doctor_health.go, doctor_pollution.go
- sync.go (1201→749): extracted sync_git.go
- compact.go (1199→775): extracted compact_tombstone.go, compact_rpc.go
- linear.go (1190→641): extracted linear_sync.go, linear_conflict.go
- main.go (1148→800): extracted main_help.go, main_errors.go, main_daemon.go

All files now under 800-line acceptance criteria.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:43:09 -08:00
Steve Yegge
7ea7aee411 refactor: Split init.go from 1928 to 705 lines (bd-xtf5)
Extract init.go into multiple focused files:

- init_git_hooks.go: Git hooks installation and merge driver setup (~480 lines)
- init_stealth.go: Stealth mode and fork/exclude configuration (~310 lines)
- init_agent.go: AGENTS.md and Claude settings setup (~170 lines)
- init_templates.go: config.yaml and README.md templates (~180 lines)

This reduces init.go from 1928 lines to 705 lines, meeting the <800 line target.
Each extracted file handles a cohesive set of functionality.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:43:09 -08:00
Steve Yegge
f7dd2eaa8c bd sync: 2025-12-28 Close bd-9btu, bd-kkka 2025-12-28 18:43:09 -08:00
Steve Yegge
2960a46913 bd sync: 2025-12-28 Close bd-1tkd 2025-12-28 18:42:51 -08:00
Steve Yegge
d4c55639ea refactor: Remove deprecated fetchAndRebaseInWorktree (bd-kkka)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 18:42:51 -08:00
Steve Yegge
1cdece372a bd sync: 2025-12-28 16:41:41 2025-12-28 16:41:49 -08:00
Steve Yegge
715631bcaa bd sync: 2025-12-28 16:41:33 2025-12-28 16:41:49 -08:00
Steve Yegge
9dda75ef15 docs: Document deprecation timeline and add removal warnings (bd-pndo)
- Add Deprecated section to CHANGELOG.md listing all deprecated commands
- Set removal target: v1.0.0 for all deprecated commands
- Add '(will be removed in v1.0.0)' to all deprecation messages
- Add proper Deprecated field to admin_aliases.go (cleanup, compact, reset)
- Remove manual warning prints from admin aliases (Cobra handles it)

Deprecated commands documented:
- bd relate/unrelate → bd dep relate/unrelate
- bd daemons → bd daemon <subcommand>
- bd cleanup/compact/reset → bd admin <command>
- bd comment → bd comments add
- bd template* → bd mol/formula commands
- bd detect-pollution → bd doctor --check=pollution
- bd migrate-* → bd migrate <subcommand>

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:43 -08:00
Steve Yegge
2e7562e77b bd sync: 2025-12-28 Close bd-5l59 2025-12-28 16:40:42 -08:00
Steve Yegge
ff264c29d2 refactor: Organize Issue struct with section comments (bd-5l59)
Group 50+ fields into 15 logical sections with clear separators:
- Core Identification (ID, ContentHash)
- Issue Content (Title, Description, Design, AcceptanceCriteria, Notes)
- Status & Workflow (Status, Priority, IssueType)
- Assignment (Assignee, EstimatedMinutes)
- Timestamps (CreatedAt, CreatedBy, UpdatedAt, ClosedAt, CloseReason)
- External Integration (ExternalRef)
- Compaction Metadata
- Internal Routing (not exported)
- Relational Data (Labels, Dependencies, Comments)
- Tombstone Fields (soft-delete)
- Messaging Fields (inter-agent communication)
- Context Markers (Pinned, IsTemplate)
- Bonding Fields (compound molecule lineage)
- HOP Fields (entity tracking)
- Gate Fields (async coordination)
- Source Tracing Fields
- Agent Identity Fields

All tests pass, JSON serialization unchanged.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:41 -08:00
Steve Yegge
ad443c3af1 bd sync: 2025-12-28 Close bd-1tkd 2025-12-28 16:40:34 -08:00
Steve Yegge
2d92b452c9 refactor: Extract hashFieldWriter to reduce ComputeContentHash repetition (bd-1tkd)
- Created hashFieldWriter struct with typed helper methods
- Methods: str, int, strPtr, float32Ptr, duration, flag, entityRef
- Reduced ~100 lines of repetitive h.Write() patterns to ~55 lines
- All hash tests pass, output unchanged (backwards compatible)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:33 -08:00
Steve Yegge
e6ff1e89f0 refactor: Remove deprecated fetchAndRebaseInWorktree (bd-kkka)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:40:26 -08:00
Steve Yegge
7ffcfe5e53 Merge Nux polecat work (bd-9btu, bd-9hc9, bd-lrj8, bd-8zbo) 2025-12-28 16:39:46 -08:00
Steve Yegge
1bb61c5ffe refactor: Break up 275-line runCook into focused helpers (bd-8zbo)
Extracted 5 helper functions from the monolithic runCook function:

- parseCookFlags: Parse and validate command-line flags (~40 lines)
- loadAndResolveFormula: Parse, resolve, apply transformations (~60 lines)
- outputCookDryRun: Display dry-run preview (~60 lines)
- outputCookEphemeral: Output resolved formula as JSON (~30 lines)
- persistCookFormula: Create proto bead in database (~45 lines)

Main runCook function reduced from ~275 to ~65 lines with clear flow:
1. Parse flags → 2. Validate store → 3. Load formula
4. Extract metadata → 5. Handle mode (dry-run/ephemeral/persist)

Benefits:
- Each helper is single-responsibility and testable
- Added cookFlags struct for type-safe flag passing
- Error handling uses proper error returns instead of os.Exit
- Clear separation of concerns

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:37:30 -08:00
Steve Yegge
27de61fbd0 chore: Convert scattered TODOs to tracked issues (bd-lrj8)
Created 7 new beads to track TODOs that were previously inline comments:

- bd-7l27: Integrate migration detection into bd doctor (5 files)
- bd-6x6g: Add multi-repo target repo switching in bd create
- bd-ag35: Add daemon RPC endpoints for config and stale check
- bd-2dwo: Remove deprecated daemon logger function
- bd-0qx5: Implement Jira issue timestamp comparison for sync
- bd-7zka: Implement formula features (repeat, for_each, branch, gate, split)
- bd-h048: Refactor sync_test to use direct import logic

Updated 16 TODO comments to include bead ID references for tracking.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:34:24 -08:00
Steve Yegge
dedf5cfe92 bd sync: closed bd-9hc9 after refactoring autoflush.go 2025-12-28 16:23:54 -08:00
Steve Yegge
efb56e9dd8 refactor: Break up 280-line flushToJSONLWithState into focused helpers (bd-9hc9)
Extracted 8 helper functions from the monolithic flushToJSONLWithState:

- recordFlushFailure/recordFlushSuccess: Failure tracking and counter management
- readExistingJSONL: Parse existing JSONL file for incremental merging
- fetchAndMergeIssues: Fetch dirty issues from DB and merge into map
- filterWisps: Remove ephemeral (wisp) issues from export
- filterByMultiRepoPrefix: Multi-repo prefix filtering for non-primary repos
- updateFlushExportMetadata: Store hashes and timestamps after export
- getIssuesToExport: Determine full vs incremental export issue list

Main function now reads as a clear pipeline:
1. Validate integrity -> 2. Get issues -> 3. Read existing JSONL
4. Merge from DB -> 5. Filter wisps -> 6. Filter by prefix
7. Write atomically -> 8. Update metadata

Benefits:
- Each helper is single-responsibility and testable
- Main function reduced from ~280 to ~94 lines
- Logic is clearly separated and documented
- Easier to understand and maintain

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:23:45 -08:00
Steve Yegge
5d540c4385 bd sync: 2025-12-28 16:18:10 2025-12-28 16:18:10 -08:00
Steve Yegge
40b65b8dbe bd sync: closed bd-9btu after refactoring cook.go 2025-12-28 16:15:33 -08:00
Steve Yegge
1d4eb6d94c refactor: Consolidate duplicated step collection functions in cook.go (bd-9btu)
Replaced three near-identical functions with a single unified collectSteps()
that uses a callback strategy for label handling:

- Removed collectStepsRecursive() (DB version)
- Removed collectStepsToSubgraph() (in-memory version)
- Removed collectStepIDMappings() (now handled by unified function)

The new collectSteps() function:
- Takes optional labelHandler callback for DB path (extracts labels separately)
- Takes optional issueMap for in-memory path
- Always builds idMapping for dependency resolution
- Eliminates ~60 lines of duplicated code

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 16:15:17 -08:00
Steve Yegge
09876fff99 bd sync: 2025-12-28 16:02:46 2025-12-28 16:02:46 -08:00
Steve Yegge
7f950eeabd bd sync: 2025-12-28 15:42:33 2025-12-28 15:42:46 -08:00
Steve Yegge
f459f8ef7f refactor: Extract stepTypeToIssueType helper to remove duplicated switch (bd-j3dj)
Extracted duplicated switch statement for mapping step type strings to
types.IssueType into a single helper function. This removes code
duplication between collectStepsToSubgraph() and collectStepsRecursive().

The new stepTypeToIssueType() function:
- Converts 'task', 'bug', 'feature', 'epic', 'chore' to types
- Returns types.TypeTask for empty or unrecognized types
- Used by both functions with children-override-to-epic logic preserved
2025-12-28 15:42:24 -08:00
Steve Yegge
167e9a18bc bd sync: 2025-12-28 15:38:09 2025-12-28 15:38:09 -08:00
Steve Yegge
d70d669e76 bd sync: 2025-12-28 15:33:10 2025-12-28 15:33:10 -08:00
Steve Yegge
5e99b68863 bd sync: 2025-12-28 13:52:31 2025-12-28 14:00:14 -08:00
Steve Yegge
0f008d3979 docs: Add components overview explaining CLI vs Plugin vs MCP
Clarifies the relationship between bd CLI, Claude Code Plugin,
and MCP server. Most users only need the CLI.

Closes #782

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 14:00:05 -08:00
Steve Yegge
274f53514a docs: Add installation method comparison table
Clarifies trade-offs between Homebrew, npm, script, go install,
and source builds. Homebrew is recommended as the default.

Closes #779

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:56:31 -08:00
Steve Yegge
135802f1aa Consolidate CLI commands to reduce top-level surface area
- migrate-* commands → subcommands of `bd migrate`
- relate/unrelate → subcommands of `bd dep`
- daemons subcommands → available under `bd daemon`
- comment alias → hidden with deprecation warning

All old commands still work with deprecation warnings for backwards
compatibility. Reduces visible top-level commands from ~73 to 66.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 13:52:21 -08:00
Zack Rosen
5ccf12ea57 fix: update perles community tool description (#778)
Perles is built using Go not Node.js this got mixed up in the recent
migration to the community tools page. Also slights changes to the tools
description.
2025-12-28 12:52:29 -08:00
Steve Yegge
b2c60e7d1e bd sync: 2025-12-28 10:59:19 2025-12-28 10:59:48 -08:00
Steve Yegge
6f00e48295 Release v0.40.0
New commands and features:
- bd worktree for parallel development
- bd slot commands for agent bead slot management
- bd agent state for ZFC-compliant state reporting
- bd doctor --deep for full graph integrity validation
- Agent bead support (type=agent, type=role, migration 030)
- Computed .parent field in JSON output
- Auto-bypass daemon for wisp operations
- Pour warning for vapor-phase formulas

Performance:
- O(2^n) → O(V+E) cycle detection (GH#775)

Fixes:
- Import hash mismatch warnings
- Test updates for version tracking thresholds
- Migration test updated for new agent schema fields

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:59:02 -08:00
Steve Yegge
d8ef771a28 Improve activity feed with title and assignee context
Now shows:
- Truncated title (40 chars max) after issue ID
- Assignee with @ prefix when present
- Format: 'bd-xxx completed · Title here... @assignee'

Also changed 'in_progress' to 'started' for cleaner output.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:06:08 -08:00
Steve Yegge
f46cc2e798 chore: remove issue ID references from comments and changelogs
Strip (bd-xxx), (gt-xxx) suffixes from code comments and changelog
entries. The descriptions remain meaningful without the ephemeral
issue IDs.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-28 10:05:16 -08:00
Steve Yegge
b4deb96924 Merge pull request #772 from StreamlinedStartup/patch-1
Update references to WORKFLOWS.md in SKILL.md
2025-12-28 09:57:15 -08:00
Steve Yegge
568f3bbd5a Merge pull request #776 from maphew/community-tools
docs: consolidate community tools into dedicated page
2025-12-28 09:50:05 -08:00
Steve Yegge
98bd46104e Merge pull request #775 from peterkc/fix/cycle-detection-performance
perf(sqlite): replace O(2^n) cycle detection with O(V+E) DFS
2025-12-28 09:37:08 -08:00
matt wilkie
ac2a2e900e consolidate community tools into dedicated docs page
- Create docs/COMMUNITY_TOOLS.md with curated list of community-built tools ranked by activity
- Include tools from README.md and GitHub discussion #276
- Organize into categories: Terminal UIs, Web UIs, Editor Extensions, Native Apps, Historical
- Update README.md to reference the new dedicated page
2025-12-28 08:05:32 -07:00