enterprise-pinned-registry

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Enterprise Pinned Registry

企业级固定版本注册表

A lockfile concept for AI generation. Model versions, prompts, brand tokens, and seeds are pinned to a manifest that regenerates the same campaign identically six months, a year, or three years later. Built for enterprises that need reproducibility for legal holds, brand-campaign continuity, regulatory defense, and year-over-year comparability.

AI生成领域的锁文件概念。模型版本、提示词、品牌标识和随机种子都被固定到一个清单中,可在六个月、一年或三年后完全相同地重新生成同一营销活动内容。专为需要可复现性以满足法律保留、品牌营销活动连续性、合规抗辩和年度可比性需求的企业打造。

When to Use

适用场景

  • Multi-team deployment: 20+ designers / PMs / agencies generating on the same brand, need identical output across all of them
  • Year-over-year campaign (annual report, quarterly earnings graphics) must match the prior year's look exactly
  • Regulated industry where "reproducible" is a compliance requirement, not a preference
  • Legal hold — a specific asset may need to be regenerated identically for litigation support
  • Model-provider change management — new versions ship weekly; you want explicit, reviewed upgrades, not drift
  • Audit trail: every shipped asset must trace back to a specific model version + prompt + brand token set
Do not use for: one-off exploration, draft/ideation phases, consumer projects.

  • 多团队部署:20名以上设计师/产品经理/代理商基于同一品牌生成内容,需要所有团队输出完全一致
  • 年度营销活动(年度报告、季度收益图表)必须与上一年的外观完全匹配
  • 受监管行业,其中“可复现”是合规要求而非可选功能
  • 法律保留——可能需要完全相同地重新生成特定资产以支持诉讼
  • 模型供应商变更管理:新版本每周发布;您需要明确的、经过审核的升级,而非无规则的版本漂移
  • 审计追踪:每个发布的资产必须可追溯到特定的模型版本+提示词+品牌标识集
不适用场景:一次性探索、草稿/构思阶段、面向消费者的项目。

Prerequisites

前置条件

Before authoring the registry:
  1. Scope — which models, prompts, and brand tokens are in scope? Start narrow (heroes only) then expand.
  2. Bump cadence — quarterly? On-demand only? Who approves a bump?
  3. Regression-test corpus — what's the set of prompts that must be re-run before a bump is approved? (Typically 10–20 representative prompts.)
  4. Storage — registry in the campaign repo, a dedicated
    brand-registry
    repo, or a central governance repo?
  5. Rollback plan — if a bump produces unacceptable drift, how do we revert? (Git revert is usually enough if the registry is in git.)
  6. Audit retention — how long must the registry + generated outputs be retained? 7 years for SOX-adjacent, 10 for pharma, indefinite for trademark defense.

创建注册表之前:
  1. 范围界定——哪些模型、提示词和品牌标识在范围内?先从窄范围(仅核心内容)开始,再逐步扩展。
  2. 版本更新节奏——每季度更新?仅按需更新?谁批准版本更新?
  3. 回归测试语料库——在批准版本更新前,必须重新运行哪些提示词集?(通常为10–20个代表性提示词。)
  4. 存储方式——注册表放在营销活动仓库、专用的
    brand-registry
    仓库还是中央治理仓库?
  5. 回滚计划——如果版本更新产生不可接受的漂移,如何回退?(如果注册表在Git中,Git revert通常足够。)
  6. 审计保留期限——注册表+生成的输出必须保留多久?SOX相关领域为7年,制药行业为10年,商标维权为无限期。

How to Run

操作步骤

Five steps. The registry is the contract; everything generates against it.
  1. Author
    registry.json
    — model aliases, prompt templates, brand tokens, default params. Each alias pins to an explicit
    model@version
    .
  2. Fingerprint prompts — every prompt template gets a SHA256 hash stored alongside it. If the prompt string changes, the fingerprint changes, and that's a versioned bump.
  3. Configure the CLI
    gen-ai config set registry <path>
    points every call on this machine at the registry. Teams commit the registry to git and sync via clone/pull.
  4. Generate against aliases — designers use
    flux
    (alias), never
    flux-2-pro@2.1.3
    (raw). Alias resolution is the registry's job.
  5. Bump quarterly — run the regression corpus against a candidate new version, diff the outputs, get approval, bump the registry, tag the release (
    brand-registry-v2026.2
    ).
分为五步。注册表是契约;所有生成操作都基于它执行。
  1. 编写
    registry.json
    ——模型别名、提示词模板、品牌标识、默认参数。每个别名都固定到明确的
    model@version
  2. 提示词指纹识别——每个提示词模板都会生成一个SHA256哈希并存储在其旁。如果提示词字符串更改,指纹也会更改,这视为一次版本更新。
  3. 配置CLI——
    gen-ai config set registry <path>
    将本机上的所有调用指向该注册表。团队将注册表提交到Git并通过克隆/拉取同步。
  4. 基于别名生成内容——设计师使用
    flux
    (别名),而非
    flux-2-pro@2.1.3
    (原始ID)。别名解析由注册表负责。
  5. 每季度更新版本——针对候选新版本运行回归测试语料库,对比输出差异,获得批准后更新注册表,并标记版本(
    brand-registry-v2026.2
    )。

Quick Reference

快速参考

The registry itself is the manifest. Commit it. Tag it. Diff it on every bump.
json
{
  "registry_version": "2026.2.0",
  "locked_at": "2026-04-01T00:00:00Z",
  "locked_by": "brand-governance@company.com",
  "previous_version": "2026.1.0",
  "regression_run_id": "REG-2026Q2-APPROVED",
  "models": {
    "flux":     { "id": "flux-2-pro@2.1.3",          "commercial_use": true,  "notes": "Hero, editorial" },
    "kontext":  { "id": "flux-kontext-pro@1.4.0",    "commercial_use": true,  "notes": "Product edit-mode" },
    "upscale":  { "id": "topaz-upscale-image@2.0.0", "commercial_use": true,  "notes": "Print prep" },
    "kling":    { "id": "kling-v3-pro@3.0.1",       "commercial_use": true,  "notes": "I2V broadcast" },
    "portrait": { "id": "gemini-3-pro-image@1.2.0",  "commercial_use": true,  "notes": "Portrait, verify license" }
  },
  "prompt_templates": {
    "hero_launch": {
      "text": "Editorial hero, {subject}, {environment}, brand palette, natural light",
      "fingerprint": "sha256:7b4f2a...c8e1"
    }
  },
  "brand_tokens": {
    "palette": { "primary": "#FF006E", "ink": "#0D0A1F", "accent": "#FFBE0B" },
    "aspect_ratios_allowed": ["16:9", "9:16", "1:1", "3:2"],
    "seed_default": 42
  },
  "audit_id": "REGISTRY-2026.2"
}
Every generated asset's
results.json
entry should carry
registry_version
so reproduction is one command away.

注册表本身就是清单。提交它、标记它、每次更新时对比差异。
json
{
  "registry_version": "2026.2.0",
  "locked_at": "2026-04-01T00:00:00Z",
  "locked_by": "brand-governance@company.com",
  "previous_version": "2026.1.0",
  "regression_run_id": "REG-2026Q2-APPROVED",
  "models": {
    "flux":     { "id": "flux-2-pro@2.1.3",          "commercial_use": true,  "notes": "Hero, editorial" },
    "kontext":  { "id": "flux-kontext-pro@1.4.0",    "commercial_use": true,  "notes": "Product edit-mode" },
    "upscale":  { "id": "topaz-upscale-image@2.0.0", "commercial_use": true,  "notes": "Print prep" },
    "kling":    { "id": "kling-v3-pro@3.0.1",       "commercial_use": true,  "notes": "I2V broadcast" },
    "portrait": { "id": "gemini-3-pro-image@1.2.0",  "commercial_use": true,  "notes": "Portrait, verify license" }
  },
  "prompt_templates": {
    "hero_launch": {
      "text": "Editorial hero, {subject}, {environment}, brand palette, natural light",
      "fingerprint": "sha256:7b4f2a...c8e1"
    }
  },
  "brand_tokens": {
    "palette": { "primary": "#FF006E", "ink": "#0D0A1F", "accent": "#FFBE0B" },
    "aspect_ratios_allowed": ["16:9", "9:16", "1:1", "3:2"],
    "seed_default": 42
  },
  "audit_id": "REGISTRY-2026.2"
}
每个生成资产的
results.json
条目都应包含
registry_version
,这样只需一条命令即可复现内容。

Quick Reference

快速参考

The registry pins them; it doesn't choose them. For picking, see the per-workflow skills. Typical enterprise registry contents:
AliasPins toRole
flux
flux-2-pro@x.y
Primary photoreal hero
kontext
flux-kontext-pro@x.y
Edit-mode, product-accuracy preserve
portrait
gemini-3-pro-image@x.y
Faces, commercial-safe (verify license)
upscale
topaz-upscale-image@x.y
Print / wire prep
remove-bg
picsart-remove-bg@x.y
Transparent PNG derivatives
change-bg
picsart-change-bg@x.y
Catalog background replace
kling
kling-v3-pro@x.y
Image-to-video for broadcast
Confirm commercial-use + regional availability at bump time with
gen-ai models info <id>
. Provider terms change; pin is not a license.

注册表负责固定版本,而非选择版本。关于版本选择,请查看各工作流技能。典型的企业注册表内容:
别名固定版本角色
flux
flux-2-pro@x.y
主要写实核心内容
kontext
flux-kontext-pro@x.y
编辑模式,保留产品准确性
portrait
gemini-3-pro-image@x.y
人像,商业安全(需验证许可证)
upscale
topaz-upscale-image@x.y
印刷/线稿准备
remove-bg
picsart-remove-bg@x.y
透明PNG衍生内容
change-bg
picsart-change-bg@x.y
商品目录背景替换
kling
kling-v3-pro@x.y
用于广播的图转视频
更新版本时,使用
gen-ai models info <id>
确认商业使用权限和区域可用性。供应商条款会变更;固定版本不代表获得许可证。

Procedure

操作规范

  • Aliases everywhere, raw IDs nowhere. Designers should never see
    flux-2-pro@2.1.3
    in a prompt — only
    flux
    .
  • The registry lives in git. Commit, tag, diff, review, revert. Full audit trail for free.
  • Regression corpus before every bump. 10–20 canonical prompts, run against old and new, visual diff approved by brand lead.
  • Pin seeds for reproducibility where the model supports it.
    --seed 42
    reruns the same output deterministically.
  • Fingerprint prompt templates. Any string change to a template is a versioned bump, not a silent edit.
  • Tag registry versions semver-like (
    2026.2.0
    = year-quarter-patch). Patch for typo fixes; minor for new aliases; major for model swaps.
  • Deprecate, don't delete. Removing an alias breaks historical reruns. Mark as deprecated, keep the pin, flag in CLI output.
  • Document the bump. Every version bump ships with a changelog: which model, why, regression results, approver.
  • Re-run a prior campaign from its registry version quarterly to verify reproducibility still works. If it breaks, the provider deprecated the version — plan migration.

  • 全程使用别名,禁用原始ID。设计师在提示词中不应看到
    flux-2-pro@2.1.3
    ,只能看到
    flux
  • 注册表存储在Git中。提交、标记、对比差异、审核、回退。免费获得完整审计追踪。
  • 每次版本更新前运行回归测试语料库。10–20个标准提示词,在新旧版本上运行,视觉差异需经品牌负责人批准。
  • 在模型支持的情况下固定随机种子以实现可复现性
    --seed 42
    可确定性地重新生成相同输出。
  • 提示词模板指纹识别。模板的任何字符串更改都视为版本更新,而非静默编辑。
  • 类语义化版本标记注册表版本
    2026.2.0
    = 年份-季度-补丁)。补丁用于修复拼写错误;小版本用于添加新别名;大版本用于更换模型。
  • 标记弃用,而非删除。删除别名会破坏历史重运行。标记为已弃用,保留固定版本,在CLI输出中提示。
  • 记录版本更新。每个版本更新都附带变更日志:涉及哪个模型、原因、回归测试结果、批准人。
  • 每季度从注册表版本重新运行一次过往营销活动,验证可复现性是否仍有效。如果失效,说明供应商已弃用该版本——需规划迁移。

Pitfalls

常见陷阱

  • Aliases + raw IDs mixed in manifests — teams drift off the registry unintentionally. Lint for raw IDs in PRs.
  • No regression corpus — bumps ship, drift is invisible until a comms leader notices a year later.
  • Provider deprecates a pinned version — eventually happens. Run your registry's prior versions quarterly to catch this before a legal reroll is needed.
  • Prompt edits without fingerprint bump — someone "fixes a typo" in a template, now the output differs. Fingerprint + bump.
  • Seed not pinned — reproducibility is partial without it. Set a registry default seed.
  • Registry in a personal repo — loses institutional access. Must live in a governance-owned repo.

  • 清单中混合使用别名和原始ID——团队无意中偏离注册表。在PR中检查是否存在原始ID。
  • 无回归测试语料库——版本更新发布后,漂移问题直到一年后才被传播负责人发现。
  • 供应商弃用固定版本——这种情况最终会发生。每季度运行注册表的旧版本,以便在需要法律重生成之前发现问题。
  • 提示词编辑未更新指纹——有人“修复”了模板中的拼写错误,现在输出不同。必须更新指纹并进行版本更新。
  • 未固定随机种子——没有随机种子的可复现性是不完整的。在注册表中设置默认随机种子。
  • 注册表存储在个人仓库中——失去机构访问权限。必须存储在治理团队拥有的仓库中。

Verification

验证方法

Run
gen-ai whoami
to confirm authentication, then re-run the failed command with
--debug
.
运行
gen-ai whoami
确认身份验证,然后使用
--debug
参数重新运行失败的命令。

Commands

命令示例

bash
undefined
bash
undefined

Point the CLI at the registry

将CLI指向注册表

gen-ai config set registry.path ./brand-registry/registry.json
gen-ai config set registry.path ./brand-registry/registry.json

Pin a model alias

固定模型别名

gen-ai config set registry.flux flux-2-pro@2.1.3 gen-ai config set registry.kontext flux-kontext-pro@1.4.0 gen-ai config set registry.kling kling-v3-pro@3.0.1 gen-ai config set registry.upscale topaz-upscale-image@2.0.0
gen-ai config set registry.flux flux-2-pro@2.1.3 gen-ai config set registry.kontext flux-kontext-pro@1.4.0 gen-ai config set registry.kling kling-v3-pro@3.0.1 gen-ai config set registry.upscale topaz-upscale-image@2.0.0

Verify a given alias resolves to the pinned version

验证指定别名是否解析为固定版本

gen-ai config get registry.flux
gen-ai config get registry.flux

→ flux-2-pro@2.1.3

→ flux-2-pro@2.1.3

Generate using the alias (reproducible)

使用别名生成内容(可复现)

gen-ai generate --model flux --prompt-file prompts/hero-launch.txt
--seed 42
gen-ai generate --model flux --prompt-file prompts/hero-launch.txt
--seed 42

Batch resolves all aliases against the registry

批量解析所有别名到注册表

gen-ai batch run campaign.json

Every manifest references aliases, never raw model IDs. The registry is the one place that maps alias → version.

---
gen-ai batch run campaign.json

所有清单都引用别名,从不使用原始模型ID。注册表是唯一映射别名→版本的地方。

---

Cost & time

成本与时间

Registry operations are cheap. The value is in what they prevent.
ActivityCostTime
Author initial registry01 engineer-day
Quarterly regression corpus (20 prompts)~200 credits~1 h generation + ~2 h review
Version bump + tag0~30 min
Reproduce a 1-year-old campaignSame credits as originalSame wall time
Provider-deprecation migration~500 credits1–2 engineer-days
Cost savings scale with team size: a 20-person design team bumping incidentally costs far more in drift than one quarterly reviewed bump.

注册表操作成本低廉。其价值在于预防问题。
活动成本时间
创建初始注册表01个工程师工作日
季度回归测试语料库(20个提示词)~200积分~1小时生成 + ~2小时审核
版本更新+标记0~30分钟
复现1年前的营销活动与原始生成相同的积分与原始生成相同的耗时
供应商弃用版本迁移~500积分1–2个工程师工作日
成本节约随团队规模扩大而增加:一个20人的设计团队因无规则版本更新产生的漂移成本,远高于每季度一次经过审核的版本更新成本。

See also

相关链接

  • enterprise-brand-governor — brand.md gating; pairs with the registry for full policy-as-code
  • product-photo-studio — batch catalog runs (reshoot mode); use registry aliases
  • enterprise-press-batch — embargo-aware pipeline, pin for year-over-year consistency
  • gen-ai-use — CLI reference
  • enterprise-brand-governor — 品牌管控;与注册表配合实现完整的策略即代码
  • product-photo-studio — 批量商品目录生成(重拍模式);使用注册表别名
  • enterprise-press-batch — 禁运感知流水线,固定版本以实现年度一致性
  • gen-ai-use — CLI参考文档