Commit Graph

18 Commits

Author SHA1 Message Date
Ryan Snodgrass
6ca141712c refactor(ui): standardize on lipgloss semantic color system
Replace all fatih/color usages with internal/ui package that provides:
- Semantic color tokens (Pass, Warn, Fail, Accent, Muted)
- Adaptive light/dark mode support via Lipgloss AdaptiveColor
- Ayu theme colors for consistent, accessible output
- Tufte-inspired data-ink ratio principles

Files migrated: 35 command files in cmd/bd/

Add docs/ui-philosophy.md documenting:
- Semantic token usage guidelines
- Light/dark terminal optimization rationale
- Tufte and perceptual UI/UX theory application
- When to use (and not use) color in CLI output
2025-12-20 17:09:50 -08:00
Charles P. Cross
cb59bb3ec8 fix(ci): resolve lint and test failures
Fix two CI failures that were blocking main:

1. Lint error in cmd/bd/onboard.go:126
   - Unchecked fmt.Fprintf return value
   - Fixed by explicitly ignoring with _, _

2. Test failures in internal/storage/sqlite
   - TestCreateIssues/duplicate_ID_error was passing but
     TestCreateIssuesRollback/rollback_on_conflict_with_existing_ID failed
   - Root cause: CreateIssues used INSERT OR IGNORE which silently
     ignored duplicate IDs instead of returning an error
   - Fixed by adding duplicate ID detection in EnsureIDs():
     a) Check for duplicates within the batch
     b) Check for conflicts with existing database IDs

Both fixes are minimal and targeted to unblock CI.
2025-12-18 17:45:49 -05:00
Steve Yegge
125e36d529 refactor(onboard): simplify to minimal snippet pointing to bd prime
bd onboard now outputs a ~10 line snippet for AGENTS.md that points to
"bd prime" for full workflow context. This replaces the previous ~200
line static content that:

- Bloated AGENTS.md with instructions that loaded every session
- Got stale when bd was upgraded
- Wasted tokens when beads was not actively being used

The new approach:
- AGENTS.md gets minimal pointer (~20 tokens vs ~2000)
- bd prime provides dynamic, always-current workflow details
- Hooks auto-inject bd prime at session start

Also removes the --output flag for BD_GUIDE.md generation (obsolete).

Closes bd-gxq
Addresses GH#604

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-18 11:48:02 -08:00
Steve Yegge
a7bfb3a6cf feat: Add dependency direction guidance to onboard
Adds "Dependencies: Think Needs, Not Before" section with the
WRONG/RIGHT example pair to help agents avoid the temporal
language trap that inverts dependency direction.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:46:46 -08:00
Steve Yegge
125cfafe7f feat: Add self-contained issue writing guidance to onboard
Adds a "Writing Self-Contained Issues" section to the onboarding output
that instructs AI agents to create fully context-independent issues.
Includes required elements (summary, files, steps, examples) and shows
good vs bad examples.

