rrce-workflow 0.3.12 → 0.3.14

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.
Files changed (42) hide show
  1. package/README.md +12 -0
  2. package/agent-core/prompts/_base.md +8 -1
  3. package/agent-core/prompts/doctor.md +2 -2
  4. package/agent-core/prompts/documentation.md +1 -1
  5. package/agent-core/prompts/executor.md +1 -1
  6. package/agent-core/prompts/init.md +1 -1
  7. package/agent-core/prompts/orchestrator.md +13 -3
  8. package/agent-core/prompts/planning_discussion.md +1 -1
  9. package/agent-core/prompts/research_discussion.md +2 -2
  10. package/agent-core/prompts/sync.md +1 -1
  11. package/dist/index.js +469 -519
  12. package/docs/AI_AGENT_GUIDE.md +65 -0
  13. package/package.json +1 -1
  14. package/dist/commands/selector.d.ts +0 -1
  15. package/dist/commands/selector.js +0 -29
  16. package/dist/commands/wizard/index.d.ts +0 -1
  17. package/dist/commands/wizard/index.js +0 -86
  18. package/dist/commands/wizard/link-flow.d.ts +0 -5
  19. package/dist/commands/wizard/link-flow.js +0 -97
  20. package/dist/commands/wizard/setup-flow.d.ts +0 -4
  21. package/dist/commands/wizard/setup-flow.js +0 -262
  22. package/dist/commands/wizard/sync-flow.d.ts +0 -4
  23. package/dist/commands/wizard/sync-flow.js +0 -67
  24. package/dist/commands/wizard/update-flow.d.ts +0 -4
  25. package/dist/commands/wizard/update-flow.js +0 -85
  26. package/dist/commands/wizard/utils.d.ts +0 -9
  27. package/dist/commands/wizard/utils.js +0 -33
  28. package/dist/commands/wizard/vscode.d.ts +0 -15
  29. package/dist/commands/wizard/vscode.js +0 -148
  30. package/dist/index.d.ts +0 -1
  31. package/dist/lib/autocomplete-prompt.d.ts +0 -14
  32. package/dist/lib/autocomplete-prompt.js +0 -167
  33. package/dist/lib/detection.d.ts +0 -44
  34. package/dist/lib/detection.js +0 -185
  35. package/dist/lib/git.d.ts +0 -12
  36. package/dist/lib/git.js +0 -37
  37. package/dist/lib/paths.d.ts +0 -108
  38. package/dist/lib/paths.js +0 -296
  39. package/dist/lib/prompts.d.ts +0 -18
  40. package/dist/lib/prompts.js +0 -62
  41. package/dist/types/prompt.d.ts +0 -54
  42. package/dist/types/prompt.js +0 -20
package/README.md CHANGED
@@ -234,6 +234,18 @@ RAG is enabled by default in Express Setup. You can toggle it per-project in the
234
234
 
235
235
  ---
236
236
 
237
+ ## 🛠 AI Agent Effectiveness & Code Health
238
+
239
+ We've optimized the codebase to be **highly navigatable for AI coding agents**:
240
+
241
+ ### Codebase Optimization (v0.3.13)
242
+ - **Deduplication**: Consolidated install/uninstall logic and project sorting.
243
+ - **Function Extraction**: Split monolithic functions (like `index_knowledge`) into manageable helpers.
244
+ - **Improved Type Safety**: Replaced `any` types with structured interfaces (`TaskMeta`, `AgentInfo`).
245
+ - **AI Agent Guide**: Added [AI Agent Architecture Guide](docs/AI_AGENT_GUIDE.md) to help coding assistants navigate the project.
246
+
247
+ ---
248
+
237
249
  ## Requirements
238
250
 
239
251
  - **Node.js 18+**
@@ -9,7 +9,7 @@ Use values from the **System Context** table above. Never guess or construct pat
9
9
  - `RRCE_HOME` - Global RRCE installation directory
10
10
 
11
11
  ## Tool Preference Order
