This commit is contained in:
Steve Yegge
2025-11-24 01:37:03 -08:00
3 changed files with 106 additions and 74 deletions

File diff suppressed because one or more lines are too long

View File

@@ -36,6 +36,18 @@ Behavior:
NOTE: Import requires direct database access and does not work with daemon mode.
The command automatically uses --no-daemon when executed.`,
Run: func(cmd *cobra.Command, args []string) {
// Check for positional arguments (common mistake: bd import file.jsonl instead of bd import -i file.jsonl)
if len(args) > 0 {
fmt.Fprintf(os.Stderr, "Error: Unexpected argument(s): %v\n\n", args)
fmt.Fprintf(os.Stderr, "Did you mean: bd import -i %s\n\n", args[0])
fmt.Fprintf(os.Stderr, "The import command does not accept positional arguments.\n")
fmt.Fprintf(os.Stderr, "Use the -i flag to specify an input file:\n")
fmt.Fprintf(os.Stderr, " bd import -i .beads/beads.jsonl\n\n")
fmt.Fprintf(os.Stderr, "Or pipe data via stdin:\n")
fmt.Fprintf(os.Stderr, " cat data.jsonl | bd import\n")
os.Exit(1)
}
// Ensure database directory exists (auto-create if needed)
dbDir := filepath.Dir(dbPath)
if err := os.MkdirAll(dbDir, 0750); err != nil {

View File

@@ -114,6 +114,10 @@ func outputPrimeContext(mcpMode bool) error {
func outputMCPContext() error {
context := `# Beads Issue Tracker Active
# 🚨 SESSION CLOSE PROTOCOL 🚨
Before saying "done": git status → git add → bd sync → git commit → bd sync → git push
## Core Rules
- Track ALL work in beads (no TodoWrite tool, no markdown TODOs)
- Use bd MCP tools (mcp__plugin_beads_beads__*), not TodoWrite or markdown
@@ -131,6 +135,21 @@ func outputCLIContext() error {
> **Context Recovery**: Run ` + "`bd prime`" + ` after compaction, clear, or new session
> Hooks auto-call this in Claude Code when .beads/ detected
# 🚨 SESSION CLOSE PROTOCOL 🚨
**CRITICAL**: Before saying "done" or "complete", you MUST run this checklist:
` + "```" + `
[ ] 1. git status (check what changed)
[ ] 2. git add <files> (stage code changes)
[ ] 3. bd sync (commit beads changes)
[ ] 4. git commit -m "..." (commit code)
[ ] 5. bd sync (commit any new beads changes)
[ ] 6. git push (push to remote)
` + "```" + `
**NEVER skip this.** Work is not done until pushed.
## Core Rules
- Track ALL work in beads (no TodoWrite tool, no markdown TODOs)
- Use ` + "`bd create`" + ` to create issues, not TodoWrite tool