rpi-kit 2.2.2 → 2.5.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.
- package/.claude-plugin/marketplace.json +3 -2
- package/.claude-plugin/plugin.json +1 -1
- package/.gemini/commands/opsx/apply.toml +149 -0
- package/.gemini/commands/opsx/archive.toml +154 -0
- package/.gemini/commands/opsx/bulk-archive.toml +239 -0
- package/.gemini/commands/opsx/continue.toml +111 -0
- package/.gemini/commands/opsx/explore.toml +170 -0
- package/.gemini/commands/opsx/ff.toml +94 -0
- package/.gemini/commands/opsx/new.toml +66 -0
- package/.gemini/commands/opsx/onboard.toml +547 -0
- package/.gemini/commands/opsx/propose.toml +103 -0
- package/.gemini/commands/opsx/sync.toml +131 -0
- package/.gemini/commands/opsx/verify.toml +161 -0
- package/.gemini/commands/rpi/archive.toml +140 -0
- package/.gemini/commands/rpi/docs-gen.toml +210 -0
- package/.gemini/commands/rpi/docs.toml +153 -0
- package/.gemini/commands/rpi/evolve.toml +411 -0
- package/.gemini/commands/rpi/fix.toml +290 -0
- package/.gemini/commands/rpi/implement.toml +272 -0
- package/.gemini/commands/rpi/init.toml +180 -0
- package/.gemini/commands/rpi/learn.toml +105 -0
- package/.gemini/commands/rpi/new.toml +158 -0
- package/.gemini/commands/rpi/onboarding.toml +236 -0
- package/.gemini/commands/rpi/party.toml +204 -0
- package/.gemini/commands/rpi/plan.toml +623 -0
- package/.gemini/commands/rpi/research.toml +265 -0
- package/.gemini/commands/rpi/review.toml +443 -0
- package/.gemini/commands/rpi/rpi.toml +114 -0
- package/.gemini/commands/rpi/simplify.toml +214 -0
- package/.gemini/commands/rpi/status.toml +194 -0
- package/.gemini/commands/rpi/update.toml +107 -0
- package/.gemini/skills/openspec-apply-change/SKILL.md +156 -0
- package/.gemini/skills/openspec-archive-change/SKILL.md +114 -0
- package/.gemini/skills/openspec-bulk-archive-change/SKILL.md +246 -0
- package/.gemini/skills/openspec-continue-change/SKILL.md +118 -0
- package/.gemini/skills/openspec-explore/SKILL.md +288 -0
- package/.gemini/skills/openspec-ff-change/SKILL.md +101 -0
- package/.gemini/skills/openspec-new-change/SKILL.md +74 -0
- package/.gemini/skills/openspec-onboard/SKILL.md +554 -0
- package/.gemini/skills/openspec-propose/SKILL.md +110 -0
- package/.gemini/skills/openspec-sync-specs/SKILL.md +138 -0
- package/.gemini/skills/openspec-verify-change/SKILL.md +168 -0
- package/CHANGELOG.md +15 -0
- package/README.md +6 -6
- package/agents/atlas.md +40 -0
- package/agents/clara.md +40 -0
- package/agents/forge.md +40 -0
- package/agents/hawk.md +40 -0
- package/agents/luna.md +40 -0
- package/agents/mestre.md +46 -0
- package/agents/nexus.md +52 -0
- package/agents/pixel.md +40 -0
- package/agents/quill.md +40 -0
- package/agents/razor.md +40 -0
- package/agents/sage.md +46 -0
- package/agents/scout.md +40 -0
- package/agents/shield.md +40 -0
- package/bin/cli.js +60 -18
- package/commands/rpi/docs.md +29 -1
- package/commands/rpi/fix.md +301 -0
- package/commands/rpi/implement.md +37 -0
- package/commands/rpi/plan.md +66 -1
- package/commands/rpi/research.md +48 -1
- package/commands/rpi/review.md +48 -1
- package/commands/rpi/rpi.md +1 -1
- package/commands/rpi/simplify.md +31 -1
- package/commands/rpi/status.md +69 -0
- package/marketplace.json +3 -2
- package/package.json +2 -1
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
description = "Configure RPIKit and generate project-context.md by analyzing your codebase."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# /rpi:init — Setup & Context Generation
|
|
5
|
+
|
|
6
|
+
Configure RPIKit for this project: interview the user for preferences, write `.rpi.yaml`, create directory structure, and launch Atlas to generate `rpi/context.md`.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 1: Check for existing config
|
|
11
|
+
|
|
12
|
+
Check if `.rpi.yaml` exists in the project root.
|
|
13
|
+
|
|
14
|
+
If it exists:
|
|
15
|
+
- Read the file and store its contents as `$EXISTING_CONFIG`.
|
|
16
|
+
- Ask the user with AskUserQuestion: "`.rpi.yaml` already exists. Do you want to overwrite it with fresh config, or update specific settings?"
|
|
17
|
+
- If overwrite: proceed to Step 2 (will replace everything).
|
|
18
|
+
- If update: proceed to Step 2 but pre-fill answers from `$EXISTING_CONFIG` and only ask about values the user wants to change.
|
|
19
|
+
|
|
20
|
+
If it does not exist: proceed to Step 2.
|
|
21
|
+
|
|
22
|
+
## Step 2: Interview — Batch 1 (Development preferences)
|
|
23
|
+
|
|
24
|
+
Ask the user with a single AskUserQuestion call:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
Let's configure RPIKit for this project. A few quick questions:
|
|
28
|
+
|
|
29
|
+
1. **TDD** — Should Sage write failing tests before Forge implements? (true/false, default: false)
|
|
30
|
+
2. **Commit style** — conventional commits or freeform? (conventional/freeform, default: conventional)
|
|
31
|
+
3. **UX agent (Pixel)** — When should Pixel participate in planning? (auto = only if frontend detected / always / never, default: auto)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Store the responses. Use defaults for any unanswered or unclear answers.
|
|
35
|
+
|
|
36
|
+
## Step 3: Interview — Batch 2 (Workflow preferences)
|
|
37
|
+
|
|
38
|
+
Ask the user with a single AskUserQuestion call:
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
Almost done:
|
|
42
|
+
|
|
43
|
+
1. **Auto-learn** — Should review findings be saved to rpi/solutions/ automatically? (true/false, default: true)
|
|
44
|
+
2. **Party mode agents** — How many agents should participate in /rpi:party debates? (3-5, default: 4)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Store the responses. Use defaults for any unanswered or unclear answers.
|
|
48
|
+
|
|
49
|
+
## Step 4: Write .rpi.yaml
|
|
50
|
+
|
|
51
|
+
Write `.rpi.yaml` to the project root with the collected responses and sensible defaults:
|
|
52
|
+
|
|
53
|
+
```yaml
|
|
54
|
+
version: 2
|
|
55
|
+
|
|
56
|
+
# Directories
|
|
57
|
+
folder: rpi/features
|
|
58
|
+
specs_dir: rpi/specs
|
|
59
|
+
solutions_dir: rpi/solutions
|
|
60
|
+
context_file: rpi/context.md
|
|
61
|
+
|
|
62
|
+
# Execution
|
|
63
|
+
parallel_threshold: 8
|
|
64
|
+
commit_style: {user_response or "conventional"}
|
|
65
|
+
tdd: {user_response or false}
|
|
66
|
+
|
|
67
|
+
# Agents
|
|
68
|
+
ux_agent: {user_response or "auto"}
|
|
69
|
+
|
|
70
|
+
# Quick flow
|
|
71
|
+
quick_complexity: S
|
|
72
|
+
|
|
73
|
+
# Knowledge compounding
|
|
74
|
+
auto_learn: {user_response or true}
|
|
75
|
+
|
|
76
|
+
# Party mode
|
|
77
|
+
party_default_agents: {user_response or 4}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
If updating an existing config: merge user responses into `$EXISTING_CONFIG`, preserving any keys the user did not explicitly change.
|
|
81
|
+
|
|
82
|
+
## Step 5: Create directory structure
|
|
83
|
+
|
|
84
|
+
Run these commands to create the RPIKit directories:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
mkdir -p rpi/specs
|
|
88
|
+
mkdir -p rpi/solutions
|
|
89
|
+
mkdir -p rpi/features
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Step 6: Launch Atlas for context generation
|
|
93
|
+
|
|
94
|
+
Launch Atlas agent to analyze the codebase and generate `rpi/context.md`:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
You are Atlas. Analyze this entire codebase and generate a project context file.
|
|
98
|
+
|
|
99
|
+
Your task:
|
|
100
|
+
1. Read config files first: package.json, tsconfig.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, composer.json, or whatever exists
|
|
101
|
+
2. Scan the directory structure to understand architecture and layering
|
|
102
|
+
3. Find 5-10 representative source files across different directories
|
|
103
|
+
4. Detect naming conventions, component patterns, import style, error handling
|
|
104
|
+
5. Check for CLAUDE.md, .cursorrules, .clinerules, or similar project rules files
|
|
105
|
+
6. Identify the testing framework and test patterns
|
|
106
|
+
7. Identify styling/CSS approach if frontend
|
|
107
|
+
|
|
108
|
+
Produce a context file with this EXACT structure:
|
|
109
|
+
|
|
110
|
+
# Project Context
|
|
111
|
+
|
|
112
|
+
## Stack
|
|
113
|
+
- Language: {language} {version}
|
|
114
|
+
- Framework: {framework} {version}
|
|
115
|
+
- Database: {db} via {orm} (or "None detected")
|
|
116
|
+
- Testing: {test_framework}
|
|
117
|
+
- Styling: {approach} (or "N/A")
|
|
118
|
+
|
|
119
|
+
## Conventions
|
|
120
|
+
- File naming: {pattern}
|
|
121
|
+
- Components: {pattern} (or "N/A")
|
|
122
|
+
- Error handling: {pattern}
|
|
123
|
+
- API: {pattern} (or "N/A")
|
|
124
|
+
|
|
125
|
+
## Architecture
|
|
126
|
+
- {directory}: {purpose}
|
|
127
|
+
- {directory}: {purpose}
|
|
128
|
+
- ...
|
|
129
|
+
|
|
130
|
+
## Rules
|
|
131
|
+
- {rule 1 derived from codebase analysis or existing rules files}
|
|
132
|
+
- {rule 2}
|
|
133
|
+
- ...
|
|
134
|
+
|
|
135
|
+
RULES:
|
|
136
|
+
- Be specific — cite actual patterns you found, not generic advice
|
|
137
|
+
- Only include what you can verify from the code
|
|
138
|
+
- If a section doesn't apply (e.g., no database), write "N/A" and move on
|
|
139
|
+
- Keep each section concise — this file is read by every agent on every run
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Wait for Atlas to complete. Store the output as `$ATLAS_CONTEXT`.
|
|
143
|
+
|
|
144
|
+
## Step 7: Write rpi/context.md
|
|
145
|
+
|
|
146
|
+
Write the Atlas output to `rpi/context.md`.
|
|
147
|
+
|
|
148
|
+
## Step 8: Output summary
|
|
149
|
+
|
|
150
|
+
Output to the user:
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
RPIKit initialized!
|
|
154
|
+
|
|
155
|
+
Config: .rpi.yaml
|
|
156
|
+
Context: rpi/context.md
|
|
157
|
+
Directories: rpi/specs/, rpi/solutions/, rpi/features/
|
|
158
|
+
|
|
159
|
+
Settings:
|
|
160
|
+
- TDD: {value}
|
|
161
|
+
- Commit style: {value}
|
|
162
|
+
- UX agent: {value}
|
|
163
|
+
- Auto-learn: {value}
|
|
164
|
+
- Party agents: {value}
|
|
165
|
+
|
|
166
|
+
Quick reference:
|
|
167
|
+
- /rpi:new <feature> Create a new feature (Luna interviews you)
|
|
168
|
+
- /rpi <feature> Auto-progress to next phase
|
|
169
|
+
- /rpi:research <feat> Run research phase
|
|
170
|
+
- /rpi:plan <feat> Run plan phase
|
|
171
|
+
- /rpi:implement <feat> Run implement phase
|
|
172
|
+
- /rpi:simplify <feat> Run simplify phase
|
|
173
|
+
- /rpi:review <feat> Run review phase
|
|
174
|
+
- /rpi:docs <feat> Run docs phase
|
|
175
|
+
- /rpi:status View all features and progress
|
|
176
|
+
- /rpi:party "topic" Multi-agent debate
|
|
177
|
+
- /rpi:learn Save a solution manually
|
|
178
|
+
- /rpi:archive <feat> Archive completed feature
|
|
179
|
+
```
|
|
180
|
+
"""
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
description = "Manually capture a solution or insight to the knowledge base."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# /rpi:learn — Knowledge Capture
|
|
5
|
+
|
|
6
|
+
Manually capture a solution, insight, or lesson learned into `rpi/solutions/`. Reads recent context from git and the codebase to enrich the entry.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 1: Load config
|
|
11
|
+
|
|
12
|
+
Read `.rpi.yaml` from the project root. Extract:
|
|
13
|
+
- `solutions_dir` (default: `rpi/solutions`)
|
|
14
|
+
|
|
15
|
+
If `.rpi.yaml` doesn't exist, use defaults silently.
|
|
16
|
+
|
|
17
|
+
## Step 2: Get description
|
|
18
|
+
|
|
19
|
+
Parse `$ARGUMENTS` for a description string.
|
|
20
|
+
|
|
21
|
+
- If provided: use it as `$DESCRIPTION`.
|
|
22
|
+
- If not provided: ask the user with AskUserQuestion:
|
|
23
|
+
"What did you learn? (e.g. 'N+1 query in Prisma', 'race condition in session refresh', 'pattern for retry with backoff')"
|
|
24
|
+
|
|
25
|
+
## Step 3: Ask category
|
|
26
|
+
|
|
27
|
+
Ask the user with AskUserQuestion:
|
|
28
|
+
"Which category fits best?
|
|
29
|
+
1. performance
|
|
30
|
+
2. security
|
|
31
|
+
3. database
|
|
32
|
+
4. testing
|
|
33
|
+
5. architecture
|
|
34
|
+
6. patterns
|
|
35
|
+
7. other"
|
|
36
|
+
|
|
37
|
+
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.
|
|
38
|
+
|
|
39
|
+
Store as `$CATEGORY`.
|
|
40
|
+
|
|
41
|
+
## Step 4: Derive slug
|
|
42
|
+
|
|
43
|
+
Convert `$DESCRIPTION` to kebab-case:
|
|
44
|
+
- Lowercase
|
|
45
|
+
- Replace spaces and underscores with hyphens
|
|
46
|
+
- Strip special characters
|
|
47
|
+
- Truncate to 60 characters max
|
|
48
|
+
|
|
49
|
+
Store as `$SLUG`.
|
|
50
|
+
|
|
51
|
+
## Step 5: Gather context from codebase
|
|
52
|
+
|
|
53
|
+
1. Run `git diff HEAD~3..HEAD --stat` to get recent changes — store as `$RECENT_CHANGES`.
|
|
54
|
+
2. Run `git diff HEAD~3..HEAD` to get the actual diff — store as `$RECENT_DIFF`.
|
|
55
|
+
3. Search for files related to the description using Grep and Glob:
|
|
56
|
+
- Extract key terms from `$DESCRIPTION`
|
|
57
|
+
- Search for those terms in the codebase
|
|
58
|
+
- Store relevant file paths as `$RELATED_FILES`
|
|
59
|
+
|
|
60
|
+
## Step 6: Write solution file
|
|
61
|
+
|
|
62
|
+
1. Ensure directory exists:
|
|
63
|
+
```bash
|
|
64
|
+
mkdir -p {solutions_dir}/{$CATEGORY}
|
|
65
|
+
```
|
|
66
|
+
2. Write to `{solutions_dir}/{$CATEGORY}/{$SLUG}.md`:
|
|
67
|
+
|
|
68
|
+
```markdown
|
|
69
|
+
# {Description}
|
|
70
|
+
|
|
71
|
+
## Problem
|
|
72
|
+
{Describe the problem based on the description and recent diff context.
|
|
73
|
+
What symptoms did it cause? How did it manifest?}
|
|
74
|
+
|
|
75
|
+
## Solution
|
|
76
|
+
{What fixed it or what approach works. Include relevant code snippets
|
|
77
|
+
from the recent diff if applicable.}
|
|
78
|
+
|
|
79
|
+
## Prevention
|
|
80
|
+
{How to avoid this in the future. Patterns to follow, checks to add.}
|
|
81
|
+
|
|
82
|
+
## Context
|
|
83
|
+
Date: {YYYY-MM-DD}
|
|
84
|
+
Files: {$RELATED_FILES or "Not identified"}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
3. If the file already exists at that path, append a numeric suffix: `{$SLUG}-2.md`, `{$SLUG}-3.md`, etc.
|
|
88
|
+
|
|
89
|
+
## Step 7: Commit
|
|
90
|
+
|
|
91
|
+
Stage and commit the new solutions file:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
git add {solutions_dir}/{$CATEGORY}/{$SLUG}.md
|
|
95
|
+
git commit -m "learn({$CATEGORY}): {$DESCRIPTION}"
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Step 8: Output summary
|
|
99
|
+
|
|
100
|
+
```
|
|
101
|
+
Solution saved: {solutions_dir}/{$CATEGORY}/{$SLUG}.md
|
|
102
|
+
|
|
103
|
+
This will be automatically referenced by Scout during future research phases.
|
|
104
|
+
```
|
|
105
|
+
"""
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
description = "Start a new feature. Luna interviews you and creates REQUEST.md."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
<objective>
|
|
5
|
+
You are Luna, the curious analyst. Your job is to interview the user about a new feature, understand what they want to build, and produce a clear REQUEST.md that downstream agents (Atlas, Scout, Mestre, Forge) can work from.
|
|
6
|
+
|
|
7
|
+
You ask sharp, adaptive questions. You don't accept vague answers — you rephrase and probe until the requirement is concrete. You spot what's NOT being said and flag it as an unknown.
|
|
8
|
+
</objective>
|
|
9
|
+
|
|
10
|
+
<process>
|
|
11
|
+
|
|
12
|
+
## Step 1: Load config
|
|
13
|
+
|
|
14
|
+
Read `.rpi.yaml` from the project root. Extract:
|
|
15
|
+
- `folder` (default: `rpi/features`)
|
|
16
|
+
|
|
17
|
+
If `.rpi.yaml` doesn't exist, use defaults silently.
|
|
18
|
+
|
|
19
|
+
## Step 2: Determine feature slug
|
|
20
|
+
|
|
21
|
+
Check the command arguments for a feature name.
|
|
22
|
+
|
|
23
|
+
- If provided: convert to kebab-case (lowercase, spaces/underscores become hyphens, strip special chars).
|
|
24
|
+
- If not provided: ask the user with AskUserQuestion: "What's the name for this feature? (short, e.g. 'oauth', 'dark-mode', 'csv-export')"
|
|
25
|
+
|
|
26
|
+
Parse `--quick` flag from arguments if present.
|
|
27
|
+
|
|
28
|
+
## Step 3: Check for existing feature
|
|
29
|
+
|
|
30
|
+
Check if `{folder}/{slug}/` already exists (where `folder` is from Step 1).
|
|
31
|
+
|
|
32
|
+
If it exists, ask the user with AskUserQuestion:
|
|
33
|
+
"Feature '{slug}' already exists at `{folder}/{slug}/`. Do you want to overwrite it or pick a different name?"
|
|
34
|
+
|
|
35
|
+
- If overwrite: continue (existing files will be replaced).
|
|
36
|
+
- If different name: ask for new name, go back to slug derivation.
|
|
37
|
+
|
|
38
|
+
## Step 4: Luna's adaptive interview
|
|
39
|
+
|
|
40
|
+
Adopt Luna's persona fully. Be warm but direct, conversational, and occasionally challenge the user's framing.
|
|
41
|
+
|
|
42
|
+
### If `--quick` flag is set, skip to Step 4b.
|
|
43
|
+
|
|
44
|
+
### Step 4a: Standard interview (max 3 batches)
|
|
45
|
+
|
|
46
|
+
**Batch 1 — Core questions** (use AskUserQuestion):
|
|
47
|
+
- Skip "What do you want to build?" if the slug is already descriptive (e.g. "csv-export" is clear, "phase2" is not).
|
|
48
|
+
- Always ask: "What problem does this solve? Who benefits?"
|
|
49
|
+
- Add one contextual question based on what you know so far.
|
|
50
|
+
|
|
51
|
+
**Batch 2 — Adaptive follow-ups** (use AskUserQuestion):
|
|
52
|
+
Based on the user's answers, pick 2-3 questions from these categories:
|
|
53
|
+
- If frontend/UI mentioned: "What does the user see? Any specific interactions or flows?"
|
|
54
|
+
- If database/data mentioned: "What data is involved? New tables/models, or changes to existing ones?"
|
|
55
|
+
- If it sounds complex: "Can this be broken into smaller deliverables? What's the MVP?"
|
|
56
|
+
- If external APIs/services mentioned: "Which services? Any rate limits, auth requirements, or costs to consider?"
|
|
57
|
+
- If vague on scope: "What is explicitly NOT part of this feature?"
|
|
58
|
+
|
|
59
|
+
**Batch 3 — Clarifications** (use AskUserQuestion, only if needed):
|
|
60
|
+
- Only ask if there are gaps that would block downstream agents.
|
|
61
|
+
- Max 2 questions. If answers are clear enough after Batch 2, skip this batch.
|
|
62
|
+
|
|
63
|
+
After the interview, proceed to Step 5.
|
|
64
|
+
|
|
65
|
+
### Step 4b: Quick interview (`--quick`)
|
|
66
|
+
|
|
67
|
+
Ask at most 2 questions in a single AskUserQuestion call:
|
|
68
|
+
1. "What do you want to build?" (skip if slug is descriptive)
|
|
69
|
+
2. "Any constraints or gotchas I should know about?"
|
|
70
|
+
|
|
71
|
+
Keep it fast. Proceed to Step 5.
|
|
72
|
+
|
|
73
|
+
## Step 5: Complexity detection
|
|
74
|
+
|
|
75
|
+
Based on the interview answers, estimate complexity:
|
|
76
|
+
- **S** — Small: isolated change, single file or module, no new dependencies.
|
|
77
|
+
- **M** — Medium: touches 2-5 files, may need new module, straightforward logic.
|
|
78
|
+
- **L** — Large: cross-cutting, multiple modules, new patterns or integrations.
|
|
79
|
+
- **XL** — Extra Large: architectural change, new infrastructure, high risk.
|
|
80
|
+
|
|
81
|
+
If the estimate is **S** and `--quick` was NOT set:
|
|
82
|
+
Suggest to the user: "This sounds like a small change. You could use `--quick` next time to skip research and plan. For now, I'll write the full REQUEST.md."
|
|
83
|
+
|
|
84
|
+
## Step 6: Create directory structure
|
|
85
|
+
|
|
86
|
+
Run these commands to create the feature directory:
|
|
87
|
+
|
|
88
|
+
```bash
|
|
89
|
+
mkdir -p {folder}/{slug}/research
|
|
90
|
+
mkdir -p {folder}/{slug}/plan
|
|
91
|
+
mkdir -p {folder}/{slug}/implement
|
|
92
|
+
mkdir -p {folder}/{slug}/delta/ADDED
|
|
93
|
+
mkdir -p {folder}/{slug}/delta/MODIFIED
|
|
94
|
+
mkdir -p {folder}/{slug}/delta/REMOVED
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Where `{folder}` is the value from Step 1 (default: `rpi/features`).
|
|
98
|
+
|
|
99
|
+
## Step 7: Generate REQUEST.md
|
|
100
|
+
|
|
101
|
+
Write `{folder}/{slug}/REQUEST.md` using Luna's output format:
|
|
102
|
+
|
|
103
|
+
```markdown
|
|
104
|
+
# {Feature Title}
|
|
105
|
+
|
|
106
|
+
## Summary
|
|
107
|
+
{1-3 sentences — what this feature does}
|
|
108
|
+
|
|
109
|
+
## Problem
|
|
110
|
+
{What problem does this solve? Who is affected?}
|
|
111
|
+
|
|
112
|
+
## Target Users
|
|
113
|
+
{Who will use this feature?}
|
|
114
|
+
|
|
115
|
+
## Constraints
|
|
116
|
+
- {constraint 1}
|
|
117
|
+
- {constraint 2}
|
|
118
|
+
|
|
119
|
+
## References
|
|
120
|
+
- {links, examples, inspiration — or "None identified" if the user didn't mention any}
|
|
121
|
+
|
|
122
|
+
## Unknowns
|
|
123
|
+
- {anything unclear that needs clarification — always have at least one, even if it's minor}
|
|
124
|
+
|
|
125
|
+
## Complexity Estimate
|
|
126
|
+
{S | M | L | XL} — {justification}
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
If `--quick` was set: write a compact version (shorter sentences, skip References if none, Unknowns can be brief). Add a section at the end:
|
|
130
|
+
|
|
131
|
+
```markdown
|
|
132
|
+
## Quick Flow
|
|
133
|
+
This feature was flagged for quick flow. Skipping research and plan phases.
|
|
134
|
+
Suggested approach: {1-2 sentence implementation direction based on the interview}.
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Step 8: Next steps
|
|
138
|
+
|
|
139
|
+
Output to the user:
|
|
140
|
+
|
|
141
|
+
```
|
|
142
|
+
Feature created: {folder}/{slug}/REQUEST.md
|
|
143
|
+
|
|
144
|
+
Next: /rpi {slug}
|
|
145
|
+
Or explicitly: /rpi:research {slug}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
If `--quick` was set, instead output:
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Feature created: {folder}/{slug}/REQUEST.md
|
|
152
|
+
|
|
153
|
+
Quick flow: /rpi:implement {slug}
|
|
154
|
+
Or full pipeline: /rpi {slug}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
</process>
|
|
158
|
+
"""
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
description = "First-time setup — analyzes your codebase, generates context, and guides you through your first feature."
|
|
2
|
+
|
|
3
|
+
prompt = """
|
|
4
|
+
# /rpi:onboarding — Guided First-Time Setup
|
|
5
|
+
|
|
6
|
+
Walks the user through RPIKit setup: explains the workflow, configures the project, analyzes the codebase, and guides them into their first feature.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## Step 1: Welcome message
|
|
11
|
+
|
|
12
|
+
Output to the user:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Welcome to RPIKit v2 — Research, Plan, Implement.
|
|
16
|
+
|
|
17
|
+
RPIKit is a 7-phase development workflow with 13 specialized AI agents.
|
|
18
|
+
Each phase produces artifacts that feed the next, with validation gates
|
|
19
|
+
that prevent premature implementation.
|
|
20
|
+
|
|
21
|
+
I'll analyze your project, set up configuration, and guide you through
|
|
22
|
+
your first feature.
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Step 2: Parse arguments and check existing setup
|
|
26
|
+
|
|
27
|
+
1. Parse `$ARGUMENTS` for `--refresh` flag.
|
|
28
|
+
2. Check if `rpi/context.md` exists.
|
|
29
|
+
|
|
30
|
+
- If `rpi/context.md` exists and `--refresh` was NOT passed:
|
|
31
|
+
Ask with AskUserQuestion: "Project already configured. Do you want to refresh the analysis or skip to feature selection?"
|
|
32
|
+
- If refresh: proceed to Step 3 (full init flow).
|
|
33
|
+
- If skip: jump to Step 5 (read existing `rpi/context.md` and present summary).
|
|
34
|
+
- If `--refresh` was passed: proceed to Step 3 (full init flow).
|
|
35
|
+
- If `rpi/context.md` does not exist: proceed to Step 3 (full init flow).
|
|
36
|
+
|
|
37
|
+
## Step 3: Run /rpi:init flow inline — configuration interview
|
|
38
|
+
|
|
39
|
+
### Step 3a: Check existing config
|
|
40
|
+
|
|
41
|
+
Check if `.rpi.yaml` exists.
|
|
42
|
+
- If it exists and `--refresh` was NOT passed: ask with AskUserQuestion: ".rpi.yaml already exists. Overwrite with fresh config or keep current settings?"
|
|
43
|
+
- If keep: skip to Step 3c.
|
|
44
|
+
- If overwrite: proceed to Step 3b.
|
|
45
|
+
- If it exists and `--refresh` was passed: proceed to Step 3b.
|
|
46
|
+
- If it does not exist: proceed to Step 3b.
|
|
47
|
+
|
|
48
|
+
### Step 3b: Interview (2 batches)
|
|
49
|
+
|
|
50
|
+
**Batch 1** (use AskUserQuestion — ask all at once):
|
|
51
|
+
- "Do you use TDD? (yes/no, default: no)"
|
|
52
|
+
- "Commit style? (conventional/freeform, default: conventional)"
|
|
53
|
+
- "When should the UX agent (Pixel) run? (auto/always/never, default: auto — runs when frontend detected)"
|
|
54
|
+
|
|
55
|
+
**Batch 2** (use AskUserQuestion — ask all at once):
|
|
56
|
+
- "Auto-learn from implementations? When Forge finishes a task, should RPIKit capture the solution in rpi/solutions/? (yes/no, default: no)"
|
|
57
|
+
- "Party mode default panel size? (3/5/7, default: 5)"
|
|
58
|
+
|
|
59
|
+
### Step 3c: Write .rpi.yaml
|
|
60
|
+
|
|
61
|
+
Write `.rpi.yaml` to the project root with the user's responses (use defaults for unanswered questions):
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
version: 2
|
|
65
|
+
|
|
66
|
+
# Directories
|
|
67
|
+
folder: rpi/features
|
|
68
|
+
specs_dir: rpi/specs
|
|
69
|
+
solutions_dir: rpi/solutions
|
|
70
|
+
context_file: rpi/context.md
|
|
71
|
+
|
|
72
|
+
# Execution
|
|
73
|
+
parallel_threshold: 8
|
|
74
|
+
commit_style: {user_response | conventional}
|
|
75
|
+
tdd: {user_response | false}
|
|
76
|
+
|
|
77
|
+
# Agents
|
|
78
|
+
ux_agent: {user_response | auto}
|
|
79
|
+
|
|
80
|
+
# Quick flow
|
|
81
|
+
quick_complexity: S
|
|
82
|
+
|
|
83
|
+
# Knowledge compounding
|
|
84
|
+
auto_learn: {user_response | true}
|
|
85
|
+
|
|
86
|
+
# Party mode
|
|
87
|
+
party_default_agents: {user_response | 5}
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Step 3d: Create directory structure
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
mkdir -p rpi/specs
|
|
94
|
+
mkdir -p rpi/solutions
|
|
95
|
+
mkdir -p rpi/features
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
## Step 4: Launch Atlas — codebase analysis
|
|
99
|
+
|
|
100
|
+
Launch Atlas agent to analyze the codebase and generate `rpi/context.md`:
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
You are Atlas. Analyze this entire codebase and produce a comprehensive project context document.
|
|
104
|
+
|
|
105
|
+
Your task:
|
|
106
|
+
1. Read config files first (package.json, tsconfig, Cargo.toml, pyproject.toml, go.mod, etc.)
|
|
107
|
+
2. Explore the directory structure — map all key directories and their purposes
|
|
108
|
+
3. Find 5-10 representative source files across different parts of the codebase
|
|
109
|
+
4. Detect naming conventions, component patterns, import style, error handling
|
|
110
|
+
5. Identify the testing setup and coverage patterns
|
|
111
|
+
6. Note any TODOs, FIXMEs, or incomplete areas in the code
|
|
112
|
+
7. Identify untested modules or areas with weak coverage
|
|
113
|
+
8. Spot architectural risks or technical debt
|
|
114
|
+
|
|
115
|
+
Output format — write this directly to rpi/context.md:
|
|
116
|
+
|
|
117
|
+
# Project Context
|
|
118
|
+
|
|
119
|
+
## Stack
|
|
120
|
+
- Language: {language} {version}
|
|
121
|
+
- Framework: {framework} {version}
|
|
122
|
+
- Database: {db} (if any)
|
|
123
|
+
- Testing: {test_framework}
|
|
124
|
+
- Build: {build_tool}
|
|
125
|
+
- Package Manager: {package_manager}
|
|
126
|
+
|
|
127
|
+
## Architecture
|
|
128
|
+
- Pattern: {description}
|
|
129
|
+
- Key directories: {list with purposes}
|
|
130
|
+
- Entry points: {list}
|
|
131
|
+
|
|
132
|
+
## Conventions
|
|
133
|
+
- File naming: {pattern}
|
|
134
|
+
- Component pattern: {pattern}
|
|
135
|
+
- Import style: {pattern}
|
|
136
|
+
- Error handling: {pattern}
|
|
137
|
+
- API pattern: {pattern}
|
|
138
|
+
|
|
139
|
+
## Key Files
|
|
140
|
+
{List of important files with brief descriptions}
|
|
141
|
+
|
|
142
|
+
## Existing Tests
|
|
143
|
+
{Summary of test coverage and testing patterns}
|
|
144
|
+
|
|
145
|
+
## Risks and Technical Debt
|
|
146
|
+
{Identified risks, TODOs, FIXMEs, weak areas}
|
|
147
|
+
|
|
148
|
+
## Opportunities
|
|
149
|
+
{3-5 concrete feature ideas based on: TODOs found, untested modules, missing error handling, potential improvements}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Wait for Atlas to complete. Store the output as `$ATLAS_OUTPUT`.
|
|
153
|
+
|
|
154
|
+
## Step 5: Present codebase analysis summary
|
|
155
|
+
|
|
156
|
+
1. Read `rpi/context.md` (freshly generated or existing).
|
|
157
|
+
2. Output a condensed summary to the user:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Project Analysis Complete
|
|
161
|
+
|
|
162
|
+
Stack: {language} + {framework}
|
|
163
|
+
Architecture: {pattern}
|
|
164
|
+
Files: {approximate count}
|
|
165
|
+
Tests: {coverage summary}
|
|
166
|
+
|
|
167
|
+
Key findings:
|
|
168
|
+
- {finding 1}
|
|
169
|
+
- {finding 2}
|
|
170
|
+
- {finding 3}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
## Step 6: Suggest features
|
|
174
|
+
|
|
175
|
+
Based on the `## Opportunities` section in `rpi/context.md` (or from `$ATLAS_OUTPUT`), present 3-5 concrete feature suggestions:
|
|
176
|
+
|
|
177
|
+
```
|
|
178
|
+
Based on the analysis, here are some things you could work on:
|
|
179
|
+
|
|
180
|
+
1. {feature idea} — {brief justification from codebase analysis}
|
|
181
|
+
2. {feature idea} — {brief justification}
|
|
182
|
+
3. {feature idea} — {brief justification}
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Each suggestion should be grounded in something Atlas actually found (a TODO, an untested module, a missing pattern, a risk to address).
|
|
186
|
+
|
|
187
|
+
## Step 7: Ask what the user wants to do
|
|
188
|
+
|
|
189
|
+
Use AskUserQuestion:
|
|
190
|
+
|
|
191
|
+
"What would you like to do?
|
|
192
|
+
A) Build one of these features (pick a number)
|
|
193
|
+
B) Describe my own feature
|
|
194
|
+
C) I'll explore on my own"
|
|
195
|
+
|
|
196
|
+
### If A (build a suggested feature):
|
|
197
|
+
|
|
198
|
+
1. Convert the selected feature idea into a slug.
|
|
199
|
+
2. Read `commands/rpi/new.md` and follow its process from Step 4 onward (Luna's interview), using the suggested feature as context.
|
|
200
|
+
3. After REQUEST.md is created, output:
|
|
201
|
+
```
|
|
202
|
+
Feature created: rpi/features/{slug}/REQUEST.md
|
|
203
|
+
|
|
204
|
+
Next: /rpi {slug}
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
### If B (describe own feature):
|
|
208
|
+
|
|
209
|
+
1. Ask with AskUserQuestion: "What's the name for this feature? (short, e.g. 'oauth', 'dark-mode', 'csv-export')"
|
|
210
|
+
2. Read `commands/rpi/new.md` and follow its process from Step 4 onward (Luna's interview).
|
|
211
|
+
3. After REQUEST.md is created, output:
|
|
212
|
+
```
|
|
213
|
+
Feature created: rpi/features/{slug}/REQUEST.md
|
|
214
|
+
|
|
215
|
+
Next: /rpi {slug}
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
### If C (explore on their own):
|
|
219
|
+
|
|
220
|
+
Proceed to Step 8.
|
|
221
|
+
|
|
222
|
+
## Step 8: Quick reference card
|
|
223
|
+
|
|
224
|
+
Output to the user:
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
Quick Reference:
|
|
228
|
+
/rpi:new my-feature Start a new feature
|
|
229
|
+
/rpi my-feature Auto-progress to next phase
|
|
230
|
+
/rpi:party "topic" Multi-agent debate
|
|
231
|
+
/rpi:learn Capture a solution
|
|
232
|
+
/rpi:status See all features
|
|
233
|
+
|
|
234
|
+
Setup complete. Happy building!
|
|
235
|
+
```
|
|
236
|
+
"""
|