12
- 1. **Semantic search** (`rrce_search_knowledge`, `rrce_search_code`) - finds concepts without exact matches
12
+ 1. **Semantic search** (`search_knowledge`, `search_code`) - finds concepts without exact matches
13
13
  2. **Direct read** (`read`) - for specific known files
14
14
  3. **Pattern search** (`glob`, `grep`) - last resort for exact strings or when RAG unavailable
15
15
 
@@ -25,6 +25,13 @@ If a `PRE-FETCHED CONTEXT` block exists in your prompt:
25
25
  ## Metadata Updates
26
26
  For `meta.json` changes, use `rrce_update_task()` - it auto-saves. Never use `write` for meta.json.
27
27
 
28
+ ## Checklist Sync (OpenCode)
29
+ When working on a task with a checklist:
30
+ 1. Always read the current checklist from `meta.json`.
31
+ 2. Sync the checklist to OpenCode's Todo sidebar using `todowrite`.
32
+ 3. Format the checklist for `todowrite` as a structured list of sub-tasks relevant to your current phase.
33
+ 4. Update the sidebar whenever a sub-task status changes.
34
+
28
35
  ## Completion Signal
29
36
  When your phase completes, emit:
30
37
  ```
@@ -34,7 +34,7 @@ You are the Project Doctor for RRCE-Workflow. Perform a health check on the code
34
34
  ### Step 1: Load Project Context
35
35
 
36
36
  ```
37
- Tool: rrce_get_project_context
37
+ Tool: get_project_context
38
38
  Args: { "project": "{{WORKSPACE_NAME}}" }
39
39
  ```
40
40
 
@@ -72,7 +72,7 @@ Use `search_knowledge` to efficiently find problem areas. Run queries based on F
72
72
 
73
73
  **Query Execution:**
74
74
  ```
75
- Tool: rrce_search_knowledge
75
+ Tool: search_knowledge
76
76
  Args: { "query": "<query>", "project": "{{WORKSPACE_NAME}}" }
77
77
  ```
78
78
 
@@ -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', 'update_task', 'read', 'write', 'edit', 'bash', 'glob', 'grep', 'todoread', 'todowrite']
5
+ tools: ['search_knowledge', 'get_project_context', 'list_projects', 'update_task']
6
6
  required-args:
7
7
  - name: DOC_TYPE
8
8
  prompt: "Enter the documentation type (e.g., api, architecture, runbook, changelog)"
@@ -2,7 +2,7 @@
2
2
  name: RRCE Executor
3
3
  description: Execute the planned tasks to deliver working code and tests. The ONLY agent authorized to modify source code.
4
4
  argument-hint: "TASK_SLUG=<slug> [BRANCH=<git ref>]"
5
- tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'index_knowledge', 'update_task', 'read', 'write', 'edit', 'bash', 'glob', 'grep', 'todoread', 'todowrite']
5
+ tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'index_knowledge', 'update_task', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter the task slug to execute"
@@ -2,7 +2,7 @@
2
2
  name: RRCE Init
3
3
  description: Initialize project context and semantic search index by analyzing codebase structure, tech stack, and conventions.
4
4
  argument-hint: "[PROJECT_NAME=<name>]"
5
- tools: ['search_knowledge', 'index_knowledge', 'get_project_context', 'list_projects', 'read', 'write', 'bash', 'glob', 'grep']
5
+ tools: ['search_knowledge', 'index_knowledge', 'get_project_context', 'list_projects']
6
6
  required-args: []
7
7
  optional-args:
8
8
  - name: PROJECT_NAME
@@ -2,7 +2,7 @@
2
2
  name: RRCE
3
3
  description: Phase coordinator for RRCE workflow. Checks state, guides transitions. Uses slash commands for token efficiency.
4
4
  argument-hint: "[PHASE=<init|research|plan|execute|docs>] [TASK_SLUG=<slug>]"
5
- tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'list_agents', 'get_agent_prompt', 'list_tasks', 'get_task', 'create_task', 'update_task', 'delete_task', 'index_knowledge', 'resolve_path', 'read', 'write', 'edit', 'bash', 'glob', 'grep', 'task', 'webfetch', 'todoread', 'todowrite']
5
+ tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'list_agents', 'get_agent_prompt', 'list_tasks', 'get_task', 'create_task', 'update_task', 'delete_task', 'index_knowledge', 'resolve_path', 'read', 'write', 'bash', 'task']
6
6
  mode: primary
7
7
  required-args: []
8
8
  optional-args:
@@ -83,9 +83,14 @@ Use `@rrce_executor` subagent only for:
83
83
 
84
84
  Otherwise: Use `/rrce_execute` for in-context execution.
85
85
 
86
- ## Delegation Protocol (When Using Subagent)
86
+ ## Delegation Protocol (OpenCode Optimized)
87
87
 
88
- **CRITICAL: Use summarized context, not full search results.**
88
+ **Slash commands run in-context and are ~60% more token-efficient than subagent delegation.**
89
+
90
+ For isolated execution (e.g. `@rrce_executor`):
91
+ 1. **Mention**: Print `@rrce_executor TASK_SLUG=${TASK_SLUG}` in your message for user visibility.
92
+ 2. **Suggest**: Use OpenCode's interactive confirmation to trigger the handoff.
93
+ 3. **Summarize**: Provide a < 200 token context summary.
89
94
 
90
95
  ```javascript
