feat: add bd ship command for cross-project capabilities (bd-eijl)

- bd ship <capability> finds issue with export:<capability> label
- Validates issue is closed (or --force to override)
- Adds provides:<capability> label to mark capability as shipped
- Protects provides:* namespace in bd label add
- Supports --dry-run for preview

External projects depend on capabilities via:
  bd dep add <issue> external:<project>:<capability>

🤖 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-21 23:11:48 -08:00
parent e7f09660c0
commit 9afefe73a7
2 changed files with 191 additions and 0 deletions

View File

@@ -98,6 +98,15 @@ var labelAddCmd = &cobra.Command{
resolvedIDs = append(resolvedIDs, fullID)
}
issueIDs = resolvedIDs
// Protect reserved label namespaces (bd-eijl)
// provides:* labels can only be added via 'bd ship' command
if strings.HasPrefix(label, "provides:") {
fmt.Fprintf(os.Stderr, "Error: 'provides:' labels are reserved for cross-project capabilities\n")
fmt.Fprintf(os.Stderr, "Hint: use 'bd ship %s' instead\n", strings.TrimPrefix(label, "provides:"))
os.Exit(1)
}
processBatchLabelOperation(issueIDs, label, "added", jsonOutput,
func(issueID, lbl string) error {
_, err := daemonClient.AddLabel(&rpc.LabelAddArgs{ID: issueID, Label: lbl})