rrce-workflow 0.1.6 → 0.2.7

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.
@@ -48,7 +48,7 @@ Non-Negotiables
48
48
  6. Close the loop in `meta.json` when working within a task by setting `agents.documentation.status`, refreshing `checklist`, and updating overall `status`.
49
49
 
50
50
  Path Resolution
51
- - Storage mode: Determined by `.rrce-workflow.yaml` → global config → default (`global`)
51
+ - Storage mode: Determined by `config.yaml`storage.mode`` → global config → default (`global`)
52
52
  - `global`: Data in `~/.rrce-workflow/workspaces/<workspace-name>/`
53
53
  - `workspace`: Data in `<workspace>/.rrce-workflow/`
54
54
  - `both`: **Dual storage** - data stored in BOTH locations simultaneously
@@ -56,7 +56,7 @@ Path Resolution
56
56
  - Secondary (auto-synced): `~/.rrce-workflow/workspaces/<workspace-name>/`
57
57
  - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
58
58
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
59
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, customizable via `storage.globalPath` in config)
59
+ - Global home: `{{RRCE_HOME}}` - **To resolve:** read `.rrce-workflow/config.yaml` `storage.globalPath`, or default `~/.rrce-workflow`
60
60
  - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
61
61
  - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
62
62
 
@@ -52,17 +52,14 @@ Non-Negotiables
52
52
  6. Update `meta.json` as you proceed so statuses stay accurate.
53
53
 
54
54
  Path Resolution
55
- - Storage mode: Determined by `.rrce-workflow.yaml` global config default (`global`)
56
- - `global`: Data in `~/.rrce-workflow/workspaces/<workspace-name>/`
55
+ - **Config file**: `.rrce-workflow/config.yaml` (read this first to resolve paths)
56
+ - Storage mode: Determined by `config.yaml` `storage.mode` (default: `global`)
57
+ - `global`: Data in `{{RRCE_HOME}}/workspaces/<workspace-name>/`
57
58
  - `workspace`: Data in `<workspace>/.rrce-workflow/`
58
- - `both`: **Dual storage** - data stored in BOTH locations simultaneously
59
- - Primary (for reads): `<workspace>/.rrce-workflow/`
60
- - Secondary (auto-synced): `~/.rrce-workflow/workspaces/<workspace-name>/`
61
- - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
59
+ - `both`: Dual storage - data in BOTH locations
62
60
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
63
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, customizable via `storage.globalPath` in config)
64
- - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
65
- - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
61
+ - Global home: `{{RRCE_HOME}}` - **To resolve:** read `config.yaml` → `storage.globalPath`, or default `~/.rrce-workflow`
62
+ - Workspace name: `{{WORKSPACE_NAME}}` (from `config.yaml` `project.name`)
66
63
 
67
64
  Cross-Project References
68
65
  - Reference another project's context: `{{RRCE_HOME}}/workspaces/<other-project>/knowledge/`
@@ -34,17 +34,18 @@ Non-Negotiables
34
34
  6. Keep output actionable and scannable; use structured sections.
35
35
 
36
36
  Path Resolution
37
- - Storage mode: Determined by `.rrce-workflow.yaml` global config default (`global`)
37
+ - **Config file**: `.rrce-workflow/config.yaml` (read this first to resolve paths)
38
+ - Storage mode: Determined by `config.yaml` → `storage.mode` (default: `global`)
38
39
  - `global`: Data stored in `{{RRCE_HOME}}/workspaces/<workspace-name>/`
39
40
  - `workspace`: Data stored in `<workspace>/.rrce-workflow/`
40
- - `both`: **Dual storage** - data stored in BOTH locations simultaneously
41
- - Primary (for reads): `<workspace>/.rrce-workflow/`
42
- - Secondary (auto-synced): `{{RRCE_HOME}}/workspaces/<workspace-name>/`
43
- - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
41
+ - `both`: **Dual storage** - data in BOTH locations
44
42
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
45
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, can be customized via `storage.globalPath` in `.rrce-workflow.yaml`)
43
+ - Global home: `{{RRCE_HOME}}` - **To resolve:**
44
+ 1. Read `.rrce-workflow/config.yaml`
45
+ 2. If `storage.globalPath` exists, use that value
46
+ 3. Otherwise, default to `~/.rrce-workflow`
46
47
  - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
47
- - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
48
+ - Workspace name: `{{WORKSPACE_NAME}}` (from `config.yaml` → `project.name` or directory name)
48
49
 
49
50
  Cross-Project References
50
51
  - To reference another project's context: `{{RRCE_HOME}}/workspaces/<other-project-name>/knowledge/`
@@ -44,7 +44,7 @@ Non-Negotiables
44
44
  6. Keep the written plan under 500 lines and reference supporting materials explicitly.
45
45
 
46
46
  Path Resolution
47
- - Storage mode: Determined by `.rrce-workflow.yaml` → global config → default (`global`)
47
+ - Storage mode: Determined by `config.yaml`storage.mode`` → global config → default (`global`)
48
48
  - `global`: Data in `~/.rrce-workflow/workspaces/<workspace-name>/`
49
49
  - `workspace`: Data in `<workspace>/.rrce-workflow/`
50
50
  - `both`: **Dual storage** - data stored in BOTH locations simultaneously
@@ -52,7 +52,7 @@ Path Resolution
52
52
  - Secondary (auto-synced): `~/.rrce-workflow/workspaces/<workspace-name>/`
53
53
  - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
54
54
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
55
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, customizable via `storage.globalPath` in config)
55
+ - Global home: `{{RRCE_HOME}}` - **To resolve:** read `.rrce-workflow/config.yaml` `storage.globalPath`, or default `~/.rrce-workflow`
56
56
  - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
57
57
  - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
58
58
 
@@ -38,7 +38,7 @@ Non-Negotiables
38
38
  6. Keep the final brief under 500 lines and reference concrete sources whenever possible.
39
39
 
40
40
  Path Resolution
41
- - Storage mode: Determined by `.rrce-workflow.yaml` → global config → default (`global`)
41
+ - Storage mode: Determined by `config.yaml`storage.mode`` → global config → default (`global`)
42
42
  - `global`: Data in `~/.rrce-workflow/workspaces/<workspace-name>/`
43
43
  - `workspace`: Data in `<workspace>/.rrce-workflow/`
44
44
  - `both`: **Dual storage** - data stored in BOTH locations simultaneously
@@ -46,7 +46,7 @@ Path Resolution
46
46
  - Secondary (auto-synced): `~/.rrce-workflow/workspaces/<workspace-name>/`
47
47
  - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
48
48
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
49
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, customizable via `storage.globalPath` in config)
49
+ - Global home: `{{RRCE_HOME}}` - **To resolve:** read `.rrce-workflow/config.yaml` `storage.globalPath`, or default `~/.rrce-workflow`
50
50
  - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
51
51
  - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
52
52
 
@@ -38,7 +38,7 @@ Non-Negotiables
38
38
  5. Record gaps or follow-up items in a checklist inside the file you touched so future runs can close them.
39
39
 
40
40
  Path Resolution
41
- - Storage mode: Determined by `.rrce-workflow.yaml` → global config → default (`global`)
41
+ - Storage mode: Determined by `config.yaml`storage.mode`` → global config → default (`global`)
42
42
  - `global`: Data in `~/.rrce-workflow/workspaces/<workspace-name>/`
43
43
  - `workspace`: Data in `<workspace>/.rrce-workflow/`
44
44
  - `both`: **Dual storage** - data stored in BOTH locations simultaneously
@@ -46,7 +46,7 @@ Path Resolution
46
46
  - Secondary (auto-synced): `~/.rrce-workflow/workspaces/<workspace-name>/`
47
47
  - When writing, always write to `{{RRCE_DATA}}` - the system ensures both locations stay in sync
48
48
  - Data path: `{{RRCE_DATA}}` (resolves to primary storage based on mode)
49
- - Global home: `{{RRCE_HOME}}` (default: `~/.rrce-workflow`, customizable via `storage.globalPath` in config)
49
+ - Global home: `{{RRCE_HOME}}` - **To resolve:** read `.rrce-workflow/config.yaml` `storage.globalPath`, or default `~/.rrce-workflow`
50
50
  - Workspace root: `{{WORKSPACE_ROOT}}` (auto-detected or via `$RRCE_WORKSPACE`)
51
51
  - Workspace name: `{{WORKSPACE_NAME}}` (from config or directory name)
52
52
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rrce-workflow",
3
- "version": "0.1.6",
3
+ "version": "0.2.7",
4
4
  "description": "RRCE-Workflow TUI - Agentic code workflow generator for AI-assisted development",
5
5
  "author": "RRCE Team",
6
6
  "license": "MIT",
@@ -1,13 +1,13 @@
1
1
  import { intro, select, spinner, note, outro, cancel, isCancel } from '@clack/prompts';
2
2
  import pc from 'picocolors';
3
3
  import * as fs from 'fs';
4
- import * as path from 'path';
5
4
  import { getGitUser } from '../../lib/git';
6
5
  import {
7
6
  detectWorkspaceRoot,
8
7
  getWorkspaceName,
9
8
  listGlobalProjects,
10
- getLocalWorkspacePath
9
+ getLocalWorkspacePath,
10
+ getConfigPath
11
11
  } from '../../lib/paths';
12
12
 
13
13
  // Import flows
