fix: improve priority format documentation and error message (GH#517)

Claude was using word-based priorities like "medium" instead of numeric
values (0-4 or P0-P4), causing bd create commands to fail in a loop.

Changes:
- Update bd prime output to clearly document priority format with example
- Add explicit note: NOT "high"/"medium"/"low"
- Improve error message to mention that words are not valid

Closes #517

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-16 01:07:55 -08:00
parent 2db4808a19
commit 0c9e78f42e
4 changed files with 873 additions and 867 deletions

2
.beads/.gitignore vendored
View File

@@ -30,3 +30,5 @@ beads.right.meta.json
!issues.jsonl
!metadata.json
!config.json
deletions.jsonl
deletions.jsonl.migrated

File diff suppressed because one or more lines are too long

View File

@@ -236,7 +236,8 @@ bd sync # Push to remote
- ` + "`bd show <id>`" + ` - Detailed issue view with dependencies
### Creating & Updating
- ` + "`bd create --title=\"...\" --type=task|bug|feature`" + ` - New issue
- ` + "`bd create --title=\"...\" --type=task|bug|feature --priority=2`" + ` - New issue
- Priority: 0-4 or P0-P4 (0=critical, 2=medium, 4=backlog). NOT "high"/"medium"/"low"
- ` + "`bd update <id> --status=in_progress`" + ` - Claim work
- ` + "`bd update <id> --assignee=username`" + ` - Assign to someone
- ` + "`bd close <id>`" + ` - Mark complete

View File

@@ -52,7 +52,7 @@ func ParseIssueType(content string) (types.IssueType, error) {
func ValidatePriority(priorityStr string) (int, error) {
priority := ParsePriority(priorityStr)
if priority == -1 {
return -1, fmt.Errorf("invalid priority %q (expected 0-4 or P0-P4)", priorityStr)
return -1, fmt.Errorf("invalid priority %q (expected 0-4 or P0-P4, not words like high/medium/low)", priorityStr)
}
return priority, nil
}