From 7d7b35ade0db9b17141d7ae6394585167345f245 Mon Sep 17 00:00:00 2001 From: tegwick Date: Sat, 5 Sep 2026 22:14:07 +0200 Subject: [PATCH] feat(classification): add the publication category as a durable flavor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implements CUST-WP-0070-T02. publication joins DURABLE_FLAVORS, so CATEGORIES picks it up automatically; classification.py and the cli --category choices are updated to match canon v1.1. A published corpus of authored records previously had to be filed as project — the only non-durable category — implying eventual retirement of something meant to be kept. Repos with no classification file at all fell through to flavor=tooling. Full suite: 161 passed. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01SQ6oF1DtVDKcD1FCpvRVLx Assistant: claude-code Assistant-Model: opus Assistant-Process: 272883@bnt-lap001 Assistant-Session: f40c8f53-fb65-4980-9d29-bcdb3dd946f7 --- src/repo_manager/classification.py | 4 +++- src/repo_manager/cli.py | 10 +++++++++- src/repo_manager/standards.py | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/repo_manager/classification.py b/src/repo_manager/classification.py index ccc0c41..4a51538 100644 --- a/src/repo_manager/classification.py +++ b/src/repo_manager/classification.py @@ -7,7 +7,9 @@ from dataclasses import dataclass from typing import Any CONTRACT_VERSION = "1.0" -CATEGORIES = frozenset({"experimental", "research", "project", "tooling", "product", "business"}) +CATEGORIES = frozenset( + {"experimental", "research", "project", "tooling", "product", "business", "publication"} +) DOMAINS = frozenset( { "infotech", diff --git a/src/repo_manager/cli.py b/src/repo_manager/cli.py index 2beeea4..8782c68 100644 --- a/src/repo_manager/cli.py +++ b/src/repo_manager/cli.py @@ -360,7 +360,15 @@ def main(argv: list[str] | None = None) -> int: p_scaf.add_argument( "--flavor", default=None, - choices=["experimental", "research", "project", "tooling", "product", "business"], + choices=[ + "experimental", + "research", + "project", + "tooling", + "product", + "business", + "publication", + ], ) p_scaf.add_argument("--slug", default=None) p_scaf.add_argument("--domain", default="infotech") diff --git a/src/repo_manager/standards.py b/src/repo_manager/standards.py index 15dc545..dc7db91 100644 --- a/src/repo_manager/standards.py +++ b/src/repo_manager/standards.py @@ -23,7 +23,7 @@ from repo_manager.record_identity import scan_record_identities CANON_FLAVOR = "the-custodian/canon/standards/project-repository-flavor_v0.1.md" CANON_CLASSIFICATION = "the-custodian/canon/standards/repo-classification-standard_v1.0.md" -DURABLE_FLAVORS = ("experimental", "research", "tooling", "product", "business") +DURABLE_FLAVORS = ("experimental", "research", "tooling", "product", "business", "publication") CATEGORIES = (*DURABLE_FLAVORS, "project") FLAVOR_MARKER_PREFIX = "PRJ-WP" WP_ID_RE = re.compile(r"^([A-Z][A-Z0-9]*)-WP-(\d{4})(?:-T\d{2})?$")