Skip to content

feat(#262): Restrict sub-agent types per skill via Task(agent_type) frontmatter - #263

Merged
admarble merged 3 commits into
mainfrom
feature/262-feat-restrict-sub-agent-types-per-skill-via-task-a
Feb 6, 2026
Merged

admarble merged 3 commits into
mainfrom
feature/262-feat-restrict-sub-agent-types-per-skill-via-task-a

Conversation

@admarble

@admarble admarble commented Feb 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Replace unrestricted Task with targeted Task(agent_type) in skill frontmatter to enforce principle of least privilege
  • Skills that spawn sub-agents now declare the specific agent type they use
  • Skills that don't use sub-agents no longer declare Task access
  • Orchestrator skill (/fullsolve) retains unrestricted Task for child skill invocation

Changes

Skill Before After Rationale
/spec Task Task(Explore) Uses subagent_type="Explore" for codebase research
/qa Task Task(general-purpose) Uses subagent_type="general-purpose" for parallel checks
/exec Task Task(general-purpose) Uses subagent_type="general-purpose" for parallel implementation
/security-review Task (removed) No sub-agent usage
/merger Task (removed) No sub-agent usage
/fullsolve Task Task Orchestrator - needs flexibility for child skills

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Each skill template uses Task(agent_type) instead of unrestricted Task ✅ Implemented spec→Task(Explore), qa/exec→Task(general-purpose)
AC-2 Agent type restrictions match actual sub-agent usage ✅ Implemented Verified via grep for subagent_type patterns
AC-3 sequant update syncs updated frontmatter ✅ Implemented Both templates/ and .claude/skills/ updated
AC-4 Skills without sub-agents don't list Task ✅ Implemented security-review, merger have no Task

Test plan

  • npm run build - passes
  • npm run lint - passes
  • npm test - 1178 tests passed

Closes #262

🤖 Generated with Claude Code

Replace unrestricted `Task` with targeted `Task(agent_type)` syntax
in skill frontmatter to enforce principle of least privilege:

- spec: Task → Task(Explore) - planning is read-only research
- qa: Task → Task(general-purpose) - parallel quality checks
- exec: Task → Task(general-purpose) - parallel implementation
- security-review: remove Task - no sub-agents used
- merger: remove Task - no sub-agents used
- fullsolve: keep Task (orchestrator needs flexibility)

Both templates/skills/ and .claude/skills/ updated independently
to preserve local customizations.

Closes #262

Co-Authored-By: Claude Opus 4.5 <[email protected]>
admarble and others added 2 commits February 6, 2026 00:31
…eral-purpose)

Address QA findings for AC-4:
- fullsolve uses Skill() not Task(), so Task removed from frontmatter
- testgen .claude spawns general-purpose sub-agents, restrict accordingly

Co-Authored-By: Claude Opus 4.6 <[email protected]>
- Add Task(general-purpose) to testgen template (matches .claude version)
- Add Skill tool to fullsolve template (matches .claude version)

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@admarble
admarble merged commit 2a06758 into main Feb 6, 2026
6 checks passed
@admarble
admarble deleted the feature/262-feat-restrict-sub-agent-types-per-skill-via-task-a branch February 6, 2026 06:38
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.

feat: Restrict sub-agent types per skill via Task(agent_type) frontmatter

1 participant