feat(archive): add pkgmgr archive subcommand for task-tracked spec dirs

Walks a directory of numbered NNN-topic.md files, promotes every file
with zero unchecked task-list items into the directorys README under
the ## Archive section, then deletes the source file. Keeps spec
directories (typically docs/requirements) short and focused on open
work.

The action ships as pkgmgr.actions.archive with four leaf modules
(discovery, inspect, readme, workflow) and is wired into the CLI as
pkgmgr archive [DIR] [--readme PATH] [--dry-run] [--include-template].

Extracted verbatim from cli/contributing/requirements/archive in
infinito-nexus-core so every kpmx-managed repository can rely on the
same archival convention without copy-pasting helpers. Twenty unit
tests cover discovery, inspection, README merge, and end-to-end
workflow paths.

Also: realign tests/unit/pkgmgr/cli/commands/test_release.py with the
new run_release(retry=False) signature shipped in v1.14.0.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Kevin Veen-BirkenbachandClaude Opus 4.7 committed 2026-05-28 07:55:11 +02:00
1 parent a4a5b661b9
commit a37b9ed8a7
16 files changed
+729

No files matched your search

@@ -112,6 +112,7 @@ class TestReleaseCommand(unittest.TestCase):
preview=False,
force=True,
close=True,
retry=False,
)
@patch("pkgmgr.cli.commands.release.os.path.isdir", return_value=True)
@@ -160,6 +161,7 @@ class TestReleaseCommand(unittest.TestCase):
preview=True,
force=False,
close=False,
retry=False,
)
@patch("pkgmgr.cli.commands.release.run_release")