@@ -38,8 +38,8 @@ Workspace: ${pc.bold(workspaceName)}`,
38
38
  // Check for existing projects in global storage
39
39
  const existingProjects = listGlobalProjects(workspaceName);
40
40
 
41
- // Check if already configured
42
- const configFilePath = path.join(workspacePath, '.rrce-workflow.yaml');
41
+ // Check if already configured (using getConfigPath for new/legacy support)
42
+ const configFilePath = getConfigPath(workspacePath);
43
43
  const isAlreadyConfigured = fs.existsSync(configFilePath);
44
44
 
45
45
  // Check current storage mode from config
@@ -1,8 +1,7 @@
1
1
  import { multiselect, spinner, note, outro, cancel, isCancel } from '@clack/prompts';
2
2
  import pc from 'picocolors';
3
3
  import * as fs from 'fs';
4
- import * as path from 'path';
5
- import { listGlobalProjects, getEffectiveRRCEHome } from '../../lib/paths';
4
+ import { listGlobalProjects, getEffectiveRRCEHome, getConfigPath } from '../../lib/paths';
6
5
  import { generateVSCodeWorkspace } from './vscode';
7
6
 
8
7
  /**
@@ -48,8 +47,8 @@ export async function runLinkProjectsFlow(
48
47
  const s = spinner();
49
48
  s.start('Linking projects');
50
49
 
51
- // Update .rrce-workflow.yaml with linked projects
52
- const configFilePath = path.join(workspacePath, '.rrce-workflow.yaml');
50
+ // Update config.yaml with linked projects
51
+ const configFilePath = getConfigPath(workspacePath);
53
52
  let configContent = fs.readFileSync(configFilePath, 'utf-8');
54
53
 
55
54
  // Check if linked_projects section exists
@@ -250,12 +250,11 @@ async function generateConfiguration(
250
250
 
251
251
  for (const dataPath of dataPaths) {
252
252
  ensureDir(dataPath);
253
- // Create agent metadata subdirectories
253
+ // Create agent metadata subdirectories (data only, no prompts)
254
254
  ensureDir(path.join(dataPath, 'knowledge'));
255
255
  ensureDir(path.join(dataPath, 'refs'));
256
256
  ensureDir(path.join(dataPath, 'tasks'));
257
257
  ensureDir(path.join(dataPath, 'templates'));
258
- ensureDir(path.join(dataPath, 'prompts'));
259
258
  }
260
259
 
261
260
  // Get the agent-core directory path
@@ -267,16 +266,9 @@ async function generateConfiguration(
267
266
  // Also copy templates to all storage locations
268
267
  copyDirToAllStoragePaths(path.join(agentCoreDir, 'templates'), 'templates', dataPaths);
269
268
 
270
- // Load prompts
269
+ // Load prompts for IDE-specific locations
271
270
  const prompts = loadPromptsFromDir(getAgentCorePromptsDir());
272
271
 
273
- // Copy prompts to all storage locations (for cross-project access)
274
- for (const dataPath of dataPaths) {
275
- const promptsDir = path.join(dataPath, 'prompts');
276
- ensureDir(promptsDir);
277
- copyPromptsToDir(prompts, promptsDir, '.md');
278
- }
279
-
280
272
  // Copy prompts to tool-specific locations (for IDE integration)
281
273
  if (config.tools.includes('copilot')) {
282
274
  const copilotPath = getAgentPromptPath(workspacePath, 'copilot');
@@ -290,8 +282,10 @@ async function generateConfiguration(
290
282
  copyPromptsToDir(prompts, antigravityPath, '.md');
291
283
  }
292
284
 
293
- // Create workspace config
294
- const workspaceConfigPath = path.join(workspacePath, '.rrce-workflow.yaml');
285
+ // Create workspace config (inside .rrce-workflow folder)
286
+ const workspaceConfigPath = path.join(workspacePath, '.rrce-workflow', 'config.yaml');
287
+ ensureDir(path.dirname(workspaceConfigPath));
288
+
295
289
  let configContent = `# RRCE-Workflow Configuration
296
290
  version: 1
297
291
 
@@ -6,7 +6,8 @@ import {
6
6
  ensureDir,
7
7
  getLocalWorkspacePath,
8
8
  getGlobalWorkspacePath,
9
- getEffectiveRRCEHome
9
+ getEffectiveRRCEHome,
10
+ getConfigPath
10
11
  } from '../../lib/paths';
11
12
  import { copyDirRecursive } from './utils';
12
13
 
@@ -63,7 +64,7 @@ export async function runSyncToGlobalFlow(workspacePath: string, workspaceName:
63
64
  }
64
65
 
65
66
  // Update the config to reflect 'both' mode
