| name | s-new |
| description | Initialize a new project with .planning/ and docs/ structure, CLAUDE.md, and git repo |
/s:new - Project Initialization
You are initializing a brand new project using the claude-stack workflow. Follow every step below in order. Do not skip steps.
Step 1: Gather Project Information
Ask the user for the following. Wait for their response before proceeding:
- Project name (kebab-case preferred, e.g.
my-awesome-app)
- One-line description of what the project does
If the user provided these as arguments (e.g. /s:new my-app "A task management API"), extract them directly and skip asking.
Step 2: Verify Working Directory
Check if the current directory is appropriate:
- If the user is in an existing project directory, confirm they want to initialize here.
- If a
.planning/ directory already exists, STOP and warn: "This project already has a .planning/ directory. Use /s:resume to continue an existing project."
Step 3: Create .planning/ Structure
Copy the planning templates from the plugin into the project:
${CLAUDE_PLUGIN_ROOT}/templates/planning/ --> .planning/
This creates:
.planning/PROJECT.md
.planning/REQUIREMENTS.md
.planning/ROADMAP.md
.planning/STATE.md
.planning/phases/ (empty, will be populated by /s:plan)
Read each template file from ${CLAUDE_PLUGIN_ROOT}/templates/planning/ and write it to .planning/, replacing placeholders.
Step 4: Create docs/ Structure
Copy the docs templates from the plugin:
${CLAUDE_PLUGIN_ROOT}/templates/docs/ --> docs/
This creates:
docs/brainstorms/.gitkeep
docs/plans/.gitkeep
docs/solutions/.gitkeep
Step 5: Fill PROJECT.md
Open .planning/PROJECT.md and fill in the placeholders:
- Replace
{PROJECT_NAME} with the project name
- Replace
{DATE} with today's date (YYYY-MM-DD format)
- Add the one-line description to the Vision section
- Leave Core Values, Constraints, and Tech Stack as placeholder prompts for the user to fill during
/s:discuss
Step 6: Generate Project CLAUDE.md
Create a CLAUDE.md file in the project root with the following sections:
# {PROJECT_NAME}
{one-line description}
## Project Structure
- `.planning/` - Project memory (STATE, REQUIREMENTS, ROADMAP, phase plans)
- `docs/` - Knowledge base (brainstorms, plans, solutions)
## Workflow
Use `/s:status` to see current state. Skill chain:
`/s:new` > `/s:discuss` > `/s:plan` > `/s:build` > `/s:review` > `/s:verify` > `/s:ship` > `/s:compound`
## Rules
- Follow TDD: write failing test before implementation
- Never delete `.planning/` or `docs/` directories
- Run `/s:compound` after completing features to persist learnings
## Tech Stack
(To be defined during `/s:discuss`)
## Created
{DATE}
Step 7: Initialize Git Repository
Check if a git repo already exists:
- If
.git/ exists, skip git init
- If no git repo, run
git init
Create a .gitignore if one does not exist, including common entries:
node_modules/
.env
.env.local
dist/
build/
*.log
.DS_Store
Step 8: Initial Commit
Stage all created files and make an initial commit:
git add .planning/ docs/ CLAUDE.md .gitignore
git commit -m "feat: initialize {PROJECT_NAME} with claude-stack"
Step 9: Update STATE.md
Update .planning/STATE.md with the following:
- Status:
initialized
- Active Phase:
-
- Last Updated: today's date
- Current Focus: "Project created. Run
/s:discuss to define requirements."
- Add a decision entry:
{DATE} | Project initialized | Starting new project with claude-stack
Step 10: Suggest Next Step
Output to the user:
Project "{PROJECT_NAME}" initialized successfully.
Created:
.planning/PROJECT.md - Project vision and constraints
.planning/REQUIREMENTS.md - Requirements (empty, will be filled by /s:discuss)
.planning/ROADMAP.md - Roadmap (empty, will be filled by /s:plan)
.planning/STATE.md - Current project state
docs/brainstorms/ - For brainstorm outputs
docs/plans/ - For implementation plans
docs/solutions/ - For learnings and solutions
CLAUDE.md - Project instructions for Claude
Next step: Run `/s:discuss` to define requirements through structured discussion.
Error Handling
- If any file copy fails, report which file failed and stop
- If git commit fails, report the error but do not roll back created files
- If the project name contains invalid characters, ask for a corrected name
- If running in a read-only directory, inform the user and stop