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
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: rpi:archive
3
+ description: Merge delta specs into main specs and clean up the feature directory.
4
+ argument-hint: "<feature-name>"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ ---
13
+
14
+ # /rpi:archive — Archive Feature
15
+
16
+ Merge the feature's delta specs into the main `rpi/specs/` directory, preserve any solutions worth saving, and delete the feature directory. History is preserved in git.
17
+
18
+ ---
19
+
20
+ ## Step 1: Load config and validate
21
+
22
+ 1. Read `.rpi.yaml` for config. Apply defaults if missing:
23
+ - `folder`: `rpi/features`
24
+ - `specs_dir`: `rpi/specs`
25
+ - `solutions_dir`: `rpi/solutions`
26
+ 2. Parse `$ARGUMENTS` to extract `{slug}`.
27
+ 3. Validate `rpi/features/{slug}/` exists. If not:
28
+ ```
29
+ Feature '{slug}' not found. Nothing to archive.
30
+ ```
31
+ Stop.
32
+
33
+ ## Step 2: Validate review verdict
34
+
35
+ 1. Read `rpi/features/{slug}/implement/IMPLEMENT.md`.
36
+ 2. Look for a `## Review` section with a verdict of `PASS` or `PASS with concerns`.
37
+ 3. If verdict is `FAIL`:
38
+ ```
39
+ Review verdict is FAIL for '{slug}'.
40
+ Fix the issues and re-run: /rpi:review {slug}
41
+ Cannot archive a feature that hasn't passed review.
42
+ ```
43
+ Stop.
44
+ 4. If no review section or verdict is found:
45
+ ```
46
+ No review verdict found for '{slug}'.
47
+ Run /rpi:review {slug} before archiving.
48
+ ```
49
+ Stop.
50
+
51
+ ## Step 3: Read delta contents
52
+
53
+ 1. Scan `rpi/features/{slug}/delta/ADDED/` for all files — store as `$ADDED_FILES`.
54
+ 2. Scan `rpi/features/{slug}/delta/MODIFIED/` for all files — store as `$MODIFIED_FILES`.
55
+ 3. Scan `rpi/features/{slug}/delta/REMOVED/` for all files — store as `$REMOVED_FILES`.
56
+ 4. Read the contents of each file found.
57
+
58
+ If all three directories are empty:
59
+ ```
60
+ No delta specs found for '{slug}'. Skipping specs merge.
61
+ ```
62
+ Proceed to Step 5.
63
+
64
+ ## Step 4: Launch Nexus to merge delta into specs
65
+
66
+ Use the Agent tool to launch Nexus for the merge:
67
+
68
+ ```
69
+ You are Nexus. Merge the delta specs for feature '{slug}' into the main specs directory.
70
+
71
+ ## ADDED Files (copy to rpi/specs/)
72
+ {for each file in $ADDED_FILES: filename and full contents}
73
+
74
+ ## MODIFIED Files (apply changes to existing rpi/specs/ files)
75
+ {for each file in $MODIFIED_FILES: filename, delta contents, and current contents of the target spec file in rpi/specs/}
76
+
77
+ ## REMOVED Files (delete from rpi/specs/)
78
+ {for each file in $REMOVED_FILES: filename}
79
+
80
+ Your task:
81
+ 1. For each ADDED file: determine the correct path under rpi/specs/ and write the file there.
82
+ - Use the file's content as-is. Preserve the directory structure (e.g. delta/ADDED/auth/oauth.md → rpi/specs/auth/oauth.md).
83
+ 2. For each MODIFIED file: read the current spec at rpi/specs/{path}, apply the changes from the delta version.
84
+ - The delta file contains the updated version of the spec. Merge it intelligently:
85
+ - Preserve any sections in the original that aren't addressed by the delta
86
+ - Update sections that the delta modifies
87
+ - Add new sections from the delta
88
+ 3. For each REMOVED file: note the path under rpi/specs/ that should be deleted.
89
+
90
+ Output format:
91
+ ## Merge Plan
92
+ ### Files to Write
93
+ - {path}: {action: created | updated} — {brief description}
94
+
95
+ ### Files to Delete
96
+ - {path} — {reason}
97
+
98
+ ### Warnings
99
+ - {any conflicts or issues detected}
100
+ (or "No warnings.")
101
+ ```
102
+
103
+ Store the output as `$NEXUS_MERGE`.
104
+
105
+ After Nexus responds, execute the merge plan:
106
+ 1. **ADDED**: Write each file to `rpi/specs/{path}` (create directories as needed).
107
+ 2. **MODIFIED**: Write the merged content to `rpi/specs/{path}`.
108
+ 3. **REMOVED**: Delete the files from `rpi/specs/`.
109
+
110
+ ## Step 5: Check for solutions worth saving
111
+
112
+ 1. Read `rpi/features/{slug}/implement/IMPLEMENT.md` for the review section.
113
+ 2. If the review flagged solutions saved to `rpi/solutions/`:
114
+ - Verify each referenced solution file exists in `rpi/solutions/`.
115
+ - If any are missing, warn:
116
+ ```
117
+ Warning: Solution '{path}' referenced in review but not found.
118
+ ```
119
+
120
+ ## Step 6: Delete feature directory
121
+
122
+ Remove the entire feature directory:
123
+
124
+ ```bash
125
+ rm -rf rpi/features/{slug}
126
+ ```
127
+
128
+ ## Step 7: Commit
129
+
130
+ Stage all changes and commit:
131
+
132
+ ```bash
133
+ git add -A
134
+ git commit -m "chore: archive {slug} — delta merged, feature complete"
135
+ ```
136
+
137
+ ## Step 8: Output summary
138
+
139
+ ```
140
+ Archive complete: {slug}
141
+
142
+ Specs merged:
143
+ - Added: {N} files
144
+ - Modified: {N} files
145
+ - Removed: {N} files
146
+
147
+ Feature directory deleted: rpi/features/{slug}/
148
+ History preserved in git.
149
+ ```
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: rpi:docs
3
- description: Generate code documentation from implementation artifacts. Adds inline docs, updates README, generates API docs, and creates changelog entry. Final step in the RPI pipeline.
4
- argument-hint: "<feature-slug> [--skip-inline] [--skip-readme] [--skip-changelog]"
3
+ description: Quill generates and updates documentation based on the implementation.
4
+ argument-hint: "<feature-name>"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -10,188 +10,126 @@ allowed-tools:
10
10
  - Glob
11
11
  - Grep
12
12
  - Agent
13
- - AskUserQuestion
14
13
  ---
15
14
 
16
- <objective>
17
- Generate documentation for a completed feature using all RPI artifacts as source. Adds inline code documentation, updates project README if needed, generates API docs for new endpoints, and creates a changelog entry.
18
- </objective>
15
+ # /rpi:docs — Docs Phase
19
16
 
20
- <process>
17
+ Quill reads all feature artifacts and generates documentation: README updates, changelog entries, API docs, and inline comments where non-obvious.
21
18
 
22
- ## 1. Load config and parse arguments
23
-
24
- Read `.rpi.yaml` for folder path. Also read `profile` and `models` keys.
25
- Parse `$ARGUMENTS`:
26
- - First argument: `{feature-slug}` (required)
27
- - `--skip-inline`: skip adding inline code documentation
28
- - `--skip-readme`: skip README updates
29
- - `--skip-changelog`: skip changelog entry
30
-
31
- ## 1b. Resolve model
32
-
33
- Resolve the model for the `review` 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.
34
-
35
- ## 2. Validate prerequisites
36
-
37
- Verify the feature has passed review. Read `{folder}/{feature-slug}/implement/IMPLEMENT.md`.
38
-
39
- Check for review verdict:
40
- - If verdict is PASS → proceed
41
- - If verdict is FAIL → error:
42
- ```
43
- Feature has not passed review. Run /rpi:review {feature-slug} first.
44
- ```
45
- - If IMPLEMENT.md doesn't exist → error:
46
- ```
47
- Implementation not found. Run /rpi:implement {feature-slug} first.
48
- ```
49
-
50
- ## 3. Gather all artifacts
51
-
52
- Read all feature artifacts for context:
53
- - `{folder}/{feature-slug}/REQUEST.md` — what was requested
54
- - `{folder}/{feature-slug}/research/RESEARCH.md` — decisions and trade-offs
55
- - `{folder}/{feature-slug}/plan/eng.md` — technical spec (APIs, models, architecture)
56
- - `{folder}/{feature-slug}/plan/pm.md` — acceptance criteria (if exists)
57
- - `{folder}/{feature-slug}/plan/PLAN.md` — task list with files
58
- - `{folder}/{feature-slug}/implement/IMPLEMENT.md` — what was actually built, deviations
59
-
60
- ## 4. Identify documentation targets
61
-
62
- From IMPLEMENT.md and PLAN.md, collect:
63
- - All files created or modified
64
- - New public functions, classes, types, and exports
65
- - New API endpoints or routes
66
- - New configuration options or environment variables
67
- - Deviations from the plan (may need extra documentation)
68
-
69
- Use Glob and Grep to read the actual implemented files and identify what needs documentation.
70
-
71
- ## 5. Launch parallel documentation agents
72
-
73
- Use the Agent tool to launch applicable agents concurrently. If a model was resolved in Step 1b, include `model: "{resolved_model}"` in each Agent tool call.
19
+ ---
74
20
 
