[S8/PR1] fix appendix generators A/B/D/F + E↔C16 link#75
Merged
Conversation
Per YAO-154 (S8) review consensus. PR1 in 2-PR split; PR2 will add
C's hooks-trigger-map.json + 15 hook events.
- gen-tool-table.ts (A): tighten feature-gated detection. Previous
per-segment scan only caught `require(...).XxxTool` single-assignment
form, missing arrays like `cronTools = feature(...) ? [require(...).X,
require(...).Y] : []` and missing the gate keyword for every entry.
Now scans every `require('./tools/<dir>/<file>.js').XxxTool` and
attributes it to the enclosing `const NAME =` statement if that
statement contains a gate keyword. Recount: 0 → 19 feature-gated.
- gen-commands-table.ts (B): the static-import regex required `{...}`
named-import braces, but commands.ts uses mostly `import foo from
'./commands/foo/...'` (default imports). Recount: 3 → 92 statically
imported. Also report dynamic-only require() count (16) and any
directory unreferenced by commands.ts (0). Adds a "条件 require 装载"
section.
- gen-agents-table.ts (D): drop the synthetic `displayName` column
(source `BuiltInAgentDefinition` has no such field). Replace with
`whenToUse(首句节选)`, no 80-char truncation, and resolve
`whenToUse: SOME_CONSTANT` references against the same file and
sibling built-in/ files (Explore / verification now render).
- gen-module-matrix.ts (F): rewrite the orphan/whitelist footer to
spell out why allowlisted dirs (utils/, context/) still show
chapters in the reverse index — preempts the "5 vs 4" confusion
flagged in review.
- gen-tasktypes-table.ts (E) + 16-...md: add bi-directional link
between appendix E (quick reference) and Chapter 16 (narrative).
- Regenerated A.md / B.md / D.md / E.md / F.md + matching manifests.
Local checks passing: check:source-commits, check:no-fuzzy,
check:no-revision-codenames, check:no-frontmatter, check:no-spec-jargon,
check:orphans (covered=31, allowlisted=5, orphans=0).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: multica-agent <github@multica.ai>
…lit, D no truncation A: split family/leaf/feature-gated into orthogonal family(bool) + register(default|feature-gated|—) - 不再互斥归类,feature-gated 工具可同时是 family - 最终 59 项:family=40, register: default=31 / feature-gated=19 / —=9 B: 把 commands.ts import 计数拆成目录/文件两个维度,避免把 commands/commit.js 当成目录 - 静态 import 目录=82(与 OC-Dev 的 82 口径对齐) - 静态 import 文件=10 - 条件 require 目录=3,文件=6 D: whenToUse 改用同种引号闭合的正则(之前 `['"`]` 互通闭合,被 user's / "Can Claude..." 提前截断) - 6/6 agents 都有完整 whenToUse 原文,不再截断 Co-authored-by: multica-agent <github@multica.ai>
OC-R 12:06 复审:F.md:88-90 措辞自相矛盾——反查表用 `—(孤儿或入白名单)` 但 L90 又称 `—` 仅出现在未覆盖且不在白名单内的目录上(当前为 0),与表格内 4 个 `—` 行冲突。 修: - 反查表的 `—` 改为单义"未被任何 v2 章节直接覆盖" - 脚注澄清 `orphans` = `—` 行剔除白名单条目 - utils/ 被章节叙事覆盖故不出现 `—`,属于"白名单兜底但实际不需要",无矛盾 Co-authored-by: multica-agent <github@multica.ai>
- docs/appendix/F.md: rename `## 孤儿目录与白名单` back to `## 孤儿目录` (v1 heading preserved; whitelist explanation kept in body paragraph) - scripts/gen-module-matrix.ts: regenerate with the v1 heading - docs/16-...: revert renumbered headings (`## 附 A`, `### 4.x`) that conflicted with main's `## 三点五` / `### 3.5.x`. Keep only the bidirectional link addition to appendix E in the chapter header. Local: bun scripts/check-heading-preservation.ts --base origin/main → OK on all 6 changed docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Per YAO-154 (S8) review consensus, PR1 in the 2-PR split. PR2 will land C's
hooks-trigger-map.json+ first 15 hook events.feature-gated = 0与表格自相矛盾require(...).XxxTool单写法扩展到require('./tools/<dir>/<file>.js').XxxTool通配,并支持cronTools = feature(...) ? [require(...).A, require(...).B] : []数组形态。重算 0 → 19 feature-gatedimport { ... }命名导入;commands.ts主要用import foo from './commands/foo/...'默认导入。改为同时匹配三种 import 形态。重算 3 → 92 静态 import + 16 require-only。新增"条件 require 装载"小节displayName截断BuiltInAgentDefinition无displayName字段。列名改为whenToUse(首句节选,详见源码),去掉 80 字符硬截断;同时解析whenToUse: SOME_CONSTANT引用,Explore / verification 现在能渲染出首句utils/、context/)仍被多章节覆盖,反查列因此不为空、也不显示—,避免"5 vs 4"误读scripts/orphan-allowlist.txt实际内容按 @麻薯 硬约束附实际清单,证实"白名单 5 项"数字正确:
bun scripts/gen-module-matrix.ts --check-orphans→OK no orphan dirs (covered=31, allowlisted=5)。重生成后的关键数字
Test plan
bun scripts/gen-{tool,commands,agents,tasktypes,module-matrix}.ts --source-path …全部跑通bun run check:source-commits✓ 6 个文件全部指向290fdc94bun run check:no-fuzzy/check:no-revision-codenames/check:no-frontmatter/check:no-spec-jargon✓bun run check:orphans✓covered=31, allowlisted=5, orphans=0范围说明
附录 C 不在本 PR 内。C 的
hooks-trigger-map.json+ 首批 15 事件走 PR2。剩余 12 事件已建 follow-up YAO-155 跟踪(需 bundler 反混淆)。