Skip to content

Fix current datetime propagation#1120

Merged
bradygaster merged 2 commits into
bradygaster:devfrom
spboyer:squad-1119-fix-day-time
May 18, 2026
Merged

Fix current datetime propagation#1120
bradygaster merged 2 commits into
bradygaster:devfrom
spboyer:squad-1119-fix-day-time

Conversation

@spboyer
Copy link
Copy Markdown
Contributor

@spboyer spboyer commented May 15, 2026

What

Updates the Squad coordinator and Scribe templates so spawned agents receive a resolved CURRENT_DATETIME value instead of unresolved placeholder text. Adds regression coverage and a patch changeset for the template behavior.

Why

Clean/new Squad sessions could carry {current_datetime} through spawn examples, leaving agents to infer or write the wrong day/time.

Fixes: #1119

How

The coordinator now resolves CURRENT_DATETIME once from <current_datetime>, sanity-checks it, and falls back to a local date command if the system value is missing or implausible. Date-bearing agent and Scribe examples now explicitly require substituting the literal received timestamp, and synced template mirrors keep init/upgrade output aligned.


⚠️ Quick Check

  • If SDK/CLI source files changed: completed the applicable Changeset step below (npx changeset add / .changeset/*.md, direct CHANGELOG.md entry for maintainers, or skip-changelog label for no user-facing changes)

PR Readiness Checklist

The PR readiness bot will validate these automatically after push.
Check each item before requesting review. See CONTRIBUTING.md for full details.

Branch & Commit

  • Branch created from dev (not main)
  • Branch is up to date with dev (git fetch upstream && git rebase upstream/dev)
  • Verified diff contains only intended changes (git diff --cached --stat)
  • PR is not in draft mode (mark ready when checks pass)
  • Commit history is clean (squash fixups before review)

Build & Test

  • npm run build passes
  • npm test passes (all tests green)
  • npm run lint passes (type check clean)
  • npm run lint:eslint passes
  • For migration PRs (>20 files): include test output summary in PR description

Changeset

  • Changeset added via npx changeset add (if packages/squad-sdk/src/ or packages/squad-cli/src/ changed)
  • Or direct CHANGELOG.md entry (maintainers only — write-protected for external contributors)
  • Or skip-changelog label applied (if no user-facing changes)

Docs

N/A - this fixes generated coordinator/Scribe template behavior, not a new feature or docs page.

  • README section updated (if new feature/module)
  • Docs feature page (if new user-facing capability)

Exports

N/A - no SDK module exports changed.

  • package.json subpath exports updated (if new module)

Breaking Changes

None.

Waivers

N/A.

Closes bradygaster#1119

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 15, 2026 16:25
Copy link
Copy Markdown
Contributor

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 updates Squad’s coordinator and Scribe templates to propagate a resolved current datetime value instead of unresolved placeholders, and adds regression coverage for that contract.

Changes:

  • Adds CI coverage for datetime placeholder regressions in canonical templates.
  • Updates coordinator spawn examples to pass a resolved CURRENT_DATETIME literal.
  • Syncs Scribe datetime examples and mirrored template copies across CLI/SDK/root/GitHub agent locations.
Show a summary per file
File Description
test/ci/datetime-template.test.ts Adds regression checks for datetime propagation and placeholder usage.
.squad-templates/squad.agent.md Updates canonical coordinator datetime resolution and spawn prompt guidance.
.squad-templates/scribe-charter.md Updates canonical Scribe datetime examples.
templates/squad.agent.md.template Mirrors coordinator template updates.
templates/scribe-charter.md Mirrors Scribe charter updates.
packages/squad-cli/templates/squad.agent.md.template Mirrors coordinator template updates for CLI package.
packages/squad-cli/templates/scribe-charter.md Mirrors Scribe charter updates for CLI package.
packages/squad-sdk/templates/squad.agent.md.template Mirrors coordinator template updates for SDK package.
packages/squad-sdk/templates/scribe-charter.md Mirrors Scribe charter updates for SDK package.
.github/agents/squad.agent.md Syncs GitHub agent copy with canonical coordinator template.
.changeset/fix-current-datetime-propagation.md Adds patch changeset for CLI and SDK packages.

Copilot's findings

  • Files reviewed: 11/11 changed files
  • Comments generated: 5

Comment thread .squad-templates/scribe-charter.md
Comment thread templates/scribe-charter.md
Comment thread packages/squad-cli/templates/scribe-charter.md
Comment thread packages/squad-sdk/templates/scribe-charter.md
Comment thread test/ci/datetime-template.test.ts Outdated
Closes bradygaster#1119

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@spboyer
Copy link
Copy Markdown
Contributor Author

spboyer commented May 15, 2026

All review feedback from copilot-pull-request-reviewer has been addressed and CI is now passing. Ready for review — all 5 threads resolved, all checks green ✅

@bradygaster bradygaster merged commit a4b508f into bradygaster:dev May 18, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Squad doesn't have the right day/time

3 participants