Make scaffold target explicit: ask, default to sibling, offer git init - #2
Merged
Conversation
Previously /clify-scaffold could land <api-name>-cli/ inside whatever repo the user invoked it from (cwd default). Now the scaffold skill MUST use AskUserQuestion to confirm the parent directory, with the default being the parent of cwd (so the new CLI is a sibling, not nested). The skill also offers to git init the new repo so step 9's substitutions land as a reviewable diff. Binary now prints a 'next steps' hint after scaffold-init so the path is visible without --json. README updated to call out the explicit prompt. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Follow-up to #1. Fixes a UX gap where
/clify-scaffoldcould land<api-name>-cli/inside whatever repo the user invoked it from (becauseclify scaffold-initdefaulted--targettocwd). The skill never explicitly asked, and didn'tgit initthe new repo.After this change:
AskUserQuestionbefore invokingscaffold-initto confirm where the new repo lives.git inits the new repo and creates an "Initial scaffold from clify exemplar" commit, so step 9's substitutions land as a reviewable diff.scaffold-initso the resolved path is visible without--json.Why
Was triggered by user feedback after the v0.2 merge: "where does this create the cli? shouldn't this be a new repo or something? or the agent should ask?" Yes on both counts.
Test plan
npm test→ 15/15 pass (no validator changes; existing tests cover the binary path)clify scaffold-init demo-target --target /tmpprints the "next steps" hint/clify-scaffold <url>from inside this repo should now ask before placing files🤖 Generated with Claude Code