rpi-kit 1.4.0 → 2.0.0

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 (53) hide show
  1. package/.claude-plugin/marketplace.json +9 -6
  2. package/.claude-plugin/plugin.json +4 -4
  3. package/AGENTS.md +2016 -117
  4. package/CHANGELOG.md +83 -0
  5. package/README.md +116 -169
  6. package/agents/atlas.md +61 -0
  7. package/agents/clara.md +49 -0
  8. package/agents/forge.md +38 -0
  9. package/agents/hawk.md +54 -0
  10. package/agents/luna.md +50 -0
  11. package/agents/mestre.md +61 -0
  12. package/agents/nexus.md +63 -0
  13. package/agents/pixel.md +48 -0
  14. package/agents/quill.md +40 -0
  15. package/agents/razor.md +41 -0
  16. package/agents/sage.md +52 -0
  17. package/agents/scout.md +49 -0
  18. package/agents/shield.md +51 -0
  19. package/bin/cli.js +160 -53
  20. package/bin/onboarding.js +46 -28
  21. package/commands/rpi/archive.md +149 -0
  22. package/commands/rpi/docs.md +106 -168
  23. package/commands/rpi/implement.md +163 -401
  24. package/commands/rpi/init.md +150 -67
  25. package/commands/rpi/learn.md +114 -0
  26. package/commands/rpi/new.md +85 -155
  27. package/commands/rpi/onboarding.md +157 -336
  28. package/commands/rpi/party.md +212 -0
  29. package/commands/rpi/plan.md +241 -205
  30. package/commands/rpi/research.md +162 -104
  31. package/commands/rpi/review.md +350 -104
  32. package/commands/rpi/rpi.md +125 -0
  33. package/commands/rpi/simplify.md +156 -93
  34. package/commands/rpi/status.md +91 -114
  35. package/package.json +7 -3
  36. package/skills/rpi-agents/SKILL.md +63 -39
  37. package/skills/rpi-workflow/SKILL.md +160 -186
  38. package/agents/code-reviewer.md +0 -108
  39. package/agents/code-simplifier.md +0 -82
  40. package/agents/cto-advisor.md +0 -61
  41. package/agents/doc-synthesizer.md +0 -67
  42. package/agents/doc-writer.md +0 -37
  43. package/agents/explore-codebase.md +0 -88
  44. package/agents/plan-executor.md +0 -95
  45. package/agents/product-manager.md +0 -59
  46. package/agents/requirement-parser.md +0 -51
  47. package/agents/senior-engineer.md +0 -61
  48. package/agents/test-engineer.md +0 -23
  49. package/agents/ux-designer.md +0 -58
  50. package/codex.md +0 -72
  51. package/commands/rpi/add-todo.md +0 -83
  52. package/commands/rpi/set-profile.md +0 -124
  53. package/commands/rpi/test.md +0 -198
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: rpi:research
3
- description: Run research phase on a feature. Parallel agent analysis produces RESEARCH.md with GO/NO-GO verdict. Supports tiers (--quick, --standard, --deep).
4
- argument-hint: "<feature-slug> [--quick|--standard|--deep] [--force]"
3
+ description: Analyze feasibility with Atlas (codebase) and Scout (external). Nexus synthesizes.
4
+ argument-hint: "<feature-name> [--force]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -12,159 +12,217 @@ allowed-tools:
12
12
  - AskUserQuestion
13
13
  ---
14
14
 
15
- <objective>
16
- Run parallel research agents on a feature's REQUEST.md, synthesize findings into RESEARCH.md with a GO/NO-GO verdict.
17
- </objective>
15
+ # /rpi:research — Research Phase
18
16
 
19
- <process>
17
+ Run Atlas (codebase analysis) and Scout (external research) in parallel. Nexus synthesizes their outputs into RESEARCH.md with a GO / GO with concerns / NO-GO verdict.
20
18
 
21
- ## 1. Load config and parse arguments
19
+ ---
22
20
 
23
- Read `.rpi.yaml` for folder path and default tier. Also read `profile` and `models` keys.
24
- Parse `$ARGUMENTS`:
25
- - First argument: `{feature-slug}` (required)
26
- - Flags: `--quick`, `--standard`, `--deep` (override config tier)
27
- - Flag: `--force` (proceed even if previous research exists)
21
+ ## Step 1: Load config and validate
28
22
 
