fix: /init with no args — accept follow-up as cast prompt, create team files in fresh projects#217
Merged
bradygaster merged 3 commits intobradygaster:devfrom Mar 7, 2026
Conversation
…radygaster#216) When the user runs '/init' with no inline prompt, the TUI showed guidance text but did not track any state. The user's next message then hit the 'No Squad team found' guard in handleDispatch and showed an error instead of starting team casting. Changes: - commands.ts: add awaitInitPrompt?: boolean to CommandResult; set it in the no-args /init path alongside the existing guidance output - App.tsx: track awaitingInitPrompt state; when set, route the next non-slash message as a coordinator cast with skipCastConfirmation: false (shows confirmation dialog, same as freeform cast) - index.ts handleDispatch: when skipCastConfirmation is explicitly set (true or false, not undefined) and team.md is absent, bypass the 'No Squad team found' guard and call handleInitCast directly This means the full init flow now works end-to-end: /init → guidance text + set awaitingInitPrompt <description> → routed as cast → handleInitCast → team proposed y → finalizeCast → team files created <original msg> → re-dispatched to the new team Tests added in test/init-autocast.test.ts covering: - awaitInitPrompt=true on no-args /init - awaitInitPrompt=true on whitespace-only args - awaitInitPrompt undefined when inline prompt provided - guard bypass contract for skipCastConfirmation values
In a fresh project (no .squad/ directory), createTeam was only running the 'if (existsSync(teamPath))' update path, silently skipping both team.md and routing.md creation. After finalizeCast, dispatchToCoordinator would build a new session, buildCoordinatorPrompt would fail to read team.md, and the coordinator would fall through to the 'NO TEAM CONFIGURED' prompt -- telling the user to run /init again. Fix: add else-branches to create team.md and routing.md from scratch when the files don't yet exist. The fresh team.md includes a proper ## Members section with data rows so hasRosterEntries() returns true and the coordinator enters Team Mode correctly. Tests: 9 new createTeam integration tests in cast-parser.test.ts covering: - fresh project creates team.md with ## Members data rows - fresh project creates routing.md - project description included in header - hasRosterEntries passes after createTeam (coordinator regression guard) - built-in Scribe and Ralph added - agent charter and history files created - existing project Members section updated without clobbering surrounding content - existing project passes hasRosterEntries after update
fd217e4 to
f8ea328
Compare
williamhallatt
added a commit
to williamhallatt/squad
that referenced
this pull request
Mar 6, 2026
) Closes bradygaster#218 Five gaps identified during PR bradygaster#217 contribution from a fork: - Fork-first setup instructions in Getting Started - PR process now specifies --base dev and explicit --head - Changeset added as a required step in the PR checklist - Branch Strategy: bradygaster/dev clarified as PR target for all contributions - New 'Keeping Your Fork in Sync' section with rebase instructions Also captures fork procedure in Kobayashi's charter (permanent procedure) and history (lessons from today's session).
This was referenced Mar 6, 2026
bradygaster
added a commit
that referenced
this pull request
Mar 7, 2026
Session: 2026-03-07T01-13-00Z-phase2-complete Requested by: Brady Changes: - Merged 3 inbox decisions (Kobayashi PR merges, Keaton community PRs, Fenster template fix) - Logged orchestration results for all 3 agents (Kobayashi, Keaton, Hockney) - Logged Phase 2 session completion - Appended Phase 2 results to agent history files (cross-agent updates) - Deduplicated: No duplicate decisions found; all 3 inbox items were new. Merges completed: - PR #232: Scribe runtime state fix (86598f4) - PR #212: Version stamp preservation (0fedcce) - PR #230: CLI wire-up squad link + squad init --mode remote (6d0bd56) - PR #217: TUI /init no-args flow fix (20970f9) - PR #219: Fork contribution workflow docs (157b8c0) Test results: 130/134 test files passing. 12 pre-existing failures in consult, REPL, status, acceptance modes. Core CLI solid.
jongio
pushed a commit
to jongio/squad
that referenced
this pull request
Mar 9, 2026
…#217) - Update Quick Start section with npm install as primary option - Add Legacy section for GitHub-native distribution reference - Add Monorepo Development section documenting build/test/lint workflow - Update command table to show 'squad' command format - Update help text in src/index.ts to reflect npm-based installation - Add Installation and Insider channel sections to help output - Create CONTRIBUTING.md with development workflow and monorepo guide Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
jongio
pushed a commit
to jongio/squad
that referenced
this pull request
Mar 9, 2026
…help-update docs: update README, help output, and add CONTRIBUTING.md (bradygaster#217)
jongio
pushed a commit
to jongio/squad
that referenced
this pull request
Mar 9, 2026
Session: 2026-02-21T2225-m5-docs-bugfix Scribe: Merged decision inbox and logged orchestration Changes: - Created orchestration logs for McManus (docs bradygaster#217), Fenster (guard bradygaster#273), Kobayashi (blocked bradygaster#209) - Created session log: M5 round with two PRs merged, one issue blocked - Merged decisions: ensureSquadPath() guard, CLI routing testability pattern - Deleted merged inbox files: fenster-no-root-clutter.md, hockney-resolution-tests.md - Updated agents history.md with cross-team updates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #216
Summary
Fixes two related bugs in the
/initno-args TUI flow that together produced the UX shown in the issue.Bug 1 — Follow-up message ignored after
/init(no args)Fix:
awaitInitPrompt?: booleantoCommandResultinterface (commands.ts)awaitingInitPromptstate toApp.tsx— when set, the next non-slash message is intercepted and dispatched as a coordinator cast withskipCastConfirmation: falsehandleDispatch(index.ts): whenparsed.skipCastConfirmation !== undefined, skip the team-file guard and callhandleInitCastdirectlyBug 2 — After team is hired, coordinator says "no team yet"
Found during smoke testing. After confirming
yto the team proposal in a fresh project, the TUI showed:Root cause:
createTeamincast.tsonly ran theif (existsSync(teamPath))update path. In a fresh project (no.squad/directory), neitherteam.mdnorrouting.mdexisted, so both were silently skipped.buildCoordinatorPromptthen failed to read the missingteam.mdand fell back to itsNO TEAM CONFIGUREDinstructions.Fix: Added
elsebranches to createteam.mdandrouting.mdfrom scratch when the files don't exist. The## Memberstable is populated with data rows sohasRosterEntries()returnstrueand the coordinator enters Team Mode correctly.Files changed
packages/squad-cli/src/cli/shell/commands.tsawaitInitPrompt?toCommandResult;handleInitsets it on no-args pathpackages/squad-cli/src/cli/shell/components/App.tsxawaitingInitPromptstate; intercepts follow-up message and routes as castpackages/squad-cli/src/cli/shell/index.tshandleDispatchbypasses team-file guard whenskipCastConfirmation !== undefinedpackages/squad-cli/src/cli/core/cast.tscreateTeamnow createsteam.mdandrouting.mdin fresh projectstest/init-autocast.test.tstest/cast-parser.test.tscreateTeam(fresh + existing project paths)All 63 tests pass (
npx vitest run test/init-autocast.test.ts test/cast-parser.test.ts).