Skip to content

chore(cli): deprecate SDK-first initialization - #1968

Open
tamirdresher wants to merge 1 commit into
github:devfrom
tamirdresher:squad/341-deprecate-sdk-init
Open

tamirdresher wants to merge 1 commit into
github:devfrom
tamirdresher:squad/341-deprecate-sdk-init

Conversation

@tamirdresher

@tamirdresher tamirdresher commented Sep 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • deprecate squad init --sdk and announce its removal in v2
  • preserve the supported programmatic SDK and squad build compatibility for existing squad.config.ts projects
  • recommend markdown-first initialization across CLI help, READMEs, onboarding, navigation, role guidance, and active references
  • document the accepted decision and include the required CLI changeset

Closes #341
Closes #347

Testing

  • npm run build
  • npm exec vitest run test/cli/init.test.ts test/cli/command-help.test.ts (32 passed)
  • full docs build: 701 pages and Pagefind index generated successfully
  • fresh code review found no remaining issues

Copilot AI lite review requested due to automatic review settings September 1, 2026 07:40
@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🏗️ Architectural Review

Authoritative evidence: base-controlled pull_request_target reporter.

⚠️ Architectural review: 2 warning(s).

Severity Category Finding Files
🟡 warning bootstrap-area 2 file(s) in the bootstrap area (packages/squad-cli/src/cli/core/) were modified. These files must maintain zero external dependencies. Review carefully. packages/squad-cli/src/cli/core/command-help.ts, packages/squad-cli/src/cli/core/init.ts
🟡 warning sweeping-refactor This PR touches 24 files (24 modified/added, 0 deleted). Large PRs are harder to review — consider splitting if possible. —

Automated architectural review — informational only.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🟠 Impact Analysis — PR #1968

Risk tier: 🟠 HIGH

📊 Summary

Metric Count
Files changed 24
Files added 2
Files modified 22
Files deleted 0
Modules touched 4

🎯 Risk Factors

  • 24 files changed (21-50 → HIGH)
  • 4 modules touched (2-4 → MEDIUM)

📦 Modules Affected

docs (14 files)
  • docs/proposals/deprecate-sdk-init.md
  • docs/src/content/blog/024-v0823-release.md
  • docs/src/content/docs/concepts/what-is-squad.md
  • docs/src/content/docs/features/built-in-roles.md
  • docs/src/content/docs/features/enterprise-platforms.md
  • docs/src/content/docs/get-started/installation.md
  • docs/src/content/docs/guide.md
  • docs/src/content/docs/reference/config.md
  • docs/src/content/docs/reference/sdk.md
  • docs/src/content/docs/reference/tools-and-hooks.md
  • docs/src/content/docs/sdk-first-mode.md
  • docs/src/content/docs/whatsnew.md
  • docs/src/navigation.ts
  • docs/src/pages/index.astro
root (3 files)
  • .changeset/deprecate-sdk-init.md
  • README.md
  • README.zh.md
squad-cli (4 files)
  • packages/squad-cli/src/cli-entry.ts
  • packages/squad-cli/src/cli/commands/migrate.ts
  • packages/squad-cli/src/cli/core/command-help.ts
  • packages/squad-cli/src/cli/core/init.ts
tests (3 files)
  • test/cli/command-help.test.ts
  • test/cli/init.test.ts
  • test/migrate.test.ts

This report is generated automatically for every PR. See #733 for details.

@github-actions

github-actions Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🛫 PR Readiness Check

ℹ️ This comment updates on each push. Last checked: commit 4dc7248

PR Scope: 📦🔧 Mixed (product + infrastructure)

⚠️ 2 item(s) to address before review

Status Check Details
✅ Single commit 1 commit — clean history
✅ Not in draft Ready for review
✅ Branch up to date Up to date with dev
❌ Copilot review No Copilot review yet — it may still be processing
✅ Changeset present Changeset file found
✅ Scope clean ⚠️ PR includes 1 docs/proposals/ file(s) — ensure these are intentional
✅ No merge conflicts No merge conflicts
✅ Copilot threads resolved 1 active Copilot thread(s) resolved (6 outdated skipped)
❌ CI passing 2 check(s) still running

Files Changed (24 files, +165 −156)

File +/−
.changeset/deprecate-sdk-init.md +5 −0
README.md +3 −18
README.zh.md +3 −18
docs/proposals/deprecate-sdk-init.md +24 −0
docs/src/content/blog/024-v0823-release.md +12 −14
docs/src/content/docs/concepts/what-is-squad.md +2 −2
docs/src/content/docs/features/built-in-roles.md +3 −1
docs/src/content/docs/features/enterprise-platforms.md +4 −2
docs/src/content/docs/get-started/installation.md +2 −0
docs/src/content/docs/guide.md +11 −44
docs/src/content/docs/reference/config.md +4 −2
docs/src/content/docs/reference/sdk.md +3 −1
docs/src/content/docs/reference/tools-and-hooks.md +3 −1
docs/src/content/docs/sdk-first-mode.md +14 −37
docs/src/content/docs/whatsnew.md +5 −1
docs/src/navigation.ts +1 −1
docs/src/pages/index.astro +2 −2
packages/squad-cli/src/cli-entry.ts +2 −3
packages/squad-cli/src/cli/commands/migrate.ts +4 −3
packages/squad-cli/src/cli/core/command-help.ts +4 −3
packages/squad-cli/src/cli/core/init.ts +7 −1
test/cli/command-help.test.ts +17 −0
test/cli/init.test.ts +16 −1
test/migrate.test.ts +14 −1

Total: +165 −156


This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The docs introduce a new [!CAUTION] admonition syntax and the init test mixes package vs source import paths, both of which reduce consistency and confidence in rendered output and test representativeness.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 1 Medium severity · 3 Low severity

New issues introduced by this change (4)
Severity Finding
Medium severity test/​cli/​init.test.ts — This test file imports runInit from the published entrypoint and also imports the same module via a…
Low severity docs/​src/​content/​docs/​sdk-first-mode.md — The docs currently use blockquote callouts like > ⚠️ **Experimental** — .... The new `>…
Low severity docs/​src/​content/​docs/​reference/​sdk.md — This page introduces > [!CAUTION] for an admonition, but the surrounding docs typically use `> ⚠️…
Low severity docs/​src/​content/​docs/​reference/​config.md — [!CAUTION] isn’t used elsewhere in these docs; existing callouts use the `> ⚠️ Experimental —…
What changed in this PR

This PR deprecates SDK-first initialization (squad init --sdk) across the CLI, help output, and documentation, while keeping squad build working for existing squad.config.ts projects during the transition to v2.

Changes:

  • Add a deprecation warning path when runInit(..., { sdk: true }) is used, while keeping the flag functional.
  • Update CLI help text (top-level and init help) and strengthen tests to assert deprecation messaging.
  • Update docs/READMEs to recommend markdown-first initialization and record the accepted decision + include a CLI changeset.
File Description
packages/​squad-cli/​src/​cli/​core/​init.ts Emits deprecation warning when --sdk is used while preserving compatibility.
packages/​squad-cli/​src/​cli/​core/​command-help.ts Marks init --sdk as deprecated in command help output.
packages/​squad-cli/​src/​cli-entry.ts Marks --sdk as deprecated in top-level CLI help text.
test/​cli/​init.test.ts Adds coverage for the deprecation warning + compatibility behavior.
test/​cli/​command-help.test.ts Asserts --sdk deprecation is reflected in help output.
README.md Updates SDK-first section to “Deprecated” and points to legacy compatibility docs.
README.zh.md Chinese README: same deprecation shift + legacy compatibility pointer.
docs/​src/​content/​docs/​sdk-first-mode.md Reframes SDK-first docs as legacy/compatibility-focused and discourages new adoption.
docs/​src/​content/​docs/​reference/​sdk.md Adds deprecation notice for SDK-first builders.
docs/​src/​content/​docs/​reference/​config.md Adds deprecation notice for squad.config.ts reference.
docs/​src/​content/​docs/​guide.md Updates guide to label SDK-first mode and related commands as deprecated/legacy.
docs/​src/​content/​docs/​concepts/​what-is-squad.md Reorients concept framing to markdown-first and notes legacy deprecation.
docs/​proposals/​deprecate-sdk-init.md Records the accepted decision and rationale for deprecating --sdk init.
.changeset/​deprecate-sdk-init.md Patch changeset for @bradygaster/squad-cli documenting the deprecation.
Suppressed comments (1)

test/cli/init.test.ts:59

  • Use the same runInit import used by the rest of the file when exercising --sdk deprecation behavior, so this test validates the public entrypoint rather than a second import path.
    const log = vi.spyOn(console, 'log').mockImplementation(() => {});
    try {
      await runInitFromSource(TEST_ROOT, { sdk: true });


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread test/cli/init.test.ts Resolved
Comment thread docs/src/content/docs/sdk-first-mode.md Resolved
Comment thread docs/src/content/docs/reference/sdk.md Resolved

@bradygaster bradygaster left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

kill it with fire and never allow me to make a bad decision like this without significant ridicule.

@tamirdresher
tamirdresher requested a lite review from Copilot September 3, 2026 09:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The functional behavior remains compatible, tests cover the deprecation messaging, and the remaining feedback is limited to small documentation/help-text consistency nits.

Review tier: Lite
Findings: 2 Low severity

New issues introduced by this change (2)
Severity Finding
Low severity docs/​src/​content/​docs/​sdk-first-mode.md — The page is now presented throughout the docs/nav as “Legacy SDK-First Mode”, but the H1 still…
Low severity packages/​squad-cli/​src/​cli/​core/​command-help.ts — The init subcommand help uses a different deprecation style/casing (“Deprecated: …”) than other…

Comment thread docs/src/content/docs/sdk-first-mode.md Resolved

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

Prominent user-facing docs still describe SDK-first as current/recommended (e.g., “What’s New” current release notes), which conflicts with the PR’s stated goal of recommending markdown-first across active references.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Lite
Findings: 3 Low severity

New issues introduced by this change (1)
Severity Finding
Low severity docs/​src/​content/​docs/​guide.md — This guide correctly marks squad init --sdk as deprecated, but there are still prominent docs…
Pre-existing issues (2)
Severity Finding
Low severity packages/​squad-cli/​src/​cli/​core/​command-help.ts — The init subcommand help uses a different deprecation style/casing (“Deprecated: …”) than other… View comment
Low severity docs/​src/​content/​docs/​sdk-first-mode.md — The page is now presented throughout the docs/nav as “Legacy SDK-First Mode”, but the H1 still… View comment
Suppressed comments (1)

docs/src/content/docs/sdk-first-mode.md:1

  • The page is now positioned as “legacy”, but the H1 still reads “SDK-First Squad Mode”. This makes the navigation/title inconsistent (e.g., sidebar says “Legacy SDK-First Mode”) and can confuse readers about what’s recommended.
# SDK-First Squad Mode

Comment thread docs/src/content/docs/guide.md Resolved

@bradygaster bradygaster left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

EECOM review — PR #1968

Verdict: Changes recommended (blocking messaging-consistency gaps; core runtime/build compatibility is otherwise sound).

What I verified as correct

  • runInit() only adds a warn() + compatibility note when options.sdk is set; the actual configFormat: options.sdk ? 'sdk' : 'markdown' branch and all downstream scaffolding are untouched — squad init --sdk still works, non-interactively and without polluting any JSON/stdout parsing path (no --json mode on init).
  • squad build, squad build --check, squad migrate --to markdown, and all of packages/squad-sdk are untouched — programmatic SDK and existing squad.config.ts build compatibility is fully preserved.
  • Rebuilt the branch (npm run build) and ran npx vitest run test/cli/init.test.ts test/cli/command-help.test.ts — 32/32 pass, matching the PR description.
  • All 7 review threads from the Copilot review are resolved; all required checks are green (the readiness comment showing unresolved items is stale).
  • Changeset is correctly scoped (patch on @bradygaster/squad-cli only).

Blocking findings

  1. [high] Homepage still markets SDK-first as a current headline feature — docs/src/pages/index.astro (feature grid, "SDK-First Design" card, ~line 227) still reads: "Define your team in TypeScript with squad.config.ts. Typed, testable, version-controlled." with no deprecation notice. This directly contradicts the new "Markdown-first design" framing this same PR adds to docs/src/content/docs/concepts/what-is-squad.md. The homepage is the most prominent "active reference" a new user sees, and it was not touched by this PR despite the summary's claim to update messaging "across CLI help, READMEs, onboarding, navigation, role guidance, and active references." Please either remove/relabel this card or add a deprecation note consistent with the rest of the PR.

  2. [medium] squad migrate --to sdk CLI help/runtime doesn't match the new docs — docs/src/content/docs/guide.md's command table now says squad migrate --to sdk is "Deprecated; do not start new SDK-first migrations," but packages/squad-cli/src/cli/core/command-help.ts (migrate help) and packages/squad-cli/src/cli/commands/migrate.ts (runtime) emit no deprecation warning at all. Verified directly: node dist/cli-entry.js migrate --help still prints "Convert between markdown and SDK-First squad formats" with zero deprecation indication. Since this PR's stated goal is CLI-help consistency and it already touches command-help.ts for init, the same treatment should be applied to migrate --to sdk (or the guide.md wording should be walked back to avoid overstating what the CLI actually communicates).

Non-blocking note

  • docs/src/content/docs/whatsnew.md's new "Current status" deprecation banner says deprecated SDK-first mode is "described in older entries below," but the very next bullet is under v0.9.1 — Current Release: "Init scaffolding — squad init --sdk now scaffolds typed casting files..." — worded as an active, still-improving feature. Consider a short deprecation aside on that specific bullet, or reword the banner so it doesn't imply the current-release entry is "older."

Blockers to merge

  • Findings 1–2 above (messaging inconsistency on a primary user-facing surface + CLI help/runtime not matching docs it introduces).
  • No code/build/test blockers — everything else in the diff is accurate and internally consistent.

@bradygaster bradygaster left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I reviewed the current diff and cannot approve this yet. Please update the homepage SDK-First Design content and add a deprecation note to the squad migrate --to sdk help text. The current branch leaves those user-facing surfaces inconsistent with the deprecation described elsewhere.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 59 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 93 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 10 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 242 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

bradygaster added a commit to tamirdresher/squad that referenced this pull request Oct 8, 2026
Preserve the SDK-init deprecation review fixes while resolving the dev merge conflicts in release notes and init coverage.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56b93cdd-082a-48a9-a5b5-bde7429ad4ce
bradygaster added a commit to tamirdresher/squad that referenced this pull request Oct 8, 2026
Bring the deprecation remediation branch current without rebasing or force-pushing.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56b93cdd-082a-48a9-a5b5-bde7429ad4ce
bradygaster added a commit to tamirdresher/squad that referenced this pull request Oct 8, 2026
Mark remaining squad.config.ts guidance as legacy compatibility and remove the SDK-first adoption CTA from the historical release post.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56b93cdd-082a-48a9-a5b5-bde7429ad4ce
bradygaster added a commit to tamirdresher/squad that referenced this pull request Oct 8, 2026
Clarify the historical SDK-First release guidance and align top-level migrate help with the legacy terminology.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56b93cdd-082a-48a9-a5b5-bde7429ad4ce
bradygaster added a commit to tamirdresher/squad that referenced this pull request Oct 8, 2026
Label legacy migration steps as historical compatibility context and direct new teams to markdown-first squad init.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 56b93cdd-082a-48a9-a5b5-bde7429ad4ce
@bradygaster
bradygaster self-requested a review October 8, 2026 05:27
@tamirdresher
tamirdresher force-pushed the squad/341-deprecate-sdk-init branch from 97b7d18 to 9c89057 Compare October 14, 2026 13:53
- Emit deprecation warnings for squad init --sdk and squad migrate --to sdk while preserving runtime and squad build compatibility
- Update CLI help output, homepage feature card, release notes, and documentation to frame markdown-first .squad/ as the recommended layout
- Add CLI init, migrate, and command-help test coverage for deprecation messaging

Closes github#341

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 5cf0811c-a02a-41a7-ab00-904b6900db7b
@tamirdresher
tamirdresher force-pushed the squad/341-deprecate-sdk-init branch from 9c89057 to 4dc7248 Compare October 14, 2026 13:56
@tamirdresher

Copy link
Copy Markdown
Collaborator Author

Rebased onto latest dev (5cd199c) as a single clean commit (4dc7248) and addressed all review items:

  1. Updated the homepage feature card in docs/src/pages/index.astro from "SDK-First Design" to "Markdown-First Design" (.squad/ portable markdown).
  2. Updated packages/squad-cli/src/cli/core/command-help.ts (migrate) and packages/squad-cli/src/cli/commands/migrate.ts (--to sdk) with explicit deprecation warnings (deprecated; removed in v2 — do not start new SDK-first migrations) matching docs/src/content/docs/guide.md, with test coverage in est/cli/command-help.test.ts and est/migrate.test.ts.
  3. Clarified the deprecation callout banner and �0.9.1 init scaffolding entry in docs/src/content/docs/whatsnew.md.

Ready for re-review @bradygaster.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 16 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@github-actions

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 60 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

👋 Friendly nudge — this PR has had no activity for 7 days.

What needs attention:

  • 🔄 Changes requested by @bradygaster. Address their feedback and request re-review.
  • ⬇️ 75 commits behind dev. Rebase to pick up latest changes.

If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows.
This is an automated check that runs on weekdays. It won't nudge the same PR more than once per week.

This branch has not been deployed

No deployments
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.

Shore up squad init --sdk: unified SDK init quality gate PRD: SDK-First Feature Parity — Full Test Results (32/50 verified, 6 gaps, 12 need setup)

3 participants