From c825ead2098462d770584ee4ed7681fbe70197c5 Mon Sep 17 00:00:00 2001 From: ZdenekSrotyr Date: Fri, 10 Apr 2026 19:41:07 +0200 Subject: [PATCH] feat: add CLAUDE.md template for analyst bootstrap --- config/claude_md_template.txt | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 config/claude_md_template.txt diff --git a/config/claude_md_template.txt b/config/claude_md_template.txt new file mode 100644 index 0000000..12b5f84 --- /dev/null +++ b/config/claude_md_template.txt @@ -0,0 +1,32 @@ +# {instance_name} — AI Data Analyst + +This workspace is connected to {server_url}. + +## Rules +- Before computing any business metric: run `da metrics show /` +- For current schema: read `data/metadata/schema.json` +- Do not use DESCRIBE/SHOW COLUMNS — read metadata files instead +- Save work output to `user/artifacts/` +- Sync data regularly with `da sync` + +## Metrics Workflow +1. `da metrics list` — find the relevant metric +2. `da metrics show revenue/mrr` — read SQL and business rules +3. Use the canonical SQL from the metric definition, adapt to the question +4. Never invent metric calculations — always check existing definitions first + +## Data Sync +- `da sync` — download current data from server +- `da sync --docs-only` — just metadata and metrics (fast refresh) +- `da sync --upload-only` — upload sessions and local notes to server +- Data on the server refreshes every {sync_interval} + +## Directory Structure +- `data/` — read-only data downloaded from server + - `data/parquet/` — table data in Parquet format + - `data/duckdb/` — local analytics DuckDB database + - `data/metadata/` — profiles, schema, metrics cache +- `user/` — your workspace (persistent across syncs) + - `user/artifacts/` — analysis outputs, reports, charts + - `user/sessions/` — Claude Code session logs +- `.claude/CLAUDE.local.md` — your personal notes (never overwritten, uploaded on sync)