skmtcdocs

Vocabulary cheat sheet — SKMTC nouns to familiar analogues

SKMTC's DSL has its own vocabulary (Projection, Snippet, Driver, ContentSettings, …). New contributors and LLMs coming from training-data priors typically don't anchor on these terms immediately.…

SKMTC's DSL has its own vocabulary (Projection, Snippet, Driver, ContentSettings, …). New contributors and LLMs coming from training-data priors typically don't anchor on these terms immediately. This page maps each SKMTC noun to a familiar concept from React / TS codegen / general systems so the mental model lands faster.

These are analogues, not equivalences. They're meant as landing pads — once you've found the doc you need, switch to the SKMTC-native vocabulary, because the analogues miss important details.

DSL vocabulary

SKMTC termFamiliar analogueWhat's different
ProjectionAn exportable React component / a .tsx file you'd write by handProjections live in memory until Render serialises them; they're not files on disk during Generate. Coordinate by NAME, not by source-text reading.
SnippetA JSX expression or template fragment — <Foo /> you'd embed inside a parent componentSnippets have no file-scope name; they're spliced into a Projection's toString() via ${this.snippet}. They register imports against the parent's destinationPath.
SnippetBaseThe shared base of a React component and a JSX expressionThe class hierarchy SnippetBase → SnippetBase descendant is the literal DSL spine — both Projections and Snippets descend from it.
toTsModelProjectionBase / toTsOasOperationProjectionBase / toTsGqlOperationProjectionBaseFactories that return specialised React.Component-style base classes for <UserType>, <EditForm>, <MutationHook>Three flavours of Projection base, each a class returned by a lang-veneer factory with its own static-method contract (toIdentifierName, toExportPath, …). Pick the right one based on what drives the Definition: a refName, an OAS operation, or a GQL operation.
DefinitionA Component instance + the export const Component = … wrapperThe Driver wraps a Projection's value in a Definition. The export const prefix is added at File-serialisation time — don't write it yourself in toString().
ContentSettingsA React-component props bag, computed by the engine before constructionCarries (identifier, exportPath, enrichments, variant). The engine builds it by calling the Projection's static methods, then hands it to the constructor.
IdentifierA name + an opaque per-language kind (TypeScript: 'variable' or 'type')Use createVariable('Foo') or createType('Foo') from @skmtc/lang-typescript. The kind flows into declaration keywords and import statements under verbatimModuleSyntax.
StringableAny value with a .toString() methodThe composition contract — a Snippet, a Projection, a CustomValue, an Identifier, or a raw string are all interchangeable in template-literal interpolation.
CustomValueAn inline TS fragment that doesn't come from the OAS documentWhen you need to splice a TS literal that's not derivable from the schema (a hand-written expression), wrap it in CustomValue so it composes with the rest of the DSL.
ImportA line at the top of the file: import { X } from 'y'Registered via this.register({ imports: { 'y': ['X'] } }). Don't write raw import statements inside template literals; they land in the file body, not the header.

Engine vocabulary

SKMTC termFamiliar analogueWhat's different
DriverA React render function for Projections — it constructs and mountsOasOperationDriver, GqlOperationDriver, ModelDriver each handle one flavour. They look up the cache, construct the Projection if absent, register the Definition, and stitch imports.
GenerateContextThe orchestrator — like a Redux store + React's reconcilerOwns the per-generator dispatch loop, the file map, the manifest results, the StackTrail. Most cross-generator coordination goes through context.insertOperation / insertModel / insertNormalizedModel.
transform (in an entry config)A useEffect body — runs per (operation, variant) pairReturns void for both OAS and GraphQL — the return value is ignored. Output happens via register / insertOperation, not the return.
isSupportedA feature flag check for whether the generator handles this operationCapability gate, NOT user-intent gate. Use client.json's include / skip for user intent. Gating on enrichment presence is an anti-pattern.
toIdentifierName / toExportPathPure functions producing (name, file) for a given operationMust be pure — no this, no async, no env reads. The cross-generator cache depends on this.
toEnrichmentsA useSelector over context.settings.enrichments keyed to this operation+variantThe static walks enrichments.<id>.<path>.<method>.<variant> for OAS or <rootKind>.<fieldName>.<variant> for GQL.
InsertedThe return value of useQuery — a handle to the inserted thing.toName() gives the identifier name (use this in your template literal). .settings gives the ContentSettings. .definition gives the wrapped Definition.

Identity / caching vocabulary

SKMTC termFamiliar analogueWhat's different
GeneratorKeyA composite primary key in a SQL tablePipe-delimited string: 4 segments for operations (id|path|method|variant OAS, id|rootKind|fieldName|variant GQL), 3 for models (id|refName|variant). Driver compares old vs. new key in affirmDefinition to detect collisions.
findDefinition({name, exportPath})A cache .get(key)Looks up an existing Definition by (name, exportPath) in the target file. Returns undefined on miss.
affirmDefinitionA cache integrity check — "does the existing entry match what I'm about to insert?"Compares cached Definition's generatorKey to the call's computed generatorKey. Mismatch → "Registered definition mismatch" throw. Same key → reuse cached.
Cache key vs. GeneratorKeyMap key vs. row identity columnThe cache key (name, exportPath) is intentionally narrower than GeneratorKey. A variants-aware Projection that forgets to fold variant into toIdentifierName produces the same cache key for two variants — the Driver's integrity check fires loudly instead of silently producing duplicate exports.

Variant vocabulary

SKMTC termFamiliar analogueWhat's different
VariantA discriminated-union case for "one source item, several artifacts"Named string axis below [path][method] (OAS ops), [rootKind][fieldName] (GQL ops), or [refName] (models). 'main' is always present. See concepts/variants.md.
Variants-aware generatorA React component that renders differently based on a propIts toIdentifierName folds variant into the returned name (typically via withVariant). Distinct (name, exportPath) per variant → distinct Definitions.
Variants-unaware generatorA React component that ignores the variant propDestructures variant and discards it. Every variant of every caller resolves to the same 'main' Definition; that Definition is shared (cache hit).
withVariant(base, variant)A string-concatenation helper that's PascalCase-awarewithVariant('Form', 'main')'Form'. withVariant('Form', 'line-items')'FormLineItems'. The kebab-case→PascalCase transform is invertible because the variant regex bans uppercase.
'main'The "default branch" of a switch statement that's always presentGuaranteed by the engine — fills it in when no enrichments are configured; throws if other variants are declared without it.

CLI / consumer vocabulary

SKMTC termFamiliar analogueWhat's different
ProjectA workspace folder for one schema-to-code mappingLives at <root>/.skmtc/<project>/. One project = one schema source + one set of generators + one client.json. NOT the consumer app.
client.json#settingsA tsconfig.json-style config: paths, filters, overridesCarries basePath, source, enrichments, include, skip.
enrichmentsPer-item prop overridesRouted by [generatorId][path][method][variant] for OAS, [rootKind][fieldName][variant] for GQL, or [refName][variant] for models.
basePathThe @ alias root in tsconfig.pathsRequired, relative. Must match the consumer bundler's @ alias config — generators produce @/<subdir>/… paths assuming this alignment.
includeA tsconfig.json#include allow-listEmpty array = no filter. Names a generator (string form), (path, method, variant[]) tuples for operations, or (refName, variant[]) tuples for models (object forms).
skipA tsconfig.json#exclude deny-listSame shapes as include. skip wins over include.
manifest.jsonA build-output manifest like Webpack's stats.jsonRecords every (generator × item) outcome plus per-source artifacts. Read it for diagnostics before guessing.

Pipeline vocabulary

SKMTC termFamiliar analogueWhat's different
Parse phaseA schema → AST stepOAS / GraphQL JSON → OasDocument / GqlDocument.
Generate phaseThe reconcile / render passOAS / GQL objects → in-memory File map. Where every generator's transform runs.
Render phaseWriting the AST out to source filesFile map → { path: content }. NO formatter runs — consumers format their own output.
ParseIssueA non-fatal compile warningCaptured per-item. removeErroredItems prunes downstream dependents but doesn't abort the run.
StackTrailA breadcrumb trail / browser-history stack of what we were doing when a thing happenedFrames: root, generator id, operation, variant. Each captureCurrentResult records the trail.

What this page is NOT

  • A reference. The reference docs are in docs/reference/. This is a landing-pad doc — once you've found what you need, switch to SKMTC-native vocabulary because the analogues lose important detail.
  • Exhaustive. Specialised types (OasObject and friends, EnrichmentRequest, the Inserted generic parameters, …) live in the reference. This page covers what an LLM or a new contributor is most likely to land on in their first session.

Cross-references

On this page