66
- const configFilePath = path.join(workspacePath, '.rrce-workflow.yaml');
67
+ const configFilePath = getConfigPath(workspacePath);
67
68
  let configContent = fs.readFileSync(configFilePath, 'utf-8');
68
69
  configContent = configContent.replace(/mode:\s*workspace/, 'mode: both');
69
70
  fs.writeFileSync(configFilePath, configContent);
@@ -8,7 +8,8 @@ import {
8
8
  resolveAllDataPaths,
9
9
  getAgentPromptPath,
10
10
  copyDirToAllStoragePaths,
11
- getEffectiveRRCEHome
11
+ getEffectiveRRCEHome,
12
+ getConfigPath
12
13
  } from '../../lib/paths';
13
14
  import { loadPromptsFromDir, getAgentCorePromptsDir, getAgentCoreDir } from '../../lib/prompts';
14
15
  import { copyPromptsToDir } from './utils';
@@ -55,19 +56,14 @@ export async function runUpdateFlow(
55
56
 
56
57
  s.start('Updating from package');
57
58
 
58
- // Update prompts and templates in all storage locations
59
+ // Update templates in all storage locations (no prompts in data paths)
59
60
  for (const dataPath of dataPaths) {
60
- // Update prompts
61
- const promptsDir = path.join(dataPath, 'prompts');
62
- ensureDir(promptsDir);
63
- copyPromptsToDir(prompts, promptsDir, '.md');
64
-
65
- // Update templates
61
+ // Update templates only
66
62
  copyDirToAllStoragePaths(path.join(agentCoreDir, 'templates'), 'templates', [dataPath]);
67
63
  }
68
64
 
69
65
  // Also update tool-specific locations if configured
70
- const configFilePath = path.join(workspacePath, '.rrce-workflow.yaml');
66
+ const configFilePath = getConfigPath(workspacePath);
71
67
  const configContent = fs.readFileSync(configFilePath, 'utf-8');
72
68
 
73
69
  if (configContent.includes('copilot: true')) {
package/src/lib/paths.ts CHANGED
@@ -18,8 +18,10 @@ export function detectWorkspaceRoot(): string {
18
18
  let current = process.cwd();
19
19
 
20
20
  while (current !== '/') {
21
- // Check for .git or .rrce-workflow.yaml
21
+ // Check for .git or .rrce-workflow/config.yaml (new location)
22
+ // Also check legacy .rrce-workflow.yaml for backwards compatibility
22
23
  if (fs.existsSync(path.join(current, '.git')) ||
24
+ fs.existsSync(path.join(current, '.rrce-workflow', 'config.yaml')) ||
23
25
  fs.existsSync(path.join(current, '.rrce-workflow.yaml'))) {
24
26
  return current;
25
27
  }
@@ -29,6 +31,27 @@ export function detectWorkspaceRoot(): string {
29
31
  return process.cwd();
30
32
  }
31
33
 
34
+ /**
35
+ * Get the config file path for a workspace
36
+ * New location: .rrce-workflow/config.yaml
37
+ * Legacy location: .rrce-workflow.yaml (for backwards compatibility)
38
+ */
39
+ export function getConfigPath(workspaceRoot: string): string {
40
+ const newPath = path.join(workspaceRoot, '.rrce-workflow', 'config.yaml');
41
+ const legacyPath = path.join(workspaceRoot, '.rrce-workflow.yaml');
42
+
43
+ // Prefer new location, fall back to legacy
44
+ if (fs.existsSync(newPath)) {
45
+ return newPath;
46
+ }
47
+ if (fs.existsSync(legacyPath)) {
48
+ return legacyPath;
49
+ }
50
+
51
+ // Default to new location for new configs
52
+ return newPath;
53
+ }
54
+
32
55
  /**
33
56
  * Get workspace name from directory or config
34
57
  */
@@ -139,6 +162,7 @@ export function ensureDir(dirPath: string): void {
139
162
 
140
163
  /**
141
164
  * Get path for agent prompts based on tool
165
+ * IDE-specific locations so IDEs can auto-discover prompts
142
166
  */
143
167
  export function getAgentPromptPath(workspaceRoot: string, tool: 'copilot' | 'antigravity'): string {
144
168
  if (tool === 'copilot') {
@@ -289,7 +313,7 @@ export function getSuggestedGlobalPaths(): Array<{ path: string; label: string;
289
313
  export function getEffectiveRRCEHome(workspaceRoot?: string): string {
290
314
  // Check workspace config for custom globalPath
291
315
  if (workspaceRoot) {
292
- const configPath = path.join(workspaceRoot, '.rrce-workflow.yaml');
316
+ const configPath = getConfigPath(workspaceRoot);
293
317
  if (fs.existsSync(configPath)) {
294
318
  try {
295
319
  const content = fs.readFileSync(configPath, 'utf-8');