rrce-workflow 0.2.61 → 0.2.63
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/README.md +77 -277
- package/dist/index.js +25 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,197 +1,71 @@
|
|
|
1
1
|
# RRCE-Workflow
|
|
2
2
|
|
|
3
|
-
> Agentic code workflow generator for AI-assisted development
|
|
3
|
+
> **Agentic code workflow generator for AI-assisted development**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/rrce-workflow)
|
|
6
6
|
[](https://opensource.org/licenses/MIT)
|
|
7
7
|
|
|
8
|
-
RRCE-Workflow is a
|
|
8
|
+
RRCE-Workflow is a tool that turns your AI coding assistant (GitHub Copilot, Claude Desktop, Antigravity IDE, etc.) into a **context-aware agent**.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Or install globally
|
|
17
|
-
npm install -g rrce-workflow
|
|
18
|
-
```
|
|
10
|
+
It standardizes how AI agents understand your project through:
|
|
11
|
+
1. **Global Knowledge Base**: Centralized context management across all your projects.
|
|
12
|
+
2. **MCP Hub**: A Model Context Protocol server that exposes your code and knowledge to any MCP-compatible client.
|
|
13
|
+
3. **Semantic Search (RAG)**: Local, privacy-first vector indexing for deep codebase understanding.
|
|
14
|
+
4. **Structured Agent Pipelines**: Reusable prompts for Research, Planning, Execution, and Documentation.
|
|
19
15
|
|
|
20
16
|
---
|
|
21
17
|
|
|
22
|
-
##
|
|
18
|
+
## 🚀 Quick Start
|
|
23
19
|
|
|
24
|
-
### 1.
|
|
20
|
+
### 1. The MCP Dashboard (TUI)
|
|
25
21
|
|
|
26
|
-
|
|
22
|
+
The central command center for RRCE-Workflow is the **MCP Dashboard**. It lets you manage your projects, server status, and IDE integrations.
|
|
27
23
|
|
|
28
24
|
```bash
|
|
29
|
-
|
|
30
|
-
npx rrce-workflow
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
The wizard will:
|
|
34
|
-
1. Ask where to store workflow data (global or workspace)
|
|
35
|
-
2. Let you choose a custom global path if the default isn't writable
|
|
36
|
-
3. Ask which AI tools you use (GitHub Copilot, Antigravity)
|
|
37
|
-
4. Set up prompts and knowledge folders
|
|
38
|
-
|
|
39
|
-
### 2. Using the Agent Prompts
|
|
40
|
-
|
|
41
|
-
After setup, you'll have agent prompts in IDE-specific folders:
|
|
42
|
-
|
|
43
|
-
- **GitHub Copilot**: `.github/agents/*.agent.md`
|
|
44
|
-
- **Antigravity**: `.agent/workflows/*.md`
|
|
45
|
-
|
|
46
|
-
In your AI assistant, invoke prompts using their names:
|
|
47
|
-
|
|
48
|
-
| Agent | Invoke With | What It Does |
|
|
49
|
-
|-------|-------------|--------------|
|
|
50
|
-
| **Init** | `/init` | Analyze your codebase and create `project-context.md` |
|
|
51
|
-
| **Research** | `/research REQUEST="..." TASK_SLUG=my-task` | Clarify requirements, create research brief |
|
|
52
|
-
| **Planning** | `/plan TASK_SLUG=my-task` | Create actionable execution plan |
|
|
53
|
-
| **Execute** | `/execute TASK_SLUG=my-task` | Implement the planned work |
|
|
54
|
-
| **Docs** | `/docs DOC_TYPE=architecture` | Generate documentation |
|
|
55
|
-
| **Sync** | `/sync` | Update knowledge base after code changes |
|
|
56
|
-
|
|
57
|
-
### 3. Recommended Workflow (RRCE Pipeline)
|
|
58
|
-
|
|
59
|
-
```
|
|
60
|
-
1. /init → Establish project context
|
|
61
|
-
2. /research → Clarify requirements for a new task
|
|
62
|
-
3. /plan → Create execution plan
|
|
63
|
-
4. /execute → Implement the plan
|
|
64
|
-
5. /docs → Generate documentation (optional)
|
|
65
|
-
6. /sync → Keep knowledge base current (periodic)
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
#### Pipeline Stages Explained
|
|
69
|
-
|
|
70
|
-
**🔍 Init** — Scans your codebase to understand tech stack, architecture, coding conventions, and project structure. Creates `project-context.md` that all other agents rely on. Run once at project start, and again when major changes occur.
|
|
71
|
-
|
|
72
|
-
**💬 Research** — Entry point for new tasks. Takes a user request and engages in clarifying discussion to refine scope, surface risks, and identify gaps. Produces a research brief for the Planning agent.
|
|
73
|
-
|
|
74
|
-
**📋 Planning** — Transforms the research brief into an ordered, actionable execution plan. Breaks work into tasks with dependencies, acceptance criteria, and testing strategy. Ensures the Executor has clear guidance.
|
|
75
|
-
|
|
76
|
-
**⚡ Execute** — Implements the planned work. Writes code, adds tests, runs verifications. Updates task metadata and logs execution notes for auditability.
|
|
77
|
-
|
|
78
|
-
**📄 Docs** — Synthesizes the completed work into documentation. Can generate API docs, architecture overviews, runbooks, or changelogs based on `DOC_TYPE`.
|
|
79
|
-
|
|
80
|
-
**🔄 Sync** — Maintenance agent that reconciles the knowledge base with actual code. Run periodically to catch drift and keep documentation accurate.
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
## How It Works
|
|
85
|
-
|
|
86
|
-
### Path Resolution
|
|
87
|
-
|
|
88
|
-
All agents read `.rrce-workflow/config.yaml` to resolve paths:
|
|
89
|
-
|
|
90
|
-
```yaml
|
|
91
|
-
storage:
|
|
92
|
-
mode: workspace # or: global
|
|
93
|
-
globalPath: "~/.rrce-workflow" # optional custom path
|
|
94
|
-
|
|
95
|
-
project:
|
|
96
|
-
name: "my-project"
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Agents resolve `{{RRCE_DATA}}` based on storage mode:
|
|
100
|
-
- `global` → `~/.rrce-workflow/workspaces/my-project/`
|
|
101
|
-
|
|
102
|
-
### Cross-Project References
|
|
103
|
-
|
|
104
|
-
When using `global` mode, you can reference other projects:
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
~/.rrce-workflow/workspaces/other-project/knowledge/project-context.md
|
|
25
|
+
npx rrce-workflow mcp
|
|
108
26
|
```
|
|
109
27
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
28
|
+
From this dashboard, you can:
|
|
29
|
+
- **Manage Projects**: Toggle which projects are exposed to your AI agents.
|
|
30
|
+
- **Monitor Status**: See the health of the MCP server and RAG indexing.
|
|
31
|
+
- **Install to IDE**: Automatically configure **VSCode** or **Claude Desktop** to use the RRCE MCP server.
|
|
32
|
+
- **View Logs**: Debug agent interactions in real-time.
|
|
113
33
|
|
|
114
|
-
|
|
34
|
+
### 2. Setting Up a Project
|
|
115
35
|
|
|
116
|
-
|
|
36
|
+
To enable agent workflows for your current project, run the setup wizard:
|
|
117
37
|
|
|
38
|
+
```bash
|
|
39
|
+
cd your-project
|
|
40
|
+
npx rrce-workflow
|
|
118
41
|
```
|
|
119
|
-
your-project/
|
|
120
|
-
├── .rrce-workflow/ # Data storage
|
|
121
|
-
│ ├── config.yaml # Configuration
|
|
122
|
-
│ ├── knowledge/ # Project context
|
|
123
|
-
│ ├── refs/ # External references
|
|
124
|
-
│ ├── tasks/ # Task artifacts by slug
|
|
125
|
-
│ └── templates/ # Output templates
|
|
126
|
-
├── .github/agents/ # GitHub Copilot prompts
|
|
127
|
-
│ └── *.agent.md
|
|
128
|
-
└── .agent/workflows/ # Antigravity prompts
|
|
129
|
-
└── *.md
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
---
|
|
133
|
-
|
|
134
|
-
## Wizard Options
|
|
135
|
-
|
|
136
|
-
When you run the wizard on an already-configured project, you'll see:
|
|
137
|
-
|
|
138
|
-
| Option | Description |
|
|
139
|
-
|--------|-------------|
|
|
140
|
-
| **Link other project knowledge** | Reference knowledge from other projects in global storage |
|
|
141
|
-
| **Sync to global storage** | Copy workspace data to global (enables cross-project access) |
|
|
142
|
-
| **Update from package** | Get latest prompts and templates |
|
|
143
|
-
| **Reconfigure project** | Change storage mode, selected tools, or linked projects without resetting |
|
|
144
|
-
|
|
145
|
-
---
|
|
146
|
-
|
|
147
|
-
## Storage Mode Comparison
|
|
148
|
-
|
|
149
|
-
| Mode | Location | Best For |
|
|
150
|
-
|------|----------|----------|
|
|
151
|
-
| `global` | `~/.rrce-workflow/workspaces/<name>/` | Clean workspace, cross-project references |
|
|
152
|
-
| `workspace` | `.rrce-workflow/` | Team sharing, portable with repo |
|
|
153
42
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
## Custom Global Path
|
|
43
|
+
You can choose between:
|
|
157
44
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
```
|
|
45
|
+
* **⚡ Express Setup**: Configures the project using recommended defaults:
|
|
46
|
+
* **Global Storage**: Keeps your project directory clean; config lives in `~/.rrce-workflow/`.
|
|
47
|
+
* **MCP Enabled**: Exposes the project to your AI tools via the local server.
|
|
48
|
+
* **RAG Enabled**: Indexes your code for semantic search.
|
|
49
|
+
|
|
50
|
+
* **⚙️ Custom Setup**: Full control over storage location (Global vs Workspace), tool selection, and more.
|
|
165
51
|
|
|
166
52
|
---
|
|
167
53
|
|
|
168
|
-
##
|
|
169
|
-
|
|
170
|
-
RRCE-Workflow includes an **MCP (Model Context Protocol) Hub** that exposes your project knowledge to AI assistants like **VSCode Copilot** and **Claude Desktop**.
|
|
171
|
-
|
|
172
|
-
### Quick Start
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
# Start the MCP Hub
|
|
176
|
-
npx rrce-workflow mcp
|
|
177
|
-
|
|
178
|
-
# Or run directly
|
|
179
|
-
npx rrce-workflow mcp start
|
|
180
|
-
```
|
|
54
|
+
## 🧠 Model Context Protocol (MCP)
|
|
181
55
|
|
|
182
|
-
|
|
56
|
+
RRCE-Workflow uses the [Model Context Protocol](https://modelcontextprotocol.io/) to bridge your codebase with AI models. This allows your AI assistant to "see" your project context without needing to manually copy-paste files.
|
|
183
57
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
| **Search across projects** | Search knowledge bases across all exposed projects |
|
|
189
|
-
| **Selective exposure** | Choose which projects to expose via interactive TUI |
|
|
58
|
+
### Features
|
|
59
|
+
* **Universal Context**: Access your project's `project-context.md`, architecture docs, and task history from *any* MCP-enabled tool.
|
|
60
|
+
* **Cross-Project References**: Your AI can read documentation from Project A while working on Project B (perfect for monorepos or microservices).
|
|
61
|
+
* **Tools & Resources**: Exposes tools like `search_knowledge` and `get_project_context` directly to the model.
|
|
190
62
|
|
|
191
|
-
###
|
|
63
|
+
### Connecting Your IDE
|
|
192
64
|
|
|
193
|
-
|
|
65
|
+
The easiest way to connect is via the TUI (`npx rrce-workflow mcp` -> **Install** tab), but you can also configure it manually.
|
|
194
66
|
|
|
67
|
+
#### VSCode (with MCP Extension)
|
|
68
|
+
Add to `.vscode/mcp.json`:
|
|
195
69
|
```json
|
|
196
70
|
{
|
|
197
71
|
"servers": {
|
|
@@ -204,13 +78,8 @@ npx rrce-workflow mcp start
|
|
|
204
78
|
}
|
|
205
79
|
```
|
|
206
80
|
|
|
207
|
-
|
|
208
|
-
3. Click the 🔧 tools icon to see RRCE resources, tools, and prompts
|
|
209
|
-
|
|
210
|
-
### Claude Desktop Setup
|
|
211
|
-
|
|
81
|
+
#### Claude Desktop
|
|
212
82
|
Add to `~/.config/claude/claude_desktop_config.json`:
|
|
213
|
-
|
|
214
83
|
```json
|
|
215
84
|
{
|
|
216
85
|
"mcpServers": {
|
|
@@ -222,133 +91,64 @@ Add to `~/.config/claude/claude_desktop_config.json`:
|
|
|
222
91
|
}
|
|
223
92
|
```
|
|
224
93
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
**Resources:**
|
|
228
|
-
- `rrce://projects` — List all exposed projects
|
|
229
|
-
- `rrce://projects/{name}/context` — Get project context
|
|
230
|
-
- `rrce://projects/{name}/tasks` — Get task list
|
|
231
|
-
|
|
232
|
-
**Tools:**
|
|
233
|
-
- `search_knowledge` — Search across all project knowledge bases
|
|
234
|
-
- `list_projects` — List exposed projects
|
|
235
|
-
- `get_project_context` — Get specific project context
|
|
236
|
-
|
|
237
|
-
**Prompts:**
|
|
238
|
-
- `init`, `research`, `plan`, `execute`, `docs`, `sync` — Full RRCE pipeline
|
|
239
|
-
|
|
240
|
-
### Using Agent Prompts via MCP
|
|
241
|
-
|
|
242
|
-
Once the MCP server is connected, you can invoke RRCE agent prompts directly:
|
|
243
|
-
|
|
244
|
-
#### In VSCode Copilot (Agent Mode)
|
|
245
|
-
|
|
246
|
-
```
|
|
247
|
-
# Initialize project context
|
|
248
|
-
@rrce Use the init prompt to analyze this codebase
|
|
249
|
-
|
|
250
|
-
# Start a new task
|
|
251
|
-
@rrce Use the research prompt with REQUEST="add user authentication" and TASK_SLUG="auth-feature"
|
|
252
|
-
|
|
253
|
-
# Create execution plan
|
|
254
|
-
@rrce Use the plan prompt for TASK_SLUG="auth-feature"
|
|
255
|
-
|
|
256
|
-
# Execute the plan
|
|
257
|
-
@rrce Use the execute prompt for TASK_SLUG="auth-feature"
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
#### In Claude Desktop
|
|
261
|
-
|
|
262
|
-
```
|
|
263
|
-
Use the RRCE init prompt to analyze the current project
|
|
264
|
-
|
|
265
|
-
Search my RRCE projects for "authentication"
|
|
266
|
-
|
|
267
|
-
Use the research prompt with these arguments:
|
|
268
|
-
- REQUEST: "Add OAuth2 login"
|
|
269
|
-
- TASK_SLUG: "oauth-login"
|
|
270
|
-
```
|
|
271
|
-
|
|
272
|
-
#### In Other MCP-Compatible Tools (Cursor, etc.)
|
|
273
|
-
|
|
274
|
-
Most MCP clients follow similar patterns:
|
|
275
|
-
1. Connect to the RRCE MCP server via stdio
|
|
276
|
-
2. Use `list_prompts` to see available prompts
|
|
277
|
-
3. Call prompts with required arguments
|
|
278
|
-
|
|
279
|
-
**Example prompt arguments:**
|
|
94
|
+
---
|
|
280
95
|
|
|
281
|
-
|
|
282
|
-
|--------|---------------|---------------|
|
|
283
|
-
| `init` | — | `PROJECT_NAME` |
|
|
284
|
-
| `research` | `REQUEST`, `TASK_SLUG` | `TITLE` |
|
|
285
|
-
| `plan` | `TASK_SLUG` | — |
|
|
286
|
-
| `execute` | `TASK_SLUG` | `BRANCH` |
|
|
287
|
-
| `docs` | `DOC_TYPE` | `TASK_SLUG` |
|
|
288
|
-
| `sync` | — | `SCOPE` |
|
|
96
|
+
## 📂 Storage Modes
|
|
289
97
|
|
|
290
|
-
|
|
98
|
+
RRCE-Workflow supports two ways to store your agent workflow data (`knowledge/`, `tasks/`, `refs/`).
|
|
291
99
|
|
|
292
|
-
|
|
100
|
+
### 1. Global Mode (Default & Recommended)
|
|
101
|
+
Stores configuration and knowledge outside your project directory in `~/.rrce-workflow/workspaces/<project-name>`.
|
|
293
102
|
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
npx rrce-workflow mcp status # View current status
|
|
297
|
-
```
|
|
103
|
+
* **✅ Pros**: Keeps your repo clean, easy cross-project linking, no `.gitignore` pollution.
|
|
104
|
+
* **❌ Cons**: Knowledge isn't checked into your project's git repo (unless you manually sync/backup).
|
|
298
105
|
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
- `i`: Open **IDE Installation** modal (Auto-configure VSCode/Claude)
|
|
302
|
-
- `r`: Reload configuration
|
|
303
|
-
- `c`: Clear logs
|
|
304
|
-
- `?`: Toggle Help & Shortcuts
|
|
106
|
+
### 2. Workspace Mode (Alternative)
|
|
107
|
+
Stores everything in a `.rrce-workflow` folder inside your project root.
|
|
305
108
|
|
|
306
|
-
|
|
307
|
-
|
|
109
|
+
* **✅ Pros**: Knowledge travels with the repo (great for teams sharing context).
|
|
110
|
+
* **❌ Cons**: Adds files to your project tree; requires `.gitignore` management.
|
|
308
111
|
|
|
309
|
-
|
|
112
|
+
**To use Workspace Mode**: Select "Custom Setup" -> "Workspace" when running `npx rrce-workflow`.
|
|
310
113
|
|
|
311
114
|
---
|
|
312
115
|
|
|
313
|
-
##
|
|
314
|
-
|
|
315
|
-
- **Node.js 18+**
|
|
316
|
-
- **Git** (for user detection)
|
|
317
|
-
|
|
318
|
-
---
|
|
116
|
+
## 🤖 The Agent Pipeline
|
|
319
117
|
|
|
320
|
-
|
|
118
|
+
Once installed, you gain access to powerful agent workflows. Invoke them using your AI assistant's chat interface (if supported) or by pasting the prompts.
|
|
321
119
|
|
|
322
|
-
|
|
120
|
+
| Agent | Purpose | Recommended Use |
|
|
121
|
+
|-------|---------|-----------------|
|
|
122
|
+
| **Init** | **Context Establishment** | Run once at project start to analyze tech stack & architecture. |
|
|
123
|
+
| **Research** | **Scope Definition** | Use when starting a complex feature to clarify requirements & risks. |
|
|
124
|
+
| **Planning** | **Execution Strategy** | Generates a step-by-step implementation plan (checklist). |
|
|
125
|
+
| **Execute** | **Implementation** | The "coding" phase. Implements the plan created by the Planning agent. |
|
|
126
|
+
| **Docs** | **Documentation** | Generates tailored docs (API refs, guides) from code. |
|
|
127
|
+
| **Sync** | **Knowledge Maintenance** | Scans code changes to update the `knowledge/` folder. |
|
|
323
128
|
|
|
324
|
-
|
|
129
|
+
### Recommended Workflow
|
|
130
|
+
1. **`/init`**: "Analyze this codebase." -> Creates `project-context.md`.
|
|
131
|
+
2. **`/research`**: "I need to add user auth." -> Generates a Research Brief.
|
|
132
|
+
3. **`/plan`**: "Create a plan for user auth." -> Generates an Implementation Plan.
|
|
133
|
+
4. **`/execute`**: "Implement the auth plan." -> Writes code across files.
|
|
134
|
+
5. **`/sync`**: "Update knowledge." -> Refreshes context for the next task.
|
|
325
135
|
|
|
326
|
-
|
|
327
|
-
export RRCE_HOME=/path/to/writable/location
|
|
328
|
-
npx rrce-workflow
|
|
329
|
-
```
|
|
136
|
+
---
|
|
330
137
|
|
|
331
|
-
|
|
138
|
+
## 🔍 Semantic Search (RAG)
|
|
332
139
|
|
|
333
|
-
|
|
140
|
+
RRCE-Workflow includes a local, embedding-based search engine.
|
|
141
|
+
- **Privacy First**: All embeddings are calculated locally on your CPU/GPU. No code leaves your machine.
|
|
142
|
+
- **Smart Context**: Allows the agent to find relevant code snippets via natural language queries (e.g., "Find the authentication middleware logic") even if keywords don't match exactly.
|
|
334
143
|
|
|
335
|
-
|
|
144
|
+
RAG is enabled by default in Express Setup. You can toggle it per-project in the MCP Dashboard.
|
|
336
145
|
|
|
337
|
-
|
|
338
|
-
npx rrce-workflow
|
|
339
|
-
# Select "Update from package"
|
|
340
|
-
```
|
|
341
|
-
|
|
342
|
-
### MCP server not connecting
|
|
343
|
-
|
|
344
|
-
Ensure the server starts successfully:
|
|
345
|
-
```bash
|
|
346
|
-
npx rrce-workflow mcp start
|
|
347
|
-
```
|
|
146
|
+
---
|
|
348
147
|
|
|
349
|
-
|
|
148
|
+
## requirements
|
|
350
149
|
|
|
351
|
-
|
|
150
|
+
- **Node.js 18+**
|
|
151
|
+
- **Git**
|
|
352
152
|
|
|
353
153
|
## License
|
|
354
154
|
|
package/dist/index.js
CHANGED
|
@@ -209,15 +209,20 @@ function scanGlobalStorage(excludeWorkspace) {
|
|
|
209
209
|
const knowledgePath = path2.join(projectDataPath, "knowledge");
|
|
210
210
|
const refsPath = path2.join(projectDataPath, "refs");
|
|
211
211
|
const tasksPath = path2.join(projectDataPath, "tasks");
|
|
212
|
+
const configPath = path2.join(projectDataPath, "config.yaml");
|
|
213
|
+
const config = parseWorkspaceConfig(configPath);
|
|
212
214
|
projects.push({
|
|
213
|
-
name: entry.name,
|
|
215
|
+
name: config?.name || entry.name,
|
|
214
216
|
path: projectDataPath,
|
|
215
|
-
//
|
|
217
|
+
// Still use dataPath as defaults, BUT...
|
|
218
|
+
sourcePath: config?.sourcePath,
|
|
219
|
+
// ...expose sourcePath if available
|
|
216
220
|
dataPath: projectDataPath,
|
|
217
221
|
source: "global",
|
|
218
222
|
knowledgePath: fs2.existsSync(knowledgePath) ? knowledgePath : void 0,
|
|
219
223
|
refsPath: fs2.existsSync(refsPath) ? refsPath : void 0,
|
|
220
|
-
tasksPath: fs2.existsSync(tasksPath) ? tasksPath : void 0
|
|
224
|
+
tasksPath: fs2.existsSync(tasksPath) ? tasksPath : void 0,
|
|
225
|
+
semanticSearchEnabled: config?.semanticSearchEnabled
|
|
221
226
|
});
|
|
222
227
|
}
|
|
223
228
|
} catch {
|
|
@@ -254,7 +259,8 @@ function scanHomeDirectory(excludePath) {
|
|
|
254
259
|
storageMode: config?.storageMode,
|
|
255
260
|
knowledgePath: fs2.existsSync(knowledgePath) ? knowledgePath : void 0,
|
|
256
261
|
refsPath: fs2.existsSync(refsPath) ? refsPath : void 0,
|
|
257
|
-
tasksPath: fs2.existsSync(tasksPath) ? tasksPath : void 0
|
|
262
|
+
tasksPath: fs2.existsSync(tasksPath) ? tasksPath : void 0,
|
|
263
|
+
semanticSearchEnabled: config?.semanticSearchEnabled
|
|
258
264
|
});
|
|
259
265
|
}
|
|
260
266
|
continue;
|
|
@@ -273,6 +279,7 @@ function parseWorkspaceConfig(configPath) {
|
|
|
273
279
|
try {
|
|
274
280
|
const content = fs2.readFileSync(configPath, "utf-8");
|
|
275
281
|
const nameMatch = content.match(/name:\s*["']?([^"'\n]+)["']?/);
|
|
282
|
+
const sourcePathMatch = content.match(/sourcePath:\s*["']?([^"'\n]+)["']?/);
|
|
276
283
|
const modeMatch = content.match(/mode:\s*(global|workspace)/);
|
|
277
284
|
const linkedProjects = [];
|
|
278
285
|
const linkedMatch = content.match(/linked_projects:\s*\n((?:\s+-\s+[^\n]+\n?)+)/);
|
|
@@ -285,10 +292,14 @@ function parseWorkspaceConfig(configPath) {
|
|
|
285
292
|
}
|
|
286
293
|
}
|
|
287
294
|
}
|
|
295
|
+
const semanticSearchMatch = content.match(/semantic_search:\s*\n\s*enabled:\s*(true|false)/);
|
|
296
|
+
const semanticSearchEnabled = semanticSearchMatch ? semanticSearchMatch[1] === "true" : false;
|
|
288
297
|
return {
|
|
289
298
|
name: nameMatch?.[1]?.trim() || path2.basename(path2.dirname(path2.dirname(configPath))),
|
|
299
|
+
sourcePath: sourcePathMatch?.[1]?.trim(),
|
|
290
300
|
storageMode: modeMatch?.[1] || "global",
|
|
291
|
-
linkedProjects: linkedProjects.length > 0 ? linkedProjects : void 0
|
|
301
|
+
linkedProjects: linkedProjects.length > 0 ? linkedProjects : void 0,
|
|
302
|
+
semanticSearchEnabled
|
|
292
303
|
};
|
|
293
304
|
} catch {
|
|
294
305
|
return null;
|
|
@@ -1210,6 +1221,7 @@ storage:
|
|
|
1210
1221
|
|
|
1211
1222
|
project:
|
|
1212
1223
|
name: "${workspaceName}"
|
|
1224
|
+
sourcePath: "${workspacePath}"
|
|
1213
1225
|
|
|
1214
1226
|
tools:
|
|
1215
1227
|
copilot: ${config.storageMode === "workspace" && config.tools.includes("copilot")}
|
|
@@ -1827,11 +1839,12 @@ async function indexKnowledge(projectName, force = false) {
|
|
|
1827
1839
|
}
|
|
1828
1840
|
const projConfig = config.projects.find(
|
|
1829
1841
|
(p) => p.path && p.path === project.dataPath || !p.path && p.name === project.name
|
|
1830
|
-
);
|
|
1831
|
-
|
|
1842
|
+
) || (project.source === "global" ? { semanticSearch: { enabled: true, model: "Xenova/all-MiniLM-L6-v2" } } : void 0);
|
|
1843
|
+
const isEnabled = projConfig?.semanticSearch?.enabled || project.semanticSearchEnabled;
|
|
1844
|
+
if (!isEnabled) {
|
|
1832
1845
|
return { success: false, message: "Semantic Search is not enabled for this project", filesIndexed: 0, filesSkipped: 0 };
|
|
1833
1846
|
}
|
|
1834
|
-
const scanRoot = project.path || project.dataPath;
|
|
1847
|
+
const scanRoot = project.sourcePath || project.path || project.dataPath;
|
|
1835
1848
|
if (!fs13.existsSync(scanRoot)) {
|
|
1836
1849
|
return { success: false, message: "Project root not found", filesIndexed: 0, filesSkipped: 0 };
|
|
1837
1850
|
}
|
|
@@ -1876,7 +1889,8 @@ async function indexKnowledge(projectName, force = false) {
|
|
|
1876
1889
|
const SKIP_DIRS = ["node_modules", ".git", "dist", "build", ".next", "__pycache__", "venv", ".venv", "target", "vendor"];
|
|
1877
1890
|
try {
|
|
1878
1891
|
const indexPath = path14.join(project.knowledgePath || path14.join(scanRoot, ".rrce-workflow", "knowledge"), "embeddings.json");
|
|
1879
|
-
const
|
|
1892
|
+
const model = projConfig?.semanticSearch?.model || "Xenova/all-MiniLM-L6-v2";
|
|
1893
|
+
const rag = new RAGService(indexPath, model);
|
|
1880
1894
|
let indexed = 0;
|
|
1881
1895
|
let skipped = 0;
|
|
1882
1896
|
const scanDir = async (dir) => {
|
|
@@ -3194,7 +3208,7 @@ var init_IndexingStatus = __esm({
|
|
|
3194
3208
|
if (!projConfig && project.source === "global") {
|
|
3195
3209
|
projConfig = config.projects.find((p) => p.name === project.name);
|
|
3196
3210
|
}
|
|
3197
|
-
const enabled = projConfig?.semanticSearch?.enabled
|
|
3211
|
+
const enabled = projConfig?.semanticSearch?.enabled || project.semanticSearchEnabled || false;
|
|
3198
3212
|
if (!enabled) {
|
|
3199
3213
|
newStats.push({
|
|
3200
3214
|
projectName: project.name,
|
|
@@ -3362,7 +3376,7 @@ var init_App = __esm({
|
|
|
3362
3376
|
const isRAGEnabled = useMemo2(() => {
|
|
3363
3377
|
return exposedProjects.some((p) => {
|
|
3364
3378
|
const cfg = findProjectConfig(config, { name: p.name, path: p.path });
|
|
3365
|
-
return cfg?.semanticSearch?.enabled;
|
|
3379
|
+
return cfg?.semanticSearch?.enabled || p.semanticSearchEnabled;
|
|
3366
3380
|
});
|
|
3367
3381
|
}, [exposedProjects, config]);
|
|
3368
3382
|
const tabs = useMemo2(() => {
|