Closes #618

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-17 18:34:23 -08:00
Tim Haasdyk
07c97a2b74 fix: make bd onboard output generic, not beads-specific (#465)
The copilotInstructionsContent in onboard.go contained content specific to
developing the beads project itself (Go tech stack, SQLite, Cobra, project
structure, release scripts, etc.). This content doesn't make sense when
running bd onboard in other repositories that use bd for issue tracking.

Removed:
- Tech Stack section (Go, SQLite, Cobra, etc.)
- Coding Guidelines section (beads development instructions)
- Project Structure section (beads directory tree)
- Scripts section (bump-version.sh, release.sh, etc.)
- Key Documentation section (beads-specific docs)
- Beads-specific rules (BEADS_DB testing, test issues in production DB)

Kept:
- All bd command examples and workflow (unchanged)
- Priorities and issue types
- MCP server instructions
- Generic rules applicable to any project using bd

The beads repo's own .github/copilot-instructions.md is manually maintained
and still contains the beads-specific development instructions.
2025-12-05 13:20:51 -08:00
Steve Yegge
3f609267d4 fix: doctor deletions check and onboard docs improvements
- Fix doctor to treat empty deletions.jsonl as valid (0 entries OK status)
- Fix HydrateDeletionsManifest to create empty file when no deletions found
- Add --parent flag documentation to onboard command
- Add CLI --help tip throughout onboard documentation

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 13:23:14 -08:00
Steve Yegge
76e3f27eb0 fix: CI test failures and lint errors
- Fixed test file naming: issues.jsonl -> beads.jsonl
  - beads_test.go: Update expected path in TestFindJSONLPath
  - internal/beads/beads_test.go: Update TestFindJSONLPathDefault
  - cmd/bd/main_test.go: Update TestAutoFlushJSONLContent

- Fixed lint errors (gosec):
  - G304: Added nosec comments for file operations with user-provided paths
  - G204: Added nosec comment for subprocess with controlled binary path

- Fixed lint errors (errcheck):
  - cmd/bd/test_wait_helper.go: Acknowledge error return values with _
  - cmd/bd/onboard.go: Handle fmt.Fprintf error return

All tests passing locally. All lint checks passing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-24 00:21:01 -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
605fff151e feat: Add GitHub Copilot support with .github/copilot-instructions.md
Addresses GH #298 - GitHub Copilot inconsistently interpreting AGENTS.md

Changes:
- Create .github/copilot-instructions.md (132 lines, Copilot-optimized)
- Update AGENTS.md with prominent Copilot callout
- Enhance bd onboard command to generate copilot-instructions.md

Architecture: Two-file approach for different AI agents
- AGENTS.md (626 lines): Comprehensive guide for all AI agents
- .github/copilot-instructions.md (132 lines): Concise, auto-loaded for Copilot

Note: Untested with GitHub Copilot yet. Feedback from Copilot users welcome!

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-21 20:52:18 -05:00
Codex Agent
070107caee Handle formatting errors in onboard renderer 2025-11-17 11:32:37 -07:00
Codex Agent
4e222145ac Fix onboard test deadlock on Windows 2025-11-17 11:26:59 -07:00
Steve Yegge
86c645603e Fix all gosec, misspell, and unparam linter errors
- Add #nosec directives with explanations for all gosec warnings in worktree operations
- Tighten directory permissions from 0755 to 0750 for better security
- Fix misspellings: archaeological -> archeological, cancelled -> canceled
- Remove unused jsonlPath parameter from syncBranchCommitAndPush
- Change branchExists to return bool instead of (bool, error) - error was never used

All changes maintain backward compatibility and improve code quality.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 20:06:05 -08:00
Steve Yegge
d46177d885 Enhance bd onboard with AI planning docs management guidance
Add comprehensive guidance for managing AI-generated planning documents
(Claude slop) to the bd onboard command. Addresses GitHub issue #196.

Changes:
- Add Managing AI-Generated Planning Documents section to onboard output
- Recommend using history/ directory for ephemeral planning files
- List common planning doc types (PLAN.md, IMPLEMENTATION.md, etc.)
- Provide .gitignore example and benefits explanation
- Add to Important Rules: Store AI planning docs in history/
- Update AGENTS.md with the same guidance to demonstrate the pattern
- Add comprehensive tests for onboard command

This uses inverted control: bd outputs guidance, AI agents intelligently
integrate it into their project's documentation (AGENTS.md, CLAUDE.md,
.cursorrules, etc.), respecting existing conventions.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 17:10:41 -08:00
Steve Yegge
fa1d13af11 Fix #190: Clarify onboarding completion message
Changed 'confirm by saying' to 'tell your AI assistant' to make it clear
this is meant for the AI, not a bd command to run.
2025-10-31 18:12:40 -07:00
Steve Yegge
4c71235377 Fix syntax error in onboard.go from PR #154
The backtick escaping was missing around .beads/issues.jsonl on line 69.
2025-10-26 13:24:18 -07:00
Dennis Schön
4b150b0918 onboard: add step to commit JSONL with code changes (#154)
Add a new step to the onboarding workflow reminding AI agents to commit
the `.beads/issues.jsonl` file together with code changes. This ensures
issue state stays synchronized with code state, which is critical for
maintaining accurate project history and making issues meaningful when
reviewing past commits.
2025-10-26 13:21:34 -07:00
Steve Yegge
e10e34b221 Add agent-first 'bd onboard' command (bd-173)
- Refactor bd onboard to output instructions instead of doing string replacement
- Leverage agent intelligence to naturally integrate bd into documentation
- Bootstrap via 'BEFORE ANYTHING ELSE: run bd onboard' in AGENTS.md
- Agent receives formatted instructions to update AGENTS.md and CLAUDE.md
- More agentic approach - adapts to existing project structure
- Update README with new bootstrap workflow

Amp-Thread-ID: https://ampcode.com/threads/T-d70fd1bf-8d44-48b6-bb55-5ae49efb23b8
Co-authored-by: Amp <amp@ampcode.com>
2025-10-20 15:04:33 -07:00