rrce-workflow 0.2.95 → 0.2.96
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/dist/index.js +19 -12
- package/docs/architecture.md +12 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5271,9 +5271,10 @@ function convertToOpenCodeAgent(prompt, useFileReference = false, promptFilePath
|
|
|
5271
5271
|
}
|
|
5272
5272
|
}
|
|
5273
5273
|
tools["webfetch"] = true;
|
|
5274
|
+
const invocationHint = " (Invoke via @rrce_*)";
|
|
5274
5275
|
return {
|
|
5275
|
-
description: frontmatter.description
|
|
5276
|
-
mode: "
|
|
5276
|
+
description: `${frontmatter.description}${invocationHint}`,
|
|
5277
|
+
mode: "subagent",
|
|
5277
5278
|
prompt: useFileReference && promptFilePath ? `{file:${promptFilePath}}` : content,
|
|
5278
5279
|
tools
|
|
5279
5280
|
};
|
|
@@ -5428,11 +5429,12 @@ async function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
5428
5429
|
if (!opencodeConfig.agent) opencodeConfig.agent = {};
|
|
5429
5430
|
for (const prompt of prompts) {
|
|
5430
5431
|
const baseName = path12.basename(prompt.filePath, ".md");
|
|
5432
|
+
const agentId = `rrce_${baseName}`;
|
|
5431
5433
|
const promptFileName = `rrce-${baseName}.md`;
|
|
5432
5434
|
const promptFilePath = path12.join(promptsDir, promptFileName);
|
|
5433
5435
|
fs10.writeFileSync(promptFilePath, prompt.content);
|
|
5434
5436
|
const agentConfig = convertToOpenCodeAgent(prompt, true, `./prompts/${promptFileName}`);
|
|
5435
|
-
opencodeConfig.agent[
|
|
5437
|
+
opencodeConfig.agent[agentId] = agentConfig;
|
|
5436
5438
|
}
|
|
5437
5439
|
fs10.writeFileSync(OPENCODE_CONFIG, JSON.stringify(opencodeConfig, null, 2) + "\n");
|
|
5438
5440
|
} catch (e) {
|
|
@@ -5443,6 +5445,7 @@ async function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
5443
5445
|
ensureDir(opencodeBaseDir);
|
|
5444
5446
|
for (const prompt of prompts) {
|
|
5445
5447
|
const baseName = path12.basename(prompt.filePath, ".md");
|
|
5448
|
+
const agentId = `rrce_${baseName}`;
|
|
5446
5449
|
const agentConfig = convertToOpenCodeAgent(prompt);
|
|
5447
5450
|
const content = `---
|
|
5448
5451
|
${stringify2({
|
|
@@ -5451,7 +5454,7 @@ ${stringify2({
|
|
|
5451
5454
|
tools: agentConfig.tools
|
|
5452
5455
|
})}---
|
|
5453
5456
|
${agentConfig.prompt}`;
|
|
5454
|
-
fs10.writeFileSync(path12.join(opencodeBaseDir, `${
|
|
5457
|
+
fs10.writeFileSync(path12.join(opencodeBaseDir, `${agentId}.md`), content);
|
|
5455
5458
|
}
|
|
5456
5459
|
}
|
|
5457
5460
|
}
|
|
@@ -6048,15 +6051,17 @@ function updateOpenCodeAgents(prompts, mode, primaryDataPath) {
|
|
|
6048
6051
|
opencodeConfig = JSON.parse(fs21.readFileSync(OPENCODE_CONFIG, "utf-8"));
|
|
6049
6052
|
}
|
|
6050
6053
|
if (!opencodeConfig.agent) opencodeConfig.agent = {};
|
|
6051
|
-
const
|
|
6054
|
+
const currentAgentBaseNames = prompts.map((p) => path21.basename(p.filePath, ".md"));
|
|
6055
|
+
const currentAgentIds = new Set(currentAgentBaseNames.map((base) => `rrce_${base}`));
|
|
6052
6056
|
const existingAgentNames = Object.keys(opencodeConfig.agent);
|
|
6053
|
-
const rrceAgentPrefixes = ["init", "research", "planning", "executor", "doctor", "documentation", "sync"];
|
|
6054
6057
|
for (const existingName of existingAgentNames) {
|
|
6055
|
-
const
|
|
6056
|
-
const
|
|
6057
|
-
|
|
6058
|
+
const isLegacyBaseName = currentAgentBaseNames.includes(existingName);
|
|
6059
|
+
const isRrcePrefixed = existingName.startsWith("rrce_");
|
|
6060
|
+
const isStaleRrcePrefixed = isRrcePrefixed && !currentAgentIds.has(existingName);
|
|
6061
|
+
if (isLegacyBaseName || isStaleRrcePrefixed) {
|
|
6058
6062
|
delete opencodeConfig.agent[existingName];
|
|
6059
|
-
const
|
|
6063
|
+
const legacyBaseName = isLegacyBaseName ? existingName : existingName.replace(/^rrce_/, "");
|
|
6064
|
+
const oldPromptFile = path21.join(promptsDir, `rrce-${legacyBaseName}.md`);
|
|
6060
6065
|
if (fs21.existsSync(oldPromptFile)) {
|
|
6061
6066
|
fs21.unlinkSync(oldPromptFile);
|
|
6062
6067
|
}
|
|
@@ -6064,11 +6069,12 @@ function updateOpenCodeAgents(prompts, mode, primaryDataPath) {
|
|
|
6064
6069
|
}
|
|
6065
6070
|
for (const prompt of prompts) {
|
|
6066
6071
|
const baseName = path21.basename(prompt.filePath, ".md");
|
|
6072
|
+
const agentId = `rrce_${baseName}`;
|
|
6067
6073
|
const promptFileName = `rrce-${baseName}.md`;
|
|
6068
6074
|
const promptFilePath = path21.join(promptsDir, promptFileName);
|
|
6069
6075
|
fs21.writeFileSync(promptFilePath, prompt.content);
|
|
6070
6076
|
const agentConfig = convertToOpenCodeAgent(prompt, true, `./prompts/${promptFileName}`);
|
|
6071
|
-
opencodeConfig.agent[
|
|
6077
|
+
opencodeConfig.agent[agentId] = agentConfig;
|
|
6072
6078
|
}
|
|
6073
6079
|
fs21.writeFileSync(OPENCODE_CONFIG, JSON.stringify(opencodeConfig, null, 2) + "\n");
|
|
6074
6080
|
} catch (e) {
|
|
@@ -6080,6 +6086,7 @@ function updateOpenCodeAgents(prompts, mode, primaryDataPath) {
|
|
|
6080
6086
|
clearDirectory(opencodeBaseDir);
|
|
6081
6087
|
for (const prompt of prompts) {
|
|
6082
6088
|
const baseName = path21.basename(prompt.filePath, ".md");
|
|
6089
|
+
const agentId = `rrce_${baseName}`;
|
|
6083
6090
|
const agentConfig = convertToOpenCodeAgent(prompt);
|
|
6084
6091
|
const content = `---
|
|
6085
6092
|
${stringify3({
|
|
@@ -6088,7 +6095,7 @@ ${stringify3({
|
|
|
6088
6095
|
tools: agentConfig.tools
|
|
6089
6096
|
})}---
|
|
6090
6097
|
${agentConfig.prompt}`;
|
|
6091
|
-
fs21.writeFileSync(path21.join(opencodeBaseDir, `${
|
|
6098
|
+
fs21.writeFileSync(path21.join(opencodeBaseDir, `${agentId}.md`), content);
|
|
6092
6099
|
}
|
|
6093
6100
|
}
|
|
6094
6101
|
}
|
package/docs/architecture.md
CHANGED
|
@@ -355,7 +355,7 @@ RRCE-Workflow prompts are designed to work across multiple AI coding tools via M
|
|
|
355
355
|
|
|
356
356
|
| Tool | MCP Config Location | Agent Location | Notes |
|
|
357
357
|
|------|---------------------|----------------|-------|
|
|
358
|
-
| **OpenCode** | `~/.config/opencode/opencode.json` | `.opencode/agent/
|
|
358
|
+
| **OpenCode** | `~/.config/opencode/opencode.json` | `.opencode/agent/rrce_*.md` | Custom subagents (invoke via `@rrce_*`) |
|
|
359
359
|
| **Antigravity IDE** | `~/.gemini/antigravity/mcp_config.json` | `.agent/workflows/*.md` | Native workflow support |
|
|
360
360
|
| **GitHub Copilot (VSCode)** | `.vscode/mcp.json` or global settings | `.github/prompts/*.prompt.md` | Custom agents format |
|
|
361
361
|
| **Claude Desktop** | `~/.config/claude/claude_desktop_config.json` | N/A | MCP Server only |
|
|
@@ -363,25 +363,26 @@ RRCE-Workflow prompts are designed to work across multiple AI coding tools via M
|
|
|
363
363
|
### OpenCode Agent Transformation
|
|
364
364
|
|
|
365
365
|
When generating agents for OpenCode (`src/commands/wizard/utils.ts`):
|
|
366
|
-
- **Mode**: Set to `
|
|
367
|
-
- **
|
|
366
|
+
- **Mode**: Set to `subagent` (not tab-switchable; invoke via mention)
|
|
367
|
+
- **Invoke**: Use `@rrce_<agent>` (e.g., `@rrce_init`)
|
|
368
|
+
- **Tools**:
|
|
368
369
|
- Host tools (`read`, `write`, `edit`, `bash`, `grep`, `glob`, `webfetch`) pass through as-is
|
|
369
370
|
- MCP tools are prefixed with `rrce_` (e.g., `rrce_search_knowledge`)
|
|
370
371
|
- Tool list respects per-agent frontmatter restrictions
|
|
371
|
-
- **Naming**:
|
|
372
|
+
- **Naming**: Agent IDs are prefixed with `rrce_` (underscore) to avoid collisions
|
|
372
373
|
|
|
373
374
|
### Generated Files
|
|
374
375
|
|
|
375
376
|
**For OpenCode:**
|
|
376
377
|
```
|
|
377
378
|
.opencode/agent/
|
|
378
|
-
├──
|
|
379
|
-
├──
|
|
380
|
-
├──
|
|
381
|
-
├──
|
|
382
|
-
├──
|
|
383
|
-
├──
|
|
384
|
-
└──
|
|
379
|
+
├── rrce_init.md
|
|
380
|
+
├── rrce_research.md
|
|
381
|
+
├── rrce_planning.md
|
|
382
|
+
├── rrce_executor.md
|
|
383
|
+
├── rrce_documentation.md
|
|
384
|
+
├── rrce_sync.md
|
|
385
|
+
└── rrce_doctor.md
|
|
385
386
|
```
|
|
386
387
|
|
|
387
388
|
**For Antigravity IDE:**
|