Best Practice Core
Extracts core best practices for a topic and formats them as a minimal, keyword-focused tree.
Purpose
Extract essential best practices for implementation tasks and format them as ultra-concise tree structures for quick reference during development.
When to Use
Invocation Timing:
- During task planning phase (before implementation)
- When writing subtasks in
Docs/{name}_Task.md documents
- BEFORE Worker agents start implementation
Output Location:
- Written directly under each subtask in Task document
- Acts as quick reference for developers/agents
Output Rules (STRICT ENFORCEMENT)
Format Constraints
| Rule |
Constraint |
| Max depth |
3 levels |
| Max children per node |
5 items |
| Leaf node max length |
12 words OR 60 characters |
| Node format |
Noun phrases/keywords ONLY |
| Duplicates |
Merge into single item |
| Tree format |
Markdown tree ONLY (no mixing) |
Zero Tolerance Items
❌ FORBIDDEN:
- Intro paragraphs, conclusions, or commentary
- Full sentences in leaf nodes
- Explanatory text outside the tree
- Mixed tree formats (ASCII + Markdown)
- Depth > 3 or children > 5
- Duplicate items
✅ REQUIRED:
- ONLY output the tree structure
- Use noun phrases: "Error boundary setup", "State validation logic"
- Keep leaf nodes concise: max 12 words
- Merge similar concepts
- Single tree format (Markdown bullets)
Example Output
Topic: Implementing User Authentication
- User Authentication
- Security
- Password hashing (bcrypt/argon2)
- JWT token management
- HTTPS-only cookies
- Validation
- Input sanitization
- Email format check
- Rate limiting
- Error Handling
- Failed login attempts tracking
- Account lockout mechanism
- Clear error messages (no data leaks)
Workflow
When invoked with a topic:
- Identify Core Areas: Extract 2-5 main categories for the topic
- Extract Best Practices: For each category, list 2-5 key practices
- Format as Keywords: Convert to noun phrases (no full sentences)
- Verify Constraints: Check depth ≤ 3, children ≤ 5, length ≤ 12 words
- Merge Duplicates: Combine similar/overlapping items
- Output Tree ONLY: No intro, no conclusion, just the tree
Integration with Task Documents
Example Task Document Integration:
## Worker1
- [ ] Implement user authentication #auth !high Deadline(2025:01:15)
- [ ] Design login UI layout
<!-- Best Practice Tree -->
- Login UI
- Layout
- Mobile-first responsive design
- Focus management (accessibility)
- Password visibility toggle
- Validation
- Real-time feedback
- Clear error states
- Security
- No password in URL params
- Auto-logout on idle
- [ ] Create API integration
<!-- Best Practice Tree -->
- Auth API Integration
- Request Handling
- Token refresh logic
- Retry with exponential backoff
- Error Handling
- Network failure graceful degradation
- 401/403 redirect to login
- Security
- Secure token storage
- XSS/CSRF protection
Usage Notes
- Concise over Complete: Focus on critical practices, not exhaustive lists
- Actionable Keywords: Use phrases developers can immediately act on
- Context-Aware: Tailor to the specific subtask context (UI vs API vs DB)
- No Duplication: If practice applies to multiple subtasks, mention once in parent
Common Topics
| Topic Type |
Core Areas to Cover |
| UI Components |
Layout, Accessibility, State, Events, Performance |
| API Integration |
Request/Response, Error Handling, Caching, Security |
| Database Operations |
Schema Design, Query Optimization, Transactions, Validation |
| State Management |
Data Flow, Mutations, Side Effects, Persistence |
| Testing |
Coverage, Edge Cases, Mocking, Performance |
Remember: Output ONLY the tree. No explanations.
1---2name: best-practice-core3description: [Dev] Extracts and organizes best practices for a given topic into a minimal tree structure (max depth 3, max 5 children per node). Use during task planning when writing subtasks in Docs/{name}_Task.md - output is added under each subtask as a concise reference guide. Pure reasoning task with strict formatting rules: keywords/noun phrases only, no prose. (project)4---5
6# Best Practice Core
7
8> Extracts core best practices for a topic and formats them as a minimal, keyword-focused tree.
9
10## Purpose
11
12Extract essential best practices for implementation tasks and format them as ultra-concise tree structures for quick reference during development.
13
14## When to Use
15
16**Invocation Timing:**
17- During task planning phase (before implementation)
18- When writing subtasks in `Docs/{name}_Task.md` documents
19- BEFORE Worker agents start implementation
20
21**Output Location:**
22- Written directly under each subtask in Task document
23- Acts as quick reference for developers/agents
24
25## Output Rules (STRICT ENFORCEMENT)
26
27### Format Constraints
28
29| Rule | Constraint |
30|------|------------|
31| Max depth | 3 levels |
32| Max children per node | 5 items |
33| Leaf node max length | 12 words OR 60 characters |
34| Node format | Noun phrases/keywords ONLY |
35| Duplicates | Merge into single item |
36| Tree format | Markdown tree ONLY (no mixing) |
37
38### Zero Tolerance Items
39
40❌ **FORBIDDEN:**
41- Intro paragraphs, conclusions, or commentary
42- Full sentences in leaf nodes
43- Explanatory text outside the tree
44- Mixed tree formats (ASCII + Markdown)
45- Depth > 3 or children > 5
46- Duplicate items
47
48✅ **REQUIRED:**
49- ONLY output the tree structure
50- Use noun phrases: "Error boundary setup", "State validation logic"
51- Keep leaf nodes concise: max 12 words
52- Merge similar concepts
53- Single tree format (Markdown bullets)
54
55## Example Output
56
57**Topic: Implementing User Authentication**
58
59```markdown
60- User Authentication
61 - Security
62 - Password hashing (bcrypt/argon2)
63 - JWT token management
64 - HTTPS-only cookies
65 - Validation
66 - Input sanitization
67 - Email format check
68 - Rate limiting
69 - Error Handling
70 - Failed login attempts tracking
71 - Account lockout mechanism
72 - Clear error messages (no data leaks)
73```
74
75## Workflow
76
77**When invoked with a topic:**
78
791. **Identify Core Areas**: Extract 2-5 main categories for the topic
802. **Extract Best Practices**: For each category, list 2-5 key practices
813. **Format as Keywords**: Convert to noun phrases (no full sentences)
824. **Verify Constraints**: Check depth ≤ 3, children ≤ 5, length ≤ 12 words
835. **Merge Duplicates**: Combine similar/overlapping items
846. **Output Tree ONLY**: No intro, no conclusion, just the tree
85
86## Integration with Task Documents
87
88**Example Task Document Integration:**
89
90```markdown
91## Worker1
92
93- [ ] Implement user authentication #auth !high Deadline(2025:01:15)
94 - [ ] Design login UI layout
95 <!-- Best Practice Tree -->
96 - Login UI
97 - Layout
98 - Mobile-first responsive design
99 - Focus management (accessibility)
100 - Password visibility toggle
101 - Validation
102 - Real-time feedback
103 - Clear error states
104 - Security
105 - No password in URL params
106 - Auto-logout on idle
107 - [ ] Create API integration
108 <!-- Best Practice Tree -->
109 - Auth API Integration
110 - Request Handling
111 - Token refresh logic
112 - Retry with exponential backoff
113 - Error Handling
114 - Network failure graceful degradation
115 - 401/403 redirect to login
116 - Security
117 - Secure token storage
118 - XSS/CSRF protection
119```
120
121## Usage Notes
122
123- **Concise over Complete**: Focus on critical practices, not exhaustive lists
124- **Actionable Keywords**: Use phrases developers can immediately act on
125- **Context-Aware**: Tailor to the specific subtask context (UI vs API vs DB)
126- **No Duplication**: If practice applies to multiple subtasks, mention once in parent
127
128## Common Topics
129
130| Topic Type | Core Areas to Cover |
131|------------|---------------------|
132| UI Components | Layout, Accessibility, State, Events, Performance |
133| API Integration | Request/Response, Error Handling, Caching, Security |
134| Database Operations | Schema Design, Query Optimization, Transactions, Validation |
135| State Management | Data Flow, Mutations, Side Effects, Persistence |
136| Testing | Coverage, Edge Cases, Mocking, Performance |
137
138---
139
140**Remember: Output ONLY the tree. No explanations.**