Maintain PWDEV Flow History
Read maintenance, artifacts, audit, and safety before proposing changes.
Route
inventory is read-only and classifies each candidate as active, complete, stale, or archivable.
archive moves only explicitly approved, verified-complete phase or quick-task directories.
changelog derives a preview from real Git commits and verified Flow execution summaries.
If the request is ambiguous, begin with inventory; it does not authorize archiving.
Inventory
- Read state, active product and phase contracts, verification verdicts, memory links, migration records, and audit references.
- List exact candidate paths, classification evidence, size, dependencies, and proposed archive destination.
- Preserve config, state, context, product contracts, memory, audit data, migration records, and the active phase.
Archive
- Produce the inventory and require explicit approval for the exact source paths and destinations.
- Resolve destinations below
.planning/flow/archive/<date>/; refuse every collision instead of overwriting.
- Move only approved directories whose verification verdict is
APPROVED and which are no longer active.
- Update authorized state references, then record
archived through flow_audit.py when audit is enabled.
- Verify that every approved source moved, every destination exists, and no unapproved path changed.
Changelog
Read actual Git history and verified Flow summaries. Use an explicit version or Unreleased, preserve existing CHANGELOG.md content, exclude fabricated or reverted work, and present a preview before writing unless the user already authorized file generation.
Constraints
- Never delete artifacts, use recursive cleanup, rewrite Git history, or archive incomplete work.
- A stale artifact is a finding, not automatically an archive candidate.
- Do not infer approval for archive targets from a general cleanup request.
Output
Return MODE, inventory or changelog preview, exact changes made if any, verification evidence, STATUS, and NEXT.
1---2name: flow-maintenance3description: Inventory, archive, and summarize PWDEV Flow project history safely, without deleting artifacts or rewriting Git history.4---56# Maintain PWDEV Flow History78Read [maintenance](../../references/maintenance.md), [artifacts](../../references/artifacts.md), [audit](../../references/audit.md), and [safety](../../references/safety.md) before proposing changes.910## Route1112- `inventory` is read-only and classifies each candidate as active, complete, stale, or archivable.13- `archive` moves only explicitly approved, verified-complete phase or quick-task directories.14- `changelog` derives a preview from real Git commits and verified Flow execution summaries.1516If the request is ambiguous, begin with `inventory`; it does not authorize archiving.1718## Inventory19201. Read state, active product and phase contracts, verification verdicts, memory links, migration records, and audit references.212. List exact candidate paths, classification evidence, size, dependencies, and proposed archive destination.223. Preserve config, state, context, product contracts, memory, audit data, migration records, and the active phase.2324## Archive25261. Produce the inventory and require explicit approval for the exact source paths and destinations.272. Resolve destinations below `.planning/flow/archive/<date>/`; refuse every collision instead of overwriting.283. Move only approved directories whose verification verdict is `APPROVED` and which are no longer active.294. Update authorized state references, then record `archived` through [flow_audit.py](../../scripts/flow_audit.py) when audit is enabled.305. Verify that every approved source moved, every destination exists, and no unapproved path changed.3132## Changelog3334Read actual Git history and verified Flow summaries. Use an explicit version or `Unreleased`, preserve existing `CHANGELOG.md` content, exclude fabricated or reverted work, and present a preview before writing unless the user already authorized file generation.3536## Constraints3738- Never delete artifacts, use recursive cleanup, rewrite Git history, or archive incomplete work.39- A stale artifact is a finding, not automatically an archive candidate.40- Do not infer approval for archive targets from a general cleanup request.4142## Output4344Return `MODE`, inventory or changelog preview, exact changes made if any, verification evidence, `STATUS`, and `NEXT`.