[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7D4AHWBT3K3WAE6C25M1PJB":3,"skill-same:01M7D4AHWBT3K3WAE6C25M1PJB":95},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7D4AHWBT3K3WAE6C25M1PJB","architecture-governance",null,"Check ZCode module and layer boundaries for code changes. Generate bounded context for cross-module or ownership changes; skip documentation-only work.","zai-org\u002FZCode","zai-org","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F223098841?v=4","01M7D3Y10287Y0CNVHSNZ4GD03","Z.ai","01M7D3Y10SKN81G21P442YTCYP",8689,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: architecture-governance\ndescription: Check ZCode module and layer boundaries for code changes. Generate bounded context for cross-module or ownership changes; skip documentation-only work.\n---\n\n# Architecture governance\n\nUse this skill before editing code in the ZCode repository. It is a design guide as well as a gate: the goal is to make the intended architecture obvious before code is generated, so the checker confirms a decision instead of discovering it for the first time.\n\n## Before writing code\n\n1. Identify intended files and modules from the task, contracts, and existing tests. Run `pnpm architecture:check --changed` for the current baseline; a clean diff does not identify files you have not edited yet.\n2. For cross-module changes, state ownership changes, or an unclear contract, run `pnpm architecture:context \u003Cmodule-id>` (or `node .agents\u002Fskills\u002Farchitecture-governance\u002Fscripts\u002Fcontext-package.mjs \u003Cmodule-id>`). For a local change with a known contract, read only the relevant contract, spec, and affected tests; expand when a concrete dependency or evidence gap requires it.\n3. Apply the spec and regression-evidence rules in [AGENTS.md](..\u002F..\u002F..\u002FAGENTS.md). New behavior needs a spec before implementation; restoring already specified behavior needs regression evidence, not a duplicate feature document. Pure refactors update docs only when contracts change.\n4. For changes to mutable state, asynchronous behavior, or module boundaries, make the relevant design decisions before coding:\n   - **One owner:** name the single component that owns each piece of mutable state. Other layers read through its contract and send commands; they do not keep a second accepted queue, cache, or derived truth.\n   - **One path:** reuse an existing command, service, hook, adapter, or contract when it already expresses the behavior. Do not create a parallel helper for the same responsibility.\n   - **Explicit boundaries:** choose the layer for every new file and the public contract for every cross-module edge. Layers from low to high are `contract \u003C domain \u003C app \u003C adapters \u003C ui`; a file may import only its own layer or lower ones through their public surface. `domain` is pure (no IO, no `await` on the world), `app` decides side effects through ports, `adapters` executes them, `ui` depends only on this module's `contract.ts`. Quick test: needs `await`? not domain. Knows it is sqlite \u002F MessagePort \u002F a timer? adapters.\n   - **Explicit time:** for asynchronous or remote behavior, write the event order, owner\u002Flease, idempotency key, stale-result rule, replay\u002Fresume boundary, and desktop versus mobile delivery kind before implementation.\n   - **Bounded context:** use the relevant contracts, specs, and tests. A generated reading package helps when dependencies are unclear; do not require a whole-module reading pass for every local edit.\n5. If the change alters a public contract, ownership, or allowed dependency, record that decision in the relevant spec\u002Fcontract before implementation. Editing files in two modules alone does not require a new document. Use the root task boundary for when to consult the user; ordinary authorized implementation choices proceed autonomously.\n\nUse this compact design sketch while planning stateful changes:\n\n```text\ninput → single owner → command admission → state transition → contract\u002Fevent\n                  └── persistence \u002F replay \u002F projection are derived from the owner\n```\n\nFor remote or streaming changes, make the delivery boundary explicit:\n\n```text\ndesktop: continuous ── direct live stream ──┐\n                                           ├─ same owner and sequence\nmobile: replayable ─ snapshot + gap repair ┘\n```\n\n## During and after editing\n\n6. Keep changes inside the declared module and its allowed layer direction. Add a module dependency or public contract before introducing a cross-module edge.\n7. Run `pnpm architecture:check --changed` after editing. Report new violations separately from baseline violations; include owners and event-order assumptions when affected. Follow the root validation matrix, finish after required checks pass, and expand checks only for new edits, failures, or unresolved risks.\n\nThe executable policy is `architecture-policy.yaml`; keep its detailed rule definitions there. Check the actual managed-module coverage before claiming the gate verifies a boundary: a passing result does not prove unconfigured modules or runtime semantics are correct. Use `pnpm architecture:baseline:update` only when a reviewed change intentionally changes the accepted legacy baseline. CI never refreshes baseline automatically.\n\nEvery new source file under `packages\u002F` or `apps\u002F` must belong to a managed module (rule `unmanaged-new-file`). When the change needs a directory that is not managed yet, register it first:\n\n```text\npnpm architecture:adopt \u003Cmodule-id> --root \u003Cdir> [--root \u003Cdir2>] --layer \u003Cdomain|app|adapters|ui> [--owner \u003Cgroup>]\n```\n\n`adopt` infers `requires` from the real imports, scaffolds the four artifacts if missing, and registers the module in `architecture-policy.yaml` without touching existing comments. Fill `contract.ts` and `CONTRACT.md` before adding behavior; keep the module's public surface to one intent per method.\n\nFor a new managed module, provide `module.ts`, `contract.ts`, `contract.example.ts`, and a short `CONTRACT.md`. App unit tests are retired; do not scaffold `contract.test.ts`. CLI\u002FCUA keep their own testing rules. Keep runtime and persistence details behind the contract. Prefer typed service calls for one-to-one interactions, commands for state changes, and typed events for broadcast facts.\n\nSee [policy-schema.md](references\u002Fpolicy-schema.md), [module-contract.md](references\u002Fmodule-contract.md), and [rule-catalog.md](references\u002Frule-catalog.md) when the change needs their detailed guidance. The [golden-module](references\u002Fgolden-module) fixture is the smallest compliant example.\nSee [ai-guidance.md](references\u002Fai-guidance.md) for the anti-patterns this workflow is designed to prevent and the questions an agent must answer before proposing code.\n","# Architecture governance\n\nUse this skill before editing code in the ZCode repository. It is a design guide as well as a gate: the goal is to make the intended architecture obvious before code is generated, so the checker confirms a decision instead of discovering it for the first time.\n\n## Before writing code\n\n1. Identify intended files and modules from the task, contracts, and existing tests. Run `pnpm architecture:check --changed` for the current baseline; a clean diff does not identify files you have not edited yet.\n2. For cross-module changes, state ownership changes, or an unclear contract, run `pnpm architecture:context \u003Cmodule-id>` (or `node .agents\u002Fskills\u002Farchitecture-governance\u002Fscripts\u002Fcontext-package.mjs \u003Cmodule-id>`). For a local change with a known contract, read only the relevant contract, spec, and affected tests; expand when a concrete dependency or evidence gap requires it.\n3. Apply the spec and regression-evidence rules in [AGENTS.md](..\u002F..\u002F..\u002FAGENTS.md). New behavior needs a spec before implementation; restoring already specified behavior needs regression evidence, not a duplicate feature document. Pure refactors update docs only when contracts change.\n4. For changes to mutable state, asynchronous behavior, or module boundaries, make the relevant design decisions before coding:\n   - **One owner:** name the single component that owns each piece of mutable state. Other layers read through its contract and send commands; they do not keep a second accepted queue, cache, or derived truth.\n   - **One path:** reuse an existing command, service, hook, adapter, or contract when it already expresses the behavior. Do not create a parallel helper for the same responsibility.\n   - **Explicit boundaries:** choose the layer for every new file and the public contract for every cross-module edge. Layers from low to high are `contract \u003C domain \u003C app \u003C adapters \u003C ui`; a file may import only its own layer or lower ones through their public surface. `domain` is pure (no IO, no `await` on the world), `app` decides side effects through ports, `adapters` executes them, `ui` depends only on this module's `contract.ts`. Quick test: needs `await`? not domain. Knows it is sqlite \u002F MessagePort \u002F a timer? adapters.\n   - **Explicit time:** for asynchronous or remote behavior, write the event order, owner\u002Flease, idempotency key, stale-result rule, replay\u002Fresume boundary, and desktop versus mobile delivery kind before implementation.\n   - **Bounded context:** use the relevant contracts, specs, and tests. A generated reading package helps when dependencies are unclear; do not require a whole-module reading pass for every local edit.\n5. If the change alters a public contract, ownership, or allowed dependency, record that decision in the relevant spec\u002Fcontract before implementation. Editing files in two modules alone does not require a new document. Use the root task boundary for when to consult the user; ordinary authorized implementation choices proceed autonomously.\n\nUse this compact design sketch while planning stateful changes:\n\n```text\ninput → single owner → command admission → state transition → contract\u002Fevent\n                  └── persistence \u002F replay \u002F projection are derived from the owner\n```\n\nFor remote or streaming changes, make the delivery boundary explicit:\n\n```text\ndesktop: continuous ── direct live stream ──┐\n                                           ├─ same owner and sequence\nmobile: replayable ─ snapshot + gap repair ┘\n```\n\n## During and after editing\n\n6. Keep changes inside the declared module and its allowed layer direction. Add a module dependency or public contract before introducing a cross-module edge.\n7. Run `pnpm architecture:check --changed` after editing. Report new violations separately from baseline violations; include owners and event-order assumptions when affected. Follow the root validation matrix, finish after required checks pass, and expand checks only for new edits, failures, or unresolved risks.\n\nThe executable policy is `architecture-policy.yaml`; keep its detailed rule definitions there. Check the actual managed-module coverage before claiming the gate verifies a boundary: a passing result does not prove unconfigured modules or runtime semantics are correct. Use `pnpm architecture:baseline:update` only when a reviewed change intentionally changes the accepted legacy baseline. CI never refreshes baseline automatically.\n\nEvery new source file under `packages\u002F` or `apps\u002F` must belong to a managed module (rule `unmanaged-new-file`). When the change needs a directory that is not managed yet, register it first:\n\n```text\npnpm architecture:adopt \u003Cmodule-id> --root \u003Cdir> [--root \u003Cdir2>] --layer \u003Cdomain|app|adapters|ui> [--owner \u003Cgroup>]\n```\n\n`adopt` infers `requires` from the real imports, scaffolds the four artifacts if missing, and registers the module in `architecture-policy.yaml` without touching existing comments. Fill `contract.ts` and `CONTRACT.md` before adding behavior; keep the module's public surface to one intent per method.\n\nFor a new managed module, provide `module.ts`, `contract.ts`, `contract.example.ts`, and a short `CONTRACT.md`. App unit tests are retired; do not scaffold `contract.test.ts`. CLI\u002FCUA keep their own testing rules. Keep runtime and persistence details behind the contract. Prefer typed service calls for one-to-one interactions, commands for state changes, and typed events for broadcast facts.\n\nSee [policy-schema.md](references\u002Fpolicy-schema.md), [module-contract.md](references\u002Fmodule-contract.md), and [rule-catalog.md](references\u002Frule-catalog.md) when the change needs their detailed guidance. The [golden-module](references\u002Fgolden-module) fixture is the smallest compliant example.\nSee [ai-guidance.md](references\u002Fai-guidance.md) for the anti-patterns this workflow is designed to prevent and the questions an agent must answer before proposing code.\n",{"name":5,"description":7},"main","fec975905a2abd4c07e35c40d51fa097a2258ec9",".agents\u002Fskills\u002Farchitecture-governance",2710,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode","https:\u002F\u002Fzcode.z.ai\u002F","https:\u002F\u002Fgithub.com\u002Fzai-org","https:\u002F\u002Fwww.zhipuai.cn\u002Fen","ChatGLM, GLM-4.5, CogVLM, CodeGeeX, CogView, CogVideoX | CogDL, AMiner | Zhipu.ai (Z.ai)","2026-11-13 16:21:40",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add zai-org\u002FZCode --skill architecture-governance",{"tool":40,"command":41},"bunx","bunx skills add zai-org\u002FZCode --skill architecture-governance",{"tool":43,"command":44},"pnpm","pnpm dlx skills add zai-org\u002FZCode --skill architecture-governance","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002FSKILL.md",true,[48,54,58,64,68,72,75,79,83,87,91],{"path":49,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":52,"sourceHtmlUrl":53},"agents\u002Fopenai.yaml","REFERENCE","参考文档",353,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Fagents\u002Fopenai.yaml",{"path":55,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":56,"sourceHtmlUrl":57},"references\u002Fai-guidance.md",2972,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fai-guidance.md",{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},"references\u002Fgolden-module\u002Fcontract.example.ts","SCRIPT","脚本",141,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fgolden-module\u002Fcontract.example.ts",{"path":65,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":66,"sourceHtmlUrl":67},"references\u002Fgolden-module\u002FCONTRACT.md",164,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fgolden-module\u002FCONTRACT.md",{"path":69,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":70,"sourceHtmlUrl":71},"references\u002Fgolden-module\u002Fcontract.ts",57,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fgolden-module\u002Fcontract.ts",{"path":73,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":74},"references\u002Fgolden-module\u002Fmodule.ts","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fgolden-module\u002Fmodule.ts",{"path":76,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":77,"sourceHtmlUrl":78},"references\u002Fmodule-contract.md",523,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fmodule-contract.md",{"path":80,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":81,"sourceHtmlUrl":82},"references\u002Fpolicy-schema.md",2563,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Fpolicy-schema.md",{"path":84,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":85,"sourceHtmlUrl":86},"references\u002Frule-catalog.md",4843,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Frule-catalog.md",{"path":88,"resourceType":50,"resourceTypeDesc":51,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Ftroubleshooting.md",1137,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Freferences\u002Ftroubleshooting.md",{"path":92,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":93,"sourceHtmlUrl":94},"scripts\u002Fcontext-package.mjs",718,"https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Farchitecture-governance\u002Fscripts\u002Fcontext-package.mjs",[96,103,110,117,124,131],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7D57RTFKZH4SFFWF6NXSQ62","plugin-mcp-ping","E2E workspace Plugin skill marker","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Fplugin-mcp-skill\u002Fe2e-plugin-mcp-ping\u002Fskills\u002Fplugin-mcp-ping\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":107,"categories":108,"keywords":109,"publishedAt":19},"01M7D57NRW93T0ETX2QPQY3JCP","e2e-ext-compat-plain","PLM-EXT-STORE fixture skill for e2e-ext-compat-plain.","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Ffs\u002Fplugins\u002Fplugin-store-extension-compat\u002Fstore-market\u002Fplugins\u002Fe2e-ext-compat-plain\u002Fskills\u002Fe2e-ext-compat-plain\u002FSKILL.md",[],[],{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":19},"01M7D57JYKJK5A4VW7Y5MYEA7R","e2e-ext-compat-ok","PLM-EXT-STORE fixture skill for e2e-ext-compat-ok.","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Ffs\u002Fplugins\u002Fplugin-store-extension-compat\u002Fstore-market\u002Fplugins\u002Fe2e-ext-compat-ok\u002Fskills\u002Fe2e-ext-compat-ok\u002FSKILL.md",[],[],{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":19},"01M7D57FZQKN28QJJ0HVG93ACN","e2e-ext-compat-installed","PLM-EXT-STORE fixture skill for e2e-ext-compat-installed.","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Ffs\u002Fplugins\u002Fplugin-store-extension-compat\u002Fstore-market\u002Fplugins\u002Fe2e-ext-compat-installed\u002Fskills\u002Fe2e-ext-compat-installed\u002FSKILL.md",[],[],{"skillNo":125,"name":126,"nameZh":6,"description":127,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":128,"categories":129,"keywords":130,"publishedAt":19},"01M7D57C9W30WJ3NJDAYX2MN0J","e2e-ext-compat-future","PLM-EXT-STORE fixture skill for e2e-ext-compat-future.","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Ffs\u002Fplugins\u002Fplugin-store-extension-compat\u002Fstore-market\u002Fplugins\u002Fe2e-ext-compat-future\u002Fskills\u002Fe2e-ext-compat-future\u002FSKILL.md",[],[],{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":137,"publishedAt":19},"01M7D579KKRR6D2GPVW4J4QWVT","e2e-store-skill-b","E2E store fixture skill b","https:\u002F\u002Fgithub.com\u002Fzai-org\u002FZCode\u002Fblob\u002Fmain\u002Fpackages\u002Fdesktop\u002Ftest\u002Fe2e\u002Ffixtures\u002Ffs\u002Fplugins\u002Fplugin-extension-reads\u002Fstore-market\u002Fplugins\u002Fe2e-ext-store-b\u002Fskills\u002Fe2e-store-skill-b\u002FSKILL.md",[],[]]