Define the first shippable Foundry pack contract for pre-skilled local workflow agents.
A pack is a versioned, auditable bundle that tells Foundry:
This contract does not define:
Hermes remains the V1 default harness. Foundry remains the control plane, installer, evidence spine, and policy surface.
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.
A Foundry pack v0 is a directory with this minimum shape:
pack-root/
pack.yaml
README.md
skills/
evals/
demo-data/
scripts/
evidence/
pack.yaml — canonical manifestREADME.md — human install/use/support notesskills/ — workflow skill definitions, prompts, templates, and config fragments the pack requiresevals/ — runnable eval specs and expected pass criteriademo-data/ — safe local fixtures for install-check/demo/evidence generationscripts/ — installer/check/run helper commands referenced by the manifestevidence/ — templates or schemas for required evidence outputs, not customer datapack.yaml)All fields below are required unless marked optional.
| Field | Type | Contract |
|---|---|---|
schema_version | string | Must be foundry-pack/v0. |
pack_id | string | Stable machine ID, kebab-case, globally unique within Foundry. |
name | string | Human pack name. |
version | string | Semver. |
domain | string | Business/workflow domain, e.g. pdf-ops. |
summary | string | One-sentence bounded promise. |
owner | string | Implementation owner/team. |
harness | string | Must name the approved harness, V0 default hermes. |
entry_surfaces | list | Allowed invocation surfaces, e.g. api, watched-folder, slack. |
workflow_id | string | Stable workflow identifier inside the harness/pack. |
customer_profile | string | Intended operator/buyer type. |
data_classification | string | Must declare sensitivity, e.g. customer-documents-local-only. |
| Field | Type | Contract |
|---|---|---|
required_models | list | Named model dependencies with runtime, source, quantization if relevant, and required/optional flag. |
model_routes | list | Explicit task-to-model routing table. |
route_policy | object | Fallback, timeout, retry, and no-route behavior. |
eval_hooks | list | Route-specific evals that must pass before a route is marked ready. |
Each required_models item must include:
model_idruntime (mlx, ollama, llama.cpp, lm-studio, or other blessed runtime)endpointrole (e.g. ocr-summary, classifier, fallback-general)required: true|falselicense_noteEach model_routes item must include:
route_idtask_typeprimary_modelfallback_models (may be empty)input_contractoutput_contractmax_latency_msquality_gateon_failure (fallback, fail-closed, human-review)| Field | Type | Contract |
|---|---|---|
skills | list | Named skills/configured capabilities the pack ships or wraps. |
workflow_steps | list | Ordered workflow stages with responsible skill/model route. |
human_review_points | list | Mandatory review gates before external or destructive actions. |
memory_policy | object | What session memory is allowed, retained, and prohibited. |
Each skills item must include:
skill_idsource (existing, wrapped, pack-local)purposerequired: true|false| Field | Type | Contract |
|---|---|---|
permission_profile | object | Grouped capability grants requested by the pack. |
defaults | object | Must show default deny posture for unlisted capabilities and outbound send. |
approval_notes | string | Plain-language explanation of why the requested groups are necessary. |
| Field | Type | Contract |
|---|---|---|
install | object | Canonical install command(s), prerequisites, and success criteria. |
check | object | Canonical readiness/doctor command(s) and pass criteria. |
run | object | Canonical demo or production invocation command(s). |
support_bundle | object | Command and expected outputs for pack evidence/support collection. |
| Field | Type | Contract |
|---|---|---|
evals | list | Named eval suites and pass thresholds. |
demo_data | list | Required local fixtures for reproducible proof. |
evidence_outputs | list | Exact artifacts the pack must emit on install/check/run. |
truthful_limitations | list | Known limits that must be preserved in operator/customer-facing summaries. |
| Field | Type | Contract |
|---|---|---|
update_policy | object | Allowed upgrade path, migration behavior, and recheck requirements. |
rollback_policy | object | How to revert to prior working version and restore previous config. |
compatibility | object | Required Foundry version, harness version, and platform assumptions. |
Packs request capability groups. Foundry grants or denies these groups at install/enable time and records the resulting policy in pack status.
| Group ID | What it allows | Default | Notes |
|---|---|---|---|
fs.read_only | Read approved local directories only | allow if path-scoped | No writes, deletes, or moves. |
shell.local_safe | Non-destructive local commands from an allowlisted command family | allow only if declared | For checks, OCR, indexing, hashing, validation. |
packages.install | Package install/update commands | deny | Needed only during install/update flows. |
services.control | Start/stop/restart approved local services | deny | Must be service-scoped. |
network.fetch | HTTP(S) fetch/read to declared endpoints | deny | For model pulls, docs fetch, or local service probes. |
outbound.send | Send messages/email/webhook payloads externally | deny | Default deny always unless explicitly granted. |
ops.destructive | Delete, overwrite, purge, uninstall, or irreversible file/state changes | deny | Must require human review point. |
credentials.access | Read/inject secrets or auth tokens | deny | Must be source-scoped and audited. |
data.customer_process | Process declared customer content locally | deny until operator accepts | Required for real workflow use, not for installer alone. |
requested: true|falsescopereasonhuman_review_required: true|falseoutbound.send must remain denied by default even if network fetch is allowed.ops.destructive and credentials.access cannot be implicitly inherited from other groups.data.customer_process must be separately visible because demo/install proof may be safe while real customer use is sensitive.partial or demo-only, never falsely ready.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
Packs must support specialist routing and explicit fallback.
route_id.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
If a pack has not proven a route with local evidence, Foundry must report that route as declared-not-proven, not ready.
Each pack must define three canonical operator actions.
Install means:
Install output must be machine-readable and include:
okpack_idversioninstall_mode (demo-only, partial, ready)missing_permissionsmissing_modelsnext_stepsCheck means:
Check output must include:
okpack_readyfailed_clausesroute_statuspermission_summaryevidence_pathRun means one reproducible invocation using demo data or approved local input.
Run output must include:
okworkflow_idinput_countoutput_countroute_decisionshuman_review_eventsevidence_pathEvery pack must define a support/evidence bundle with exact file names. V0 packs are not considered supportable without this.
For any pack run, Foundry must emit a timestamped bundle containing at minimum:
00-pack-manifest.yaml01-install.json02-check.json03-run.json04-route-status.json05-permissions.json06-evals.json07-truthful-limitations.md08-support-summary.mdPacks may add domain-specific evidence files, but cannot omit the common spine above.
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.
declared-not-provenA pack update that changes required models, permissions, workflow behavior, or evidence contract must force a new check run before status can return to ready.
This is the first reference pack. It is contract-level only here; implementation follows in separate MC tasks.
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
This pack must reuse, not reinvent, already-approved evidence and assets from:
/Users/lilly/clawd/projects/foundry-commercialisation/contracts/foundry-v1-contract.md/Users/lilly/clawd/projects/foundry-commercialisation/adapters/hermes/README.md/Users/lilly/clawd/projects/foundry-commercialisation/adapters/hermes/demo-scenario.md/Users/lilly/clawd/projects/foundry-commercialisation/adapters/hermes/mason-integration-check.md/Users/lilly/clawd/projects/foundry-commercialisation/release-candidate/The first reference pack must be built from these existing skills/patterns:
ocr-and-documentsnano-pdfllama-cpp or equivalent local inference serving pattern where neededlocal-llm-stats-maintenancemission-control-integrationOptional later extensions, not required for v0:
webhook-subscriptionshimalayasite-auditAt minimum the reference pack must declare routes for:
pdf-summarydocument-classificationretrieval-answerThe initial primary model anchor may reuse the approved local Hermes gate model:
mlx-community/Qwen3-0.6B-8bit at http://127.0.0.1:8085/v1If 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.
| Group | State target | Why |
|---|---|---|
fs.read_only | required | read approved input corpus and fixtures |
shell.local_safe | required | hashing, signature verification, sqlite, OCR/index helpers |
packages.install | installer-only if needed | only for explicit setup steps |
services.control | required for local runtime checks | verify/start local services where approved |
network.fetch | optional/minimal | local endpoint probe; model/document fetch only if explicitly declared |
outbound.send | denied by default | no external customer sends in v0 |
ops.destructive | not required for standard run | purge/cleanup only behind human review |
credentials.access | not required by default | only if later surfaces like email/webhook are enabled |
data.customer_process | required for real operation | process customer PDFs locally |
Minimum eval suite for PDF Ops Pack v0:
The reference pack must expose contract-level commands equivalent to:
foundry pack install pdf-ops-packfoundry pack check pdf-ops-packfoundry pack run pdf-ops-pack --demofoundry pack support-bundle pdf-ops-packExact CLI implementation is Tes-owned, but the pack contract must target these operator verbs.
In addition to the common pack bundle spine, PDF Ops must emit:
09-pdf-demo-report.json10-signed-pdf-report.json11-index-query-report.json12-no-cloud-posture.jsonThese are the next MC briefs to route. They are implementation tasks, not already-complete work.
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
foundry-pack/v0foundry pack install/check/run/support-bundledeclared-not-proven route honesty stateBinary acceptance criteria
foundry pack install <pack> validates manifest and writes machine-readable install resultready statefoundry pack check <pack> emits route and permission summariesfoundry pack support-bundle <pack> emits the required common spine filesWhat 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
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
pdf-ops-packdeclared-not-proven, not silently greenWhat this delivers Final QA on the first pack contract implementation.
Must verify
Binary acceptance criteria