bobs-workshop 0.3.3 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +2 -2
- package/README.md +199 -210
- package/bin/bobs-workshop.js +109 -0
- package/config/agents.json +27 -0
- package/dist/plugins/bobs-workshop.js +34 -0
- package/dist/tools/background-agent/cancel.d.ts +3 -0
- package/dist/tools/background-agent/cancel.d.ts.map +1 -0
- package/dist/tools/background-agent/cancel.js +52 -0
- package/dist/tools/background-agent/concurrency.d.ts +15 -0
- package/dist/tools/background-agent/concurrency.d.ts.map +1 -0
- package/dist/tools/background-agent/concurrency.js +61 -0
- package/dist/tools/background-agent/index.d.ts +8 -0
- package/dist/tools/background-agent/index.d.ts.map +1 -0
- package/dist/tools/background-agent/index.js +7 -0
- package/dist/tools/background-agent/launch.d.ts +6 -0
- package/dist/tools/background-agent/launch.d.ts.map +1 -0
- package/dist/tools/background-agent/launch.js +33 -0
- package/dist/tools/background-agent/list.d.ts +7 -0
- package/dist/tools/background-agent/list.d.ts.map +1 -0
- package/dist/tools/background-agent/list.js +40 -0
- package/dist/tools/background-agent/manager.d.ts +29 -0
- package/dist/tools/background-agent/manager.d.ts.map +1 -0
- package/dist/tools/background-agent/manager.js +388 -0
- package/dist/tools/background-agent/output.d.ts +3 -0
- package/dist/tools/background-agent/output.d.ts.map +1 -0
- package/dist/tools/background-agent/output.js +41 -0
- package/dist/tools/background-agent/types.d.ts +46 -0
- package/dist/tools/background-agent/types.d.ts.map +1 -0
- package/dist/tools/background-agent/types.js +1 -0
- package/dist/tools/index.d.ts +9 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +8 -0
- package/dist/tools/manual/index.d.ts +3 -0
- package/dist/tools/manual/index.d.ts.map +1 -0
- package/dist/tools/manual/index.js +2 -0
- package/dist/tools/manual/manual-update.d.ts +4 -0
- package/dist/tools/manual/manual-update.d.ts.map +1 -0
- package/dist/tools/manual/manual-update.js +190 -0
- package/dist/tools/manual/verify-manual.d.ts +4 -0
- package/dist/tools/manual/verify-manual.d.ts.map +1 -0
- package/dist/tools/manual/verify-manual.js +51 -0
- package/package.json +34 -66
- package/postinstall.js +193 -0
- package/src/agents/alice.md +466 -0
- package/src/agents/bob-rev.md +493 -0
- package/src/agents/bob-send.md +277 -0
- package/src/agents/bob.md +442 -0
- package/src/agents/trace.md +451 -0
- package/src/plugins/bobs-workshop.ts +45 -0
- package/src/skills/api-patterns/SKILL.md +376 -0
- package/src/skills/architecture/SKILL.md +271 -0
- package/src/skills/bobs-workshop/performance/icon.svg +3 -0
- package/src/skills/brainstorming/SKILL.md +210 -0
- package/src/skills/clean-code/SKILL.md +151 -0
- package/src/skills/code-review-checklist/SKILL.md +220 -0
- package/src/skills/database-design/SKILL.md +271 -0
- package/src/skills/exploration/SKILL.md +257 -0
- package/src/skills/frontend-ui-ux/SKILL.md +78 -0
- package/src/skills/git-master/SKILL.md +1105 -0
- package/src/skills/performance/SKILL.md +144 -0
- package/src/skills/performance/icon.svg +3 -0
- package/src/skills/plan-writing/SKILL.md +225 -0
- package/src/skills/security/SKILL.md +410 -0
- package/src/skills/simplification/SKILL.md +238 -0
- package/src/skills/systematic-debugging/SKILL.md +175 -0
- package/src/skills/testing-patterns/SKILL.md +305 -0
- package/src/skills/verification/SKILL.md +286 -0
- package/src/tools/background-agent/cancel.ts +67 -0
- package/src/tools/background-agent/concurrency.ts +71 -0
- package/src/tools/background-agent/index.ts +7 -0
- package/src/tools/background-agent/launch.ts +39 -0
- package/src/tools/background-agent/list.ts +50 -0
- package/src/tools/background-agent/manager.ts +466 -0
- package/src/tools/background-agent/output.ts +57 -0
- package/src/tools/background-agent/types.ts +55 -0
- package/src/tools/index.ts +8 -0
- package/src/tools/manual/index.ts +2 -0
- package/src/tools/manual/manual-update.ts +197 -0
- package/src/tools/manual/verify-manual.ts +60 -0
- package/uninstall.js +64 -0
- package/Claude.md +0 -162
- package/bin/bobs-mcp-server.js +0 -11
- package/bin/bobs-mcp.js +0 -130
- package/dist/api/taskLogger.js +0 -106
- package/dist/api/taskLogger.js.map +0 -1
- package/dist/cli/checker.js +0 -401
- package/dist/cli/checker.js.map +0 -1
- package/dist/cli/cleanup.js +0 -131
- package/dist/cli/cleanup.js.map +0 -1
- package/dist/cli/debug.js +0 -157
- package/dist/cli/debug.js.map +0 -1
- package/dist/cli/health.js +0 -97
- package/dist/cli/health.js.map +0 -1
- package/dist/cli/setup.js +0 -81
- package/dist/cli/setup.js.map +0 -1
- package/dist/cli/workshop.js +0 -42
- package/dist/cli/workshop.js.map +0 -1
- package/dist/dashboard/server.js +0 -1203
- package/dist/dashboard/server.js.map +0 -1
- package/dist/index.js +0 -960
- package/dist/index.js.map +0 -1
- package/dist/prompts/architect.js +0 -221
- package/dist/prompts/architect.js.map +0 -1
- package/dist/prompts/debugger.js +0 -257
- package/dist/prompts/debugger.js.map +0 -1
- package/dist/prompts/engineer.js +0 -249
- package/dist/prompts/engineer.js.map +0 -1
- package/dist/prompts/orchestrator.js +0 -304
- package/dist/prompts/orchestrator.js.map +0 -1
- package/dist/prompts/reviewer.js +0 -289
- package/dist/prompts/reviewer.js.map +0 -1
- package/dist/services/activitySummarizer.js +0 -388
- package/dist/services/activitySummarizer.js.map +0 -1
- package/dist/services/changeValidator.js +0 -396
- package/dist/services/changeValidator.js.map +0 -1
- package/dist/services/claudeOrchestrator.js +0 -343
- package/dist/services/claudeOrchestrator.js.map +0 -1
- package/dist/services/fileMonitor.js +0 -250
- package/dist/services/fileMonitor.js.map +0 -1
- package/dist/services/implementationSummarizer.js +0 -306
- package/dist/services/implementationSummarizer.js.map +0 -1
- package/dist/services/liveMonitor.js +0 -315
- package/dist/services/liveMonitor.js.map +0 -1
- package/dist/services/mcpAuditLogger.js +0 -104
- package/dist/services/mcpAuditLogger.js.map +0 -1
- package/dist/services/mcpLogger.js +0 -223
- package/dist/services/mcpLogger.js.map +0 -1
- package/dist/services/tmuxManager.js +0 -541
- package/dist/services/tmuxManager.js.map +0 -1
- package/dist/tools/approvalTools.js +0 -244
- package/dist/tools/approvalTools.js.map +0 -1
- package/dist/tools/autoDebugger.js +0 -147
- package/dist/tools/autoDebugger.js.map +0 -1
- package/dist/tools/cleanupService.js +0 -221
- package/dist/tools/cleanupService.js.map +0 -1
- package/dist/tools/dashboardTools.js +0 -342
- package/dist/tools/dashboardTools.js.map +0 -1
- package/dist/tools/developmentNudges.js +0 -336
- package/dist/tools/developmentNudges.js.map +0 -1
- package/dist/tools/gitTools.js +0 -741
- package/dist/tools/gitTools.js.map +0 -1
- package/dist/tools/orchestratorTools.js +0 -832
- package/dist/tools/orchestratorTools.js.map +0 -1
- package/dist/tools/searchCache.js +0 -64
- package/dist/tools/searchCache.js.map +0 -1
- package/dist/tools/searchTools.js +0 -1107
- package/dist/tools/searchTools.js.map +0 -1
- package/dist/tools/semgrep-patterns.js +0 -296
- package/dist/tools/semgrep-patterns.js.map +0 -1
- package/dist/tools/specTools.js +0 -332
- package/dist/tools/specTools.js.map +0 -1
- package/dist/tools/structural/__tests__/orchestrator.test.js +0 -61
- package/dist/tools/structural/__tests__/orchestrator.test.js.map +0 -1
- package/dist/tools/structural/cache.js +0 -226
- package/dist/tools/structural/cache.js.map +0 -1
- package/dist/tools/structural/engines/python/index.js +0 -118
- package/dist/tools/structural/engines/python/index.js.map +0 -1
- package/dist/tools/structural/engines/typescript/__tests__/typescript-engine.test.js +0 -97
- package/dist/tools/structural/engines/typescript/__tests__/typescript-engine.test.js.map +0 -1
- package/dist/tools/structural/engines/typescript/analyzer.js +0 -433
- package/dist/tools/structural/engines/typescript/analyzer.js.map +0 -1
- package/dist/tools/structural/engines/typescript/index.js +0 -381
- package/dist/tools/structural/engines/typescript/index.js.map +0 -1
- package/dist/tools/structural/engines/typescript/utils.js +0 -279
- package/dist/tools/structural/engines/typescript/utils.js.map +0 -1
- package/dist/tools/structural/index.js +0 -248
- package/dist/tools/structural/index.js.map +0 -1
- package/dist/tools/structural/types.js +0 -18
- package/dist/tools/structural/types.js.map +0 -1
- package/dist/tools/tmuxTools.js +0 -100
- package/dist/tools/tmuxTools.js.map +0 -1
- package/dist/tools/workRecorder.js +0 -215
- package/dist/tools/workRecorder.js.map +0 -1
- package/dist/tools/worktreeTools.js +0 -705
- package/dist/tools/worktreeTools.js.map +0 -1
- package/dist/utils/__tests__/integration.test.js +0 -57
- package/dist/utils/__tests__/integration.test.js.map +0 -1
- package/dist/utils/__tests__/serverDetection.test.js +0 -151
- package/dist/utils/__tests__/serverDetection.test.js.map +0 -1
- package/dist/utils/errorHandling.js +0 -336
- package/dist/utils/errorHandling.js.map +0 -1
- package/dist/utils/processManager.js +0 -172
- package/dist/utils/processManager.js.map +0 -1
- package/dist/utils/reliability.js +0 -263
- package/dist/utils/reliability.js.map +0 -1
- package/dist/utils/responseFormatter.js +0 -250
- package/dist/utils/responseFormatter.js.map +0 -1
- package/dist/utils/serverDetection.js +0 -133
- package/dist/utils/serverDetection.js.map +0 -1
- package/dist/utils/specMigration.js +0 -105
- package/dist/utils/specMigration.js.map +0 -1
- package/dist/validation/schemas.js +0 -299
- package/dist/validation/schemas.js.map +0 -1
- package/public/.well-known/mcp/manifest.json +0 -473
- package/public/index.html +0 -3157
- package/public/index.html.backup +0 -2805
- package/public/index.html.backup2 +0 -1292
- package/scripts/cleanup-system-logs.ts +0 -121
- package/scripts/init-workspace.js +0 -63
- package/scripts/install-search-tools.js +0 -116
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
|
|
3
|
+
const MANUAL_TEMPLATE = `# 📘 MANUAL: [Feature Name]
|
|
4
|
+
|
|
5
|
+
> Created: MAN-YYMMDD-[feature-name].md
|
|
6
|
+
|
|
7
|
+
## 📊 Executive Summary
|
|
8
|
+
|
|
9
|
+
High-level overview of what we're building and why.
|
|
10
|
+
|
|
11
|
+
**Example:**
|
|
12
|
+
- What problem does this solve?
|
|
13
|
+
- Who are the users?
|
|
14
|
+
- What's the success criteria?
|
|
15
|
+
- What are the core features?
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 📝 Product Specifications
|
|
20
|
+
|
|
21
|
+
Detailed requirements and acceptance criteria.
|
|
22
|
+
|
|
23
|
+
**Example:**
|
|
24
|
+
- User stories / Use cases
|
|
25
|
+
- Functional requirements
|
|
26
|
+
- Non-functional requirements (performance, security, etc.)
|
|
27
|
+
- Edge cases and error handling
|
|
28
|
+
- Success metrics
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## 🏗️ Architecture Analysis
|
|
33
|
+
|
|
34
|
+
Technical design decisions and system architecture.
|
|
35
|
+
|
|
36
|
+
**Example:**
|
|
37
|
+
- System diagram / architecture overview
|
|
38
|
+
- Data models and schemas
|
|
39
|
+
- API endpoints and contracts
|
|
40
|
+
- Database design (indexes, relationships)
|
|
41
|
+
- Authentication/authorization approach
|
|
42
|
+
- Technology choices and trade-offs
|
|
43
|
+
- Security considerations
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 🚀 Implementation Plan
|
|
48
|
+
|
|
49
|
+
Breakdown of tasks with dependencies.
|
|
50
|
+
|
|
51
|
+
**Example:**
|
|
52
|
+
1. Setup and scaffolding
|
|
53
|
+
2. Database schema migrations
|
|
54
|
+
3. Core business logic
|
|
55
|
+
4. API endpoint implementation
|
|
56
|
+
5. Frontend components
|
|
57
|
+
6. Integration testing
|
|
58
|
+
7. Documentation
|
|
59
|
+
|
|
60
|
+
Mark completed tasks with ✅, in-progress with 🔄, blocked with 🚫
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## 📈 Execution Logs
|
|
65
|
+
|
|
66
|
+
Chronological progress as tasks are completed.
|
|
67
|
+
|
|
68
|
+
**Format:**
|
|
69
|
+
\`\`\`
|
|
70
|
+
[YYYY-MM-DD HH:MM] - Agent: task description
|
|
71
|
+
- Output: results / artifacts
|
|
72
|
+
- Files modified: list of files
|
|
73
|
+
- Dependencies: what blocked this or what it enables
|
|
74
|
+
\`\`\`
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## 🔍 Review Notes
|
|
79
|
+
|
|
80
|
+
Findings from code reviews, architectural reviews, or peer reviews.
|
|
81
|
+
|
|
82
|
+
**Example:**
|
|
83
|
+
- Code quality observations
|
|
84
|
+
- Performance concerns
|
|
85
|
+
- Security vulnerabilities
|
|
86
|
+
- Suggestions for improvements
|
|
87
|
+
- Action items from reviews
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## 🐛 Debug Logs
|
|
92
|
+
|
|
93
|
+
Troubleshooting sessions and root cause analysis.
|
|
94
|
+
|
|
95
|
+
**Format:**
|
|
96
|
+
\`\`\`
|
|
97
|
+
[YYYY-MM-DD HH:MM] - Issue description
|
|
98
|
+
- Symptoms: what went wrong
|
|
99
|
+
- Investigation: steps taken
|
|
100
|
+
- Root cause: underlying problem
|
|
101
|
+
- Resolution: fix applied
|
|
102
|
+
- Prevention: how to avoid recurrence
|
|
103
|
+
\`\`\`
|
|
104
|
+
|
|
105
|
+
---
|
|
106
|
+
|
|
107
|
+
## ✅ Verification Logs
|
|
108
|
+
|
|
109
|
+
Test results and quality assurance checks.
|
|
110
|
+
|
|
111
|
+
**Example:**
|
|
112
|
+
- Unit test results
|
|
113
|
+
- Integration test results
|
|
114
|
+
- E2E test results
|
|
115
|
+
- Performance benchmarks
|
|
116
|
+
- Security scan results
|
|
117
|
+
- Manual QA checklists
|
|
118
|
+
|
|
119
|
+
Each verification should include:
|
|
120
|
+
- PASS/FAIL status
|
|
121
|
+
- Evidence (screenshots, logs, metrics)
|
|
122
|
+
- Coverage percentage
|
|
123
|
+
- Blockers for release
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🤝 Agent Handoffs
|
|
128
|
+
|
|
129
|
+
Context transfers between different agents.
|
|
130
|
+
|
|
131
|
+
**Format:**
|
|
132
|
+
\`\`\`
|
|
133
|
+
[YYYY-MM-DD HH:MM] - alice → bob
|
|
134
|
+
- Context: architectural decisions, design docs
|
|
135
|
+
- Artifacts: MAN-xxx.md, schema.sql
|
|
136
|
+
- Next steps: implement authentication flow
|
|
137
|
+
\`\`\`
|
|
138
|
+
|
|
139
|
+
This ensures smooth handoffs between agents and maintains continuity across sessions.
|
|
140
|
+
`;
|
|
141
|
+
|
|
142
|
+
const ManualUpdateTool: ToolDefinition = tool({
|
|
143
|
+
description: "Update a specific section in a MANUAL file. Creates file/section if missing.",
|
|
144
|
+
args: {
|
|
145
|
+
manual_path: tool.schema.string().describe("Path to MANUAL file (e.g., manuals/MAN-260127-auth.md)"),
|
|
146
|
+
section: tool.schema.string().describe("Section header to update (e.g., '📊 Executive Summary', '📈 Execution Logs')"),
|
|
147
|
+
content: tool.schema.string().describe("Content to append to the section"),
|
|
148
|
+
create_if_missing: tool.schema.boolean().default(true)
|
|
149
|
+
.describe("Create section if it doesn't exist (default: true)"),
|
|
150
|
+
},
|
|
151
|
+
async execute(args) {
|
|
152
|
+
const { readFileSync, writeFileSync, existsSync, mkdirSync } = await import("node:fs");
|
|
153
|
+
const { dirname } = await import("node:path");
|
|
154
|
+
|
|
155
|
+
const manualPath = args.manual_path;
|
|
156
|
+
|
|
157
|
+
if (!manualPath.match(/^manuals\/MAN-\d{6}-.+\.md$/)) {
|
|
158
|
+
return `❌ Invalid path. Expected format: manuals/MAN-YYMMDD-<feature>.md`;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const manualsDir = dirname(manualPath);
|
|
162
|
+
if (!existsSync(manualsDir)) {
|
|
163
|
+
mkdirSync(manualsDir, { recursive: true });
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
let content = "";
|
|
167
|
+
if (existsSync(manualPath)) {
|
|
168
|
+
content = readFileSync(manualPath, "utf8");
|
|
169
|
+
} else {
|
|
170
|
+
content = MANUAL_TEMPLATE;
|
|
171
|
+
writeFileSync(manualPath, content, "utf8");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
const lines = content.split('\n');
|
|
175
|
+
let sectionIndex = lines.findIndex(l => l.trim() === args.section);
|
|
176
|
+
|
|
177
|
+
if (sectionIndex === -1) {
|
|
178
|
+
if (!args.create_if_missing) {
|
|
179
|
+
return `❌ Section '${args.section}' not found in ${manualPath}`;
|
|
180
|
+
}
|
|
181
|
+
content = `${content}\n${args.section}\n${args.content}\n`;
|
|
182
|
+
} else {
|
|
183
|
+
const insertPosition = sectionIndex + 1;
|
|
184
|
+
if (lines[insertPosition] && !lines[insertPosition].startsWith('##')) {
|
|
185
|
+
lines[insertPosition] = `${lines[insertPosition]}\n${args.content}`;
|
|
186
|
+
} else {
|
|
187
|
+
lines.splice(insertPosition, 0, args.content);
|
|
188
|
+
}
|
|
189
|
+
content = lines.join('\n');
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
writeFileSync(manualPath, content, "utf8");
|
|
193
|
+
return `✅ Updated section '${args.section}' in ${manualPath}`;
|
|
194
|
+
},
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
export default ManualUpdateTool;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { tool, type ToolDefinition } from "@opencode-ai/plugin/tool";
|
|
2
|
+
|
|
3
|
+
const VerifyManualTool: ToolDefinition = tool({
|
|
4
|
+
description: "Run bob-rev verification in background for a MANUAL",
|
|
5
|
+
args: {
|
|
6
|
+
manual_path: tool.schema.string().describe("Path to MANUAL file (e.g., manuals/MAN-260127-auth.md)"),
|
|
7
|
+
},
|
|
8
|
+
async execute(args, context) {
|
|
9
|
+
const { client, directory, sessionID } = context as unknown as { client: unknown; directory: string; sessionID: string };
|
|
10
|
+
|
|
11
|
+
const createResult = await (client as { session: { create: (args: unknown) => Promise<unknown> } }).session.create({
|
|
12
|
+
body: {
|
|
13
|
+
parentID: sessionID,
|
|
14
|
+
title: `Verification: ${args.manual_path.split('/').pop()}`,
|
|
15
|
+
},
|
|
16
|
+
query: { directory },
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const createData = createResult as { data: { id: string }; error?: string };
|
|
20
|
+
if (createData.error) {
|
|
21
|
+
throw new Error(`Failed to create verification session: ${createData.error}`);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const { readFileSync, existsSync } = await import("node:fs");
|
|
25
|
+
const { join } = await import("node:path");
|
|
26
|
+
|
|
27
|
+
let manualContent = "";
|
|
28
|
+
if (existsSync(args.manual_path)) {
|
|
29
|
+
manualContent = readFileSync(args.manual_path, "utf8");
|
|
30
|
+
// Sanitize content to prevent JSON parsing issues with kimi model
|
|
31
|
+
manualContent = manualContent
|
|
32
|
+
.replace(/[\x00-\x08\x0B-\x0C\x0E-\x1F]/g, '') // Remove control chars except \n, \r, \t
|
|
33
|
+
.replace(/\u2028/g, '\n') // Replace line separator with newline
|
|
34
|
+
.replace(/\u2029/g, '\n'); // Replace paragraph separator with newline
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const skillPath = join(directory, ".opencode", "agent", "bobs-workshop", "bob-rev.md");
|
|
38
|
+
let agentPrompt = "You are bob-rev, a reviewer agent that verifies implementation against MANUAL requirements.";
|
|
39
|
+
if (existsSync(skillPath)) {
|
|
40
|
+
agentPrompt = readFileSync(skillPath, "utf8");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
await (client as { session: { prompt: (args: unknown) => Promise<unknown> } }).session.prompt({
|
|
44
|
+
path: { id: createData.data.id },
|
|
45
|
+
body: {
|
|
46
|
+
agent: "bob-rev",
|
|
47
|
+
system: `${agentPrompt}\n\n## MANUAL to Verify:\n${manualContent}`,
|
|
48
|
+
tools: {
|
|
49
|
+
task: false,
|
|
50
|
+
delegate_task: false,
|
|
51
|
+
},
|
|
52
|
+
parts: [{ type: "text", text: "Verify this MANUAL and provide PASS/FAIL decision with reasoning." }],
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
return `✅ Started verification for ${args.manual_path} in session ${createData.data.id}`;
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export default VerifyManualTool;
|
package/uninstall.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { readFileSync, writeFileSync, existsSync, rmSync } from 'fs';
|
|
2
|
+
import { join } from 'path';
|
|
3
|
+
import jsonc, { parse } from 'jsonc-parser';
|
|
4
|
+
|
|
5
|
+
function uninstall() {
|
|
6
|
+
const projectRoot = process.cwd();
|
|
7
|
+
const opencodeDir = join(projectRoot, '.opencode');
|
|
8
|
+
|
|
9
|
+
console.log('🗑️ Uninstalling bobs-workshop...');
|
|
10
|
+
|
|
11
|
+
const skillNames = ['architecture', 'exploration', 'api-patterns',
|
|
12
|
+
'brainstorming', 'clean-code', 'code-review-checklist',
|
|
13
|
+
'database-design', 'frontend-ui-ux', 'git-master',
|
|
14
|
+
'performance', 'plan-writing', 'security', 'simplification',
|
|
15
|
+
'systematic-debugging', 'testing-patterns', 'verification'];
|
|
16
|
+
|
|
17
|
+
const dirsToRemove = [
|
|
18
|
+
join(opencodeDir, 'plugins/bobs-workshop'),
|
|
19
|
+
join(opencodeDir, 'tools/bobs-workshop'),
|
|
20
|
+
...skillNames.map(s => join(opencodeDir, 'skills', s))
|
|
21
|
+
];
|
|
22
|
+
|
|
23
|
+
dirsToRemove.forEach(dir => {
|
|
24
|
+
if (existsSync(dir)) {
|
|
25
|
+
rmSync(dir, { recursive: true, force: true });
|
|
26
|
+
console.log(`🗑️ Removed: ${dir}`);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
const configPath = join(opencodeDir, 'opencode.jsonc');
|
|
31
|
+
if (existsSync(configPath)) {
|
|
32
|
+
try {
|
|
33
|
+
const config = parse(readFileSync(configPath, 'utf8'));
|
|
34
|
+
const agentNames = ['alice', 'bob', 'bob-eng', 'bob-rev', 'trace', 'bob-send'];
|
|
35
|
+
|
|
36
|
+
if (config.agent) {
|
|
37
|
+
let removedCount = 0;
|
|
38
|
+
agentNames.forEach(name => {
|
|
39
|
+
if (config.agent[name]) {
|
|
40
|
+
delete config.agent[name];
|
|
41
|
+
console.log(`🗑️ Removed agent config: ${name}`);
|
|
42
|
+
removedCount++;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
if (removedCount > 0) {
|
|
47
|
+
const newConfig = JSON.stringify(config, null, 2);
|
|
48
|
+
writeFileSync(configPath, newConfig);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
} catch (err) {
|
|
52
|
+
console.warn(`⚠️ Could not update opencode.jsonc: ${err.message}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.log('✅ bobs-workshop uninstalled successfully!');
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
try {
|
|
60
|
+
uninstall();
|
|
61
|
+
} catch (error) {
|
|
62
|
+
console.error('❌ Uninstallation failed:', error.message);
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
package/Claude.md
DELETED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
# Bob's Workshop - Claude Code Integration Guide
|
|
2
|
-
|
|
3
|
-
## Critical: How Bob's Workshop Works
|
|
4
|
-
|
|
5
|
-
**You (Claude Code) ARE the orchestrator** - there is NO separate orchestrator service. When you use Bob's tools, YOU execute the workflow steps directly.
|
|
6
|
-
|
|
7
|
-
### Execution Model
|
|
8
|
-
|
|
9
|
-
1. **Mode Switching**: When `bob.workshop` classifies a problem, YOU switch modes within the same conversation:
|
|
10
|
-
- orchestrator → architect → engineer → debugger → reviewer
|
|
11
|
-
|
|
12
|
-
2. **Direct Execution**: When you "switch to architect mode", YOU read the ARCHITECT_PROMPT and execute those steps. There is NO delegation.
|
|
13
|
-
|
|
14
|
-
3. **Tool Preference**: When working in Bob mode, **ALWAYS prefer Bob's MCP tools** over native Claude Code tools:
|
|
15
|
-
- Use `bob.code.search` instead of `Grep` or `Glob`
|
|
16
|
-
- Use `bob.workflow.start` instead of manual git operations
|
|
17
|
-
- Use `bob.manual.update` instead of creating separate markdown files
|
|
18
|
-
|
|
19
|
-
### The MANUAL: Single Source of Truth
|
|
20
|
-
|
|
21
|
-
**CRITICAL RULE**: DO NOT create separate markdown files for documentation or progress tracking.
|
|
22
|
-
|
|
23
|
-
- All specifications, logs, and progress MUST be stored in `.bob/specs/SPEC-*.json` files
|
|
24
|
-
- Use `bob.manual.update` with `execution_log` or `debug_log` parameters
|
|
25
|
-
- The dashboard reads directly from SPEC files - no separate updates needed
|
|
26
|
-
|
|
27
|
-
### Mode-Specific Tool Usage
|
|
28
|
-
|
|
29
|
-
**Architect Mode**:
|
|
30
|
-
- `bob.workflow.start` - Creates manual + worktree + launches dashboard
|
|
31
|
-
- `bob.manual.update` - Populates spec sections
|
|
32
|
-
- `bob.code.search` with `phase=architect` - Architecture analysis
|
|
33
|
-
|
|
34
|
-
**Engineer Mode**:
|
|
35
|
-
- `bob.manual.update` with `execution_log` - Log task completion
|
|
36
|
-
- `bob.code.search` with `phase=engineer` - Symbol lookups
|
|
37
|
-
- `bob.workflow.deploy` - Commit, merge, cleanup
|
|
38
|
-
|
|
39
|
-
**Debugger Mode**:
|
|
40
|
-
- `bob.manual.update` with `debug_log` - Log findings
|
|
41
|
-
- `bob.code.search` with `phase=debugger` - Security analysis
|
|
42
|
-
- `bob.worktree.debug` - Fix worktree issues
|
|
43
|
-
|
|
44
|
-
**Reviewer Mode**:
|
|
45
|
-
- `bob.validate_changes` - Check compliance
|
|
46
|
-
- `bob.summarize_implementation` - Generate summaries
|
|
47
|
-
- `bob.code.search` with `phase=reviewer` - Quality analysis
|
|
48
|
-
|
|
49
|
-
### Code Search Best Practices
|
|
50
|
-
|
|
51
|
-
Always use `bob.code.search` with the `phase` parameter:
|
|
52
|
-
|
|
53
|
-
```javascript
|
|
54
|
-
// ❌ WRONG - Using native Claude Code tools
|
|
55
|
-
Grep("pattern", { output_mode: "content" })
|
|
56
|
-
|
|
57
|
-
// ✅ CORRECT - Using Bob's tools (default: 30 ranked results)
|
|
58
|
-
bob.code.search({
|
|
59
|
-
query: "pattern",
|
|
60
|
-
phase: "engineer", // architect | engineer | debugger | reviewer
|
|
61
|
-
mode: "auto" // auto | semantic | lexical | structural
|
|
62
|
-
})
|
|
63
|
-
|
|
64
|
-
// ✅ STRUCTURAL SEARCH - AST-based symbol analysis (TypeScript/JavaScript)
|
|
65
|
-
bob.code.search({
|
|
66
|
-
query: "find references to UserService", // Auto-routes to structural mode
|
|
67
|
-
phase: "engineer",
|
|
68
|
-
mode: "auto"
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
bob.code.search({
|
|
72
|
-
query: "show dependencies for src/api/auth.ts", // Dependency analysis
|
|
73
|
-
phase: "architect",
|
|
74
|
-
mode: "auto"
|
|
75
|
-
})
|
|
76
|
-
|
|
77
|
-
bob.code.search({
|
|
78
|
-
query: "find circular dependencies", // Architecture health check
|
|
79
|
-
phase: "architect",
|
|
80
|
-
mode: "auto"
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
bob.code.search({
|
|
84
|
-
query: "find unused exports", // Code cleanup
|
|
85
|
-
phase: "engineer",
|
|
86
|
-
mode: "auto"
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
// ✅ SEMANTIC SEARCH - Multi-word conceptual queries
|
|
90
|
-
bob.code.search({
|
|
91
|
-
query: "authentication user session management", // 3+ words auto-routes to semantic
|
|
92
|
-
phase: "architect",
|
|
93
|
-
mode: "auto"
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
// ✅ FOR DEBUGGING - Verbose mode includes full result arrays
|
|
97
|
-
bob.code.search({
|
|
98
|
-
query: "pattern",
|
|
99
|
-
phase: "engineer",
|
|
100
|
-
verbose: true // Increases token usage but useful for debugging
|
|
101
|
-
})
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Search Configuration:**
|
|
105
|
-
- **Default limits**: 30 results, 5 matches per file (optimized for token efficiency)
|
|
106
|
-
- **Relevance ranking**: Results sorted by file priority (src/ > lib/ > test/), semantic boost, git recency
|
|
107
|
-
- **Token efficiency**: ~70-80% reduction vs previous version (3-5k tokens vs 15-20k)
|
|
108
|
-
- **Output format**: Scored `results` array with relevance scores
|
|
109
|
-
|
|
110
|
-
**Query Pattern Notes:**
|
|
111
|
-
- **Structural queries**: Patterns like "find references to X", "show dependencies", "find circular dependencies" auto-route to AST-based analysis (TypeScript/JavaScript only)
|
|
112
|
-
- **Single/two words**: Treated as lexical patterns (exact match or regex)
|
|
113
|
-
- **Three or more words**: Automatically routed to semantic search in auto mode for architect/debugger/reviewer phases
|
|
114
|
-
- **Semantic search unavailable**: Falls back to lexical OR search (matches any word)
|
|
115
|
-
- **Force modes**: Use `mode: "lexical"`, `mode: "semantic"`, or `mode: "structural"` for explicit routing
|
|
116
|
-
|
|
117
|
-
**Advanced Options:**
|
|
118
|
-
- `maxHits`: Override default 30 (e.g., maxHits: 50 for broader search)
|
|
119
|
-
- `perFileLimit`: Override default 5 per-file limit
|
|
120
|
-
- `verbose`: Include full lexicalHits/semanticHits arrays (debugging only)
|
|
121
|
-
|
|
122
|
-
### Common Pitfalls to Avoid
|
|
123
|
-
|
|
124
|
-
1. **Creating separate markdown files** - Everything goes in the MANUAL via `bob.manual.update`
|
|
125
|
-
2. **Using native Grep/Glob** - Use `bob.code.search` instead for phase-aware analysis
|
|
126
|
-
3. **Manual git operations** - Use `bob.workflow.start` and `bob.workflow.deploy`
|
|
127
|
-
4. **Forgetting execution logs** - Always log progress with `bob.manual.update`
|
|
128
|
-
5. **Not using phase parameter** - Always specify `phase` in `bob.code.search`
|
|
129
|
-
|
|
130
|
-
### Workflow Pattern
|
|
131
|
-
|
|
132
|
-
When user says "hey bob" or starts a new feature:
|
|
133
|
-
|
|
134
|
-
1. Call `bob.workshop` to classify the problem
|
|
135
|
-
2. Switch to the returned mode (e.g., "architect")
|
|
136
|
-
3. Execute the appropriate workflow:
|
|
137
|
-
- Architect: `bob.workflow.start` → plan → `bob.manual.update`
|
|
138
|
-
- Engineer: implement → `bob.manual.update` with `execution_log` → `bob.workflow.deploy`
|
|
139
|
-
- Debugger: analyze → `bob.manual.update` with `debug_log`
|
|
140
|
-
- Reviewer: validate → `bob.validate_changes` → `bob.summarize_implementation`
|
|
141
|
-
|
|
142
|
-
### Manual Section Responsibilities
|
|
143
|
-
|
|
144
|
-
**Architect creates**:
|
|
145
|
-
- executive_summary
|
|
146
|
-
- product_specifications
|
|
147
|
-
- architecture_analysis
|
|
148
|
-
- implementation_plan
|
|
149
|
-
- testing
|
|
150
|
-
|
|
151
|
-
**Engineer updates**:
|
|
152
|
-
- execution_logs (via `bob.manual.update`)
|
|
153
|
-
|
|
154
|
-
**Debugger updates**:
|
|
155
|
-
- debug_logs (via `bob.manual.update`)
|
|
156
|
-
|
|
157
|
-
**Reviewer creates**:
|
|
158
|
-
- Own review manual with improvement recommendations
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
**Remember**: The manifest is available at `mcp://bobs-workshop/manifest` but you must follow these patterns automatically - don't wait for the user to remind you.
|
package/bin/bobs-mcp-server.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
// MCP Server entry point for Bob's Workshop
|
|
4
|
-
import { fileURLToPath } from 'url';
|
|
5
|
-
import { dirname, join } from 'path';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = dirname(__filename);
|
|
9
|
-
|
|
10
|
-
// Load and start the MCP server
|
|
11
|
-
const serverModule = await import('../dist/index.js');
|
package/bin/bobs-mcp.js
DELETED
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
import { fileURLToPath } from 'url';
|
|
4
|
-
import { dirname, join } from 'path';
|
|
5
|
-
import { readFile } from 'fs/promises';
|
|
6
|
-
|
|
7
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
-
const __dirname = dirname(__filename);
|
|
9
|
-
|
|
10
|
-
// Import CLI modules
|
|
11
|
-
async function loadCliModule(modulePath) {
|
|
12
|
-
try {
|
|
13
|
-
const module = await import(modulePath);
|
|
14
|
-
return module;
|
|
15
|
-
} catch (error) {
|
|
16
|
-
console.error(`Failed to load CLI module: ${error.message}`);
|
|
17
|
-
process.exit(1);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async function showHelp() {
|
|
22
|
-
console.log(`
|
|
23
|
-
🔧 Bob's Workshop - Agentic Development Helper
|
|
24
|
-
|
|
25
|
-
Usage:
|
|
26
|
-
bobs [command] [options]
|
|
27
|
-
|
|
28
|
-
Commands:
|
|
29
|
-
workshop Launch Bob's Workshop dashboard
|
|
30
|
-
health Check system health and component status
|
|
31
|
-
cleanup Perform system cleanup and maintenance
|
|
32
|
-
debug Show debug information and system state
|
|
33
|
-
--check, -c Check installation and system requirements
|
|
34
|
-
--setup, -s Generate MCP configuration for Claude Code
|
|
35
|
-
--help, -h Show this help message
|
|
36
|
-
--version, -v Show version information
|
|
37
|
-
|
|
38
|
-
Examples:
|
|
39
|
-
bobs workshop # Launch Bob's Workshop dashboard
|
|
40
|
-
bobs health # Check system health
|
|
41
|
-
bobs cleanup # Clean up stale resources
|
|
42
|
-
bobs cleanup --stats # Show cleanup statistics
|
|
43
|
-
bobs debug # Show debug information
|
|
44
|
-
bobs --check # Check if everything is working
|
|
45
|
-
bobs --setup # Generate Claude Code MCP configuration
|
|
46
|
-
bobs # Run installation check (default)
|
|
47
|
-
|
|
48
|
-
For more information, visit: https://github.com/your-org/bobs-workshop
|
|
49
|
-
`);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
async function showVersion() {
|
|
53
|
-
try {
|
|
54
|
-
const packagePath = join(__dirname, '../package.json');
|
|
55
|
-
const packageData = JSON.parse(await readFile(packagePath, 'utf8'));
|
|
56
|
-
console.log(`Bob's MCP v${packageData.version}`);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
console.log('Bob\'s MCP (version unavailable)');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
async function main() {
|
|
63
|
-
const args = process.argv.slice(2);
|
|
64
|
-
|
|
65
|
-
// Parse command line arguments
|
|
66
|
-
const command = args[0];
|
|
67
|
-
|
|
68
|
-
switch (command) {
|
|
69
|
-
case 'workshop':
|
|
70
|
-
console.log('🔧 Launching Bob\'s Workshop dashboard...\n');
|
|
71
|
-
const workshopModule = await loadCliModule('../dist/cli/workshop.js');
|
|
72
|
-
await workshopModule.runWorkshop();
|
|
73
|
-
break;
|
|
74
|
-
|
|
75
|
-
case 'health':
|
|
76
|
-
console.log('🔧 Running Bob\'s Workshop health check...\n');
|
|
77
|
-
const healthModule = await loadCliModule('../dist/cli/health.js');
|
|
78
|
-
await healthModule.runHealthCheck();
|
|
79
|
-
break;
|
|
80
|
-
|
|
81
|
-
case 'cleanup':
|
|
82
|
-
console.log('🔧 Running Bob\'s Workshop cleanup...\n');
|
|
83
|
-
const cleanupModule = await loadCliModule('../dist/cli/cleanup.js');
|
|
84
|
-
const cleanupOptions = cleanupModule.parseCleanupArgs(args.slice(1));
|
|
85
|
-
await cleanupModule.runCleanup(cleanupOptions);
|
|
86
|
-
break;
|
|
87
|
-
|
|
88
|
-
case 'debug':
|
|
89
|
-
console.log('🔧 Collecting Bob\'s Workshop debug information...\n');
|
|
90
|
-
const debugModule = await loadCliModule('../dist/cli/debug.js');
|
|
91
|
-
await debugModule.runDebug();
|
|
92
|
-
break;
|
|
93
|
-
|
|
94
|
-
case '--help':
|
|
95
|
-
case '-h':
|
|
96
|
-
await showHelp();
|
|
97
|
-
break;
|
|
98
|
-
|
|
99
|
-
case '--version':
|
|
100
|
-
case '-v':
|
|
101
|
-
await showVersion();
|
|
102
|
-
break;
|
|
103
|
-
|
|
104
|
-
case '--setup':
|
|
105
|
-
case '-s':
|
|
106
|
-
console.log('🔧 Starting Bob\'s MCP setup wizard...\n');
|
|
107
|
-
const setupModule = await loadCliModule('../dist/cli/setup.js');
|
|
108
|
-
await setupModule.runSetup();
|
|
109
|
-
break;
|
|
110
|
-
|
|
111
|
-
case '--check':
|
|
112
|
-
case '-c':
|
|
113
|
-
case undefined:
|
|
114
|
-
// Default action is to run installation check
|
|
115
|
-
console.log('🔧 Checking Bob\'s MCP installation...\n');
|
|
116
|
-
const checkerModule = await loadCliModule('../dist/cli/checker.js');
|
|
117
|
-
await checkerModule.runInstallationCheck();
|
|
118
|
-
break;
|
|
119
|
-
|
|
120
|
-
default:
|
|
121
|
-
console.error(`Unknown command: ${command}`);
|
|
122
|
-
console.error('Run "bobs --help" for usage information.');
|
|
123
|
-
process.exit(1);
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
main().catch(error => {
|
|
128
|
-
console.error('❌ Error:', error.message);
|
|
129
|
-
process.exit(1);
|
|
130
|
-
});
|