kramme-cc-workflow/skills/kramme:siw:issue-reindex/SKILL.md
Remove all DONE issues and renumber remaining issues within each prefix group. Not for editing live issue content, archiving still-open issues, or moving issues between prefix groups.
npx skillsauth add abildtoft/kramme-cc-workflow kramme:siw:issue-reindexInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Remove all DONE issues and renumber remaining issues within each prefix group. This command:
Use this when you want to clean up completed issues and have fresh numbering sequences within each group.
Parse $ARGUMENTS before Step 1. If --auto is present, set AUTO_MODE=true. --auto includes all prefix groups, skips the final confirmation prompt, and proceeds only when deletion is recoverable through trash, SIW files are clean, spec-capture verification has no required user decision, and every DONE issue resolves to exactly one file.
Important: Issues are renumbered within their own prefix group. Phase groupings remain intact.
/kramme:siw:issue-reindex
|
v
[Find SIW files] -> Not found? -> Show error, abort
|
v
[Parse siw/OPEN_ISSUES_OVERVIEW.md] -> Extract all issues with statuses
|
v
[Identify DONE issues] -> List for deletion
|
v
[Identify remaining issues] -> Calculate new numbers per prefix group
|
v
[Confirm with user] -> Show what will happen
|
v
[Verify spec capture] -> Check DONE issues + LOG.md entries against specs
|
v
[Delete DONE issue files]
|
v
[Rename remaining issue files] -> Renumber within each prefix (G-003 -> G-001, P1-004 -> P1-002)
|
v
[Update siw/OPEN_ISSUES_OVERVIEW.md] -> New numbers, remove DONE rows
|
v
[Update siw/LOG.md] -> Update issue references to new numbers
|
v
[Report results]
Check for required SIW files:
ls siw/OPEN_ISSUES_OVERVIEW.md siw/issues/ 2> /dev/null
If siw/OPEN_ISSUES_OVERVIEW.md doesn't exist:
No siw/OPEN_ISSUES_OVERVIEW.md found. Nothing to reindex.
To initialize a new SIW workflow, run /kramme:siw:init
Action: Abort.
If AUTO_MODE=true, run:
git status --porcelain -- siw/OPEN_ISSUES_OVERVIEW.md siw/LOG.md siw/issues/ 2> /dev/null
command -v trash
If any SIW path is dirty, stop with MISSING REQUIREMENT: SIW workflow files have uncommitted changes; rerun without --auto to review them. If trash is unavailable, stop with MISSING REQUIREMENT: trash is required for --auto reindex so DONE issue deletion is recoverable.
If siw/issues/ directory doesn't exist or is empty:
No issues found. Nothing to reindex.
To create issues, run /kramme:siw:issue-define
Action: Abort.
Read siw/OPEN_ISSUES_OVERVIEW.md section-by-section and extract all issues from the table.
For each section, extract:
| # | Title | Status | Size | Priority | Mode | Related |, pre-Mode 6-column, or the legacy 5-column form)**Parallelization:** ...)For each row, extract:
G-001, P1-002)AUTO or HITL)Categorize issues by prefix group:
Example grouping:
If any phase issues (P1-, P2-, etc.) exist, ask which issues to include:
If AUTO_MODE=true, choose All issues automatically. Otherwise:
Use AskUserQuestion:
header: "Reindex Scope"
question: "Phase issues detected. Which issues should be included in the reindex?"
options:
- label: "All issues"
description: "Reindex both general (G-) and phase (P1-, P2-, etc.) issues"
- label: "General issues only"
description: "Reindex only general (G-) issues, leave phase issues unchanged"
- label: "Cancel"
description: "Abort the reindex"
If "Cancel": Abort.
If "General issues only": Filter the plan to only include G- prefixed issues. Skip all P1-, P2-, etc. issues.
If "All issues": Continue with the full plan.
If no phase issues exist: Skip this question and proceed directly to confirmation.
Present the plan to the user (filtered by scope if applicable). No-change rows may be omitted in large workspaces to keep the summary scannable:
Issues Reindex Plan
DONE issues to delete (X):
- G-002: {title}
- P1-003: {title} # Only shown if "All issues" selected
...
Active issues to renumber (by prefix group):
General (G-):
- G-003 -> G-002
# Phase sections only shown if "All issues" selected:
Phase 1 (P1-):
- P1-004 -> P1-003
Phase 2 (P2-):
- (no renames)
Proceed with reindex?
If AUTO_MODE=true, skip this prompt after printing the plan and add AUTO: proceeding with issues reindex.
Otherwise:
Use AskUserQuestion:
header: "Confirm Issues Reindex"
question: "This will delete DONE issues and renumber remaining issues. Proceed?"
options:
- label: "Yes, reindex issues"
description: "Delete DONE issues and renumber remaining from 001"
- label: "No, cancel"
description: "Keep current state"
Read and follow references/spec-capture-check.md before deleting any DONE issue files. It defines durable-vs-transient classification, spec-update rules, stop conditions, and the spec-capture report format.
If that reference requires any user confirmation, spec edit decision, or unresolved classification choice and AUTO_MODE=true, stop before deleting files with MISSING REQUIREMENT: spec-capture verification needs a human decision; rerun without --auto.
For each DONE issue id, resolve the matching file before deletion:
siw/issues/ISSUE-{prefix}-{number}-*.md to its concrete matches.references/edge-cases.md ("Missing Files") and stop for user confirmation.references/edge-cases.md ("Missing Files") and stop to ask which file is authoritative.Delete the single confirmed file. Prefer trash when available; otherwise fall back to rm -f on that exact path:
target="siw/issues/ISSUE-G-001-some-slug.md" # the single resolved path
if command -v trash &> /dev/null; then
trash "$target"
else
rm -f "$target"
fi
Never pass the unexpanded glob to trash or rm.
Define maps before renaming anything:
renumberById: original active issue id → new active issue id (see references/log-update.md for the full definition and matching rules).deletedById: original DONE issue id → deleted issue title (same reference).Build the complete original-to-new filename map for every active issue in scope, then verify every target filename is unique and does not collide with an existing file outside the map.
For each active issue that needs renumbering within its prefix group:
# ISSUE-G-003: -> # ISSUE-G-002:).renumberById / deletedById maps and the collision-safe matching rules in references/log-update.md.
**Related:**, dependency lists such as Blocked by / Blocks, Parallelization Guidance, and any other prose references to issue ids.(deleted: "{title}") instead of silently pointing it at a different renumbered issue.**Status:** line if it references the issue number.**Size:** / **Parallelization:** / **Mode:** metadata while updating ids.Rename order to avoid collisions:
G-002 → G-001, G-003 → G-002) requires processing renames in ascending order of the new id within each prefix group. Processing highest-first collides because the lower target still exists.references/edge-cases.md ("Rename Collisions") and rename through temporary filenames so order does not matter.Example:
# Compress-down within G-: G-002 -> G-001, then G-003 -> G-002
mv siw/issues/ISSUE-G-002-foo.md siw/issues/ISSUE-G-001-foo.md
mv siw/issues/ISSUE-G-003-api-design.md siw/issues/ISSUE-G-002-api-design.md
Important:
Read and follow references/overview-update.md to rebuild siw/OPEN_ISSUES_OVERVIEW.md. It defines the section/schema preservation rules, related-column rewrites, empty-section handling, and consistency checks.
Read and follow references/log-update.md to update issue references in siw/LOG.md. It defines renumberById / deletedById, the short/full id matching rules, replacement rules, and the active-issue-body rewrite rules used by Step 6.
Issues Reindex Complete
Spec Capture:
- {N} items migrated
- {spec_file_1}: {n1} item(s)
- {spec_file_2}: {n2} item(s)
{Or: "All items already captured" / "Skipped by user" / "No spec file found"}
Deleted (X DONE issues):
- G-001: {title}
- P1-002: {title}
Renumbered (Y active issues):
General:
- G-002 -> G-001: {title}
- G-003 -> G-002: {title}
Phase 1:
- P1-003 -> P1-002: {title}
Updated files:
- siw/OPEN_ISSUES_OVERVIEW.md
- siw/LOG.md (N issue references updated)
Next Steps:
- Continue working on active issues
- Use /kramme:siw:issue-define to add new general issues (will start at G-00{next})
- Phase issues maintain their numbering within their group
LOG.md reporting variations:
siw/LOG.md (N issue references updated)siw/LOG.md (no issue references)Read and follow references/edge-cases.md when any edge case condition applies.
development
One-way migration of a local SIW project into Linear. Creates one Linear project, migrates the main spec and supporting specs as Linear Documents, creates milestones from SIW phases and issues from SIW issues, then prompts to retire the local siw/ files via /kramme:siw:remove. Linear becomes the source of truth; this is not a two-way sync and keeps no rerun mapping, so re-running can duplicate issues. Use when moving a planned SIW initiative into Linear for good. Not for implementing issues, defining new SIW issues, or generating an issue breakdown.
development
Compare an existing PR's title and body against the actual branch diff and report drift — false claims, missing major changes, stale scope, missing risk callouts. Use after pushing changes to a branch with an open PR, or before requesting review. Read-only by default; add --fix to delegate to kramme:pr:generate-description for an updated description. Complements kramme:pr:code-review (which checks description accuracy as one signal among many code-quality checks) by being a fast, focused, single-purpose check that runs in seconds.
tools
Reviews plugin skills for focused scope, progressive disclosure, portability, safety, retry behavior, and documentation quality. Use when auditing a SKILL.md, skill directory, or proposed skill text against skill-authoring standards. Not for creating new skills, editing skills, or reviewing ordinary application code.
tools
Reviews recent agent session transcripts to find repeated manual workflows or repeated user asks, then proposes and optionally scaffolds only useful new skills or custom subagents. Use when the user asks to inspect recent sessions, find automation opportunities, or create reusable workflows from repeated work. Not for summarizing one session, general retrospectives, or codebase refactoring.