Commit 5898858
fix(cli): skip agent selector when AGENTS.md already exists (#937)
## Summary
- When running `vp migrate`, the agent selector prompt is now skipped if
agent instruction files (e.g. `AGENTS.md`, `CLAUDE.md`) already exist in
the project root
- Uses the existing `detectExistingAgentTargetPaths()` utility to check
for files before showing the interactive multiselect
- Adds an optional `projectRoot` parameter to `selectAgentTargetPaths()`
to enable detection without breaking existing callers
Fixes #903
## Test plan
- [ ] Run `vp migrate` in a project with an existing `AGENTS.md` — agent
selector prompt should be skipped
- [ ] Run `vp migrate` in a project without any agent files — agent
selector prompt should appear as before
- [ ] Run `vp migrate --no-agent` — should still skip agent setup
entirely
- [ ] Run `vp migrate --agent claude` — should still use the explicit
agent selection
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>1 parent 3782ae1 commit 5898858
1 file changed
Lines changed: 14 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
17 | 18 | | |
18 | 19 | | |
19 | 20 | | |
| |||
339 | 340 | | |
340 | 341 | | |
341 | 342 | | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | | - | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
348 | 356 | | |
349 | 357 | | |
350 | 358 | | |
| |||
0 commit comments