29
- ## 1b. Resolve model
23
+ 1. Read `.rpi.yaml` for config. Apply defaults if missing:
24
+ - `specs_dir`: `rpi/specs`
25
+ - `solutions_dir`: `rpi/solutions`
26
+ - `context_file`: `rpi/context.md`
27
+ 2. Parse `$ARGUMENTS` to extract `{slug}` and optional `--force` flag.
28
+ 3. Validate `rpi/features/{slug}/REQUEST.md` exists. If not:
29
+ ```
30
+ Feature '{slug}' not found. Run /rpi:new {slug} to start.
31
+ ```
32
+ Stop.
30
33
 
31
- Resolve the model for the `research` phase following the Model Resolution Algorithm in the rpi-workflow skill. Store as `{resolved_model}`. If a model is resolved, output the status message before agent spawns.
34
+ ## Step 2: Check existing research
32
35
 
33
- ## 2. Resolve feature path
36
+ 1. Check if `rpi/features/{slug}/research/RESEARCH.md` already exists.
37
+ 2. If it exists and `--force` was NOT passed:
38
+ - Ask the user: "RESEARCH.md already exists for '{slug}'. Overwrite? (yes/no)"
39
+ - If no: stop.
40
+ 3. If `--force` was passed or user confirms: proceed (will overwrite).
34
41
 
35
- Parse `{feature-slug}` from arguments.
42
+ ## Step 3: Gather context
36
43
 
37
- **Resolution order:**
38
- 1. Check if `{folder}/{feature-slug}/` exists type = "feature", path = `{folder}/{feature-slug}`
39
- 2. If not, Glob `{folder}/*/changes/{feature-slug}/` if found, type = "change", path = matched path, parent_path = parent directory
40
- 3. If multiple matches in step 2 AskUserQuestion listing all matches with full paths
41
- 4. If no match → error: `Feature not found: {feature-slug}. Run /rpi:new {feature-slug} first.`
44
+ 1. Read `rpi/features/{slug}/REQUEST.md` — store as `$REQUEST`.
45
+ 2. Read `rpi/context.md` (project context) if it exists store as `$CONTEXT`.
46
+ 3. Scan `rpi/specs/` for any specs relevant to the feature described in REQUEST.md store as `$RELEVANT_SPECS`.
47
+ 4. Scan `rpi/solutions/` for any past solutions relevant to this feature store as `$RELEVANT_SOLUTIONS`.
42
48
 
43
- If `type == "change"`:
44
- - Set `parent_path` to the parent feature directory
45
- - Read parent artifacts for agent context:
46
- - `{parent_path}/REQUEST.md`
47
- - `{parent_path}/research/RESEARCH.md` (if exists)
48
- - `{parent_path}/plan/PLAN.md` (if exists)
49
- - `{parent_path}/plan/eng.md` (if exists)
49
+ ## Step 4: Launch Atlas and Scout in parallel
50
50
 
51
- Validate that `{path}/REQUEST.md` exists. If not, error.
51
+ Use the Agent tool to launch both agents simultaneously.
52
52
 
53
- If `{path}/research/RESEARCH.md` already exists and `--force` not set, ask user:
54
- "Research already exists for this feature. Overwrite?"
53
+ ### Atlas (codebase analysis)
55
54
 
56
- ## 3. Determine agent composition by tier
55
+ Launch Atlas agent with this prompt:
57
56
 
58
- **--quick (2 agents):**
59
- - requirement-parser
60
- - explore-codebase
57
+ ```
58
+ You are Atlas. Analyze the codebase for feature: {slug}
61
59
 
62
- **--standard (4 agents):**
63
- - requirement-parser
64
- - explore-codebase
65
- - product-manager
66
- - senior-engineer
60
+ ## Request
61
+ {$REQUEST}
67
62
 
68
- **--deep (6 agents):**
69
- - requirement-parser
70
- - explore-codebase
71
- - product-manager
72
- - senior-engineer
73
- - cto-advisor
74
- - ux-designer (only if REQUEST.md suggests UI involvement)
63
+ ## Project Context
64
+ {$CONTEXT}
75
65
 
76
- ## 4. Launch research agents in parallel
66
+ ## Relevant Specs
67
+ {$RELEVANT_SPECS}
77
68
 
78
- Use the Agent tool to launch ALL selected agents concurrently in a single message. If a model was resolved in Step 1b, include `model: "{resolved_model}"` in each Agent tool call.
69
+ ## Relevant Past Solutions
70
+ {$RELEVANT_SOLUTIONS}
79
71
 
80
- Each agent receives this prompt:
72
+ Your task:
73
+ 1. Analyze the codebase for patterns, conventions, and architecture relevant to this feature
74
+ 2. Check rpi/specs/ for existing specifications that overlap or relate
75
+ 3. Check rpi/solutions/ for past solutions that could be reused
76
+ 4. Identify files likely affected, patterns to follow, and risks
77
+ 5. Output using your standard format: [Atlas -- Codebase Analysis]
81
78
  ```
