Skip to content

Add --in-place flag to init-project.js#25

Merged
jrenaldi79 merged 1 commit intomainfrom
claude/fix-in-place
Mar 24, 2026
Merged

Add --in-place flag to init-project.js#25
jrenaldi79 merged 1 commit intomainfrom
claude/fix-in-place

Conversation

@jrenaldi79
Copy link
Copy Markdown
Owner

@jrenaldi79 jrenaldi79 commented Mar 24, 2026

Summary

Root cause of setup eval failures: init-project.js --name=myapp always creates a myapp/ subdirectory, but the grader checks the temp dir root.

  • New --in-place flag: uses the name for package.json but scaffolds in the current directory
  • SKILL.md Phase 3 now defaults to --in-place unless the user explicitly requests a new subdirectory
  • 2 new tests for --in-place behavior (114 total)

Test plan

  • npx jest --config '{}' tests/scripts/init-project.test.js — 15 tests pass
  • --in-place creates files in cwd, not in subdirectory
  • --in-place uses --name value in package.json

https://claude.ai/code/session_01Hbxy31TkbujzukGFSxLcPw

Summary by CodeRabbit

Release Notes

  • New Features

    • Added --in-place flag to scaffold projects directly in the current directory without creating a subdirectory.
  • Documentation

    • Updated scaffolding instructions to clarify --in-place as the default option when the current directory is empty.
  • Tests

    • Added test coverage validating --in-place flag functionality and project naming behavior.

Root cause of eval failure: init-project.js --name=X always creates
a subdirectory. When /setup runs in an empty directory, the project
should be scaffolded in-place.

--in-place uses the name for package.json but stays in cwd.
SKILL.md now defaults to --in-place unless user explicitly requests
a new subdirectory.

https://claude.ai/code/session_01Hbxy31TkbujzukGFSxLcPw
@jrenaldi79 jrenaldi79 merged commit ba82ff9 into main Mar 24, 2026
1 of 5 checks passed
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 24, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 0a2b4c2e-92d3-4e61-afd3-659873e42bcb

📥 Commits

Reviewing files that changed from the base of the PR and between 136c9e1 and ea470ea.

📒 Files selected for processing (4)
  • CLAUDE.md
  • skills/setup/SKILL.md
  • skills/setup/scripts/init-project.js
  • tests/scripts/init-project.test.js

📝 Walkthrough

Walkthrough

A new --in-place CLI flag is added to the project initialization script, enabling projects to be scaffolded directly in the current working directory instead of creating a subdirectory. Documentation is updated to reflect this new capability and clarify default scaffolding behavior.

Changes

Cohort / File(s) Summary
Documentation Updates
CLAUDE.md, skills/setup/SKILL.md
Updated key modules table and documentation to reflect --in-place scaffolding behavior. Removed legacy critical gotchas about eval prompt phrasing. Added explicit instructions for the --in-place command as the default scaffold path.
Core Feature Implementation
skills/setup/scripts/init-project.js
Added --in-place CLI flag parsing. Modified project directory resolution to skip subdirectory creation when flag is set. Updated projectName derivation to prefer --name value when provided, independent of directory handling mode.
Feature Tests
tests/scripts/init-project.test.js
Added comprehensive test suite validating --in-place flag behavior: scaffolding occurs directly in working directory with package.json and src at root level; --name value correctly sets the package name regardless of directory structure.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Hops in place, no subdirs today!
With --in-place, we scaffold right away,
Current directory, cozy and tight,
Project roots here—everything's right!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/fix-in-place

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jrenaldi79 jrenaldi79 deleted the claude/fix-in-place branch March 25, 2026 14:02
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.

2 participants