Skip to content

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

Closed

Description

@admarble

Problem

Sequant's .claude/agents/*.md definitions declare model: haiku for sequant-qa-checker, sequant-explorer, and sequant-testgen. Two issues compound:

  1. Upstream Claude Code currently ignores all model: settings on subagents. Per anthropics/claude-code#43869 (open since 2026-04-05), every documented mechanism — per-call model: parameter, agent frontmatter model:, and CLAUDE_CODE_SUBAGENT_MODEL env var — is silently overridden. Subagents always run on the parent session's model.
  2. #57718 (open) documents that even when the env var takes effect, it silently clamps the per-call model: with no signal in tool_result or transcripts. Sequant users have no way to observe which tier their QA/spec/exec subagents are actually running on.

Net effect: a user with Opus as their main session model has been running every /qa quality check on Opus, paying Opus rates, while the agent definition advertises haiku. Verified empirically on this project — across 141 recent sessions, zero subagent spawns set model=haiku effectively; all inherited the parent (typically Opus).

Independent finding: sequant's declared tiers also diverge from community baseline

Sampled 144 agents in VoltAgent/awesome-claude-code-subagents (19.6k stars):

Field Coverage
name, description, tools, model 144 / 144
maxTurns, effort, permissionMode, isolation 0 / 144

Model distribution: sonnet 71% (102/144), opus 17% (25/144), haiku 12% (17/144).

In the 04-quality-security category (closest analog to sequant-qa-checker): code-reviewer, architect-reviewer, security-auditor, compliance-auditor all use opus. qa-expert, debugger, performance-engineer use sonnet. Only accessibility-tester uses haiku.

Sequant's sequant-qa-checker: haiku is an outlier among community quality-check agents. Combined with the upstream routing bug, the declaration is both wrong and inert.

Current Behavior

  • .claude/agents/sequant-qa-checker.md → model: haiku (ignored upstream)
  • .claude/agents/sequant-explorer.md → model: haiku (ignored upstream)
  • .claude/agents/sequant-testgen.md → model: haiku (ignored upstream)
  • .claude/agents/sequant-implementer.md → inherits (works correctly because no declaration)
  • .sequant/settings.json has agents.model field, written by src/lib/settings.ts:827, with no runtime consumer anywhere in src/ or skills. Confirmed dead config.
  • docs/features/plugin-distribution.md:94 documents agents.model as a working override. It is not.
  • The same haiku claim appears in ~10 additional locations across docs, skill references, and source comments (see AC-3 audit).

Desired Behavior

Declared model tiers reflect (a) the community baseline for the task type and (b) what the agent would run on if Claude Code honored declarations. Users get a one-time sequant doctor warning explaining the upstream bug so they understand why behavior may not match declarations. All in-repo references to the model defaults are internally consistent.

Acceptance Criteria

