| name | pmf-index |
| description | Regenerate the tracker's INDEX.md from the current Markdown files — a status table of all hypotheses, grouping by area, the reviews list, and a 'findings so far' section (validated hypotheses only). Deterministic and idempotent. Use when the user says 'pmf index', 'rebuild the index', 'refresh the pmf index', 'regenerate INDEX.md', or types '/pmf-index'. |
| argument-hint | [optional: path to the pmf/ tracker root] |
| version | 0.1.0 |
| user_invocable | true |
/pmf-index — regenerate INDEX.md
INDEX.md is a generated file — never hand-edited. This command rebuilds it deterministically from
the current tracker contents.
Before you do anything
- Skim
${CLAUDE_PLUGIN_ROOT}/references/format-spec.md §4.8 (the index structure) if you need a refresher.
- Resolve the tracker root
$PMF (path arg → git rev-parse --show-toplevel/pmf/ → CWD pmf/). If $PMF doesn't exist, tell the user to run /pmf-start (to scaffold) or /pmf-import first.
Steps
- Run the deterministic generator:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pmf_index.py --out "$PMF" --check
- It reads only front-matter (+ each hypothesis's first line), so it is cheap and idempotent — running
it twice with no data change yields a byte-identical
INDEX.md.
--check asserts every relative .md link resolves; a non-zero exit means a link is broken — surface it.
- Report the counts it prints (hypotheses, reviews) and confirm links are OK.
Why a script, not hand-assembly
An index is a pure transformation of the data. Generating it deterministically guarantees idempotency, no
fabricated entries, and that the "Findings so far" section contains only hypotheses with signal: ✓
or status: Validated (never an invented finding). If you ever need to change the index layout, edit
scripts/pmf_index.py and references/format-spec.md §4.8 together — do not hand-edit INDEX.md.