Summary
Create an automation script for the skill at .github/skills/dev/planning/cleanup-completed-issues/SKILL.md to reduce manual work and mistakes when cleaning completed issues.
The script should support the two-stage lifecycle already documented:
- Stage 1: move closed issue specs from
docs/issues/open/ to docs/issues/closed/
- Stage 2: delete old specs from
docs/issues/closed/ only when no longer referenced
Motivation
The current process is repetitive and easy to get wrong in batch operations.
Automating it would make maintenance faster and safer while keeping behavior aligned with the skill.
Proposed scope (phase 1)
Implement a script for Stage 1 archive with a strict, agent-friendly interface:
- Non-interactive CLI only (no prompts)
- Verify issue state on GitHub before moving
- Support dry run by default
- Support apply mode for real changes
- Produce structured JSON on stdout
- Send diagnostics to stderr
- Return meaningful non-zero exit codes on failure
Suggested flags:
--issues 1042,1178,...
--all-closed-in-open (optional)
--dry-run (default)
--apply
--json
Proposed scope (phase 2)
Add Stage 2 delete with stronger safeguards:
- Check references before delete (filename and issue references in docs)
- Refuse deletion if references are found unless explicit override is provided
- Keep
--dry-run default and require explicit confirmation flag for destructive actions
Acceptance criteria
Notes
Reference guidance used for script design:
Key recommendations to follow:
- avoid interactive prompts
- provide clear
--help
- use structured output
- separate stdout data from stderr diagnostics
- use safe defaults (
--dry-run)
- support idempotent retries
Summary
Create an automation script for the skill at
.github/skills/dev/planning/cleanup-completed-issues/SKILL.mdto reduce manual work and mistakes when cleaning completed issues.The script should support the two-stage lifecycle already documented:
docs/issues/open/todocs/issues/closed/docs/issues/closed/only when no longer referencedMotivation
The current process is repetitive and easy to get wrong in batch operations.
Automating it would make maintenance faster and safer while keeping behavior aligned with the skill.
Proposed scope (phase 1)
Implement a script for Stage 1 archive with a strict, agent-friendly interface:
Suggested flags:
--issues 1042,1178,...--all-closed-in-open(optional)--dry-run(default)--apply--jsonProposed scope (phase 2)
Add Stage 2 delete with stronger safeguards:
--dry-rundefault and require explicit confirmation flag for destructive actionsAcceptance criteria
scripts/)SKILL.mddocuments the script(s), usage, examples, and prerequisitesNotes
Reference guidance used for script design:
Key recommendations to follow:
--help--dry-run)