---
name: init
description: SmartStack project initialization via ss init
group: A
allowed-tools: [Read, Glob, Grep, Bash]  # Bash: CLI invocation
---

# Skill: SmartStack Project Initialization

## Objective
Guide the initialization of a new SmartStack project via `ss init`.

## Command
```bash
ss init <app-name>
ss init --here
ss init --yes
ss init --preview
ss init --dry-run
```

## Initialization Steps

### 1. Prerequisites
- .NET SDK >= 10.0 (required)
- Docker (optional)

### 2. Context Detection
- GitFlow worktree (`.bare/` in parent)
- C# namespace validation (PascalCase)

### 3. Configuration
- Database: SQL Server
- Email: Development | Mailgun | AzureAcs | Disabled

### 4. Backend Structure (.NET Clean Architecture)
```
src/{App}.Domain/ | {App}.Application/ | {App}.Infrastructure/ | {App}.Api/
```

### 5. Frontend Structure (React)
```
web/{app-lower}-web/src/
```

### 6. Docker
- Dockerfile.api, Dockerfile.web, docker-compose.yml

### 7. Config Files
- `.smartstack/config.json`, `.gitignore`, `.vscode/`, `CLAUDE.md`

## Summary
- Checkpoint via `.smartstack/init-state.json`
- `safeWriteFile` with SHA-256
