pilot-promotion-gate
Use when Pilot is GATING A VARIANT-TO-VARIANT PROMOTION between two intentional configurations (e.g., staging → prod; canary 5%% → 50%%; blue → green; cell-A → cell-B). Natural phrasings: "Pilot, gate the promotion from staging to prod", "is variant B safe to promote from variant A?", "render the cross-variant safety verdict", "what would change between cells if we promote?", "promotion gate for the canary rollout". Pilot consumes cub-scout's `compare three-way` per variant + the per-variant `bindingSource` graph + `compare source-truth --strategy <s>` per variant to render a CROSS-VARIANT verdict — not a pre-deploy gate against a single resource (that's pilot-cd-gate). Pilot picks promotion safety + the field-level diff reasons; the actual promotion execution lives in Pilot's mutation path. Do NOT load for: a single-resource pre-deploy gate (use pilot-cd-gate), a rollback decision (use pilot-rollback-decision), a real-time event response (use pilot-watch-alert-response), or a post-deploy validation (use pilot-release-verification).
- License 许可
- MIT
- 最近更新
- 2026-11-14
- Stars
- ★ 14
- Forks
- 1
01 前言 Front Matter
- name
- pilot-promotion-gate
- phase
- cross-cutting
- description
- Use when Pilot is GATING A VARIANT-TO-VARIANT PROMOTION between two intentional configurations (e.g., staging → prod; canary 5%% → 50%%; blue → green; cell-A → cell-B). Natural phrasings: "Pilot, gate the promotion from staging to prod", "is variant B safe to promote from variant A?", "render the cross-variant safety verdict", "what would change between cells if we promote?", "promotion gate for the canary rollout". Pilot consumes cub-scout's `compare three-way` per variant + the per-variant `bindingSource` graph + `compare source-truth --strategy <s>` per variant to render a CROSS-VARIANT verdict — not a pre-deploy gate against a single resource (that's pilot-cd-gate). Pilot picks promotion safety + the field-level diff reasons; the actual promotion execution lives in Pilot's mutation path. Do NOT load for: a single-resource pre-deploy gate (use pilot-cd-gate), a rollback decision (use pilot-rollback-decision), a real-time event response (use pilot-watch-alert-response), or a post-deploy validation (use pilot-release-verification).
- allowed-tools
- Bash(./cub-scout compare three-way *) Bash(cub-scout compare three-way *) Bash(cub scout compare three-way *) Bash(./cub-scout compare drift *) Bash(cub-scout compare drift *) Bash(cub scout compare drift *) Bash(./cub-scout compare source-truth *) Bash(cub-scout compare source-truth *) Bash(cub scout compare source-truth *) Bash(./cub-scout impact *) Bash(cub-scout impact *) Bash(cub scout impact *) Bash(./cub-scout views resolve *) Bash(cub-scout views resolve *) Bash(cub scout views resolve *) Bash(./cub-scout views project *) Bash(cub-scout views project *) Bash(cub scout views project *) Bash(./cub-scout receipt verify *) Bash(cub-scout receipt verify *) Bash(cub scout receipt verify *) Bash(./cub-scout receipt show *) Bash(cub-scout receipt show *) Bash(cub scout receipt show *) Bash(./cub-scout receipt validate *) Bash(cub-scout receipt validate *) Bash(cub scout receipt validate *) Bash(./cub-scout receipt list *) Bash(cub-scout receipt list *) Bash(cub scout receipt list *) Bash(./cub-scout explain *) Bash(cub-scout explain *) Bash(cub scout explain *) Bash(./cub-scout trace *) Bash(cub-scout trace *) Bash(cub scout trace *) Bash(kubectl get *) Bash(kubectl describe *) Bash(cub space list *) Bash(cub unit get *) Bash(cub unit list *) Bash(cub link get *) Bash(cub link list *) Bash(cub view get *) Bash(cub view list *) Bash(cub unit-event list *) Bash(cub resource list *) Bash(cub release list *) Bash(cub changeset list *) Bash(argocd app get *) Bash(flux get *)
03 SKILL.md 正文
pilot-promotion-gate
The variant-to-variant promotion-safety scenario from Pilot's side. A pipeline (or a human) asks: is variant B safe to promote from variant A? — where A and B are two intentional configurations (staging → prod; canary 5% → 50%; blue → green; cell-A → cell-B). Pilot consumes cub-scout's evidence from both variants and renders a cross-variant safety verdict.
This is not pilot-cd-gate — that's the single-resource pre-deploy gate. Promotion is the cross-variant safety check: variant A has been running successfully; variant B is the proposed next state; the diff between them needs structured evidence before promotion fires.
When to use
Explicit phrasings:
- "Pilot, gate the promotion from staging to prod"
- "Is variant B safe to promote from variant A?"
- "Render the cross-variant safety verdict"
- "What would change between cells if we promote?"
- "Promotion gate for the canary rollout"
- "Pilot, decide on the 5% → 50% canary increase"
- "Show me the field-level diff between blue and green"
Implicit intents:
- A promotion is being staged (not a fresh deploy and not a rollback) — two variants are both real and Pilot is picking whether to advance
- The decision is cross-variant — comparing variant A's evidence to variant B's, not just evaluating B alone
- The result feeds a promotion ticket / release gate — the team needs structured evidence the promotion is safe, with field-level diff reasons
- The actual promotion (Argo PromotionStrategy sync, Flux progressive rollout, ConfigHub variant flip) is Pilot's mutation path
Do not load for
- A single-resource pre-deploy gate (no prior variant to compare against) —
pilot-cd-gate - A rollback decision (backward direction; this skill is forward-direction) —
pilot-rollback-decision - A post-deploy validation after the promotion already fired —
pilot-release-verification - A real-time event-driven drift response on either variant —
pilot-watch-alert-response - A fleet-wide conformance audit across many variants —
pilot-fleet-conformance - A compliance audit across policies (not a variant decision) —
pilot-compliance-audit - Any mutating action. The promotion execution is Pilot's; cub-scout doesn't promote.
The Pilot ↔ cub-scout promotion loop
release pipeline: variant A is running; variant B is the proposed promotion
│
▼
Pilot (acceptance judge)
│ "is B safe to promote from A?"
│
├──► For variant A (the current state):
│ cub-scout compare three-way <r> -n <ns-A> --format json
│ cub-scout compare source-truth <r> -n <ns-A> --strategy <s> --format json
│ cub-scout receipt verify <r> -n <ns-A> --strategy <s> \
│ --out variant-A.receipt.json
│
├──► For variant B (the proposed state):
│ cub-scout compare three-way <r> -n <ns-B> --format json
│ cub-scout compare source-truth <r> -n <ns-B> --strategy <s> --format json
│ cub-scout receipt verify <r> -n <ns-B> --strategy <s> \
│ --out variant-B.receipt.json
│
├──► Cross-variant binding diff:
│ cub-scout compare three-way <r> -n <ns-A> --format json \
│ | jq '.fieldMismatches[].bindingSource'
│ cub-scout compare three-way <r> -n <ns-B> --format json \
│ | jq '.fieldMismatches[].bindingSource'
│ # Pilot compares the bindingSource graphs field-by-field
│
└──► Cross-variant chained receipt:
cub-scout receipt verify <r> -n <ns-B> --strategy <s> \
--input-attestation variant-A.receipt.json \
--save \
--out promotion-target.receipt.json
│
▼
Pilot's cross-variant verdict:
│ A=PASS AND B=PASS AND diff is clean → PROMOTION PASS
│ A=PASS AND B=PASS but bindingSource → PROMOTION WATCH (caveats)
│ shifts in unexpected ways
│ A=PASS AND B=WATCH → PROMOTION ASK (B isn't ready)
│ A=PASS AND B=BLOCK → PROMOTION BLOCK (don't promote)
│ A=BLOCK → PROMOTION BLOCK (fix A first)
│
▼
release pipeline reads the verdict
│ PASS → fire Pilot's promotion mutation path
│ WATCH → fire with caveats attached to the release ticket
│ ASK → halt; the on-call decides
│ BLOCK → halt; alert; do not promote
└────────────────────────────────────────────────────
What "variant" means here
This skill handles three common variant shapes:
| Variant shape | Variant A | Variant B | cub-scout reads |
|---|---|---|---|
| Environment promotion | deploy/api -n staging |
deploy/api -n prod |
Same kind/name, different namespaces |
| Canary progression | deploy/api -n prod (HPA limit 5%) |
deploy/api -n prod (HPA limit 50%) |
Same resource, different Argo-Rollouts step |
| Blue-green flip | deploy/api-blue -n prod |
deploy/api-green -n prod |
Different names, same role; Pilot compares both against the shared upstream Unit |
| Cell rollout | deploy/api -n prod-use1 |
deploy/api -n prod-euw1 |
Same resource in different cluster cells |
For each shape, Pilot's cross-variant call is structurally the same: read both variants' three-way + source-truth + bindingSource graphs; compute the diff; render a verdict. cub-scout doesn't model variants as a first-class concept — it reads the kind/name/namespace pair Pilot passes. The variant pairing is Pilot's job.
Why bindingSource matters for promotion
The bindingSource per field (connected-mode only; from #435 C2) records which ConfigHub Link supplied this field's value. Cross-variant safety often hinges on whether the same upstream Link feeds both variants:
- A and B reference the same upstream Unit at the same path → safe; the promotion is just propagating an already-canonical value
- A and B reference different upstream Units → caveat; the promotion is also a Link-graph shift, which may surprise the operator
- A has a bindingSource but B has
null→ ASK; B might be unmanaged or the Link wasn't promoted alongside
This is the load-bearing reason promotion-gate is distinct from pilot-cd-gate: a single-variant gate doesn't see the cross-variant Link-graph shift.
Step-by-step
Step 1 — per-variant evidence
# Variant A (current)
$ cub-scout compare three-way deploy/api -n staging --format json > variant-A-3way.json
$ cub-scout compare source-truth deploy/api -n staging --strategy git-argo --format json > variant-A-st.json
$ cub-scout receipt verify deploy/api -n staging --strategy git-argo \
--save \
--out variant-A.receipt.json
# Variant B (proposed)
$ cub-scout compare three-way deploy/api -n prod --format json > variant-B-3way.json
$ cub-scout compare source-truth deploy/api -n prod --strategy git-argo --format json > variant-B-st.json
$ cub-scout receipt verify deploy/api -n prod --strategy git-argo \
--save \
--out variant-B.receipt.json
Step 2 — extract field-level diff between variants
# Pilot's cross-variant diff — fieldMismatches by path
$ jq -s '
{
A_fields: .[0].fieldMismatches | map({path, value: .compareThreeWay.live, bindingSource}),
B_fields: .[1].fieldMismatches | map({path, value: .compareThreeWay.live, bindingSource})
}
' variant-A-3way.json variant-B-3way.json
Pilot reads:
- Fields present in A but not B (deleted)
- Fields present in B but not A (new)
- Fields in both with different values (changed)
- Fields where the
bindingSourceshifted (cross-variant Link-graph drift)
The last category is the most important and the hardest to surface — only the cross-variant comparison can see it.
Step 3 — chained receipt records the cross-variant relationship
$ cub-scout receipt verify deploy/api -n prod \
--strategy git-argo \
--input-attestation variant-A.receipt.json \
--save \
--out promotion-target.receipt.json
The promotion-target receipt's inputAttestations[] records variant A's receipt — the audit trail says "promotion B was gated against the prior variant A's evidence." If A's receipt is later tampered with, the chain construction (VerifiedAttestationRef API-boundary verify) refuses.
Step 4 — Pilot's verdict synthesis
| Variant A verdict | Variant B verdict | bindingSource diff | Pilot promotion verdict |
|---|---|---|---|
| PASS | PASS | none | PASS |
| PASS | PASS | shifted but explicable | WATCH |
| PASS | PASS | shifted without rationale | ASK (human decides) |
| PASS | WATCH | — | ASK (B isn't ready) |
| PASS | BLOCK | — | BLOCK |
| PASS | INCONCLUSIVE | — | ASK (B can't be evaluated) |
| WATCH / BLOCK | any | — | BLOCK (fix A first; don't promote a sick variant) |
| INCONCLUSIVE | any | — | ASK (A's evidence isn't reliable for the gate) |
The decision is cross-variant — both variants' verdicts and the diff between them all feed the promotion verdict. cub-scout doesn't synthesize this; Pilot does.
Worked example
Promotion: deploy/payments-api from staging to prod. Declared strategy: git-argo.
# Per-variant receipts
$ cub-scout receipt verify deploy/payments-api -n staging \
--strategy git-argo --save --out staging.receipt.json
# verdict: PASS
$ cub-scout receipt verify deploy/payments-api -n prod \
--strategy git-argo --save --out prod.receipt.json
# verdict: WATCH; proof_gaps lists git-source-anchor missing for one container
# Cross-variant chained receipt
$ cub-scout receipt verify deploy/payments-api -n prod \
--strategy git-argo \
--input-attestation staging.receipt.json \
--save \
--out promotion-target.receipt.json
Pilot's verdict synthesis:
- staging.verdict = PASS
- prod.verdict = WATCH (a per-container source-anchor gap)
- bindingSource diff: identical (same upstream Unit in both variants)
- → Pilot promotion verdict: ASK (B isn't fully ready; missing source-anchor on one container)
Pilot's verdict pack:
{
"decision_type": "promotion",
"from_variant": "staging",
"to_variant": "prod",
"from_receipt": "staging.receipt.json",
"to_receipt": "prod.receipt.json",
"chained_target": "promotion-target.receipt.json",
"from_verdict": "PASS",
"to_verdict": "WATCH",
"binding_source_diff": "none",
"promotion_verdict": "ASK",
"rationale": "B (prod) has a WATCH verdict with proof_gaps; on-call should decide whether to proceed",
"next_step": "route to on-call; promotion mutation lives in Pilot's stack, not cub-scout"
}
Standalone vs connected
Connected mode strongly recommended for promotion-gate:
compare source-truth --strategy— connected (per-variant strategy verdict)bindingSourcefield on each mismatch — connected (Link-graph data)impactfor blast-radius — connected
Standalone mode degrades:
- Receipt verdicts can still be produced via
--predicate applied-matches-spec - bindingSource is null per field; cross-variant Link-graph diff isn't available
- The promotion-gate result is narrower; Pilot's policy should escalate to ASK when bindingSource isn't readable.
Tool boundary
- Allowed (cub-scout): Compare verbs (read-only),
impact,views resolve/project,receipt verify/show/validate/list,explain,trace. All read-only. - Allowed (cluster):
kubectl get/describe. NOTkubectl apply / edit / patch / delete. - Allowed (ConfigHub):
cub <entity> get / listfor the entities named in allowed-tools. NOT any mutatingcubverb. - Allowed (controllers):
argocd app get,flux get. NOTargocd app sync,flux reconcile. - Pilot's promotion execution (Argo PromotionStrategy, Flux progressive rollout, ConfigHub variant flip, blue-green service swap) is Pilot's mutation path, deliberately not named here.
References
scout-compare— Compare verbs (cub-scout side)scout-attribute—bindingSourcesemanticsscout-verify— chained receipts via--input-attestationpilot-cd-gate— single-resource pre-deploy companionpilot-rollback-decision— backward directionpilot-release-verification— post-promotion validationpilot-fleet-conformance— fleet-wide variant audit (related but different framing)- Attribution layer:
#435(C1+C2bindingSource) - Chained receipts:
#448(parent),#463(chained-half shipped)
Constraints
- cub-scout doesn't model variants as a first-class concept. The variant pairing (which two resources are being compared) is Pilot's job; cub-scout reads the kind/name/namespace pairs Pilot passes.
bindingSourcerequires connected mode AND both variants being ConfigHub-linked. Variants without Link coverage producenullbindingSource — the cross-variant Link-graph diff isn't surfaced. Pilot should escalate to ASK in that case.- The promotion-target receipt's
inputAttestations[]typically references variant A's receipt. If multi-step promotion (A → A' → B), Pilot may chain multiple prior receipts. The chain ordering is Pilot's choice — cub-scout treatsinputAttestations[]as a set (RFC 8785 canonical JSON orders the array, but the meaning is set-shaped). - Promotion mutation (the actual flip from A to B) is Pilot's mutation path. cub-scout's role ends at the promotion-target receipt; how Pilot fires the controller sync / variant flip is outside this skill.
04 同仓库更多 Skills
异常工作负载故障分诊
triage-unhealthy-workload
当用户需要在时间压力下应对出现故障的 Kubernetes 工作负载时使用——例如寻呼告警响起、CI 飘红、“生产环境挂了”的场景。自然表述包括:“deploy/api 出现 CrashLoopBackOff,该怎么办?”“发布卡住了,帮帮我”“这个 pod 起不来”“支付服务触发了寻呼告警”“argocd 里全红了”“我应该先检查什么?”“给我一份针对这个工作负载的分诊方案”。它将 doctor → explain → trace 组合成一个紧凑的约 30 秒循环,运维人员可在已确认寻呼告警的上下文中执行。不要用于:没有紧迫性的计划性排查(直接使用 scout-diagnose)、漂移相关问题(使用 investigate-drift),或任何变更操作(cub-scout 从不做变更——应由用户主导,转由 kubectl 处理)。
资源证据收据生成与校验
scout-verify
当用户需要针对某个 Kubernetes 资源生成带类型、带指纹、不可篡改(TYPED、FINGERPRINTED、IMMUTABLE)的证据工件时使用——即 cub-scout 的 Verify 动词组(在 #446 中发布的收据能力)。自然表述包括:“出具一份证明此资源合规的收据”“给我一份证明集群与 Git 一致的证明”“我需要一份可用于审计跟踪的可验证记录”“生成一份收据,证明自部署以来没有人工改动”“对照事实源(source-truth)校验 deploy/api 并保存工件”“验证此收据未被篡改”“展示我们有哪些收据”“此收据是否被篡改过?”“把证据附加到我的 CI 关卡”。当意图涉及 receipt / attestation / evidence-artifact / tamper-evident-record / verified-record / audit-trail / postmortem-evidence / acceptance-judge-input 时均应加载。不要用于:不落盘工件的实时比对(使用 scout-compare)、解读单个字段的来源出处(使用 scout-attribute),或真正实施修复(cub-scout 从不做变更——应由用户主导,转由 cub / argocd / kubectl 处理)。
scout-observe
Use when the user wants to SEE what is running in a Kubernetes cluster, who owns it, and how it is structured — the read-only Observe verb group of cub-scout. Natural phrasing: "what is running in my cluster?", "give me a map of resources", "who owns this Deployment?", "trace this back to its source", "show me the ownership tree", "scan this cluster for risk", "dump the cluster as JSON", "stream cluster events", "run cub-scout as a bot", "what is the connection status?", "is this cluster healthy?". Load when intent is observe / inventory / map / show / list / trace / scan / dump / stream / bot / health-check over a Kubernetes cluster. Do NOT load for: explaining WHY something is broken (use scout-diagnose), comparing cluster state to intended state (use scout-compare), provenance of individual field values (use scout-attribute), or any action that mutates the cluster (cub-scout never mutates — route to cub or kubectl with the user driving).
scout-mcp
Use when the user wants to expose cub-scout to an AI agent over MCP, wants a deterministic AI-ready snapshot of cluster context, or wants cub-scout running as a read-only event bot — the Integrate verb group. Natural phrasing: "start the MCP server", "expose cub-scout to Claude / Codex / my agent", "give me an AI-ready context pack of this cluster", "set up the MCP gateway", "what MCP tools does cub-scout expose?", "run cub-scout as a bot", "produce JSON context for an LLM to reason about this cluster". Load whenever intent is mcp / mcp-gateway / mcp-serve / context-pack / bot / agent-context / ai-snapshot / llm-context / model-context-protocol. Do NOT load for: actually running a non-integrate verb (those are scout-observe / scout-diagnose / scout-compare / scout-attribute / scout-ingest / scout-govern / scout-verify), or `cub` MCP integration (that's a separate tool surface).
scout-ingest
Use when the user wants to ADOPT existing Kubernetes / GitOps workload structure into ConfigHub after observing the live cluster — the adoption/import verb group of cub-scout. Natural phrasing: "discover workloads in this cluster and propose ConfigHub units", "show me the import proposal before I apply", "import this Argo Application set", "bring my Flux Kustomizations into ConfigHub", "preview what would land in ConfigHub if I imported this repo", "parse my git repo as a ConfigHub import bundle", "import a cluster aggregator", "what would --git-path produce for this repo?". Load whenever intent is adopt / import / ingest / preview / propose / parse-repo / discovery / aggregator / bring-into-confighub / what-would-confighub-see. Do NOT load for: questions about who changed a resource, whether it was edited by hand or drifted (use scout-attribute or investigate-drift); reading an exported `kubectl get -o yaml` dump to answer a question about the cluster (that is not an import); basic live-cluster inventory (use scout-observe), troubleshooting (use scout-diagnose), comparing live state to ConfigHub (use scout-compare), or the actual write to ConfigHub via `cub variant upload` (that is `cub`, not cub-scout — route to cub skills). Important: `cub-scout import apply` IS the mutating write into ConfigHub — this skill teaches the read-only preview path and explicitly refuses to invoke `import apply` itself.
ConfigHub 治理信号查询
scout-govern
当用户希望从 cub-scout 获取已连接的(CONNECTED)ConfigHub 治理信号时使用该技能 —— Govern(治理)动词组。自然表述:"给我看这个单元的 ChangeSet 历史"、"如果我修改这个单元,影响范围(blast radius)有多大?"、"我的机群中哪些集群是异常值?"、"给我看昨天的连接摘要"、"在整个机群中呈现这个视图"、"审计谁修改了这个"、"上一次应用来自哪里?"、"列出我拥有的 ConfigHub bundle"、"给我看过往快照的目录"。当意图为历史 / 影响 / 影响范围 / 机群异常 / 摘要 / 视图 / 审计 / bundle / 目录 / 连接上下文时加载。不要用于:实时集群比较(使用 scout-compare)、回执(使用 scout-verify)、正在运行的 Pod 清单(使用 scout-observe),或通过 cub 进行的任何修改。该技能的大部分功能需要 `cub auth login` —— 请提前说明。