@ngockhoale/ukit 1.6.8 → 2.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/manifests/platform.full.yaml +24 -0
  3. package/package.json +2 -1
  4. package/scripts/skill/audit-skill.mjs +39 -0
  5. package/src/cli/commands/doctor.js +22 -2
  6. package/src/cli/commands/memory.js +76 -1
  7. package/src/core/memory/store.js +125 -1
  8. package/src/core/skillProfile.js +45 -0
  9. package/src/skill/auditSkill.js +99 -0
  10. package/templates/.claude/agents/code-reviewer.md +51 -7
  11. package/templates/.claude/agents/handoff-planner.md +18 -2
  12. package/templates/.claude/skills/canvas-design/SKILL.md +2 -20
  13. package/templates/.claude/skills/canvas-design/philosophy-examples.md +23 -0
  14. package/templates/.claude/skills/debugging-toolkit/SKILL.md +2 -30
  15. package/templates/.claude/skills/debugging-toolkit/reference-tables.md +33 -0
  16. package/templates/.claude/skills/docs-manager/SKILL.md +7 -249
  17. package/templates/.claude/skills/docs-manager/conventions-and-examples.md +221 -0
  18. package/templates/.claude/skills/docx/SKILL.md +3 -34
  19. package/templates/.claude/skills/docx/redlining-reference.md +34 -0
  20. package/templates/.claude/skills/duraone/SKILL.md +12 -16
  21. package/templates/.claude/skills/executing-plans/SKILL.md +31 -19
  22. package/templates/.claude/skills/file-organizer/SKILL.md +2 -170
  23. package/templates/.claude/skills/file-organizer/examples-and-practices.md +173 -0
  24. package/templates/.claude/skills/pdf/SKILL.md +1 -62
  25. package/templates/.claude/skills/pdf/reference.md +65 -0
  26. package/templates/.claude/skills/pdf-processing-pro/SKILL.md +2 -73
  27. package/templates/.claude/skills/pdf-processing-pro/workflows-and-troubleshooting.md +80 -0
  28. package/templates/.claude/skills/pptx/SKILL.md +14 -286
  29. package/templates/.claude/skills/pptx/design-references.md +81 -0
  30. package/templates/.claude/skills/pptx/template-replacement-reference.md +150 -0
  31. package/templates/.claude/skills/pptx/utilities.md +62 -0
  32. package/templates/.claude/skills/project-learning/SKILL.md +32 -0
  33. package/templates/.claude/skills/root-cause-tracing/SKILL.md +2 -35
  34. package/templates/.claude/skills/root-cause-tracing/diagrams.md +44 -0
  35. package/templates/.claude/skills/sharing-skills/SKILL.md +1 -41
  36. package/templates/.claude/skills/sharing-skills/complete-example.md +41 -0
  37. package/templates/.claude/skills/skill-quality/SKILL.md +37 -0
  38. package/templates/.claude/skills/skill-quality/pressure-scenario-template.md +20 -0
  39. package/templates/.claude/skills/skill-quality/rationalization-table-template.md +15 -0
  40. package/templates/.claude/skills/skill-quality/trigger-accuracy-template.md +32 -0
  41. package/templates/.claude/skills/sql-optimization-patterns/SKILL.md +13 -440
  42. package/templates/.claude/skills/sql-optimization-patterns/references/advanced-techniques.md +128 -0
  43. package/templates/.claude/skills/sql-optimization-patterns/references/core-concepts.md +112 -0
  44. package/templates/.claude/skills/sql-optimization-patterns/references/query-patterns.md +204 -0
  45. package/templates/.claude/skills/subagent-driven-development/SKILL.md +4 -51
  46. package/templates/.claude/skills/subagent-driven-development/example-workflow.md +40 -0
  47. package/templates/.claude/skills/systematic-debugging/SKILL.md +2 -28
  48. package/templates/.claude/skills/systematic-debugging/reference-tables.md +33 -0
  49. package/templates/.claude/skills/test-driven-development/SKILL.md +2 -51
  50. package/templates/.claude/skills/test-driven-development/reference-tables.md +56 -0
  51. package/templates/.claude/skills/testing-anti-patterns/SKILL.md +1 -10
  52. package/templates/.claude/skills/testing-anti-patterns/reference-tables.md +14 -0
  53. package/templates/.claude/skills/verification-before-completion/SKILL.md +1 -31
  54. package/templates/.claude/skills/verification-before-completion/key-patterns.md +33 -0
  55. package/templates/CLAUDE.md +4 -0
  56. package/src/core/memory/index.js +0 -2
  57. package/src/core/router/index.js +0 -2
  58. package/src/core/validation/index.js +0 -2
