Functional Spec
- Story: story-vibepro-routing-profiles-rendered-projections
- Status: -
- Clauses: 12
C-001
Accepted Spec JSON must render deterministically into Functional Spec Markdown, preserving clauses, origin references, and diagrams.
Origin refs
C-002
Functional Spec, Tasks, Evidence, Test Plan, Review, Gate, and Release Markdown views in both profiles must carry generated, curated, or human_owned ownership plus profile, feature_slug, source canonical path and SHA-256, renderer id/version, and a direct-edit prohibition marker where generated.
Origin refs
C-003
The existing machine task authority at .vibepro/stories/{story_id}/tasks/tasks.json must remain unmoved and render deterministically by unique task id and fixed field order into lineage-bearing Tasks Markdown using tasks_markdown renderer version 1; Markdown must never become read authority.
Origin refs
- {"file":"docs/architecture/story-vibepro-routing-profiles-rendered-projections.md","section":"Deterministic Projection and Lineage","text_snippet":".vibepro/stories/{story_id}/tasks/tasks.json"}
C-004
Each semantic artifact must have exactly one writable canonical path, and generated projections must not become read authority.
Origin refs
C-005
artifact_routing schema 0.2.0 introduces named profiles, ownership, and renderers; the new CLI must preserve 0.1.0 repository-global routing, while an old CLI must reject 0.2.0 as unsupported_schema and must not ignore profiles or silently fall back to defaults.
Origin refs
INV-001
schema 0.2.0 repositories must define at least two stable named artifact-routing profiles; each selected profile must independently define story, architecture, accepted_spec, task_plan, graphify, evidence, test_plan, review, gate, and pr without inheritance or cross-profile composition, and any missing kind or collision fails closed.
Origin refs
INV-002
routing must fail closed before any write when the profile is undefined, required variables are missing, or metadata conflicts are detected.
Origin refs
INV-003
VibePro must never overwrite a human_owned packet file, and curated views must remain outside automatic overwrite paths.
Origin refs
S-001
Given catalog-authoritative artifact_profile and feature_slug for a named-profile Story, matching Story-frontmatter mirrors are mandatory and every lifecycle consumer resolves the same profile and context; missing or conflicting mirrors fail before writes, while profile-less legacy/unconfigured Stories may omit mirrors and use only the 0.1.0 fallback contract.
Origin refs
S-002
artifacts resolve JSON/text must report story_id, profile, metadata_source, variables, and per-kind canonical owner/writer/read authority plus projection ownership and renderer; artifacts migrate --dry-run must keep edits_performed at zero and classify each candidate as create, update, noop, or conflict with a non-silent reason after comparing lineage headers and legacy byte copies.
Origin refs
S-003
Story discovery, status, Architecture, Spec, Task, Graphify, Evidence, Test Plan, Review, Gate, PR prepare/create/merge, and migration must each consume one shared resolver result and expose the same profile and feature_slug without local derivation; the workflow state transition is unresolved -> canonical_written -> projections_written -> published, and any resolver or projection failure must stop before the next state while preserving the previously published state; status, gate, and PR summaries must expose the routed surfaces.
Origin refs
S-004
A fresh checkout must resolve story-feature-checkout to feature_packet surfaces under docs/features/checkout-feature and story-governance-checkout to governance_packet surfaces under docs/governance/checkout-governance, including Functional Spec, Tasks, Evidence, Test Plan, Review, Gate, and Release summaries with lineage; resolve JSON/text, status/gate/PR summaries, migration edits_performed zero, and legacy fallback must all be asserted.
Origin refs
Diagrams
flow
flowchart LR Story[Story metadata] --> Resolver[Artifact resolver] Resolver --> Canonical[Writable canonical artifact] Resolver --> Projection[Generated projection] Projection --> View[Human-readable view] Canonical --> Migration[Dry-run migration] Projection -. lineage metadata .-> View
threat_model
flowchart LR Catalog[Catalog authority] --> Resolver[Validated resolver] StoryMirror[Required named-profile Story mirror] --> Resolver Resolver --> Canonical[Canonical artifact] Resolver --> Projection[Generated projection] UntrustedPath[Traversal or symlink input] --> Reject[Fail closed] Reject -. blocks .-> Canonical Reject -. blocks .-> Projection