graph_apply used IsValid() to check node types, which only accepts
built-in types (task, bug, feature, etc.). User-configured custom
types (spec, session, agent, etc.) were rejected with "invalid type".
Use IsValidWithCustom() instead, loading custom types from the store
config or config.yaml fallback — the same pattern used by list and
update commands.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace standalone `bd graph-apply` subcommand with `bd create --graph
<plan-file>` flag, consistent with the existing `bd create -f` (markdown)
pattern. The graph plan format and transactional execution are unchanged.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Default priority to P2 (was Go zero-value P0/critical)
- Persist labels via tx.AddLabel (CreateIssues tx path drops them)
- Validate IssueType and DependencyType against known constants
- Deterministic output ordering (sort keys before printing)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use RunInTransaction for true atomicity (blocker: partial graph on failure)
- Validate duplicate node keys upfront (major: silent key overwrite)
- Remove dead first-pass MetadataRef resolution (keyToID was empty)
- Remove unused From field and Edge.Metadata (dead API surface)
- Pre-validate all edge refs, parent keys, and metadata refs before writes
- commit_message now correctly controls the single transaction commit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a new `bd graph-apply --plan-file <path>` command that atomically
creates a graph of issues with dependencies in a single transaction.
Uses the existing store.CreateIssues() batch path for the bulk insert,
then resolves symbolic key references for edges, parent-child deps,
metadata cross-refs, and deferred assignees.
This is the bd-side counterpart to gascity's GraphApplyStore interface,
replacing N sequential bd create + bd dep add subprocess calls with a
single bd invocation.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>