@@ -0,0 +1,221 @@
1
+ # Docs Manager — Code Conventions and Worked Examples
2
+
3
+ ## Documentation Structure
4
+
5
+ Full `docs/` folder layout this skill expects:
6
+
7
+ ```
8
+ docs/
9
+ ├── README.md # 🎯 BẮT ĐẦU TẠI ĐÂY - Navigation hub
10
+ ├── project.md # 📋 Project overview
11
+ ├── memory.md # 🧠 Decisions & context log
12
+ │
13
+ ├── architecture/ # 🏗️ System design
14
+ │ ├── overview.md # Architecture tổng quan
15
+ │ ├── tech-stack.md # Technologies sử dụng
16
+ │ ├── data-model.md # Database schema
17
+ │ ├── api-design.md # API specifications
18
+ │ └── deployment.md # Infrastructure
19
+ │
20
+ ├── agents/ # 🤖 Multi-agent coordination
21
+ │ ├── agent-roles.md # Vai trò từng agent
22
+ │ ├── orchestration.md # Flow điều phối
23
+ │ ├── prompts/ # System prompts
24
+ │ │ ├── architect.md
25
+ │ │ ├── coder.md
26
+ │ │ ├── debugger.md
27
+ │ │ └── orchestrator.md
28
+ │ └── handoff-rules.md # Quy tắc chuyển giao
29
+ │
30
+ ├── standards/ # 📏 Coding standards
31
+ │ ├── coding-conventions.md # Code style
32
+ │ ├── commit-conventions.md # Git conventions
33
+ │ ├── file-structure.md # File organization
34
+ │ ├── error-handling.md # Error handling
35
+ │ └── security.md # Security rules
36
+ │
37
+ ├── workflows/ # 🔄 Development processes
38
+ │ ├── development.md # Feature development flow
39
+ │ ├── debugging.md # Debug process
40
+ │ ├── testing.md # Testing strategy
41
+ │ ├── deployment.md # Deployment process
42
+ │ └── code-review.md # Review checklist
43
+ │
44
+ ├── context/ # 📚 Business context
45
+ │ ├── business-rules.md # Business logic
46
+ │ ├── constraints.md # Technical constraints
47
+ │ ├── dependencies.md # External dependencies
48
+ │ └── known-issues.md # Known issues & workarounds
49
+ │
50
+ ├── guides/ # 📖 How-to guides
51
+ │ ├── onboarding.md # AI onboarding
52
+ │ ├── quick-start.md # Quick setup
53
+ │ ├── troubleshooting.md # Common problems
54
+ │ └── faq.md # FAQs
55
+ │
56
+ └── models/ # 🧠 AI model configs
57
+ ├── model-configs.md # Model configurations
58
+ ├── model-selection.md # When to use which model
59
+ ├── token-optimization.md # Token optimization
60
+ └── fallback-strategy.md # Fallback handling
61
+ ```
62
+
63
+ ## Agent Coordination
64
+
65
+ ### Agent Roles (From docs/agents/agent-roles.md)
66
+
67
+ **Architect Agent**
68
+
69
+ - Design system architecture
70
+ - Make technical decisions
71
+ - Review architectural changes
72
+
73
+ **Coder Agent**
74
+
75
+ - Implement features
76
+ - Write tests
77
+ - Follow coding standards
78
+
79
+ **Debugger Agent**
80
+
81
+ - Analyze bugs
82
+ - Find root causes
83
+ - Verify fixes
84
+
85
+ **Orchestrator Agent**
86
+
87
+ - Break down tasks
88
+ - Coordinate agents
89
+ - Track progress
90
+
91
+ ### Handoff Rules
92
+
93
+ **Khi nào handoff?**
94
+
95
+ - Architect → Coder: Sau khi design xong
96
+ - Coder → Debugger: Khi gặp bug
97
+ - Debugger → Architect: Bug do design issue
98
+ - Any → Orchestrator: Task phức tạp cần break down
99
+
100
+ **Trước khi handoff:**
101
+
102
+ 1. Update `docs/memory.md` với context
103
+ 2. Summarize work done
104
+ 3. List blockers/questions
105
+ 4. Point to relevant docs
106
+
107
+ ## Code Conventions (From docs/standards/coding-conventions.md)
108
+
109
+ ### Database Rules
110
+
111
+ ```javascript
112
+ // ✅ ĐÚNG: UUID primary keys
113
+ id: {
114
+ type: DataTypes.UUID,
115
+ defaultValue: DataTypes.UUIDV4,
116
+ primaryKey: true
117
+ }
118
+
119
+ // ❌ SAI: Auto-increment
120
+ id: {
121
+ type: DataTypes.INTEGER,
122
+ autoIncrement: true,
123
+ primaryKey: true
124
+ }
125
+
126
+ // ✅ ĐÚNG: No foreign key constraints
127
+ user_id: {
128
+ type: DataTypes.UUID,
129
+ allowNull: false
130
+ }
131
+
132
+ // ❌ SAI: With FK constraint
133
+ user_id: {
134
+ type: DataTypes.UUID,
135
+ references: { model: 'users', key: 'id' }
136
+ }
137
+ ```
138
+
139
+ ### Oracle Schema Prefix
140
+
141
+ ```sql
142
+ -- ✅ ĐÚNG: With schema prefix
143
+ SELECT * FROM APPS.MTL_SYSTEM_ITEMS_B
144
+
145
+ -- ❌ SAI: Without prefix
146
+ SELECT * FROM MTL_SYSTEM_ITEMS_B
147
+ ```
148
+
149
+ ### Naming Conventions
150
+
151
+ ```javascript
152
+ // Variables & Functions: camelCase
153
+ const userName = "LeNK";
154
+ function getUserData() {}
155
+
156
+ // Classes: PascalCase
157
+ class UserService {}
158
+
159
+ // Constants: UPPER_SNAKE_CASE
160
+ const API_BASE_URL = "https://api.example.com";
161
+
162
+ // Files: kebab-case
163
+ user - service.js;
164
+
165
+ // DB tables/columns: snake_case
166
+ (users, user_profiles, created_at);
167
+ ```
168
+
169
+ ## Examples
170
+
171
+ ### Example 1: Starting New Feature
172
+
173
+ ```bash
174
+ # User request: "Add user authentication"
175
+
176
+ # Step 1: Load context
177
+ cat docs/README.md
178
+ cat docs/project.md
179
+ cat docs/memory.md
180
+
181
+ # Step 2: Check if similar feature exists
182
+ grep -r "authentication" docs/memory.md
183
+ cat docs/context/known-issues.md
184
+
185
+ # Step 3: Load relevant docs
186
+ cat docs/architecture/overview.md
187
+ cat docs/architecture/data-model.md
188
+ cat docs/standards/coding-conventions.md
189
+ cat docs/standards/security.md
190
+
191
+ # Step 4: Check workflows
192
+ cat docs/workflows/development.md
193
+
194
+ # Step 5: Start development following conventions
195
+
196
+ # Step 6: Document decision
197
+ echo "## [2025-01-24] - User Authentication
198
+ **Context**: Need secure user auth
199
+ **Decision**: Using bcrypt + JWT
200
+ **Impact**: New users table, auth middleware
201
+ **Next**: Implement signup/login endpoints" >> docs/memory.md
202
+ ```
203
+
204
+ ### Example 2: Debugging Issue
205
+
206
+ ```bash
207
+ # User: "PostgreSQL auto-increment not working"
208
+
209
+ # Step 1: Check known issues
210
+ cat docs/context/known-issues.md
211
+
212
+ # Step 2: Check conventions
213
+ cat docs/standards/coding-conventions.md
214
+ # → Found: We use UUID, not auto-increment!
215
+
216
+ # Step 3: Check memory for similar cases
217
+ grep -r "auto-increment\|UUID" docs/memory.md
218
+
219
+ # Step 4: Provide solution based on conventions
220
+ # Step 5: Update docs if needed
221
+ ```
@@ -78,17 +78,7 @@ This workflow allows you to plan comprehensive tracked changes using markdown be
78
78
 
79
79
  **Batching Strategy**: Group related changes into batches of 3-10 changes. This makes debugging manageable while maintaining efficiency. Test each batch before moving to the next.
80
80
 
81
- **Principle: Minimal, Precise Edits**
82
- When implementing tracked changes, only mark text that actually changes. Repeating unchanged text makes edits harder to review and appears unprofessional. Break replacements into: [unchanged text] + [deletion] + [insertion] + [unchanged text]. Preserve the original run's RSID for unchanged text by extracting the `<w:r>` element from the original and reusing it.
83
-
84
- Example - Changing "30 days" to "60 days" in a sentence:
85
- ```python
86
- # BAD - Replaces entire sentence
87
- '<w:del><w:r><w:delText>The term is 30 days.</w:delText></w:r></w:del><w:ins><w:r><w:t>The term is 60 days.</w:t></w:r></w:ins>'
88
-
89
- # GOOD - Only marks what changed, preserves original <w:r> for unchanged text
90
- '<w:r w:rsidR="00AB12CD"><w:t>The term is </w:t></w:r><w:del><w:r><w:delText>30</w:delText></w:r></w:del><w:ins><w:r><w:t>60</w:t></w:r></w:ins><w:r w:rsidR="00AB12CD"><w:t> days.</w:t></w:r>'
91
- ```
81
+ **Principle: Minimal, Precise Edits** — only mark text that actually changes, preserving the original run's RSID for unchanged text. Full explanation and a before/after example: [`redlining-reference.md`](redlining-reference.md).
92
82
 
93
83
  ### Tracked changes workflow
94
84
 
@@ -97,35 +87,14 @@ Example - Changing "30 days" to "60 days" in a sentence:
97
87
  pandoc --track-changes=all path-to-file.docx -o current.md
98
88
  ```
99
89
 
100
- 2. **Identify and group changes**: Review the document and identify ALL changes needed, organizing them into logical batches:
101
-
102
- **Location methods** (for finding changes in XML):
103
- - Section/heading numbers (e.g., "Section 3.2", "Article IV")
104
- - Paragraph identifiers if numbered
105
- - Grep patterns with unique surrounding text
106
- - Document structure (e.g., "first paragraph", "signature block")
107
- - **DO NOT use markdown line numbers** - they don't map to XML structure
108
-
109
- **Batch organization** (group 3-10 related changes per batch):
110
- - By section: "Batch 1: Section 2 amendments", "Batch 2: Section 5 updates"
111
- - By type: "Batch 1: Date corrections", "Batch 2: Party name changes"
112
- - By complexity: Start with simple text replacements, then tackle complex structural changes
113
- - Sequential: "Batch 1: Pages 1-3", "Batch 2: Pages 4-6"
90
+ 2. **Identify and group changes**: Review the document and identify ALL changes needed, organizing them into logical batches of 3-10. Location methods and batch-organization strategies: [`redlining-reference.md`](redlining-reference.md). **DO NOT use markdown line numbers** - they don't map to XML structure.
114
91
 
115
92
  3. **Read documentation and unpack**:
116
93
  - **MANDATORY - READ ENTIRE FILE**: Read [`ooxml.md`](ooxml.md) (~600 lines) completely from start to finish. **NEVER set any range limits when reading this file.** Pay special attention to the "Document Library" and "Tracked Change Patterns" sections.
117
94
  - **Unpack the document**: `python ooxml/scripts/unpack.py <file.docx> <dir>`
118
95
  - **Note the suggested RSID**: The unpack script will suggest an RSID to use for your tracked changes. Copy this RSID for use in step 4b.
119
96
 
120
- 4. **Implement changes in batches**: Group changes logically (by section, by type, or by proximity) and implement them together in a single script. This approach:
121
- - Makes debugging easier (smaller batch = easier to isolate errors)
122
- - Allows incremental progress
123
- - Maintains efficiency (batch size of 3-10 changes works well)
124
-
125
- **Suggested batch groupings:**
126
- - By document section (e.g., "Section 3 changes", "Definitions", "Termination clause")
127
- - By change type (e.g., "Date changes", "Party name updates", "Legal term replacements")
128
- - By proximity (e.g., "Changes on pages 1-3", "Changes in first half of document")
97
+ 4. **Implement changes in batches**: Group changes logically (by section, by type, or by proximity) and implement them together in a single script — smaller batches make debugging easier and allow incremental progress.
129
98
 
130
99
  For each batch of related changes:
131
100
 
@@ -0,0 +1,34 @@
1
+ # DOCX Redlining — Batching Detail and Example
2
+
3
+ Supporting detail for the "Redlining workflow for document review" steps in `SKILL.md`.
4
+
5
+ ## Principle: Minimal, Precise Edits
6
+
7
+ When implementing tracked changes, only mark text that actually changes. Repeating unchanged text makes edits harder to review and appears unprofessional. Break replacements into: [unchanged text] + [deletion] + [insertion] + [unchanged text]. Preserve the original run's RSID for unchanged text by extracting the `<w:r>` element from the original and reusing it.
8
+
9
+ Example - Changing "30 days" to "60 days" in a sentence:
10
+ ```python
11
+ # BAD - Replaces entire sentence
12
+ '<w:del><w:r><w:delText>The term is 30 days.</w:delText></w:r></w:del><w:ins><w:r><w:t>The term is 60 days.</w:t></w:r></w:ins>'
13
+
14
+ # GOOD - Only marks what changed, preserves original <w:r> for unchanged text
15
+ '<w:r w:rsidR="00AB12CD"><w:t>The term is </w:t></w:r><w:del><w:r><w:delText>30</w:delText></w:r></w:del><w:ins><w:r><w:t>60</w:t></w:r></w:ins><w:r w:rsidR="00AB12CD"><w:t> days.</w:t></w:r>'
16
+ ```
17
+
18
+ ## Locating changes in XML (Step 2)
19
+
20
+ - Section/heading numbers (e.g., "Section 3.2", "Article IV")
21
+ - Paragraph identifiers if numbered
22
+ - Grep patterns with unique surrounding text
23
+ - Document structure (e.g., "first paragraph", "signature block")
24
+ - **DO NOT use markdown line numbers** - they don't map to XML structure
25
+
26
+ ## Batch organization (Steps 2 and 4)
27
+
28
+ Group 3-10 related changes per batch:
29
+ - By section: "Batch 1: Section 2 amendments", "Batch 2: Section 5 updates"
30
+ - By type: "Batch 1: Date corrections", "Batch 2: Party name changes"
31
+ - By complexity: Start with simple text replacements, then tackle complex structural changes
32
+ - Sequential: "Batch 1: Pages 1-3", "Batch 2: Pages 4-6"
33
+
34
+ Batching this way makes debugging easier (smaller batch = easier to isolate errors) and allows incremental progress.
@@ -133,13 +133,12 @@ Xem chi tiết trong `references/workflow.md`.
133
133
  ## Quick Rules (Không Được Vi Phạm)
134
134
 
135
135
  1. **Vue dùng Options API** — KHÔNG dùng `<script setup>` hay Composition API
136
- 2. **ID field luôn prefix `id_`** — `id_agreement`, không phải `agreement_id`
137
- 3. **Boolean field luôn prefix** — `can_edit`, `is_locked`, không phải `editable`, `locked`
138
- 4. **Datetime LUÔN dùng `dayjs()`** — KHÔNG dùng `new Date()`, `Date.now()`, `.getFullYear()`, v.v.
136
+ 2. **ID/Boolean field prefix** — xem bảng "Quy Tắc Đặt Tên" ở trên (`id_`, `can_`/`is_`/`has_`/`show_`)
137
+ 3. **Datetime LUÔN dùng `dayjs()`** — KHÔNG dùng `new Date()`, `Date.now()`, `.getFullYear()`, v.v.
139
138
  - `dayjs().year()` thay `new Date().getFullYear()`
140
139
  - `dayjs().startOf("month").format("YYYY-MM-DD")` thay chuỗi string thủ công
141
140
  - Mọi biến date trong `data()` phải khởi tạo bằng dayjs
142
- 5. **CẤM TUYỆT ĐỐI GỌI API RAW — KHÔNG fetch(), KHÔNG axios.get/post/put/delete():**
141
+ 4. **CẤM TUYỆT ĐỐI GỌI API RAW — KHÔNG fetch(), KHÔNG axios.get/post/put/delete():**
143
142
  - MỌI luồng giao tiếp với server BẮT BUỘC phải dùng các hàm định nghĩa sẵn từ `composables/useRequest.js`.
144
143
  - **Nếu phát hiện code sinh ra chứa `fetch(...)`, `axios(...)`, `axios.get(...)`, `axios.post(...)` → LÀM LẠI NGAY LẬP TỨC.**
145
144
  - Ba hàm hợp lệ DUY NHẤT:
@@ -147,18 +146,15 @@ Xem chi tiết trong `references/workflow.md`.
147
146
  - `requestForm(url, formData)` — Dành riêng cho upload file (multipart/form-data)
148
147
  - `request_origin(url, data)` — Gọi custom endpoint (không qua generic `/api/select`)
149
148
  - KHÔNG CÓ NGOẠI LỆ. Kể cả khi "chỉ test nhanh", "chỉ gọi 1 lần", hay "endpoint bên ngoài" — vẫn phải dùng 3 hàm trên.
150
- 6. **Schema luôn dùng `get_schema()`** — không hardcode `qas` hay `prd`
151
- 7. **Không dùng Vuex/Pinia** — dùng `state.js` reactive trực tiếp
152
- 8. **Error handling**: trả về `[]` hoặc `{}` — không throw exception lên UI
153
- 9. **SQL views luôn có `COALESCE`** cho numeric fields để tránh null
154
- 10. **Dropdown data format**: `{ value: ..., label: ... }` — không đổi key khác
155
- 11. **workingObj pattern** cho form data — một object chứa toàn bộ form fields
156
- - Tên biến BẮT BUỘC là `workingObj` — **CẤM dùng từ "form" trong tên biến** (SAI: `formData`, `userForm`, `isFormValid`. ĐÚNG: `workingObj`, `isValid`)
157
- - Thuộc tính bên trong **giữ nguyên snake_case** mapping 1:1 với DB columns (SAI: `workingObj.idUser`. ĐÚNG: `workingObj.id_user`)
158
- 12. **Primary Key luôn là UUID varchar** — dùng uuid_in(overlay(...)) pattern, KHÔNG dùng SERIAL/INT
159
- 13. **Foreign key cũng là varchar** — tham chiếu đến UUID của table khác
160
- 14. **workingObj.id mới = `''`** — KHÔNG dùng `= 0`. UUID là varchar, empty string = record mới chưa có id
161
- 15. **Dùng `check_is_null_or_blank(val)`** để check null/blank/array rỗng/object rỗng — hàm này xử lý mọi loại dữ liệu
149
+ 5. **Schema luôn dùng `get_schema()`** — không hardcode `qas` hay `prd`
150
+ 6. **Error handling**: trả về `[]` hoặc `{}` — không throw exception lên UI
151
+ 7. **SQL views luôn có `COALESCE`** cho numeric fields để tránh null
152
+ 8. **Dropdown data format**: `{ value: ..., label: ... }` — không đổi key khác
153
+ 9. **workingObj pattern** — xem mục "Quy Tắc workingObj & Cấm Từ 'form'" ở trên
154
+ 10. **Primary Key luôn là UUID varchar** — dùng uuid_in(overlay(...)) pattern, KHÔNG dùng SERIAL/INT
155
+ 11. **Foreign key cũng là varchar** — tham chiếu đến UUID của table khác
156
+ 12. **workingObj.id mới = `''`** — KHÔNG dùng `= 0`. UUID là varchar, empty string = record mới chưa có id
157
+ 13. **Dùng `check_is_null_or_blank(val)`** để check null/blank/array rỗng/object rỗng — hàm này xử lý mọi loại dữ liệu
162
158
 
163
159
  ---
164
160
 
@@ -15,11 +15,23 @@ Load plan, review critically, execute tasks in batches, report for review betwee
15
15
 
16
16
  ## The Process
17
17
 
18
- ### Step 1: Load and Review Plan
18
+ ### Step 1: Preflight, then Load and Review Plan
19
19
  1. Read plan file
20
- 2. Review critically - identify any questions or concerns about the plan
21
- 3. If concerns: Raise them with your human partner before starting
22
- 4. If no concerns: Create TodoWrite and proceed
20
+ 2. Run the preflight checklist — each ✓ needs a real check, not an assumption:
21
+
22
+ ```
23
+ Plan received
24
+ ✓ dependencies available - referenced files/packages/tests exist
25
+ ✓ instructions executable - each step is a concrete action, not a question
26
+ ✓ verification possible - each step's check actually runs
27
+ ✓ no contradictory steps - no step conflicts with an earlier one
28
+ ✓ no missing prerequisite - nothing earlier is silently assumed done
29
+ ✓ environment compatible - required tools/versions installed
30
+ READY TO EXECUTE
31
+ ```
32
+
33
+ 3. If any ✓ fails: Raise it with your human partner before starting
34
+ 4. If READY TO EXECUTE: Create TodoWrite and proceed
23
35
 
24
36
  ### Step 2: Execute Batch
25
37
  **Default: First 3 tasks**
@@ -49,28 +61,28 @@ After all tasks complete and verified:
49
61
  - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
50
62
  - Follow that skill to verify tests, present options, execute choice
51
63
 
52
- ## When to Stop and Ask for Help
64
+ ## Blocker Classifier
53
65
 
54
- **STOP executing immediately when:**
55
- - Hit a blocker mid-batch (missing dependency, test fails, instruction unclear)
56
- - Plan has critical gaps preventing starting
57
- - You don't understand an instruction
58
- - Verification fails repeatedly
66
+ **Classify every mid-batch blocker before reacting:**
59
67
 
60
- **Ask for clarification rather than guessing.**
61
-
62
- ## When to Revisit Earlier Steps
68
+ ```
69
+ BLOCKER TYPE
70
+ 🟡 Recoverable → retry/fallback, note it, continue
71
+ 🟠 Planning defect → return to Step 1 (Preflight), do not guess a fix
72
+ 🔵 Missing information → ask the human partner, do not proceed on assumption
73
+ 🔴 Hard stop → execution unsafe/impossible, stop immediately, explain why
74
+ ```
63
75
 
64
- **Return to Review (Step 1) when:**
65
- - Partner updates the plan based on your feedback
66
- - Fundamental approach needs rethinking
76
+ - Missing dependency → 🟠 · Test fails once → 🟡, repeatedly → 🔴
77
+ - Instruction unclear → 🔵 · Critical gap blocks starting → 🔴
78
+ - Partner revises the plan, or approach needs rethinking → return to Preflight
67
79
 
68
- **Don't force through blockers** - stop and ask.
80
+ **Ask for clarification rather than guessing.**
69
81
 
70
82
  ## Remember
71
- - Review plan critically first
83
+ - Preflight before executing
72
84
  - Follow plan steps exactly
73
85
  - Don't skip verifications
74
86
  - Reference skills when plan says to
75
87
  - Between batches: just report and wait
76
- - Stop when blocked, don't guess
88
+ - Classify blockers before reacting, don't guess
@@ -259,175 +259,7 @@ When a user requests file organization help:
259
259
  Want to organize another folder?
260
260
  ```
261
261
 
262
- ## Examples
262
+ ## Examples and Reference
263
263
 
264
- ### Example 1: Organizing Downloads (From Justin Dielmann)
265
-
266
- **User**: "My Downloads folder is a mess with 500+ files. Help me organize it."
267
-
268
- **Process**:
269
- 1. Analyzes Downloads folder
270
- 2. Finds patterns: work docs, personal photos, installers, random PDFs
271
- 3. Proposes structure:
272
- - Downloads/
273
- - Work/
274
- - Personal/
275
- - Installers/ (DMG, PKG files)
276
- - Archive/
277
- - ToSort/ (things needing decisions)
278
- 4. Asks for confirmation
279
- 5. Moves files intelligently based on content and names
280
- 6. Results: 500 files → 5 organized folders
281
-
282
- ### Example 2: Finding and Removing Duplicates
283
-
284
- **User**: "Find duplicate files in my Documents and help me decide which to keep."
285
-
286
- **Output**:
287
- ```markdown
288
- # Found 23 Sets of Duplicates (156 MB total)
289
-
290
- ## Duplicate Set 1: "proposal.pdf"
291
- - `/Documents/proposal.pdf` (2.3 MB, modified: 2024-03-15)
292
- - `/Documents/old/proposal.pdf` (2.3 MB, modified: 2024-03-15)
293
- - `/Desktop/proposal.pdf` (2.3 MB, modified: 2024-03-10)
294
-
295
- **Recommendation**: Keep `/Documents/proposal.pdf` (most recent in correct location)
296
- Delete the other 2 copies?
297
-
298
- [Continue for all duplicates...]
299
- ```
300
-
301
- ### Example 3: Restructuring Projects Folder
302
-
303
- **User**: "Review my ~/Projects directory and suggest improvements."
304
-
305
- **Output**:
306
- ```markdown
307
- # Analysis of ~/Projects
308
-
309
- ## Current Structure Issues
310
- - Mix of active and archived projects (3+ years old)
311
- - No consistent naming convention
312
- - Some projects at root, others in random subfolders
313
- - Duplicate folders (project-name, project-name-old, project-name-v2)
314
-
315
- ## Proposed Structure
316
-
317
- ```
318
- Projects/
319
- ├── Active/
320
- │ ├── client-work/
321
- │ ├── side-projects/
322
- │ └── learning/
323
- ├── Archive/
324
- │ ├── 2022/
325
- │ ├── 2023/
326
- │ └── 2024/
327
- └── Templates/
328
- ```
329
-
330
- ## Specific Changes
331
- 1. Move 12 projects not touched since 2022 → Archive/
332
- 2. Consolidate 4 duplicate project folders
333
- 3. Rename projects to consistent format: "client-name-project-name"
334
- 4. Create Archive for old work
335
-
336
- Want me to implement this?
337
- ```
338
-
339
- ### Example 4: Organizing Photos by Date
340
-
341
- **User**: "Organize my photo folders by year and month."
342
-
343
- **Output**: Creates structure like:
344
- ```
345
- Photos/
346
- ├── 2023/
347
- │ ├── 01-January/
348
- │ ├── 02-February/
349
- │ └── ...
350
- ├── 2024/
351
- │ ├── 01-January/
352
- │ └── ...
353
- └── Unsorted/
354
- ```
355
-
356
- Then moves photos based on EXIF data or file modification dates.
357
-
358
- ## Common Organization Tasks
359
-
360
- ### Downloads Cleanup
361
- ```
362
- Organize my Downloads folder - move documents to Documents,
363
- images to Pictures, keep installers separate, and archive files
364
- older than 3 months.
365
- ```
366
-
367
- ### Project Organization
368
- ```
369
- Review my Projects folder structure and help me separate active
370
- projects from old ones I should archive.
371
- ```
372
-
373
- ### Duplicate Removal
374
- ```
375
- Find all duplicate files in my Documents folder and help me
376
- decide which ones to keep.
377
- ```
378
-
379
- ### Desktop Cleanup
380
- ```
381
- My Desktop is covered in files. Help me organize everything into
382
- my Documents folder properly.
383
- ```
384
-
385
- ### Photo Organization
386
- ```
387
- Organize all photos in this folder by date (year/month) based
388
- on when they were taken.
389
- ```
390
-
391
- ### Work/Personal Separation
392
- ```
393
- Help me separate my work files from personal files across my
394
- Documents folder.
395
- ```
396
-
397
- ## Pro Tips
398
-
399
- 1. **Start Small**: Begin with one messy folder (like Downloads) to build trust
400
- 2. **Regular Maintenance**: Run weekly cleanup on Downloads
401
- 3. **Consistent Naming**: Use "YYYY-MM-DD - Description" format for important files
402
- 4. **Archive Aggressively**: Move old projects to Archive instead of deleting
403
- 5. **Keep Active Separate**: Maintain clear boundaries between active and archived work
404
- 6. **Trust the Process**: Let Claude handle the cognitive load of where things go
405
-
406
- ## Best Practices
407
-
408
- ### Folder Naming
409
- - Use clear, descriptive names
410
- - Avoid spaces (use hyphens or underscores)
411
- - Be specific: "client-proposals" not "docs"
412
- - Use prefixes for ordering: "01-current", "02-archive"
413
-
414
- ### File Naming
415
- - Include dates: "2024-10-17-meeting-notes.md"
416
- - Be descriptive: "q3-financial-report.xlsx"
417
- - Avoid version numbers in names (use version control instead)
418
- - Remove download artifacts: "document-final-v2 (1).pdf" → "document.pdf"
419
-
420
- ### When to Archive
421
- - Projects not touched in 6+ months
422
- - Completed work that might be referenced later
423
- - Old versions after migration to new systems
424
- - Files you're hesitant to delete (archive first)
425
-
426
- ## Related Use Cases
427
-
428
- - Setting up organization for a new computer
429
- - Preparing files for backup/archiving
430
- - Cleaning up before storage cleanup
431
- - Organizing shared team folders
432
- - Structuring new project directories
264
+ Four worked examples (Downloads cleanup, duplicate detection output, project-folder restructuring, photo organization by date), common request phrasings, pro tips, and folder/file naming best practices are in [`examples-and-practices.md`](examples-and-practices.md).
433
265