Add `basecamp cards done` command

Merged
RO
4mo ago
+569-51

Summary

Adds an explicit basecamp cards done <id|url> command so users can complete Kanban cards without manually looking up a board’s Done column and moving the card themselves. This keeps card completion clear and discoverable while using the canonical group+verb command shape from #416.

Closes https://github.com/basecamp/basecamp-cli/issues/423

What changed

  • adds basecamp cards done <id|url>
  • resolves the card, its owning card table, and that table’s Done column automatically
  • identifies Done by Kanban::DoneColumn instead of matching the title "Done"
  • supports explicit --card-table when provided
  • in multi-board projects, infers the correct board from the card’s current parent column
  • treats already-completed / already-in-Done cards as a successful no-op
  • adds discoverability via cards show breadcrumbs
  • updates command catalog, docs, smoke coverage, and CLI surface snapshot

Notes

  • rebased after #416; top-level basecamp done has been removed, and todo completion remains basecamp todos complete
  • this PR intentionally introduces a card-specific group subcommand instead of adding another top-level shortcut
  • Done-column ownership resolution also accounts for on-hold subcolumns when identifying the correct board

Live verification

Tested against account 5978679 (Rob Zolkos), project 46546644 (Verdant Coffee Roasters), card table 9693156458.

  • Created temp card 10045078865 in Triage, ran basecamp cards done 10045078865 --account 5978679 --in 46546644 --json, and verified it moved to Done column 9693156466 with completed: true.
  • Ran basecamp cards done 10045078865 again and verified the successful no-op summary: Card #10045078865 is already in 'Done'.
  • Created temp card 10045079009, ran basecamp cards done 10045079009 --card-table 09693156458, and verified the leading-zero card table ID matched table 9693156458 and moved the card to Done.
  • Trashed both temporary cards after verification.

Verification

  • GOWORK=off make build
  • GOWORK=off go test ./internal/commands -run 'TestCardsDone|TestCardsShow|TestCommandCatalog'
  • GOWORK=off bin/ci

Summary by cubic

Adds basecamp cards done <id|url> to move a Kanban card to its Done column automatically. Improves discoverability and tightens validation for multi-board projects.

  • New Features
    • New command: basecamp cards done <id|url>.
    • Detects Done by type (Kanban::DoneColumn) and resolves project from URL, card bucket, flags, or config; in multi-board projects, infers the board from the card’s parent column (including on-hold).
    • Validates --card-table against the project’s dock; accepts leading zeros, rejects mixed IDs, and lists available tables when ambiguous.
    • If already completed or already in Done, returns success with an accurate summary; clear error when no Done column with a hint to list columns.
    • Breadcrumbs: cards show adds a Done action; cards done links to view the card and list the Done column. Updates CLI catalog, README, skills/basecamp/SKILL.md, and smoke tests; tighter JSON assertions.