You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use `rp-cli -e 'describe <tool>'` for help on a specific tool, or `rp-cli --help` for CLI usage.
42
42
43
+
**⚠️ TIMEOUT WARNING:** The `builder` and `chat` commands can take several minutes to complete. When invoking rp-cli, **set your command timeout to at least 2700 seconds (45 minutes)** to avoid premature termination.
44
+
43
45
---
44
46
## The Workflow
45
47
48
+
0.**Verify workspace** – Confirm the target codebase is loaded
46
49
1.**Quick scan** – Understand how the task relates to the codebase
47
50
2.**Context builder** – Call `builder` with a clear prompt to get deep context + an architectural plan
48
51
3.**Refine with chat** – Use `chat` to clarify the plan if needed
@@ -53,26 +56,51 @@ Use `rp-cli -e 'describe <tool>'` for help on a specific tool, or `rp-cli --help
53
56
## CRITICAL REQUIREMENT
54
57
55
58
⚠️ **DO NOT START IMPLEMENTATION** until you have:
56
-
1. Completed Phase 1 (Quick Scan)
57
-
2.**Called `builder`** and received its plan
59
+
1. Completed Phase 0 (Workspace Verification)
60
+
2. Completed Phase 1 (Quick Scan)
61
+
3.**Called `builder`** and received its plan
58
62
59
63
Skipping `builder` results in shallow implementations that miss architectural patterns, related code, and edge cases. The quick scan alone is NOT sufficient for implementation.
60
64
61
65
---
62
66
67
+
## Phase 0: Workspace Verification (REQUIRED)
68
+
69
+
Before any exploration, confirm the target codebase is loaded:
70
+
71
+
```bash
72
+
# First, list available windows to find the right one
73
+
rp-cli -e 'windows'
74
+
75
+
# Then check roots in a specific window (REQUIRED - CLI cannot auto-bind)
76
+
rp-cli -w <window_id> -e 'tree --type roots'
77
+
```
78
+
79
+
**Check the output:**
80
+
- If your target root appears in a window → note the window ID and proceed to Phase 1
81
+
- If not → the codebase isn't loaded in any window
82
+
83
+
**CLI Window Routing (CRITICAL):**
84
+
- CLI invocations are stateless—you MUST pass `-w <window_id>` to target the correct window
85
+
- Use `rp-cli -e 'windows'` to list all open windows and their workspaces
86
+
- Always include `-w <window_id>` in ALL subsequent commands
87
+
- Without `-w`, commands may target the wrong workspace
Use `rp-cli -e 'describe <tool>'` for help on a specific tool, or `rp-cli --help` for CLI usage.
42
42
43
+
**⚠️ TIMEOUT WARNING:** The `builder` and `chat` commands can take several minutes to complete. When invoking rp-cli, **set your command timeout to at least 2700 seconds (45 minutes)** to avoid premature termination.
44
+
43
45
---
44
46
## Investigation Protocol
45
47
@@ -49,6 +51,27 @@ Use `rp-cli -e 'describe <tool>'` for help on a specific tool, or `rp-cli --help
49
51
3.**Question everything** - if something seems off, investigate it
50
52
4.**Use `builder` aggressively** - it's designed for deep exploration
51
53
54
+
### Phase 0: Workspace Verification (REQUIRED)
55
+
56
+
Before any investigation, confirm the target codebase is loaded:
57
+
58
+
```bash
59
+
# First, list available windows to find the right one
60
+
rp-cli -e 'windows'
61
+
62
+
# Then check roots in a specific window (REQUIRED - CLI cannot auto-bind)
63
+
rp-cli -w <window_id> -e 'tree --type roots'
64
+
```
65
+
66
+
**Check the output:**
67
+
- If your target root appears in a window → note the window ID and proceed to Phase 1
68
+
- If not → the codebase isn't loaded in any window
69
+
70
+
**CLI Window Routing (CRITICAL):**
71
+
- CLI invocations are stateless—you MUST pass `-w <window_id>` to target the correct window
72
+
- Use `rp-cli -e 'windows'` to list all open windows and their workspaces
73
+
- Always include `-w <window_id>` in ALL subsequent commands
74
+
52
75
### Phase 1: Initial Assessment
53
76
54
77
1. Read any provided files/reports (traces, logs, error reports)
@@ -62,7 +85,7 @@ Use `rp-cli -e 'describe <tool>'` for help on a specific tool, or `rp-cli --help
After `builder` returns, continue with targeted questions:
83
106
84
107
```bash
85
-
rp-cli -t '<tab_id>' -e 'chat "<specific follow-up based on findings>" --mode plan'
108
+
rp-cli -w <window_id> -t '<tab_id>' -e 'chat "<specific follow-up based on findings>" --mode plan'
86
109
```
87
110
88
-
> Pass `-t <tab_id>` to target the same tab across separate CLI invocations.
111
+
> Pass `-w <window_id>` to target the correct window and `-t <tab_id>` to target the same tab across separate CLI invocations.
89
112
90
113
### Phase 4: Evidence Gathering
91
114
@@ -156,12 +179,14 @@ Create a findings report as you investigate:
156
179
## Anti-patterns to Avoid
157
180
158
181
- 🚫 **CRITICAL:** Skipping `builder` and attempting to investigate by reading files manually – you'll miss critical context
182
+
- 🚫 Skipping Phase 0 (Workspace Verification) – you must confirm the target codebase is loaded first
159
183
- 🚫 Doing extensive exploration (5+ tool calls) before calling `builder` – initial assessment should be brief
160
184
- 🚫 Drawing conclusions before `builder` has built proper context
161
185
- 🚫 Reading many full files during Phase 1 – save deep reading for after `builder`
162
186
- 🚫 Assuming you understand the issue without systematic exploration via `builder`
163
187
- 🚫 Using only chat follow-ups without an initial `builder` call
188
+
- 🚫 **CLI:** Forgetting to pass `-w <window_id>` – CLI invocations are stateless and require explicit window targeting
164
189
165
190
---
166
191
167
-
Now begin the investigation. Read any provided context, then **immediately** use `builder` to start systematic exploration. Do not attempt manual exploration first.
192
+
Now begin the investigation. First run `rp-cli -e 'windows'` to find the correct window, then Read any provided context, then **immediately** use `builder` to start systematic exploration. Do not attempt manual exploration first.
0 commit comments