AC-1: Realign declared model tiers

  • sequant-qa-checker model: haiku → sonnet (or opus — pick one; community split is 50/50 for code-review-adjacent agents, sonnet is the cheaper safer pick)
  • sequant-explorer model: keep haiku (community supports haiku for search/discovery)
  • sequant-testgen model: keep haiku (stub generation is mechanical, low-judgment)
  • sequant-implementer model: unchanged (inherits)
  • Sync change across both agent directories: templates/agents/*.md (source of truth — copied to user projects by sequant init via copyTemplates in src/lib/templates.ts:287) and .claude/agents/*.md (this repo's working copy). There is no third directory for agents.
  • Inline comment in each modified file: # Note: per anthropics/claude-code#43869 this is currently a no-op; agent runs on parent's model

AC-2: sequant doctor upstream-bug warning

  • sequant doctor emits a one-line warning, unconditionally for now: WARN: Claude Code #43869 — subagent model: declarations are ignored. Agents currently run on parent model.
  • Warning links to Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869
  • Warning is suppressible via --quiet flag or doctor settings
  • Implementation note for removal: no upstream API to detect the fix programmatically. Add a // TODO: remove when anthropics/claude-code#43869 closes sentinel next to the warning string; cleanup is a follow-up issue when Anthropic ships the fix. Do not attempt a runtime probe or version pin in this issue.
  • Snapshot test in src/commands/doctor.test.ts covers the warning string + link

AC-3: Documentation audit (consolidated)

Sequant has ~10 in-repo locations that hardcode haiku as the subagent model and/or default. Update them so the codebase is internally consistent post-AC-1.

  • Update docs/features/declarative-agents.md agent table (lines ~62-65), example frontmatter (~line 107), and any other mentions to match AC-1's tier choices
  • Add a "Known Upstream Limitations" subsection to docs/features/declarative-agents.md referencing #43869 (model routing) and #57718 (silent override)
  • State that .claude/agents/*.md model fields are aspirational until upstream fixes land
  • Remove or fix the agents.model row in docs/features/plugin-distribution.md:94 (it documents a dead setting)
  • Update docs/concepts/workflow-phases.md (line ~56 mentions "haiku sub-agents for cost-efficient stub generation")
  • Update .claude/skills/_shared/references/subagent-types.md and its 2 mirror copies in templates/skills/_shared/references/ and skills/_shared/references/ (the AI-facing doc consulted during skill runs — agent table at ~lines 22-25, "Default: Use haiku unless..." rule at ~line 140, recommendation tables at ~lines 204-207). Mirror sync verified by npx tsx scripts/check-skill-sync.ts.
  • Update templates/skills/testgen/SKILL.md and its 2 mirrors — strike or rewrite the fictional token-cost claim at ~lines 148-149 ("Without haiku: ~50K tokens. With haiku: ~5K tokens.") since haiku isn't honored upstream
  • Update templates/skills/exec/SKILL.md and its 2 mirrors — [model: haiku] parser logic (~lines 1539-1544) and inline model="haiku" examples (~lines 1555, 1686, 1693) stay in place (will re-activate when #43869 lands) but receive a one-line # Note: model param inert per anthropics/claude-code#43869 comment
  • Update src/lib/settings.ts — doc-comment block at lines 51-52, Zod schema .default("haiku") at line 277, DEFAULT_AGENT_SETTINGS at lines 569-571, generated settings.json comment at lines 826-827, and the internal markdown table at line 948. Keep the runtime default value (see AC-4) — only update the prose claiming it works.
  • Audit gate: grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts returns either updated tier claims or explicit "inert per #43869" annotations — no stale claims that haiku is the runtime model.

AC-4: Dead-config cleanup — keep with deprecation notice

Recommendation: keep AgentSettings.model in the schema. Removing it would fail Zod parse on existing user .sequant/settings.json files with "model": "haiku" already written by prior init runs — a silent breaking change.

  • Keep AgentSettings.model field in src/lib/settings.ts and the Zod schema (don't remove)
  • Mark the field deprecated in the TypeScript doc comment (@deprecated currently inert; see #43869)
  • When a user has set agents.model to a non-default value, sequant doctor adds a second-line note: Note: agents.model is currently inert (see #43869). (extends AC-2; doesn't duplicate it)
  • No migration of existing settings.json files needed (field still parses; value is just ignored at runtime, which matches today's reality)

AC-5: CHANGELOG entry

Out of Scope

  • maxTurns / effort caps — investigated against 144 community agents, zero use these fields. The practitioner pattern is structured prompts, not turn caps. Consider narrowing Add user-configurable agent overrides and graceful maxTurns handling #483 separately.
  • Wiring agents.model runtime override — would write code that does nothing until #43869 is fixed. Revisit when upstream lands.
  • Stripping the [model: ...] parser in exec/SKILL.md — leaving it intact (with an inert-note comment) means it auto-reactivates when #43869 closes. Stripping would force a re-release.
  • isolation: worktree SDK feature — sequant uses its own src/lib/worktree-isolation.ts (Evaluate built-in worktree isolation for /exec parallel agent groups #485 closed); insulated from #47548.

Verification

  • After AC-1: grep "^model:" templates/agents/*.md .claude/agents/*.md shows updated tiers in both locations
  • After AC-2: npx sequant doctor 2>&1 | grep -q '43869' (behavior check, not just source grep)
  • After AC-3: grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts — every match is either (a) a current tier claim consistent with AC-1, or (b) an explicit "inert per #43869" annotation. No silent stale claims.
  • After AC-4: existing user .sequant/settings.json files with "model": "haiku" still load without error; doctor surfaces the inert-field note when non-default
  • After AC-5: [Unreleased] section of CHANGELOG.md mentions fix(agents): realign declared model tiers; document upstream routing bug #632
  • After upstream #43869 lands: the // TODO sentinel next to the doctor warning is the marker for follow-up cleanup

References

Activity

  1. added
    documentation
    upstream
    multi-agent
    on May 12, 2026
  2. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    → PROCEED — Realign declared model tiers + add doctor warning for upstream routing bug (#43869)

    Workflow: spec → exec → qa
    Command: npx sequant run 632 -q

    Large audit scope: AC-3 covers ~10 in-repo locations across .claude/, templates/, skills/ (3-dir sibling sync) plus src/lib/settings.ts schema. AC-2 adds sequant doctor warning; AC-4 keeps agents.model field with @deprecated to avoid breaking existing user settings.json. -q recommended for breadth + breaking-change adjacency.

    Memory cross-reference: tracked in project_upstream_subagent_model_bug.md.

  3. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    Spec Analysis — #632

    Complexity: Complex (5 top-level ACs, ~25 sub-checkboxes, 7+ directories)


    AC Quality Check

    All ACs are precise and measurable. Each top-level AC carries a verification recipe in the issue body's ## Verification section (grep baseline, doctor invocation, CHANGELOG inspection). No vague/unmeasurable patterns detected.

    One minor item: AC-1 first checkbox offers "sonnet or opus — pick one." This is a planner-time decision; resolved below in Open Questions.


    Scope Assessment

    Non-Goals: Captured explicitly under ## Out of Scope: maxTurns/effort caps, wiring agents.model as a runtime override, stripping the [model: ...] parser in exec/SKILL.md, isolation: worktree SDK migration. Good scope hygiene.

    Metric Value Status
    Feature count 1 (alignment + warning) ✅
    AC items 5 top / ~25 sub ⚠️
    Directory spread 7+ (agents×2, docs×3, skills×3-mirrored, src/lib, src/commands, CHANGELOG) ❌
    Code complexity per site low (mostly text edits + one runtime warning + one @deprecated annotation) ✅

    Verdict: ⚠️ SCOPE_WARNING — large fan-out but each touch is shallow. Quality loop already enabled by /assess.

    Splitting is not recommended: AC-3's audit-gate grep at the end (grep -rn '\bhaiku\b' ... returns either updated or annotated) is what makes this work coherent. Splitting would invalidate the gate.


    Acceptance Criteria

    AC-1: Realign declared model tiers

    Verification: Manual Test (grep ^model: across both agent dirs)
    Scenario: Given templates/agents/*.md and .claude/agents/*.md → When grep tier values → Then sequant-qa-checker: sonnet, sequant-explorer: haiku, sequant-testgen: haiku, sequant-implementer (no model:), each with inline # Note: per anthropics/claude-code#43869 ... comment.
    Assumptions: Per Open Question Q1, sonnet is the chosen tier for sequant-qa-checker.

    AC-2: sequant doctor upstream-bug warning

    Verification: Unit Test (snapshot test in src/commands/doctor.test.ts for warning string + URL) + Integration Test (npx sequant doctor 2>&1 | grep -q '43869')
    Scenario: Given any environment → When user runs sequant doctor → Then stderr/stdout contains the one-line warning citing #43869 with the GitHub URL. When --quiet set, warning is suppressed.
    Assumptions: --quiet flag needs to be added to the doctor Commander option chain (does not exist today — verified via grep of doctor.ts). // TODO: remove when anthropics/claude-code#43869 closes sentinel is colocated with the warning string.

    AC-3: Documentation audit (consolidated)

    Verification: Manual Test (audit-gate grep grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts returns 0 stale claims; every match is either an updated tier or an "inert per #43869" annotation)
    Scenario: Given the 89 baseline haiku references → When AC-3 work complete → Then every reference is internally consistent with AC-1's tier choices and the upstream-bug reality.
    Assumptions: Sibling-site scan below extends the file list beyond what the issue body enumerated.

    AC-4: Dead-config cleanup — keep with deprecation notice

    Verification: Unit Test (Zod parse succeeds with { agents: { model: "haiku" } }) + Integration Test (doctor adds inert-field note when agents.model is non-default)
    Scenario: Given existing user settings.json with "model": "haiku" → When sequant doctor runs → Then settings parses without error AND warning includes second-line note Note: agents.model is currently inert (see #43869). only when agents.model differs from the default.
    Assumptions: "Non-default" means the value differs from the as-shipped DEFAULT_AGENT_SETTINGS.model. Behavior gates on the user's current settings, not the schema default.

    AC-5: CHANGELOG entry

    Verification: Manual Test (grep \[Unreleased\] section for #632 reference)
    Scenario: Given CHANGELOG.md → When edited → Then [Unreleased] contains a one-line entry under ### Changed or ### Fixed citing #632 and #43869.
    Assumptions: Under ### Changed (model tier realignment + doctor warning are alignments, not bug fixes).


    Sibling-Site Scan Findings

    The AC-3 audit-gate grep (grep -rn '\bhaiku\b' ...) returns 89 matches today. The issue body explicitly enumerates ~10 file groups. Two additional sibling sites match the same root cause but are not listed in AC-3 — they will trip the audit gate and must be addressed in this PR:

    1. {.claude,templates,skills}/skills/setup/SKILL.md:188 — example settings.json snippet shown to users during /setup contains "model": "haiku". Treatment: annotate the line with // inert per anthropics/claude-code#43869 or drop the model field from the example, since AC-4 keeps the schema field with @deprecated.

    2. {.claude,templates,skills}/skills/spec/references/parallel-groups.md (8 occurrences each) — table + examples document [model: haiku] annotations as the default for parallel-group tasks. AC-3 already keeps the parser intact in exec/SKILL.md with an "inert" comment. Apply the same treatment here: add a one-line note at the top of the section pointing to exec/SKILL.md's inert-note OR inline an "inert per #43869" comment by the table.

    Both sites are in all three skill mirrors (.claude/skills/, templates/skills/, skills/) — verify with npx tsx scripts/check-skill-sync.ts after edits.


    Implementation Plan

    Phase 1: Agent declarations (AC-1)

    1. Edit templates/agents/sequant-qa-checker.md — change model: haiku → model: sonnet; insert # Note: per anthropics/claude-code#43869 this is currently a no-op; agent runs on parent's model directly above model:.
    2. Edit templates/agents/sequant-explorer.md and templates/agents/sequant-testgen.md — keep model: haiku, add the same inline note.
    3. Mirror all three edits in .claude/agents/ (use Read on each file first; do not assume identical content — apply changes per-file).
    4. sequant-implementer.md is unchanged (no model: field).

    Phase 2: Doctor warning + deprecation (AC-2, AC-4)

    1. Schema deprecation (AC-4) in src/lib/settings.ts:
    2. --quiet flag (AC-2) — Verified by grep that no --quiet/isQuiet exists in doctor.ts today. Add .option("-q, --quiet", "suppress informational warnings") to the doctor command registration in bin/cli.ts; thread it into DoctorOptions.
    3. Warning emission (AC-2) — add a new function emitUpstreamWarning(options: { isQuiet?: boolean; agentsModel?: string; defaultAgentsModel: string }) near the top of doctor.ts. Returns the formatted lines and the // TODO: remove when anthropics/claude-code#43869 closes sentinel. Always emits the primary line; conditionally appends the AC-4 second line when agentsModel !== defaultAgentsModel. Honors isQuiet. Call from runDoctor() near the end (after the existing checks header).
    4. Snapshot test (AC-2) in src/commands/doctor.test.ts — covers: (a) warning line includes 43869, (b) link is https://github.com/anthropics/claude-code/issues/43869, (c) --quiet suppresses, (d) AC-4 second-line note appears only when agents.model is non-default.

    Phase 3: Documentation audit (AC-3) — fan out file-by-file

    Mirror discipline: Per feedback_read_each_mirrored_file.md, Read each file independently before Edit. Don't replace_all across mirrors blindly. After each file group, run npx tsx scripts/check-skill-sync.ts.

    1. docs/features/declarative-agents.md — update agent table (L62-65), example frontmatter (L107), add "Known Upstream Limitations" subsection referencing #43869 + #57718; state model fields are aspirational.
    2. docs/features/plugin-distribution.md:94 — strike or annotate the agents.model row.
    3. docs/concepts/workflow-phases.md:56 — update "haiku sub-agents for cost-efficient stub generation" prose.
    4. _shared/references/subagent-types.md × 3 mirrors — agent table (L22-25), "Default: Use haiku" rule (L140), recommendation tables (L204-207), example frontmatter (L71), the "model comes from .claude/agents/sequant-qa-checker.md (haiku)" line (L145).
    5. testgen/SKILL.md × 3 mirrors — strike fictional token-cost claim at L148-149; rewrite L44/L58/L90/L125-127/L134 prose to remove "use haiku" runtime claims (replace with "designated as haiku — currently inherits parent per #43869").
    6. exec/SKILL.md × 3 mirrors — [model: haiku] parser logic at L1539-1544 and inline model="haiku" examples at L1555/L1686/L1693 stay in place; add one comment line at the parser block header: # Note: model param inert per anthropics/claude-code#43869; reactivates when fixed.
    7. Sibling-site fixes (not in issue body):
      • setup/SKILL.md:188 × 3 mirrors — annotate the example "model": "haiku" line.
      • spec/references/parallel-groups.md × 3 mirrors — add a "inert per #43869" note near the table on L28-34; do not strip examples.

    Phase 4: CHANGELOG + audit verification (AC-5)

    1. Add a ### Changed entry under [Unreleased] in CHANGELOG.md: one-line summary citing fix(agents): realign declared model tiers; document upstream routing bug #632 and Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869.
    2. Run audit gate: grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts — verify every match is either a current tier claim consistent with AC-1 or an explicit "inert per #43869" annotation. Iterate until clean.
    3. Run mirror sync: npx tsx scripts/check-skill-sync.ts — expect "synced 3/3" for every affected SKILL.md / reference file.

    Design Review

    1. Where does this logic belong?

      • Tier declarations live with the agent frontmatter (single-source). The doctor warning lives in src/commands/doctor.ts next to the existing settings-driven checks. Schema deprecation lives in src/lib/settings.ts next to the existing AgentSettings interface.
    2. What's the simplest correct approach?

      • Static warning string with a TODO sentinel — not a runtime probe of Claude Code's behavior. The issue body explicitly forbids the probe approach. Rejected: detecting #43869 closure via env-var fingerprinting (brittle); rejected: stripping [model: ...] parser (forces a re-release when upstream lands).
    3. What existing pattern does this follow?

      • Doctor warning emission follows the existing Check interface and ui.warn() rendering pattern. @deprecated annotation is novel for this codebase but is a standard TS/JSDoc convention.
    4. What would a senior reviewer challenge?

      • "Why keep the agents.model schema field if it's inert?" — Answer: removing it makes existing user settings.json files fail Zod parse. AC-4 explicitly captures this.
      • "Why surface in doctor rather than at agent-spawn time?" — Answer: agent spawning is opaque to user code; doctor is the canonical health-check surface and runs unconditionally.
      • "Why not split this into a docs PR + a code PR?" — Answer: AC-3's audit gate is the coherence test; splitting invalidates the grep verification.

    Feature Quality Planning

    All standard checks pass. Notable items:

    • Mirror sync risk: 3 skill directories must stay in lockstep. scripts/check-skill-sync.ts is the gate. Per feedback_replace_all_indent.md and feedback_replace_all_enum_strings.md: do not bulk-replace haiku across all files at once — many occurrences are inside example settings, type signatures, or tier-distribution prose that should not change.
    • Test coverage gap: AC-4 second-line note logic in doctor needs a unit test path that varies agents.model (haiku vs. non-default) to prevent regression.
    • No new derived ACs.

    Open Questions

    1. sequant-qa-checker tier: sonnet or opus?
      Recommendation: sonnet. Cheaper, matches qa-expert in the VoltAgent baseline (closest functional analog — sequant's checker runs deterministic diff-grep gates, not architecture review). Impact if wrong: easy to flip later; tier value is aspirational until #43869 lands.

    2. Sibling sites (setup/SKILL.md, spec/references/parallel-groups.md) — fold into AC-3 or file as follow-up?
      Recommendation: fold in. Audit-gate grep will trip on them; deferring would leave the gate failing. Cost is small (~15 mechanical edits across 6 mirrored files).

    3. Add enhancement or tech-debt label?
      The current labels (documentation, upstream, multi-agent) understate the runtime code changes (doctor warning, schema deprecation, CLI flag). Recommendation: add tech-debt for accurate accounting. Non-blocking.


    Recommended Workflow

    Phases: spec → exec → qa
    Quality Loop: enabled
    Reasoning: Matches /assess recommendation (<!-- assess:phases=spec,exec,qa -->, <!-- assess:quality-loop=true -->). Testgen skipped because the only Unit Test ACs (AC-2 snapshot, AC-4 schema parse) are small, focused, and easier to write inline with the implementation than to stub ahead-of-time. Docs phase skipped — this is the docs audit. Browser tests N/A (CLI + markdown).


    Label Review

    Current: documentation, upstream, multi-agent
    Recommended: add tech-debt (runtime code in doctor.ts and settings.ts)
    Reason: AC-2 and AC-4 add real runtime behavior (CLI flag, warning emission, schema annotation) — not pure docs.
    Quality Loop: auto-enabled per assess (warranted given the audit-gate breadth)

    → gh issue edit 632 --add-label tech-debt

  4. added
    planned
    on May 13, 2026
  5. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    /exec Progress Update — PR #636

    All 5 ACs implemented. PR #636 is open.

    AC Coverage

    AC Status Notes
    AC-1 — Realign declared tiers ✅ Implemented sequant-qa-checker haiku→sonnet across both agent dirs; explorer/testgen kept haiku. Each agent file has the inline # Note: per anthropics/claude-code#43869 comment.
    AC-2 — Doctor warning + --quiet ✅ Implemented emitUpstreamWarning() + exported UPSTREAM_SUBAGENT_WARNING; -q, --quiet registered in bin/cli.ts. 4 new tests in src/commands/doctor.test.ts all pass. // TODO: remove when anthropics/claude-code#43869 closes sentinel colocated.
    AC-3 — Docs audit ✅ Implemented All 8 file-groups updated (docs/features/declarative-agents.md, plugin-distribution.md, concepts/workflow-phases.md, plus 3-way-mirrored subagent-types.md, testgen/SKILL.md, exec/SKILL.md, setup/SKILL.md, parallel-groups.md). Audit-gate grep verified: every remaining \bhaiku\b match is either an updated tier or an explicit "inert per #43869" annotation.
    AC-4 — Schema deprecation ✅ Implemented AgentSettings.model JSDoc carries @deprecated; Zod schema + DEFAULT_AGENT_SETTINGS.model kept so existing user settings.json files still parse. Doctor's second-line Note: agents.model is currently inert (see #43869). only fires when the value differs from default — covered by a dedicated unit test.
    AC-5 — CHANGELOG ✅ Implemented [Unreleased] / ### Changed entry citing #632 + upstream #43869.

    Files Changed

    29 files. Highlights:

    • Agents (6): {.claude,templates}/agents/sequant-{qa-checker,explorer,testgen}.md
    • Source (3): src/commands/doctor.ts, src/commands/doctor.test.ts, src/lib/settings.ts, bin/cli.ts
    • Docs (3): docs/features/declarative-agents.md, docs/features/plugin-distribution.md, docs/concepts/workflow-phases.md
    • Skills (15, 3-way mirrored): _shared/references/subagent-types.md, testgen/SKILL.md, exec/SKILL.md, setup/SKILL.md, spec/references/parallel-groups.md
    • CHANGELOG.md

    Quality Plan Alignment

    Quality Dimension Items Addressed Notes
    Mirror sync risk ✅ npx tsx scripts/check-skill-sync.ts reports all 5 modified files synced 3/3. Per-file edits then cp-based propagation (per feedback_read_each_mirrored_file.md).
    AC-4 non-default test path ✅ Two complementary tests: one asserting note absent on default haiku, one asserting note present on opus.
    Backwards-compat (Zod parse) ✅ Schema kept; existing "model": "haiku" files continue to parse.

    Derived ACs: None — none extracted from the spec comment.

    Build/Lint/Test Results

    • npm run build — ✅ TypeScript compiles
    • npm run lint — ✅ 0 errors, 0 warnings
    • npx vitest run src/commands/doctor.test.ts — ✅ 34/34
    • npx vitest run src/commands/ src/lib/scope/ — ✅ 338/338 pass
    • Behavior smoke: npx tsx bin/cli.ts doctor --skip-issue-check 2>&1 | grep -E '43869' matches; --quiet suppresses (grep count 0)

    Pre-PR Confidence Check

    • Weakest part: The new doctor tests assert on output strings via console.log spies — if the warning ever moves to console.error or process.stderr.write, the assertions will quietly stop matching. The exported UPSTREAM_SUBAGENT_WARNING constant mitigates this by giving callers a single source of truth.
    • Coverage gaps: bin/cli.ts -q, --quiet flag registration has no dedicated test (covered indirectly by doctorCommand({ quiet: true }) unit test); the src/lib/settings.ts changes are JSDoc + prose annotations only (no runtime behavior change to test).

    PR Status

    Next Steps

    Ready for /qa. The audit-gate grep is the central coherence test; QA should run it and confirm every match is annotated.

  6. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #632

    PR: #636 · Commit: ed33459

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Realign declared model tiers (qa-checker → sonnet; explorer/testgen → haiku; inline # Note: per #43869 in both .claude/agents/ and templates/agents/) MET grep "^model:" templates/agents/*.md .claude/agents/*.md shows the correct tiers in all 6 files. Each file has the verbatim inline note above model:. sequant-implementer unchanged (no model:).
    AC-2 Original sequant doctor warning citing #43869 + link, suppressible via --quiet, snapshot test in doctor.test.ts MET npx sequant doctor emits WARN: Claude Code #43869 — subagent model: declarations are ignored. … followed by https://github.com/anthropics/claude-code/issues/43869. doctor({quiet:true}) smoke-tested locally — warning suppressed. // TODO: remove when anthropics/claude-code#43869 closes sentinel present at src/commands/doctor.ts:46. Snapshot tests at doctor.test.ts:666-747 cover primary line, link, --quiet suppression, and inert-field-note presence/absence. AC text mentions "or doctor settings"; only the --quiet flag was implemented, matching the spec plan's resolution (treated as MET).
    AC-3 Original Doc audit — every \bhaiku\b reference is either an updated tier or an explicit "inert per #43869" annotation MET Audit-gate grep grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts — every match falls into one of: updated tier, an "inert per #43869" inline/block annotation, or a deprecation note. Sibling-site fixes from spec analysis (parallel-groups.md, setup/SKILL.md "model": "haiku" example) addressed. Skill mirrors for the 5 files this PR touched all in sync (npx tsx scripts/check-skill-sync.ts reports synced for subagent-types.md, exec/SKILL.md, setup/SKILL.md, spec/references/parallel-groups.md, testgen/SKILL.md). docs/features/declarative-agents.md gains a "Known Upstream Limitations" subsection referencing both #43869 and #57718.
    AC-4 Original AgentSettings.model kept in schema, marked @deprecated, doctor emits second-line note when non-default MET src/lib/settings.ts:52-57 carries @deprecated currently inert; see anthropics/claude-code#43869 JSDoc. Verified existing { agents: { model: "haiku" } } still parses via Zod (smoke test). emitUpstreamWarning only appends Note: agents.model is currently inert (see #43869). when agentsModel !== defaultAgentsModel — covered by doctor.test.ts:684-746.
    AC-5 Original CHANGELOG [Unreleased] entry citing #632 and #43869 MET CHANGELOG.md ## [Unreleased] ### Changed has one-line entry leading with "Subagent model tiers realigned + sequant doctor upstream-bug warning" and ending (#632, refs anthropics/claude-code#43869).

    Coverage: 5/5 ACs functionally met.


    Precheck Findings

    Section Status Surfaced
    Fixtures not_applicable No motivating-example payload in issue body
    Sibling-grep pass 2 new identifiers (UPSTREAM_SUBAGENT_WARNING, emitUpstreamWarning); 0 sibling sites
    AC literal-diff pass AC-1..5 present in both issue and PR body

    Source: .sequant/gap-precheck.json (schemaVersion 1)


    CI Status

    Check State Bucket Impact
    build (22.x) FAILURE fail ❌ NOT_MET
    build (20.x) CANCELLED cancel ❌ NOT_MET (matrix fail-fast)
    typecheck SUCCESS pass ✅ MET
    Hooks Validation SUCCESS pass ✅ MET
    Plugin Structure Validation SUCCESS pass ✅ MET
    Setup Directory Creation SUCCESS pass ✅ MET
    validate-plugin SUCCESS pass ✅ MET
    validate-skills SUCCESS pass ✅ MET

    CI Summary: 6 passed, 1 failed, 1 cancelled (matrix fail-fast)

    Diff is not markdown-only (touches src/commands/doctor.ts, src/commands/doctor.test.ts, src/lib/settings.ts, bin/cli.ts), so the build matrix is gating. Markdown-only relaxation does not apply.


    Build Verification

    Check Status
    Feature branch npm run build (tsc only) ✅ Passed
    Feature branch npm test (full suite) ❌ Failed (2 / 3190)
    Main branch — affected tests ✅ Pass (verified by content grep — assertions match origin/main SKILL.md text)
    Error match N/A — tests pass on main, fail on feature
    Regression Yes — introduced by this PR

    Failing tests (both in src/lib/__tests__/testgen-skill.test.ts):

    1. L25-29 — should have Token Optimization with Haiku Sub-Agents section
      expect(skillContent).toContain("## Token Optimization with Haiku Sub-Agents") — but AC-3's rewrite renamed this heading to ## Sub-Agent Delegation for Stub Generation (now at .claude/skills/testgen/SKILL.md:42).

    2. L56-59 — should document cost savings from haiku usage
      expect(skillContent).toMatch(/90%.*token.*cost.*reduction/i) — AC-3 explicitly required striking the fictional Without haiku: ~50K tokens. With haiku: ~5K tokens. claim. The 90% reduction claim it was paired with is gone, which is the intended AC-3 outcome.

    These tests were not in the PR's diff (git diff origin/main...HEAD -- src/lib/__tests__/testgen-skill.test.ts is empty) but the PR's content changes broke them. They need to be updated or deleted as part of this PR — otherwise the AC-3 audit-gate result is internally inconsistent (skill says X, test asserts Y).

    Note: Test file's top-of-file doc comment also references the haiku claim ("AC-2: Documentation or test confirms /testgen uses haiku sub-agents at runtime") — that comment block is now misleading independent of the assertion fix.


    Quality Metrics

    Metric Value Status
    Type issues (any) added 0 OK
    Deleted tests 0 OK
    Files changed 29 WARN (large fan-out but each touch is shallow; expected per spec plan)
    Lines added +387 -
    Lines deleted -86 -
    npm run lint pass OK
    npm run lint:skill-calls pass (0 violations across 105 files) OK
    Skill mirror sync (this PR's files) 5/5 synced across .claude/skills/, templates/skills/, skills/ OK

    Test Coverage Analysis

    Changed File Tier Has Tests? Test File
    src/commands/doctor.ts Standard ✅ Yes src/commands/doctor.test.ts (4 new tests added)
    src/lib/settings.ts Standard ✅ Yes __tests__/settings-schema.test.ts (30 pass, includes default model = "haiku")
    bin/cli.ts Standard ⚠️ Indirect Covered transitively by doctor.test.ts { quiet: true } path
    .claude/agents/*.md, templates/agents/*.md Optional (declarative) N/A Content checked by grep "^model:" in issue verification
    docs/**, skill markdown Optional (docs) N/A Audit-gate grep
    src/lib/__tests__/testgen-skill.test.ts — — PRE-EXISTING test now failing — see Build Verification

    Coverage: New runtime code (emitUpstreamWarning, AC-2/AC-4) is well-tested by 4 added unit tests covering: default warning emission, link presence, --quiet suppression, conditional inert-field note (default vs non-default agents.model).


    Code Review

    Strengths:

    • UPSTREAM_SUBAGENT_WARNING exported as a frozen const so tests assert against the same string the runtime emits — avoids snapshot drift.
    • // TODO: remove when anthropics/claude-code#43869 closes sentinel co-located with the warning constant at doctor.ts:46, exactly as AC-2's implementation note requires. Easy to grep for during follow-up cleanup.
    • emitUpstreamWarning is pure (no I/O beyond console.log), takes its inputs explicitly, and the AC-4 second-line behavior is gated by a single equality check against DEFAULT_AGENT_SETTINGS.model — easy to reason about and test.
    • The schema choice in AC-4 (keep field with @deprecated rather than delete) avoids silently breaking every existing user .sequant/settings.json — exactly the right call.
    • Docs audit didn't shy away from rewriting prose: e.g. docs/features/declarative-agents.md agent table now says Model (declared) column header and adds a labeled > Known upstream limitation: blockquote above the table, so users read the caveat before the values.
    • CHANGELOG entry under ### Changed includes the audit-gate command verbatim so a reader can re-run the verification locally.

    Issues:

    1. Stale test assertions — src/lib/__tests__/testgen-skill.test.ts:25-29 and :56-59 assert on content AC-3 explicitly removed/renamed. The PR completed AC-3's prose sweep but missed the test that pins the OLD content in place. Per feedback_full_suite_on_api_breaks.md and the regression evidence above, this needs to be in this PR.

    Suggestions:

    • The remaining assertions in testgen-skill.test.ts:36-50 (Parse.*Verification.*Criteria.*haiku, Generate.*Test.*Stub.*haiku, etc.) currently do pass against the updated SKILL.md because the rewrite kept "haiku" tokens with "inert per #43869" qualifications. But they encode the assumption that haiku is the runtime tier — when #43869 closes and the docs get another sweep, these will be the next batch to break. Consider replacing them with assertions on the inert-note presence ("inert per anthropics/claude-code#43869") which is the actual invariant this PR establishes.

    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK New doctor tests assert on stdout text (the user-visible contract), not internal state
    Coverage Depth ✅ OK Default emission, --quiet, default-model path, non-default-model path all covered
    Mock Hygiene ✅ OK Existing getSettings mock extended with mockResolvedValueOnce for per-test overrides — appropriate scope
    Test Reliability ✅ OK No timing dependencies; assertions are deterministic

    Anti-Pattern Detection

    Dependency Audit

    N/A — package.json not modified.

    Code Patterns

    No anti-patterns introduced. The runtime changes are limited to one new pure function, one exported const, and a single --quiet CLI option registration in bin/cli.ts:165. No N+1, no empty catches, no hardcoded secrets, no SQL.

    Critical Issues: 0
    Warnings: 0


    CLI Registration Verification

    Interface Field Runtime Usage CLI Registered Status
    DoctorOptions.quiet options.quiet in doctorCommand (doctor.ts:604) .option("-q, --quiet", ...) at bin/cli.ts:165 ✅ OK

    Verification Status: Passed.


    Skill Command Verification

    5 skill markdown files modified. Skill calls and embedded commands are documentation prose (parser specs, snippets), not executable commands the skill walks. No gh ... --json X field-validation surface. npm run lint:skill-calls reports 0 violations across 105 skill files.

    Verification Status: N/A — no executable commands changed.


    Detection Pattern Verification

    The 5 changed skill markdown files don't introduce new grep/awk/jq/sed patterns or regex literals — they update prose, tables, and HTML/block notes. Confirmed by inspecting added lines.

    Verification Status: Not Required.


    Skill Change Review

    • Command verified: Audit-gate grep -rn '\bhaiku\b' … executed against the feature branch — every match is either an updated tier or an explicit "inert per #43869" annotation.
    • Fields verified: N/A — no JSON-field commands added.
    • Patterns complete: Issue body's sibling-site scan callouts (parallel-groups.md, setup/SKILL.md) addressed.
    • Dependencies explicit: AC-3 prose update has no new tooling dependency.

    Execution Evidence

    Test Type Command Result
    Doctor smoke (default) npx tsx -e 'import("./src/commands/doctor.ts").then(m => m.doctorCommand({ skipIssueCheck: true }))' ✅ emits WARN: Claude Code #43869 … + URL
    Doctor smoke (--quiet) ... doctorCommand({ skipIssueCheck: true, quiet: true }) ✅ no 43869 / no WARN in output
    AC-4 Zod parse npx tsx -e ... SettingsSchema.safeParse({ agents: { model: "haiku" } }) ✅ parse ok: true; model = haiku
    AC-1 verification grep grep "^model:" templates/agents/*.md .claude/agents/*.md ✅ qa-checker → sonnet ×2; explorer/testgen → haiku ×4
    AC-3 audit grep grep -rn '\bhaiku\b' .claude/ templates/ docs/ src/lib/settings.ts ✅ every match annotated or updated
    Mirror sync npx tsx scripts/check-skill-sync.ts (5 files this PR touched) ✅ all synced
    Build npm run build ✅ pass
    Lint npm run lint ✅ pass
    Lint skill calls npm run lint:skill-calls ✅ 0 violations
    Full test suite npm test ❌ 2 / 3190 failing — see Build Verification

    Evidence status: Complete — but reveals the test regression.


    Manual Test ACs

    None of the AC verification methods are runtime/UI-manual. All issue-body verification steps are CLI/grep behaviors executed above.


    Risk Assessment

    • Likely failure mode: PR merges → CI red on main until tests fixed. Lower-risk fallout: future contributors update testgen/SKILL.md further and re-introduce drift because the stale tests no longer guard the new invariants (they're either deleted-on-fix or rewritten to assert the inert-note invariant).
    • Not tested: The "second-line inert note appears when agents.model differs from default" path is tested with model: "opus", but not with the other non-default value (model: "sonnet"). The implementation uses strict !==, so both branches would behave the same — low-impact gap.
    • Sibling sites considered: Cross-file scan via Phase 0c precheck found 0 sibling sites for UPSTREAM_SUBAGENT_WARNING / emitUpstreamWarning. Manual scan: no other src/commands/*.ts emits subagent-model guidance; the warning belongs only in doctor.
    • Sibling-line audit: Intra-file — doctor.ts has no other "model"-related output paths; the emitUpstreamWarning call site (line 603) is the only place in runDoctor where this surfaces.

    Adversarial Re-Read

    Findings:

    1. (Severe) AC-3 prose changes vs src/lib/__tests__/testgen-skill.test.ts — Walking the diff adversarially against existing tests revealed two assertions pinning the OLD haiku claims. The AC-3 prose change is correct; the missing piece is the test update. Already enumerated under Build Verification & Code Review.
    2. (Note, non-blocking) "or doctor settings" in AC-2 text — AC body says --quiet flag or doctor settings. Only --quiet is wired. Spec plan resolved this as either-or; treating as MET, but flagging so reviewers can confirm intent.
    3. (Note) Audit-gate grep includes .claude/settings.local.json:342 — a gitignored local file with a python3 ... haiku ... shell command in a permission allowlist. Not a stale claim about runtime behavior; safe to ignore for the audit's purpose.
    4. (Confirmed clean) Verbatim verification fixtures from issue body — All 5 verification commands in the issue's ## Verification section executed and produced the AC-claimed results.
    5. (Confirmed clean) Evidence claims are post-fix validation — Every command I ran was against the feature branch's current state, not a pre-fix repro.
    6. (Confirmed clean) Process state — Worktree in sync with origin/feature/632-…, branch 0 ahead / 0 behind origin, no uncommitted changes.
    7. (Confirmed clean) Out-of-Scope items intact — None of the four "Out of Scope" items (maxTurns/effort caps, runtime override wiring, parser stripping, isolation: worktree SDK migration) were touched.

    Status: Severe Gap — finding (1) is a missing-test-update that causes CI to fail and that AC-3's audit-gate cannot self-detect.


    Verdict: AC_NOT_MET

    The 5 ACs are functionally met by the implementation, but the PR's AC-3 prose rewrite of testgen/SKILL.md broke 2 pre-existing assertions in src/lib/__tests__/testgen-skill.test.ts — assertions that pin the OLD haiku claims this PR was explicitly chartered to remove. CI's build (22.x) job is red as a direct consequence (3188/3190 pass).

    This is exactly the "API break without full-suite check" pattern called out in feedback_full_suite_on_api_breaks.md — except here it's a content/test contract rather than an API signature. Fix is mechanical and belongs in this PR (not a follow-up issue), so AC-3 stays internally consistent at merge time.

    Documentation

    • CHANGELOG entry under [Unreleased] ### Changed — present and citing fix(agents): realign declared model tiers; document upstream routing bug #632 + #43869
    • docs/features/declarative-agents.md — agent table updated + new "Known Upstream Limitations" subsection
    • docs/features/plugin-distribution.md — agents.model row annotated as inert
    • docs/concepts/workflow-phases.md — testgen prose annotated

    Next Steps

    1. Required before merge: update src/lib/__tests__/testgen-skill.test.ts:
      • L25-29: change "## Token Optimization with Haiku Sub-Agents" → "## Sub-Agent Delegation for Stub Generation" (or delete the test entirely — the heading itself isn't load-bearing).
      • L56-59: delete the 90%.*token.*cost.*reduction assertion. AC-3 explicitly required removing this claim; the test must follow.
      • L1-10: refresh the top-of-file doc comment, which still references the old "haiku at runtime" contract.
      • Optionally: replace the remaining Parse.*Verification.*Criteria.*haiku / Generate.*Test.*Stub.*haiku assertions with assertions on the "inert per anthropics/claude-code#43869" annotation text — that's the actual contract this PR establishes.
    2. After the test fix lands and CI is green, re-run /qa 632 — verdict should flip to READY_FOR_MERGE.
    3. After merge of upstream anthropics/claude-code#43869, the // TODO sentinel at doctor.ts:46 and the matching deprecation notes will be the cleanup follow-up issue.
  7. added
    needs-work
    on May 13, 2026
  8. added a commit that references this issue on May 13, 2026
  9. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    QA Review for Issue #632 (Iteration 2)

    PR: #636 · Commit: ebe6ca6 · Prior QA: ed33459 (AC_NOT_MET)

    Incremental QA Summary

    Changes since last QA: 1 file (src/lib/__tests__/testgen-skill.test.ts)

    Check / AC Status Re-run? Reason
    AC-1..AC-5 MET Re-evaluated (unchanged) Prior QA marked all 5 functionally met; only test fix landed
    CI status All SUCCESS Re-run Always fresh
    Build PASS Re-run Always fresh
    Full test suite 3190/3190 Re-run Targeted regression fix verification

    AC Coverage

    AC Source Description Status Notes
    AC-1 Original Realign declared model tiers + inline #43869 note MET Unchanged from prior QA. grep "^model:" confirms qa-checker→sonnet, explorer/testgen→haiku across both agent dirs; inline note present in all 6 files.
    AC-2 Original sequant doctor warning + --quiet + snapshot test MET Unchanged. 4 dedicated tests in doctor.test.ts pass; // TODO: remove when anthropics/claude-code#43869 closes sentinel at doctor.ts:46.
    AC-3 Original Doc audit — every \bhaiku\b reference updated or annotated MET Newly cleaned up — test pinning the OLD wording was the missing piece. Audit-gate grep clean; this iteration adds the matching test update so the AC-3 invariant is enforced not just in prose but in CI.
    AC-4 Original AgentSettings.model @deprecated + inert-field note MET Unchanged from prior QA.
    AC-5 Original CHANGELOG [Unreleased] entry citing #632 + #43869 MET Unchanged.

    Coverage: 5/5 ACs fully met.


    CI Status

    Check State Conclusion Impact
    build (20.x) COMPLETED SUCCESS ✅ MET
    build (22.x) COMPLETED SUCCESS ✅ MET (was FAILURE at prior QA)
    typecheck COMPLETED SUCCESS ✅ MET
    validate-skills COMPLETED SUCCESS ✅ MET
    validate-plugin COMPLETED SUCCESS ✅ MET
    Plugin Structure Validation COMPLETED SUCCESS ✅ MET
    Hooks Validation COMPLETED SUCCESS ✅ MET
    Setup Directory Creation COMPLETED SUCCESS ✅ MET

    CI Summary: 8 passed, 0 pending, 0 failed. mergeable: MERGEABLE.


    Build Verification

    Check Status
    Feature branch npm run build ✅ Passed
    Feature branch npm test ✅ 3190 / 3190 (was 3188 / 3190 at prior QA)
    npm run lint ✅ 0 errors, 0 warnings
    Regression No — fix closes the regression introduced by prior commit

    Quality Metrics

    Metric Value Status
    Type issues (any) added 0 OK
    Deleted tests 0 OK
    Files changed (vs main) 30 OK (1 added since prior QA: the test fix)
    Lines added +402 -
    Lines deleted -93 -

    Code Review (Delta from Prior QA)

    The only change in this iteration is src/lib/__tests__/testgen-skill.test.ts (+15 / -7). Adversarial review of the delta:

    Strengths:

    • Fix is surgical: addresses both Required before merge items from the prior QA (L25-29 heading rename, L56-59 cost-savings assertion replacement) without touching unrelated tests.
    • L1-10 doc-comment refresh follows through on the prior QA's third required item.
    • New assertion at L61-67 pins the actual invariant this PR establishes (anthropics/claude-code#43869 reference + inert/currently inert wording) rather than re-encoding fragile cost-savings prose.
    • Heading text matches the SKILL.md exactly ("## Sub-Agent Delegation for Stub Generation") — verified by Read against .claude/skills/testgen/SKILL.md:30.

    Issues: None.

    Suggestions (non-blocking, deferred):

    • L41-49's Parse.*Verification.*Criteria.*haiku / Generate.*Test.*Stub.*haiku assertions still encode the haiku-as-runtime assumption. Currently passing because the rewrite kept haiku tokens with "inert per #43869" qualifications. The prior QA flagged this as Optionally (not Required). These tests will only need updating after #43869 closes AND a future docs sweep removes "haiku" entirely — at which point that future PR will own the rewrite. Defer.

    Test Coverage Analysis

    Changed File (this iteration) Tier Has Tests? Test File
    src/lib/__tests__/testgen-skill.test.ts Optional (is itself a test) N/A Self

    Test Quality Review

    Category Status Notes
    Behavior vs Implementation ✅ OK New assertion asserts on contract text (#43869 + "inert") — the actual user-visible invariant — rather than on internal structure
    Coverage Depth ✅ OK Replaces a brittle cost-savings claim with a precise invariant the SKILL.md must continue to honor
    Mock Hygiene ✅ OK No mocks; reads SKILL.md from disk
    Test Reliability ✅ OK Deterministic; no timing dependencies

    Anti-Pattern Detection

    Dependency Audit

    N/A — no package.json changes.

    Code Patterns

    None — diff is test-file content only.

    Critical Issues: 0
    Warnings: 0


    Self-Evaluation

    • Verified working: Yes — ran full test suite (3190/3190 pass), confirmed CI green on all 8 checks, verified the heading text in test matches testgen/SKILL.md:30 literally.
    • Test efficacy: High — the new assertion pins the exact text (anthropics/claude-code#43869 + inert) that AC-3 introduced as the contract. If a future change removes the inert annotation, this test will fail.
    • Likely failure mode: Same as prior QA: future contributors do another docs sweep and the remaining L41-49 haiku assertions break first. That's the right test to break next; the new assertion at L61-67 is the durable one.
    • Verdict confidence: High. The prior QA identified a precise, mechanical gap (stale test assertions in 1 file). The fix is precisely scoped, CI confirms green across the matrix, and full local suite passes.

    Adversarial Re-Read of New Commit

    1. (Confirmed clean) Test text vs SKILL.md text — Heading literal "## Sub-Agent Delegation for Stub Generation" matches .claude/skills/testgen/SKILL.md:30 exactly.
    2. (Confirmed clean) Assertion regex — /inert|currently inert/i matches the wording established in the SKILL.md prose at lines 32-50 and the agent-file inline notes.
    3. (Confirmed clean) No spillover — The test fix is the only diff vs prior QA. No unrelated files changed.
    4. (Confirmed clean) Build matrix delta — Prior QA had build (22.x): FAILURE + build (20.x): CANCELLED. Both now SUCCESS; matrix is no longer fail-fast-cancelling.
    5. (Confirmed clean) Branch sync — 0 ahead / 0 behind origin; 0 behind main. No drift.

    Verdict: READY_FOR_MERGE

    The single AC_NOT_MET blocker from iteration 1 (a stale test pinning AC-3's pre-rewrite prose) is closed. All 5 ACs are MET, all 8 CI checks SUCCESS, full local test suite 3190/3190, lint clean, build clean, branch in sync.

    Documentation

    • CHANGELOG [Unreleased] / ### Changed entry present (citing fix(agents): realign declared model tiers; document upstream routing bug #632 + #43869)
    • docs/features/declarative-agents.md — Known Upstream Limitations subsection added
    • docs/features/plugin-distribution.md — agents.model row annotated as inert
    • docs/concepts/workflow-phases.md — testgen prose annotated
    • N/A — README — no new user-facing flag (only the existing -q, --quiet extension on doctor, already covered via --help)

    Next Steps

    1. Merge PR fix(#632): realign agent model tiers + document upstream routing bug #636 (squash) — all gates green.
    2. Post-merge: when Subagent model routing is broken — all mechanisms resolve to parent model (Opus) anthropics/claude-code#43869 closes upstream, follow the // TODO sentinel at doctor.ts:46 to remove the warning + reactivate the declared tiers. File a follow-up issue at that time.
  10. added
    ready-for-review
    and removed
    needs-work
    on May 13, 2026
  11. admarble commented on May 13, 2026

    @admarble
    ContributorAuthor

    /fullsolve Complete — Issue #632

    Status: READY_FOR_MERGE
    PR: #636 (commit ebe6ca6, all 8 CI checks SUCCESS, mergeable)

    Progress

    Phase Iterations Status
    Spec 1 / 1 ✅ Complete (resumed from prior session)
    Exec 1 / 1 ✅ Complete (resumed from prior session)
    QA 2 / 2 ✅ Complete — iteration 1 caught regression; iteration 2 verified fix

    AC Coverage (final)

    • AC-1 — Realign declared model tiers → MET
    • AC-2 — sequant doctor upstream-bug warning + --quiet → MET
    • AC-3 — Documentation audit (every \bhaiku\b annotated/updated) → MET
    • AC-4 — AgentSettings.model @deprecated + non-default inert note → MET
    • AC-5 — CHANGELOG [Unreleased] entry → MET

    5/5 AC met.

    Quality Loop (iteration 2)

    Iteration 1 verdict was AC_NOT_MET because AC-3's prose rewrite of testgen/SKILL.md broke 2 pre-existing assertions in src/lib/__tests__/testgen-skill.test.ts — a contract-internal-consistency gap the audit-gate grep could not self-detect. CI's build (22.x) was red as a direct result.

    This iteration's commit (ebe6ca6, "test(#632): update testgen-skill assertions to match AC-3 prose rewrite") closes that gap:

    • Heading assertion: "## Token Optimization with Haiku Sub-Agents" → "## Sub-Agent Delegation for Stub Generation"
    • Cost-savings claim removed; replaced with assertion on the actual invariant this PR establishes (anthropics/claude-code#43869 reference + inert wording)
    • Top-of-file doc comment refreshed to reflect the new contract

    Quality Metrics

    Metric Value
    Files changed (vs main) 30 (+402 / -93)
    Tests 3190 / 3190 pass
    Lint 0 errors, 0 warnings
    Build clean
    CI matrix 8 / 8 SUCCESS
    Type issues (any) added 0
    Deleted tests 0

    Risk Assessment

    • Likely failure mode (production): None directly — the PR's runtime change is a one-line doctor warning + suppressible via --quiet. The deprecation annotation on agents.model is a JSDoc-only marker; existing user settings.json files continue to parse.
    • Future fragility: Two remaining test assertions at testgen-skill.test.ts:41-49 (Parse.*Verification.*Criteria.*haiku / Generate.*Test.*Stub.*haiku) currently pass against the new SKILL.md because the rewrite kept haiku tokens with inert annotations. They will only break after upstream #43869 closes AND a future docs sweep removes "haiku" entirely — at which point that future PR's QA will own the rewrite. Deferred (explicitly marked Optionally in iteration 1's QA).
    • Out-of-scope items intact: None of the four documented Out-of-Scope items (maxTurns/effort caps, runtime override wiring, [model: ...] parser strip, isolation: worktree SDK migration) were touched.

    Final Verdict: READY_FOR_MERGE

    Recommended next action: gh pr merge 636 --squash then ./scripts/cleanup-worktree.sh feature/632-fix-agents-realign-declared-model-tiers-document-u per the standard merge order.

  12. added a commit that references this issue on May 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationmulti-agentplannedready-for-reviewupstream

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions