bobs-workshop 0.1.4

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 (94) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +252 -0
  3. package/bin/bobs-mcp.js +130 -0
  4. package/dist/api/taskLogger.js +106 -0
  5. package/dist/api/taskLogger.js.map +1 -0
  6. package/dist/cli/checker.js +401 -0
  7. package/dist/cli/checker.js.map +1 -0
  8. package/dist/cli/cleanup.js +131 -0
  9. package/dist/cli/cleanup.js.map +1 -0
  10. package/dist/cli/debug.js +157 -0
  11. package/dist/cli/debug.js.map +1 -0
  12. package/dist/cli/health.js +97 -0
  13. package/dist/cli/health.js.map +1 -0
  14. package/dist/cli/setup.js +81 -0
  15. package/dist/cli/setup.js.map +1 -0
  16. package/dist/cli/workshop.js +42 -0
  17. package/dist/cli/workshop.js.map +1 -0
  18. package/dist/dashboard/server.js +1206 -0
  19. package/dist/dashboard/server.js.map +1 -0
  20. package/dist/index.js +757 -0
  21. package/dist/index.js.map +1 -0
  22. package/dist/prompts/architect.js +157 -0
  23. package/dist/prompts/architect.js.map +1 -0
  24. package/dist/prompts/debugger.js +201 -0
  25. package/dist/prompts/debugger.js.map +1 -0
  26. package/dist/prompts/engineer.js +171 -0
  27. package/dist/prompts/engineer.js.map +1 -0
  28. package/dist/prompts/orchestrator.js +225 -0
  29. package/dist/prompts/orchestrator.js.map +1 -0
  30. package/dist/prompts/reviewer.js +199 -0
  31. package/dist/prompts/reviewer.js.map +1 -0
  32. package/dist/services/activitySummarizer.js +353 -0
  33. package/dist/services/activitySummarizer.js.map +1 -0
  34. package/dist/services/changeValidator.js +396 -0
  35. package/dist/services/changeValidator.js.map +1 -0
  36. package/dist/services/claudeOrchestrator.js +343 -0
  37. package/dist/services/claudeOrchestrator.js.map +1 -0
  38. package/dist/services/fileMonitor.js +250 -0
  39. package/dist/services/fileMonitor.js.map +1 -0
  40. package/dist/services/implementationSummarizer.js +306 -0
  41. package/dist/services/implementationSummarizer.js.map +1 -0
  42. package/dist/services/liveMonitor.js +315 -0
  43. package/dist/services/liveMonitor.js.map +1 -0
  44. package/dist/services/mcpAuditLogger.js +104 -0
  45. package/dist/services/mcpAuditLogger.js.map +1 -0
  46. package/dist/services/mcpLogger.js +223 -0
  47. package/dist/services/mcpLogger.js.map +1 -0
  48. package/dist/services/tmuxManager.js +541 -0
  49. package/dist/services/tmuxManager.js.map +1 -0
  50. package/dist/tools/approvalTools.js +244 -0
  51. package/dist/tools/approvalTools.js.map +1 -0
  52. package/dist/tools/autoDebugger.js +147 -0
  53. package/dist/tools/autoDebugger.js.map +1 -0
  54. package/dist/tools/cleanupService.js +221 -0
  55. package/dist/tools/cleanupService.js.map +1 -0
  56. package/dist/tools/dashboardTools.js +359 -0
  57. package/dist/tools/dashboardTools.js.map +1 -0
  58. package/dist/tools/developmentNudges.js +336 -0
  59. package/dist/tools/developmentNudges.js.map +1 -0
  60. package/dist/tools/gitTools.js +741 -0
  61. package/dist/tools/gitTools.js.map +1 -0
  62. package/dist/tools/orchestratorTools.js +765 -0
  63. package/dist/tools/orchestratorTools.js.map +1 -0
  64. package/dist/tools/searchTools.js +788 -0
  65. package/dist/tools/searchTools.js.map +1 -0
  66. package/dist/tools/specTools.js +350 -0
  67. package/dist/tools/specTools.js.map +1 -0
  68. package/dist/tools/tmuxTools.js +100 -0
  69. package/dist/tools/tmuxTools.js.map +1 -0
  70. package/dist/tools/workRecorder.js +215 -0
  71. package/dist/tools/workRecorder.js.map +1 -0
  72. package/dist/tools/worktreeTools.js +705 -0
  73. package/dist/tools/worktreeTools.js.map +1 -0
  74. package/dist/utils/__tests__/integration.test.js +57 -0
  75. package/dist/utils/__tests__/integration.test.js.map +1 -0
  76. package/dist/utils/__tests__/serverDetection.test.js +151 -0
  77. package/dist/utils/__tests__/serverDetection.test.js.map +1 -0
  78. package/dist/utils/errorHandling.js +336 -0
  79. package/dist/utils/errorHandling.js.map +1 -0
  80. package/dist/utils/processManager.js +172 -0
  81. package/dist/utils/processManager.js.map +1 -0
  82. package/dist/utils/reliability.js +263 -0
  83. package/dist/utils/reliability.js.map +1 -0
  84. package/dist/utils/responseFormatter.js +250 -0
  85. package/dist/utils/responseFormatter.js.map +1 -0
  86. package/dist/utils/serverDetection.js +133 -0
  87. package/dist/utils/serverDetection.js.map +1 -0
  88. package/dist/utils/specMigration.js +105 -0
  89. package/dist/utils/specMigration.js.map +1 -0
  90. package/dist/validation/schemas.js +299 -0
  91. package/dist/validation/schemas.js.map +1 -0
  92. package/package.json +79 -0
  93. package/scripts/init-workspace.js +63 -0
  94. package/scripts/install-search-tools.js +116 -0
@@ -0,0 +1,336 @@
1
+ // src/tools/developmentNudges.ts
2
+ import { z } from "zod";
3
+ import { specGetHandler } from "./specTools.js";
4
+ export const NudgeContext = z.object({
5
+ spec_id: z.string(),
6
+ current_phase: z.enum(["planning", "implementation", "testing", "review"]),
7
+ files_changed: z.array(z.string()).optional(),
8
+ complexity: z.enum(["simple", "medium", "complex"]).optional()
9
+ });
10
+ export const NudgeOutput = z.object({
11
+ nudges: z.array(z.object({
12
+ category: z.enum(["testing", "documentation", "security", "performance", "maintainability"]),
13
+ priority: z.enum(["low", "medium", "high"]),
14
+ message: z.string(),
15
+ actionable_steps: z.array(z.string()),
16
+ rationale: z.string()
17
+ })),
18
+ overall_score: z.number().min(0).max(100),
19
+ recommendations: z.array(z.string())
20
+ });
21
+ // Generate clean development nudges based on context
22
+ export async function generateDevelopmentNudges(input) {
23
+ const validated = NudgeContext.parse(input);
24
+ const nudges = [];
25
+ let score = 85; // Start with good baseline
26
+ try {
27
+ // Get SPEC context
28
+ const spec = await specGetHandler({ spec_id: validated.spec_id });
29
+ const hasTestingSection = spec.testing && spec.testing.trim().length > 0;
30
+ const executionLogs = spec.execution_logs || spec.execution_log || [];
31
+ const filesChanged = validated.files_changed || [];
32
+ // Analyze current implementation state
33
+ const hasTestLogs = executionLogs.some((log) => log.action?.includes('test') || log.note?.includes('test'));
34
+ const hasDocumentationUpdate = executionLogs.some((log) => log.files_changed?.some((file) => file.includes('.md') || file.includes('README')));
35
+ const hasSecurityConsiderations = spec.risk_assessment?.toLowerCase().includes('security') ||
36
+ spec.architecture_analysis?.toLowerCase().includes('security');
37
+ // Generate phase-specific nudges
38
+ switch (validated.current_phase) {
39
+ case "planning":
40
+ // Planning phase nudges
41
+ if (!hasTestingSection || spec.testing.length < 100) {
42
+ nudges.push({
43
+ category: "testing",
44
+ priority: "high",
45
+ message: "Consider expanding your testing strategy",
46
+ actionable_steps: [
47
+ "Define unit test coverage targets (aim for 80%+)",
48
+ "Identify integration test scenarios",
49
+ "Plan for edge case testing",
50
+ "Consider end-to-end test requirements"
51
+ ],
52
+ rationale: "A comprehensive testing strategy prevents bugs and improves code quality"
53
+ });
54
+ score -= 10;
55
+ }
56
+ if (!hasSecurityConsiderations) {
57
+ nudges.push({
58
+ category: "security",
59
+ priority: "medium",
60
+ message: "Security considerations should be planned upfront",
61
+ actionable_steps: [
62
+ "Review authentication and authorization requirements",
63
+ "Consider input validation and sanitization",
64
+ "Plan for secure data storage and transmission",
65
+ "Identify potential attack vectors"
66
+ ],
67
+ rationale: "Security by design is more effective than security as an afterthought"
68
+ });
69
+ score -= 8;
70
+ }
71
+ if (validated.complexity === "complex" && !spec.architecture_analysis?.includes("performance")) {
72
+ nudges.push({
73
+ category: "performance",
74
+ priority: "medium",
75
+ message: "Complex features should include performance considerations",
76
+ actionable_steps: [
77
+ "Define performance requirements and benchmarks",
78
+ "Identify potential bottlenecks",
79
+ "Plan for scalability",
80
+ "Consider caching strategies"
81
+ ],
82
+ rationale: "Performance planning prevents costly refactoring later"
83
+ });
84
+ score -= 5;
85
+ }
86
+ break;
87
+ case "implementation":
88
+ // Implementation phase nudges
89
+ if (!hasTestLogs && filesChanged.length > 0) {
90
+ const hasTestFiles = filesChanged.some(file => file.includes('.test.') || file.includes('.spec.') || file.includes('/tests/'));
91
+ if (!hasTestFiles) {
92
+ nudges.push({
93
+ category: "testing",
94
+ priority: "high",
95
+ message: "No test files detected in your changes",
96
+ actionable_steps: [
97
+ "Write unit tests for new functions and components",
98
+ "Add integration tests for API endpoints",
99
+ "Test edge cases and error conditions",
100
+ "Ensure test coverage for critical paths"
101
+ ],
102
+ rationale: "Tests prevent regressions and make refactoring safer"
103
+ });
104
+ score -= 15;
105
+ }
106
+ }
107
+ // Check for documentation updates
108
+ const hasSourceChanges = filesChanged.some(file => file.includes('.ts') || file.includes('.js') || file.includes('.py'));
109
+ if (hasSourceChanges && !hasDocumentationUpdate) {
110
+ nudges.push({
111
+ category: "documentation",
112
+ priority: "medium",
113
+ message: "Code changes should include documentation updates",
114
+ actionable_steps: [
115
+ "Update README if new features were added",
116
+ "Add inline code comments for complex logic",
117
+ "Update API documentation if endpoints changed",
118
+ "Document any new configuration options"
119
+ ],
120
+ rationale: "Good documentation improves maintainability and team collaboration"
121
+ });
122
+ score -= 8;
123
+ }
124
+ // Security-sensitive file changes
125
+ const securitySensitiveFiles = filesChanged.filter(file => file.includes('auth') || file.includes('login') || file.includes('password') ||
126
+ file.includes('token') || file.includes('security') || file.includes('crypto'));
127
+ if (securitySensitiveFiles.length > 0) {
128
+ nudges.push({
129
+ category: "security",
130
+ priority: "high",
131
+ message: "Security-sensitive files detected - extra caution needed",
132
+ actionable_steps: [
133
+ "Review all authentication and authorization logic",
134
+ "Ensure secrets are not hardcoded",
135
+ "Validate all inputs thoroughly",
136
+ "Add security-focused tests",
137
+ "Consider security code review"
138
+ ],
139
+ rationale: "Security vulnerabilities can have serious consequences"
140
+ });
141
+ }
142
+ // Large file changes suggest complexity
143
+ if (filesChanged.length > 10) {
144
+ nudges.push({
145
+ category: "maintainability",
146
+ priority: "medium",
147
+ message: "Large number of file changes detected",
148
+ actionable_steps: [
149
+ "Consider breaking changes into smaller, focused commits",
150
+ "Ensure each change has a clear purpose",
151
+ "Add descriptive commit messages",
152
+ "Consider if any changes should be separate features"
153
+ ],
154
+ rationale: "Smaller, focused changes are easier to review and debug"
155
+ });
156
+ score -= 5;
157
+ }
158
+ break;
159
+ case "testing":
160
+ // Testing phase nudges
161
+ nudges.push({
162
+ category: "testing",
163
+ priority: "high",
164
+ message: "Comprehensive testing checklist",
165
+ actionable_steps: [
166
+ "Run all unit tests and ensure they pass",
167
+ "Test happy path scenarios thoroughly",
168
+ "Test error conditions and edge cases",
169
+ "Verify integration with existing systems",
170
+ "Test with realistic data volumes",
171
+ "Check performance under expected load"
172
+ ],
173
+ rationale: "Thorough testing catches issues before production"
174
+ });
175
+ if (hasSecurityConsiderations) {
176
+ nudges.push({
177
+ category: "security",
178
+ priority: "high",
179
+ message: "Security testing is critical",
180
+ actionable_steps: [
181
+ "Test authentication and authorization",
182
+ "Verify input validation works correctly",
183
+ "Test for common vulnerabilities (XSS, injection, etc.)",
184
+ "Ensure sensitive data is properly protected",
185
+ "Test access controls thoroughly"
186
+ ],
187
+ rationale: "Security bugs can have serious consequences"
188
+ });
189
+ }
190
+ break;
191
+ case "review":
192
+ // Review phase nudges
193
+ nudges.push({
194
+ category: "maintainability",
195
+ priority: "medium",
196
+ message: "Code review best practices",
197
+ actionable_steps: [
198
+ "Review code for clarity and readability",
199
+ "Check for consistent coding style",
200
+ "Verify proper error handling",
201
+ "Ensure code follows project conventions",
202
+ "Look for potential performance issues",
203
+ "Check for security vulnerabilities"
204
+ ],
205
+ rationale: "Code review catches issues and improves code quality"
206
+ });
207
+ if (!hasDocumentationUpdate && filesChanged.length > 0) {
208
+ nudges.push({
209
+ category: "documentation",
210
+ priority: "medium",
211
+ message: "Documentation review needed",
212
+ actionable_steps: [
213
+ "Verify all public APIs are documented",
214
+ "Check that README is up to date",
215
+ "Ensure complex logic has comments",
216
+ "Validate any architectural documentation"
217
+ ],
218
+ rationale: "Good documentation is essential for long-term maintainability"
219
+ });
220
+ }
221
+ break;
222
+ }
223
+ // General best practice nudges
224
+ if (validated.complexity === "complex" && nudges.filter(n => n.category === "maintainability").length === 0) {
225
+ nudges.push({
226
+ category: "maintainability",
227
+ priority: "medium",
228
+ message: "Complex features benefit from extra maintainability focus",
229
+ actionable_steps: [
230
+ "Break down large functions into smaller, focused ones",
231
+ "Use clear, descriptive variable and function names",
232
+ "Add comments explaining business logic",
233
+ "Consider using design patterns for clarity",
234
+ "Ensure code is modular and testable"
235
+ ],
236
+ rationale: "Complex code needs extra attention to remain maintainable"
237
+ });
238
+ }
239
+ // Generate overall recommendations
240
+ const recommendations = [];
241
+ if (nudges.some(n => n.category === "testing" && n.priority === "high")) {
242
+ recommendations.push("Prioritize testing - it's the foundation of reliable software");
243
+ }
244
+ if (nudges.some(n => n.category === "security")) {
245
+ recommendations.push("Address security considerations early to avoid vulnerabilities");
246
+ }
247
+ if (nudges.some(n => n.category === "documentation")) {
248
+ recommendations.push("Keep documentation updated - your future self will thank you");
249
+ }
250
+ if (score >= 90) {
251
+ recommendations.push("Excellent development practices! Keep up the good work.");
252
+ }
253
+ else if (score >= 75) {
254
+ recommendations.push("Good development practices with room for improvement.");
255
+ }
256
+ else {
257
+ recommendations.push("Consider addressing the highlighted areas to improve code quality.");
258
+ }
259
+ return {
260
+ nudges,
261
+ overall_score: Math.max(0, Math.min(100, score)),
262
+ recommendations
263
+ };
264
+ }
265
+ catch (error) {
266
+ // Fallback nudges if SPEC loading fails
267
+ return {
268
+ nudges: [{
269
+ category: "maintainability",
270
+ priority: "medium",
271
+ message: "Follow clean development practices",
272
+ actionable_steps: [
273
+ "Write clean, readable code",
274
+ "Add appropriate tests",
275
+ "Keep documentation updated",
276
+ "Consider security implications"
277
+ ],
278
+ rationale: "Good practices lead to better software"
279
+ }],
280
+ overall_score: 75,
281
+ recommendations: ["Focus on code quality and testing"]
282
+ };
283
+ }
284
+ }
285
+ // Get nudges for specific file types
286
+ export function getFileTypeNudges(filePath) {
287
+ const nudges = [];
288
+ if (filePath.includes('.env') || filePath.includes('config')) {
289
+ nudges.push("🔒 Ensure no sensitive data is committed to version control");
290
+ nudges.push("📝 Document any new configuration options");
291
+ }
292
+ if (filePath.includes('.test.') || filePath.includes('.spec.')) {
293
+ nudges.push("✅ Great job adding tests!");
294
+ nudges.push("🎯 Ensure tests cover edge cases and error conditions");
295
+ }
296
+ if (filePath.includes('auth') || filePath.includes('login') || filePath.includes('security')) {
297
+ nudges.push("🛡️ Extra security review required for authentication code");
298
+ nudges.push("🔍 Validate all inputs and sanitize outputs");
299
+ }
300
+ if (filePath.includes('api') || filePath.includes('endpoint')) {
301
+ nudges.push("📊 Consider rate limiting and validation");
302
+ nudges.push("📚 Update API documentation if endpoints changed");
303
+ }
304
+ if (filePath.includes('database') || filePath.includes('migration')) {
305
+ nudges.push("💾 Backup considerations for database changes");
306
+ nudges.push("🔄 Ensure migrations are reversible");
307
+ }
308
+ return nudges;
309
+ }
310
+ // Integration with workflow phases
311
+ export async function suggestNextSteps(spec_id, current_phase) {
312
+ try {
313
+ const nudges = await generateDevelopmentNudges({
314
+ spec_id,
315
+ current_phase: current_phase
316
+ });
317
+ const nextSteps = [];
318
+ // Extract actionable steps from high-priority nudges
319
+ nudges.nudges
320
+ .filter(nudge => nudge.priority === "high")
321
+ .forEach(nudge => {
322
+ nextSteps.push(`${nudge.message}:`);
323
+ nudge.actionable_steps.forEach(step => {
324
+ nextSteps.push(` • ${step}`);
325
+ });
326
+ });
327
+ if (nextSteps.length === 0) {
328
+ nextSteps.push("✅ No critical issues detected - good development practices!");
329
+ }
330
+ return nextSteps;
331
+ }
332
+ catch (error) {
333
+ return ["Continue with clean development practices and thorough testing"];
334
+ }
335
+ }
336
+ //# sourceMappingURL=developmentNudges.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"developmentNudges.js","sourceRoot":"","sources":["../../src/tools/developmentNudges.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;I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