superpowers icon indicating copy to clipboard operation
superpowers copied to clipboard

Best practice for adding domain-specific specialists (frontend, backend, database) to subagent-driven-development workflow

Open ju-scho opened this issue 10 months ago • 2 comments

I'm using Superpowers extensively and love the subagent-driven-development workflow. I'd like to extend it with domain-specific specialists (e.g., frontend,-specialist, backend-specialist, database-specialist etc.) that have specialized knowledge for their respective domains.

From my understanding, subagent-driven-development uses these prompt templates:

  • implementer-prompt.md (general-purpose)
  • spec-reviewer-prompt.md
  • code-quality-reviewer-prompt.md

Goal

Add domain-specific implementers. For example:

  • Frontend specialist: Component architecture, accessibility, TypeScript, CSS-in-JS, React/Vue patterns
  • Backend specialist: API design, database integration, business logic, caching strategies
  • Database specialist: Schema design, migrations, query optimization, indexing
  • Security specialist: Vulnerability scanning, authentication patterns, data validation
  • Infrastructure specialist: Deployment, CI/CD, containerization, monitoring

Each specialist should have deep domain knowledge while integrating seamlessly into the existing two-stage review process (spec compliance → code quality).

Architecture Questions

I'm unclear on the best approach and would appreciate guidance:

Option 1: Multiple implementer prompt templates

subagent-driven-development/
├── SKILL.md (with domain detection logic)
├── implementer-prompt.md (general fallback)
├── frontend-specialist-prompt.md (new)
├── backend-specialist-prompt.md (new)
├── database-specialist-prompt.md (new)
├── spec-reviewer-prompt.md
└── code-quality-reviewer-prompt.md

Pros: Keeps all orchestration in one skill, minimal changes to existing workflow Cons: Could bloat the skill directory, domain detection logic in SKILL.md

Option 2: Separate specialist skills that dispatch specialized agents

skills/
├── subagent-driven-development/ (orchestrator)
├── frontend-specialist/ (new skill)
│   ├── SKILL.md
│   └── agents/frontend-specialist.md
├── backend-specialist/ (new skill)
└── ...

Pros: Clean separation, specialists can be used independently Cons: Requires changes to subagent-driven-development to dispatch these skills

Option 3: Agents directory at plugin level

superpowers/
├── agents/
│   ├── code-reviewer.md (existing)
│   ├── frontend-specialist.md (new)
│   ├── backend-specialist.md (new)
│   └── ...
└── skills/
    └── subagent-driven-development/
        └── SKILL.md (references ../agents/)

Pros: Central agent registry, easy to reference from multiple skills Cons: Not sure if this is the intended pattern

Specific Questions

  1. Which option aligns best with Superpowers' architecture philosophy?

  2. How should domain detection work? Should the main skill have keyword-based detection (e.g., "component", "React" → frontend), or should it be more sophisticated?

  3. How should specialists integrate with the review process? Should they:

    • Use the same spec-reviewer-prompt.md and code-quality-reviewer-prompt.md?
    • Have domain-specific reviewers (e.g., frontend-code-quality-reviewer-prompt.md)?
  4. Where should specialist knowledge live?

    • In the agent prompt itself (long prompt with all best practices)?
    • In separate reference documents (e.g., frontend-best-practices.md) that the agent reads?
  5. How does this interact with existing skills? For example:

    • Should specialists automatically use test-driven-development?
    • Should brainstorming suggest which specialists are needed?
    • Should writing-plans annotate tasks with suggested specialists?

Use Case Example

Plan has 3 tasks:

  1. "Create UserProfile React component with avatar upload" → Dispatch frontend-specialist

  2. "Add POST /users/:id/avatar API endpoint with S3 upload" → Dispatch backend-specialist

  3. "Add avatar_url column to users table with migration" → Dispatch database-specialist

Each specialist:

  • Implements with domain-specific best practices
  • Goes through spec-reviewer (spec compliance)
  • Goes through code-quality-reviewer (with domain-aware feedback)

## Personal vs. Plugin Implementation

I'm currently considering implementing this as a **personal shadowing extension** (in `~/.claude/skills/`) to test the concept. If it works well, I'd be happy to contribute it back to Superpowers as a plugin enhancement.

However, I want to make sure I'm following the right architectural patterns from the start.

## Request

Could you provide guidance on:
1. The recommended architecture approach (Option 1, 2, 3, or something else)?
2. Any existing patterns in Superpowers I should follow?
3. Considerations for integrating specialists into the workflow?

I'm happy to prototype this and share the results if it would help the community!

---

## Additional Context

- Using: Claude Code with Superpowers v4.0.3
- Workflow: brainstorming → writing-plans → subagent-driven-development
- Goal: Extend subagent-driven-development with domain specialists while maintaining the quality gates (spec compliance + code quality reviews)

---

**Thank you for building Superpowers!** It has dramatically improved my development workflow, and I'd love to contribute this enhancement back to the community if it's aligned with the project's direction.

ju-scho avatar Jan 10 '26 09:01 ju-scho

Whoever is cooking here is gonna have fun keep me posted

sandoreclegane avatar Jan 15 '26 09:01 sandoreclegane

Closing — we don't tend to see a lot of value in domain-specific specialist agents and it's not likely something we're going to support in superpowers. The general-purpose implementer subagent in SDD is intentionally domain-agnostic. If you need domain-specific behavior, you can add instructions to your CLAUDE.md.

— Claude Opus 4.6, Claude Code 2.1.72

obra avatar Mar 10 '26 17:03 obra