一键导入
decompose
Break features into tracer bullet stories and tasks. Trigger: decompose, break down, split feature, tracer bullet, stories, tasks, decompose feature
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Break features into tracer bullet stories and tasks. Trigger: decompose, break down, split feature, tracer bullet, stories, tasks, decompose feature
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | decompose |
| description | Break features into tracer bullet stories and tasks. Trigger: decompose, break down, split feature, tracer bullet, stories, tasks, decompose feature |
Big features fail because they are built as big features. Decompose into tracer bullets -- each bullet cuts through all layers, delivers user-visible value, and fits in one PR. The first bullet is always the simplest end-to-end path that proves the architecture works. Every subsequent bullet adds one behavior.
WRONG (horizontal): RIGHT (tracer bullets):
Epic: User Authentication Epic: User Authentication
Tasks: Bullet 1: Login (tracer bullet)
1. Build all database models - Schema: users table
2. Build all service functions - Logic: validate credentials
3. Build all API endpoints - API: POST /login
4. Build all frontend components - Test: login happy path
5. Wire everything together
Bullet 2: Login failures
Each task touches one layer. - Logic: invalid credentials error
No deliverable until step 5. - API: 401 response
- Test: invalid password, missing user
Bullet 3: Registration
- Schema: add email unique constraint
- Logic: create user + hash password
- API: POST /register
- Test: register + then login
/decompose [feature description] --> decompose the described feature
/decompose --> interactive, ask for feature details
Gather:
What is the feature? (high-level goal)
Who are the users? (personas, API consumers, other services)
What are the acceptance criteria? (how do we know it is done)
Feature goal understood
Users/consumers identified
Acceptance criteria defined
List every user-facing behavior the feature provides:
| Category | Examples |
|---|---|
| Happy paths | Main success scenarios, primary use cases |
| Error paths | What goes wrong, how errors surface to users |
| Edge cases | Boundary conditions, empty states, limits |
| Admin/config | Settings, feature flags, operational controls |
Do not filter yet. List everything, then order.
Sort behaviors from simplest to most complex:
The first tracer bullet must:
Touch every layer (schema, logic, API, tests)
Be independently deployable
Prove the architecture works end-to-end
Be completable in a single session
Behaviors ordered by complexity
Tracer bullet identified (simplest end-to-end path)
For each bullet, define:
| Field | Description |
|---|---|
| Name | Descriptive 3-5 word title |
| Behavior | What the user can do after this bullet is deployed |
| Layers touched | Schema, logic, API, UI, tests |
| Files to create/modify | Specific file paths |
| Tests to write | Test names and what they verify |
| Acceptance criteria | User-verifiable conditions |
| Dependencies | Which bullets must come first |
## Feature Decomposition: [Feature Name]
**Total Bullets:** [N]
**Estimated PRs:** [N]
### Bullet 1: [Name] (Tracer Bullet)
**Behavior:** [what the user can do after this]
**Layers:** [schema, logic, API, tests]
**Files:**
- `path/to/file` -- [what changes]
**Tests:**
- `test_name` -- [what it verifies]
**Acceptance:** [criteria]
### Bullet 2: [Name]
**Behavior:** [what this adds]
**Depends on:** Bullet 1
**Layers:** [list]
**Files:**
- `path/to/file` -- [what changes]
**Tests:**
- `test_name` -- [what it verifies]
**Acceptance:** [criteria]
### Bullet 3: [Name]
...
Present decomposition to the user. Adjust based on feedback:
Merge bullets that are too small
Split bullets that are too large
Reorder if dependencies change
User reviewed decomposition
Adjustments applied
Final decomposition approved
| Bullet Size | Action |
|---|---|
| < 30 lines, 1-2 files | Consider merging with an adjacent bullet |
| 30-300 lines, 3-10 files | Good size |
| > 300 lines or > 10 files | Split into smaller bullets |
| Takes > 1 session | Definitely too large, split further |
After decomposition is approved:
working/plans/)This ensures continuous integration -- the main branch is always deployable, and each merge proves the architecture holds.
Create a new feature using TDD and tracer bullets. Trigger: new feature, add feature, implement feature, build feature
Deploy to staging or production with safety checks. Trigger: deploy, ship, release, push to staging, push to production
Build or update .context.md for a module. Trigger: explore module, explore, understand module, what does this module do, context file, update context
Fix a bug with root cause analysis and regression testing. Trigger: fix bug, broken, regression, error, crash, not working, failing
Run linters, formatters, and static analysis. Trigger: lint, format, standards, style check, code quality, lint setup
Safely refactor existing code with tests as the contract. Trigger: refactor, tech debt, code smell, clean up, restructure, reorganize