rpi-kit 2.5.1 → 2.5.2
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.
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
|
|
8
|
-
"version": "2.5.
|
|
8
|
+
"version": "2.5.2"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "rpi-kit",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
|
|
15
|
-
"version": "2.5.
|
|
15
|
+
"version": "2.5.2",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Daniel Mendes"
|
|
18
18
|
},
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"./commands/rpi/rpi.md",
|
|
38
38
|
"./commands/rpi/simplify.md",
|
|
39
39
|
"./commands/rpi/status.md",
|
|
40
|
+
"./commands/rpi/tutor.md",
|
|
40
41
|
"./commands/rpi/update.md"
|
|
41
42
|
],
|
|
42
43
|
"agents": [
|
package/bin/cli.js
CHANGED
|
@@ -336,7 +336,7 @@ Usage:
|
|
|
336
336
|
rpi-kit onboarding Interactive walkthrough of the workflow
|
|
337
337
|
rpi-kit help Show this help
|
|
338
338
|
|
|
339
|
-
Commands (
|
|
339
|
+
Commands (19):
|
|
340
340
|
/rpi:new <feature> Describe your feature → REQUEST.md
|
|
341
341
|
/rpi:fix <bug> Quick bugfix — interview, plan, implement in one step
|
|
342
342
|
/rpi:research <feature> Parallel agent analysis → RESEARCH.md
|
|
@@ -356,6 +356,7 @@ Commands (18):
|
|
|
356
356
|
/rpi:party Multi-agent debate on any topic
|
|
357
357
|
/rpi:docs-gen Generate CLAUDE.md from codebase analysis
|
|
358
358
|
/rpi:evolve [--quick] Product evolution analysis with health score
|
|
359
|
+
/rpi:tutor [topic] Interactive coding tutor with adaptive profiling
|
|
359
360
|
|
|
360
361
|
Agents (13):
|
|
361
362
|
Luna (Analyst) · Atlas (Explorer) · Scout (Researcher) · Nexus (Synthesizer)
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: rpi:tutor
|
|
3
|
+
description: Personalized coding tutor that adapts to your experience level and uses your real project code as examples.
|
|
4
|
+
argument-hint: "[topic] [--profile] [--reset]"
|
|
5
|
+
allowed-tools:
|
|
6
|
+
- Read
|
|
7
|
+
- Write
|
|
8
|
+
- Bash
|
|
9
|
+
- Glob
|
|
10
|
+
- Grep
|
|
11
|
+
- AskUserQuestion
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# /rpi:tutor — Coding Tutor
|
|
15
|
+
|
|
16
|
+
Personalized coding tutor that builds a developer profile, adapts to your experience level, and teaches using real code from your project.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1: Load config
|
|
21
|
+
|
|
22
|
+
Read `.rpi.yaml` from the project root. If it doesn't exist, use defaults silently.
|
|
23
|
+
|
|
24
|
+
## Step 2: Parse arguments
|
|
25
|
+
|
|
26
|
+
Parse `$ARGUMENTS` for:
|
|
27
|
+
- `{topic}` — free-text topic string (e.g. "dependency injection", "error handling")
|
|
28
|
+
- `--profile` — force re-interview to update developer profile
|
|
29
|
+
- `--reset` — delete profile and stop
|
|
30
|
+
|
|
31
|
+
**Flag precedence:** `--reset` > `--profile` > `{topic}`
|
|
32
|
+
|
|
33
|
+
If `--reset` is present, ignore all other flags and arguments.
|
|
34
|
+
|
|
35
|
+
## Step 3: Handle --reset
|
|
36
|
+
|
|
37
|
+
If `--reset` was parsed:
|
|
38
|
+
|
|
39
|
+
1. Check if `rpi/tutor-profile.yaml` exists.
|
|
40
|
+
2. If it exists: delete it using Bash (`rm rpi/tutor-profile.yaml`).
|
|
41
|
+
3. Output:
|
|
42
|
+
```
|
|
43
|
+
Tutor profile deleted. Run /rpi:tutor to create a new one.
|
|
44
|
+
```
|
|
45
|
+
4. Stop.
|
|
46
|
+
|
|
47
|
+
If `rpi/tutor-profile.yaml` does not exist:
|
|
48
|
+
```
|
|
49
|
+
No tutor profile found. Nothing to reset.
|
|
50
|
+
```
|
|
51
|
+
Stop.
|
|
52
|
+
|
|
53
|
+
## Step 4: Check profile
|
|
54
|
+
|
|
55
|
+
Check if `rpi/tutor-profile.yaml` exists.
|
|
56
|
+
|
|
57
|
+
If the file exists, read and parse it. If `experience_level` or `history` fields are missing, or the file is not valid YAML, delete the file, inform the user ("Profile was corrupted. Starting fresh interview."), and proceed to Step 5.
|
|
58
|
+
|
|
59
|
+
- **Exists + `--profile` flag:** proceed to Step 5 (re-interview, preserve history).
|
|
60
|
+
- **Exists + no flag:** proceed to Step 6 (topic selection).
|
|
61
|
+
- **Does not exist:** proceed to Step 5 (first-time interview).
|
|
62
|
+
|
|
63
|
+
## Step 5: Build developer profile
|
|
64
|
+
|
|
65
|
+
### Step 5a: Git analysis
|
|
66
|
+
|
|
67
|
+
Run these commands to detect the developer's stack and recent focus:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Get current user email
|
|
71
|
+
git config user.email
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
# Language distribution by file extension (last 6 months)
|
|
76
|
+
git log --author="<email>" --since="6 months ago" --no-merges --pretty=format: --name-only | sed 's/.*\.//' | sort | uniq -c | sort -rn | head -15
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Recent focus (last 2 weeks)
|
|
81
|
+
git log --author="<email>" --since="2 weeks ago" --no-merges --pretty=format: --name-only | sort -u | head -20
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Recent commit subjects (for topic suggestion later)
|
|
86
|
+
git log --author="<email>" --since="1 week ago" --no-merges --pretty=format:"%s" | head -15
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Store results as `$GIT_LANGUAGES`, `$GIT_RECENT_FILES`, `$GIT_RECENT_COMMITS`.
|
|
90
|
+
|
|
91
|
+
**IMPORTANT:** Never infer proficiency from git metrics. Use git only for stack detection and recent focus areas.
|
|
92
|
+
|
|
93
|
+
### Step 5b: Claude Memory read
|
|
94
|
+
|
|
95
|
+
Attempt to read supplementary context from Claude Memory:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
git_root=$(git rev-parse --show-toplevel)
|
|
99
|
+
slug=$(echo "$git_root" | sed 's|/|-|g')
|
|
100
|
+
memory_path="$HOME/.claude/projects/$slug/memory/MEMORY.md"
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Read the file via Read tool if it exists.
|
|
104
|
+
- Extract: user preferences, role, experience mentions, stack mentions.
|
|
105
|
+
- If file not found: skip silently. Do not warn.
|
|
106
|
+
|
|
107
|
+
Store as `$MEMORY_CONTEXT` (or empty if not found).
|
|
108
|
+
|
|
109
|
+
### Step 5c: Interview
|
|
110
|
+
|
|
111
|
+
Conduct a 2-batch interview via AskUserQuestion.
|
|
112
|
+
|
|
113
|
+
**If re-interview (`--profile` flag):** show current values from existing profile as defaults. Preserve the `history` section untouched.
|
|
114
|
+
|
|
115
|
+
**Batch 1** (4 questions, single AskUserQuestion call):
|
|
116
|
+
|
|
117
|
+
```
|
|
118
|
+
Let's build your tutor profile. A few questions:
|
|
119
|
+
|
|
120
|
+
1. **Name + Experience level** — What's your name and how would you rate yourself? (junior / mid / senior)
|
|
121
|
+
2. **Languages + Frameworks** — What do you work with? (pre-filled from git: {$GIT_LANGUAGES top results})
|
|
122
|
+
3. **Focus areas + Learning goals** — What areas interest you most? What do you want to learn? (e.g. testing, performance, architecture)
|
|
123
|
+
4. **Years of experience** — How many years have you been coding?
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
**Batch 2** (3 questions, single AskUserQuestion call):
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
Almost done:
|
|
130
|
+
|
|
131
|
+
1. **Explanation style** — Do you prefer concise or detailed explanations? (concise / detailed)
|
|
132
|
+
2. **Preferred examples** — How do you learn best? (real-code / pseudocode / analogies)
|
|
133
|
+
3. **Session length + Known patterns** — How long should sessions be? (short / medium / long) And which patterns do you already know well? (e.g. dependency injection, observer, repository)
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Step 5d: Merge sources and write profile
|
|
137
|
+
|
|
138
|
+
Merge interview answers, git analysis, and memory context. Interview answers always take precedence over inferred data.
|
|
139
|
+
|
|
140
|
+
Write `rpi/tutor-profile.yaml`:
|
|
141
|
+
|
|
142
|
+
```yaml
|
|
143
|
+
# rpi/tutor-profile.yaml
|
|
144
|
+
name: "" # developer name
|
|
145
|
+
experience_level: "" # junior | mid | senior
|
|
146
|
+
primary_languages: [] # e.g., [typescript, python, go]
|
|
147
|
+
frameworks: [] # e.g., [nestjs, react, prisma]
|
|
148
|
+
years_of_experience: 0 # integer
|
|
149
|
+
focus_areas: [] # e.g., [testing, performance, architecture]
|
|
150
|
+
learning_goals: [] # e.g., ["master event-driven patterns"]
|
|
151
|
+
explanation_style: "" # concise | detailed
|
|
152
|
+
preferred_examples: "" # real-code | pseudocode | analogies
|
|
153
|
+
session_length: "" # short | medium | long
|
|
154
|
+
known_patterns: [] # e.g., ["dependency injection", "observer"]
|
|
155
|
+
|
|
156
|
+
history: [] # cap: 30 entries, FIFO rotation
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
If re-interview: preserve existing `history` entries. Overwrite all other fields with new answers.
|
|
160
|
+
|
|
161
|
+
Output:
|
|
162
|
+
```
|
|
163
|
+
Tutor profile saved: rpi/tutor-profile.yaml
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Proceed to Step 6.
|
|
167
|
+
|
|
168
|
+
## Step 6: Topic selection
|
|
169
|
+
|
|
170
|
+
**If `{topic}` was provided in `$ARGUMENTS`:** use it directly. Store as `$TOPIC`. Set `$TOPIC_MODE` to `requested`.
|
|
171
|
+
|
|
172
|
+
**If no topic provided:** auto-suggest and confirm.
|
|
173
|
+
|
|
174
|
+
### Topic suggestion algorithm
|
|
175
|
+
|
|
176
|
+
Priority order:
|
|
177
|
+
1. **Recent git activity** — analyze `$GIT_RECENT_COMMITS` and `$GIT_RECENT_FILES` for themes (e.g. lots of test files = "testing patterns", API routes = "API design").
|
|
178
|
+
2. **History dedup** — filter out topics already covered in the profile's `history` section.
|
|
179
|
+
3. **Profile gaps** — compare `focus_areas` and `learning_goals` against `history` to find uncovered goals.
|
|
180
|
+
4. **Fallback** — if no suggestions can be generated, ask directly.
|
|
181
|
+
|
|
182
|
+
Present 2-3 topic suggestions via AskUserQuestion:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
Based on your recent work and profile, here are some topic suggestions:
|
|
186
|
+
|
|
187
|
+
1. {suggested topic 1} — {reason}
|
|
188
|
+
2. {suggested topic 2} — {reason}
|
|
189
|
+
3. Something else (type your own)
|
|
190
|
+
|
|
191
|
+
Which one?
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
Store the user's choice as `$TOPIC`. If the user chose a suggested topic, set `$TOPIC_MODE` to `suggested`. If the user typed their own topic (option 3), set `$TOPIC_MODE` to `requested`.
|
|
195
|
+
|
|
196
|
+
## Step 7: Gather teaching context
|
|
197
|
+
|
|
198
|
+
### Step 7a: Search codebase for topic-relevant code
|
|
199
|
+
|
|
200
|
+
Use Glob and Grep to find files related to `$TOPIC`:
|
|
201
|
+
|
|
202
|
+
1. Extract key terms from `$TOPIC`.
|
|
203
|
+
2. Search for those terms in the codebase using Grep.
|
|
204
|
+
3. Read the most relevant files (max 5) using Read.
|
|
205
|
+
|
|
206
|
+
Store as `$TEACHING_CONTEXT` — the real code snippets, file paths, and line numbers that will be used in the explanation.
|
|
207
|
+
|
|
208
|
+
## Step 8: Teach
|
|
209
|
+
|
|
210
|
+
Adopt the following persona for this step:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
You are Sensei — a patient, adaptive coding teacher.
|
|
214
|
+
You teach using REAL code from this project, not abstract examples.
|
|
215
|
+
You adapt your depth based on the developer's experience level.
|
|
216
|
+
You reference file paths and line numbers so the developer can follow along.
|
|
217
|
+
You respect the developer's preferred explanation style and session length.
|
|
218
|
+
You never assign exercises or quizzes — you explain, illustrate, and connect concepts.
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Generate a teaching explanation for `$TOPIC` using `$TEACHING_CONTEXT` and the profile's `experience_level`. Check the profile's `known_patterns` field — if any overlap with `$TOPIC`, acknowledge them briefly and focus the explanation on what the developer does NOT already know.
|
|
222
|
+
|
|
223
|
+
### Depth guidelines
|
|
224
|
+
|
|
225
|
+
**junior:**
|
|
226
|
+
- Explain foundational concepts step by step
|
|
227
|
+
- Define terms before using them
|
|
228
|
+
- Show simple examples first, then real code
|
|
229
|
+
- Avoid jargon or explain it immediately
|
|
230
|
+
|
|
231
|
+
**mid:**
|
|
232
|
+
- Assume fundamentals are known
|
|
233
|
+
- Focus on patterns, trade-offs, and "why"
|
|
234
|
+
- Show real code directly with annotations
|
|
235
|
+
- Compare approaches
|
|
236
|
+
|
|
237
|
+
**senior:**
|
|
238
|
+
- Go straight to the point
|
|
239
|
+
- Focus on edge cases, internals, and gotchas
|
|
240
|
+
- Reference source code and implementation details
|
|
241
|
+
- Discuss performance implications and design trade-offs
|
|
242
|
+
|
|
243
|
+
### Style adaptation
|
|
244
|
+
|
|
245
|
+
- **`explanation_style: concise`** — shorter paragraphs, bullet points, less prose.
|
|
246
|
+
- **`explanation_style: detailed`** — full explanations, more context, deeper exploration.
|
|
247
|
+
- **`preferred_examples: real-code`** — use actual project code with file paths and line numbers.
|
|
248
|
+
- **`preferred_examples: pseudocode`** — simplify code to pseudocode before showing real implementation.
|
|
249
|
+
- **`preferred_examples: analogies`** — lead with real-world analogies, then connect to code.
|
|
250
|
+
- **`session_length: short`** — focus on one key insight, keep it under 500 words.
|
|
251
|
+
- **`session_length: medium`** — cover the topic thoroughly, 500-1500 words.
|
|
252
|
+
- **`session_length: long`** — deep dive with multiple angles and extensive examples.
|
|
253
|
+
|
|
254
|
+
## Step 9: Update history
|
|
255
|
+
|
|
256
|
+
1. Read `rpi/tutor-profile.yaml`.
|
|
257
|
+
2. Append a new entry to the `history` section:
|
|
258
|
+
|
|
259
|
+
```yaml
|
|
260
|
+
- date: "YYYY-MM-DD"
|
|
261
|
+
topic: "{$TOPIC}"
|
|
262
|
+
mode: "{$TOPIC_MODE}" # requested | suggested
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
3. If `history` has more than 30 entries, remove the oldest entries (FIFO) to keep exactly 30.
|
|
266
|
+
4. Write the updated profile back to `rpi/tutor-profile.yaml`.
|
package/gemini-extension.json
CHANGED
package/marketplace.json
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
},
|
|
6
6
|
"metadata": {
|
|
7
7
|
"description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
|
|
8
|
-
"version": "2.5.
|
|
8
|
+
"version": "2.5.2"
|
|
9
9
|
},
|
|
10
10
|
"plugins": [
|
|
11
11
|
{
|
|
12
12
|
"name": "rpi-kit",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"description": "Research → Plan → Implement. 7-phase pipeline with 13 named agents, delta specs, party mode, and knowledge compounding.",
|
|
15
|
-
"version": "2.5.
|
|
15
|
+
"version": "2.5.2",
|
|
16
16
|
"author": {
|
|
17
17
|
"name": "Daniel Mendes"
|
|
18
18
|
},
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"./commands/rpi/rpi.md",
|
|
38
38
|
"./commands/rpi/simplify.md",
|
|
39
39
|
"./commands/rpi/status.md",
|
|
40
|
+
"./commands/rpi/tutor.md",
|
|
40
41
|
"./commands/rpi/update.md"
|
|
41
42
|
],
|
|
42
43
|
"agents": [
|
package/package.json
CHANGED
|
@@ -153,6 +153,7 @@ Output is saved to `rpi/solutions/decisions/` when requested.
|
|
|
153
153
|
/rpi:onboarding -- first-time setup, analyzes codebase, guides the user
|
|
154
154
|
/rpi:docs-gen -- generate CLAUDE.md from codebase analysis
|
|
155
155
|
/rpi:evolve -- product evolution analysis with health score
|
|
156
|
+
/rpi:tutor -- personalized coding tutor using your real project code
|
|
156
157
|
```
|
|
157
158
|
|
|
158
159
|
## Configuration
|