Skip to content

Fix agent routing: recordings --assignee → reports assigned#200

Merged
jeremy merged 2 commits intomainfrom
assignee
Mar 5, 2026
Merged

Fix agent routing: recordings --assignee → reports assigned#200
jeremy merged 2 commits intomainfrom
assignee

Conversation

@jeremy
Copy link
Member

@jeremy jeremy commented Mar 5, 2026

Summary

  • Agents were routing "my todos" queries to recordings todos, which returns all todos with no assignee data — making per-person filtering impossible. The correct command is reports assigned.
  • Added a hidden --assignee flag to recordings and recordings list that intercepts misuse with a context-aware redirect: suggests todos --assignee ... --in ... when project-scoped, or reports assigned [person] when cross-project.
  • Fixed SKILL.md routing guidance in 5 places (invariant, quick reference, decision tree, recordings section) to steer agents toward reports assigned for assigned work.

Details

The redirect is implemented as a guard in PreRunE (root command) and early RunE (list subcommand), so it fires before account validation. Hint arguments use %q quoting for shell safety, and me matching is case-insensitive.

Test plan

  • 11 unit tests in recordings_test.go: positional args, --type flag form, --in conditional path, non-"me" assignee preservation, case-insensitive "me", hidden flag assertions
  • 4 e2e tests in recordings.bats: both commands × both redirect paths
  • make check passes (263 e2e, all unit tests, lint, vet, fmt, surface snapshot, provenance)

jeremy added 2 commits March 5, 2026 13:47
recordings lacks assignee data, so --assignee cannot work. Rather than
silently returning unfiltered results, a hidden flag intercepts the
request and redirects to the correct command:

- With --in/--project: suggests `basecamp todos --assignee <person> --in <project>`
- Without project scope: suggests `basecamp reports assigned [person]`

The guard runs in PreRunE (root) or early RunE (list subcommand) so it
fires before account validation. Hint arguments are %q-quoted for
shell safety, and "me" matching is case-insensitive.

Includes unit tests (11) and e2e tests (4) covering positional args,
--type flag form, --in conditional path, non-"me" assignee preservation,
case-insensitive "me" handling, and hidden flag assertions.
Agents were routing "my todos" queries to `recordings todos` which
returns all todos with no assignee data, making per-person filtering
impossible. Five edits steer agents toward `reports assigned` instead:

- Invariant #6: reword to list cross-project exceptions coherently
- Quick reference note: split guidance for assigned work vs type browsing
- Quick reference table: add "My todos (cross-project)" row, annotate
  recordings row with "no assignee data" warning
- Decision tree: add "My assigned work?" branch before type browsing,
  note that recordings cannot filter by person
- Recordings section header: prefer reports assigned for assigned todos
Copilot AI review requested due to automatic review settings March 5, 2026 21:48
@github-actions github-actions bot added commands CLI command implementations tests Tests (unit and e2e) skills Agent skills bug Something isn't working labels Mar 5, 2026
Copy link

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

This PR fixes a routing issue where AI agents were incorrectly using basecamp recordings todos to find per-person assigned work, which is impossible because recordings lack assignee data. The fix introduces a hidden --assignee flag on the recordings and recordings list commands that intercepts misuse with context-aware redirect hints, and updates the SKILL.md agent guidance to steer toward basecamp reports assigned for assigned work queries.

Changes:

  • Added hidden --assignee flag to recordings (PreRunE) and recordings list (RunE) that returns a helpful redirect error with context-aware suggestions based on whether --in is present and whether the assignee is "me" or a specific person.
  • Updated SKILL.md in 5 places (invariants, quick reference table, decision tree, recordings section) to clarify that reports assigned is the correct command for cross-project assigned work, and that recordings lack assignee data.
  • Updated the agent_notes annotations on both recordings and todos commands to reinforce the correct routing.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/commands/recordings.go Added hidden --assignee flag, recordingsAssigneeRedirect function, and updated agent_notes annotation
internal/commands/recordings_test.go New test file with 11 unit tests covering all redirect paths, edge cases, and hidden flag assertions
internal/commands/todos.go Updated agent_notes annotation to direct agents to reports assigned instead of recordings
skills/basecamp/SKILL.md Updated agent routing guidance in invariants, quick reference, decision tree, and recordings section
e2e/recordings.bats Added 4 e2e tests covering both commands × both redirect paths

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

@jeremy jeremy merged commit 6992061 into main Mar 5, 2026
25 checks passed
@jeremy jeremy deleted the assignee branch March 5, 2026 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working commands CLI command implementations skills Agent skills tests Tests (unit and e2e)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants