@malloy-publisher/skills 0.1.58 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. package/package.json +1 -1
  2. package/skills/eval-answer/SKILL.md +1 -1
  3. package/skills/eval-diagnose/SKILL.md +1 -1
  4. package/skills/eval-import/SKILL.md +1 -1
  5. package/skills/eval-improve/SKILL.md +1 -1
  6. package/skills/eval-judge/SKILL.md +1 -1
  7. package/skills/eval-loop/SKILL.md +1 -1
  8. package/skills/eval-loop/templates/eval-run-package/README.md +5 -7
  9. package/skills/eval-report/SKILL.md +1 -1
  10. package/skills/malloy-analysis/SKILL.md +1 -1
  11. package/skills/malloy-analysis-report/SKILL.md +1 -1
  12. package/skills/malloy-charts/SKILL.md +1 -1
  13. package/skills/malloy-classify/SKILL.md +1 -1
  14. package/skills/malloy-compliance-review/SKILL.md +1 -1
  15. package/skills/malloy-dashboards/SKILL.md +1 -1
  16. package/skills/malloy-define/SKILL.md +1 -1
  17. package/skills/malloy-define-agent/SKILL.md +1 -1
  18. package/skills/malloy-discover/SKILL.md +1 -1
  19. package/skills/malloy-document/SKILL.md +1 -1
  20. package/skills/malloy-excel-review/SKILL.md +1 -1
  21. package/skills/malloy-getting-started/SKILL.md +1 -1
  22. package/skills/malloy-gotchas-modeling/SKILL.md +1 -1
  23. package/skills/malloy-html-data-apps/SKILL.md +1 -1
  24. package/skills/malloy-lookml-review/SKILL.md +1 -1
  25. package/skills/malloy-materialization/SKILL.md +2 -2
  26. package/skills/malloy-materialization/reference/chaining.md +6 -6
  27. package/skills/malloy-materialization/reference/refresh.md +8 -3
  28. package/skills/malloy-model/SKILL.md +2 -2
  29. package/skills/malloy-model-as-you-go/SKILL.md +1 -1
  30. package/skills/malloy-modeling/SKILL.md +1 -1
  31. package/skills/malloy-notebooks/SKILL.md +1 -1
  32. package/skills/malloy-phrase-detection/SKILL.md +1 -1
  33. package/skills/malloy-powerbi-review/SKILL.md +1 -1
  34. package/skills/malloy-publish/SKILL.md +1 -1
  35. package/skills/malloy-queries/SKILL.md +1 -1
  36. package/skills/malloy-reports/SKILL.md +1 -2
  37. package/skills/malloy-reports/reference/linear.md +2 -0
  38. package/skills/malloy-review/SKILL.md +1 -1
  39. package/skills/malloy-run-agent/SKILL.md +1 -1
  40. package/skills/malloy-source-unreachable/SKILL.md +1 -1
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@malloy-publisher/skills",
3
3
  "description": "Agent skills for Malloy and the Malloy Publisher",
4
- "version": "0.1.58",
4
+ "version": "0.1.60",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "dist/index.js",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-answer
3
3
  description: 'Score one analytical answer against a verified golden, and score which of the entities the golden depends on retrieval delivered to the answerer. Run the contamination checklist, re-execute the submitted query yourself, then spawn a judge subagent per skill:eval-judge. Append attempt, tool_call, score, and retrieval_score events to the file ledger (reference/ledger-schema.md). Never explain the failure (eval-diagnose) or edit the model (eval-improve). Use when asked whether an answer was correct, to score a run, or to baseline a model.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # Evaluate One Answer
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-diagnose
3
3
  description: 'Diagnose why a scored answer failed and who owns the fix, then cluster the failures by shared root cause. Walk dataset, agent-call, get_context/model, get_context/retrieval, construction, then model-definition. Append issue events to the file ledger, linked by traceId, one per cluster. Use after eval-answer, when triaging a run, or before changing a model. Does not edit the model (eval-improve).'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # Diagnose One Answer
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-import
3
3
  description: 'Turn a list of questions into an eval set, whatever shape it arrived in: a JSONL a customer sent, a CSV, a spreadsheet export, a markdown doc, an email thread, or a pull from production logs. Classify each item by what came WITH the question (a query, a number, prose criteria, or nothing), write cases.jsonl and set.json per reference/case-format.md, keep the file as it arrived, and seal each question so a later edit is detectable. Never marks a value-bearing golden verified and never invents a question. Use when questions arrive from outside and need to become a set, or before the first run against a set nobody here authored.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # Import questions into an eval set
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-improve
3
3
  description: 'Make the smallest safe edit that closes a diagnosed gap the model repo owns: a Malloy model edit, or a package skill under skills/. Every factual claim carries a probe receipt. Use after eval-diagnose, or when asked to fix a model so an agent can discover the right answer. Never accepts its own edit; the acceptance check belongs to eval-loop. Does not decide whether an answer was wrong (eval-answer) or why (eval-diagnose).'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # Improve the Model
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-judge
3
3
  description: 'Decide whether ONE answer matches its golden, and say whether you believe the golden. Read this before emitting any verdict. Covers containment, column pairing, near_match, refusals, and the gold_status judgement. Use when scoring an attempt in an evaluation run; never to conduct a run (eval-loop), diagnose a failure (eval-diagnose) or edit a model (eval-improve).'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # The judge
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-loop
3
3
  description: 'Conduct a local Publisher evaluation loop in five steps: scrape/run, eval, diagnose, improve, checkpoint. You are the conductor: import cases into the file ledger, spawn a blind answerer, then run eval-answer, eval-diagnose, and eval-improve. Persistence is plain files: the set in the model package''s evals/ directory, runs in the set''s workdir; checkpoints are git commits of the model repo. `eval.py` runs each step from the set''s eval.toml. Use to score a model, diagnose failures, improve behind an acceptance check, or roll back a bad direction.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # The Evaluation Loop
@@ -146,17 +146,15 @@ file:
146
146
 
147
147
  ```bash
148
148
  curl -s .../api/v0/environments/<env>/packages/<pkg>/models # compiles the model
149
- curl -s .../api/v0/environments/<env>/packages/<pkg>/notebooks # lists the notebook
149
+ curl -s .../api/v0/environments/<env>/packages/<pkg>/reports # lists the report
150
150
  ```
151
151
 
152
152
  `models` returns a 424 with the full compiler error when the Malloy is broken,
153
- which is the fastest way to see a compile failure. Notebooks are listed by
154
- `notebooks` and are **not** in the `models` list. A `.malloy` notebook still compiles
153
+ which is the fastest way to see a compile failure. Reports are listed by
154
+ `reports`, and a linear report is **not** in the `models` list. It still compiles
155
155
  as a model, so `models/notebooks/eval_run.malloy` shows its compile errors; only a
156
- legacy `.malloynb` returns `404 "<file> is a notebook"` there. A notebook fetched from `notebooks/<file>` reports
157
- its cells' compiled schemas under `modelInfo`, but only the cells it treats as
158
- anonymous queries -- do not read a low count there as cells failing to compile. To
159
- verify every cell, run each named query through `execute_query`.
156
+ legacy `.malloynb` returns `404 "<file> is a notebook"` there. To verify every
157
+ tile, run each named query through `execute_query`.
160
158
 
161
159
  Pass `--mcp_port` explicitly. It defaults to 4040 and any other local Publisher
162
160
  already holds it; the server logs `Port 4040 in use` and carries on without an MCP
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: eval-report
3
3
  description: 'Write the summary a person reads after an evaluation run: what ran, what it scored, which failures were the MODEL and which were the EVAL itself (out of turns, contaminated, unestablished golden, unreadable judge), what was learned, and what to do next. Every claim links to the artifact behind it. Use at the end of any run, before quoting a number to anyone. Never scores an answer (eval-answer) or decides who owns a failure (eval-diagnose).'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  # Report a Run
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-analysis
3
3
  description: "Read before your first get_context call on any business or data question. The required workflow, not background: which source, which rows, how to verify. Skipping it causes confident wrong answers."
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!-- Copyright (c) Credible Data Inc. SPDX-License-Identifier: MIT -->
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-analysis-report
3
3
  description: Combine validated Malloy queries into a report (a linear report, read top to bottom). Use when the user asks to "create a report", "combine these into a report", or wants a persistent multi-query artifact.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-charts
3
3
  description: Read before choosing a chart or adding a chart annotation. Chart types, tag syntax and scale rules, KPI cards, dashboards, sparklines, and the renderer mistakes that fail silently.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-classify
3
3
  description: 'Propose #(classification) annotations for a Malloy model from an access policy''s class scheme, backed by aggregate value evidence from the served data, and show them as a diff before writing anything. Use when the user asks to "classify the model", "tag PHI/PII", "label sensitive fields", or adds fields to a package that a policy governs, and before running malloy-compliance-review on a model nobody has classified.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-compliance-review
3
3
  description: 'Check a Malloy package and its controls against a written access policy: turn the policy''s prose into a control register, run compliance.py check against a served package (structure, access as each role, and the values themselves), judge what needs a person, and produce a report and a signable attestation. Use when the user asks whether a model "complies with", "satisfies" or "meets" a policy, HIPAA, SOC 2, PCI or the like, asks for a compliance review or attestation, or wants the review in CI.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-dashboards
3
3
  description: "Renamed to malloy-reports. A dashboard is now a report with layout=grid: a .malloy file with an ## artifact tag, written at the package root. Load malloy-reports instead when the user asks for a dashboard, a filterable view, or drill-through between views."
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-define
3
3
  description: Propose scope, a source plan and field definitions for a Malloy model. Which tables and questions, which sources at what grain, then renames, dimensions and measures, each backed by querying data.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-define-agent
3
3
  description: Define a package agent - a named brief, with its own skills, optional schedules and a run budget, declared in a package's publisher.json. Use when the user asks to create, add, change or fix an agent in a package, or wants a recurring or unattended job. Not for adopting an agent that already exists (that is malloy-run-agent), and not for a one-off question, which you just answer.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-discover
3
3
  description: Silent data discovery for Malloy modeling. Used at Step 1 of the modeling workflow. Scans tables, columns, distributions, and relationships without user interaction. The agent builds an internal picture before presenting anything.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-document
3
3
  description: 'Add documentation with #(doc) tags to Malloy models so fields and sources are described in plain language. Use when user asks to "add documentation", "add doc tags", "document the model", or wants fields and sources described for natural-language search and discovery. For runtime filters, declare given: parameters (see the malloy-model skill); #(filter) is deprecated. Filters are a runtime/modeling construct (governance, latency, correctness), not a documentation tag.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-excel-review
3
3
  description: Move an Excel workbook (.xlsx or .xlsm) onto Malloy - recover the model hiding in its cells, translate its formulas and pivots, and prove the numbers match against the values the file already stores. Use when a workbook is present, when a user wants to migrate or switch off a spreadsheet, and whenever a specific formula has to become Malloy - SUMIFS, COUNTIF, SUMPRODUCT, VLOOKUP, XLOOKUP, INDEX/MATCH, pivot tables, assumption cells, roll-forwards, circular references, Monte Carlo, or a Power Pivot model. Carries worked recipes, each labelled executed or semantics-cited in place, and states what each port costs. Works with or without a database connection.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-getting-started
3
3
  description: First steps for using a Malloy Publisher deployment through its MCP tools. Use when connecting to Publisher for the first time, when you do not yet know the available environments, packages, or models, or when a user asks what data they can explore. Also use for "malloy help" or which Malloy skill to read. Covers verifying the server, discovering data with get_context, and running a first grounded query.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-gotchas-modeling
3
3
  description: Malloy modeling mistakes and compile-error fixes. Read before writing sources, dimensions, measures or joins, and when a .malloy file will not compile. Reserved words, NULLs, dates, field access.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-html-data-apps
3
3
  description: "Build or modify an in-package HTML data app for a Malloy Publisher package (a public/ directory the package serves): design it, write its Publisher.query code, embed it. Hand-authored, no build step."
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-lookml-review
3
3
  description: Analyze LookML files as prior art for Malloy modeling. Used during Step 1 (DISCOVER) when .lkml files are present. Coordinates reference files that extract business logic, relationships, and curation decisions. Works with or without a database connection.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-materialization
3
3
  description: Add, confirm and debug Malloy Persistence materializations in a package - persist an expensive source so queries read a pre-built table, in the source's own warehouse or in a storage destination. Read this whenever the user wants to materialize a source, add a persist annotation, speed up a slow source, build one stored rollup over another, tune what to persist, or asks why a persist source isn't building or isn't being read.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -19,7 +19,7 @@ This file is the core. The details live beside it, one topic per file, and each
19
19
  - `reference/annotation.md` - the `#@ persist` tag: what can carry it, the name rules, identity and reuse, readers of a persisted source, and every option with where it is explained.
20
20
  - `reference/policy.md` - the `publisher.json` block: `scope`, `queryMetadata`, and where the rules are enforced.
21
21
  - `reference/storage.md` - building into a **storage destination** (`storage=`), where a given may sit, which sources that tier refuses, and how a stored table is served.
22
- - `reference/chaining.md` - one stored source built **over another stored source**: what makes it reuse the parent's table or recompute from the warehouse, and how to read which happened.
22
+ - `reference/chaining.md` - one stored source built **over another stored source**: what makes it build over the parent's table, why one that cannot is refused rather than recomputed from the warehouse, and how to read what happened.
23
23
  - `reference/refresh.md` - keeping a table current: `freshness`, `schedule`, and `refresh="incremental"`.
24
24
  - `reference/access-filter.md` - persisting a `#(access_filter)`-gated source, and the bound on a stale access decision.
25
25
  - `reference/tuning.md` - reading the materialization history to decide what to persist, stop persisting, or reschedule (recommendations only).
@@ -21,12 +21,12 @@ The downstream need not name the upstream directly. Non-persisted sources betwee
21
21
 
22
22
  1. **Declare the stored roots before the sources that read them.** Malloy resolves names in file order. A rollup rewired to read a stored root that is declared further down fails to compile with `Reference to undefined object`, and so does everything after it. When you chain an existing package onto its roots, move the roots up.
23
23
  2. **An extension of a stored source is the same table, not a new one.** `rollup_base is daily_orders extend { ... }` inherits the parent's persist tag and the same content address, so the publisher treats the two names as one build target. To make a distinct non-persisted intermediate, pipe through a query first: `rollup_base is daily_orders -> { select: * } extend { ... }`. (A host that checks persist names for collisions can refuse the bare `extend` outright, since two names now point at one table.)
24
- 3. **Every join on the path must land on a stored table.** An intermediate that joins a source nothing materializes - a `join_cross: sp is species_live` where only `species_base` is stored - reaches the warehouse, and the whole downstream is recomputed from the warehouse with the upstream inlined. Point the join at the stored sibling instead.
24
+ 3. **Every join on the path must land on a stored table.** An intermediate that joins a source nothing materializes - a `join_cross: sp is species_live` where only `species_base` is stored - reaches the warehouse, and the downstream is refused (no engine reads both the lake and the warehouse), never recomputed from the warehouse with the upstream inlined. Point the join at the stored sibling instead.
25
25
  4. **A chained build runs in the destination's engine, under its memory bound.** The rows are read from the lake and rolled up in DuckDB with the build session's `memory_limit`. A grouped rollup fits; a self-join or a wide hash aggregate over a large fact may not, and fails with DuckDB's `Out of Memory Error` on every attempt. Such a source belongs in the warehouse: keep its input unpersisted so it is built there and only its result is copied in. Placement is a cost decision the build does not make for you.
26
26
 
27
27
  ## What the build does when it cannot reuse
28
28
 
29
- If the downstream cannot be built over the stored tables - it reaches the warehouse through an intermediate (rule 3), or reads a field on the parent that is not a stored column - the publisher **recomputes the upstream from the warehouse**, inlining it, and the build succeeds. Under `strictUpstreams` (what an orchestrating host sets on every build) this is the **one** recompute strict permits, because no build over the stored tables exists for that shape. Strict still refuses what it exists to refuse: a persisted upstream the build neither materialized nor was handed by reference, one whose table lives in a *different* destination, and a source over stored upstreams that the build could not carry (a refinement the ladder below drops). A refusal names the upstream and where it lives.
29
+ If the downstream cannot be built over the stored tables, it is **refused, never built by recomputing its upstreams from the warehouse**, in every build, standalone or orchestrated. Where the plan can tell, it refuses when the package is planned, as `upstream_table_unusable` with a message naming the upstream and why: it reaches the warehouse through an intermediate (rule 3), its upstream lives in a _different_ destination, or it groups, filters or orders a string its upstream's table records as compared otherwise than live (its column contract's `compare`). What only a run can find fails that run's build: a persisted upstream the build neither materialized nor was handed by reference, or a shape over stored upstreams the build could not carry (a refinement the ladder below drops). Either way the source answers live. `strictUpstreams` and `warehouseReach` are accepted and ignored.
30
30
 
31
31
  A chained build re-declares on each parent's binding what the parent's `extend` block adds - its `where:`, dimensions, measures, joins and views - and thins them when they do not compile in the destination, in tiers: a view first, then a join, then a dimension or measure that reads a join the destination cannot bind. **The `where:` is never thinned**: a stored source declared `extend { where: total > 100 }` holds every row and is filtered when read, so a child built over it without that filter would sum the unfiltered rows.
32
32
 
@@ -37,12 +37,12 @@ Every manifest entry for a source that reads a persisted upstream carries:
37
37
  - `upstreamReuse: "reused"` - every persisted upstream was read from its table.
38
38
  - `upstreamReuse: "recomputed"` - at least one was recomputed from its definition; `upstreamRecomputeReason` names which and why (for example, which intermediate reached the warehouse through which join).
39
39
 
40
- It is reported on both tiers, since a table built in the source's own warehouse also inlines a `storage=` upstream it cannot read there. The field is not a location and never names a table. A recomputed source's rows reflect the warehouse at *that build's* time rather than the upstream's snapshot, so the two can disagree when their refresh cadences differ - this field is how to tell.
40
+ It is reported on both tiers, since a table built in the source's own warehouse also inlines a `storage=` upstream it cannot read there. The field is not a location and never names a table. A recomputed source's rows reflect the warehouse at _that build's_ time rather than the upstream's snapshot, so the two can disagree when their refresh cadences differ - this field is how to tell.
41
41
 
