From 92218d528c5423c707b9a489249966975850f06b Mon Sep 17 00:00:00 2001 From: FragginWagon Date: Tue, 30 Jun 2026 17:28:32 -0400 Subject: [PATCH] Add maintain-copilot-history prompt for chat-driven history maintenance 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. --- .../maintain-copilot-history.prompt.md | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 resources/prompts/maintain-copilot-history.prompt.md diff --git a/resources/prompts/maintain-copilot-history.prompt.md b/resources/prompts/maintain-copilot-history.prompt.md new file mode 100644 index 0000000..24d7ab8 --- /dev/null +++ b/resources/prompts/maintain-copilot-history.prompt.md @@ -0,0 +1,31 @@ +--- +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= audit-dir= [execute=true] [before=] [keep-latest=] [filter=] [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/`