docs: add metrics workflow instructions to CLAUDE.md
This commit is contained in:
parent
344d744089
commit
0320845e2c
1 changed files with 16 additions and 0 deletions
16
CLAUDE.md
16
CLAUDE.md
|
|
@ -138,6 +138,22 @@ curl -X POST http://localhost:8000/api/sync/trigger
|
||||||
docker compose up
|
docker compose up
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Business Metrics
|
||||||
|
|
||||||
|
Standardized metric definitions live in DuckDB (`metric_definitions` table). Import starter pack:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
da metrics import docs/metrics/
|
||||||
|
```
|
||||||
|
|
||||||
|
### For AI agents analyzing data:
|
||||||
|
Before computing any business metric, look up the canonical definition:
|
||||||
|
1. `da metrics list` — find the relevant metric
|
||||||
|
2. `da metrics show revenue/mrr` — read the SQL and business rules
|
||||||
|
3. Use the SQL from the metric definition, adapt to the specific question
|
||||||
|
|
||||||
|
Never invent metric calculations — always use the canonical definitions.
|
||||||
|
|
||||||
## Extensibility
|
## Extensibility
|
||||||
|
|
||||||
### Data Sources (extract.duckdb contract)
|
### Data Sources (extract.duckdb contract)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue