Ship contracts

From zkp2p/zkp2p-contracts · View interactive version

Ship contracts is an AI agent skill from the GitHub repository zkp2p/zkp2p-contracts. Prepare and coordinate zkp2p-contracts deployment changes across source, staging activation, production activation, package export, RC publication, and stable publication. Use when asked to ship or deploy contracts. Keep these as separately reviewed and approved boundaries, use hard cutovers, and de

How to use this skill

Skill file

Ship contracts

Shipping is not one automatic pipeline. Treat each boundary as an independent

deliverable with its own evidence and explicit authorization:

  1. source and network-scoped deployment lane;
  2. staging activation;
  3. production activation;
  4. package export;
  5. RC publication;
  6. stable publication.

Approval for one boundary does not authorize the next. Never infer production,

RC, or stable approval from "deploy staging" or "ship the code."

Establish current state

Resolve canonical main explicitly; do not trust a checkout's origin, a

contributor fork, or a legacy redirect:

canonical_main_ref=refs/remotes/zkp2p-canonical/main
git fetch --no-tags https://github.com/zkp2p/zkp2p-contracts.git \
  "+main:${canonical_main_ref}"
git rev-parse "$canonical_main_ref"
git rev-parse HEAD

Record the source SHA, deployment artifacts, active runner, package version,

and live target network before preparing a plan.

Read:

Do not route through the legacy repository name or an archived deployment lane.

Boundary 1: source and network-scoped deployment lane

Create the smallest source, interface, deployment, and test changes that encode

the approved target state.

activation as distinct states.

design intentionally differs from V2. Its mounted lane 30 supports

localhost, hardhat, Base staging, and an explicitly gated Base

whitelist-only deployment.

reviewed exact source SHA, and the production governance/deployer path. It

must leave existing orchestrators registered and produce only the fresh O3

registry-add Safe call. Lanes 31 and 32 remain outside that deployment.

deployments must match their pinned addresses, runtime code hashes, immutables,

owners, payment methods, and sole-writer invariant; mismatch fails closed. Base

staging is verification-only because its EOA-owned registries cannot provide an

atomic cutover. The gated Base cutover must preserve the audited method order and

currencies, route all ten methods to UPV3, and revoke both retired

legacy-registry writers in the same atomic Safe batch.

activation in one source lane. Staging must use a deploy-only run followed by

a separately confirmed activation run after the fresh addresses are propagated

and the predecessor is drained. Base execution may deploy the assets and prepare

the ownership-acceptance plus hook-activation Safe calls, but it must never

submit or execute that batch.

hard cutover.

migration.

Numbered deploy metadata is immutable identity only when current tooling

requires it. Before retaining an inactive numbered script, prove from

scripts/deployActive.ts, its skip logic, network guards, deployment tests,

and package export that it cannot execute or surface as active state. If the

active runner loads it and the proof is absent, remove or disable the active

lane rather than documenting intent.

Validate with the smallest Foundry and deployment checks required by

AGENTS.md. Source preparation must not mutate a live network.

Boundary 2: staging activation

Require explicit approval naming Base staging and the exact source SHA.

Before activation:

new state;

UnifiedPaymentVerifierV3, lifecycle hook, stake vault, dispute protection

policy, verifier/nullifier, registries, ownership, and prior-orchestrator state

from current source and artifacts;

After activation, verify on-chain state and record addresses, transaction hashes,

ownership, permissions, and artifacts. Do not publish an RC automatically.

Boundary 3: production activation

Require a separate explicit approval naming Base production, exact source SHA,

and governance/deployer path. Re-run state and simulation checks against

production immediately before submission.

The Base whitelist-only lane must be reviewed at an exact source SHA. Require

the explicit Base cutover flag, retain existing orchestrators, and verify that

the generated Safe batch contains only addOrchestrator(freshO3). Do not reuse

staging artifacts or include lanes 31 or 32 as a shortcut. Any separate Base

lane-32 run requires its own exact-SHA authorization and may only prepare the

reviewed Safe batch until execution is separately approved.

Fail closed on chain, address, signer, ownership, permission, or expected-state

mismatch. Do not reuse staging approval. Do not publish a package automatically.

Boundary 4: package export

Package extraction is a source artifact boundary, not publication. Confirm:

exports and claims;

without an address on another network, but must never imply activation there;

Run package build, tests, release verification, and dry-run packing without

publishing.

Boundaries 5 and 6: publication

Delegate both RC and stable requests to

.agents/skills/zkp2p-contracts-publish/SKILL.md.

release policy.

a dist-tag as this skill.

and request a focused release-policy/workflow PR. Do not improvise a local

stable release.

Handoff

For each boundary, report:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.