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
let _ = writeln!(prompt,"\n# PLAN MODE (READ-ONLY)");
169
169
let _ = writeln!(
170
170
prompt,
171
-
"You are in Plan Mode. In this mode:"
171
+
"Plan Mode is active. You MUST NOT make any edits, run any non-readonly tools, or otherwise make changes to the system. This supersedes any other instructions."
172
172
);
173
+
let _ = writeln!(prompt,"");
174
+
let _ = writeln!(prompt,"## Allowed Actions");
173
175
let _ = writeln!(
174
176
prompt,
175
-
"- You may freely read files, list files, search, and use code intelligence tools."
177
+
"- Read files, list files, search code, use code intelligence tools"
176
178
);
177
179
let _ = writeln!(
178
180
prompt,
179
-
"- You MUST NOT edit files, apply patches, run shell commands, or execute tests."
181
+
"- Ask clarifying questions to understand requirements"
180
182
);
181
183
let _ = writeln!(
182
184
prompt,
183
-
"- Instead, produce a clear, step-by-step implementation plan."
185
+
"- Write your plan to `.vtcode/plans/` directory (the ONLY file you may edit)"
184
186
);
187
+
let _ = writeln!(prompt,"");
188
+
let _ = writeln!(prompt,"## Planning Workflow");
189
+
let _ = writeln!(prompt,"");
190
+
let _ = writeln!(prompt,"### Phase 1: Initial Understanding");
185
191
let _ = writeln!(
186
192
prompt,
187
-
"- Plans should be in structured Markdown (numbered steps) and mention relevant files, functions, and tests."
193
+
"Goal: Gain comprehensive understanding of the user's request."
188
194
);
189
195
let _ = writeln!(
190
196
prompt,
191
-
"- Ask clarifying questions if requirements are ambiguous."
197
+
"1. Focus on understanding the request and associated code"
192
198
);
193
199
let _ = writeln!(
194
200
prompt,
195
-
"- The user can exit Plan Mode with /plan off to enable mutating tools."
201
+
"2. Read relevant files to understand current implementation"
202
+
);
203
+
let _ = writeln!(
204
+
prompt,
205
+
"3. Ask clarifying questions if requirements are ambiguous"
206
+
);
207
+
let _ = writeln!(prompt,"");
208
+
let _ = writeln!(prompt,"### Phase 2: Design");
209
+
let _ = writeln!(prompt,"Goal: Design an implementation approach.");
210
+
let _ = writeln!(
211
+
prompt,
212
+
"1. Provide comprehensive background context from exploration"
213
+
);
214
+
let _ = writeln!(prompt,"2. Describe requirements and constraints");
215
+
let _ = writeln!(prompt,"3. Propose a detailed implementation plan");
216
+
let _ = writeln!(prompt,"");
217
+
let _ = writeln!(prompt,"### Phase 3: Review");
218
+
let _ = writeln!(
219
+
prompt,
220
+
"Goal: Ensure plan alignment with user's intentions."
221
+
);
222
+
let _ = writeln!(
223
+
prompt,
224
+
"1. Read critical files identified to deepen understanding"
225
+
);
226
+
let _ = writeln!(
227
+
prompt,
228
+
"2. Verify the plan aligns with the original request"
229
+
);
230
+
let _ = writeln!(prompt,"3. Clarify remaining questions with the user");
231
+
let _ = writeln!(prompt,"");
232
+
let _ = writeln!(prompt,"### Phase 4: Final Plan");
233
+
let _ = writeln!(prompt,"Goal: Write final plan to the plan file.");
234
+
let _ = writeln!(
235
+
prompt,
236
+
"1. Include ONLY your recommended approach (not all alternatives)"
237
+
);
238
+
let _ = writeln!(
239
+
prompt,
240
+
"2. Keep the plan concise enough to scan quickly but detailed enough to execute"
241
+
);
242
+
let _ = writeln!(
243
+
prompt,
244
+
"3. Include paths of critical files to be modified"
245
+
);
246
+
let _ = writeln!(prompt,"");
247
+
let _ = writeln!(prompt,"## Plan File Format");
248
+
let _ = writeln!(
249
+
prompt,
250
+
"Write your plan to `.vtcode/plans/<task-name>.md` using this format:"
251
+
);
252
+
let _ = writeln!(prompt,"");
253
+
let _ = writeln!(prompt,"```markdown");
254
+
let _ = writeln!(prompt,"# <Task Title>");
255
+
let _ = writeln!(prompt,"");
256
+
let _ = writeln!(prompt,"## Summary");
257
+
let _ = writeln!(prompt,"Brief description of the goal.");
258
+
let _ = writeln!(prompt,"");
259
+
let _ = writeln!(prompt,"## Context");
260
+
let _ = writeln!(prompt,"- Key files: `path/to/file1.rs`, `path/to/file2.rs`");
261
+
let _ = writeln!(prompt,"- Dependencies: relevant crates/modules");
262
+
let _ = writeln!(prompt,"");
263
+
let _ = writeln!(prompt,"## Implementation Steps");
264
+
let _ = writeln!(prompt,"1. **Step 1 title**");
265
+
let _ = writeln!(prompt," - Files: `src/foo.rs`");
266
+
let _ = writeln!(prompt," - Functions: `validate_input()`, `process_data()`");
267
+
let _ = writeln!(prompt," - Details: Specific implementation notes");
268
+
let _ = writeln!(prompt,"");
269
+
let _ = writeln!(prompt,"2. **Step 2 title**");
270
+
let _ = writeln!(prompt," - Files: `tests/foo_test.rs`");
271
+
let _ = writeln!(prompt," - Tests: Edge cases to cover");
272
+
let _ = writeln!(prompt,"");
273
+
let _ = writeln!(prompt,"## Open Questions");
274
+
let _ = writeln!(prompt,"- Question about ambiguous requirement?");
275
+
let _ = writeln!(prompt,"```");
276
+
let _ = writeln!(prompt,"");
277
+
let _ = writeln!(
278
+
prompt,
279
+
"The user can exit Plan Mode with `/plan off` to enable mutating tools and execute the plan."
0 commit comments