omgkit 2.2.0 → 2.3.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.
- package/README.md +3 -3
- package/package.json +1 -1
- package/plugin/skills/databases/database-management/SKILL.md +288 -0
- package/plugin/skills/databases/database-migration/SKILL.md +285 -0
- package/plugin/skills/databases/database-schema-design/SKILL.md +195 -0
- package/plugin/skills/databases/mongodb/SKILL.md +60 -776
- package/plugin/skills/databases/prisma/SKILL.md +53 -744
- package/plugin/skills/databases/redis/SKILL.md +53 -860
- package/plugin/skills/databases/supabase/SKILL.md +283 -0
- package/plugin/skills/devops/aws/SKILL.md +68 -672
- package/plugin/skills/devops/github-actions/SKILL.md +54 -657
- package/plugin/skills/devops/kubernetes/SKILL.md +67 -602
- package/plugin/skills/devops/performance-profiling/SKILL.md +59 -863
- package/plugin/skills/frameworks/django/SKILL.md +87 -853
- package/plugin/skills/frameworks/express/SKILL.md +95 -1301
- package/plugin/skills/frameworks/fastapi/SKILL.md +90 -1198
- package/plugin/skills/frameworks/laravel/SKILL.md +87 -1187
- package/plugin/skills/frameworks/nestjs/SKILL.md +106 -973
- package/plugin/skills/frameworks/react/SKILL.md +94 -962
- package/plugin/skills/frameworks/vue/SKILL.md +95 -1242
- package/plugin/skills/frontend/accessibility/SKILL.md +91 -1056
- package/plugin/skills/frontend/frontend-design/SKILL.md +69 -1262
- package/plugin/skills/frontend/responsive/SKILL.md +76 -799
- package/plugin/skills/frontend/shadcn-ui/SKILL.md +73 -921
- package/plugin/skills/frontend/tailwindcss/SKILL.md +60 -788
- package/plugin/skills/frontend/threejs/SKILL.md +72 -1266
- package/plugin/skills/languages/javascript/SKILL.md +106 -849
- package/plugin/skills/methodology/brainstorming/SKILL.md +70 -576
- package/plugin/skills/methodology/defense-in-depth/SKILL.md +79 -831
- package/plugin/skills/methodology/dispatching-parallel-agents/SKILL.md +81 -654
- package/plugin/skills/methodology/executing-plans/SKILL.md +86 -529
- package/plugin/skills/methodology/finishing-development-branch/SKILL.md +95 -586
- package/plugin/skills/methodology/problem-solving/SKILL.md +67 -681
- package/plugin/skills/methodology/receiving-code-review/SKILL.md +70 -533
- package/plugin/skills/methodology/requesting-code-review/SKILL.md +70 -610
- package/plugin/skills/methodology/root-cause-tracing/SKILL.md +70 -646
- package/plugin/skills/methodology/sequential-thinking/SKILL.md +70 -478
- package/plugin/skills/methodology/systematic-debugging/SKILL.md +66 -559
- package/plugin/skills/methodology/test-driven-development/SKILL.md +91 -752
- package/plugin/skills/methodology/testing-anti-patterns/SKILL.md +78 -687
- package/plugin/skills/methodology/token-optimization/SKILL.md +72 -602
- package/plugin/skills/methodology/verification-before-completion/SKILL.md +108 -529
- package/plugin/skills/methodology/writing-plans/SKILL.md +79 -566
- package/plugin/skills/omega/omega-architecture/SKILL.md +91 -752
- package/plugin/skills/omega/omega-coding/SKILL.md +161 -552
- package/plugin/skills/omega/omega-sprint/SKILL.md +132 -777
- package/plugin/skills/omega/omega-testing/SKILL.md +157 -845
- package/plugin/skills/omega/omega-thinking/SKILL.md +165 -606
- package/plugin/skills/security/better-auth/SKILL.md +46 -1034
- package/plugin/skills/security/oauth/SKILL.md +80 -934
- package/plugin/skills/security/owasp/SKILL.md +78 -862
- package/plugin/skills/testing/playwright/SKILL.md +77 -700
- package/plugin/skills/testing/pytest/SKILL.md +73 -811
- package/plugin/skills/testing/vitest/SKILL.md +60 -920
- package/plugin/skills/tools/document-processing/SKILL.md +111 -838
- package/plugin/skills/tools/image-processing/SKILL.md +126 -659
- package/plugin/skills/tools/mcp-development/SKILL.md +85 -758
- package/plugin/skills/tools/media-processing/SKILL.md +118 -735
- package/plugin/stdrules/SKILL_STANDARDS.md +490 -0
- package/plugin/skills/SKILL_STANDARDS.md +0 -743
|
@@ -1,519 +1,111 @@
|
|
|
1
1
|
---
|
|
2
|
-
name:
|
|
3
|
-
description:
|
|
2
|
+
name: thinking-sequentially
|
|
3
|
+
description: AI agent structures complex reasoning through numbered thought sequences with explicit dependencies. Use when facing multi-step problems, complex debugging, or architectural decisions.
|
|
4
4
|
category: methodology
|
|
5
5
|
triggers:
|
|
6
|
-
-
|
|
6
|
+
- sequential thinking
|
|
7
7
|
- step by step
|
|
8
|
-
- think through
|
|
9
8
|
- reasoning chain
|
|
10
|
-
- decompose
|
|
11
9
|
- thought process
|
|
12
|
-
-
|
|
10
|
+
- complex problem
|
|
13
11
|
---
|
|
14
12
|
|
|
15
|
-
#
|
|
16
|
-
|
|
17
|
-
Master the art of **structured reasoning** through numbered thought sequences. This skill enables systematic problem decomposition, dependency tracking, and clear reasoning chains for complex challenges.
|
|
13
|
+
# Thinking Sequentially
|
|
18
14
|
|
|
19
15
|
## Purpose
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
- Problems have multiple interdependent components
|
|
24
|
-
- Solutions require building on previous insights
|
|
25
|
-
- Team communication needs clear reasoning trails
|
|
26
|
-
- Debugging requires systematic elimination
|
|
27
|
-
- Decisions need documented justification
|
|
28
|
-
- Complex architectures require step-by-step design
|
|
29
|
-
- AI agents need to show their work transparently
|
|
30
|
-
|
|
31
|
-
## Features
|
|
32
|
-
|
|
33
|
-
### 1. Numbered Thought Chains
|
|
34
|
-
|
|
35
|
-
The foundation of sequential thinking is explicit numbering with clear dependencies:
|
|
36
|
-
|
|
37
|
-
```
|
|
38
|
-
THOUGHT 1: Identify the core problem
|
|
39
|
-
- What exactly is failing?
|
|
40
|
-
- What is the expected behavior?
|
|
41
|
-
|
|
42
|
-
THOUGHT 2: Establish constraints (depends on THOUGHT 1)
|
|
43
|
-
- What cannot change?
|
|
44
|
-
- What resources are available?
|
|
45
|
-
|
|
46
|
-
THOUGHT 3: Generate hypotheses (depends on THOUGHT 1, 2)
|
|
47
|
-
- Hypothesis A: Configuration issue
|
|
48
|
-
- Hypothesis B: Data corruption
|
|
49
|
-
- Hypothesis C: Race condition
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
### 2. Dependency Tracking
|
|
53
|
-
|
|
54
|
-
```
|
|
55
|
-
[THOUGHT 4] ← depends on [THOUGHT 2, 3]
|
|
56
|
-
This ensures we don't proceed without establishing prerequisites.
|
|
57
|
-
Mark dependencies explicitly to enable:
|
|
58
|
-
- Parallel thinking on independent thoughts
|
|
59
|
-
- Clear revision paths when assumptions change
|
|
60
|
-
- Better collaboration handoffs
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### 3. TypeScript Implementation
|
|
64
|
-
|
|
65
|
-
```typescript
|
|
66
|
-
interface Thought {
|
|
67
|
-
id: number;
|
|
68
|
-
content: string;
|
|
69
|
-
dependencies: number[];
|
|
70
|
-
status: 'active' | 'revised' | 'invalidated';
|
|
71
|
-
evidence: Evidence[];
|
|
72
|
-
conclusions: string[];
|
|
73
|
-
timestamp: Date;
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
interface ThoughtChain {
|
|
77
|
-
thoughts: Map<number, Thought>;
|
|
78
|
-
checkpoints: Checkpoint[];
|
|
79
|
-
currentBranch: string;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
interface Evidence {
|
|
83
|
-
type: 'observation' | 'data' | 'assumption' | 'external';
|
|
84
|
-
content: string;
|
|
85
|
-
confidence: number; // 0-100
|
|
86
|
-
source?: string;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
interface Checkpoint {
|
|
90
|
-
afterThought: number;
|
|
91
|
-
keyFindings: string[];
|
|
92
|
-
openQuestions: string[];
|
|
93
|
-
nextSteps: string[];
|
|
94
|
-
branchPoint?: boolean;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
class SequentialThinkingEngine {
|
|
98
|
-
private chain: ThoughtChain;
|
|
99
|
-
private thoughtCounter: number = 0;
|
|
100
|
-
|
|
101
|
-
constructor() {
|
|
102
|
-
this.chain = {
|
|
103
|
-
thoughts: new Map(),
|
|
104
|
-
checkpoints: [],
|
|
105
|
-
currentBranch: 'main'
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
addThought(
|
|
110
|
-
content: string,
|
|
111
|
-
dependencies: number[] = []
|
|
112
|
-
): Thought {
|
|
113
|
-
// Validate dependencies exist
|
|
114
|
-
for (const depId of dependencies) {
|
|
115
|
-
if (!this.chain.thoughts.has(depId)) {
|
|
116
|
-
throw new Error(`Dependency THOUGHT ${depId} not found`);
|
|
117
|
-
}
|
|
118
|
-
const dep = this.chain.thoughts.get(depId)!;
|
|
119
|
-
if (dep.status === 'invalidated') {
|
|
120
|
-
throw new Error(`Cannot depend on invalidated THOUGHT ${depId}`);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
const thought: Thought = {
|
|
125
|
-
id: ++this.thoughtCounter,
|
|
126
|
-
content,
|
|
127
|
-
dependencies,
|
|
128
|
-
status: 'active',
|
|
129
|
-
evidence: [],
|
|
130
|
-
conclusions: [],
|
|
131
|
-
timestamp: new Date()
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
this.chain.thoughts.set(thought.id, thought);
|
|
135
|
-
return thought;
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
reviseThought(
|
|
139
|
-
id: number,
|
|
140
|
-
newContent: string,
|
|
141
|
-
reason: string
|
|
142
|
-
): void {
|
|
143
|
-
const thought = this.chain.thoughts.get(id);
|
|
144
|
-
if (!thought) throw new Error(`THOUGHT ${id} not found`);
|
|
145
|
-
|
|
146
|
-
// Mark original as revised
|
|
147
|
-
thought.status = 'revised';
|
|
148
|
-
|
|
149
|
-
// Create revision thought
|
|
150
|
-
this.addThought(
|
|
151
|
-
`REVISION of THOUGHT ${id}: ${newContent}\nReason: ${reason}`,
|
|
152
|
-
[id]
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
// Invalidate dependent thoughts
|
|
156
|
-
this.invalidateDependents(id);
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
private invalidateDependents(thoughtId: number): void {
|
|
160
|
-
for (const [id, thought] of this.chain.thoughts) {
|
|
161
|
-
if (thought.dependencies.includes(thoughtId)) {
|
|
162
|
-
thought.status = 'invalidated';
|
|
163
|
-
this.invalidateDependents(id);
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
createCheckpoint(): Checkpoint {
|
|
169
|
-
const activeThoughts = Array.from(this.chain.thoughts.values())
|
|
170
|
-
.filter(t => t.status === 'active');
|
|
171
|
-
|
|
172
|
-
const checkpoint: Checkpoint = {
|
|
173
|
-
afterThought: this.thoughtCounter,
|
|
174
|
-
keyFindings: activeThoughts.flatMap(t => t.conclusions),
|
|
175
|
-
openQuestions: [],
|
|
176
|
-
nextSteps: []
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
this.chain.checkpoints.push(checkpoint);
|
|
180
|
-
return checkpoint;
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
getDependencyGraph(): string {
|
|
184
|
-
let graph = 'DEPENDENCY GRAPH:\n';
|
|
185
|
-
for (const [id, thought] of this.chain.thoughts) {
|
|
186
|
-
const deps = thought.dependencies.length > 0
|
|
187
|
-
? ` ← [${thought.dependencies.join(', ')}]`
|
|
188
|
-
: ' (root)';
|
|
189
|
-
const status = thought.status !== 'active'
|
|
190
|
-
? ` [${thought.status}]`
|
|
191
|
-
: '';
|
|
192
|
-
graph += ` THOUGHT ${id}${deps}${status}\n`;
|
|
193
|
-
}
|
|
194
|
-
return graph;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### 4. Revision and Backtracking
|
|
200
|
-
|
|
201
|
-
```
|
|
202
|
-
REVISION: Updating THOUGHT 3 based on new evidence
|
|
203
|
-
- Original: Assumed single-threaded execution
|
|
204
|
-
- New insight: System uses worker threads
|
|
205
|
-
- Impact: Hypothesis C (race condition) now most likely
|
|
206
|
-
|
|
207
|
-
BACKTRACK: Returning to THOUGHT 2
|
|
208
|
-
- Constraint we missed: 100ms timeout requirement
|
|
209
|
-
- This invalidates THOUGHT 5-7, need to restart from here
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### 5. Checkpoint Summaries
|
|
213
|
-
|
|
214
|
-
```
|
|
215
|
-
=== CHECKPOINT after THOUGHT 10 ===
|
|
216
|
-
KEY FINDINGS:
|
|
217
|
-
1. Root cause identified: Memory leak in cache layer
|
|
218
|
-
2. Two viable solutions identified
|
|
219
|
-
3. Solution A preferred (lower risk)
|
|
220
|
-
|
|
221
|
-
OPEN QUESTIONS:
|
|
222
|
-
- Performance impact of Solution A?
|
|
223
|
-
- Rollback strategy needed?
|
|
224
|
-
|
|
225
|
-
NEXT STEPS:
|
|
226
|
-
- THOUGHT 11: Benchmark Solution A
|
|
227
|
-
- THOUGHT 12: Design rollback procedure
|
|
228
|
-
===================================
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
### 6. Visual Thought Mapping
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
[THOUGHT 1: Problem Definition]
|
|
235
|
-
|
|
|
236
|
-
+------------+------------+
|
|
237
|
-
| |
|
|
238
|
-
[THOUGHT 2: Constraints] [THOUGHT 3: Context]
|
|
239
|
-
| |
|
|
240
|
-
+------------+------------+
|
|
241
|
-
|
|
|
242
|
-
[THOUGHT 4: Hypotheses]
|
|
243
|
-
/ | \
|
|
244
|
-
/ | \
|
|
245
|
-
[T5: H1] [T6: H2] [T7: H3]
|
|
246
|
-
|
|
|
247
|
-
[THOUGHT 8: Solution]
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
### 7. Branching Strategy
|
|
251
|
-
|
|
252
|
-
```typescript
|
|
253
|
-
interface Branch {
|
|
254
|
-
name: string;
|
|
255
|
-
parentThought: number;
|
|
256
|
-
thoughts: number[];
|
|
257
|
-
status: 'exploring' | 'selected' | 'abandoned';
|
|
258
|
-
mergeResult?: string;
|
|
259
|
-
}
|
|
260
|
-
|
|
261
|
-
class BranchingThoughtEngine extends SequentialThinkingEngine {
|
|
262
|
-
private branches: Map<string, Branch> = new Map();
|
|
263
|
-
|
|
264
|
-
createBranch(name: string, parentThoughtId: number): void {
|
|
265
|
-
this.branches.set(name, {
|
|
266
|
-
name,
|
|
267
|
-
parentThought: parentThoughtId,
|
|
268
|
-
thoughts: [],
|
|
269
|
-
status: 'exploring'
|
|
270
|
-
});
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
exploreBranches(
|
|
274
|
-
hypotheses: string[]
|
|
275
|
-
): Map<string, number[]> {
|
|
276
|
-
const results = new Map<string, number[]>();
|
|
17
|
+
Structure complex reasoning through numbered thought sequences:
|
|
277
18
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
19
|
+
- Decompose multi-step problems into traceable chains
|
|
20
|
+
- Track dependencies between insights explicitly
|
|
21
|
+
- Create checkpoints for periodic review
|
|
22
|
+
- Enable revision when assumptions change
|
|
23
|
+
- Support parallel hypothesis exploration
|
|
281
24
|
|
|
282
|
-
|
|
283
|
-
const thought = this.addThought(
|
|
284
|
-
`Exploring: ${hypotheses[i]}`,
|
|
285
|
-
[this.thoughtCounter]
|
|
286
|
-
);
|
|
25
|
+
## Quick Start
|
|
287
26
|
|
|
288
|
-
|
|
289
|
-
|
|
27
|
+
1. **Define** - State the problem clearly as THOUGHT 1
|
|
28
|
+
2. **Decompose** - Break into numbered thoughts with dependencies
|
|
29
|
+
3. **Track** - Mark dependencies explicitly: "depends on THOUGHT 2"
|
|
30
|
+
4. **Checkpoint** - Summarize every 5-10 thoughts
|
|
31
|
+
5. **Revise** - Update thoughts when assumptions change, invalidate dependents
|
|
32
|
+
6. **Branch** - Explore parallel hypotheses when needed
|
|
290
33
|
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
selectBranch(name: string, reason: string): void {
|
|
295
|
-
const branch = this.branches.get(name);
|
|
296
|
-
if (!branch) throw new Error(`Branch ${name} not found`);
|
|
297
|
-
|
|
298
|
-
branch.status = 'selected';
|
|
299
|
-
|
|
300
|
-
// Abandon other branches
|
|
301
|
-
for (const [branchName, b] of this.branches) {
|
|
302
|
-
if (branchName !== name && b.status === 'exploring') {
|
|
303
|
-
b.status = 'abandoned';
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
// Document decision
|
|
308
|
-
this.addThought(
|
|
309
|
-
`BRANCH SELECTION: Chose ${name}\nReason: ${reason}`,
|
|
310
|
-
branch.thoughts
|
|
311
|
-
);
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
## Use Cases
|
|
317
|
-
|
|
318
|
-
### Complex Algorithm Design
|
|
319
|
-
|
|
320
|
-
```
|
|
321
|
-
THOUGHT 1: Define the problem space
|
|
322
|
-
- Input: Unsorted array of N integers
|
|
323
|
-
- Output: K largest elements
|
|
324
|
-
- Constraint: O(N log K) time complexity
|
|
325
|
-
|
|
326
|
-
THOUGHT 2: Evaluate known approaches
|
|
327
|
-
- Full sort: O(N log N) - too slow
|
|
328
|
-
- Min-heap of size K: O(N log K) - meets requirement
|
|
329
|
-
- QuickSelect: O(N) average - better but unstable
|
|
330
|
-
|
|
331
|
-
THOUGHT 3: Select approach (depends on THOUGHT 2)
|
|
332
|
-
- Choose min-heap for guaranteed performance
|
|
333
|
-
- QuickSelect as optimization for large N
|
|
334
|
-
|
|
335
|
-
THOUGHT 4: Design implementation (depends on THOUGHT 3)
|
|
336
|
-
- Initialize min-heap with first K elements
|
|
337
|
-
- For remaining elements, compare with heap root
|
|
338
|
-
- If larger, replace root and heapify
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
### System Architecture Decisions
|
|
342
|
-
|
|
343
|
-
```
|
|
344
|
-
THOUGHT 1: Identify scaling bottleneck
|
|
345
|
-
- Database reads: 10,000 QPS
|
|
346
|
-
- Current capacity: 2,000 QPS
|
|
347
|
-
- Gap: 5x improvement needed
|
|
348
|
-
|
|
349
|
-
THOUGHT 2: List scaling options
|
|
350
|
-
- Read replicas
|
|
351
|
-
- Caching layer
|
|
352
|
-
- Database sharding
|
|
353
|
-
- Query optimization
|
|
354
|
-
|
|
355
|
-
THOUGHT 3: Evaluate trade-offs (depends on THOUGHT 1, 2)
|
|
356
|
-
| Option | Complexity | Time | Cost |
|
|
357
|
-
|-----------------|------------|------|-------|
|
|
358
|
-
| Read replicas | Low | 1w | $500 |
|
|
359
|
-
| Caching | Medium | 2w | $200 |
|
|
360
|
-
| Sharding | High | 4w | $1000 |
|
|
361
|
-
| Query optimize | Low | 3d | $0 |
|
|
362
|
-
|
|
363
|
-
THOUGHT 4: Recommendation
|
|
364
|
-
- Immediate: Query optimization (quick win)
|
|
365
|
-
- Short-term: Caching layer
|
|
366
|
-
- Long-term: Read replicas as traffic grows
|
|
367
|
-
```
|
|
368
|
-
|
|
369
|
-
### Debugging Multi-Component Issues
|
|
370
|
-
|
|
371
|
-
```
|
|
372
|
-
THOUGHT 1: Reproduce the issue
|
|
373
|
-
- Steps: Login → Dashboard → Click "Export"
|
|
374
|
-
- Result: 500 error after 30 seconds
|
|
375
|
-
- Frequency: 100% reproducible
|
|
376
|
-
|
|
377
|
-
THOUGHT 2: Identify affected components
|
|
378
|
-
- Frontend: React dashboard
|
|
379
|
-
- API: Node.js Express server
|
|
380
|
-
- Database: PostgreSQL
|
|
381
|
-
- External: S3 for file storage
|
|
382
|
-
|
|
383
|
-
THOUGHT 3: Isolate the failure point (depends on THOUGHT 2)
|
|
384
|
-
- Frontend logs: Request sent successfully
|
|
385
|
-
- API logs: Request received, DB query started
|
|
386
|
-
- DB logs: Query completed in 2 seconds
|
|
387
|
-
- API logs: S3 upload started... [timeout]
|
|
388
|
-
|
|
389
|
-
FINDING: Issue is S3 upload timeout
|
|
390
|
-
|
|
391
|
-
THOUGHT 4: Root cause analysis (depends on THOUGHT 3)
|
|
392
|
-
- S3 region: us-east-1
|
|
393
|
-
- Server region: eu-west-1
|
|
394
|
-
- File size: 50MB
|
|
395
|
-
- Network latency: 150ms
|
|
396
|
-
|
|
397
|
-
ROOT CAUSE: Cross-region upload with large file
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### AI Agent Task Decomposition
|
|
401
|
-
|
|
402
|
-
```
|
|
403
|
-
THOUGHT 1: Parse user request
|
|
404
|
-
- Goal: "Build a user authentication system"
|
|
405
|
-
- Implicit requirements: Security, scalability, UX
|
|
406
|
-
- Constraints: Existing tech stack (Next.js, PostgreSQL)
|
|
407
|
-
|
|
408
|
-
THOUGHT 2: Identify subtasks (depends on THOUGHT 1)
|
|
409
|
-
1. Database schema for users/sessions
|
|
410
|
-
2. Authentication API endpoints
|
|
411
|
-
3. Password hashing implementation
|
|
412
|
-
4. Session management
|
|
413
|
-
5. Frontend login/signup forms
|
|
414
|
-
6. Password reset flow
|
|
415
|
-
|
|
416
|
-
THOUGHT 3: Determine execution order (depends on THOUGHT 2)
|
|
417
|
-
- Sequential: 1 → 2 → 4 → 6 (data dependencies)
|
|
418
|
-
- Parallel: 3 can be done independently
|
|
419
|
-
- Parallel: 5 can start after 2 is defined
|
|
420
|
-
|
|
421
|
-
THOUGHT 4: Dispatch to specialized agents
|
|
422
|
-
- Database Agent → Subtask 1
|
|
423
|
-
- API Agent → Subtasks 2, 4, 6
|
|
424
|
-
- Security Agent → Subtask 3
|
|
425
|
-
- Frontend Agent → Subtask 5 (waits for 2)
|
|
426
|
-
```
|
|
427
|
-
|
|
428
|
-
## Best Practices
|
|
429
|
-
|
|
430
|
-
### Do's
|
|
431
|
-
- **Number every thought explicitly** - Enables reference and revision
|
|
432
|
-
- **Mark dependencies clearly** - "This depends on THOUGHT 3"
|
|
433
|
-
- **Allow revision** - "REVISION: Updating THOUGHT 2 based on..."
|
|
434
|
-
- **Summarize at checkpoints** - Every 5-10 thoughts
|
|
435
|
-
- **Time-box thoughts** - Prevent infinite exploration
|
|
436
|
-
- **Validate assumptions early** - Mark assumptions and test them
|
|
437
|
-
- **Branch for exploration** - Create separate paths for different hypotheses
|
|
34
|
+
## Features
|
|
438
35
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
36
|
+
| Feature | Description | Guide |
|
|
37
|
+
|---------|-------------|-------|
|
|
38
|
+
| Numbered Chains | Explicit THOUGHT 1, 2, 3... with IDs | Number every insight, never skip |
|
|
39
|
+
| Dependencies | Mark what each thought relies on | `[THOUGHT 4] <- depends on [2, 3]` |
|
|
40
|
+
| Checkpoints | Periodic summaries of findings | Every 5-10 thoughts, list key findings |
|
|
41
|
+
| Revisions | Update previous thoughts with new data | Mark original as revised, create new |
|
|
42
|
+
| Branching | Explore multiple hypotheses in parallel | Create named branches, select winner |
|
|
43
|
+
| Visual Maps | Diagram thought relationships | ASCII diagrams for complex chains |
|
|
447
44
|
|
|
448
|
-
|
|
45
|
+
## Common Patterns
|
|
449
46
|
|
|
450
|
-
**Problem Analysis Template:**
|
|
451
47
|
```
|
|
48
|
+
# Problem Analysis Pattern
|
|
452
49
|
THOUGHT 1: Problem statement
|
|
453
50
|
THOUGHT 2: Success criteria
|
|
454
51
|
THOUGHT 3: Constraints
|
|
455
|
-
THOUGHT 4: Assumptions (validate
|
|
52
|
+
THOUGHT 4: Assumptions (validate!)
|
|
456
53
|
THOUGHT 5-N: Solution exploration
|
|
457
|
-
CHECKPOINT
|
|
458
|
-
```
|
|
54
|
+
=== CHECKPOINT ===
|
|
459
55
|
|
|
460
|
-
|
|
461
|
-
```
|
|
56
|
+
# Decision Making Pattern
|
|
462
57
|
THOUGHT 1: Decision to make
|
|
463
58
|
THOUGHT 2: Options identified
|
|
464
59
|
THOUGHT 3-N: Evaluate each option
|
|
465
60
|
THOUGHT N+1: Comparison matrix
|
|
466
|
-
THOUGHT N+2: Recommendation
|
|
467
|
-
```
|
|
61
|
+
THOUGHT N+2: Recommendation
|
|
468
62
|
|
|
469
|
-
|
|
470
|
-
```
|
|
63
|
+
# Investigation Pattern
|
|
471
64
|
THOUGHT 1: What we observed
|
|
472
65
|
THOUGHT 2: What we expected
|
|
473
66
|
THOUGHT 3: Gap analysis
|
|
474
|
-
THOUGHT 4-N: Hypothesis
|
|
475
|
-
CHECKPOINT: Root cause
|
|
476
|
-
THOUGHT N+1: Solution design
|
|
67
|
+
THOUGHT 4-N: Hypothesis testing
|
|
68
|
+
=== CHECKPOINT: Root cause ===
|
|
477
69
|
```
|
|
478
70
|
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
71
|
+
```
|
|
72
|
+
# Visual thought mapping
|
|
73
|
+
[THOUGHT 1: Problem]
|
|
74
|
+
|
|
|
75
|
+
+----------+----------+
|
|
76
|
+
| |
|
|
77
|
+
[THOUGHT 2] [THOUGHT 3]
|
|
78
|
+
| |
|
|
79
|
+
+----------+----------+
|
|
80
|
+
|
|
|
81
|
+
[THOUGHT 4: Synthesis]
|
|
82
|
+
```
|
|
489
83
|
|
|
490
|
-
|
|
491
|
-
# Feature: User Authentication Redesign
|
|
84
|
+
## Use Cases
|
|
492
85
|
|
|
493
|
-
|
|
86
|
+
- Multi-step debugging requiring traceable reasoning chains
|
|
87
|
+
- Architectural decisions with complex trade-off analysis
|
|
88
|
+
- Code review requiring systematic examination of multiple concerns
|
|
89
|
+
- Root cause analysis with hypothesis tracking
|
|
90
|
+
- Complex refactoring requiring dependency-aware planning
|
|
494
91
|
|
|
495
|
-
|
|
496
|
-
- Session timeout too aggressive (15 min)
|
|
497
|
-
- No "remember me" option
|
|
498
|
-
- MFA required on every login
|
|
92
|
+
## Best Practices
|
|
499
93
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
94
|
+
| Do | Avoid |
|
|
95
|
+
|----|-------|
|
|
96
|
+
| Number every thought explicitly | Skipping numbers for "obvious" thoughts |
|
|
97
|
+
| Mark dependencies clearly | Hiding dependencies in prose |
|
|
98
|
+
| Summarize at checkpoints | Exceeding 20 thoughts without checkpoint |
|
|
99
|
+
| Allow revision with reason | Deleting invalid thoughts (strike through) |
|
|
100
|
+
| Time-box each thought | Infinite exploration without bounds |
|
|
101
|
+
| Branch for parallel exploration | Branching more than 3 levels deep |
|
|
102
|
+
| Validate assumptions early | Proceeding with invalidated dependencies |
|
|
504
103
|
|
|
505
|
-
|
|
506
|
-
- Must maintain SOC2 compliance
|
|
507
|
-
- Cannot increase session beyond 24h
|
|
508
|
-
- MFA must protect financial transactions
|
|
104
|
+
## Related Skills
|
|
509
105
|
|
|
510
|
-
|
|
511
|
-
- Implement "remember device" (30 days)
|
|
512
|
-
- Step-up MFA only for sensitive actions
|
|
513
|
-
- Extend session to 60 min with activity
|
|
106
|
+
See also these related skill documents for complementary techniques:
|
|
514
107
|
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
```
|
|
108
|
+
- **writing-plans** - Structure plans as numbered thought sequences
|
|
109
|
+
- **debugging-systematically** - Apply sequential debugging steps
|
|
110
|
+
- **tracing-root-causes** - Use numbered investigation chains
|
|
111
|
+
- **brainstorming-ideas** - Generate options in thought steps
|