diff --git a/hudi-agent-gateway/skills/hudi-architect/README.md b/hudi-agent-gateway/skills/hudi-architect/README.md
new file mode 100644
index 0000000000000..325c087988182
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/README.md
@@ -0,0 +1,111 @@
+
+# hudi-architect (Milestone 1 preview)
+
+An OSS conversational design advisor for Apache Hudi tables. Packaged as a Claude Code Skill for early review.
+
+## What it does
+
+Turns workload requirements into a validated Hudi table architecture through a tiered conversational flow:
+
+1. **Tier gate** — figures out whether you're exploring, prototyping, productionizing at modest scale, or going all-in at TB/PB.
+2. **Rounds 1-3** — asks workload questions (not Hudi jargon questions) gated by tier.
+3. **Output** — produces an Architecture Decision Record (ADR) with tradeoff tables, durability warnings, config bundle, and measurable revisit conditions.
+
+Target Hudi version: **1.2.0**.
+
+## How to invoke
+
+> **Data engineering / ETL teams:** see [RUNBOOK.md](RUNBOOK.md) for a step-by-step guide — setup, a pre-session workload checklist, how to read the ADR output, and current limitations.
+
+### As a Claude Code Skill
+
+Copy this directory into your Claude Code skills location:
+
+```bash
+# From the root of a Hudi checkout.
+SKILL=hudi-agent-gateway/skills/hudi-architect
+
+# User-level (available in every project)
+mkdir -p ~/.claude/skills && cp -r "$SKILL" ~/.claude/skills/
+
+# Or project-level, in the repo where your pipelines live
+mkdir -p .claude/skills && cp -r "$SKILL" .claude/skills/
+```
+
+Then in Claude Code:
+
+```
+/hudi-architect
+```
+
+Claude will drive the design flow.
+
+### As a reference
+
+Even without invoking as a Skill, the files in `references/` are readable design references:
+
+- `question-flow.md` — round-by-round question list with conditional gating.
+- `decision-tables.md` — derivation tables for each design domain (engine, writer, table type, index, partitioning, retention, services, meta-fields, record key).
+- `warnings.md` — rule-engine warnings and when they fire.
+- `config-templates.md` — `hoodie.*` property templates per decision + sample bundles for three workload archetypes.
+- `adr-template.md` — the structure of the ADR output.
+
+The Skill itself is defined in `SKILL.md`.
+
+### Config-key validation
+
+Every `hoodie.*` key mentioned in `SKILL.md` and `references/` is checked against the actual `ConfigProperty` definitions in the Hudi source tree:
+
+```bash
+python3 hudi-agent-gateway/skills/hudi-architect/validate_config_keys.py
+```
+
+Run it after any edit to the reference files (exit 1 lists unknown keys). Intentional exceptions — e.g. future-version keys the references discuss but never emit — live in `validate_config_keys_allowlist.txt` with a comment each.
+
+## What to look for during review
+
+This is **Milestone 1 of a longer arc** — meant to be shareable and playable, not final. Things worth stress-testing:
+
+1. **Walk a real workload through the flow.** Pick a Hudi table you know (existing or planned) and run `/hudi-architect`. Note where the questions don't fit, where the tradeoffs feel wrong, where a decision surprises you.
+2. **Check the warnings fire when they should.** Try configurations that should trigger Vice 1/2/3, the high-cardinality-partition trap, or the compaction-target-IO trap. Do the warnings surface at the right moment?
+3. **Try the tier gate at all four levels.** The `EXPLORATION` mode should feel like a Hudi tutor, not a design advisor. The `PRODUCTION_AT_SCALE` mode should feel rigorous. If either feels wrong, that's a signal.
+4. **Read the ADR output.** Are the revisit conditions actually measurable? Do the durability tables cover the one-way decisions relevant to your workload?
+5. **Declare a second writer.** Answer "yes" to the other-writers question and check the result: is the lock provider one you'd actually deploy, is the emitted block complete enough to paste into a second job, and does the pre-launch checklist name every job you'd have to touch?
+
+## What's out of scope in Milestone 1
+
+- Multi-writer contention tuning — the mode, lock provider, and config bundle are derived, but retry/timeout tuning and early conflict detection stay at defaults (they depend on observed behavior, not design-time facts).
+- Benchmarking / scale-characterization — different flow shape, future revision.
+- CONSISTENT_HASHING bucket recommendations at design time.
+- Partial-update MERGE nudging (Spark SQL only).
+- Version-awareness across Hudi releases (V1 pins to 1.2.0).
+- Session persistence for tier upgrades.
+
+## Longer arc
+
+- **M1 (this)** — Skill-shaped shareable version for colleague/community review.
+- **M2** — Sort out pending items (benchmarking, session persistence, etc.).
+- **M3** — Feedback incorporation from reviewers.
+- **M4** — Integration into Hudi's Agentic Lakehouse (`hudi-agent-gateway`) — see [discussion #19264](https://github.com/apache/hudi/discussions/19264).
+
+## Feedback welcome
+
+Play with the Skill, note what breaks or feels off, and share back. Every walkthrough that surfaces a gap makes the design engine sharper before it becomes real code.
+
+Full proposal design document lives in the parent directory as `hudi_architect_agent_proposal_chatgpt.md`.
diff --git a/hudi-agent-gateway/skills/hudi-architect/RUNBOOK.md b/hudi-agent-gateway/skills/hudi-architect/RUNBOOK.md
new file mode 100644
index 0000000000000..d60c94a975cf9
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/RUNBOOK.md
@@ -0,0 +1,154 @@
+
+# Hudi Architect — Runbook for Data Engineering & ETL Teams
+
+A practical guide to running the Hudi Architect agent: what it does, how to set it up, what to bring to the session, and what to do with the output.
+
+**Who this is for:** anyone designing a new Apache Hudi table (or sanity-checking an existing design) — data engineers, ETL developers, platform teams. You do **not** need to know Hudi internals; the agent asks workload questions ("how often does data land?", "what do consumers filter on?"), not Hudi questions ("which index type?").
+
+**What you get out of a session:** an Architecture Decision Record (ADR) with tradeoff tables and measurable revisit conditions, a ready-to-use `hoodie.*` config bundle, and a runnable submit command — all pinned to **Hudi 1.2.0**.
+
+---
+
+## 1. Prerequisites
+
+The agent is packaged as a [Claude Code Skill](https://docs.anthropic.com/en/docs/claude-code/skills), so you need Claude Code (CLI, desktop app, or claude.ai/code). Install the CLI:
+
+```bash
+npm install -g @anthropic-ai/claude-code
+# or the native installer:
+curl -fsSL https://claude.ai/install.sh | bash
+```
+
+Any Claude Code plan works. No Hudi installation, cluster, or cloud access is required — the agent designs; it never deploys, modifies tables, or applies configuration.
+
+**No Claude Code?** The skill degrades to a readable spec. You can paste `SKILL.md` as a system prompt into any capable LLM chat (the question flow falls back from interactive widgets to numbered prose blocks), or simply read `references/` as design documentation — the decision tables and warnings stand on their own.
+
+## 2. Installation
+
+Copy the `hudi-architect` directory into a Claude Code skills location:
+
+```bash
+# The skill ships inside a Hudi checkout at:
+# hudi-agent-gateway/skills/hudi-architect
+SKILL=/path/to/hudi/hudi-agent-gateway/skills/hudi-architect
+
+# Option A — user-level: available in every project on your machine
+mkdir -p ~/.claude/skills
+cp -r "$SKILL" ~/.claude/skills/
+
+# Option B — project-level: available to everyone who clones your repo
+# (run this from the root of YOUR pipelines repo, not the Hudi checkout)
+mkdir -p .claude/skills
+cp -r "$SKILL" .claude/skills/
+```
+
+For a data platform team, **Option B checked into your pipelines repo** is the recommended pattern: every engineer who opens Claude Code in that repo gets the same design advisor, and skill upgrades ship through your normal review process.
+
+Verify: start `claude` and type `/hudi-architect` — it should appear in the slash-command autocomplete.
+
+## 3. Starting a session
+
+```
+/hudi-architect
+```
+
+or just describe your need in plain language — "help me design a Hudi table for our orders CDC feed" — and the skill triggers.
+
+The first question is always the **tier gate**. Answer honestly; it controls how deep the interview goes:
+
+| You say | What happens | Session length |
+|---|---|---|
+| **Exploring** | Tutor mode. Concepts explained, minimal questions, narrative sketch instead of a full ADR. | ~5 min |
+| **Prototyping** | Minimum questions for a *genuinely runnable* first table. Defaults are disclosed and you consent to them; record key and ordering field are always asked (they have no safe default). | ~10 min |
+| **Productionizing** (~hundreds of GB) | Full workload interview: read patterns, sizing, retention, partitioning, identity, writer selection. Production-safe defaults. | ~15–20 min |
+| **Production at scale** (TB–PB) | Everything above plus index sizing (record counts, RLI file-group math), a derived-facts checkpoint you must confirm, and strict guardrails. | ~20–30 min |
+
+**Tip:** if a real production table is the goal, don't pick Prototyping to save time. Several correctness checks (e.g. partition-column-vs-query alignment) only run when their input questions fire.
+
+## 4. What to have ready — the pre-session checklist
+
+The agent asks in plain workload terms, but sessions go much faster if you've gathered these facts first. Circulate this list before a team design session:
+
+**Everyone:**
+- [ ] Where the data comes from (Kafka topic / files on DFS / JDBC database / a DataFrame your own Spark job already produces / other)
+- [ ] For Kafka: record format (Avro + schema registry, Avro + `.avsc` files, JSON, Protobuf)
+- [ ] How data lands: continuous streaming vs scheduled batch, and roughly how often a round of ingestion completes (<5 min / 5–15 min / hourly / daily)
+- [ ] Mutable or append-only? (Do records ever get updated after insert?)
+- [ ] Engine: Spark, Flink, or undecided
+
+**Mutable workloads additionally:**
+- [ ] The column(s) that uniquely identify a record (this becomes the record key — **there is no default; you will be asked**)
+- [ ] The column that decides which of two same-key updates wins — usually `updated_at` or a source sequence number / LSN (**also no default**)
+- [ ] Where updates land: uniformly across the table, or concentrated on recent data? If recent: how long is the straggler tail?
+
+**Productionizing and above:**
+- [ ] How consumers read the table: bulk scans, targeted lookups, incremental/streaming — and what columns they filter on
+- [ ] Current size and a 2–3 year projection (order of magnitude is fine)
+- [ ] Max lookback needed for time-travel / incremental consumers
+- [ ] Candidate partition column, if any — and whether its value can change for a record after insert
+- [ ] At scale: rough record count today and at a 3–4 year horizon (drives a **permanent** index-sizing decision — see §6)
+
+## 5. During the session — how to interact
+
+- **Questions arrive as selectable option widgets**, at most three per screen, each preceded by a short tradeoff table. Free-text is only used for column names.
+- **"Other" is allowed.** If none of the options fit your reality, say what's true — the agent re-derives rather than forcing you into a box.
+- **Push back freely.** Recommendations come as "confirm or override" — overriding is a first-class path, and anything you override against advice is recorded in the ADR with a measurable trigger for revisiting it.
+- **Expect warnings mid-flow, not at the end.** The agent carries a rule engine of named traps (partition/query misalignment, over-granular partitions, high-cardinality partition columns, retention windows unsafe for your commit cadence, the MOR compaction-IO ceiling at TB scale, concurrent-writer lock requirements, …). Warnings fire at the moment the triggering answer lands.
+- **Two confirmation gates:** at scale, a mid-flow echo of derived facts (sizes, projected partition counts, tensions); and at every tier, one final review of all answers before the ADR is generated. That final gate is your last chance to walk back anything you proceeded past.
+
+## 6. Pay attention to durable decisions
+
+Some choices are **one-way** — changing them later means rewriting the table. The agent flags each inline and lists them in the ADR's durability table, but they deserve team-level sign-off, not a solo call in a chat session:
+
+| Decision | Why it's one-way |
+|---|---|
+| Table type (COW vs MOR) | Switch requires a rewrite |
+| Partition column + granularity — **including choosing unpartitioned** | Fixed at creation; no ALTER path |
+| Record key | Fixed at creation |
+| Bucket count (BUCKET index) | Fixed at creation |
+| RLI file-group count | Frozen when the record index initializes — *adding* an RLI later is free, *resizing* one is not |
+| Disabling meta fields | Re-enabling requires a rewrite; incremental/CDC queries are non-functional while disabled |
+
+## 7. Using the output
+
+A session ends with three artifacts:
+
+1. **The ADR** — save it next to your pipeline code (e.g. `docs/adr/hudi-
.md`) and put it through your normal design-review process. The sections reviewers should read first: *Assumptions and consented defaults* (what was checked vs guessed), *Warnings accepted* (risks you signed up for), *Durability table*, and *Revisit conditions* (each names an observable threshold — wire the relevant ones into your monitoring).
+2. **The config bundle** — grouped `hoodie.*` properties. Everything in it either encodes a design decision or changes a default deliberately; it intentionally omits config that restates defaults.
+3. **The submit command** (or `.option(...)` snippet for DataSource writes) — flags are split into **load-bearing** (derived from the design; don't change casually) and **environment placeholders** (paths, memory, Scala/Spark versions — the agent deliberately doesn't guess these; fill them from your own build and cluster).
+
+Then: land a first commit in a staging path, run your real read patterns against it, and check the ADR's operational playbook section for what to monitor from day one (commit duration, pending compactions, active timeline size, small-file ratio).
+
+## 8. Known limitations (Milestone 1)
+
+Be aware of what the agent will *decline* to decide — it defers honestly rather than guessing, but plan for these yourself:
+
+- **Multi-writer contention tuning** — the agent asks whether anything else writes the table (every tier but the lightest), derives the concurrency mode, picks a lock provider, and emits a complete, runnable block. What it does *not* do is tune for observed contention: lock retry/timeout values, conflict-retry counts, and early conflict detection stay at their defaults, because the right values depend on measured behavior rather than design-time facts. That is Operations Agent territory. Two things remain yours to carry out: apply the emitted block to **every** writing job (the ADR's pre-launch checklist enumerates them), and confirm that writers using `INSERT`/`BULK_INSERT` have disjoint key spaces — concurrent inserts can duplicate even with dedup enabled. Background: [Hudi concurrency docs](https://hudi.apache.org/docs/concurrency_control).
+- **Catalog / metastore sync beyond the common paths** — the agent asks which engines query the table and derives sync config for Hive Metastore, AWS Glue, BigQuery, and DataHub, including the partition-extractor and MOR `_ro`/`_rt` consequences. Not covered: Polaris beyond pointing at the Spark catalog config, Snowflake/Redshift-specific setup, and per-catalog auth (Kerberos, IAM policy documents, service-account keys) — those are environment concerns the flow deliberately never asks about. Background: [metastore](https://hudi.apache.org/docs/syncing_metastore), [Glue](https://hudi.apache.org/docs/syncing_aws_glue_data_catalog), [BigQuery](https://hudi.apache.org/docs/gcp_bigquery), [DataHub](https://hudi.apache.org/docs/syncing_datahub).
+- **Non-Kafka source configs** — Kafka sources get full source-class + schema-provider derivation; for DFS/JDBC/Pulsar/Kinesis sources you'll fill in the `--source-class` and source properties from Hudi docs.
+- **Cross-format interoperability (Apache XTable)** — explained and linked, not configured. XTable translates Hudi metadata so the same files can be read as Iceberg or Delta, but it is a separate incubating project: its config keys live in its codebase rather than Hudi's, so this skill cannot machine-verify them the way it verifies every `hoodie.*` key it emits. The agent names the one durable coupling — **XTable's FAQ lists MOR as unsupported, so cross-format interop argues for CoW**, worth confirming against their current docs since the project is incubating — and points you at [xtable.apache.org](https://xtable.apache.org), [the repo](https://github.com/apache/incubator-xtable), and [Hudi's page](https://hudi.apache.org/docs/syncing_xtable) to follow up.
+- Also out of scope: benchmarking, record-level TTL, z-order/layout-optimization guidance, multi-table transactions, CONSISTENT_HASHING sizing, and versions other than 1.2.0.
+
+If you hit one of these, the ADR's *Open Questions* section is where it lands — treat entries there as pre-launch action items, not footnotes.
+
+## 9. Feedback
+
+This is a Milestone 1 preview and walkthroughs are the fuel for making it sharper. When something feels off — a question that didn't fit, a warning that fired too late or not at all, a recommendation that surprised you — note the moment in the transcript and share it on the discussion thread: [apache/hudi#19264](https://github.com/apache/hudi/discussions/19264).
+
+Especially valuable: run a table you already operate through the flow and compare the agent's design against what you actually built. Divergences in either direction are exactly the feedback the project needs.
diff --git a/hudi-agent-gateway/skills/hudi-architect/SKILL.md b/hudi-agent-gateway/skills/hudi-architect/SKILL.md
new file mode 100644
index 0000000000000..707e9e682c9ab
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/SKILL.md
@@ -0,0 +1,193 @@
+---
+name: hudi-architect
+description: Interactive Apache Hudi table design advisor. Turns workload requirements into a Hudi table architecture, config bundle, and Architecture Decision Record via a tiered conversational flow. Invoke when a user wants help designing a new Hudi table or evaluating an existing design.
+---
+
+
+
+# Hudi Architect
+
+You are a seasoned Apache Hudi architect. A user has come to you for help designing a Hudi table for their workload. Conduct the conversation as a bounded design review, not a configuration wizard.
+
+**Target Hudi version: 1.2.0.** All decisions assume this version.
+
+## Core principles
+
+Ask **workload questions, not Hudi questions.** Every decision falls into one of three buckets:
+
+1. **Deduce, don't ask.** Decisions derivable from workload answers with low blast radius (index type, service posture, meta-fields for mutable). State the outcome with rationale.
+2. **Explain, then let user choose.** Durable decisions where the tradeoff is understandable in workload terms (table type when derivation is ambiguous, partitioning). Present tradeoff, recommend, ask user to confirm or override.
+3. **Don't ask, don't discuss.** Platform standards (MDT on, col stats off, Hudi 1.2.0). Emit config silently and note in ADR under "Platform-managed properties."
+
+**Never ask a question whose answer wouldn't change the recommendation.** If the workload is COW-only, don't ask about compaction. If the workload is unpartitioned, don't ask about cross-partition updates.
+
+**Gate optional sections with one plain question before opening them.** Where a whole group of questions exists to configure something the user may not want at all — catalog sync is the clearest case — ask that first, in outcome terms, and let a "no" close the section. Deriving the answer from three questions the user didn't need to answer is the same waste as one unnecessary question, multiplied. Two things make the gate honest: phrase it as an outcome rather than a Hudi feature ("does anything need to find this table by name?", not "do you want meta sync?"), and when the answer is no, **say whether the decision is reversible** — declining something that can be added later against a live table costs nothing, and a user who doesn't know that may say yes defensively.
+
+**Every question must be in user language, not Hudi language.** Users don't know what an RLI is; they know what a customer_id lookup is. Users don't know what a delta commit is; they know how often data lands.
+
+**Read the references directory** for decision tables, question phrasing, warnings, and config templates. Consult them as you drive the flow; don't try to memorize the rules.
+
+## Flow structure
+
+The conversation has three parts:
+
+1. **Tier gate** — a single scoping question to figure out which downstream questions fire.
+2. **Rounds 1-3** — workload questions, gated conditionally by tier.
+3. **Output** — Architecture Decision Record + config bundle + runnable submit command.
+
+Load `references/question-flow.md` for the full round-by-round question list with conditional gating.
+
+## Question delivery
+
+**Where an interactive question widget is available** (e.g. Claude Code's `AskUserQuestion`), use it for closed-set questions. It renders selectable options and lets the user see their choices accumulate. Where no widget exists (plain chat UI, MCP client), fall back to numbered prose blocks — the question content is identical either way.
+
+**Widget-first, at every tier.** Every question opens as a widget wherever an option set can be derived. Free text appears only as a short follow-up to capture a name the widget has already scoped.
+
+A widget **cannot collect free text** — its options are predefined, and "Other" is a user-typed escape hatch, not a labelled input. So decompose any question that needs a name into two turns: the decision (widget), then the name (conversational).
+
+| Question | Widget turn — the decision | Free-text follow-up |
+|---|---|---|
+| Record key | Single column / Composite | "Which column?" / "Which columns?" |
+| Ordering field | Timestamp column / Version or sequence number / Not sure | "Which column?" |
+| Partitioning | Date-based / Business dimension / Composite / None / You pick | "Which column?" (skipped for none and you-pick) |
+| Partition granularity | Daily / Monthly / Hourly | — |
+
+Batch the free-text follow-ups: once several shapes are settled, ask for all the column names in one turn rather than one at a time.
+
+**Other widget rules:**
+
+- **Batch at most 3 questions per screen** — except that a follow-up gated by an answer collected on that same screen (e.g. Kafka record format alongside source) may share it as a fourth item — and **never split a gating question from the question it gates** (mutability and update-distribution belong together).
+- **When a gate narrows the next question's option set, the two need separate screens.** A widget's options are fixed when it renders, so it cannot filter on an answer given beside it. Sharing a screen there offers combinations the gate would have excluded, and the user can pick an impossible one without anything objecting (storage scheme and query engine are the case that proved this: Athena on GCS). A gated follow-up may share a screen only when it merely *fires or doesn't* — not when the gate changes what the options are.
+- **Tradeoff tables go in prose immediately before the widget call**, never crammed into the question text. Per-option consequence belongs in each option's description.
+- **Option sets must cover the real world.** If a user reaches for "Other," treat it as a signal the options were too narrow — a Spark DataFrame from an upstream ETL job is a source, an exact retention figure is an answer. Accept it and re-derive.
+- Where no widget exists (plain chat UI, MCP client), fall back to numbered prose blocks. The question content is identical.
+
+## Disclosed defaults
+
+At tiers where a decision would otherwise be skipped silently, **state the default and get consent** rather than assuming. Show what will be applied, why, and flag any durable item inline. Then a single consent question: use these defaults, or set them yourself.
+
+**If the user chooses to set them:** present a multi-select router asking which items they want to own, then prompt only for those. Everything unclaimed keeps its default. Don't emit a wall of prose asking for several free-text values at once.
+
+**Validation questions travel with the decision they validate.** If a user names a partition column at any tier, ask partition-column stability and consumer read filters *at that moment* — those gate index scope and the Vice 1 check, and are useless if deferred to a round that won't run.
+
+## Tier gate (fires first, before anything else)
+
+Ask the user:
+
+> "What are you trying to do right now?
+>
+> - **Exploring** — I want to understand what Hudi is and what it offers.
+> - **Prototyping** — I want to try something end-to-end at small scale (laptop, staging).
+> - **Productionizing** — I'm getting a real production pipeline working at modest scale (~hundreds of GB).
+> - **Production at scale** — going all-in at TB or PB scale, real production."
+
+Internal labels for these four tiers: `EXPLORATION`, `PROTOTYPING`, `PRODUCTIONIZING_INITIAL`, `PRODUCTION_AT_SCALE`. Do not surface these labels to the user.
+
+**What fires per tier:**
+
+- **EXPLORATION** — Round 1 abbreviated, concept-explanation focused. May not produce a full ADR — often a "here's what your workload would look like as a Hudi table" narrative. Replace hard questions with explanations ("Hudi supports Spark and Flink — Spark is most common; I'll assume Spark unless you say otherwise").
+- **PROTOTYPING** — Round 1, then a **disclosed-defaults consent block** for table size / partitioning / retention, then **hard-ask the non-defaultable facts**: record key and ordering field when mutable, and whether anything else writes the table. Goal is a genuinely runnable first table, not a sketch. A prototyping ADR must not ship placeholder values in its config bundle.
+- **PRODUCTIONIZING_INITIAL** — Rounds 1 + 2. Full mutation/identity/partitioning questions. Production-safe defaults.
+- **PRODUCTION_AT_SCALE** — All rounds. Full rubric. Guardrails strict. All revisit conditions surfaced.
+
+**Non-defaultable facts.** Some values have no safe default and must be asked wherever they apply, at every tier:
+
+- **Record key** (mutable workloads) — auto-generated keys are immutable-only and incompatible with upsert semantics.
+- **Ordering / precombine field** (mutable workloads) — decides which version wins when two updates for the same key land in one batch.
+- **Partition column name**, when the user opts into partitioning.
+- **Source record format** (Kafka + HoodieStreamer) — derives the source class and schema provider.
+- **Which engines query the table** (Rounds 2+) — a Hudi table is invisible to Trino, Athena, or
+ BigQuery until it is registered in a catalog, and Spark/Flink need none. There is no safe
+ default: guessing "no catalog" ships an unqueryable table, guessing "HMS" invents
+ infrastructure.
+- **Whether anything else writes the table** (every tier but EXPLORATION) — assuming a single
+ writer when there is a second is a silent-corruption path that produces no error and no log
+ line. Costs one question about a fact the user already knows.
+
+## Rounds — see references/question-flow.md
+
+The full round-by-round question list, conditional gating, and answer routing is in `references/question-flow.md`. Read that file when you're about to ask questions.
+
+**Key checkpoints:**
+
+- Between Round 2 and Round 3, echo derived facts back to the user (steady-state size, projected partition count, tension flags). Confirm before Round 3 fires.
+- If workload answers surface tension (e.g., user picked fire-and-forget but the workload wants MOR), surface tension explicitly with 2-3 reconciliation options. Never silently override user input.
+
+## Decision derivation — see references/decision-tables.md
+
+For each decision domain (engine, writer, table type, index, partitioning, retention, table services, meta-fields, record key), consult `references/decision-tables.md`. That file holds the decision tables and pseudocode.
+
+**Do not invent Hudi config combinations.** If a decision isn't covered by the reference tables, ask the user or flag as an open question. Don't guess `hoodie.*` config values.
+
+## Warnings — see references/warnings.md
+
+The rule engine has a set of named warnings that fire on specific workload signals. Consult `references/warnings.md` as you go. Every warning has a trigger condition and a message template. Surface warnings at the right point in the flow, not all at once at the end.
+
+**Highest-impact warnings to always check:**
+
+- **Vice 1** — partition column doesn't match consumer read filters.
+- **Vice 2** — projected partition size below 100MB (over-granular).
+- **Vice 3** — user proposes partition-scheme evolution ("start hourly, coarsen later").
+- **High-cardinality partition trap** — user names `customer_id`/`vendor_id` as partition column with 100K+ projected count.
+- **Update-tail vs retention** — recent-concentrated update pattern with tail exceeding retention window.
+- **Compaction target IO trap** — MOR + projected size ≥ 1TB → default `hoodie.compaction.target.io` of 500GB will cause backlog.
+- **Retention clamp** — user's desired lookback exceeds safe max for their commit cadence.
+
+## Output — see references/adr-template.md and references/config-templates.md
+
+**Before generating, offer one final revisit.** Show every answer collected, then ask whether to generate or amend something first. This is a single gate immediately before output — not one per round. Per-round answer echoes stay informational. If the user proceeded past any warning during the flow, restate those choices in the review so they get one last chance to walk one back.
+
+Produce three artifacts at the end:
+
+1. **Architecture Decision Record (ADR)** — structure per `references/adr-template.md`. Includes workload summary, key design decisions with tradeoff tables + rationale, durability table for one-way decisions, config bundle, operational playbook, measurable revisit conditions.
+2. **Configuration bundle** — the `hoodie.*` properties, grouped per `references/config-templates.md`.
+3. **Sample submit command** — a runnable `spark-submit` (or Flink equivalent) for the derived writer, per `references/config-templates.md`. Call out which flags are load-bearing (derived from design decisions) versus environment-specific (paths, memory, engine and Scala versions the flow never asked about). Environment-specific values are placeholders the user must verify.
+
+**Revisit conditions must be measurable.** Not "revisit if write amp becomes an issue." Yes: "if p95 commit duration exceeds the ingestion interval on a COW table above 1TB, evaluate switching to MOR — note this requires a table rewrite, so decide before the table grows further."
+
+A good revisit condition names an observable threshold, the first thing to check, and whether acting on it is reversible.
+
+## Decision UX contract
+
+For every decision surfaced in the dialogue (not just table type), follow the same pattern:
+
+1. **Tradeoff table** — 2–5 rows, columns are options, rows are workload-relevant dimensions.
+2. **2–3 lines of recommendation prose** stating the choice and the one reason that matters most.
+3. **One-line confirm/override question.**
+
+Recommendation always adjacent to tradeoff table on the same screen. Cap: dialogue prose never exceeds 3 lines per decision. Deeper rationale lives in the ADR.
+
+## Expose uncertainty
+
+Distinguish confirmed facts from inferred facts from assumptions. When you're guessing, say so. Don't present guessed values as authoritative.
+
+## Guardrails
+
+**Do not:**
+- Deploy pipelines, modify production tables, or apply configuration changes.
+- Invent `hoodie.*` config combinations not in `references/`.
+- Present a design without an ADR.
+- Ask a question whose answer wouldn't change the recommendation.
+- Push clustering, column stats, or other tuning knobs at design time (defer to Operations Agent).
+
+**Do:**
+- Match tone to tier — softer/explanatory for EXPLORATION; direct/production-safe for PRODUCTION_AT_SCALE.
+- Surface tensions explicitly with reconciliation options.
+- Flag one-way durable decisions in the ADR's durability table.
+- Consult the reference files instead of memorizing rules.
diff --git a/hudi-agent-gateway/skills/hudi-architect/references/adr-template.md b/hudi-agent-gateway/skills/hudi-architect/references/adr-template.md
new file mode 100644
index 0000000000000..de4b21df758b0
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/references/adr-template.md
@@ -0,0 +1,311 @@
+
+# ADR template
+
+The Architecture Decision Record structure produced at the end of the conversation. Consult when generating output.
+
+## Structure
+
+```markdown
+# Hudi Architecture Recommendation —
+
+Generated by Hudi Architect on . Target Hudi version: 1.2.0.
+
+## 1. Workload Summary
+
+Brief prose (3-5 sentences) describing what this table does, where data comes from, and how it's used.
+
+## 2. Confirmed Facts
+
+Bullet list of what the user answered directly:
+- Source:
+- Continuous ingestion:
+- Mutability:
+- Update distribution: (if mutable)
+- Experience level:
+- Consumer read pattern:
+- Table size: current , projected 2-3yr
+- Retention lookback: , clamped to
+- Record key: or auto-gen
+- Partitioning: or unpartitioned
+- Meta-fields mode:
+- Small-files posture: (if immutable)
+- Pipeline shape:
+- Writer:
+- Table type:
+- Index:
+
+## 3. Assumptions and consented defaults
+
+Two distinct categories — keep them separate.
+
+**Consented defaults** — values the Architect proposed and the user explicitly accepted (the disclosed-defaults block). These rest on stronger footing than assumptions; the user saw them and agreed.
+- e.g., "Retention 48h — proposed as prototype default, user accepted."
+
+**Assumptions** — what the Architect inferred when the user was silent or a question didn't fire at this tier. These are unverified.
+- e.g., "Assumed daily partition granularity for date-based partitioning."
+- e.g., "Assumed single writer — EXPLORATION tier, where the writer question does not fire." This is the *only* tier at which single-writer may be an assumption; everywhere else Q1.7 asks, so the answer belongs in §2 as a confirmed fact either way. If the user *declared* additional writers, that is a confirmed fact plus a derived concurrency mode and provider — never file it as an assumption.
+- e.g., "Consumer read patterns not captured at this tier — Vice 1 alignment unverified."
+
+If a tier skipped a question that gates a durable decision, say so here explicitly. A reader must be able to tell which parts of the design were checked and which were guessed.
+
+## 4. Recommended Architecture
+
+Compact YAML summary of the design:
+
+\`\`\`yaml
+engine: spark
+writer: hoodie_streamer_continuous
+operation: upsert
+table_type: MERGE_ON_READ
+compaction: async_in_process # via HoodieStreamer
+index:
+ type: RECORD_LEVEL_INDEX
+ scope: PARTITIONED
+partitioning:
+ column: trip_date
+ granularity: day
+ projected_count: ~1095
+meta_fields: KEEP_ALL
+services:
+ cleaner: inline, KEEP_LATEST_BY_HOURS, 48h retained
+ archival: inline, min=634 / max=761 commits # derived from the 5-min cadence — never a fixed 1000/1200
+ compaction: async in-process, every 5 delta commits
+ clustering: OFF (revisit if fragmentation grows)
+metadata_table: enabled
+catalog_sync: none # or: hms / glue / bigquery (+ datahub)
+# when synced, also record:
+# database + table registered
+# for MOR: both _ro and _rt, and which consumers use which
+concurrency: SINGLE_WRITER # or OPTIMISTIC_CONCURRENCY_CONTROL / NON_BLOCKING_CONCURRENCY_CONTROL
+# when multi-writer, also record:
+# writers:
+# lock_provider: # omit for NBCC
+\`\`\`
+
+## 5. Key Design Decisions
+
+One subsection per major decision. Each subsection contains:
+1. Tradeoff table (2-5 rows, columns are options).
+2. 2-3 lines of recommendation prose.
+3. Rationale — the one reason that mattered most, plus the workload inputs that drove it.
+4. Alternatives considered and why rejected.
+
+Cover at minimum:
+- Table type
+- Partitioning
+- Index
+- Writer selection
+- Retention policy
+- Small-files posture (if immutable)
+- Meta-fields mode (if immutable + small records)
+
+## 5b. Warnings accepted and recommendations overridden
+
+Every warning the user chose to proceed past, and every recommendation they declined, gets an entry here — with the original advice, what they chose instead, and a measurable trigger for revisiting.
+
+Without this, a reader cannot tell a derived decision from one made against advice, and an accepted risk silently disappears from the record.
+
+| What fired | Recommended | User chose | Measurable revisit trigger |
+|---|---|---|---|
+| `` | `` | `` | `` |
+
+Cross-reference these into §11 Risks. An accepted warning is a standing risk, not a closed question.
+
+## 6. Durability Table
+
+Structured table listing every one-way decision:
+
+| Decision | What's locked in | Cost of unlocking | Revisit trigger |
+|---|---|---|---|
+| Table type (COW/MOR) | Cannot switch without rewrite | Table rewrite | Per revisit conditions in §11 |
+| Partition column(s) + granularity | Fixed at table creation — including the choice to be unpartitioned | New table + full data rewrite (no ALTER path) | If dominant read filter shifts, or projected size crosses ~500GB while unpartitioned |
+| Record key column(s) | Cannot change | Table rewrite | If key semantic changes |
+| Bucket count (BUCKET index only) | Fixed at creation | Table rewrite | If key cardinality outgrows the bucket count |
+| RLI file-group count (RLI only) | Fixed when the index initializes | Table rewrite | If record count approaches the sized projection |
+| ...include only decisions relevant to this design... |
+
+**Concurrency mode is NOT a durable decision — but NBCC eligibility is.** `hoodie.write.concurrency.mode` can be changed on a live table, so it does not belong in this table. What does, when the design is NBCC, is the bucket count that makes NBCC legal at all: NBCC requires MOR + simple bucket index, and the bucket count is fixed at creation. Record it as the bucket-count row, and note in §5 that the concurrency mode is riding on a durable decision even though the mode itself is switchable. Never let this reasoning run backwards — reshaping a table to make NBCC possible trades a reversible choice for an irreversible one.
+
+**Do not describe an RLI as a fully reversible choice.** *Adding* a record index later is free (async build via `HoodieIndexer`, no rewrite). *Resizing* an initialized one is not — the file-group count is durable, like bucket count. If the design emits RLI config, the count belongs in this table.
+
+## 7. Alternatives Considered
+
+Per major decision, the alternative that was ruled out and why. Cross-references the tradeoff tables in §5.
+
+## 8. Consequences and Trade-offs
+
+Prose describing what this design creates:
+- Operational responsibilities (services to monitor, jobs to keep running).
+- Performance envelope (write cost, read latency, storage cost).
+- Constraints on future evolution (linked to durability table).
+
+## 9. Configuration Bundle
+
+The `hoodie.*` properties, grouped:
+
+### 9.1 Durable table properties
+\`\`\`
+
+\`\`\`
+
+### 9.2 Writer properties
+\`\`\`
+
+\`\`\`
+
+### 9.3 Reader properties (per engine)
+\`\`\`
+# Spark reader
+hoodie.metadata.enable=true
+hoodie.enable.data.skipping=true
+
+# Flink reader (if applicable)
+metadata.enabled=true
+read.data.skipping.enabled=true
+
+# Other engines as needed
+\`\`\`
+
+### 9.4 Platform-managed properties
+\`\`\`
+
+\`\`\`
+
+### 9.5 Workload-dependent tuning variables
+\`\`\`
+# Knobs the Operations Agent may tune later, once there is observed behavior to tune against.
+# Emit only what this design actually determined — leave the rest out.
+\`\`\`
+
+**Do not emit `hoodie.upsert.shuffle.parallelism`.** Hudi derives parallelism from the incoming DataFrame's Spark partition count and reuses it. Setting it explicitly overrides a value that is usually already right, and the flow has no basis for a better one — it never captures batch volume, and parallelism depends on executor cores and partition skew as much as row count. This is tuning territory: it belongs to observed shuffle behavior, not design time.
+
+Same principle as the platform-managed section — emit config that changes behavior, not config that restates or overrides a sensible default.
+
+### 9.6 Sample submit command
+
+A runnable `spark-submit` (or Flink equivalent) for the derived writer, per config-templates.md → Sample submit commands. Not applicable to Spark DataSource, where the write lives in the user's own application code.
+
+Split the flags explicitly:
+
+**Load-bearing** — derived from design decisions in this ADR. Changing these changes the design (`--continuous`, `--table-type`, `--op`, `--source-class`, `--schemaprovider-class`, `--source-ordering-field`).
+
+**Environment-specific** — placeholders the flow deliberately doesn't ask about: master and deploy mode, executor memory and count, Scala version, Spark version in the bundle artifact name, Hudi version, and all paths. These come from the user's build and cluster, not from the design, and collecting them would add infrastructure questions to a design conversation for no design benefit.
+
+Never present environment-specific values as though they were derived. Mark them as blanks the user fills in.
+
+## 10. Operational Playbook
+
+Practical guidance for running this table:
+
+**What to monitor:**
+- Commit duration.
+- Pending compaction count and age (if MOR).
+- Active timeline entry count (must stay under ~5000).
+- Small-file ratio.
+- Cleaner + archival activity.
+- **Catalog sync only:** sync errors. A failed sync does not fail the write, so the catalog falls behind silently and readers see a stale schema or missing partitions with nothing in the writer's logs.
+- **Multi-writer only:** lock acquisition failures and commit-conflict retries. A rising conflict rate means the writers are contending on the same file groups — a partitioning or key-space question, not a lock-tuning one.
+
+**Multi-writer operating rules** (include only when the design is OCC or NBCC):
+- The concurrency block is **part of every writing job's config**, not just the primary pipeline. A job that writes without it bypasses the lock entirely. This includes backfills, GDPR/cleanup jobs, and any standalone table-service job.
+- Adding a new writer later means applying the same block to it *before* its first commit.
+- With an explicit (non-implicit) lock provider, the lock identity values must match exactly across every job — verify them together, not job by job.
+- Do not switch a running multi-writer table to `SINGLE_WRITER` to "speed it up." The mode is switchable, but only after every concurrent writer is actually stopped.
+- MDT synchronization.
+- (Others per workload)
+
+**What healthy behavior looks like:**
+- Commits complete within minutes at target parallelism.
+- Compaction backlog stays under pending compactions.
+- (Others)
+
+**Common failure modes for this design:**
+- (per decision domain — e.g., "if partition count grows past 30K, listing gets expensive")
+
+**Which settings should NOT be changed casually:**
+- Durable properties (list from §6).
+- Bucket count (if BUCKET index).
+- Meta-fields config (if disabled).
+
+**Sizing note:**
+- Target visibility interval: minutes (as stated intent).
+- At , expect . Actual latency = f(cores, parallelism, source rate). Validate empirically.
+
+## 11. Risks
+
+Design decisions that carry known risk:
+- Auto-gen keys → one-way for future mutability.
+- BUCKET index → durable, migration expensive.
+- Meta-fields disabled → CDC / native incremental unavailable.
+- (Others per this design)
+
+## 12. Revisit Conditions
+
+Every condition must be measurable. Format:
+
+**Table type:**
+- If p95 commit duration exceeds at table size >, first knob is ``; if that doesn't help, evaluate .
+
+**Index:**
+- Migrate to Partitioned RLI (async-buildable, no rewrite) if any of these trigger:
+ - Table size approaches ~1-2TB.
+ - File-group count grows past ~10K per partition.
+ - Small-file ratio exceeds ~30%.
+ - Writer p95 tagging time exceeds ~30 seconds.
+
+**Compaction (MOR):**
+- If pending compaction age exceeds ~30 min OR log-file count per file group exceeds ~20, first knob is compactor parallelism; if problem persists, evaluate switching from inline to async deployment.
+
+**Retention:**
+- If active timeline exceeds ~5000 entries, review cleaner cadence or check for stuck instants.
+- If downstream consumers report reconciliation failures, retention window may be too narrow.
+
+**Partitioning:**
+- If a new dominant read filter emerges that doesn't match the partition column, evaluate: enabling column stats + data skipping, adding secondary index, or table rewrite.
+
+**(Others per decision domain)**
+
+## 13. Open Questions
+
+Anything the Architect couldn't fully resolve:
+- (User assumptions to validate)
+- (Unclear signals from workload)
+- (Deferred to Operations Agent)
+- (Deferred to future proposal versions)
+
+**Multi-writer pre-launch checklist** (when the design is OCC or NBCC). This is a checklist
+item, not an open question — the mode, the provider, and the full config are all decided. What
+remains is applying them:
+- [ ] The concurrency block is present in **every** job that writes this table — list them by name.
+- [ ] For OCC: the same `hoodie.write.lock.provider` on every side, with its required keys.
+- [ ] For an explicit lock provider only: the lock identity values (`lock_key` / `partition_key` / `base_path`) are byte-identical across jobs.
+- [ ] No writing job sets `hoodie.clean.failed.writes.policy=EAGER` — it is a hard validation failure under multi-writer modes.
+- [ ] Any cloud bundle the design requires (`hudi-aws-bundle` for DynamoDB locking or Glue sync, `hudi-gcp-bundle` for BigQuery, `hudi-datahub-sync-bundle` for DataHub) is on the classpath of **every** writing job. The config is valid without it and fails at the first commit.
+
+Escalate to a genuine open question only when a writer is named that this session could not
+inspect — e.g. a job owned by another team whose config the user cannot confirm.
+```
+
+## Notes on generation
+
+- **§5 tradeoff tables must be adjacent to the recommendation prose** on the same visual screen. Users pick the wrong option when the table appears without the anchoring recommendation.
+- **Cap dialogue prose at 3 lines per decision.** Deeper rationale goes in §5's rationale subsection, not into user dialogue.
+- **Every revisit condition in §12 must be measurable.** Aspirational conditions ("revisit when write amp becomes an issue") are worse than none — they signal presence of a concern without offering actionable guidance.
+- **§6 durability table** lists only decisions that actually apply to this specific design. Don't include rows for irrelevant durables.
+- **§10 operational playbook** should include the sizing note. Target visibility is an intent, not a guarantee — pair it with the "actual latency = f(cores, parallelism, source rate)" caveat.
diff --git a/hudi-agent-gateway/skills/hudi-architect/references/config-templates.md b/hudi-agent-gateway/skills/hudi-architect/references/config-templates.md
new file mode 100644
index 0000000000000..e78bca2ef7852
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/references/config-templates.md
@@ -0,0 +1,1018 @@
+
+# Config templates
+
+Grouped `hoodie.*` properties emitted per decision. Consult when generating the final config bundle.
+
+## Grouping (per §9.3 of the proposal)
+
+1. **Durable table properties** — set at creation, cannot change without rewrite.
+2. **Writer properties** — writer-side runtime config.
+3. **Reader properties** — reader-side config (per query engine — different keys per engine).
+4. **Platform-managed properties** — MDT, target Hudi version, other fixed platform standards.
+5. **Workload-dependent tuning variables** — cadences, target sizes. Not shuffle parallelism: Hudi derives that from the incoming DataFrame's partition count, so setting it explicitly overrides a value that is usually already correct.
+
+## Durable table properties
+
+### Table type
+```
+hoodie.table.type=COPY_ON_WRITE # or MERGE_ON_READ
+```
+
+### Record key
+For SimpleKeyGenerator (single field):
+```
+hoodie.datasource.write.recordkey.field=
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.SimpleKeyGenerator
+```
+
+For ComplexKeyGenerator (composite):
+```
+hoodie.datasource.write.recordkey.field=,
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.ComplexKeyGenerator
+```
+
+For auto-gen (immutable only) — omit `recordkey.field` and keygenerator entirely.
+
+For TimestampBasedKeyGenerator (timestamp-derived partition):
+```
+hoodie.datasource.write.recordkey.field=
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.TimestampBasedKeyGenerator
+hoodie.keygen.timebased.timestamp.type=
+hoodie.keygen.timebased.output.dateformat=
+hoodie.keygen.timebased.timezone=UTC
+```
+
+For CustomKeyGenerator (mixed):
+```
+hoodie.datasource.write.recordkey.field=
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.CustomKeyGenerator
+```
+Additional config for CustomKeyGenerator partition-path spec: `` where type is SIMPLE or TIMESTAMP.
+
+For NonpartitionedKeyGenerator (unpartitioned):
+```
+hoodie.datasource.write.recordkey.field=
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.NonpartitionedKeyGenerator
+hoodie.datasource.write.partitionpath.field=
+```
+
+### Partition path
+```
+hoodie.datasource.write.partitionpath.field=
+# Empty string for unpartitioned
+```
+
+For Hive-style partitioning (column=value folder naming):
+```
+hoodie.datasource.write.hive_style_partitioning=true
+```
+
+### Meta fields
+
+Boolean — all meta fields or none. **There is no selective / commit-time-only mode at 1.2.0.**
+
+For keep all (default):
+```
+hoodie.populate.meta.fields=true
+```
+
+For disable entirely — append-only batch data with no incremental or CDC consumers, ever:
+```
+hoodie.populate.meta.fields=false
+```
+
+Disabling makes incremental queries **non-functional** (not merely slower) and CDC unavailable. Durable: changing it later requires a table rewrite.
+
+**If the workload has any incremental or streaming consumer, emit `true` and don't present a choice** — at 1.2.0 there is no way to keep incremental queries while dropping meta fields.
+
+Selective population via `hoodie.meta.fields.mode` (apache/hudi#19205) targets 1.3.0 and is not merged. When it ships it will be CoW-only, Spark-only, and immutable at table creation.
+
+## Writer properties
+
+### Operation (per §7.7.5 mapping)
+```
+hoodie.datasource.write.operation=
+```
+
+### Ordering / precombine
+```
+hoodie.table.ordering.fields=
+# Used for resolving record precedence when multiple versions of a key exist in a batch
+```
+
+### Small-file handling
+Default inline for insert/upsert (mutable). For immutable + posture (a):
+```
+hoodie.datasource.write.operation=bulk_insert
+hoodie.parquet.small.file.limit=0 # disable small-file handling
+```
+
+For immutable + posture (b):
+```
+hoodie.datasource.write.operation=bulk_insert
+# Add async clustering — see clustering section
+```
+
+For immutable + posture (c):
+```
+hoodie.datasource.write.operation=insert
+hoodie.parquet.small.file.limit=104857600 # 100MB, default
+hoodie.parquet.max.file.size=125829120 # 120MB, default
+```
+
+### Bulk-insert sort mode
+```
+hoodie.bulkinsert.sort.mode=
+```
+
+## Reader properties (per engine)
+
+**Reader-side MDT is per-engine — do not assume readers inherit writer MDT config.**
+
+Spark:
+```
+hoodie.metadata.enable=true
+hoodie.enable.data.skipping=true
+```
+
+Flink:
+```
+metadata.enabled=true
+read.data.skipping.enabled=true
+```
+
+Presto:
+```
+hudi.metadata-table-enabled=true
+```
+
+Athena:
+```
+hudi.metadata-listing-enabled=true
+```
+
+Emit reader config per query engine named in the workload.
+
+## Platform-managed properties
+
+Always emit, don't ask:
+```
+hoodie.metadata.enable=true # MDT on
+```
+
+**Do NOT emit these — they already carry the desired default, so setting them is noise:**
+- `hoodie.metadata.index.column.stats.enable=false` — col stats (and partition stats, which is coupled to the same knob) are off by default. The design guidance that col stats is Operations Agent territory still stands; it just doesn't need a config line.
+- `hoodie.metadata.index.bloom.filter.enable=false` — already false by default. Bloom-via-MDT remains experimental at 1.2.0 and should not be recommended at design time.
+
+General rule: emit config that *changes* behavior. A bundle full of redundant defaults obscures the handful of properties that actually encode the design.
+
+Target Hudi 1.2.0 (implied by dependency version, not a runtime config).
+
+## Source properties (HoodieStreamer)
+
+Derived from source + record format (question-flow.md Q1.2b).
+
+**The source class and schema provider are CLI flags, not properties.** They travel on the submit command as `--source-class` and `--schemaprovider-class` (see Sample submit commands). There are **no** `hoodie.streamer.source.class` / `hoodie.streamer.schemaprovider.class` properties — such lines are silently ignored, and a job that relies on them falls back to HoodieStreamer's default source class and reads the wrong source type. Each block below lists the real properties and notes the matching CLI flags in a comment.
+
+### Kafka + Avro + schema registry
+```
+# CLI flags: --source-class org.apache.hudi.utilities.sources.AvroKafkaSource
+# --schemaprovider-class org.apache.hudi.utilities.schema.SchemaRegistryProvider
+hoodie.streamer.schemaprovider.registry.url=/subjects/-value/versions/latest
+hoodie.streamer.source.kafka.topic=
+bootstrap.servers=
+auto.offset.reset=latest
+```
+
+### Kafka + Avro + schema file
+```
+# CLI flags: --source-class org.apache.hudi.utilities.sources.AvroKafkaSource
+# --schemaprovider-class org.apache.hudi.utilities.schema.FilebasedSchemaProvider
+hoodie.streamer.schemaprovider.source.schema.file=/source.avsc
+hoodie.streamer.schemaprovider.target.schema.file=/target.avsc
+hoodie.streamer.source.kafka.topic=
+bootstrap.servers=
+auto.offset.reset=latest
+```
+
+### Kafka + JSON
+```
+# CLI flag: --source-class org.apache.hudi.utilities.sources.JsonKafkaSource
+hoodie.streamer.source.kafka.topic=
+bootstrap.servers=
+auto.offset.reset=latest
+```
+Schema provider optional — pass `--schemaprovider-class` for `FilebasedSchemaProvider` or `SchemaRegistryProvider` if the schema is managed rather than inferred.
+
+### Kafka + Protobuf
+```
+# CLI flag: --source-class org.apache.hudi.utilities.sources.ProtoKafkaSource
+hoodie.streamer.source.kafka.topic=
+hoodie.streamer.source.kafka.proto.value.deserializer.class=
+bootstrap.servers=
+auto.offset.reset=latest
+```
+
+### Schema providers
+
+Schema providers are **optional and orthogonal to source type** — any of them can pair with any HoodieStreamer source. Many sources infer their schema, and simple pipelines that don't expect schema evolution often set no provider at all. That's a legitimate configuration, not an omission.
+
+**Kafka is the practical exception.** Kafka producers and consumers already need schema coordination to interoperate, so a registry is usually standing infrastructure before Hudi enters the picture. For Kafka sources, assume a schema provider is present and ask *which* one rather than *whether* — you're discovering existing infrastructure, not proposing new. For file, JDBC, and other sources, treat it as a genuine yes/no.
+
+Emit one when the user has an authoritative schema source or expects evolution. Pick by where the schema lives:
+
+| Schema lives in | Provider class |
+|---|---|
+| Confluent / compatible registry | `SchemaRegistryProvider` |
+| `.avsc` files you manage | `FilebasedSchemaProvider` |
+| A Hive metastore table | `HiveSchemaProvider` |
+| The upstream JDBC table itself | `JdbcbasedSchemaProvider` |
+| A proto class on the classpath | `ProtoClassBasedSchemaProvider` |
+
+All property keys use the `hoodie.streamer.schemaprovider.` prefix. **The provider class itself is the `--schemaprovider-class` CLI flag, not a property.**
+
+**File-based** — the common default for DFS sources:
+```
+# CLI flag: --schemaprovider-class org.apache.hudi.utilities.schema.FilebasedSchemaProvider
+hoodie.streamer.schemaprovider.source.schema.file=/source.avsc
+hoodie.streamer.schemaprovider.target.schema.file=/target.avsc
+```
+Target defaults to source when omitted — set both only when the transformer changes the schema.
+
+**Hive metastore** — when a synced table already defines the schema:
+```
+# CLI flag: --schemaprovider-class org.apache.hudi.utilities.schema.HiveSchemaProvider
+hoodie.streamer.schemaprovider.source.schema.hive.database=
+hoodie.streamer.schemaprovider.source.schema.hive.table=
+# target.schema.hive.database / .table if the target differs
+```
+
+**JDBC** — derive from the upstream table:
+```
+# CLI flag: --schemaprovider-class org.apache.hudi.utilities.schema.JdbcbasedSchemaProvider
+hoodie.streamer.schemaprovider.source.schema.jdbc.connection.url=
+hoodie.streamer.schemaprovider.source.schema.jdbc.driver.type=
+hoodie.streamer.schemaprovider.source.schema.jdbc.username=
+hoodie.streamer.schemaprovider.source.schema.jdbc.password=
+hoodie.streamer.schemaprovider.source.schema.jdbc.dbtable=
+```
+
+**When no provider is set**, the source infers the schema. Appropriate for stable schemas with no expected evolution — don't add a provider (or the infrastructure behind it) to a pipeline that doesn't need one.
+
+**Not applicable to Spark DataSource writes** — the DataFrame already carries its schema. Schema providers exist for HoodieStreamer only.
+
+## Cleaner + archival (inline autopilot)
+
+```
+# Automatic inline cleaning and archival are Hudi defaults — emit no on/off switches.
+# (hoodie.clean.automatic=true, hoodie.clean.async.enabled=false, hoodie.archive.automatic=true,
+# hoodie.archive.async=false, hoodie.commits.archival.batch=10 are all defaults already.)
+hoodie.clean.policy=
+hoodie.clean.hours.retained= # if KEEP_LATEST_BY_HOURS
+hoodie.clean.commits.retained= # if KEEP_LATEST_COMMITS
+
+hoodie.keep.min.commits=
+hoodie.keep.max.commits=
+```
+
+**Derive the archival window from commit cadence — never emit a constant.**
+
+```
+commits_per_day = 1440 / commit_cadence_minutes
+cleaner_commits = commits_per_day × cleaner_retention_days
+keep.min.commits = max(100, ceil(cleaner_commits × 1.1))
+keep.max.commits = ceil(keep.min.commits × 1.2)
+```
+
+At a 48h cleaner window: 5-min → **634 / 761**. 15-min → **211 / 253**. Hourly → **100 / 120** (floor).
+
+**At daily cadence or slower, emit no cleaner or archival config at all** — leave Hudi's defaults. A table committing once a day accumulates timeline entries far too slowly for the active timeline to be at risk, so overriding adds config surface for nothing.
+
+Archival must outlast the cleaner, hence the +10% margin. See decision-tables.md → Cleaner + archival for the full table and rationale.
+
+**Do not emit 1000 / 1200.** The active-timeline target is ~1000 entries; an archival floor of 1000 means archival can't reclaim until the timeline already sits at the number it's meant to protect.
+
+**Do NOT emit:** `hoodie.clean.fileversions.retained` — file-versions policy not recommended.
+
+## Index
+
+### SIMPLE
+```
+hoodie.index.type=SIMPLE
+```
+
+### Global SIMPLE
+```
+hoodie.index.type=GLOBAL_SIMPLE
+hoodie.simple.index.update.partition.path=true
+```
+
+### BLOOM
+```
+hoodie.index.type=BLOOM
+hoodie.bloom.index.prune.by.ranges=true
+# Do NOT set hoodie.bloom.index.use.metadata=true — experimental at 1.2.0
+```
+
+### Global BLOOM
+```
+hoodie.index.type=GLOBAL_BLOOM
+hoodie.bloom.index.update.partition.path=true
+```
+
+### Record Level Index (partitioned)
+```
+hoodie.index.type=RECORD_LEVEL_INDEX
+hoodie.metadata.record.level.index.enable=true
+
+# File-group count is PER PARTITION and DURABLE once the index initializes.
+# Set min == max to pin it; a range lets Hudi estimate instead.
+# Size from projected PER-PARTITION record count — see decision-tables.md → RLI file-group sizing.
+hoodie.metadata.record.level.index.min.filegroup.count=
+hoodie.metadata.record.level.index.max.filegroup.count=
+```
+
+### Global Record Level Index
+```
+hoodie.index.type=GLOBAL_RECORD_LEVEL_INDEX
+hoodie.metadata.global.record.level.index.enable=true
+
+# File-group count is TABLE-WIDE and DURABLE once the index initializes.
+# Set min == max to pin it; a range lets Hudi estimate instead.
+# Size from projected TABLE-WIDE record count — see decision-tables.md → RLI file-group sizing.
+hoodie.metadata.global.record.level.index.min.filegroup.count=
+hoodie.metadata.global.record.level.index.max.filegroup.count=
+```
+
+**Do NOT emit** `hoodie.metadata.record.index.{min,max}.filegroup.count` — these are deprecated aliases for the **global** properties. Using them under a partitioned-RLI config silently sets global knobs.
+
+**Optional, when the user cannot project growth** (see decision-tables.md → RLI file-group sizing):
+```
+hoodie.metadata.record.index.growth.factor=
+```
+
+### BUCKET (SIMPLE)
+```
+hoodie.index.type=BUCKET
+hoodie.index.bucket.engine=SIMPLE
+hoodie.bucket.index.num.buckets=
+```
+
+### BUCKET (CONSISTENT_HASHING — MOR only)
+Not recommended at design time. Escape hatch for skewed-partition BUCKET workloads.
+
+## Compaction (MOR only)
+
+### Inline (default for DataSource/SQL)
+```
+hoodie.compact.inline=true
+hoodie.compact.inline.max.delta.commits=5
+hoodie.compact.inline.trigger.strategy=NUM_COMMITS
+```
+
+### Async via HoodieStreamer continuous
+No config emitted. On by default; disable via `--disable-compaction` CLI flag (not recommended).
+
+### Async via Spark Structured Streaming
+```
+hoodie.datasource.compaction.async.enable=true
+```
+
+### Compaction target IO trap
+
+**This config is denominated in MEGABYTES, not bytes.** The default is `512000` (= 500 GB). Emitting a byte count here is off by a factor of ~10^6.
+
+It is a per-round IO *ceiling*, not a sizing target — "amount of MBs to spend during compaction run for the LogFileSizeBasedCompactionStrategy... helps bound ingestion latency." Capping it low is what creates the backlog: compaction is throttled below the rate at which log files accumulate, so file groups never catch up and read latency degrades.
+
+Rather than deriving a point value from table size (which just re-creates the same trap at a higher threshold as the table grows), set it high enough that it never binds and let the compaction strategy decide what to compact:
+
+```
+hoodie.compaction.target.io=104857600 # 100 TB expressed in MB — effectively uncapped
+```
+
+Include in the ADR with the rationale: the ceiling exists to bound inline-compaction latency, and any workload where compaction must keep pace with ingestion wants it out of the way.
+
+### Compaction selection strategy
+Default (LogFileSizeBasedCompactionStrategy):
+```
+hoodie.compaction.strategy=org.apache.hudi.table.action.compact.strategy.LogFileSizeBasedCompactionStrategy
+```
+
+## Clustering (off by default)
+
+Only emit when enabled (immutable + posture (b), or explicit user request).
+
+### Inline
+```
+hoodie.clustering.inline=true
+hoodie.clustering.inline.max.commits=4
+```
+
+### Async
+```
+hoodie.clustering.async.enabled=true
+hoodie.clustering.async.max.commits=5
+```
+
+### Plan strategy
+```
+hoodie.clustering.plan.strategy.class=org.apache.hudi.client.clustering.plan.strategy.SparkSizeBasedClusteringPlanStrategy
+hoodie.clustering.plan.strategy.small.file.limit=314572800 # 300MB
+hoodie.clustering.plan.strategy.target.file.max.bytes=1073741824 # 1GB
+```
+
+### Execution strategy
+Default (SparkSortAndSizeExecutionStrategy):
+```
+hoodie.clustering.execution.strategy.class=org.apache.hudi.client.clustering.run.strategy.SparkSortAndSizeExecutionStrategy
+```
+
+### Sort columns (if layout optimization enabled)
+```
+hoodie.clustering.plan.strategy.sort.columns=
+hoodie.layout.optimize.strategy=LINEAR # or ZORDER or HILBERT
+```
+
+### Incremental table services (1.2.0 default, keep on)
+```
+hoodie.table.services.incremental.enabled=true
+```
+
+## Concurrency
+
+Default is single writer. Emit only the mode line:
+
+```
+hoodie.write.concurrency.mode=SINGLE_WRITER
+```
+
+`SINGLE_WRITER` is correct — and required for maximum throughput — whenever exactly one
+process commits to the table. Inline table services, and async services running **in the
+writer's own process** (HoodieStreamer continuous, Flink streaming), do not make a second
+writer. A *standalone* service job does.
+
+Mode selection, NBCC eligibility, and provider choice are derived in
+decision-tables.md → Concurrency. This section holds the blocks to emit once that derivation
+has run.
+
+### Rule: every block below goes in EVERY writing job
+
+A lock only serializes writers that agree on it. A block applied to the ingestion job but not
+the compactor job, or applied with a different provider on each side, gives each writer its own
+lock: every writer succeeds, and the table corrupts silently with nothing in any log. State
+this every time a multi-writer bundle is emitted — it is the single most common way these
+deployments fail. See warnings.md → `LOCK_PROVIDER_MISMATCH`.
+
+### OCC — DynamoDB (default on AWS)
+
+Uses the **implicit** partition-key provider: the lock's partition key is derived from
+`hoodie.base.path`, so it cannot drift between jobs.
+
+```
+# ---- apply IDENTICALLY in every job that writes this table ----
+hoodie.write.concurrency.mode=OPTIMISTIC_CONCURRENCY_CONTROL
+hoodie.write.lock.provider=org.apache.hudi.aws.transaction.lock.DynamoDBBasedImplicitPartitionKeyLockProvider
+hoodie.write.lock.dynamodb.table=
+hoodie.write.lock.dynamodb.region=
+hoodie.clean.failed.writes.policy=LAZY
+```
+
+The lock table is created automatically if absent, so setup is a table name, a region, and IAM
+permissions on that table for **every** writing job. It defaults to `PAY_PER_REQUEST` billing
+(`hoodie.write.lock.dynamodb.billing_mode`), which is the right mode for a table that sees one
+short lock per commit — switching it to `PROVISIONED` means paying for reserved capacity this
+workload will not use.
+
+`hoodie.write.lock.dynamodb.partition_key` is **not** set — that is the point of the implicit
+provider. (Published docs list
+`hoodie.write.lock.dynamodb.endpoint_url` as required; it is optional. The keys actually
+validated are `table` and `region`.)
+
+**Requires `hudi-aws-bundle` in `--packages` on every writing job** — see "Cloud bundles are
+load-bearing" under Sample submit commands. Without it the job fails at the first commit with a
+`ClassNotFoundException` on the lock provider. If this design also syncs to Glue, the same
+bundle covers both.
+
+### OCC — ZooKeeper (existing quorum)
+
+Uses the **implicit** base-path provider: ZK base path and lock key are both derived from
+`hoodie.base.path`.
+
+```
+# ---- apply IDENTICALLY in every job that writes this table ----
+hoodie.write.concurrency.mode=OPTIMISTIC_CONCURRENCY_CONTROL
+hoodie.write.lock.provider=org.apache.hudi.client.transaction.lock.ZookeeperBasedImplicitBasePathLockProvider
+hoodie.write.lock.zookeeper.url=
+hoodie.write.lock.zookeeper.port=
+hoodie.clean.failed.writes.policy=LAZY
+```
+
+Neither `hoodie.write.lock.zookeeper.base_path` nor `hoodie.write.lock.zookeeper.lock_key` is
+set — both are derived. The derived ZK base path looks like `/tmp/`; that is a **znode
+path, not a filesystem path**, it is not on disk, and it is not tunable. Mention it in the ADR
+so it is not "fixed" later by switching to the explicit provider.
+
+### OCC — Hive Metastore
+
+```
+# ---- apply IDENTICALLY in every job that writes this table ----
+hoodie.write.concurrency.mode=OPTIMISTIC_CONCURRENCY_CONTROL
+hoodie.write.lock.provider=org.apache.hudi.hive.transaction.lock.HiveMetastoreBasedLockProvider
+hoodie.write.lock.hivemetastore.database=
+hoodie.write.lock.hivemetastore.table=
+hoodie.clean.failed.writes.policy=LAZY
+```
+
+Metastore URIs are picked up from the Hadoop configuration at runtime; set
+`hoodie.write.lock.hivemetastore.uris` only when that is not the case.
+
+### OCC — storage-based (cloud storage, no existing lock infrastructure)
+
+**Not the default — see decision-tables.md → Concurrency Step 3 for the maturity caution.**
+Available since **1.0.2**, years younger than every other provider, and it implements lease
+renewal with a heartbeat plus per-cloud lock clients. Emit it when the user is on cloud storage
+with no existing lock infrastructure and would otherwise stand up ZooKeeper for one table, or
+when they ask for it directly — and state the maturity point once, plainly, so the choice is
+made knowingly.
+
+The appeal is real: it locks under the table's own path, so there is no infrastructure to stand
+up and no lock identity to keep in sync.
+
+```
+# ---- apply IDENTICALLY in every job that writes this table ----
+hoodie.write.concurrency.mode=OPTIMISTIC_CONCURRENCY_CONTROL
+hoodie.write.lock.provider=org.apache.hudi.client.transaction.lock.StorageBasedLockProvider
+# Inferred automatically for multi-writer modes; emitted to document intent.
+# EAGER here is a hard config-validation failure.
+hoodie.clean.failed.writes.policy=LAZY
+```
+
+Optional, only if lock renewal needs tuning (validity must be >= 10x renew interval, and >= 10s):
+
+```
+hoodie.write.lock.storage.validity.timeout.secs=300
+hoodie.write.lock.storage.renew.interval.secs=30
+```
+
+`hoodie.write.lock.storage.heartbeat.poll.secs` is a **deprecated alias** for
+`renew.interval.secs` — set one, never both.
+
+Requires the cloud bundle matching the storage scheme on the classpath of every writing job.
+
+### NBCC — MOR + simple bucket index only
+
+Emit **only** when decision-tables.md → Concurrency Step 2 passes: MOR, BUCKET index, table
+version ≥ 8, no clustering. Never adjust table type or index to reach this block.
+
+```
+# ---- apply IDENTICALLY in every job that writes this table ----
+hoodie.write.concurrency.mode=NON_BLOCKING_CONCURRENCY_CONTROL
+hoodie.clean.failed.writes.policy=LAZY
+```
+
+No lock provider is required — writers append to their own log files and conflicts are resolved
+by the reader and the compactor. `hoodie.write.lock.conflict.resolution.strategy` is **not**
+emitted: it auto-infers to the bucket-index strategy from the index type, and setting it by
+hand is how that gets broken.
+
+### Standalone HoodieCompactor implies concurrent writers
+
+Whenever the design lands on a **separate `HoodieCompactor` job** (the async path for MOR +
+Spark DataSource / Spark SQL), two processes write the same table. `SINGLE_WRITER` is unsafe
+there — emitting it alongside a two-job recommendation is a silent corruption path.
+
+Emit the OCC block matching the deployment (DynamoDB on AWS; an existing ZooKeeper quorum or
+Hive Metastore otherwise) in **both** the ingestion job and the compactor job. See warnings.md → `COMPACTOR_CONCURRENCY_REQUIRED`.
+
+If the user is not prepared to run a lock provider at all, recommend inline compaction instead
+and record the latency tradeoff in the ADR.
+
+### Not emitted, and why
+
+| Config | Why not |
+|---|---|
+| `hoodie.write.lock.conflict.resolution.strategy` | Auto-infers from index type; hand-setting breaks bucket-index conflict handling. |
+| `hoodie.write.concurrency.early.conflict.detection.enable` | Experimental, OCC-only, default false. Offer for high-contention OCC; do not emit. |
+| `hoodie.write.num.retries.on.conflict.failures` | Default 0. Contention tuning — Operations Agent territory. |
+| Lock retry and timeout keys (the `wait_time_ms` / `num_retries` family) | Defaults are sound. Tune on observed contention, not at design time. |
+| ZooKeeper session and connection timeouts | Defaults are sound; same reasoning. |
+| DynamoDB capacity keys (`read_capacity`, `write_capacity`, `table_creation_timeout`) | Only apply under `PROVISIONED` billing, which this workload should not use. |
+| `hoodie.write.lock.app_id` | Identifies the lock holder for debugging. Environment-specific, not a design decision. |
+| `hoodie.write.lock.dynamodb.endpoint_url` | Local-development override for pointing at a DynamoDB emulator. |
+
+## Catalog / metastore sync
+
+Off by default — emit nothing unless a consumer needs it. Derivation and constraints are in
+decision-tables.md → Catalog / metastore sync. Spark- or Flink-only pipelines reading by path
+need none.
+
+### Hive Metastore (the default)
+
+```
+hoodie.datasource.meta.sync.enable=true
+hoodie.datasource.hive_sync.mode=hms
+hoodie.datasource.hive_sync.metastore.uris=thrift://:9083
+hoodie.datasource.hive_sync.database=
+hoodie.datasource.hive_sync.table=
+hoodie.datasource.hive_sync.partition_fields=
+```
+
+No `hoodie.meta.sync.client.tool.class` — `HiveSyncTool` is the default. The partition
+extractor is inferred for the common cases; set
+`hoodie.datasource.hive_sync.partition_extractor_class` explicitly only for the timestamp-based
+`yyyy/MM/dd` case (see decision-tables.md, and warnings.md →
+`PARTITION_EXTRACTOR_MISMATCH`).
+
+Omit `partition_fields` entirely for an unpartitioned table — it is what tells Hudi to use the
+non-partitioned extractor.
+
+**In Spark SQL with a Hive catalog** (`spark.sql.catalogImplementation=hive`), add:
+
+```
+hoodie.datasource.hive_sync.use_spark_catalog=true
+```
+
+That uses Spark's own catalog client and avoids the classloader conflicts otherwise seen in
+Hive-on-Spark setups.
+
+`hive-site.xml` must be on the classpath (and under `$SPARK_HOME/conf` for spark-shell or
+spark-sql). Only set `username` / `password` / `jdbcurl` when the mode is `jdbc`.
+
+### AWS Glue Data Catalog
+
+Reuses every Hive sync config above — only the tool class changes.
+
+```
+hoodie.datasource.meta.sync.enable=true
+hoodie.meta.sync.client.tool.class=org.apache.hudi.aws.sync.AwsGlueCatalogSyncTool
+hoodie.datasource.hive_sync.database=
+hoodie.datasource.hive_sync.table=
+hoodie.datasource.hive_sync.partition_fields=
+# Sync only on schema or partition change. Default is false, which writes a new
+# Glue catalog version on EVERY commit.
+hoodie.datasource.meta_sync.condition.sync=true
+```
+
+`hudi-aws-bundle` must be on the classpath of every writing job. No metastore URI — the tool
+talks to Glue directly, and the AWS region comes from the environment.
+
+Optional, for large partitioned tables where Glue partition reads become the bottleneck:
+
+```
+hoodie.datasource.meta.sync.glue.partition_index_fields.enable=true
+hoodie.datasource.meta.sync.glue.partition_index_fields=
+```
+
+The Glue read/write parallelism keys
+(`...glue.all_partitions_read_parallelism`, `...glue.changed_partitions_read_parallelism`,
+`...glue.partition_change_parallelism`) have working defaults — tune on observed sync latency,
+not at design time.
+
+### BigQuery
+
+Separate config namespace, and different constraints — read decision-tables.md before emitting.
+
+```
+hoodie.datasource.meta.sync.enable=true
+hoodie.meta.sync.client.tool.class=org.apache.hudi.gcp.bigquery.BigQuerySyncTool
+hoodie.gcp.bigquery.sync.project_id=
+hoodie.gcp.bigquery.sync.dataset_name=
+hoodie.gcp.bigquery.sync.dataset_location=
+hoodie.gcp.bigquery.sync.table_name=
+hoodie.gcp.bigquery.sync.source_uri=gs:////dt=*
+hoodie.gcp.bigquery.sync.source_uri_prefix=gs:////
+# Manifest-based sync — preferred over the legacy view-over-files approach
+hoodie.gcp.bigquery.sync.use_bq_manifest_file=true
+# BigQuery sync requires hive-style partitioning
+hoodie.datasource.write.hive_style_partitioning=true
+```
+
+There is **no** `hoodie.gcp.bigquery.sync.base_path` — published docs list one, but the table
+location comes from the standard base-path config. `hudi-gcp-bundle` on the classpath.
+
+Optional: `hoodie.gcp.bigquery.sync.require_partition_filter=true` forces queries to filter on
+a partition column, which prevents accidental full scans;
+`hoodie.gcp.bigquery.sync.billing.project.id` when billing differs from the data project.
+
+### DataHub (discovery, not queries)
+
+Additive — pair it with HMS or Glue, never instead of one, when a query engine is involved.
+
+```
+hoodie.datasource.meta.sync.enable=true
+hoodie.meta.sync.client.tool.class=org.apache.hudi.hive.HiveSyncTool,org.apache.hudi.sync.datahub.DataHubSyncTool
+hoodie.meta.sync.datahub.emitter.server=http://:8080
+hoodie.meta.sync.datahub.emitter.token=
+```
+
+`hudi-datahub-sync-bundle` on the classpath. For a custom emitter or dataset URN, see
+`hoodie.meta.sync.datahub.emitter.supplier.class` and
+`hoodie.meta.sync.datahub.dataset.identifier.class`.
+
+### Polaris
+
+Configured as a Spark catalog rather than through the sync-tool mechanism. Only when the user
+already runs Polaris — it is newer than the other options (Hudi 1.1.1 / Polaris 1.3.0, and
+Polaris is incubating).
+
+```
+--conf spark.sql.catalog.=org.apache.polaris.spark.SparkCatalog
+```
+
+Hudi detects the Polaris catalog and delegates table registration to it; the default is already
+`org.apache.polaris.spark.SparkCatalog`, so `hoodie.spark.polaris.catalog.class` needs setting
+only for a custom implementation.
+
+### MOR registers two tables
+
+A MOR table with catalog sync produces `_ro` (base files only — cheaper, staler) and
+`_rt` (merges log files — current, slower). Name **both** in the ADR and say which
+consumers should use which; pointing a consumer at the wrong suffix gives stale data or
+unexpected latency with no error either way. `--skip-ro-suffix` on the standalone sync tool
+suppresses the `_ro` suffix, which exists for backward compatibility and should not be a
+default choice.
+
+## Sample bundles per archetype
+
+### Immutable event stream (EVENT-shape) — Kafka source, small records
+```
+# Table
+hoodie.table.type=COPY_ON_WRITE
+hoodie.datasource.write.recordkey.field= # empty (auto-gen)
+hoodie.datasource.write.partitionpath.field=event_ingest_date
+hoodie.populate.meta.fields=false # only valid with no incremental/CDC consumers
+hoodie.datasource.write.hive_style_partitioning=true
+
+# Writer
+hoodie.datasource.write.operation=bulk_insert # posture (b) — see clustering
+hoodie.bulkinsert.sort.mode=NONE
+
+# Index
+hoodie.index.type=SIMPLE
+
+# Services
+hoodie.clean.policy=KEEP_LATEST_BY_HOURS
+hoodie.clean.hours.retained=
+# NOT a fixed 48. At 15-min cadence the safe max is ~5 days (120h); at hourly, ~20 days.
+# A hardcoded 48 silently under-retains on slower cadences.
+#
+# Example below assumes 5-min cadence + 48h cleaner window.
+# Recompute both cleaner and archival for the actual answered cadence.
+
+hoodie.keep.min.commits=634 # 5-min cadence: 288 commits/day × 2 days × 1.1
+hoodie.keep.max.commits=761 # min × 1.2
+
+hoodie.clustering.async.enabled=true # posture (b)
+hoodie.clustering.async.max.commits=5
+
+# Platform
+hoodie.metadata.enable=true
+
+# Concurrency — valid ONLY while exactly one process writes this table, counting
+# backfills, GDPR/cleanup jobs, and any standalone compactor. Any second writer
+# means this line is replaced by the OCC (or NBCC) block for the deployment —
+# see Concurrency section — applied identically in every writing job.
+hoodie.write.concurrency.mode=SINGLE_WRITER
+```
+
+### Mutable dimension table (DIM-shape) — Kafka CDC source, unpartitioned, uniform updates
+```
+# Table
+hoodie.table.type=MERGE_ON_READ # experience = some
+hoodie.datasource.write.recordkey.field=customer_id
+hoodie.datasource.write.partitionpath.field= # empty (unpartitioned)
+hoodie.datasource.write.keygenerator.class=org.apache.hudi.keygen.NonpartitionedKeyGenerator
+# meta fields: kept — hoodie.populate.meta.fields defaults to true; emit only when disabling
+
+# Writer
+hoodie.datasource.write.operation=upsert
+hoodie.table.ordering.fields=updated_at
+
+# Index
+hoodie.index.type=GLOBAL_RECORD_LEVEL_INDEX
+hoodie.metadata.global.record.level.index.enable=true
+# DURABLE at index initialization. min == max pins the count; a range lets Hudi estimate.
+# Size from projected TABLE-WIDE record count — decision-tables.md → RLI file-group sizing.
+hoodie.metadata.global.record.level.index.min.filegroup.count=
+hoodie.metadata.global.record.level.index.max.filegroup.count=
+
+# Services
+hoodie.compact.inline=true
+hoodie.compact.inline.max.delta.commits=5
+
+hoodie.clean.policy=KEEP_LATEST_BY_HOURS
+hoodie.clean.hours.retained=
+# NOT a fixed 48. At 15-min cadence the safe max is ~5 days (120h); at hourly, ~20 days.
+# A hardcoded 48 silently under-retains on slower cadences.
+#
+# Example below assumes 5-min cadence + 48h cleaner window.
+# Recompute both cleaner and archival for the actual answered cadence.
+
+hoodie.keep.min.commits=634 # 5-min cadence: 288 commits/day × 2 days × 1.1
+hoodie.keep.max.commits=761 # min × 1.2
+
+# Platform
+hoodie.metadata.enable=true
+
+# Concurrency — valid ONLY while exactly one process writes this table, counting
+# backfills, GDPR/cleanup jobs, and any standalone compactor. Any second writer
+# means this line is replaced by the OCC (or NBCC) block for the deployment —
+# see Concurrency section — applied identically in every writing job.
+hoodie.write.concurrency.mode=SINGLE_WRITER
+```
+
+### Sample submit commands
+
+Emit alongside the properties bundle. Parameterize on the derived writer, table type, source class, and operation. **Always distinguish load-bearing flags (derived from design decisions) from environment-specific placeholders (paths, memory, engine/Scala versions) that the flow never asked about.**
+
+#### Cloud bundles are load-bearing — put them in `--packages`
+
+Some derived decisions need a class that is **not** in the Spark or utilities bundle. The config
+is valid without the jar, so nothing complains at submit time: the job starts, runs, and dies at
+the first commit with a `ClassNotFoundException` on a class the properties file names. That is
+the worst shape of failure this skill can emit — correct config that cannot possibly work — so
+the bundle belongs in the emitted `--packages` line, not in prose the user may skim past.
+
+| Derived decision | Class that needs the jar | Add to `--packages` |
+|---|---|---|
+| DynamoDB lock provider (OCC on AWS) | `DynamoDBBasedImplicitPartitionKeyLockProvider` | `org.apache.hudi:hudi-aws-bundle:` |
+| Glue catalog sync | `AwsGlueCatalogSyncTool` | `org.apache.hudi:hudi-aws-bundle:` |
+| BigQuery sync | `BigQuerySyncTool` | `org.apache.hudi:hudi-gcp-bundle:` |
+| DataHub sync | `DataHubSyncTool` | `org.apache.hudi:hudi-datahub-sync-bundle:` |
+| Storage-based lock provider | the per-cloud lock client | the bundle matching the storage scheme |
+
+**`hudi-aws-bundle` covers both AWS cases**, so a design with DynamoDB locking *and* Glue sync
+needs it once, not twice. Say that when both apply — a reader who sees the same jar justified by
+two different decisions may wonder whether they need two.
+
+Two rules when emitting:
+
+- **Every writing job needs it**, exactly like the concurrency block. A backfill job that writes
+ without `hudi-aws-bundle` cannot take the DynamoDB lock — and it will fail rather than write
+ unsafely, which is the good outcome, but only if the operator knows why.
+- Version it with the same `` placeholder as the other bundles. Never pin a
+ concrete version; a mismatched bundle version is its own confusing classpath failure.
+
+Also list these in the ADR's pre-launch checklist → warnings.md → `CLOUD_BUNDLE_REQUIRED`.
+
+#### HoodieStreamer — continuous mode (MOR with free async compaction)
+
+```bash
+spark-submit \
+ --master yarn \
+ --deploy-mode cluster \
+ --class org.apache.hudi.utilities.streamer.HoodieStreamer \
+ --packages org.apache.hudi:hudi-utilities-slim-bundle_:,org.apache.hudi:hudi-spark-bundle_: \
+ --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
+ --conf spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension \
+ --conf spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar \
+ --executor-memory \
+ --num-executors \
+ /path/to/hudi-utilities-slim-bundle_-.jar \
+ --props \
+ --target-base-path \
+ --target-table \
+ --table-type MERGE_ON_READ \
+ --source-class \
+ --schemaprovider-class \
+ --source-ordering-field \
+ --op UPSERT \
+ --continuous \
+ --min-sync-interval-seconds
+```
+
+**Load-bearing:** `--continuous` is what provides in-process async compaction; without it you get run-once batch semantics and MOR log files grow unbounded. `--table-type`, `--op`, `--source-class`, `--schemaprovider-class`, `--source-ordering-field` all come from derived decisions. `--min-sync-interval-seconds` reflects the answered cadence.
+
+**Never suggest `--disable-compaction` on MOR.**
+
+`` is **not** a placeholder for the user to fill in — substitute it when emitting,
+from the table above, or drop it entirely when no cloud bundle is needed. For a design with
+DynamoDB locking or Glue sync it becomes
+`,org.apache.hudi:hudi-aws-bundle:`. Leaving a literal `` in the
+emitted command is a defect: unlike `` or ``, this one is derived, and the user has
+no way to know what belongs there.
+
+**Environment-specific — leave these to the user, deliberately.** Master and deploy mode, memory and executor counts, `` (2.12 or 2.13), `` in the bundle artifact name, ``, and all paths.
+
+The flow does not ask about these and shouldn't: they're facts about the user's build and cluster, not design decisions, and asking would add several infrastructure questions to a design conversation for no design benefit. Emit them as clearly-marked placeholders and say plainly that the user fills them in from their own environment. Don't guess concrete versions — a wrong Scala suffix produces a confusing classpath failure, and a placeholder that looks like a recommendation is worse than one that looks like a blank.
+
+#### HoodieStreamer — run-once (scheduled batch)
+
+Same as above, minus `--continuous` and `--min-sync-interval-seconds`. Schedule externally (cron, Airflow). On MOR without continuous mode, add inline compaction config to the properties file.
+
+#### Spark DataSource
+
+No submit template — the user's own application carries the write. Emit the properties bundle as `.option(...)` calls, plus the required session config.
+
+**The cloud bundle still applies, and is easier to miss here** precisely because there is no
+submit command to hang it on. The user's own `spark-submit` (or `spark-shell` / `spark-sql`)
+invocation needs it, and the skill never sees that command. So state it explicitly rather than
+assuming it carries over from the properties bundle:
+
+```bash
+# Whatever launches your job needs the cloud bundle on the classpath.
+# spark-submit, spark-shell, and spark-sql all take --packages:
+spark-shell \
+ --packages org.apache.hudi:hudi-spark-bundle_:,org.apache.hudi:hudi-aws-bundle: \
+ --conf spark.serializer=org.apache.spark.serializer.KryoSerializer \
+ --conf spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension \
+ --conf spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar
+```
+
+Substitute the bundle from the table above; drop it when the design needs none. For a
+long-running application, the equivalent is a compile-time dependency on the same artifact
+rather than `--packages`.
+
+Batch job:
+```scala
+df.write.format("hudi")
+ .options(hudiOpts) // the properties bundle
+ .mode(SaveMode.Append)
+ .save("")
+```
+
+Continuous job writing from a stream via `forEachBatch`:
+```scala
+sourceStream.writeStream
+ .foreachBatch { (batchDF: DataFrame, _: Long) =>
+ batchDF.write.format("hudi")
+ .options(hudiOpts)
+ .mode(SaveMode.Append)
+ .save("")
+ }
+ .option("checkpointLocation", "")
+ .trigger(Trigger.ProcessingTime(""))
+ .start()
+```
+
+Required session config either way:
+```
+spark.serializer=org.apache.spark.serializer.KryoSerializer
+spark.sql.extensions=org.apache.spark.sql.hudi.HoodieSparkSessionExtension
+spark.kryo.registrator=org.apache.spark.HoodieSparkKryoRegistrar
+```
+
+Note that `forEachBatch` is the DataSource path from Hudi's perspective, not the Structured Streaming sink — the writer derivation is the same for both snippets.
+
+### Mutable fact table (FACT-shape) — Kafka CDC source, date-partitioned, recent-heavy updates, TB-scale
+```
+# Table
+hoodie.table.type=MERGE_ON_READ # experienced → async via HoodieStreamer
+hoodie.datasource.write.recordkey.field=trip_id
+hoodie.datasource.write.partitionpath.field=trip_date
+# meta fields: kept — hoodie.populate.meta.fields defaults to true; emit only when disabling
+
+# Writer
+hoodie.datasource.write.operation=upsert
+hoodie.table.ordering.fields=updated_at
+
+# Index
+hoodie.index.type=RECORD_LEVEL_INDEX
+hoodie.metadata.record.level.index.enable=true
+# DURABLE at index initialization, and PER PARTITION. min == max pins the count.
+# Size from projected PER-PARTITION record count (total / active partitions).
+hoodie.metadata.record.level.index.min.filegroup.count=
+hoodie.metadata.record.level.index.max.filegroup.count=
+
+# Services
+# No compaction config — HoodieStreamer continuous handles async automatically
+
+# COMPACTION TARGET IO TRAP — value is in MB, not bytes
+hoodie.compaction.target.io=104857600 # 100TB in MB — effectively uncapped
+
+hoodie.clean.policy=KEEP_LATEST_BY_HOURS
+hoodie.clean.hours.retained=
+# NOT a fixed 48. At 15-min cadence the safe max is ~5 days (120h); at hourly, ~20 days.
+# A hardcoded 48 silently under-retains on slower cadences.
+#
+# Example below assumes 5-min cadence + 48h cleaner window.
+# Recompute both cleaner and archival for the actual answered cadence.
+
+hoodie.keep.min.commits=634 # 5-min cadence: 288 commits/day × 2 days × 1.1
+hoodie.keep.max.commits=761 # min × 1.2
+
+# Platform
+hoodie.metadata.enable=true
+
+# Concurrency — valid ONLY while exactly one process writes this table, counting
+# backfills, GDPR/cleanup jobs, and any standalone compactor. Any second writer
+# means this line is replaced by the OCC (or NBCC) block for the deployment —
+# see Concurrency section — applied identically in every writing job.
+hoodie.write.concurrency.mode=SINGLE_WRITER
+```
diff --git a/hudi-agent-gateway/skills/hudi-architect/references/decision-tables.md b/hudi-agent-gateway/skills/hudi-architect/references/decision-tables.md
new file mode 100644
index 0000000000000..92b5ed1b2449c
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/references/decision-tables.md
@@ -0,0 +1,874 @@
+
+# Decision tables
+
+Reference for each decision domain. Consult when deriving a design choice from workload answers.
+
+## Engine
+
+Ask, don't default. If user picks Spark or Flink, proceed. If undecided:
+
+**Flink candidate:** append-only workloads with sub-5-minute visibility target AND continuous streaming source.
+
+**Spark default:** everything else.
+
+For mutable workloads at 5-minute visibility, Spark handles cleanly — Flink's advantage doesn't apply.
+
+## Writer
+
+Derived from source + pipeline_shape (see question-flow.md Q2.9).
+
+### Kafka source (special case)
+
+**Default: HoodieStreamer.** Rationale (surface these in dialogue if user asks why):
+- Schema registry integration (Confluent + custom).
+- Format support built-in (AvroKafkaSource, JsonKafkaSource, ProtoKafkaSource).
+- Exactly-once from Kafka (checkpoint stored in Hudi commits).
+- Kafka meta fields propagation.
+- Error table for dead-letter routing.
+- Continuous mode: ingestion + async compaction + async clustering in one Spark job.
+- Transformer chain (SQL-based, custom-class, chained) handles most enrichment and CDC-mapping.
+
+### Kafka source class + schema provider
+
+Derived from the record format answered at Q1.2b. Required — without it the writer decision is incomplete and the bundle cannot name a source class.
+
+| Record format | Source class | Schema provider |
+|---|---|---|
+| Avro + schema registry | `AvroKafkaSource` | `SchemaRegistryProvider` |
+| Avro + schema file | `AvroKafkaSource` | `FilebasedSchemaProvider` |
+| JSON | `JsonKafkaSource` | Optional — file-based or registry if schema is managed |
+| Protobuf | `ProtoKafkaSource` | Proto class on classpath |
+
+Avro on Kafka effectively requires a schema provider. For JSON it is optional but recommended in production — inferred schemas drift silently.
+
+**Reach for Spark DataSource for Kafka only when:**
+- Multi-source complexity (multiple Kafka topics + JDBC lookup + multi-table writes).
+- ML DataFrame-native library work.
+- One-off backfills where a HoodieStreamer job feels heavier than needed.
+
+### In-job DataFrame (derived / silver / gold tables)
+
+When the data is already a DataFrame inside the user's own Spark job — the output of an ETL query, join, or aggregation — the write is `.write.format("hudi")` at the end of that job.
+
+**Writer: Spark DataSource. Not a choice.** HoodieStreamer exists to poll an external source; here there isn't one. Don't present the HoodieStreamer-vs-DataSource tradeoff, and don't ask Q1.2b (no source class, no schema provider).
+
+Consequences to surface:
+
+- **Async compaction isn't free.** HoodieStreamer continuous mode runs compaction in-process; DataSource can't. If the design lands on MOR, the options are inline compaction (blocks commits periodically) or a standalone `HoodieCompactor` job.
+- **The standalone compactor makes this a concurrent-writer deployment** — two processes writing one table. Requires OCC and an identically-configured lock provider in both jobs. See warnings.md → COMPACTOR_CONCURRENCY_REQUIRED.
+- **No submit-command template applies.** The write lives in the user's application; emit the properties as `.option(...)` calls plus the required session config instead.
+- **Q2.9 (pipeline shape) is largely answered already** — it's custom application code. Still worth confirming whether the write sits inside a `forEachBatch` callback (continuous) or a plain batch job, because that changes the integration snippet, not the writer.
+
+### Non-Kafka external sources (DFS, JDBC, another Hudi table, S3/GCS events, Kinesis, Pulsar)
+
+HoodieStreamer and DataSource are co-equal defaults. Choose based on pipeline_shape.
+
+**Schema provider is optional and orthogonal to source type.** Any provider can pair with any source. Many sources infer their schema, and simple pipelines with no expected evolution commonly set none — that's a valid configuration, not a gap. Ask Q1.2c and map the answer: schema files → `FilebasedSchemaProvider`, Hive metastore → `HiveSchemaProvider`, upstream DB → `JdbcbasedSchemaProvider`, registry → `SchemaRegistryProvider`. See config-templates.md for keys.
+
+**Kafka differs in prior, not in mechanism.** Producers and consumers on a topic already need schema coordination, so a registry is usually in place before Hudi arrives. For Kafka, assume a provider exists and ask which one (Q1.2b already does this). For other sources, whether to have one at all is a real question.
+
+```
+if pipeline_shape == "config-driven":
+ → HoodieStreamer
+ mode = "continuous" if continuous ingest declared else "run-once"
+
+elif pipeline_shape == "custom code":
+ → Spark DataSource
+
+elif pipeline_shape == "SQL-centric":
+ → Spark SQL
+
+elif pipeline_shape == "streaming with primitives":
+ Ask: writeStream sink vs forEachBatch
+ - forEachBatch → Spark DataSource
+ - writeStream sink → Ask: stateful primitives needed?
+ - Yes → Spark Structured Streaming
+ - No → nudge toward HoodieStreamer
+```
+
+### Popularity as battle-tested signal
+
+HoodieStreamer + Spark DataSource are the two most-deployed Hudi writer paths — battle-tested, no tuning knobs required, just works out of the box.
+
+Spark SQL: niche, only when user has SQL-only requirement.
+Spark Structured Streaming (writeStream sink): rare, only when company-wide streaming framework OR genuine stateful primitives.
+
+For first-time users on Kafka: HoodieStreamer is the safest first Hudi table. For non-Kafka sources: either HoodieStreamer or DataSource is fine.
+
+## Table type
+
+Derived from mutability + experience + update distribution (for mutable).
+
+| Signals | Derived table type + compaction |
+|---|---|
+| Immutable | COW — silent. Don't show the COW/MOR tradeoff table, and don't ask Q1.6 (experience): with no updates there are no log files to merge, so MOR offers nothing and there's no compaction posture to derive. |
+| Mutable + first-time / fire-and-forget | COW |
+| Mutable + some experience | MOR + inline compaction |
+| Mutable + experienced + writer is HoodieStreamer continuous | MOR + async (free) |
+| Mutable + experienced + writer is DataSource/SQL/Structured Streaming | MOR + async via advanced deployment (standalone compactor) |
+| Mutable + some experience + writer is HoodieStreamer continuous | MOR + async (upgrade for free — bonus from writer choice) |
+
+**Apply the free-async upgrade as soon as the writer is known — do not defer it to the §8.3 checkpoint.**
+
+For Kafka sources the writer is HoodieStreamer by derivation, so this resolves during Round 1 and the upgraded table type should be stated there. Deferring it to §8.3 would hide the upgrade from PROTOTYPING and PRODUCTIONIZING_INITIAL users entirely, since that checkpoint only runs between Rounds 2 and 3 at PRODUCTION_AT_SCALE.
+
+Table type stays genuinely provisional only when the writer is still unknown — non-Kafka sources whose writer is decided by pipeline shape at Q2.9. In that case, revisit table type once Q2.9 lands and surface the upgrade then.
+
+Tradeoff table (in ADR):
+
+| | Copy-on-Write (CoW) | Merge-on-Read (MoR) |
+| ------------------ | --------------------------------------- | -------------------------------------------------------------------------------- |
+| **Write cost** | High — rewrites whole base files | Low — appends log blocks |
+| **Read latency** | Low — reads are plain parquet | Snapshot reads merge base + logs; read-optimized reads skip logs; compaction periodically brings MoR in line with CoW |
+| **Ops surface** | Minimal — no compaction to run | Compaction runs as an ongoing service |
+| **Typical fit** | Batch BI, reference tables, first-time users | Streaming upserts, CDC ingestion, experienced operators |
+
+### Handling workload-vs-experience tension
+
+If mutability + update distribution point toward MOR but user picked fire-and-forget:
+
+> "Your workload signals point toward MOR (mutable + uniform updates at scale = high write amp for COW), but you picked fire-and-forget which typically means COW. Three reconciliations:
+> - (a) Accept COW; ADR flags concrete revisit conditions if write amp materializes.
+> - (b) Step up to MOR with inline compaction. Slightly more per-batch latency, no separate service to deploy.
+> - (c) Keep the workload smaller and rely on the Operations Agent to flag if COW hits a wall.
+>
+> Which matches your priorities?"
+
+## Index
+
+Derived from six signals: engine, mutability, partitioning, partition-column stability, projected table size, key characteristics.
+
+### Decision table
+
+| Index | Write cost | Storage | Scope | Best when | Engine (1.2.0) |
+|---|---|---|---|---|---|
+| **SIMPLE / Global SIMPLE** | O(files listed) per commit | Minimal | Partition or Global | Small tables (<~100M rows), random updates | Spark |
+| **BLOOM / Global BLOOM** | Range prune + bloom check | Bloom filters in MDT | Partition or Global | Sub-1-2TB + monotonic keys | Spark |
+| **Partitioned RLI** | O(1) via MDT hash-shard | ~few % of record count in MDT | Partition (uniqueness within partition) | Any real scale, partition-stable | Spark + Flink |
+| **Global RLI** | O(1) via MDT hash-shard | ~few % of record count in MDT | Global (table-wide uniqueness) | Any scale, unpartitioned or partition-unstable | Spark + Flink |
+| **BUCKET** | O(1) via bucket hash | No MDT partition | Partition-scoped only | Bounded key cardinality + balanced partition sizes | Spark + Flink (Flink dominant) |
+
+### Decision pseudocode
+
+```
+if immutable:
+ → SIMPLE (index cost irrelevant; no tagging happens)
+
+elif engine == "flink":
+ if unpartitioned or partition-unstable:
+ → GLOBAL_RLI (added in 1.2.0)
+ elif partition-stable + key_cardinality_bounded + partition_sizes_balanced:
+ → BUCKET
+ else:
+ → PARTITIONED_RLI
+
+elif engine == "spark":
+ if unpartitioned:
+ if key_cardinality_bounded_and_stable:
+ → BUCKET
+ else:
+ → GLOBAL_RLI
+ elif partitioned + partition-unstable:
+ → GLOBAL_RLI (or GLOBAL_BLOOM if sub-1-2TB + monotonic + cost-sensitive)
+ elif partitioned + partition-stable:
+ if projected_table_size < ~1-2TB:
+ if monotonic_keys: → BLOOM
+ elif key_cardinality_bounded_and_stable + partition_sizes_balanced: → BUCKET
+ else: → SIMPLE (or PARTITIONED_RLI)
+ else (projected >= ~1-2TB):
+ if key_cardinality_bounded_and_stable + partition_sizes_balanced: → BUCKET
+ else: → PARTITIONED_RLI
+```
+
+### BUCKET when to prefer over RLI
+
+- Bounded and predictable key cardinality.
+- Partition sizes roughly balanced.
+- Writer latency tight, MDT record_index sync cost matters.
+- Smaller MDT footprint desired.
+
+### BUCKET fails when
+
+- Key cardinality unbounded or growing (any new-record-generating workload — trips, events, orders, logs).
+- Skewed partition sizes → recommend RLI/Partitioned RLI (do NOT recommend CONSISTENT_HASHING at design time; niche escape hatch).
+
+### BLOOM caveats
+
+- Effective sub-1-2TB only.
+- `hoodie.bloom.index.use.metadata=true` is experimental at 1.2.0 — do NOT recommend at design time.
+
+### Async-buildable framing
+
+Most index decisions are no longer durable at table creation. RECORD_INDEX (both variants), BLOOM (experimental), col stats, secondary index, expression index — all buildable async on live tables using HoodieIndexer, no rewrite needed.
+
+**Two durability exceptions:**
+
+1. **BUCKET** — bucket count fixed at creation.
+2. **RLI file-group count** — fixed when the record index is *initialized*. Adding an RLI later is free; **resizing an initialized one is not possible without a table rewrite.** See "RLI file-group sizing" below.
+
+The distinction matters: "index is async-buildable" is true about *adding* an index and false about *resizing* one. Do not tell users the RLI is a fully reversible choice.
+
+Design implication: for smaller mutable tables, recommend lighter index (SIMPLE) with ADR note that RLI can be added later without rewrite. Avoid over-engineering.
+
+### RLI file-group sizing (PRODUCTION_AT_SCALE — durable decision)
+
+Hudi derives the RLI file-group count when the index is initialized, from the records present at that moment multiplied by a growth factor (`hoodie.metadata.record.index.growth.factor`, default **2.0**). That assumes the table is already fully loaded. A table that bootstraps small and then grows repeatedly gets an index sized for its infancy, permanently.
+
+**The count is pinned only when `min == max` (both non-zero).** Otherwise Hudi estimates from record count × growth factor and clamps into the min/max window — i.e. a range hands the decision back to Hudi.
+
+**Config keys — four of them, two per variant. Use the modern keys:**
+
+| Index | Key | Default | Scope |
+|---|---|---|---|
+| Global RLI | `hoodie.metadata.global.record.level.index.{min,max}.filegroup.count` | 10 / 10000 | Table-wide |
+| Partitioned RLI | `hoodie.metadata.record.level.index.{min,max}.filegroup.count` | 1 / 10 | **Per partition** |
+
+`hoodie.metadata.record.index.{min,max}.filegroup.count` are deprecated aliases for the **global** properties. Do not use them for partitioned RLI.
+
+**Sizing formula:**
+
+```
+bytes_per_rli_record = 50 # safe starting point; assumes UUID-shaped record keys
+shard_size_mb = 500
+file_group_count = (projected_record_count * bytes_per_rli_record) / 1024 / 1024 / shard_size_mb
+```
+
+- **Global RLI** — apply to the projected table-wide record count.
+- **Partitioned RLI** — apply to the projected *per-partition* record count (projected total / projected active partition count), because the config is per partition.
+- Size for the 3-4 year projection, not today. Under-sizing is unfixable; over-sizing costs little.
+- 50 bytes assumes UUID-shaped keys. Longer record keys mean a larger per-record RLI footprint — scale the constant and say so in the ADR.
+
+Worked example: 40B projected records → `(40_000_000_000 × 50) / 1024 / 1024 / 500` = **3815 file groups**; round up to **3900** for headroom (over-sizing costs little). Emit `min = max = 3900`.
+
+**Why the defaults are a trap.** Partitioned RLI defaults to `min=1, max=10`. With a 1GB max file-group size and 50-byte records, one file group holds ~21.5M records, so a partition needs ~215M projected records before the estimate even reaches the ceiling of 10. Below that it silently under-sizes.
+
+**When the user cannot project record count:**
+
+Recommend they land the **first commit / bulk load with RLI disabled**, then enable it (async build via `HoodieIndexer`, no rewrite). The estimator then sees a truthful record count instead of a near-empty first commit.
+
+This fixes the *bootstrap* problem, not the *growth* problem — the estimator still applies growth factor 2.0 to whatever exists at initialization, so it sizes for today × 2. For a fast-growing table that headroom is consumed quickly and the count is already frozen. Consider raising `hoodie.metadata.record.index.growth.factor` above 2.0, and record a measurable revisit condition: if record count approaches `initial_count × growth_factor`, the RLI is undersized and only a rewrite fixes it.
+
+## Partitioning
+
+Query-alignment-first, not size-first.
+
+### Rule engine flow
+
+1. If consumer reads filter on natural low-cardinality dimension → partition by that dimension.
+2. If consumer reads filter on time (recent-N-day scans, incremental) → partition by date.
+3. If consumer reads are scan-heavy or point-lookup (no partition-aligned filter) → consider unpartitioned (subject to size threshold).
+
+### Projected partition count guardrails
+
+Formula: `projected_partition_count = cardinality(business_dimension) × time_buckets_over_table_lifetime`
+
+Time buckets accumulate over the table's **lifetime**, projected to the 2-3 year horizon — not over the retention window. Retention governs timeline lookback (see → Retention), not how many date partitions exist on disk; date partitions are only ever added, never expired by the cleaner.
+
+For date-only: `cardinality = 1`, `time_buckets = days (or months) from first commit to the projection horizon` (daily × 3 years ≈ 1095 — matches the ADR example).
+For composite `/`: multiply.
+
+- **Green: < 10K partitions** — proceed.
+- **Yellow: 10K – 50K** — warn (see warnings.md → PROJECTED_PARTITION_COUNT_YELLOW).
+- **Red: > 50K** — reject (see warnings.md → PROJECTED_PARTITION_COUNT_RED).
+
+### Time granularity default
+
+- **Daily** — default. Recent-N-day read patterns align.
+- **Monthly** — when daily pushes into yellow/red.
+- **Hourly** — rarely recommended. Only when volume >~10GB/hour and consumers explicitly need hourly pruning.
+
+### Immutable raw layer
+
+Default to **ingestion-time partitioning**, not event-time. Raw layer consumers ask "give me new data in the last N hours" — ingestion-time question. Raw doesn't apply business logic.
+
+Override to event time if:
+- User explicitly names event-time-filtered downstream reads as dominant.
+- Raw layer is unusual with strong event-time semantic upstream.
+
+### Unpartitioned viability
+
+Viable when both hold:
+- Total table stays under ~500GB at 2-3 year horizon.
+- Consumer read pattern is point-lookup / join / full-scan (not filtered on natural partition dimension).
+
+For point-lookup-dominated workloads with growing key set (like unpartitioned DIM tables), unpartitioned + Global RLI works up to larger sizes (~2TB+) because RLI keeps lookup cost bounded.
+
+Above threshold → partition, even if no natural business filter. Fallback: partition by date-derived column with daily granularity.
+
+## Small-files posture (immutable only)
+
+Three postures — user picks (see question-flow.md Q2.8).
+
+### Recommendation prose adapts to two axes
+
+**Partition cardinality:**
+- Low-card (date-only) → any posture viable.
+- High-card (composite business dim) → posture (c) recommended.
+
+**Future-consumers axis:**
+- Closed universe (all silver consumers exist today) → any posture viable.
+- Open universe (new silver pipelines may spin up 6+ months later) + terabytes → (b) or (c) required; (a) becomes warning.
+
+### Matrix
+
+| Scenario | Recommended posture |
+|---|---|
+| Low-cardinality partition + closed-universe + <500GB | (a) or (b) viable |
+| Low-cardinality partition + open-universe or terabytes | (b) — clustering handles async |
+| High-cardinality partition | (c) — every batch fans across many partitions; inline small-file handling per file group pays off |
+
+## Retention
+
+Time-travel + incremental lookback window. NOT record lifetime.
+
+### Cleaner policy selection
+
+- Continuous ingest → `KEEP_LATEST_BY_HOURS`.
+- Scheduled batch → `KEEP_LATEST_COMMITS`.
+- **NEVER `KEEP_LATEST_FILE_VERSIONS`** — operates at file-group level, savepoint interaction awkward, archival can't make progress cleanly.
+
+### Commit-cadence-aware retention default
+
+Timeline latency degrades past ~5K entries; practical target ~1000.
+
+Formula (COW baseline):
+```
+base_entries_per_commit = 6 # 3 ingestion + 3 cleaner
+if MOR + async compaction: adjust += 3 / compaction_cadence_commits # typically +0.6
+if async clustering: adjust += 3 / clustering_cadence_commits # typically +0.6
+entries_per_commit = base_entries_per_commit + adjust
+
+commits_per_day = 1440 / commit_cadence_minutes
+timeline_entries_per_day = commits_per_day * entries_per_commit
+```
+
+### Safe defaults by commit cadence (COW baseline, cleaner retained = 500)
+
+| Commit cadence | Safe max retention | Wall-clock lookback |
+|---|---|---|
+| 5 min | ~500 commits | ~1.7 days |
+| 10 min | ~500 commits | ~3.5 days |
+| 15 min | ~500 commits | ~5 days |
+| 30 min | ~500 commits | ~10 days |
+| 60 min | ~500 commits | ~20 days |
+
+### Sub-5-minute cadence
+
+If computed safe retention < 1 day (e.g., 1-min cadence):
+
+> "At 1-minute cadence, safe retention drops below 1 day. As a best practice, stabilize a 5-minute cadence pipeline first before attempting sub-5-min ingest."
+
+Not a hard block — user can proceed.
+
+## Cleaner + archival config (inline autopilot)
+
+Emit silently. No user question about cadence.
+
+```
+# Automatic inline cleaning and archival are Hudi defaults — emit no on/off switches.
+# (hoodie.clean.automatic, hoodie.clean.async.enabled, hoodie.archive.automatic,
+# hoodie.archive.async, hoodie.commits.archival.batch all already default to the desired values.)
+hoodie.clean.policy=
+hoodie.clean.hours.retained OR hoodie.clean.commits.retained=
+
+hoodie.keep.min.commits=
+hoodie.keep.max.commits=
+```
+
+**Archival window derivation — from commit cadence, never a constant.**
+
+Archival must outlast the cleaner. If instants are archived while the cleaner still treats those file versions as live, incremental and time-travel readers lose the timeline entries they depend on. So the window is always the cleaner window plus a margin.
+
+```
+commits_per_day = 1440 / commit_cadence_minutes
+cleaner_commits = commits_per_day × cleaner_retention_days
+ (or cleaner.commits.retained directly, when the policy is KEEP_LATEST_COMMITS)
+
+keep.min.commits = max(100, ceil(cleaner_commits × 1.1)) # cleaner window + ~10% margin
+keep.max.commits = ceil(keep.min.commits × 1.2)
+```
+
+**At daily cadence or slower, emit nothing.** Don't set cleaner or archival config at all — leave Hudi's out-of-the-box defaults in place. A table committing once a day accumulates timeline entries so slowly that the active timeline is nowhere near its limits, and there is nothing for us to protect it from. Overriding here adds config surface for no benefit.
+
+The floor of 100 covers the middle ground, where derivation produces a number small enough to make look-back impractical but the cadence is still fast enough that the defaults aren't a good fit.
+
+Worked values at a 48h cleaner window:
+
+| Cadence | commits/day | Cleaner commits | +10% | `keep.min.commits` | `keep.max.commits` |
+|---|---|---|---|---|---|
+| 5 min | 288 | 576 | 634 | **634** | 761 |
+| 15 min | 96 | 192 | 211 | **211** | 253 |
+| 1 hour | 24 | 48 | 53 | **100** (floor) | 120 |
+| Daily or slower | ≤1 | — | — | **emit nothing** | **emit nothing** |
+
+This replaces the older `2 × cleaner.commits.retained` rule. The +10% relationship applies uniformly, whichever cleaner policy is in force.
+
+Same principle as not emitting `hoodie.metadata.index.column.stats.enable=false`: config that restates a default is noise. Emit what changes behavior.
+
+**Never emit a fixed 1000 / 1200.** The active-timeline target is ~1000 entries; an archival floor at 1000 leaves no headroom above the number it exists to protect.
+
+**Bucketization note:** archival bucketizes by instant type — ingestion commits and table-service commits (clean, compaction, clustering, rollback) are tracked separately with their own thresholds. `keep.min.commits` governs the ingestion bucket. The ~6-entries-per-commit figure behind the active-timeline math is the combined count across buckets, which is why the window can be sized off ingestion commits without the timeline overrunning.
+
+**Archival bucketization:** archival bucketizes by instant type. Two buckets: ingestion commits and table-service commits. Each has its own min/max threshold. 2x ratio holds because per-bucket accounting keeps combined active timeline bounded.
+
+## Compaction (MOR only)
+
+Derived from writer + experience.
+
+| Writer | Compaction mode |
+|---|---|
+| HoodieStreamer continuous | Async in-process, automatic. **No config emitted.** |
+| Spark Structured Streaming (writeStream sink) | Inline default; async via `hoodie.datasource.compaction.async.enable=true` if experienced. |
+| Spark DataSource | Inline default. Async requires standalone `HoodieCompactor` (advanced deployment). |
+| Spark SQL | Same as DataSource. |
+
+For inline:
+```
+hoodie.compact.inline=true
+hoodie.compact.inline.max.delta.commits=5
+hoodie.compact.inline.trigger.strategy=NUM_COMMITS
+```
+
+### Compaction target IO trap
+
+`hoodie.compaction.target.io` defaults to **500GB per round**. At TB-scale MOR, file groups accumulate uncompacted → log files grow forever → read latency degrades.
+
+If projected size ≥ 1TB with MOR → surface ADR flag: "Bump `hoodie.compaction.target.io` to 2-5TB."
+
+## Clustering
+
+Off by default. Fires only when user asks or when workload signals strongly suggest benefit.
+
+**When Architect surfaces clustering:**
+- Immutable + small-files posture (b) — clustering is on the path by choice.
+- MOR + async services + workload signals suggest fragmentation over time.
+
+**When enabled:**
+```
+hoodie.clustering.async.enabled=true
+hoodie.clustering.async.max.commits=5
+hoodie.clustering.plan.strategy.small.file.limit=300MB
+hoodie.clustering.plan.strategy.target.file.max.bytes=1GB
+hoodie.table.services.incremental.enabled=true # 1.2.0 win
+```
+
+## Concurrency (writer count → mode → lock provider)
+
+Derived from the writer inventory (question-flow.md Q3.1), the derived table type, and the
+derived index. Nothing here is asked twice — mode and NBCC eligibility fall out of facts the
+flow already holds.
+
+**`hoodie.write.concurrency.mode` is not durable** — it can be changed on a running table.
+What *is* durable is the bucket count that makes NBCC possible at all (see → Index,
+"Two durability exceptions"). So NBCC eligibility is effectively decided at table creation
+even though the mode itself is switchable. Say that in the ADR rather than implying the mode
+is a one-way door.
+
+### Step 1 — mode
+
+A "writer" is any process that commits to the table. Table services count **only** when they
+run as their own job: inline services and async services running *in the same process as a
+writer* are not a second writer.
+
+| Writers | Table type + index | Mode | Why |
+|---|---|---|---|
+| 1, inline or in-process services | any | `SINGLE_WRITER` | Default. Maximum throughput, no lock overhead. |
+| 1 writer + async services **in the writer's process** | any | `SINGLE_WRITER` | Table services stay lock-free while they share a writer's process. |
+| 1 writer + **standalone** service job (e.g. `HoodieCompactor`) | any | **OCC** | Two processes commit → see warnings.md → `COMPACTOR_CONCURRENCY_REQUIRED`. |
+| ≥2 ingestion writers | anything other than MOR + BUCKET | **OCC** | NBCC is ineligible; OCC is the general answer. |
+| ≥2 ingestion writers | MOR + BUCKET, **already derived independently** | **NBCC** offered as default, OCC as the stated alternative | Writers append to their own log files; conflicts resolved by reader and compactor, no lock contention. |
+| ≥2 writers **and** clustering is wanted | any | **OCC** | NBCC does not support clustering. |
+
+**OCC is the default recommendation for multi-writer.** NBCC is surfaced only when the user
+asks for it by name, or when the workload has *already* landed on MOR + BUCKET for its own
+reasons. **Never steer table type or index toward NBCC** — a bucket count is durable and a
+concurrency mode is not, so trading a reversible decision for an irreversible one is backwards.
+
+### Step 2 — NBCC eligibility (hard gate, verified in source)
+
+`HoodieWriteConfig` validation requires **MOR table _and_ simple bucket index** (or the
+metadata table). `CommonClientUtils` additionally rejects NBCC on table version < 8.
+
+```
+nbcc_eligible = (table_type == MERGE_ON_READ)
+ and (index == BUCKET) # engine SIMPLE — see note
+ and (table_version >= 8) # 1.0+ tables
+ and (clustering not required)
+```
+
+`hoodie.index.bucket.engine` defaults to `SIMPLE`, and this rubric never recommends
+`CONSISTENT_HASHING` at design time (see → Index). So **whenever the flow derives BUCKET, the
+engine is SIMPLE** and the index half of the gate is satisfied. Do not ask a separate engine
+question to establish it.
+
+If the user asks for NBCC and the gate fails → warnings.md → `NBCC_INELIGIBLE`. Refuse the
+mode, not the session: emit OCC and record why.
+
+### Step 3 — lock provider (OCC; also NBCC where a lock is still wanted)
+
+Two axes decide this: **maturity first, then lock-identity safety.**
+
+**Maturity outranks convenience.** A lock provider is the thing standing between two writers and
+a silently corrupted table, so it is the wrong place to be an early adopter. Provider ages differ
+by years:
+
+| Provider | Available since | Production exposure |
+|---|---|---|
+| ZooKeeper, Hive Metastore, filesystem | 0.8.0 | Years |
+| DynamoDB | 0.10.0 | Years |
+| **Storage-based** | **1.0.2** | **Recent — see caution below** |
+
+**Prefer the implicit-identity variants.** Both DynamoDB and ZooKeeper ship two variants: one
+that derives the lock identity from `hoodie.base.path` (xxHash-64, with `s3a://` normalized to
+`s3://`), and one that reads it from operator-supplied config. The implicit variants make
+`LOCK_PROVIDER_MISMATCH` unrepresentable — same table means same base path means same lock —
+and they remove durable strings that would otherwise have to match by hand across every
+writing job.
+
+| Deployment | Provider class (emit verbatim) | Required keys |
+|---|---|---|
+| **AWS** — *default on AWS* | `org.apache.hudi.aws.transaction.lock.DynamoDBBasedImplicitPartitionKeyLockProvider` | `hoodie.write.lock.dynamodb.table`, `hoodie.write.lock.dynamodb.region` |
+| **Existing ZooKeeper quorum** | `org.apache.hudi.client.transaction.lock.ZookeeperBasedImplicitBasePathLockProvider` | `hoodie.write.lock.zookeeper.url`, `hoodie.write.lock.zookeeper.port` |
+| **Hive ecosystem** | `org.apache.hudi.hive.transaction.lock.HiveMetastoreBasedLockProvider` | `hoodie.write.lock.hivemetastore.database`, `hoodie.write.lock.hivemetastore.table` |
+| **Single process only** (multiple threads, one JVM) | `org.apache.hudi.core.transaction.lock.InProcessLockProvider` | none |
+| Cloud storage, no existing lock infrastructure | `org.apache.hudi.client.transaction.lock.StorageBasedLockProvider` | none beyond the matching cloud bundle — **read the caution below before recommending** |
+| **Local / testing only** | `org.apache.hudi.client.transaction.lock.FileSystemBasedLockProvider` | `hoodie.write.lock.filesystem.path` |
+
+**Selection order:**
+
+1. **On AWS → DynamoDB.** The default. Hudi creates the lock table automatically if absent, so
+ setup is modest: a table name, a region, and IAM permissions on it for every writing job.
+2. **Existing ZooKeeper quorum or Hive Metastore → use it.** No new dependency, and both are
+ long-standing providers.
+3. **Neither, and not on AWS (GCS / Azure / on-prem object storage) → ask, do not assume.**
+ Present storage-based with its maturity caution alongside the cost of standing up ZooKeeper,
+ and let the user decide. This is a genuine tradeoff, not a derivable answer.
+
+### Storage-based provider — maturity caution
+
+`StorageBasedLockProvider` arrived in **1.0.2** (2025). It is appealing — it locks under the
+table's own path, so there is no infrastructure to stand up and no lock identity to keep in
+sync — but it is years younger than every other provider here, and it is not a thin wrapper:
+it implements lease renewal with a heartbeat plus per-cloud lock clients. That is precisely
+the kind of code whose interesting failure modes show up under real contention, clock skew,
+and partial cloud outages rather than in tests.
+
+**Do not recommend it as the default.** Surface it when the user is on cloud storage with no
+existing lock infrastructure and would otherwise have to stand up ZooKeeper for one table —
+and when you do, say plainly that it is newer and less battle-tested than the alternatives, so
+the choice is theirs to make knowingly. If the user asks for it directly, emit it; note the
+maturity point once and record it in the ADR rather than arguing.
+
+Revisit as it accumulates production mileage — the zero-infrastructure story is genuinely the
+best of the options, and this caution is about age, not about a known defect.
+
+**Two provider notes worth stating before an operator asks:**
+
+- `InProcessLockProvider` moved package (`org.apache.hudi.client.transaction.lock` →
+ `org.apache.hudi.core.transaction.lock`). The old class is kept as a deprecated shim, and
+ published docs still cite it. Emit the `core` FQCN.
+- `ZookeeperBasedImplicitBasePathLockProvider` derives its ZK base path as `/tmp/`. That
+ is a **znode path, not a filesystem path** — it is not on any disk and is not tunable. Say so
+ in the ADR, because it reliably looks like a bug in config review, and "fixing" it by
+ switching to the explicit provider reintroduces the mismatch risk this table exists to avoid.
+
+**When to override to an explicit provider.** Only two real reasons:
+several tables that should intentionally share one lock, or an existing deployment whose lock
+identity you must match. Both are deliberate acts, not defaults. Choosing
+`ZookeeperBasedLockProvider` or `DynamoDBBasedLockProvider` adds
+`hoodie.write.lock.zookeeper.base_path` + `hoodie.write.lock.zookeeper.lock_key`, or
+`hoodie.write.lock.dynamodb.partition_key`, and those values must then match **exactly** in
+every writing job → warnings.md → `LOCK_PROVIDER_MISMATCH`.
+
+`FileSystemBasedLockProvider` is **not for production and is not supported on cloud storage**
+→ warnings.md → `FILESYSTEM_LOCK_UNSAFE`.
+
+### Step 4 — what not to emit
+
+Emitting these is at best noise and at worst a correctness bug:
+
+| Config | Why not |
+|---|---|
+| `hoodie.write.lock.conflict.resolution.strategy` | **Auto-infers** to the bucket-index strategy when index type is BUCKET, and to the simple strategy otherwise. Hand-setting it is how bucket-index conflict handling gets silently broken. |
+| `hoodie.write.concurrency.early.conflict.detection.enable` | Experimental (0.13.0), OCC-only, defaults false. Mention as an option for high-contention OCC; do not emit. |
+| `hoodie.write.num.retries.on.conflict.failures` | Defaults 0. A contention-tuning knob — Operations Agent territory, not design time. |
+
+`hoodie.clean.failed.writes.policy=LAZY` is the one exception: it is **auto-inferred** for any
+multi-writer mode, so emitting it is not strictly required, but emit it anyway with a comment
+saying so. It documents intent, and an explicitly-set `EAGER` is a hard config validation
+failure — worth making visible rather than invisible.
+
+## Meta-fields
+
+For mutable: silent default — keep all meta fields. No user question.
+
+For immutable + record size ≤1KB: prompt (see question-flow.md Q2.7).
+
+Rule engine mapping:
+
+**At 1.2.0 the rule is simple: any incremental or CDC consumer → keep all meta fields.** Record size doesn't change this. The config is all-or-nothing and incremental queries require `_hoodie_commit_time`, so there is no middle option to trade storage against.
+
+| Record size | Incremental / CDC needed? | Recommendation |
+|---|---|---|
+| any | **Yes** | **Keep all meta fields — no alternative at 1.2.0.** Note the storage cost in the ADR. |
+| >1KB or unknown | No | Keep all — overhead is rounding error |
+| 200B–1KB | No | Keep all — saving is marginal at this size |
+| <200B | No | Offer disable-entirely |
+
+Only the last row is a real decision. Everything else is determined.
+
+### Selective mode is not available at 1.2.0
+
+At **1.2.0**, `hoodie.populate.meta.fields` is a boolean — all meta fields or none. Do not offer a selective option; there is no config to emit for it.
+
+**Coming after 1.2.0** (apache/hudi#19205, targeting 1.3.0, not yet merged): `hoodie.meta.fields.mode`, a comma-separated list of meta columns to populate when `hoodie.populate.meta.fields=false`. Allowed tokens are `_hoodie_commit_time` and `_hoodie_file_name`.
+
+| `populate.meta.fields` | `meta.fields.mode` | Effective mode |
+|---|---|---|
+| `true` (default) | ignored | ALL |
+| `false` | empty | NONE |
+| `false` | `_hoodie_commit_time` | COMMIT_TIME_ONLY |
+| `false` | `_hoodie_file_name` | FILE_NAME_ONLY |
+| `false` | both | COMMIT_TIME_AND_FILE_NAME |
+| `true` | non-empty | rejected at writer init |
+
+When that lands, COMMIT_TIME_ONLY becomes the balanced middle for small-record append-only tables — it preserves incremental queries while dropping the other four fields. Constraints to respect when adding it: **CoW only** (MoR rejected at writer init pending a follow-up), **Spark only** (Flink RowData and Java client rejected), and **immutable at table creation** (settable only at init, via hudi-cli, or during upgrade). Pre-1.3.0 readers see such a table as NONE.
+
+Until it ships in a release the Skill targets, the choice remains binary.
+
+### What disabling actually costs
+
+Hudi's config documentation: *"When disabled, no meta fields are populated and incremental queries will not be functional. This is only meant to be used for append only/immutable data for batch processing."*
+
+Treat incremental queries as **unavailable**, not degraded. An earlier version of this file claimed they fall back to a slower snapshot-read + filter path and remain "still functional" — that is wrong, and it is the kind of error that produces a table needing a rewrite to fix.
+
+**Hard gate:** if any consumer is incremental or streaming, don't offer the disable option. Keep meta fields and record the storage cost in the ADR.
+
+**Framing:** state the cost plainly. Disabling is a legitimate choice for append-only batch data with a closed, non-incremental consumer set — and a trap for anything else.
+
+### Mutual exclusion with auto-gen
+
+Auto-gen keys require `_hoodie_record_key` materialized. Two coherent immutable presets:
+- User-provided natural key + disable meta fields entirely → max storage saving.
+- Auto-gen key + keep meta fields → efficient ingest, no stable identity.
+
+## Read behavior
+
+Rule engine mapping from consumer-read-pattern answer to Hudi query type:
+
+| Consumer behavior | Hudi query type |
+|---|---|
+| Bulk analytical | Snapshot |
+| Targeted lookups on record key | Snapshot with RLI-driven file skipping |
+| Targeted lookups on non-key column | Snapshot with secondary index (surfaces as ADR flag) |
+| Streaming / incremental | Incremental query |
+| Read-optimized-tolerant + latency-sensitive on MOR | Read-optimized query |
+| Change data capture | CDC query |
+
+Query type is derived, not asked.
+
+## Catalog / metastore sync
+
+Derived from **which engines query the table**, not from a preference. A Hudi table on storage
+is invisible to Trino, Athena, Presto, Redshift Spectrum, BigQuery, or a Hive-based reader
+until it is registered somewhere those engines look. Spark and Flink can read a Hudi table by
+path with no catalog at all, so a Spark-only pipeline may legitimately need none.
+
+**Ask what reads the table, then derive.** Never ask "do you want Hive sync?" — that is a Hudi
+question. Ask which query engines and BI tools consume the table, which is a workload fact.
+
+### Step 1 — does the user want a catalog at all?
+
+**Ask before deriving.** question-flow.md → Q2.1a gates this whole section: a plain question about
+whether anything needs to find the table by name, asked before storage or engines. Many tables
+need no catalog — Spark-only pipelines, intermediate tables in a chain, anything whose consumers
+all read by path. A "no" closes the section and emits nothing.
+
+Only derive when the user says they are unsure:
+
+| Consumers | Catalog needed |
+|---|---|
+| Spark or Flink only, reading by path | **No.** Emit nothing. Say so explicitly rather than leaving it unstated. |
+| Spark SQL with a managed catalog, or anything Hive-based | **Yes** — HMS |
+| Trino, Presto, Athena, Redshift Spectrum | **Yes** — HMS, or Glue on AWS |
+| BigQuery | **Yes** — BigQuery sync (separate mechanism) |
+| A data-discovery tool (DataHub and similar) | **Optional, and additive** — see Step 4 |
+
+Sync is off by default. Nothing below is emitted unless the user wants it or a named consumer
+requires it.
+
+**Catalog sync is not a durable decision.** It can be enabled later against a live table: run the
+standalone sync tool once to register it, then add the properties so subsequent commits keep it
+current. Nothing is rewritten. Say this whenever the user declines or defers — it is the fact that
+makes "no" a cheap answer rather than a risky one.
+
+The exception, and the only reason to act now for a maybe-later table: **BigQuery sync requires
+hive-style partitioning, which IS fixed at table creation.** So a table that might later be read
+from BigQuery should set `hoodie.datasource.write.hive_style_partitioning=true` today even with no
+sync configured. Raise this only on GCS or when the user hints at a future BigQuery consumer.
+
+### Step 2 — which catalog
+
+**HMS is the common answer, and Glue is the common answer on AWS.** Lead with those two;
+treat everything else as reached only when the user names it.
+
+| Catalog | Sync tool class | When |
+|---|---|---|
+| **Hive Metastore** | `org.apache.hudi.hive.HiveSyncTool` (default — no tool class config needed) | The default. Any Hive-based or Trino/Presto reader. |
+| **AWS Glue Data Catalog** | `org.apache.hudi.aws.sync.AwsGlueCatalogSyncTool` | AWS environments, especially with Athena or EMR. Piggybacks on the Hive sync configs. |
+| **BigQuery** | `org.apache.hudi.gcp.bigquery.BigQuerySyncTool` | GCP, BigQuery as the query engine. Own config namespace, own constraints — see Step 3. |
+| **DataHub** | `org.apache.hudi.sync.datahub.DataHubSyncTool` | Discovery and governance only. **Not a query path** — see Step 4. |
+| **Polaris** | via `spark.sql.catalog.=org.apache.polaris.spark.SparkCatalog` | Only when the user already runs Polaris. Since Hudi 1.1.1 / Polaris 1.3.0, and Polaris is incubating — newer than the rest, so say so. |
+
+Multiple sync tools can run together — comma-separate them in
+`hoodie.meta.sync.client.tool.class`. That is the normal shape for "HMS for queries, DataHub
+for discovery."
+
+### Step 3 — the constraints worth stating before they bite
+
+**HMS sync mode.** Three modes; `hms` talks Thrift to the metastore directly and is the one to
+recommend. `jdbc` goes through HiveServer2. `hiveql` executes DDL as HQL and is the weakest
+option — the docs themselves note it is mostly for DML rather than DDL. Recommend `hms` unless
+the user's environment forces otherwise.
+
+**Partition extractor must match the partitioning.** This is the most common way a sync
+succeeds and then produces a table nobody can query correctly:
+
+| Table partitioning | Extractor |
+|---|---|
+| Unpartitioned | `org.apache.hudi.hive.NonPartitionedExtractor` (inferred from partition-field config) |
+| Hive-style (`col=value`) | `org.apache.hudi.hive.HiveStylePartitionValueExtractor` (inferred when hive-style partitioning is on) |
+| One or more plain partition fields | `org.apache.hudi.hive.MultiPartKeysValueExtractor` (default) |
+| `TimestampBasedKeyGenerator` producing `yyyy/MM/dd` | `org.apache.hudi.hive.SinglePartPartitionValueExtractor` — extracts one `yyyy-MM-dd` value rather than three |
+
+Most cases are inferred. The one that is not, and that the rubric must catch, is the
+timestamp-based `yyyy/MM/dd` case → warnings.md → `PARTITION_EXTRACTOR_MISMATCH`.
+
+**MOR syncs two tables, not one.** A MOR table registers as `_ro` (read-optimized, base
+files only) and `_rt` (real-time, merges log files). Consumers must know which one to
+query: `_ro` is cheaper and staler, `_rt` is current and slower. If the design is MOR and a
+catalog is in play, name both in the ADR — a consumer pointed at the wrong suffix sees either
+stale data or unexpected latency, with no error either way.
+
+**BigQuery is read-optimized in practice.** The sync tool accepts both COW and MOR, but its
+manifest lists **base files only** — so a MOR table syncs successfully and BigQuery then reads
+it without merging log files. That is read-optimized semantics, not a failure, and it is worth
+stating plainly rather than letting a user infer snapshot freshness they will not get. BigQuery
+sync also requires hive-style partitioning
+(`hoodie.datasource.write.hive_style_partitioning=true`), and the manifest-based path
+(`hoodie.gcp.bigquery.sync.use_bq_manifest_file=true`) is preferred over the legacy
+view-over-files approach on both cost and performance.
+
+**Glue versions on every commit by default.** `hoodie.datasource.meta_sync.condition.sync`
+defaults to `false`, so every commit writes a new catalog version. At a 15-minute cadence that
+is ~96 versions a day for a table whose schema never changed. Set it to `true` to sync only on
+schema or partition change → warnings.md → `GLUE_SYNC_VERSION_CHURN`.
+
+**Sync failure is not write failure, by default.** The write commits and the catalog silently
+falls behind, so readers see a stale schema with nothing failing. Treat catalog staleness as a
+thing to monitor, not something the writer will report — this belongs in the ADR's operational
+playbook.
+
+### Step 4 — DataHub is not a query path
+
+`DataHubSyncTool` pushes metadata to DataHub over REST for discovery, lineage, and governance.
+It does **not** register the table anywhere a query engine will find it. A user who says "we
+use DataHub as our catalog" and needs Trino to query the table needs **both** DataHub and HMS.
+Say this explicitly — the word "catalog" covers both meanings and conflating them produces a
+table that is documented but unqueryable.
+
+### Step 5 — Iceberg or Delta readers: mention Apache XTable, don't configure it
+
+**No question for this, and no config emitted.** Raise it only when the user's own answers make
+it relevant — they name an Iceberg or Delta consumer, ask about cross-format interoperability, or
+mention a team standardized on another format. Otherwise stay silent; volunteering a
+cross-format tool to someone who never asked is noise.
+
+**What to say when it does come up:**
+
+> "If Iceberg or Delta readers need this table, you don't have to pick a format or maintain a
+> second copy — Apache XTable translates the metadata so the same data files can be read as
+> Hudi, Iceberg, or Delta. It writes format-specific metadata alongside your table and never
+> copies or rewrites the data.
+>
+> It's a separate tool rather than a Hudi config, so it runs after your writes — either as a
+> standalone job or as a post-commit step on HoodieStreamer. Worth reading their docs before
+> committing to it: https://xtable.apache.org and
+> https://github.com/apache/incubator-xtable, plus Hudi's own page at
+> https://hudi.apache.org/docs/syncing_xtable."
+
+**The one design-time coupling worth stating, because it is durable:** the XTable FAQ
+(xtable.apache.org) lists **"Hudi and Iceberg MoR tables not supported"** — Copy-on-Write only.
+Attribute it that way rather than asserting it flatly: the claim appears on their FAQ but not in
+the repo README, and this skill cannot verify it against code the way it verifies Hudi's own
+behavior. Tell the user to confirm it against XTable's current docs, since an incubating project's
+support matrix moves.
+
+If it holds, the implication is real: a workload needing Iceberg or Delta interoperability should
+probably be **CoW**, and table type *is* fixed at creation. If the design has landed on MOR and the user then raises XTable, name the
+conflict rather than leaving them to discover it: they can keep MOR and drop XTable, or choose
+CoW to keep the option open. Do not silently reshape the table type — surface the tension and let
+them decide, as with any durable decision.
+
+**Everything else is a hand-off, deliberately.** Do not emit `hoodie.onetable.*` properties, a
+YAML dataset config, or the `hudi-extensions` bundle coordinate. Three reasons, worth being
+explicit about:
+
+- Those keys are defined in **XTable's** codebase, not Hudi's, so `validate_config_keys.py`
+ cannot check them. Every other `hoodie.*` key this skill emits is machine-verified against a
+ `ConfigProperty` in this source tree; XTable's are not, and emitting unverifiable keys next to
+ verified ones misrepresents how much is checked.
+- The bundle is built and versioned by XTable, so its coordinate moves independently of the Hudi
+ version this skill targets.
+- XTable is **incubating** at the ASF, so its interfaces and config surface are less settled than
+ the sync tools that ship in this repo.
+
+Point at the docs and recommend the user follow up there. That is more useful than a config block
+this skill cannot keep honest.
+
+**Not a catalog.** XTable translates *format* metadata; it does not register the table in HMS,
+Glue, or BigQuery. A user who needs both cross-format reads and SQL-engine discovery needs XTable
+**and** a catalog sync from Steps 1-4 — the same additive relationship DataHub has, for a
+different reason.
+
+### Bundles — the failure mode is a runtime ClassNotFoundException
+
+Each non-HMS sync tool lives in its own module, so the sync class is absent unless the matching
+bundle is on the classpath of the writing job. Correct config plus a missing bundle fails at
+the first commit, not at submit time:
+
+| Sync | Bundle |
+|---|---|
+| HMS | In the Spark bundle already |
+| Glue | `hudi-aws-bundle` |
+| BigQuery | `hudi-gcp-bundle` |
+| DataHub | `hudi-datahub-sync-bundle` |
+
+## Key generator
+
+| Answer shape | Key generator |
+|---|---|
+| Single field | `SimpleKeyGenerator` |
+| Multi-field (composite) | `ComplexKeyGenerator` |
+| Auto-gen (immutable only) | No key generator, no `recordkey.field` |
+| Timestamp-derived partition | `TimestampBasedKeyGenerator` |
+| Mixed (business + timestamp) | `CustomKeyGenerator` |
+| Unpartitioned | `NonpartitionedKeyGenerator` |
+
+Auto-detection: date-string partition columns + natural business record key → `SimpleKeyGenerator`; no explicit `TimestampBasedKeyGenerator` question needed.
diff --git a/hudi-agent-gateway/skills/hudi-architect/references/question-flow.md b/hudi-agent-gateway/skills/hudi-architect/references/question-flow.md
new file mode 100644
index 0000000000000..0d915f72fb041
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/references/question-flow.md
@@ -0,0 +1,813 @@
+
+# Question flow — Round 1, 2, 3
+
+Read this file when you're about to ask questions. Each round lists questions in order with conditional gating.
+
+## Round 1 — Source, engine, mutability, distribution, experience (all tiers)
+
+Round 1 is the minimum to specify a PROTOTYPING design. For EXPLORATION, replace hard questions with explanations where possible.
+
+### Q1.1 — Engine
+
+> "Which processing engine are you planning to use — Spark, Flink, or undecided?"
+
+- Spark or Flink → proceed to Q1.2.
+- Undecided → present Spark vs Flink tradeoff (see decision-tables.md → engine). Recommend based on workload signals.
+
+### Q1.2 — Source
+
+> "Where does the data come from?"
+
+Two families of answer, and the distinction drives writer selection:
+
+**External systems** — something a writer polls or reads: Kafka, DFS (files), JDBC (database), another Hudi table, S3/GCS events, Kinesis, Pulsar, custom.
+
+**An in-job DataFrame** — the user's own Spark job has already produced the data (an ETL query, a join, an aggregation), and the Hudi write is the final step of that job. Common for silver/gold derived tables. Phrase the option as "a Spark DataFrame from upstream ETL" — users describe this as "my ETL job writes it," not as a "source."
+
+Store this. It determines the writer:
+- **Kafka** → HoodieStreamer strong default, plus Q1.2b for record format.
+- **In-job DataFrame** → **Spark DataSource**, necessarily. HoodieStreamer polls an external source; there isn't one. Skip Q1.2b entirely — no source class, no schema provider.
+- **Everything else** → HoodieStreamer and DataSource are co-equal; decided by pipeline shape at Q2.9.
+
+**Knock-on for the in-job DataFrame case:** the writer can't run async compaction in-process. If the design lands on MOR, that means inline compaction or a standalone `HoodieCompactor` job — and the standalone path makes it a concurrent-writer deployment needing lock configuration. Surface `WRITER_COMPACTION_MISMATCH` and `COMPACTOR_CONCURRENCY_REQUIRED` accordingly. Q2.9 becomes partly redundant here: the pipeline shape is already known to be custom application code.
+
+### Q1.2b — Source record format (KAFKA SOURCE ONLY)
+
+Fires when Q1.2 answer is Kafka. Derives the HoodieStreamer source class and schema provider.
+
+> "What format are the records on your Kafka topic?
+>
+> - **Avro + schema registry** — `AvroKafkaSource` with `SchemaRegistryProvider`. Most common production shape; schema evolution handled centrally.
+> - **Avro + schema file** — `AvroKafkaSource` with `FilebasedSchemaProvider`. You supply `.avsc` files for source and target.
+> - **JSON** — `JsonKafkaSource`.
+> - **Protobuf** — `ProtoKafkaSource`. Requires the proto class on the classpath."
+
+Closed-set → widget. See decision-tables.md → writer for the source-class mapping and config-templates.md for the emitted properties.
+
+Note this question assumes a schema provider rather than asking whether one exists — deliberate for Kafka. Producers and consumers on a topic already need schema coordination to interoperate, so a registry is usually standing infrastructure before Hudi is involved. Ask *which*, not *whether*. Non-Kafka sources get the genuine yes/no at Q1.2c.
+
+### Q1.2c — Schema source (HoodieStreamer + NON-Kafka source)
+
+Fires when the writer is HoodieStreamer and the source is not Kafka (Q1.2b covers Kafka). **Optional** — a schema provider is not required. Many sources infer their own schema, and simple pipelines with no expected schema evolution commonly run without one.
+
+Ask only when schema evolution is in play or the user has an authoritative schema source. Don't force a choice on a simple pipeline.
+
+> "Do you have a schema definition for this data, or should Hudi infer it from the source?
+>
+> - **Let Hudi infer it** — fine when the schema is stable and evolution isn't expected. Simplest.
+> - **Schema files I manage** (`.avsc`) — `FilebasedSchemaProvider`. The usual answer when a schema is managed explicitly.
+> - **A Hive metastore table** — `HiveSchemaProvider`.
+> - **The upstream database table** — `JdbcbasedSchemaProvider`.
+> - **A schema registry** — `SchemaRegistryProvider`. Strongest option for evolving schemas."
+
+Closed-set → widget. Config keys in config-templates.md → Schema providers.
+
+**Default when the user is unsure:** infer, or file-based if they already have `.avsc` files. Reach for a registry only when schema evolution is an actual requirement — recommending one to a pipeline that doesn't need it adds infrastructure for nothing.
+
+**Skip entirely for Spark DataSource writes** — the DataFrame carries its own schema.
+
+### Q1.3 — Landing mode and ingestion cadence
+
+Fires at **all four tiers**, unconditionally.
+
+> "How does data land — a streaming job that runs continuously, or a batch job on a schedule?
+>
+> And roughly how often does one round of ingestion complete?
+>
+> - **Under 5 minutes** — near-real-time.
+> - **5–15 minutes** — typical streaming cadence.
+> - **Around an hour**
+> - **Once a day** (or less often)"
+
+Mode in plain language first — a user running a forEachBatch pipeline genuinely may not know which label applies. Cadence in bands, because the decision tables key off bands rather than exact minutes.
+
+Cadence is load-bearing downstream: it drives the retention safe-maximum (decision-tables.md → retention), and triggers `RETENTION_CLAMP` and `SUB_5_MIN_CADENCE_UNSTABLE`. Because it is captured in Round 1, those two warnings can be evaluated as soon as a retention answer arrives — they no longer have to wait for Q2.3.
+
+### Q1.4 — Mutability
+
+> "Is the workload mutable or immutable? (Mutable = records get updated after insert. Immutable = records only ever append, never change.)"
+
+### Q1.5 — Update distribution (MUTABLE ONLY — skip for immutable)
+
+> "When updates arrive, which parts of the table do they touch?
+>
+> - **Uniformly across the whole table** — any record can be updated at any time (e.g., customer, vendor, product tables).
+> - **Concentrated on recent data** — most updates hit records from the last few days, with a tail of stragglers (e.g., trips, orders, sessions).
+> - **Unsure.**"
+
+If "recent-concentrated," ask a follow-up in Round 2 about tail length (see Q2.3).
+
+### Q1.6 — Experience with Hudi (MUTABLE ONLY)
+
+**Fires only for mutable workloads.** For immutable, table type is COW with no compaction to run, so the answer changes nothing — skip it rather than ask.
+
+Gets its own widget screen, preceded by the COW/MOR tradeoff as prose:
+
+- **COW**: rewrites base files on updates. Simple ops, nothing extra to run, but write cost grows with update frequency.
+- **MOR**: appends updates to logs and compacts periodically. Lower write cost, but compaction becomes a service you keep healthy or read latency suffers.
+
+Adapt the "ops surface" row to the derived writer before showing it. With HoodieStreamer continuous, MOR's async compaction runs in-process and costs no extra job. With Spark DataSource, it means inline compaction or a standalone `HoodieCompactor` — and the standalone path makes it a concurrent-writer deployment. Presenting a generic tradeoff table when the writer is already known misstates the choice.
+
+> "Are you experienced managing and operating Hudi tables?
+>
+> - **First-time / want fire-and-forget** — one job to run, simple ops.
+> - **Some experience** — want MOR benefits without ops complexity.
+> - **Experienced operator** — comfortable with standalone async compaction executors, concurrent services, tuning."
+
+Derives table type + compaction posture (see decision-tables.md → table-type).
+
+### Q1.7 — Other writers (ALL TIERS EXCEPT EXPLORATION)
+
+**Fires at PROTOTYPING, PRODUCTIONIZING_INITIAL, and PRODUCTION_AT_SCALE.** Not a scale
+concern — it is a correctness one. Assuming a single writer when there is a second is the
+silent-corruption path (two OCC-less processes committing to one table), and unlike most
+defaults it cannot be walked back by inspection: nothing errors, nothing logs. One closed-set
+question, asked of a fact the user already knows.
+
+Skipped at EXPLORATION, which produces a narrative rather than a runnable bundle.
+
+> "Does anything else ever write to this table — another pipeline, a backfill job, a
+> GDPR/cleanup job, a standalone compactor? Even occasionally counts."
+>
+> - **No, just this one pipeline**
+> - **Yes — another regular pipeline**
+> - **Yes — occasional backfills or cleanup jobs**
+> - **Not sure yet**
+
+**"No"** → `SINGLE_WRITER`. Record it as a **confirmed fact** in ADR §2, not an assumption —
+the user was asked and answered.
+
+**Any "yes"** → a multi-writer deployment. `SINGLE_WRITER` is off the table. Record the
+declared writers as a **confirmed fact** in ADR §2 (never an assumption), and continue to the
+concurrency derivation below. Note that "occasional" is not weaker than "regular" here: a
+backfill that runs once a month still corrupts the table if it races an ingestion commit.
+
+**"Not sure yet"** → treat as multi-writer for safety and say why: "I'll design for
+concurrent writers. If it turns out to be a single pipeline you can drop the lock config —
+that direction is safe. The reverse isn't, because the damage happens before you notice."
+Record as an assumption with a revisit condition.
+
+### Q1.7b — Concurrency derivation (fires only when Q1.7 declared a second writer)
+
+Runs at the point the mode can be derived — after table type and index are known. At
+PROTOTYPING that is immediately after Round 1; at higher tiers it lands after Round 2 / Round 3
+where the index is settled. **Do not ask a mode question.** Derive per
+decision-tables.md → Concurrency, then confirm.
+
+**Mode.** OCC unless the design has *already* landed on MOR + BUCKET for its own reasons, in
+which case offer NBCC as the default with OCC as the alternative. Never reshape table type or
+index to reach NBCC — see `NBCC_INELIGIBLE` for the reasoning to give.
+
+**Operation type.** If any writer uses `INSERT`/`BULK_INSERT` rather than `UPSERT`, fire
+`OCC_INSERT_DUPLICATES` — concurrent inserts can duplicate even with dedup enabled, and the
+user needs to confirm the key spaces are disjoint.
+
+**Provider.** Only for OCC (NBCC needs none). **Two steps: find out what they already have,
+then educate only if they need it.** Most users arrive with this decided by their platform —
+their org runs ZooKeeper, or standardizes on DynamoDB locking, or a sibling Hudi table already
+made the call. Handing that user a menu of four backends asks them to re-decide something
+settled, and invites them to change a working answer.
+
+**Step A — what do they have?** Ask this first, always.
+
+> "Before I recommend anything: do you already have a locking backend in mind, or one your
+> platform standardizes on?"
+>
+> - **Yes, we already use one** — I'll use it.
+> - **We have infrastructure but haven't decided** — e.g. a ZooKeeper quorum or Hive Metastore
+> already running for other purposes.
+> - **Nothing set up — walk me through the options**
+> - **Not sure what this even is** — I'll explain what a lock provider does first.
+
+**Routing:**
+
+- **"Already use one"** → take it as the answer. Ask which, confirm the implicit variant where
+ one exists, emit it. **Do not re-litigate it** — a platform standard is a good reason, and
+ consistency across an org's Hudi tables is worth more than a marginally better fit for one
+ table. The single exception is a genuine incompatibility (e.g. filesystem-based on cloud
+ storage → `FILESYSTEM_LOCK_UNSAFE`), which is a correctness objection, not a preference.
+ Record the choice and its rationale in the ADR.
+- **"Have infrastructure but haven't decided"** → name what they have and recommend using it
+ rather than adding a dependency. Go to Step B, but lead with their existing option.
+- **"Nothing set up"** → Step B, full comparison.
+- **"Not sure what this is"** → explain the mechanism first (below), then Step B.
+
+**Step B — educate, then recommend.** Only reached when the user actually needs it. Lead with
+what the thing *does*, in workload terms, before naming any backend:
+
+> "With two writers, each one takes a short lock right before it commits — just long enough to
+> check that nobody else changed the same files. The lock lives outside the table, so both jobs
+> need to agree on where it is. That's all a lock provider is: the shared place they check.
+>
+> It matters because if two writers use *different* locks, both succeed, and the table
+> corrupts silently — no error, nothing in the logs."
+
+Then the comparison, as a tradeoff table in prose (per the decision UX contract), before the
+widget. Include only rows that apply — do not show DynamoDB to a GCP user:
+
+| Backend | What it costs you | Maturity |
+|---|---|---|
+| **DynamoDB** (AWS) | A table Hudi creates for you, plus IAM access from each writing job | Since 0.10.0 — well-trodden |
+| **ZooKeeper** | A quorum to run, if you don't already have one | Since 0.8.0 — well-trodden |
+| **Hive Metastore** | Nothing, if you already run one | Since 0.8.0 — well-trodden |
+| **The table's own storage** | Nothing at all — it locks under the table's path | Since 1.0.2 — newer, less production mileage |
+
+Then recommend one and ask for confirmation, per decision-tables.md → Concurrency Step 3:
+DynamoDB on AWS; an existing ZooKeeper quorum or Hive Metastore otherwise; storage-based only
+where there is no existing lock infrastructure, with its maturity stated so choosing it is a
+knowing choice. If the user picks storage-based, fire `STORAGE_LOCK_MATURITY` once and move on
+— do not argue the point twice.
+
+**Emit the implicit provider variants** for DynamoDB and ZooKeeper (see decision-tables.md →
+Concurrency Step 3); only surface the explicit variants if the user asks to share one lock across
+tables or must match an existing lock identity, and fire `LOCK_PROVIDER_MISMATCH` when they do.
+
+Then emit the matching block from config-templates.md → Concurrency, and state the requirement
+that carries the whole design: **the identical block goes in every writing job.** That becomes
+a pre-launch checklist item in ADR §13 — no longer a blocking open question, since the provider
+is now chosen and the config is complete.
+
+**Step C — disclose the lock defaults and take an acknowledgement.** Apply the standard
+disclosed-defaults pattern (SKILL.md → Disclosed defaults) to the values the user never chose.
+Every one of these has a default in code, so nothing is broken by leaving them alone — but the
+user should see them once rather than discover them during an incident.
+
+State the values, not the key names, and say what each one means in operational terms:
+
+> "The rest of the locking config keeps Hudi's defaults, which are sensible for a
+> two-writer table:
+>
+> - **Wait up to 60s to acquire a lock**, 15 retries a second apart — a writer that can't get
+> the lock fails the commit rather than proceeding unsafely.
+> - **Lock validity 5 minutes, renewed every 30s** (storage-based only) — if a writer dies, the
+> lock expires instead of blocking the table forever.
+> - **Conflict resolution: whole-file-group**, inferred from your index type — do not set this
+> by hand.
+> - **DynamoDB billing: pay-per-request** — right for one short lock per commit.
+>
+> Keep these, or set any of them yourself?"
+>
+> - `Keep the defaults`
+> - `I want to set some myself`
+
+**If they want to set some**, present the multi-select router — lock acquisition timeout and
+retries, lock validity and renewal, DynamoDB capacity — and prompt only for what they claim.
+Everything unclaimed keeps its default and is **not emitted**, per the emit-config-that-changes-
+behavior rule; a value the user explicitly chose *is* emitted even when it equals the default,
+because it now records a decision.
+
+Do not walk through this block when the user's answer at Step A was an existing platform
+standard — their platform already owns these values, and re-opening them invites drift from a
+working configuration. Note in the ADR that lock tuning follows the platform standard.
+
+## Round 1 outputs
+
+- Engine (user-answered).
+- Source, and for Kafka: record format → source class + schema provider.
+- Commit cadence (user-answered) — feeds retention safe-max and cadence warnings.
+- Table type PROVISIONAL (derived from experience + mutability + distribution).
+- Compaction posture PROVISIONAL.
+- Writer will be derived in Round 2.
+- Writer count (user-answered, all tiers but EXPLORATION) — confirmed fact, feeds concurrency
+ mode. Concurrency itself derives later, once table type and index are settled.
+
+**Delivery:** Round 1 batches into widget screens of at most 3 questions each.
+
+- **Screen 1** — engine, source, cadence. Fold in the Kafka record-format question (Q1.2b) when the source is Kafka — a gated follow-up that exists only because of an answer on the same screen may share it as a fourth item (see SKILL.md batching rule).
+- **Screen 2** — mutability and update distribution. Keep these together: Q1.4 gates Q1.5, and splitting them strands the gate.
+- **Screen 3** — experience (Q1.6), preceded by the COW/MOR tradeoff table.
+- **Screen 4** — other writers (Q1.7). Shares screen 3 when the workload is immutable (Q1.6 is
+ mutable-only, so screen 3 would otherwise be empty). Q1.7b is not part of Round 1 delivery —
+ it fires later, once table type and index are known.
+
+**Why experience gets its own screen.** The tradeoff table must precede the widget it informs (tradeoff-as-prose rule), but the COW/MOR tradeoff is only meaningful for mutable workloads — an immutable table has no log files to merge, so MOR buys nothing. Putting experience on the same screen as mutability forces the table to be shown before the answer that determines whether it applies, and on an immutable workload it has to be retracted immediately.
+
+**For immutable workloads, screen 3 changes shape entirely:**
+- Skip the COW/MOR tradeoff. Table type is COW, derived silently, no dialogue.
+- Skip Q1.5 (update distribution) — it's already answered as N/A.
+- Ask experience only if something downstream depends on it. For immutable workloads it mostly doesn't: there's no compaction posture to derive, and small-files posture is asked directly at Q2.8. Prefer skipping it over asking a question whose answer changes nothing.
+
+This means an immutable Round 1 is often two screens (engine/source/cadence, then mutability), while a mutable Round 1 is three.
+
+**For EXPLORATION: Round 1 is the entire conversation.** Skip to output — a narrative sketch, not necessarily a full ADR.
+
+### PROTOTYPING — Round 1 plus a bounded Round 2 subset
+
+Round 1 alone cannot produce a runnable table: it never collects a record key, an ordering field, or a partitioning decision. A prototyping user who is handed a config bundle full of placeholders cannot get to a first commit, which defeats the tier. So PROTOTYPING continues past Round 1 with two mechanisms.
+
+**(1) Disclosed-defaults consent block.** State the defaults rather than asking, flag durable items inline, then take a single consent answer:
+
+> "For a prototype I'll apply these defaults rather than walk you through the full design:
+>
+> - **Table size** — assuming small (prototype scale). Drives index choice.
+> - **Partitioning** — none. Simplest thing that works at this scale. ⚠️ Durable: changing this later needs a table rewrite.
+> - **Retention** — 48h lookback for time-travel and incremental queries.
+>
+> Fine for a prototype, or do you want to set any of these yourself?"
+
+The durability flag on partitioning is mandatory. Silently defaulting a rewrite-to-change decision is the failure this block exists to prevent.
+
+**Two warnings can't evaluate at this tier because their inputs live in Round 2. Default, but say so.**
+
+*Table type* — `WORKLOAD_EXPERIENCE_TENSION` needs projected table size (Q2.2) to detect the mutable + uniform-updates + at-scale case that argues for MOR. Without it, go with **COW** and call out the tradeoff explicitly rather than deriving silently:
+
+> "I'm defaulting to Copy-on-Write. It rewrites base files when records update — simplest to operate, nothing extra to run. The alternative, Merge-on-Read, appends updates to log files and compacts them periodically: cheaper writes, but compaction becomes a service to keep healthy.
+>
+> For a prototype, COW is almost always the right call. It matters at scale: if this table grows large and updates land uniformly across it, COW rewrites base files table-wide on every commit and Merge-on-Read becomes the better fit. ⚠️ Table type is durable — switching later needs a rewrite.
+>
+> Keep COW, or switch to Merge-on-Read?"
+
+Offer the override. Don't just announce the default.
+
+*Partitioning* — `VICE_1_PARTITION_MISALIGNMENT` needs the read-pattern answer (Q2.1) to check whether a partition column matches consumer filters. Go with the default (unpartitioned at prototype scale), and attach a scale disclaimer that is explicit about irreversibility:
+
+> "⚠️ Unpartitioned is fine at prototype scale, but this is a one-way decision. **A table's partitioning cannot be changed after creation** — going from unpartitioned to partitioned means building a new table and rewriting all the data into it. There's no ALTER for this.
+>
+> So if there's a real chance this design carries into production at meaningfully larger volume, decide partitioning now rather than later. Past roughly 500GB an unpartitioned table starts producing file-layout problems, and by then the fix is a migration.
+>
+> I also haven't asked what your consumers filter on, so I can't check that a partition column would align with their queries. If you want to partition now, tell me and I'll ask the couple of questions needed to pick a column properly."
+
+Both call-outs must also appear in the ADR — the table-type one under key decisions, the partitioning one as a revisit condition. A verbal mention that doesn't survive into the document isn't a call-out.
+
+**(2) Hard-ask the non-defaultable facts.** For mutable workloads, ask the record key using the concept-anchored phrasing in Q2.6, and the ordering field per Q2.6b. Neither has a default. For immutable workloads, auto-generated keys are a legitimate default and can live in the disclosed-defaults block instead.
+
+**Override branch — "let me set them".** Do not emit a wall of prose asking for several values at once. Present a multi-select router:
+
+> "Which of these do you want to set yourself? I'll apply defaults for anything you leave unchecked."
+> Options: `Record key + ordering field` (pre-selected and non-optional when mutable) · `Partitioning` · `Table size` · `Retention`
+
+Then work the claimed items in this fixed order, so two runs of the same workload don't diverge:
+
+**Step 1 — closed-set values, one widget screen.** Table size and retention band, whichever were claimed. Both have derivable option sets, so they batch together. Use the Q2.2 and Q2.3 phrasing.
+
+**Step 2 — partitioning, if claimed.** Conversational, because it needs an explanation preamble and branches on the answer. Lead with what partitioning buys, then the shape question (date-based / business dimension / none / you pick) as a widget, then granularity. Defer the column name to step 4.
+
+**Step 3 — validation questions for anything claimed in step 2.** If the user opted into partitioning, ask partition-column stability (Q2.5) and enough of the read pattern (Q2.1) to run the Vice 1 check. These batch into one widget screen. Skipping them means accepting a durable decision the flow can't check.
+
+**Step 4 — free-text column names, batched into a single turn.** Ask for every name at once — partition column, record key, ordering field — rather than one per turn. By this point each has been scoped by a shape question, so the user is supplying names against decisions already made.
+
+**Step 5 — apply defaults for everything unclaimed**, and state which defaults were applied. An unclaimed item is still a decision; the user just delegated it. It belongs in the ADR under consented defaults, not silently in the config.
+
+Then proceed to the final revisit gate as normal.
+
+**Validation travels with the decision** (the principle behind step 3). Partition-column stability gates index scope — partition-scoped versus global — and the read pattern gates whether the chosen column earns its keep at all. Both are correctness forks, and neither can fire if left in a round PROTOTYPING never reaches. Any time a tier lets a user make a decision early, the questions that validate that decision come with it.
+
+## Round 2 — Reads, layout, identity, writer (PRODUCTIONIZING_INITIAL, PRODUCTION_AT_SCALE)
+
+### Q2.1 — Consumer read pattern (three-axis question)
+
+> "How will downstream consumers use this table? A few things to help me understand:
+>
+> - **General shape** — do they run bulk analytical queries (scan large portions of the table), targeted lookups (look up specific records), or streaming/incremental consumers that only need what changed?
+> - **Latency sensitivity** — do reads need to be fast, or is some read latency acceptable if it buys cheaper writes?
+> - **Time travel or incremental query needs** — do any consumers need to query the table as-of a past commit, or read only changes since their last checkpoint?"
+
+Rule engine maps answers to Hudi query types internally. See decision-tables.md → read-behavior.
+
+### Q2.1a — Catalog sync gate (ask FIRST, before storage or engines)
+
+**This is the gate for the whole catalog section.** Plenty of tables need no catalog at all — a
+Spark-only pipeline, an intermediate table in a chain, a table whose consumers are all jobs
+reading by path. Deriving that from an engine list means the user answers two or three questions
+before anyone establishes they wanted sync in the first place. Ask once, up front, and let a
+"no" close the section.
+
+**Do not ask "do you want meta sync?"** — that is Hudi vocabulary for a thing the user may not
+have a name for. Ask about the outcome: whether anything needs to *find* this table by name.
+
+> "Does this table need to show up in a catalog — something like Hive Metastore, AWS Glue, or
+> BigQuery — so SQL engines and BI tools can find it by name?
+>
+> Spark and Flink don't need this; they read the table straight from its path. It matters when
+> something like Trino, Athena, or a BI tool has to discover the table."
+>
+> - **Yes — SQL engines or BI tools will query it**
+> - **No — only Spark/Flink jobs read it, by path**
+> - **Not sure** — I'll ask what queries it and derive the answer.
+> - **Not now, maybe later** — skip it; I'll note how to add it without a rewrite.
+
+**Routing:**
+
+- **"Yes"** → continue to Q2.1b (storage) and Q2.1c (engines).
+- **"No"** → **close the section.** Emit no sync config. Say so as a decision rather than
+ silently moving on: "No catalog sync then — Spark and Flink find the table by path." Record it
+ in the ADR as a confirmed fact, not an assumption, and note that sync can be added later
+ against a live table with no rewrite (see below).
+- **"Not sure"** → this is the one case where deriving is right. Go to Q2.1b/Q2.1c and let the
+ engine list answer it; a user who names Athena has answered "yes" without knowing the term.
+- **"Not now, maybe later"** → same as "no" for config purposes, but record a revisit condition
+ rather than a plain fact.
+
+**Say this whenever the answer is no or deferred, because it changes how much the decision
+matters:** catalog sync is **not durable**. Unlike partitioning or table type, it can be turned
+on later against an existing table — run the standalone sync tool once to register it, then add
+the properties so subsequent commits keep it current. Nothing is rewritten. A user hesitating
+because this feels like a one-way door should be told plainly that it isn't.
+
+The one wrinkle worth mentioning at that moment: BigQuery sync requires hive-style partitioning,
+which **is** fixed at table creation. So a table that might later be queried from BigQuery should
+set `hoodie.datasource.write.hive_style_partitioning=true` now even with no sync configured —
+that costs nothing today and preserves the option. Mention it only on GCS or when the user hints
+at a future BigQuery consumer; it is noise otherwise.
+
+### Q2.1b — Storage scheme (asked BEFORE engines)
+
+Reached only when Q2.1a said yes or not-sure.
+
+**This must precede Q2.1c, not share its screen.** Storage constrains which catalogs and engines
+are even possible, so asking them together lets an impossible combination through: Athena and
+Glue are AWS-only and cannot touch a table on GCS, while BigQuery is GCP-only. A live run
+produced exactly that contradiction — GCS storage plus Athena — because the two were asked
+side by side. Gate first, then offer only what the gate permits.
+
+> "Where does this table live?"
+>
+> - **S3 (AWS)** — `s3://` or `s3a://`
+> - **GCS (Google Cloud)** — `gs://`
+> - **ADLS / ABFS (Azure)** — `abfs://` or `abfss://`
+> - **HDFS or on-prem**
+
+Often already known from a base path the user has given; skip the question when it is. The
+answer also feeds the lock-provider derivation (Q1.7b) and `FILESYSTEM_LOCK_UNSAFE`, so capture
+it once and reuse it — including when Q2.1a closed the catalog section, since locking still
+needs it.
+
+### Q2.1c — Query engines (drives catalog choice)
+
+Follows Q2.1b. Q2.1 establishes *how* consumers read; this establishes *what* reads. A Hudi
+table on storage is invisible to Trino, Athena, Presto, or BigQuery until it is registered in a
+catalog those engines look at — and Spark and Flink can read by path with no catalog at all, so
+this genuinely changes the emitted config.
+
+**Never ask "do you want Hive sync?"** — that is a Hudi question. Ask what queries the table.
+
+**Filter the option set by the storage answer.** Never offer an engine that cannot read the
+storage:
+
+| Storage | Offer |
+|---|---|
+| S3 | Spark/Flink · **Athena** · Trino or Presto · BI tool |
+| GCS | Spark/Flink · **BigQuery** · Trino or Presto · BI tool |
+| ABFS / ADLS | Spark/Flink · Trino or Presto · BI tool |
+| HDFS / on-prem | Spark/Flink · Trino or Presto · Hive · BI tool |
+
+> "Which engines and tools will query this table?"
+>
+> - **Spark and/or Flink** — reading the table directly.
+> - **Athena** *(S3 only)* — reads through the Glue Data Catalog.
+> - **Trino or Presto** — reads through Hive Metastore or Glue.
+> - **BigQuery** *(GCS only)* — its own sync mechanism, with real constraints on MOR.
+> - **A BI tool** (Tableau, Looker, Superset) — through whichever catalog its SQL engine uses.
+
+**Keep Athena separate from Trino/Presto.** They need the same *kind* of registration, so
+grouping them is tempting — but Athena is AWS-only and Trino runs anywhere. Bundling them lets a
+GCS-plus-Athena answer through unchallenged, which is precisely the contradiction Q2.1b exists
+to prevent.
+
+Multi-select where the widget supports it; a table read by both Spark jobs and Athena is the
+common case, not an edge case.
+
+**Delivery:** Q2.1b and Q2.1c **must not share a screen** — Q2.1b gates Q2.1c's option set, and a
+widget's options are fixed when it renders, so a same-screen pairing cannot filter on the answer
+beside it. Q2.1a (the gate) may share a screen with Q2.1 (read pattern), which it does not gate —
+and pairing them is good, since "how do consumers read this?" and "does anything need to find it
+by name?" are the same conversation. This is the mirror of the Q1.4/Q1.5 rule: never split a gate
+from what it gates, and never *merge* a gate with a question whose options it narrows.
+
+**If a contradiction still arrives** — the user names an engine the storage cannot serve — do not
+silently pick one. Name the conflict and ask which they meant: "Athena is AWS-only and can't read
+a table on GCS — did you mean Trino, or is this table actually on S3?" Both readings lead to
+different catalogs, so guessing produces a wrong bundle rather than an imprecise one.
+
+**Routing** (full derivation in decision-tables.md → Catalog / metastore sync):
+
+- **Spark/Flink only** → **no catalog sync**. Emit nothing, and say so explicitly: "nothing to
+ register — Spark and Flink read the table by path." Silence here reads as an omission.
+- **Athena** → **Glue**, necessarily. Athena reads through Glue; it is not a preference.
+- **Trino / Presto, or anything Hive-based** → Glue when Q2.1b said S3, HMS otherwise. Do not ask
+ which; derive it from the storage answer and state the choice. When Athena and Trino both
+ appear, one Glue catalog serves both — say so, because standing up an HMS alongside Glue is a
+ second thing to operate for no gain.
+- **BigQuery** → BigQuery sync, and surface its constraints at that moment: hive-style
+ partitioning is required, and the manifest lists base files only, so a MOR table is read
+ **read-optimized** rather than as a snapshot.
+- **Spark SQL with a managed catalog** → HMS.
+
+**Then ask what they already run, before naming a catalog.** Same shape as the lock-provider
+question (Q1.7b Step A) and for the same reason — most orgs have this decided:
+
+> "Do you already have a metastore or catalog your platform uses?"
+>
+> - **Hive Metastore**
+> - **AWS Glue**
+> - **Something else** — tell me which.
+> - **Nothing yet**
+
+An existing catalog is the answer; do not argue for a different one. The database and table
+name are then a batched free-text follow-up alongside the other names Q2.6 collects.
+
+**If the design is MOR and a catalog is in play**, state that sync registers **two** tables
+(`_ro` base-files-only and `_rt` log-merging) and ask nothing — it is a fact to record in the
+ADR, not a decision. Consumers pointed at the wrong suffix get stale data or unexpected
+latency, with no error either way.
+
+**Discovery tools are additive, not alternatives.** If the user names DataHub or a similar
+governance catalog, confirm whether a *query* engine also needs the table: DataHub sync
+publishes metadata over REST and does not register the table anywhere an engine will find it.
+Both tools can run together via a comma-separated
+`hoodie.meta.sync.client.tool.class`.
+
+### Q2.2 — Table size
+
+> "What's the current table size, and what do you expect over the next 2-3 years?"
+
+Used for partitioning threshold, unpartitioned viability, index selection, retention limits.
+
+### Q2.3 — Retention lookback
+
+> "What's the maximum lookback window you'd need for time-travel or incremental queries? For example, do downstream consumers need to query the table as-of a past commit, or read only changes since their last checkpoint (last day, last week, last month)?"
+
+- "No time-travel or incremental needs" → default to safe max for commit cadence.
+- Otherwise → clamp user-desired to safe max (surface the clamp explicitly). See decision-tables.md → retention.
+
+**If Round 1 update distribution was "recent-concentrated", also ask:**
+
+> "You said updates concentrate on recent data. Roughly how far back do late-arriving updates trickle in — hours, days, weeks, or longer?"
+
+Cross-check tail vs retention (see warnings.md → UPDATE_TAIL_VS_RETENTION).
+
+### Q2.4 — Partitioning
+
+Lead with explanation, then delegation-friendly ask:
+
+> "Partitioning splits the table into subdirectories keyed by a column value. It gives Hudi two things:
+> - **Fast reads for queries that filter on the partition column.** Instead of scanning the whole table, Hudi reads only the matching partitions. On multi-TB tables this can be orders of magnitude faster.
+> - **Manageable file layout at scale.** As tables grow into TBs, unpartitioned tables produce very large or very many files that stress writers, readers, and downstream jobs like silver bootstrap.
+>
+> Do you have a partition column in mind (a date-like column, a business dimension), or would you like to skip partitioning for now?"
+
+Follow-up phrasing depends on answer:
+
+**User names a column:**
+> "Is it a date-like column, or a business dimension? Roughly how many distinct values will it have across the retention window?"
+
+Rule engine computes projected partition count and runs Vice 1/2/3 checks. See warnings.md.
+
+**User says "you pick":**
+Architect defaults to date-based (ingestion time for raw/immutable; event time only if user has strong event-time semantic downstream). Daily granularity. Report the choice with rationale.
+
+**User says "no partitioning / unpartitioned":**
+> "That's fine as long as the table stays manageable. Two concerns to flag now, based on what you've told me:
+> - If your projected table size at 2-3 years crosses ~500GB and this table feeds downstream silver pipelines that will ever need to bootstrap from it, unpartitioned makes that bootstrap job much harder (small files, whole-table snapshot reads in one commit).
+> - If this is a raw layer that only feeds append-only silver consumers who are always caught up, unpartitioned is more forgiving.
+>
+> Given your workload, my read is: [surface recommendation]. Proceed unpartitioned, or reconsider?"
+
+### Q2.5 — Partition-column stability (PARTITIONED ONLY)
+
+> "Can the partition column's value change for a given record across updates, or is it stable once inserted? Does the source data always contain the correct partition value for each record at update time?"
+
+- Stable + source has correct value → partition-scoped index viable.
+- Value can change OR source doesn't always have partition value → global-scope index required.
+
+### Q2.6 — Record key (concept-anchored)
+
+> "Hudi is rooted in database design, so it treats a **primary key** — Hudi calls it a record key — as first-class. A record key is a column (or combination of columns) that uniquely identifies a record.
+>
+> The record key powers a lot of what Hudi does: upserts, index lookups, compaction, concurrency control, dedup, change tracking.
+>
+> When a new record arrives with a key that already exists, Hudi updates the existing record. Different key → new record.
+>
+> Which column (or columns) uniquely identify a record in your workload?"
+
+**For IMMUTABLE workloads, add auto-gen alternative:**
+
+> "For append-only workloads with no downstream identity requirements, Hudi can also auto-generate keys efficiently (roughly 3-10x lighter than UUIDs).
+>
+> - **Auto-generate keys for me** — Hudi creates keys internally, no key config needed.
+> - **I have a natural key column** — event_id, session_id, transaction_id, etc.
+>
+> Which fits?"
+
+Auto-gen incompatible with disabling meta fields (see Q2.7).
+
+Answer routing:
+- Single field → SimpleKeyGenerator.
+- Multi-field → ComplexKeyGenerator.
+- Auto-gen (immutable only) → no key generator, no `recordkey.field` config.
+
+### Q2.6b — Ordering / precombine field (MUTABLE ONLY)
+
+Fires immediately after Q2.6 for any mutable workload. No default exists — this must be asked.
+
+> "When two updates for the same record land in the same batch, Hudi needs to know which one wins. That's usually a timestamp like `updated_at`, or a version number from the source.
+>
+> Which column should decide precedence?"
+
+Conversational — needs a free-text column name.
+
+Emits `hoodie.table.ordering.fields`. Without it, precedence among same-key records in a batch is undefined, and the config bundle cannot be completed for a mutable table. For CDC sources this is typically the source's commit timestamp or log sequence number.
+
+### Q2.7 — Meta-fields prompt (IMMUTABLE + record size below 1KB ONLY)
+
+Skip entirely for mutable workloads (silently keep all meta fields).
+
+Skip for immutable + record size >1KB (rounding error).
+
+For immutable + ≤1KB:
+
+> "Hudi adds 5 meta fields to every record. They enable incremental queries, uniqueness checks, and other features. Meta-fields add roughly 50-100 bytes per record — on records above ~1KB they're rounding error, but on smaller records they can add meaningful storage overhead.
+>
+> Do you know roughly how big each of your records is?
+> - **Above ~1KB / not sure** → keep all meta fields (default, safest).
+> - **Around 200B–1KB** → the saving from disabling is small but real. Only worth it if you're certain no consumer will ever need incremental reads.
+> - **Below ~200B** → meta-fields overhead is significant (25%+ of record size). Two options:
+> - Keep all meta fields — safest, all features work.
+> - Disable meta fields entirely — saves ~50-100 bytes/record, but **incremental queries stop working** and CDC is unavailable.
+>
+> Storage saving at scale: at 10B records × 200B, disabling saves ~50-100GB total. Worth it only for append-only batch data with no incremental consumers, now or later.
+>
+> Which trade fits?"
+
+**`hoodie.populate.meta.fields` is a boolean — all or nothing.** There is no selective / commit-time-only mode at 1.2.0; partial inclusion of meta fields in the schema is explicitly not supported. Do not offer one.
+
+**Do not soften what disabling costs.** Hudi's own config documentation states: "When disabled, no meta fields are populated and incremental queries will not be functional. This is only meant to be used for append only/immutable data for batch processing." Earlier revisions of this rubric described incremental as merely "slower, falls back to snapshot-read + filter" — that is wrong. Treat incremental as unavailable.
+
+**Gating rule:** if the workload has *any* incremental or streaming consumer, **don't ask this question at all.** At 1.2.0 the answer is determined — keep all meta fields — because incremental queries need `_hoodie_commit_time` and the config is all-or-nothing. Asking implies a choice the user doesn't have. State the decision and note the storage cost in the ADR.
+
+Selective population (`hoodie.meta.fields.mode`) would make this a real tradeoff for small-record tables, but it targets 1.3.0 and hasn't merged — see decision-tables.md → meta-fields.
+
+### Q2.8 — Small-files posture (IMMUTABLE ONLY — after partitioning resolved)
+
+Skip for mutable (inline small-file handling via `insert`/`upsert` is Hudi default; no user question).
+
+> "How should Hudi handle small files?
+>
+> - **Don't worry about small files** — fastest ingest. Uses `bulk_insert`, no clustering. Files stay whatever size the batch produces.
+> - **Handle small files without slowing ingestion** — `bulk_insert` + async clustering. Writer stays fast; a separate service compacts small files in the background.
+> - **Keep files well-sized even if ingestion takes longer** — `insert` inline. Slight per-batch latency cost, no separate clustering service to run."
+
+Recommendation prose adapts based on:
+- Partition cardinality (low-card date vs high-card business dim).
+- Future-consumers axis (closed universe = fixed consumers; open universe = future silver pipelines may bootstrap-read).
+
+See decision-tables.md → small-files-posture.
+
+### Q2.9 — Pipeline shape
+
+> "How is the pipeline expressed?
+>
+> - **Config-driven ingestion** — property-file-driven source → transform → Hudi wiring. Most common shape.
+> - **Custom application code** — Scala/Java/Python that reads sources, transforms with DataFrame ops, writes to Hudi. Includes streaming-source consumers using forEachBatch.
+> - **SQL-centric** — you write INSERT/MERGE/UPDATE/DELETE statements.
+> - **True streaming-sink writes** — you use `writeStream.format('hudi')` directly, and you need stateful streaming primitives (windows, watermarks, joins across streams)."
+
+**Structured Streaming disambiguation follow-up (if user picks "streaming"):**
+
+> "Do you use `writeStream.format('hudi')` as the actual sink, or do you consume from a stream and call `.write.format('hudi')` inside a forEachBatch callback?"
+
+- forEachBatch → route to DataSource path.
+- writeStream sink → true Structured Streaming. Ask about stateful primitives:
+
+> "Do you need stateful stream operations (windows, watermarks, joins with another stream)?"
+
+- Yes → Structured Streaming.
+- No → nudge toward HoodieStreamer.
+
+**Kafka source override note:** If source is Kafka, default is HoodieStreamer regardless of user's pipeline_shape answer — surface HoodieStreamer's Kafka-specific advantages (schema registry, exactly-once, error routing, in-process async services). Only route to DataSource for Kafka when the pipeline has multi-source complexity, ML DataFrame-native library work, or one-off backfills.
+
+**First-time user nudge:** if experience is EXPLORATION/PROTOTYPING and pipeline_shape is SQL-centric or streaming-with-primitives:
+
+> "For a first Hudi table, HoodieStreamer or Spark DataSource are the two most-deployed paths. Spark SQL / Structured Streaming work but have smaller production footprints. Do you want to reconsider, or proceed with the specialized writer?"
+
+## §8.3 — Derived-fact synthesis checkpoint
+
+**Fires between Round 2 and Round 3.** Echo computed facts back to user:
+
+```
+Confirmed workload:
+
+Derived:
+- Steady-state table size:
+- Projected partition count:
+- Files/day at target file size:
+- Small-file risk:
+
+Tensions surfaced (if any):
+-
+-
+-
+-
+
+Please confirm before I generate the full config.
+```
+
+User confirms before Round 3 fires.
+
+**Refinement moment (only when the writer wasn't known earlier):** if writer selection at Q2.9 landed on HoodieStreamer continuous mode AND table type is MOR, async compaction becomes free regardless of experience level. State it as a bonus upgrade at the checkpoint.
+
+**This is not the primary place the upgrade fires.** When the source is Kafka the writer is derived in Round 1, so the upgrade applies there and the upgraded table type should be stated immediately — see decision-tables.md → table type. Waiting for this checkpoint would hide it from PROTOTYPING and PRODUCTIONIZING_INITIAL users, since §8.3 only runs at PRODUCTION_AT_SCALE.
+
+Only reach this moment when the writer was genuinely undetermined until Q2.9.
+
+## Round 3 — Scale, concurrency, index (PRODUCTION_AT_SCALE ONLY)
+
+### Q3.1 — Writers (asked in Round 1 as Q1.7; refined here)
+
+The writer question itself moved to **Q1.7**, where it fires at every tier but EXPLORATION —
+a second writer is a correctness fact, not a scale fact, and the tier that skips it is the one
+that ships no bundle.
+
+What remains at PRODUCTION_AT_SCALE is refinement, and only when Q1.7 declared a second writer:
+
+- **Confirm the writer inventory** now that the design is concrete — a standalone
+ `HoodieCompactor` or an async clustering job derived during Rounds 2-3 may itself be a writer
+ the user did not count when answering Q1.7. Re-state the full list and have them confirm it.
+- **Run the concurrency derivation** (Q1.7b) here, where table type and index are final.
+- **Operation type per writer**, for `OCC_INSERT_DUPLICATES`.
+
+If Q1.7 answered single-writer and nothing derived since has added a second writing process,
+emit `hoodie.write.concurrency.mode=SINGLE_WRITER` and move on.
+
+### Q3.1b — Record count and growth (fires when the derived index is RLI)
+
+Required before emitting RLI config. The file-group count is durable at index initialization — see decision-tables.md → RLI file-group sizing.
+
+> "Roughly how many records does the table hold today, and what do you expect in 3-4 years?"
+
+Offer a closed-set for each (under 100M / 100M-1B / 1B-10B / over 10B), with an "I don't know" path.
+
+**If the user can project:** compute the file-group count from the sizing formula and emit `min == max`. Use table-wide count for global RLI, per-partition count for partitioned RLI.
+
+**If the user cannot project:** recommend landing the first commit / bulk load with RLI disabled, then enabling it async via `HoodieIndexer` so Hudi's estimator sees real volume. State plainly that this fixes the bootstrap problem but not the growth problem — the estimator still applies growth factor 2.0 to whatever exists at initialization. Record a measurable revisit condition in the ADR.
+
+Also ask, or state as an assumption, whether record keys are UUID-shaped: the 50-bytes-per-RLI-record constant assumes they are, and long keys inflate it.
+
+### Q3.2 — Index
+
+Derived from decision-tables.md → index. Architect presents recommendation with rationale from the decision table:
+
+> "For your workload — — I recommend `` because .
+>
+> [Tradeoff table showing options]
+>
+> Confirm, or override?"
+
+### Q3.3 — Derived services confirmation
+
+Architect states what services will run:
+- Cleaner + archival: inline autopilot, config emitted per retention answer.
+- Compaction: derived from writer + table type (see decision-tables.md → compaction).
+- Clustering: off by default; only surface as recommendation if immutable + small-files posture (b).
+
+Ask user to confirm.
+
+## Final revisit gate
+
+**Fires once, immediately before ADR generation, at every tier.** Not per round.
+
+Show every answer collected across all rounds as one numbered table, then:
+
+> "Ready to generate the design, or change an answer first?"
+> - `Generate the design`
+> - `Change an answer`
+
+Closed-set → widget. If the user amends, take the change and re-show the table before proceeding.
+
+Per-round answer echoes remain **informational** — they do not block. The §8.3 checkpoint is a separate thing with a different job (confirming *derived* facts, not raw answers); don't collapse the two or a PRODUCTION_AT_SCALE user gets two consecutive confirmations.
+
+**If any warning fired during the flow and the user chose to proceed past it, restate that in the review table** — e.g. "partition column: `customer_id` (high-cardinality trap acknowledged)". The gate is the last opportunity to reverse one.
+
+## Retired from V1 dialogue
+
+- Ops-appetite question (three-way hands-off/standard/tuned) — retired. Experience question replaced it.
+- Visibility-interval as first-class Round 1 question — retired. Moves to ADR-level fact (sizing note).
+- **Compaction** cadence question at design time — retired. Emitted silently at default. (Distinct from **ingestion** cadence, which Q1.3 now asks at every tier — the two are different facts that share a word.)
+- Cleaner cadence question — retired. Autopilot.
+- Col-stats decision at design time — retired. Operations Agent territory.
+- Clustering push — clustering is off by default; only surfaces on strong workload signals.
+- Point-lookup column follow-up (record key vs other column) — retired. Secondary index becomes ADR flag.
+
+## Question ordering rationale
+
+Reads first (Q2.1) → physical layout (Q2.2-2.5) → identity (Q2.6-2.7) → writer (Q2.9). Writer selection benefits from knowing the workload profile, so it comes last.
+
+Q2.7 meta-fields prompt fires immediately after Q2.6 record key when applicable — they're coupled by the auto-gen / virtual-keys mutual exclusion.
+
+Q2.8 small-files posture fires only for immutable, only after partitioning is resolved (recommendation depends on partition cardinality).
diff --git a/hudi-agent-gateway/skills/hudi-architect/references/warnings.md b/hudi-agent-gateway/skills/hudi-architect/references/warnings.md
new file mode 100644
index 0000000000000..b3427b50fcc30
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/references/warnings.md
@@ -0,0 +1,298 @@
+
+# Rule engine warnings
+
+Named warnings that fire on specific workload signals. Consult when driving the flow — surface warnings at the right point in the conversation, not all at once at the end.
+
+Format for each: name, trigger condition, message template, when it fires.
+
+## Partitioning warnings
+
+### VICE_1_PARTITION_MISALIGNMENT
+
+**Triggered when:** user chooses a partition column that doesn't match consumer read filters.
+
+**Message:**
+> "You partitioned by ``, but you said consumers filter primarily on ``. Partition pruning won't help these queries. Options: (i) repartition by the filtered column, (ii) enable column stats + data skipping (deferred to Operations Agent), (iii) keep the current partitioning if there are other filters you didn't mention."
+
+**When fires:** immediately after user names a partition column in Q2.4, once read pattern (Q2.1) is known.
+
+**When it can't fire (PROTOTYPING — no Q2.1).** Apply the default and state the limitation. Be explicit that partitioning — including the decision to stay unpartitioned — is fixed at table creation: changing it means a new table and a full rewrite, with no ALTER path. Offer to ask the read-pattern questions if the user wants to partition now. Carry the disclaimer into the ADR as a revisit condition tied to projected size.
+
+### VICE_2_OVERLY_GRANULAR_PARTITIONING
+
+**Triggered when:** `partition_size = table_size / partition_count < 100MB` at projected steady state.
+
+**Message:**
+> "At ~``MB per partition, average partition well below healthy 100MB+ range. Options: coarsen granularity, drop composite dimension, or drop partitioning entirely if total table stays under ~500GB."
+
+**When fires:** after Q2.4 + Q2.2 (table size known + partition count projected).
+
+### VICE_3_PARTITION_EVOLUTION
+
+**Triggered when:** user mentions "start hourly, coarsen later" or similar evolution plan.
+
+**Message:**
+> "Don't. Queries spanning evolution boundary hit mixed file sizes and see straggler tasks. Pick the coarsest scheme that meets your freshness needs upfront, even if current volume seems to justify finer grain."
+
+**When fires:** during Q2.4 partitioning discussion.
+
+### HIGH_CARDINALITY_PARTITION_TRAP
+
+**Triggered when:** partition col looks like business ID (column name contains `_id`, `_uuid`, or matches known-ID patterns).
+
+**Message:**
+> "You're proposing `` as the partition column. This looks like a business ID with potentially high cardinality. Concerns:
+> - At 100K+ partitions, Hudi's in-memory file system view grows large enough to cause elevated read and write latencies due to memory pressure.
+> - Even if queries filter on `` (pruning to one partition), writer-side and reader-side metadata handling is expensive.
+> - Composite `/` patterns compound this rapidly.
+>
+> Alternatives:
+> - Partition by date and rely on data-skipping / secondary index for ``-based reads.
+> - Bucket index on `` if lookups on this column are dominant — provides direct file-group routing without partition-count blowup.
+> - Keep the partition choice if cardinality stays bounded and you have strong reason — validate against the projected-count guardrails."
+
+**When fires:** immediately after user names a partition column in Q2.4.
+
+### PROJECTED_PARTITION_COUNT_YELLOW
+
+**Triggered when:** projected partition count in 10K-50K band.
+
+**Message:**
+> "Warning: at ~`` partitions, MDT `files` partition grows large, listing operations get expensive. Consider coarsening granularity or dropping composite dimension."
+
+**When fires:** at the §8.3 derived-fact synthesis checkpoint (PRODUCTION_AT_SCALE). At PRODUCTIONIZING_INITIAL §8.3 never runs — fire during the Q2.4 partitioning discussion, as soon as table size (Q2.2) and the partition scheme make the projection computable.
+
+### PROJECTED_PARTITION_COUNT_RED
+
+**Triggered when:** projected partition count > 50K.
+
+**Message:**
+> "Reject: ~`` partitions at projected steady state. This is a known failure mode — 270K partitions with 3MB per partition is documented as disaster territory. Coarsen granularity or drop composite dimension before proceeding."
+
+**When fires:** during Q2.4 partitioning discussion. Blocks proceeding until user changes partitioning.
+
+## Design tension warnings
+
+### WORKLOAD_EXPERIENCE_TENSION
+
+**Triggered when:** mutable + uniform-distribution updates + large projected table AND user picks fire-and-forget experience.
+
+**Message:**
+> "Your workload signals point toward MOR (mutable + uniform updates at scale = high write amp for COW), but you picked fire-and-forget which typically means COW. Three reconciliations:
+> - (a) Accept COW; ADR flags concrete revisit conditions if write amp materializes.
+> - (b) Step up to MOR with inline compaction. Slightly more per-batch latency, no separate service to deploy.
+> - (c) Keep the workload smaller and rely on the Operations Agent to flag if COW hits a wall.
+>
+> Which matches your priorities?"
+
+**When fires:** after Q1.6 (experience) when Q1.4 + Q1.5 + Q2.2 signals are available. Ask user to reconcile.
+
+**When it can't fire (PROTOTYPING — no Q2.2).** Don't derive table type silently. Default to COW, state the COW/MOR tradeoff plainly, name the condition that would change the answer (large table + uniform updates), flag that table type is durable, and offer the override. The user should leave knowing they made a choice, not knowing a default was applied. Carry the call-out into the ADR's key-decisions section.
+
+### UPDATE_TAIL_VS_RETENTION
+
+**Triggered when:** update-tail estimate (from Q2.3 follow-up) > retention window (Q2.3 main answer).
+
+**Message:**
+> "Your update pattern has a tail extending ~``, but your retention window is ``. Late-arriving updates land correctly on current records — Hudi handles that fine. But downstream consumers with incremental checkpoints older than `` cannot reconcile against intermediate historical states.
+>
+> Options:
+> - (a) Widen retention (if commit cadence allows).
+> - (b) Keep retention and expect consumers to check in more frequently.
+> - (c) Reduce commit cadence to allow wider safe retention."
+
+**When fires:** at the §8.3 derived-fact synthesis checkpoint (PRODUCTION_AT_SCALE). At PRODUCTIONIZING_INITIAL §8.3 never runs — fire at the end of Round 2, before the final revisit gate, as soon as both inputs (tail estimate, retention window) exist. A warning whose only firing point is a checkpoint the tier skips is a warning that never fires.
+
+## Config trap warnings
+
+### RETENTION_CLAMP
+
+**Triggered when:** `user_desired_lookback > safe_max_retention` (computed from commit cadence).
+
+**Message:**
+> "You asked for `` of lookback, but at ``-minute commit cadence that would push the active timeline past its healthy range and degrade latency. Clamping to ``. To widen retention, either reduce commit cadence (e.g., 15-min instead of 5-min → ~5 days safe) or accept the shorter window."
+
+**When fires:** during Q2.3 retention question, immediately when user's desired value exceeds safe max.
+
+**If the user responds by changing commit cadence, recompute the safe max against the new cadence and restate it before moving on.** The warning offers slowing the cadence as a remedy, so the Architect must follow through — don't leave the original clamped figure standing after the input it derived from has changed.
+
+### SUB_5_MIN_CADENCE_UNSTABLE
+
+**Triggered when:** commit cadence < 5 min AND computed safe retention < 1 day.
+
+**Message:**
+> "At ``-minute cadence, safe retention drops below 1 day (~``). As a best practice, first stabilize a 5-minute cadence pipeline before attempting sub-5-minute commits. If sub-minute is a hard requirement, expect a very tight retention window and plan operational monitoring accordingly."
+
+**When fires:** during Q2.3 retention question. Not a hard block.
+
+### COMPACTION_TARGET_IO_TRAP
+
+**Triggered when:** MOR + projected table size ≥ 1TB.
+
+**Message:**
+> "`hoodie.compaction.target.io` is a per-round IO ceiling, defaulting to 500GB. It exists to bound how long inline compaction can block a commit. At your scale that ceiling throttles compaction below the rate log files accumulate — file groups never catch up, log files grow without bound, and snapshot read latency degrades. Setting it effectively uncapped and letting the compaction strategy decide what to compact."
+
+**Config note:** the value is in **megabytes, not bytes** (default `512000` = 500GB). Emit a large finite MB value such as `104857600` (100TB). Do not derive a point value from table size — that just re-creates the same ceiling at a higher threshold as the table grows.
+
+**When fires:** after table type + projected size are known. Add to ADR as explicit tuning knob.
+
+### COMPACTOR_CONCURRENCY_REQUIRED
+
+**Triggered when:** the design lands on a standalone `HoodieCompactor` job (MOR + a writer that can't run async compaction in-process — Spark DataSource, Spark SQL).
+
+**Message:**
+> "A separate compactor job means two processes write to this table, so `SINGLE_WRITER` is unsafe. Both jobs need `OPTIMISTIC_CONCURRENCY_CONTROL` and the same lock provider, configured identically on both sides. On AWS that's DynamoDB, and Hudi creates the lock table for you; if you already run ZooKeeper or a Hive Metastore, use that. If setting up locking isn't practical at all, use inline compaction instead and accept the per-batch latency."
+
+**When fires:** immediately when the standalone-compactor path is selected or recommended. Must appear in the ADR's operational playbook, not only in dialogue.
+
+Emit the concrete OCC block from config-templates.md → Concurrency for the deployment, in **both** jobs. Provider selection is decision-tables.md → Concurrency Step 3.
+
+### NBCC_INELIGIBLE
+
+**Triggered when:** the user asks for `NON_BLOCKING_CONCURRENCY_CONTROL` but the derived design fails the eligibility gate — table is not MOR, index is not BUCKET, table version < 8, or clustering is required.
+
+**Message:**
+> "NBCC needs a MOR table with simple bucket index, on table version 8 or later — Hudi's config validation rejects any other combination outright, so this would fail at write time rather than degrade. Your design is `` + ``. I'd recommend OCC here, which has no such restriction. I'm deliberately not reshaping the table to fit NBCC: bucket count is fixed at table creation, while the concurrency mode can be changed on a live table — trading a reversible decision for an irreversible one is the wrong way round."
+
+**When fires:** the moment NBCC is requested and the gate fails. Blocks the NBCC request, not the session — emit OCC and record the reason in the ADR.
+
+### NBCC_CLUSTERING_CONFLICT
+
+**Triggered when:** NBCC is otherwise eligible (MOR + BUCKET) AND clustering is wanted.
+
+**Message:**
+> "NBCC doesn't support clustering yet — the non-blocking path resolves conflicts between ingestion and compaction, but not with a clustering writer. Since clustering is part of this design, OCC is the right mode. If clustering is optional here, NBCC becomes available again."
+
+**When fires:** at the concurrency derivation, before emitting a mode. Not a hard block — the user may drop clustering.
+
+### STORAGE_LOCK_MATURITY
+
+**Triggered when:** `StorageBasedLockProvider` is selected — whether the Architect surfaced it as the only option without existing lock infrastructure, or the user asked for it by name.
+
+**Message:**
+> "One thing to know about this choice: the storage-based lock provider arrived in Hudi 1.0.2, which makes it years younger than the DynamoDB, ZooKeeper, and Hive Metastore providers. It isn't a thin wrapper either — it does lease renewal with a heartbeat and its own per-cloud lock clients, which is the kind of code whose edge cases surface under real contention and clock skew rather than in tests. There's no known defect here; it's an age argument. The zero-infrastructure story is genuinely the nicest of the options, so this is worth revisiting as it accumulates mileage. If you'd rather stay on well-trodden ground today, DynamoDB on AWS is the usual alternative and Hudi creates the lock table for you."
+
+**When fires:** at provider selection, once. **Not a hard block** — it is a maturity judgement, not a defect, and the user may reasonably accept it. Record the choice and the caveat in the ADR so a later reviewer sees it was deliberate. Do not re-raise it after the user has decided.
+
+### LOCK_PROVIDER_MISMATCH
+
+**Triggered when:** an **explicit** lock provider is chosen over its implicit variant — `ZookeeperBasedLockProvider` (needs `base_path` + `lock_key`) or `DynamoDBBasedLockProvider` (needs `partition_key`).
+
+**Message:**
+> "This provider takes its lock identity from config rather than deriving it from the table path, so every writing job has to set the same values by hand. If two jobs disagree — a different `lock_key`, a different `partition_key`, even `s3a://` on one side and `s3://` on the other — each takes out its own lock, every writer succeeds, and the table corrupts with nothing in any log. The implicit variant (``) derives the identity from `hoodie.base.path` and makes that failure impossible. Use it unless you specifically need several tables to share one lock, or must match an existing deployment's lock identity."
+
+**When fires:** the moment an explicit provider is selected. Not a hard block — sharing a lock across tables is a legitimate reason — but the choice must land in the ADR with its rationale, and the pre-launch checklist must call for verifying the values match across every writing job.
+
+### FILESYSTEM_LOCK_UNSAFE
+
+**Triggered when:** `FileSystemBasedLockProvider` is selected and the table path is cloud storage (s3, s3a, gs, abfs, abfss, wasb, wasbs), or the deployment is production.
+
+**Message:**
+> "The filesystem lock provider isn't supported on cloud storage and isn't intended for production — it needs atomic filesystem semantics that object stores don't provide, so it can appear to work while granting the same lock twice. On cloud storage use `StorageBasedLockProvider` instead: same zero-infrastructure story, built for object-store semantics."
+
+**When fires:** immediately on selection. **Hard block** for cloud storage — this one silently appears to work, which is worse than failing.
+
+### OCC_INSERT_DUPLICATES
+
+**Triggered when:** OCC is derived AND any writer uses `INSERT` or `BULK_INSERT` (rather than `UPSERT`).
+
+**Message:**
+> "One caveat specific to multi-writer: with concurrent `INSERT`/`BULK_INSERT`, the table can end up with duplicates **even with dedup enabled**. Dedup applies within a writer's own batch; OCC's conflict detection is at file-group granularity and doesn't catch two writers inserting the same key into different file groups. If these writers can produce overlapping keys, use `UPSERT`, or partition the key space so no two writers ever touch the same key."
+
+**When fires:** at concurrency derivation, once the operation type per writer is known. Not a hard block — many multi-writer deployments have disjoint key spaces by construction — but it must be answered rather than assumed.
+
+### PARTITION_EXTRACTOR_MISMATCH
+
+**Triggered when:** catalog sync is enabled AND the key generator is `TimestampBasedKeyGenerator` producing a `yyyy/MM/dd`-style partition path.
+
+**Message:**
+> "Your partition paths look like `2026/08/25` — three path segments from one logical date. The default partition extractor reads those as three separate partition values, so the catalog gets a table partitioned by three columns instead of one date. Queries filtering on a date then don't prune correctly. Set `hoodie.datasource.hive_sync.partition_extractor_class=org.apache.hudi.hive.SinglePartPartitionValueExtractor`, which turns the path back into a single `2026-08-25` value."
+
+**When fires:** at catalog-sync derivation, once the key generator and partition scheme are known. Not a hard block, but it must reach the emitted config — this is a sync that *succeeds* and then produces a table nobody can query correctly, which is worse than a failure.
+
+### GLUE_SYNC_VERSION_CHURN
+
+**Triggered when:** the Glue sync tool is selected AND commit cadence is hourly or faster.
+
+**Message:**
+> "Glue sync writes a new catalog version on every commit by default. At your cadence that's roughly `` versions a day for a table whose schema mostly isn't changing. Setting `hoodie.datasource.meta_sync.condition.sync=true` syncs only when the schema or partitions actually change, which is what you want for a steady pipeline."
+
+**When fires:** immediately on selecting Glue, with the commits-per-day figure computed from the answered cadence rather than left abstract. Not a hard block.
+
+### CATALOG_SYNC_SILENT_STALENESS
+
+**Triggered when:** any catalog sync is enabled.
+
+**Message:**
+> "One operational note: a sync failure doesn't fail the write. The commit succeeds and the catalog quietly falls behind, so readers see a stale schema — or miss new partitions — with nothing in the writer's logs pointing at it. Worth an alert on sync errors, and worth knowing that 'the table looks wrong in Athena' usually means the catalog, not the data."
+
+**When fires:** once, at catalog-sync derivation. Informational — it belongs in the ADR's operational playbook rather than the dialogue's critical path.
+
+### BIGQUERY_MOR_READ_OPTIMIZED
+
+**Triggered when:** BigQuery sync is selected AND the table type is MERGE_ON_READ.
+
+**Message:**
+> "BigQuery sync will accept this MOR table, but its manifest lists base files only — so BigQuery won't merge your log files, and queries there see read-optimized data rather than a current snapshot. Updates land in logs and only become visible to BigQuery after compaction. If BigQuery consumers need current data, either shorten the compaction interval or reconsider MOR for this table. Spark and Flink readers are unaffected."
+
+**When fires:** at catalog-sync derivation. Not a hard block — read-optimized is a legitimate choice — but it must be an explicit one, since nothing errors and the data merely looks stale.
+
+### CLOUD_BUNDLE_REQUIRED
+
+**Triggered when:** the design names a class outside the Spark and utilities bundles — the DynamoDB lock provider, the storage-based lock provider, or a Glue / BigQuery / DataHub sync tool.
+
+**Message:**
+> "`` lives in its own module, so `` has to be on the classpath of every job that writes this table — in `--packages` for `spark-submit`, `spark-shell`, or `spark-sql`, or as a compile-time dependency for a packaged application. The config is correct without it, which is exactly the problem: the job submits fine, starts, and then fails at the first commit with a ClassNotFoundException on a class your properties file names."
+
+**When fires:** the moment such a class is derived — at lock-provider selection and at sync-tool selection, whichever comes first. Fire it **once per bundle, not once per decision**: a design with DynamoDB locking *and* Glue sync needs `hudi-aws-bundle` one time, and saying it twice invites the reader to think they need two jars.
+
+Must appear in **the emitted submit command**, not only in dialogue — see config-templates.md → "Cloud bundles are load-bearing". Also in the ADR's pre-launch checklist. Bundle mapping is in that same section.
+
+### XTABLE_MOR_UNSUPPORTED
+
+**Triggered when:** the user raises Apache XTable, or names an Iceberg or Delta consumer, AND the derived table type is MERGE_ON_READ.
+
+**Message:**
+> "One conflict worth checking before you commit to this: XTable's FAQ lists MOR tables as unsupported — Copy-on-Write only, for both Hudi and Iceberg. Your design is MOR. I'd verify that against their current docs rather than take my word for it, since XTable is incubating and its support matrix moves. If it still holds, table type is fixed at creation, so it's a decision for now rather than later: keep MOR and read this table only through Hudi, or switch to CoW to keep Iceberg and Delta interoperability open. The MOR case here was `` — worth weighing that against how much cross-format access matters."
+
+**When fires:** the moment XTable or a cross-format consumer comes up, if the design is MOR. **Do not silently reshape the table type** — surface the tension with both options, as with any durable decision. Record whichever way it goes in the ADR, since a future reader will want to know the interop question was considered rather than missed.
+
+### THREE_CONCURRENT_SERVICES
+
+**Triggered when:** writer is HoodieStreamer continuous AND table type is MOR AND clustering enabled.
+
+**Message:**
+> "Three concurrent services in one Spark job: ingestion + async compaction + async clustering. Default 1:1:1 resource split works for balanced workloads. If ingestion falls behind, shift weight toward `--delta-sync-scheduling-weight`. If compaction backlog grows, shift toward `--compact-scheduling-weight`. Operations Agent territory."
+
+**When fires:** at the §8.3 derived-fact synthesis checkpoint (PRODUCTION_AT_SCALE). At tiers where §8.3 doesn't run, fire at the moment the third concurrent service is enabled.
+
+### WRITER_COMPACTION_MISMATCH
+
+**Triggered when:** user wants MOR async compaction AND writer that doesn't support async in-process (DataSource or SQL).
+
+**Message:**
+> "Your writer choice (``) means async compaction requires deploying a separate `HoodieCompactor` job — an advanced deployment pattern. Alternative: switch writer to HoodieStreamer continuous mode, and get async compaction for free in-process. Which fits?"
+
+**When fires:** after Q2.9 (pipeline shape → writer) is known, only if MOR + experienced signals were captured earlier. For in-job DataFrame sources the writer is known in Round 1 — fire there instead.
+
+**In-job DataFrame exception:** when the source is a DataFrame produced inside the user's own Spark job, the "switch to HoodieStreamer continuous" alternative does not exist — HoodieStreamer polls an external source, and there isn't one (question-flow.md Q1.2). Drop that clause and offer only the real choices: inline compaction, or the standalone `HoodieCompactor` with its concurrency requirements.
+
+## Growing set
+
+More warnings will emerge during Path A implementation. When you encounter a workload where the current warnings don't fire but something feels wrong, flag it explicitly — that's the signal for a new warning to add.
diff --git a/hudi-agent-gateway/skills/hudi-architect/validate_config_keys.py b/hudi-agent-gateway/skills/hudi-architect/validate_config_keys.py
new file mode 100644
index 0000000000000..4ed0e435d1eb1
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/validate_config_keys.py
@@ -0,0 +1,225 @@
+#!/usr/bin/env python3
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""Validate hoodie.* config keys referenced by the hudi-architect skill.
+
+Extracts every `hoodie.*` key mentioned in the skill's markdown (SKILL.md +
+references/*.md) and checks that each one is a real config key defined in the
+Hudi source tree — either a primary key (`.key("...")`) or a declared
+alternative (`withAlternatives("...")`). Keys built from prefix constants
+(e.g. METADATA_PREFIX + ".record.index.growth.factor") are resolved by
+scanning String constants and folding one level of `CONST + "literal"`
+concatenation to a fixpoint.
+
+Exit codes: 0 = all keys valid (or allowlisted), 1 = unknown keys found.
+
+Intentional exceptions (e.g. keys targeting a future Hudi version that the
+skill discusses but does not emit) live in validate_config_keys_allowlist.txt,
+one key per line, '#' comments allowed.
+
+Run from anywhere: python3 hudi-agent-gateway/skills/hudi-architect/validate_config_keys.py
+"""
+
+import re
+import sys
+from pathlib import Path
+
+SKILL_DIR = Path(__file__).resolve().parent
+
+
+def _find_repo_root(start: Path) -> Path:
+ """Walk up from the skill directory to the enclosing Hudi checkout.
+
+ Located by marker rather than by counting parents, so relocating the skill
+ within the tree cannot silently break source-tree resolution.
+ """
+ for candidate in (start, *start.parents):
+ if (candidate / "hudi-common").is_dir() and (candidate / "pom.xml").is_file():
+ return candidate
+ return start.parents[-1]
+
+
+REPO_ROOT = _find_repo_root(SKILL_DIR)
+ALLOWLIST_FILE = SKILL_DIR / "validate_config_keys_allowlist.txt"
+
+# Source modules that define ConfigProperty keys.
+SOURCE_GLOBS = [
+ "hudi-common/src/main/**/*.java",
+ "hudi-client/**/src/main/**/*.java",
+ "hudi-utilities/src/main/**/*.java",
+ "hudi-spark-datasource/**/src/main/**/*.scala",
+ "hudi-spark-datasource/**/src/main/**/*.java",
+ "hudi-flink-datasource/**/src/main/**/*.java",
+ "hudi-sync/**/src/main/**/*.java",
+ # Cloud lock providers live in their own modules; the multi-writer references
+ # emit hoodie.write.lock.dynamodb.* keys defined only here.
+ "hudi-aws/src/main/**/*.java",
+ "hudi-gcp/src/main/**/*.java",
+]
+
+MARKDOWN_FILES = [SKILL_DIR / "SKILL.md"] + sorted((SKILL_DIR / "references").glob("*.md"))
+
+# --- extraction from markdown -------------------------------------------------
+
+KEY_TOKEN = re.compile(r"\bhoodie\.[a-z0-9_]+(?:\.[a-z0-9_]+|\.\{[a-z0-9_,]+\})+")
+
+
+def expand_braces(token: str):
+ """hoodie.a.{min,max}.b -> [hoodie.a.min.b, hoodie.a.max.b]"""
+ m = re.search(r"\{([a-z0-9_,]+)\}", token)
+ if not m:
+ return [token]
+ out = []
+ for alt in m.group(1).split(","):
+ out.extend(expand_braces(token[: m.start()] + alt + token[m.end():]))
+ return out
+
+
+def extract_markdown_keys():
+ found = {} # key -> list of "file:line"
+ for md in MARKDOWN_FILES:
+ for lineno, line in enumerate(md.read_text().splitlines(), 1):
+ for tok in KEY_TOKEN.findall(line):
+ for key in expand_braces(tok):
+ found.setdefault(key, []).append(f"{md.name}:{lineno}")
+ return found
+
+
+# --- valid-key set from the source tree ----------------------------------------
+
+CONST_DEF = re.compile(r'String\s+(\w+)\s*=\s*(.+?);')
+STRING_LIT = re.compile(r'"((?:hoodie|_hoodie)[^"]*)"')
+KEY_CALL = re.compile(r'(?:\.key|withAlternatives)\(([^;]*?)\)')
+
+
+def build_valid_keys():
+ constants = {} # NAME -> string value (only fully-resolved ones kept)
+ key_exprs = [] # raw argument expressions of .key(...) / withAlternatives(...)
+ literals = set()
+
+ files = []
+ for pattern in SOURCE_GLOBS:
+ files.extend(REPO_ROOT.glob(pattern))
+
+ pending_defs = []
+ for f in files:
+ try:
+ text = f.read_text(errors="ignore")
+ except OSError:
+ continue
+ # No content gate: files like KafkaSourceConfig build every key from
+ # imported prefix constants and may contain no literal "hoodie." at all.
+ for m in CONST_DEF.finditer(text):
+ pending_defs.append((m.group(1), m.group(2)))
+ for m in KEY_CALL.finditer(text):
+ key_exprs.append(m.group(1))
+ # any quoted hoodie.* literal counts as evidence the key exists somewhere
+ # in config-definition context; keep them for prefix resolution only.
+
+ def eval_expr(expr):
+ """Resolve '"lit"', 'CONST + "lit"', etc. to the SET of possible strings.
+
+ Constant names like PREFIX repeat across files with different values, so
+ constants map to value-sets and concatenation is cartesian. A key is
+ considered valid if any combination resolves to it — still strong
+ evidence, since every combination pairs a real prefix with a real
+ .key()/.withAlternatives() suffix.
+ """
+ parts = [p.strip() for p in expr.split("+")]
+ out = {""}
+ for p in parts:
+ if len(p) >= 2 and p.startswith('"') and p.endswith('"'):
+ out = {o + p[1:-1] for o in out}
+ elif p in constants:
+ out = {o + v for o in out for v in constants[p]}
+ if len(out) > 512: # runaway cartesian guard
+ return set()
+ else:
+ return set()
+ return out
+
+ # resolve constants to a fixpoint (handles PREFIX = OTHER_PREFIX + "x.")
+ changed = True
+ while changed:
+ changed = False
+ for name, expr in pending_defs:
+ for val in eval_expr(expr):
+ if "hoodie." in val and val not in constants.setdefault(name, set()):
+ constants[name].add(val)
+ changed = True
+
+ valid = set()
+ for expr in key_exprs:
+ for val in eval_expr(expr):
+ if val.startswith("hoodie."):
+ valid.add(val)
+ # plain constants that are themselves complete keys
+ for vals in constants.values():
+ for val in vals:
+ if val.startswith("hoodie.") and not val.endswith("."):
+ valid.add(val)
+ return valid
+
+
+def load_allowlist():
+ if not ALLOWLIST_FILE.exists():
+ return set()
+ out = set()
+ for line in ALLOWLIST_FILE.read_text().splitlines():
+ line = line.split("#", 1)[0].strip()
+ if line:
+ out.add(line)
+ return out
+
+
+def main():
+ md_keys = extract_markdown_keys()
+ valid = build_valid_keys()
+ allow = load_allowlist()
+
+ if not valid:
+ print("ERROR: no config keys resolved from the source tree.")
+ print(f" Looked under: {REPO_ROOT}")
+ print(" This script must run from a copy of the skill INSIDE a Hudi checkout")
+ print(" (hudi-agent-gateway/skills/hudi-architect/), not from an installed copy under")
+ print(" ~/.claude/skills/. Run the repo copy instead.")
+ return 2
+
+ unknown = {}
+ for key, locations in sorted(md_keys.items()):
+ if key in valid or key in allow:
+ continue
+ unknown[key] = locations
+
+ print(f"Checked {len(md_keys)} distinct hoodie.* keys from {len(MARKDOWN_FILES)} markdown files")
+ print(f"against {len(valid)} keys resolved from the Hudi source tree "
+ f"({len(allow)} allowlisted).")
+ if not unknown:
+ print("OK — every referenced key exists in source (or is allowlisted).")
+ return 0
+
+ print(f"\nUNKNOWN KEYS ({len(unknown)}) — not defined in source, not allowlisted:")
+ for key, locations in unknown.items():
+ locs = ", ".join(locations[:3]) + (" …" if len(locations) > 3 else "")
+ print(f" {key}\n at {locs}")
+ print("\nFix the reference file, or add to validate_config_keys_allowlist.txt "
+ "with a comment explaining why.")
+ return 1
+
+
+if __name__ == "__main__":
+ sys.exit(main())
diff --git a/hudi-agent-gateway/skills/hudi-architect/validate_config_keys_allowlist.txt b/hudi-agent-gateway/skills/hudi-architect/validate_config_keys_allowlist.txt
new file mode 100644
index 0000000000000..98197ca8f65aa
--- /dev/null
+++ b/hudi-agent-gateway/skills/hudi-architect/validate_config_keys_allowlist.txt
@@ -0,0 +1,38 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# Intentional exceptions for validate_config_keys.py — one key per line.
+# Every entry must say WHY it is allowed to be absent from the Hudi source tree.
+
+# Future key: selective meta-fields mode (apache/hudi#19205, targets 1.3.0, not merged).
+# The references discuss it explicitly as NOT available at 1.2.0 and never emit it.
+hoodie.meta.fields.mode
+
+# Mentioned only in negation prose: config-templates.md states these properties
+# DO NOT EXIST (source class / schema provider are the --source-class /
+# --schemaprovider-class CLI flags). The mention warns users away from them.
+hoodie.streamer.source.class
+hoodie.streamer.schemaprovider.class
+
+# Not a key: the extractor picks up the bare `hoodie.streamer.schemaprovider.`
+# PREFIX mention in prose ("all property keys use the ... prefix").
+hoodie.streamer.schemaprovider
+
+# Mentioned only in negation prose: config-templates.md states this key DOES NOT
+# EXIST (published BigQuery docs list it; the table location comes from the
+# standard base-path config instead). The mention warns users away from it.
+hoodie.gcp.bigquery.sync.base_path