fix(settings): auto-create config.json when missing (#264)
set-profile and settings commands hard-errored when .planning/config.json did not exist, blocking users from changing model profile before running new-project. Create config.json with balanced defaults when missing.
This commit is contained in:
@@ -15,13 +15,27 @@ Updates `.planning/config.json` with workflow preferences and model profile sele
|
||||
|
||||
<process>
|
||||
|
||||
## 1. Validate Environment
|
||||
## 1. Ensure config exists
|
||||
|
||||
```bash
|
||||
ls .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
**If not found:** Error - run `/gsd:new-project` first.
|
||||
If `.planning/config.json` missing, create it with defaults:
|
||||
```bash
|
||||
mkdir -p .planning
|
||||
```
|
||||
```json
|
||||
{
|
||||
"model_profile": "balanced",
|
||||
"workflow": {
|
||||
"research": true,
|
||||
"plan_check": true,
|
||||
"verifier": true
|
||||
}
|
||||
}
|
||||
```
|
||||
Write this to `.planning/config.json`, then continue.
|
||||
|
||||
## 2. Read Current Config
|
||||
|
||||
|
||||
Reference in New Issue
Block a user