所有命令 · quality
pm ops validate
Validate metadata, lifecycle policies, files, command references, and history.
Runs standalone metadata, resolution, lifecycle (including dependency-cycle diagnostics), linked-file, linked-command reference, and history drift checks with default remediation hints for resolution gaps.
用法
pm ops validate [options]选项
| --check-metadata | Run metadata completeness checks | 可选 |
|---|---|---|
| --metadata-profile <value> | Metadata profile (core|strict|custom) | 可选 |
| --check-resolution | Run closed-item resolution metadata checks | 可选 |
| --check-completeness | Check declarative lifecycle field requirements | 可选 |
| --check-lifecycle | Run active-item lifecycle governance drift checks | 可选 |
| --check-stale-blockers | Include stale blocker-pattern diagnostics in lifecycle checks | 可选 |
| --dependency-cycle-severity <value> | Set dependency-cycle warning policy for lifecycle checks (off|warn|error) | 可选 |
| --parent-cycle-severity <value> | Set parent-hierarchy cycle warning policy for lifecycle checks (off|warn|error) | 可选 |
| --check-files | Run linked-file and orphaned-file checks | 可选 |
| --check-command-references | Run linked-command PM-ID reference checks | 可选 |
| --scan-mode <value> | Select file candidate scan mode for --check-files (default|tracked-all|tracked-all-strict) | 可选 |
| --include-pm-internals | Include PM storage internals in tracked-all candidate scans | 可选 |
| --verbose-file-lists | Include full file-path lists for validate --check-files details | 可选 |
| --verbose-diagnostics | Include full diagnostic ID lists | 可选 |
| --all-affected-ids | Emit complete missing_* affected-ID lists with no truncation (implied by --json) | 可选 |
| --strict-exit | Return non-zero exit when validation warnings are present | 可选 |
| --fix-hints | Add a machine-executable fix_hints[] of pm commands to each failing check's details | 可选 |
| --auto-fix | Apply safe, deterministic field backfills | 可选 |
| --dry-run | Preview planned --auto-fix/--prune-missing fixes without applying them | 可选 |
| --fix-scope <scope> | Grant --auto-fix scopes (metadata, resolution, estimates, timestamps, lifecycle; comma-separated or repeatable). Default: metadata, resolution; other scopes require explicit opt-in | 可选 |
| --prune-missing | Remove deleted-path file/doc links; preserves real files | 可选 |
| --check-history-drift | Run item/history hash drift checks | 可选 |
| --check-storage-integrity | Run the post-merge storage-integrity check (unreadable items, history conflict markers, resurrected deletes, unparseable config/schema) | 可选 |
| --counts | Keep validation counts and totals while omitting per-item diagnostic arrays | 可选 |
| --full | Return the complete validation diagnostic projection | 可选 |
示例
pm ops validate