rrce-workflow 0.2.73 → 0.2.74

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.
@@ -2,7 +2,7 @@
2
2
  name: RRCE Documentation
3
3
  description: Produce project documentation aligned with the latest delivery.
4
4
  argument-hint: "DOC_TYPE=<type> [TASK_SLUG=<slug> | TARGET_PATH=<relative>] [RELEASE_REF=<tag/sha>]"
5
- tools: ['search_knowledge', 'get_project_context', 'list_projects']
5
+ tools: ['search_knowledge', 'get_project_context', 'list_projects', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args:
7
7
  - name: DOC_TYPE
8
8
  prompt: "Enter the documentation type (e.g., api, architecture, runbook, changelog)"
@@ -40,6 +40,16 @@ Pipeline Position
40
40
  - **Best After**: Executor phase complete (if documenting a specific task).
41
41
  - **Standalone**: Can also run independently to document general knowledge, architecture, or runbooks.
42
42
 
43
+ ## Technical Protocol (STRICT)
44
+ 1. **Path Resolution**: Always use the "System Resolved Paths" from the context preamble.
45
+ - Use `{{RRCE_DATA}}` for all RRCE-specific storage.
46
+ - Use `{{WORKSPACE_ROOT}}` for project source code.
47
+ 2. **File Writing**: When using the `write` tool:
48
+ - The `content` parameter **MUST be a string**.
49
+ - If writing JSON (like `meta.json`), you **MUST stringify it** first.
50
+ - Example: `write(filePath, JSON.stringify(data, null, 2))`
51
+ 3. **Directory Safety**: Use `bash` with `mkdir -p` to ensure parent directories exist before writing files if they might be missing.
52
+
43
53
  Prerequisites (RECOMMENDED)
44
54
  If a `TASK_SLUG` is provided:
45
55
  1. **Execution Complete** (recommended): Check `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json` for `agents.executor.status === 'complete'`.
@@ -2,7 +2,7 @@
2
2
  name: RRCE Executor
3
3
  description: Execute the planned tasks to deliver working code and tests.
4
4
  argument-hint: "TASK_SLUG=<slug> [BRANCH=<git ref>]"
5
- tools: ['search_knowledge', 'get_project_context', 'index_knowledge', 'terminalLastCommand']
5
+ tools: ['search_knowledge', 'get_project_context', 'index_knowledge', 'terminalLastCommand', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter the task slug to execute"
@@ -24,6 +24,16 @@ Pipeline Position
24
24
  - **Requires**: Planning phase must be complete before execution can begin.
25
25
  - **Next Step**: After execution is complete, optionally hand off to `/docs` (Documentation agent).
26
26
 
27
+ ## Technical Protocol (STRICT)
28
+ 1. **Path Resolution**: Always use the "System Resolved Paths" from the context preamble.
29
+ - Use `{{RRCE_DATA}}` for all RRCE-specific storage.
30
+ - Use `{{WORKSPACE_ROOT}}` for project source code.
31
+ 2. **File Writing**: When using the `write` tool:
32
+ - The `content` parameter **MUST be a string**.
33
+ - If writing JSON (like `meta.json`), you **MUST stringify it** first.
34
+ - Example: `write(filePath, JSON.stringify(data, null, 2))`
35
+ 3. **Directory Safety**: Use `bash` with `mkdir -p` to ensure parent directories exist before writing files if they might be missing.
36
+
27
37
  Prerequisites (STRICT)
28
38
  Before proceeding, verify ALL of the following:
29
39
 
@@ -2,7 +2,7 @@
2
2
  name: RRCE Planning
3
3
  description: Transform clarified requirements into an actionable execution plan.
4
4
  argument-hint: "TASK_SLUG=<slug>"
5
- tools: ['search_knowledge', 'get_project_context', 'list_projects']
5
+ tools: ['search_knowledge', 'get_project_context', 'list_projects', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter the task slug to create a plan for"
@@ -22,6 +22,16 @@ Pipeline Position
22
22
  - **Correlation**: Planning works with Init to maintain project context. If planning reveals significant architectural changes, recommend running `/init` to update project context.
23
23
  - **Next Step**: After planning is complete, hand off to `/execute` (Executor agent).
24
24
 
25
+ ## Technical Protocol (STRICT)
26
+ 1. **Path Resolution**: Always use the "System Resolved Paths" from the context preamble.
27
+ - Use `{{RRCE_DATA}}` for all RRCE-specific storage.
28
+ - Use `{{WORKSPACE_ROOT}}` for project source code.
29
+ 2. **File Writing**: When using the `write` tool:
30
+ - The `content` parameter **MUST be a string**.
31
+ - If writing JSON (like `meta.json`), you **MUST stringify it** first.
32
+ - Example: `write(filePath, JSON.stringify(data, null, 2))`
33
+ 3. **Directory Safety**: Use `bash` with `mkdir -p` to ensure parent directories exist before writing files if they might be missing.
34
+
25
35
  Prerequisites (STRICT)
26
36
  Before proceeding, verify ALL of the following:
27
37
 
@@ -2,7 +2,7 @@
2
2
  name: RRCE Research
3
3
  description: Research and clarify requirements by leveraging existing project knowledge before asking for clarification.
4
4
  argument-hint: REQUEST="<user prompt>" [TASK_SLUG=<slug>] [TITLE="<task title>"] [SOURCE=<url>]
5
- tools: ['search_knowledge', 'get_project_context', 'list_projects']
5
+ tools: ['search_knowledge', 'get_project_context', 'list_projects', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter a task slug (kebab-case identifier)"
@@ -30,6 +30,16 @@ For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
30
30
  - **Recommendation**: If `project-context.md` doesn't exist, suggest `/init` first for best results
31
31
  - **Next Step**: After research is complete, hand off to `/plan TASK_SLUG={{TASK_SLUG}}`
32
32
 
33
+ ## Technical Protocol (STRICT)
34
+ 1. **Path Resolution**: Always use the "System Resolved Paths" from the context preamble.
35
+ - Use `{{RRCE_DATA}}` for all RRCE-specific storage.
36
+ - Use `{{WORKSPACE_ROOT}}` for project source code.
37
+ 2. **File Writing**: When using the `write` tool:
38
+ - The `content` parameter **MUST be a string**.
39
+ - If writing JSON (like `meta.json`), you **MUST stringify it** first.
40
+ - Example: `write(filePath, JSON.stringify(data, null, 2))`
41
+ 3. **Directory Safety**: Use `bash` with `mkdir -p` to ensure parent directories exist before writing files if they might be missing.
42
+
33
43
  ## Mission
34
44
  - Challenge and refine the incoming request until intent, constraints, and success criteria are explicit
35
45
  - Leverage existing project knowledge BEFORE asking the user for clarification
@@ -2,7 +2,7 @@
2
2
  name: RRCE Sync
3
3
  description: Reconcile project state with the RRCE knowledge base and update semantic index.
4
4
  argument-hint: "[SCOPE=<path|module>]"
5
- tools: ['search_knowledge', 'get_project_context', 'index_knowledge', 'list_projects']
5
+ tools: ['search_knowledge', 'get_project_context', 'index_knowledge', 'list_projects', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args: []
7
7
  optional-args:
8
8
  - name: SCOPE
@@ -23,6 +23,16 @@ Pipeline Position
23
23
  - **Requires**: Init must have been run at least once (project-context.md must exist).
24
24
  - **Triggers Init**: If sync detects major structural changes, recommend running `/init` to update project context.
25
25
 
26
+ ## Technical Protocol (STRICT)
27
+ 1. **Path Resolution**: Always use the "System Resolved Paths" from the context preamble.
28
+ - Use `{{RRCE_DATA}}` for all RRCE-specific storage.
29
+ - Use `{{WORKSPACE_ROOT}}` for project source code.
30
+ 2. **File Writing**: When using the `write` tool:
31
+ - The `content` parameter **MUST be a string**.
32
+ - If writing JSON (like `meta.json`), you **MUST stringify it** first.
33
+ - Example: `write(filePath, JSON.stringify(data, null, 2))`
34
+ 3. **Directory Safety**: Use `bash` with `mkdir -p` to ensure parent directories exist before writing files if they might be missing.
35
+
26
36
  Prerequisites (STRICT)
27
37
  1. **Project Context Exists**: Check `{{RRCE_DATA}}/knowledge/project-context.md` exists.
28
38
  - If missing, **STOP** and prompt user:
package/dist/index.js CHANGED
@@ -393,9 +393,17 @@ function parseWorkspaceConfig(configPath) {
393
393
  }
394
394
  }
395
395
  function findClosestProject(projects, cwd = process.cwd()) {
396
- const matches = projects.filter((p) => cwd.startsWith(p.path));
397
- matches.sort((a, b) => b.path.length - a.path.length);
398
- return matches[0];
396
+ const matches = projects.map((p) => {
397
+ let matchPath = "";
398
+ if (cwd.startsWith(p.path)) {
399
+ matchPath = p.path;
400
+ } else if (p.sourcePath && cwd.startsWith(p.sourcePath)) {
401
+ matchPath = p.sourcePath;
402
+ }
403
+ return { project: p, matchPath };
404
+ }).filter((m) => m.matchPath !== "");
405
+ matches.sort((a, b) => b.matchPath.length - a.matchPath.length);
406
+ return matches[0]?.project;
399
407
  }
400
408
  var SKIP_DIRECTORIES;
401
409
  var init_detection = __esm({
@@ -1253,7 +1261,16 @@ function copyPromptsToDir(prompts, targetDir, extension) {
1253
1261
  }
1254
1262
  function convertToOpenCodeAgent(prompt) {
1255
1263
  const { frontmatter, content } = prompt;
1256
- const tools = {};
1264
+ const tools = {
1265
+ // Enable standard host tools by default
1266
+ "read": true,
1267
+ "write": true,
1268
+ "edit": true,
1269
+ "bash": true,
1270
+ "grep": true,
1271
+ "glob": true,
1272
+ "webfetch": true
1273
+ };
1257
1274
  if (frontmatter.tools) {
1258
1275
  for (const tool of frontmatter.tools) {
1259
1276
  tools[`rrce_${tool}`] = true;
@@ -1262,7 +1279,7 @@ function convertToOpenCodeAgent(prompt) {
1262
1279
  const opencodeFrontmatter = {
1263
1280
  description: frontmatter.description,
1264
1281
  mode: "primary",
1265
- tools: Object.keys(tools).length > 0 ? tools : void 0
1282
+ tools
1266
1283
  };
1267
1284
  return `---
1268
1285
  ${stringify(opencodeFrontmatter)}---
@@ -1676,12 +1693,15 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
1676
1693
  }
1677
1694
  }
1678
1695
  if (config.tools.includes("opencode")) {
1679
- const opencodePath = path12.join(workspacePath, ".opencode", "agent");
1680
- ensureDir(opencodePath);
1681
- for (const prompt of prompts) {
1682
- const baseName = path12.basename(prompt.filePath, ".md");
1683
- const content = convertToOpenCodeAgent(prompt);
1684
- fs10.writeFileSync(path12.join(opencodePath, `${baseName}.md`), content);
1696
+ const primaryDataPath = dataPaths[0];
1697
+ if (primaryDataPath) {
1698
+ const opencodePath = path12.join(primaryDataPath, ".opencode", "agent");
1699
+ ensureDir(opencodePath);
1700
+ for (const prompt of prompts) {
1701
+ const baseName = path12.basename(prompt.filePath, ".md");
1702
+ const content = convertToOpenCodeAgent(prompt);
1703
+ fs10.writeFileSync(path12.join(opencodePath, `${baseName}.md`), content);
1704
+ }
1685
1705
  }
1686
1706
  }
1687
1707
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.2.73",
3
+ "version": "0.2.74",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",