project-card-repairlisted
Install: claude install-skill SungFeng-Huang/research-cards
# Project Card Repair — seal text-form card links into real mentions
## What breaks, and why
A card link should be a clickable **card-mention node**. But an append that
did NOT go through the local heptabase CLI's renderer writes it as the literal
text `[[card:<uuid>]]` — dead text in the UI, invisible to PM-level parsers.
This happens on the **`hb` bridge** (remote cluster over SSH, append-only) and
on bare CLI/Mac spills. Three shapes carry it:
| shape | where | direction |
|---|---|---|
| `專案:[[card:<project>]] 環境:…` | log/progress card header | log → project |
| `📎 <date> [[card:<log>]] <summary>` | project card timeline line | project → log |
| `…母卡:[[card:<entry>]]。…` | continuation child header | chain child → entry |
Obsidian `.md` cards use `[[wikilink]]` and never hit this — **heptabase-only**.
## Usage
```bash
cd ${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/skills/research-cards}/skills/project-card-repair
python3 repair.py --card <id> [--card <id> …] # pinpoint: repair only these
python3 repair.py # sweep: every project + progress card
python3 repair.py --dry-run # preview; save nothing
python3 repair.py --include-sentinel # also seal ▶續卡 (see below)
```
Output is one JSON object: `mode`, `scanned`, `cards_changed`, and a lean
`results` list (only cards that sealed something or errored, each with
`by_kind`: how many loglink / backref / sentinel paragraphs were sealed).
Idempotent — a second run reports