Skip to content

Make scaffold target explicit: ask, default to sibling, offer git init - #2

Merged
codeyogi911 merged 1 commit into
mainfrom
scaffold-ask-target
Apr 25, 2026
Merged

Make scaffold target explicit: ask, default to sibling, offer git init#2
codeyogi911 merged 1 commit into
mainfrom
scaffold-ask-target

Conversation

@codeyogi911

Copy link
Copy Markdown
Owner

Summary

Follow-up to #1. Fixes a UX gap where /clify-scaffold could land <api-name>-cli/ inside whatever repo the user invoked it from (because clify scaffold-init defaulted --target to cwd). The skill never explicitly asked, and didn't git init the new repo.

After this change:

  • The scaffold skill must call AskUserQuestion before invoking scaffold-init to confirm where the new repo lives.
  • The default offered is the parent of cwd — so the new CLI is a sibling, not nested. Right answer for the common case (including running the skill from inside the clify repo itself).
  • The skill git inits the new repo and creates an "Initial scaffold from clify exemplar" commit, so step 9's substitutions land as a reviewable diff.
  • The binary now prints a "next steps" hint after scaffold-init so the resolved path is visible without --json.
  • README clarified to say generated CLIs are their own project, never nested inside the calling repo unless explicitly requested.

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 /tmp prints the "next steps" hint
  • Manual end-to-end in Claude Code: /clify-scaffold <url> from inside this repo should now ask before placing files

🤖 Generated with Claude Code

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>
@codeyogi911
codeyogi911 merged commit 28d2d7c into main Apr 25, 2026
4 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.

1 participant