42
- The `publisher_storage_chained_build_total{outcome}` counter reports the path each chained build took: `parent_reuse`, `inline_fallback` (non-strict recompute), `strict_shape_fallback` (the strict-permitted recompute), `strict_refused`, `infra_failure` (the destination was unreachable or the build died in it - kept distinct so a store outage or an out-of-memory is not read as an un-carriable shape).
42
+ The `publisher_storage_chained_build_total{outcome}` counter reports the path each chained build took: `parent_reuse`, `strict_refused` (no build over its stored upstreams exists), `infra_failure` (the destination was unreachable or the build died in it - kept distinct so a store outage or an out-of-memory is not read as an un-carriable shape). `inline_fallback` and `strict_shape_fallback` are retained but no longer produced.
43
43
 
44
44
  ## Three limits to know
45
45
 
46
- - A refresh of a chained `refresh="incremental"` source always rebuilds in full (`chained_storage` reason): its parent's delta can restate rows below the child's own frontier where no delta of the child's would revisit them.
46
+ - A refresh of a chained `refresh="incremental"` source always rebuilds in full (`chained_storage` reason): its parent's delta can restate rows below the child's own frontier where no delta of the child's would revisit them. The exception is a `#(materialize)` extension of a `#(materialize)` parent on one tier: it follows the parent's refresh. On the parent's watermark it deltas from no later than the parent's delta start. On another watermark it rebuilds whenever the parent changed (`upstream_watermark_differs`). After a missed parent refresh it rebuilds (`upstream_generation_skipped`).
47
47
  - A `#@ persist` without `storage=` (built in the source's warehouse) never substitutes a `storage=` upstream's table, because the warehouse cannot see the lake; it inlines the upstream and reports `recomputed`.
48
- - A chained build carries the intermediates' *text*, written for the source warehouse, into the destination's dialect. A construct the destination lacks fails the carry, and under strict that is a refusal rather than a recompute.
48
+ - A chained build carries the intermediates' _text_, written for the source warehouse, into the destination's dialect. A construct the destination lacks fails the carry, and under strict that is a refusal rather than a recompute.
@@ -24,7 +24,10 @@ or package-wide in `publisher.json` under `materialization.freshness`, or per mo
24
24
  ## `schedule`: the power tier
25
25
 
26
26
  ```jsonc
27
- { "name": "orders", "materialization": { "scope": "version", "schedule": "0 6 * * *" } }
27
+ {
28
+ "name": "orders",
29
+ "materialization": { "scope": "version", "schedule": "0 6 * * *" },
30
+ }
28
31
  ```
29
32
 
30
33
  - A 5-field UTC cron; `L`, `W`, `#`, `?` are rejected at publish. It **requires `scope: "version"`** and is **mutually exclusive with `freshness`** - including a per-source `freshness.*`.
@@ -41,12 +44,14 @@ source: daily_orders is orders -> { group_by: order_date; aggregate: revenue is
41
44
 
42
45
  - `watermark=` names one of the source's own output columns - real, orderable, non-aggregate. Publisher records how far each refresh reached (`covered_through`) and the next recomputes only `[start, frontier)`, half-open, so the frontier value itself is left for the next run. A `date`/`timestamp` watermark takes the run's start time as the frontier and **starts at the newest watermark the stored table holds** (one `max()` over the table), so a row stamped after the newest stored row is read however late it loads; it never starts at the previous run's start time, which would skip such a row for good. The start is inclusive: a merge or a range replace re-reads the newest stored instant without writing it twice. A numeric or string watermark reads `max(watermark)` from the source as its frontier, and the next range starts there; two refreshes of one with no new rows skip - correct, and it looks like nothing happened.
43
46
  - **Without `merge_key=`, a refresh replaces the whole range it re-reads**, from the newest stored row (on a `date` watermark, the whole newest stored day): a stored row the source no longer holds there is removed. A source that drops or trims recent rows (a staging table keeping only the latest day) notices; declare `merge_key=` for append-only behaviour, since a merge never deletes.
44
- - **Late rows: `lookback="2 days"`.** There is no lookback unless declared. A row stamped *below* the newest stored row, loaded after it, is below every later delta. `lookback=` starts each delta that much further back (`[newest stored − lookback, frontier)`), and the merge key matches the rows read again. A positive whole number and one unit, `seconds`/`minutes`/`hours`/`days`/`weeks` spelled out or as `s`/`m`/`h`/`d`/`w` (`"36h"`), at most 365 days; no month or year. It needs a `date` or `timestamp` watermark **and** `merge_key=`; anything else fails the load (`persist-invalid` on `#@ persist`, `materialize-invalid` on `#(materialize)`). Size it to how late rows really arrive: each day of lookback is re-read every refresh.
47
+ - **Late rows: `lookback="2 days"`.** There is no lookback unless declared. A row stamped _below_ the newest stored row, loaded after it, is below every later delta. `lookback=` starts each delta that much further back (`[newest stored − lookback, frontier)`), and the merge key matches the rows read again. A positive whole number and one unit, `seconds`/`minutes`/`hours`/`days`/`weeks` spelled out or as `s`/`m`/`h`/`d`/`w` (`"36h"`), at most 365 days; no month or year. It needs a `date` or `timestamp` watermark **and** `merge_key=`; anything else fails the load (`persist-invalid` on `#@ persist`, `materialize-invalid` on `#(materialize)`). Size it to how late rows really arrive: each day of lookback is re-read every refresh.
45
48
  - **Missed rows are reported.** After each delta, one check counts the source's rows in the window just below where the delta started (as wide as the delta's own range, capped at 7 days or the lookback, whichever is longer) that the table lacks. Any found are on the manifest entry as `lateRows` (`count`, `from`, `to`) and on the package as a `persist-incremental-late-rows` warning: the served table undercounts. Both are carried, with later findings added, until the source is rebuilt in full. Recover with one `reseed`, then add or widen `lookback=`. The count is a lower bound (a slice is checked once, so a row landing in an already-checked slice is not counted), and the report stays until a full rebuild even after a widened lookback has written the rows. A row older than the window is not seen; pair tables, string watermarks and `storage=` sources on BigQuery are not checked; the check gives up after 60 seconds and never fails the run.
46
49
  - **A zoned timestamp watermark (`timestamptz`) in a session time zone other than UTC** (set by the connection's setupSQL) reads back with that zone's offset, so the source rebuilds in full each refresh, logged at `warn`. A plain `timestamp` or `date` watermark is not affected.
47
50
  - **An invalid declaration fails the package load**, not just the publish: `watermark=` without `refresh="incremental"`, `merge_key=` without a watermark, a watermark that names no materialized column or an aggregate, or a `lookback=` that is not a duration, is over 365 days, lacks `merge_key=`, or sits on a number or string watermark (`persist-invalid`; `materialize-invalid` on `#(materialize)`). (A `calculate:` field or an unsupported dialect is valid but refuses the source alone.) Postgres, BigQuery and Snowflake sources only (the dialect that has to express the range); a DuckDB source has to say `refresh="full"`.
48
51
  - **`forceRefresh` never re-seeds**; it only defeats skip-if-unchanged, and an incremental source is exempt from that anyway. Ask for a full rebuild with `reseed` (`malloy-pub materialize --reseed`, or per source on the build instruction). Keeping them apart is what lets a schedule drive deltas at all, since every scheduled fire is forced.
49
- - Each manifest entry reports what the run **did**: `refresh: delta | full | none`, with `ledger.coveredThrough` as the boundary now in force. Every fallback - no recorded boundary, a boundary measured on a different table or watermark, drifted columns, `MERGE` on a Postgres older than 15 - rebuilds in full and succeeds, so a source quietly rebuilding on every run looks exactly like one advancing unless you read `refresh`. The reason codes (`forced`, `no_boundary`, `lineage_changed`, `table_renamed`, `merge_unsupported`, `table_unreadable`, `table_emptied`, `shape_mismatch`, `ledger_unreadable`, `chained_storage`, `frontier_unreadable`, `not_advanced`) say why.
52
+ - Each manifest entry reports what the run **did**: `refresh: delta | full | none`, with `ledger.coveredThrough` as the boundary now in force. Every fallback - no recorded boundary, a boundary measured on a different table or watermark, drifted columns, `MERGE` on a Postgres older than 15 - rebuilds in full and succeeds, so a source quietly rebuilding on every run looks exactly like one advancing unless you read `refresh`. The reason codes (`forced`, `no_boundary`, `lineage_changed`, `table_renamed`, `merge_unsupported`, `table_unreadable`, `table_emptied`, `shape_mismatch`, `ledger_unreadable`, `chained_storage`, `merge_key_not_unique`, `upstream_generation_skipped`, `upstream_watermark_differs`, `frontier_unreadable`, `not_advanced`) say why.
53
+ - **An upstream column widened after the build** (INTEGER to BIGINT, REAL to DOUBLE PRECISION) is invisible to Malloy's types, so before each delta the delta's column types are compared with the stored ones; a stored column that cannot hold the delta's values exactly rebuilds the source in full (`shape_mismatch`). Read for a Postgres, DuckDB or MotherDuck database table and a `storage=` table with a Postgres source; BigQuery cannot widen (one integer type, one float type); Snowflake is not checked.
54
+ - **`merge_key=` must be unique in the source.** A merge cannot store two rows under one key, so a delta that reads a key twice is rolled back and the source rebuilt in full (`merge_key_not_unique`; on Snowflake, found by a probe after the delta, which makes the next refresh rebuild), and a rebuilt table that holds a key twice records no boundary, so it is rebuilt in full on every refresh until the key is unique. Both raise a `persist-incremental-merge-key-not-unique` warning naming the source; fix the key (or drop `merge_key=`) and the next rebuild clears it. The warning is held in memory: after a restart it reappears on the next refresh. A key repeated *across* refreshes is not caught: a later delta's row replaces the stored one, as a restatement, so a source whose key is not a row's identity over time (a log of versions) keeps one row per key where live has several.
50
55
  - Two sources that compile to identical SQL, with the same `name=` or none, share one table **and one boundary**; if their incremental declarations differ, neither ever advances. Publisher warns and names both.
51
56
  - `storage=` is supported: the warehouse computes the bounded range and the DML lands in the destination. A **chained** stored source always rebuilds in full (`chained_storage`): see `reference/chaining.md`.
52
57
  - The boundary lives in the publisher's own per-process store. A host that spreads a package's refreshes over several workers holds the ledger itself: it stores each entry's `ledger` object and sends them back as `buildInstructions.ledger` on the next run. Standalone, the store is the publisher's, always.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-model
3
3
  description: Build Malloy semantic models with base source and joined source files. Use when creating or modifying .malloy files, user asks to "create a malloy model", "add dimensions", "add measures", "create a source", or any Malloy model authoring task.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -268,7 +268,7 @@ Publisher parses the annotation, lists the filters in the API, and **injects a `
268
268
 
269
269
  Publisher formats the value from the dimension's type (`'value'`, bare `true`/`false`, `@YYYY-MM-DD`), so a caller passes it unquoted.
270
270
 
271
- `#(filter)` is not a security boundary. A caller skips it with `bypass_filters=true` (REST) or `bypassFilters: true` (POST body), or by writing their own query text. Use givens with `#(authorize)` / `#(access_filter)` for access control.
271
+ `#(filter)` is not a security boundary. A caller skips it with `bypassFilters: true` in the query request body, or by writing their own query text. Use givens with `#(authorize)` / `#(access_filter)` for access control.
272
272
 
273
273
  **To migrate** a source, replace each annotation using the table above, then delete it. An optional filter (`type=in`, `like`, `equal`, a range) moves to the reports that offer it, declared and bound there, and the source is left unfiltered; a `required` one stays in the model as a no-default given. `type=greater_than` and `type=less_than` are exclusive, so a plain comparison you convert one to is `>` or `<`, not `>=` or `<=`. `docs/givens.md` § "Coming from `#(filter)`" has a worked conversion.
274
274
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-model-as-you-go
3
3
  description: 'After answering a data question, write down what the answer assumed so the next reader can trust the number. A field with a #(doc) in the model when you can edit it, an extend in the notebook when you can only author reports, or a stated assumption plus a Malloy snippet when you can only chat. Use after every answered question that rested on a judgment call, and whenever a question is asked against tables that have no model yet.'
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-modeling
3
3
  description: Build semantic models with Malloy for the Malloy Publisher. Read this skill whenever the user asks about modeling data or specifically mentions Malloy.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-notebooks
3
3
  description: "Renamed to malloy-reports. A notebook is now a report with layout=linear: a .malloy file with an ## artifact tag, written at the package root. Load malloy-reports instead when the user asks for a notebook, a data story, or a report that reads top to bottom."
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-phrase-detection
3
3
  description: How to phrase search_text on a get_context call so retrieval returns the fields you need instead of a truncated catalog. Covers target-type classification and decomposition patterns.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!-- Copyright (c) Credible Data Inc. SPDX-License-Identifier: MIT -->
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-powerbi-review
3
3
  description: Move a Power BI semantic model (TMDL, PBIP, or .pbix) onto Malloy - read their model, transpile its DAX, and prove the numbers match. Use when Power BI artifacts are present, when a user wants to migrate or switch off Power BI, and whenever a specific DAX measure has to become Malloy - CALCULATE, ALL/ALLSELECTED/ALLEXCEPT, RANKX and top-N, time intelligence, USERELATIONSHIP, calculation groups, what-if parameters, or an RLS role. Carries a worked, executed transpile per construct and states what each port costs. Works with or without a database connection.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-publish
3
3
  description: Package Malloy models for serving by Malloy Publisher. Use when user asks to "publish", "package", "deploy", or wants to share models with others.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-queries
3
3
  description: Read before writing or debugging a Malloy query. Dates, aggregates vs dimensions, joins, filters, strings, window functions, chart annotations, and the compile errors a SQL habit produces.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-reports
3
3
  description: "Build or modify a Malloy Publisher report: a .malloy file with an ## artifact tag, written at the package root unless asked otherwise, laid out as a grid (a dashboard, scanned at a glance) or linear (a notebook or data story, read top to bottom), with filter controls rendered from givens and # drill click-through. Use when the user asks for a dashboard, a notebook, a report, a data story, a filterable view, or drill-through between views, and no code is wanted. Legacy .malloynb files are read, not authored."
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
 
7
7
  <!--
@@ -247,7 +247,6 @@ Package warnings after a reload are the report's test suite. Fix all of them, an
247
247
  | `report-cells-removed` | A linear tag with no `tiles`, the retired cell format, so the file is no report. List its tiles (`reference/linear.md`) |
248
248
  | `report-on-surface` | A model `index.malloy` imports (or `explores` lists) is tagged, so its sources left the surface. Untag it, or move the report out |
249
249
  | `index-is-not-a-report` | The root `index.malloy` carries a tag. Remove it; put the report in its own file |
250
- | `report-name-ambiguous` | Two grid reports share a file name, so the deprecated by-name dashboards route answers 409 for it. Rename one of the files |
251
250
  | `Tile … reads <source>, which index.malloy doesn't export` | Add the source to the `export { ... }` in `index.malloy`. Never add an `explores` to `publisher.json` |
252
251
  | A grid's `columns`, `colspan`, or `dashboard_columns=` findings | `reference/grid.md` |
253
252
  | Prose the reader cannot place (`notebook-markdown-attached-nowhere`, `notebook-markdown-block-unnamed`) | `reference/linear.md` |
@@ -88,6 +88,8 @@ One query per tile, and remember a chart renders only the **first** aggregate in
88
88
 
89
89
  A `.malloynb` (cells delimited by `>>>markdown` and `>>>malloy`) is a deprecated format, served read-only as a linear report. **Do not create one.** When maintaining one: its compile errors show only when cells run, so test queries in the model first; imports belong in a setup cell at the top, never inside a `run:` cell; and it reads `## autorun=false` and `## givens { … }` as file-level lines, where a `.malloy` report takes them inside its artifact tag.
90
90
 
91
+ Each code cell runs its `run:` statement as query text on the notebook's path, over REST with `POST …/models/{path}/query` and in the `show_report` panel. MCP `execute_query` does not take a `.malloynb` path and answers that the model is not found, so to check a cell's query there, run it against the `model_path` that `get_context` returns, which is `index.malloy` when the package has one; a model file the surface does not publish answers not found. The `run:` runs in restricted mode: it may not call a `sql_*` function or read a table directly, such as `duckdb.table(…)`; put either in a source in a cell and run that source. A join written in the `run:` is the caller's join, so a gate on the joined source applies to it. On a package with an `index.malloy`, a source the cells declare is not queryable, even over a published source; declare it in a model file and export it from `index.malloy`.
92
+
91
93
  ## Common mistakes
92
94
 
93
95
  | Mistake | Fix |
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-review
3
3
  description: Malloy semantic-model code review. Invoke when the user asks to review, audit, or critique a `.malloy` file, a folder of Malloy models, or a GitHub PR that touches Malloy. Enforces project modeling standards and emits a navigable review file.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-run-agent
3
3
  description: Adopt an agent a Malloy package declares, by name. Use only when the user names a package agent, for example "run the analyst agent on storefront" or "work as the agent in this package". Fetches the agent's definition with get_agent, works from its instructions, installs its skills, and runs one of its tasks when asked.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!--
7
7
  Copyright (c) Credible Data Inc.
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: malloy-source-unreachable
3
3
  description: Work out why a source is missing from get_context, or why a query against it was refused with a 404 or a 403, and what to do next. Use when a source you expect is absent from discovery, when execute_query answers "No queryable source", when a query that used to work stops working, or when deciding whether a package's curation is hiding something you need.
4
- version: 0.1.58
4
+ version: 0.1.60
5
5
  ---
6
6
  <!-- Copyright (c) Credible Data Inc. SPDX-License-Identifier: MIT -->
7
7