Implement a feature using senior staff engineer best practices with parallel subagents
Implements new features using senior engineer best practices with parallel subagents. Use this when building complex features that require research, planning, and multi-step implementation with proper testing and quality checks.
/plugin marketplace add mgiovani/cc-arsenal/plugin install cc-arsenal@cc-arsenal-marketplace<feature_description>dev/You are implementing a new feature as a Senior Staff Engineer following best practices (SOLID, DRY, YAGNI) to create a secure, fast, and reliable production application.
$ARGUMENTS
CRITICAL: Before implementing anything:
bun, npm, make, etc. existMakefile, justfile, package.json, pyproject.toml, etc.Use TodoWrite to track progress through each phase. Update task status as you complete each step.
Before any implementation, discover how this project works:
Use Task tool with Explore agent:
- prompt: "Discover the development workflow for this project:
1. Read CLAUDE.md if it exists - extract all development commands
2. Check for task runners: Makefile, justfile, package.json scripts, pyproject.toml scripts
3. Identify the test command (e.g., make test, just test, npm test, pytest, bun test)
4. Identify the lint command (e.g., make lint, npm run lint, ruff check)
5. Identify the build/type-check command
6. Identify the dev server command if applicable
7. Note any pre-commit hooks or quality gates
Return a structured summary of all available commands."
- subagent_type: "Explore"
Store discovered commands for use in later phases. Example output:
Project Commands:
- Test: `make test` or `pytest`
- Lint: `make lint` or `ruff check`
- Type Check: `make type-check` or `pyright`
- Build: `make build` or `npm run build`
- Dev Server: `make dev` or `npm run dev`
- Quality: `make check` (runs all checks)
Use Task tool with Explore agent:
- prompt: "For implementing [FEATURE], explore the codebase to find:
1. Similar existing implementations we can reference
2. Coding patterns and conventions used
3. Test patterns and fixtures used
4. File organization and naming conventions
Return specific file paths and patterns to follow."
- subagent_type: "Explore"
EnterPlanMode to create a detailed implementation planFor each parallelizable task group, spawn subagents using the Task tool:
Subagent Instructions Template:
Implement [specific task description].
First, read the project's CLAUDE.md to understand conventions and patterns.
Requirements:
1. Follow existing codebase patterns and conventions
2. Apply SOLID, DRY, YAGNI principles
3. Write comprehensive tests (unit + integration where applicable)
4. All tests MUST pass before completion
5. Handle errors appropriately
6. Add necessary type definitions (if typed language)
Project-specific commands (discovered in Phase 0):
- Test command: [INSERT DISCOVERED TEST COMMAND]
- Lint command: [INSERT DISCOVERED LINT COMMAND]
After implementation:
1. Run the test suite to verify all tests pass
2. Run linting to ensure code quality
3. Report back what was implemented (do NOT commit - the main agent will handle commits)
If tests fail, fix them before reporting completion.
If you encounter ambiguous requirements, report back and ask for clarification instead of guessing.
After each subagent completes, the main agent should:
/cc-arsenal:git:commit to commit the subagent's work (if available) or create a conventional commit manuallyParallelization Strategy:
After all subagents complete, run verification using the discovered commands from Phase 0:
Example verification (commands vary by project):
# Python project with Makefile
make test && make lint && make type-check
# Node.js project with package.json
npm test && npm run lint && npm run build
# Python project with just
just test && just lint
# Simple Python project
pytest && ruff check . && pyright
Only proceed when all checks pass:
If the feature has a UI component and Playwright MCP is available:
mcp__playwright__browser_navigatemcp__playwright__browser_snapshotmcp__playwright__browser_take_screenshotmcp__playwright__browser_closeWhen to Skip Manual Testing:
Each subagent MUST ensure:
If a subagent encounters issues:
If you encounter unclear or ambiguous requirements at any phase:
AskUserQuestion to clarify before proceedingProvide a summary including:
# Implement a specific feature
/dev:implement-feature Add user authentication with OAuth2
# Implement with more context
/dev:implement-feature Create a REST API endpoint for managing user preferences with validation
# Implement a refactoring task
/dev:implement-feature Refactor the payment module to use the strategy pattern