Revise spec to template: value-only summary, Pain Points, business framing
- Executive Summary → value-only (no solution) - New §4 Pain Points (PP-1..PP-7) - Business Outcomes → §5, restated as business outcomes (adoption/diversity), not solution outputs - Business Use Cases rewritten as solution-agnostic actor-goal scenarios - Renumber per the Solution Design template revision Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
| **Author(s)** | Ben Stull |
|
||||
| **Reviewers / approvers** | Ben Stull |
|
||||
| **Status** | `draft` |
|
||||
| **Version** | v0.1.0 |
|
||||
| **Version** | v0.1.2 |
|
||||
| **Source artifacts** | Reference modeled: retired **BDD Release Planner** (`wiggleverse/wiggleverse-ecomm-bdd-release-planner-app`, RETIRED 2026-06-04) · Related spec: [`docs/design/2026-06-05-three-tier-projects-collections.md`](./2026-06-05-three-tier-projects-collections.md) (§22) · Corpus: ecomm Shopify-modeled BDD (`wiggleverse-ecomm-meta/research/shopify`, ~1,238 scenarios) · Supersedes: — |
|
||||
|
||||
**Change log**
|
||||
@@ -13,96 +13,122 @@
|
||||
| Date | Version | Change | By |
|
||||
| --- | --- | --- | --- |
|
||||
| 2026-06-06 | v0.1.0 | Initial draft from discovery session OHM-0079.0 | Ben Stull |
|
||||
| 2026-06-06 | v0.1.1 | Executive Summary → value-only; add §4 Pain Points; renumber per Solution Design template revision | Ben Stull |
|
||||
| 2026-06-06 | v0.1.2 | Reshuffle (Business Outcomes → §5, business cluster); outcomes restated as business (adoption/diversity), not solution outputs; Business Use Cases rewritten as solution-agnostic actor-goal scenarios (no product reference) | Ben Stull |
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary
|
||||
|
||||
rfc-app gains a generic, **per-collection-configurable metadata system**. A collection declares its fields — `priority`, `tags`, and arbitrary custom fields — in its `.collection.yaml`; each entry's *values* live in a **sidecar** (`<slug>.meta.yaml`) so the document body stays pure prose. rfc-app renders schema-driven forms and **faceted left-pane filters**, and supports fast **single + bulk tag/untag** via direct commits for authorized roles. This restores the *corpus-annotation* capability of the retired BDD Release Planner inside the framework, while keeping release *planning* (ordering, ship status, roadmap emission) a downstream concern that reads the sidecars straight from git.
|
||||
A deployment's corpus is only as valuable as the ability of the people running it to prioritise it, navigate it, and act on it — and as valuable as the downstream tools that can read structured signal out of it. Today that value is stranded: operators and contributors can't rank what matters or find content by what matters, and the tools meant to plan and build from the corpus have nothing structured to consume. This design delivers, for those people, the ability to **rank what matters, find content by what matters, and hand clean machine-readable signal to the collaborators and tools that depend on it** — turning a flat thousand-item corpus into something a team can actually plan and a downstream planner can build on, while keeping the source documents clean and readable. The outcome for the customer: lower-friction corpus planning for operators and contributors, broader adoption by teams whose document types rfc-app couldn't previously serve, and a corpus external tooling can consume without bespoke glue. *(Value summary; scope and mechanism begin at §7.)*
|
||||
|
||||
## 2. Business Context
|
||||
|
||||
The framework hosts RFC standardization for multiple deployments. One deployment hosts the ecomm BDD corpus — ~1,238 Shopify-modeled scenarios, one markdown file per scenario, slugged by feature ID (`DD-FF-NNNN-slug`). A standalone **BDD Release Planner** previously let operators search that corpus, attach metadata (priority P0–P3, owner, status), cluster scenarios into named releases, and emit each release as a roadmap phase. §22 (three-tier projects/collections) absorbed the planner's *corpus hosting* into rfc-app (the corpus now runs as a `bdd` project on the RFC deployment) and the planner was retired — but its *annotation* half (priority/tags on scenarios, filtering, bulk assignment) was never rebuilt. Operators planning work, and downstream tools consuming the corpus, currently have no structured, framework-native way to set or read that metadata.
|
||||
The framework hosts RFC standardization for multiple deployments. One deployment hosts the ecomm BDD corpus — ~1,238 Shopify-modeled scenarios, one markdown file per scenario, slugged by feature ID (`DD-FF-NNNN-slug`). A standalone **BDD Release Planner** previously let operators search that corpus, attach metadata (priority P0–P3, owner, status), cluster scenarios into named releases, and emit each release as a roadmap phase. §22 (three-tier projects/collections) absorbed the planner's *corpus hosting* into rfc-app (the corpus now runs as a `bdd` project on the RFC deployment) and the planner was retired — but its *annotation* half (priority/tags on scenarios, filtering, bulk assignment) was never rebuilt. Operators planning work, and downstream tools consuming the corpus, currently have no structured, framework-native way to set or read that metadata. More broadly, teams evaluating rfc-app for *other* document types often need structured attributes (a priority, a status, domain tags) the platform can't yet express — so they go elsewhere.
|
||||
|
||||
## 3. Problem Statement
|
||||
|
||||
Today rfc-app metadata is weak and intrusive:
|
||||
rfc-app cannot express or surface structured signal about its content. Tags are free-form strings with no filtering; there is no notion of priority or any other collection-defined attribute; the catalog is a flat list; and what little metadata exists is mixed into the top of every document. As a result, a corpus cannot be prioritised, navigated by attribute, planned in bulk, or cleanly consumed by downstream tools — and teams whose workflows depend on such attributes cannot adopt the platform at all.
|
||||
|
||||
- **Tags are free-form strings** with **no filtering** — §7.1 specifies a `Tag:` filter chip that was never implemented.
|
||||
- **No priority**, and no way for a collection to declare any other structured field.
|
||||
- **No per-collection schema** — every collection gets the same fixed frontmatter shape; a `bdd` collection cannot say "scenarios have a P0–P3 priority."
|
||||
- **Metadata pollutes the document body** — a large YAML frontmatter block sits at the top of every doc, mixing rfc-app lifecycle bookkeeping with content metadata.
|
||||
- **No bulk workflow** — annotating hundreds of scenarios one PR at a time is impractical, so the planner's core gesture has no analog.
|
||||
## 4. Pain Points
|
||||
|
||||
Result: corpus authors can't meaningfully prioritise/tag, downstream consumers have nothing structured to read, and documents aren't clean.
|
||||
| # | Pain | Who feels it | Cost / frequency today |
|
||||
| --- | --- | --- | --- |
|
||||
| PP-1 | Scenarios carry no priority, so triage and planning happen off-platform, in spreadsheets and memory | Release planner, contributor | Every planning cycle; signal lives off-platform and goes stale |
|
||||
| PP-2 | The catalog is a flat, unfilterable list — at ~1,200 scenarios, "show me the P0 checkout scenarios" is impractical | Reader, release planner | Every browse/triage; finding the right work is slow and error-prone |
|
||||
| PP-3 | Tags are free-form with no filtering payoff, so they're decorative and go unmaintained | Contributor | Ongoing; the one existing affordance rots |
|
||||
| PP-4 | Annotating many scenarios means opening many PRs, so bulk planning has no home in the tool | Release planner | Every batch; the core planning gesture is effectively impossible |
|
||||
| PP-5 | rfc-app metadata clutters the top of every document, hurting readability and making the corpus awkward to consume cleanly | Reader, downstream consumer | Every read; every downstream integration |
|
||||
| PP-6 | Downstream tools have no structured signal to read — the retired planner's capability left a gap | Downstream consumer | Continuous since the planner's retirement |
|
||||
| PP-7 | Teams whose document types need structured attributes can't model them, so they don't adopt rfc-app | Prospective adopter (org/team) | Every evaluation that ends in "not yet" |
|
||||
|
||||
## 4. Stakeholders / Personas / Actors
|
||||
## 5. Targeted Business Outcomes
|
||||
|
||||
Business outcomes for rfc-app as a platform — adoption, reach, and diversity of use — **not** solution outputs. (Whether documents carry a priority is a solution output, tracked as a slice's Definition of Done in §13, not here.) These are the business change we expect once the pains in §4 are relieved.
|
||||
|
||||
| Outcome | Success metric | Baseline → Target | Guardrail (must not regress) | How / when measured |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Teams blocked by missing structured attributes (priority / structured tags) now adopt rfc-app | # organizations on rfc-app; # active users | internal deployments only → external orgs onboard | existing deployments don't churn | deployment registry + usage analytics; quarterly |
|
||||
| The platform hosts a wider variety of workflows and document types | # distinct document/collection types & field schemas in use; # distinct workflow patterns | today's handful (philosophy RFCs, BDD corpus) → broader mix | existing types' experience unchanged | type/schema census across deployments; quarterly |
|
||||
| Corpus planning happens on-platform rather than in side tools | share of prioritisation/planning done in rfc-app vs spreadsheets | largely off-platform → on-platform | — | operator interviews + usage signals; quarterly |
|
||||
|
||||
## 6. Stakeholders / Personas / Actors
|
||||
|
||||
| Actor | Type | Goal in this design |
|
||||
| --- | --- | --- |
|
||||
| Corpus contributor | persona | Set priority and tags on a scenario when proposing/curating it |
|
||||
| Release planner (operator) | persona | Bulk-prioritise/tag many scenarios quickly to shape a plan |
|
||||
| Collection owner | operator | Declare the metadata fields a collection supports |
|
||||
| Prospective adopter (org/team) | persona | Run a new document-type workflow on rfc-app |
|
||||
| Downstream consumer | system | Read structured per-scenario metadata from the git corpus (e.g. an external release planner) |
|
||||
| Reader | persona | Read clean scenario docs; filter the catalog by priority/tag |
|
||||
|
||||
## 5. Scope
|
||||
## 7. Scope
|
||||
|
||||
- **In scope:** per-collection field schema in `.collection.yaml` (`enum`, `tags`, `text`); per-entry sidecar (`<slug>.meta.yaml`) as source of truth with pure-prose doc bodies; schema-derived faceted left-pane filtering with counts; schema-derived metadata form (detail panel); single + bulk tag/untag with direct commit for authorized roles; dual-read compatibility + a one-shot frontmatter→sidecar migration tool + lazy migration on write.
|
||||
- **Out of scope:** release ordering, ship status, roadmap emission, `RELEASE-PLAN.md` generation — these stay downstream, consuming sidecars from git. In-app management of field definitions / controlled vocabularies; corpus-wide tag rename/merge/delete. Sub-document (per-scenario-within-a-file) grain. A whole-corpus metadata export endpoint.
|
||||
- **Non-goals:** rebuilding a bespoke "release" entity in rfc-app — releases are not modeled here at all; metadata is the only primitive.
|
||||
|
||||
## 6. Assumptions · Constraints · Dependencies
|
||||
## 8. Assumptions · Constraints · Dependencies
|
||||
|
||||
- **Assumptions:** git remains the content source of truth and downstream consumers can read the corpus from git; the BDD grain is one markdown file per scenario (already true for the ecomm corpus), so no sub-document parsing is needed.
|
||||
- **Constraints:** rfc-app is a framework hosting multiple deployments — the upgrade must be **mechanical and non-breaking**, with §20 changelog/upgrade-steps; the hard secrets rule (§6.3) holds; metadata edits must respect scope-role authorization (§22 Part B / S3).
|
||||
- **Dependencies:** the S3 scope-role resolver (`auth.effective_scope_role`) for edit authorization; the existing git write-through path used by `edit-meta` (§9.5); the §22 collection model (`.collection.yaml`, `cached_rfcs` keyed by `(collection_id, slug)`).
|
||||
|
||||
## 7. Targeted Business Outcomes
|
||||
## 9. Business Use Cases
|
||||
|
||||
| Outcome | Success metric | Baseline → Target | Guardrail (must not regress) | How / when measured |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Authors can prioritise/tag scenarios | scenarios carrying a priority | 0 → corpus-wide | doc bodies stay prose-clean | corpus inspection after rollout |
|
||||
| Corpus is filterable | left-pane facet filters available | none → priority+tags+state | filter latency acceptable at ~1.2k entries | manual + perf check |
|
||||
| Downstream tools can consume metadata | sidecars readable from git | none → all migrated entries | sidecar schema stable | consumer integration |
|
||||
| Clean docs | docs with no rfc-app frontmatter | 0% → 100% (post-migration) | dual-read keeps legacy working | post-migration inspection |
|
||||
|
||||
## 8. Business Use Cases
|
||||
Business use cases are **solution-agnostic**: they state what an actor wants to accomplish, *why* (the value), and what *success* looks like — with **no reference to rfc-app or any product**. Each is true regardless of how it's met; in principle a person could satisfy it by hand (a concierge first pass) before any software is built, and only later is it automated. They open with "As a … I can … so that …" and state acceptance in business terms.
|
||||
|
||||
**BUC-1 — As a release planner, I can prioritise the requirements in a body of work, so that I can decide what belongs in upcoming releases.**
|
||||
```gherkin
|
||||
Scenario: BUC-1 — A contributor prioritises a scenario
|
||||
Given a bdd collection whose schema defines a priority field
|
||||
When a contributor marks a scenario as P0
|
||||
Then the scenario's metadata records priority P0
|
||||
And the document body is unchanged prose
|
||||
|
||||
Scenario: BUC-2 — A planner batch-prioritises a set of scenarios
|
||||
Given a contributor has selected 40 scenarios
|
||||
When they set priority P1 on the selection
|
||||
Then all 40 carry priority P1
|
||||
And the change lands as a single auditable commit
|
||||
|
||||
Scenario: BUC-3 — A downstream tool consumes priorities
|
||||
Given scenarios carry priority and tags in their sidecars
|
||||
When an external release planner reads the corpus from git
|
||||
Then it can group and order scenarios using that metadata
|
||||
And rfc-app did not need to model releases at all
|
||||
|
||||
Scenario: BUC-4 — Documents stay clean
|
||||
Given a migrated collection
|
||||
When a reader opens a scenario document
|
||||
Then they see only prose, with no rfc-app metadata block
|
||||
Scenario: BUC-1 — Prioritise to plan releases
|
||||
Given a body of requirements of varying importance
|
||||
When the planner weighs which matter most
|
||||
Then they hold a ranking of those requirements by importance
|
||||
And can decide a release's contents from it
|
||||
```
|
||||
- **Acceptance:** the planner can select and justify the next release's contents from the relative importance of the work.
|
||||
|
||||
- **BUC-1 acceptance:** the scenario's `priority` value is `P0` and its `.md` body is byte-identical to before.
|
||||
- **BUC-2 acceptance:** 40 sidecars updated; exactly one commit; authorship recorded.
|
||||
- **BUC-3 acceptance:** sidecars + `.collection.yaml` are sufficient for a consumer to read priority/tags without rfc-app's API.
|
||||
- **BUC-4 acceptance:** no `---` frontmatter remains in migrated docs.
|
||||
**BUC-2 — As a planner facing a large body of requirements, I can organise and triage it within a normal working session, so that planning actually gets done rather than deferred or improvised.**
|
||||
```gherkin
|
||||
Scenario: BUC-2 — Triage at scale
|
||||
Given more requirements than can be weighed one at a time
|
||||
When the planner ranks and groups them in bulk
|
||||
Then the body of work reflects those decisions without per-item drudgery
|
||||
```
|
||||
- **Acceptance:** a planner moves from an unsorted corpus to a prioritised plan in one sitting.
|
||||
|
||||
## 9. Product Use Cases
|
||||
**BUC-3 — As a team, I want the importance and categorisation of our requirements captured durably and shareably, so that other people and tools can plan from it without re-deriving it.**
|
||||
```gherkin
|
||||
Scenario: BUC-3 — Durable, shareable signal
|
||||
Given requirements that have been weighed and categorised
|
||||
When someone or something else needs to plan from them
|
||||
Then they can read what matters and why without asking the original author
|
||||
```
|
||||
- **Acceptance:** a second party — person or tool — can pick up the work and plan from it unaided.
|
||||
|
||||
**BUC-4 — As a team with a specialised body of documents, I can capture the attributes that make them actionable (importance, status, category), so that I can manage that work the way my domain requires.**
|
||||
```gherkin
|
||||
Scenario: BUC-4 — Manage a domain's work on its own terms
|
||||
Given documents whose usefulness depends on domain-specific attributes
|
||||
When the team records and works with those attributes
|
||||
Then they can run their workflow with the distinctions it depends on
|
||||
```
|
||||
- **Acceptance:** the team can capture and act on the distinctions their domain requires — success is them choosing to manage the work this way.
|
||||
|
||||
**BUC-5 — As someone consuming a large corpus, I can find the items that matter to my current purpose, so that I act on the right things instead of wading through everything.**
|
||||
```gherkin
|
||||
Scenario: BUC-5 — Find what matters
|
||||
Given a large body of items
|
||||
When the consumer looks for the important ones for their task
|
||||
Then they can locate them quickly
|
||||
```
|
||||
- **Acceptance:** a person narrows a large corpus to the relevant, important subset for their task.
|
||||
|
||||
## 10. Product Use Cases
|
||||
|
||||
```gherkin
|
||||
Scenario: PUC-1 — Set priority/tags on a scenario (realizes BUC-1)
|
||||
Scenario: PUC-1 — Set priority/tags on a scenario (realizes BUC-1, BUC-4)
|
||||
Given I am a contributor viewing a scenario whose collection defines priority and tags
|
||||
When I choose P0 in the priority control and add the tag "checkout"
|
||||
Then the metadata panel reflects P0 and the checkout tag
|
||||
@@ -114,27 +140,27 @@ Scenario: PUC-2 — Bulk tag/untag from the catalog (realizes BUC-2)
|
||||
Then every selected scenario shows P1
|
||||
And the bulk change is one commit
|
||||
|
||||
Scenario: PUC-3 — Filter the catalog by facet (realizes BUC-1/BUC-3)
|
||||
Scenario: PUC-3 — Filter the catalog by facet (realizes BUC-5, BUC-1)
|
||||
Given the left pane shows faceted filters generated from the collection schema
|
||||
When I check Priority P0 and tag "checkout"
|
||||
Then the catalog shows only scenarios matching both
|
||||
And each facet value shows its result count
|
||||
|
||||
Scenario: PUC-4 — A collection declares its fields (product-only)
|
||||
Scenario: PUC-4 — A collection declares its fields (realizes BUC-4)
|
||||
Given a collection owner edits .collection.yaml to add a priority enum field
|
||||
When the collection is re-ingested
|
||||
Then the priority filter and the priority form control appear automatically
|
||||
|
||||
Scenario: PUC-5 — Migrate a collection to clean docs (product-only)
|
||||
Scenario: PUC-5 — Migrate a collection to clean docs (product-only; enables BUC-3)
|
||||
Given a collection whose docs still carry top-of-doc frontmatter
|
||||
When the operator runs the frontmatter→sidecar migration
|
||||
Then each doc body becomes pure prose and a sidecar holds its metadata
|
||||
And rfc-app reads the collection identically before and after
|
||||
```
|
||||
|
||||
## 10. UX Layout
|
||||
## 11. UX Layout
|
||||
|
||||
### 10.1 Screen: Catalog (left pane) (serves PUC-3)
|
||||
### 11.1 Screen: Catalog (left pane) (serves PUC-3)
|
||||
|
||||
- **Purpose:** browse and filter a collection's entries.
|
||||
- **Layout (top → bottom):**
|
||||
@@ -142,21 +168,21 @@ Scenario: PUC-5 — Migrate a collection to clean docs (product-only)
|
||||
- **Faceted filter groups** (one per schema field + state): each is a collapsible group showing per-value **result counts** and multi-select checkboxes; `tags`-type fields include a "filter values…" search box to stay usable at 30+ values. (Chosen layout: faceted groups with counts — validated in brainstorming over flat chips.)
|
||||
- **States:** happy: facets with counts · empty: "no entries match these filters" with a clear-filters action · loading: skeleton facets · error: "couldn't load facets" with retry.
|
||||
|
||||
### 10.2 Screen: Scenario detail — metadata panel (serves PUC-1)
|
||||
### 11.2 Screen: Scenario detail — metadata panel (serves PUC-1)
|
||||
|
||||
- **Purpose:** view/edit one entry's metadata.
|
||||
- **Layout:** a panel rendering one control per schema field — `enum` → single-select; `tags` → removable chips + add-tag input (with existing AI suggest where applicable); `text` → text input. The document body renders below as pure prose; metadata never appears inline in the body.
|
||||
- **States:** read (role without edit) shows values, no controls · edit (authorized) shows controls · saving: inline spinner · error: field-level validation message (e.g. "P5 is not an allowed priority").
|
||||
|
||||
### 10.3 Screen: Catalog — bulk action bar (serves PUC-2)
|
||||
### 11.3 Screen: Catalog — bulk action bar (serves PUC-2)
|
||||
|
||||
- **Purpose:** apply a field value to many entries at once.
|
||||
- **Layout:** selecting ≥1 row reveals a sticky action bar: "*N* selected · Set priority ▾ · Add tag ▾ · Remove tag ▾ · Clear". Each action targets one field; applying commits once.
|
||||
- **States:** none selected: bar hidden · applying: bar shows progress · partial failure: toast naming entries that failed validation, others applied.
|
||||
|
||||
## 11. Technical Design
|
||||
## 12. Technical Design
|
||||
|
||||
### 11.1 Invariants
|
||||
### 12.1 Invariants
|
||||
|
||||
- **INV-1:** The sidecar (`<slug>.meta.yaml`) is the source of truth for entry metadata; `cached_rfcs` is a derived index, fully rebuildable from git.
|
||||
- **INV-2:** A document body (`.md`) never contains rfc-app metadata once migrated; metadata lives only in the sidecar.
|
||||
@@ -165,7 +191,7 @@ Scenario: PUC-5 — Migrate a collection to clean docs (product-only)
|
||||
- **INV-5:** A collection with no `fields:` block behaves exactly as today (free-form `tags` only) — the feature is additive and opt-in per collection.
|
||||
- **INV-6:** Dual-read holds throughout: parser reads the sidecar if present, else legacy top-of-doc frontmatter, with identical resulting in-memory records.
|
||||
|
||||
### 11.2 High-level architecture
|
||||
### 12.2 High-level architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
@@ -190,7 +216,7 @@ flowchart LR
|
||||
- **ingest/parser** — owns reading `.collection.yaml` schema + sidecars (or legacy frontmatter), validating values, and rebuilding `cached_rfcs`; must never treat the DB as authoritative.
|
||||
- **API** — owns serving the schema, filtered lists with facet counts, and metadata edits; must never write metadata anywhere but the sidecar in git.
|
||||
|
||||
### 11.3 Data model & ownership
|
||||
### 12.3 Data model & ownership
|
||||
|
||||
| Entity | Owned by | Key fields | System of record |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -211,14 +237,14 @@ tags: [dashboard, analytics]
|
||||
owner: hasan
|
||||
```
|
||||
|
||||
### 11.4 Interfaces & contracts
|
||||
### 12.4 Interfaces & contracts
|
||||
|
||||
- **`GET /api/projects/<p>/collections/<c>`** — out: collection incl. `fields` schema. Errors: 404.
|
||||
- **`GET /api/projects/<p>/collections/<c>/rfcs`** — in: filter params (`?priority=P0&tags=checkout&state=active`, repeatable for multi-value/OR-within-field, AND across fields) · out: entries with metadata values **+ `facets: {field → {value → count}}`**. Errors: 400 on unknown field.
|
||||
- **`POST /api/projects/<p>/collections/<c>/rfcs/<slug>/meta`** — in: `{field: value, …}` · out: updated values · effect: validate vs schema → write sidecar → commit directly → re-ingest entry. Errors: 403 (role), 422 (invalid value).
|
||||
- **`POST /api/projects/<p>/collections/<c>/meta/bulk`** — in: `{slugs: […], op: set|add|remove, field, value}` · out: `{applied: […], rejected: [{slug, reason}]}` · effect: validate → write N sidecars → **one** commit → re-ingest. Errors: 403, 422.
|
||||
|
||||
### 11.5 Per–Product-Use-Case design
|
||||
### 12.5 Per–Product-Use-Case design
|
||||
|
||||
#### PUC-2 — Bulk tag/untag
|
||||
|
||||
@@ -244,7 +270,7 @@ sequenceDiagram
|
||||
|
||||
- **Implementation:** a tool (framework CLI verb / `tools/` script) walks a collection, and for each entry with legacy frontmatter, writes `<slug>.meta.yaml` from the frontmatter and rewrites `<slug>.md` to the body only — one commit per collection, idempotent. Dual-read (INV-6) means this can run anytime; lazy migration converts stragglers on their first metadata edit.
|
||||
|
||||
### 11.6 Non-functional requirements & cross-cutting concerns
|
||||
### 12.6 Non-functional requirements & cross-cutting concerns
|
||||
|
||||
- **Security & privacy:** metadata edits gated by `auth.effective_scope_role` (contributor+ on the collection); no secrets in sidecars; git history records authorship.
|
||||
- **Performance & scale:** facet counts computed from the derived DB; must stay responsive at ~1.2k entries with dozens of tag values (indexed value columns / aggregation query).
|
||||
@@ -252,7 +278,7 @@ sequenceDiagram
|
||||
- **Observability:** log each metadata commit (actor, field, entry count); warn-log schema validation failures encountered on ingest.
|
||||
- **Accessibility:** facet groups and form controls keyboard-navigable; checkboxes labelled with value + count.
|
||||
|
||||
### 11.7 Key decisions & alternatives considered
|
||||
### 12.7 Key decisions & alternatives considered
|
||||
|
||||
| Decision | Chosen | Alternatives | Why |
|
||||
| --- | --- | --- | --- |
|
||||
@@ -263,50 +289,50 @@ sequenceDiagram
|
||||
| Edit governance | Direct commit for authorized roles (bulk = 1 commit) | PR per change | Bulk planning is impractical via PR-per-toggle |
|
||||
| Mgmt UI | Deferred; edit `.collection.yaml` in git | In-app field/vocab management in v1 | Smallest coherent v1 |
|
||||
|
||||
### 11.8 Testing strategy
|
||||
### 12.8 Testing strategy
|
||||
|
||||
Unit tests for: schema parsing (`fields:` block, all types, missing block); sidecar read/write round-trip; dual-read equivalence (frontmatter vs sidecar produce identical records); schema validation (reject bad enum, accept free-form tag); facet aggregation; bulk op (set/add/remove, single commit, partial-rejection). Two-tier local-Docker→PPE for the API + git write-through. "Tested" = the PUC acceptance scenarios pass plus the migration is proven idempotent and reversible-on-read.
|
||||
|
||||
### 11.9 Failure modes, rollback & flags
|
||||
### 12.9 Failure modes, rollback & flags
|
||||
|
||||
- **Failure mode:** invalid value committed out-of-band → on ingest, warn + load entry with the raw value flagged (INV-3); not surfaced as a filter facet count error.
|
||||
- **Failure mode:** re-ingest fails after commit → git is authoritative; full rebuild recovers.
|
||||
- **Migration rollback:** dual-read means an un-migrated or partially-migrated corpus still works; the migration commit is revertible.
|
||||
- **Feature flag:** the feature is inherently opt-in per collection (INV-5) — no global flag needed; absent a `fields:` block, behavior is unchanged.
|
||||
|
||||
## 12. Delivery Plan
|
||||
## 13. Delivery Plan
|
||||
|
||||
### 12.1 Approach / strategy
|
||||
### 13.1 Approach / strategy
|
||||
|
||||
Build the storage/compat foundation first (sidecars + dual-read + migration) so nothing breaks, then the schema, then read (filtering), then write (single, bulk). Each slice is shippable and non-breaking.
|
||||
|
||||
### 12.2 Slicing plan
|
||||
### 13.2 Slicing plan
|
||||
|
||||
#### SLICE-1 — Sidecar storage + dual-read + migration → completes PUC-5
|
||||
- **Depends on:** —
|
||||
- **DoD:** parser reads sidecar-if-present else legacy frontmatter (INV-6); migration tool splits frontmatter→sidecar idempotently; existing collections load byte-identically; tests green.
|
||||
- **Definition of done:** parser reads sidecar-if-present else legacy frontmatter (INV-6); migration tool splits frontmatter→sidecar idempotently; existing collections load byte-identically; tests green.
|
||||
|
||||
#### SLICE-2 — Collection field schema + validation → completes PUC-4
|
||||
- **Depends on:** SLICE-1
|
||||
- **DoD:** `.collection.yaml fields:` parsed (`enum`/`tags`/`text`); values validated on read (warn) and on write (reject); schema served via the collection API; no-`fields:` collections unchanged (INV-5).
|
||||
- **Definition of done:** `.collection.yaml fields:` parsed (`enum`/`tags`/`text`); values validated on read (warn) and on write (reject); schema served via the collection API; no-`fields:` collections unchanged (INV-5).
|
||||
|
||||
#### SLICE-3 — Faceted left-pane filtering (read) → completes PUC-3
|
||||
- **Depends on:** SLICE-2
|
||||
- **DoD:** list endpoint returns facet counts + honors filter params; left pane renders faceted groups with counts and tag-value search; filters compose (AND across fields).
|
||||
- **Definition of done:** list endpoint returns facet counts + honors filter params; left pane renders faceted groups with counts and tag-value search; filters compose (AND across fields).
|
||||
|
||||
#### SLICE-4 — Single-entry metadata edit → completes PUC-1
|
||||
- **Depends on:** SLICE-2
|
||||
- **DoD:** detail metadata panel renders schema controls; `POST …/meta` validates, direct-commits the sidecar, re-ingests; authorized by scope-role (INV-4); lazy-migrates a legacy entry on first edit.
|
||||
- **Definition of done:** detail metadata panel renders schema controls; `POST …/meta` validates, direct-commits the sidecar, re-ingests; authorized by scope-role (INV-4); lazy-migrates a legacy entry on first edit.
|
||||
|
||||
#### SLICE-5 — Bulk tag/untag → completes PUC-2
|
||||
- **Depends on:** SLICE-3, SLICE-4
|
||||
- **DoD:** multi-select + bulk action bar; `POST …/meta/bulk` applies set/add/remove as one commit; partial-rejection reported.
|
||||
- **Definition of done:** multi-select + bulk action bar; `POST …/meta/bulk` applies set/add/remove as one commit; partial-rejection reported.
|
||||
|
||||
### 12.3 Rollout / launch plan
|
||||
### 13.3 Rollout / launch plan
|
||||
|
||||
Pre-v1, single production: ship slices in order to the RFC deployment; each minor-version bump carries §20 changelog + upgrade steps. The opt-in-per-collection nature (INV-5) means a deployment adopts it only when it declares a `fields:` block and (optionally) runs the migration.
|
||||
|
||||
### 12.4 Risks & mitigations
|
||||
### 13.4 Risks & mitigations
|
||||
|
||||
| Risk | L/I | Mitigation |
|
||||
| --- | --- | --- |
|
||||
@@ -316,18 +342,18 @@ Pre-v1, single production: ship slices in order to the RFC deployment; each mino
|
||||
| Overlap/conflict with §22 S6 "type modules" | M/M | Position as §23, generalizing S6's per-type frontmatter; reconcile at the S6 SPEC merge |
|
||||
| Facet aggregation slow at scale | L/M | Compute from indexed derived DB; measure at ~1.2k entries |
|
||||
|
||||
## 13. Traceability matrix
|
||||
## 14. Traceability matrix
|
||||
|
||||
| Business UC | Product UC | Slice | Tests |
|
||||
| --- | --- | --- | --- |
|
||||
| BUC-4 | PUC-5 | SLICE-1 | `test_dual_read_equiv`, `test_migration_idempotent` |
|
||||
| — (product-only) | PUC-4 | SLICE-2 | `test_schema_parse`, `test_validation` |
|
||||
| BUC-1/BUC-3 | PUC-3 | SLICE-3 | `test_facet_counts`, `test_filter_compose` |
|
||||
| BUC-1 | PUC-1 | SLICE-4 | `test_single_meta_commit`, `test_authz` |
|
||||
| BUC-2 | PUC-2 | SLICE-5 | `test_bulk_one_commit`, `test_partial_reject` |
|
||||
| BUC-3 | (consumer reads git) | — | `test_sidecar_schema_stable` |
|
||||
| Pain | Business UC | Product UC | Slice | Tests |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| PP-5 | BUC-3 | PUC-5 | SLICE-1 | `test_dual_read_equiv`, `test_migration_idempotent` |
|
||||
| PP-7 | BUC-4 | PUC-4 | SLICE-2 | `test_schema_parse`, `test_validation` |
|
||||
| PP-2 | BUC-5, BUC-1 | PUC-3 | SLICE-3 | `test_facet_counts`, `test_filter_compose` |
|
||||
| PP-1, PP-3 | BUC-1, BUC-4 | PUC-1 | SLICE-4 | `test_single_meta_commit`, `test_authz` |
|
||||
| PP-4 | BUC-2 | PUC-2 | SLICE-5 | `test_bulk_one_commit`, `test_partial_reject` |
|
||||
| PP-6 | BUC-3 | (consumer reads git) | — | `test_sidecar_schema_stable` |
|
||||
|
||||
## 14. Open Questions & Decisions log
|
||||
## 15. Open Questions & Decisions log
|
||||
|
||||
**Open**
|
||||
|
||||
@@ -350,10 +376,11 @@ Pre-v1, single production: ship slices in order to the RFC deployment; each mino
|
||||
| D7 | Edit governance | Direct commit for authorized roles; bulk = 1 commit | 2026-06-06 |
|
||||
| D8 | Management scope | Deferred; edit `.collection.yaml` in git for v1 | 2026-06-06 |
|
||||
|
||||
## 15. Glossary & References
|
||||
## 16. Glossary & References
|
||||
|
||||
- **Sidecar** — `<slug>.meta.yaml`, the per-entry metadata file that is the source of truth; keeps the `.md` body pure prose.
|
||||
- **Field schema** — the `fields:` block in `.collection.yaml` declaring a collection's typed metadata fields.
|
||||
- **Facet** — a schema field surfaced as a left-pane filter group with per-value counts.
|
||||
- **Downstream consumer** — an external tool (e.g. a release planner) that reads corpus metadata from git; rfc-app does not model releases.
|
||||
- **References:** retired BDD Release Planner (`wiggleverse-ecomm-bdd-release-planner-app`); §22 three-tier design (`docs/design/2026-06-05-three-tier-projects-collections.md`); SPEC §7.1 (left-pane filter), §9.5 (edit-meta), §20 (versioning), §22 Part B / S3 (scope-role).
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user