User Input
$ARGUMENTS
Accepted: repair | empty (diagnose only).
Outline
/pm-check is the recovery command. Prefer pm check from the project root and explain the table in Chinese.
- If
.pm/is missing: block → 请先/pm-init或pm init。Do not treat as a new empty project silently. - Read
pm checkoutput. Also inspect:project.yaml/prd.status(draft → 提醒 confirm / skip,不自动当基线).pm/state/audit.jsonl是否可逐行 JSON 解析.pm/architecture/map.json是否存在、是否能解析.pm/engineering/reviews.md待处置条数- 核心文档索引是否过期(
pm docs只更新索引)
- If the user said
repair(or agrees after you list issues):- Re-run
pm init --scaffold-only --no-skills-shto fill missing skeleton only (CLI is copy-if-missing). - Never overwrite user-edited or
prd.status=confirmed/charter.status=approvedcontent. - Rebuild map with
pm archif missing or unreadable. - Rebuild dashboard with
pm dashboardif missing. - If
audit.jsonlis corrupt: keep a.bakof the readable prefix if possible; do not silently truncate confirmed reviews/todos.
- Re-run
- Tell the user what was repaired vs what needs a human confirm.
- Closing:
_closing.md轻量档。
Done When
- Missing
.pm/directed to/pm-init - Diagnosis listed in Chinese
- Repair path did not overwrite confirmed baselines
Shared Workflow
Map-first. Redact. No auto-write of app code. Design baseline: docs/prd.md + 宪章。