rrce-workflow 0.2.71 → 0.2.72
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/agent-core/prompts/doctor.md +3 -3
- package/agent-core/prompts/documentation.md +3 -3
- package/agent-core/prompts/executor.md +3 -3
- package/agent-core/prompts/init.md +3 -3
- package/agent-core/prompts/planning_orchestrator.md +4 -4
- package/agent-core/prompts/research_discussion.md +4 -4
- package/agent-core/prompts/sync.md +1 -1
- package/dist/index.js +60 -29
- package/package.json +1 -1
|
@@ -20,7 +20,7 @@ You are the Project Doctor for RRCE-Workflow. Perform a health check on the code
|
|
|
20
20
|
|
|
21
21
|
## Path Resolution
|
|
22
22
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
23
|
-
For details, see: `{{
|
|
23
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
24
24
|
|
|
25
25
|
## Pipeline Position
|
|
26
26
|
- **Input**: Can be triggered at any time for project health analysis
|
|
@@ -142,7 +142,7 @@ Rank findings using this matrix:
|
|
|
142
142
|
### Step 6: Generate Output
|
|
143
143
|
|
|
144
144
|
1. Create task directory: `{{RRCE_DATA}}/tasks/doctor-{{YYYYMMDD}}/`
|
|
145
|
-
2. Write diagnosis using template: `{{
|
|
145
|
+
2. Write diagnosis using template: `{{RRCE_DATA}}/templates/doctor_output.md`
|
|
146
146
|
3. Save to: `{{RRCE_DATA}}/tasks/doctor-{{YYYYMMDD}}/diagnosis.md`
|
|
147
147
|
|
|
148
148
|
**Output includes:**
|
|
@@ -176,7 +176,7 @@ Report:
|
|
|
176
176
|
## Deliverable
|
|
177
177
|
|
|
178
178
|
- **File**: `{{RRCE_DATA}}/tasks/doctor-{{YYYYMMDD}}/diagnosis.md`
|
|
179
|
-
- **Template**: `{{
|
|
179
|
+
- **Template**: `{{RRCE_DATA}}/templates/doctor_output.md`
|
|
180
180
|
- **Outcome**: Structured diagnosis with prioritized, actionable tasks
|
|
181
181
|
|
|
182
182
|
## Focus Area Deep Dive
|
|
@@ -22,7 +22,7 @@ You are the Documentation Lead for the project. Operate like a senior engineerin
|
|
|
22
22
|
|
|
23
23
|
## Path Resolution
|
|
24
24
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
25
|
-
For details, see: `{{
|
|
25
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
26
26
|
|
|
27
27
|
## Supported DOC_TYPE Values
|
|
28
28
|
|
|
@@ -68,7 +68,7 @@ Workflow
|
|
|
68
68
|
- If `TASK_SLUG` is provided, ensure `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/docs` exists and target `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/docs/{{TASK_SLUG}}-{{DOC_TYPE}}.md`.
|
|
69
69
|
- Else if `TARGET_PATH` is provided, ensure its parent directory exists (must remain under `{{RRCE_DATA}}/`) and target `{{RRCE_DATA}}/{{TARGET_PATH}}`.
|
|
70
70
|
- Otherwise, default to `{{RRCE_DATA}}/knowledge/{{DOC_TYPE}}.md` and ensure `{{RRCE_DATA}}/knowledge` exists.
|
|
71
|
-
3. Select a template: prefer `{{
|
|
71
|
+
3. Select a template: prefer `{{RRCE_DATA}}/templates/docs/{{DOC_TYPE}}.md`; fallback to `{{RRCE_DATA}}/templates/documentation_output.md`.
|
|
72
72
|
4. Populate contextual metadata (`AUTHOR`, `RELEASE_REF`, task references, dates) and render the document using the chosen template.
|
|
73
73
|
5. If operating on a task slug, update `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json` with documentation artifact paths, new references, final decisions, checklist completions, and remaining follow-ups.
|
|
74
74
|
6. When broader knowledge changed, update the relevant `{{RRCE_DATA}}/knowledge/*.md` entries with `Updated: YYYY-MM-DD` markers, lean changelog bullets, and a small checklist of follow-ups.
|
|
@@ -76,5 +76,5 @@ Workflow
|
|
|
76
76
|
|
|
77
77
|
Deliverable
|
|
78
78
|
- File: Resolved from `DOC_TYPE` plus either `TASK_SLUG`, `TARGET_PATH`, or default knowledge location.
|
|
79
|
-
- Format: `{{
|
|
79
|
+
- Format: `{{RRCE_DATA}}/templates/docs/{{DOC_TYPE}}.md` when available; otherwise `{{RRCE_DATA}}/templates/documentation_output.md`.
|
|
80
80
|
- Outcome: Documentation tailored to the requested type, summarizing scope, implementation, validations, decisions, references, and leftover work while keeping project knowledge synchronized.
|
|
@@ -18,7 +18,7 @@ You are the Executor for the project. Operate like a senior individual contribut
|
|
|
18
18
|
|
|
19
19
|
## Path Resolution
|
|
20
20
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
21
|
-
For details, see: `{{
|
|
21
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
22
22
|
|
|
23
23
|
Pipeline Position
|
|
24
24
|
- **Requires**: Planning phase must be complete before execution can begin.
|
|
@@ -85,7 +85,7 @@ Workflow
|
|
|
85
85
|
2. Set `agents.executor.status` in `meta.json` to `in_progress` while working and `complete` after delivering.
|
|
86
86
|
3. Maintain checklist entries with current progress markers and timestamps where helpful.
|
|
87
87
|
4. Record checkpoints, blockers, and validation steps in `agents.executor.notes` and `references`.
|
|
88
|
-
5. Capture your implementation log using `{{
|
|
88
|
+
5. Capture your implementation log using `{{RRCE_DATA}}/templates/executor_output.md` and save it to `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/execution/{{TASK_SLUG}}-execution.md`, noting the provided `BRANCH` or current git ref.
|
|
89
89
|
6. Summarize test evidence, code pointers, and outstanding follow-ups so documentation can build on it seamlessly.
|
|
90
90
|
7. **Semantic Indexing**: If significant code was added or modified, suggest running `index_knowledge` to update the semantic search index:
|
|
91
91
|
- Tool: `index_knowledge`
|
|
@@ -93,5 +93,5 @@ Workflow
|
|
|
93
93
|
|
|
94
94
|
Deliverable
|
|
95
95
|
- File: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/execution/{{TASK_SLUG}}-execution.md`
|
|
96
|
-
- Format: `{{
|
|
96
|
+
- Format: `{{RRCE_DATA}}/templates/executor_output.md`
|
|
97
97
|
- Outcome: Implementation log covering what was built, how it was validated, and what remains, kept lean and actionable.
|
|
@@ -17,7 +17,7 @@ You are the Project Initializer for RRCE-Workflow. Your mission: create a compre
|
|
|
17
17
|
|
|
18
18
|
## Path Resolution
|
|
19
19
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
20
|
-
For details, see: `{{
|
|
20
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
21
21
|
|
|
22
22
|
## Pipeline Position
|
|
23
23
|
- **Entry Point**: Run before any other agent for new projects
|
|
@@ -122,7 +122,7 @@ Scan in this priority order. Stop early if sufficient information gathered:
|
|
|
122
122
|
### Step 3: Generate Project Context
|
|
123
123
|
|
|
124
124
|
1. Ensure `{{RRCE_DATA}}/knowledge/` directory exists (create if absent)
|
|
125
|
-
2. Compile findings using template: `{{
|
|
125
|
+
2. Compile findings using template: `{{RRCE_DATA}}/templates/init_output.md`
|
|
126
126
|
3. Save to: `{{RRCE_DATA}}/knowledge/project-context.md`
|
|
127
127
|
4. Update `{{RRCE_DATA}}/workspace.json` with project metadata if it exists
|
|
128
128
|
|
|
@@ -160,7 +160,7 @@ Provide a brief summary:
|
|
|
160
160
|
## Deliverable
|
|
161
161
|
|
|
162
162
|
- **File**: `{{RRCE_DATA}}/knowledge/project-context.md`
|
|
163
|
-
- **Template**: `{{
|
|
163
|
+
- **Template**: `{{RRCE_DATA}}/templates/init_output.md`
|
|
164
164
|
- **Index**: `{{RRCE_DATA}}/knowledge/embeddings.json`
|
|
165
165
|
- **Outcome**: Comprehensive project context + searchable semantic index
|
|
166
166
|
|
|
@@ -15,7 +15,7 @@ You are the Planning & Task Orchestrator for the project. Operate like an engine
|
|
|
15
15
|
|
|
16
16
|
## Path Resolution
|
|
17
17
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
18
|
-
For details, see: `{{
|
|
18
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
19
19
|
|
|
20
20
|
Pipeline Position
|
|
21
21
|
- **Requires**: Research phase must be complete before planning can begin.
|
|
@@ -58,12 +58,12 @@ Non-Negotiables
|
|
|
58
58
|
|
|
59
59
|
Workflow
|
|
60
60
|
1. Confirm `TASK_SLUG` (prompt if missing) and ensure directories exist at `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/planning` and `{{RRCE_DATA}}/knowledge`, creating them automatically if absent.
|
|
61
|
-
2. Update `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json` (copy the template from `{{
|
|
61
|
+
2. Update `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json` (copy the template from `{{RRCE_DATA}}/templates/meta.template.json` if it is not already present):
|
|
62
62
|
- Mark `agents.planning.status` as `in_progress` while drafting and `complete` upon handoff.
|
|
63
63
|
- Link the plan artifact path in `agents.planning.artifact`.
|
|
64
64
|
- Populate or refresh `summary`, `references`, `milestones`, `checklist`, and `open_questions`.
|
|
65
65
|
3. Where new persistent knowledge is created (API notes, domain decisions, etc.), append or create records in `{{RRCE_DATA}}/knowledge/{{DOMAIN}}.md` and log the file path inside `meta.json.references`.
|
|
66
|
-
4. Structure the plan using `{{
|
|
66
|
+
4. Structure the plan using `{{RRCE_DATA}}/templates/planning_output.md` and store it at `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/planning/{{TASK_SLUG}}-plan.md`.
|
|
67
67
|
5. Provide clear guidance on validation, testing strategy, rollout sequencing, and success criteria for the Executor.
|
|
68
68
|
6. **Semantic Indexing**: If new knowledge files were created in `{{RRCE_DATA}}/knowledge/`, suggest running `index_knowledge` to update the semantic search index:
|
|
69
69
|
- Tool: `index_knowledge`
|
|
@@ -71,5 +71,5 @@ Workflow
|
|
|
71
71
|
|
|
72
72
|
Deliverable
|
|
73
73
|
- File: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/planning/{{TASK_SLUG}}-plan.md`
|
|
74
|
-
- Format: `{{
|
|
74
|
+
- Format: `{{RRCE_DATA}}/templates/planning_output.md`
|
|
75
75
|
- Outcome: Ordered, actionable roadmap with dependencies, acceptance criteria, context links, and knowledge updates ready for implementation.
|
|
@@ -22,7 +22,7 @@ You are the Research & Discussion Lead for RRCE-Workflow. Your mission: refine i
|
|
|
22
22
|
|
|
23
23
|
## Path Resolution
|
|
24
24
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
25
|
-
For details, see: `{{
|
|
25
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
26
26
|
|
|
27
27
|
## Pipeline Position
|
|
28
28
|
- **Entry Point**: First agent invoked for new tasks
|
|
@@ -83,7 +83,7 @@ Based on knowledge search, create a gap analysis:
|
|
|
83
83
|
### Step 3: Setup Task Structure
|
|
84
84
|
|
|
85
85
|
1. Ensure directory exists: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/research/`
|
|
86
|
-
2. Copy meta template if new task: `{{
|
|
86
|
+
2. Copy meta template if new task: `{{RRCE_DATA}}/templates/meta.template.json` → `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json`
|
|
87
87
|
3. Populate initial metadata:
|
|
88
88
|
- `task_id`: Generate UUID
|
|
89
89
|
- `task_slug`: From argument
|
|
@@ -127,7 +127,7 @@ Document the decision in `meta.json.decisions`.
|
|
|
127
127
|
|
|
128
128
|
### Step 6: Generate Research Brief
|
|
129
129
|
|
|
130
|
-
1. Compile findings using template: `{{
|
|
130
|
+
1. Compile findings using template: `{{RRCE_DATA}}/templates/research_output.md`
|
|
131
131
|
2. Save to: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/research/{{TASK_SLUG}}-research.md`
|
|
132
132
|
|
|
133
133
|
**Brief includes:**
|
|
@@ -188,7 +188,7 @@ Research is complete when:
|
|
|
188
188
|
## Deliverable
|
|
189
189
|
|
|
190
190
|
- **File**: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/research/{{TASK_SLUG}}-research.md`
|
|
191
|
-
- **Template**: `{{
|
|
191
|
+
- **Template**: `{{RRCE_DATA}}/templates/research_output.md`
|
|
192
192
|
- **Metadata**: `{{RRCE_DATA}}/tasks/{{TASK_SLUG}}/meta.json` with status `complete`
|
|
193
193
|
- **Outcome**: Planning agent can proceed without re-asking the same questions
|
|
194
194
|
|
|
@@ -16,7 +16,7 @@ You are the Knowledge Sync Lead. Act like a senior architect charged with keepin
|
|
|
16
16
|
|
|
17
17
|
## Path Resolution
|
|
18
18
|
Use the pre-resolved paths from the "System Resolved Paths" table in the context preamble.
|
|
19
|
-
For details, see: `{{
|
|
19
|
+
For details, see: `{{RRCE_DATA}}/docs/path-resolution.md`
|
|
20
20
|
|
|
21
21
|
Pipeline Position
|
|
22
22
|
- **Maintenance Agent**: Sync runs periodically or after significant codebase changes to keep knowledge current.
|
package/dist/index.js
CHANGED
|
@@ -1626,6 +1626,12 @@ function installAgentPrompts(config, workspacePath, dataPaths) {
|
|
|
1626
1626
|
syncMetadataToAll(agentCoreDir, dataPaths);
|
|
1627
1627
|
copyDirToAllStoragePaths(path11.join(agentCoreDir, "templates"), "templates", dataPaths);
|
|
1628
1628
|
copyDirToAllStoragePaths(path11.join(agentCoreDir, "prompts"), "prompts", dataPaths);
|
|
1629
|
+
copyDirToAllStoragePaths(path11.join(agentCoreDir, "docs"), "docs", dataPaths);
|
|
1630
|
+
const rrceHome = config.globalPath || getDefaultRRCEHome2();
|
|
1631
|
+
ensureDir(path11.join(rrceHome, "templates"));
|
|
1632
|
+
ensureDir(path11.join(rrceHome, "docs"));
|
|
1633
|
+
copyDirRecursive(path11.join(agentCoreDir, "templates"), path11.join(rrceHome, "templates"));
|
|
1634
|
+
copyDirRecursive(path11.join(agentCoreDir, "docs"), path11.join(rrceHome, "docs"));
|
|
1629
1635
|
const needsIDEPrompts = config.storageMode === "workspace" && (config.tools.includes("copilot") || config.tools.includes("antigravity")) || config.tools.includes("opencode");
|
|
1630
1636
|
if (needsIDEPrompts) {
|
|
1631
1637
|
const prompts = loadPromptsFromDir(getAgentCorePromptsDir());
|
|
@@ -2549,6 +2555,7 @@ var init_resources2 = __esm({
|
|
|
2549
2555
|
});
|
|
2550
2556
|
|
|
2551
2557
|
// src/mcp/prompts.ts
|
|
2558
|
+
import * as path16 from "path";
|
|
2552
2559
|
function getAllPrompts() {
|
|
2553
2560
|
const prompts = loadPromptsFromDir(getAgentCorePromptsDir());
|
|
2554
2561
|
return prompts.map((p) => {
|
|
@@ -2585,6 +2592,40 @@ function getPromptDef(name) {
|
|
|
2585
2592
|
(p) => p.name === name || p.id === name || p.name.toLowerCase() === search || p.id.toLowerCase() === search
|
|
2586
2593
|
);
|
|
2587
2594
|
}
|
|
2595
|
+
function renderPromptWithContext(content, args) {
|
|
2596
|
+
const renderArgs = { ...args };
|
|
2597
|
+
const activeProject = detectActiveProject();
|
|
2598
|
+
const DEFAULT_RRCE_HOME = getEffectiveGlobalPath();
|
|
2599
|
+
let resolvedRrceData = ".rrce-workflow/";
|
|
2600
|
+
let resolvedRrceHome = DEFAULT_RRCE_HOME;
|
|
2601
|
+
let resolvedWorkspaceRoot = process.cwd();
|
|
2602
|
+
let resolvedWorkspaceName = "current-project";
|
|
2603
|
+
if (activeProject) {
|
|
2604
|
+
resolvedRrceData = activeProject.dataPath;
|
|
2605
|
+
if (!resolvedRrceData.endsWith("/") && !resolvedRrceData.endsWith("\\")) {
|
|
2606
|
+
resolvedRrceData += "/";
|
|
2607
|
+
}
|
|
2608
|
+
resolvedWorkspaceRoot = activeProject.sourcePath || activeProject.path || activeProject.dataPath;
|
|
2609
|
+
resolvedWorkspaceName = activeProject.name;
|
|
2610
|
+
if (activeProject.source === "global") {
|
|
2611
|
+
const workspacesDir = path16.dirname(activeProject.dataPath);
|
|
2612
|
+
resolvedRrceHome = path16.dirname(workspacesDir);
|
|
2613
|
+
}
|
|
2614
|
+
}
|
|
2615
|
+
if (!renderArgs["RRCE_DATA"]) renderArgs["RRCE_DATA"] = resolvedRrceData;
|
|
2616
|
+
if (!renderArgs["RRCE_HOME"]) renderArgs["RRCE_HOME"] = resolvedRrceHome;
|
|
2617
|
+
if (!renderArgs["WORKSPACE_ROOT"]) renderArgs["WORKSPACE_ROOT"] = resolvedWorkspaceRoot;
|
|
2618
|
+
if (!renderArgs["WORKSPACE_NAME"]) renderArgs["WORKSPACE_NAME"] = resolvedWorkspaceName;
|
|
2619
|
+
return {
|
|
2620
|
+
rendered: renderPrompt(content, renderArgs),
|
|
2621
|
+
context: {
|
|
2622
|
+
RRCE_DATA: resolvedRrceData,
|
|
2623
|
+
RRCE_HOME: resolvedRrceHome,
|
|
2624
|
+
WORKSPACE_ROOT: resolvedWorkspaceRoot,
|
|
2625
|
+
WORKSPACE_NAME: resolvedWorkspaceName
|
|
2626
|
+
}
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2588
2629
|
function renderPrompt(content, args) {
|
|
2589
2630
|
let rendered = content;
|
|
2590
2631
|
for (const [key, val] of Object.entries(args)) {
|
|
@@ -2596,6 +2637,8 @@ var init_prompts2 = __esm({
|
|
|
2596
2637
|
"src/mcp/prompts.ts"() {
|
|
2597
2638
|
"use strict";
|
|
2598
2639
|
init_prompts();
|
|
2640
|
+
init_resources();
|
|
2641
|
+
init_paths();
|
|
2599
2642
|
}
|
|
2600
2643
|
});
|
|
2601
2644
|
|
|
@@ -2737,9 +2780,17 @@ Available projects: ${projects}`;
|
|
|
2737
2780
|
for (const [key, val] of Object.entries(renderArgs)) {
|
|
2738
2781
|
stringArgs[key] = String(val);
|
|
2739
2782
|
}
|
|
2740
|
-
const
|
|
2741
|
-
|
|
2742
|
-
|
|
2783
|
+
const { rendered, context } = renderPromptWithContext(promptDef.content, stringArgs);
|
|
2784
|
+
let contextPreamble = getContextPreamble();
|
|
2785
|
+
contextPreamble += `
|
|
2786
|
+
### System Resolved Paths (OVERRIDE)
|
|
2787
|
+
The system has pre-resolved the configuration for this project. Use these values instead of manual resolution:
|
|
2788
|
+
- **RRCE_DATA**: \`${context.RRCE_DATA}\` (Stores knowledge, tasks, refs)
|
|
2789
|
+
- **WORKSPACE_ROOT**: \`${context.WORKSPACE_ROOT}\` (Source code location)
|
|
2790
|
+
- **RRCE_HOME**: \`${context.RRCE_HOME}\`
|
|
2791
|
+
- **Current Project**: ${context.WORKSPACE_NAME}
|
|
2792
|
+
`;
|
|
2793
|
+
return { content: [{ type: "text", text: contextPreamble + rendered }] };
|
|
2743
2794
|
}
|
|
2744
2795
|
case "help_setup": {
|
|
2745
2796
|
const msg = `
|
|
@@ -2777,7 +2828,6 @@ import {
|
|
|
2777
2828
|
ListPromptsRequestSchema,
|
|
2778
2829
|
GetPromptRequestSchema
|
|
2779
2830
|
} from "@modelcontextprotocol/sdk/types.js";
|
|
2780
|
-
import * as path16 from "path";
|
|
2781
2831
|
function registerPromptHandlers(server) {
|
|
2782
2832
|
server.setRequestHandler(ListPromptsRequestSchema, async () => {
|
|
2783
2833
|
logger.debug("Listing prompts");
|
|
@@ -2812,34 +2862,15 @@ function registerPromptHandlers(server) {
|
|
|
2812
2862
|
for (const [key, val] of Object.entries(providedArgs)) {
|
|
2813
2863
|
renderArgs[key] = String(val);
|
|
2814
2864
|
}
|
|
2815
|
-
const
|
|
2816
|
-
const DEFAULT_RRCE_HOME = getEffectiveGlobalPath();
|
|
2817
|
-
let resolvedRrceData = ".rrce-workflow/";
|
|
2818
|
-
let resolvedRrceHome = DEFAULT_RRCE_HOME;
|
|
2819
|
-
let resolvedWorkspaceRoot = process.cwd();
|
|
2820
|
-
let resolvedWorkspaceName = "current-project";
|
|
2821
|
-
if (activeProject) {
|
|
2822
|
-
resolvedRrceData = activeProject.dataPath + "/";
|
|
2823
|
-
resolvedWorkspaceRoot = activeProject.sourcePath || activeProject.path || activeProject.dataPath;
|
|
2824
|
-
resolvedWorkspaceName = activeProject.name;
|
|
2825
|
-
if (activeProject.source === "global") {
|
|
2826
|
-
const workspacesDir = path16.dirname(activeProject.dataPath);
|
|
2827
|
-
resolvedRrceHome = path16.dirname(workspacesDir);
|
|
2828
|
-
}
|
|
2829
|
-
}
|
|
2830
|
-
if (!renderArgs["RRCE_DATA"]) renderArgs["RRCE_DATA"] = resolvedRrceData;
|
|
2831
|
-
if (!renderArgs["RRCE_HOME"]) renderArgs["RRCE_HOME"] = resolvedRrceHome;
|
|
2832
|
-
if (!renderArgs["WORKSPACE_ROOT"]) renderArgs["WORKSPACE_ROOT"] = resolvedWorkspaceRoot;
|
|
2833
|
-
if (!renderArgs["WORKSPACE_NAME"]) renderArgs["WORKSPACE_NAME"] = resolvedWorkspaceName;
|
|
2834
|
-
const content = renderPrompt(promptDef.content, renderArgs);
|
|
2865
|
+
const { rendered, context } = renderPromptWithContext(promptDef.content, renderArgs);
|
|
2835
2866
|
let contextPreamble = getContextPreamble();
|
|
2836
2867
|
contextPreamble += `
|
|
2837
2868
|
### System Resolved Paths (OVERRIDE)
|
|
2838
2869
|
The system has pre-resolved the configuration for this project. Use these values instead of manual resolution:
|
|
2839
|
-
- **RRCE_DATA**: \`${
|
|
2840
|
-
- **WORKSPACE_ROOT**: \`${
|
|
2841
|
-
- **RRCE_HOME**: \`${
|
|
2842
|
-
- **Current Project**: ${
|
|
2870
|
+
- **RRCE_DATA**: \`${context.RRCE_DATA}\` (Stores knowledge, tasks, refs)
|
|
2871
|
+
- **WORKSPACE_ROOT**: \`${context.WORKSPACE_ROOT}\` (Source code location)
|
|
2872
|
+
- **RRCE_HOME**: \`${context.RRCE_HOME}\`
|
|
2873
|
+
- **Current Project**: ${context.WORKSPACE_NAME}
|
|
2843
2874
|
`;
|
|
2844
2875
|
return {
|
|
2845
2876
|
messages: [
|
|
@@ -2847,7 +2878,7 @@ The system has pre-resolved the configuration for this project. Use these values
|
|
|
2847
2878
|
role: "user",
|
|
2848
2879
|
content: {
|
|
2849
2880
|
type: "text",
|
|
2850
|
-
text: contextPreamble +
|
|
2881
|
+
text: contextPreamble + rendered
|
|
2851
2882
|
}
|
|
2852
2883
|
}
|
|
2853
2884
|
]
|