| name | init |
| description | Initialize project with Digital Service Orchestra config |
| user-invocable | true |
| allowed-tools | Read, Write, Edit, Glob, Grep, Bash |
Initialize Project with Digital Service Orchestra
Set up a new project to use Digital Service Orchestra by auto-detecting the stack and writing a
.claude/dso-config.conf with sensible defaults.
Usage
/dso:init # Initialize current directory
/dso:init [project-dir] # Initialize a specific directory
Steps
Step 1: Detect Stack
Run detect-stack.sh to identify the project type:
STACK=$(bash ".claude/scripts/dso detect-stack.sh" "${PROJECT_DIR:-.}")
The script inspects marker files and returns one of:
python-poetry — pyproject.toml found
rust-cargo — Cargo.toml found
golang — go.mod found
node-npm — package.json found
convention-based — Makefile with ≥2 standard targets
unknown — no recognized markers
Step 2: Map Stack to Default Commands
Use the detected stack to populate sensible command defaults:
| Stack | test | lint | format | format_check |
|---|
python-poetry | make test | make lint | make format | make format-check |
node-npm | npm test | npm run lint | npm run format | — |
rust-cargo | cargo test | cargo clippy | cargo fmt | cargo fmt --check |
golang | go test ./... | golangci-lint run | gofmt -l . | — |
convention-based | make test | make lint | make format | — |
Additional defaults for python-poetry:
validate: .claude/scripts/dso validate.sh --ci
Step 3: Check for Existing Config
Before proposing, check if .claude/dso-config.conf already exists using read-config.sh:
EXISTING_STACK=$(bash ".claude/scripts/dso read-config.sh" stack "${PROJECT_DIR:-.}/.claude/dso-config.conf")
If the file exists, warn the user and ask for confirmation before overwriting.
Step 4: Show Proposed Config
Present the proposed .claude/dso-config.conf to the user before writing:
# .claude/dso-config.conf — generated by /dso:init
stack=<detected-stack>
commands.test=<default-test-command>
commands.lint=<default-lint-command>
commands.format=<default-format-command>
# commands.format_check=<default-format-check-command> # if applicable
# commands.validate=<validate-command> # if applicable
Step 5: Write Config (with Overwrite Guard)
Write .claude/dso-config.conf to the .claude/ directory under the project directory.
Escalation: Unknown Stack
If detect-stack.sh returns unknown, do not guess. Instead:
- Report that no recognized stack markers were found.
- Ask the user to specify the commands manually:
No recognized stack found in <project-dir>.
Please provide:
- test command (e.g., 'make test'):
- lint command (e.g., 'make lint'):
- format command (e.g., 'make format', or leave blank):
- Use the user-provided values to populate
.claude/dso-config.conf.
If project-dir is provided but does not exist, report the error and abort before Step 1.