Trinity Decompose
Command: /planning:trinity-decompose Purpose: Decompose work into atomic tasks using EUS (Task Decomposer) Architecture: EUS task…
# Trinity Task Decomposition - EUS
**Command:** `/planning:trinity-decompose`
**Purpose:** Decompose work into atomic tasks using EUS (Task Decomposer)
**Architecture:** EUS task breakdown → Atomic task validation → TDD cycle planning
**Trinity Version:** 2.1.0
**Last Updated:** 2026-01-21
**Agent:** EUS (Task Decomposer)
**Role:** Break work into atomic tasks following "1 task = 1 commit" rule
## What EUS Does
1. **Atomic Task Breakdown:**
- Each task = 1 commit
- Maximum 2 hours per task
- Single responsibility per task
- Clear success criteria
2. **Task Independence:**
- Minimal cross-dependencies
- Can be tested in isolation
- Clear input/output boundaries
3. **Commit Message Planning:**
- Conventional commits format
- `feat:`, `fix:`, `refactor:`, `test:`, `docs:`
- Descriptive and concise
4. **TDD Enforcement:**
- RED: Write failing test
- GREEN: Minimal code to pass
- REFACTOR: Clean up
- Each cycle = 1 commit
## Output Format
EUS produces structured JSON handoff:
```json
{
"atomicTasks": [
{
"id": 1,
"description": "Implement validation logic",
"commitMessage": "feat(validator): add input validation",
"estimatedTime": "45min",
"testStrategy": "Unit tests for edge cases",
"successCriteria": "All validation tests pass",
"dependencies": []
}
],
"tddCycles": [
{
"test": "test description",
"implementation": "impl description",
"refactor": "refactor description"
}
]
}
EUS Agent Capabilities
EUS specializes in atomic task decomposition following Trinity principles:
- Atomic Breakdown: "1 task = 1 commit" rule ensures clean version control
- TDD Enforcement: Every task follows RED-GREEN-REFACTOR cycle
- Task Independence: Minimal cross-dependencies enable parallel development
- Time Boxing: Maximum 2 hours per task for manageable implementation
Integration with Trinity Workflow
EUS's task decomposition follows TRA's strategic planning:
- After TRA: Strategic plan created with high-level tasks
- EUS Decomposition (Claude adopts EUS persona): Breaks tasks into atomic units (1 commit each)
- KIL Execution: Each atomic task implemented following TDD cycle
- TDD Cycles: RED (test) → GREEN (implement) → REFACTOR (clean)
- BAS Quality Gates: Validate after each atomic task commit
Example workflow:
Phase 3: Implementation
├── EUS Decomposition: Break plan into atomic tasks
│ Output: 12 atomic tasks (each ≤2 hours)
│ Each task = 1 TDD cycle = 1 commit
│
└── KIL Implementation: Execute atomic tasks
├── Atomic Task 1: Add validation logic → BAS gates
├── Atomic Task 2: Create service layer → BAS gates
├── Atomic Task 3: Implement error handling → BAS gates
└── ... (continue until all tasks complete)
See Also: /trinity-orchestrate for complete workflow planning
Scale-Based Task Decomposition
EUS adjusts decomposition granularity based on task scale:
- Small workflows: 2-4 atomic tasks (direct implementation)
- Medium workflows: 6-10 atomic tasks (phased approach)
- Large workflows: 12-20 atomic tasks (comprehensive breakdown)
Each atomic task always follows Trinity principles:
- Maximum 2 hours duration
- Single responsibility (one purpose)
- Clear success criteria (testable)
- BAS quality gate validation (6 phases)
Usage
Provide implementation plan and Claude (as EUS) will decompose into atomic tasks:
What is the implementation plan? (Or provide TRA's output)
For complete workflow planning:
Use /trinity-orchestrate to plan your implementation with EUS decomposition as a key phase
Conventional Commits Quick Reference
Trinity uses Conventional Commits for atomic task commits (1 task = 1 commit).
Format
<type>(<scope>): <subject>
<body>
<footer>
Types
- feat: New feature
- fix: Bug fix
- refactor: Code change (no feature/fix)
- test: Add/update tests
- docs: Documentation only
- style: Formatting (no code change)
- perf: Performance improvement
- chore: Build/tooling changes
Examples
Feature:
feat(auth): add JWT refresh token endpoint
Implement POST /auth/refresh endpoint with token rotation.
Uses HttpOnly cookies for security.
Closes #42
Fix:
fix(auth): validate token expiration correctly
Token expiration was checked against wrong timestamp.
Now uses UTC comparison.
Fixes #128
Refactor:
refactor(validation): extract email validator to utility
Reduces code duplication across 3 files.
Maintains same validation logic.
Trinity Best Practices
- One Task = One Commit: Each EUS task gets exactly one commit
- Atomic: Commit must be complete (tests pass, build succeeds)
- Descriptive: Subject line explains "what", body explains "why"
- Reference Issues: Link to work orders (e.g., "WO-042")
Maintain Trinity Decompose?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Trinity Decompose on getagentictools](https://getagentictools.com/loops/strawhatluka-trinity-task-decomposition-eus?ref=badge)