backfill-decisionslisted
Install: claude install-skill azborgonovo/ai-skills
# Backfill Decisions
Reconstruct Decision Records (DRs) for significant past decisions by mining git history. This skill produces *retroactive* DRs — the decision has already been made and adopted; the goal is to capture the evidence and reasoning that history reveals, honestly marked as a reconstruction.
> **Making a decision now?** Use `/log-decision` to record it while the reasoning is fresh, or `/decide` if you're still exploring options. This skill is only for decisions already buried in the repository's past.
## Execution Steps
### Phase 0 — Preconditions and Scope
1. Run `git rev-parse --is-inside-work-tree`. If not inside a repository, stop and tell the user.
2. Run `git rev-parse --is-shallow-repository`. If `true`, warn the user that the clone is shallow — the history is truncated and mining it would silently miss most decisions — and suggest `git fetch --unshallow` before continuing.
3. Gauge the repo: `git rev-list --count HEAD` for commit count, and `git log --reverse --date=short --pretty='%ad' | head -1` for the first commit date.
4. Parse `$ARGUMENTS` if provided — any combination of:
- a **date range** like `2023..2024` → translate to `--since`/`--until` on every `git log`
- a **path** like `src/api` → append `-- <path>` to every `git log`
- a **topic keyword** like `"database"` → add it to the grep patterns in Phase 2
5. If more than ~1,500 commits are in scope and no range was given, use `AskUserQuestion`: scan the whole history **era-by-era**