---
name: change-boot
description: Use when past-change rationale matters (refactoring unfamiliar code, revert or hotfix analysis, issue-linked commit archaeology) — injects the published ChDR index (.adlc/memory/chdr.md) as session context and pairs mining with capture via /change-init; invoked from team-boot's Class Boots catalog.
---

# change-boot

## Overview

One of the five **class boots** surfaced by `team-boot`'s Class Boots
catalog. `team-boot` injects the always-relevant team context (constitution,
CDR index, skills registry) at session start; this skill loads the
**change history layer** on demand — the published ChDR index mined from
git history — and pairs it with decision capture so change rationale is
recovered (`/change-init`) rather than living only in commit messages.

Reading past rationale and recording new rationale are one loop: published
ChDRs explain why the code looks the way it does; rationale discovered
during the work flows back into the same record system.

## When to Use

Invoke when:

- Refactoring or modifying unfamiliar code — check whether a ChDR explains
  the current shape before changing it.
- Analyzing reverts, hotfixes, or fix chains ("why was this reverted?").
- The session produces change rationale: a revert/hotfix explanation, or a
  commit that links to an issue tracker (the `/change-init` mining signal).

## Core Process

### Step 1: Locate the ChDR Index

From the current working directory (do NOT walk up parent directories):

- Primary: `.adlc/memory/chdr.md` (generated by `/change-publish`; rows
  start with `| ChDR`)

If the index is missing but `.adlc/memory/chdr/ChDR-*.md` files exist,
synthesize a lean table from each file (ID from filename; Title/Status from
frontmatter or first heading). If nothing exists, report `0 ChDRs` — never fabricate rows.

### Step 1b: Read the ChDR Drafts Index

Check `.adlc/drafts/chdr/` for `ChDR-*.md` files with `status: proposed` or
`status: discovered` in frontmatter. These are draft ChDRs pending
clarification. Collect ID / Title / Type / Status / Date from each file.
If the directory is empty or absent, report `0 pending drafts`.

### Step 2: Inject ChDR Context (Output Contract)

Emit before the task answer:

```markdown
## ChDR Context

| ID | Title | Status | Date |
|--|--|--|--|
| ChDR-001 | Why payments retries are capped at 3 | stable | 2026-08-16 |

_Searched N ChDRs, K matched._

## Drafts Pending Review

| ID | Title | Type | Status | Date |
|----|-------|------|--------|------|
| (from .adlc/drafts/chdr/) |

_N pending drafts — run /change-clarify to review._
```

- Render ID / Title / Status / Date from the index (the full index also
  carries Issue, Commit, Note — read the individual `ChDR-*.md` when a task
  matches a row).
- `N` = total index rows; `K` = rows relevant to the current task. **K MUST
  equal the table rows shown** — 0 matched → empty table, never inflate.

### Step 3: Capture Change Rationale

| Trigger | Action |
|---------|--------|
| Revert or hotfix performed/analyzed with rationale | ChDR → direct write to `.adlc/drafts/chdr/` |
| Commit authored that links to an issue tracker | ChDR → direct write to `.adlc/drafts/chdr/` post-merge |
| Fix chain discovered in history | ChDR → direct write to `.adlc/drafts/chdr/` |
| ChDR-class decision already in the ledger | verify capture happened; if not, re-surface |

Add/refresh rows in the **Session Decision Ledger** (Decision | Type |
Captured? | Skill) for every ChDR-class decision detected this session —
including ones from before this boot was invoked. At session end, prompt to
run `/change-clarify` for any unrecorded ChDR drafts in `.adlc/drafts/chdr/`.

## Failure Handling

- Missing index + missing records → emit the empty table with
  `_Searched 0 ChDRs, 0 matched._` and continue the user's task; never block.
- Unparseable index rows → skip malformed rows, note the skip count.

## Red Flags

- Fabricating ChDR rows or inflating K beyond the table shown.
- Injecting the index but ignoring capture — the pairing is the point.
- Walking up parent directories to find `.adlc/`.
- Mining rationale without SHA/URL provenance — `/change-clarify` will
  reject Decision claims that lack it.

## Verification

- [ ] ChDR Context table emitted with `_Searched N ChDRs, K matched._`
      (K = table rows).
- [ ] Session Decision Ledger updated with detected ChDR-class decisions.
