feat(templates): add --start-date to templates construct
What
basecamp templates construct <id> --name NAME [--start-date DATE]
The API has accepted project[start_date] on template construction since 2022 (bc3 project_operations.rb#project_from_template_params), but the command exposed only --name/--description, so every constructed project anchored the template's relative dates to the day of construction and a script had to re-date each to-do and schedule entry afterwards (#659).
--start-datetakesYYYY-MM-DDor the natural forms the other date flags accept (tomorrow,next monday,+7), is validated before any request (Invalid start date: "โฆ", usage exit, no network), and rides under theprojectenvelope through the SDK'sCreateProjectOptions. Unset, it stays off the wire.- Template weeks start on Sunday, so the server anchors the template's dates to the Sunday on or before the date; without the flag they anchor to the week of construction. The command's long help, the
templatesgroup'sagent_notes, andskills/basecamp/SKILL.mdsay so;.surfacecarries the new flag.
Dependency โ pinned to the tagged SDK release
Depends on basecamp/basecamp-sdk#856 (ProjectConstructionAttributes.start_date, Go CreateProjectOptions), which shipped in basecamp-sdk v0.18.0. go.mod pins github.com/basecamp/basecamp-sdk/go v0.18.0 via make bump-sdk REF=v0.18.0; the vendored MCP model is re-synced from the go/v0.18.0 checkout (scripts/sync-mcp-model.sh, PROVENANCE.json ref go/v0.18.0) and the Nix vendorHash recomputed and build-verified (make update-nix-hash). No replace directive. The earlier pseudo-version pin to the #856 branch head is gone; this is the same flip #689 made to v0.17.0.
Fixes #659. Tracked on this card; the bc3 doc side is basecamp/bc3#13259.
Tests
templates_test.go: the literal wire body{"project":{"name","description","start_date":"2026-09-01"}}from the recording transport;start_dateabsent when the flag is unset; natural-language parsing; a malformed date rejected as a usage error before any request.e2e/templates.bats: offline usage error for a malformed--start-date.
Every bin/ci target run locally: fmt, vet, lint, lint-actions, e2e, naming, surface, skill drift, bare groups, lint lockstep, smoke coverage, SDK provenance, and go mod tidy green; MCP catalog provenance test green against the v0.18.0 pin. The Go unit run is green except TestBareBasecampNeverReportsASetupError, TestExplicitSetupStillRefuses, TestDeleteConfirmableFollowsTheAudienceNotTheDevice and the TestIsInteractive*/TestInteractive*/TestIsTerminal cases in appctx/cli, which fail identically on pristine main in this non-TTY shell (as #689 and #677 noted).
I'm babysitting the review loop on this PR through to convergence.
Release note: Features (enhancement).
Summary by cubic
Adds --start-date to templates construct so template relative dates anchor to a chosen week instead of the week of construction (fixes #659).
- Accepts
YYYY-MM-DDor natural forms (tomorrow,next monday,+7); malformed or explicitly blank values fail with a usage error before any request. - Template weeks start on Sunday, so dates anchor to the Sunday on or before the given date; without the flag the field stays off the wire.
- Updated command help, agent notes, skill docs, and the MCP model to cover the new flag.
Dependencies
- Upgrades
github.com/basecamp/basecamp-sdk/goto v0.18.0, which providesCreateProjectOptions.StartDate.