Skip to content

Add basecamp cards done command#442

Open
robzolkos wants to merge 4 commits intomainfrom
issue-423-cards-done
Open

Add basecamp cards done command#442
robzolkos wants to merge 4 commits intomainfrom
issue-423-cards-done

Conversation

@robzolkos
Copy link
Copy Markdown
Collaborator

@robzolkos robzolkos commented Apr 20, 2026

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 avoiding the ambiguity and alias issues we’ve had with overloading top-level shortcuts.

Closes #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

  • top-level basecamp done is unchanged
  • this PR intentionally introduces a card-specific command instead of adding another alias path
  • Done-column ownership resolution also accounts for on-hold subcolumns when identifying the correct board

Summary by cubic

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

  • New Features
    • New command: basecamp cards done <id|url>.
    • Finds Done by type (Kanban::DoneColumn), not by title.
    • Resolves project from URL, card bucket, flags, or config; in multi-board projects, infers the right board from the card’s parent column (including on-hold subcolumns). Validates --card-table and rejects invalid IDs; shows available tables when ambiguous.
    • If already completed or already in Done, return success with an accurate summary.
    • Clear error when no Done column, with a hint to list columns.
    • Adds breadcrumbs: cards show includes a Done action; cards done outputs links to view the card and list the Done column.
    • Updates CLI catalog, README, skills/basecamp/SKILL.md, and smoke tests; tighter JSON assertions.

Written for commit f08301e. Summary will update on new commits.

Copilot AI review requested due to automatic review settings April 20, 2026 16:32
@github-actions github-actions Bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills docs enhancement New feature or request labels Apr 20, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated basecamp cards done <id|url> command to complete Kanban cards by automatically resolving the owning card table and moving the card into its Kanban::DoneColumn.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.

Changes:

  • Introduces cards done subcommand (and breadcrumbs) to move cards to the Done column, with multi-board inference support.
  • Refactors card-table listing/formatting helpers and adds unit tests for cards done.
  • Updates docs, command catalog, CLI surface snapshot, and smoke coverage.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
skills/basecamp/SKILL.md Documents the new basecamp cards done workflow and examples.
internal/commands/commands.go Adds done to the cards command action catalog.
internal/commands/cards_test.go Adds unit tests and transport mocks for cards done; updates card-table formatting test types.
internal/commands/cards.go Implements cards done, breadcrumbs, and card-table/table-resolution helpers.
e2e/smoke/smoke_cards_write.bats Adds a smoke test for completing a card via cards done.
README.md Adds a quick-start example for basecamp cards done.
.surface Updates the CLI surface snapshot to include the new command and flags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/commands/cards.go Outdated
Comment thread internal/commands/cards.go
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 7 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="skills/basecamp/SKILL.md">

<violation number="1" location="skills/basecamp/SKILL.md:462">
P2: Document the `cards done` argument as `<id|url>` instead of only `<id>` to match the command behavior.</violation>
</file>

<file name="internal/commands/cards.go">

<violation number="1" location="internal/commands/cards.go:909">
P2: Operator precedence makes this evaluate as `(Parent != nil && Parent.Type == DoneColumn) || Completed`. A card can be `Completed` without residing in a `Kanban::DoneColumn`, so the summary `"is already in 'Done'"` is misleading in that case. Add explicit parentheses and split the messaging for the two distinct scenarios (already in Done column vs. already marked completed).</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread skills/basecamp/SKILL.md Outdated
Comment thread internal/commands/cards.go Outdated
@robzolkos
Copy link
Copy Markdown
Collaborator Author

Fixed — split the already-in-Done vs already-completed summaries and reduced multi-board resolution to a parent-column lookup before any fallback scan.

@robzolkos
Copy link
Copy Markdown
Collaborator Author

Fixed — cubic identified the <id|url> doc mismatch and the misleading already-done summary; I updated the skill examples and split the already-done vs already-completed messaging.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="internal/commands/cards_test.go">

<violation number="1" location="internal/commands/cards_test.go:1250">
P3: Decode the JSON response and assert `summary` via structured lookup instead of substring matching.

(Based on your team's feedback about parsing JSON output in tests instead of substring assertions.) [FEEDBACK_USED]</violation>

<violation number="2" location="internal/commands/cards_test.go:1266">
P3: Decode the JSON response and assert `summary` via structured lookup instead of substring matching.

(Based on your team's feedback about parsing JSON output in tests instead of substring assertions.) [FEEDBACK_USED]</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Comment thread internal/commands/cards_test.go Outdated
Comment thread internal/commands/cards_test.go Outdated
Copilot AI review requested due to automatic review settings April 20, 2026 17:09
@robzolkos
Copy link
Copy Markdown
Collaborator Author

Fixed — cubic identified the JSON assertion style issue in the new tests, and I switched both summary checks to decode the response and assert the summary field structurally.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/commands/cards.go
Comment thread internal/commands/cards.go Outdated
Comment thread internal/commands/cards.go Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

commands CLI command implementations docs enhancement New feature or request skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: basecamp cards done - complete a card from CLI

2 participants