skills/rlm-subagent/SKILL.md
Master skill for parallel subagent-driven execution with automatic fallback to single-agent sequential mode. Use when implementing plans with multiple independent sub-phases (SP1, SP2...) to dispatch parallel subagents, or when requiring code review between implementation and testing. Trigger phrases: "parallelize", "dispatch subagent", "split into sub-phases", "code review subagent", "parallel testing".
npx skillsauth add doubleuuser/rlm-workflow rlm-subagentInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
This skill provides parallel subagent execution for RLM Phase 3 (Implementation), Phase 3.5 (Code Review), and Phase 4 (Testing) with automatic fallback to sequential mode when subagents are unavailable.
Parallelize Phase 3 across independent sub-phasesDispatch an implementer subagent for each SPRun a separate code-reviewer subagent before Phase 4Subagents aren't available; fall back to sequential mode| Scenario | Action | |----------|--------| | Multiple independent sub-phases | Use Parallel Mode (subagents) | | Single sub-phase or subagents unavailable | Use Sequential Mode (fallback) | | Code review needed | Use Phase 3.5 (subagent or self-review) | | Parallel testing | Use Phase 4 parallel dispatch |
The Iron Law: NO SUBAGENT COMPLETION REPORT WITHOUT ALL TODOS CHECKED.
Each subagent (implementer, code-reviewer) MUST:
## TODO section in their work output## TODO
- [ ] Read and understand assigned SP specification
- [ ] Ask clarifying questions (if any)
- [ ] Write failing test (RED phase)
- [ ] Run test and verify failure
- [ ] Implement minimal code (GREEN phase)
- [ ] Run test and verify pass
- [ ] Refactor while keeping tests green
- [ ] Run integration tests
- [ ] Self-review against plan
- [ ] Document changes made
- [ ] Report completion to controller
## TODO
- [ ] Read original plan (Phase 3)
- [ ] Read implementation summary (Phase 3)
- [ ] Review git diff (BASE_SHA..HEAD_SHA)
- [ ] Verify plan alignment
- [ ] Assess code quality
- [ ] Check TDD compliance
- [ ] Categorize issues (Critical/Important/Minor)
- [ ] Document positive findings
- [ ] Render verdict
- [ ] Report review completion
The controller MUST:
At start of Phase 3, detect subagent availability:
IF can invoke "agent" or "Task" tool -> Use Parallel Mode
ELSE -> Use Sequential Fallback Mode
Detection rule: If the platform provides a subagent/task primitive, use parallel mode; otherwise fallback to sequential.
Controller responsibilities:
Dispatch pattern:
// Parallel dispatch for independent SPs
await Promise.all([
Task({ description: "Implement SP1", prompt: implementerPrompt(SP1) }),
Task({ description: "Implement SP2", prompt: implementerPrompt(SP2) }),
Task({ description: "Implement SP3", prompt: implementerPrompt(SP3) })
])
Two-stage review:
Trigger: After Phase 3 implementation
Action: Dispatch agents/code-reviewer.md subagent with:
Review loop: Issues found -> implementer fixes -> re-review
Required before dispatching tests:
03-implementation-summary.md against 00-requirements.md and 02-to-be-plan.mdDispatch pattern:
// Parallel test execution
await Promise.all([
Task({ description: "Run unit tests", prompt: testPrompt("unit") }),
Task({ description: "Run integration tests", prompt: testPrompt("integration") }),
Task({ description: "Run E2E tests", prompt: testPrompt("e2e") })
])
Result aggregation:
Trigger: Subagent capability check fails
Characteristics:
Fallback trigger flow:
**Subagent Check:** NOT AVAILABLE
**Reason:** [Tool not found / Platform limitation / User request]
**Action:** Using SEQUENTIAL fallback mode
For each SP in [SP1, SP2, SP3...]:
1. Execute SP implementation
2. Self-review against plan (extended checklist)
3. Document in Phase 4 artifact
4. Run integration tests
5. Proceed to next SP
Phase 3.5 equivalent:
agents/code-reviewer.mdFile: agents/implementer.md
Key requirements:
Usage:
You are an Implementer Agent. Implement this sub-phase:
**SP Text:** [full sub-phase text]
**BASE_SHA:** [commit SHA]
**Context:** [relevant files]
Follow the process in agents/implementer.md
File: agents/code-reviewer.md
Key requirements:
Usage:
You are a Code Reviewer Agent. Review this implementation:
**Plan:** [Phase 3 TO-BE]
**Git Range:** [BASE_SHA..HEAD_SHA]
**Implementation:** [Phase 4 summary]
Follow the process in agents/code-reviewer.md
Phase 4 artifact must include:
## Pre-Test Implementation Audit
- Requirements alignment (`00-requirements.md`): [summary + evidence]
- Plan alignment (`02-to-be-plan.md`): [summary + evidence]
- Mismatches and remediation/addenda: [details]
## Execution Mode
- **Mode:** Parallel / Sequential
- **Subagents Used:** [names and counts]
- **Fallback Reason:** [if applicable]
## Sub-phase Results
- SP1: [status] - [subagent name or "main agent"]
- SP2: [status] - [subagent name or "main agent"]
...
## Review Results
- SP1 Review: [status] - [reviewer name or "self-review"]
- SP2 Review: [status] - [reviewer name or "self-review"]
...
Phase 3.5 artifact (if used):
## Review Scope
- Git range: [BASE_SHA..HEAD_SHA]
- Execution Mode: Parallel (subagent) / Sequential (self-review)
- Reviewer: [subagent name / self]
## Issues Found
- Critical: [count]
- Important: [count]
- Minor: [count]
## Verdict
[APPROVED / APPROVED WITH NOTES / CHANGES REQUIRED]
Phase 4 artifact must include:
## Pre-Test Implementation Audit
- Requirements alignment (`00-requirements.md`): [summary + evidence]
- Plan alignment (`02-to-be-plan.md`): [summary + evidence]
- Mismatches and remediation/addenda: [details]
## Execution Mode
- **Mode:** Parallel / Sequential
- **Test Suites:**
- Unit: [subagent name] / Main agent
- Integration: [subagent name] / Main agent
- E2E: [subagent name] / Main agent
## Results Summary
- Total execution time: [X] minutes
- Estimated sequential time: [Y] minutes
- Speedup: [Z]x
Starting Phase 4
|
v
Subagent available? --NO--> SEQUENTIAL MODE
| - Execute SPs sequentially
| - Extended self-review
| - Document as sequential
YES
|
v
3+ independent SPs? --NO--> SEQUENTIAL MODE
| - Single sub-phase
| - No parallelism benefit
YES
|
v
PARALLEL MODE
- Dispatch implementer per SP
- Two-stage review
- Integration after all done
Both modes enforce:
Parallel Mode advantages:
Sequential Mode advantages:
Scenario: Feature touches API, UI, and database
Phase 2 TO-BE plan:
## Sub-phases
- SP1: API changes (backend/)
- SP2: UI changes (frontend/)
- SP3: Database migration (migrations/)
Phase 4 execution:
Scenario: SP2 depends on SP1 output
Phase 3 execution:
Scenario: Critical auth system change
Phase 3: Implement with TDD Phase 3.5: Mandatory code review Phase 4: Parallel testing (unit + integration + E2E)
SKILL.mdagents/implementer.mdagents/code-reviewer.mdreferences/artifact-template.mdtesting
Use when starting any RLM requirement to set up an isolated git worktree. REQUIRED before Phase 1 - creates isolated workspace, verifies clean test baseline, and prevents main branch pollution. Trigger phrases: "create worktree", "worktree isolation", "set up worktree", "do not work on main".
development
Use when implementing any code in RLM Phase 3. Enforces strict RED-GREEN-REFACTOR discipline with The Iron Law - no production code without a failing test first. Trigger phrases: "implement this", "add feature", "fix bug", "write a failing test", "TDD".
development
Use when RLM requirement involves debugging a bug, test failure, or unexpected behavior. Insert Phase 1.5 between Phase 1 and Phase 2 to perform systematic root cause analysis before attempting any fixes. Trigger phrases: "debug", "investigate", "failing tests", "crash", "root cause".
testing
Orchestrates the RLM repo workflow end-to-end with phase gates, locked artifacts, addenda, traceability, and automatic bootstrap/upsert of AGENTS/PLANS scaffolding. Trigger phrases: "Implement requirement <run-id>", "Run RLM Phase <N>", "resume requirement", "lock Phase <N>", "verify locks".