| name | organ-formula-foundry |
| description | Formula Foundry typing Core A — the legal-move generator that classifies formula input/output units into closed-set dimensions and rejects dimensionally-incoherent compositions. Use when composing formulas and needing to verify dimensional compatibility, cataloging formula banks, or checking whether one formula's output can legally feed another's input. |
| triggers | ["organ-formula-foundry","how do I use formula-foundry","formula-foundry usage","formula-foundry guide","Formula Foundry (typing core: catalog + coverage + composition type-algebra)"] |
| generated | true |
| source_node | formula-foundry |
| source_file | _SYSTEM/Scripts/math/formula-foundry.mjs |
| scope | harness |
| invocation | ability |
Organ Guide — Formula Foundry (typing core: catalog + coverage + composition type-algebra)
Module: _SYSTEM/Scripts/math/formula-foundry.mjs · Layer: Energy & Math · Invocation: both · CLI: catalog, coverage, compose, composable, sequences, synth, preflight
Purpose. Formula Foundry typing CORE A — the legal-move generator. Reads the typed formula-bank cards, classifies each card's input/output UNITS into a deterministic closed-set dimension, and decides whether one formula's output may legally feed another's input. Rejects dimensionally-incoherent compositions (bits→length, probability into an energy slot) — the silent-garbage hole the engine exists to close.
Exports
classifyDimension(unitText)
- in: a prose unit string (e.g. 'bits', 'joule', 'meters/second')
- out: { dimension, witness } — closed-set dimension + the matched witness token (or null)
dimensionsCompatible(a, b)
- in: two dimension strings (from classifyDimension)
- out: { compatible, confidence, reason }
catalogFormulas(opts = {})
- in: optional { bankDir }
- out: { cards, count, banks, skipped } — unified read-view over the typed formula-banks; corrupt banks are listed in skipped
async coverageReport()
- in: none (reads banks + math-kernel exports)
- out: { boundCount, kernelExportCount, unboundPrimitives, orphanCards, cardCount } — the kernel-fn↔bank-card binding worklist
composeCheck(cardA, cardB)
- in: two catalog card objects
- out: { legal, compatibleSlots, reasons, from, to, outputDim } — whether A's output may legally feed B
composableTargets(cardA, catalog = null)
- in: one card + optional pre-loaded catalog
- out: array of legal downstream targets { to, slots, outputDim }
composeOperatorSequences(catalog = null, opts = {})
- in: optional catalog + { min/max chain length, branching, domain filters }
- out: { sequences, count, truncated, truncation, params } — enumerated legal operator chains