Skip to content

Commit 2271d55

Browse files
committed
fix(setup): detect existing provider config before mutating
v4 Shade dogfood (2026-04-13) surfaced LEARNING #9: the skill blindly ran `task-master models --set-main sonnet --claude-code` on a machine that already had `gemini-cli / gemini-3-pro-preview` configured as main. The prose documentation made the child think "I should configure this" even though the user's config was already valid. Scope violation. Rewrite phases/SETUP.md Step 3 with explicit detect-first logic: - READ task-master models output before running any --set-* commands - If Main/Research/Fallback are all populated with a supported provider: SKIP Step 3 entirely, proceed to probe test - If partial: only set the missing roles, never overwrite what exists - If empty: full configure - If unsupported/deprecated: ask the user before mutating Add a decision table mapping model output states to actions. Preserves the recommended-stack documentation but gates it behind detection. A user whose config already works wants the skill to leave them alone in that dimension and focus on the actual work. Fixes: LEARNING #9 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 332c147 commit 2271d55

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

phases/SETUP.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,24 @@ task-master init --yes
4242

4343
**If exists**: Continue silently.
4444

45-
## Step 3: Configure Provider
45+
## Step 3: Configure Provider (DETECT FIRST, MUTATE ONLY IF EMPTY)
4646

4747
```bash
4848
task-master models
4949
```
5050

51-
Check the output for an active main model provider.
51+
**READ the output carefully before running any `--set-*` commands.** If Main, Research, and Fallback slots are already populated with a supported provider, **SKIP the rest of this step entirely and proceed to Step 4 (probe test).** The user already has a working config and we must not overwrite it.
52+
53+
### How to decide: mutate or skip?
54+
55+
| `task-master models` output | Action |
56+
|---|---|
57+
| Main/Research/Fallback all show a provider + model ID | **SKIP** — config is valid, do not mutate. Go to Step 4. |
58+
| Main is set but Research/Fallback are empty | **Partial mutate** — only set the missing roles, never overwrite what exists. |
59+
| All three empty, no config file, fresh install | **Full configure** — use the recommended stack below. |
60+
| Provider name shown but flagged as "unsupported" or "deprecated" | **Ask the user before mutating.** Do not silently swap. |
61+
62+
This detect-first rule exists because v4 dogfood (2026-04-13) surfaced LEARNING #9: the skill blindly overrode an existing `gemini-cli / gemini-3-pro-preview` config with `claude-code / sonnet` because the prose documentation made the child think "I should configure this." That was a scope violation. **A user whose config already works wants the skill to leave them alone in that dimension.**
5263

5364
**Important:** TaskMaster's CLI uses a two-argument model syntax: `--set-main <model-id> --<provider-flag>`. The model ID is NOT the provider name.
5465

0 commit comments

Comments
 (0)