⚒️ The Foundry Pattern

The Pattern

Glossary

Pinned definitions for the abstract pattern. These are the terms every page on this site uses; where a term has a concrete realization in one of the instances, the abstract definition comes first and a brief (e.g. …) pointer follows. If two pages disagree, this file wins.

For why a Foundry KB keeps a glossary at all, see the-model; for how to build one, see setting-up-a-foundry. This page is that glossary for the pattern’s own vocabulary.

Scope. Only terms that hold for a Foundry built on any stack are pinned here. Vocabulary describing how a corpus is typed, shaped, and laid out on disk belongs to an implementation, not to the pattern, and is pinned separately in the astro-stack-glossary — including note, kind, and companion. If you came looking for one of those, that is the page.

Grouped by theme.


The pattern and its instances

The Foundry Pattern — the design pattern this site documents: a Knowledge Base whose structure makes it executable, compiled into frozen skill artifacts with provenance. A substrate each domain extends, never a single project. Capitalized.

A Foundry / an instance — a concrete project applying the pattern. The pattern first earned its abstraction at the original N=2 diff; the TDA Bioinformatics Foundry now tests and hardens that result. What survives every current instance is the substrate; what each domain adds on top is its extension. The current instances are the Galaxy Workflow Foundry, the Statistical Genomics Foundry, and the TDA Bioinformatics Foundry. Avoid bare “Foundry” when you mean the pattern. See anatomy-of-an-instance.

The substrate (invariant across instances)

Knowledge Base (KB) — the inspectable, human-readable source of truth at the center of every instance. Authored to be read and learned by a human, not merely stored for an agent to retrieve. The KB is the source; a skill is the package.

Mold — the unit of the KB: an abstract, typed reference manifest describing one action. Its frontmatter declares the references it depends on (other KB pages, schemas, CLI manual pages, prompts, examples); its body is a procedural skeleton tying them together. Molds are abstract source artifacts, independent of any agent runtime.

Reference — a typed dependency a Mold declares. The kind discriminator controls how casting treats it, so resolving references is per-kind dispatch, not “follow every link the same way.” (A reference kind, which is not the same vocabulary as the note kinds in the astro-stack-glossary; the two words collide and the pages that use both should say which they mean.) Common kinds: pattern (prose reference), schema (copied verbatim), cli-command (cast to a structured sidecar), prompt (copied verbatim), example (copied verbatim), eval (Foundry-only, never packaged). What each kind’s dispatch does is the instance’s to declare, not the pattern’s to fix.

Compilation

Cast (verb) — produce a self-contained artifact from a Mold via the casting process. (noun) — one casting result for a (Mold, target) pair.

Casting — the deterministic compilation step that turns a Mold into a skill artifact. It resolves typed references, places their contents according to kind and target, renders the artifact, and emits provenance. The integration boundary — artifacts come out scoped, isolated, and frozen, with no links back. See skills-package-not-source.

Skill artifact — the compiled output of casting: self-contained, scoped to one action, frozen against the source revision, no links back, no runtime dependency on the KB. SKILL.md (or any skill file) is therefore a compile target, never the authoring surface.

Target — the format a cast produces (e.g. an Anthropic Agent Skill, a generic skill format, a baked-in web bundle). One Mold may cast to several targets; the KB stays the source of truth.

Source format vs packaging format — the central distinction of The Case. The dominant pattern treats the skill as the source (a human-plus-LLM authors SKILL.md, which is the record). The Foundry Pattern makes the skill a package cast from a curated KB. Restating canonical knowledge is a commodity; traceable, provenance-backed knowledge is not.

Provenance — a record (_provenance.json) emitted beside every cast artifact: which Mold revision, which target, which references resolved, which checks ran. The durable, universal non-commodity asset — present in every instance; the answer to “which specific claim is real and where it came from.”

Compile-time grounding with provenance — the bet that distinguishes the pattern from the field’s default of attach KB, retrieve at runtime. A deterministic pipeline casts selected KB slices into target artifacts, provenance is recorded, and drift becomes mechanically detectable. Runtime fetch augments, never replaces, compiled grounding.

The extension surface (per-domain — not universal vocabulary)

These terms describe what individual instances add to the substrate. They are scoped to the instance that coined them; do not use them as general pattern vocabulary.

Extension surface — the parts of a Foundry each domain chooses rather than inherits: its domain knowledge, grounding corpus, target format(s), any composition layer, and the external check its notion of “correct” admits. The substrate is shared; the extension surface is where instances legitimately diverge. See anatomy-of-an-instance.

The external check — the thing external to the model that stands between authored knowledge and a trusted result, honoring the rule that the model must not be the sole judge of its own work. What it is differs completely by domain; the realizations below are examples, not a fixed menu.

Pipeline (Galaxy Workflow Foundry) — an ordered sequence of Molds composing an end-to-end task; dual-purpose as a build artifact (the Molds a harness orchestrates) and a navigation primitive (the journey-surface view over the KB). Referenced content, not cast. A composition extension a domain reaches for when its work is sequential; the Mold-primary Statistical Genomics Foundry needs none.

The rails (Galaxy Workflow Foundry) — that instance’s external check: a deterministic CLI that mechanically parses and validates the artifact, catching failure modes prior-art skills could only enumerate as prose caveats. (e.g. a workflow validator that rejects hallucinated tool IDs or malformed state.) A parser you call.

The referee / the gate (Statistical Genomics Foundry) — that instance’s external-check direction, used where no CLI can decide validity. The current cast skills primarily critique known invalidity patterns; the stronger analyze → referee → revise form constructs calibration evidence and prevents an analysis from self-certifying. A deliverable you construct, not a tool you call. “Knowing ≠ gating”: a model may mention a caveat, but only an enforced check makes doing not terminate until it clears. See the-two-assets.

Frontier → hardening → delivery (TDA Bioinformatics Foundry) — that instance’s maturation arc from research and methods, through packages, recipes, reproducible environments, and replication evidence, toward Galaxy tools, workflows, and training. An instance-specific spine, not a universal lifecycle. Its final scientific correctness check is still evolving.

Critique (referee sub-role — stat-gen)reason about validity against known invalidity patterns. Necessary but not sufficient: it is itself model reasoning, so the strong form also requires a Calibrate pass.

Calibrate (referee sub-role — stat-gen)construct and run an empirical check the field trusts (permutation under the null, simulation-under-truth, negative controls, power). The external verdict that is not self-certification.

Authoring discipline

Load policy / progressive disclosure — show the right knowledge at the right time: Pipelines disclose the journey, Molds the action, references the dependency surface. Both an authoring principle and a runtime contract — the basis for a KB foregrounded for a human reader, not flattened for retrieval.

Corpus / corpus-grounding — the principle that everything in the KB traces to observed real-world practice, not invented top-down. Every claim should be traceable back to one or more exemplars in the grounding corpus. (A referee instance needs two poles — established-good practice and named invalidity patterns — where an all-positive corpus suffices for a rails instance.)