rpi-kit 1.1.0 → 1.2.1
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/AGENTS.md +4 -0
- package/README.md +5 -2
- package/agents/plan-executor.md +33 -12
- package/bin/onboarding.js +8 -11
- package/codex.md +3 -0
- package/commands/rpi/add-todo.md +1 -1
- package/commands/rpi/implement.md +287 -120
- package/commands/rpi/init.md +3 -0
- package/commands/rpi/onboarding.md +354 -170
- package/commands/rpi/plan.md +82 -0
- package/commands/rpi/status.md +14 -3
- package/package.json +3 -3
- package/skills/rpi-agents/SKILL.md +3 -2
- package/skills/rpi-workflow/SKILL.md +39 -4
package/commands/rpi/init.md
CHANGED
|
@@ -35,6 +35,7 @@ Use AskUserQuestion to gather preferences. Ask up to 4 questions at a time:
|
|
|
35
35
|
**Batch 3:**
|
|
36
36
|
- "Task count threshold for parallel execution?" — Options: 8 (Recommended), 5, 12, always sequential
|
|
37
37
|
- "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/`)
|
|
38
|
+
- "Session isolation to prevent context drift?" — Options: `auto` (Recommended — adapts to feature complexity), `aggressive` (always checkpoint, maximum isolation), `off` (no session boundaries)
|
|
38
39
|
|
|
39
40
|
**Batch 4 (TDD):**
|
|
40
41
|
- "Enable Test-Driven Development during implementation?" — Options: No (default), Yes
|
|
@@ -58,6 +59,8 @@ review_after_implement: true
|
|
|
58
59
|
isolation: {none|branch|worktree}
|
|
59
60
|
tdd: {true|false}
|
|
60
61
|
test_runner: {auto|command}
|
|
62
|
+
session_isolation: {auto|aggressive|off}
|
|
63
|
+
max_tasks_per_session: 5 # tasks before session warning (Tier 2) or forced checkpoint (Tier 3)
|
|
61
64
|
```
|
|
62
65
|
|
|
63
66
|
## 4. Create feature folder
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: rpi:onboarding
|
|
3
|
-
description:
|
|
4
|
-
argument-hint: "[--
|
|
3
|
+
description: Analyze your codebase, generate a project profile, suggest features to build, and guide you through your first RPI feature.
|
|
4
|
+
argument-hint: "[--refresh]"
|
|
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
15
|
<objective>
|
|
14
|
-
|
|
16
|
+
Auto-analyze the user's codebase with parallel agents, generate a persistent .rpi-profile.md, suggest features to build, and interactively guide the user through their first feature.
|
|
15
17
|
</objective>
|
|
16
18
|
|
|
17
19
|
<process>
|
|
@@ -22,220 +24,402 @@ Output:
|
|
|
22
24
|
```
|
|
23
25
|
Welcome to RPIKit — Research, Plan, Implement.
|
|
24
26
|
|
|
25
|
-
RPIKit is a structured workflow that guides you through 3 phases before
|
|
26
|
-
any code. Each phase produces artifacts that feed the next, with
|
|
27
|
-
gates that prevent premature implementation.
|
|
27
|
+
RPIKit is a structured workflow that guides you through 3 phases before
|
|
28
|
+
writing any code. Each phase produces artifacts that feed the next, with
|
|
29
|
+
validation gates that prevent premature implementation.
|
|
28
30
|
|
|
29
|
-
|
|
31
|
+
I'm going to analyze your project first, then suggest features you
|
|
32
|
+
could build with RPIKit.
|
|
30
33
|
```
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
Check if `.rpi-profile.md` already exists and `--refresh` flag is NOT set:
|
|
36
|
+
- If exists: ask "Project profile already exists. Refresh it or skip to feature selection?"
|
|
37
|
+
- If `--refresh`: proceed with fresh analysis regardless
|
|
33
38
|
|
|
34
|
-
|
|
39
|
+
## 2. Codebase Analysis
|
|
35
40
|
|
|
41
|
+
Output:
|
|
36
42
|
```
|
|
37
|
-
|
|
38
|
-
───────────────────
|
|
39
|
-
|
|
40
|
-
/rpi:init One-time project setup (.rpi.yaml)
|
|
41
|
-
|
|
42
|
-
/rpi:new Describe your feature → REQUEST.md
|
|
43
|
-
│ You answer a few questions about what you want to build.
|
|
44
|
-
│ RPIKit captures requirements in a structured format.
|
|
45
|
-
▼
|
|
46
|
-
/rpi:research Analyze feasibility → RESEARCH.md
|
|
47
|
-
│ 2-6 agents run in parallel: parsing requirements,
|
|
48
|
-
│ exploring your codebase, assessing scope and risk.
|
|
49
|
-
│ Produces a GO / NO-GO verdict.
|
|
50
|
-
▼
|
|
51
|
-
/rpi:plan Generate specs + tasks → PLAN.md
|
|
52
|
-
│ Creates technical spec (eng.md), product requirements
|
|
53
|
-
│ (pm.md), UX design (ux.md), and a task checklist.
|
|
54
|
-
│ Adapts which artifacts to create based on feature type.
|
|
55
|
-
▼
|
|
56
|
-
/rpi:implement Execute tasks → IMPLEMENT.md
|
|
57
|
-
│ Builds the feature task-by-task with per-task commits.
|
|
58
|
-
│ Supports TDD (Red-Green-Refactor) and parallel execution.
|
|
59
|
-
▼
|
|
60
|
-
/rpi:simplify Code quality → auto-fix
|
|
61
|
-
│ 3 agents check: code reuse, quality patterns, efficiency.
|
|
62
|
-
│ Fixes issues directly.
|
|
63
|
-
▼
|
|
64
|
-
/rpi:review Verify against plan → PASS / FAIL
|
|
65
|
-
│ Reviews completeness, correctness, deviations, test
|
|
66
|
-
│ coverage. Every finding cites a plan requirement.
|
|
67
|
-
▼
|
|
68
|
-
/rpi:docs Document the code → inline docs + changelog
|
|
69
|
-
Adds JSDoc/docstrings, API docs, README and changelog
|
|
70
|
-
updates. Only runs after review PASS.
|
|
71
|
-
|
|
72
|
-
/rpi:status Dashboard — see all features and their current phase.
|
|
43
|
+
Analyzing your project...
|
|
73
44
|
```
|
|
74
45
|
|
|
75
|
-
|
|
46
|
+
Launch 3 agents in parallel using the Agent tool in a single message:
|
|
47
|
+
|
|
48
|
+
### Agent A: Stack & Conventions Scanner
|
|
76
49
|
|
|
77
50
|
```
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
51
|
+
You are analyzing a project's technology stack and coding conventions. This is a READ-ONLY task — do not write any files.
|
|
52
|
+
|
|
53
|
+
1. Use Glob to find project config files:
|
|
54
|
+
- package.json, tsconfig.json, tsconfig*.json
|
|
55
|
+
- Cargo.toml, pyproject.toml, setup.py, setup.cfg
|
|
56
|
+
- go.mod, Gemfile, composer.json, pom.xml, build.gradle
|
|
57
|
+
- .eslintrc*, .prettierrc*, biome.json
|
|
58
|
+
- vite.config.*, next.config.*, webpack.config.*
|
|
59
|
+
- jest.config.*, vitest.config.*, pytest.ini
|
|
60
|
+
- docker-compose.yml, Dockerfile
|
|
61
|
+
- prisma/schema.prisma, drizzle.config.*
|
|
62
|
+
|
|
63
|
+
2. Read the config files found to identify:
|
|
64
|
+
- Primary language and version
|
|
65
|
+
- Framework and version
|
|
66
|
+
- Database and ORM
|
|
67
|
+
- Test framework and runner
|
|
68
|
+
- Linter and formatter
|
|
69
|
+
- Bundler and build tool
|
|
70
|
+
- Styling approach (CSS modules, Tailwind, styled-components, etc.)
|
|
71
|
+
|
|
72
|
+
3. Use Glob to find 5-10 representative source files (pick from different directories):
|
|
73
|
+
- Read them to detect:
|
|
74
|
+
- File naming convention (kebab-case, camelCase, PascalCase, snake_case)
|
|
75
|
+
- Component/module pattern (functional components, classes, modules)
|
|
76
|
+
- Import style (relative paths, path aliases, barrel exports)
|
|
77
|
+
- Error handling pattern (try/catch, Result types, custom errors)
|
|
78
|
+
- API pattern (REST routes, GraphQL resolvers, tRPC procedures)
|
|
79
|
+
|
|
80
|
+
4. Identify architecture:
|
|
81
|
+
- Directory structure pattern (src/, app/, lib/, etc.)
|
|
82
|
+
- Layering (routes → services → repositories, etc.)
|
|
83
|
+
- Key entry points (main files, layout files, middleware)
|
|
84
|
+
|
|
85
|
+
Output your findings in this exact format:
|
|
86
|
+
|
|
87
|
+
## Stack
|
|
88
|
+
- Language: {language} {version}
|
|
89
|
+
- Framework: {framework} {version}
|
|
90
|
+
- Database: {db} via {orm}
|
|
91
|
+
- Testing: {test_framework}
|
|
92
|
+
- Styling: {approach}
|
|
93
|
+
- Linter: {tool}
|
|
94
|
+
- Bundler: {tool}
|
|
95
|
+
|
|
96
|
+
## Conventions
|
|
97
|
+
- File naming: {pattern}
|
|
98
|
+
- Component pattern: {pattern}
|
|
99
|
+
- Import style: {pattern}
|
|
100
|
+
- Error handling: {pattern}
|
|
101
|
+
- API pattern: {pattern}
|
|
102
|
+
|
|
103
|
+
## Architecture
|
|
104
|
+
- Pattern: {description}
|
|
105
|
+
- Key directories: {list}
|
|
106
|
+
- Entry points: {list}
|
|
99
107
|
```
|
|
100
108
|
|
|
101
|
-
|
|
109
|
+
### Agent B: Code Health Scanner
|
|
102
110
|
|
|
103
111
|
```
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
You are analyzing a project's code health. This is a READ-ONLY task — do not write any files.
|
|
113
|
+
|
|
114
|
+
1. Use Grep to search for task markers:
|
|
115
|
+
- Pattern: TODO|FIXME|HACK|XXX|WORKAROUND|BUG
|
|
116
|
+
- Record: file, line number, and the marker text
|
|
117
|
+
- Categorize by priority: FIXME/BUG = high, TODO = medium, HACK/XXX/WORKAROUND = low
|
|
118
|
+
|
|
119
|
+
2. Analyze test coverage gaps:
|
|
120
|
+
- Use Glob to find all source files (*.ts, *.tsx, *.js, *.jsx, *.py, *.rs, *.go, etc.)
|
|
121
|
+
- Use Glob to find all test files (*.test.*, *.spec.*, *_test.*, test_*.*)
|
|
122
|
+
- Compare: which source modules have no corresponding test file?
|
|
123
|
+
- List the untested modules
|
|
124
|
+
|
|
125
|
+
3. Check for dead code signals:
|
|
126
|
+
- Use Grep to find exported functions/classes
|
|
127
|
+
- Use Grep to find imports of those exports
|
|
128
|
+
- Flag exports with zero imports (potential dead code)
|
|
129
|
+
- Limit to 5 findings max
|
|
130
|
+
|
|
131
|
+
4. Check dependency health:
|
|
132
|
+
- If package.json exists, note how many dependencies and devDependencies
|
|
133
|
+
- Look for lock file (package-lock.json, yarn.lock, pnpm-lock.yaml)
|
|
134
|
+
- Note if any dependency versions use '*' or 'latest'
|
|
135
|
+
|
|
136
|
+
5. Find uncovered error paths:
|
|
137
|
+
- Use Grep to find try/catch blocks, .catch(), or error handlers
|
|
138
|
+
- Look for empty catch blocks or catch blocks that only log
|
|
139
|
+
- Limit to 5 findings max
|
|
140
|
+
|
|
141
|
+
Output your findings in this exact format:
|
|
142
|
+
|
|
143
|
+
## Health
|
|
144
|
+
- Task markers: {N} found ({high} high, {med} medium, {low} low priority)
|
|
145
|
+
- Test coverage: {tested}/{total} modules have tests ({percentage}%)
|
|
146
|
+
- Dead code signals: {N} potentially unused exports
|
|
147
|
+
- Dependencies: {N} deps, {M} devDeps, lock file: {yes/no}
|
|
148
|
+
- Uncovered error paths: {N} found
|
|
149
|
+
|
|
150
|
+
### High Priority Markers
|
|
151
|
+
- {file}:{line} — {marker text}
|
|
152
|
+
|
|
153
|
+
### Untested Modules
|
|
154
|
+
- {file} — no test file found
|
|
155
|
+
|
|
156
|
+
### Uncovered Error Paths
|
|
157
|
+
- {file}:{line} — {description}
|
|
158
|
+
|
|
159
|
+
## Suggested Features (from code health)
|
|
160
|
+
1. [{priority}] {slug} — {description based on findings}
|
|
161
|
+
2. [{priority}] {slug} — {description}
|
|
162
|
+
(Generate 1-3 suggestions based on the most impactful findings)
|
|
117
163
|
```
|
|
118
164
|
|
|
119
|
-
|
|
165
|
+
### Agent C: Git & History Analyzer
|
|
120
166
|
|
|
121
167
|
```
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
168
|
+
You are analyzing a project's git history and risk profile. This is a READ-ONLY task — do not write any files.
|
|
169
|
+
|
|
170
|
+
1. Run git commands to gather history (last 30 days):
|
|
171
|
+
```bash
|
|
172
|
+
git log --oneline --since="30 days ago" | head -30
|
|
173
|
+
```
|
|
174
|
+
```bash
|
|
175
|
+
git shortlog -sn --since="30 days ago"
|
|
176
|
+
```
|
|
177
|
+
```bash
|
|
178
|
+
git log --since="30 days ago" --pretty=format: --name-only | sort | uniq -c | sort -rn | head -10
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
2. Identify hotspot files (most frequently changed in 30 days)
|
|
182
|
+
|
|
183
|
+
3. Identify recent focus areas from commit messages:
|
|
184
|
+
- What themes appear? (auth, payments, UI, refactor, bugfix, etc.)
|
|
185
|
+
|
|
186
|
+
4. Check for GitHub remote and issues:
|
|
187
|
+
```bash
|
|
188
|
+
git remote get-url origin 2>/dev/null
|
|
189
|
+
```
|
|
190
|
+
If GitHub remote exists, try:
|
|
191
|
+
```bash
|
|
192
|
+
gh issue list --limit 5 --state open 2>/dev/null
|
|
193
|
+
```
|
|
194
|
+
If gh is not available or fails, skip gracefully.
|
|
195
|
+
|
|
196
|
+
5. Assess risks:
|
|
197
|
+
- Files changed very frequently (>10 times in 30 days) = churn risk
|
|
198
|
+
- Single contributor to critical files = bus factor risk
|
|
199
|
+
- No recent commits in important directories = stale code risk
|
|
200
|
+
|
|
201
|
+
Output your findings in this exact format:
|
|
202
|
+
|
|
203
|
+
## Git Insights
|
|
204
|
+
- Commits (30d): {N}
|
|
205
|
+
- Contributors (30d): {N}
|
|
206
|
+
- Most changed files: {file1} ({count}), {file2} ({count}), {file3} ({count})
|
|
207
|
+
- Recent focus: {themes}
|
|
208
|
+
- Open issues: {N} (or "GitHub CLI not available")
|
|
209
|
+
|
|
210
|
+
## Risks
|
|
211
|
+
- {risk_type}: {description} — {evidence}
|
|
212
|
+
(List 1-5 risks based on findings. If no significant risks, say "No significant risks detected.")
|
|
213
|
+
|
|
214
|
+
## Suggested Features (from git analysis)
|
|
215
|
+
1. [{priority}] {slug} — {description based on findings}
|
|
216
|
+
(Generate 0-2 suggestions. Only suggest if findings warrant it.)
|
|
140
217
|
```
|
|
141
218
|
|
|
142
|
-
##
|
|
219
|
+
## 3. Generate Project Profile
|
|
143
220
|
|
|
144
|
-
|
|
145
|
-
"Want me to create a demo feature so you can see the pipeline in action? I'll create a small example feature and walk you through each step."
|
|
221
|
+
After all 3 agents complete, merge their outputs into `.rpi-profile.md`.
|
|
146
222
|
|
|
147
|
-
|
|
148
|
-
- "Yes, show me a demo" → proceed to step 7
|
|
149
|
-
- "No, I'll start on my own" → skip to step 8
|
|
150
|
-
|
|
151
|
-
## 7. Demo walkthrough (if user wants demo)
|
|
152
|
-
|
|
153
|
-
Create a minimal demo feature to show what each artifact looks like:
|
|
154
|
-
|
|
155
|
-
### 7.1 Create demo config
|
|
156
|
-
|
|
157
|
-
If `.rpi.yaml` doesn't exist, create a minimal one:
|
|
158
|
-
```yaml
|
|
159
|
-
folder: rpi
|
|
160
|
-
tier: quick
|
|
161
|
-
auto_simplify: true
|
|
162
|
-
commit_style: conventional
|
|
163
|
-
parallel_threshold: 8
|
|
164
|
-
review_after_implement: true
|
|
165
|
-
isolation: none
|
|
166
|
-
tdd: false
|
|
167
|
-
test_runner: auto
|
|
168
|
-
```
|
|
223
|
+
### 3.1 Merge agent outputs
|
|
169
224
|
|
|
170
|
-
|
|
225
|
+
Combine the structured sections from all 3 agents:
|
|
226
|
+
- From Agent A: Stack, Conventions, Architecture
|
|
227
|
+
- From Agent B: Health, Suggested Features
|
|
228
|
+
- From Agent C: Git Insights, Risks, Suggested Features
|
|
171
229
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
230
|
+
### 3.2 Deduplicate and rank suggestions
|
|
231
|
+
|
|
232
|
+
Merge suggested features from Agent B and Agent C:
|
|
233
|
+
- Remove duplicates (same area of code)
|
|
234
|
+
- Rank by priority: HIGH > MEDIUM > LOW
|
|
235
|
+
- Keep top 5 suggestions max
|
|
236
|
+
|
|
237
|
+
### 3.3 Write .rpi-profile.md
|
|
238
|
+
|
|
239
|
+
Write the merged profile to `.rpi-profile.md` at the project root:
|
|
177
240
|
|
|
178
|
-
Write `rpi/demo-greeting/REQUEST.md`:
|
|
179
241
|
```markdown
|
|
180
|
-
#
|
|
242
|
+
# Project Profile
|
|
181
243
|
|
|
182
|
-
|
|
183
|
-
Add a simple greeting function that returns a personalized welcome message.
|
|
244
|
+
Generated: {YYYY-MM-DD HH:mm}
|
|
184
245
|
|
|
185
|
-
|
|
186
|
-
The application has no way to greet users by name. This is needed for the onboarding flow.
|
|
246
|
+
{Stack section from Agent A}
|
|
187
247
|
|
|
188
|
-
|
|
189
|
-
All new users during their first session.
|
|
248
|
+
{Conventions section from Agent A}
|
|
190
249
|
|
|
191
|
-
|
|
192
|
-
- Must be a pure function (no side effects)
|
|
193
|
-
- Must handle missing or empty names gracefully
|
|
250
|
+
{Architecture section from Agent A}
|
|
194
251
|
|
|
195
|
-
|
|
196
|
-
- None
|
|
252
|
+
{Health section from Agent B}
|
|
197
253
|
|
|
198
|
-
|
|
199
|
-
S — Single function with basic input validation
|
|
200
|
-
```
|
|
254
|
+
{Risks section from Agent C}
|
|
201
255
|
|
|
202
|
-
|
|
256
|
+
## Suggested Features
|
|
257
|
+
{Merged and ranked list from Agents B and C}
|
|
258
|
+
1. [{priority}] {slug} — {description}
|
|
259
|
+
Source: {what finding led to this suggestion}
|
|
260
|
+
2. ...
|
|
203
261
|
|
|
204
|
-
|
|
262
|
+
{Git Insights section from Agent C}
|
|
205
263
|
```
|
|
206
|
-
I created a demo feature: rpi/demo-greeting/
|
|
207
264
|
|
|
208
|
-
|
|
209
|
-
REQUEST.md with structured requirements.
|
|
265
|
+
### 3.4 Run /rpi:init if needed
|
|
210
266
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
/rpi:implement demo-greeting → build it task by task
|
|
267
|
+
Check if `.rpi.yaml` exists:
|
|
268
|
+
- If yes: read it and confirm with user ("Found existing config. Using it.")
|
|
269
|
+
- If no: run the init flow — ask the 4 batches of questions from `/rpi:init` and create `.rpi.yaml`
|
|
215
270
|
|
|
216
|
-
|
|
217
|
-
|
|
271
|
+
### 3.5 Present profile summary
|
|
272
|
+
|
|
273
|
+
Output a condensed version of the profile:
|
|
218
274
|
```
|
|
275
|
+
Project Profile — saved to .rpi-profile.md
|
|
219
276
|
|
|
220
|
-
|
|
277
|
+
Stack: {language} / {framework} / {db}
|
|
278
|
+
Tests: {tested}/{total} modules covered ({percentage}%)
|
|
279
|
+
Health: {N} TODOs, {M} uncovered error paths
|
|
280
|
+
Risks: {risk_count} identified
|
|
281
|
+
Hotspots: {top_file} ({changes} changes in 30d)
|
|
221
282
|
|
|
222
|
-
|
|
283
|
+
{N} feature suggestions generated.
|
|
223
284
|
```
|
|
224
|
-
You're ready to go! Here's your first workflow:
|
|
225
285
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
286
|
+
## 4. Feature Selection
|
|
287
|
+
|
|
288
|
+
Present the suggested features from the profile and ask the user what they want to do.
|
|
289
|
+
|
|
290
|
+
Use AskUserQuestion:
|
|
291
|
+
|
|
292
|
+
"Based on your project analysis, here are the top suggestions:
|
|
293
|
+
|
|
294
|
+
{numbered list of suggestions with priority and description}
|
|
295
|
+
|
|
296
|
+
What would you like to do?"
|
|
297
|
+
|
|
298
|
+
Options:
|
|
299
|
+
- "Build one of these features" → ask which one, proceed to Phase 5 option A
|
|
300
|
+
- "Describe my own feature" → proceed to Phase 5 option B
|
|
301
|
+
- "See a demo first" → proceed to Phase 5 option C
|
|
302
|
+
- "I'm done — I'll explore on my own" → proceed to Phase 5 option D
|
|
303
|
+
|
|
304
|
+
If user picks "Build one of these features", follow up with AskUserQuestion listing the suggestions as selectable options.
|
|
305
|
+
|
|
306
|
+
## 5. Guided First Feature
|
|
307
|
+
|
|
308
|
+
### Option A: Build a suggested feature
|
|
309
|
+
|
|
310
|
+
1. Read the selected suggestion from the profile
|
|
311
|
+
2. Read `.rpi.yaml` for the configured folder
|
|
312
|
+
3. Create the feature folder structure:
|
|
313
|
+
```bash
|
|
314
|
+
mkdir -p {folder}/{slug}/research
|
|
315
|
+
mkdir -p {folder}/{slug}/plan
|
|
316
|
+
mkdir -p {folder}/{slug}/implement
|
|
317
|
+
```
|
|
318
|
+
4. Pre-fill REQUEST.md using context from the profile and the suggestion:
|
|
319
|
+
- Summary: from the suggestion description
|
|
320
|
+
- Problem: from the source finding (TODO, test gap, risk)
|
|
321
|
+
- Target Users: infer from the codebase context
|
|
322
|
+
- Constraints: from conventions and architecture in the profile
|
|
323
|
+
- Complexity Estimate: infer from the suggestion scope
|
|
324
|
+
5. Show the generated REQUEST.md to the user
|
|
325
|
+
6. Output:
|
|
326
|
+
```
|
|
327
|
+
Feature created: {folder}/{slug}/REQUEST.md
|
|
328
|
+
|
|
329
|
+
This is what /rpi:new produces — a structured feature description.
|
|
330
|
+
|
|
331
|
+
Next steps:
|
|
332
|
+
/rpi:research {slug} Agents analyze feasibility → GO/NO-GO
|
|
333
|
+
/rpi:plan {slug} Generate specs + task checklist
|
|
334
|
+
/rpi:implement {slug} Build it task by task
|
|
335
|
+
|
|
336
|
+
Want me to run /rpi:research {slug} now?
|
|
337
|
+
```
|
|
338
|
+
7. If user says yes, explain what's about to happen ("Research phase: agents will analyze your codebase and requirements in parallel..."), then suggest they run the command.
|
|
339
|
+
|
|
340
|
+
### Option B: Describe your own feature
|
|
341
|
+
|
|
342
|
+
1. Explain: "Let's create your first feature. I'll ask a few questions to understand what you want to build."
|
|
343
|
+
2. Run the same interview flow as `/rpi:new`:
|
|
344
|
+
- Ask: "What feature do you want to build?"
|
|
345
|
+
- Derive slug from answer
|
|
346
|
+
- Ask: "What problem does this solve? Who benefits?"
|
|
347
|
+
- Ask adaptive follow-ups based on answers
|
|
348
|
+
3. Create REQUEST.md in the feature folder
|
|
349
|
+
4. Present next steps as in Option A
|
|
350
|
+
|
|
351
|
+
### Option C: See a demo
|
|
352
|
+
|
|
353
|
+
1. If `.rpi.yaml` doesn't exist, create a minimal one with defaults
|
|
354
|
+
2. Create demo folder and REQUEST.md:
|
|
355
|
+
```bash
|
|
356
|
+
mkdir -p {folder}/demo-greeting/research
|
|
357
|
+
mkdir -p {folder}/demo-greeting/plan
|
|
358
|
+
mkdir -p {folder}/demo-greeting/implement
|
|
359
|
+
```
|
|
360
|
+
3. Write `{folder}/demo-greeting/REQUEST.md`:
|
|
361
|
+
```markdown
|
|
362
|
+
# Greeting Message
|
|
363
|
+
|
|
364
|
+
## Summary
|
|
365
|
+
Add a simple greeting function that returns a personalized welcome message.
|
|
366
|
+
|
|
367
|
+
## Problem
|
|
368
|
+
The application has no way to greet users by name.
|
|
369
|
+
|
|
370
|
+
## Target Users
|
|
371
|
+
All new users during their first session.
|
|
372
|
+
|
|
373
|
+
## Constraints
|
|
374
|
+
- Must be a pure function (no side effects)
|
|
375
|
+
- Must handle missing or empty names gracefully
|
|
376
|
+
|
|
377
|
+
## References
|
|
378
|
+
- None
|
|
379
|
+
|
|
380
|
+
## Complexity Estimate
|
|
381
|
+
S — Single function with basic input validation
|
|
382
|
+
```
|
|
383
|
+
4. Explain each section:
|
|
384
|
+
```
|
|
385
|
+
I created a demo feature: {folder}/demo-greeting/
|
|
386
|
+
|
|
387
|
+
This is what /rpi:new produces. Let me walk through the sections:
|
|
388
|
+
|
|
389
|
+
Summary → One-line description of the feature
|
|
390
|
+
Problem → Why this is needed, who's affected
|
|
391
|
+
Target Users → Who will use it
|
|
392
|
+
Constraints → Technical and business boundaries
|
|
393
|
+
Complexity → Rough size estimate (S/M/L/XL)
|
|
394
|
+
|
|
395
|
+
In a real workflow, the next steps would be:
|
|
396
|
+
/rpi:research demo-greeting → agents analyze feasibility
|
|
397
|
+
/rpi:plan demo-greeting → generate specs and task checklist
|
|
398
|
+
/rpi:implement demo-greeting → build it task by task
|
|
399
|
+
|
|
400
|
+
You can run these commands now, or clean up the demo:
|
|
401
|
+
rm -rf {folder}/demo-greeting
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
### Option D: Exit
|
|
405
|
+
|
|
406
|
+
Output:
|
|
407
|
+
```
|
|
408
|
+
Your project profile is saved at .rpi-profile.md
|
|
409
|
+
RPIKit agents will use it for better context in all future commands.
|
|
231
410
|
|
|
232
|
-
|
|
411
|
+
Quick reference:
|
|
412
|
+
/rpi:new my-feature Start a new feature
|
|
413
|
+
/rpi:research my-feature Analyze feasibility
|
|
414
|
+
/rpi:plan my-feature Generate implementation plan
|
|
415
|
+
/rpi:implement my-feature Build it
|
|
416
|
+
/rpi:status See all features
|
|
233
417
|
|
|
234
418
|
Tips:
|
|
235
419
|
- Start with --quick tier for small features
|
|
236
|
-
- Use --deep tier
|
|
237
|
-
- Enable tdd: true in .rpi.yaml
|
|
238
|
-
- Run /rpi:
|
|
420
|
+
- Use --deep tier for risky or large changes
|
|
421
|
+
- Enable tdd: true in .rpi.yaml for test-first development
|
|
422
|
+
- Run /rpi:onboarding --refresh to re-analyze your project anytime
|
|
239
423
|
```
|
|
240
424
|
|
|
241
425
|
</process>
|