Skip to content

feat(zeroshot-rust): define the versioned native role-contract pack #768

Description

@tomdps

Parent

Execution

AFK. Start only after every issue in Blocked by is merged, required CI is green for the resulting dev SHA, and the worktree is created from a freshly fetched origin/dev.

Outcome

Define the immutable versioned native role-contract pack independently of configuration files, provider selection, and graph manifests.

Authoritative contracts/current state

#670 owns provider catalog metadata; protocol graphs contain worker refs/bindings but no prompt text. Role contracts must be product-private admitted content, not hidden mutable runtime context.

Owned scope

  • Define the closed native roles/classifier/verifier/worker contracts, bounded static instructions, model-level/reasoning requirements, input/output schema references, and versioned canonical digest.
  • Pin exact role names used by the 20-route workflow compiler and reject duplicate/unknown roles or incompatible provider/catalog policy.
  • Keep prompt bytes outside GraphSpec; manifests bind only immutable role-contract IDs/digests and worker descriptors.
  • Provide one hand-authored Rust source of truth and deterministic audit/golden projection with no Node runtime/build dependency.

Acceptance criteria

  • Repeated canonicalization is byte-identical and every contract field/collection is bounded.
  • Unknown role/model level/reasoning/schema reference and incompatible provider capability fail before admission.
  • Changing role bytes changes the digest and prevents stale manifest reuse.
  • No config directory, credential, driver, graph compiler, or provider session is created.

Verification

cargo test -p zeroshot-rust --test role_contracts
cargo test -p zeroshot-rust --test architecture
npm run rust:check
npm run protocol:check
npm run typecheck
npm run lint
npm run test:unit
opcore check --changed

Every named focused target is an issue-owned deliverable and must execute non-zero tests before the common gates.

Non-goals

  • Settings/profile parsing.
  • Worker registry/manifest composition.
  • Credentials, concrete drivers, or protocol graph prompt fields.

Blocked by

Unblocks

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions