rpi-kit 1.4.0 → 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 +2016 -117
  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 +160 -53
  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 +7 -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 -108
  39. package/agents/code-simplifier.md +0 -82
  40. package/agents/cto-advisor.md +0 -61
  41. package/agents/doc-synthesizer.md +0 -67
  42. package/agents/doc-writer.md +0 -37
  43. package/agents/explore-codebase.md +0 -88
  44. package/agents/plan-executor.md +0 -95
  45. package/agents/product-manager.md +0 -59
  46. package/agents/requirement-parser.md +0 -51
  47. package/agents/senior-engineer.md +0 -61
  48. package/agents/test-engineer.md +0 -23
  49. package/agents/ux-designer.md +0 -58
  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,59 +1,83 @@
1
1
  ---
2
2
  name: rpi-agents
3
- description: This skill should be used when the user asks about RPI agent behavior, rules, or roles, asks "what agents are involved", "how does the code reviewer work", "what are the agent rules", "customize agent behavior", or mentions agent names like requirement-parser, product-manager, ux-designer, senior-engineer, cto-advisor, doc-synthesizer, plan-executor, code-simplifier, code-reviewer, explore-codebase, test-engineer, or doc-writer.
4
- version: 1.0.1
5
- license: MIT
3
+ description: This skill should be used when the user asks about RPIKit agents, their roles, or behavior.
6
4
  ---
7
5
 
8
- # RPI Agent Guidelines
6
+ # RPIKit Agents
9
7
 
10
- Behavioral constraints for RPI agents. Every agent follows the general rules below PLUS their role-specific rules.
8
+ ## Overview
11
9
 
12
- ## General Rules (All Agents)
10
+ RPIKit v2 uses 13 named agents with rich personas. Each agent has a distinct personality that shapes how it approaches problems, ensuring diverse perspectives across the development pipeline.
13
11
 
14
- 1. **Cite evidence.** Every claim must reference a specific file, dependency, or codebase pattern. No unsupported statements.
15
- 2. **Name unknowns.** If you're uncertain, say what you don't know. Never fill gaps with assumptions.
16
- 3. **Be concrete.** Anti-pattern: "This could improve performance." Instead: "Batching the 3 API calls reduces round-trips from 3 to 1."
17
- 4. **Stay in scope.** Only analyze what's relevant to the feature. Don't audit the entire codebase.
18
- 5. **Structured output.** Use the section format specified for your role. Include your verdict per section.
12
+ ## Agent Reference
19
13
 
20
- ## Output Format (Research Agents)
14
+ | Name | Role | Phase | Persona |
15
+ |------|------|-------|---------|
16
+ | Luna | Analyst | Request | Curious, asks uncomfortable questions |
17
+ | Atlas | Codebase Explorer | Research | Methodical, evidence-based |
18
+ | Scout | External Investigator | Research | Skeptical, checks everything |
19
+ | Nexus | Synthesizer/Facilitator | Cross-phase | Diplomatic but decisive |
20
+ | Mestre | Architect | Plan | Pragmatic, hates over-engineering |
21
+ | Clara | Product Manager | Plan | Value-driven, cuts scope |
22
+ | Pixel | UX Designer | Plan (conditional) | Empathetic, user-first |
23
+ | Forge | Executor | Implement | Disciplined, follows plan |
24
+ | Sage | Tester | Implement + Review | Paranoid about edge cases |
25
+ | Razor | Simplifier | Simplify | Minimalist, loves deletion |
26
+ | Hawk | Adversarial Reviewer | Review | Forced to find problems |
27
+ | Shield | Security Sentinel | Review | Professionally paranoid |
28
+ | Quill | Technical Writer | Docs | Clear, concise, WHY not WHAT |
21
29
 
22
- Each research agent outputs markdown sections with verdicts:
30
+ ## Agents by Phase
23
31
 
