vibe-fabric 0.1.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 (271) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +171 -0
  3. package/dist/cli/commands/claude.d.ts +19 -0
  4. package/dist/cli/commands/claude.d.ts.map +1 -0
  5. package/dist/cli/commands/claude.js +107 -0
  6. package/dist/cli/commands/claude.js.map +1 -0
  7. package/dist/cli/commands/coverage.d.ts +37 -0
  8. package/dist/cli/commands/coverage.d.ts.map +1 -0
  9. package/dist/cli/commands/coverage.js +374 -0
  10. package/dist/cli/commands/coverage.js.map +1 -0
  11. package/dist/cli/commands/doctor.d.ts +30 -0
  12. package/dist/cli/commands/doctor.d.ts.map +1 -0
  13. package/dist/cli/commands/doctor.js +187 -0
  14. package/dist/cli/commands/doctor.js.map +1 -0
  15. package/dist/cli/commands/gaps.d.ts +52 -0
  16. package/dist/cli/commands/gaps.d.ts.map +1 -0
  17. package/dist/cli/commands/gaps.js +487 -0
  18. package/dist/cli/commands/gaps.js.map +1 -0
  19. package/dist/cli/commands/help.d.ts +7 -0
  20. package/dist/cli/commands/help.d.ts.map +1 -0
  21. package/dist/cli/commands/help.js +51 -0
  22. package/dist/cli/commands/help.js.map +1 -0
  23. package/dist/cli/commands/init.d.ts +39 -0
  24. package/dist/cli/commands/init.d.ts.map +1 -0
  25. package/dist/cli/commands/init.js +246 -0
  26. package/dist/cli/commands/init.js.map +1 -0
  27. package/dist/cli/commands/prd.d.ts +30 -0
  28. package/dist/cli/commands/prd.d.ts.map +1 -0
  29. package/dist/cli/commands/prd.js +179 -0
  30. package/dist/cli/commands/prd.js.map +1 -0
  31. package/dist/cli/commands/repo/add.d.ts +36 -0
  32. package/dist/cli/commands/repo/add.d.ts.map +1 -0
  33. package/dist/cli/commands/repo/add.js +303 -0
  34. package/dist/cli/commands/repo/add.js.map +1 -0
  35. package/dist/cli/commands/scope.d.ts +36 -0
  36. package/dist/cli/commands/scope.d.ts.map +1 -0
  37. package/dist/cli/commands/scope.js +312 -0
  38. package/dist/cli/commands/scope.js.map +1 -0
  39. package/dist/cli/commands/send.d.ts +43 -0
  40. package/dist/cli/commands/send.d.ts.map +1 -0
  41. package/dist/cli/commands/send.js +469 -0
  42. package/dist/cli/commands/send.js.map +1 -0
  43. package/dist/cli/commands/status.d.ts +32 -0
  44. package/dist/cli/commands/status.d.ts.map +1 -0
  45. package/dist/cli/commands/status.js +422 -0
  46. package/dist/cli/commands/status.js.map +1 -0
  47. package/dist/cli/commands/sync.d.ts +37 -0
  48. package/dist/cli/commands/sync.d.ts.map +1 -0
  49. package/dist/cli/commands/sync.js +299 -0
  50. package/dist/cli/commands/sync.js.map +1 -0
  51. package/dist/cli/commands/version.d.ts +7 -0
  52. package/dist/cli/commands/version.d.ts.map +1 -0
  53. package/dist/cli/commands/version.js +45 -0
  54. package/dist/cli/commands/version.js.map +1 -0
  55. package/dist/cli/index.d.ts +3 -0
  56. package/dist/cli/index.d.ts.map +1 -0
  57. package/dist/cli/index.js +65 -0
  58. package/dist/cli/index.js.map +1 -0
  59. package/dist/cli/ui/components/ActiveScopes.d.ts +13 -0
  60. package/dist/cli/ui/components/ActiveScopes.d.ts.map +1 -0
  61. package/dist/cli/ui/components/ActiveScopes.js +25 -0
  62. package/dist/cli/ui/components/ActiveScopes.js.map +1 -0
  63. package/dist/cli/ui/components/EmptyState.d.ts +24 -0
  64. package/dist/cli/ui/components/EmptyState.d.ts.map +1 -0
  65. package/dist/cli/ui/components/EmptyState.js +13 -0
  66. package/dist/cli/ui/components/EmptyState.js.map +1 -0
  67. package/dist/cli/ui/components/Header.d.ts +11 -0
  68. package/dist/cli/ui/components/Header.d.ts.map +1 -0
  69. package/dist/cli/ui/components/Header.js +32 -0
  70. package/dist/cli/ui/components/Header.js.map +1 -0
  71. package/dist/cli/ui/components/PrdCoverage.d.ts +12 -0
  72. package/dist/cli/ui/components/PrdCoverage.d.ts.map +1 -0
  73. package/dist/cli/ui/components/PrdCoverage.js +15 -0
  74. package/dist/cli/ui/components/PrdCoverage.js.map +1 -0
  75. package/dist/cli/ui/components/RecentActivity.d.ts +12 -0
  76. package/dist/cli/ui/components/RecentActivity.d.ts.map +1 -0
  77. package/dist/cli/ui/components/RecentActivity.js +40 -0
  78. package/dist/cli/ui/components/RecentActivity.js.map +1 -0
  79. package/dist/cli/ui/components/RepoList.d.ts +12 -0
  80. package/dist/cli/ui/components/RepoList.d.ts.map +1 -0
  81. package/dist/cli/ui/components/RepoList.js +24 -0
  82. package/dist/cli/ui/components/RepoList.js.map +1 -0
  83. package/dist/cli/ui/components/Shortcuts.d.ts +7 -0
  84. package/dist/cli/ui/components/Shortcuts.d.ts.map +1 -0
  85. package/dist/cli/ui/components/Shortcuts.js +7 -0
  86. package/dist/cli/ui/components/Shortcuts.js.map +1 -0
  87. package/dist/cli/ui/components/index.d.ts +12 -0
  88. package/dist/cli/ui/components/index.d.ts.map +1 -0
  89. package/dist/cli/ui/components/index.js +12 -0
  90. package/dist/cli/ui/components/index.js.map +1 -0
  91. package/dist/cli/ui/dashboard.d.ts +9 -0
  92. package/dist/cli/ui/dashboard.d.ts.map +1 -0
  93. package/dist/cli/ui/dashboard.js +102 -0
  94. package/dist/cli/ui/dashboard.js.map +1 -0
  95. package/dist/core/commands.d.ts +32 -0
  96. package/dist/core/commands.d.ts.map +1 -0
  97. package/dist/core/commands.js +361 -0
  98. package/dist/core/commands.js.map +1 -0
  99. package/dist/core/config.d.ts +18 -0
  100. package/dist/core/config.d.ts.map +1 -0
  101. package/dist/core/config.js +78 -0
  102. package/dist/core/config.js.map +1 -0
  103. package/dist/core/coverage.d.ts +32 -0
  104. package/dist/core/coverage.d.ts.map +1 -0
  105. package/dist/core/coverage.js +286 -0
  106. package/dist/core/coverage.js.map +1 -0
  107. package/dist/core/dashboard/data.d.ts +73 -0
  108. package/dist/core/dashboard/data.d.ts.map +1 -0
  109. package/dist/core/dashboard/data.js +250 -0
  110. package/dist/core/dashboard/data.js.map +1 -0
  111. package/dist/core/dependencies.d.ts +39 -0
  112. package/dist/core/dependencies.d.ts.map +1 -0
  113. package/dist/core/dependencies.js +160 -0
  114. package/dist/core/dependencies.js.map +1 -0
  115. package/dist/core/doctor/auth.d.ts +22 -0
  116. package/dist/core/doctor/auth.d.ts.map +1 -0
  117. package/dist/core/doctor/auth.js +147 -0
  118. package/dist/core/doctor/auth.js.map +1 -0
  119. package/dist/core/doctor/config.d.ts +26 -0
  120. package/dist/core/doctor/config.d.ts.map +1 -0
  121. package/dist/core/doctor/config.js +172 -0
  122. package/dist/core/doctor/config.js.map +1 -0
  123. package/dist/core/doctor/environment.d.ts +26 -0
  124. package/dist/core/doctor/environment.d.ts.map +1 -0
  125. package/dist/core/doctor/environment.js +145 -0
  126. package/dist/core/doctor/environment.js.map +1 -0
  127. package/dist/core/doctor/index.d.ts +44 -0
  128. package/dist/core/doctor/index.d.ts.map +1 -0
  129. package/dist/core/doctor/index.js +134 -0
  130. package/dist/core/doctor/index.js.map +1 -0
  131. package/dist/core/doctor/repos.d.ts +22 -0
  132. package/dist/core/doctor/repos.d.ts.map +1 -0
  133. package/dist/core/doctor/repos.js +262 -0
  134. package/dist/core/doctor/repos.js.map +1 -0
  135. package/dist/core/doctor/sync.d.ts +18 -0
  136. package/dist/core/doctor/sync.d.ts.map +1 -0
  137. package/dist/core/doctor/sync.js +146 -0
  138. package/dist/core/doctor/sync.js.map +1 -0
  139. package/dist/core/gaps.d.ts +70 -0
  140. package/dist/core/gaps.d.ts.map +1 -0
  141. package/dist/core/gaps.js +448 -0
  142. package/dist/core/gaps.js.map +1 -0
  143. package/dist/core/github.d.ts +38 -0
  144. package/dist/core/github.d.ts.map +1 -0
  145. package/dist/core/github.js +102 -0
  146. package/dist/core/github.js.map +1 -0
  147. package/dist/core/prd/analyzer.d.ts +44 -0
  148. package/dist/core/prd/analyzer.d.ts.map +1 -0
  149. package/dist/core/prd/analyzer.js +259 -0
  150. package/dist/core/prd/analyzer.js.map +1 -0
  151. package/dist/core/prd/check.d.ts +17 -0
  152. package/dist/core/prd/check.d.ts.map +1 -0
  153. package/dist/core/prd/check.js +154 -0
  154. package/dist/core/prd/check.js.map +1 -0
  155. package/dist/core/prd/index.d.ts +6 -0
  156. package/dist/core/prd/index.d.ts.map +1 -0
  157. package/dist/core/prd/index.js +6 -0
  158. package/dist/core/prd/index.js.map +1 -0
  159. package/dist/core/project.d.ts +13 -0
  160. package/dist/core/project.d.ts.map +1 -0
  161. package/dist/core/project.js +810 -0
  162. package/dist/core/project.js.map +1 -0
  163. package/dist/core/prompts.d.ts +52 -0
  164. package/dist/core/prompts.d.ts.map +1 -0
  165. package/dist/core/prompts.js +266 -0
  166. package/dist/core/prompts.js.map +1 -0
  167. package/dist/core/repo/framework.d.ts +38 -0
  168. package/dist/core/repo/framework.d.ts.map +1 -0
  169. package/dist/core/repo/framework.js +142 -0
  170. package/dist/core/repo/framework.js.map +1 -0
  171. package/dist/core/repo/index.d.ts +6 -0
  172. package/dist/core/repo/index.d.ts.map +1 -0
  173. package/dist/core/repo/index.js +6 -0
  174. package/dist/core/repo/index.js.map +1 -0
  175. package/dist/core/repo/templates/claude-agents.d.ts +6 -0
  176. package/dist/core/repo/templates/claude-agents.d.ts.map +1 -0
  177. package/dist/core/repo/templates/claude-agents.js +173 -0
  178. package/dist/core/repo/templates/claude-agents.js.map +1 -0
  179. package/dist/core/repo/templates/claude-commands.d.ts +6 -0
  180. package/dist/core/repo/templates/claude-commands.d.ts.map +1 -0
  181. package/dist/core/repo/templates/claude-commands.js +278 -0
  182. package/dist/core/repo/templates/claude-commands.js.map +1 -0
  183. package/dist/core/repo/templates/claude-prompts.d.ts +6 -0
  184. package/dist/core/repo/templates/claude-prompts.d.ts.map +1 -0
  185. package/dist/core/repo/templates/claude-prompts.js +258 -0
  186. package/dist/core/repo/templates/claude-prompts.js.map +1 -0
  187. package/dist/core/repo/templates/claude-scripts.d.ts +6 -0
  188. package/dist/core/repo/templates/claude-scripts.d.ts.map +1 -0
  189. package/dist/core/repo/templates/claude-scripts.js +212 -0
  190. package/dist/core/repo/templates/claude-scripts.js.map +1 -0
  191. package/dist/core/repo/templates/index.d.ts +22 -0
  192. package/dist/core/repo/templates/index.d.ts.map +1 -0
  193. package/dist/core/repo/templates/index.js +121 -0
  194. package/dist/core/repo/templates/index.js.map +1 -0
  195. package/dist/core/repo/templates/vibe-readme.d.ts +6 -0
  196. package/dist/core/repo/templates/vibe-readme.d.ts.map +1 -0
  197. package/dist/core/repo/templates/vibe-readme.js +204 -0
  198. package/dist/core/repo/templates/vibe-readme.js.map +1 -0
  199. package/dist/core/repo/templates/vibe-scripts.d.ts +6 -0
  200. package/dist/core/repo/templates/vibe-scripts.d.ts.map +1 -0
  201. package/dist/core/repo/templates/vibe-scripts.js +308 -0
  202. package/dist/core/repo/templates/vibe-scripts.js.map +1 -0
  203. package/dist/core/repo/validation.d.ts +46 -0
  204. package/dist/core/repo/validation.d.ts.map +1 -0
  205. package/dist/core/repo/validation.js +154 -0
  206. package/dist/core/repo/validation.js.map +1 -0
  207. package/dist/core/runner.d.ts +38 -0
  208. package/dist/core/runner.d.ts.map +1 -0
  209. package/dist/core/runner.js +124 -0
  210. package/dist/core/runner.js.map +1 -0
  211. package/dist/core/send.d.ts +83 -0
  212. package/dist/core/send.d.ts.map +1 -0
  213. package/dist/core/send.js +565 -0
  214. package/dist/core/send.js.map +1 -0
  215. package/dist/core/status.d.ts +76 -0
  216. package/dist/core/status.d.ts.map +1 -0
  217. package/dist/core/status.js +430 -0
  218. package/dist/core/status.js.map +1 -0
  219. package/dist/core/sync/aggregator.d.ts +22 -0
  220. package/dist/core/sync/aggregator.d.ts.map +1 -0
  221. package/dist/core/sync/aggregator.js +278 -0
  222. package/dist/core/sync/aggregator.js.map +1 -0
  223. package/dist/core/sync/completion.d.ts +37 -0
  224. package/dist/core/sync/completion.d.ts.map +1 -0
  225. package/dist/core/sync/completion.js +264 -0
  226. package/dist/core/sync/completion.js.map +1 -0
  227. package/dist/core/sync/index.d.ts +51 -0
  228. package/dist/core/sync/index.d.ts.map +1 -0
  229. package/dist/core/sync/index.js +200 -0
  230. package/dist/core/sync/index.js.map +1 -0
  231. package/dist/core/sync/scanner.d.ts +39 -0
  232. package/dist/core/sync/scanner.d.ts.map +1 -0
  233. package/dist/core/sync/scanner.js +364 -0
  234. package/dist/core/sync/scanner.js.map +1 -0
  235. package/dist/types/config.d.ts +157 -0
  236. package/dist/types/config.d.ts.map +1 -0
  237. package/dist/types/config.js +58 -0
  238. package/dist/types/config.js.map +1 -0
  239. package/dist/types/coverage.d.ts +100 -0
  240. package/dist/types/coverage.d.ts.map +1 -0
  241. package/dist/types/coverage.js +8 -0
  242. package/dist/types/coverage.js.map +1 -0
  243. package/dist/types/doctor.d.ts +68 -0
  244. package/dist/types/doctor.d.ts.map +1 -0
  245. package/dist/types/doctor.js +5 -0
  246. package/dist/types/doctor.js.map +1 -0
  247. package/dist/types/gaps.d.ts +129 -0
  248. package/dist/types/gaps.d.ts.map +1 -0
  249. package/dist/types/gaps.js +8 -0
  250. package/dist/types/gaps.js.map +1 -0
  251. package/dist/types/prompts.d.ts +99 -0
  252. package/dist/types/prompts.d.ts.map +1 -0
  253. package/dist/types/prompts.js +5 -0
  254. package/dist/types/prompts.js.map +1 -0
  255. package/dist/types/runner.d.ts +156 -0
  256. package/dist/types/runner.d.ts.map +1 -0
  257. package/dist/types/runner.js +41 -0
  258. package/dist/types/runner.js.map +1 -0
  259. package/dist/types/send.d.ts +157 -0
  260. package/dist/types/send.d.ts.map +1 -0
  261. package/dist/types/send.js +18 -0
  262. package/dist/types/send.js.map +1 -0
  263. package/dist/types/status.d.ts +150 -0
  264. package/dist/types/status.d.ts.map +1 -0
  265. package/dist/types/status.js +15 -0
  266. package/dist/types/status.js.map +1 -0
  267. package/dist/types/sync.d.ts +259 -0
  268. package/dist/types/sync.d.ts.map +1 -0
  269. package/dist/types/sync.js +38 -0
  270. package/dist/types/sync.js.map +1 -0
  271. package/package.json +72 -0
@@ -0,0 +1,258 @@
1
+ /**
2
+ * .claude/prompts/ templates
3
+ */
4
+ export const claudePrompts = [
5
+ // ralph-research.md
6
+ {
7
+ path: '.claude/prompts/ralph-research.md',
8
+ content: `# Ralph Research Prompt
9
+
10
+ ## Context
11
+
12
+ Plan ID: {{PLAN_ID}}
13
+ Session Number: {{SESSION_NUMBER}}
14
+ Previous Sessions: {{PREVIOUS_SESSIONS}}
15
+
16
+ ## Instructions
17
+
18
+ Prepare for the next execution session by:
19
+
20
+ 1. **Review Progress**
21
+ - Read the plan file
22
+ - Check the progress log
23
+ - Identify completed vs pending steps
24
+
25
+ 2. **Gather Context**
26
+ - Read relevant source files
27
+ - Check knowledge base for related entries
28
+ - Review any error logs from previous sessions
29
+
30
+ 3. **Plan Next Steps**
31
+ - Identify 2-3 steps to accomplish this session
32
+ - Note any dependencies or blockers
33
+ - Prepare code context
34
+
35
+ ## Output Format
36
+
37
+ \`\`\`markdown
38
+ # Session {{SESSION_NUMBER}} Brief
39
+
40
+ ## Progress Summary
41
+ - Steps completed: X/Y
42
+ - Last completed: [step description]
43
+ - Blockers: [any issues]
44
+
45
+ ## Next Steps
46
+ 1. [Step to do]
47
+ 2. [Step to do]
48
+
49
+ ## Context Files
50
+ - path/to/file1.ts
51
+ - path/to/file2.ts
52
+
53
+ ## Notes
54
+ [Any relevant context or warnings]
55
+ \`\`\`
56
+ `,
57
+ },
58
+ // ralph-execution.md
59
+ {
60
+ path: '.claude/prompts/ralph-execution.md',
61
+ content: `# Ralph Execution Prompt
62
+
63
+ ## Context
64
+
65
+ Plan ID: {{PLAN_ID}}
66
+ Session Brief: {{SESSION_BRIEF}}
67
+ Steps to Execute: {{STEPS}}
68
+
69
+ ## Instructions
70
+
71
+ Execute the planned steps for this session:
72
+
73
+ 1. **Read the brief** - Understand what to accomplish
74
+ 2. **Execute each step** - Make the required changes
75
+ 3. **Verify changes** - Run tests, check behavior
76
+ 4. **Log progress** - Update the plan's progress log
77
+
78
+ ## Guidelines
79
+
80
+ - Make focused, incremental changes
81
+ - Test after each significant change
82
+ - Document any deviations from the plan
83
+ - Note any issues for the cleanup phase
84
+
85
+ ## Output
86
+
87
+ After execution, provide:
88
+ - Summary of changes made
89
+ - Files modified
90
+ - Test results
91
+ - Any issues encountered
92
+ `,
93
+ },
94
+ // ralph-cleanup.md
95
+ {
96
+ path: '.claude/prompts/ralph-cleanup.md',
97
+ content: `# Ralph Cleanup Prompt
98
+
99
+ ## Context
100
+
101
+ Plan ID: {{PLAN_ID}}
102
+ Session Number: {{SESSION_NUMBER}}
103
+ Execution Summary: {{EXECUTION_SUMMARY}}
104
+
105
+ ## Instructions
106
+
107
+ Verify and clean up after the execution session:
108
+
109
+ 1. **Verify Changes**
110
+ - Review all modified files
111
+ - Ensure changes are correct
112
+ - Check for any leftover debug code
113
+
114
+ 2. **Run Tests**
115
+ - Run relevant unit tests
116
+ - Run integration tests if applicable
117
+ - Check for regressions
118
+
119
+ 3. **Update Documentation**
120
+ - Update progress log in the plan
121
+ - Check off completed acceptance criteria
122
+ - Add any KB entries for learnings
123
+
124
+ 4. **Prepare Handoff**
125
+ - Note any unfinished work
126
+ - Document blockers for next session
127
+ - Update plan status if complete
128
+
129
+ ## Output Format
130
+
131
+ \`\`\`markdown
132
+ # Session {{SESSION_NUMBER}} Summary
133
+
134
+ ## Changes Made
135
+ - file1.ts: [description]
136
+ - file2.ts: [description]
137
+
138
+ ## Test Results
139
+ - [x] Unit tests pass
140
+ - [ ] Integration tests pass
141
+
142
+ ## Acceptance Criteria
143
+ - [x] AC-1: ...
144
+ - [ ] AC-2: ...
145
+
146
+ ## Issues
147
+ - [Issue description]
148
+
149
+ ## Next Session
150
+ - [What to do next]
151
+ \`\`\`
152
+ `,
153
+ },
154
+ // ralph-plan-extraction.md
155
+ {
156
+ path: '.claude/prompts/ralph-plan-extraction.md',
157
+ content: `# Ralph Plan Extraction Prompt
158
+
159
+ ## Context
160
+
161
+ Scope ID: {{SCOPE_ID}}
162
+ Scope Content: {{SCOPE_CONTENT}}
163
+
164
+ ## Instructions
165
+
166
+ Extract a detailed implementation plan from the scope:
167
+
168
+ 1. **Analyze Requirements**
169
+ - Identify all functional requirements
170
+ - Note acceptance criteria
171
+ - Understand technical constraints
172
+
173
+ 2. **Plan Architecture**
174
+ - Determine files to create/modify
175
+ - Identify dependencies
176
+ - Plan data flow
177
+
178
+ 3. **Break Down Steps**
179
+ - Create concrete implementation steps
180
+ - Order by dependencies
181
+ - Estimate complexity
182
+
183
+ ## Output Format
184
+
185
+ Follow the PLAN_TEMPLATE.md structure.
186
+ `,
187
+ },
188
+ // ralph-plan-module.md
189
+ {
190
+ path: '.claude/prompts/ralph-plan-module.md',
191
+ content: `# Ralph Module Plan Prompt
192
+
193
+ ## Context
194
+
195
+ Module: {{MODULE_NAME}}
196
+ Requirements: {{REQUIREMENTS}}
197
+
198
+ ## Instructions
199
+
200
+ Create a focused plan for implementing this module:
201
+
202
+ 1. **Define Interface**
203
+ - Public API
204
+ - Types and interfaces
205
+ - Dependencies
206
+
207
+ 2. **Implementation Steps**
208
+ - Core functionality
209
+ - Edge cases
210
+ - Error handling
211
+
212
+ 3. **Testing Strategy**
213
+ - Unit test scenarios
214
+ - Integration points
215
+ - Mock requirements
216
+
217
+ ## Output
218
+
219
+ Detailed steps for the module implementation.
220
+ `,
221
+ },
222
+ // ralph-plan-validation.md
223
+ {
224
+ path: '.claude/prompts/ralph-plan-validation.md',
225
+ content: `# Ralph Plan Validation Prompt
226
+
227
+ ## Context
228
+
229
+ Plan ID: {{PLAN_ID}}
230
+ Plan Content: {{PLAN_CONTENT}}
231
+ Scope Content: {{SCOPE_CONTENT}}
232
+
233
+ ## Instructions
234
+
235
+ Validate that the plan adequately covers the scope:
236
+
237
+ 1. **Requirement Coverage**
238
+ - Check each scope requirement has plan steps
239
+ - Verify acceptance criteria are addressable
240
+ - Note any gaps
241
+
242
+ 2. **Feasibility Check**
243
+ - Verify steps are concrete and actionable
244
+ - Check dependencies are identified
245
+ - Assess complexity estimates
246
+
247
+ 3. **Risk Assessment**
248
+ - Identify potential blockers
249
+ - Note technical risks
250
+ - Suggest mitigations
251
+
252
+ ## Output
253
+
254
+ Validation report with any issues or suggestions.
255
+ `,
256
+ },
257
+ ];
258
+ //# sourceMappingURL=claude-prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-prompts.js","sourceRoot":"","sources":["../../../../src/core/repo/templates/claude-prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,oBAAoB;IACpB;QACE,IAAI,EAAE,mCAAmC;QACzC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgDZ;KACE;IAED,qBAAqB;IACrB;QACE,IAAI,EAAE,oCAAoC;QAC1C,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+BZ;KACE;IAED,mBAAmB;IACnB;QACE,IAAI,EAAE,kCAAkC;QACxC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuDZ;KACE;IAED,2BAA2B;IAC3B;QACE,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BZ;KACE;IAED,uBAAuB;IACvB;QACE,IAAI,EAAE,sCAAsC;QAC5C,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BZ;KACE;IAED,2BAA2B;IAC3B;QACE,IAAI,EAAE,0CAA0C;QAChD,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BZ;KACE;CACF,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * .claude/scripts/ templates
3
+ */
4
+ import type { TemplateFile } from './index.js';
5
+ export declare const claudeScripts: TemplateFile[];
6
+ //# sourceMappingURL=claude-scripts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-scripts.d.ts","sourceRoot":"","sources":["../../../../src/core/repo/templates/claude-scripts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,aAAa,EAAE,YAAY,EA+MvC,CAAC"}
@@ -0,0 +1,212 @@
1
+ /**
2
+ * .claude/scripts/ templates
3
+ */
4
+ export const claudeScripts = [
5
+ // ralph-runner.py - Unified Ralph executor
6
+ {
7
+ path: '.claude/scripts/ralph-runner.py',
8
+ content: `#!/usr/bin/env -S uv run --quiet --script
9
+ # /// script
10
+ # requires-python = ">=3.11"
11
+ # dependencies = ["pydantic", "rich"]
12
+ # ///
13
+ """
14
+ Ralph Runner - Autonomous multi-session executor for vibe-fabric.
15
+
16
+ This script manages autonomous execution loops for implementing plans
17
+ or creating plans from scopes. It handles:
18
+ - Session state persistence
19
+ - Progress tracking
20
+ - Error recovery
21
+ - Notification hooks
22
+
23
+ Usage:
24
+ uv run ralph-runner.py --mode execute --plan PLAN-ID --loop
25
+ uv run ralph-runner.py --mode plan --scope SCOPE-ID --loop
26
+ uv run ralph-runner.py --status
27
+ uv run ralph-runner.py --cancel
28
+ """
29
+
30
+ import argparse
31
+ import json
32
+ import os
33
+ import sys
34
+ from datetime import datetime
35
+ from pathlib import Path
36
+ from typing import Optional
37
+
38
+ try:
39
+ from pydantic import BaseModel
40
+ from rich.console import Console
41
+ from rich.panel import Panel
42
+ except ImportError:
43
+ print("Dependencies not available. Run with: uv run ralph-runner.py")
44
+ sys.exit(1)
45
+
46
+ console = Console()
47
+
48
+ # State file location
49
+ STATE_FILE = Path(".claude/ralph-state.json")
50
+
51
+
52
+ class RalphState(BaseModel):
53
+ """Persistent state for Ralph sessions."""
54
+ active: bool = False
55
+ mode: str = "execute" # execute or plan
56
+ target_id: str = "" # PLAN-ID or SCOPE-ID
57
+ session_number: int = 0
58
+ started_at: Optional[str] = None
59
+ last_session_at: Optional[str] = None
60
+ sessions_completed: int = 0
61
+ status: str = "idle" # idle, running, paused, completed, failed
62
+
63
+
64
+ def load_state() -> RalphState:
65
+ """Load state from file."""
66
+ if STATE_FILE.exists():
67
+ try:
68
+ data = json.loads(STATE_FILE.read_text())
69
+ return RalphState(**data)
70
+ except Exception:
71
+ return RalphState()
72
+ return RalphState()
73
+
74
+
75
+ def save_state(state: RalphState) -> None:
76
+ """Save state to file."""
77
+ STATE_FILE.parent.mkdir(parents=True, exist_ok=True)
78
+ STATE_FILE.write_text(state.model_dump_json(indent=2))
79
+
80
+
81
+ def show_status() -> None:
82
+ """Display current Ralph status."""
83
+ state = load_state()
84
+
85
+ if not state.active:
86
+ console.print("[dim]Ralph is not active[/dim]")
87
+ return
88
+
89
+ status_color = {
90
+ "running": "green",
91
+ "paused": "yellow",
92
+ "completed": "blue",
93
+ "failed": "red",
94
+ }.get(state.status, "white")
95
+
96
+ console.print(Panel(
97
+ f"[bold]Mode:[/bold] {state.mode}\\n"
98
+ f"[bold]Target:[/bold] {state.target_id}\\n"
99
+ f"[bold]Status:[/bold] [{status_color}]{state.status}[/{status_color}]\\n"
100
+ f"[bold]Sessions:[/bold] {state.sessions_completed}\\n"
101
+ f"[bold]Started:[/bold] {state.started_at or 'N/A'}\\n"
102
+ f"[bold]Last Session:[/bold] {state.last_session_at or 'N/A'}",
103
+ title="Ralph Status",
104
+ ))
105
+
106
+
107
+ def start_session(mode: str, target_id: str, loop: bool) -> None:
108
+ """Start a Ralph session."""
109
+ state = load_state()
110
+
111
+ if state.active and state.status == "running":
112
+ console.print("[red]Ralph is already running. Use --cancel first.[/red]")
113
+ return
114
+
115
+ state.active = True
116
+ state.mode = mode
117
+ state.target_id = target_id
118
+ state.status = "running"
119
+ state.started_at = datetime.now().isoformat()
120
+ state.session_number += 1
121
+
122
+ save_state(state)
123
+
124
+ console.print(f"[green]Starting Ralph {mode} for {target_id}[/green]")
125
+
126
+ if mode == "execute":
127
+ run_execute_session(target_id, state.session_number)
128
+ else:
129
+ run_plan_session(target_id, state.session_number)
130
+
131
+ # Update state after session
132
+ state = load_state()
133
+ state.sessions_completed += 1
134
+ state.last_session_at = datetime.now().isoformat()
135
+
136
+ if not loop:
137
+ state.active = False
138
+ state.status = "completed"
139
+
140
+ save_state(state)
141
+
142
+
143
+ def run_execute_session(plan_id: str, session_number: int) -> None:
144
+ """Run an execution session."""
145
+ console.print(f"[cyan]Session {session_number}: Executing {plan_id}[/cyan]")
146
+
147
+ # In a real implementation, this would:
148
+ # 1. Call Claude Code with the research agent
149
+ # 2. Call Claude Code with execution prompts
150
+ # 3. Call Claude Code with cleanup agent
151
+
152
+ console.print("[yellow]Note: Ralph loop not fully implemented yet.[/yellow]")
153
+ console.print("Use /implement-plan for interactive execution.")
154
+
155
+
156
+ def run_plan_session(scope_id: str, session_number: int) -> None:
157
+ """Run a planning session."""
158
+ console.print(f"[cyan]Session {session_number}: Planning from {scope_id}[/cyan]")
159
+
160
+ # In a real implementation, this would:
161
+ # 1. Read the scope
162
+ # 2. Call Claude Code with planning prompts
163
+ # 3. Create the plan file
164
+
165
+ console.print("[yellow]Note: Ralph loop not fully implemented yet.[/yellow]")
166
+ console.print("Use /plan-from-scope for interactive planning.")
167
+
168
+
169
+ def cancel_session() -> None:
170
+ """Cancel the active Ralph session."""
171
+ state = load_state()
172
+
173
+ if not state.active:
174
+ console.print("[dim]No active Ralph session[/dim]")
175
+ return
176
+
177
+ state.active = False
178
+ state.status = "cancelled"
179
+ save_state(state)
180
+
181
+ console.print("[yellow]Ralph session cancelled[/yellow]")
182
+
183
+
184
+ def main() -> None:
185
+ parser = argparse.ArgumentParser(description="Ralph autonomous executor")
186
+ parser.add_argument("--mode", choices=["execute", "plan"], help="Execution mode")
187
+ parser.add_argument("--plan", help="Plan ID for execute mode")
188
+ parser.add_argument("--scope", help="Scope ID for plan mode")
189
+ parser.add_argument("--loop", action="store_true", help="Run in loop mode")
190
+ parser.add_argument("--status", action="store_true", help="Show status")
191
+ parser.add_argument("--cancel", action="store_true", help="Cancel active session")
192
+
193
+ args = parser.parse_args()
194
+
195
+ if args.status:
196
+ show_status()
197
+ elif args.cancel:
198
+ cancel_session()
199
+ elif args.mode == "execute" and args.plan:
200
+ start_session("execute", args.plan, args.loop)
201
+ elif args.mode == "plan" and args.scope:
202
+ start_session("plan", args.scope, args.loop)
203
+ else:
204
+ parser.print_help()
205
+
206
+
207
+ if __name__ == "__main__":
208
+ main()
209
+ `,
210
+ },
211
+ ];
212
+ //# sourceMappingURL=claude-scripts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"claude-scripts.js","sourceRoot":"","sources":["../../../../src/core/repo/templates/claude-scripts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,aAAa,GAAmB;IAC3C,2CAA2C;IAC3C;QACE,IAAI,EAAE,iCAAiC;QACvC,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyMZ;KACE;CACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Framework file templates for dev repository injection
3
+ *
4
+ * These templates are injected into dev repositories when running `vibe repo add`.
5
+ * They create the vibe/ and .claude/ folder structure.
6
+ */
7
+ /**
8
+ * Template file definition
9
+ */
10
+ export interface TemplateFile {
11
+ path: string;
12
+ content: string;
13
+ }
14
+ /**
15
+ * Get all framework files to inject
16
+ */
17
+ export declare function getFrameworkFiles(): TemplateFile[];
18
+ /**
19
+ * Get all framework file paths (for detection)
20
+ */
21
+ export declare function getFrameworkFilePaths(): string[];
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/core/repo/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,YAAY,EAAE,CAiClD;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,EAAE,CAEhD"}
@@ -0,0 +1,121 @@
1
+ /**
2
+ * Framework file templates for dev repository injection
3
+ *
4
+ * These templates are injected into dev repositories when running `vibe repo add`.
5
+ * They create the vibe/ and .claude/ folder structure.
6
+ */
7
+ import { vibeReadmes } from './vibe-readme.js';
8
+ import { claudeCommands } from './claude-commands.js';
9
+ import { claudeAgents } from './claude-agents.js';
10
+ import { claudePrompts } from './claude-prompts.js';
11
+ import { claudeScripts } from './claude-scripts.js';
12
+ import { vibeScripts } from './vibe-scripts.js';
13
+ /**
14
+ * Get all framework files to inject
15
+ */
16
+ export function getFrameworkFiles() {
17
+ return [
18
+ // vibe/ folder
19
+ ...vibeReadmes,
20
+ ...vibeScripts,
21
+ // .claude/ folder
22
+ ...claudeCommands,
23
+ ...claudeAgents,
24
+ ...claudePrompts,
25
+ ...claudeScripts,
26
+ // .claude/CLAUDE.md
27
+ {
28
+ path: '.claude/CLAUDE.md',
29
+ content: getCLAUDEmd(),
30
+ },
31
+ // .claude/settings.local.json
32
+ {
33
+ path: '.claude/settings.local.json',
34
+ content: getSettingsLocalJson(),
35
+ },
36
+ // Gitkeep files for empty directories
37
+ { path: 'vibe/incoming-scopes/processed/.gitkeep', content: '' },
38
+ { path: 'vibe/implementation-plans/active/.gitkeep', content: '' },
39
+ { path: 'vibe/implementation-plans/completed/.gitkeep', content: '' },
40
+ { path: 'vibe/implementation-plans/archived/.gitkeep', content: '' },
41
+ { path: 'vibe/maps/.gitkeep', content: '' },
42
+ { path: 'vibe/graphs/.gitkeep', content: '' },
43
+ { path: '.claude/rules/.gitkeep', content: '' },
44
+ ];
45
+ }
46
+ /**
47
+ * Get all framework file paths (for detection)
48
+ */
49
+ export function getFrameworkFilePaths() {
50
+ return getFrameworkFiles().map((f) => f.path);
51
+ }
52
+ /**
53
+ * CLAUDE.md template - project context for Claude Code
54
+ */
55
+ function getCLAUDEmd() {
56
+ return `# Project Context
57
+
58
+ This repository is managed with vibe-fabric, an AI-collaborative development system.
59
+
60
+ ## Framework Structure
61
+
62
+ - \`vibe/incoming-scopes/\` - Scope briefs from planning hub
63
+ - \`vibe/implementation-plans/\` - Implementation plans for scopes
64
+ - \`vibe/knowledge-base/\` - Accumulated learnings and documentation
65
+ - \`vibe/maps/\` - Generated codebase maps
66
+ - \`vibe/graphs/\` - Dependency analysis
67
+
68
+ ## Workflow
69
+
70
+ 1. Scopes arrive in \`vibe/incoming-scopes/\`
71
+ 2. Create implementation plan: \`/plan-from-scope SCOPE-XXX\`
72
+ 3. Implement the plan: \`/implement-plan PLAN-XXX\` or use Ralph
73
+ 4. Document learnings in \`vibe/knowledge-base/\`
74
+ 5. Move completed plans to \`implementation-plans/completed/\`
75
+
76
+ ## Available Commands
77
+
78
+ - \`/plan-from-scope\` - Create implementation plan from scope
79
+ - \`/implement-plan\` - Execute plan interactively
80
+ - \`/ralph execute\` - Autonomous multi-session execution
81
+ - \`/ralph plan\` - Autonomous planning from scope
82
+ - \`/kb\` - Search knowledge base
83
+ - \`/kb-add\` - Add entry to knowledge base
84
+ - \`/sync\` - Generate codebase map
85
+ - \`/deps\` - Analyze dependencies
86
+ - \`/impact\` - Analyze change impact
87
+
88
+ ## Tech Stack
89
+
90
+ <!-- Auto-detected or manually specified -->
91
+ - **Framework:** [To be detected]
92
+ - **Language:** [To be detected]
93
+ - **Build:** [To be detected]
94
+
95
+ ## Key Patterns
96
+
97
+ <!-- Add project-specific patterns here -->
98
+
99
+ ## Important Files
100
+
101
+ <!-- Add key files to be aware of -->
102
+ `;
103
+ }
104
+ /**
105
+ * settings.local.json template - Claude Code permissions
106
+ */
107
+ function getSettingsLocalJson() {
108
+ return JSON.stringify({
109
+ permissions: {
110
+ allow: [
111
+ 'Bash(npm run typecheck:*)',
112
+ 'Bash(npm run lint:*)',
113
+ 'Bash(npm run build:*)',
114
+ 'Bash(npm run test:*)',
115
+ 'Bash(npx tsx:*)',
116
+ 'Bash(uv run:*)',
117
+ ],
118
+ },
119
+ }, null, 2);
120
+ }
121
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/core/repo/templates/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD;;GAEG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO;QACL,eAAe;QACf,GAAG,WAAW;QACd,GAAG,WAAW;QAEd,kBAAkB;QAClB,GAAG,cAAc;QACjB,GAAG,YAAY;QACf,GAAG,aAAa;QAChB,GAAG,aAAa;QAEhB,oBAAoB;QACpB;YACE,IAAI,EAAE,mBAAmB;YACzB,OAAO,EAAE,WAAW,EAAE;SACvB;QAED,8BAA8B;QAC9B;YACE,IAAI,EAAE,6BAA6B;YACnC,OAAO,EAAE,oBAAoB,EAAE;SAChC;QAED,sCAAsC;QACtC,EAAE,IAAI,EAAE,yCAAyC,EAAE,OAAO,EAAE,EAAE,EAAE;QAChE,EAAE,IAAI,EAAE,2CAA2C,EAAE,OAAO,EAAE,EAAE,EAAE;QAClE,EAAE,IAAI,EAAE,8CAA8C,EAAE,OAAO,EAAE,EAAE,EAAE;QACrE,EAAE,IAAI,EAAE,6CAA6C,EAAE,OAAO,EAAE,EAAE,EAAE;QACpE,EAAE,IAAI,EAAE,oBAAoB,EAAE,OAAO,EAAE,EAAE,EAAE;QAC3C,EAAE,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,EAAE,EAAE;QAC7C,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,EAAE,EAAE;KAChD,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO,iBAAiB,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;AAChD,CAAC;AAED;;GAEG;AACH,SAAS,WAAW;IAClB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8CR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB;IAC3B,OAAO,IAAI,CAAC,SAAS,CACnB;QACE,WAAW,EAAE;YACX,KAAK,EAAE;gBACL,2BAA2B;gBAC3B,sBAAsB;gBACtB,uBAAuB;gBACvB,sBAAsB;gBACtB,iBAAiB;gBACjB,gBAAgB;aACjB;SACF;KACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * vibe/ folder README templates
3
+ */
4
+ import type { TemplateFile } from './index.js';
5
+ export declare const vibeReadmes: TemplateFile[];
6
+ //# sourceMappingURL=vibe-readme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vibe-readme.d.ts","sourceRoot":"","sources":["../../../../src/core/repo/templates/vibe-readme.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,eAAO,MAAM,WAAW,EAAE,YAAY,EA4MrC,CAAC"}