feat(repo): show tool-specific next steps after repo init#1443
Conversation
After initializing a repository, users had no guidance on what to do next. Now the init output includes a "What's next:" section with tool-specific onboarding instructions (e.g. "Start Claude Code and run /swamp-getting-started") and a link to the manual. The JSON renderer also includes a `nextSteps` array for programmatic consumers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
CLI UX Review
Blocking
None.
Suggestions
- JSON
nextStepsmissing the manual link (src/presentation/renderers/repo_init.ts,JsonRepoInitRenderer): Log mode always appends→ Read the manual at https://swamp-club.com/manualregardless of enrolled tools, but the JSON renderer'snextStepsarray only contains tool-specific entries (or the--helpfallback). A script consumingnextStepsto build onboarding guidance would silently omit the docs link. Consider pushing the manual URL intonextStepsin the JSON renderer the same way it's always surfaced in log mode.
Verdict
PASS — no blocking issues. The "What's next:" section is clear, well-formatted, and consistent with the existing renderer's style. Tool-specific instructions are accurate and actionable, and the no-tool fallback to swamp --help is a sensible default. JSON output correctly extends e.data with a nextSteps array without dropping any existing fields.
There was a problem hiding this comment.
Code Review
Clean, well-scoped PR. The presentation-layer placement of TOOL_NEXT_STEPS is correct — this is rendering concern, not domain logic. Import boundaries are respected (libswamp types via mod.ts, no internal path imports). Test coverage is thorough with 6 new tests covering log/json × single-tool/multi-tool/no-tool. The RepoInitData shape in makeInitData matches the interface exactly. No security concerns.
Blocking Issues
None.
Suggestions
-
JSON
nextStepsmissing the manual link — The log renderer always appends"Read the manual at https://swamp-club.com/manual"(line 157), but the JSON renderer doesn't include it in thenextStepsarray (lines 170-177). Programmatic consumers won't see it. Consider addingsteps.push("Read the manual at https://swamp-club.com/manual")before theJSON.stringifycall if the intent is parity between modes. -
assertStringIncludes(output, "manual")test missing — Neither log nor JSON test asserts the manual link appears. A one-linerassertStringIncludes(output, "swamp-club.com/manual")in the claude-tool log test would lock in the behavior cheaply.
Summary
swamp repo init, show a "What's next:" section with tool-specific onboarding instructions (e.g. "Start Claude Code and run /swamp-getting-started" for claude, "Open this project in Cursor and run /swamp-getting-started" for cursor, etc.)swamp --help" when no tools are enrolled (--tool none)nextStepsarray for programmatic consumersTest Plan
nextStepsarraydeno fmt,deno lint,deno checkall clean🤖 Generated with Claude Code