@outlit/pi 0.1.1 → 0.1.2
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outlit/pi",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Pi package for Outlit customer intelligence tools",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Outlit AI",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"test": "vitest run"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@outlit/tools": "^0.1.
|
|
67
|
+
"@outlit/tools": "^0.1.2"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@mariozechner/pi-coding-agent": "*",
|
package/skills/outlit/SKILL.md
CHANGED
|
@@ -40,13 +40,13 @@ Only use SQL if `outlit_schema` and `outlit_query` are available in the current
|
|
|
40
40
|
- Call `outlit_schema` before writing SQL.
|
|
41
41
|
- Prefer customer lookups, facts, timeline, and search before SQL for account-specific analysis.
|
|
42
42
|
- Use SQL for aggregates, cohorts, joins, custom reporting, and questions that need exact counts or revenue math.
|
|
43
|
-
- Use
|
|
43
|
+
- Use the query patterns in the SQL reference. Do not assume another database's date or JSON helpers.
|
|
44
44
|
- Add explicit time filters for event queries.
|
|
45
45
|
- Use `LIMIT`.
|
|
46
46
|
- Divide money fields in cents by `100` for display.
|
|
47
47
|
- Request only the fields needed for the answer.
|
|
48
48
|
|
|
49
|
-
For
|
|
49
|
+
For supported query patterns, read [references/sql-reference.md](references/sql-reference.md).
|
|
50
50
|
|
|
51
51
|
## Working Rules
|
|
52
52
|
|
|
@@ -4,14 +4,14 @@ Use this when writing or debugging `outlit_query` queries.
|
|
|
4
4
|
|
|
5
5
|
Always inspect schema first with `outlit_schema`.
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Views
|
|
8
8
|
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
9
|
+
- `activity`: product and communication activity
|
|
10
|
+
- `customers`: customer attributes, billing, revenue
|
|
11
|
+
- `users`: user attributes and journey stages
|
|
12
|
+
- `revenue`: daily MRR snapshots
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## Useful Patterns
|
|
15
15
|
|
|
16
16
|
```sql
|
|
17
17
|
now()
|
|
@@ -22,11 +22,12 @@ occurred_at >= now() - INTERVAL 30 DAY
|
|
|
22
22
|
countIf(billing_status = 'PAYING')
|
|
23
23
|
sumIf(mrr_cents, billing_status = 'PAYING')
|
|
24
24
|
JSONExtractString(properties, 'path')
|
|
25
|
+
JSONExtractString(traits, 'plan')
|
|
25
26
|
```
|
|
26
27
|
|
|
27
|
-
Prefer `event_name` when you need the
|
|
28
|
+
Prefer `event_name` when you need the original tracked event name for include/exclude lists or product workflow analysis, and `event_type` for broader event classes.
|
|
28
29
|
|
|
29
|
-
Use
|
|
30
|
+
Use the patterns above instead of unsupported date helpers like `DATE_SUB()`.
|
|
30
31
|
|
|
31
32
|
## Rules
|
|
32
33
|
|