projecta-rrr 1.9.6 → 1.9.8
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/bin/install.js +39 -0
- package/commands/rrr/execute-plan.md +22 -0
- package/commands/rrr/help.md +116 -0
- package/commands/rrr/plan-phase.md +156 -2
- package/commands/rrr/progress.md +4 -1
- package/docs/CHEATSHEET-BROWNFIELD.md +296 -0
- package/docs/CHEATSHEET-GREENFIELD.md +270 -0
- package/docs/ROADMAP-LIFECYCLE-VERIFICATION.md +187 -0
- package/docs/SCOPE-CACHE-VERIFICATION.md +191 -0
- package/package.json +3 -1
- package/projecta.defaults.json +40 -0
- package/rrr/lib/load-skills.js +280 -46
- package/rrr/skills/registry.json +180 -0
- package/rrr/templates/phase-prompt.md +4 -0
- package/scripts/bootstrap-external-skills.js +426 -0
package/bin/install.js
CHANGED
|
@@ -603,6 +603,38 @@ function addNpmScripts(targetDir, installedScripts, bashAvailable = true) {
|
|
|
603
603
|
return { added, skipped };
|
|
604
604
|
}
|
|
605
605
|
|
|
606
|
+
/**
|
|
607
|
+
* Run external skills bootstrap script (non-blocking)
|
|
608
|
+
* Installs skills from skills.sh ecosystem into ~/.claude/skills
|
|
609
|
+
*/
|
|
610
|
+
function runExternalSkillsBootstrap() {
|
|
611
|
+
const bootstrapScript = path.join(__dirname, '..', 'scripts', 'bootstrap-external-skills.js');
|
|
612
|
+
|
|
613
|
+
if (!fs.existsSync(bootstrapScript)) {
|
|
614
|
+
return;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
// Spawn the bootstrap script without waiting for it to complete
|
|
618
|
+
// This allows the install to finish while skills install in background
|
|
619
|
+
try {
|
|
620
|
+
const { spawn } = require('child_process');
|
|
621
|
+
|
|
622
|
+
// On Windows, use node directly; on Unix, we can use background execution
|
|
623
|
+
const child = spawn(process.execPath, [bootstrapScript], {
|
|
624
|
+
detached: true,
|
|
625
|
+
stdio: 'ignore',
|
|
626
|
+
cwd: path.join(__dirname, '..')
|
|
627
|
+
});
|
|
628
|
+
|
|
629
|
+
child.unref();
|
|
630
|
+
|
|
631
|
+
console.log(` ${dim}External skills bootstrap started in background${reset}`);
|
|
632
|
+
} catch (e) {
|
|
633
|
+
// Silently ignore bootstrap failures - skills are optional
|
|
634
|
+
console.log(` ${dim}External skills bootstrap skipped${reset}`);
|
|
635
|
+
}
|
|
636
|
+
}
|
|
637
|
+
|
|
606
638
|
/**
|
|
607
639
|
* Install to the specified directory
|
|
608
640
|
*/
|
|
@@ -687,6 +719,11 @@ function install(isGlobal) {
|
|
|
687
719
|
}
|
|
688
720
|
}
|
|
689
721
|
|
|
722
|
+
// Bootstrap external skills from skills.sh ecosystem (only for global install)
|
|
723
|
+
if (isGlobal) {
|
|
724
|
+
console.log(` ${green}✓${reset} Preparing external skills bootstrap`);
|
|
725
|
+
}
|
|
726
|
+
|
|
690
727
|
// Copy CHANGELOG.md
|
|
691
728
|
const changelogSrc = path.join(src, 'CHANGELOG.md');
|
|
692
729
|
const changelogDest = path.join(claudeDir, 'rrr', 'CHANGELOG.md');
|
|
@@ -1104,6 +1141,8 @@ if (hasGlobal && hasLocal) {
|
|
|
1104
1141
|
handleStatusline(settings, false, (shouldInstallStatusline) => {
|
|
1105
1142
|
handleNotifications(settings, false, (shouldInstallNotify) => {
|
|
1106
1143
|
finishInstall(settingsPath, settings, statuslineCommand, notifyCommand, claudeDir, shouldInstallStatusline, shouldInstallNotify, localDirName, isGlobal, bashAvailable);
|
|
1144
|
+
// Run external skills bootstrap for global installs (non-blocking)
|
|
1145
|
+
runExternalSkillsBootstrap();
|
|
1107
1146
|
});
|
|
1108
1147
|
});
|
|
1109
1148
|
} else if (hasLocal) {
|
|
@@ -241,6 +241,28 @@ Plan path: $ARGUMENTS
|
|
|
241
241
|
|
|
242
242
|
Skills are injected into executor prompt as `<skills>` block.
|
|
243
243
|
|
|
244
|
+
4.5. **Suggest skills from stack (optional)**
|
|
245
|
+
|
|
246
|
+
After loading skills, check for stack-based suggestions:
|
|
247
|
+
|
|
248
|
+
**On macOS/Linux:**
|
|
249
|
+
```bash
|
|
250
|
+
node ~/.claude/rrr/lib/load-skills.js --suggest "$plan_path" 2>/dev/null || echo ""
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
**On Windows:**
|
|
254
|
+
Use the loaded skills result's `suggested` field (if using loadSkillsForPlan programmatically).
|
|
255
|
+
|
|
256
|
+
**If suggestions exist:**
|
|
257
|
+
```
|
|
258
|
+
---
|
|
259
|
+
Skills suggested from stack: projecta.shadcn-ui, projecta.mcp-stack
|
|
260
|
+
To include: add to PLAN frontmatter `skills: [projecta.shadcn-ui, projecta.mcp-stack]`
|
|
261
|
+
---
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
If no stack field in plan or `skills_mode: minimal`, skip silently.
|
|
265
|
+
|
|
244
266
|
5. **Pre-execution summary (interactive mode only)**
|
|
245
267
|
Check config.json for mode. Skip this step if mode=yolo.
|
|
246
268
|
|
package/commands/rrr/help.md
CHANGED
|
@@ -433,6 +433,29 @@ Search for skills on skillsmp.com marketplace.
|
|
|
433
433
|
|
|
434
434
|
Usage: `/rrr:search-skills react patterns`
|
|
435
435
|
|
|
436
|
+
### Stack-Aware Skill Suggestions
|
|
437
|
+
|
|
438
|
+
Skills can suggest themselves based on your plan's `stack:` field:
|
|
439
|
+
|
|
440
|
+
**Add stack to PLAN.md frontmatter:**
|
|
441
|
+
```yaml
|
|
442
|
+
---
|
|
443
|
+
stack: [nextjs, typescript, tailwind, stripe]
|
|
444
|
+
---
|
|
445
|
+
```
|
|
446
|
+
|
|
447
|
+
**When you run `/rrr:execute-plan`:**
|
|
448
|
+
```
|
|
449
|
+
Skills suggested from stack: projecta.shadcn-ui, projecta.mcp-stack
|
|
450
|
+
To include: add to PLAN frontmatter `skills: [projecta.shadcn-ui, projecta.mcp-stack]`
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
**How it works:**
|
|
454
|
+
- RRR matches stack keywords (e.g., `nextjs`, `stripe`) against skill registry tags
|
|
455
|
+
- Suggestions appear during execute-plan preflight
|
|
456
|
+
- Add to `skills:` array in frontmatter to persist
|
|
457
|
+
- Skipped if `skills_mode: minimal` or no stack field
|
|
458
|
+
|
|
436
459
|
### Utility Commands
|
|
437
460
|
|
|
438
461
|
**`/rrr:help`**
|
|
@@ -932,6 +955,99 @@ skills:
|
|
|
932
955
|
└── (vendor with scripts/vendor-droid-tings-skills.sh)
|
|
933
956
|
```
|
|
934
957
|
|
|
958
|
+
## External Skills (skills.sh Ecosystem)
|
|
959
|
+
|
|
960
|
+
RRR automatically installs and manages external skills from the skills.sh ecosystem using the `add-skill` CLI.
|
|
961
|
+
|
|
962
|
+
### What Are External Skills?
|
|
963
|
+
|
|
964
|
+
Skills from the broader AI/developer community that RRR can discover and load during execution. Unlike vendored skills (included in npm package), external skills are fetched on-demand from GitHub repos.
|
|
965
|
+
|
|
966
|
+
### Where Skills Are Installed
|
|
967
|
+
|
|
968
|
+
| Platform | Location |
|
|
969
|
+
|----------|----------|
|
|
970
|
+
| macOS/Linux | `~/.claude/skills/` |
|
|
971
|
+
| Windows | `%USERPROFILE%\.claude\skills\` |
|
|
972
|
+
|
|
973
|
+
### Installed Sources
|
|
974
|
+
|
|
975
|
+
On first global install, RRR bootstraps skills from configured sources in `projecta.defaults.json`:
|
|
976
|
+
|
|
977
|
+
| Source | Skills |
|
|
978
|
+
|--------|--------|
|
|
979
|
+
| `vercel-labs/agent-skills` | vercel-react-best-practices, web-design-guidelines |
|
|
980
|
+
| `expo/skills` | building-ui, api-routes, data-fetching, deployment, tailwind-setup |
|
|
981
|
+
| `anthropics/skills` | frontend-design, webapp-testing, mcp-builder |
|
|
982
|
+
| `vercel-labs/agent-browser` | agent-browser |
|
|
983
|
+
| `callstackincubator/agent-skills` | react-native-best-practices |
|
|
984
|
+
| `coreyhaines31/marketingskills` | signup-flow-cro, page-cro, seo-audit, copywriting |
|
|
985
|
+
| `dmmulroy/cloudflare-skill` | cloudflare |
|
|
986
|
+
|
|
987
|
+
### How Discovery Works
|
|
988
|
+
|
|
989
|
+
1. **Bootstrap** — On `npx projecta-rrr --global`, runs `npx add-skill <repo> --skill <name>` for configured skills
|
|
990
|
+
2. **Manifest** — Records installed skills in `~/.claude/rrr/external-skills.lock.json`
|
|
991
|
+
3. **Rate-Limit** — Only re-installs if 24+ hours since last check (configurable)
|
|
992
|
+
4. **Discovery** — During execute-plan, scans `~/.claude/skills/` for SKILL.md files not in registry
|
|
993
|
+
|
|
994
|
+
### Loading External Skills
|
|
995
|
+
|
|
996
|
+
External skills are auto-discovered and loaded just like registered skills:
|
|
997
|
+
|
|
998
|
+
```yaml
|
|
999
|
+
---
|
|
1000
|
+
skills:
|
|
1001
|
+
- frontend-design # From anthropics/skills (registry)
|
|
1002
|
+
- vercel-react-best-practices # From vercel-labs/agent-skills (filesystem discovery)
|
|
1003
|
+
---
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
### Configuration
|
|
1007
|
+
|
|
1008
|
+
Add to `projecta.defaults.json` in project or `~/.claude/rrr/`:
|
|
1009
|
+
|
|
1010
|
+
```json
|
|
1011
|
+
{
|
|
1012
|
+
"external_skills": {
|
|
1013
|
+
"enabled": true,
|
|
1014
|
+
"auto_update": true,
|
|
1015
|
+
"check_interval_hours": 24,
|
|
1016
|
+
"sources": [
|
|
1017
|
+
{ "source": "owner/repo", "skills": ["skill-name"] }
|
|
1018
|
+
]
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
```
|
|
1022
|
+
|
|
1023
|
+
### Manual Commands
|
|
1024
|
+
|
|
1025
|
+
```bash
|
|
1026
|
+
# Force re-install all external skills
|
|
1027
|
+
node ~/.claude/rrr/scripts/bootstrap-external-skills.js --force
|
|
1028
|
+
|
|
1029
|
+
# Dry-run (show what would install)
|
|
1030
|
+
node ~/.claude/rrr/scripts/bootstrap-external-skills.js --dry-run
|
|
1031
|
+
```
|
|
1032
|
+
|
|
1033
|
+
### Troubleshooting
|
|
1034
|
+
|
|
1035
|
+
```bash
|
|
1036
|
+
# Check manifest
|
|
1037
|
+
cat ~/.claude/rrr/external-skills.lock.json
|
|
1038
|
+
|
|
1039
|
+
# List installed external skills
|
|
1040
|
+
ls ~/.claude/skills/
|
|
1041
|
+
|
|
1042
|
+
# Windows PowerShell
|
|
1043
|
+
Get-ChildItem -Recurse "$env:USERPROFILE\.claude\skills" -Filter SKILL.md | Select-Object FullName
|
|
1044
|
+
```
|
|
1045
|
+
|
|
1046
|
+
**If skills don't load:**
|
|
1047
|
+
1. Check manifest exists: `~/.claude/rrr/external-skills.lock.json`
|
|
1048
|
+
2. Verify SKILL.md files in `~/.claude/skills/<skill-name>/`
|
|
1049
|
+
3. Ensure skill has `name:` in frontmatter matching skill ID
|
|
1050
|
+
|
|
935
1051
|
**Vendoring Community Skills:**
|
|
936
1052
|
|
|
937
1053
|
```bash
|
|
@@ -174,6 +174,159 @@ Use AskUserQuestion:
|
|
|
174
174
|
|
|
175
175
|
**If script not found:** Continue without warning.
|
|
176
176
|
|
|
177
|
+
## 3.2. Discover and Ingest Pending TODOs (Cross-Platform)
|
|
178
|
+
|
|
179
|
+
**Before planning, check for pending TODOs that could inform this phase.**
|
|
180
|
+
|
|
181
|
+
### Step 3.2.1: Discover TODOs
|
|
182
|
+
|
|
183
|
+
**On macOS/Linux:**
|
|
184
|
+
```bash
|
|
185
|
+
TODO_FILES=$(ls -t .planning/todos/pending/*.md 2>/dev/null | head -10)
|
|
186
|
+
TODO_COUNT=$(echo "$TODO_FILES" | wc -l | tr -d ' ')
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
**On Windows:**
|
|
190
|
+
Use Glob tool: `Glob pattern: ".planning/todos/pending/*.md"` — limit to 10 most recent.
|
|
191
|
+
|
|
192
|
+
**If TODO_COUNT = 0:** Skip to step 4 (no pending TODOs).
|
|
193
|
+
|
|
194
|
+
### Step 3.2.2: Parse and Display TODOs
|
|
195
|
+
|
|
196
|
+
For each TODO file (up to 10, newest first), extract frontmatter:
|
|
197
|
+
|
|
198
|
+
**On macOS/Linux:**
|
|
199
|
+
```bash
|
|
200
|
+
for file in $TODO_FILES; do
|
|
201
|
+
created=$(grep "^created:" "$file" 2>/dev/null | cut -d' ' -f2 | xargs)
|
|
202
|
+
title=$(grep "^title:" "$file" 2>/dev/null | cut -d':' -f2- | xargs)
|
|
203
|
+
area=$(grep "^area:" "$file" 2>/dev/null | cut -d' ' -f2)
|
|
204
|
+
echo "$created|$title|$area|$file"
|
|
205
|
+
done
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
**On Windows:**
|
|
209
|
+
Use Read tool to read each TODO file, extract frontmatter fields.
|
|
210
|
+
|
|
211
|
+
**Display as numbered list (max 10):**
|
|
212
|
+
|
|
213
|
+
```
|
|
214
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
215
|
+
PENDING TODOs ({N} found)
|
|
216
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
217
|
+
|
|
218
|
+
1. [title] ([area], [created])
|
|
219
|
+
2. [title] ([area], [created])
|
|
220
|
+
...
|
|
221
|
+
|
|
222
|
+
Reply with numbers to select (e.g., "1,3" or "all"), or:
|
|
223
|
+
- "skip" to ignore for this phase
|
|
224
|
+
- "attach" to link to phase context
|
|
225
|
+
- "convert" to create plan(s) from selected
|
|
226
|
+
- "done" to mark selected as already handled
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
### Step 3.2.3: Present Action Options
|
|
230
|
+
|
|
231
|
+
Use AskUserQuestion:
|
|
232
|
+
```yaml
|
|
233
|
+
header: "TODOs Found"
|
|
234
|
+
question: "You have {N} pending TODOs. How would you like to handle them for this phase?"
|
|
235
|
+
options:
|
|
236
|
+
- label: "Ignore for this phase"
|
|
237
|
+
description: "Continue planning without these TODOs"
|
|
238
|
+
- label: "Attach to phase context"
|
|
239
|
+
description: "Link TODOs to {PHASE}-CONTEXT.md (keep in pending/)"
|
|
240
|
+
- label: "Convert to plan(s)"
|
|
241
|
+
description: "Generate PLAN.md stub(s) from selected TODOs"
|
|
242
|
+
- label: "Mark as done"
|
|
243
|
+
description: "Move selected TODOs to done/ (already handled)"
|
|
244
|
+
- label: "Review in /rrr:check-todos"
|
|
245
|
+
description: "Exit and review TODOs more thoroughly"
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Step 3.2.4: Handle Selection
|
|
249
|
+
|
|
250
|
+
**"Ignore for this phase":**
|
|
251
|
+
- Display: `Skipping TODO ingestion. Run /rrr:check-todos to review later.`
|
|
252
|
+
- Continue to step 4 (research)
|
|
253
|
+
|
|
254
|
+
**"Attach to phase context":**
|
|
255
|
+
|
|
256
|
+
1. Get selected TODO indices from user response
|
|
257
|
+
2. Read selected TODO files, extract title and problem/solution
|
|
258
|
+
3. Update or create `${PHASE_DIR}/${PHASE}-CONTEXT.md`:
|
|
259
|
+
- If file exists, append "## Ingested TODOs" section
|
|
260
|
+
- If new, create with ingested TODOs section
|
|
261
|
+
4. Add bullet list:
|
|
262
|
+
```markdown
|
|
263
|
+
## Ingested TODOs
|
|
264
|
+
|
|
265
|
+
- **[Title]** — [.planning/todos/pending/filename.md](path)
|
|
266
|
+
- Problem: [1-line summary]
|
|
267
|
+
- Status: Pending, linked for planning
|
|
268
|
+
```
|
|
269
|
+
5. Display: `Linked {N} TODOs to ${PHASE}-CONTEXT.md`
|
|
270
|
+
6. Continue to step 4 (research)
|
|
271
|
+
|
|
272
|
+
**"Convert to plan(s)":**
|
|
273
|
+
|
|
274
|
+
1. Get selected TODO indices from user response
|
|
275
|
+
2. Determine next plan number for phase:
|
|
276
|
+
- On macOS/Linux: `ls "${PHASE_DIR}"/*-PLAN.md 2>/dev/null | sed 's/.*\///' | cut -d'-' -f1 | sort -n | tail -1`
|
|
277
|
+
- On Windows: Glob `*.md` files, parse plan numbers, find max
|
|
278
|
+
3. For each selected TODO:
|
|
279
|
+
- Create PLAN stub: `${PHASE_DIR}/${NEXT_PLAN}-${SLUG}-PLAN.md`
|
|
280
|
+
- Frontmatter:
|
|
281
|
+
```yaml
|
|
282
|
+
---
|
|
283
|
+
wave: 1
|
|
284
|
+
depends_on: []
|
|
285
|
+
files_modified: []
|
|
286
|
+
autonomous: true
|
|
287
|
+
---
|
|
288
|
+
```
|
|
289
|
+
- Body:
|
|
290
|
+
```markdown
|
|
291
|
+
# [TODO Title]
|
|
292
|
+
|
|
293
|
+
**Source TODO:** [.planning/todos/pending/filename.md](path)
|
|
294
|
+
|
|
295
|
+
## Objective
|
|
296
|
+
|
|
297
|
+
[From TODO Problem section]
|
|
298
|
+
|
|
299
|
+
## Tasks
|
|
300
|
+
|
|
301
|
+
<!-- Generated from TODO: convert to actionable tasks -->
|
|
302
|
+
|
|
303
|
+
## Verification
|
|
304
|
+
|
|
305
|
+
- TODO converted from pending idea
|
|
306
|
+
- Original context preserved in source TODO file
|
|
307
|
+
```
|
|
308
|
+
- Increment plan number
|
|
309
|
+
4. Move converted TODO files to `done/`:
|
|
310
|
+
```bash
|
|
311
|
+
mv .planning/todos/pending/[filename].md .planning/todos/done/
|
|
312
|
+
```
|
|
313
|
+
5. Display: `Created {N} plan stub(s) from TODOs, moved originals to done/`
|
|
314
|
+
6. Continue to step 4 (research)
|
|
315
|
+
|
|
316
|
+
**"Mark as done":**
|
|
317
|
+
|
|
318
|
+
1. Get selected TODO indices from user response
|
|
319
|
+
2. Move selected files:
|
|
320
|
+
```bash
|
|
321
|
+
mv .planning/todos/pending/[filename].md .planning/todos/done/
|
|
322
|
+
```
|
|
323
|
+
3. Display: `Marked {N} TODOs as done`
|
|
324
|
+
4. Continue to step 4 (research)
|
|
325
|
+
|
|
326
|
+
**"Review in /rrr:check-todos":**
|
|
327
|
+
- Display: `Run /rrr:check-todos to review and manage your TODOs`
|
|
328
|
+
- Exit command
|
|
329
|
+
|
|
177
330
|
## 4. Ensure Phase Directory Exists (Cross-Platform)
|
|
178
331
|
|
|
179
332
|
**On macOS/Linux:**
|
|
@@ -521,7 +674,7 @@ Task(
|
|
|
521
674
|
)
|
|
522
675
|
```
|
|
523
676
|
|
|
524
|
-
- After planner returns → spawn checker again (step
|
|
677
|
+
- After planner returns → spawn checker again (step 11)
|
|
525
678
|
- Increment iteration_count
|
|
526
679
|
|
|
527
680
|
**If iteration_count >= 3:**
|
|
@@ -585,11 +738,12 @@ Verification: {Passed | Passed with override | Skipped}
|
|
|
585
738
|
<success_criteria>
|
|
586
739
|
- [ ] .planning/ directory validated
|
|
587
740
|
- [ ] Phase validated against roadmap
|
|
741
|
+
- [ ] Pending TODOs discovered and handled (or skipped)
|
|
588
742
|
- [ ] Phase directory created if needed
|
|
589
743
|
- [ ] Research completed (unless --skip-research or --gaps or exists)
|
|
590
744
|
- [ ] rrr-phase-researcher spawned if research needed
|
|
591
745
|
- [ ] Existing plans checked
|
|
592
|
-
- [ ] rrr-planner spawned with context (including RESEARCH.md if available)
|
|
746
|
+
- [ ] rrr-planner spawned with context (including RESEARCH.md and CONTEXT.md if available)
|
|
593
747
|
- [ ] Plans created (PLANNING COMPLETE or CHECKPOINT handled)
|
|
594
748
|
- [ ] rrr-plan-checker spawned (unless --skip-verify)
|
|
595
749
|
- [ ] Verification passed OR user override OR max iterations with user decision
|
package/commands/rrr/progress.md
CHANGED
|
@@ -165,7 +165,10 @@ CONTEXT: [✓ if CONTEXT.md exists | - if not]
|
|
|
165
165
|
|
|
166
166
|
## What's Next
|
|
167
167
|
[Next phase/plan objective from ROADMAP]
|
|
168
|
-
|
|
168
|
+
|
|
169
|
+
**If TODO_COUNT > 0:**
|
|
170
|
+
- Pending ideas found → `/rrr:plan-phase {current or next phase}` will offer to ingest them
|
|
171
|
+
|
|
169
172
|
|
|
170
173
|
</step>
|
|
171
174
|
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
# RRR Cheat Sheet: Brownfield Projects
|
|
2
|
+
|
|
3
|
+
**For:** Adding RRR to an existing codebase with code already written.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. One-Minute Mental Model
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
Milestone (v1.0) → Phases (1, 2, 3...) → Plans (01, 02...) → SUMMARY → UAT (optional)
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
| Concept | What it is | Why it matters |
|
|
14
|
+
|---------|------------|----------------|
|
|
15
|
+
| **Milestone** | A shipped version (v1.0, v1.1) | Your release target |
|
|
16
|
+
| **Phase** | Chunk of related work (Foundation, Auth, API) | Breaks milestone into manageables |
|
|
17
|
+
| **Plan** | Single executable task file | Your work unit |
|
|
18
|
+
| **SUMMARY** | Receipt after executing a plan | Proves you did the work |
|
|
19
|
+
| **verify-work --audit** | Non-interactive integrity check | Confirms PLAN + SUMMARY + git evidence exist |
|
|
20
|
+
|
|
21
|
+
**Core insight:** Plans are contracts. SUMMARYs are receipts. `verify-work --audit` checks the paperwork.
|
|
22
|
+
|
|
23
|
+
**Where artifacts live:**
|
|
24
|
+
```
|
|
25
|
+
.planning/
|
|
26
|
+
├── PROJECT.md # What you're building
|
|
27
|
+
├── ROADMAP.md # Phases and progress
|
|
28
|
+
├── STATE.md # Current position + decisions
|
|
29
|
+
├── SCOPE_CACHE.md # Git-backed state for drift detection
|
|
30
|
+
└── phases/ # Plans and summaries per phase
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
**RRR ignores:** architect-private paths (GSDWatcher/, upstreams/, reports/) — RRR won't scan or modify them.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## 2. Install / Update
|
|
38
|
+
|
|
39
|
+
### First-Time Install
|
|
40
|
+
```bash
|
|
41
|
+
npx projecta-rrr
|
|
42
|
+
```
|
|
43
|
+
Creates `~/.claude/` with all commands and workflows.
|
|
44
|
+
|
|
45
|
+
### Update to Latest
|
|
46
|
+
```bash
|
|
47
|
+
npx projecta-rrr@latest
|
|
48
|
+
```
|
|
49
|
+
Run this weekly or when `/rrr:update` tells you there's a new version.
|
|
50
|
+
|
|
51
|
+
### After Update
|
|
52
|
+
**Always restart Claude Code** for commands to reload:
|
|
53
|
+
1. Type `exit` in terminal
|
|
54
|
+
2. Run `claude` to restart
|
|
55
|
+
3. Verify with `/rrr:help`
|
|
56
|
+
|
|
57
|
+
### Windows Notes
|
|
58
|
+
- Core commands work without bash (Read, Glob, Grep)
|
|
59
|
+
- Hooks (statusline, notifications) need Git Bash or WSL2
|
|
60
|
+
- npm scripts (`npm run pushpa`, `npm run e2e`) require bash
|
|
61
|
+
|
|
62
|
+
### Commands Not Working?
|
|
63
|
+
|
|
64
|
+
| Problem | Fix |
|
|
65
|
+
|---------|-----|
|
|
66
|
+
| "Unknown skill: rrr:help" | Exit Claude Code (`exit`), restart (`claude`), then `/rrr:help` |
|
|
67
|
+
| Commands still missing | Reinstall: `npx projecta-rrr@latest`, restart Claude Code |
|
|
68
|
+
| Verify install worked | Run `/rrr:help` — should show command list |
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
## 3. Start Here: Brownfield Flow
|
|
73
|
+
|
|
74
|
+
You have an **existing repo** with code already written. Follow these steps:
|
|
75
|
+
|
|
76
|
+
1. **Audit existing structure**
|
|
77
|
+
```
|
|
78
|
+
/rrr:brownfield-audit
|
|
79
|
+
```
|
|
80
|
+
Scans for planning docs, detects conflicts, suggests cleanup
|
|
81
|
+
|
|
82
|
+
2. **If docs say X but code is Y → Investigate**
|
|
83
|
+
```
|
|
84
|
+
/rrr:map-codebase
|
|
85
|
+
```
|
|
86
|
+
Example: docs say "Supabase/Netlify" but code uses "Neon/Render" → run map-codebase to refresh planning truth
|
|
87
|
+
|
|
88
|
+
3. **Initialize project**
|
|
89
|
+
```
|
|
90
|
+
/clear
|
|
91
|
+
/rrr:new-project
|
|
92
|
+
```
|
|
93
|
+
Answers questions → creates PROJECT.md, ROADMAP.md, STATE.md
|
|
94
|
+
(Existing code preserved; RRR adds planning layer)
|
|
95
|
+
|
|
96
|
+
4. **Plan first phase**
|
|
97
|
+
```
|
|
98
|
+
/clear
|
|
99
|
+
/rrr:plan-phase 1
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
5. **Execute phase**
|
|
103
|
+
```
|
|
104
|
+
/clear
|
|
105
|
+
/rrr:execute-phase 1
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
6. **Verify implementation**
|
|
109
|
+
```
|
|
110
|
+
/rrr:verify-work --audit 1
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
7. **Check progress, repeat**
|
|
114
|
+
```
|
|
115
|
+
/rrr:progress
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Brownfield-Specific Notes
|
|
119
|
+
|
|
120
|
+
- **Existing tests?** RRR will detect and use them
|
|
121
|
+
- **No e2e setup?** `/rrr:brownfield-audit` offers to scaffold Playwright
|
|
122
|
+
- **Existing docs?** Audit detects conflicts with RRR structure
|
|
123
|
+
- **Legacy code?** RRR plans work alongside existing code
|
|
124
|
+
- **Codebase doesn't match docs?** Run `/rrr:map-codebase` to update planning truth
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 4. Daily Driver (After Repo Is Set Up)
|
|
129
|
+
|
|
130
|
+
### Morning Loop (5 minutes)
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
/rrr:progress
|
|
134
|
+
```
|
|
135
|
+
Decide: execute next plan OR plan next phase?
|
|
136
|
+
|
|
137
|
+
| If... | Then run... |
|
|
138
|
+
|-------|-------------|
|
|
139
|
+
| Plan exists, not executed | `/rrr:execute-plan <path>` |
|
|
140
|
+
| Plans done, phase complete | `/rrr:plan-phase <next>` |
|
|
141
|
+
| Between milestones | `/rrr:discuss-milestone` |
|
|
142
|
+
|
|
143
|
+
### Mid-Work Loop (During Coding)
|
|
144
|
+
|
|
145
|
+
**"I just thought of a new feature..."**
|
|
146
|
+
|
|
147
|
+
| Situation | Action |
|
|
148
|
+
|-----------|--------|
|
|
149
|
+
| Within current scope | Continue plan, capture as TODO later |
|
|
150
|
+
| Entirely new feature | `/rrr:add-todo "Feature name"` |
|
|
151
|
+
| Scope drift detected | `/rrr:progress` → shows drift warning |
|
|
152
|
+
|
|
153
|
+
### End-of-Day Loop (3 minutes)
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
/rrr:progress
|
|
157
|
+
/rrr:verify-work --audit # current phase or milestone
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Quick health check before wrapping up.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## 5. Verification: Audit vs UAT
|
|
165
|
+
|
|
166
|
+
RRR has **two verification modes**:
|
|
167
|
+
|
|
168
|
+
### Audit Mode (Default, Non-Interactive)
|
|
169
|
+
```
|
|
170
|
+
/rrr:verify-work --audit # current milestone
|
|
171
|
+
/rrr:verify-work --audit 05 # phase 05 only
|
|
172
|
+
/rrr:verify-work --audit v1.9 # entire milestone
|
|
173
|
+
```
|
|
174
|
+
- Checks: PLAN exists, SUMMARY exists, git commit hash in SUMMARY
|
|
175
|
+
- Output: `.planning/artifacts/VERIFY_WORK_AUDIT.md`
|
|
176
|
+
- **Never touches UAT files**
|
|
177
|
+
|
|
178
|
+
### UAT Mode (Interactive, Optional)
|
|
179
|
+
```
|
|
180
|
+
/rrr:verify-work --uat 01 # interactive testing for phase 01
|
|
181
|
+
```
|
|
182
|
+
- Creates/updates `*-UAT.md` files
|
|
183
|
+
- Walks through testable deliverables one by one
|
|
184
|
+
- User confirms: "pass" or describes issue
|
|
185
|
+
- Only use when you want manual testing
|
|
186
|
+
|
|
187
|
+
### Quick Reference
|
|
188
|
+
```
|
|
189
|
+
/rrr:verify-work # audit (default - no UAT files touched)
|
|
190
|
+
/rrr:verify-work --audit # explicit audit
|
|
191
|
+
/rrr:verify-work --uat 05 # interactive UAT for phase 05
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## 6. Common Scenarios
|
|
197
|
+
|
|
198
|
+
| Symptom | Command | Expected Outcome |
|
|
199
|
+
|---------|---------|------------------|
|
|
200
|
+
| "I don't know what to run next" | `/rrr:mvp` | Detects state, tells you exactly what to run |
|
|
201
|
+
| "My phase executed but progress looks wrong" | `/rrr:progress` | Shows actual completion; check for missing SUMMARYs |
|
|
202
|
+
| "Unknown command /rrr:*" | Exit Claude Code, run `claude` again | Commands reload from ~/.claude/ |
|
|
203
|
+
| "Verification failed" | `/rrr:fix-visual-failure` | Analyzes failure, suggests fixes |
|
|
204
|
+
| "No Playwright / no e2e setup" | `bash scripts/scaffold-e2e.sh` | Creates minimal Playwright config |
|
|
205
|
+
| "I'm in a backend-only repo" | Set `frontend_impact: false` in plans | Skips visual proof, runs unit tests only |
|
|
206
|
+
| "Brownfield audit found conflicts" | Review audit report, resolve manually | Then run `/rrr:new-project` |
|
|
207
|
+
| "Docs don't match code" | `/rrr:map-codebase` | Updates planning truth |
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
211
|
+
## 7. Pushpa Mode (Overnight Automation)
|
|
212
|
+
|
|
213
|
+
**What:** Runs phases automatically while you sleep.
|
|
214
|
+
|
|
215
|
+
**Commands:**
|
|
216
|
+
```bash
|
|
217
|
+
# Run in a SEPARATE terminal (not inside Claude Code)
|
|
218
|
+
bash scripts/pushpa-mode.sh
|
|
219
|
+
|
|
220
|
+
# Or via npm
|
|
221
|
+
npm run pushpa
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Safety:**
|
|
225
|
+
- Run in separate terminal
|
|
226
|
+
- Ensure tests pass first
|
|
227
|
+
- Review `.planning/PUSHPA_REPORT.md` in the morning
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
231
|
+
## 8. Quick Reference
|
|
232
|
+
|
|
233
|
+
| Command | When |
|
|
234
|
+
|---------|------|
|
|
235
|
+
| `/rrr:progress` | Daily compass — where am I, what's next |
|
|
236
|
+
| `/rrr:mvp` | Not sure what to run? Start here |
|
|
237
|
+
| `/rrr:brownfield-audit` | Scan existing repo before initializing |
|
|
238
|
+
| `/rrr:map-codebase` | Update planning truth when docs mismatch code |
|
|
239
|
+
| `/rrr:plan-phase <N>` | Create plans for phase N |
|
|
240
|
+
| `/rrr:execute-phase <N>` | Execute all plans in phase N |
|
|
241
|
+
| `/rrr:verify-work --audit` | Check implementation integrity |
|
|
242
|
+
| `/rrr:verify-work --uat` | Interactive testing (optional) |
|
|
243
|
+
| `/rrr:add-todo` | Capture ideas while working |
|
|
244
|
+
| `/rrr:help` | Full command reference |
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 9. External Skills (skills.sh Ecosystem)
|
|
249
|
+
|
|
250
|
+
RRR automatically installs and manages external skills from the skills.sh ecosystem.
|
|
251
|
+
|
|
252
|
+
### Where Skills Are Installed
|
|
253
|
+
|
|
254
|
+
| Platform | Location |
|
|
255
|
+
|----------|----------|
|
|
256
|
+
| macOS/Linux | `~/.claude/skills/` |
|
|
257
|
+
| Windows | `%USERPROFILE%\.claude\skills\` |
|
|
258
|
+
|
|
259
|
+
### What Gets Installed
|
|
260
|
+
|
|
261
|
+
On first global install (`npx projecta-rrr --global`), RRR bootstraps skills from:
|
|
262
|
+
- `vercel-labs/agent-skills` - React best practices, web design
|
|
263
|
+
- `expo/skills` - Expo/React Native UI, API routes, deployment
|
|
264
|
+
- `anthropics/skills` - MCP builder, frontend design, testing
|
|
265
|
+
- `vercel-labs/agent-browser` - Browser automation
|
|
266
|
+
- And more (see `projecta.defaults.json`)
|
|
267
|
+
|
|
268
|
+
### Updating External Skills
|
|
269
|
+
|
|
270
|
+
External skills are updated when you run:
|
|
271
|
+
```bash
|
|
272
|
+
npx projecta-rrr@latest --global
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
Updates are rate-limited (check every 24h by default).
|
|
276
|
+
|
|
277
|
+
### Disabling External Skills
|
|
278
|
+
|
|
279
|
+
Add to `projecta.defaults.json` in your project or `~/.claude/rrr/`:
|
|
280
|
+
```json
|
|
281
|
+
{
|
|
282
|
+
"external_skills": {
|
|
283
|
+
"enabled": false
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
### Finding External Skills
|
|
289
|
+
|
|
290
|
+
```bash
|
|
291
|
+
# macOS/Linux
|
|
292
|
+
ls ~/.claude/skills/
|
|
293
|
+
|
|
294
|
+
# Windows PowerShell
|
|
295
|
+
Get-ChildItem "$env:USERPROFILE\.claude\skills" | Select-Object Name
|
|
296
|
+
```
|