82
- You are the {role-name} agent for the RPI workflow.
83
79
 
84
- Read the following files before analysis:
85
- - {folder}/{feature-slug}/REQUEST.md
80
+ ### Scout (external research)
86
81
 
87
- Then analyze the feature from your role's perspective following the RPI agent guidelines.
82
+ Launch Scout agent with this prompt:
88
83
 
89
- Your output format:
90
- ## [{Your Role Title}]
84
+ ```
85
+ You are Scout. Research technical feasibility for feature: {slug}
91
86
 
92
- ### {Section Name}
93
- Verdict: GO | CONCERN | BLOCK
94
- {Findings with evidence — cite specific files, deps, patterns}
87
+ ## Request
88
+ {$REQUEST}
95
89
 
96
- ### {Next Section}
97
- ...
90
+ ## Project Context
91
+ {$CONTEXT}
98
92
 
99
- Estimated Complexity: S | M | L | XL
93
+ ## Relevant Past Solutions
94
+ {$RELEVANT_SOLUTIONS}
100
95
 
101
- Follow your role-specific rules as defined in the rpi-agents skill.
96
+ Your task:
97
+ 1. FIRST check rpi/solutions/ for relevant past solutions before any external research
98
+ 2. Research technical feasibility of the proposed approach
99
+ 3. Evaluate alternative libraries/tools with trade-off comparison
100
+ 4. Identify risks: breaking changes, security issues, maintenance status
101
+ 5. Find relevant benchmarks, examples, or case studies
102
+ 6. Output using your standard format: [Scout -- Technical Investigation]
102
103
  ```
103
104
 
104
- For explore-codebase agent, also instruct it to scan the project codebase for relevant files, patterns, and conventions.
105
+ ## Step 5: Wait for completion
105
106
 
106
- If `type == "change"`, append to each agent prompt:
107
+ Wait for both Atlas and Scout agents to complete. Store their outputs:
108
+ - `$ATLAS_OUTPUT` — Atlas's codebase analysis
109
+ - `$SCOUT_OUTPUT` — Scout's technical investigation
107
110
 
108
- ```
109
- ## Parent Feature Context
110
- {contents of parent artifacts read in step 2}
111
+ ## Step 6: Detect disagreements
112
+
113
+ Compare Atlas and Scout outputs for contradictions:
114
+ - Atlas says feasible but Scout says risky (or vice versa)
115
+ - Different recommendations on approach, libraries, or architecture
116
+ - Conflicting risk assessments
117
+
118
+ If disagreements are detected, launch Nexus for a mini-debate:
111
119
 
112
- This is a CHANGE to an existing feature. Focus on:
113
- - What's different from the parent implementation
114
- - Compatibility with existing code
115
- - Breaking changes to watch for
116
120
  ```
121
+ You are Nexus. Atlas and Scout disagree on key points for feature: {slug}
122
+
123
+ ## Atlas Output
124
+ {$ATLAS_OUTPUT}
117
125
 
118
- ## 5. Synthesize into RESEARCH.md
126
+ ## Scout Output
127
+ {$SCOUT_OUTPUT}
119
128
 
120
- After all agents complete, use the Agent tool to launch the doc-synthesizer agent. If a model was resolved, include `model: "{resolved_model}"` in the Agent tool call.
129
+ Identify the specific disagreements. For each one:
130
+ 1. State what Atlas argues
131
+ 2. State what Scout argues
132
+ 3. Evaluate the evidence for each position
133
+ 4. Declare the stronger position with reasoning
121
134
 
122
- Prompt:
135
+ Output as: [Nexus -- Debate Summary]
123
136
  ```
124
- You are the doc-synthesizer agent for the RPI workflow.
125
137
 
126
- Merge the following research outputs into a single RESEARCH.md:
138
+ Store the debate result as `$DEBATE_OUTPUT`.
127
139
 
128
- {paste all agent outputs}
140
+ ## Step 7: Nexus synthesis
141
+
142
+ Launch Nexus agent to produce the final RESEARCH.md:
129
143
 
130
- Follow the RPI agent guidelines for doc-synthesizer:
131
- 1. Executive summary first: verdict, complexity, risk in 5 lines
132
- 2. No contradictions left unresolved
133
- 3. Preserve the strongest finding from each agent
134
- 4. If NO-GO, alternatives section is mandatory
135
- 5. Section order: Summary → Requirements → Product → Codebase → Technical → Strategic → Alternatives
136
144
  ```
145
+ You are Nexus. Synthesize research for feature: {slug}
137
146
 
138
- ## 6. Write RESEARCH.md
147
+ ## Request
148
+ {$REQUEST}
139
149
 
140
- Write the synthesized output to `{folder}/{feature-slug}/research/RESEARCH.md`.
150
+ ## Atlas Output
151
+ {$ATLAS_OUTPUT}
141
152
 
142
- ## 7. Present verdict
153
+ ## Scout Output
154
+ {$SCOUT_OUTPUT}
143
155
 
144
- Display the executive summary to the user.
156
+ ## Debate Results (if any)
157
+ {$DEBATE_OUTPUT or "No disagreements detected."}
145
158
 
146
- If **GO**:
147
- ```
148
- Verdict: GO
149
- Next: /rpi:plan {feature-slug}
159
+ Produce a single RESEARCH.md with this structure:
160
+
161
+ # Research: {Feature Title}
162
+
163
+ ## Summary
164
+ 5 lines: verdict, complexity, risk, recommendation, key finding.
165
+
166
+ ## Atlas Findings
167
+ {Key findings from Atlas's codebase analysis — preserve strongest evidence}
168
+
169
+ ## Scout Findings
170
+ {Key findings from Scout's technical investigation — preserve strongest evidence}
171
+
172
+ ## Consensus
173
+ {Points where Atlas and Scout agree}
174
+
175
+ ## Resolved Disagreements
176
+ {For each disagreement: what Atlas said, what Scout said, resolution with reasoning}
177
+ (or "No disagreements detected.")
178
+
179
+ ## Risks and Mitigations
180
+ {Combined risk assessment from both agents}
181
+
182
+ ## Relevant Solutions
183
+ {Past solutions from rpi/solutions/ that apply — for knowledge reuse}
184
+ (or "No relevant past solutions found.")
185
+
186
+ ## Open Questions
187
+ {Unresolved items that need user input}
188
+
189
+ ## Verdict
190
+ {GO | GO with concerns | NO-GO}
191
+ Confidence: {HIGH | MEDIUM | LOW}
192
+
193
+ Rules for verdict:
194
+ - Any BLOCK finding = NO-GO
195
+ - No BLOCK + 2 or more CONCERN findings = GO with concerns
196
+ - Otherwise = GO
197
+ - NO-GO requires an Alternatives section
150
198
  ```
151
199
 
152
- If **GO with concerns**:
200
+ ## Step 8: Write RESEARCH.md and populate delta baselines
201
+
202
+ 1. Ensure directory exists: `rpi/features/{slug}/research/`
203
+ 2. Write the Nexus output to `rpi/features/{slug}/research/RESEARCH.md`
204
+ 3. If Nexus identified relevant existing specs in `rpi/specs/`:
205
+ - Ensure `rpi/features/{slug}/delta/` directory structure exists (ADDED/, MODIFIED/, REMOVED/)
206
+ - Copy relevant spec baselines into `delta/MODIFIED/` so the plan phase has reference copies
207
+ - This gives Mestre (plan phase) the current state of specs that will be changed
208
+
209
+ ## Step 9: Output summary
210
+
153
211
  ```
154
- Verdict: GO with concerns
155
- {list concerns}
156
- Next: /rpi:plan {feature-slug}
212
+ Research complete: rpi/features/{slug}/research/RESEARCH.md
213
+
214
+ Verdict: {GO | GO with concerns | NO-GO}
215
+
216
+ Next: /rpi {slug}
217
+ Or explicitly: /rpi:plan {slug}
157
218
  ```
158
219
 
159
- If **NO-GO**:
220
+ If NO-GO:
160
221
  ```
161
- Verdict: NO-GO
162
- {reasons}
222
+ Research complete: rpi/features/{slug}/research/RESEARCH.md
163
223
 
164
- Alternatives:
165
- {suggested alternatives from research}
224
+ Verdict: NO-GO
166
225
 
167
- Override: /rpi:plan {feature-slug} --force
226
+ Review the RESEARCH.md for details and alternatives.
227
+ To override: /rpi:plan {slug} --force
168
228
  ```
169
-
170
- </process>