User Input
$ARGUMENTS
Outline
- Prefer
pm exportfrom the project root (--from/--to/--out,可选--with-diagrams)。Default output:.pm/exports/pm-export-YYYYMMDD.md。 - The file must include: audit window, dialogue notes, snapshot excerpt, reviews table, test-gaps, guard, and architecture paths (embed
.mmdonly with--with-diagrams). If the CLI is unavailable, assemble the same sections and redact before writing. If residue remains (AKIA…,BEGIN PRIVATE KEY), delete the file and fail. - Exclude
local.yaml, credentials, raw logs, secret originals. Never include un-redacted secrets. - Show the export path and ask the user to open it.
Shared Workflow (all /pm-* commands)
Follow this order when the command mutates .pm/ state:
- Read
.pm/config/project.yamland.pm/config/local.yaml(if missing and command is not init → recommend/pm-init). - If
.pm/metadata is valid, load it; do not force a full-repo rescan. On-demand incremental scan usingsources+extra_scan_roots+--path+ conversation paste (highest priority for/pm-fix). Prefer.pm/architecture/map.jsonand the document index before walking the tree. - Desensitize evidence →
.pm/evidence/scans/{command}-{timestamp}.json(secrets →***). Never persist raw secrets. - Optional charter compare only when
charter.status == approved(attachconfidence). Draft PRD/charter MUST NOT be used as the baseline. - Incremental merge into module
findings.md/todo.md; sync authoritativestate/todo.md. - Refresh
state/overview.mdwith all open/in_progress blocking+high todos (no 3-item cap). Medium/low: counts only unless--verbose. - Append audit to
.pm/state/audit.jsonl(command, time, input/output summary; include reasoning when the step was AI-produced). - Output risk summary + recommended next step (≤20 lines). Never auto-write source/SQL/cloud or land generated docs/rules without explicit user confirmation.
- Closing:
_closing.md完整档(只列已写出的导出文件)。
Design baseline: docs/prd.md + 宪章。