rpi-kit 1.4.1 → 2.1.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.
- package/.claude-plugin/marketplace.json +9 -6
- package/.claude-plugin/plugin.json +4 -4
- package/AGENTS.md +2004 -109
- package/CHANGELOG.md +83 -0
- package/README.md +117 -169
- package/agents/atlas.md +61 -0
- package/agents/clara.md +49 -0
- package/agents/forge.md +38 -0
- package/agents/hawk.md +54 -0
- package/agents/luna.md +50 -0
- package/agents/mestre.md +61 -0
- package/agents/nexus.md +63 -0
- package/agents/pixel.md +48 -0
- package/agents/quill.md +40 -0
- package/agents/razor.md +41 -0
- package/agents/sage.md +52 -0
- package/agents/scout.md +49 -0
- package/agents/shield.md +51 -0
- package/bin/cli.js +134 -10
- package/bin/onboarding.js +46 -28
- package/commands/rpi/archive.md +149 -0
- package/commands/rpi/docs.md +106 -168
- package/commands/rpi/implement.md +163 -401
- package/commands/rpi/init.md +150 -67
- package/commands/rpi/learn.md +114 -0
- package/commands/rpi/new.md +85 -155
- package/commands/rpi/onboarding.md +157 -336
- package/commands/rpi/party.md +212 -0
- package/commands/rpi/plan.md +241 -205
- package/commands/rpi/research.md +162 -104
- package/commands/rpi/review.md +350 -104
- package/commands/rpi/rpi.md +125 -0
- package/commands/rpi/simplify.md +156 -93
- package/commands/rpi/status.md +91 -114
- package/commands/rpi/update.md +113 -0
- package/package.json +3 -3
- package/skills/rpi-agents/SKILL.md +63 -39
- package/skills/rpi-workflow/SKILL.md +161 -186
- package/agents/code-reviewer.md +0 -40
- package/agents/code-simplifier.md +0 -35
- package/agents/cto-advisor.md +0 -51
- package/agents/doc-synthesizer.md +0 -53
- package/agents/doc-writer.md +0 -36
- package/agents/explore-codebase.md +0 -50
- package/agents/plan-executor.md +0 -48
- package/agents/product-manager.md +0 -52
- package/agents/requirement-parser.md +0 -42
- package/agents/senior-engineer.md +0 -52
- package/agents/test-engineer.md +0 -28
- package/agents/ux-designer.md +0 -47
- package/codex.md +0 -72
- package/commands/rpi/add-todo.md +0 -83
- package/commands/rpi/set-profile.md +0 -124
- package/commands/rpi/test.md +0 -198
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rpi:set-profile
|
|
3
|
-
description: Switch the active model profile. Controls which AI model runs each workflow phase (research, plan, implement, review).
|
|
4
|
-
argument-hint: "[quality-first|balanced|speed-first|budget]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- AskUserQuestion
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
<objective>
|
|
12
|
-
Display the current model profile and phase-model mapping, or switch to a new profile. Persists the selection in `.rpi.yaml`.
|
|
13
|
-
</objective>
|
|
14
|
-
|
|
15
|
-
<process>
|
|
16
|
-
|
|
17
|
-
## 1. Load current config
|
|
18
|
-
|
|
19
|
-
Read `.rpi.yaml` from the project root. If it doesn't exist:
|
|
20
|
-
```
|
|
21
|
-
No RPI config found. Run /rpi:init first.
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Extract `profile` and `models` keys (both may be absent).
|
|
25
|
-
|
|
26
|
-
## 2. Parse arguments
|
|
27
|
-
|
|
28
|
-
Parse `$ARGUMENTS`:
|
|
29
|
-
- If empty: display current profile (step 3), then ask if user wants to switch (step 4)
|
|
30
|
-
- If argument provided: validate and switch to that profile (step 5)
|
|
31
|
-
|
|
32
|
-
## 3. Display current profile
|
|
33
|
-
|
|
34
|
-
Resolve the effective model for each phase using the Model Resolution Algorithm defined in the rpi-workflow skill.
|
|
35
|
-
|
|
36
|
-
Output:
|
|
37
|
-
```
|
|
38
|
-
Current profile: {profile_name or "none (inheriting parent model)"}
|
|
39
|
-
|
|
40
|
-
Phase mappings:
|
|
41
|
-
research: {resolved_model or "inherit"}
|
|
42
|
-
plan: {resolved_model or "inherit"}
|
|
43
|
-
implement: {resolved_model or "inherit"}
|
|
44
|
-
review: {resolved_model or "inherit"}
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
If any per-phase overrides exist in `models:` block:
|
|
48
|
-
```
|
|
49
|
-
Per-phase overrides active: {list overridden phases}
|
|
50
|
-
(Overrides take precedence over the profile. Edit .rpi.yaml to change.)
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## 4. Ask to switch (only if no argument)
|
|
54
|
-
|
|
55
|
-
Use AskUserQuestion:
|
|
56
|
-
"Switch to a different profile?"
|
|
57
|
-
|
|
58
|
-
Options:
|
|
59
|
-
- `quality-first` -- opus for all phases (maximum quality)
|
|
60
|
-
- `balanced` -- opus for research/plan/review, sonnet for implement (recommended)
|
|
61
|
-
- `speed-first` -- sonnet for all phases (fastest)
|
|
62
|
-
- `budget` -- haiku for research/implement, sonnet for plan/review (cheapest, may reduce research quality)
|
|
63
|
-
- `none` -- inherit parent model (current behavior)
|
|
64
|
-
- "Keep current" -- no change
|
|
65
|
-
|
|
66
|
-
If "Keep current", output "No changes made." and stop.
|
|
67
|
-
|
|
68
|
-
If switching to `budget`, display warning:
|
|
69
|
-
```
|
|
70
|
-
Note: The budget profile uses haiku for research and implement phases.
|
|
71
|
-
Haiku may produce lower-quality research outputs for complex features.
|
|
72
|
-
RPI research agents have strict requirements (evidence-backed verdicts,
|
|
73
|
-
structured analysis). Consider using --deep tier sparingly with this profile.
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
## 5. Validate profile name
|
|
77
|
-
|
|
78
|
-
Check that the provided profile name is one of: `quality-first`, `balanced`, `speed-first`, `budget`, `none`.
|
|
79
|
-
|
|
80
|
-
If invalid:
|
|
81
|
-
```
|
|
82
|
-
Unknown profile: "{input}"
|
|
83
|
-
|
|
84
|
-
Valid profiles: quality-first, balanced, speed-first, budget, none
|
|
85
|
-
|
|
86
|
-
Usage: /rpi:set-profile [profile-name]
|
|
87
|
-
Run /rpi:set-profile with no arguments to see current profile and select interactively.
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
Stop. Do not modify config.
|
|
91
|
-
|
|
92
|
-
## 6. Persist to .rpi.yaml
|
|
93
|
-
|
|
94
|
-
Read the current `.rpi.yaml` content. Update the `profile` key:
|
|
95
|
-
- If `profile:` line exists: replace the value
|
|
96
|
-
- If `profile:` line does not exist: add it after the last existing config key, before any comments at the end
|
|
97
|
-
- If selected profile is `none`: remove the `profile:` line (or set to empty)
|
|
98
|
-
|
|
99
|
-
Do NOT modify the `models:` block. Per-phase overrides are preserved as-is.
|
|
100
|
-
|
|
101
|
-
Write the updated `.rpi.yaml`.
|
|
102
|
-
|
|
103
|
-
## 7. Confirm
|
|
104
|
-
|
|
105
|
-
Display the new effective mapping:
|
|
106
|
-
```
|
|
107
|
-
Profile switched to: {profile_name}
|
|
108
|
-
|
|
109
|
-
Phase mappings:
|
|
110
|
-
research: {model}
|
|
111
|
-
plan: {model}
|
|
112
|
-
implement: {model}
|
|
113
|
-
review: {model}
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
If `models:` overrides exist:
|
|
117
|
-
```
|
|
118
|
-
Note: Per-phase overrides in .rpi.yaml take precedence over the profile.
|
|
119
|
-
Overridden phases: {list}
|
|
120
|
-
```
|
|
121
|
-
|
|
122
|
-
Tip: Edit .rpi.yaml to customize individual phases.
|
|
123
|
-
|
|
124
|
-
</process>
|
package/commands/rpi/test.md
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rpi:test
|
|
3
|
-
description: Run TDD (Red-Green-Refactor) on a specific task or set of tasks from the plan. Writes one failing test, verifies failure, implements minimal code, verifies pass, refactors.
|
|
4
|
-
argument-hint: "<feature-slug> [--task <id>] [--all]"
|
|
5
|
-
allowed-tools:
|
|
6
|
-
- Read
|
|
7
|
-
- Write
|
|
8
|
-
- Edit
|
|
9
|
-
- Bash
|
|
10
|
-
- Glob
|
|
11
|
-
- Grep
|
|
12
|
-
- Agent
|
|
13
|
-
- AskUserQuestion
|
|
14
|
-
---
|
|
15
|
-
|
|
16
|
-
<objective>
|
|
17
|
-
Execute strict TDD cycles (RED → GREEN → REFACTOR) for tasks in a feature's PLAN.md. One test at a time, verify fail, implement, verify pass.
|
|
18
|
-
</objective>
|
|
19
|
-
|
|
20
|
-
<process>
|
|
21
|
-
|
|
22
|
-
## 1. Load config and parse arguments
|
|
23
|
-
|
|
24
|
-
Read `.rpi.yaml` for configuration (folder, test_runner). Also read `profile` and `models` keys.
|
|
25
|
-
Parse `$ARGUMENTS`:
|
|
26
|
-
- First argument: `{feature-slug}` (required)
|
|
27
|
-
- `--task <id>`: run TDD for a specific task (e.g., `1.2`)
|
|
28
|
-
- `--all`: run TDD for all uncompleted tasks sequentially
|
|
29
|
-
|
|
30
|
-
If no `--task` or `--all`, ask the user which task to work on.
|
|
31
|
-
|
|
32
|
-
## 1b. Resolve model
|
|
33
|
-
|
|
34
|
-
Resolve the model for the `implement` 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.
|
|
35
|
-
|
|
36
|
-
## 2. Validate prerequisites
|
|
37
|
-
|
|
38
|
-
Read `{folder}/{feature-slug}/plan/PLAN.md`. If missing:
|
|
39
|
-
```
|
|
40
|
-
Plan not found. Run /rpi:plan {feature-slug} first.
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
Read `{folder}/{feature-slug}/plan/eng.md` for technical context (especially Testing Strategy section).
|
|
44
|
-
|
|
45
|
-
## 3. Detect test infrastructure
|
|
46
|
-
|
|
47
|
-
Scan the project for existing test setup:
|
|
48
|
-
- Look for test config files: `jest.config.*`, `vitest.config.*`, `pytest.ini`, `pyproject.toml [tool.pytest]`, `*.test.*`, `*.spec.*`
|
|
49
|
-
- Identify the test runner command (from config `test_runner` or auto-detect)
|
|
50
|
-
- Identify test file naming convention (`*.test.ts`, `*.spec.ts`, `*_test.py`, etc.)
|
|
51
|
-
- Identify assertion style (`expect`, `assert`, etc.)
|
|
52
|
-
|
|
53
|
-
If no test infrastructure found, ask the user:
|
|
54
|
-
"No test setup detected. What test framework and runner should I use?"
|
|
55
|
-
|
|
56
|
-
## 4. For each target task, run TDD cycle
|
|
57
|
-
|
|
58
|
-
### Phase RED: Write failing test
|
|
59
|
-
|
|
60
|
-
Launch test-engineer agent. If a model was resolved in Step 1b, include `model: "{resolved_model}"` in the Agent tool call.
|
|
61
|
-
```
|
|
62
|
-
You are the test-engineer agent for the RPI workflow.
|
|
63
|
-
|
|
64
|
-
Read these files:
|
|
65
|
-
- {folder}/{feature-slug}/plan/PLAN.md
|
|
66
|
-
- {folder}/{feature-slug}/plan/eng.md
|
|
67
|
-
|
|
68
|
-
Current task:
|
|
69
|
-
**{task_id}** {task_description}
|
|
70
|
-
Files: {files}
|
|
71
|
-
|
|
72
|
-
Test infrastructure:
|
|
73
|
-
- Framework: {detected_framework}
|
|
74
|
-
- File convention: {convention}
|
|
75
|
-
- Assertion style: {style}
|
|
76
|
-
|
|
77
|
-
Write ONE failing test for this task:
|
|
78
|
-
1. Create or edit the appropriate test file following project conventions
|
|
79
|
-
2. Write a single test that describes the expected behavior
|
|
80
|
-
3. The test must exercise real code through the public interface
|
|
81
|
-
4. Use clear, behavior-describing test name
|
|
82
|
-
5. Minimal assertions — one logical check
|
|
83
|
-
|
|
84
|
-
Do NOT write any implementation code. Only the test.
|
|
85
|
-
|
|
86
|
-
Follow test-engineer rules from RPI agent guidelines.
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
### Phase VERIFY RED: Confirm correct failure
|
|
90
|
-
|
|
91
|
-
Run the test:
|
|
92
|
-
```bash
|
|
93
|
-
{test_runner} {test_file}
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
Check the output:
|
|
97
|
-
- **Test fails with expected reason** (function/module not found, assertion fails) → proceed to GREEN
|
|
98
|
-
- **Test errors** (syntax error, import error, typo) → fix the test, re-run
|
|
99
|
-
- **Test passes** → the behavior already exists. Either the test is wrong or the task is already done. Ask the user.
|
|
100
|
-
|
|
101
|
-
Report to user:
|
|
102
|
-
```
|
|
103
|
-
RED: Test fails correctly.
|
|
104
|
-
Test: {test_name}
|
|
105
|
-
Failure: {failure_reason}
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Phase GREEN: Minimal implementation
|
|
109
|
-
|
|
110
|
-
Launch plan-executor agent. If a model was resolved, include `model: "{resolved_model}"` in the Agent tool call.
|
|
111
|
-
```
|
|
112
|
-
You are implementing a single task using TDD.
|
|
113
|
-
|
|
114
|
-
The following test is currently FAILING:
|
|
115
|
-
{test_file}:{test_name}
|
|
116
|
-
Failure reason: {failure_reason}
|
|
117
|
-
|
|
118
|
-
Write the MINIMAL code to make this test pass.
|
|
119
|
-
- Only touch files listed for this task
|
|
120
|
-
- Do NOT add features beyond what the test requires
|
|
121
|
-
- Do NOT write additional tests
|
|
122
|
-
- Match existing code style
|
|
123
|
-
|
|
124
|
-
Task context:
|
|
125
|
-
**{task_id}** {task_description}
|
|
126
|
-
Files: {files}
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Phase VERIFY GREEN: Confirm pass
|
|
130
|
-
|
|
131
|
-
Run the test again:
|
|
132
|
-
```bash
|
|
133
|
-
{test_runner} {test_file}
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Also run the full test suite to check for regressions:
|
|
137
|
-
```bash
|
|
138
|
-
{test_runner}
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Check:
|
|
142
|
-
- **Target test passes** → proceed to REFACTOR
|
|
143
|
-
- **Target test fails** → fix implementation, re-run (do NOT change the test)
|
|
144
|
-
- **Other tests break** → fix regressions before proceeding
|
|
145
|
-
|
|
146
|
-
Report to user:
|
|
147
|
-
```
|
|
148
|
-
GREEN: Test passes.
|
|
149
|
-
Test: {test_name}
|
|
150
|
-
All tests: {pass_count}/{total_count} passing
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Phase REFACTOR: Clean up
|
|
154
|
-
|
|
155
|
-
Review the implementation just written:
|
|
156
|
-
- Remove duplication
|
|
157
|
-
- Improve names
|
|
158
|
-
- Extract helpers if warranted (3+ uses)
|
|
159
|
-
- Do NOT add new behavior
|
|
160
|
-
|
|
161
|
-
After refactoring, re-run tests to confirm still green:
|
|
162
|
-
```bash
|
|
163
|
-
{test_runner}
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
### Commit
|
|
167
|
-
|
|
168
|
-
If all tests pass:
|
|
169
|
-
```bash
|
|
170
|
-
git add {changed_files}
|
|
171
|
-
git commit -m "{type}({task_id}): {task_description}"
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
## 5. Check for additional tests needed
|
|
175
|
-
|
|
176
|
-
After the first TDD cycle for a task, check eng.md for additional test scenarios:
|
|
177
|
-
- Edge cases mentioned in the plan
|
|
178
|
-
- Error handling paths
|
|
179
|
-
- Boundary conditions
|
|
180
|
-
|
|
181
|
-
If more tests are needed, ask the user:
|
|
182
|
-
"Task {task_id} has additional test scenarios. Continue with next test cycle?"
|
|
183
|
-
|
|
184
|
-
If yes, repeat the TDD cycle (RED → GREEN → REFACTOR) for each additional test.
|
|
185
|
-
|
|
186
|
-
## 6. Report results
|
|
187
|
-
|
|
188
|
-
```
|
|
189
|
-
TDD complete for task {task_id}:
|
|
190
|
-
- Tests written: {N}
|
|
191
|
-
- All passing: {pass_count}/{total_count}
|
|
192
|
-
- Files changed: {list}
|
|
193
|
-
|
|
194
|
-
{If --all: proceed to next task}
|
|
195
|
-
{If single task: suggest next task or /rpi:implement to continue}
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
</process>
|