INF-01: appendix A–F generators + 2 CI lints (YAO-62)#16
Closed
luyao618 wants to merge 3 commits into
Closed
Conversation
YAO-62: ship the §7 spec infrastructure that unblocks every chapter PR in the v2 revision. Eight scripts in `scripts/` (six manifest generators + two CI lints), wired through `package.json` and a `.github` workflow. Manifests committed for source_commit 290fdc9: A 43 tools (43 top-level tools/* entries; family/runtime-leaf/feature-gated split derived from tools.ts) B 101 commands (86 dirs + 15 files = 101 top-level entries; runtime-cmd cross-ref via commands.ts imports) C 31 items (27 HOOK_EVENTS @ entrypoints/sdk/coreTypes.ts + 4 hook command kinds @ schemas/hooks.ts) D 6 agents (built-in agents under tools/AgentTool/built-in/, gated by feature flags / entrypoint / coordinator) E 7 wire types (parsed from Task.ts TaskType union; 4 default + 2 feature-gated + 1 in-process special) F 34 chapters + 1 CROSSCUT, 0 orphans (allowlist: cli/, plugins/, types/) CI gates (.github/workflows/docs-ci.yml): check-source-commits §0.3 fail when chapter / manifest commits diverge lint-no-fuzzy-quantifiers §0.4 fail on 约/大概/左右/大量/不少/主要/大部分/几乎/很多/一些 in fact paragraphs gen-module-matrix --check-orphans §7.6 fail on unclaimed top-level CLI dirs Verified locally: all 6 generators run clean, all 3 lints pass on the current docs tree, and both lints reject seeded fixtures (fuzzy hit + commit drift). See scripts/README.md for design rationale and CI flow. Co-authored-by: multica-agent <github@multica.ai>
…tection, source_files line anchors) - .github/workflows/docs-ci.yml: hoist CLI_SOURCE to job-level env so step `if: env.CLI_SOURCE != ''` actually evaluates. Step-level env is not available when `if:` is evaluated, which would silently skip gen:appendix + check:orphans even with the secret configured. - scripts/gen-tool-table.ts: parse getAllBaseTools() body and the declaration list together. Inline gates (process.env, isXxxEnabled(), feature(...), getter functions, conditional spreads) are now detected in addition to require-time gates. ConfigTool / TungstenTool / TaskCreate/Get/Update/List / LSPTool / EnterWorktreeTool / ExitWorktreeTool / PowerShellTool are now correctly classified feature-gated, not runtime-leaf, and their flags are surfaced. - scripts/gen-commands-table.ts, scripts/gen-tasktypes-table.ts: emit source_files entries in spec §7.3 'path:line-line' contract instead of bare paths. gen-tasktypes resolves the on-disk task class file when it exists and falls back to the Task.ts union literal anchor otherwise (instead of fabricating a guessed path). Re-running the full pipeline: - appendix-A: +0 -0 (43 items, 1 family / 19 runtime-leaf / 23 feature-gated) - appendix-B/C/D/E/F: +0 -0 - check-source-commits OK (7 declarations align with 290fdc9) - lint-no-fuzzy-quantifiers OK - gen-module-matrix --check-orphans OK (0 orphans) Co-authored-by: multica-agent <github@multica.ai>
…spread) - gen-commands-table.ts: accept .ts/.tsx/.js/.jsx/.mjs/.cjs in source_files scan so runtime commands shipped as .js (ant-trace, autofix-pr, backfill-sessions, break-cache, bughunter) populate per spec §7.3. - gen-tool-table.ts: parse getter-call symbols inside conditional spreads (e.g. ...(getPowerShellTool() ? [getPowerShellTool()] : []) at tools.ts:242), and broaden lazyRe to handle multi-statement getter bodies, restoring fn:isPowerShellToolEnabled / fn:getPowerShellTool evidence on PowerShellTool's feature_flags. 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
Ships the V2-REVISION-SPEC §7 infrastructure that hard-blocks every chapter PR (YAO-62 / INF-01).
scripts/gen-{tool,commands,hooks,agents,tasktypes,module-matrix}-table.ts) producingdocs/appendix/{A..F}.{md,manifest.json}from CLI source @290fdc9.check-source-commits(§0.3) andlint-no-fuzzy-quantifiers(§0.4).gen-module-matrix --check-orphans(§7.6) for reverse coverage with allowlist..github/workflows/docs-ci.ymlruns the three gates plusgit diff --exit-code docs/appendixfor manifest drift.Manifest diff summary (initial)
tools.tsHOOK_EVENTS+ 4 hook command kinds (command/prompt/http/agent)builtInAgents.ts(feature flags / entrypoint / coordinator)cli/,plugins/,types/)Test plan
pnpm gen:appendixregenerates all six manifests; counts match spec §C10/§C20/§C16/§C32.pnpm check:source-commits— 7 declarations align on290fdc9.pnpm check:fuzzy-quantifiers— clean on current docs; rejects seeded fixture (大概/主要hits).pnpm check:orphans— 0 orphans.source_commit: deadbeefcafe1234) →check:source-commitsexits 1 with informative diff.CLI_SOURCE_PATHsecret sogen:appendix+check:orphansrun in CI on internal PRs.Source-code grounding
tools/(43 dirs),tools.ts(registration + feature/env gates)commands/(86 dirs + 15 files),commands.ts(import graph)entrypoints/sdk/coreTypes.ts:25-52(HOOK_EVENTS),schemas/hooks.ts:33,68,98,129,183(4 command kinds)tools/AgentTool/built-in/{generalPurpose,statuslineSetup,explore,plan,claudeCodeGuide,verification}Agent.ts, gated viatools/AgentTool/builtInAgents.ts:23-71Task.ts:6-13(TaskTypeunion),tasks.ts:9-15,22-31(default vs feature-gated registration)Deferred / out of scope
🤖 Generated with Claude Code