91
96
  task({
@@ -107,6 +112,11 @@ Execute non-interactively. Return completion signal when done.`,
107
112
 
108
113
  **Hard rule:** Context summary should be < 200 tokens.
109
114
 
115
+ Example handoff:
116
+ > Task research complete. Proceeding to execution?
117
+ > @rrce_executor TASK_SLUG=my-feature
118
+
119
+
110
120
  ## Retrieval Budget
111
121
  - Max **2 retrieval calls per turn**
112
122
  - Use `rrce_get_task` to check phase state
@@ -2,7 +2,7 @@
2
2
  name: RRCE Planning
3
3
  description: Transform research findings into an actionable execution plan through interactive task breakdown.
4
4
  argument-hint: "TASK_SLUG=<slug>"
5
- tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'update_task', 'read', 'glob', 'grep', 'write', 'todoread', 'todowrite']
5
+ tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'update_task']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter the task slug to create a plan for"
@@ -2,7 +2,7 @@
2
2
  name: RRCE Research
3
3
  description: Interactive research and requirements clarification through constructive dialogue. Achieves 100% understanding before planning.
4
4
  argument-hint: REQUEST="<user prompt>" [TASK_SLUG=<slug>] [TITLE="<task title>"] [SOURCE=<url>]
5
- tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'create_task', 'update_task', 'read', 'glob', 'grep', 'write']
5
+ tools: ['search_knowledge', 'search_code', 'find_related_files', 'get_project_context', 'list_projects', 'create_task', 'update_task']
6
6
  required-args:
7
7
  - name: TASK_SLUG
8
8
  prompt: "Enter a task slug (kebab-case identifier)"
@@ -27,7 +27,7 @@ You are the Research agent for RRCE-Workflow. Clarify requirements through focus
27
27
 
28
28
  ## Retrieval Budget
29
29
  - Max **2 retrieval calls per turn**
30
- - First turn: `rrce_search_knowledge` + `rrce_search_code` + `rrce_get_project_context`
30
+ - First turn: `search_knowledge` + `search_code` + `get_project_context`
31
31
  - Subsequent turns: reference cached findings, avoid repeat searches
32
32
 
33
33
  ## Workflow
@@ -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', 'update_task', 'read', 'write', 'edit', 'bash', 'glob', 'grep']
5
+ tools: ['search_knowledge', 'get_project_context', 'index_knowledge', 'list_projects', 'update_task']
6
6
  required-args: []
7
7
  optional-args:
8
8
  - name: SCOPE