polyglot-recipes — cross-language seams as ripvec sees them
Be brief. Cite docs/AGENTIC_PATTERNS_4_0.md Part IX (NC1c, NC8, M5),
Part X (NC16, M22), Part XI §XI.4 (M6 trichotomy) and BUG_DATABASE.md
§§4-5 (I#54a/b polyglot edge bugs). aurora is the M14 polyglot
canonical (HCL+Python+SQL, validated through 3 cycles); the
constitutional polyglot sentinel.
§0 Graph position
Specializes the five hub orientations for cross-language seams. This
skill fires when no single per-language skill (c-recipes,
python-recipes, javascript-recipes, jvm-recipes, go-recipes,
rust-recipes) captures the task because the interesting edges
cross language boundaries. Most often escalates to
ripvec:drift-auditor because polyglot dark-matter manifests as
systemic dead-zone drift — ripvec can't see the seam, so the seam
silently rots.
§1 Polyglot character
What ripvec sees on a polyglot corpus:
- Cross-language string-as-API is everywhere. HCL outputs become
Python config values become SQL @{variable_name} interpolations
become Jinja
{{var}} becomes the URL the JS fetch() hits. None
of these are typed in ripvec's eyes — every hop is a string.
M5 anchor.
- M5 Dark-Matter Coefficient (NC16):
rg-files(name) / index-files(name). On aurora, bucket_name: 11 files contain the
string, 1 is in the symbol index. Ratio 11:1 = ripvec is blind to
10 of the 11 files for this name. Quantifiable polyglot blindness.
- M6 Oracles-Are-Typed (Codd/Pearl/Hickey trichotomy): every
cross-language API point fits one of three shapes:
- Codd-form: relational projection (HCL
terraform_remote_state.X.outputs.Y)
- Pearl-form: intervention/do-operator (Python sets SQL @{var})
- Hickey-form: value/identity (tfvars strings; protobuf bytes)
- Lensing decision: each oracle form needs a different recipe.
- NC8 Runtime-Variable-Injection Tracing: a 4-hop chain
(env → tfvar → Python config dataclass → SQL template var)
reproducible by grep-composition even when ripvec can't trace it
symbolically. Anchor recipe for polyglot detective work.
- NC1c "not in index" IS the M5 diagnostic. When
find_similar(symbol_name=X) returns "not in index" but rg
finds X across the corpus, that's a polyglot dark-matter signal.
- I#54a/b polyglot edge bugs are open. HCL→HCL via
terraform_remote_state and SQL FROM/JOIN edges are partial-
resolved via semantic search; full LSP edge resolution is a
4.2.0+ target. M22 Polyglot Incompleteness Cost says: when
bug deferral lets the dark-matter coefficient grow, productivity
decays at compound rates.
§2 Working recipes (polyglot earned its keep on these)
| Recipe |
Trigger |
Tool sequence |
Caveat |
Cite |
| NC16 Polyglot Dark-Matter Probe |
"Quantify how blind ripvec is on this name" |
mcp__ripvec__find_similar(symbol_name=X) → if "not in index" → cross-language mcp__ripvec__search(corpus="all", query=X) → compare hit-counts; ratio = dark-matter coefficient |
High ratio (≥5) = serious polyglot blindness; pair with workaround |
Part X §X.4 NC16 |
| NC8 Runtime-Variable-Injection Trace |
"How does this Python config value reach the SQL query?" |
Pick variable name (e.g., athena_silver_schema); mcp__ripvec__search(corpus="all", query="athena_silver_schema") → enumerate hits across HCL/Python/SQL files → narrate the 4-hop chain by file order |
Reproducible by name-grep even where ripvec can't trace symbolically; M5 use-case canonical |
Part IX §IX.4 NC8 |
| M6 Codd-form Oracle Probe (HCL remote_state) |
"Where does Terraform module A read from module B's outputs?" |
mcp__ripvec__search(query="terraform_remote_state", root=infrastructure/) → for each hit, the .outputs.X path IS the Codd projection |
I#54a partial: search works, lsp_references returns silent empty on HCL refs (deferred 4.2.0) |
M6, BUG_DATABASE §4 I#54a |
| M6 Pearl-form Oracle Probe (Python→SQL @{var}) |
"Where does this template var get bound?" |
Pick @{var_name} from SQL → mcp__ripvec__search(corpus="all", query="var_name") → look for variables={var_name: ...} Python assignment |
This IS Pearl's do(var_name=value) intervention on the SQL DAG |
M6, Part XI §XI.4 |
| M6 Hickey-form Oracle Probe (typed value/identity) |
"Decomplect this tfvars string from its consumer types" |
mcp__ripvec__search(query="bucket_name") then mcp__ripvec__lsp_references on each site to classify consumer-type (ARN vs S3-URI vs path) |
M6 Hickey-form: the value travels typed-free; consumer-types diverge over time = M22 cost manifesting |
M6, M22 |
| NC7 Spec-as-Implementation-Oracle |
"Does the spec doc match the impl?" |
mcp__ripvec__find_similar(symbol_name=fn_in_spec) against find_similar(symbol_name=fn_in_impl) → sim score IS the drift index |
Sim 1.0 = spec is impl mirror (rare); sim 0.7-0.9 = healthy drift; sim < 0.5 = stale |
Part IX §IX.4 NC7 |
| NC13 Spec-Oracle Drift Gradient |
"Is the implementation drifting from the spec?" |
Run NC7 across N spec/impl pairs; sort by descending sim gap; pairs with gap > 0.3 are the drift hotspots |
Quantitative — actionable in PR descriptions ("4 spec/impl drifts above threshold; close before merge") |
Part X §X.4 NC13 |
| M5 Aurora-Style 4-Layer Bridge Audit |
"Audit cross-language data flow end-to-end" |
Pick a single variable name; chain HCL→Python→SQL→[Jinja |
JS] via mcp__ripvec__search(corpus="all") per hop; document which hops ripvec sees (LSP edges) vs which it doesn't (M5 dark matter) |
Per-variable; this is the aurora canonical recipe |
§3 Known engine gaps for this language family
Per docs/BUG_DATABASE.md (verified Cycle 11 W3 / 4.1.9).
| Bug |
Status |
Symptom |
Workaround |
Cite |
B-0017 / I#54a HCL terraform_remote_state edges |
Open (P2) |
lsp_references on HCL .outputs.X returns silent empty; semantic search works |
Use mcp__ripvec__search instead of lsp_references for HCL edges |
BUG_DATABASE §4 |
| B-0018 / I#54b SQL FROM/JOIN edges |
Open (P2) |
SQL table references not resolved to schema definitions |
Cross-language string search; the M5 dark-matter pattern |
BUG_DATABASE §4 |
B-0019 HCL module "X" { source = "../X" } blocks |
Open (P3, subsumed by I#54a) |
Module composition edges missing |
Workaround via search; treat as I#54a |
BUG_DATABASE §4 |
| B-0020 SQL chunker zero-symbols (per-CREATE granularity) |
Partial fix |
CREATE TABLE → struct now indexed per-file; per-CREATE granularity still missing |
One file = one schema oracle; live with file-level granularity |
BUG_DATABASE §4 |
B-0021 HCL locals { } blocks chunked as single |
Open (P3) |
Individual local-vars not addressable |
Use mcp__ripvec__search(query="local.X") |
BUG_DATABASE §4 |
B-0023 HCL locals { ... } collapsed to single chunk |
Open (P3) |
Same family as B-0021 |
Same workaround |
BUG_DATABASE §4 |
| N3 anti-pattern: string-API across languages |
Open architectural |
Treating untyped string passing as if typed |
Apply M5 + M6 trichotomy; document each oracle's form explicitly |
M5, M22 |
§4 Polyglot-specific BPMN — the M6 Codd-form HCL→Python→SQL trace flow
flowchart TD
U[User: "How does the silver schema name<br/>get from Terraform to the SQL query?"] --> PV[Pick a variable name<br/>e.g. athena_silver_schema]
PV --> SA[mcp__ripvec__search<br/>corpus=all, query=athena_silver_schema]
SA --> CLA{Hits include .tf .py .sql .j2 ?}
CLA -->|Yes — polyglot trace| EH[Enumerate per file kind]
CLA -->|HCL only| HCL_only[Single-language;<br/>route to c-recipes / language-specific]
EH --> HF[For each HCL hit:<br/>read locals{} or output{} or var{} surrounding]
HF --> PF[For each Python hit:<br/>read read_tfvar / config dataclass / @click.option]
PF --> SF[For each SQL hit:<br/>read CREATE TABLE / @{var} interpolation / FROM]
SF --> JF[For each Jinja/.j2 hit:<br/>read {{var}} expansion]
JF --> CH[Chain narration: HCL output → Python read → SQL @{var} → Jinja {{var}}]
CH --> DM[Compute M5 dark-matter coefficient<br/>rg-files / index-files ratio]
DM --> DMR{Ratio ≥ 5?}
DMR -->|Yes| ALERT[**Polyglot dark matter detected**<br/>route to ripvec:drift-auditor<br/>cite M22 polyglot incompleteness cost]
DMR -->|No| CLEAN[Trace is clean;<br/>document M6 oracle form per hop]
HCL_only --> H6[H6 Fill-Graph Dual<br/>combine find_similar+lsp_references<br/>per c-recipes / jvm-recipes appropriate]
§5 Cross-corpus calibration
Polyglot is exercised primarily by aurora (canonical IaC polyglot,
per Part X §X.4):
- aurora (~few hundred HCL+Python+SQL files) — M14 polyglot
canonical. M5 dark-matter coefficient measured (
bucket_name: 11:1).
NC8 4-hop chain reproducible. NC7 spec-vs-impl drift quantifiable.
- Cycle 6 Wave 6 / opus/aurora finding: M22 Polyglot
Incompleteness Cost — bug deferral on I#54a/b lets the dark-matter
coefficient grow; aurora's
bucket_name was 11:1 in Wave 5 → 11:0
in Wave 6 (the darkness deepened, not improved).
- (Cycle 12+ candidate) add a second polyglot dipole partner:
candidate is a Django+PostgreSQL+templates app, or a NestJS app
with protobuf/graphql.
- Diagnostic rule: if a polyglot finding reproduces on aurora
AND a second polyglot corpus, it's M5/M6 architectural; if on
aurora only, suspect IaC-specific (HCL chunker, SQL grammar).
§6 Heritage citations
Polyglot's earned heritage:
- Codd, E.F. A Relational Model of Data (1970) — HCL
terraform_remote_state.X.outputs.Y is literally a relational
projection (SELECT outputs.Y FROM remote_state WHERE name=X).
M6 Codd-form anchor.
- Pearl, J. Causality (2009) — Python setting SQL @{var} is
Pearl's
do(var=value) operator on the SQL DAG: an intervention
not an observation. M6 Pearl-form anchor.
- Hickey, R. Simple Made Easy (2011); The Value of Values
(2012) — typed-free string-as-value flowing across language
boundaries is complecting value with identity. M6 Hickey-form
anchor; M22 incompleteness-cost roots here.
- Wittgenstein, L. Philosophical Investigations §43 (1953) —
"the meaning of a word is its use in the language" — polyglot
strings have meanings determined by their consumer types, not
their producer. M5 dark-matter is literally Wittgensteinian.
- Brooks, F. No Silver Bullet (1986) — polyglot architecture
is essential complexity (the cost of right-tool-for-the-job)
AND accidental (the cost of cross-language semantic erosion);
M22 quantifies the accidental cost.
- Box, G.E.P. All Models Are Wrong (1976) — the polyglot
oracle trichotomy (Codd/Pearl/Hickey) is a model not a theorem;
use it where it earns its keep.
- Naur, P. Programming as Theory Building (1985) — polyglot
codebases require cross-language theory; the M22 cost is the
theory-rot tax when ripvec can't see one of the languages
involved.
Source: fnordpig/my-claude-plugins — distributed by TomeVault.
1---2name: fnordpig-my-claude-plugins-polyglot-recipes3description: polyglot-recipes — cross-language seams as ripvec sees them4---56# polyglot-recipes — cross-language seams as ripvec sees them78Be brief. Cite `docs/AGENTIC_PATTERNS_4_0.md` Part IX (NC1c, NC8, M5),9Part X (NC16, M22), Part XI §XI.4 (M6 trichotomy) and `BUG_DATABASE.md`10§§4-5 (I#54a/b polyglot edge bugs). **aurora is the M14 polyglot11canonical** (HCL+Python+SQL, validated through 3 cycles); the12constitutional polyglot sentinel.1314## §0 Graph position1516Specializes the five hub orientations for *cross-language seams*. This17skill fires when no single per-language skill (`c-recipes`,18`python-recipes`, `javascript-recipes`, `jvm-recipes`, `go-recipes`,19`rust-recipes`) captures the task because the *interesting* edges20cross language boundaries. Most often escalates to21`ripvec:drift-auditor` because polyglot dark-matter manifests as22*systemic dead-zone drift* — ripvec can't see the seam, so the seam23silently rots.2425## §1 Polyglot character2627What ripvec sees on a polyglot corpus:2829- **Cross-language string-as-API is everywhere.** HCL outputs become30 Python config values become SQL @{variable_name} interpolations31 become Jinja `{{var}}` becomes the URL the JS fetch() hits. **None32 of these are typed in ripvec's eyes** — every hop is a string.33 M5 anchor.34- **M5 Dark-Matter Coefficient** (NC16): `rg-files(name) /35 index-files(name)`. On aurora, `bucket_name`: 11 files contain the36 string, 1 is in the symbol index. Ratio 11:1 = ripvec is blind to37 10 of the 11 files for this name. **Quantifiable polyglot blindness.**38- **M6 Oracles-Are-Typed (Codd/Pearl/Hickey trichotomy):** every39 cross-language API point fits one of three shapes:40 - **Codd-form:** relational projection (HCL `terraform_remote_state.X.outputs.Y`)41 - **Pearl-form:** intervention/do-operator (Python sets SQL @{var})42 - **Hickey-form:** value/identity (tfvars strings; protobuf bytes)43 - Lensing decision: each oracle form needs a different recipe.44- **NC8 Runtime-Variable-Injection Tracing:** a 4-hop chain45 (env → tfvar → Python config dataclass → SQL template var)46 reproducible by grep-composition even when ripvec can't trace it47 symbolically. Anchor recipe for polyglot detective work.48- **NC1c "not in index" IS the M5 diagnostic.** When49 `find_similar(symbol_name=X)` returns "not in index" but `rg`50 finds X across the corpus, that's a polyglot dark-matter signal.51- **I#54a/b polyglot edge bugs are open.** HCL→HCL via52 `terraform_remote_state` and SQL FROM/JOIN edges are partial-53 resolved via semantic search; full LSP edge resolution is a54 4.2.0+ target. **M22 Polyglot Incompleteness Cost** says: when55 bug deferral lets the dark-matter coefficient grow, productivity56 decays at compound rates.5758## §2 Working recipes (polyglot earned its keep on these)5960| Recipe | Trigger | Tool sequence | Caveat | Cite |61|---|---|---|---|---|62| **NC16 Polyglot Dark-Matter Probe** | "Quantify how blind ripvec is on this name" | `mcp__ripvec__find_similar(symbol_name=X)` → if "not in index" → cross-language `mcp__ripvec__search(corpus="all", query=X)` → compare hit-counts; ratio = dark-matter coefficient | High ratio (≥5) = serious polyglot blindness; pair with workaround | Part X §X.4 NC16 |63| **NC8 Runtime-Variable-Injection Trace** | "How does this Python config value reach the SQL query?" | Pick variable name (e.g., `athena_silver_schema`); `mcp__ripvec__search(corpus="all", query="athena_silver_schema")` → enumerate hits across HCL/Python/SQL files → narrate the 4-hop chain by file order | Reproducible by name-grep even where ripvec can't trace symbolically; M5 use-case canonical | Part IX §IX.4 NC8 |64| **M6 Codd-form Oracle Probe (HCL remote_state)** | "Where does Terraform module A read from module B's outputs?" | `mcp__ripvec__search(query="terraform_remote_state", root=infrastructure/)` → for each hit, the `.outputs.X` path IS the Codd projection | I#54a partial: search works, `lsp_references` returns silent empty on HCL refs (deferred 4.2.0) | M6, BUG_DATABASE §4 I#54a |65| **M6 Pearl-form Oracle Probe (Python→SQL @{var})** | "Where does this template var get bound?" | Pick `@{var_name}` from SQL → `mcp__ripvec__search(corpus="all", query="var_name")` → look for `variables={var_name: ...}` Python assignment | This IS Pearl's `do(var_name=value)` intervention on the SQL DAG | M6, Part XI §XI.4 |66| **M6 Hickey-form Oracle Probe (typed value/identity)** | "Decomplect this tfvars string from its consumer types" | `mcp__ripvec__search(query="bucket_name")` then `mcp__ripvec__lsp_references` on each site to classify consumer-type (ARN vs S3-URI vs path) | M6 Hickey-form: the value travels typed-free; consumer-types diverge over time = M22 cost manifesting | M6, M22 |67| **NC7 Spec-as-Implementation-Oracle** | "Does the spec doc match the impl?" | `mcp__ripvec__find_similar(symbol_name=fn_in_spec)` against `find_similar(symbol_name=fn_in_impl)` → sim score IS the drift index | Sim 1.0 = spec is impl mirror (rare); sim 0.7-0.9 = healthy drift; sim < 0.5 = stale | Part IX §IX.4 NC7 |68| **NC13 Spec-Oracle Drift Gradient** | "Is the implementation drifting from the spec?" | Run NC7 across N spec/impl pairs; sort by descending sim gap; pairs with gap > 0.3 are the drift hotspots | Quantitative — actionable in PR descriptions ("4 spec/impl drifts above threshold; close before merge") | Part X §X.4 NC13 |69| **M5 Aurora-Style 4-Layer Bridge Audit** | "Audit cross-language data flow end-to-end" | Pick a single variable name; chain HCL→Python→SQL→[Jinja|JS] via `mcp__ripvec__search(corpus="all")` per hop; document which hops ripvec sees (LSP edges) vs which it doesn't (M5 dark matter) | Per-variable; this is the aurora canonical recipe | M5, NC8, Part X §X.4 |7071## §3 Known engine gaps for this language family7273Per `docs/BUG_DATABASE.md` (verified Cycle 11 W3 / 4.1.9).7475| Bug | Status | Symptom | Workaround | Cite |76|---|---|---|---|---|77| **B-0017 / I#54a** HCL `terraform_remote_state` edges | Open (P2) | `lsp_references` on HCL `.outputs.X` returns silent empty; semantic search works | Use `mcp__ripvec__search` instead of `lsp_references` for HCL edges | BUG_DATABASE §4 |78| **B-0018 / I#54b** SQL FROM/JOIN edges | Open (P2) | SQL table references not resolved to schema definitions | Cross-language string search; the M5 dark-matter pattern | BUG_DATABASE §4 |79| **B-0019** HCL `module "X" { source = "../X" }` blocks | Open (P3, subsumed by I#54a) | Module composition edges missing | Workaround via search; treat as I#54a | BUG_DATABASE §4 |80| **B-0020** SQL chunker zero-symbols (per-CREATE granularity) | Partial fix | CREATE TABLE → struct now indexed per-file; per-CREATE granularity still missing | One file = one schema oracle; live with file-level granularity | BUG_DATABASE §4 |81| **B-0021** HCL `locals { }` blocks chunked as single | Open (P3) | Individual local-vars not addressable | Use `mcp__ripvec__search(query="local.X")` | BUG_DATABASE §4 |82| **B-0023** HCL `locals { ... }` collapsed to single chunk | Open (P3) | Same family as B-0021 | Same workaround | BUG_DATABASE §4 |83| **N3 anti-pattern: string-API across languages** | Open architectural | Treating untyped string passing as if typed | Apply M5 + M6 trichotomy; document each oracle's form explicitly | M5, M22 |8485## §4 Polyglot-specific BPMN — the M6 Codd-form HCL→Python→SQL trace flow8687```mermaid88flowchart TD89 U[User: "How does the silver schema name<br/>get from Terraform to the SQL query?"] --> PV[Pick a variable name<br/>e.g. athena_silver_schema]90 PV --> SA[mcp__ripvec__search<br/>corpus=all, query=athena_silver_schema]91 SA --> CLA{Hits include .tf .py .sql .j2 ?}92 CLA -->|Yes — polyglot trace| EH[Enumerate per file kind]93 CLA -->|HCL only| HCL_only[Single-language;<br/>route to c-recipes / language-specific]94 EH --> HF[For each HCL hit:<br/>read locals{} or output{} or var{} surrounding]95 HF --> PF[For each Python hit:<br/>read read_tfvar / config dataclass / @click.option]96 PF --> SF[For each SQL hit:<br/>read CREATE TABLE / @{var} interpolation / FROM]97 SF --> JF[For each Jinja/.j2 hit:<br/>read {{var}} expansion]98 JF --> CH[Chain narration: HCL output → Python read → SQL @{var} → Jinja {{var}}]99 CH --> DM[Compute M5 dark-matter coefficient<br/>rg-files / index-files ratio]100 DM --> DMR{Ratio ≥ 5?}101 DMR -->|Yes| ALERT[**Polyglot dark matter detected**<br/>route to ripvec:drift-auditor<br/>cite M22 polyglot incompleteness cost]102 DMR -->|No| CLEAN[Trace is clean;<br/>document M6 oracle form per hop]103 HCL_only --> H6[H6 Fill-Graph Dual<br/>combine find_similar+lsp_references<br/>per c-recipes / jvm-recipes appropriate]104```105106## §5 Cross-corpus calibration107108Polyglot is exercised primarily by **aurora** (canonical IaC polyglot,109per Part X §X.4):110111- **aurora** (~few hundred HCL+Python+SQL files) — M14 polyglot112 canonical. M5 dark-matter coefficient measured (`bucket_name`: 11:1).113 NC8 4-hop chain reproducible. NC7 spec-vs-impl drift quantifiable.114- **Cycle 6 Wave 6 / opus/aurora finding:** M22 Polyglot115 Incompleteness Cost — bug deferral on I#54a/b lets the dark-matter116 coefficient grow; aurora's `bucket_name` was 11:1 in Wave 5 → 11:0117 in Wave 6 (the *darkness deepened*, not improved).118- **(Cycle 12+ candidate)** add a second polyglot dipole partner:119 candidate is a Django+PostgreSQL+templates app, or a NestJS app120 with protobuf/graphql.121- **Diagnostic rule:** if a polyglot finding reproduces on aurora122 AND a second polyglot corpus, it's M5/M6 architectural; if on123 aurora only, suspect IaC-specific (HCL chunker, SQL grammar).124125## §6 Heritage citations126127Polyglot's earned heritage:128129- **Codd, E.F.** *A Relational Model of Data* (1970) — HCL130 `terraform_remote_state.X.outputs.Y` is *literally* a relational131 projection (`SELECT outputs.Y FROM remote_state WHERE name=X`).132 **M6 Codd-form anchor.**133- **Pearl, J.** *Causality* (2009) — Python setting SQL @{var} is134 Pearl's `do(var=value)` operator on the SQL DAG: an *intervention*135 not an observation. **M6 Pearl-form anchor.**136- **Hickey, R.** *Simple Made Easy* (2011); *The Value of Values*137 (2012) — typed-free string-as-value flowing across language138 boundaries is *complecting value with identity*. **M6 Hickey-form139 anchor; M22 incompleteness-cost roots here.**140- **Wittgenstein, L.** *Philosophical Investigations* §43 (1953) —141 "the meaning of a word is its use in the language" — polyglot142 strings have meanings determined by their consumer types, not143 their producer. M5 dark-matter is literally Wittgensteinian.144- **Brooks, F.** *No Silver Bullet* (1986) — polyglot architecture145 is *essential* complexity (the cost of right-tool-for-the-job)146 AND *accidental* (the cost of cross-language semantic erosion);147 M22 quantifies the accidental cost.148- **Box, G.E.P.** *All Models Are Wrong* (1976) — the polyglot149 oracle trichotomy (Codd/Pearl/Hickey) is a model not a theorem;150 use it where it earns its keep.151- **Naur, P.** *Programming as Theory Building* (1985) — polyglot152 codebases require *cross-language theory*; the M22 cost is the153 theory-rot tax when ripvec can't see one of the languages154 involved.155156---157> Source: [fnordpig/my-claude-plugins](https://github.com/fnordpig/my-claude-plugins) — distributed by [TomeVault](https://tomevault.io).158<!-- tomevault:4.0:skill_md:2026-06-15 -->