Skip to content

fix(#632): realign agent model tiers + document upstream routing bug - #636

Merged
admarble merged 2 commits into
mainfrom
feature/632-fix-agents-realign-declared-model-tiers-document-u
May 13, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/632-fix-agents-realign-declared-model-tiers-document-u

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • Realigns declared sub-agent model tiers (sequant-qa-checker haiku→sonnet; explorer/testgen keep haiku) and annotates every haiku claim across docs/skills with the upstream anthropics/claude-code#43869 caveat — declarations are kept aligned with intended tiers so they reactivate when the upstream fix ships.
  • Adds an unconditional one-line sequant doctor warning (suppressible via --quiet/-q) that cites #43869, plus a second-line Note: agents.model is currently inert (see #43869). when the user's agents.model differs from the shipped default.
  • Keeps AgentSettings.model in the Zod schema (marked @deprecated) so existing .sequant/settings.json files with "model": "haiku" continue to parse without error.

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Realign declared model tiers ✅ .claude/agents/*.md + templates/agents/*.md updated with inline # Note: per anthropics/claude-code#43869
AC-2 sequant doctor warning + --quiet ✅ src/commands/doctor.ts (emitUpstreamWarning); bin/cli.ts registers -q, --quiet; 4 new tests in doctor.test.ts
AC-3 Documentation audit ✅ docs/features/declarative-agents.md, plugin-distribution.md, concepts/workflow-phases.md + 3-way mirrors of subagent-types.md, testgen/SKILL.md, exec/SKILL.md, setup/SKILL.md, parallel-groups.md
AC-4 AgentSettings.model @deprecated + non-default inert-field note ✅ JSDoc updated, schema kept (Zod default preserved), doctor emits second-line note when value differs from DEFAULT_AGENT_SETTINGS.model
AC-5 CHANGELOG entry ✅ [Unreleased] / ### Changed entry citing #632 + upstream #43869

Verification commands

# AC-1
grep "^model:" templates/agents/*.md .claude/agents/*.md

# AC-2 (behavior check)
npx tsx bin/cli.ts doctor --skip-issue-check 2>&1 | grep -E '43869'
npx tsx bin/cli.ts doctor --skip-issue-check --quiet 2>&1 | grep -c '43869'  # → 0

# AC-3 (audit gate)
grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts
# every match is either an updated tier or an explicit "inert per #43869" annotation

# AC-5
grep -n '#632' CHANGELOG.md

Quality gates

  • ✅ npm run build — no TypeScript errors
  • ✅ npm run lint — clean
  • ✅ Doctor tests: 34/34 pass (30 existing + 4 new for AC-2/AC-4)
  • ✅ commands/ + scope/ test suites: 338/338 pass
  • ✅ npx tsx scripts/check-skill-sync.ts — all 5 modified skill files show synced 3/3
  • ✅ Behavior smoke test confirms warning emits + --quiet suppresses

Test plan

  • npx sequant doctor prints the warning line + URL
  • npx sequant doctor --quiet (and -q) suppresses the warning
  • With .sequant/settings.json agents.model set to a non-default value, the second-line Note: agents.model is currently inert (see #43869). appears
  • Existing .sequant/settings.json files with "model": "haiku" still load without error

Closes #632
Refs anthropics/claude-code#43869, anthropics/claude-code#57718

Realign declared sub-agent model tiers and document anthropics/claude-code#43869
which silently ignores all subagent `model:` declarations. Tiers are kept
aligned with intended defaults so they reactivate automatically when upstream
fixes ship; meanwhile, every haiku claim in docs/skills is annotated as inert.

AC-1: sequant-qa-checker haiku→sonnet across .claude/agents/ + templates/agents/
       (community baseline for code-review agents); explorer/testgen keep haiku.
       Each agent file gains an inline `# Note: per anthropics/claude-code#43869
       this is currently a no-op; agent runs on parent's model` comment.

AC-2: sequant doctor emits an unconditional one-line warning (suppressible via
       `--quiet`/`-q`) citing #43869 + linking the upstream issue. New tests in
       src/commands/doctor.test.ts cover (a) warning emitted by default,
       (b) --quiet suppresses, (c) inert-field note appears only when
       agents.model differs from the shipped default.

AC-3: Audit-gate grep `grep -rn '\bhaiku\b' .claude/ templates/ docs/
       src/lib/settings.ts` returns only updated tier claims or explicit
       "inert per #43869" annotations:
       - docs/features/declarative-agents.md: agent table footnoted, frontmatter
         updated, new "Known Upstream Limitations" subsection citing #43869+#57718
       - docs/features/plugin-distribution.md: agents.model row annotated
       - docs/concepts/workflow-phases.md: haiku claim qualified
       - Three-way-mirrored (`.claude/skills/`, `templates/skills/`, `skills/`):
         _shared/references/subagent-types.md, testgen/SKILL.md, exec/SKILL.md,
         setup/SKILL.md, spec/references/parallel-groups.md — all annotated
       - testgen/SKILL.md fictional token-cost claim rewritten
       - exec/SKILL.md [model:...] parser kept intact (with inert-note comment)
         so it reactivates when #43869 closes

AC-4: AgentSettings.model marked `@deprecated` in src/lib/settings.ts but kept
       in the Zod schema so existing user .sequant/settings.json files with
       `"model": "haiku"` continue to parse. When agents.model differs from
       DEFAULT_AGENT_SETTINGS.model, doctor appends a second-line
       `Note: agents.model is currently inert (see #43869).`

AC-5: CHANGELOG.md [Unreleased] / ### Changed entry citing #632 + upstream.
AC-3 renamed the section heading and removed the fictional 90% token
cost reduction claim. The pre-existing assertions in testgen-skill.test
were pinning the old wording and failed CI on build (22.x).

- Update heading assertion: "Token Optimization with Haiku Sub-Agents"
  → "Sub-Agent Delegation for Stub Generation"
- Replace cost-savings assertion with one that pins the actual invariant
  this PR establishes: the upstream caveat note (#43869) + "inert" wording
- Refresh top-of-file doc comment to reflect the new contract
@admarble
admarble merged commit 7120523 into main May 13, 2026
8 checks passed
@admarble
admarble deleted the feature/632-fix-agents-realign-declared-model-tiers-document-u branch May 13, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(agents): realign declared model tiers; document upstream routing bug

1 participant