fec-doc-sync · diff
git:20260607.6a5d77f to git:20260611.9d7f5e4
23 added, 23 removed. Audit A to A.
---
name: fec-doc-sync
- description: Use when synchronizing frontend project documentation with source-of-truth files such as package.json, lockfiles, config, env examples, routes, API clients or server routes, schemas, components, tests, CI, build/deploy config, ADRs, changelogs, or migration notes. Do not use for general prose polishing only; Chinese triggers include 文档同步, 更新 README, docs sync, 环境变量文档, 命令清单, API 文档同步.
+ description: Use when synchronizing frontend project documentation with source-of-truth files such as package.json, lockfiles, config, env examples, routes, API clients or server routes, schemas, components, tests, CI, build/deploy config, ADRs, changelogs, or migration notes. Do not use for general prose polishing only; Chinese triggers include document synchronization, update README, docs sync, environment variable documentation, command list, API Document synchronization.
---
- # 文档同步
+ # Document synchronization
## Purpose
- 从代码、配置、测试、类型、脚本和运行时模板同步前端项目文档,避免 README、docs、环境变量说明、API/路由说明、架构决策和迁移说明与实际项目行为漂移。
+ Synchronize front-end project documentation from code, configuration, tests, types, scripts and runtime templates to avoid README, docs, environment variable descriptions, API/routing descriptions, architectural decisions and migration notes from drifting from actual project behavior.
## Procedure
- 1. 识别项目栈、文档入口和本次需要同步的范围;README 同步必须扫描根目录 `README*`、`docs/*/README*`、包、应用、部署或运行时相关 README,并排除 `node_modules`、构建产物和第三方依赖目录。
- 2. 收集事实来源:`package.json`、lockfile、框架和构建配置、`.env.example`、路由、API clients 或 server routes、types/schemas、组件、测试、CI、build/deploy config。
- 3. 比对 README、docs、ADR、changelog、example prompts、setup/deploy/env docs 中的命令、环境变量、路由、API 行为、部署步骤和支持矩阵。
- 4. 只更新稳定的公共约定;不要把临时调试结论、一次性报告或未落地设计写入长期文档。
- 5. 若仓库已有多语言文档或国际化 README,主 README 的公共事实更新后必须检查其它语言 README 是否需要同步;功能名称、命令名、脚本名、包名、组件/API 名称、报告文件名、路径、环境变量、路由/API 名称、版本约束和支持矩阵必须跨语言一致。
- 6. 产品文案可保持本地化表达,但不得保留旧事实、旧默认推荐或过期示例;无法高质量翻译时,至少同步关键事实,并在输出中标出人工翻译风险。
- 7. 当项目暴露插件、SDK、CLI、组件库、模板或集成能力时,同步对应的功能清单、集成说明、命令/脚本说明、公开 metadata、示例提示词或示例用法。
- 8. 运行相关文档一致性、旧口径搜索、报告格式一致性、类型检查、测试、构建或打包检查。
+ 1. Identify the project stack, document entry and the scope that needs to be synchronized this time; README synchronization must scan the root directory `README*`, `docs/*/README*`, package, application, deployment or runtime related README, and exclude `node_modules`, build products and third-party dependency directories.
+ 2. Gather sources of truth: `package.json`, lockfile, framework and build configurations, `.env.example`, routes, API clients or server routes, types/schemas, components, tests, CI, build/deploy config.
+ 3. Compare commands, environment variables, routes, API behaviors, deployment steps and support matrix in README, docs, ADR, changelog, example prompts, setup/deploy/env docs.
+ 4. Only update stable public conventions; do not write temporary debugging conclusions, one-time reports or unimplemented designs into long-term documents.
+ 5. If the warehouse already has multilingual documents or internationalized README, after updating the public facts of the main README, you must check whether other language READMEs need to be synchronized; function names, command names, script names, package names, component/API names, report file names, paths, environment variables, routing/API names, version constraints, and support matrices must be consistent across languages.
+ 6. Product copy can maintain localized expression, but must not retain old facts, old default recommendations, or expired examples; when high-quality translation is not possible, at least synchronize key facts, and mark the risks of manual translation in the output.
+ 7. When the project exposes plug-ins, SDKs, CLIs, component libraries, templates or integration capabilities, synchronize the corresponding function list, integration instructions, command/script instructions, public metadata, example prompt words or example usage.
+ 8. Run relevant documentation consistency, legacy searches, report format consistency, type checks, testing, build or packaging checks.
## Constraints
- - 不把 README 变成完整实现细节;公开文档保留高信号摘要。
- - 不引入与事实来源不一致的命令、路径、环境变量、API 行为或能力名称。
- - 不把未确认的 TODO、草案或实验能力写成已支持行为。
- - 不修改用户项目私有文档,除非用户明确指定。
- - 多语言文档若无法完整翻译,至少保持命令名、环境变量、路由/API 名称、版本约束和报告格式一致。
- - 不把国际化 README 同步简化成只改主 README;公共事实、功能清单、报告清单、命令/脚本说明和示例用法必须检查所有语言入口。
- - 不把 ADR 当作长篇复盘;只记录背景、决策、取舍、影响范围、验证和回滚线索。
+ - Do not turn README into complete implementation details; public documentation retains high-signal summaries.
+ - Do not introduce command, path, environment variable, API behavior, or capability names that are inconsistent with the source of truth.
+ - Do not write unconfirmed TODOs, drafts, or experimental capabilities as supported behavior.
+ - Do not modify user project private documents unless explicitly specified by the user.
+ - If multi-language documents cannot be fully translated, at least keep the command names, environment variables, route/API names, version constraints and report formats consistent.
+ - Do not reduce internationalized README synchronization to just the main README; public facts, feature lists, report lists, command/script descriptions, and example usage must check all language entries.
+ - Do not treat ADR as a long review; only record the background, decisions, trade-offs, scope of impact, verification and rollback clues.
## Expected Output
- - 列出已同步的 README/docs/ADR/changelog/env/setup/deploy 文档。
- - 列出已检查的 README/docs 入口,并说明哪些语言文件已同步、哪些无需同步、哪些需要人工确认。
- - 总结使用的事实来源、更新范围、验证命令和未覆盖风险。
- - 汇总旧口径搜索、报告文件名/路径/命令一致性和多语言关键事实一致性验证结果。
- - 标出仍需人工确认的产品文案、翻译、外部服务配置或发布说明。
+ - List synchronized README/docs/ADR/changelog/env/setup/deploy documents.
+ - List the checked README/docs entries and indicate which language files have been synchronized, which do not need to be synchronized, and which require manual confirmation.
+ - Summarize the sources of truth used, update scope, verification orders, and non-coverage risks.
+ - Aggregate legacy caliber searches, report filename/path/command consistency and multilingual key fact consistency verification results.
+ - Highlight product copy, translations, external service configurations, or release notes that still require manual confirmation.