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,58 +0,0 @@
1
- ---
2
- name: ux-designer
3
- description: Analyzes user flows, interaction patterns, and UI decisions for features. Use during deep research and planning to create ux.md. Spawned by /rpi:research (deep tier) and /rpi:plan.
4
- tools: Read, Glob, Grep
5
- color: magenta
6
- ---
7
-
8
- <role>
9
- You design user experiences by mapping journeys, identifying interaction patterns, and citing existing components. You think flow-first, then screens.
10
- </role>
11
-
12
- <rules>
13
- 1. Start with user journey, then screens — never wireframes without a flow
14
- 2. Cite existing components in the codebase that can be reused or extended — search for them
15
- 3. Cover edge cases: errors, empty states, loading, permissions, offline
16
- 4. If the feature has no UI, state that explicitly — don't invent one
17
- 5. Accessibility is not optional — include keyboard nav, screen reader, and contrast considerations
18
- 6. Reference existing design patterns in the codebase — don't introduce new ones without justification
19
- </rules>
20
-
21
- <anti_patterns>
22
- - Bad: "Modern, clean UI with great user experience"
23
- - Good: "Reuse existing Card component (src/components/ui/Card.tsx) with OAuth provider icons. Add loading spinner from existing Spinner component during redirect."
24
-
25
- - Bad: "Error handling should be user-friendly"
26
- - Good: "On OAuth failure: show inline Alert component with provider-specific message. 'Google sign-in failed: account not found. Try another provider or sign up with email.'"
27
- </anti_patterns>
28
-
29
- <output_format>
30
- ## [UX Designer]
31
-
32
- ### User Journey
33
- Verdict: GO | CONCERN | BLOCK
34
-
35
- 1. {Step}: {what user sees/does} → {system response}
36
- 2. {Step}: ...
37
- ...
38
-
39
- ### Interaction Patterns
40
- - {Pattern}: {description} — Existing component: {path or "new needed"}
41
-
42
- ### Edge Cases
43
- | Scenario | User Sees | System Does |
44
- |----------|-----------|-------------|
45
- | {error case} | {message/UI} | {behavior} |
46
- | {empty state} | {message/UI} | {behavior} |
47
- | {loading} | {indicator} | {behavior} |
48
-
49
- ### Existing Components to Reuse
50
- - `{component path}`: {how to use it}
51
-
52
- ### Accessibility
53
- - Keyboard: {navigation approach}
54
- - Screen reader: {ARIA labels needed}
55
- - Contrast: {any concerns}
56
-
57
- Estimated Complexity: S | M | L | XL
58
- </output_format>
package/codex.md DELETED
@@ -1,72 +0,0 @@
1
- # RPI Workflow Rules
2
-
3
- You follow the RPI (Research → Plan → Implement) workflow for feature development.
4
-
5
- ## Core Principles
6
-
7
- 1. **Never implement without research.** Every feature starts with a REQUEST.md and goes through a GO/NO-GO research gate.
8
- 2. **Never code without a plan.** The plan phase produces structured artifacts (PLAN.md, eng.md, and optionally pm.md/ux.md) before any code is written.
9
- 3. **Track every task.** Implementation uses task-level tracking with commits per task and phase checkpoints.
10
- 4. **Simplify before review.** After implementation, run code simplification (reuse, quality, efficiency) before code review.
11
- 5. **Review against the plan.** Code review checks implementation against plan requirements, not just code quality.
12
- 6. **Test before you code (when TDD enabled).** Write one failing test, verify it fails, write minimal code to pass, verify it passes, refactor. No implementation without a failing test first.
13
-
14
- ## File Conventions
15
-
16
- ```
17
- {folder}/{feature-slug}/
18
- ├── REQUEST.md # Feature description (structured sections)
19
- ├── research/
20
- │ └── RESEARCH.md # GO/NO-GO analysis with agent perspectives
21
- ├── plan/
22
- │ ├── PLAN.md # Task checklist with effort, deps, files
23
- │ ├── pm.md # (adaptive) User stories + acceptance criteria
24
- │ ├── ux.md # (adaptive) User flows + interaction patterns
25
- │ └── eng.md # Technical architecture + dependencies
26
- └── implement/
27
- └── IMPLEMENT.md # Full audit trail: tasks, commits, deviations
28
- ```
29
-
30
- ## Workflow Commands
31
-
32
- - `/rpi:init` — Set up RPI config for this project
33
- - `/rpi:new` — Interactive interview to create a feature REQUEST.md
34
- - `/rpi:research <feature>` — Research phase with GO/NO-GO verdict
35
- - `/rpi:plan <feature>` — Generate plan artifacts from research
36
- - `/rpi:implement <feature>` — Execute plan with task tracking
37
- - `/rpi:simplify <feature>` — Code simplification (reuse, quality, efficiency)
38
- - `/rpi:test <feature>` — Run TDD cycles (RED → GREEN → REFACTOR) per task
39
- - `/rpi:status` — Show all features and their current phase
40
- - `/rpi:review <feature>` — Code review against plan
41
- - `/rpi:docs <feature>` — Generate documentation from artifacts
42
- - `/rpi:add-todo` — Capture quick implementation ideas
43
-
44
- ## Research Tiers
45
-
46
- - `--quick` — Feasibility check only (2 agents: requirements + codebase)
47
- - `--standard` — Scope + technical approach (4 agents: + PM + engineer)
48
- - `--deep` — Full analysis with strategic assessment (5-6 agents: + CTO + UX if UI)
49
-
50
- ## Agent Team
51
-
52
- | Role | Perspective |
53
- |------|-------------|
54
- | Requirement Parser | Extracts structured requirements, lists unknowns |
55
- | Product Manager | Scope, user stories, effort, acceptance criteria |
56
- | UX Designer | User flows, interaction patterns, existing components |
57
- | Senior Engineer | Technical approach, architecture, dependencies |
58
- | CTO Advisor | Risk, feasibility, strategic alignment, alternatives |
59
- | Doc Synthesizer | Merges research into executive summary + verdict |
60
- | Plan Executor | Implements tasks surgically, one at a time |
61
- | Code Simplifier | Reuse, quality, efficiency checks with fixes |
62
- | Code Reviewer | Reviews against plan requirements |
63
- | Codebase Explorer | Scans existing code for patterns and context |
64
- | Test Engineer | Writes failing tests before implementation (TDD) |
65
- | Doc Writer | Generates documentation from artifacts |
66
-
67
- ## GO/NO-GO Verdicts
68
-
69
- - **GO** — Feature is feasible, proceed to planning
70
- - **GO with concerns** — Feasible but has risks that need mitigation
71
- - **NO-GO** — Not feasible as described; alternatives suggested
72
- - Override a NO-GO verdict: `/rpi:plan {feature-slug} --force`
@@ -1,83 +0,0 @@
1
- ---
2
- name: rpi:add-todo
3
- description: Add a quick todo so you don't forget what to implement next.
4
- argument-hint: "[todo title]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - AskUserQuestion
11
- ---
12
-
13
- <objective>
14
- Create a todo file in `{folder}/todos/` to capture an implementation idea before it's forgotten.
15
- </objective>
16
-
17
- <process>
18
-
19
- ## 1. Load config
20
-
21
- Read `.rpi.yaml` for folder path. Default to `rpi/` if not found.
22
-
23
- ## 2. Ensure todos folder exists
24
-
25
- ```bash
26
- mkdir -p {folder}/todos
27
- ```
28
-
29
- ## 3. Determine todo title
30
-
31
- If `$ARGUMENTS` contains a title, use it. Otherwise ask:
32
- "What do you want to remember to implement?"
33
-
34
- Convert the title to a kebab-case slug for the filename.
35
-
36
- ## 4. Check for duplicates
37
-
38
- Use Glob to check if `{folder}/todos/{slug}.md` already exists. If yes, warn the user and ask if they want to update the existing one or pick a different name.
39
-
40
- ## 5. Quick interview
41
-
42
- Ask 1-2 focused questions using AskUserQuestion:
43
-
44
- - "Brief description — what should this do?" (skip if the title is already descriptive enough)
45
- - "Priority?" — Options: `high`, `medium` (default), `low`
46
-
47
- Keep it fast. The point is to capture the idea before it's lost, not to write a full spec.
48
-
49
- ## 6. Create the todo file
50
-
51
- Write `{folder}/todos/{slug}.md`:
52
-
53
- ```markdown
54
- # {Todo Title}
55
-
56
- ## What
57
- {Brief description of what to implement}
58
-
59
- ## Priority
60
- {high | medium | low}
61
-
62
- ## Notes
63
- - {Any extra context the user mentioned, or leave empty}
64
-
65
- ---
66
- Added: {YYYY-MM-DD}
67
- Status: pending
68
- ```
69
-
70
- ## 7. Confirm
71
-
72
- Output:
73
-
74
- ```
75
- Todo added: {folder}/todos/{slug}.md
76
- Priority: {priority}
77
-
78
- Quick actions:
79
- /rpi:new {slug} Promote to a full RPI feature
80
- /rpi:status Show all features and their current phase
81
- ```
82
-
83
- </process>
@@ -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>
@@ -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>