⚒️ The Foundry Pattern

The Pattern

Principles in Action

Guiding Principles states the pressures domain-free, on purpose. This page does the opposite, also on purpose: it is the one Pattern page that goes concrete, showing each principle as a decision someone actually made in one of the two instances — a validator rule, a directory that deliberately doesn’t exist, a field in a record. Where the principles page says what holds, this one says what got built.

The two instances sit at very different maturity, and the difference is load-bearing here. The galaxy-workflow-foundry is implemented — most of what follows is enforced in its build validator and casting code, not merely intended. The statistical-genomics-foundry is early — mostly design and positioning, with real decisions written down but little of it built yet. So instance #1 leads each section with enacted specifics; instance #2 appears where it has genuinely decided something, flagged for what it is. Reading the two together is the point: the decision they share is the principle; the decision each makes differently is the extension.

Source Authority Beats Local Copies

Instance #1 enforces this in code, not just as posture. There is no content/exemplars/ directory and no IWC mirror; pattern pages cite IWC workflows as plain links to a pinned commit — “author choice per citation, no enforced policy.” The validator makes the discipline non-optional: cite a generated local copy in place of upstream — a fixture path, a .ga or line citation — and the build errors, demanding an abstract IWC ID instead. The workflow-fixtures/ corpus the authors do generate is gitignored and invisible to both validator and site — an authoring aid the content model never reads. Where a copy genuinely must live in-repo — a vendored schema, an XSD — it is pinned to an upstream SHA in vendored_upstreams.yml with a regeneration command and a synced license, and casting stays read-only against all of it. Tool behavior is delegated, not transcribed: CLI notes carry an upstream: URL, and the validator errors if a documented command is absent from the real CLI’s metadata.

Instance #2 adopts the same rule verbatim before it has content to apply it to — “no corpus ingestion pipeline, no mirror, no fixtures dependency; integrate through citations by URL/DOI.” Its extension is which authorities: it names the issuing bodies for reporting standards (EQUATOR, ClinGen/PRS-RS, MIQE) and pins methods literature by DOI or commit as author choice. Its handful of source-reading notes already pin real DOIs with an extraction-provenance line. Same principle, a literature-and-standards corpus instead of a workflow one.

Redistributed Content Carries Its License

Both instances built this from a single shared decision table — license-policy.yml, materialized from the shared policy issue, mapping a normalized license id to a redistribution policy (verbatim-ok vs own-words-only), the casting modes each permits, and whether a license_file must accompany the carry. Both repos keep a byte-for-byte copy of its rows, each marked a cross-repo mirror in a header comment, because divergence would make the principle mean two different things. Instance #1 enforces the table at cast time. Its license frontmatter went from a flat SPDX enum to an anyOf of the enum plus a ^LicenseRef-<slug>$ escape hatch — a test asserts the enum stays in lockstep with the table’s keys — and a missing or unknown id resolves to the default row: own-words-only and a flagged defect, the default-deny substrate. Casting is the gate: an own-words-only license may not be carried verbatim or sidecar, and each redistributed ref’s license_file content-hash is stamped into _provenance.json (schema bumped to v3, now carrying license / license_file / license_file_hash per ref), so the license of every redistributed byte joins the lineage. The vendored CWL v1.2 Apache-2.0 text lives under LICENSES/ with its presence validated, and a LicenseBox component plus /licenses/<id> pages foreground it.

Instance #2 has no cast layer yet, so it cannot make casting refuse anything — and rather than fake a gate it lacks, it enforces at the two layers it owns. content.config.ts refines license to the same enum-or-LicenseRef grammar; all 24 source notes were migrated to normalized ids, with nuance an id can’t encode (PREPRINT-vs-published, access provenance) pushed into attribution rather than the license string. The table then drives mechanically what used to be author judgment: the LGPL (copyleft) DESeq2 vignette is paraphrased own-words so copyleft does not leak into the KB — while the functional strings the carve-out protects (the exact full-rank error message, alpha=0.1, parameter and function names) stay verbatim as facts — and the three CC-BY notes keep their verbatim quotes with the required notice, vendoring the CC-BY-4.0 text under LICENSES/. SourceMeta.astro derives a policy chip and a copyleft chip straight from the id; provenance is deferred, honestly, until the cast layer exists rather than retrofitted onto a record that isn’t emitted yet. So the extension is where the shared table is enforced: instance #1 makes it a cast-time refusal with the license written into provenance; instance #2, lacking a cast, makes it a schema constraint and a mechanical own-words-vs-verbatim authoring rule. Same grammar, same rows, same default-deny — different enforcement point, chosen by each instance’s maturity.

Reproducibility At Every Layer

In instance #1 the unit of reproducibility is the cast’s _provenance.json: the Mold revision, its content hash, the commit, and a refs array sorted by (kind, src) so two casts diff cleanly. Verbatim references carry src_hash == dst_hash — the equality is the proof nothing was paraphrased — and the casting command’s --check mode re-derives every hash and the deterministic render, exiting non-zero on any drift. The same drift discipline covers generated indexes: the dashboard and index pages are generated, committed, and string-compared against regeneration in CI. Identity is content-hash-plus-commit with no semver; re-casting is the migration path. (Honestly: the one committed cast is an early, minimal record — the model, prompt, and history blocks the schema defines are populated only on paths not yet exercised.)

Instance #2 inherits this and is explicit that provenance is “not to be lightened.” Its one domain-specific addition is the reproducibility decision that matters most for its field: provenance must record which empirical checks the referee ran — which null, which simulation, which calibration, which negative control — so a certified result carries the evidence of how it was refereed, not merely that it was. It also runs a “recoverability” discipline on its own notes: blind-author from sources, flag [GAP] where the notes fall short, never fill from memory.

Deterministic Tools Do Deterministic Work

This is where the two instances diverge most, and by design. Instance #1’s external check is the rails: the gxwf CLI parses and validates the workflow format, and the Foundry deliberately keeps no parallel prose “caveat catalog” for the failure modes a parser already catches — they are delegated to the tool, run inline in an author→validate→fix loop, not as terminal cleanup. (The exact checks live in the upstream CLI; the Foundry calls it, it does not reimplement it.) The Foundry’s own deterministic instrument is its build validator: Ajv against a typed meta_schema.yml, then layered cross-file passes that resolve every typed reference per kind. Casting holds the same order of trust — deterministic-first: verbatim copies, sidecars, and the whole skill render are mechanical; the LLM is reserved for references explicitly marked condense, behind a two-phase contract that refuses to ship an unfilled placeholder. (That condense path is specified but not yet exercised — every real reference so far is verbatim.)

Instance #2 keeps the principle’s soul — never let the model be the only judge of its own work — and changes its form completely, because its work has no parser. “Deterministic work” becomes the field’s empirical instruments: permutation under the null, simulation under known truth, negative controls, calibration. Its check splits in two — critique (reason about known invalidity patterns; fast, but still model reasoning, so necessary-not-sufficient) and calibrate (construct and run the empirical test — the part that is not self-certification) — and the strong form of its gate requires at least one calibrate pass, “because critique is reasoning, and reasoning is what we don’t trust.” No CLI ships for “is this method valid,” so the check becomes a deliverable the Foundry constructs rather than a tool it calls — and it runs at the cast skill’s runtime, keeping casting itself deterministic and read-only.

Progressive Disclosure Over Context Flooding

Instance #1 makes disclosure a property of every reference: each carries used_at, a load policy (upfront / on-demand), and a mode (verbatim / condense / sidecar), and an on-demand reference without a trigger draws a validator warning. A live Mold shows it — its output schema loads upfront while six research notes sit behind distinct triggers (“when considering existence-only, size-only, image-only … patterns”). Those triggers ride into provenance and into the rendered skill, which splits a Load Upfront section from a Load On Demand one and writes each trigger as a “Use when …” line. Where the work is a journey, pipelines disclose it: the dashboard leads with pipelines as the primary task surface, and each Mold shows which pipelines it appears in.

Instance #2 inherits this layer essentially unchanged and — honestly — has made no net-new disclosure decision of its own yet; the load-policy machinery carries over from the parent intact. Worth stating plainly rather than inventing a difference where there isn’t one.

Portable Artifacts Over Platform Fashion

A Mold in instance #1 is a typed reference manifest plus a procedural skeleton — explicitly “not a Claude-specific skill.” Target behavior is data, not code: a _target.yml per target declares the destination directory, extension, and allowed modes per reference kind, and casting reads it. The Claude cast is the only built target, and it cleanly doubles as a Claude plugin root — a .claude-plugin marketplace namespacing the skills — but the source stays vocabulary-neutral: wiki-links are resolved away and the word “Mold” is rewritten to “skill” only at cast time, never in the source. Reference content is target-agnostic and reused across casts; a new runtime is “a new cast target or harness, not a rewrite.” (Web and generic targets are scaffolded but unbuilt — the explicit decision is to prove the Claude path first.)

Instance #2 inherits this whole layer — Mold → Cast → provenance and the cross-resolving validator — verbatim, and exercises one target (Claude) against one pinned casting model. Its only adaptation is which reference kind dominates: research notes are “our heaviest kind,” and the structured-schema kind the parent leans on is demoted.

Actionable Knowledge, Not Passive Notes

Instance #1 keeps the rich graph and makes it executable. The KB is wiki-linked and resolves through a single shared module used by both the validator and the site — no parallel implementation to drift. A Mold’s manifest plus its input_artifacts / output_artifacts make an action’s dependency surface machine-readable, and the validator enforces that every consumed artifact has a producer Mold and that producers agree on its schema. Casting condenses that graph into a frozen bundle with no links back, adding deterministic operational sections — when-to-use, inputs, outputs, required tools, validation, procedure. And it keeps the two roles separate: author-facing meta-content (changelog, open questions) is kept out of the runtime body, because “anything in the body is runtime instruction.”

Instance #2’s whole reason to exist is one sharpening of this principle: a do step may not certify itself. It splits its catalog into Family A (frame, design-review, pick an established method, run reproducibly) and Family B (audit validity, construct the empirical check), and makes the gate obligation an invariant — “a Family-A protocol may not terminate in self-certification; it must hand off to a Family-B referee whose verdict gates certification.” The referee is itself a Mold — authored knowledge cast into a skill, a deliverable rather than infrastructure — and its evals are reframed to match: the highest-value test is catch-the-planted-flaw (“any analysis where feature selection and inference share data must be flagged as double-dipping, never passed”). A referee with no “must catch X” property, the spec says, isn’t refereeing. The flagship Mold (audit-method-validity) is named and sequenced first — but not yet authored.

Corpus-First, Not Invention-First

Instance #1 enforces corpus-first in the validator rather than trusting it as posture. Every reference carries an evidence label — hypothesis / corpus-observed / cast-validated — and a hypothesis reference that lacks a verification field is an error; a schema reference marked hypothesis draws a warning, because the schema is the cast contract and should be cast-validated. The grounding scan is tiered and documented — grep the corpus, read ~120 stripped “skeletons” (median ~6 KB, sized to fit in context), then selectively read whole workflows. Stub discipline is checked too: a Mold whose body is still a stub yet already declares references draws a warning, because casting would bundle references with no procedure to apply them. Taxonomy is demand-driven — tag families “bloom as patterns surface real cross-cutting needs.”

Instance #2 makes corpus-first load-bearing in a way the parent never needed, and adds the one piece with no parent analog: a bipolar corpus. The parent’s IWC corpus is all positive exemplars; a referee grounded only in good examples can’t recognize a bad one, so this instance pairs established-good methods with cautionary-bad ones — named invalidity patterns (double-dipping, confounding, naive multiple-testing, invented methods) with their signatures and remedies. It holds the same stub discipline under a sharper motto — “we must not become the thing we referee” — weights hypothesis-evidence references as exactly where its own invention-risk lives, and explicitly refuses to mint a role taxonomy before content exists: the construct/critique/calibrate split stays cheap tags until six-to-ten real Molds show it self-organizing, to be dropped if a third of them straddle.

How The Principles Connect

Two readings, one per column, and the contrast is the whole argument of the-diff. Read down instance #1 and you see a built system where every principle has become a validator rule or a casting step — source authority is an error on a generated path, reproducibility is a hash comparison, a redistributed byte’s license is a cast-time refusal, corpus-first is an evidence enum the build enforces. Read down instance #2 and you see the same principles re-derived for a domain where correctness can’t be parsed: the same provenance, the same cite-don’t-mirror, the same stub discipline — but the deterministic check becomes an empirical referee, and the all-positive corpus grows a second, cautionary pole. What stayed identical across the two columns is the substrate; what each domain decided differently is its extension. The principles are what made both sets of decisions the same kind of decision.

See Also