agentleFS
jhutchison0jhutchison0/tacsop/.claude/skills/lake-conventions/SKILL.md

lake-conventions

Skill0 starsChanged 25 days agoApache-2.0View on GitHub

Conventions for the two storage systems this fleet writes to. For the work lakehouse: bucket tiers, path grammars, file formats, the two companion files every dataset ships, and the dev/prod split. For personal projects on personal-scoped machines, HOME-STORAGE.md covers writing bulk data to home network storage with no address in git. Use when adding or reviewing any code that writes to the lake or to home storage, choosing a format for a stored artifact, planning a dev-to-production promotion, or preparing a machine to do storage work.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 3 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Read PREFLIGHT.md before a first run on a new machine.

    line 18
  2. Very specific:

    Add upstream_sources so lineage survives you.

    line 116
  3. Distinctive:

    Every S3 client, every language:

    line 126
  4. Distinctive:

    If your case fits no row, ask the lakehouse maintainers before shipping.

    line 162
  5. Distinctive:

    Do not invent a convention quietly.

    line 163

≈ “Common” is an estimate: at least 1 in 5 of the 372,429 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Lake conventions

The lake has rules. They are written down, they are not enforced by anything, and the cost of missing one is paid by whoever reads your data next.

Authoritative source: the dis-lakehouse repo, on work machines at the path in config/project.yaml under machines.<host>.references.lakehouse. Its skills/, templates/, and notebook "Rules of the Road" section are the authority. This skill is the portable mapping. When the two disagree, upstream wins, and the disagreement is a bug in this file worth fixing.

Read PREFLIGHT.md before a first run on a new machine. Read ADOPTION.md once per repo.

Which storage system? The project's scope selects it: work-scoped data goes to the lake, personal-scoped data goes to home storage, and crossing that line is a human decision made explicitly, never a fallback or a convenience. A personal project (project.scope: personal in config/project.yaml, on a rostered machine with personal scope) reads HOME-STORAGE.md instead of the lake sections below. Everything below this line is the lake.

When to use

  • Adding or reviewing code that writes to the lake
  • Choosing a file format for a lake artifact
  • Planning a promotion from development to production
  • Auditing an existing surface for format or path drift
  • Preparing a machine to do lake work (then run scripts/lake_preflight.py)
  • Writing a personal project's bulk data to home storage (read HOME-STORAGE.md)

Buckets are maturity tiers, not environments

Data is promoted between buckets. There is no dev cluster and no prod cluster.

BucketWhat it holdsMay you write?
landingRaw external drops, byte-for-byte as receivedYes, unmodified bytes only
stagingCurated derivations. The default target for team outputYes, this is where your work goes
iceberg-warehouseGoverned tablesNever directly. Iceberg commits metadata and expects consistency
hive-warehouseHive metastore defaultNever directly
temporaryScratch, purgeable without warningYes, and own the sweeping

Promotion runs landing to staging to Iceberg. The Iceberg step is a CREATE/INSERT ... SELECT through Trino over a Hive external table, or the object registry doing it for you. Never a file copy into the warehouse prefix.

Nothing in temporary may be gated on by a consumer. It can vanish mid-run.

Two path grammars

Both are in use. Pick by what the data is, not by preference.

Product and cycle, for human-curated deliverables:

s3://<bucket>/<project>/<product>/<cycle>/<team>/<filename>

<cycle> is YYYYMMDDHH in UTC. Sortable, and it matches the NWP convention.

Table, for machine-ingested tabular data:

s3://staging/<project>/<table>/ref_month=YYYY-MM-DD/<file>.parquet

Hive-style key=value/ directories. Note the trap: Hive tables are created without PARTITIONED BY even though the data is laid out in partition directories. That is a deliberate workaround for a Trino bug against S3, not an oversight. Iceberg carries the real partitioning.

Two case conventions, also both real: snake_case for dataset and table identifiers (the manifest schema enforces ^[a-z0-9_]+$), kebab-case for object-key path segments in landing.

Format follows audience

AudienceFormat
Tabular data for machinesParquet. Mandatory in staging
Gridded scientificNetCDF4, CF conventions preserved
Vector geospatialGeoParquet preferred, GeoPackage accepted
RasterCloud-Optimized GeoTIFF
Provenance and configJSON or YAML, travelling as manifest.json
HumansREADME.md beside the data

The mental shift, from the lakehouse's own notebooks:

Old habit: df.to_csv("output.csv"), then upload somewhere. New habit: df.to_parquet(buf), then put_object with a README.md and a manifest.json next to it.

CSV is for one-off email attachments. It carries no schema, cannot be read columnar, and cannot be queried through Trino.

Bulk tabular data as JSON in staging is the anti-pattern to watch for. If you are reaching for a JSON writer and the payload is a table of rows, stop.

Every dataset ships two companion files

In the same prefix as the data, always:

  • README.md for a human: what this is, where it came from, caveats, how to regenerate it.
  • manifest.json for a machine, against the upstream templates/manifest_schema.json (JSON Schema draft-07). Required: dataset_name, version, created_utc, team, producer{script,version}, lakehouse_path{bucket,prefix}, files[]{name,format,size_bytes,description}. Add upstream_sources so lineage survives you.

They are not alternatives. One is prose, one is parseable.

The lakehouse's .gitignore states the doctrine in miniature: it excludes every data extension and then negates exactly README.md and the manifest files. The data goes to the lake; the description of the data goes to git.

Three client settings, non-negotiable

Every S3 client, every language:

SettingValueWhy
Signature versions3v4required
Addressing stylepathvirtual-host style is not supported
Regionus-east-1 ("" for R's aws.s3)must match the credentials

Endpoint URLs carry an explicit port. This is not AWS. The Host header is the first place to look when a request signs wrong, especially behind a proxy.

Credentials arrive as an access key and secret key pair, issued on request. Two environment-variable namespaces exist and both are load-bearing: the docs use MINIO_*, several upstream operational scripts and the registry service read S3_*. Set both.

Dev and production

The split is a named target selected explicitly at every entry point, and the safe default is refusing to guess.

  • A bare invocation with no target is an error, not production.
  • An unrecognized target name is an error. Never fall back to a base config.
  • Development work writes to temporary under a namespace derived from $USER at runtime. Do not commit a username into config.
  • Thread the target through every process in the chain. This is the one that bites. A flag honored by three processes and ignored by the fourth produces no error and wrong data.

scripts/lake_preflight.py --target dev --leg "..." --leg "..." checks the threading before the run rather than after.

When in doubt

  1. Open the dis-lakehouse repo. It is the authority.
  2. Find the closest row in its file-format guidance.
  3. If your case fits no row, ask the lakehouse maintainers before shipping. Do not invent a convention quietly; a private convention is drift with a good excuse.

Its documentation lags its deployment. Endpoints named in its top-level docs may describe an older host than the one its docker/ tree now ships. Trust the deployment tree over the prose when they disagree.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.