feat(classification): add the publication category as a durable flavor

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 <noreply@anthropic.com>
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
This commit is contained in:
tegwick 2026-09-05 22:14:07 +02:00
parent 55002b6fc9
commit 7d7b35ade0
3 changed files with 13 additions and 3 deletions

View file

@ -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",

View file

@ -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")

View file

@ -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})?$")