enterprise-miniapp · git:20261121.9f89a22 · 2026-11-21 · sha256 da10352dde6c7161
enterprise-miniapp git:20261121.9f89a22A
Immutable. This exact content never changes and is served at /api/v1/blob/da10352dde6c7161.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_34t5w7d7gtfqmrqt/da10352dde6c716139abe51563e7f3cf4aac2cff698a3a31f5c655d15f50fe56.json
Then /plugin install enterprise-miniapp@markdownregistry-34t5w7d7gtfqmrqt in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
--- name: enterprise-miniapp description: > Add or extend a mini-program / terminal in this repository. Use when the task touches shared/mini-core, miniprogram-* templates, tenant parameters, or public mini-program routes. Covers single-source sync and the ES5 constraint. --- # enterprise-miniapp ## 先判断 - 能加在现有终端里,就不要新建小程序。 - 新终端必须确有独立的主体、审核或发布边界。 ## 步骤 1. **复用公共骨架**:请求、会话、鉴权、登录来自 `shared/mini-core/`。 禁止复制 `request` / `session` / `auth` / `login` 的实现。 2. **只写差异**:终端目录只放配置、页面与样式;模板参数(站点域名、租户码、AppID)由平台渲染。 3. **不新增平行表族**:不新建 `*Member` / `*Order` 表;复用既有主体与订单模型。 4. **公开路由**:注册 `/api/public/**` 时注明 issuer 与租户键,并校验来源 / 签名 / 设备令牌。 5. **同步与校验**: ```bash pnpm sync:mini-core pnpm check:mini-core pnpm check:architecture ``` ## 约束 - `shared/mini-core/core.js` 必须保持 ES5;混入 ES6 语法会让老基础库整包白屏。 - 模板里的 `utils/core.js` 是派生物;手改副本会与真源分叉。 - 新增终端后检查出包脚本与后台工具目录是否需要登记。 ## 反模式 - 复制一份 core 再改。 - 在页面里硬编码站点地址或租户码。 - 为了省事新建一套会员 / 订单表。