Skip to content

Commit e93ad8a

Browse files
authored
Merge pull request #13 from spiraldb/mp/release-0.1.4
release 0.1.4: catalog discoverability + per-column profiles for all 249 specs
2 parents b6a3e34 + 9efb3c7 commit e93ad8a

298 files changed

Lines changed: 436729 additions & 923 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Wrappers around `python -m scripts.pipeline.<module>`. Side-effecting ones set `
1919
| `/raincloud-tighten-variant` | `scripts.pipeline.tighten_variant` | In-place JSON → VARIANT promotion. |
2020
| `/raincloud-status` | `scripts.pipeline.status` | Per-slug filesystem state (raw / workdir / parquet / vortex / variant-pending). *(read-only, model-invocable.)* |
2121
| `/raincloud-validate-manifest` | `scripts.pipeline.validate_manifest` | Static checks for `sources.json` — JSON Schema + handler-registry / slug-uniqueness / fetch-auth cross-checks. *(read-only, model-invocable.)* |
22-
| `/raincloud-list-datasets` | `scripts.pipeline.list_datasets` | Filter/list slugs by family / handler / license / fetch-type / reader / vortex / regex. *(read-only, model-invocable.)* |
22+
| `/raincloud-list-datasets` | `scripts.pipeline.list_datasets` | Filter/list slugs by handler / license / fetch-type / reader / vortex / tag / showcase / size / regex. *(read-only, model-invocable.)* |
2323

2424
## Procedural playbooks (model-invocable)
2525

.agents/skills/raincloud-add-dataset/SKILL.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Steps:
2121
"short_name": "My Dataset",
2222
"full_name": "My Dataset (publisher attribution)",
2323
"description": "One-line summary.",
24-
"family": "direct",
2524
"license": { "spdx": "CC0-1.0", "source_url": "...", "redistribution_permitted": true, "attribution_required": false },
2625
"fetch": { "type": "http", "urls": ["https://..."], "auth": null },
2726
"extract": { "type": "passthrough" },
@@ -32,8 +31,6 @@ Steps:
3231
}
3332
```
3433

35-
Pick `family` from existing values (`direct`, `kaggle-upstream`, `nyc-tlc`, `public-bi`, `uci`) — do not invent new ones without discussing.
36-
3734
3. **Validate the manifest.** Invoke `/raincloud-validate-manifest` — sub-second check that the new entry has the right shape, the handler resolves, the slug is unique, and `fetch.type`/`fetch.auth` agree. Catches typos before paying for a fetch.
3835

3936
4. **Run the first build.** Invoke `/raincloud-build <slug> --loose` (the `--loose` is essential when the row count is a guess). If `expect.rows` was wrong, update the manifest with the actual count once the build succeeds.

.agents/skills/raincloud-build/SKILL.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: raincloud-build
3-
description: Run the full Raincloud pipeline (fetch → extract → parse → transform → write → validate → convert) for one or more dataset slugs. Use when the user asks to build a dataset, rebuild a slug, or process a family.
4-
argument-hint: <slug>... | --family <name> | --all [--loose] [--clean-workdir]
3+
description: Run the full Raincloud pipeline (fetch → extract → parse → transform → write → validate → convert) for one or more dataset slugs. Use when the user asks to build a dataset, rebuild a slug, or process a batch.
4+
argument-hint: <slug>... | --all [--loose] [--clean-workdir]
55
disable-model-invocation: true
66
allowed-tools: Bash(python -m scripts.pipeline.build *)
77
---
@@ -14,12 +14,11 @@ python -m scripts.pipeline.build $ARGUMENTS
1414

1515
Selection (at least one required):
1616
- `<slug>...` — positional dataset slugs (any number)
17-
- `--family <name>` — every dataset in a family (`direct`, `kaggle-upstream`, `nyc-tlc`, `public-bi`, `uci`)
1817
- `--all` — every dataset in `sources.json`
1918

2019
Modifiers:
2120
- `--loose` — downgrade `expect.rows` mismatches from errors to warnings. Use on the first build of a new slug before you know the exact row count.
22-
- `--clean-workdir` — wipe `_workdir/<slug>/` after each successful build. Essential for whole-family runs (Public BI decompressed CSVs can hit ~100 GB).
21+
- `--clean-workdir` — wipe `_workdir/<slug>/` after each successful build. Essential for large batch runs (Public BI decompressed CSVs can hit ~100 GB).
2322

2423
Before running:
2524
- **Confirm with the user** before triggering anything non-trivial. JSONBench 100M ≈ 6 h, Wikipedia Structured Contents → 34 GB parquet, OSM Germany ~45 min per kind. Small (<100 MB) parquets are fine without asking. (See [AGENTS.md "Rebuilding is expensive"](../../context/AGENTS.md).)
@@ -29,3 +28,9 @@ Before running:
2928
After a successful build, suggest running `/raincloud-docs` to regenerate derived docs.
3029

3130
Context: [SKILLS.md](../../context/SKILLS.md), [AGENTS.md](../../context/AGENTS.md).
31+
32+
## Note (0.1.4)
33+
34+
Per-column profiles are a separate opt-in stage:
35+
`python -m scripts.pipeline.profile <slug>` after a build. Not part of the
36+
default build pipeline. See `raincloud-profile` skill.

.agents/skills/raincloud-convert/SKILL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: raincloud-convert
33
description: Run only stage 7 — emit a sibling .vortex next to each opted-in parquet. Use when the user asks to (re)convert parquet files to Vortex format without rebuilding from raw bytes.
4-
argument-hint: <slug>... | --family <name> | --all
4+
argument-hint: <slug>... | --all
55
disable-model-invocation: true
66
allowed-tools: Bash(python -m scripts.pipeline.convert *)
77
---
@@ -14,7 +14,6 @@ python -m scripts.pipeline.convert $ARGUMENTS
1414

1515
Selection (at least one required):
1616
- `<slug>...` — positional slugs
17-
- `--family <name>` — every dataset in a family
1817
- `--all` — every dataset in the manifest
1918

2019
Behavior:
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: raincloud-discover
3+
description: Use when the user wants to find "interesting" datasets — exposes the new tag / showcase / size / trait / view filters on list_datasets.
4+
---
5+
6+
# raincloud-discover
7+
8+
Wraps `python -m scripts.pipeline.list_datasets` with the discoverability flags. The TUI (`python -m scripts.pipeline.browse`) is the interactive sibling.
9+
10+
## Closed vocab
11+
12+
- **Showcase tiers** (2): `encoding`, `stress`. Run `--showcase-help` for live counts.
13+
- **Domain tags** (12): `geospatial`, `nlp-text`, `web-analytics`, `e-commerce`, `finance`, `social`, `scientific`, `healthcare`, `sports`, `transportation`, `government`, `benchmark`. Run `--tags-help` for live counts.
14+
- **Size buckets** (5): `xs / s / m / l / xl` (file-size on disk).
15+
- **Trait flags** (6): `has_nested`, `has_timestamp`, `has_variant`, `string_heavy`, `wide_row`, `high_cardinality_present`. Prefix with `!` to negate.
16+
17+
## Patterns
18+
19+
```bash
20+
python -m scripts.pipeline.list_datasets --view encoding --long
21+
python -m scripts.pipeline.list_datasets --tag geospatial --tag scientific
22+
python -m scripts.pipeline.list_datasets --trait has_nested --size m
23+
python -m scripts.pipeline.list_datasets --trait '!has_nested' --vortex
24+
python -m scripts.pipeline.list_datasets --inspect clickbench-hits
25+
python -m scripts.pipeline.list_datasets --tags-help
26+
python -m scripts.pipeline.list_datasets --showcase-help
27+
```
28+
29+
Filters AND across axes, OR within an axis. `--view` replaces other facet flags (preset is the entire facet spec).
30+
31+
## When to invoke
32+
33+
- "Find me datasets with X property" → use traits + tags + size filters
34+
- "What's good for testing nested-type encoding?" → `--trait has_nested --vortex`
35+
- "Show me a small dataset to iterate on" → `--size xs --size s`
36+
- "Inspect this slug" → `--inspect <slug>`
37+
- "What tags / tiers exist?" → `--tags-help` / `--showcase-help`

.agents/skills/raincloud-docs/SKILL.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ python -m scripts.pipeline.docs && cp docs/datasets.md docs/handlers.md docs/sna
2525

2626
When to run:
2727
- After a build (row counts, file sizes, and `snapshot.json` schema for that slug change).
28-
- After manifest edits that affect `short_name` / `license` / `description` / `family` / `expect.rows` / `convert.vortex`.
28+
- After manifest edits that affect `short_name` / `license` / `description` / `expect.rows` / `convert.vortex`.
2929
- After adding, removing, or renaming a handler (`handlers.md` regenerates from the registry + manifest usage).
3030
- After any schema-affecting change to a slug's transform handler — re-run `snapshot` so the TUI's fallback view picks up the new shape.
3131

.agents/skills/raincloud-large-build/SKILL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: raincloud-large-build
3-
description: Run a memory- or runtime-heavy build safely with memory caps, scratch redirection, nohup, and progress logging. Use for multi-hour or multi-GB builds (JSONBench 100M, Wikipedia Structured Contents, OSM Germany, Public BI families).
4-
argument-hint: <slug> [--family <name> | --all] [--loose] [--clean-workdir]
3+
description: Run a memory- or runtime-heavy build safely with memory caps, scratch redirection, nohup, and progress logging. Use for multi-hour or multi-GB builds (JSONBench 100M, Wikipedia Structured Contents, OSM Germany, Public BI batches).
4+
argument-hint: <slug>... [--all] [--loose] [--clean-workdir]
55
disable-model-invocation: true
66
---
77

@@ -21,7 +21,7 @@ PYTHONUNBUFFERED=1 \
2121

2222
Flag rationale:
2323
- `--loose` — first build of a new slug, before `expect.rows` is known. Downgrades row-count mismatches from errors to warnings.
24-
- `--clean-workdir` — wipe `_workdir/<slug>/` after each successful build. Essential for whole-family runs (Public BI decompressed CSVs can hit ~100 GB).
24+
- `--clean-workdir` — wipe `_workdir/<slug>/` after each successful build. Essential for large batch runs (Public BI decompressed CSVs can hit ~100 GB).
2525
- `RAINCLOUD_DUCKDB_MEMORY_LIMIT` — caps DuckDB's working set; default (~80% of system RAM) can swap-thrash on heavily-nested VARIANT shredding. 96 GB is the tested ceiling for Open Food Facts.
2626
- `RAINCLOUD_DUCKDB_TEMP_DIRECTORY` — point at a large volume; the system tempdir often runs out on big builds.
2727
- `PYTHONUNBUFFERED=1` — log file flushes line-by-line so progress is inspectable mid-run.

.agents/skills/raincloud-list-datasets/SKILL.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: raincloud-list-datasets
3-
description: Filter and list datasets from sources.json without grepping a 313 KB JSON file. Use when the user asks "which slugs use handler X", "show me all UCI datasets", "what's gated behind Kaggle ToS", or any other catalog-shape question that's faster than reading docs/v1/datasets.md (55 KB) end to end.
4-
argument-hint: [--family <f>] [--handler <h>] [--license <spdx>] [--fetch-type <t>] [--reader <r>] [--vortex|--no-vortex] [--kaggle-tos] [--grep <pattern>] [--long|--json|--count]
3+
description: Filter and list datasets from sources.json without grepping a 545 KB JSON file. Use when the user asks "which slugs use handler X", "show me all UCI datasets", "what's gated behind Kaggle ToS", or any other catalog-shape question that's faster than reading docs/v1/datasets.md end to end.
4+
argument-hint: [--handler <h>] [--license <spdx>] [--fetch-type <t>] [--reader <r>] [--vortex|--no-vortex] [--kaggle-tos] [--grep <pattern>] [--long|--json|--count]
55
allowed-tools: Bash(python -m scripts.pipeline.list_datasets *)
66
---
77

@@ -17,8 +17,7 @@ Filters (compose with AND):
1717

1818
| Flag | Filter |
1919
|---|---|
20-
| `--family <f>` | `family``direct`, `kaggle-upstream`, `nyc-tlc`, `public-bi`, `uci` |
21-
| `--handler <h>` | `transform.handler` exact match (e.g. `tighten_types`, `glove_split`) |
20+
| `--handler <h>` | `transform.handler` exact match (e.g. `tighten_types`, `glove_split`, `uci_default`) |
2221
| `--license <spdx>` | `license.spdx` exact match (e.g. `CC0-1.0`, `Apache-2.0`) |
2322
| `--fetch-type <t>` | `fetch.type``http`, `kaggle`, `huggingface`, `custom` |
2423
| `--reader <r>` | `parse.reader``csv`, `parquet`, `jsonl`, `xml`, `pbf`, `custom` |
@@ -28,7 +27,7 @@ Filters (compose with AND):
2827

2928
Output modes (default = one slug per line):
3029

31-
- `--long` — wide table with slug, family, handler, fetch type, reader, license, row count, vortex flag.
30+
- `--long` — wide table with slug, handler, fetch type, reader, license, row count, vortex flag.
3231
- `--json` — one JSON object per matching dataset (pipe into `jq` for further filtering).
3332
- `--count` — just the count of matches.
3433

@@ -51,3 +50,7 @@ python -m scripts.pipeline.list_datasets --grep '\bgeo' --long
5150
Pair with `/raincloud-status <slug>` to check filesystem state of any returned slug, and `/raincloud-validate-manifest` after editing the manifest based on findings.
5251

5352
Context: [SKILLS.md](../../context/SKILLS.md), [sources.schema.md](../../context/sources.schema.md), [`docs/v1/datasets.md`](../../../docs/v1/datasets.md) for full-row metadata.
53+
54+
## New discovery axes (0.1.4)
55+
56+
`--showcase`, `--tag`, `--size`, `--trait`, `--view`, `--inspect`, `--tags-help`, `--showcase-help`. See the `raincloud-discover` skill for the full vocabulary and patterns.
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: raincloud-profile
3+
description: Use when the user asks to compute or refresh per-column statistics for a raincloud dataset — produces `outputs/v1/<slug>/profile.json` for the TUI's detail pane and `list_datasets --inspect`.
4+
---
5+
6+
# raincloud-profile
7+
8+
Wraps `python -m scripts.pipeline.profile`. Opt-in stage; off the default
9+
build path. Idempotent against parquet sha256.
10+
11+
## When to invoke
12+
13+
- "Generate profiles for X / for everything that's built"
14+
- "Refresh the profile after I rebuilt slug X"
15+
- "Show me per-column statistics" → run this first, then `list_datasets --inspect <slug>`
16+
17+
## Patterns
18+
19+
```bash
20+
python -m scripts.pipeline.profile <slug> # one
21+
python -m scripts.pipeline.profile --all # every built parquet
22+
python -m scripts.pipeline.profile --sample-rows 1000000 <slug> # cap for huge slugs
23+
```
24+
25+
Per-dtype stats:
26+
- **Numeric**: histogram + NDV + min/max/mean
27+
- **String / binary**: NDV; top-5 when NDV ≤ 256 (binary skips top-5 — bytes don't render usefully)
28+
- **Bool**: T/F/null counts
29+
- **Date/Timestamp**: range + 10-bucket histogram
30+
- **List/Map**: length min/max/mean
31+
- **Struct / variant**: skipped (emits null at column-map level)
32+
33+
Profiles live at `outputs/v1/<slug>/profile.json` and are read by:
34+
- The TUI's right-pane Columns section (`python -m scripts.pipeline.browse`)
35+
- The CLI's `--inspect <slug>` rendering
36+
- `docs.py` for backfilling `shape_traits.high_cardinality_present` into `snapshot.json`
37+
38+
The tracked mirror at `docs/v1/profiles/<slug>.json` is the fallback path that
39+
fresh clones ship — both `list_datasets --inspect` and the TUI's Columns pane
40+
read it when no built `outputs/v1/<slug>/profile.json` exists locally. The
41+
`profile` stage auto-runs `python -m scripts.pipeline.promote_profiles` at the
42+
end of a successful run (copies built profile.json into the tracked mirror,
43+
byte-identical mirror skipped), so the tracked snapshot stays in sync without
44+
a manual step. Pass `--no-promote` to suppress that auto-step while iterating;
45+
invoke `promote_profiles` explicitly (or with `--check`) to re-sync or audit
46+
the mirror after manual edits.

.agents/skills/raincloud-status/SKILL.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
name: raincloud-status
33
description: Report per-dataset state (raw / workdir / parquet / vortex / variant-pending) across the manifest. Use when the user asks what's downloaded, what's built, what's missing, what needs re-tightening, or to triage which slugs still need work.
4-
argument-hint: [<slug>...] [--family <name>] [--fast] [--missing-only] [--json]
4+
argument-hint: [<slug>...] [--fast] [--missing-only] [--json]
55
allowed-tools: Bash(python -m scripts.pipeline.status *)
66
---
77

@@ -23,7 +23,6 @@ Walks the manifest and reports per-slug filesystem state in five columns:
2323

2424
Selection (default: every slug in the manifest):
2525
- `<slug>...` — positional slugs
26-
- `--family <name>` — every dataset in a family
2726
- `--all` — explicit "every dataset" (the default, kept for parity with `/raincloud-build`)
2827

2928
Modifiers:

0 commit comments

Comments
 (0)