/setup
Auto-generate project workflow config from existing PRD and CLAUDE.md. Zero interactive questions — all answers extracted from project data that already exists after /scaffold.
When to use
After /scaffold creates a project, before /plan. Creates docs/workflow.md so /plan and /build can work.
MCP Tools (use if available)
project_info(name) — get project details, detected stack
kb_search(query) — search for dev principles, manifest, stack templates
codegraph_query(query) — check project dependencies in code graph
If MCP tools are not available, fall back to reading local files only.
Steps
Detect project root:
- If
$ARGUMENTS is provided, look for a project with that name in the current directory or projects_dir from ~/.solo-factory/defaults.yaml.
- Otherwise use current working directory.
- Verify the directory exists and has
CLAUDE.md.
- If not found, ask via AskUserQuestion.
Check if already initialized:
- If
docs/workflow.md exists, warn and ask whether to regenerate.
Read project data (parallel — all reads at once):
CLAUDE.md — tech stack, architecture, commands, Do/Don't
docs/prd.md — problem, users, solution, features, metrics, pricing
package.json or pyproject.toml — exact dependency versions
Makefile — available commands
- Linter configs (
.eslintrc*, eslint.config.*, .swiftlint.yml, ruff.toml, detekt.yml)
Read ecosystem sources (optional — enhances quality):
- Detect stack name from CLAUDE.md (look for "Stack:" or the stack name in tech section).
- If MCP
kb_search available: search for stack template and dev-principles.
- Otherwise: look for
stacks/<stack>.yaml and dev-principles.md in .solo/ or plugin templates directory (if accessible).
- If neither available: derive all info from CLAUDE.md + package manifest (sufficient).
Detect languages from package manifest:
package.json → TypeScript
pyproject.toml → Python
*.xcodeproj or Package.swift → Swift
build.gradle.kts → Kotlin
Create docs directory if needed:
mkdir -p docs
Generate docs/workflow.md:
Based on dev-principles (from MCP/KB or built-in defaults):
# Workflow — {ProjectName}
## TDD Policy
**Moderate** — Tests encouraged but not blocking. Write tests for:
- Business logic and validation
- API route handlers
- Complex algorithms
Tests optional for: UI components, one-off scripts, prototypes.
## Test Framework
{from package manifest devDeps: vitest/jest/pytest/xctest}
## Commit Strategy
**Conventional Commits**
Format: `<type>(<scope>): <description>`
Types: feat, fix, refactor, test, docs, chore, perf, style
## Verification Checkpoints
**After each phase completion:**
1. Run tests — all pass
2. Run linter — no errors
3. Run build — successful (if applicable)
4. Manual smoke test
## Branch Strategy
- `main` — production-ready
- `feat/<track-id>` — feature branches
- `fix/<description>` — hotfixes
Update CLAUDE.md — add workflow reference to Key Documents section if not present.
Show summary and suggest next step:
Setup complete for {ProjectName}!
Created:
docs/workflow.md — TDD moderate, conventional commits
Next: /plan "Your first feature"
Common Issues
CLAUDE.md not found
Cause: Project not scaffolded or running from wrong directory.
Fix: Run /scaffold first, or ensure you're in the project root with CLAUDE.md.
workflow.md already exists
Cause: Previously set up.
Fix: Skill warns and asks whether to regenerate. Existing file is preserved unless you confirm overwrite.
Wrong test framework detected
Cause: Multiple test frameworks in devDependencies.
Fix: Skill picks the first found. Edit docs/workflow.md manually to specify the correct framework.
1---2name: solo-setup3description: Auto-generate project workflow config (docs/workflow.md) from existing PRD and CLAUDE.md with zero questions. Use when user says "set up workflow", "configure TDD", "wire up dev workflow", or after running /scaffold before /plan. Do NOT use for founder setup (use /init) or project scaffolding (use /scaffold).4license: MIT5---6
7# /setup
8
9Auto-generate project workflow config from existing PRD and CLAUDE.md. Zero interactive questions — all answers extracted from project data that already exists after `/scaffold`.
10
11## When to use
12
13After `/scaffold` creates a project, before `/plan`. Creates `docs/workflow.md` so `/plan` and `/build` can work.
14
15## MCP Tools (use if available)
16
17- `project_info(name)` — get project details, detected stack
18- `kb_search(query)` — search for dev principles, manifest, stack templates
19- `codegraph_query(query)` — check project dependencies in code graph
20
21If MCP tools are not available, fall back to reading local files only.
22
23## Steps
24
251. **Detect project root:**
26 - If `$ARGUMENTS` is provided, look for a project with that name in the current directory or `projects_dir` from `~/.solo-factory/defaults.yaml`.
27 - Otherwise use current working directory.
28 - Verify the directory exists and has `CLAUDE.md`.
29 - If not found, ask via AskUserQuestion.
30
312. **Check if already initialized:**
32 - If `docs/workflow.md` exists, warn and ask whether to regenerate.
33
343. **Read project data** (parallel — all reads at once):
35 - `CLAUDE.md` — tech stack, architecture, commands, Do/Don't
36 - `docs/prd.md` — problem, users, solution, features, metrics, pricing
37 - `package.json` or `pyproject.toml` — exact dependency versions
38 - `Makefile` — available commands
39 - Linter configs (`.eslintrc*`, `eslint.config.*`, `.swiftlint.yml`, `ruff.toml`, `detekt.yml`)
40
414. **Read ecosystem sources** (optional — enhances quality):
42 - Detect stack name from CLAUDE.md (look for "Stack:" or the stack name in tech section).
43 - If MCP `kb_search` available: search for stack template and dev-principles.
44 - Otherwise: look for `stacks/<stack>.yaml` and `dev-principles.md` in `.solo/` or plugin templates directory (if accessible).
45 - If neither available: derive all info from CLAUDE.md + package manifest (sufficient).
46
475. **Detect languages** from package manifest:
48 - `package.json` → TypeScript
49 - `pyproject.toml` → Python
50 - `*.xcodeproj` or `Package.swift` → Swift
51 - `build.gradle.kts` → Kotlin
52
536. **Create docs directory if needed:**
54 ```bash
55 mkdir -p docs
56 ```
57
587. **Generate `docs/workflow.md`:**
59 Based on dev-principles (from MCP/KB or built-in defaults):
60 ```markdown
61 # Workflow — {ProjectName}
62
63 ## TDD Policy
64 **Moderate** — Tests encouraged but not blocking. Write tests for:
65 - Business logic and validation
66 - API route handlers
67 - Complex algorithms
68 Tests optional for: UI components, one-off scripts, prototypes.
69
70 ## Test Framework
71 {from package manifest devDeps: vitest/jest/pytest/xctest}
72
73 ## Commit Strategy
74 **Conventional Commits**
75 Format: `<type>(<scope>): <description>`
76 Types: feat, fix, refactor, test, docs, chore, perf, style
77
78 ## Verification Checkpoints
79 **After each phase completion:**
80 1. Run tests — all pass
81 2. Run linter — no errors
82 3. Run build — successful (if applicable)
83 4. Manual smoke test
84
85 ## Branch Strategy
86 - `main` — production-ready
87 - `feat/<track-id>` — feature branches
88 - `fix/<description>` — hotfixes
89 ```
90
918. **Update `CLAUDE.md`** — add workflow reference to Key Documents section if not present.
92
939. **Show summary and suggest next step:**
94 ```
95 Setup complete for {ProjectName}!
96
97 Created:
98 docs/workflow.md — TDD moderate, conventional commits
99
100 Next: /plan "Your first feature"
101 ```
102
103## Common Issues
104
105### CLAUDE.md not found
106**Cause:** Project not scaffolded or running from wrong directory.
107**Fix:** Run `/scaffold` first, or ensure you're in the project root with CLAUDE.md.
108
109### workflow.md already exists
110**Cause:** Previously set up.
111**Fix:** Skill warns and asks whether to regenerate. Existing file is preserved unless you confirm overwrite.
112
113### Wrong test framework detected
114**Cause:** Multiple test frameworks in devDependencies.
115**Fix:** Skill picks the first found. Edit `docs/workflow.md` manually to specify the correct framework.