feat: add --notes flag to bd create command (GH#830)

Add --notes flag to bd create command, enabling agents to set notes
during issue creation instead of requiring a separate update command.

Motivation: AI agents repeatedly tried to use --notes with bd create.
Context is fresh at creation time - forcing a two-step process means
context loss or workflow interruption.

Changes:
- cmd/bd/flags.go: Added --notes flag to common issue flags
- cmd/bd/create.go: Read and pass notes in both RPC and direct modes
- cmd/bd/update.go: Removed duplicate --notes flag definition
- internal/rpc/protocol.go: Added Notes field to CreateArgs
- internal/rpc/server_issues_epics.go: Process Notes in handleCreate
- cmd/bd/create_notes_test.go: Comprehensive test coverage
- website/docs/cli-reference/issues.md: Documentation

Also adds gitignore entries for Augment AI and .beads/redirect.

Co-authored-by: Leon Letto <lettol@vmware.com>
This commit is contained in:
beads/crew/emma
2026-01-01 10:53:59 -08:00
committed by Steve Yegge
parent aa2ea48bf2
commit 829c8d1caf
9 changed files with 249 additions and 13 deletions

View File

@@ -82,6 +82,7 @@ type CreateArgs struct {
Priority int `json:"priority"`
Design string `json:"design,omitempty"`
AcceptanceCriteria string `json:"acceptance_criteria,omitempty"`
Notes string `json:"notes,omitempty"`
Assignee string `json:"assignee,omitempty"`
ExternalRef string `json:"external_ref,omitempty"` // Link to external issue trackers
EstimatedMinutes *int `json:"estimated_minutes,omitempty"` // Time estimate in minutes

View File

@@ -183,13 +183,16 @@ func (s *Server) handleCreate(req *Request) Response {
issueID = childID
}
var design, acceptance, assignee, externalRef *string
var design, acceptance, notes, assignee, externalRef *string
if createArgs.Design != "" {
design = &createArgs.Design
}
if createArgs.AcceptanceCriteria != "" {
acceptance = &createArgs.AcceptanceCriteria
}
if createArgs.Notes != "" {
notes = &createArgs.Notes
}
if createArgs.Assignee != "" {
assignee = &createArgs.Assignee
}
@@ -205,6 +208,7 @@ func (s *Server) handleCreate(req *Request) Response {
Priority: createArgs.Priority,
Design: strValue(design),
AcceptanceCriteria: strValue(acceptance),
Notes: strValue(notes),
Assignee: strValue(assignee),
ExternalRef: externalRef,
EstimatedMinutes: createArgs.EstimatedMinutes,