Files
osmWorkflow/.trellis/tasks/08-04-add-area-quality-gate/prd.md
2026-08-04 10:42:10 +08:00

1.8 KiB

Add area quality gate

Goal

Add a lightweight check:area command that turns diagnostics and manifests into pass/fail quality gates.

Requirements

  • Add a lightweight check:area npm command for an area quality gate.
  • The command must not run QGIS, Blender, Cesium, compression, or rebuild stages.
  • The command must reuse the same diagnostics source of truth used by diagnose:area; avoid duplicating OSM parsing, artifact checks, GLB budget checks, or manifest stale checks.
  • The first quality gate must fail on:
    • invalid or missing OSM bounds
    • malformed building multipolygon relations
    • missing baseline GLB / metadata / Cesium preview artifacts
    • invalid metadata JSON
    • GLB size / node / image budgets exceeded
    • missing, invalid, or stale expected stage manifests
  • Missing QGIS preview remains a warning in this first version.
  • The command must print a concise pass/fail report and use exit code 0 for pass and 1 for fail.
  • README and pipeline spec must document command usage and failure policy.

Acceptance Criteria

  • npm run check:area -- --config config/areas/nantaizi-lake-innovation-valley.json passes against current nantaizi outputs.
  • The check report includes pass/fail counts and any warning lines.
  • check:area exits non-zero for a deliberately impossible missing-output config or equivalent controlled failure case.
  • diagnose:area still works after any shared diagnostics refactor.
  • Syntax checks pass for changed Node scripts.
  • README and Trellis pipeline spec document check:area.

Notes

  • Keep prd.md focused on requirements, constraints, and acceptance criteria.
  • Lightweight tasks can remain PRD-only.
  • For complex tasks, add design.md for technical design and implement.md for execution planning before task.py start.