75
- ### Agent 1: Inline Documentation (unless --skip-inline)
21
+ ## Step 1: Load config and validate
22
+
23
+ 1. Read `.rpi.yaml` for config. Apply defaults if missing:
24
+ - `folder`: `rpi/features`
25
+ - `context_file`: `rpi/context.md`
26
+ - `commit_style`: `conventional`
27
+ 2. Parse `$ARGUMENTS` to extract `{slug}`.
28
+ 3. Validate `rpi/features/{slug}/implement/IMPLEMENT.md` exists. If not:
29
+ ```
30
+ IMPLEMENT.md not found for '{slug}'. Run /rpi:implement {slug} first.
31
+ ```
32
+ Stop.
33
+
34
+ ## Step 2: Validate review verdict
35
+
36
+ 1. Look for a review verdict in `rpi/features/{slug}/implement/IMPLEMENT.md`.
37
+ 2. The verdict appears in a `## Review` section as `PASS` or `PASS with concerns`.
38
+ 3. If verdict is `FAIL`:
39
+ ```
40
+ Review verdict is FAIL for '{slug}'.
41
+ Fix the issues identified in IMPLEMENT.md and re-run: /rpi:review {slug}
42
+ ```
43
+ Stop.
44
+ 4. If no review verdict is found:
45
+ ```
46
+ No review verdict found for '{slug}'. Run /rpi:review {slug} first.
47
+ ```
48
+ Stop.
49
+
50
+ ## Step 3: Gather context
51
+
52
+ 1. Read `rpi/features/{slug}/REQUEST.md` — store as `$REQUEST`.
53
+ 2. Read `rpi/features/{slug}/plan/PLAN.md` — store as `$PLAN`.
54
+ 3. Read `rpi/features/{slug}/implement/IMPLEMENT.md` — store as `$IMPLEMENT`.
55
+ 4. Read `rpi/context.md` (project context) if it exists — store as `$CONTEXT`.
56
+ 5. Scan `rpi/features/{slug}/delta/` for all files in ADDED/, MODIFIED/, and REMOVED/ — store as `$DELTA_CONTENTS`.
57
+ 6. Read `README.md` from the project root if it exists — store as `$CURRENT_README`.
58
+ 7. Read `CHANGELOG.md` from the project root if it exists — store as `$CURRENT_CHANGELOG`.
59
+
60
+ ## Step 4: Launch Quill
61
+
62
+ Launch Quill agent with this prompt:
76
63
 
77
64
  ```
78
- You are documenting code for a completed feature.
79
-
80
- Read these artifacts for context:
81
- - {folder}/{feature-slug}/plan/eng.md
82
- - {folder}/{feature-slug}/implement/IMPLEMENT.md
83
-
84
- Then read each implemented file listed in IMPLEMENT.md.
85
-
86
- Add inline documentation ONLY where it adds value:
87
- 1. Public functions/methods: brief JSDoc/docstring with params and return type
88
- 2. Complex logic: short comment explaining WHY, not WHAT
89
- 3. Non-obvious design decisions: reference the trade-off from eng.md
90
- 4. New types/interfaces: brief description of purpose
65
+ You are Quill. Generate and update documentation for feature: {slug}
66
+
67
+ ## Request
68
+ {$REQUEST}
69
+
70
+ ## Plan
71
+ {$PLAN}
72
+
73
+ ## Implementation
74
+ {$IMPLEMENT}
75
+
76
+ ## Delta Specs
77
+ {$DELTA_CONTENTS}
78
+
79
+ ## Project Context
80
+ {$CONTEXT}
81
+
82
+ ## Current README
83
+ {$CURRENT_README or "No README.md found."}
84
+
85
+ ## Current CHANGELOG
86
+ {$CURRENT_CHANGELOG or "No CHANGELOG.md found."}
87
+
88
+ Your task:
89
+ 1. Update README.md with new feature documentation (if the feature adds user-facing behavior or public API)
90
+ - Add a section or update an existing section — don't rewrite the entire README
91
+ - Include usage examples with concrete values
92
+ - If the feature is internal/refactoring only, skip README updates
93
+ 2. Write a changelog entry in conventional format
94
+ - Use the appropriate category: Added, Changed, Fixed, Removed
95
+ - Reference the feature slug
96
+ - If CHANGELOG.md exists, prepend the new entry under the correct version
97
+ - If CHANGELOG.md doesn't exist, create it with a header and the first entry
98
+ 3. Add API docs for new public interfaces
99
+ - Document exported functions, classes, or endpoints introduced by this feature
100
+ - Include parameter types, return types, and one usage example per interface
101
+ - Write docs where the project convention places them (JSDoc, docstrings, doc comments, or separate files)
102
+ 4. Add inline comments only where the code is non-obvious
103
+ - Explain WHY, not WHAT
104
+ - Focus on: non-obvious business rules, workarounds, performance tradeoffs, external API quirks
105
+ - Do NOT add comments that restate the code
91
106
 
92
107
  Rules:
93
- - Do NOT add obvious comments ("// returns the user" on a getUser function)
94
- - Do NOT document private/internal helpers unless logic is non-trivial
95
- - Match the project's existing documentation style and conventions
96
- - If the project has no inline docs convention, use minimal JSDoc/docstrings only on public APIs
97
- - Do NOT modify any behavior — documentation only
108
+ - Keep docs DRY don't repeat what the code already says
109
+ - Match existing documentation style and tone
110
+ - Use concrete examples, not abstract descriptions
111
+ - If the code says WHAT, the docs should say WHY
98
112
  ```
99
113
 
100
- ### Agent 2: API Documentation (if new endpoints exist)
114
+ Store the output as `$QUILL_OUTPUT`.
101
115
 
102
- ```
103
- You are generating API documentation for new endpoints.
116
+ ## Step 5: Commit documentation changes
104
117
 
105
- Read these artifacts:
106
- - {folder}/{feature-slug}/plan/eng.md (API design section)
107
- - {folder}/{feature-slug}/implement/IMPLEMENT.md
118
+ 1. Stage all documentation files changed by Quill:
119
+ ```bash
120
+ git add -A
121
+ ```
122
+ 2. Commit with a conventional message:
123
+ ```bash
124
+ git commit -m "docs({slug}): update documentation for {slug}"
125
+ ```
108
126
 
109
- Find all new API endpoints/routes in the implemented files using Grep.
127
+ ## Step 6: Output summary
110
128
 
111
- For each endpoint, document:
112
- - Method and path
113
- - Request parameters/body with types
114
- - Response format with types
115
- - Error responses
116
- - Authentication requirements
117
- - Example request/response
118
-
119
- Check if the project has an existing API docs file or pattern (e.g., docs/api.md, swagger/openapi spec, README API section). If yes, extend it. If no, create `{folder}/{feature-slug}/implement/API.md`.
120
-
121
- Use the format that matches existing project conventions.
122
129
  ```
130
+ Documentation complete: {slug}
123
131
 
124
- ### Agent 3: README & Changelog (unless both skipped)
132
+ {$QUILL_OUTPUT summary list of files updated and what changed}
125
133
 
134
+ Next: /rpi:archive {slug}
126
135
  ```
127
- You are updating project documentation for a completed feature.
128
-
129
- Read these artifacts:
130
- - {folder}/{feature-slug}/REQUEST.md (feature summary)
131
- - {folder}/{feature-slug}/implement/IMPLEMENT.md (what was built, deviations)
132
- - {folder}/{feature-slug}/plan/eng.md (new dependencies, config)
133
-
134
- Tasks:
135
-
136
- 1. README update (unless --skip-readme):
137
- - Read the project's existing README.md
138
- - Determine if the feature needs to be mentioned (new user-facing capability, new config, new dependency)
139
- - If yes, add a concise entry in the appropriate section
140
- - If the feature is purely internal/refactor, skip README update
141
- - Do NOT rewrite the README — only add what's necessary
142
-
143
- 2. Changelog entry (unless --skip-changelog):
144
- - Check if CHANGELOG.md exists. If not, create it with Keep a Changelog format
145
- - Add an entry under [Unreleased]:
146
- - Added: new features
147
- - Changed: modifications to existing features
148
- - Fixed: bug fixes
149
- - Keep entries concise — one line per change
150
- - Reference the feature slug for traceability
151
- ```
152
-
153
- ## 6. Write DOCS.md summary
154
-
155
- After all agents complete, write `{folder}/{feature-slug}/implement/DOCS.md`:
156
-
157
- ```markdown
158
- # Documentation: {Feature Title}
159
-
160
- Generated: {timestamp}
161
-
162
- ## Inline Documentation
163
- - Files documented: {N}
164
- - Public APIs documented: {list}
165
- {Or: "Skipped (--skip-inline)"}
166
-
167
- ## API Documentation
168
- - New endpoints: {N}
169
- - Docs location: {path}
170
- {Or: "No new endpoints"}
171
-
172
- ## README
173
- - Updated: yes/no
174
- - Changes: {brief description}
175
- {Or: "Skipped (--skip-readme)"}
176
-
177
- ## Changelog
178
- - Entry added: yes/no
179
- - Section: Added/Changed/Fixed
180
- {Or: "Skipped (--skip-changelog)"}
181
- ```
182
-
183
- ## 7. Present result
184
-
185
- Output:
186
- ```
187
- Documentation complete for {feature-slug}:
188
- - Inline docs: {N} files documented
189
- - API docs: {endpoint count or "none"}
190
- - README: {updated or skipped}
191
- - Changelog: {entry added or skipped}
192
-
193
- Feature {feature-slug} is fully complete.
194
- All artifacts: {folder}/{feature-slug}/
195
- ```
196
-
197
- </process>