-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpolicy.example.json
More file actions
37 lines (37 loc) · 1.86 KB
/
Copy pathpolicy.example.json
File metadata and controls
37 lines (37 loc) · 1.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
"version": 1,
"_comment": "Selective per-tool policy, informed by the spike's measured per-tool savings (gh records +16-30%, runecho +25-29%, kb +2.6%, single objects +0%). First matching rule wins; unmatched tools use defaults. tiers subset of [minify, tabularize, dictionary]; [] = passthrough. Lossless by default. Per-field lossy is opt-in: 'truncate' executes (gated by an acceptable-loss check); 'summarize'/'drop-to-retrieve' are parsed but deferred (warned). A field marked {critical:true} is never made lossy.",
"defaults": {
"tiers": ["minify", "tabularize", "dictionary"]
},
"policies": [
{
"_comment": "Verbose record/symbol APIs — full Tier-0/0.5 pays (16-30%).",
"match": { "tool": "gh.*" },
"tiers": ["minify", "tabularize", "dictionary"],
"fields": {
"result[].id": { "critical": true, "_note": "identifier — never made lossy" },
"result[].body": { "lossy": "truncate", "max": 500, "_note": "keep first 500 chars + a loss marker" }
}
},
{
"match": { "tool": "runecho.*" },
"tiers": ["minify", "tabularize", "dictionary"]
},
{
"_comment": "codegraph: search/query JSON measured +33%. explore/node return markdown+source (non-JSON) — terse can't parse those and passes them through untouched, so this rule only ever fires on the JSON-shaped tools.",
"match": { "tool": "codegraph.*" },
"tiers": ["minify", "tabularize", "dictionary"]
},
{
"_comment": "Already field-projected + high-cardinality content; dictionary added ~nothing (+2.6% total). Keep cheap structural tiers, drop dictionary.",
"match": { "tool": "kb.*" },
"tiers": ["minify", "tabularize"]
},
{
"_comment": "Status/single-object endpoints measured +0% — skip entirely to avoid transform cost.",
"match": { "tool": "*.rate_limit" },
"tiers": []
}
]
}