Skip to content

pm validate should support --auto-fix mode for bulk metadata remediation #179

Closed

Description

@unbraind

Problem

After our comprehensive PM audit (1075 items), pm validate reports 290 items missing acceptance_criteria, 200 missing estimates, and 323 missing resolution fields. Fixing these requires individual pm update calls for each item - an impractical volume of manual work.

Current Behavior

pm validate output shows warnings like:

  • validate_metadata_missing_acceptance_criteria:290
  • validate_metadata_missing_estimate:200
  • validate_resolution_missing_fields:323

There is no way to apply bulk fixes. Each item requires pm update --acceptance-criteria ... --estimated-minutes ...

Desired Behavior

  1. --auto-fix flag that applies sensible defaults for missing metadata
  2. --scope filter (open, closed, by-type) to limit which items are fixed
  3. --dry-run to preview changes before applying
  4. Template-based defaults that respect item type (e.g., different AC templates for Feature vs Task)
  5. Integration with pm update-many for the actual bulk update

Example:
pm validate --auto-fix --dry-run --scope open
pm validate --auto-fix --scope open --ac-template [Auto] Feature complete and verified

Impact

Projects with hundreds of items accumulate metadata debt. Without bulk remediation, the validate warnings become noise that users learn to ignore, defeating the purpose of validation.

Activity

  1. unbraind commented on Jun 10, 2026

    @unbraind
    OwnerAuthor

    Partial: there is no validate-integrated --auto-fix yet, but the building blocks exist on @unbrained/pm-cli 2026.6.9:

    • pm validate --fix-hints emits a machine-executable fix_hints[] of pm commands on each failing check, and --verbose-diagnostics returns the complete failing-item ID lists (no truncation).
    • pm update-many handles the bulk application with scoping, preview, and safety:
    pm update-many --filter-status open --filter-type Task \
      --acceptance-criteria "[Auto] Feature complete and verified" \
      --estimate 60 --dry-run     # per-item diff preview
    # apply mode writes a rollback checkpoint (pm update-many --rollback <id>)
    

    Remaining: a single pm validate --auto-fix entry point with type-aware default templates. Leaving open for that.

  2. unbraind commented on Jun 12, 2026

    @unbraind
    OwnerAuthor

    Shipped in v2026.6.12 (tracked as pm-c3sz): pm validate --auto-fix applies the safe, deterministic subset of fix-hint remediations (field backfills), with --dry-run to preview and --fix-scope <metadata|resolution|lifecycle> to control which classes of fixes apply (default: metadata,resolution; lifecycle must be named explicitly). Bulk updates can also go through pm update-many (filter- or --ids-based, with dry-run plans and rollback checkpoints). Verified live on v2026.6.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions