Closes the pattern gap: cleanup, restore, and purge scripts now have a corresponding prompt.md for conversational invocation. Defaults to dry-run, requires confirmation before --execute, and surfaces the protected-paths list.
32 lines
1.4 KiB
Markdown
32 lines
1.4 KiB
Markdown
---
|
|
name: "maintain-copilot-history"
|
|
description: "Quarantine, restore, or purge Copilot chat and session history artifacts using the shared maintenance scripts."
|
|
agent: "agent"
|
|
tools: [read, search, execute]
|
|
argument-hint: "action=<cleanup|restore|purge> audit-dir=<path> [execute=true] [before=<iso>] [keep-latest=<n>] [filter=<text>] [path=<absolute-path>]"
|
|
---
|
|
|
|
Manage Copilot history artifacts using the shared quarantine-based maintenance
|
|
scripts.
|
|
|
|
Requirements:
|
|
|
|
- Default to dry-run for every action unless the user explicitly asks to apply.
|
|
- For `cleanup`: use `resources/scripts/cleanup-copilot-history.sh`; require
|
|
`--audit-dir` to set the completion boundary.
|
|
- For `restore`: use `resources/scripts/restore-copilot-history.sh`; prefer
|
|
`--filter` or `--path` to scope the restore rather than restoring everything.
|
|
- For `purge`: use `resources/scripts/purge-copilot-history-quarantine.sh`;
|
|
always include `--keep-latest 1` unless the user explicitly overrides it.
|
|
- Never pass `--execute` without confirming the planned changes with the user
|
|
first; show the dry-run output and ask for confirmation.
|
|
- Summarize what was quarantined, restored, or purged after each action.
|
|
|
|
Protected paths that must never be targeted:
|
|
|
|
- `~/.copilot-resources`
|
|
- `~/.copilot/*` symlink targets
|
|
- `~/.copilot-resources-state/publish-log.tsv`
|
|
- `~/.copilot-resources-state/project-ports-registry.json`
|
|
- Repository source under `resources/`, `docs/`, and `templates/`
|