Feature Request: Update Changelog Workflow (UCW)
Type: Feature Request (FR)
Submitted: 2026-03-15
Submitted By: AI Assistant (per user directive)
Priority: HIGH
Status: PROPOSED
Implementing Task: E7:S01:T06
Summary
Define and implement a deterministic Update Changelog Workflow (UCW) that keeps CHANGELOG.md lean (latest N entries) while automatically archiving older releases, enforcing canonical ordering, and integrating with Release Workflow (RW) validation. UCW replaces the missing/misplaced workflow that historically handled changelog curation.
Problem Statement
- Current
CHANGELOG.mdstill contains historical sections out of order, repeatedly blocking RW validators. - Prior UCW artifacts are missing; responsibilities defaulted to manual cleanup, which is error-prone and slow.
- Without UCW, the "latest-only" policy can’t be enforced consistently, causing validator failures and inconsistent release comms.
- Archival files exist but there is no automated agent preserving the contract (main changelog ≤ N entries, archives hold history).
Goals / Responsibilities
UCW must:
-
Enforce Latest-Only Main Changelog
- Keep configurable N recent releases (default 20) in
CHANGELOG.md. - Replace trimmed sections with archive pointers referencing detailed files.
- Keep configurable N recent releases (default 20) in
-
Automated Archival
- Move trimmed entries to
docs/changelog-and-release-notes/changelog-archive/. - Maintain metadata (version, date, epic/story/task) and ensure links remain valid.
- Move trimmed entries to
-
Ordering + Format Validation
- Guarantee canonical RC.EPIC.STORY.TASK+BUILD ordering (newest first in main file before trimming, proper lexical ordering inside archive).
- Ensure date format compliance (
DD-MM-YY). - Detect duplicate versions or missing archive files.
-
Release Workflow Integration
- Provide RW hook/command (e.g.,
UCWorpython ... ucw.py) that runs after changelog edits but before validators. - Emit machine-readable summary for RW log (versions archived, entries retained).
- Provide RW hook/command (e.g.,
-
Manual & Scheduled Entry Points
- CLI entry for ad-hoc runs (e.g.,
UCW --dry-run). - Optional scheduled mode (cron) to keep archives tidy even outside RW runs.
- CLI entry for ad-hoc runs (e.g.,
-
Reporting & Safety
- Output summary: retention count, archived files, warnings.
- Dry-run diff preview to prevent accidental data loss.
- Abort if archive write fails or if versions would be orphaned.
Proposed Scope
- Create
packages/frameworks/workflow mgt/workflows/update-changelog-workflow/with README, workflow YAML, config. - Implement Python entry script (e.g.,
scripts/update_changelog_docs.py) handling retention + archival. - Wire UCW into RW optional step (similar to CMW).
- Document SOP in
docs/maintenance/release-runbook.md+CHANGELOG.mdpolicy section. - Provide regression tests covering retention thresholds, ordering enforcement, archive integrity.
Acceptance Criteria
- Running UCW on current tree trims
CHANGELOG.mdto last N releases, moves remainder to archive, and validator passes. - UCW command supports
--retention,--dry-run,--autoflags. - Archive entries get automatic backlinks to main changelog (and vice versa).
- RW docs describe when to run UCW; RW automated path can invoke UCW when changelog exceeds retention.
- Tests cover: ordering enforcement, retention boundaries, duplicate detection, missing archive references, dry-run preview, and failure modes.
- README documents responsibilities so future agents don’t misattribute UCW vs UKW.
Dependencies & References
- FR-025 (Changelog Management & Archival Workflow) — UCW is the concrete implementation fulfilling this FR requirement.
- FR-026 (Perpetual task for changelog maintenance) — UCW operationalizes the perpetual task.
- Release Workflow — UCW integrates post-Step 3 (detailed changelog) and pre-validation.
- Documentation Agent policy — Ensure archive file ownership aligns with doc agent responsibilities.
Next Steps
- Approve FR and assign to Documentation/RW agent collaboration.
- Implement UCW workflow + scripts.
- Update RW runbooks and validators to rely on UCW output.
- Backfill missing archival runs once tooling is ready.