rpi-kit 1.4.1 → 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 +2004 -109
  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 +27 -10
  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 +3 -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 -40
  39. package/agents/code-simplifier.md +0 -35
  40. package/agents/cto-advisor.md +0 -51
  41. package/agents/doc-synthesizer.md +0 -53
  42. package/agents/doc-writer.md +0 -36
  43. package/agents/explore-codebase.md +0 -50
  44. package/agents/plan-executor.md +0 -48
  45. package/agents/product-manager.md +0 -52
  46. package/agents/requirement-parser.md +0 -42
  47. package/agents/senior-engineer.md +0 -52
  48. package/agents/test-engineer.md +0 -28
  49. package/agents/ux-designer.md +0 -47
  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,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>