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,107 +1,190 @@
1
1
  ---
2
2
  name: rpi:init
3
- description: Initialize RPI workflow configuration for this project. Sets up feature folder location, default research tier, and preferences.
3
+ description: Configure RPIKit and generate project-context.md by analyzing your codebase.
4
4
  argument-hint: ""
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
8
8
  - Bash
9
9
  - Glob
10
+ - Grep
11
+ - Agent
10
12
  - AskUserQuestion
11
13
  ---
12
14
 
13
- <objective>
14
- Create a `.rpi.yaml` configuration file at the project root with user preferences for the RPI workflow.
15
- </objective>
15
+ # /rpi:init — Setup & Context Generation
16
16
 
17
- <process>
17
+ Configure RPIKit for this project: interview the user for preferences, write `.rpi.yaml`, create directory structure, and launch Atlas to generate `rpi/context.md`.
18
18
 
19
- ## 1. Check for existing config
19
+ ---
20
+
21
+ ## Step 1: Check for existing config
22
+
23
+ Check if `.rpi.yaml` exists in the project root.
24
+
25
+ If it exists:
26
+ - Read the file and store its contents as `$EXISTING_CONFIG`.
27
+ - Ask the user with AskUserQuestion: "`.rpi.yaml` already exists. Do you want to overwrite it with fresh config, or update specific settings?"
28
+ - If overwrite: proceed to Step 2 (will replace everything).
29
+ - If update: proceed to Step 2 but pre-fill answers from `$EXISTING_CONFIG` and only ask about values the user wants to change.
20
30
 
21
- Use Glob to search for `.rpi.yaml` at the project root. If it exists, read it and ask the user if they want to reconfigure or keep existing settings.
31
+ If it does not exist: proceed to Step 2.
22
32
 
23
- ## 2. Interview the user
33
+ ## Step 2: Interview Batch 1 (Development preferences)
34
+
35
+ Ask the user with a single AskUserQuestion call:
36
+
37
+ ```
38
+ Let's configure RPIKit for this project. A few quick questions:
24
39
 
25
- Use AskUserQuestion to gather preferences. Ask up to 4 questions at a time:
40
+ 1. **TDD** Should Sage write failing tests before Forge implements? (true/false, default: false)
41
+ 2. **Commit style** — conventional commits or freeform? (conventional/freeform, default: conventional)
42
+ 3. **UX agent (Pixel)** — When should Pixel participate in planning? (auto = only if frontend detected / always / never, default: auto)
43
+ ```
26
44
 
27
- **Batch 1:**
28
- - "Where should feature folders live?" — Options: `rpi/` (Recommended), `.rpi/`, `docs/features/`, custom path
29
- - "What's your default research tier?" — Options: `standard` (Recommended), `quick`, `deep`
45
+ Store the responses. Use defaults for any unanswered or unclear answers.
30
46
 
31
- **Batch 2:**
32
- - "What commit message style do you prefer?" — Options: `conventional` (Recommended, e.g., feat(1.1): task name), `descriptive` (plain English)
47
+ ## Step 3: Interview — Batch 2 (Workflow preferences)
33
48
 
34
- **Batch 3:**
35
- - "Task count threshold for parallel execution?" — Options: 8 (Recommended), 5, 12, always sequential
36
- - "How do you want to isolate features?" — Options: `none` (Recommended — work on current branch), `branch` (create a git branch per feature), `worktree` (create a git worktree + branch in `.worktrees/`)
37
- - "Session isolation to prevent context drift?" — Options: `auto` (Recommended — adapts to feature complexity), `aggressive` (always checkpoint, maximum isolation), `off` (no session boundaries)
49
+ Ask the user with a single AskUserQuestion call:
38
50
 
39
- **Batch 4 (TDD):**
40
- - "Enable Test-Driven Development during implementation?" — Options: No (default), Yes
41
- - If yes: "What command runs your tests?" — Options: auto-detect (Recommended), `npm test`, `npx vitest`, `pytest`, custom
51
+ ```
52
+ Almost done:
42
53
 
43
- **Batch 5 (Model Profiles):**
44
- - "Which model profile do you want for agent execution?" Options:
45
- - `balanced` (Recommended — opus for research/plan/review, sonnet for implement)
46
- - `quality-first` (opus everywhere — maximum quality)
47
- - `speed-first` (sonnet everywhere — maximum speed)
48
- - `budget` (haiku + sonnet mix — cost optimized, may reduce research quality)
49
- - "No profile" (default — all agents inherit parent model)
54
+ 1. **Auto-learn** Should review findings be saved to rpi/solutions/ automatically? (true/false, default: true)
55
+ 2. **Party mode agents** How many agents should participate in /rpi:party debates? (3-5, default: 4)
56
+ ```
50
57
 
51
- If reconfiguring and a profile already exists, show: "Current profile: {profile}. Change model profile?" with the same options plus "Keep current ({profile})".
58
+ Store the responses. Use defaults for any unanswered or unclear answers.
52
59
 
53
- ## 3. Create .rpi.yaml
60
+ ## Step 4: Write .rpi.yaml
54
61
 
55
- Write the config file at the project root:
62
+ Write `.rpi.yaml` to the project root with the collected responses and sensible defaults:
56
63
 
57
64
  ```yaml
58
- # RPI Workflow Configuration
59
- # Docs: https://github.com/mndz/rpi-kit
60
-
61
- folder: {user_choice}
62
- tier: {user_choice}
63
- commit_style: {conventional|descriptive}
64
- parallel_threshold: {number}
65
- skip_artifacts: []
66
- isolation: {none|branch|worktree}
67
- tdd: {true|false}
68
- test_runner: {auto|command}
69
- session_isolation: {auto|aggressive|off}
70
- max_tasks_per_session: 5 # tasks before session warning (Tier 2) or forced checkpoint (Tier 3)
71
- profile: {balanced|quality-first|speed-first|budget} # omit if "No profile" selected
65
+ version: 2
66
+
67
+ # Directories
68
+ folder: rpi/features
69
+ specs_dir: rpi/specs
70
+ solutions_dir: rpi/solutions
71
+ context_file: rpi/context.md
72
+
73
+ # Execution
74
+ parallel_threshold: 8
75
+ commit_style: {user_response or "conventional"}
76
+ tdd: {user_response or false}
77
+
78
+ # Agents
79
+ ux_agent: {user_response or "auto"}
80
+
81
+ # Quick flow
82
+ quick_complexity: S
83
+
84
+ # Knowledge compounding
85
+ auto_learn: {user_response or true}
86
+
87
+ # Party mode
88
+ party_default_agents: {user_response or 4}
72
89
  ```
73
90
 
74
- ## 4. Create feature folder
91
+ If updating an existing config: merge user responses into `$EXISTING_CONFIG`, preserving any keys the user did not explicitly change.
92
+
93
+ ## Step 5: Create directory structure
94
+
95
+ Run these commands to create the RPIKit directories:
75
96
 
76
- Create the configured folder directory if it doesn't exist:
77
97
  ```bash
78
- mkdir -p {folder}
98
+ mkdir -p rpi/specs
99
+ mkdir -p rpi/solutions
100
+ mkdir -p rpi/features
79
101
  ```
80
102
 
81
- ## 5. Confirm
103
+ ## Step 6: Launch Atlas for context generation
82
104
 
83
- Output a brief confirmation:
105
+ Launch Atlas agent to analyze the codebase and generate `rpi/context.md`:
84
106
 
85
- With profile:
86
107
  ```
87
- RPI initialized.
88
- Config: .rpi.yaml
89
- Features: {folder}/
90
- Tier: {tier}
91
- Profile: {profile} (research: {model}, plan: {model}, implement: {model}, review: {model})
92
-
93
- Next: /rpi:new to start your first feature.
108
+ You are Atlas. Analyze this entire codebase and generate a project context file.
109
+
110
+ Your task:
111
+ 1. Read config files first: package.json, tsconfig.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, composer.json, or whatever exists
112
+ 2. Scan the directory structure to understand architecture and layering
113
+ 3. Find 5-10 representative source files across different directories
114
+ 4. Detect naming conventions, component patterns, import style, error handling
115
+ 5. Check for CLAUDE.md, .cursorrules, .clinerules, or similar project rules files
116
+ 6. Identify the testing framework and test patterns
117
+ 7. Identify styling/CSS approach if frontend
118
+
119
+ Produce a context file with this EXACT structure:
120
+
121
+ # Project Context
122
+
123
+ ## Stack
124
+ - Language: {language} {version}
125
+ - Framework: {framework} {version}
126
+ - Database: {db} via {orm} (or "None detected")
127
+ - Testing: {test_framework}
128
+ - Styling: {approach} (or "N/A")
129
+
130
+ ## Conventions
131
+ - File naming: {pattern}
132
+ - Components: {pattern} (or "N/A")
133
+ - Error handling: {pattern}
134
+ - API: {pattern} (or "N/A")
135
+
136
+ ## Architecture
137
+ - {directory}: {purpose}
138
+ - {directory}: {purpose}
139
+ - ...
140
+
141
+ ## Rules
142
+ - {rule 1 derived from codebase analysis or existing rules files}
143
+ - {rule 2}
144
+ - ...
145
+
146
+ RULES:
147
+ - Be specific — cite actual patterns you found, not generic advice
148
+ - Only include what you can verify from the code
149
+ - If a section doesn't apply (e.g., no database), write "N/A" and move on
150
+ - Keep each section concise — this file is read by every agent on every run
94
151
  ```
95
152
 
96
- Without profile:
97
- ```
98
- RPI initialized.
99
- Config: .rpi.yaml
100
- Features: {folder}/
101
- Tier: {tier}
102
- Profile: none (agents inherit parent model)
153
+ Wait for Atlas to complete. Store the output as `$ATLAS_CONTEXT`.
154
+
155
+ ## Step 7: Write rpi/context.md
156
+
157
+ Write the Atlas output to `rpi/context.md`.
158
+
159
+ ## Step 8: Output summary
160
+
161
+ Output to the user:
103
162
 
104
- Next: /rpi:new to start your first feature.
105
163
  ```
164
+ RPIKit initialized!
106
165
 
