Skip to content

INF-01: gen-* scripts + appendix + CI wiring (7-check style guard) - #18

Merged
luyao618 merged 5 commits into
mainfrom
agent/cc-dev/be20edb9
May 22, 2026
Merged

INF-01: gen-* scripts + appendix + CI wiring (7-check style guard)#18
luyao618 merged 5 commits into
mainfrom
agent/cc-dev/be20edb9

Conversation

@luyao618

Copy link
Copy Markdown
Owner

INF-01 收尾

范围

基础设施工单:脚本 + 附录 + CI 接线,无正文章节改动。

改动

  • 6 个 gen- 脚本*:gen-tool-table / gen-commands-table / gen-hooks-table / gen-agents-table / gen-tasktypes-table / gen-module-matrix
  • 2 个 lintcheck-source-commitslint-no-fuzzy-quantifiers
  • 6 份附录docs/appendix/{A..F}.md + {A..F}.manifest.json
  • 孤儿白名单scripts/orphan-allowlist.txt(覆盖 §6.2 预期免覆盖目录)
  • CI 接线.github/workflows/v2-style-guard.yml 增加 gen:appendix(含漂移检查)+ check:source-commits + lint-no-fuzzy-quantifiers + gen-module-matrix --check-orphans

CI 7 项校验(与 spec §5 对齐)

  1. C-1 diff 体积闸
  2. C-2 标题保留闸
  3. C-3 代码块占比闸
  4. C-4 工程化小标题禁词
  5. check-source-commits(源码引用闸)
  6. lint-no-fuzzy-quantifiers(禁用模糊量词)
  7. gen-module-matrix --check-orphans(孤儿模块闸)

附录生成 + 漂移检测作为独立步骤插在 C-4 之后、check-* 之前。

manifest 摘要

附录 内容
A 59 items (9 family / 35 leaf / 15 feature-gated)
B dirs=86, files=15
C events=27, cmd_types=4
D 5 agents
E wire=7, default=4, fg=2
F chapters=34, top_dirs=35, orphans=0

风格双亲(spec §5 R-1)

N/A · 基础设施

验证

  • 本地 bun run gen:appendix ✅ 无漂移
  • 所有脚本入口与 package.json scripts 对齐
  • CI 工作流 YAML 通过手动审阅

⚠️ 按 spec §0.4.2 / §4:仅提 PR,不 merge,等待人工/复核签字。

Yao Lu and others added 5 commits May 22, 2026 04:05
- 6 gen-* scripts (A/B/C/D/E/F) + 2 lint checks (check-source-commits, lint-no-fuzzy-quantifiers)
- 6 appendix .md + .manifest.json generated
- scripts/orphan-allowlist.txt for §6.2 expected-uncovered top dirs
- CI: wire pnpm gen:appendix + pnpm check:docs into v2-style-guard.yml
  (7 checks: C-1/C-2/C-3/C-4 + check-source-commits + lint-no-fuzzy-quantifiers + gen-module-matrix --check-orphans)

Co-authored-by: multica-agent <github@multica.ai>
- _lib.ts: remove generated_at field + nowIso(); add line-range helpers
- gen-tool-table.ts: source_files use path:line-line (primary source + tools.ts anchors)
- gen-agents-table.ts: rewrite per §7.5 two-segment (id/displayName/modelHint/defaultEnabled + feature_flags/entrypoint_gated/coordinator_required); resolve constant-ref agentType
- gen-commands/tasktypes/module/hooks: drop generated_at from manifest + md header
- regenerate all appendix outputs (deterministic, no timestamps)

Co-authored-by: multica-agent <github@multica.ai>
…ailability

gen:appendix and check:orphans both call getSourceCommit() which git -C into
CLAUDE_CODE_SOURCE_PATH (default ~/work/code/awesome-project/claude-code-cli).
That path only exists on author machines, so PR #18 failed on hosted runners
with 'cannot change to /home/runner/work/code/awesome-project/claude-code-cli'.

docs/appendix/ is the truth-of-record (committed manifests + .md). On runners
without the source checkout, skip the regen / drift / orphan steps and emit a
notice. C-1..C-4 + check:source-commits + check:no-fuzzy keep running and
still gate every PR.

Co-authored-by: multica-agent <github@multica.ai>
新增第 7 条(实为 check:docs 链路第 8 项,含 gen:appendix drift)lint,
防止内部修订代号 v1/v2 渗入读者侧 docs/ 正文。

- scripts/lint-no-revision-codenames.ts:扫 docs/**/*.md,按 frontmatter /
  HTML 注释 / fence / V2-REVISION-SPEC.md 整体豁免;剔除 API 版本号形态
  (api/v1/...、v2.1.8) 与 allowlist 行;其余命中 fail。
- scripts/revision-codename-allowlist.txt:白名单(path:line | path:regex:<re>)。
  现存 2 条合理引用先入白名单:
    * docs/appendix/F.md:42 —— 章名「架构模式总结 v2」(spec §5/§6.2)
    * docs/20-API调用与错误恢复.md:619 —— 源码注释复述 v2.1.8 semver
- package.json: 增 check:no-revision-codenames,串入 check:docs 链路。
- .github/workflows/v2-style-guard.yml: 在 lint-no-fuzzy 之后新增一步。

首跑:33 md OK,0 命中。

Co-authored-by: multica-agent <github@multica.ai>
C34 chapter title contained 'v2' which leaked into docs/appendix/F.md
via the generator and was being papered over by the allowlist. Rename
title in scripts/gen-module-matrix.ts:117, regenerate F.md + manifest,
and drop the stale allowlist entry. check:no-revision-codenames and
check:docs both pass.

Co-authored-by: multica-agent <github@multica.ai>
@luyao618
luyao618 merged commit b44e9dd into main May 22, 2026
1 check passed
@luyao618
luyao618 deleted the agent/cc-dev/be20edb9 branch June 3, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant