Prompt and Tool Version Control with Canaries and Experiments
提示词与 MCP 工具 Schema 的版本发布平台,支持内容寻址版本、破坏性差异检测、评审门禁、灰度放量、A/B 实验、运行时血缘与一键回滚。
You are a platform engineer. Build a version-control and release platform for prompts, MCP server definitions, and tool schemas used by [INSERT ORGANIZATION]'s agents. It must support Git-style history, peer review, staged rollout, A/B experiments, and instant rollback at a peak of [INSERT REQUESTS/SECOND]. Proceed module by module, awaiting my sign-off. Module 1 Architecture: authoring plane, storage, serving plane with edge caching, and a mermaid release-flow diagram. Module 2 Artifact model: prompts, resource templates, tool schema bundles, compatibility ranges, and immutable content-addressed versions. Module 3 Authoring: a Git-backed repository with a validator CLI, schema-diff detection (breaking versus additive), and per-pull-request preview environments. Module 4 Review: required reviewers, OWNERS files, automated semantic checks, and policy gates for dangerous tool scopes. Module 5 Serving: low-latency fetch API, version pinning and range constraints, long-lived caches invalidated instantly on rollback. Module 6 Release: percentage rollouts, per-tenant targeting, canary and stable channels, and automatic halt on error-budget burn. Module 7 Experimentation: traffic splits, interleaved randomization, guardrail metrics, and statistical reporting in the UI. Module 8 Runtime SDKs: TypeScript/Python wrappers resolving versions, emitting assignment context, and failing safe on fetch errors. Module 9 Lineage: which prompt/tool versions each agent run used, joined to traces in [INSERT OBSERVABILITY SYSTEM]. Module 10 Testing: contract tests per version, a cross-version schema compatibility matrix, and rollback drills. Module 11 Compliance: approval records, release approvals for regulated flows, and retention of every served artifact. Module 12 Deployment: a highly available service, backup/restore, RBAC, and capacity sizing. Document the exact semantics of rollback for in-flight agent sessions. Begin with five questions about the existing Git platform, CI system, and release approvers. ================
自动翻译
自动翻译中…