107
- </process>
166
+ Config: .rpi.yaml
167
+ Context: rpi/context.md
168
+ Directories: rpi/specs/, rpi/solutions/, rpi/features/
169
+
170
+ Settings:
171
+ - TDD: {value}
172
+ - Commit style: {value}
173
+ - UX agent: {value}
174
+ - Auto-learn: {value}
175
+ - Party agents: {value}
176
+
177
+ Quick reference:
178
+ - /rpi:new <feature> Create a new feature (Luna interviews you)
179
+ - /rpi <feature> Auto-progress to next phase
180
+ - /rpi:research <feat> Run research phase
181
+ - /rpi:plan <feat> Run plan phase
182
+ - /rpi:implement <feat> Run implement phase
183
+ - /rpi:simplify <feat> Run simplify phase
184
+ - /rpi:review <feat> Run review phase
185
+ - /rpi:docs <feat> Run docs phase
186
+ - /rpi:status View all features and progress
187
+ - /rpi:party "topic" Multi-agent debate
188
+ - /rpi:learn Save a solution manually
189
+ - /rpi:archive <feat> Archive completed feature
190
+ ```
@@ -0,0 +1,114 @@
1
+ ---
2
+ name: rpi:learn
3
+ description: Manually capture a solution or insight to the knowledge base.
4
+ argument-hint: "[description]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - AskUserQuestion
12
+ ---
13
+
14
+ # /rpi:learn — Knowledge Capture
15
+
16
+ Manually capture a solution, insight, or lesson learned into `rpi/solutions/`. Reads recent context from git and the codebase to enrich the entry.
17
+
18
+ ---
19
+
20
+ ## Step 1: Load config
21
+
22
+ Read `.rpi.yaml` from the project root. Extract:
23
+ - `solutions_dir` (default: `rpi/solutions`)
24
+
25
+ If `.rpi.yaml` doesn't exist, use defaults silently.
26
+
27
+ ## Step 2: Get description
28
+
29
+ Parse `$ARGUMENTS` for a description string.
30
+
31
+ - If provided: use it as `$DESCRIPTION`.
32
+ - If not provided: ask the user with AskUserQuestion:
33
+ "What did you learn? (e.g. 'N+1 query in Prisma', 'race condition in session refresh', 'pattern for retry with backoff')"
34
+
35
+ ## Step 3: Ask category
36
+
37
+ Ask the user with AskUserQuestion:
38
+ "Which category fits best?
39
+ 1. performance
40
+ 2. security
41
+ 3. database
42
+ 4. testing
43
+ 5. architecture
44
+ 6. patterns
45
+ 7. other"
46
+
47
+ Map the user's response to a category slug. Accept both the number and the name (e.g. "1" or "performance"). Default to "other" if unclear.
48
+
49
+ Store as `$CATEGORY`.
50
+
51
+ ## Step 4: Derive slug
52
+
53
+ Convert `$DESCRIPTION` to kebab-case:
54
+ - Lowercase
55
+ - Replace spaces and underscores with hyphens
56
+ - Strip special characters
57
+ - Truncate to 60 characters max
58
+
59
+ Store as `$SLUG`.
60
+
61
+ ## Step 5: Gather context from codebase
62
+
63
+ 1. Run `git diff HEAD~3..HEAD --stat` to get recent changes — store as `$RECENT_CHANGES`.
64
+ 2. Run `git diff HEAD~3..HEAD` to get the actual diff — store as `$RECENT_DIFF`.
65
+ 3. Search for files related to the description using Grep and Glob:
66
+ - Extract key terms from `$DESCRIPTION`
67
+ - Search for those terms in the codebase
68
+ - Store relevant file paths as `$RELATED_FILES`
69
+
70
+ ## Step 6: Write solution file
71
+
72
+ 1. Ensure directory exists:
73
+ ```bash
74
+ mkdir -p {solutions_dir}/{$CATEGORY}
75
+ ```
76
+ 2. Write to `{solutions_dir}/{$CATEGORY}/{$SLUG}.md`:
77
+
78
+ ```markdown
79
+ # {Description}
80
+
81
+ ## Problem
82
+ {Describe the problem based on the description and recent diff context.
83
+ What symptoms did it cause? How did it manifest?}
84
+
85
+ ## Solution
86
+ {What fixed it or what approach works. Include relevant code snippets
87
+ from the recent diff if applicable.}
88
+
89
+ ## Prevention
90
+ {How to avoid this in the future. Patterns to follow, checks to add.}
91
+
92
+ ## Context
93
+ Date: {YYYY-MM-DD}
94
+ Files: {$RELATED_FILES or "Not identified"}
95
+ ```
96
+
97
+ 3. If the file already exists at that path, append a numeric suffix: `{$SLUG}-2.md`, `{$SLUG}-3.md`, etc.
98
+
99
+ ## Step 7: Commit
100
+
101
+ Stage and commit the new solutions file:
102
+
103
+ ```bash
104
+ git add {solutions_dir}/{$CATEGORY}/{$SLUG}.md
105
+ git commit -m "learn({$CATEGORY}): {$DESCRIPTION}"
106
+ ```
107
+
108
+ ## Step 8: Output summary
109
+
110
+ ```
111
+ Solution saved: {solutions_dir}/{$CATEGORY}/{$SLUG}.md
112
+
113
+ This will be automatically referenced by Scout during future research phases.
114
+ ```