| name | pmf-import |
| description | One-time import of an existing HTML/JSON PMF tracker (a pmf-data.json export) into the Markdown tracker layout — preserving the overview, thesis, scratchpad, every hypothesis, and weekly reviews verbatim. Use when migrating from a prior tracker, or when the user says 'pmf import', 'import my pmf data', 'migrate the tracker', 'convert pmf-data.json', or types '/pmf-import'. |
| argument-hint | [--data <pmf-data.json>] [--out <pmf/ root>] |
| version | 0.1.0 |
| user_invocable | true |
/pmf-import — migrate an existing tracker into Markdown
This wraps the deterministic importer (scripts/pmf_import.py) with a safe, confirmed flow. The script
does the lossless field mapping; you handle path resolution, the safety confirmation, and the summary.
Before you do anything
- Read
${CLAUDE_PLUGIN_ROOT}/references/data-model.md (the field-by-field contract) and honesty-rules.md.
- Resolve inputs:
--data = the source pmf-data.json. If the user didn't give a path, ask (AskUserQuestion) for it.
--out = the target tracker root $PMF (default pmf/ under git rev-parse --show-toplevel).
- Always confirm the source path with the user — never assume a default location.
Steps
- Dry run first — show the plan, write nothing:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pmf_import.py --data "<data>" --out "$PMF" --dry-run
- Confirm via AskUserQuestion: "Create N new files (skip M existing)?" — show the create/skip counts from the dry run.
- Import (safe — never overwrites):
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pmf_import.py --data "<data>" --out "$PMF"
Existing files are skipped and reported; use --force only against a throwaway directory.
- Verify the round-trip:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pmf_import.py --data "<data>" --out "$PMF" --verify
This asserts every hypothesis and review field matches the source verbatim (empty result → TBD). Surface any mismatch.
- Build the index:
python3 ${CLAUDE_PLUGIN_ROOT}/scripts/pmf_index.py --out "$PMF" --check
- Report what was created, the verify result, and remind the user that imported hypotheses carry an
evidence_weight of 🔵 and empty sources (auto-inferred on import — there's an HTML comment in each
file flagging this). They should review and correct those during the next /pmf-wrap.
Honesty note
The importer adds an explicit "auto-inferred on import — verify" marker for any field that has no source in
the original data (evidence_weight, sources, created/updated). Never silently treat those as real
provenance. Everything else is carried over verbatim.