@@ -51,3 +51,95 @@ Affected skills (currently `model: sonnet`):
5151- [ ] No SKILL.md file under ` plugin/skills/ ` contains ` model: sonnet ` in frontmatter
5252- [ ] ` plugin/rules/skill-models.md ` exists and lists all 31 previously-Sonnet skills with preference order [ sonnet, opus]
5353- [ ] E2E verification: invoke a skill that previously had ` model: sonnet ` and confirm the agent selects the correct model based on ` plugin/rules/skill-models.md `
54+
55+ ## Sub-Agent Waves
56+
57+ ### Wave 1
58+
59+ - ** Step 1: Create ` plugin/rules/skill-models.md ` **
60+
61+ Create a new file at ` plugin/rules/skill-models.md ` with the following exact content:
62+
63+ Line 1: ` --- `
64+ Line 2: ` mainAgent: true `
65+ Line 3: ` --- `
66+ Line 4: ` ## Model Selection for Skills `
67+ Line 5: (blank)
68+ Line 6: ` When invoking skills via the Skill tool or spawning subagents via the Agent/Task tool, use the following model `
69+ Line 7: ` preference: `
70+ Line 8: (blank)
71+ Line 9: ` **Sonnet-preferred skills** (use ` model: sonnet` by default, fall back to ` model: opus` if Sonnet is rate-limited): `
72+ Line 10: (blank)
73+ Then list all 31 skills as markdown bullet items (e.g., ` - ` +backtick+` cat:add-agent ` +backtick)
74+ After the list:
75+ (blank line)
76+ ` **Fallback behavior:** If Sonnet returns a rate-limit error, retry the same skill invocation using Opus. Do not `
77+ ` ask the user before falling back — rate-limit fallback is automatic. `
78+ (blank line)
79+ ` **Skills not listed above** use their SKILL.md ` model:` frontmatter (typically ` haiku` for lightweight tasks). `
80+ ` Do not override their model selection. `
81+
82+ Note: Files in ` plugin/rules/ ` are exempt from license headers per ` .claude/rules/license-header.md ` .
83+
84+ - ** Step 2: Remove ` model: sonnet ` from all 31 SKILL.md files**
85+
86+ For each of the following 31 SKILL.md files, remove the line ` model: sonnet ` from the YAML frontmatter. Leave all
87+ other frontmatter fields intact. The files are:
88+
89+ 1 . ` plugin/skills/add-agent/SKILL.md `
90+ 2 . ` plugin/skills/decompose-issue-agent/SKILL.md `
91+ 3 . ` plugin/skills/empirical-test-agent/SKILL.md `
92+ 4 . ` plugin/skills/git-merge-linear-agent/SKILL.md `
93+ 5 . ` plugin/skills/git-rebase-agent/SKILL.md `
94+ 6 . ` plugin/skills/git-rewrite-history-agent/SKILL.md `
95+ 7 . ` plugin/skills/git-squash-agent/SKILL.md `
96+ 8 . ` plugin/skills/init/SKILL.md `
97+ 9 . ` plugin/skills/instruction-builder-agent/SKILL.md `
98+ 10 . ` plugin/skills/instruction-organizer-agent/SKILL.md `
99+ 11 . ` plugin/skills/learn/SKILL.md `
100+ 12 . ` plugin/skills/learn-agent/SKILL.md `
101+ 13 . ` plugin/skills/optimize-execution/SKILL.md `
102+ 14 . ` plugin/skills/optimize-execution-agent/SKILL.md `
103+ 15 . ` plugin/skills/plan-builder-agent/SKILL.md `
104+ 16 . ` plugin/skills/rebase-impact-agent/SKILL.md `
105+ 17 . ` plugin/skills/recover-from-drift-agent/SKILL.md `
106+ 18 . ` plugin/skills/research-agent/SKILL.md `
107+ 19 . ` plugin/skills/retrospective-agent/SKILL.md `
108+ 20 . ` plugin/skills/safe-remove-code-agent/SKILL.md `
109+ 21 . ` plugin/skills/skill-comparison-agent/SKILL.md `
110+ 22 . ` plugin/skills/stakeholder-review-agent/SKILL.md `
111+ 23 . ` plugin/skills/tdd-implementation-agent/SKILL.md `
112+ 24 . ` plugin/skills/verify-implementation-agent/SKILL.md `
113+ 25 . ` plugin/skills/work-agent/SKILL.md `
114+ 26 . ` plugin/skills/work-confirm-agent/SKILL.md `
115+ 27 . ` plugin/skills/work-implement-agent/SKILL.md `
116+ 28 . ` plugin/skills/work-merge-agent/SKILL.md `
117+ 29 . ` plugin/skills/work-prepare-agent/SKILL.md `
118+ 30 . ` plugin/skills/work-review-agent/SKILL.md `
119+ 31 . ` plugin/skills/work-with-issue-agent/SKILL.md `
120+
121+ ** How to remove:** For each file, read the file, find the line ` model: sonnet ` , and remove that entire line.
122+ Do NOT remove ` model: haiku ` lines (those belong to different skills and are not affected).
123+ Do NOT add any blank lines where the removed line was. Do NOT modify any other frontmatter fields.
124+
125+ - ** Step 3: Verify no ` model: sonnet ` remains**
126+
127+ Run: ` grep -rl "model: sonnet" plugin/skills/ `
128+
129+ Expected output: no matches. If any matches remain, fix them.
130+
131+ - ** Step 4: Run tests**
132+
133+ Run: ` mvn -f client/pom.xml test `
134+
135+ All tests must pass.
136+
137+ - ** Step 5: Update index.json**
138+
139+ Update the issue's ` index.json ` to set ` status ` to ` closed ` .
140+
141+ - ** Step 6: Commit**
142+
143+ Commit all changes with message: ` refactor: centralize sonnet model selection into plugin/rules/skill-models.md `
144+
145+ Commit type is ` refactor: ` because this restructures model selection without changing user-visible behavior.
0 commit comments