Skip to content

feat(#484): migrate subagent patterns to declarative .claude/agents/ definitions - #496

Merged
admarble merged 3 commits into
mainfrom
feature/484-migrate-subagent-patterns-to-declarative-claude-ag
Apr 7, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/484-migrate-subagent-patterns-to-declarative-claude-ag

Conversation

@admarble

@admarble admarble commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Create 4 declarative agent definitions in .claude/agents/ that centralize model, permissions, effort, and tool restrictions previously duplicated inline across skill files
  • Update all Task() invocations to Agent() with custom agent names across 3 skill directories (.claude/skills/, templates/skills/, skills/)
  • Add templates/agents/ for sequant init support and update subagent-types.md reference documentation

Pre-PR AC Verification

AC Source Description Status Evidence
AC-1 Original sequant-explorer.md — haiku, Read/Grep/Glob ✅ .claude/agents/sequant-explorer.md
AC-2 Original sequant-qa-checker.md — haiku, bypassPermissions, effort:low ✅ .claude/agents/sequant-qa-checker.md
AC-3 Original sequant-implementer.md — inherits model, bypassPermissions ✅ .claude/agents/sequant-implementer.md
AC-4 Original sequant-testgen.md — haiku, Read/Grep/Glob/Write ✅ .claude/agents/sequant-testgen.md
AC-5 Original Clear description field on each agent ✅ All 4 agents have descriptive description fields
AC-6 Original /spec uses sequant-explorer ✅ .claude/skills/spec/SKILL.md
AC-7 Original /qa uses sequant-qa-checker ✅ .claude/skills/qa/SKILL.md
AC-8 Original /exec uses sequant-implementer ✅ .claude/skills/exec/SKILL.md
AC-9 Original /testgen uses sequant-testgen ✅ .claude/skills/testgen/SKILL.md
AC-10 Original All Task( → Agent( ✅ grep -rn 'Task(' .claude/skills/ templates/skills/ skills/ = 0 matches
AC-11 Original 3 directories synced ✅ All 3 dirs updated consistently
AC-12 Original Identical permission behavior ✅ Agent defs match prior inline params
AC-13 Original /qa agents get bypassPermissions ✅ sequant-qa-checker.md has permissionMode: bypassPermissions
AC-14 Original /spec agents read-only ✅ sequant-explorer.md tools: Read, Grep, Glob only
AC-15 Original Parallel/sequential still skill-controlled ✅ No background field in any agent def
AC-16 Original subagent-types.md documents custom agents ✅ Custom Agents section added
AC-17 Original Task() → Agent() in subagent-types.md ✅ All examples use Agent()
AC-18 Original Reference mirrors synced ✅ All 3 copies identical
AC-19 Original templates/agents/ created ✅ 4 agent files in templates/agents/
AC-20 Original Init copies agents to .claude/agents/ ✅ copyDir("agents", ".claude/agents") in templates.ts
AC-21 Derived allowed-tools updated Task → Agent ✅ All SKILL.md headers updated

Quality Gates

Check Status
npm run build ✅ Passed
npm run lint ✅ Passed
npm test ✅ 2388/2410 passed (22 failures are pre-existing semgrep timeouts)

Test plan

  • Run /spec on a test issue — verify explorer agents spawn correctly
  • Run /qa on a test branch — verify quality check agents use bypassPermissions
  • Run sequant init in a temp project — verify .claude/agents/ gets populated
  • Verify no new permission prompts appear (behavioral parity with inline patterns)

Closes #484

…definitions

Create 4 custom agent definitions that centralize model, permissions,
effort, and tool restrictions previously duplicated inline across skills:
- sequant-explorer (spec): haiku, read-only, Read/Grep/Glob
- sequant-qa-checker (qa): haiku, bypassPermissions, effort:low
- sequant-implementer (exec): inherits model, bypassPermissions
- sequant-testgen (testgen): haiku, Read/Grep/Glob/Write

Update all Task() invocations to Agent() across .claude/skills/,
templates/skills/, and skills/ directories. Add custom agents section
to subagent-types.md reference. Add templates/agents/ for sequant init
support and update copyDir in templates.ts.
admarble added 2 commits April 6, 2026 21:04
Test assertions referenced old inline patterns (Task(, model="haiku",
subagent_type="general-purpose") that were intentionally replaced by
declarative agent definitions. Update to match new Agent() syntax.
…c model override

- Remove Edit from sequant-qa-checker tools (read-only agent, least-privilege)
- Sync skills/testgen/SKILL.md with .claude/skills/testgen/SKILL.md (was
  pre-existing divergence missing sub-agent patterns and state tracking)
- Add clarifying comment in exec SKILL.md explaining why model="haiku"
  is passed inline (sequant-implementer intentionally omits model to
  allow per-invocation override)
@admarble
admarble merged commit 9daa0f4 into main Apr 7, 2026
7 of 8 checks passed
admarble added a commit that referenced this pull request Apr 9, 2026
Rule 1 states "Only PROCEED and REWRITE issues get commands" —
#496 (PARK) should not have a command line in the command block.
admarble added a commit that referenced this pull request Apr 9, 2026
…#512)

* docs: descope target architecture after overcomplexity review

Reviewed #503-#508 architecture for overengineering given project
scale (1 maintainer, 0 external users). Key changes:

- #504: descoped to emitter only, defer consumer migration
- #505: descoped to built-in registry, defer user extensibility
- #506: split to GitHubProvider async only, defer WorktreeManager
- #508: deferred entirely, fix log polling race separately

Added scope decisions table, deferred work table with explicit
triggers, and updated all diagrams to reflect revised scope.

Entire-Checkpoint: 5c90033d6aec

* fix: /assess batch output formatting + label-priority spec-skip

- Replace box-drawing command blocks with indented commands to
  prevent mojibake and overflow at any terminal width (AC-1)
- Add Rule 7: split commands at >6 issue numbers (AC-2)
- Add table column rules preventing mid-word truncation (AC-3)
- Add 11-issue large batch example (AC-4)
- Fix all existing examples for consistency (AC-5)
- Add label priority: domain labels override generic labels (AC-6)
- Amend skip-spec rule to exclude domain labels (AC-7)
- Add bug+auth label-priority example in batch output (AC-8)
- Sync all changes across 3 skill locations (AC-9)

Closes #494

* fix: remove PARK issue from command block in large batch example

Rule 1 states "Only PROCEED and REWRITE issues get commands" —
#496 (PARK) should not have a command line in the command block.

* docs: add CHANGELOG entry for #494

* fix: restore resume example + demonstrate Rule 7 split in examples

- Mixed-states: add #411 with ◂ resume symbol and # resume command
- Large batch: add 2 more exec→qa issues (13 total) so the 7 exec→qa
  issues split into 6+1, directly demonstrating Rule 7's >6 threshold
admarble added a commit that referenced this pull request Sep 9, 2026
Rule 1 states "Only PROCEED and REWRITE issues get commands" —
#496 (PARK) should not have a command line in the command block.
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.

Migrate subagent patterns to declarative .claude/agents/ definitions

1 participant