Skip to content

Releases: SHADOW-LI0327/dsh-process-kit

v0.9.0 — 双语支持(中文 / English)

Choose a tag to compare

@SHADOW-LI0327 SHADOW-LI0327 released this 27 Oct 02:15

v0.9.0 — 双语支持(中文 / English)

同一套流程、两种语言。语言只影响文字,不影响落点与判据;存量中文仓库零改动。

亮点

  • 英文项目开箱可用:process_init({ lang: "en" }) 落英文骨架 + 英文 AGENTS.md + 英文角色技能;auto(默认)按仓库文档自动判断。
  • 语言跟随仓库:PROCESS_KIT_LANG → .process-kit.json 的 lang → PROJECT.md 的 lang: → 文档推断 → zh。一个仓库一种语言,产物不会中英混排。
  • 门禁锚点去语言化:模板加机器标记(process:owner-table / process:registry),§3 表头、§4/§5 共 26 个配置键、核对件文件名中英都认;标记缺失时全部回退到原来的中文锚点。
  • 文档全量英文版:README、CONFIGURATION、CONTRACT、DESIGN、ACCEPTANCE、ECOSYSTEM 各有 .en.md,新增双语契约 docs/I18N.md。

Added

  • scripts/i18n.mjs:语言解析(resolveLang)+ 成对取词器(makeMsg),门禁脚本与插件层共用。
  • process_init 新增 lang 参数(zh / en / auto,默认 auto);语言写进 docs/process/.process-kit.json,成为仓库级真源。
  • scaffold/en/**(10 个文件,与中文骨架逐文件对应)、AGENTS.template.en.md、9 份 skills/<role>/SKILL.en.md。
  • test/i18n.test.mjs:两套骨架文件清单一致、零残留、标记与 26 键对照表三方一致、语言优先级、英文仓库里各道门禁跑到绿/越界判红且输出零中文。

Changed

  • 门禁与工具跟着仓库语言走:6 个门禁/流程脚本的运行期消息、process_status / gate_summary / process_journal / process_init / process_uninstall 的报告、角色技能正文,全部按仓库语言取用;工具描述改为中英并列。
  • 换语言 = 重跑升级:process_init({ upgrade: true, lang: "en" })(框架自有文件先备份后覆盖;PROJECT.md / 令牌类文件不覆盖,只报告差异)。
  • 需求核对件:中文 <ID>-需求核对件.md 与英文 <ID>-check.md 都认,权威判据为 frontmatter kind: requirement-check。
  • 文档:README 精简(227 → 172 行)并中英互链;删除「和同类插件的差别」小节与 docs/ADOPTION.md。

Fixed

  • check-rules 的 ok() 明细此前从不打印(只有 N ✓ 计数)——现在按「❌ → ⚠ → 通过明细」输出,绿也能逐条抽查。
  • 台账条目缺 automation 时,①/⑪ 不再渲染空括号(① TC-x → (… / ⑪ TC-x()…),改为显式「未声明 automation」。

升级已有仓库

process_init({ upgrade: true, dryRun: true })   // 先看会动哪些文件
process_init({ upgrade: true })                 // 落地(框架自有文件先备份为 <文件>.bak-<时间戳>)
process_init({ upgrade: true, lang: "en" })     // 顺便把仓库切成英文

安装

npm install dsh-process-kit@0.9.0
# 或在 DSH 里用 plugin_manager:action=install_bundle, target=dsh-process-kit@0.9.0

核验

  • npm test 四项全绿(host / skill-registry / scripts / i18n)。
  • 本 tag 指向产出 npm tarball 的那棵树,npm pack 与注册表 tarball 逐字节相同:
    sha1 261c5ca8cc63e96411cdf8087f74e94a32234a29 · 67 files / 1,118,569 B unpacked。
  • 用发布包实测:英文骨架 → 落点门禁 18 checked (18 allowed) 绿、越界判红、台账门禁绿,输出零中文;中文骨架同一条命令 → 中文输出原样。

说明:0.6.0 / 0.7.0 / 0.8.0 当时没有打 tag,本版起恢复「tag + Release」记录。


v0.9.0 — Bilingual support (Chinese / English)

One process, two languages. Language affects wording only — never write targets or criteria. Existing Chinese repositories need no changes.

Highlights

  • Works out of the box for English projects: process_init({ lang: "en" }) lays down the English scaffold, an English AGENTS.md and English role skills; auto (the default) infers the language from the repository.
  • The language follows the repository: PROCESS_KIT_LANG → lang in .process-kit.json → lang: in PROJECT.md → document inference → zh. One language per repository, so artifacts never mix languages.
  • Language-neutral gate anchors: machine markers above key sections (process:owner-table / process:registry); the §3 header, all 26 §4/§5 config keys and both requirement-check filenames are accepted in either language. Without a marker every gate falls back to the original Chinese anchors.
  • Every document has an English edition: README, CONFIGURATION, CONTRACT, DESIGN, ACCEPTANCE, ECOSYSTEM ship as .en.md, plus the new bilingual contract docs/I18N.md.

Added

  • scripts/i18n.mjs: language resolution (resolveLang) and the paired message picker (makeMsg), shared by the gate scripts and the plugin layer.
  • process_init gains lang (zh / en / auto, default auto); the resolved language is recorded in docs/process/.process-kit.json as the repository-level source of truth.
  • scaffold/en/** (10 files mirroring the Chinese scaffold), AGENTS.template.en.md, and 9 skills/<role>/SKILL.en.md.
  • test/i18n.test.mjs: identical scaffold file lists, zero residue, markers and the 26-key mapping consistent across three sources, language-resolution priority, and all gates running green / judging out-of-bounds red with zero Chinese in an English repository.

Changed

  • Gates and tools follow the repository language: runtime messages of the six gate/journal scripts, the reports of process_status / gate_summary / process_journal / process_init / process_uninstall, and the role-skill bodies; tool descriptions are bilingual (English then Chinese).
  • Switching language = re-running the upgrade: process_init({ upgrade: true, lang: "en" }) (framework-owned files are backed up then overwritten; PROJECT.md and the token files are never overwritten, only reported).
  • Requirement check: both <ID>-需求核对件.md and <ID>-check.md are recognized; the authoritative criterion is frontmatter kind: requirement-check.
  • Docs: README trimmed (227 → 172 lines) with zh/en cross-links; the comparison section and docs/ADOPTION.md were removed.

Fixed

  • check-rules never printed its ok() details (only the N ✓ count) — it now prints ❌ → ⚠ → passed checks, so a green can be spot-checked criterion by criterion.
  • With a missing automation field, ①/⑪ no longer render empty parentheses, but say explicitly that automation is undeclared.

Upgrading an existing repository

process_init({ upgrade: true, dryRun: true })   // preview which files would change
process_init({ upgrade: true })                 // apply (framework files are backed up as <file>.bak-<timestamp>)
process_init({ upgrade: true, lang: "en" })     // also switch the repository to English

Verification

  • npm test: all four suites green (host / skill-registry / scripts / i18n).
  • This tag points at the tree that produced the npm tarball: npm pack is byte-identical to the registry tarball (sha1 261c5ca8cc63e96411cdf8087f74e94a32234a29, 67 files / 1,118,569 B unpacked).
  • Checked against the published package: English scaffold ⇒ write-target gate 18 checked (18 allowed) green, out-of-bounds red, rules ledger gate green, zero Chinese; Chinese scaffold with the same command ⇒ Chinese output unchanged.

Note: 0.6.0 / 0.7.0 / 0.8.0 were released without tags; tagging plus Release notes resumes with this version.