Skip to content

ADR-001: ADR 001 Taxonomy Canonical Values

Purpose: Architecture decision record for ADR 001 Taxonomy Canonical Values


PropertyValue
Statusaccepted
Categoryprocess

Context: The annotation system requires well-defined canonical values for taxonomy tags, FSM status lifecycle, and source ownership rules. Without canonical values, organic growth produces drift (Generator vs Generators, Process vs DeliveryProcess) and inconsistent grouping in generated documentation.

Decision: Define canonical values for all taxonomy enums, FSM states with protection levels, valid transitions, tag format types, and source ownership rules. These are the durable constants of the delivery process.

Consequences:

TypeImpact
PositiveGenerated docs group into coherent sections
PositiveFSM enforcement has clear, auditable state definitions
PositiveSource ownership prevents cross-domain tag confusion
NegativeMigration effort for existing specs with non-canonical values

Invariant: The product-area tag uses one of 7 canonical values. Each value represents a reader-facing documentation section, not a source module.

Rationale: Without canonical values, organic drift (e.g., Generator vs Generators) produces inconsistent grouping in generated documentation and fragmented product area pages.

ValueReader QuestionCovers
AnnotationHow do I annotate code?Scanning, extraction, tag parsing, dual-source
ConfigurationHow do I configure the tool?Config loading, presets, resolution
GenerationHow does code become docs?Codecs, generators, rendering, diagrams
ValidationHow is the workflow enforced?FSM, DoD, anti-patterns, process guard, lint
DataAPIHow do I query process state?Process state API, stubs, context assembly, CLI
CoreTypesWhat foundational types exist?Result monad, error factories, string utils
ProcessHow does the session workflow work?Session lifecycle, handoffs, conventions

Invariant: The adr-category tag uses one of 4 values.

Rationale: Unbounded category values prevent meaningful grouping of architecture decisions and make cross-cutting queries unreliable.

ValuePurpose
architectureSystem structure, component design, data flow
processWorkflow, conventions, annotation rules
testingTest strategy, verification approach
documentationDocumentation generation, content structure

Invariant: Pattern status uses exactly 4 values with defined protection levels. These are enforced by Process Guard at commit time.

Rationale: Without protection levels, active specs accumulate scope creep and completed specs get silently modified, undermining delivery process integrity.

StatusProtectionCan Add DeliverablesAllowed Actions
roadmapNoneYesFull editing
activeScope-lockedNoEdit existing deliverables only
completedHard-lockedNoRequires unlock-reason tag
deferredNoneYesFull editing

Invariant: Only these transitions are valid. All others are rejected by Process Guard.

Rationale: Allowing arbitrary transitions (e.g., roadmap to completed) bypasses the active phase where scope-lock and deliverable tracking provide quality assurance. Completed is a terminal state. Modifications require @libar-docs-unlock-reason escape hatch.

FromToTrigger
roadmapactiveStart work
roadmapdeferredPostpone
activecompletedAll deliverables done
activeroadmapBlocked/regressed
deferredroadmapResume planning

Invariant: Every tag has one of 6 format types that determines how its value is parsed.

Rationale: Without explicit format types, parsers must guess value structure, leading to silent data corruption when CSV values are treated as single strings or numbers are treated as text.

FormatParsingExample
flagBoolean presence, no value@libar-docs-core
valueSimple string@libar-docs-pattern MyPattern
enumConstrained to predefined list@libar-docs-status completed
csvComma-separated values@libar-docs-uses A, B, C
numberNumeric value@libar-docs-phase 15
quoted-valuePreserves spaces@libar-docs-brief:‘Multi word’

Invariant: Relationship tags have defined ownership by source type. Anti-pattern detection enforces these boundaries.

Rationale: Cross-domain tag placement (e.g., runtime dependencies in Gherkin) creates conflicting sources of truth and breaks the dual-source architecture ownership model.

TagCorrect SourceWrong SourceRationale
usesTypeScriptFeature filesTS owns runtime dependencies
depends-onFeature filesTypeScriptGherkin owns planning dependencies
quarterFeature filesTypeScriptGherkin owns timeline metadata
teamFeature filesTypeScriptGherkin owns ownership metadata

Invariant: The quarter tag uses YYYY-QN format (e.g., 2026-Q1). ISO-year-first sorting works lexicographically.

Rationale: Non-standard formats (e.g., Q1-2026) break lexicographic sorting, which roadmap generation and timeline queries depend on for correct ordering.

Canonical phase definitions (6-phase USDP standard)

Section titled “Canonical phase definitions (6-phase USDP standard)”

Invariant: The default workflow defines exactly 6 phases in fixed order. These are the canonical phase names and ordinals used by all generated documentation.

Rationale: Ad-hoc phase names and ordering produce inconsistent roadmap grouping across packages and make cross-package progress tracking impossible.

OrderPhasePurpose
1InceptionProblem framing, scope definition
2ElaborationDesign decisions, architecture exploration
3SessionPlanning and design session work
4ConstructionImplementation, testing, integration
5ValidationVerification, acceptance criteria confirmation
6RetrospectiveReview, lessons learned, documentation

Invariant: Deliverable status (distinct from pattern FSM status) uses exactly 6 values, enforced by Zod schema at parse time.

Rationale: Freeform status strings bypass Zod validation and break DoD checks, which rely on terminal status classification to determine pattern completeness.

ValueMeaning
completeWork is done
in-progressWork is ongoing
pendingWork has not started
deferredWork postponed
supersededReplaced by another
n/aNot applicable

← Back to All Decisions