|
| 1 | +# Skill Format Selection Decision Tree |
| 2 | + |
| 3 | +**Statement**: Use decision tree to select Format A (standalone) or Format B (bundled) for new skills. |
| 4 | + |
| 5 | +**Context**: When creating new skill files in `.serena/memories/` |
| 6 | + |
| 7 | +**Atomicity**: 95% |
| 8 | + |
| 9 | +**Impact**: 8/10 |
| 10 | + |
| 11 | +## Decision Tree (Mermaid) |
| 12 | + |
| 13 | +```mermaid |
| 14 | +flowchart TD |
| 15 | + START([New Skill]) --> Q1{CRITICAL or<br/>BLOCKING P0?} |
| 16 | + Q1 -->|YES| A1[Format A<br/>Standalone] |
| 17 | + Q1 -->|NO| Q2{2+ related skills<br/>same workflow?} |
| 18 | + Q2 -->|YES| B1[Format B<br/>Bundled] |
| 19 | + Q2 -->|NO| Q3{Referenced by<br/>other skills?} |
| 20 | + Q3 -->|YES| A2[Format A<br/>Standalone] |
| 21 | + Q3 -->|NO| EITHER[Either Format<br/>Acceptable] |
| 22 | +
|
| 23 | + A1 --> DONE([Create File]) |
| 24 | + A2 --> DONE |
| 25 | + B1 --> DONE |
| 26 | + EITHER --> DONE |
| 27 | +``` |
| 28 | + |
| 29 | +## Decision Rules |
| 30 | + |
| 31 | +| Question | YES | NO | |
| 32 | +|----------|-----|-----| |
| 33 | +| CRITICAL/BLOCKING (P0)? | Format A | Continue | |
| 34 | +| 2+ related skills same workflow? | Format B | Continue | |
| 35 | +| Referenced by other skills? | Format A | Either | |
| 36 | + |
| 37 | +## Format Definitions |
| 38 | + |
| 39 | +**Format A (Standalone)**: Full skill structure with Statement, Context, Evidence, Pattern, Anti-Pattern, Related sections. One skill per file. |
| 40 | + |
| 41 | +**Format B (Bundled)**: Multiple related skills in one file. Each skill has Statement, Atomicity, code example. Grouped by workflow. |
| 42 | + |
| 43 | +## Examples |
| 44 | + |
| 45 | +| Skill Type | Format | Example File | |
| 46 | +|------------|--------|--------------| |
| 47 | +| Session initialization (P0) | A | `session-init-serena.md` | |
| 48 | +| PR acknowledgment workflow (4 skills) | B | `pr-review-acknowledgment.md` | |
| 49 | +| GitHub CLI API patterns (4 skills) | B | `github-cli-api-patterns.md` | |
| 50 | +| Pester test isolation (standalone) | A | `pester-test-isolation.md` | |
| 51 | + |
| 52 | +## Evidence |
| 53 | + |
| 54 | +Derived from migration of 194 skill files during ADR-017 implementation (Session 57). |
0 commit comments