projecta-rrr 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/commands/rrr/help.md +5 -0
- package/package.json +1 -1
- package/scripts/pushpa-mode.sh +85 -5
package/README.md
CHANGED
|
@@ -77,6 +77,13 @@ npx projecta-rrr
|
|
|
77
77
|
|
|
78
78
|
That's it. Verify with `/rrr:help` inside your Claude Code interface.
|
|
79
79
|
|
|
80
|
+
> **Installed from inside Claude Code?** Slash commands won't load until you restart:
|
|
81
|
+
> 1. Type `exit` to quit Claude Code
|
|
82
|
+
> 2. Run `claude` again
|
|
83
|
+
> 3. Then run `/rrr:help`
|
|
84
|
+
>
|
|
85
|
+
> This resolves "Unknown skill: rrr:help" errors.
|
|
86
|
+
|
|
80
87
|
### Staying Updated
|
|
81
88
|
|
|
82
89
|
RRR evolves fast. Check for updates periodically:
|
|
@@ -276,6 +283,14 @@ Plans that require human verification should include one of these markers:
|
|
|
276
283
|
|
|
277
284
|
Pushpa Mode will skip these phases and record them in the report for manual follow-up.
|
|
278
285
|
|
|
286
|
+
**Where to run Pushpa Mode:**
|
|
287
|
+
- **Recommended:** Run in a normal system terminal (outside Claude Code) for true unattended overnight runs:
|
|
288
|
+
```bash
|
|
289
|
+
bash scripts/pushpa-mode.sh
|
|
290
|
+
```
|
|
291
|
+
- Running inside Claude Code works but can trigger approval prompts ("Do you want to proceed?").
|
|
292
|
+
- If the script detects Claude Code, it will prompt: `Continue running Pushpa Mode inside Claude Code? (y/N)` — default is **No** (recommended), so you can switch to an external terminal.
|
|
293
|
+
|
|
279
294
|
---
|
|
280
295
|
|
|
281
296
|
## How It Works
|
|
@@ -510,9 +525,10 @@ You're never locked in. The system adapts.
|
|
|
510
525
|
|
|
511
526
|
## Troubleshooting
|
|
512
527
|
|
|
513
|
-
**Commands not found after install?**
|
|
514
|
-
- Restart Claude Code
|
|
528
|
+
**Commands not found after install/update?**
|
|
529
|
+
- Restart Claude Code: type `exit`, then run `claude` again
|
|
515
530
|
- Verify files exist in `~/.claude/commands/rrr/` (global) or `./.claude/commands/rrr/` (local)
|
|
531
|
+
- Still seeing "Unknown skill"? Reinstall with `npx projecta-rrr@latest`, then restart `claude`
|
|
516
532
|
|
|
517
533
|
**Commands not working as expected?**
|
|
518
534
|
- Run `/rrr:help` to verify installation
|
package/commands/rrr/help.md
CHANGED
|
@@ -23,6 +23,8 @@ Output ONLY the reference content below. Do NOT add:
|
|
|
23
23
|
|
|
24
24
|
**After install/update:** If you installed from inside Claude Code, type `exit` and restart `claude` so it reloads commands.
|
|
25
25
|
|
|
26
|
+
**Still seeing "Unknown skill"?** Reinstall with `npx projecta-rrr@latest`, then restart `claude` again.
|
|
27
|
+
|
|
26
28
|
**Pick your start command:**
|
|
27
29
|
|
|
28
30
|
| Scenario | Command |
|
|
@@ -416,6 +418,9 @@ Pushpa Mode will:
|
|
|
416
418
|
- Generate report at `.planning/PUSHPA_REPORT.md`
|
|
417
419
|
- Log everything to `.planning/logs/`
|
|
418
420
|
|
|
421
|
+
**Where to run:** Recommended outside Claude Code for true unattended runs.
|
|
422
|
+
Running inside Claude Code may prompt for approvals; if prompted, type `y` to continue or exit and run in a normal terminal.
|
|
423
|
+
|
|
419
424
|
**Bootstrap only (no planning):**
|
|
420
425
|
|
|
421
426
|
```
|
package/package.json
CHANGED
package/scripts/pushpa-mode.sh
CHANGED
|
@@ -40,6 +40,61 @@ CYAN='\033[0;36m'
|
|
|
40
40
|
BOLD='\033[1m'
|
|
41
41
|
NC='\033[0m'
|
|
42
42
|
|
|
43
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
44
|
+
# Claude Code Detection
|
|
45
|
+
# ═══════════════════════════════════════════════════════════════════════════════
|
|
46
|
+
|
|
47
|
+
detect_claude_code() {
|
|
48
|
+
# Check env vars first
|
|
49
|
+
if [ -n "${CLAUDE:-}" ] || [ -n "${CLAUDE_CODE:-}" ]; then
|
|
50
|
+
return 0 # Likely Claude Code
|
|
51
|
+
fi
|
|
52
|
+
|
|
53
|
+
# Check parent process name (best effort, non-fatal)
|
|
54
|
+
local parent_name=""
|
|
55
|
+
parent_name=$(ps -o comm= -p "$PPID" 2>/dev/null || echo "")
|
|
56
|
+
if echo "$parent_name" | grep -qi "claude"; then
|
|
57
|
+
return 0 # Likely Claude Code
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
return 1 # Not Claude Code
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
check_claude_code_environment() {
|
|
64
|
+
if detect_claude_code; then
|
|
65
|
+
echo ""
|
|
66
|
+
echo -e "${YELLOW}════════════════════════════════════════════════════════════════${NC}"
|
|
67
|
+
echo -e "${YELLOW} ⚠️ Pushpa Mode is running inside Claude Code.${NC}"
|
|
68
|
+
echo -e "${YELLOW}════════════════════════════════════════════════════════════════${NC}"
|
|
69
|
+
echo ""
|
|
70
|
+
echo " This can trigger approval prompts (\"Do you want to proceed?\")"
|
|
71
|
+
echo " and may not be fully unattended."
|
|
72
|
+
echo ""
|
|
73
|
+
echo -e "${GREEN}✅ Recommended for true overnight autonomy:${NC}"
|
|
74
|
+
echo " Open a new system terminal (outside Claude Code) and run:"
|
|
75
|
+
echo -e " ${CYAN}bash scripts/pushpa-mode.sh${NC}"
|
|
76
|
+
echo ""
|
|
77
|
+
|
|
78
|
+
read -r -p "Continue running Pushpa Mode inside Claude Code? (y/N): " response
|
|
79
|
+
if [[ ! "$response" =~ ^[Yy]$ ]]; then
|
|
80
|
+
echo ""
|
|
81
|
+
echo "Exiting Pushpa Mode (recommended)."
|
|
82
|
+
echo "Run this outside Claude Code:"
|
|
83
|
+
echo -e " ${CYAN}bash scripts/pushpa-mode.sh${NC}"
|
|
84
|
+
echo ""
|
|
85
|
+
exit 0
|
|
86
|
+
fi
|
|
87
|
+
echo ""
|
|
88
|
+
echo -e "${YELLOW}Continuing inside Claude Code (user confirmed)...${NC}"
|
|
89
|
+
echo ""
|
|
90
|
+
else
|
|
91
|
+
echo -e "${GREEN}✅ Pushpa Mode running in standard terminal (recommended).${NC}"
|
|
92
|
+
fi
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
# Run Claude Code check immediately
|
|
96
|
+
check_claude_code_environment
|
|
97
|
+
|
|
43
98
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
44
99
|
# Logging
|
|
45
100
|
# ═══════════════════════════════════════════════════════════════════════════════
|
|
@@ -246,12 +301,23 @@ get_phases() {
|
|
|
246
301
|
}
|
|
247
302
|
|
|
248
303
|
# Check if phase has a plan
|
|
304
|
+
# Supports both integer phases (7 → 07-*) and decimal phases (7.1 → 07.1-*)
|
|
249
305
|
phase_has_plan() {
|
|
250
306
|
local phase="$1"
|
|
251
|
-
local
|
|
307
|
+
local phase_major="${phase%%.*}"
|
|
308
|
+
local phase_major_padded=$(printf "%02d" "$phase_major")
|
|
309
|
+
|
|
310
|
+
# For decimal phases (e.g., 7.1), build full padded pattern (07.1)
|
|
311
|
+
local search_pattern
|
|
312
|
+
if [[ "$phase" == *"."* ]]; then
|
|
313
|
+
local phase_full_padded="${phase_major_padded}.${phase#*.}"
|
|
314
|
+
search_pattern="*/${phase_full_padded}-*/*-PLAN.md"
|
|
315
|
+
else
|
|
316
|
+
search_pattern="*/${phase_major_padded}-*/*-PLAN.md"
|
|
317
|
+
fi
|
|
252
318
|
|
|
253
319
|
# Look for plan files in the phase directory
|
|
254
|
-
local plan_files=$(find "$PHASES_DIR" -path "
|
|
320
|
+
local plan_files=$(find "$PHASES_DIR" -path "$search_pattern" -type f 2>/dev/null | head -1)
|
|
255
321
|
|
|
256
322
|
if [ -n "$plan_files" ]; then
|
|
257
323
|
return 0
|
|
@@ -260,11 +326,22 @@ phase_has_plan() {
|
|
|
260
326
|
}
|
|
261
327
|
|
|
262
328
|
# Get plan files for a phase
|
|
329
|
+
# Supports both integer phases (7 → 07-*) and decimal phases (7.1 → 07.1-*)
|
|
263
330
|
get_phase_plans() {
|
|
264
331
|
local phase="$1"
|
|
265
|
-
local
|
|
332
|
+
local phase_major="${phase%%.*}"
|
|
333
|
+
local phase_major_padded=$(printf "%02d" "$phase_major")
|
|
334
|
+
|
|
335
|
+
# For decimal phases (e.g., 7.1), build full padded pattern (07.1)
|
|
336
|
+
local search_pattern
|
|
337
|
+
if [[ "$phase" == *"."* ]]; then
|
|
338
|
+
local phase_full_padded="${phase_major_padded}.${phase#*.}"
|
|
339
|
+
search_pattern="*/${phase_full_padded}-*/*-PLAN.md"
|
|
340
|
+
else
|
|
341
|
+
search_pattern="*/${phase_major_padded}-*/*-PLAN.md"
|
|
342
|
+
fi
|
|
266
343
|
|
|
267
|
-
find "$PHASES_DIR" -path "
|
|
344
|
+
find "$PHASES_DIR" -path "$search_pattern" -type f 2>/dev/null | sort
|
|
268
345
|
}
|
|
269
346
|
|
|
270
347
|
# Check if phase plan contains HITL marker
|
|
@@ -289,13 +366,16 @@ phase_requires_hitl() {
|
|
|
289
366
|
}
|
|
290
367
|
|
|
291
368
|
# Check if milestone is complete
|
|
369
|
+
# Only stops on strong, unambiguous markers (no false positives like "100%")
|
|
292
370
|
is_milestone_complete() {
|
|
293
|
-
local completion_markers=("MVP COMPLETE" "MILESTONE COMPLETE" "
|
|
371
|
+
local completion_markers=("MVP COMPLETE" "MILESTONE COMPLETE" "MISSION_ACCOMPLISHED")
|
|
294
372
|
|
|
295
373
|
for marker in "${completion_markers[@]}"; do
|
|
374
|
+
# Check STATE.md first (primary source of truth)
|
|
296
375
|
if grep -qi "$marker" "$STATE_FILE" 2>/dev/null; then
|
|
297
376
|
return 0
|
|
298
377
|
fi
|
|
378
|
+
# Then check ROADMAP.md
|
|
299
379
|
if grep -qi "$marker" "$ROADMAP_FILE" 2>/dev/null; then
|
|
300
380
|
return 0
|
|
301
381
|
fi
|