Repository navigation
Description
Problem Statement
As the maintainer of the new home skill, I face three risks that all look like
"the new work losing what the old work already had": scenario identities like
SM2-3 read as alphabet soup and must never become identifiers in new code;
the HELP page must carry every underlying link of prompt to wake word to
command to HTML rather than breaking the chain in the middle; and the old
skill's pages are already beautiful, so rebuilding from a blank page would
throw away real design work including scenario prototypes like outfit picking.
Solution
Publish one thin specification that locks three things at once: a naming rule
under which runtime code only speaks command keys, Chinese command names and
page-family names while letter codes stay in the fact source and the machine
appendix; a chain rule under which every scenario row renders its four links
and a machine gate fails when any row drops one; and a precedent rule under
which domain tickets start from the inventoried legacy templates and the wall
review guards the visual bar.
User Stories
- As a maintainer, I want runtime code to contain zero letter-coded scenario
identifiers, so that reading the code never requires a lookup table. - As a maintainer, I want scenario identity to keep exactly one stable form
in exactly one place, so that renames never fork the truth. - As a maintainer, I want every HELP scenario to show its wake words next to
its prompt, so that the first two links are visible where the user reads. - As a maintainer, I want every lookup row to resolve its wake word back to
the same command, so that the middle link is machine-checked. - As a maintainer, I want every command run to land an HTML file plus an
absolute delivery path, so that the last link is a file the user can open. - As a maintainer, I want one overview page with one row per scenario
carrying prompt, wake words, command and absolute artifact path together,
so that the whole chain is reviewable in one place. - As a maintainer, I want a machine gate that runs the full row table on
every test run, so that a dropped link turns the suite red instead of
becoming a rumor. - As a domain-ticket worker, I want to start from the inventoried legacy
template for my family, so that proven layout and copy are inherited. - As a domain-ticket worker, I want the required blocks per family as a
machine-readable table, so that I implement content presence rather than
guessing what must be shown. - As a closing reviewer, I want the wall to cover desktop and mobile widths
with per-page review records, so that the visual bar is dimensioned
evidence rather than taste. - As a future maintainer, I want legacy sources to stay read-only reference,
so that the old pages can always be re-audited against the new ones. - As a future maintainer, I want any prototype found outside the warehouse
registered into the inventory, so that getting it into the warehouse
means it can never be lost again.
Implementation Decisions
- Names in runtime code come only from the help grouping vocabulary: command
keys, user-facing command names and page-family names. Letter codes remain
the stable primary key of the scenario inventory and the machine appendix
and never appear as identifiers, file names or runtime values. - Comments and test fixtures follow the same rule; the only sanctioned
mentions of letter codes outside the inventory are explicit traceability
notes that name the host scenario in words first. - The chain is rendered in two cooperating surfaces: the HELP surface carries
prompt plus wake words plus the lookup rows that resolve each word to its
command, while the chain overview surface carries one row per scenario with
prompt, wake words, command and absolute artifact path as text plus a
clickable link with a no-script fallback. - The overview page never computes file names: it reads them from the
delivery manifest, so the naming rule stays in exactly one place. - Domain pages start from the inventoried legacy template of their family and
diverge only with a recorded reason per change; information-structure fit
inside one family is handled with mode variants before any split. - The visual bar is guarded by style and copy machine checks adapted from
prior art plus the dual-width wall with a composite score floor.
Testing Decisions
- A good test checks externally visible behavior: every row resolves, every
file exists at its reported path with equal byte counts, every family shows
its required blocks. It never asserts template internals or styling taste. - Tested units are the row table completeness, the word-to-command mapping,
the delivery receipt integrity, the required-blocks presence per family and
the wall self-check in both directions. - Prior art followed: the content-asset digest lock that fails on any drift,
the wake-word reconciliation that fails on unmapped words, the wall
generator self-check with positive and negative cases, and the SKILL block
freshness check that reproduces the injected block.
Out of Scope
- The three link-domain scenarios and their pages, which keep only a registry
entry. - Release and on-machine installation, which is a separate ticket.
- The legacy skill source, which stays read-only reference.
- New wake-word rulings themselves, which belong to the wake-word layer and
are only referenced here.
Further Notes
- This specification consolidates the maintainer's review decisions on naming,
chain presentation and prototype inheritance raised during the machine
implementation ticket under map 797: runtime code is already free of letter
codes (remaining mentions are comments and fixtures pending cleanup), the
row table already runs 125 rows green, and the 49 legacy templates stand
inventoried with per-family required blocks. - Part of map 797.
进度:100%
验收(2026-09-23,四条判据逐条实跑;下表读数由本席复跑,与执行席回报一致):
| 判据 | 命令 | 读数 |
|---|---|---|
| ① 命名纪律 | node packages/skill-home/scripts/audit-naming.mjs |
PASS 0 处越界(改前 827 处/67 件);命令中文名 70/70 唯一 |
| ① 门在套件里 | node --test packages/skill-home/test/*.test.mjs |
344/344 exit 0(含新接的 test/naming-discipline.test.mjs) |
| ② 链路四段 | gen-chain-page.mjs .scratch/859/batch70 |
70 行/70 链接/缺失 0 → 可发 |
| ② 双端墙 | gen-scene-wall.mjs --check .scratch/859/batch70 手机墙-390.html |
正例 70 格/354 链接/缺失 0 → 可发 exit 0;反例(清单点名一个盘上没有的名字)缺失 1 → 不可发 exit 1 并点名 |
| ③ 必需块 | audit-page-blocks.mjs --dir .scratch/859/batch70 --manifest … --blocks … |
70/70 PASS(逐件真按族查:22/22、23/23、25/25 …) |
| 契约单接缝 | node docs/skills/skill-home/check-scene-contract.mjs |
PASS(命名 70 文件唯一稳定) |
| 派生件 | gen-cli.mjs --check |
exit 0(三件与生成器逐字节一致) |
| 端到端 | t817-run-70-scenes.mjs --out .scratch/859/batch70 |
70/70 PASS,70 份真产物落新名字(如 借用_20260923_090331.html,不再含场景 id) |
四条口径落地:① 产物名 <命令中文名>_<戳>.html(取代段去掉);② 规格 + 机器门 + 代码清理一起落;③ 「词 → 命令」仍落速查面(HELP 页未动);④ 仓库外原型只登记不复制(册子 §六)。
四批提交:063232c3(命名改版+薄规格)/0af70b4b(独立审计件)/1cc1156e(全包去码 827→0,72 件)/批 4(审计件接进 test 门+跑批件对账改按命令中文名)。
对抗式自查揪出并当场修掉的一处连带伤(票面没写,是本票改名引起的):scripts/page-blocks.json 的认族口原按旧文件名段 _(场景 id)_ 认族,改名后匹配不上真产物 ⇒ 结构判据静默退回 7 条默认块(看着全绿其实没查)。已把认族口改成「命令中文名开头」+夹具与说明同步,并用新产物的 70/70(逐件真块数)证回覆盖。
遗留(据实登记,不在本票目的地内):地图 #797 的收口证据里,逐页复核是按旧文件名签的字——页面内容一字未动,复核结论仍有效,只有证据件里的文件名成了历史名;photos 三页(5-1/5-2/5-3)的墙格与复核仍待图外票 #889 落地后重签,与本票无关、原样保留。
Activity
FeatherHunter commentedon Sep 23, 2026
结论(2026-09-23,验收全绿后关闭)
三条规则一次锁死,且各自有门:命名纪律(产物名 <命令中文名>_<戳>.html,场景 id 只住事实源与机器附录;scripts/audit-naming.mjs 零越界,已接进包内 test 门)/链路四段呈现(prompt·唤醒词·命令·HTML 绝对路径分落 HELP 速查面与链路总览页,行表门 125 行)/老原型借鉴(册子表一 49 + §三④ 18 + §六 10 份仓库外原型进货;必需块走机器附录+判据件)。
落地读数:全包去码 827→0(67 件);包内 344/344 exit 0;70 条场景端到端 70/70 PASS 落新名字;双墙 70 格/354 链接/缺失 0(反例 exit 1 点名);链路总览 70 行/70 链接;结构判据对新产物 70/70 PASS;契约单接缝与 gen:check 均 exit 0。
薄规格:docs/skills/skill-home/naming-chain-precedent.md。批产 .scratch/859/batch70/(产物/双墙/总索引/链路总览页)。
连带修掉一处静默退化:改名后 page-blocks.json 的旧认族口匹配不上真产物、结构判据退回默认 7 块——已改「命令中文名开头」并用新产物 70/70 证回覆盖。
遗留:地图 #797 证据件里的文件名成历史名(页面内容未动、复核结论仍有效);photos 三页墙格待 #889 重签。
#859 US12 原型进货:册子新增「仓库外原型附录」,补登 10 份未登记设计原型(拼贴卡 6 份+HELP 页 4 份,含祖先关系硬证据)
#859 命名纪律落地(批1/3):产物名改 <命令中文名>_<戳>.html(不再拼场景 id);sceneNaming 行表去 id、…
#859 命名纪律批2/3:独立审计件 scripts/audit-naming.mjs(R2 零越界+R3 命令中文名唯一,可 --ex…
#890 取数层值(第二批):票据凭证域五类命令把回执与清单补到页面能真渲染(只增字段,既有键与形状不动)
#859 命名纪律批3/3:全包去码 827→0(72 件)——46 个页模块 PAGE_META.scenarios 改 rows:[{…
#859 命名纪律批4/4:命名审计件接进包内 test 门(test/naming-discipline.test.mjs,唯一实现仍是…
#859 收尾:地图 #797 的 Decisions so far 追加本票 gist(正文与源文件 html-scenes-map-b…