Back to docs index

Foundry Pack System v0 contract

Purpose

Define the first shippable Foundry pack contract for pre-skilled local workflow agents.

A pack is a versioned, auditable bundle that tells Foundry:

Explicit non-goals

This contract does not define:

Hermes remains the V1 default harness. Foundry remains the control plane, installer, evidence spine, and policy surface.

Why packs exist

Ged's modular thesis is accepted here as the product direction: value comes from specialist local models + pre-wired workflow skills + explicit routing + evidence, not one giant general model.

Commercially, the pack is the unit we can sell, install, support, and audit.

Pack contract principles

  1. Workflow-first: each pack serves one bounded job.
  2. Local-first: default path is localhost/local-network inference and local data handling.
  3. Pre-skilled: packs ship with named workflow skills, prompts, templates, and evals already chosen.
  4. Auditable permissions: approvals are granted by capability group, not one exec at a time.
  5. Evidence-backed: install/check/run claims are only valid if the required artifacts exist.
  6. Foundry truth: Foundry owns status, routing truth, permission state, and support/evidence summaries.
  7. Default deny for external send: no outbound customer/system send unless the pack explicitly requests and the operator explicitly grants it.

1) Pack object model

A Foundry pack v0 is a directory with this minimum shape:

pack-root/
  pack.yaml
  README.md
  skills/
  evals/
  demo-data/
  scripts/
  evidence/

Required top-level artifacts


2) Manifest schema (pack.yaml)

All fields below are required unless marked optional.

2.1 Identity and scope

FieldTypeContract
schema_versionstringMust be foundry-pack/v0.
pack_idstringStable machine ID, kebab-case, globally unique within Foundry.
namestringHuman pack name.
versionstringSemver.
domainstringBusiness/workflow domain, e.g. pdf-ops.
summarystringOne-sentence bounded promise.
ownerstringImplementation owner/team.
harnessstringMust name the approved harness, V0 default hermes.
entry_surfaceslistAllowed invocation surfaces, e.g. api, watched-folder, slack.
workflow_idstringStable workflow identifier inside the harness/pack.
customer_profilestringIntended operator/buyer type.
data_classificationstringMust declare sensitivity, e.g. customer-documents-local-only.

2.2 Models and routing

FieldTypeContract
required_modelslistNamed model dependencies with runtime, source, quantization if relevant, and required/optional flag.
model_routeslistExplicit task-to-model routing table.
route_policyobjectFallback, timeout, retry, and no-route behavior.
eval_hookslistRoute-specific evals that must pass before a route is marked ready.

Each required_models item must include:

Each model_routes item must include:

2.3 Skills and workflow contents

FieldTypeContract
skillslistNamed skills/configured capabilities the pack ships or wraps.
workflow_stepslistOrdered workflow stages with responsible skill/model route.
human_review_pointslistMandatory review gates before external or destructive actions.
memory_policyobjectWhat session memory is allowed, retained, and prohibited.

Each skills item must include:

2.4 Permissions

FieldTypeContract
permission_profileobjectGrouped capability grants requested by the pack.
defaultsobjectMust show default deny posture for unlisted capabilities and outbound send.
approval_notesstringPlain-language explanation of why the requested groups are necessary.

2.5 Operations

FieldTypeContract
installobjectCanonical install command(s), prerequisites, and success criteria.
checkobjectCanonical readiness/doctor command(s) and pass criteria.
runobjectCanonical demo or production invocation command(s).
support_bundleobjectCommand and expected outputs for pack evidence/support collection.

2.6 Validation and evidence

FieldTypeContract
evalslistNamed eval suites and pass thresholds.
demo_datalistRequired local fixtures for reproducible proof.
evidence_outputslistExact artifacts the pack must emit on install/check/run.
truthful_limitationslistKnown limits that must be preserved in operator/customer-facing summaries.

2.7 Lifecycle

FieldTypeContract
update_policyobjectAllowed upgrade path, migration behavior, and recheck requirements.
rollback_policyobjectHow to revert to prior working version and restore previous config.
compatibilityobjectRequired Foundry version, harness version, and platform assumptions.

3) Grouped permission model

Packs request capability groups. Foundry grants or denies these groups at install/enable time and records the resulting policy in pack status.

Permission groups

Group IDWhat it allowsDefaultNotes
fs.read_onlyRead approved local directories onlyallow if path-scopedNo writes, deletes, or moves.
shell.local_safeNon-destructive local commands from an allowlisted command familyallow only if declaredFor checks, OCR, indexing, hashing, validation.
packages.installPackage install/update commandsdenyNeeded only during install/update flows.
services.controlStart/stop/restart approved local servicesdenyMust be service-scoped.
network.fetchHTTP(S) fetch/read to declared endpointsdenyFor model pulls, docs fetch, or local service probes.
outbound.sendSend messages/email/webhook payloads externallydenyDefault deny always unless explicitly granted.
ops.destructiveDelete, overwrite, purge, uninstall, or irreversible file/state changesdenyMust require human review point.
credentials.accessRead/inject secrets or auth tokensdenyMust be source-scoped and audited.
data.customer_processProcess declared customer content locallydeny until operator acceptsRequired for real workflow use, not for installer alone.

Contract rules for permission groups

  1. Pack manifests must request permissions by group ID, not by ad-hoc command.
  2. Every group must declare:
  1. Foundry must store the final resolved permission state in pack status and support bundles.
  2. outbound.send must remain denied by default even if network fetch is allowed.
  3. ops.destructive and credentials.access cannot be implicitly inherited from other groups.
  4. data.customer_process must be separately visible because demo/install proof may be safe while real customer use is sensitive.
  5. A pack with denied required permissions is installable only as partial or demo-only, never falsely ready.

Minimum status shape for resolved permissions

resolved_permissions:
  fs.read_only:
    state: granted
    scope:
      - /approved/input
      - /approved/output
  shell.local_safe:
    state: granted
    scope:
      - pdfsig
      - md5
      - sqlite
  outbound.send:
    state: denied
    reason: default-deny-external-send

4) Model routing contract

Packs must support specialist routing and explicit fallback.

Required route behavior

  1. Every workflow step that uses a model must map to a named route_id.
  2. Every route must identify one primary model and zero or more fallback models.
  3. Every route must declare whether failure causes:
  1. Every route must have at least one eval hook before it is marked production-ready.
  2. Foundry status must show route readiness per route, not just pack-level green.
  3. Foundry support bundles must preserve route decisions and failure reasons.

Example route shape

model_routes:
  - route_id: classify-document
    task_type: document-classification
    primary_model: mlx-community/Qwen3-0.6B-8bit
    fallback_models: []
    input_contract: extracted-pdf-text
    output_contract: document-type-json
    max_latency_ms: 3000
    quality_gate: eval:pdfops-classify-smoke
    on_failure: fail-closed

V0 honesty rule

If a pack has not proven a route with local evidence, Foundry must report that route as declared-not-proven, not ready.


5) Install / check / run contract

Each pack must define three canonical operator actions.

Install

Install means:

Install output must be machine-readable and include:

Check

Check means:

Check output must include:

Run

Run means one reproducible invocation using demo data or approved local input.

Run output must include:


6) Evidence bundle requirements

Every pack must define a support/evidence bundle with exact file names. V0 packs are not considered supportable without this.

Minimum required evidence classes

Minimum evidence bundle contents

For any pack run, Foundry must emit a timestamped bundle containing at minimum:

Packs may add domain-specific evidence files, but cannot omit the common spine above.

Evidence honesty rule

If a pack depends on a side artifact because a status counter or summary is not yet truthful, the contract must say so explicitly, just as the Foundry V1 Hermes contract does for signed-PDF runtime proof.


7) Update and rollback policy contract

Update policy must define

Rollback policy must define

V0 rule

A pack update that changes required models, permissions, workflow behavior, or evidence contract must force a new check run before status can return to ready.


8) PDF Ops Pack v0 — reference pack contract only

This is the first reference pack. It is contract-level only here; implementation follows in separate MC tasks.

Pack identity

schema_version: foundry-pack/v0
pack_id: pdf-ops-pack
name: PDF Ops Pack
version: 0.1.0
domain: pdf-ops
summary: Local PDF ingest, extract, preserve, index, and retrieve workflow for PDF-heavy operators.
owner: Pam
harness: hermes
workflow_id: pdf-ops
entry_surfaces:
  - api
  - watched-folder
customer_profile: pdf-heavy businesses
data_classification: customer-documents-local-only

Anchoring evidence and reuse

This pack must reuse, not reinvent, already-approved evidence and assets from:

Required skills

The first reference pack must be built from these existing skills/patterns:

Optional later extensions, not required for v0:

Required workflow steps

  1. ingest approved PDF input
  2. fingerprint source file
  3. extract text/fields
  4. generate bounded local summary where configured
  5. preserve/archive original bytes unchanged
  6. write structured JSON sidecar
  7. index into local retrieval store
  8. answer retrieval/query request with provenance
  9. emit evidence

Required model routes

At minimum the reference pack must declare routes for:

The initial primary model anchor may reuse the approved local Hermes gate model:

If OCR/classification/retrieval later split across multiple specialists, the pack must express those as separate routes rather than hiding them behind one “general model” label.

Required permissions for PDF Ops Pack v0

GroupState targetWhy
fs.read_onlyrequiredread approved input corpus and fixtures
shell.local_saferequiredhashing, signature verification, sqlite, OCR/index helpers
packages.installinstaller-only if neededonly for explicit setup steps
services.controlrequired for local runtime checksverify/start local services where approved
network.fetchoptional/minimallocal endpoint probe; model/document fetch only if explicitly declared
outbound.senddenied by defaultno external customer sends in v0
ops.destructivenot required for standard runpurge/cleanup only behind human review
credentials.accessnot required by defaultonly if later surfaces like email/webhook are enabled
data.customer_processrequired for real operationprocess customer PDFs locally

Required evals

Minimum eval suite for PDF Ops Pack v0:

  1. install smoke
  2. readiness smoke
  3. five-PDF demo run
  4. 50-field extraction assertion
  5. archive byte-identity assertion
  6. signed-PDF preservation assertion
  7. retrieval/query assertion with citation
  8. no-cloud posture assertion

Required demo data

Required commands

The reference pack must expose contract-level commands equivalent to:

Exact CLI implementation is Tes-owned, but the pack contract must target these operator verbs.

Required evidence outputs

In addition to the common pack bundle spine, PDF Ops must emit:

Truthful limitations to preserve


9) Exact implementation tasks and owners

These are the next MC briefs to route. They are implementation tasks, not already-complete work.

Tes — Foundry pack CLI and installer

What this delivers A Foundry pack runtime/CLI path that can install, resolve grouped permissions, check, run, and bundle evidence for v0 packs.

Must implement

Binary acceptance criteria

Pam — Hermes PDF Ops pack contents

What this delivers The concrete pdf-ops-pack contents for Hermes, built by wrapping existing Hermes/PDF evidence and skills rather than reinventing them.

Must implement

Binary acceptance criteria

Mason — integration and check

What this delivers An integration pass confirming the Foundry pack CLI and Hermes PDF Ops contents work together honestly on the Mac Studio.

Must implement/check

Binary acceptance criteria

Quinn — QA gate

What this delivers Final QA on the first pack contract implementation.

Must verify

Binary acceptance criteria


10) Final rulings