24
- ```markdown
25
- ## [Section Name]
26
- Verdict: GO | CONCERN | BLOCK
32
+ - **Request:** Luna
33
+ - **Research:** Atlas + Scout -> Nexus (synthesis)
34
+ - **Plan:** Mestre + Clara + Pixel (conditional) -> Nexus (validation)
35
+ - **Implement:** Forge + Sage (if TDD enabled)
36
+ - **Simplify:** Razor
37
+ - **Review:** Hawk + Shield + Sage (parallel) -> Nexus (synthesis)
38
+ - **Docs:** Quill
39
+ - **Party Mode:** Nexus (facilitator) + 3-5 relevant agents
40
+ - **Archive:** Nexus (merge delta into specs)
27
41
 
28
- [Findings with evidence]
42
+ ## Conditional Agents
29
43
 
30
- ### [Sub-section if needed]
31
- [Details]
44
+ **Pixel** only activates when frontend work is detected. Controlled by `.rpi.yaml`:
45
+
46
+ ```yaml
47
+ ux_agent: auto # auto | always | never
32
48
  ```
33
49
 
34
- End with: `Estimated Complexity: S | M | L | XL`
50
+ - `auto` -- Pixel activates when the feature involves UI/frontend components
51
+ - `always` -- Pixel always participates in planning
52
+ - `never` -- Pixel is never activated
53
+
54
+ ## Party Mode Agent Selection
55
+
56
+ Nexus selects agents based on the topic:
57
+
58
+ - **Technical topics** -> Mestre + Atlas + Scout
59
+ - **Product topics** -> Clara + Luna + Pixel
60
+ - **Security topics** -> Shield + Hawk + Mestre
61
+ - **Mixed topics** -> Mestre + Clara + Atlas + Shield
62
+
63
+ The number of agents defaults to `party_default_agents` in `.rpi.yaml` (default: 4).
35
64
 
36
- ## Agent Roles
65
+ ## Review Dynamics
37
66
 
38
- The RPI workflow uses 12 specialized agents. Each has detailed behavioral rules, anti-patterns, and output formats defined in its own file under `agents/`:
67
+ Review runs three agents in parallel for independent perspectives:
39
68
 
40
- | Agent | Role | Phase |
41
- |-------|------|-------|
42
- | requirement-parser | Extract structured, testable requirements | Research |
43
- | product-manager | Scope, user stories, effort, acceptance criteria | Research, Plan |
44
- | ux-designer | User flows, interaction patterns, UI decisions | Research (deep), Plan |
45
- | senior-engineer | Technical approach, architecture, dependencies | Research, Plan |
46
- | cto-advisor | Risk, feasibility, strategic alignment | Research (deep) |
47
- | doc-synthesizer | Merge research outputs into RESEARCH.md | Research |
48
- | explore-codebase | Scan codebase for patterns and context | Research |
49
- | test-engineer | Write failing tests before implementation (TDD) | Implement (TDD), Test |
50
- | plan-executor | Implement tasks from PLAN.md surgically | Implement |
51
- | code-simplifier | Check reuse, quality, efficiency and fix | Implement |
52
- | code-reviewer | Review implementation against plan | Implement, Review |
53
- | doc-writer | Generate documentation from artifacts | Docs |
69
+ 1. **Hawk** -- adversarial code review (quality, patterns, architecture)
70
+ - Uses 5 perspectives: dev, ops, user, security, business
71
+ - Forced to find problems (zero findings triggers re-analysis)
72
+ - Classifies findings: P1 (blocks) | P2 (should fix) | P3 (nice-to-have)
73
+ 2. **Shield** -- security audit (OWASP Top 10, secrets, injection, auth bypass)
74
+ 3. **Sage** -- test coverage (untested modules, uncovered paths, missing tests)
75
+ 4. **Nexus** -- synthesizes findings into final verdict: PASS | PASS with concerns | FAIL
54
76
 
55
- For full role-specific rules, anti-patterns, and output formats, see the individual agent definitions in `agents/*.md`.
77
+ ## Knowledge Compounding
56
78
 
57
- ## Related
79
+ When review agents find problems and the dev fixes them:
58
80
 
59
- For the workflow process (phases, commands, configuration), see the **rpi-workflow** skill.
81
+ 1. The solution is auto-saved to `rpi/solutions/{category}/`
82
+ 2. Categories are auto-detected: performance, security, database, testing, architecture, patterns, decisions
83
+ 3. Scout checks solutions/ in future research phases, preventing repeated mistakes
@@ -1,245 +1,219 @@
1
1
  ---
2
2
  name: rpi-workflow
3
- description: This skill should be used when the user wants to develop a feature systematically, asks "how do I start a new feature", "walk me through the workflow", "help me build this step by step", says "research plan implement", mentions TDD or test-driven development, mentions model profiles or model selection, or mentions any RPI command (/rpi:init, /rpi:new, /rpi:research, /rpi:plan, /rpi:implement, /rpi:test, /rpi:simplify, /rpi:status, /rpi:review, /rpi:docs, /rpi:add-todo, /rpi:set-profile).
4
- version: 0.2.0
5
- license: MIT
3
+ description: This skill should be used when the user wants to develop a feature systematically, asks "how do I start a new feature", "walk me through the workflow", or mentions any RPI command.
6
4
  ---
7
5
 
8
- # RPI Workflow
6
+ # RPIKit Workflow
9
7
 
10
- RPI (Research → Plan → Implement) is a systematic feature development workflow with validation gates at each phase.
8
+ ## Overview
11
9
 
12
- ## Workflow Phases
10
+ RPIKit v2 is a 7-phase pipeline for AI-assisted feature development:
11
+ request -> research -> plan -> implement -> simplify -> review -> docs
13
12
 
14
- ### Phase 0: Init
15
- Run `/rpi:init` once per project to configure:
16
- - Feature folder location (default: `rpi/`)
17
- - Default research tier
18
- - Parallel threshold, commit style, and other preferences
19
- - Creates `.rpi.yaml` at project root
13
+ Each phase produces artifacts that feed the next, with named agents driving each step.
20
14
 
21
- ### Phase 1: New Feature
22
- Run `/rpi:new` to start. Adaptive interview:
23
- - Start with core questions: what feature, what problem it solves
24
- - Ask follow-ups based on answers (who uses it, complexity, constraints, references)
25
- - Set up isolation based on `isolation` config:
26
- - `none`: work on current branch
27
- - `branch`: `git checkout -b feature/{slug}`
28
- - `worktree`: create `.worktrees/{slug}` with `git worktree add`
29
- - Generate `{folder}/{feature-slug}/REQUEST.md` with structured sections
15
+ ## Quick Start
30
16
 
31
- REQUEST.md sections: Summary, Problem, Target Users, Constraints, References, Complexity Estimate.
17
+ 1. `/rpi:init` -- configure RPIKit for your project
18
+ 2. `/rpi:new my-feature` -- start a feature (Luna interviews you)
19
+ 3. `/rpi my-feature` -- auto-progress through phases
32
20
 
33
- ### Phase 2: Research
34
- Run `/rpi:research {feature-slug}` with optional tier flag.
21
+ ## Phases
35
22
 
36
- Research tiers control agent composition:
37
- - `--quick`: requirement-parser + explore-codebase (feasibility only)
38
- - `--standard` (default): + product-manager + senior-engineer (scope + approach)
39
- - `--deep`: + cto-advisor + ux-designer if UI (full analysis + alternatives)
23
+ | Phase | Command | Agents | Artifacts |
24
+ |-------|---------|--------|-----------|
25
+ | Request | /rpi:new | Luna | REQUEST.md |
26
+ | Research | /rpi:research | Atlas, Scout, Nexus | RESEARCH.md |
27
+ | Plan | /rpi:plan | Mestre, Clara, Pixel, Nexus | PLAN.md, eng.md, pm.md, ux.md, delta/ |
28
+ | Implement | /rpi:implement | Forge, Sage | IMPLEMENT.md |
29
+ | Simplify | /rpi:simplify | Razor | code changes |
30
+ | Review | /rpi:review | Hawk, Shield, Sage, Nexus | review verdict |
31
+ | Docs | /rpi:docs | Quill | README, changelog |
40
32
 
41
- All selected agents run in **parallel fan-out**. Doc-synthesizer merges outputs into RESEARCH.md.
33
+ ## Auto-Flow
42
34
 
43
- RESEARCH.md format:
44
- 1. Executive Summary (5 lines: verdict, complexity, risk, recommendation, key finding)
45
- 2. Requirements Analysis
46
- 3. Product Scope
47
- 4. Codebase Context
48
- 5. Technical Analysis
49
- 6. Strategic Assessment (deep tier only)
50
- 7. Alternatives (mandatory if NO-GO)
35
+ `/rpi {feature}` detects the current phase and runs the next one automatically:
51
36
 
52
- Verdicts: **GO**, **GO with concerns**, **NO-GO**
53
- - NO-GO includes alternative approaches and scope reduction suggestions
54
- - Override with `--force` flag
55
-
56
- ### Phase 3: Plan
57
- Run `/rpi:plan {feature-slug}`.
58
-
59
- Adaptive artifact generation:
60
- - Always: PLAN.md (task checklist) + eng.md (technical spec)
61
- - Adaptive: pm.md (user stories) and ux.md (user flows) — generated based on feature type
62
- - After research, asks user to confirm which artifacts to generate
63
-
64
- PLAN.md task format:
65
- ```markdown
66
- ## Phase 1: Phase Name
67
-
68
- - [ ] **1.1** Task description
69
- Effort: S | Deps: none
70
- Files: src/path/to/file.ts
71
- Test: returns 200 for valid request with auth token
72
-
73
- - [ ] **1.2** Another task
74
- Effort: M | Deps: 1.1
75
- Files: src/other/file.ts
76
- Test: rejects duplicate entries with 409 conflict
37
+ ```
38
+ /rpi oauth -> has REQUEST.md? -> Phase 2: Research
39
+ /rpi oauth -> has RESEARCH.md? -> Phase 3: Plan
40
+ /rpi oauth -> has PLAN.md? -> Phase 4: Implement
41
+ /rpi oauth -> has IMPLEMENT.md? -> Phase 5: Simplify
42
+ /rpi oauth -> simplify done? -> Phase 6: Review
43
+ /rpi oauth -> review PASS? -> Phase 7: Docs
77
44
  ```
78
45
 
79
- ### Standalone: TDD
80
- Run `/rpi:test {feature-slug}` to run TDD cycles on individual tasks.
81
-
82
- - Works independently of `/rpi:implement` — use when you want TDD on specific tasks
83
- - Strict RED → GREEN → REFACTOR per task, one test at a time
84
- - Auto-detects test framework and conventions from the project
85
- - Flags: `--task <id>` for single task, `--all` for all uncompleted tasks
86
-
87
- ### Phase 4: Implement
88
- Run `/rpi:implement {feature-slug}`.
89
-
90
- Smart execution mode:
91
- - < 8 tasks: single plan-executor agent, sequential
92
- - 8+ tasks: group into waves by dependency, execute in parallel
93
- - Override: `--sequential` or `--parallel` flags
46
+ If the feature does not exist: `Feature 'oauth' not found. Run /rpi:new oauth to start.`
94
47
 
95
- Pipeline per phase:
96
- 1. Execute tasks → commit per task
97
- - If TDD enabled: RED (write failing test) → VERIFY RED → GREEN (minimal code) → VERIFY GREEN → REFACTOR → commit
98
- - If TDD disabled: execute task → commit (original behavior)
99
- 2. Simplify (3 parallel sub-agents: reuse, quality, efficiency)
100
- 3. Review (code-reviewer checks against plan + test coverage)
101
- 4. Phase verdict: PASS or FAIL
48
+ ## Escape Hatches
102
49
 
103
- IMPLEMENT.md tracks: task completion with commits, start/end times, files changed, deviations, simplify findings, review verdict.
50
+ Run a specific phase directly:
104
51
 
105
- After implementation, isolation cleanup runs based on config:
106
- - `none`: nothing
107
- - `branch`: asks to merge into main branch
108
- - `worktree`: asks to merge + remove the worktree
52
+ ```
53
+ /rpi:research oauth -- force (re)run research
54
+ /rpi:plan oauth -- force (re)generate plan
55
+ /rpi:implement oauth -- force (re)implement
56
+ /rpi:simplify oauth -- force simplify
57
+ /rpi:review oauth -- force review
58
+ /rpi:docs oauth -- force docs
59
+ ```
109
60
 
110
- ## Configuration (.rpi.yaml)
61
+ ## Global Flags
111
62
 
112
- ```yaml
113
- folder: rpi # Feature folder location
114
- tier: standard # Default research tier
115
- commit_style: conventional # Commit message format
116
- parallel_threshold: 8 # Task count for parallel mode
117
- skip_artifacts: [] # Artifacts to never generate
118
- isolation: none # none | branch | worktree
119
- tdd: false # Enable Test-Driven Development
120
- test_runner: auto # Test command (auto-detect or explicit)
121
- session_isolation: auto # auto | aggressive | off
122
- max_tasks_per_session: 5 # tasks before warning/checkpoint
123
- profile: balanced # quality-first | balanced | speed-first | budget (optional)
124
- models: # Per-phase overrides (optional, takes precedence over profile)
125
- # research: opus
126
- # plan: opus
127
- # implement: sonnet
128
- # review: opus
129
63
  ```
64
+ --quick -- quick flow (skip research + full plan)
65
+ --skip=phase -- skip specific phase(s)
66
+ --force -- re-run phase even if artifacts exist
67
+ --from=phase -- start from a specific phase
68
+ ```
69
+
70
+ ## Quick Flow
130
71
 
131
- ## Model Resolution Algorithm
72
+ `/rpi:new my-feature --quick` triggers a streamlined pipeline for small (S) features:
132
73
 
133
- When a command spawns an agent, it resolves which model to use for the Agent tool's `model` parameter. The algorithm is:
74
+ 1. Luna asks 1-2 quick questions, produces compact REQUEST.md
75
+ 2. Skip research + full plan
76
+ 3. Forge receives REQUEST.md + context.md directly
77
+ 4. Forge generates mini-plan inline (3-5 tasks max)
78
+ 5. Implements task by task
79
+ 6. Razor does quick simplify
80
+ 7. Skip formal review (lint/tests only)
81
+ 8. Quill updates docs if needed
134
82
 
135
- ### Resolution Order
83
+ **Auto-trigger:** Luna estimates complexity S and suggests quick flow.
84
+ **Safeguard:** If Forge detects complexity > S during implement, it stops and suggests running full research + plan.
136
85
 
137
- 1. **Per-phase override**: If `.rpi.yaml` has a `models.{phase}` value, use it.
138
- 2. **Profile default**: If `.rpi.yaml` has a `profile` value, look up the model for this phase in the profile table below.
139
- 3. **Inherit parent**: If neither is set, omit the `model` parameter entirely. The agent inherits the parent session's model (current default behavior).
86
+ ## Delta Specs
140
87
 
141
- ### Profile Lookup Table
88
+ Delta specs capture only what changes, not the full system state.
142
89
 
143
- | Profile | research | plan | implement | review |
144
- |---------|----------|------|-----------|--------|
145
- | `quality-first` | opus | opus | opus | opus |
146
- | `balanced` | opus | opus | sonnet | opus |
147
- | `speed-first` | sonnet | sonnet | sonnet | sonnet |
148
- | `budget` | haiku | sonnet | haiku | sonnet |
90
+ - `rpi/specs/` -- source of truth for current system state
91
+ - `rpi/features/{slug}/delta/` -- what changes for this feature
92
+ - `ADDED/` -- new spec files
93
+ - `MODIFIED/` -- changes to existing specs
94
+ - `REMOVED/` -- specs being deleted
95
+ - `/rpi:archive` merges delta into specs and cleans up the feature folder
149
96
 
150
- Note: The budget profile uses haiku for research and implement phases.
151
- Research quality may degrade with haiku -- research agents require structured
152
- analysis with citations and evidence. Recommended for small or simple features only.
97
+ Flow: research creates baseline from existing specs, plan creates delta, archive merges delta back into specs.
153
98
 
154
- ### Phase-to-Command Mapping
99
+ ## Knowledge Compounding
155
100
 
156
- | Phase | Commands |
157
- |-------|----------|
158
- | `research` | `/rpi:research` |
159
- | `plan` | `/rpi:plan` |
160
- | `implement` | `/rpi:implement`, `/rpi:test`, `/rpi:simplify` |
161
- | `review` | `/rpi:review`, `/rpi:docs` |
101
+ RPIKit builds a persistent knowledge base that grows with every feature.
162
102
 
163
- Commands without a phase (`/rpi:init`, `/rpi:new`, `/rpi:status`, `/rpi:add-todo`, `/rpi:onboarding`, `/rpi:set-profile`) do not use model resolution. `/rpi:onboarding` spawns agents but always inherits the parent model -- it is not a workflow phase.
103
+ - `rpi/solutions/` -- organized by category (performance/, security/, database/, testing/, architecture/, patterns/, decisions/)
104
+ - **Auto-saved:** during review, when Hawk/Shield find problems and the dev fixes them
105
+ - **Manual:** `/rpi:learn` -- Nexus asks what you learned and generates a solution doc
106
+ - **Reuse:** Scout checks solutions/ before external research and includes relevant solutions in RESEARCH.md
164
107
 
165
- ### Validation
108
+ Solution format:
166
109
 
167
- Valid model names: `opus`, `sonnet`, `haiku`.
110
+ ```markdown
111
+ # {Title}
168
112
 
169
- If a `models.{phase}` value or a `profile` value in `.rpi.yaml` is invalid:
170
- - Log a warning: `Warning: Invalid model "{value}" for {phase} phase. Falling back to parent model.`
171
- - Omit the `model` parameter (inherit parent model).
172
- - Do NOT stop execution.
113
+ ## Problem
114
+ {symptoms, how it manifests}
173
115
 
174
- If `profile` is set to an unrecognized name:
175
- - Log a warning: `Warning: Unknown profile "{value}". Valid profiles: quality-first, balanced, speed-first, budget. Falling back to parent model.`
176
- - Treat all phases as "inherit parent".
116
+ ## Solution
117
+ {code, approach, what worked}
177
118
 
178
- ### Status Messages
119
+ ## Prevention
120
+ {how to avoid in the future}
179
121
 
180
- When a model is resolved (not inherited), the command outputs once before spawning agents:
181
- ```
182
- Profile: {profile} | {phase} phase -> {model}
122
+ ## Context
123
+ Feature: {slug} | Date: {YYYY-MM-DD}
124
+ Files: {list}
183
125
  ```
184
126
 
185
- When inheriting the parent model (no profile, no override), output nothing extra -- this preserves current behavior silently.
127
+ ## Party Mode
186
128
 
187
- ## Feature Folder Structure
129
+ `/rpi:party "topic"` -- multi-agent debate on any topic.
188
130
 
189
131
  ```
190
- {folder}/{feature-slug}/
191
- ├── REQUEST.md
192
- ├── research/
193
- │ └── RESEARCH.md
194
- ├── plan/
195
- │ ├── PLAN.md
196
- │ ├── pm.md (adaptive)
197
- │ ├── ux.md (adaptive)
198
- │ └── eng.md
199
- └── implement/
200
- ├── IMPLEMENT.md
201
- ├── checkpoints/ (per-task status files)
202
- └── sessions/ (session boundary records)
132
+ /rpi:party "GraphQL vs REST for the API?"
133
+ /rpi:party oauth "how to handle token refresh?"
203
134
  ```
204
135
 
205
- ## Session Isolation
206
-
207
- RPI automatically manages session boundaries to prevent context drift in large features.
136
+ 1. Nexus analyzes the topic and selects 3-5 relevant agents
137
+ 2. Each agent responds in character with their perspective
138
+ 3. Nexus identifies consensus and divergence points
139
+ 4. If divergence: Nexus asks each agent to respond to the opposing argument
140
+ 5. Nexus synthesizes final recommendation with trade-offs
208
141
 
209
- ### How It Works
142
+ Output is saved to `rpi/solutions/decisions/` when requested.
210
143
 
211
- After `/rpi:plan`, the system computes a **context weight** from task count, files touched, and dependency depth. This determines the isolation tier:
144
+ ## Utility Commands
212
145
 
213
- | Tier | Context Weight | Behavior |
214
- |---|---|---|
215
- | 1 (Inline) | <= 8 | Single session, no checkpoints |
216
- | 2 (File-mediated) | 9-18 | Single session, warns after N tasks |
217
- | 3 (Wave-isolated) | > 18 | Multiple sessions, forced checkpoints per wave |
146
+ ```
147
+ /rpi:init -- configure RPIKit + generate context.md
148
+ /rpi:status -- view all features and their current phase
149
+ /rpi:party -- multi-agent debate on any topic
150
+ /rpi:learn -- manually capture a solution/insight
151
+ /rpi:archive -- merge delta into specs, delete feature folder
152
+ /rpi:onboarding -- first-time setup, analyzes codebase, guides the user
153
+ ```
218
154
 
219
- ### Agent Communication
155
+ ## Configuration
220
156
 
221
- Agents write results to per-task checkpoint files in `implement/checkpoints/`. The orchestrator reads only 1-line status summaries — full agent output never accumulates in the session context.
157
+ `.rpi.yaml` reference:
222
158
 
223
- Each agent receives only: its specific task + eng.md. No conversation history, no full plan, no research output.
159
+ ```yaml
160
+ version: 2
224
161
 
225
- ### Deviation Handling
162
+ # Directories
163
+ folder: rpi/features
164
+ specs_dir: rpi/specs
165
+ solutions_dir: rpi/solutions
166
+ context_file: rpi/context.md
226
167
 
227
- Agents classify deviations by severity:
228
- - **cosmetic** (naming, formatting): auto-accepted
229
- - **interface** (changed signatures): flags downstream tasks
230
- - **scope** (did more/less): blocks for human decision
168
+ # Execution
169
+ commit_style: conventional
170
+ tdd: false
231
171
 
232
- ### Resuming
172
+ # Conditional agents
173
+ ux_agent: auto # auto | always | never
233
174
 
234
- `/rpi:implement {slug} --resume` reads checkpoint files and continues from the last incomplete task with a fresh session context.
175
+ # Quick flow
176
+ quick_complexity: S
235
177
 
236
- ## Cross-Session Continuity
178
+ # Knowledge compounding
179
+ auto_learn: true
237
180
 
238
- All state lives in markdown files. When resuming:
239
- - `/rpi:status` shows all features with current phase, progress, tier, and session count
240
- - `/rpi:implement` reads checkpoint files and resumes from last completed task
241
- - Multiple features can be in progress simultaneously
181
+ # Party mode
182
+ party_default_agents: 4
183
+ ```
242
184
 
243
- ## Related
185
+ ## Directory Structure
244
186
 
245
- For agent behavioral guidelines, see the **rpi-agents** skill or individual agent files in `agents/`.
187
+ ```
188
+ rpi/
189
+ ├── context.md
190
+ ├── specs/
191
+ │ ├── auth/
192
+ │ │ └── session-management.md
193
+ │ └── payments/
194
+ │ └── stripe-checkout.md
195
+ ├── solutions/
196
+ │ ├── performance/
197
+ │ ├── security/
198
+ │ ├── database/
199
+ │ ├── testing/
200
+ │ ├── architecture/
201
+ │ ├── patterns/
202
+ │ └── decisions/
203
+ └── features/
204
+ └── {slug}/
205
+ ├── REQUEST.md
206
+ ├── research/
207
+ │ └── RESEARCH.md
208
+ ├── delta/
209
+ │ ├── ADDED/
210
+ │ ├── MODIFIED/
211
+ │ └── REMOVED/
212
+ ├── plan/
213
+ │ ├── PLAN.md
214
+ │ ├── eng.md
215
+ │ ├── pm.md
216
+ │ └── ux.md
217
+ └── implement/
218
+ └── IMPLEMENT.md
219
+ ```
@@ -1,108 +0,0 @@
1
- ---
2
- name: code-reviewer
3
- description: Reviews implementation against the plan requirements. Checks completeness, correctness, deviations, and code quality. Outputs PASS or FAIL. Spawned by /rpi:implement and /rpi:review.
4
- tools: Read, Glob, Grep
5
- color: bright-red
6
- ---
7
-
8
- <role>
9
- You review implementation against the plan. You check that requirements are met, deviations are justified, and the code is correct. Every finding must cite a specific plan requirement.
10
- </role>
11
-
12
- <rules>
13
- 1. Every finding must cite a specific requirement from PLAN.md, pm.md, or eng.md — no untraceable observations
14
- 2. No style nitpicks — focus on correctness, completeness, and plan alignment
15
- 3. Check: are ALL tasks from PLAN.md implemented? List any missing tasks by ID
16
- 4. Check: are there deviations from the plan? Are they justified in IMPLEMENT.md?
17
- 5. Verdict is PASS only if all requirements are met and no unjustified deviations exist
18
- 6. For FAIL verdict, list specific gaps with actionable fixes — not vague suggestions
19
- </rules>
20
-
21
- <anti_patterns>
22
- - Bad: "The code could be more readable"
23
- - Good: "Task 1.3 (route handlers) is incomplete — POST /auth/google/callback is missing. Required by eng.md section 'API Design'."
24
-
25
- - Bad: "Consider adding more tests"
26
- - Good: "PLAN.md task 3.2 specifies 'test OAuth callback error handling' but no test covers the case where Google returns an invalid token."
27
- </anti_patterns>
28
-
29
- <execution_flow>
30
-
31
- ## 1. Load all context
32
-
33
- Read all feature files:
34
- - REQUEST.md — original requirements
35
- - RESEARCH.md — research findings and constraints
36
- - PLAN.md — task checklist (the source of truth)
37
- - eng.md — technical spec
38
- - pm.md — acceptance criteria (if exists)
39
- - ux.md — UX requirements (if exists)
40
- - IMPLEMENT.md — implementation record
41
-
42
- ## 2. Completeness check
43
-
44
- For each task in PLAN.md:
45
- - Is it marked `[x]` in IMPLEMENT.md?
46
- - Do the files listed in the task actually exist and contain the expected changes?
47
- - Use Grep/Glob to verify
48
-
49
- List any incomplete tasks.
50
-
51
- ## 3. Correctness check
52
-
53
- For each implemented task:
54
- - Does the implementation match eng.md's technical approach?
55
- - If pm.md exists: are acceptance criteria met? Check each AC.
56
- - If ux.md exists: are user flows implemented? Check each step.
57
- - Use Grep to find the actual code and verify.
58
-
59
- ## 4. Deviation check
60
-
61
- Read the Deviations section of IMPLEMENT.md:
62
- - Is each deviation documented?
63
- - Is each deviation justified with rationale?
64
- - Are there unlisted deviations? (Compare PLAN.md expectations with actual files)
65
-
66
- ## 5. Code quality check
67
-
68
- Quick scan for:
69
- - Obvious bugs or logic errors
70
- - Security concerns (injection, auth bypass, data exposure)
71
- - Missing error handling for critical paths
72
- - Tests for critical functionality
73
-
74
- ## 6. Verdict
75
-
76
- ### PASS criteria:
77
- - All tasks complete
78
- - All acceptance criteria met
79
- - All deviations justified
80
- - No critical code issues
81
-
82
- ### FAIL criteria:
83
- - Any task incomplete
84
- - Any acceptance criterion unmet
85
- - Any unjustified deviation
86
- - Any critical code issue (security, data loss)
87
-
88
- ## 7. Output
89
-
90
- ```markdown
91
- ## Review: {feature-slug}
92
-
93
- ### Verdict: {PASS|FAIL}
94
-
95
- ### Completeness ({completed}/{total} tasks)
96
- - Task {id}: {DONE|MISSING} — {details}
97
-
98
- ### Correctness
99
- - {finding with file:line reference and plan requirement citation}
100
-
101
- ### Deviations
102
- - {deviation}: {justified|unjustified} — {reason}
103
-
104
- ### Issues
105
- - [{CRITICAL|WARNING}] {file}:{line} — {description}. Required by: {plan reference}
106
- ```
107
-
108
- </execution_flow>