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)Normalize legacy title-case Ready and In Progress to READY and IN PROGRESS before categorizing. Rebuilt overview rows must emit uppercase statuses.
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.
tools
Requires Linear MCP. Implements one Linear issue end to end, selects applicable code-review, convention, and PR-refactor gates, runs them to bounded convergence, verifies, and optionally opens the PR and iterates on CI and review feedback until green. Use when the user wants a single Linear issue taken from implementation through a clean Pull Request. Not for implementation-only work, SIW-tracked issues, stacked PRs, existing PR updates, or post-merge rollout.
development
Reviews PR and local changes for convention drift and overcaution against documented rules and mined peer-file practice. Use for new patterns, dependencies, abstractions, or defensive complexity that departs from established practice; every finding cites evidence. Supports --inline. Not for general code quality (use kramme:pr:code-review) or spec review (use kramme:siw:spec-audit --team).
testing
Charts huge or foggy initiatives into a local `.context` decision map and resolves one typed frontier ticket per session until the work is ready for SIW or another execution workflow. Use when the route to a destination cannot fit in one agent session or parallel workspaces need coordinated planning state. Not for clear specs, ordinary issue decomposition, implementation, or Linear-native tracking.
development
Investigates a question against primary sources and saves one cited Markdown artifact. Use for reading legwork: official docs/API facts, source-code or spec checks, standards, and first-party service behavior before planning or implementation. Not for making product or architecture decisions, implementing code, broad web search, secondary blog summaries, or uncited answers.