minimal-vibe-coding-kit 0.4.1 → 0.5.0

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 (207) hide show
  1. package/.agents/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
  2. package/.agents/skills/claim/SKILL.md +82 -0
  3. package/.agents/skills/prompt-sharpener/SKILL.md +54 -0
  4. package/.agents/skills/tutien/SKILL.md +74 -0
  5. package/.agents/skills/tutien/references/classification.md +64 -0
  6. package/.agents/skills/tutien/references/lore-sources.md +15 -0
  7. package/.agents/skills/tutien/references/privacy.md +33 -0
  8. package/.agents/skills/tutien/references/schema.md +75 -0
  9. package/.agents/skills/tutien/references/scoring-and-realms.md +37 -0
  10. package/.agents/skills/tutien/references/voice-and-mode.md +44 -0
  11. package/.agents/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
  12. package/.agents/skills/tutien/scripts/adapters/git.mjs +48 -0
  13. package/.agents/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
  14. package/.agents/skills/tutien/scripts/analyze-history.mjs +84 -0
  15. package/.agents/skills/tutien/scripts/catalog.mjs +130 -0
  16. package/.agents/skills/tutien/scripts/classify.mjs +311 -0
  17. package/.agents/skills/tutien/scripts/command.mjs +107 -0
  18. package/.agents/skills/tutien/scripts/compare.mjs +41 -0
  19. package/.agents/skills/tutien/scripts/metrics.mjs +306 -0
  20. package/.agents/skills/tutien/scripts/normalize-events.mjs +68 -0
  21. package/.agents/skills/tutien/scripts/redact.mjs +30 -0
  22. package/.agents/skills/tutien/scripts/render-report.mjs +423 -0
  23. package/.agents/skills/tutien/scripts/run-tutien.mjs +272 -0
  24. package/.agents/skills/tutien/scripts/score.mjs +97 -0
  25. package/.agents/skills/tutien/scripts/snapshot.mjs +76 -0
  26. package/.agents/skills/tutien/scripts/villains.mjs +196 -0
  27. package/.agents/skills/vibekit-init/SKILL.md +2 -2
  28. package/.claude/settings.json +10 -3
  29. package/.claude/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
  30. package/.claude/skills/claim/SKILL.md +82 -0
  31. package/.claude/skills/prompt-sharpener/SKILL.md +54 -0
  32. package/.claude/skills/tutien/SKILL.md +74 -0
  33. package/.claude/skills/tutien/references/classification.md +64 -0
  34. package/.claude/skills/tutien/references/lore-sources.md +15 -0
  35. package/.claude/skills/tutien/references/privacy.md +33 -0
  36. package/.claude/skills/tutien/references/schema.md +75 -0
  37. package/.claude/skills/tutien/references/scoring-and-realms.md +37 -0
  38. package/.claude/skills/tutien/references/voice-and-mode.md +44 -0
  39. package/.claude/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
  40. package/.claude/skills/tutien/scripts/adapters/git.mjs +48 -0
  41. package/.claude/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
  42. package/.claude/skills/tutien/scripts/analyze-history.mjs +84 -0
  43. package/.claude/skills/tutien/scripts/catalog.mjs +130 -0
  44. package/.claude/skills/tutien/scripts/classify.mjs +311 -0
  45. package/.claude/skills/tutien/scripts/command.mjs +107 -0
  46. package/.claude/skills/tutien/scripts/compare.mjs +41 -0
  47. package/.claude/skills/tutien/scripts/metrics.mjs +306 -0
  48. package/.claude/skills/tutien/scripts/normalize-events.mjs +68 -0
  49. package/.claude/skills/tutien/scripts/redact.mjs +30 -0
  50. package/.claude/skills/tutien/scripts/render-report.mjs +423 -0
  51. package/.claude/skills/tutien/scripts/run-tutien.mjs +272 -0
  52. package/.claude/skills/tutien/scripts/score.mjs +97 -0
  53. package/.claude/skills/tutien/scripts/snapshot.mjs +76 -0
  54. package/.claude/skills/tutien/scripts/villains.mjs +196 -0
  55. package/.claude/skills/vibekit-init/SKILL.md +2 -2
  56. package/.codex/rules/vibekit.rules +77 -0
  57. package/.codex-plugin/plugin.json +1 -1
  58. package/.cursor/cli.json +18 -0
  59. package/.cursor/settings.json +15 -8
  60. package/.cursor/skills/claim/SKILL.md +82 -0
  61. package/.cursor/skills/prompt-sharpener/SKILL.md +54 -0
  62. package/.cursor/skills/tutien/SKILL.md +74 -0
  63. package/.cursor/skills/tutien/references/classification.md +64 -0
  64. package/.cursor/skills/tutien/references/lore-sources.md +15 -0
  65. package/.cursor/skills/tutien/references/privacy.md +33 -0
  66. package/.cursor/skills/tutien/references/schema.md +75 -0
  67. package/.cursor/skills/tutien/references/scoring-and-realms.md +37 -0
  68. package/.cursor/skills/tutien/references/voice-and-mode.md +44 -0
  69. package/.cursor/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
  70. package/.cursor/skills/tutien/scripts/adapters/git.mjs +48 -0
  71. package/.cursor/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
  72. package/.cursor/skills/tutien/scripts/analyze-history.mjs +84 -0
  73. package/.cursor/skills/tutien/scripts/catalog.mjs +130 -0
  74. package/.cursor/skills/tutien/scripts/classify.mjs +311 -0
  75. package/.cursor/skills/tutien/scripts/command.mjs +107 -0
  76. package/.cursor/skills/tutien/scripts/compare.mjs +41 -0
  77. package/.cursor/skills/tutien/scripts/metrics.mjs +306 -0
  78. package/.cursor/skills/tutien/scripts/normalize-events.mjs +68 -0
  79. package/.cursor/skills/tutien/scripts/redact.mjs +30 -0
  80. package/.cursor/skills/tutien/scripts/render-report.mjs +423 -0
  81. package/.cursor/skills/tutien/scripts/run-tutien.mjs +272 -0
  82. package/.cursor/skills/tutien/scripts/score.mjs +97 -0
  83. package/.cursor/skills/tutien/scripts/snapshot.mjs +76 -0
  84. package/.cursor/skills/tutien/scripts/villains.mjs +196 -0
  85. package/.grok/README.md +13 -0
  86. package/.grok/config.example.toml +13 -0
  87. package/.grok/config.toml +29 -0
  88. package/.grok/rules/safe-delete.md +11 -0
  89. package/.grok/rules/security.md +5 -0
  90. package/.grok/rules/vibe-core.md +8 -0
  91. package/.grok/skills/agentshield-security-review/SKILL.md +75 -0
  92. package/.grok/skills/agentshield-security-review/agents/openai.yaml +5 -0
  93. package/.grok/skills/agentshield-security-review/references/native-install.md +97 -0
  94. package/.grok/skills/agentshield-security-review/references/report-template.md +54 -0
  95. package/.grok/skills/agentshield-security-review/references/review-checklist.md +45 -0
  96. package/.grok/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +135 -0
  97. package/.grok/skills/autoresearch-coding/README.md +15 -0
  98. package/.grok/skills/autoresearch-coding/SKILL.md +101 -0
  99. package/.grok/skills/autoresearch-coding/references/experiment-contract.md +13 -0
  100. package/.grok/skills/autoresearch-coding/references/metric-extraction.md +8 -0
  101. package/.grok/skills/autoresearch-coding/references/result-ledger.md +15 -0
  102. package/.grok/skills/autoresearch-coding/scripts/log_result.py +24 -0
  103. package/.grok/skills/autoresearch-coding/scripts/run_logged.py +30 -0
  104. package/.grok/skills/claim/SKILL.md +82 -0
  105. package/.grok/skills/clearthought/SKILL.md +100 -0
  106. package/.grok/skills/clearthought/examples/decision-framework.md +441 -0
  107. package/.grok/skills/clearthought/examples/metagame-examples.md +536 -0
  108. package/.grok/skills/clearthought/examples/sequential-thinking.md +380 -0
  109. package/.grok/skills/clearthought/references/output-schemas.md +494 -0
  110. package/.grok/skills/clearthought/references/parameter-reference.md +482 -0
  111. package/.grok/skills/coding-level/SKILL.md +34 -0
  112. package/.grok/skills/coding-level/references/level-0.md +131 -0
  113. package/.grok/skills/coding-level/references/level-1.md +118 -0
  114. package/.grok/skills/coding-level/references/level-2.md +140 -0
  115. package/.grok/skills/coding-level/references/level-3.md +142 -0
  116. package/.grok/skills/coding-level/references/level-4.md +152 -0
  117. package/.grok/skills/coding-level/references/level-5.md +84 -0
  118. package/.grok/skills/daily-workflow-curator/SKILL.md +52 -0
  119. package/.grok/skills/memento/SKILL.md +36 -0
  120. package/.grok/skills/parallel-analysis/SKILL.md +160 -0
  121. package/.grok/skills/path-sensitive-shell-safety/SKILL.md +69 -0
  122. package/.grok/skills/path-sensitive-shell-safety/references/workflow.md +127 -0
  123. package/.grok/skills/prompt-sharpener/SKILL.md +54 -0
  124. package/.grok/skills/reviewing-4p-priorities/SKILL.md +72 -0
  125. package/.grok/skills/reviewing-4p-priorities/examples.md +298 -0
  126. package/.grok/skills/sequential-thinking/SKILL.md +106 -0
  127. package/.grok/skills/sequential-thinking/examples/adaptive-depth.md +542 -0
  128. package/.grok/skills/sequential-thinking/examples/branching-exploration.md +474 -0
  129. package/.grok/skills/sequential-thinking/examples/linear-reasoning.md +210 -0
  130. package/.grok/skills/sequential-thinking/examples/revision-pattern.md +304 -0
  131. package/.grok/skills/sequential-thinking/references/output-schema.md +483 -0
  132. package/.grok/skills/sequential-thinking/references/parameters.md +463 -0
  133. package/.grok/skills/sequential-thinking/references/patterns.md +666 -0
  134. package/.grok/skills/tutien/SKILL.md +74 -0
  135. package/.grok/skills/tutien/references/classification.md +64 -0
  136. package/.grok/skills/tutien/references/lore-sources.md +15 -0
  137. package/.grok/skills/tutien/references/privacy.md +33 -0
  138. package/.grok/skills/tutien/references/schema.md +75 -0
  139. package/.grok/skills/tutien/references/scoring-and-realms.md +37 -0
  140. package/.grok/skills/tutien/references/voice-and-mode.md +44 -0
  141. package/.grok/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
  142. package/.grok/skills/tutien/scripts/adapters/git.mjs +48 -0
  143. package/.grok/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
  144. package/.grok/skills/tutien/scripts/analyze-history.mjs +84 -0
  145. package/.grok/skills/tutien/scripts/catalog.mjs +130 -0
  146. package/.grok/skills/tutien/scripts/classify.mjs +311 -0
  147. package/.grok/skills/tutien/scripts/command.mjs +107 -0
  148. package/.grok/skills/tutien/scripts/compare.mjs +41 -0
  149. package/.grok/skills/tutien/scripts/metrics.mjs +306 -0
  150. package/.grok/skills/tutien/scripts/normalize-events.mjs +68 -0
  151. package/.grok/skills/tutien/scripts/redact.mjs +30 -0
  152. package/.grok/skills/tutien/scripts/render-report.mjs +423 -0
  153. package/.grok/skills/tutien/scripts/run-tutien.mjs +272 -0
  154. package/.grok/skills/tutien/scripts/score.mjs +97 -0
  155. package/.grok/skills/tutien/scripts/snapshot.mjs +76 -0
  156. package/.grok/skills/tutien/scripts/villains.mjs +196 -0
  157. package/.grok/skills/vibekit-init/SKILL.md +52 -0
  158. package/.grok/skills/visual-design-loop/SKILL.md +103 -0
  159. package/.grok/skills/visual-design-loop/agents/openai.yaml +4 -0
  160. package/.vibekit/docs/BACKBONE_REFERENCE.md +3 -1
  161. package/.vibekit/docs/INSTALL.md +11 -7
  162. package/.vibekit/docs/SECURITY_MODEL.md +1 -1
  163. package/.vibekit/docs/TOOLING_GUIDE.md +5 -0
  164. package/.vibekit/docs/templates/CONTEXT_TEMPLATE.md +1 -1
  165. package/.vibekit/init/CLAUDE-template.md +3 -0
  166. package/.vibekit/init/FIRST_PROMPT.md +1 -1
  167. package/.vibekit/init/FIRST_TIME_INIT.md +2 -2
  168. package/.vibekit/scripts/doctor.mjs +11 -4
  169. package/.vibekit/scripts/mvck.mjs +27 -12
  170. package/.vibekit/scripts/pack-dry-run.mjs +38 -3
  171. package/.vibekit/scripts/test-install.mjs +8 -0
  172. package/.vibekit/scripts/validate-kit.mjs +116 -41
  173. package/.vibekit/skills/agentshield-security-review/scripts/agentshield_repo_probe.py +28 -3
  174. package/.vibekit/skills/claim/SKILL.md +82 -0
  175. package/.vibekit/skills/prompt-sharpener/SKILL.md +54 -0
  176. package/.vibekit/skills/skills-manifest.json +27 -0
  177. package/.vibekit/skills/tutien/SKILL.md +74 -0
  178. package/.vibekit/skills/tutien/references/classification.md +64 -0
  179. package/.vibekit/skills/tutien/references/lore-sources.md +15 -0
  180. package/.vibekit/skills/tutien/references/privacy.md +33 -0
  181. package/.vibekit/skills/tutien/references/schema.md +75 -0
  182. package/.vibekit/skills/tutien/references/scoring-and-realms.md +37 -0
  183. package/.vibekit/skills/tutien/references/voice-and-mode.md +44 -0
  184. package/.vibekit/skills/tutien/scripts/adapters/generic-jsonl.mjs +82 -0
  185. package/.vibekit/skills/tutien/scripts/adapters/git.mjs +48 -0
  186. package/.vibekit/skills/tutien/scripts/adapters/plain-transcript.mjs +37 -0
  187. package/.vibekit/skills/tutien/scripts/analyze-history.mjs +84 -0
  188. package/.vibekit/skills/tutien/scripts/catalog.mjs +130 -0
  189. package/.vibekit/skills/tutien/scripts/classify.mjs +311 -0
  190. package/.vibekit/skills/tutien/scripts/command.mjs +107 -0
  191. package/.vibekit/skills/tutien/scripts/compare.mjs +41 -0
  192. package/.vibekit/skills/tutien/scripts/metrics.mjs +306 -0
  193. package/.vibekit/skills/tutien/scripts/normalize-events.mjs +68 -0
  194. package/.vibekit/skills/tutien/scripts/redact.mjs +30 -0
  195. package/.vibekit/skills/tutien/scripts/render-report.mjs +423 -0
  196. package/.vibekit/skills/tutien/scripts/run-tutien.mjs +272 -0
  197. package/.vibekit/skills/tutien/scripts/score.mjs +97 -0
  198. package/.vibekit/skills/tutien/scripts/snapshot.mjs +76 -0
  199. package/.vibekit/skills/tutien/scripts/villains.mjs +196 -0
  200. package/.vibekit/skills/vibekit-init/SKILL.md +2 -2
  201. package/AGENTS.md +2 -2
  202. package/CHANGELOG.md +40 -0
  203. package/README.md +60 -51
  204. package/backbone.yml +2 -1
  205. package/docs/README.vi.md +61 -52
  206. package/docs/README.zh-CN.md +277 -0
  207. package/package.json +15 -4
