Fix reports schedule discoverability and default date window#344
Fix reports schedule discoverability and default date window#344
reports schedule discoverability and default date window#344Conversation
…ule queries Agents were unable to find `basecamp reports schedule` when users asked about upcoming events, falling back to raw API calls that returned wrong results. Add cross-references in the schedule command help text and skill documentation so agents route "my schedule" queries to the correct command.
There was a problem hiding this comment.
Pull request overview
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.
This PR improves agent/CLI discoverability for cross-project schedule queries by steering users toward basecamp reports schedule when they ask about “my schedule” / “upcoming events”, and by adding a cross-reference from basecamp schedule --help.
Changes:
- Add new Basecamp skill triggers and decision-tree guidance for “my schedule” / “upcoming events” that route to
basecamp reports schedule. - Update the skill quick reference and schedule section to mention
basecamp reports schedulefor cross-project upcoming events. - Update
basecamp schedulecommand long help to point tobasecamp reports schedulefor cross-project viewing.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| skills/basecamp/SKILL.md | Adds triggers + multiple documentation cross-references to reports schedule for cross-project upcoming schedule queries. |
| internal/commands/schedule.go | Adds a help-text hint directing users to basecamp reports schedule for cross-project schedule. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
reports schedule for cross-project schedule queriesreports schedule discoverability and default date window
There was a problem hiding this comment.
1 issue found across 3 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="internal/commands/reports.go">
<violation number="1" location="internal/commands/reports.go:279">
P2: When only `--start` is supplied with a future date, `endDate` defaults to `"+14"` relative to today, which can produce an end-before-start range (API error or empty results). Apply both defaults only when neither flag is set, or compute the end date relative to the parsed start.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
The Basecamp API requires a date window for the upcoming schedule endpoint. When --start/--end were omitted, nil params caused a 400 Bad Request. Default to today..+14 days.
9091359 to
93b7ec1
Compare
There was a problem hiding this comment.
Pull request overview
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.
Improves discoverability of the cross-project schedule view (basecamp reports schedule) and aims to make the command safer to run without explicit date flags by introducing defaults.
Changes:
- Added new skill triggers and routing guidance for “my schedule” / “upcoming events” to point to
basecamp reports schedule. - Added a cross-reference in
basecamp schedule --helpdirecting users tobasecamp reports schedulefor cross-project schedule views. - Began implementing default date handling for
reports schedulewhen--startis omitted.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| skills/basecamp/SKILL.md | Adds discoverability via triggers, quick reference, decision tree, and schedule section cross-reference. |
| internal/commands/schedule.go | Updates help text to reference the cross-project schedule report command. |
| internal/commands/reports.go | Adjusts reports schedule help text and introduces defaulting --start to today. |
Comments suppressed due to low confidence (1)
internal/commands/reports.go:283
reports scheduleis described (and in the PR description) as defaulting to a date window (today..+14), but the implementation only defaultsstartDateto today and still passes an emptyendDatethrough toUpcomingSchedule. If the API requires both bounds (or if we want predictable output), defaultendDatetoo (e.g., parsedStart + 14 days when--endis omitted) and update the help text accordingly.
By default starts from today. Use --start and --end to specify a different range.
Dates can be natural language (e.g., "today", "next week", "+7") or YYYY-MM-DD format.`,
RunE: func(cmd *cobra.Command, args []string) error {
app := appctx.FromContext(cmd.Context())
if err := ensureAccount(cmd, app); err != nil {
return err
}
// Parse dates if provided (dateparse handles natural language like "today", "+7")
// Unrecognized formats are normalized (trimmed/lowercased) and passed through for the API to validate
// Default start to today when omitted (API requires at least a start date)
if startDate == "" {
startDate = "today"
}
parsedStart := dateparse.Parse(startDate)
parsedEnd := dateparse.Parse(endDate)
result, err := app.Account().Reports().UpcomingSchedule(cmd.Context(), parsedStart, parsedEnd)
if err != nil {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
`schedule` is a bare group command — the actual subcommand is `schedule info`.
Review carefully before merging. Consider a major version bump. |
The help text previously said "Use 'basecamp schedule' to view the project schedule" which was misleading — it always required schedule info. No commands were added, removed, or renamed. |
Summary
basecamp reports schedulewhen users asked about upcoming events, instead falling back to raw API calls that returned events the user wasn't even onbasecamp schedule --helppointing toreports schedulefor cross-project viewsreports scheduleto skill triggers (my schedule,upcoming events), agent invariants, quick reference table, and finding content decision treebasecamp reports schedulereturning 400 Bad Request when called without--start/--endflags — the API requires at least a start date, now defaults to todayReference: https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9693407756