@graphit/cli 0.2.320 → 0.2.322
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/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/bin/graphit +1 -1
- package/bin/graphit.ps1 +1 -1
- package/dist/commands/sl/index.d.ts +2 -0
- package/dist/commands/sl/index.js +263 -0
- package/dist/commands/sl/index.js.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/graphit/SKILL.md +2 -2
- package/skills/graphit/VERSION.json +1 -1
- package/skills/graphit/references/table.md +24 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
},
|
|
8
8
|
"metadata": {
|
|
9
9
|
"description": "Graphit CLI plugin for AI coding assistants",
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.322"
|
|
11
11
|
},
|
|
12
12
|
"plugins": [
|
|
13
13
|
{
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"source": {
|
|
17
17
|
"source": "npm",
|
|
18
18
|
"package": "@graphit/cli",
|
|
19
|
-
"version": "0.2.
|
|
19
|
+
"version": "0.2.322"
|
|
20
20
|
},
|
|
21
|
-
"version": "0.2.
|
|
21
|
+
"version": "0.2.322",
|
|
22
22
|
"category": "data-visualization",
|
|
23
23
|
"tags": [
|
|
24
24
|
"bi",
|
package/bin/graphit
CHANGED
|
@@ -14,7 +14,7 @@ if [ -z "${GRAPHIT_PLUGIN_ROOT:-}" ]; then
|
|
|
14
14
|
fi
|
|
15
15
|
|
|
16
16
|
# graphit:floor (stamped by scripts/sync-plugin-version.mjs from cli/package.json)
|
|
17
|
-
FLOOR_VERSION="0.2.
|
|
17
|
+
FLOOR_VERSION="0.2.322"
|
|
18
18
|
|
|
19
19
|
PACKAGE_NAME="@graphit/cli"
|
|
20
20
|
# Strict semver: anything else is rejected so a tampered cache cannot inject.
|
package/bin/graphit.ps1
CHANGED
|
@@ -7,7 +7,7 @@ if (-not $env:GRAPHIT_PLUGIN_ROOT) {
|
|
|
7
7
|
}
|
|
8
8
|
|
|
9
9
|
# graphit:floor (stamped by scripts/sync-plugin-version.mjs from cli/package.json)
|
|
10
|
-
$FloorVersion = "0.2.
|
|
10
|
+
$FloorVersion = "0.2.322"
|
|
11
11
|
|
|
12
12
|
$PackageName = "@graphit/cli"
|
|
13
13
|
# Strict semver: anything else is rejected so a tampered cache cannot inject.
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { apiClient } from "../../api/client.js";
|
|
3
|
+
import { errorOutput } from "../../output/format.js";
|
|
4
|
+
import { writeStderr } from "../../stderr.js";
|
|
5
|
+
// The dbt-native semantic-layer command tree (dormant preview).
|
|
6
|
+
//
|
|
7
|
+
// GATED: registered only when GRAPHIT_SL=1 (see src/index.ts). This file lives
|
|
8
|
+
// in a SUBDIRECTORY of commands/ deliberately - the SKILL.md/tool-manifest
|
|
9
|
+
// generators walk only top-level dist/commands/*.js registrars, so nothing
|
|
10
|
+
// here can reach the published skill, the verb-policy manifest, or the in-app
|
|
11
|
+
// agent surface until the cutover promotes it. At cutover this tree replaces
|
|
12
|
+
// the legacy `kb` group (same verbs, `kb` group name), the gate drops, a
|
|
13
|
+
// top-level registrar makes the walk see it, verb-policy rows + skill
|
|
14
|
+
// references land, and gen:commands regenerates - the full CLI change
|
|
15
|
+
// checklist runs THEN, against commands users can actually run.
|
|
16
|
+
//
|
|
17
|
+
// The noun set mirrors the backend's typed descriptors: semantic-model,
|
|
18
|
+
// metric, group. Nested entities/dimensions/measures mutate through
|
|
19
|
+
// `update semantic-model` (a provided list replaces the stored list whole)
|
|
20
|
+
// and are independently readable (`sl entity`, `sl get semantic-model`).
|
|
21
|
+
const NOUNS = ["semantic-model", "metric", "group"];
|
|
22
|
+
const ARG_NOUN = "Semantic-layer noun - semantic-model, metric or group";
|
|
23
|
+
const ARG_NAME = "Asset name (lowercase snake_case), as returned by sl list or sl search";
|
|
24
|
+
function requireNoun(noun) {
|
|
25
|
+
if (!NOUNS.includes(noun)) {
|
|
26
|
+
writeStderr(JSON.stringify({
|
|
27
|
+
error: `Unknown noun '${noun}'. Valid: ${NOUNS.join(", ")}`,
|
|
28
|
+
}));
|
|
29
|
+
process.exit(1);
|
|
30
|
+
}
|
|
31
|
+
return noun;
|
|
32
|
+
}
|
|
33
|
+
function payloadFromOpts(opts) {
|
|
34
|
+
if (!opts.file && !opts.json) {
|
|
35
|
+
writeStderr(JSON.stringify({ error: "Provide the definition via --file <path> or --json <string>" }));
|
|
36
|
+
process.exit(1);
|
|
37
|
+
}
|
|
38
|
+
if (opts.file && opts.json) {
|
|
39
|
+
writeStderr(JSON.stringify({ error: "--file and --json are mutually exclusive" }));
|
|
40
|
+
process.exit(1);
|
|
41
|
+
}
|
|
42
|
+
const raw = opts.file ? readFileSync(opts.file, "utf-8") : opts.json;
|
|
43
|
+
try {
|
|
44
|
+
return JSON.parse(raw);
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
writeStderr(JSON.stringify({ error: "Definition is not valid JSON" }));
|
|
48
|
+
process.exit(1);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function parseAxes(pairs) {
|
|
52
|
+
const axes = {};
|
|
53
|
+
for (const pair of pairs ?? []) {
|
|
54
|
+
const eq = pair.indexOf("=");
|
|
55
|
+
if (eq <= 0) {
|
|
56
|
+
writeStderr(JSON.stringify({ error: `--axis '${pair}' must be key=value` }));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
axes[pair.slice(0, eq)] = pair.slice(eq + 1);
|
|
60
|
+
}
|
|
61
|
+
return axes;
|
|
62
|
+
}
|
|
63
|
+
export function registerSlCommands(program) {
|
|
64
|
+
const sl = program
|
|
65
|
+
.command("sl")
|
|
66
|
+
.description("Semantic layer (dbt-native Knowledge Base) - semantic models, metrics, groups");
|
|
67
|
+
// -- create ---------------------------------------------------------------
|
|
68
|
+
const create = sl.command("create").description("Create semantic-layer assets");
|
|
69
|
+
create
|
|
70
|
+
.command("semantic-model")
|
|
71
|
+
.description("Create a semantic model from a JSON definition (dbt shape: name, model, " +
|
|
72
|
+
"entities, dimensions, measures, defaults, group)")
|
|
73
|
+
.option("--file <path>", "Path to a JSON definition file")
|
|
74
|
+
.option("--json <string>", "Inline JSON definition")
|
|
75
|
+
.option("--unverified", "Create as draft instead of verified")
|
|
76
|
+
.action(async function () {
|
|
77
|
+
try {
|
|
78
|
+
const opts = this.opts();
|
|
79
|
+
const body = {
|
|
80
|
+
definition: payloadFromOpts(opts),
|
|
81
|
+
unverified: opts.unverified === true,
|
|
82
|
+
};
|
|
83
|
+
console.log(JSON.stringify(await apiClient.post("/api/v1/cli/sl/semantic-model", body)));
|
|
84
|
+
}
|
|
85
|
+
catch (err) {
|
|
86
|
+
errorOutput(err);
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
create
|
|
90
|
+
.command("metric")
|
|
91
|
+
.description("Create a metric from a JSON definition (type: simple, ratio, derived, " +
|
|
92
|
+
"cumulative or conversion, with type_params). --family/--axis tag a " +
|
|
93
|
+
"concrete member of a metric family")
|
|
94
|
+
.option("--file <path>", "Path to a JSON definition file")
|
|
95
|
+
.option("--json <string>", "Inline JSON definition")
|
|
96
|
+
.option("--family <name>", "Metric family this variant belongs to")
|
|
97
|
+
.option("--axis <key=value...>", "Axis value that generated this variant (repeatable)")
|
|
98
|
+
.option("--unverified", "Create as draft instead of verified")
|
|
99
|
+
.action(async function () {
|
|
100
|
+
try {
|
|
101
|
+
const opts = this.opts();
|
|
102
|
+
const definition = payloadFromOpts(opts);
|
|
103
|
+
if (opts.family) {
|
|
104
|
+
const meta = (definition.meta ??= {});
|
|
105
|
+
const graphit = (meta.graphit ??=
|
|
106
|
+
{});
|
|
107
|
+
graphit.family ??= opts.family;
|
|
108
|
+
const axes = parseAxes(opts.axis);
|
|
109
|
+
if (Object.keys(axes).length > 0)
|
|
110
|
+
graphit.axes ??= axes;
|
|
111
|
+
}
|
|
112
|
+
const body = { definition, unverified: opts.unverified === true };
|
|
113
|
+
console.log(JSON.stringify(await apiClient.post("/api/v1/cli/sl/metric", body)));
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
errorOutput(err);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
create
|
|
120
|
+
.command("group")
|
|
121
|
+
.description("Create a group (the domain analogue; admin only)")
|
|
122
|
+
.requiredOption("--name <name>", "Group name (lowercase snake_case)")
|
|
123
|
+
.option("--description <text>", "Group description")
|
|
124
|
+
.option("--owner-email <email>", "Owning analyst's email")
|
|
125
|
+
.option("--access <level>", "dbt group access level: private, protected or public")
|
|
126
|
+
.action(async function () {
|
|
127
|
+
try {
|
|
128
|
+
const opts = this.opts();
|
|
129
|
+
const definition = { name: opts.name };
|
|
130
|
+
if (opts.description)
|
|
131
|
+
definition.description = opts.description;
|
|
132
|
+
if (opts.ownerEmail)
|
|
133
|
+
definition.owner_email = opts.ownerEmail;
|
|
134
|
+
if (opts.access)
|
|
135
|
+
definition.access = opts.access;
|
|
136
|
+
console.log(JSON.stringify(await apiClient.post("/api/v1/cli/sl/group", { definition })));
|
|
137
|
+
}
|
|
138
|
+
catch (err) {
|
|
139
|
+
errorOutput(err);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
// -- update ---------------------------------------------------------------
|
|
143
|
+
sl.command("update")
|
|
144
|
+
.argument("<noun>", ARG_NOUN)
|
|
145
|
+
.argument("<name>", ARG_NAME)
|
|
146
|
+
.description("Update an asset with a JSON patch. On semantic-model, a provided " +
|
|
147
|
+
"entities/dimensions/measures list replaces the stored list whole")
|
|
148
|
+
.option("--file <path>", "Path to a JSON patch file")
|
|
149
|
+
.option("--json <string>", "Inline JSON patch")
|
|
150
|
+
.action(async function (noun, name) {
|
|
151
|
+
try {
|
|
152
|
+
requireNoun(noun);
|
|
153
|
+
const body = { patch: payloadFromOpts(this.opts()) };
|
|
154
|
+
console.log(JSON.stringify(await apiClient.put(`/api/v1/cli/sl/${noun}/${encodeURIComponent(name)}`, body)));
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
errorOutput(err);
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
// -- delete ---------------------------------------------------------------
|
|
161
|
+
sl.command("delete")
|
|
162
|
+
.argument("<noun>", ARG_NOUN)
|
|
163
|
+
.argument("<name>", ARG_NAME)
|
|
164
|
+
.description("Delete an asset (requires --yes). Refused while other definitions " +
|
|
165
|
+
"still reference it")
|
|
166
|
+
.requiredOption("--yes", "Confirm deletion")
|
|
167
|
+
.action(async function (noun, name) {
|
|
168
|
+
try {
|
|
169
|
+
requireNoun(noun);
|
|
170
|
+
await apiClient.delete(`/api/v1/cli/sl/${noun}/${encodeURIComponent(name)}`);
|
|
171
|
+
console.log(JSON.stringify({ status: "deleted", noun, name }));
|
|
172
|
+
}
|
|
173
|
+
catch (err) {
|
|
174
|
+
errorOutput(err);
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
// -- reads ----------------------------------------------------------------
|
|
178
|
+
sl.command("get")
|
|
179
|
+
.argument("<noun>", ARG_NOUN)
|
|
180
|
+
.argument("<name>", ARG_NAME)
|
|
181
|
+
.description("Fetch one asset. Metrics include their family and sibling variants")
|
|
182
|
+
.action(async function (noun, name) {
|
|
183
|
+
try {
|
|
184
|
+
requireNoun(noun);
|
|
185
|
+
console.log(JSON.stringify(await apiClient.get(`/api/v1/cli/sl/${noun}/${encodeURIComponent(name)}`)));
|
|
186
|
+
}
|
|
187
|
+
catch (err) {
|
|
188
|
+
errorOutput(err);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
sl.command("list")
|
|
192
|
+
.argument("<noun>", ARG_NOUN)
|
|
193
|
+
.description("List all visible assets of one noun")
|
|
194
|
+
.action(async function (noun) {
|
|
195
|
+
try {
|
|
196
|
+
requireNoun(noun);
|
|
197
|
+
console.log(JSON.stringify(await apiClient.get(`/api/v1/cli/sl/${noun}`)));
|
|
198
|
+
}
|
|
199
|
+
catch (err) {
|
|
200
|
+
errorOutput(err);
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
sl.command("tree")
|
|
204
|
+
.description("The whole visible semantic layer: group -> semantic model -> assets, " +
|
|
205
|
+
"metric families collapsed to one card each")
|
|
206
|
+
.action(async function () {
|
|
207
|
+
try {
|
|
208
|
+
console.log(JSON.stringify(await apiClient.get("/api/v1/cli/sl/tree")));
|
|
209
|
+
}
|
|
210
|
+
catch (err) {
|
|
211
|
+
errorOutput(err);
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
sl.command("search")
|
|
215
|
+
.argument("<query>", "Search text (name or description)")
|
|
216
|
+
.description("Search semantic models, metrics, groups and nested components")
|
|
217
|
+
.option("--limit <n>", "Maximum results (default 50)")
|
|
218
|
+
.action(async function (query) {
|
|
219
|
+
try {
|
|
220
|
+
const rawLimit = this.opts().limit;
|
|
221
|
+
if (rawLimit !== undefined && !/^[1-9]\d*$/.test(rawLimit)) {
|
|
222
|
+
writeStderr(JSON.stringify({ error: `--limit '${rawLimit}' must be a positive integer` }));
|
|
223
|
+
process.exit(1);
|
|
224
|
+
}
|
|
225
|
+
const limit = rawLimit ? `&limit=${rawLimit}` : "";
|
|
226
|
+
console.log(JSON.stringify(await apiClient.get(`/api/v1/cli/sl/search?q=${encodeURIComponent(query)}${limit}`)));
|
|
227
|
+
}
|
|
228
|
+
catch (err) {
|
|
229
|
+
errorOutput(err);
|
|
230
|
+
}
|
|
231
|
+
});
|
|
232
|
+
sl.command("entity")
|
|
233
|
+
.argument("<name>", "Entity name (as declared inside semantic models)")
|
|
234
|
+
.description("One entity across every visible semantic model that declares it")
|
|
235
|
+
.action(async function (name) {
|
|
236
|
+
try {
|
|
237
|
+
console.log(JSON.stringify(await apiClient.get(`/api/v1/cli/sl/entity/${encodeURIComponent(name)}`)));
|
|
238
|
+
}
|
|
239
|
+
catch (err) {
|
|
240
|
+
errorOutput(err);
|
|
241
|
+
}
|
|
242
|
+
});
|
|
243
|
+
sl.command("family")
|
|
244
|
+
.argument("<family>", "Metric family name")
|
|
245
|
+
.description("Expand a metric family; with --axis constraints, resolve to the one " +
|
|
246
|
+
"concrete member (ambiguity answers with the still-open axes)")
|
|
247
|
+
.option("--axis <key=value...>", "Axis constraint to resolve against (repeatable)")
|
|
248
|
+
.action(async function (family) {
|
|
249
|
+
try {
|
|
250
|
+
const axes = parseAxes(this.opts().axis);
|
|
251
|
+
const entries = Object.entries(axes);
|
|
252
|
+
const encoded = encodeURIComponent(family);
|
|
253
|
+
const path = entries.length > 0
|
|
254
|
+
? `/api/v1/cli/sl/family/${encoded}/resolve?axes=${encodeURIComponent(entries.map(([k, v]) => `${k}=${v}`).join(","))}`
|
|
255
|
+
: `/api/v1/cli/sl/family/${encoded}`;
|
|
256
|
+
console.log(JSON.stringify(await apiClient.get(path)));
|
|
257
|
+
}
|
|
258
|
+
catch (err) {
|
|
259
|
+
errorOutput(err);
|
|
260
|
+
}
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/sl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,gEAAgE;AAChE,EAAE;AACF,+EAA+E;AAC/E,2EAA2E;AAC3E,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,yEAAyE;AACzE,sEAAsE;AACtE,sEAAsE;AACtE,gEAAgE;AAChE,EAAE;AACF,wEAA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BAAiB,kBAAkB,CACjE,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAC/C,EAAE;gBACL,CAAC,CAAC,yBAAyB,OAAO,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACzD,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,WAAW,CAAC,GAAG,CAAC,CAAC;QACnB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,7 @@ import { Command } from "commander";
|
|
|
7
7
|
import { registerAuthCommands } from "./commands/auth.js";
|
|
8
8
|
import { registerStatusCommand } from "./commands/status.js";
|
|
9
9
|
import { registerKBCommands } from "./commands/kb.js";
|
|
10
|
+
import { registerSlCommands } from "./commands/sl/index.js";
|
|
10
11
|
import { registerQueryCommands } from "./commands/query.js";
|
|
11
12
|
import { registerDSCommands } from "./commands/ds.js";
|
|
12
13
|
import { registerDashboardCommands } from "./commands/dashboard.js";
|
|
@@ -30,6 +31,13 @@ program
|
|
|
30
31
|
registerAuthCommands(program);
|
|
31
32
|
registerStatusCommand(program);
|
|
32
33
|
registerKBCommands(program);
|
|
34
|
+
// Dormant semantic-layer preview: the registrar lives in a commands/
|
|
35
|
+
// SUBDIRECTORY (the doc/manifest walk scans only top-level registrars), so
|
|
36
|
+
// this gate controls the runtime surface while the generated artifacts stay
|
|
37
|
+
// stable by construction. The cutover ungates it as the kb replacement.
|
|
38
|
+
if (process.env.GRAPHIT_SL === "1") {
|
|
39
|
+
registerSlCommands(program);
|
|
40
|
+
}
|
|
33
41
|
registerQueryCommands(program);
|
|
34
42
|
registerDSCommands(program);
|
|
35
43
|
registerDashboardC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AAqB,EAAE,CAAC;IAC3B,4BAA4B,EAAE,CAAC;IAC/B,iBAAiB,EAAE,CAAC;IACpB,0BAA0B,EAAE,CAAC;IAC7B,sBAAsB,EAAE,CAAC;AAC3B,CAAC;AAED,gFAAgF;AAChF,8EAA8E;AAC9E,iFAAiF;AACjF,gFAAgF;AAChF,kFAAkF;AAClF,gFAAgF;AAChF,4EAA4E;AAC5E,2EAA2E;AAC3E,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,YAAY,EAAE,aAAa,EAAE,EAAE;IACxD,MAAM,QAAQ,GAAa,EAAE,CAAC;IAC9B,KAAK,IAAI,GAAG,GAAmB,aAAa,EAAE,GAAG,IAAI,GAAG,CAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC;QAClF,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC;IAC/B,CAAC;IACD,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,aAAa,CAAC,IAAI,EAAE,CAAC,CAAC;AAC7D,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,KAAK,EAAE,CAAC;AAChB,mBAAmB,EAAE,CAAC"}
|
package/package.json
CHANGED
package/skills/graphit/SKILL.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
name: graphit
|
|
3
3
|
description: >-
|
|
4
4
|
Use Graphit for ANY question about the user's business or product data: metrics, KPIs, revenue, retention, spend, users, cohorts, funnels, trends, comparisons, "why did X change", "how are we doing on Y", analysis, reports, or dashboards. Activate even when the user does not say "Graphit" or name any tool: if someone wants to understand their numbers, this is the tool. Graphit answers through a governed semantic layer (computed the team's way, reusable and safe to share) and delivers the answer as a fast cached-data query or a hand-authored interactive HTML dashboard, and can create the metrics, dimensions, and rules an answer needs. Prefer Graphit over hand-rolled one-off analysis whenever the data is, or could be, the user's business data. Skip only for pure software tasks (code, logs, config, infra) or data with nothing to do with the user's business.
|
|
5
|
-
skill_version: "0.2.
|
|
5
|
+
skill_version: "0.2.322"
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<!-- SIZE EXEMPTION (SKILL.md): standard hard limit 12,288 chars, exempted ceiling 31,872. Always-loaded: the collaboration/pace spine, hard constraints + scope gate, the loop, and the generated command table (COMMANDS markers, scripts/generate-commands-doc.mjs) - needed every turn, cannot defer to a reference. Marker sits after the frontmatter so the loader and sync-plugin-version.mjs parse it. Reviewed 2026-08-02. Raised from 29,952 on 2026-08-07 (founder-directed): a domain is now an access boundary, so loop step 2 must say that picking one decides who ever sees the work - load-bearing before any reference load can be relied on. Raised from 30,592 on 2026-08-13 (founder-directed): the living-context MUST bullet - explore placements answer path + pre-create fork. SIZING.md rules raises pay only for command-table growth; both raises are deliberate exceptions. Raised from 31,232 on 2026-08-16: the generated table gained `dashboard check` and its flags - table growth, the sanctioned kind - plus that verb's one router row. -->
|
|
@@ -157,7 +157,7 @@ Read the one that matches what you are doing now. Do not preload them. Exact com
|
|
|
157
157
|
|
|
158
158
|
## Commands
|
|
159
159
|
|
|
160
|
-
Graphit is one CLI, but how you invoke it depends on your environment. On Claude Code the plugin provides a `graphit` wrapper, so `graphit <command>` runs the current CLI. On Codex, Cursor, a terminal, or CI there is no `graphit` wrapper - invoke the CLI explicitly with `npx -y @graphit/cli@0.2.
|
|
160
|
+
Graphit is one CLI, but how you invoke it depends on your environment. On Claude Code the plugin provides a `graphit` wrapper, so `graphit <command>` runs the current CLI. On Codex, Cursor, a terminal, or CI there is no `graphit` wrapper - invoke the CLI explicitly with `npx -y @graphit/cli@0.2.322 <command>` (a stamped version, kept current by the build; pin an exact version for a reproducible run). The table below is generated from the CLI itself. For exact flags, run `graphit <command> --help` - never guess a flag.
|
|
161
161
|
|
|
162
162
|
<!-- COMMANDS:START -->
|
|
163
163
|
|
|
@@ -17,3 +17,27 @@ graphit.table('#detail-table', {
|
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
`columns` entries are row keys, not display configs - there is no rename mapping. For readable headers, alias in SQL with quoted identifiers (`SELECT SUM(CREDIT_USED) AS "Total Credits"`) so the key itself is the display name, and use the same key in `columnFormats`. Columns without a `columnFormats` entry render raw. Percent values follow the non-scaling rule: multiply 0-1 ratios by 100 in SQL first.
|
|
20
|
+
|
|
21
|
+
## Downloads: declare the columns a hand-rolled table shows
|
|
22
|
+
|
|
23
|
+
The entity kebab menu offers Download CSV / Excel. It re-runs the entity's recorded query and serializes **every column that query returned**, which is correct for rows (the runtime caps rows after the query, so the file is deliberately fuller than the screen) and wrong for columns whenever the table shows fewer than it fetches.
|
|
24
|
+
|
|
25
|
+
That gap is easy to create on purpose. A table with a column picker usually fetches a wide catalogue once so adding a column is instant with no re-query, and a table with rich tooltips may fetch helper columns (a ratio's numerator and denominator, a rank used only for ordering) that are never a visible column at all. One production dashboard fetched 235 columns to render 12; 136 of them existed only to feed a hover tooltip. Every one of them landed in the user's file.
|
|
26
|
+
|
|
27
|
+
**`graphit.table` is not exempt.** Its `columns` list selects a subset, and rows are often reshaped or renamed in JS before being handed over, so the file can carry both extra columns and the raw SQL aliases (`active_players`) where the table shows the display names (`Active Players`). Declare whenever the table's `columns` differ from what the query returned, for either reason. A table that renders every column its query returned, under those names, needs nothing.
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
// call it wherever you build the header row, with the SAME list, in the same order
|
|
31
|
+
if (graphit.exportColumns) {
|
|
32
|
+
graphit.exportColumns('summary-table', [
|
|
33
|
+
{ key: 'rowkey', label: 'Install Day' }, // row-label columns first
|
|
34
|
+
...visibleCols.map(c => ({ key: c.key, label: c.label })),
|
|
35
|
+
])
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- **Call it from the render path, not from setup.** The single function every consumer already goes through (headers, cells, totals) is the right place, because then the file cannot drift from the table. Calling it once at load leaves the declaration stale the moment the user hides a column.
|
|
40
|
+
- **`label` becomes the file's header text**, so pass what the user is looking at, not the SQL alias. If a column renders as a percentage while the exported value is the raw count, name it for the value in the file, not the one on screen.
|
|
41
|
+
- **Add the row-label columns yourself.** A visible-column list usually holds measure columns only, while the row label is rendered separately, so it has to be prepended or the file loses its key column.
|
|
42
|
+
- **Guard with `if (graphit.exportColumns)`.** On an older platform build the call throws, and a throw inside a render function takes the whole table down with it.
|
|
43
|
+
- **Declaring nothing is fine and is the default.** No declaration means the download is unchanged, which is right for any table whose query already matches what it shows. A declared key the query did not return is dropped, never invented, and a declaration matching nothing falls back to the full result rather than producing an empty file.
|