Agents naturally try to use 'bd dep <blocker> --blocks <blocked>' when establishing blocking relationships - a desire path revealing intuitive mental model for how dependencies should work. When AI agents set up dependency chains, they consistently attempt: bd dep conduit-abc --blocks conduit-xyz This reveals a desire path - the syntax users naturally reach for before reading documentation. Instead of fighting this intuition, we embrace it. - Add --blocks (-b) flag to the bd dep command - Support syntax: bd dep <blocker-id> --blocks <blocked-id> - Equivalent to: bd dep add <blocked-id> <blocker-id> - Full daemon and direct mode support - Cycle detection and child-parent anti-pattern checks - JSON output support for programmatic use This is purely additive. The existing command structure remains: - 'bd dep add' subcommand works exactly as before - All other dep subcommands (remove, list, tree, cycles) unchanged - No breaking changes to existing workflows bd dep bd-xyz --blocks bd-abc # bd-xyz blocks bd-abc bd dep bd-xyz -b bd-abc # Same, using shorthand bd dep add bd-abc bd-xyz # Original syntax still works - Added TestDepBlocksFlag for flag initialization - Added TestDepBlocksFlagFunctionality for semantic correctness - All existing tests pass
28 KiB
28 KiB