subagent-driven-development
Execute plans via delegate_task subagents (2-stage review).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Execute plans via delegate_task subagents (2-stage review).
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Run AI coding agents on disposable repo clones. The agent works on a clone — it can't touch your real repo. An optional container (Podman or Docker) provides build/test isolation. You review the diff and decide what (if anything) to apply.
Create Deezer playlists programmatically from any query — similar artists, genre mixes, festival lineups, mood-based collections. Four-tier data pipeline: Deezer public REST API + Last.fm scrobble data for discovery, GQL Pipe API for smart mixes and playlist creation, web search for subjective curation. Uses ARL cookie auth — no OAuth app required.
Generate compact AI-readable context maps from codebases — tools like codesight, repomix, agentic-context that pre-compute project structure to save tokens in AI coding sessions.
Research-focused query handling with multi-source synthesis, citations, and Obsidian persistence. Like a self-hosted Perplexity/Vane but CLI-native. Best for quick-to-medium lookups using Kagi. Use when the user asks factual questions, needs citations, or wants a direct answer — not a full research report (use deep-research) or social sentiment (use last30days). Triggers on: research, look into, what's the latest on, compare, explain, investigate.
Write articles, guides, blog posts, tutorials, newsletter issues, research reports, and deep research outputs in a distinctive voice derived from supplied examples or brand guidance. Use when the user wants polished written content longer than a paragraph, deep research on a topic, or a research report — especially when voice consistency, structure, and credibility matter. Triggers on: 'write an article', 'research report', 'deep research', 'long-form', 'blog post', 'guide', 'newsletter', 'white paper', 'research paper'.
Systematic research methodology for major consumer durables (appliances, HVAC, power tools, outdoor equipment) and smart garden/outdoor devices (bird feeder cameras, bird baths, smart outdoor gadgets). Emphasis on real reliability data, failure mode analysis, and head-to-head comparison. Use when the user asks to research, review, compare, or evaluate major purchases where longevity and repair risk matter, or when researching smart bird feeders, bird bath cameras, and similar connected outdoor devices. Triggers on: washer/dryer, refrigerator, dishwasher, HVAC, furnace, AC, generator, power tool, appliance reviews, appliance reliability, which [appliance] to buy, compare models, bird feeder camera, bird bath camera, smart garden devices.
| name | subagent-driven-development |
| description | Execute plans via delegate_task subagents (2-stage review). |
| version | 1.1.0 |
| author | Hermes Agent (adapted from obra/superpowers) |
| license | MIT |
| metadata | {"hermes":{"tags":["delegation","subagent","implementation","workflow","parallel"],"related_skills":["writing-plans","requesting-code-review","test-driven-development"]}} |
Execute implementation plans by dispatching fresh subagents per task with systematic two-stage review.
Core principle: Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration.
Use this skill when:
vs. manual execution:
Read the plan file. Extract ALL tasks with their full text and context upfront. Create a todo list:
# Read the plan
read_file("docs/plans/feature-plan.md")
# Create todo list with all tasks
todo([
{"id": "task-1", "content": "Create User model with email field", "status": "pending"},
{"id": "task-2", "content": "Add password hashing utility", "status": "pending"},
{"id": "task-3", "content": "Create login endpoint", "status": "pending"},
])
Key: Read the plan ONCE. Extract everything. Don't make subagents read the plan file — provide the full task text directly in context.
For EACH task in the plan:
Use delegate_task with complete context:
delegate_task(
goal="Implement Task 1: Create User model with email and password_hash fields",
context="""
TASK FROM PLAN:
- Create: src/models/user.py
- Add User class with email (str) and password_hash (str) fields
- Use bcrypt for password hashing
- Include __repr__ for debugging
FOLLOW TDD:
1. Write failing test in tests/models/test_user.py
2. Run: pytest tests/models/test_user.py -v (verify FAIL)
3. Write minimal implementation
4. Run: pytest tests/models/test_user.py -v (verify PASS)
5. Run: pytest tests/ -q (verify no regressions)
6. Commit: git add -A && git commit -m "feat: add User model with password hashing"
PROJECT CONTEXT:
- Python 3.11, Flask app in src/app.py
- Existing models in src/models/
- Tests use pytest, run from project root
- bcrypt already in requirements.txt
""",
toolsets=['terminal', 'file']
)
After the implementer completes, verify against the original spec:
delegate_task(
goal="Review if implementation matches the spec from the plan",
context="""
ORIGINAL TASK SPEC:
- Create src/models/user.py with User class
- Fields: email (str), password_hash (str)
- Use bcrypt for password hashing
- Include __repr__
CHECK:
- [ ] All requirements from spec implemented?
- [ ] File paths match spec?
- [ ] Function signatures match spec?
- [ ] Behavior matches expected?
- [ ] Nothing extra added (no scope creep)?
OUTPUT: PASS or list of specific spec gaps to fix.
""",
toolsets=['file']
)
If spec issues found: Fix gaps, then re-run spec review. Continue only when spec-compliant.
After spec compliance passes:
delegate_task(
goal="Review code quality for Task 1 implementation",
context="""
FILES TO REVIEW:
- src/models/user.py
- tests/models/test_user.py
CHECK:
- [ ] Follows project conventions and style?
- [ ] Proper error handling?
- [ ] Clear variable/function names?
- [ ] Adequate test coverage?
- [ ] No obvious bugs or missed edge cases?
- [ ] No security issues?
OUTPUT FORMAT:
- Critical Issues: [must fix before proceeding]
- Important Issues: [should fix]
- Minor Issues: [optional]
- Verdict: APPROVED or REQUEST_CHANGES
""",
toolsets=['file']
)
If quality issues found: Fix issues, re-review. Continue only when approved.
todo([{"id": "task-1", "content": "Create User model with email field", "status": "completed"}], merge=True)
After ALL tasks are complete, dispatch a final integration reviewer:
delegate_task(
goal="Review the entire implementation for consistency and integration issues",
context="""
All tasks from the plan are complete. Review the full implementation:
- Do all components work together?
- Any inconsistencies between tasks?
- All tests passing?
- Ready for merge?
""",
toolsets=['terminal', 'file']
)
# Run full test suite
pytest tests/ -q
# Review all changes
git diff --stat
# Final commit if needed
git add -A && git commit -m "feat: complete [feature name] implementation"
When dispatching an implementer subagent for a non-trivial task, structure the context as a 5-part contract. This prevents drift, scope creep, and reward-hacking in autonomous execution.
pytest -q, pnpm test, npm run build, etc.). After each change, the subagent runs this..md files or updates to existing docs).**Objective:** <one-sentence objective>
**Read first:** <files/PLAN.md/issue links>
**Constraints:** <what not to change, libs, conventions. Do not refactor unrelated code. Do not add dependencies.>
**Validate:** `<exact command>` after each change
**Document:** Write concise, targeted documentation for all changes — create new `.md` files or update existing docs as needed.
**Checkpoints:** Work in checkpoints and log progress briefly.
**Reward-hacking prohibition:** Do not delete, skip, weaken, or narrow tests to make the goal pass.
**Stop when:** <verifiable condition>, OR when further changes require human/product input.
**Objective:** Migrate this project from Pydantic v1 to v2.
**Read first:** pyproject.toml, src/, tests/
**Constraints:** no public API changes; keep imports backwards-compatible via shims if needed; no new dependencies. Do not refactor unrelated code.
**Validate:** `pytest -q` after each change
**Document:** Write concise, targeted documentation for all changes.
**Checkpoints:** Work in checkpoints; log progress briefly.
**Reward-hacking prohibition:** Do not delete, skip, weaken, or narrow tests to make the goal pass.
**Stop when:** full suite passes with zero deprecation warnings, OR when a change requires architecture decisions.
Hand-written goals under-specify. For complex tasks, ask a second AI session (a separate delegate_task subagent, or a browser-based session like Claude/ChatGPT with the codebase loaded) to:
Paste that contract into the implementer subagent's context. This is an order-of-magnitude improvement over writing the contract yourself, because the inspecting session catches constraints you missed.
Delegate first, but always have a fallback plan. When a task is complex enough to warrant delegation but the user is waiting for results, attempt delegation and automatically fall back to inline execution if the subagent fails.
Delegate first, but always have a fallback plan. When a task is complex enough to warrant delegation but the user is waiting for results, attempt delegation and automatically fall back to inline execution if the subagent fails.
| Failure Type | Symptoms | Recovery |
|---|---|---|
| API malformed data | "Upstream emitted malformed tool call data" | Fall back to inline immediately |
| Rate limiting | 429 errors, timeouts | Retry with backoff or fallback |
| Subagent crash | Exit code non-zero, empty results | Fall back to inline |
| Tool limitations | Subagent lacks needed tools | Use inline from start |
| Infinite loops | Max iterations hit without progress | Fall back with partial results |
result = delegate_task(goal="...", skills=["relevant-skill"], toolsets=["web", "terminal"])
if result.get('error') or result.get('status') != 'completed':
# Fallback: execute inline with same approach
# Inform user: "Delegation failed, doing it directly instead"
...
After EVERY delegate_task where the subagent was expected to create files:
find <directory> -type f -name "*.ext" to confirm files existwc -l <files> to verify content length > 0Do NOT trust the subagent's self-reported summary about files written. Always verify with filesystem commands in YOUR context, not delegated context.
When a subagent write fails but the tool trace shows the intended content:
write_fileEach task = 2-5 minutes of focused work.
Too big:
Right size:
Why fresh subagent per task:
Why two-stage review:
Cost trade-off:
This skill EXECUTES plans created by the writing-plans skill:
Implementer subagents should follow TDD:
Include TDD instructions in every implementer context.
The two-stage review process IS the code review. For final integration review, use the requesting-code-review skill's review dimensions.
If a subagent encounters bugs during implementation:
[Read plan: docs/plans/auth-feature.md]
[Create todo list with 5 tasks]
--- Task 1: Create User model ---
[Dispatch implementer subagent]
Implementer: "Should email be unique?"
You: "Yes, email must be unique"
Implementer: Implemented, 3/3 tests passing, committed.
[Dispatch spec reviewer]
Spec reviewer: ✅ PASS — all requirements met
[Dispatch quality reviewer]
Quality reviewer: ✅ APPROVED — clean code, good tests
[Mark Task 1 complete]
--- Task 2: Password hashing ---
[Dispatch implementer subagent]
Implementer: No questions, implemented, 5/5 tests passing.
[Dispatch spec reviewer]
Spec reviewer: ❌ Missing: password strength validation (spec says "min 8 chars")
[Implementer fixes]
Implementer: Added validation, 7/7 tests passing.
[Dispatch spec reviewer again]
Spec reviewer: ✅ PASS
[Dispatch quality reviewer]
Quality reviewer: Important: Magic number 8, extract to constant
Implementer: Extracted MIN_PASSWORD_LENGTH constant
Quality reviewer: ✅ APPROVED
[Mark Task 2 complete]
... (continue for all tasks)
[After all tasks: dispatch final integration reviewer]
[Run full test suite: all passing]
[Done!]
Fresh subagent per task
Two-stage review every time
Spec compliance FIRST
Code quality SECOND
Never skip reviews
Catch issues early
Quality is not an accident. It's the result of systematic process.