@@ -0,0 +1,474 @@
1
+ # Branching Exploration - Example
2
+
3
+ ## Scenario: State Management Library Selection
4
+
5
+ **Problem:** Choose state management solution for large React application
6
+
7
+ **Pattern:** Branching Exploration (multiple valid approaches to compare)
8
+
9
+ **Structure:** Main analysis → 3 branches → Synthesis → Decision
10
+
11
+ **Total thoughts:** 12
12
+
13
+ ---
14
+
15
+ ## Main Chain
16
+
17
+ ### Thought 1: Problem Definition
18
+
19
+ **Input:**
20
+ ```bash
21
+ /sequential-thinking "Problem: Need to choose state management for large React app (50+ components, complex data flow). Requirements: 1) Scalable, 2) Good DevTools, 3) Easy to learn for team, 4) TypeScript support. Options: Redux, MobX, Zustand, Recoil." thoughtNumber=1 totalThoughts=12 nextThoughtNeeded=true
22
+ ```
23
+
24
+ **Output:**
25
+ ```json
26
+ {
27
+ "thoughtNumber": 1,
28
+ "thoughtContent": "Problem: Need to choose state management for large React app (50+ components, complex data flow). Requirements: 1) Scalable, 2) Good DevTools, 3) Easy to learn for team, 4) TypeScript support. Options: Redux, MobX, Zustand, Recoil.",
29
+ "totalThoughts": 12,
30
+ "nextThoughtNeeded": true,
31
+ "branches": [],
32
+ "thoughtHistoryLength": 1,
33
+ "sessionContext": {
34
+ "sessionId": "conversation",
35
+ "remainingThoughts": 99
36
+ }
37
+ }
38
+ ```
39
+
40
+ ---
41
+
42
+ ### Thought 2: Evaluation Criteria
43
+
44
+ **Input:**
45
+ ```bash
46
+ /sequential-thinking "Evaluation criteria defined: 1) Performance (re-renders), 2) Boilerplate amount, 3) Learning curve (team has 2 weeks), 4) Ecosystem/plugins, 5) Long-term maintainability. Will explore top 3 options: Redux, Zustand, Recoil." thoughtNumber=2 totalThoughts=12 nextThoughtNeeded=true
47
+ ```
48
+
49
+ **Output:**
50
+ ```json
51
+ {
52
+ "thoughtNumber": 2,
53
+ "thoughtContent": "Evaluation criteria defined: 1) Performance (re-renders), 2) Boilerplate amount, 3) Learning curve (team has 2 weeks), 4) Ecosystem/plugins, 5) Long-term maintainability. Will explore top 3 options: Redux, Zustand, Recoil.",
54
+ "totalThoughts": 12,
55
+ "nextThoughtNeeded": true,
56
+ "branches": [],
57
+ "thoughtHistoryLength": 2,
58
+ "sessionContext": {
59
+ "sessionId": "conversation",
60
+ "remainingThoughts": 98
61
+ }
62
+ }
63
+ ```
64
+
65
+ ---
66
+
67
+ ## Branch A: Redux
68
+
69
+ ### Thought 3: Redux Overview
70
+
71
+ **Input:**
72
+ ```bash
73
+ /sequential-thinking "BRANCH A - Redux: Industry standard, used by 50%+ large apps. Pros: Predictable state, excellent DevTools, huge ecosystem, Redux Toolkit reduces boilerplate. Perfect TypeScript support." thoughtNumber=3 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="redux"
74
+ ```
75
+
76
+ **Output:**
77
+ ```json
78
+ {
79
+ "thoughtNumber": 3,
80
+ "thoughtContent": "BRANCH A - Redux: Industry standard, used by 50%+ large apps. Pros: Predictable state, excellent DevTools, huge ecosystem, Redux Toolkit reduces boilerplate. Perfect TypeScript support.",
81
+ "totalThoughts": 12,
82
+ "nextThoughtNeeded": true,
83
+ "branches": ["redux"],
84
+ "thoughtHistoryLength": 3,
85
+ "branchInfo": {
86
+ "id": "redux",
87
+ "fromThought": 2
88
+ },
89
+ "sessionContext": {
90
+ "sessionId": "conversation",
91
+ "remainingThoughts": 97
92
+ }
93
+ }
94
+ ```
95
+
96
+ ---
97
+
98
+ ### Thought 4: Redux Trade-offs
99
+
100
+ **Input:**
101
+ ```bash
102
+ /sequential-thinking "BRANCH A continued - Redux downsides: Steeper learning curve (actions, reducers, selectors), more boilerplate even with RTK, team needs 2 weeks training. Architectural overhead for simple use cases. Performance good with proper memoization (reselect)." thoughtNumber=4 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="redux"
103
+ ```
104
+
105
+ **Output:**
106
+ ```json
107
+ {
108
+ "thoughtNumber": 4,
109
+ "thoughtContent": "BRANCH A continued - Redux downsides: Steeper learning curve (actions, reducers, selectors), more boilerplate even with RTK, team needs 2 weeks training. Architectural overhead for simple use cases. Performance good with proper memoization (reselect).",
110
+ "totalThoughts": 12,
111
+ "nextThoughtNeeded": true,
112
+ "branches": ["redux"],
113
+ "thoughtHistoryLength": 4,
114
+ "branchInfo": {
115
+ "id": "redux",
116
+ "fromThought": 2
117
+ },
118
+ "sessionContext": {
119
+ "sessionId": "conversation",
120
+ "remainingThoughts": 96
121
+ }
122
+ }
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Branch B: Zustand
128
+
129
+ ### Thought 5: Zustand Overview
130
+
131
+ **Input:**
132
+ ```bash
133
+ /sequential-thinking "BRANCH B - Zustand: Minimalist alternative, 1KB size. Pros: Extremely simple API (create store, use hook), no boilerplate, easy to learn (30min tutorial). Good TypeScript support, selector-based rendering optimization." thoughtNumber=5 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="zustand"
134
+ ```
135
+
136
+ **Output:**
137
+ ```json
138
+ {
139
+ "thoughtNumber": 5,
140
+ "thoughtContent": "BRANCH B - Zustand: Minimalist alternative, 1KB size. Pros: Extremely simple API (create store, use hook), no boilerplate, easy to learn (30min tutorial). Good TypeScript support, selector-based rendering optimization.",
141
+ "totalThoughts": 12,
142
+ "nextThoughtNeeded": true,
143
+ "branches": ["redux", "zustand"],
144
+ "thoughtHistoryLength": 5,
145
+ "branchInfo": {
146
+ "id": "zustand",
147
+ "fromThought": 2
148
+ },
149
+ "sessionContext": {
150
+ "sessionId": "conversation",
151
+ "remainingThoughts": 95
152
+ }
153
+ }
154
+ ```
155
+
156
+ ---
157
+
158
+ ### Thought 6: Zustand Trade-offs
159
+
160
+ **Input:**
161
+ ```bash
162
+ /sequential-thinking "BRANCH B continued - Zustand downsides: Smaller ecosystem (fewer plugins), no official DevTools (community tools exist), less architectural guidance (more freedom = more decisions). Not as battle-tested as Redux in large scale apps. Less hiring pool with Zustand experience." thoughtNumber=6 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="zustand"
163
+ ```
164
+
165
+ **Output:**
166
+ ```json
167
+ {
168
+ "thoughtNumber": 6,
169
+ "thoughtContent": "BRANCH B continued - Zustand downsides: Smaller ecosystem (fewer plugins), no official DevTools (community tools exist), less architectural guidance (more freedom = more decisions). Not as battle-tested as Redux in large scale apps. Less hiring pool with Zustand experience.",
170
+ "totalThoughts": 12,
171
+ "nextThoughtNeeded": true,
172
+ "branches": ["redux", "zustand"],
173
+ "thoughtHistoryLength": 6,
174
+ "branchInfo": {
175
+ "id": "zustand",
176
+ "fromThought": 2
177
+ },
178
+ "sessionContext": {
179
+ "sessionId": "conversation",
180
+ "remainingThoughts": 94
181
+ }
182
+ }
183
+ ```
184
+
185
+ ---
186
+
187
+ ## Branch C: Recoil
188
+
189
+ ### Thought 7: Recoil Overview
190
+
191
+ **Input:**
192
+ ```bash
193
+ /sequential-thinking "BRANCH C - Recoil: Facebook's experimental library. Pros: Atom-based (fine-grained reactivity), built-in async support, React-like API (hooks), excellent performance with minimal re-renders. TypeScript support good." thoughtNumber=7 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="recoil"
194
+ ```
195
+
196
+ **Output:**
197
+ ```json
198
+ {
199
+ "thoughtNumber": 7,
200
+ "thoughtContent": "BRANCH C - Recoil: Facebook's experimental library. Pros: Atom-based (fine-grained reactivity), built-in async support, React-like API (hooks), excellent performance with minimal re-renders. TypeScript support good.",
201
+ "totalThoughts": 12,
202
+ "nextThoughtNeeded": true,
203
+ "branches": ["redux", "zustand", "recoil"],
204
+ "thoughtHistoryLength": 7,
205
+ "branchInfo": {
206
+ "id": "recoil",
207
+ "fromThought": 2
208
+ },
209
+ "sessionContext": {
210
+ "sessionId": "conversation",
211
+ "remainingThoughts": 93
212
+ }
213
+ }
214
+ ```
215
+
216
+ ---
217
+
218
+ ### Thought 8: Recoil Trade-offs
219
+
220
+ **Input:**
221
+ ```bash
222
+ /sequential-thinking "BRANCH C continued - Recoil downsides: Still experimental (0.7.x), API changes possible, smaller community, fewer resources/tutorials. Not recommended for production by Meta yet. DevTools exist but less mature than Redux. Hiring challenge." thoughtNumber=8 totalThoughts=12 nextThoughtNeeded=true branchFromThought=2 branchId="recoil"
223
+ ```
224
+
225
+ **Output:**
226
+ ```json
227
+ {
228
+ "thoughtNumber": 8,
229
+ "thoughtContent": "BRANCH C continued - Recoil downsides: Still experimental (0.7.x), API changes possible, smaller community, fewer resources/tutorials. Not recommended for production by Meta yet. DevTools exist but less mature than Redux. Hiring challenge.",
230
+ "totalThoughts": 12,
231
+ "nextThoughtNeeded": true,
232
+ "branches": ["redux", "zustand", "recoil"],
233
+ "thoughtHistoryLength": 8,
234
+ "branchInfo": {
235
+ "id": "recoil",
236
+ "fromThought": 2
237
+ },
238
+ "sessionContext": {
239
+ "sessionId": "conversation",
240
+ "remainingThoughts": 92
241
+ }
242
+ }
243
+ ```
244
+
245
+ ---
246
+
247
+ ## Synthesis & Decision
248
+
249
+ ### Thought 9: Comparison Matrix
250
+
251
+ **Input:**
252
+ ```bash
253
+ /sequential-thinking "Comparison across branches: Performance (Recoil > Zustand > Redux), Learning curve (Zustand > Recoil > Redux), Ecosystem (Redux >> Zustand > Recoil), Production readiness (Redux >> Zustand > Recoil), Team ramp-up time: Zustand=2 days, Recoil=5 days, Redux=14 days." thoughtNumber=9 totalThoughts=12 nextThoughtNeeded=true
254
+ ```
255
+
256
+ **Output:**
257
+ ```json
258
+ {
259
+ "thoughtNumber": 9,
260
+ "thoughtContent": "Comparison across branches: Performance (Recoil > Zustand > Redux), Learning curve (Zustand > Recoil > Redux), Ecosystem (Redux >> Zustand > Recoil), Production readiness (Redux >> Zustand > Recoil), Team ramp-up time: Zustand=2 days, Recoil=5 days, Redux=14 days.",
261
+ "totalThoughts": 12,
262
+ "nextThoughtNeeded": true,
263
+ "branches": ["redux", "zustand", "recoil"],
264
+ "thoughtHistoryLength": 9,
265
+ "sessionContext": {
266
+ "sessionId": "conversation",
267
+ "remainingThoughts": 91
268
+ }
269
+ }
270
+ ```
271
+
272
+ ---
273
+
274
+ ### Thought 10: Context-Specific Analysis
275
+
276
+ **Input:**
277
+ ```bash
278
+ /sequential-thinking "Analyzing for OUR context: We have 2-week deadline, team is mid-level React devs (not state management experts), need production stability, have 50+ components. Redux's learning curve is a blocker. Recoil's experimental status is risky. Zustand fits timeline and stability needs." thoughtNumber=10 totalThoughts=12 nextThoughtNeeded=true
279
+ ```
280
+
281
+ **Output:**
282
+ ```json
283
+ {
284
+ "thoughtNumber": 10,
285
+ "thoughtContent": "Analyzing for OUR context: We have 2-week deadline, team is mid-level React devs (not state management experts), need production stability, have 50+ components. Redux's learning curve is a blocker. Recoil's experimental status is risky. Zustand fits timeline and stability needs.",
286
+ "totalThoughts": 12,
287
+ "nextThoughtNeeded": true,
288
+ "branches": ["redux", "zustand", "recoil"],
289
+ "thoughtHistoryLength": 10,
290
+ "sessionContext": {
291
+ "sessionId": "conversation",
292
+ "remainingThoughts": 90
293
+ }
294
+ }
295
+ ```
296
+
297
+ ---
298
+
299
+ ### Thought 11: Decision
300
+
301
+ **Input:**
302
+ ```bash
303
+ /sequential-thinking "DECISION: Choose Zustand. Rationale: 1) Meets 2-week learning timeline, 2) Production-ready and stable, 3) Sufficient ecosystem for our needs, 4) Can add Redux DevTools plugin if needed, 5) Easy hiring/onboarding later. Trade-off accepted: Less architectural guidance (we'll create our own patterns)." thoughtNumber=11 totalThoughts=12 nextThoughtNeeded=true
304
+ ```
305
+
306
+ **Output:**
307
+ ```json
308
+ {
309
+ "thoughtNumber": 11,
310
+ "thoughtContent": "DECISION: Choose Zustand. Rationale: 1) Meets 2-week learning timeline, 2) Production-ready and stable, 3) Sufficient ecosystem for our needs, 4) Can add Redux DevTools plugin if needed, 5) Easy hiring/onboarding later. Trade-off accepted: Less architectural guidance (we'll create our own patterns).",
311
+ "totalThoughts": 12,
312
+ "nextThoughtNeeded": true,
313
+ "branches": ["redux", "zustand", "recoil"],
314
+ "thoughtHistoryLength": 11,
315
+ "sessionContext": {
316
+ "sessionId": "conversation",
317
+ "remainingThoughts": 89
318
+ }
319
+ }
320
+ ```
321
+
322
+ ---
323
+
324
+ ### Thought 12: Implementation Plan
325
+
326
+ **Input:**
327
+ ```bash
328
+ /sequential-thinking "Implementation plan: Week 1: Team reads Zustand docs (2 hours), create initial stores for auth & user data, establish patterns (slices, middleware). Week 2: Migrate existing Context API to Zustand, add DevTools plugin, document patterns. Fallback: If Zustand doesn't scale, Redux migration is straightforward. Analysis complete." thoughtNumber=12 totalThoughts=12 nextThoughtNeeded=false
329
+ ```
330
+
331
+ **Output:**
332
+ ```json
333
+ {
334
+ "thoughtNumber": 12,
335
+ "thoughtContent": "Implementation plan: Week 1: Team reads Zustand docs (2 hours), create initial stores for auth & user data, establish patterns (slices, middleware). Week 2: Migrate existing Context API to Zustand, add DevTools plugin, document patterns. Fallback: If Zustand doesn't scale, Redux migration is straightforward. Analysis complete.",
336
+ "totalThoughts": 12,
337
+ "nextThoughtNeeded": false,
338
+ "branches": ["redux", "zustand", "recoil"],
339
+ "thoughtHistoryLength": 12,
340
+ "status": "complete",
341
+ "sessionContext": {
342
+ "sessionId": "conversation",
343
+ "remainingThoughts": 88,
344
+ "branchesExplored": 3
345
+ }
346
+ }
347
+ ```
348
+
349
+ ---
350
+
351
+ ## Branch Visualization
352
+
353
+ ```
354
+ Thought 1: Problem definition
355
+
356
+ Thought 2: Criteria (branch point)
357
+ ├─→ BRANCH A: Redux (#3, #4)
358
+ │ ├─ Overview: Industry standard, ecosystem
359
+ │ └─ Trade-offs: Learning curve, boilerplate
360
+
361
+ ├─→ BRANCH B: Zustand (#5, #6)
362
+ │ ├─ Overview: Simple, fast learning
363
+ │ └─ Trade-offs: Smaller ecosystem, less guidance
364
+
365
+ └─→ BRANCH C: Recoil (#7, #8)
366
+ ├─ Overview: Fine-grained, async support
367
+ └─ Trade-offs: Experimental, risky
368
+
369
+ Thought 9: Comparison matrix
370
+
371
+ Thought 10: Context analysis
372
+
373
+ Thought 11: DECISION → Zustand
374
+
375
+ Thought 12: Implementation plan
376
+ ```
377
+
378
+ ---
379
+
380
+ ## Analysis
381
+
382
+ ### Branch Summary
383
+
384
+ | Branch | Thoughts | Key Strengths | Key Weaknesses |
385
+ |--------|----------|---------------|----------------|
386
+ | **Redux** | 2 (#3-4) | Ecosystem, production-proven | Learning curve, boilerplate |
387
+ | **Zustand** | 2 (#5-6) | Simple, fast learning | Less ecosystem, guidance |
388
+ | **Recoil** | 2 (#7-8) | Performance, fine-grained | Experimental, risky |
389
+
390
+ ### Decision Factors
391
+
392
+ **Winner:** Zustand
393
+
394
+ **Why Zustand won:**
395
+ 1. ✅ 2-day learning (vs 14 days for Redux)
396
+ 2. ✅ Production-ready (vs experimental Recoil)
397
+ 3. ✅ Sufficient for 50 components
398
+ 4. ✅ Easy team onboarding
399
+ 5. ✅ Migration path to Redux exists if needed
400
+
401
+ **Why others lost:**
402
+ - **Redux:** 2-week deadline incompatible with 14-day learning curve
403
+ - **Recoil:** Experimental status too risky for production
404
+
405
+ ### Pattern Effectiveness
406
+
407
+ ✅ **Systematic comparison** across all options
408
+ ✅ **Objective evaluation** against criteria
409
+ ✅ **Context-specific** decision (not just "best" in general)
410
+ ✅ **Clear rationale** documented
411
+ ✅ **Fallback plan** included
412
+
413
+ ---
414
+
415
+ ## When to Use Branching Pattern
416
+
417
+ ### ✅ Use When:
418
+ - Multiple valid approaches exist
419
+ - Trade-offs between options
420
+ - Need to compare systematically
421
+ - Stakeholders need rationale
422
+ - No obviously "correct" choice
423
+
424
+ ### ❌ Don't Use When:
425
+ - One clear solution exists
426
+ - Time-constrained (branching takes longer)
427
+ - Options not comparable (apples vs oranges)
428
+ - Decision already made (just need validation)
429
+
430
+ ---
431
+
432
+ ## Branching Best Practices
433
+
434
+ ### Do:
435
+ - ✅ Explore each branch fairly (similar depth)
436
+ - ✅ Use consistent evaluation criteria
437
+ - ✅ Create synthesis thought (compare branches)
438
+ - ✅ Document decision rationale clearly
439
+ - ✅ Include fallback/migration paths
440
+
441
+ ### Don't:
442
+ - ❌ Leave branches unexplored (orphan branches)
443
+ - ❌ Bias toward one branch unfairly
444
+ - ❌ Skip synthesis (just pick one)
445
+ - ❌ Forget context-specific factors
446
+ - ❌ Ignore trade-offs
447
+
448
+ ---
449
+
450
+ ## Comparison with Other Patterns
451
+
452
+ | Pattern | Thoughts | Branches | Revisions | Best For |
453
+ |---------|----------|----------|-----------|----------|
454
+ | Linear | 6 | 0 | 0 | Clear solution |
455
+ | Revision | 8 | 0 | 2 | Wrong assumptions |
456
+ | **Branching** | **12** | **3** | **0** | **Multiple options** |
457
+ | Adaptive | 5-20 | 0-2 | 0-1 | Unclear scope |
458
+
459
+ ---
460
+
461
+ ## Key Takeaways
462
+
463
+ 1. **Branching enables systematic comparison** - Evaluate all options fairly
464
+ 2. **Synthesis is critical** - Don't just explore, compare and decide
465
+ 3. **Context matters** - Best option depends on specific requirements
466
+ 4. **Document rationale** - Future you (and team) will thank you
467
+ 5. **Plan fallbacks** - Acknowledge risk and have backup plan
468
+
469
+ ---
470
+
471
+ **For other patterns:**
472
+ - [linear-reasoning.md](linear-reasoning.md) - Straightforward analysis
473
+ - [revision-pattern.md](revision-pattern.md) - Correcting assumptions
474
+ - [adaptive-depth.md](adaptive-depth.md) - Uncertain scope
@@ -0,0 +1,210 @@
1
+ # Linear Reasoning - Example
2
+
3
+ ## Scenario: API Performance Optimization
4
+
5
+ **Problem:** API response times are slow (800ms P95)
6
+
7
+ **Pattern:** Linear Sequence (straightforward problem with clear steps)
8
+
9
+ **Estimated thoughts:** 6
10
+
11
+ ---
12
+
13
+ ## Thought Sequence
14
+
15
+ ### Thought 1: Problem Statement
16
+
17
+ **Input:**
18
+ ```bash
19
+ /sequential-thinking "Problem: API P95 latency is 800ms, users complaining about slowness. Need to optimize." thoughtNumber=1 totalThoughts=6 nextThoughtNeeded=true
20
+ ```
21
+
22
+ **Output:**
23
+ ```json
24
+ {
25
+ "thoughtNumber": 1,
26
+ "thoughtContent": "Problem: API P95 latency is 800ms, users complaining about slowness. Need to optimize.",
27
+ "totalThoughts": 6,
28
+ "nextThoughtNeeded": true,
29
+ "branches": [],
30
+ "thoughtHistoryLength": 1,
31
+ "sessionContext": {
32
+ "sessionId": "conversation",
33
+ "remainingThoughts": 99
34
+ }
35
+ }
36
+ ```
37
+
38
+ ---
39
+
40
+ ### Thought 2: Measurement & Data Collection
41
+
42
+ **Input:**
43
+ ```bash
44
+ /sequential-thinking "Measured endpoint breakdown: /users takes 650ms, /products takes 120ms, /orders takes 400ms. The /users endpoint is the bottleneck." thoughtNumber=2 totalThoughts=6 nextThoughtNeeded=true
45
+ ```
46
+
47
+ **Output:**
48
+ ```json
49
+ {
50
+ "thoughtNumber": 2,
51
+ "thoughtContent": "Measured endpoint breakdown: /users takes 650ms, /products takes 120ms, /orders takes 400ms. The /users endpoint is the bottleneck.",
52
+ "totalThoughts": 6,
53
+ "nextThoughtNeeded": true,
54
+ "branches": [],
55
+ "thoughtHistoryLength": 2,
56
+ "sessionContext": {
57
+ "sessionId": "conversation",
58
+ "remainingThoughts": 98,
59
+ "recentThoughts": [
60
+ {"number": 2, "preview": "Measured endpoint breakdown: /users takes 650ms..."},
61
+ {"number": 1, "preview": "Problem: API P95 latency is 800ms, users comp..."}
62
+ ]
63
+ }
64
+ }
65
+ ```
66
+
67
+ ---
68
+
69
+ ### Thought 3: Root Cause Analysis
70
+
71
+ **Input:**
72
+ ```bash
73
+ /sequential-thinking "Profiled /users endpoint: 600ms spent in database query. Query analysis shows N+1 problem - fetching user roles individually in a loop instead of batch query." thoughtNumber=3 totalThoughts=6 nextThoughtNeeded=true
74
+ ```
75
+
76
+ **Output:**
77
+ ```json
78
+ {
79
+ "thoughtNumber": 3,
80
+ "thoughtContent": "Profiled /users endpoint: 600ms spent in database query. Query analysis shows N+1 problem - fetching user roles individually in a loop instead of batch query.",
81
+ "totalThoughts": 6,
82
+ "nextThoughtNeeded": true,
83
+ "branches": [],
84
+ "thoughtHistoryLength": 3,
85
+ "sessionContext": {
86
+ "sessionId": "conversation",
87
+ "remainingThoughts": 97
88
+ }
89
+ }
90
+ ```
91
+
92
+ ---
93
+
94
+ ### Thought 4: Solution Design
95
+
96
+ **Input:**
97
+ ```bash
98
+ /sequential-thinking "Solution: Use JOIN query to fetch users with roles in single database roundtrip. Expected improvement: 600ms → 50ms (12x faster). Implementation: Modify UserRepository.getUsers() to use eager loading." thoughtNumber=4 totalThoughts=6 nextThoughtNeeded=true
99
+ ```
100
+
101
+ **Output:**
102
+ ```json
103
+ {
104
+ "thoughtNumber": 4,
105
+ "thoughtContent": "Solution: Use JOIN query to fetch users with roles in single database roundtrip. Expected improvement: 600ms → 50ms (12x faster). Implementation: Modify UserRepository.getUsers() to use eager loading.",
106
+ "totalThoughts": 6,
107
+ "nextThoughtNeeded": true,
108
+ "branches": [],
109
+ "thoughtHistoryLength": 4,
110
+ "sessionContext": {
111
+ "sessionId": "conversation",
112
+ "remainingThoughts": 96
113
+ }
114
+ }
115
+ ```
116
+
117
+ ---
118
+
119
+ ### Thought 5: Implementation & Validation
120
+
121
+ **Input:**
122
+ ```bash
123
+ /sequential-thinking "Implemented eager loading. Testing results: P95 latency reduced from 800ms → 180ms (4.4x improvement). All functionality working correctly. N+1 problem eliminated." thoughtNumber=5 totalThoughts=6 nextThoughtNeeded=true
124
+ ```
125
+
126
+ **Output:**
127
+ ```json
128
+ {
129
+ "thoughtNumber": 5,
130
+ "thoughtContent": "Implemented eager loading. Testing results: P95 latency reduced from 800ms → 180ms (4.4x improvement). All functionality working correctly. N+1 problem eliminated.",
131
+ "totalThoughts": 6,
132
+ "nextThoughtNeeded": true,
133
+ "branches": [],
134
+ "thoughtHistoryLength": 5,
135
+ "sessionContext": {
136
+ "sessionId": "conversation",
137
+ "remainingThoughts": 95
138
+ }
139
+ }
140
+ ```
141
+
142
+ ---
143
+
144
+ ### Thought 6: Conclusion & Next Steps
145
+
146
+ **Input:**
147
+ ```bash
148
+ /sequential-thinking "Conclusion: Optimization successful. Next steps: 1) Add database indexes on foreign keys for further improvement, 2) Monitor latency metrics for next week, 3) Apply same pattern to /orders endpoint. Analysis complete." thoughtNumber=6 totalThoughts=6 nextThoughtNeeded=false
149
+ ```
150
+
151
+ **Output:**
152
+ ```json
153
+ {
154
+ "thoughtNumber": 6,
155
+ "thoughtContent": "Conclusion: Optimization successful. Next steps: 1) Add database indexes on foreign keys for further improvement, 2) Monitor latency metrics for next week, 3) Apply same pattern to /orders endpoint. Analysis complete.",
156
+ "totalThoughts": 6,
157
+ "nextThoughtNeeded": false,
158
+ "branches": [],
159
+ "thoughtHistoryLength": 6,
160
+ "status": "complete",
161
+ "sessionContext": {
162
+ "sessionId": "conversation",
163
+ "remainingThoughts": 94,
164
+ "recentThoughts": [
165
+ {"number": 6, "preview": "Conclusion: Optimization successful. Next steps..."},
166
+ {"number": 5, "preview": "Implemented eager loading. Testing results: P9..."},
167
+ {"number": 4, "preview": "Solution: Use JOIN query to fetch users with r..."}
168
+ ]
169
+ }
170
+ }
171
+ ```
172
+
173
+ ---
174
+
175
+ ## Analysis Summary
176
+
177
+ **Pattern Used:** Linear Sequence
178
+ **Total Thoughts:** 6
179
+ **Revisions:** 0
180
+ **Branches:** 0
181
+ **Result:** Clear, actionable solution
182
+
183
+ **Thought Breakdown:**
184
+ 1. Problem identification ✅
185
+ 2. Data collection ✅
186
+ 3. Root cause analysis ✅
187
+ 4. Solution design ✅
188
+ 5. Implementation & validation ✅
189
+ 6. Conclusion & next steps ✅
190
+
191
+ **Time:** ~10 minutes
192
+ **Outcome:** 4.4x performance improvement
193
+
194
+ ---
195
+
196
+ ## Why Linear Pattern Worked
197
+
198
+ ✅ **Clear problem**: Slow API with measurable metrics
199
+ ✅ **Predictable steps**: Measure → Analyze → Fix → Validate
200
+ ✅ **Single solution**: N+1 problem had clear fix
201
+ ✅ **No branches needed**: Solution path was obvious once identified
202
+
203
+ **When to use linear:** Problems with clear causation and straightforward solutions.
204
+
205
+ ---
206
+
207
+ **For other patterns, see:**
208
+ - [revision-pattern.md](revision-pattern.md) - Correcting assumptions
209
+ - [branching-exploration.md](branching-exploration.md) - Multiple approaches
210
+ - [adaptive-depth.md](adaptive-depth.md) - Uncertain scope