From 4dff9899cc4f6b1e66949680fa2f772e472f9318 Mon Sep 17 00:00:00 2001 From: David Sienkowski Date: Wed, 4 Feb 2026 18:05:52 -0500 Subject: [PATCH] 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. --- commands/gsd/set-profile.md | 20 +++++++++++++++----- commands/gsd/settings.md | 18 ++++++++++++++++-- 2 files changed, 31 insertions(+), 7 deletions(-) diff --git a/commands/gsd/set-profile.md b/commands/gsd/set-profile.md index 9791d68f1..74f13ae7c 100644 --- a/commands/gsd/set-profile.md +++ b/commands/gsd/set-profile.md @@ -30,17 +30,27 @@ if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]: STOP ``` -## 2. Check for project +## 2. Ensure config exists ```bash ls .planning/config.json 2>/dev/null ``` -If no `.planning/` directory: +If `.planning/config.json` missing, create it with defaults: +```bash +mkdir -p .planning ``` -Error: No GSD project found. -Run /gsd:new-project first to initialize a project. +```json +{ + "model_profile": "balanced", + "workflow": { + "research": true, + "plan_check": true, + "verifier": true + } +} ``` +Write this to `.planning/config.json`, then continue. ## 3. Update config.json @@ -49,7 +59,7 @@ Read current config: cat .planning/config.json ``` -Update `model_profile` field (or add if missing): +Update `model_profile` field: ```json { "model_profile": "$ARGUMENTS.profile" diff --git a/commands/gsd/settings.md b/commands/gsd/settings.md index f508e6066..bd9887f2f 100644 --- a/commands/gsd/settings.md +++ b/commands/gsd/settings.md @@ -15,13 +15,27 @@ Updates `.planning/config.json` with workflow preferences and model profile sele -## 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