Files
gps-denied-desktop/.cursor/commands/4.development/save-plan.md
T
2025-12-05 15:49:34 +02:00

74 lines
1.6 KiB
Markdown

---
title: "Save Plan — /save-plan"
category: "planning"
tags:
- planning
- documentation
version: "1.0"
description: "Save the current in-memory plan to disk mirroring the spec structure."
---
# /save-plan — Save Plan to Disk
Save the current in-memory plan to disk (mirroring spec structure under `docs/plans/`).
---
## Syntax
```bash
/save-plan --spec @<original-spec-path>
```
- `--spec @<original-spec-path>` (required): Original spec path to mirror structure
---
## Behavior
1) Read the current in-memory plan from Cursor's Plan mode.
2) Determine output path by mirroring the spec's subpath:
- Spec: `docs/specs/<subpath>/<filename>.md`
- Plan: `docs/plans/<subpath>/<filename>.md`
3) Ensure parent directories exist; write the plan atomically.
4) Return saved plan path.
---
## Prerequisites
- Cursor is in Plan mode with an active plan
- Original spec exists at the provided path
---
## Usage
After generating a plan in Plan mode:
```bash
/save-plan --spec @docs/specs/888568-language-content-service-implementation-execute/920755-export-to-excel-backend-frontend-and-filters.md
```
This writes plan to: `docs/plans/888568-language-content-service-implementation-execute/920755-export-to-excel-backend-frontend-and-filters.md`
---
## Example
Command:
```bash
/save-plan --spec @docs/specs/924274-jadx-test/924326-dashboard-export-to-excel.md
```
Result:
- Plan saved to `docs/plans/924274-jadx-test/924326-dashboard-export-to-excel.md`
---
## Notes
- Only works when a plan exists in memory (Plan mode)
- If plan file already exists, it's overwritten
- Preserves the original plan structure and todos as-is