:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(data-catalog): Simplify 'AI provenance' descriptions (#119512)
Sinan Kucukkoseler7a801ea80cd4
diff --git a/posthog/hogql/database/schema/information_schema.py b/posthog/hogql/database/schema/information_schema.pyindex 4d5871c27d3e..a34837ef68da 100644--- a/posthog/hogql/database/schema/information_schema.py+++ b/posthog/hogql/database/schema/information_schema.py@@ -1900,7 +1900,11 @@ class InformationSchemaMetricsTable(InformationSchemaTable):"confidence": FloatDatabaseField(name="confidence", nullable=True, description="AI author's confidence for a proposed metric, 0-1."),- "reasoning": _string_field("reasoning", nullable=True, description="AI author's reasoning, review context."),+ "reasoning": _string_field(+ "reasoning",+ nullable=True,+ description="AI author's design decisions and trade-offs behind the definition, as review context.",+ ),"source_insight_short_id": _string_field("source_insight_short_id",nullable=True,diff --git a/products/data_catalog/backend/logic/validation.py b/products/data_catalog/backend/logic/validation.pyindex 5c4101d78464..3e8b60282bd8 100644--- a/products/data_catalog/backend/logic/validation.py+++ b/products/data_catalog/backend/logic/validation.py@@ -44,8 +44,8 @@ MAX_MARKDOWN_DEFINITION_LENGTH = 20_000MAX_DESCRIPTION_LENGTH = 300DESCRIPTION_TOO_LONG_MESSAGE = (f"Description is too long. Say what the metric is in 1-2 short sentences, under {MAX_DESCRIPTION_LENGTH} "- "characters. Leave out source tables, lineage, column lists, and comparisons with other metrics; put query "- "rationale in 'reasoning'."+ "characters. Leave out source tables, lineage, column lists, and comparisons with other metrics; put the "+ "query's design decisions in 'reasoning'.")# HogQLQuery carries fields that would let a caller bypass team query controls (a raw ClickHousediff --git a/products/data_catalog/backend/presentation/serializers.py b/products/data_catalog/backend/presentation/serializers.pyindex 693140cb6077..4e485906982e 100644--- a/products/data_catalog/backend/presentation/serializers.py+++ b/products/data_catalog/backend/presentation/serializers.py@@ -186,7 +186,7 @@ class MetricSerializer(serializers.ModelSerializer):"help_text": "What the number is, in 1-2 short sentences under 300 characters: its meaning and ""grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, ""column lists, and comparisons with other metrics. Never narrate the query - the definition carries "- "the mechanics; put rationale for query choices in 'reasoning'.",+ "the mechanics; put the query's design decisions in 'reasoning'.","max_length": MAX_DESCRIPTION_LENGTH,"error_messages": {"max_length": DESCRIPTION_TOO_LONG_MESSAGE},},@@ -197,7 +197,12 @@ class MetricSerializer(serializers.ModelSerializer):"min_value": 0.0,"max_value": 1.0,},- "reasoning": {"help_text": "AI author's reasoning, surfaced as review context."},+ "reasoning": {+ "help_text": "Why the definition is shaped this way, in 1-3 short sentences. Name the main design "+ "decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an "+ "approximation. Leave out the use case, who asked, run results, validation figures, and edit "+ "history."+ },}@extend_schema_field(serializers.CharField(allow_null=True))diff --git a/products/data_catalog/frontend/generated/api.schemas.ts b/products/data_catalog/frontend/generated/api.schemas.tsindex 9bba2a32d946..a0fd00b9ecd4 100644--- a/products/data_catalog/frontend/generated/api.schemas.ts+++ b/products/data_catalog/frontend/generated/api.schemas.ts@@ -167,7 +167,7 @@ export interface DataCatalogMetricApi {*/display_name?: string/**- * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.+ * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.* @maxLength 300*/description: string@@ -229,7 +229,7 @@ export interface DataCatalogMetricApi {* @nullable*/confidence?: number | null- /** AI author's reasoning, surfaced as review context. */+ /** Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. */reasoning?: string/** User who first created this metric. */readonly created_by: UserBasicApi@@ -267,7 +267,7 @@ export interface PatchedDataCatalogMetricApi {*/display_name?: string/**- * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.+ * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.* @maxLength 300*/description?: string@@ -329,7 +329,7 @@ export interface PatchedDataCatalogMetricApi {* @nullable*/confidence?: number | null- /** AI author's reasoning, surfaced as review context. */+ /** Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. */reasoning?: string/** User who first created this metric. */readonly created_by?: UserBasicApidiff --git a/products/data_catalog/frontend/generated/api.zod.ts b/products/data_catalog/frontend/generated/api.zod.tsindex db8c939d3c61..9e9f7c6dca84 100644--- a/products/data_catalog/frontend/generated/api.zod.ts+++ b/products/data_catalog/frontend/generated/api.zod.ts@@ -67,7 +67,7 @@ export const DataCatalogMetricsCreateBody = /* @__PURE__ */ zod.object({.string().max(dataCatalogMetricsCreateBodyDescriptionMax).describe(- "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'."+ "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'."),unit: zod.string()@@ -103,7 +103,12 @@ export const DataCatalogMetricsCreateBody = /* @__PURE__ */ zod.object({.max(dataCatalogMetricsCreateBodyConfidenceMax).nullish().describe("AI author's confidence in the proposal, 0-1."),- reasoning: zod.string().optional().describe("AI author's reasoning, surfaced as review context."),+ reasoning: zod+ .string()+ .optional()+ .describe(+ 'Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.'+ ),})/**@@ -142,7 +147,7 @@ export const DataCatalogMetricsUpdateBody = /* @__PURE__ */ zod.object({.string().max(dataCatalogMetricsUpdateBodyDescriptionMax).describe(- "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'."+ "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'."),unit: zod.string()@@ -178,7 +183,12 @@ export const DataCatalogMetricsUpdateBody = /* @__PURE__ */ zod.object({.max(dataCatalogMetricsUpdateBodyConfidenceMax).nullish().describe("AI author's confidence in the proposal, 0-1."),- reasoning: zod.string().optional().describe("AI author's reasoning, surfaced as review context."),+ reasoning: zod+ .string()+ .optional()+ .describe(+ 'Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.'+ ),})/**@@ -219,7 +229,7 @@ export const DataCatalogMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({.max(dataCatalogMetricsPartialUpdateBodyDescriptionMax).optional().describe(- "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'."+ "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'."),unit: zod.string()@@ -255,7 +265,12 @@ export const DataCatalogMetricsPartialUpdateBody = /* @__PURE__ */ zod.object({.max(dataCatalogMetricsPartialUpdateBodyConfidenceMax).nullish().describe("AI author's confidence in the proposal, 0-1."),- reasoning: zod.string().optional().describe("AI author's reasoning, surfaced as review context."),+ reasoning: zod+ .string()+ .optional()+ .describe(+ 'Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.'+ ),})/**diff --git a/products/data_catalog/mcp/tools.yaml b/products/data_catalog/mcp/tools.yamlindex 456cf48f27f7..346f9114b51a 100644--- a/products/data_catalog/mcp/tools.yaml+++ b/products/data_catalog/mcp/tools.yaml@@ -114,12 +114,15 @@ tools:offering to save it as a proposed metric. Keep 'description' to 1-2 short sentences under 300 characters:what the number is and its grain, plus any inclusion or exclusion that changes it. Leave out source tablesor views, lineage, column lists, upstream corrections, and comparisons with or pointers to other metrics.- Never walk through the query or calculation steps (the definition carries those); put rationale for the- chosen definition in 'reasoning'. Before creating a metric, inspect the complete catalog with metric-list- and inspect a candidate's definition with metric-describe when it may be reusable. When the metric comes- from an existing saved insight, pass that insight's 'source_insight_short_id' instead of copying its query- into 'definition' - the two are mutually exclusive. The server snapshots the insight's query, tracks drift- against it, and the metric then links back to the insight so a person can edit the query where it lives.+ Never walk through the query or calculation steps (the definition carries those). Put why the definition is+ shaped this way in 'reasoning', in 1-3 short sentences: the main design decisions and trade-offs, such as+ the source table or view, a filter or exclusion, the grain, or an approximation. Leave out the use case, who+ asked, run results, validation figures, and edit history. Before creating a metric, inspect the complete+ catalog with metric-list and inspect a candidate's definition with metric-describe when it may be reusable.+ When the metric comes from an existing saved insight, pass that insight's 'source_insight_short_id' instead+ of copying its query into 'definition' - the two are mutually exclusive. The server snapshots the insight's+ query, tracks drift against it, and the metric then links back to the insight so a person can edit the query+ where it lives.exclude_params:- created_sourceinject_body:@@ -192,7 +195,9 @@ tools:rename the metric: the old name is freed for reuse, and anything that referenced it (saved SQL, run URLs,later tool calls) must switch to the new name. When editing 'description', keep it to 1-2 short sentencesunder 300 characters: what the number is and its grain. Leave out source tables or views, lineage, column- lists, and comparisons with other metrics; rationale for the definition belongs in 'reasoning'.+ lists, and comparisons with other metrics. When editing 'definition', rewrite 'reasoning' to say why the new+ definition is shaped this way, in 1-3 short sentences: the main design decisions and trade-offs. It is not a+ changelog: leave out what changed, the use case, who asked, and run results.exclude_params:- created_sourceinject_body:diff --git a/products/data_catalog/skills/setting-up-data-catalog/SKILL.md b/products/data_catalog/skills/setting-up-data-catalog/SKILL.mdindex d2b6dfbeeb06..7684d0b21b63 100644--- a/products/data_catalog/skills/setting-up-data-catalog/SKILL.md+++ b/products/data_catalog/skills/setting-up-data-catalog/SKILL.md@@ -52,8 +52,10 @@ Work top-down, stopping at `proposed` for everything (a human promotes later):have seen reused at least twice. Give each a `description` (the load-bearing field) of 1-2 shortsentences under 300 characters: what the number is and its grain, plus any inclusion or exclusionthat changes it. Leave out source tables or views, lineage, column lists, and comparisons with- other metrics, and never narrate the query. Query rationale goes in `reasoning`,- the mechanics in the definition. Also give a `unit`, and a definition when one exists. A definition+ other metrics, and never narrate the query. `reasoning` holds why the definition is shaped this way,+ in 1-3 short sentences: the main design decisions and trade-offs. Leave out the use case, who asked,+ run results, and edit history. The mechanics go in the definition. Also give a `unit`, and a+ definition when one exists. A definitioncan be an executable query, or - when the calculation needs judgment or steps that don't reduce to asingle query - an agent-calculated markdown definition(`{kind: 'MarkdownDefinition', markdown: '<numbered steps>'}`).diff --git a/services/mcp/schema/generated-tool-definitions.json b/services/mcp/schema/generated-tool-definitions.jsonindex 13558db99476..b491889f1cf7 100644--- a/services/mcp/schema/generated-tool-definitions.json+++ b/services/mcp/schema/generated-tool-definitions.json@@ -4093,7 +4093,7 @@}},"data-catalog-metric-create": {- "description": "Create a canonical metric, or refine the live one already holding this name (upsert on name; always lands 'proposed'). A deleted metric's name is available again - creating with it starts a fresh metric with no history carried over. The definition can be an executable query (HogQLQuery / TrendsQuery / FunnelsQuery / an event node) that the query runner computes, OR an agent-calculated markdown definition - {\"kind\": \"MarkdownDefinition\", \"markdown\": \"<numbered steps to calculate the metric>\"} - which an agent follows to produce the number. Prefer an executable definition when the metric is deterministic; use a markdown definition when the calculation needs judgment or multiple steps. Only propose a definition that was explicitly asked for or that you have seen reused at least twice - do not speculatively catalog one-off queries. If you derived a number or settled a definition and no metric exists for it, end your answer by offering to save it as a proposed metric. Keep 'description' to 1-2 short sentences under 300 characters: what the number is and its grain, plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, upstream corrections, and comparisons with or pointers to other metrics. Never walk through the query or calculation steps (the definition carries those); put rationale for the chosen definition in 'reasoning'. Before creating a metric, inspect the complete catalog with metric-list and inspect a candidate's definition with metric-describe when it may be reusable. When the metric comes from an existing saved insight, pass that insight's 'source_insight_short_id' instead of copying its query into 'definition' - the two are mutually exclusive. The server snapshots the insight's query, tracks drift against it, and the metric then links back to the insight so a person can edit the query where it lives.",+ "description": "Create a canonical metric, or refine the live one already holding this name (upsert on name; always lands 'proposed'). A deleted metric's name is available again - creating with it starts a fresh metric with no history carried over. The definition can be an executable query (HogQLQuery / TrendsQuery / FunnelsQuery / an event node) that the query runner computes, OR an agent-calculated markdown definition - {\"kind\": \"MarkdownDefinition\", \"markdown\": \"<numbered steps to calculate the metric>\"} - which an agent follows to produce the number. Prefer an executable definition when the metric is deterministic; use a markdown definition when the calculation needs judgment or multiple steps. Only propose a definition that was explicitly asked for or that you have seen reused at least twice - do not speculatively catalog one-off queries. If you derived a number or settled a definition and no metric exists for it, end your answer by offering to save it as a proposed metric. Keep 'description' to 1-2 short sentences under 300 characters: what the number is and its grain, plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, upstream corrections, and comparisons with or pointers to other metrics. Never walk through the query or calculation steps (the definition carries those). Put why the definition is shaped this way in 'reasoning', in 1-3 short sentences: the main design decisions and trade-offs, such as the source table or view, a filter or exclusion, the grain, or an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. Before creating a metric, inspect the complete catalog with metric-list and inspect a candidate's definition with metric-describe when it may be reusable. When the metric comes from an existing saved insight, pass that insight's 'source_insight_short_id' instead of copying its query into 'definition' - the two are mutually exclusive. The server snapshots the insight's query, tracks drift against it, and the metric then links back to the insight so a person can edit the query where it lives.","category": "Data catalog","feature": "data_catalog","summary": "Create or refine a catalog metric",@@ -4152,7 +4152,7 @@}},"data-catalog-metric-update": {- "description": "Update a metric's fields. 'name' picks the metric to update. Editing an approved metric's definition, description, unit, or name resets it to 'proposed' (it must be re-approved by a human). Pass 'new_name' to rename the metric: the old name is freed for reuse, and anything that referenced it (saved SQL, run URLs, later tool calls) must switch to the new name. When editing 'description', keep it to 1-2 short sentences under 300 characters: what the number is and its grain. Leave out source tables or views, lineage, column lists, and comparisons with other metrics; rationale for the definition belongs in 'reasoning'.",+ "description": "Update a metric's fields. 'name' picks the metric to update. Editing an approved metric's definition, description, unit, or name resets it to 'proposed' (it must be re-approved by a human). Pass 'new_name' to rename the metric: the old name is freed for reuse, and anything that referenced it (saved SQL, run URLs, later tool calls) must switch to the new name. When editing 'description', keep it to 1-2 short sentences under 300 characters: what the number is and its grain. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. When editing 'definition', rewrite 'reasoning' to say why the new definition is shaped this way, in 1-3 short sentences: the main design decisions and trade-offs. It is not a changelog: leave out what changed, the use case, who asked, and run results.","category": "Data catalog","feature": "data_catalog","summary": "Update a catalog metric",diff --git a/services/mcp/schema/tool-definitions-all.json b/services/mcp/schema/tool-definitions-all.jsonindex 6862993d8f53..49f38601afb8 100644--- a/services/mcp/schema/tool-definitions-all.json+++ b/services/mcp/schema/tool-definitions-all.json@@ -4108,7 +4108,7 @@}},"data-catalog-metric-create": {- "description": "Create a canonical metric, or refine the live one already holding this name (upsert on name; always lands 'proposed'). A deleted metric's name is available again - creating with it starts a fresh metric with no history carried over. The definition can be an executable query (HogQLQuery / TrendsQuery / FunnelsQuery / an event node) that the query runner computes, OR an agent-calculated markdown definition - {\"kind\": \"MarkdownDefinition\", \"markdown\": \"<numbered steps to calculate the metric>\"} - which an agent follows to produce the number. Prefer an executable definition when the metric is deterministic; use a markdown definition when the calculation needs judgment or multiple steps. Only propose a definition that was explicitly asked for or that you have seen reused at least twice - do not speculatively catalog one-off queries. If you derived a number or settled a definition and no metric exists for it, end your answer by offering to save it as a proposed metric. Keep 'description' to 1-2 short sentences under 300 characters: what the number is and its grain, plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, upstream corrections, and comparisons with or pointers to other metrics. Never walk through the query or calculation steps (the definition carries those); put rationale for the chosen definition in 'reasoning'. Before creating a metric, inspect the complete catalog with metric-list and inspect a candidate's definition with metric-describe when it may be reusable. When the metric comes from an existing saved insight, pass that insight's 'source_insight_short_id' instead of copying its query into 'definition' - the two are mutually exclusive. The server snapshots the insight's query, tracks drift against it, and the metric then links back to the insight so a person can edit the query where it lives.",+ "description": "Create a canonical metric, or refine the live one already holding this name (upsert on name; always lands 'proposed'). A deleted metric's name is available again - creating with it starts a fresh metric with no history carried over. The definition can be an executable query (HogQLQuery / TrendsQuery / FunnelsQuery / an event node) that the query runner computes, OR an agent-calculated markdown definition - {\"kind\": \"MarkdownDefinition\", \"markdown\": \"<numbered steps to calculate the metric>\"} - which an agent follows to produce the number. Prefer an executable definition when the metric is deterministic; use a markdown definition when the calculation needs judgment or multiple steps. Only propose a definition that was explicitly asked for or that you have seen reused at least twice - do not speculatively catalog one-off queries. If you derived a number or settled a definition and no metric exists for it, end your answer by offering to save it as a proposed metric. Keep 'description' to 1-2 short sentences under 300 characters: what the number is and its grain, plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, upstream corrections, and comparisons with or pointers to other metrics. Never walk through the query or calculation steps (the definition carries those). Put why the definition is shaped this way in 'reasoning', in 1-3 short sentences: the main design decisions and trade-offs, such as the source table or view, a filter or exclusion, the grain, or an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. Before creating a metric, inspect the complete catalog with metric-list and inspect a candidate's definition with metric-describe when it may be reusable. When the metric comes from an existing saved insight, pass that insight's 'source_insight_short_id' instead of copying its query into 'definition' - the two are mutually exclusive. The server snapshots the insight's query, tracks drift against it, and the metric then links back to the insight so a person can edit the query where it lives.","category": "Data catalog","feature": "data_catalog","summary": "Create or refine a catalog metric",@@ -4167,7 +4167,7 @@}},"data-catalog-metric-update": {- "description": "Update a metric's fields. 'name' picks the metric to update. Editing an approved metric's definition, description, unit, or name resets it to 'proposed' (it must be re-approved by a human). Pass 'new_name' to rename the metric: the old name is freed for reuse, and anything that referenced it (saved SQL, run URLs, later tool calls) must switch to the new name. When editing 'description', keep it to 1-2 short sentences under 300 characters: what the number is and its grain. Leave out source tables or views, lineage, column lists, and comparisons with other metrics; rationale for the definition belongs in 'reasoning'.",+ "description": "Update a metric's fields. 'name' picks the metric to update. Editing an approved metric's definition, description, unit, or name resets it to 'proposed' (it must be re-approved by a human). Pass 'new_name' to rename the metric: the old name is freed for reuse, and anything that referenced it (saved SQL, run URLs, later tool calls) must switch to the new name. When editing 'description', keep it to 1-2 short sentences under 300 characters: what the number is and its grain. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. When editing 'definition', rewrite 'reasoning' to say why the new definition is shaped this way, in 1-3 short sentences: the main design decisions and trade-offs. It is not a changelog: leave out what changed, the use case, who asked, and run results.","category": "Data catalog","feature": "data_catalog","summary": "Update a catalog metric",diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 1d229f09f2ec..6e419587f97e 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -28736,7 +28736,7 @@ export namespace Schemas {*/display_name?: string;/**- * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.+ * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.* @maxLength 300*/description: string;@@ -28798,7 +28798,7 @@ export namespace Schemas {* @nullable*/confidence?: number | null;- /** AI author's reasoning, surfaced as review context. */+ /** Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. */reasoning?: string;/** User who first created this metric. */readonly created_by: UserBasic;@@ -81463,7 +81463,7 @@ export namespace Schemas {*/display_name?: string;/**- * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.+ * What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.* @maxLength 300*/description?: string;@@ -81525,7 +81525,7 @@ export namespace Schemas {* @nullable*/confidence?: number | null;- /** AI author's reasoning, surfaced as review context. */+ /** Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history. */reasoning?: string;/** User who first created this metric. */readonly created_by?: UserBasic;diff --git a/services/mcp/src/generated/data_catalog/api.ts b/services/mcp/src/generated/data_catalog/api.tsindex 2e1d657a308a..95740162b5d3 100644--- a/services/mcp/src/generated/data_catalog/api.ts+++ b/services/mcp/src/generated/data_catalog/api.ts@@ -125,7 +125,7 @@ export const DataCatalogMetricsCreateBody = () => zod.object({.string().max(dataCatalogMetricsCreateBodyDescriptionMax).describe(- "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'."+ "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'."),unit: zod.string()@@ -154,7 +154,12 @@ export const DataCatalogMetricsCreateBody = () => zod.object({.max(dataCatalogMetricsCreateBodyConfidenceMax).nullish().describe("AI author's confidence in the proposal, 0-1."),- reasoning: zod.string().optional().describe("AI author's reasoning, surfaced as review context."),+ reasoning: zod+ .string()+ .optional()+ .describe(+ 'Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.'+ ),})/**@@ -216,7 +221,7 @@ export const DataCatalogMetricsPartialUpdateBody = () => zod.object({.max(dataCatalogMetricsPartialUpdateBodyDescriptionMax).optional().describe(- "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'."+ "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'."),unit: zod.string()@@ -245,7 +250,12 @@ export const DataCatalogMetricsPartialUpdateBody = () => zod.object({.max(dataCatalogMetricsPartialUpdateBodyConfidenceMax).nullish().describe("AI author's confidence in the proposal, 0-1."),- reasoning: zod.string().optional().describe("AI author's reasoning, surfaced as review context."),+ reasoning: zod+ .string()+ .optional()+ .describe(+ 'Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.'+ ),})/**diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-create.jsonindex 5172c091421c..175843a56574 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-create.json@@ -35,7 +35,7 @@"description": "Machine-readable query. Omit for a name+description-only stub. Stored upgrade-canonical."},"description": {- "description": "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.",+ "description": "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.","maxLength": 300,"type": "string"},@@ -51,7 +51,7 @@"type": "string"},"reasoning": {- "description": "AI author's reasoning, surfaced as review context.",+ "description": "Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.","type": "string"},"source_insight_short_id": {diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-update.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-update.jsonindex 366669a23042..43a1f85dafc9 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-update.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/data-catalog-metric-update.json@@ -35,7 +35,7 @@"description": "Machine-readable query. Omit for a name+description-only stub. Stored upgrade-canonical."},"description": {- "description": "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put rationale for query choices in 'reasoning'.",+ "description": "What the number is, in 1-2 short sentences under 300 characters: its meaning and grain plus any inclusion or exclusion that changes it. Leave out source tables or views, lineage, column lists, and comparisons with other metrics. Never narrate the query - the definition carries the mechanics; put the query's design decisions in 'reasoning'.","maxLength": 300,"type": "string"},@@ -54,7 +54,7 @@"type": "string"},"reasoning": {- "description": "AI author's reasoning, surfaced as review context.",+ "description": "Why the definition is shaped this way, in 1-3 short sentences. Name the main design decisions and trade-offs: the source table or view, a filter or exclusion, the grain, an approximation. Leave out the use case, who asked, run results, validation figures, and edit history.","type": "string"},"source_insight_short_id": {