projecta-rrr 1.18.6 → 1.18.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/CHANGELOG.md +28 -0
- package/bin/install.js +0 -22
- package/commands/rrr/check-todos.md +0 -5
- package/commands/rrr/complete-milestone.md +0 -5
- package/commands/rrr/debug.md +0 -5
- package/commands/rrr/execute-phase.md +1 -3
- package/commands/rrr/execute-plan.md +1 -4
- package/commands/rrr/new-milestone.md +35 -67
- package/commands/rrr/pause-work.md +0 -5
- package/commands/rrr/plan-phase.md +1 -3
- package/commands/rrr/progress.md +2 -9
- package/commands/rrr/resume-work.md +1 -4
- package/commands/rrr/verify-work.md +1 -3
- package/docs/OHMPOSH-SETUP.md +4 -0
- package/docs/ohmyposh-config.md +3 -0
- package/hooks/rrr-intent-gate.sh +44 -21
- package/package.json +1 -1
- package/scripts/jarvis.sh +12 -217
- package/scripts/prepublish-check.js +0 -1
- package/scripts/test-install-smoke.js +0 -1
- package/hooks/rrr-sync-hud-state.sh +0 -192
- package/scripts/rrr-hud-dynamic.js +0 -574
- package/scripts/rrr-hud.js +0 -565
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,34 @@ All notable changes to RRR will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
|
|
6
6
|
|
|
7
|
+
## [1.18.8] - 2026-02-03
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **HUD scripts actually removed** - v1.18.7 said they were removed but files still existed
|
|
12
|
+
- Deleted `scripts/rrr-hud.js`, `scripts/rrr-hud-dynamic.js`, and `hooks/rrr-sync-hud-state.sh`
|
|
13
|
+
- These were stated as removed in v1.18.7 but only removed from being called, not physically deleted
|
|
14
|
+
- **Intent gate now works without HUD** - Reads directly from `.planning/STATE.md` instead of `hud-state.json`
|
|
15
|
+
- Fixes drift detection after HUD removal
|
|
16
|
+
- No longer depends on removed `rrr-sync-hud-state.sh` sync script
|
|
17
|
+
- **Version mismatch false positives** - Simplified version check in `/rrr:new-milestone`
|
|
18
|
+
- No longer compares package.json version (npm release) with milestone version (feature delivery)
|
|
19
|
+
- These are different things and don't need to match (0.1.0 working on v1.0 is valid)
|
|
20
|
+
- Only checks: does CHANGELOG match package.json?
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- **OhMyPosh docs deprecated** - Added warnings that automated sync no longer works
|
|
25
|
+
|
|
26
|
+
## [1.18.7] - 2026-02-03
|
|
27
|
+
|
|
28
|
+
### Removed
|
|
29
|
+
|
|
30
|
+
- **HUD script** - Removed `rrr-hud.js` and `rrr-hud-dynamic.js` from all workflows and installation
|
|
31
|
+
- Was silently failing due to broken require path after install
|
|
32
|
+
- Inline status updates (from v1.18.4) provide equivalent feedback
|
|
33
|
+
- Removed from 11 workflow files, install.js, smoke test, prepublish check
|
|
34
|
+
|
|
7
35
|
## [1.18.6] - 2026-02-01
|
|
8
36
|
|
|
9
37
|
### Fixed
|
package/bin/install.js
CHANGED
|
@@ -1119,28 +1119,6 @@ function install(isGlobal) {
|
|
|
1119
1119
|
console.log(` ${green}✓${reset} Installed rrr/scripts/handoff-preflight.js`);
|
|
1120
1120
|
}
|
|
1121
1121
|
|
|
1122
|
-
// PATCH-01: Copy rrr-hud.js to ~/.claude/rrr/scripts/
|
|
1123
|
-
// Visual HUD for project state display
|
|
1124
|
-
const hudSrc = path.join(src, 'scripts', 'rrr-hud.js');
|
|
1125
|
-
if (fs.existsSync(hudSrc)) {
|
|
1126
|
-
const scriptsDestDir = path.join(claudeDir, 'rrr', 'scripts');
|
|
1127
|
-
fs.mkdirSync(scriptsDestDir, { recursive: true });
|
|
1128
|
-
const hudDest = path.join(scriptsDestDir, 'rrr-hud.js');
|
|
1129
|
-
fs.copyFileSync(hudSrc, hudDest);
|
|
1130
|
-
console.log(` ${green}✓${reset} Installed rrr/scripts/rrr-hud.js`);
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
|
-
// PATCH-01: Copy rrr-hud-dynamic.js to ~/.claude/rrr/scripts/
|
|
1134
|
-
// Dynamic HUD state sync from RRR project files
|
|
1135
|
-
const hudDynamicSrc = path.join(src, 'scripts', 'rrr-hud-dynamic.js');
|
|
1136
|
-
if (fs.existsSync(hudDynamicSrc)) {
|
|
1137
|
-
const scriptsDestDir = path.join(claudeDir, 'rrr', 'scripts');
|
|
1138
|
-
fs.mkdirSync(scriptsDestDir, { recursive: true });
|
|
1139
|
-
const hudDynamicDest = path.join(scriptsDestDir, 'rrr-hud-dynamic.js');
|
|
1140
|
-
fs.copyFileSync(hudDynamicSrc, hudDynamicDest);
|
|
1141
|
-
console.log(` ${green}✓${reset} Installed rrr/scripts/rrr-hud-dynamic.js`);
|
|
1142
|
-
}
|
|
1143
|
-
|
|
1144
1122
|
// PATCH-01: Copy rrr-memory/ directory to ~/.claude/rrr/scripts/
|
|
1145
1123
|
// Memory store and state detector for proactive guidance
|
|
1146
1124
|
const rrrMemorySrc = path.join(src, 'scripts', 'rrr-memory');
|
|
@@ -23,11 +23,6 @@ Enables reviewing captured ideas and deciding what to work on next.
|
|
|
23
23
|
|
|
24
24
|
<process>
|
|
25
25
|
|
|
26
|
-
**Show HUD (first)**
|
|
27
|
-
```bash
|
|
28
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
29
|
-
```
|
|
30
|
-
|
|
31
26
|
<step name="check_exist">
|
|
32
27
|
```bash
|
|
33
28
|
TODO_COUNT=$(ls .planning/todos/pending/*.md 2>/dev/null | wc -l | tr -d ' ')
|
|
@@ -37,11 +37,6 @@ Output: Milestone archived (roadmap + requirements), PROJECT.md evolved, git tag
|
|
|
37
37
|
|
|
38
38
|
<process>
|
|
39
39
|
|
|
40
|
-
**Show HUD (first)**
|
|
41
|
-
```bash
|
|
42
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
40
|
**Follow complete-milestone.md workflow:**
|
|
46
41
|
|
|
47
42
|
0. **Check for audit:**
|
package/commands/rrr/debug.md
CHANGED
|
@@ -28,11 +28,6 @@ ls .planning/debug/*.md 2>/dev/null | grep -v resolved | head -5
|
|
|
28
28
|
|
|
29
29
|
<process>
|
|
30
30
|
|
|
31
|
-
**Show HUD (first)**
|
|
32
|
-
```bash
|
|
33
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
31
|
## 1. Check Active Sessions
|
|
37
32
|
|
|
38
33
|
If active sessions exist AND no $ARGUMENTS:
|
|
@@ -38,12 +38,10 @@ Phase: $ARGUMENTS
|
|
|
38
38
|
|
|
39
39
|
<process>
|
|
40
40
|
|
|
41
|
-
0. **
|
|
41
|
+
0. **Refresh scope cache (first)**
|
|
42
42
|
```bash
|
|
43
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
44
43
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
45
44
|
```
|
|
46
|
-
Cross-platform: works in PowerShell on Windows. Shows visual project state before execution.
|
|
47
45
|
|
|
48
46
|
1. **Validate phase exists**
|
|
49
47
|
- Use `find_phase_dir()` from phase-paths library to locate phase directory:
|
|
@@ -48,13 +48,10 @@ Plan path: $ARGUMENTS
|
|
|
48
48
|
|
|
49
49
|
<process>
|
|
50
50
|
|
|
51
|
-
0. **Refresh Scope Cache
|
|
51
|
+
0. **Refresh Scope Cache (first)**
|
|
52
52
|
```bash
|
|
53
53
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
54
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
55
54
|
```
|
|
56
|
-
Cross-platform: works in PowerShell on Windows. Path resolved to installed location.
|
|
57
|
-
Shows visual project state before execution.
|
|
58
55
|
|
|
59
56
|
0. **Track command in memory (before execution)**
|
|
60
57
|
Parse the plan to extract intent from frontmatter and context, then track this execution:
|
|
@@ -37,11 +37,6 @@ Milestone name: $ARGUMENTS (optional - will prompt if not provided)
|
|
|
37
37
|
|
|
38
38
|
<process>
|
|
39
39
|
|
|
40
|
-
**Show HUD (first)**
|
|
41
|
-
```bash
|
|
42
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
43
|
-
```
|
|
44
|
-
|
|
45
40
|
1. **Load context:**
|
|
46
41
|
- Read PROJECT.md (existing project, Validated requirements, decisions)
|
|
47
42
|
- Read MILESTONES.md (what shipped previously)
|
|
@@ -113,83 +108,56 @@ node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
|
113
108
|
**If no patches (PATCH_COUNT = 0 or file doesn't exist):**
|
|
114
109
|
- Skip silently, continue to step 1.5
|
|
115
110
|
|
|
116
|
-
1.5. **Version consistency check (
|
|
111
|
+
1.5. **Version consistency check (SIMPLIFIED):**
|
|
117
112
|
|
|
118
|
-
|
|
113
|
+
Verify CHANGELOG matches package.json (if CHANGELOG exists).
|
|
119
114
|
|
|
120
115
|
**Important context:**
|
|
121
|
-
- `package.json`
|
|
122
|
-
-
|
|
123
|
-
-
|
|
116
|
+
- `package.json` version = npm release version (e.g., 0.1.0)
|
|
117
|
+
- Milestone version = feature delivery version (e.g., v1.0)
|
|
118
|
+
- These are DIFFERENT and don't need to match!
|
|
119
|
+
- Only check: does CHANGELOG match package.json?
|
|
124
120
|
|
|
125
121
|
```bash
|
|
126
|
-
# Read
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
122
|
+
# Read package.json version
|
|
123
|
+
PKG_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "")
|
|
124
|
+
|
|
125
|
+
# Read CHANGELOG version (first entry)
|
|
126
|
+
if [ -f "CHANGELOG.md" ]; then
|
|
127
|
+
CHANGELOG_VERSION=$(grep -E "^## \[[0-9]" CHANGELOG.md 2>/dev/null | head -1 | sed 's/## \[\([^]]*\)\].*/\1/')
|
|
128
|
+
|
|
129
|
+
if [ -n "$CHANGELOG_VERSION" ] && [ "$PKG_VERSION" != "$CHANGELOG_VERSION" ]; then
|
|
130
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
131
|
+
echo "VERSION MISMATCH DETECTED"
|
|
132
|
+
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
|
|
133
|
+
echo "package.json: $PKG_VERSION"
|
|
134
|
+
echo "CHANGELOG.md: $CHANGELOG_VERSION"
|
|
135
|
+
echo ""
|
|
136
|
+
echo "CHANGELOG should match package.json for release tracking."
|
|
137
|
+
# Ask user if they want to fix this or continue
|
|
138
|
+
fi
|
|
139
|
+
else
|
|
140
|
+
echo "No CHANGELOG.md found - skipping version check"
|
|
141
|
+
fi
|
|
137
142
|
```
|
|
138
143
|
|
|
139
|
-
**Version mismatch detection:**
|
|
140
|
-
|
|
141
|
-
Extract major.minor from canonical version and compare:
|
|
142
|
-
- If CHANGELOG major.minor != canonical major.minor → MISMATCH
|
|
143
|
-
- If planning docs reference different milestone version → MISMATCH
|
|
144
|
-
|
|
145
144
|
**If mismatch detected:**
|
|
146
145
|
|
|
147
|
-
```
|
|
148
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
149
|
-
VERSION SYNC NEEDED
|
|
150
|
-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
151
|
-
|
|
152
|
-
Canonical (package.json): {CANONICAL_VERSION}
|
|
153
|
-
CHANGELOG.md: {CHANGELOG_VERSION}
|
|
154
|
-
Planning docs: {ROADMAP_VERSION}
|
|
155
|
-
|
|
156
|
-
This is normal after updates. Auto-fix will sync docs to package.json.
|
|
157
|
-
```
|
|
158
|
-
|
|
159
146
|
Use AskUserQuestion:
|
|
160
147
|
- header: "Version"
|
|
161
|
-
- question: "
|
|
148
|
+
- question: "CHANGELOG version doesn't match package.json. Fix this?"
|
|
162
149
|
- options:
|
|
163
|
-
- "
|
|
164
|
-
- "
|
|
165
|
-
- "Continue anyway" — Proceed with mismatched versions (documentation debt)
|
|
166
|
-
- "Abort" — Cancel milestone creation
|
|
167
|
-
|
|
168
|
-
**If "Auto-fix now (Recommended)":**
|
|
169
|
-
- Update CHANGELOG.md with [Unreleased] header if needed
|
|
170
|
-
- Update planning docs milestone references to match canonical
|
|
171
|
-
- Continue to step 2
|
|
172
|
-
|
|
173
|
-
**If "Run /rrr:check-version":**
|
|
174
|
-
```
|
|
175
|
-
Note: /rrr:check-version compares package.json against the npm registry.
|
|
176
|
-
This is useful for checking publish status, but won't fix documentation drift.
|
|
177
|
-
You may still need to run "Auto-fix now" after.
|
|
150
|
+
- "Yes, update CHANGELOG (Recommended)" — Update CHANGELOG to match package.json
|
|
151
|
+
- "No, continue anyway" — Proceed with mismatch (can fix later with /rrr:check-version)
|
|
178
152
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
**If "Continue anyway":**
|
|
184
|
-
```
|
|
185
|
-
Continuing with version mismatch. This creates documentation debt.
|
|
186
|
-
Consider running `/rrr:new-milestone` again later with "Auto-fix now" to sync versions.
|
|
187
|
-
```
|
|
188
|
-
Continue to step 2.
|
|
153
|
+
**If "Yes, update CHANGELOG":**
|
|
154
|
+
- Add/update CHANGELOG entry to match package.json version
|
|
155
|
+
- Continue to step 2
|
|
189
156
|
|
|
190
|
-
**If "
|
|
157
|
+
**If "No, continue anyway":**
|
|
158
|
+
- Continue to step 2 (user can fix later)
|
|
191
159
|
|
|
192
|
-
**If
|
|
160
|
+
**If no mismatch:** Continue to step 2.
|
|
193
161
|
|
|
194
162
|
2. **Gather milestone goals:**
|
|
195
163
|
|
|
@@ -19,11 +19,6 @@ Enables seamless resumption in fresh session with full context restoration.
|
|
|
19
19
|
|
|
20
20
|
<process>
|
|
21
21
|
|
|
22
|
-
**Show HUD (first)**
|
|
23
|
-
```bash
|
|
24
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
25
|
-
```
|
|
26
|
-
|
|
27
22
|
<step name="detect">
|
|
28
23
|
Find current phase directory from most recently modified files.
|
|
29
24
|
</step>
|
|
@@ -91,12 +91,10 @@ Use Glob tool with both structures:
|
|
|
91
91
|
|
|
92
92
|
<process>
|
|
93
93
|
|
|
94
|
-
0. **
|
|
94
|
+
0. **Refresh scope cache (first)**
|
|
95
95
|
```bash
|
|
96
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
97
96
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
98
97
|
```
|
|
99
|
-
Cross-platform: works in PowerShell on Windows. Shows visual context before planning.
|
|
100
98
|
|
|
101
99
|
## 1. Validate Environment (Cross-Platform)
|
|
102
100
|
|
package/commands/rrr/progress.md
CHANGED
|
@@ -24,20 +24,13 @@ Provides situational awareness before continuing work.
|
|
|
24
24
|
<process>
|
|
25
25
|
|
|
26
26
|
<step name="refresh_cache">
|
|
27
|
-
**Refresh Scope Cache
|
|
27
|
+
**Refresh Scope Cache (first, before any reads):**
|
|
28
28
|
|
|
29
|
-
**On macOS/Linux:**
|
|
30
29
|
```bash
|
|
31
30
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
32
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
33
31
|
```
|
|
34
32
|
|
|
35
|
-
|
|
36
|
-
Same commands work in PowerShell. If Node unavailable, skip silently.
|
|
37
|
-
|
|
38
|
-
**Note:** Paths resolve to installed location (e.g., `$HOME/.claude/` or `./.claude/`).
|
|
39
|
-
|
|
40
|
-
This ensures SCOPE_CACHE.md is current and shows visual HUD before displaying status.
|
|
33
|
+
Cross-platform: works in PowerShell on Windows. Ensures SCOPE_CACHE.md is current.
|
|
41
34
|
</step>
|
|
42
35
|
|
|
43
36
|
<step name="verify">
|
|
@@ -27,15 +27,12 @@ Routes to the resume-project workflow which handles:
|
|
|
27
27
|
|
|
28
28
|
<process>
|
|
29
29
|
|
|
30
|
-
**0.
|
|
30
|
+
**0. Refresh scope cache (first)**
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
34
33
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
35
34
|
```
|
|
36
35
|
|
|
37
|
-
Cross-platform: works in PowerShell on Windows. Shows visual project state on resume.
|
|
38
|
-
|
|
39
36
|
**Follow the resume-project workflow** from `@~/.claude/rrr/workflows/resume-project.md`.
|
|
40
37
|
|
|
41
38
|
The workflow handles all resumption logic including:
|
|
@@ -76,12 +76,10 @@ Validate built features through **audit mode by default**, or interactive UAT wi
|
|
|
76
76
|
|
|
77
77
|
<process>
|
|
78
78
|
|
|
79
|
-
0. **
|
|
79
|
+
0. **Refresh scope cache (first)**
|
|
80
80
|
```bash
|
|
81
|
-
node ~/.claude/rrr/scripts/rrr-hud.js 2>/dev/null || echo "HUD skipped"
|
|
82
81
|
node ~/.claude/rrr/scripts/refresh-scope-cache.js 2>/dev/null || echo "Cache refresh skipped"
|
|
83
82
|
```
|
|
84
|
-
Cross-platform: works in PowerShell on Windows. Shows visual project state and drift before verification.
|
|
85
83
|
|
|
86
84
|
</process>
|
|
87
85
|
|
package/docs/OHMPOSH-SETUP.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# OhMyPosh HUD Setup Guide
|
|
2
2
|
|
|
3
|
+
> **⚠️ DEPRECATED**: As of v1.18.7, the automated HUD sync scripts have been removed.
|
|
4
|
+
> This integration requires manual state updates via `rrr-state-manager.js`.
|
|
5
|
+
> Consider using inline status updates instead (built into RRR v1.18.4+).
|
|
6
|
+
|
|
3
7
|
This guide explains how to set up the RRR HUD using OhMyPosh with **Kushal theme** styling (recommended) or Atomic theme.
|
|
4
8
|
|
|
5
9
|
## Theme Options
|
package/docs/ohmyposh-config.md
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
# OhMyPosh Integration for RRR HUD
|
|
2
2
|
|
|
3
|
+
> **⚠️ DEPRECATED**: As of v1.18.7, automated HUD sync scripts have been removed.
|
|
4
|
+
> OhMyPosh integration requires manual state updates. Use RRR's inline status display instead.
|
|
5
|
+
|
|
3
6
|
Display RRR context (intent, drift status, session duration) in your terminal prompt using OhMyPosh.
|
|
4
7
|
|
|
5
8
|
## Prerequisites
|
package/hooks/rrr-intent-gate.sh
CHANGED
|
@@ -20,8 +20,8 @@ fi
|
|
|
20
20
|
# SKIP CONDITIONS - Let these through without gate
|
|
21
21
|
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
22
22
|
|
|
23
|
-
# Skip empty or very short messages (
|
|
24
|
-
[[ -z "$USER_MESSAGE" || ${#USER_MESSAGE} -lt
|
|
23
|
+
# Skip empty or very short messages (5 chars catches "add X", "fix Y", etc.)
|
|
24
|
+
[[ -z "$USER_MESSAGE" || ${#USER_MESSAGE} -lt 5 ]] && exit 0
|
|
25
25
|
|
|
26
26
|
# Skip slash commands (already intentional)
|
|
27
27
|
[[ "$USER_MESSAGE" == /* ]] && exit 0
|
|
@@ -39,22 +39,44 @@ echo "$msg_lower" | grep -qE "^(what|why|how|where|when|which|can you explain|ex
|
|
|
39
39
|
echo "$msg_lower" | grep -qE "\?$" && exit 0
|
|
40
40
|
|
|
41
41
|
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
42
|
-
# CHECK STATE -
|
|
42
|
+
# CHECK STATE - Read directly from .planning/ files
|
|
43
43
|
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
# Find RRR project root (look for .planning directory)
|
|
46
|
+
RRR_PROJECT=""
|
|
47
|
+
current_dir="$(pwd)"
|
|
48
|
+
for i in 0 1 2 3 4 5; do
|
|
49
|
+
if [ -d ".planning" ]; then
|
|
50
|
+
RRR_PROJECT="$(pwd)"
|
|
51
|
+
break
|
|
52
|
+
fi
|
|
53
|
+
cd .. 2>/dev/null || break
|
|
54
|
+
done
|
|
55
|
+
cd "$current_dir" 2>/dev/null
|
|
56
|
+
|
|
57
|
+
# Not in an RRR project - skip gate
|
|
58
|
+
[[ -z "$RRR_PROJECT" ]] && exit 0
|
|
59
|
+
|
|
60
|
+
# Check STATE.md for active work
|
|
61
|
+
STATE_FILE="${RRR_PROJECT}/.planning/STATE.md"
|
|
62
|
+
if [ -f "$STATE_FILE" ]; then
|
|
63
|
+
# Extract current position from STATE.md
|
|
64
|
+
milestone=$(grep -E "^Milestone:" "$STATE_FILE" 2>/dev/null | sed 's/Milestone:[[:space:]]*//' | tr -d '\r\n' || echo "")
|
|
65
|
+
phase=$(grep -E "^Phase:" "$STATE_FILE" 2>/dev/null | sed 's/Phase:[[:space:]]*//' | tr -d '\r\n' || echo "")
|
|
66
|
+
plan=$(grep -E "^Plan:" "$STATE_FILE" 2>/dev/null | sed 's/Plan:[[:space:]]*//' | tr -d '\r\n' || echo "")
|
|
67
|
+
status=$(grep -E "^Status:" "$STATE_FILE" 2>/dev/null | sed 's/Status:[[:space:]]*//' | tr -d '\r\n' || echo "")
|
|
68
|
+
else
|
|
69
|
+
milestone=""
|
|
70
|
+
phase=""
|
|
71
|
+
plan=""
|
|
72
|
+
status=""
|
|
73
|
+
fi
|
|
52
74
|
|
|
53
|
-
# If we have an active plan, let through
|
|
54
|
-
[[ -n "$plan" && "$plan" != "null" ]] && exit 0
|
|
75
|
+
# If we have an active plan (not "—" or empty), let through
|
|
76
|
+
[[ -n "$plan" && "$plan" != "—" && "$plan" != "null" ]] && exit 0
|
|
55
77
|
|
|
56
|
-
# If status
|
|
57
|
-
|
|
78
|
+
# If status contains "Executing", let through
|
|
79
|
+
echo "$status" | grep -qi "executing" && exit 0
|
|
58
80
|
|
|
59
81
|
# ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
60
82
|
# DETECT WORK REQUESTS - Only gate substantial work
|
|
@@ -67,18 +89,19 @@ if echo "$msg_lower" | grep -qiE "$work_patterns"; then
|
|
|
67
89
|
echo ""
|
|
68
90
|
echo "<MANDATORY-INTENT-GATE>"
|
|
69
91
|
echo ""
|
|
70
|
-
echo "
|
|
92
|
+
echo "⚠️ DRIFT DETECTED: Work request without active plan"
|
|
71
93
|
echo ""
|
|
72
|
-
echo " Current: ${milestone:-no milestone} / ${phase:-no phase} / ${plan
|
|
73
|
-
echo " Status: ${status:-
|
|
94
|
+
echo " Current: ${milestone:-no milestone} / ${phase:-no phase} / ${plan:-—}"
|
|
95
|
+
echo " Status: ${status:-Defining requirements}"
|
|
74
96
|
echo ""
|
|
75
|
-
echo "
|
|
97
|
+
echo "Where should this work be tracked?"
|
|
76
98
|
echo ""
|
|
77
|
-
echo " 1
|
|
78
|
-
echo " 2
|
|
79
|
-
echo " 3
|
|
99
|
+
echo " 1. /rrr:plan-phase - Create a tracked phase"
|
|
100
|
+
echo " 2. /rrr:add-todo - Save to backlog"
|
|
101
|
+
echo " 3. Type 'adhoc' - Quick fix (untracked)"
|
|
80
102
|
echo ""
|
|
81
103
|
echo "</MANDATORY-INTENT-GATE>"
|
|
104
|
+
echo ""
|
|
82
105
|
exit 1 # BLOCK until user classifies
|
|
83
106
|
fi
|
|
84
107
|
|
package/package.json
CHANGED