Repository navigation
Description
Problem Statement
As the maintainer of the home skill, I face 70 scenarios that must each get a real page, built in parallel across 11 work tickets. Without a frozen contract covering shape, artifact naming, page-family assignment, per-ticket write sets, and shared-part ownership, each ticket will invent its own layout and the results will never merge. Today the old implementation names artifacts 1:1 from template to Chinese name so shared templates overwrite each other, the current key-to-template mapping is 1:1 while one command covers up to nine scenarios, and every ticket must touch the same five shared parts to ship anything.
Solution
Publish one thin contract, frozen in three layers, that lets 11 tickets merge without negotiation: capability shape and write sets plus shared ownership freeze first so machine work can start; the page-family table freezes next; artifact naming and the required-blocks table freeze last without blocking anyone. Artifact file names carry the stable scenario identity, page families freeze as assembly boundaries with a patch flow for later splits, and the required-blocks list is derived from the existing inventory rather than hand-copied a second time.
User Stories
- As a maintainer, I want the contract to freeze capability shape first, so that machine work can start before naming and family boundaries are settled.
- As a maintainer, I want artifact file names to carry the Chinese command name plus the scenario id plus a timestamp, so that 70 scenarios never overwrite each other and renames of wake words never break file identity.
- As a maintainer, I want readability to live on the chain overview page as wake-word aliases, so that file names stay stable while humans still see familiar words.
- As a maintainer, I want the 46 page-family names frozen as assembly boundaries first, so that tickets can start without waiting for a thousand-line split rationale.
- As a maintainer, I want information-structure differences inside one family handled with mode variants first, so that the contract does not explode before work starts.
- As a maintainer, I want a patch flow where scaffold work can propose a family split back to the contract, so that real misfits get fixed without blocking everyone upfront.
- As a maintainer, I want write sets split by page-family files, so that tickets in the same domain never touch the same file.
- As a maintainer, I want shared parts owned by exactly one machine ticket, so that domain tickets never collide on registries, manifests, or generated artifacts.
- As a maintainer, I want the link domain to keep only a registry row with no directory, so that the out-of-scope domain leaves no empty shells behind.
- As a machine-ticket implementer, I want the two-level resolution signature of command plus scenario preset to page family, so that one command serving many scenarios resolves deterministically.
- As a machine-ticket implementer, I want the wake-word-to-family question owned by the wake-word spec with only a reference here, so that two tickets never rule on the same words twice.
- As a chain implementer, I want the single naming function as the only rule for default artifact output, so that delivery and overview tooling never invent competing names.
- As a chain implementer, I want receipts to carry the absolute artifact path plus a byte count equal to the on-disk size, so that broken or missing output is detectable.
- As a seed-data author, I want the required-blocks table derived from the existing inventory rows, so that I seed exactly the fields each family must show.
- As a criteria author, I want the required-blocks list as one machine-readable table, so that structural checks test content presence rather than file existence or visual taste.
- As a generator author, I want file names read from the manifest rather than computed inside the generator, so that the naming ruling stays in exactly one place.
- As a generator author, I want wake-word variants and unmapped words to appear only as alias annotations on the host scenario row, so that they never claim new cells or new pages.
- As a scaffold author, I want one scaffold command that emits the same-shaped skeleton for every family, so that domain tickets fill content instead of inventing file shapes.
- As a scaffold author, I want each family skeleton to register its required blocks at generation time, so that the structural criteria consume them without hand transcription.
- As a scaffold author, I want families the scaffold cannot shape listed back to the contract, so that human shaping has an explicit backlog.
- As a domain-ticket worker, I want my ticket to touch only my families files, so that parallel tickets merge cleanly.
- As a domain-ticket worker, I want the first step of my ticket to be running the scaffold, so that I never hand-copy a sample.
- As a domain-ticket worker, I want empty, abnormal, and intercepted states specified per family, so that edge states are built rather than improvised.
- As a closing reviewer, I want per-page review records plus a wall covering both desktop and mobile widths, so that the final score summarizes dimensioned evidence rather than replacing it.
- As a closing reviewer, I want the wall generator to fail loudly naming the missing file, so that a broken manifest can never look green.
- As a closing reviewer, I want the chain overview page to render absolute paths as both text and clickable links with a no-script fallback, so that every artifact opens from the page.
- As a future maintainer, I want every family change to carry its reason, so that merges and splits stay reviewable years later.
- As a future maintainer, I want the lock upper bound plus ticket-scoped queuing, so that parallel runs wait at most ten minutes instead of hanging forever.
- As a future maintainer, I want contract changes to trigger only the affected domain tickets to re-run their criteria, so that disjoint write sets keep fixes local.
- As a future maintainer, I want anything ruled out of scope recorded on the map, so that dropped work is a decision rather than a rumor.
Implementation Decisions
- The contract freezes in three layers: shape plus write sets plus shared ownership first, page-family function signature plus the 46-name table second, naming function plus required-blocks table last without blocking work.
- Capability shape follows the calorie precedent: eight capability directories named from the top-level help groupings, each with a capability gate plus command, route, and per-family page modules.
- The artifact file-name function is the stable variant: Chinese command name, scenario id, timestamp. The scenario id is the stable primary key from the scenario inventory; the timestamp keeps concurrent outputs unique; wake words never enter the file name.
- Human readability is a presentation concern: the chain overview page annotates each row with its wake words, including the combined name for the dual-word trip scenario.
- Page families are assembly boundaries: one family equals one template plus one page module. The 46 names freeze on the legacy template names first; information-structure fit is handled inside the family with mode variants.
- Family splits and merges travel a patch flow: scaffold or domain work proposes the change back to the contract, the contract records the reason per change, and only affected tickets re-run their criteria.
- Resolution is a two-level function from command plus scenario preset to page family. Wake-word-to-family placement is referenced from the wake-word specification, never re-ruled here.
- The required-blocks list is derived, not transcribed: each family's fields, operations, empty and abnormal states, and status vocabulary equal the corresponding inventory row, published once as a machine-readable table consumed by criteria and scaffold registration.
- Same-domain tickets stay disjoint by page-family files. Shared parts have exactly one writer. The link domain keeps a registry row only.
- Lock discipline is an upper bound plus ticket-scoped queuing: at most ten minutes, with the holding ticket visible instead of blind waiting.
- Testing seam: a single contract check is preferred over scattered assertions. The highest seam is the contract document plus its machine-readable appendix validated as one unit; new seams are proposed only if no existing check can consume the appendix.
Testing Decisions
- A good test for this contract checks externally visible behavior: the document has the promised sections, the family table resolves every scenario, the naming function yields unique stable names, and the required-blocks table matches the inventory. It never asserts implementation details such as template internals or styling.
- Tested units are the contract document structure, the page-family resolution table, the artifact naming function with illegal-character and stability cases, the per-domain write-set disjointness, the shared-part single-writer rule, and the required-blocks derivation against the inventory.
- Prior art followed by these tests: the help-asset digest lock that fails on content drift, the wake-word three-way reconciliation that fails on unmapped words, the wall generator self-check that passes a positive case and fails naming the missing file on a negative case, the scaffold assembly test that renders through the real command chain plus its mutation proof, and the delivery receipt mutation proof where breaking the output location or deleting the delivery section turns the suite red.
Out of Scope
- The three link-domain scenarios and their pages, which keep only a registry entry.
- The help page itself, already delivered and approved.
- Release and on-machine installation, which is a separate ticket; this contract judges warehouse runs plus artifacts plus wall review only.
- The legacy skill source, which stays read-only reference including its pre-existing flat templates.
- The other six skills, which this finish does not touch.
- The shared lock tool default, which this contract works around with its own upper bound rather than fixing.
- New wake-word rulings themselves, which belong to the wake-word specification and are only referenced here.
- Domain page content implementation, which belongs to the eleven domain tickets consuming this contract.
Further Notes
- This specification solidifies the round-2 grilling conclusions on contract ticket 799 under map 797: naming takes the stable variant, families freeze first with a patch flow, and the contract lands in three layers. The condensed decision page and the scenario inventory table are linked from the originating discussion.
- The originating contract ticket stays human-gated: it passes only with the maintainer's explicit approval words in its comments, and it is not closed before that approval exists.
- Seams for review: the single preferred seam is the contract document plus machine-readable appendix check described above; confirm this seam matches expectations before adding any further test seams.
- Part of map 797.
Activity
FeatherHunter commentedon Sep 21, 2026
进度:100%
决议:规格单 30 条故事+11 条实施决策全部落地为薄契约三件套,可关闭。
交付物(commit acc2b02):
验收自查(对抗式):
下一步:放行票 3 按契约实施;契约变更走补丁流(回写本契约+受影响票重跑判据)。
FeatherHunter commentedon Sep 21, 2026
关闭:100% 通过验收,三件套已入仓(commit acc2b02),单接缝正反例走过。放行票 3。
契约实施#846:场景页契约三层冻结+46族附录+单接缝检查