@ictechgy/context-guard 0.4.0 → 0.4.3

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.
Files changed (45) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/README.ko.md +61 -32
  3. package/README.md +90 -22
  4. package/context-guard-kit/README.md +39 -26
  5. package/context-guard-kit/benchmark_runner.py +273 -8
  6. package/context-guard-kit/claude_transcript_cost_audit.py +325 -12
  7. package/context-guard-kit/context_compress.py +153 -1
  8. package/context-guard-kit/context_filter.py +446 -0
  9. package/context-guard-kit/context_guard_cli.py +3 -0
  10. package/context-guard-kit/context_guard_diet.py +677 -2
  11. package/context-guard-kit/context_pack.py +1694 -2
  12. package/context-guard-kit/cost_guard.py +1870 -0
  13. package/context-guard-kit/setup_wizard.py +820 -29
  14. package/context-guard-kit/trim_command_output.py +396 -45
  15. package/docs/benchmark-fixtures/learned-compression.tasks.example.json +24 -0
  16. package/docs/benchmark-fixtures/learned-compression.variants.example.json +10 -0
  17. package/docs/benchmark-fixtures/visual-ocr.tasks.example.json +24 -0
  18. package/docs/benchmark-fixtures/visual-ocr.variants.example.json +10 -0
  19. package/docs/benchmark-workflow-examples.md +40 -0
  20. package/docs/benchmark-workflows/context-pack-byte-proxy.example.json +169 -0
  21. package/docs/benchmark-workflows/measured-token-workflow.example.json +170 -0
  22. package/docs/benchmark-workflows/provider-cache-telemetry.example.json +170 -0
  23. package/docs/cache-diagnostics-schema.md +75 -0
  24. package/docs/cache-diagnostics.example.json +116 -0
  25. package/docs/cache-diagnostics.schema.json +460 -0
  26. package/docs/distribution.md +4 -2
  27. package/docs/experimental-benchmark-fixtures.md +36 -0
  28. package/package.json +11 -2
  29. package/packaging/homebrew/context-guard.rb.template +3 -2
  30. package/plugins/context-guard/.claude-plugin/plugin.json +1 -1
  31. package/plugins/context-guard/README.ko.md +21 -13
  32. package/plugins/context-guard/README.md +24 -10
  33. package/plugins/context-guard/bin/context-guard +3 -0
  34. package/plugins/context-guard/bin/context-guard-audit +325 -12
  35. package/plugins/context-guard/bin/context-guard-bench +273 -8
  36. package/plugins/context-guard/bin/context-guard-compress +153 -1
  37. package/plugins/context-guard/bin/context-guard-cost +1870 -0
  38. package/plugins/context-guard/bin/context-guard-diet +677 -2
  39. package/plugins/context-guard/bin/context-guard-filter +446 -0
  40. package/plugins/context-guard/bin/context-guard-pack +1694 -2
  41. package/plugins/context-guard/bin/context-guard-setup +820 -29
  42. package/plugins/context-guard/bin/context-guard-trim-output +396 -45
  43. package/plugins/context-guard/brief/README.md +10 -3
  44. package/plugins/context-guard/skills/optimize/SKILL.md +5 -2
  45. package/plugins/context-guard/skills/setup/SKILL.md +3 -1
@@ -0,0 +1,116 @@
1
+ {
2
+ "cache_miss_hypotheses": [
3
+ {
4
+ "action": "Move diffs, logs, timestamps, and command output after stable reusable prompt prefixes.",
5
+ "confidence": "partial",
6
+ "evidence": "inferred",
7
+ "id": "volatile-prefix-breakers",
8
+ "reason": "Redacted prompt segment hashes show volatile content near the prefix window."
9
+ }
10
+ ],
11
+ "caveats": [
12
+ "Cache diagnostics are local transcript heuristics and do not prove exact provider cache-prefix state.",
13
+ "Provider cache read/write fields are diagnostic telemetry and do not prove ContextGuard-caused token reduction.",
14
+ "Stable-prefix and breaker positions come from bounded redacted segment hashes, not raw prompt text."
15
+ ],
16
+ "confidence": "hypothesis",
17
+ "derived_ratios": {
18
+ "cache_read_share": {
19
+ "evidence": "inferred",
20
+ "value": 0.7009345794392523
21
+ },
22
+ "cache_reuse_ratio": {
23
+ "evidence": "inferred",
24
+ "value": 2.5
25
+ }
26
+ },
27
+ "dynamic_prefix_breakers": [
28
+ {
29
+ "action": "Move diffs, logs, timestamps, and command output after stable reusable prompt prefixes.",
30
+ "confidence": "partial",
31
+ "evidence": "inferred",
32
+ "heuristic": true,
33
+ "position": 2,
34
+ "sample_count": 2,
35
+ "stability": 0.5,
36
+ "trigger": "prefix_position",
37
+ "unique_hashes": 2,
38
+ "volatile_share": 0.5
39
+ }
40
+ ],
41
+ "evidence": "inferred",
42
+ "headroom_diagnostics": {
43
+ "evidence": "unavailable",
44
+ "historical_total_tokens_are_not_headroom": true,
45
+ "observable_via": "live_statusline_snapshot",
46
+ "reason": "Transcript scans do not carry live context-window or remaining-token data, so context headroom cannot be observed or conservatively inferred from history alone.",
47
+ "required_observation": "live_statusline_snapshot",
48
+ "status": "missing"
49
+ },
50
+ "heuristic": true,
51
+ "observations": {
52
+ "cache_creation_tokens": 60000,
53
+ "cache_fields": {
54
+ "derived": {
55
+ "cache_read_share": {
56
+ "evidence": "inferred",
57
+ "value": 0.7009345794392523
58
+ },
59
+ "cache_reuse_ratio": {
60
+ "evidence": "inferred",
61
+ "value": 2.5
62
+ }
63
+ },
64
+ "evidence": "observed",
65
+ "present_fields": {
66
+ "cache_creation": 2,
67
+ "cache_read": 2
68
+ },
69
+ "status": "available",
70
+ "zero_values_observed": {
71
+ "cache_creation": false,
72
+ "cache_read": false
73
+ }
74
+ },
75
+ "cache_read_tokens": 150000
76
+ },
77
+ "schema_version": "contextguard.cache-diagnostics.v1",
78
+ "stable_prefix_candidates": [
79
+ {
80
+ "action": "Keep stable instructions, policies, and reusable context before run-specific evidence.",
81
+ "confidence": "partial",
82
+ "evidence": "inferred",
83
+ "position": 0,
84
+ "sample_count": 2,
85
+ "stability": 1.0,
86
+ "unique_hashes": 1,
87
+ "volatile_share": 0.0
88
+ },
89
+ {
90
+ "action": "Keep stable instructions, policies, and reusable context before run-specific evidence.",
91
+ "confidence": "partial",
92
+ "evidence": "inferred",
93
+ "position": 1,
94
+ "sample_count": 2,
95
+ "stability": 1.0,
96
+ "unique_hashes": 1,
97
+ "volatile_share": 0.0
98
+ }
99
+ ],
100
+ "status": "partial",
101
+ "ttl_diagnostics": {
102
+ "candidate": "between-5m-and-1h",
103
+ "caveats": [
104
+ "Timestamped cache telemetry records do not prove exact provider cache-prefix identity or provider cache TTL state.",
105
+ "5-minute versus 1-hour TTL guidance is a local hypothesis unless corroborated with provider telemetry and repeated stable prefixes."
106
+ ],
107
+ "confidence": "hypothesis",
108
+ "evidence": "inferred",
109
+ "interval_basis": "positive_timestamped_cache_records",
110
+ "positive_timestamped_cache_record_count": 2,
111
+ "reason": "Positive timestamped cache telemetry records bound the local cache-observation span, but exact provider cache TTL reuse remains a hypothesis.",
112
+ "status": "hypothesis",
113
+ "timestamped_cache_record_count": 2,
114
+ "timestamped_cache_record_span_seconds": 450
115
+ }
116
+ }
@@ -0,0 +1,460 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://github.com/ictechgy/context-guard/docs/cache-diagnostics.schema.json",
4
+ "title": "ContextGuard cache_diagnostics object",
5
+ "description": "Schema reference for the nested cache_diagnostics object emitted by context-guard-audit --json and --feasibility-json. It is not the full CLI response envelope.",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schema_version",
10
+ "status",
11
+ "confidence",
12
+ "evidence",
13
+ "heuristic",
14
+ "observations",
15
+ "derived_ratios",
16
+ "stable_prefix_candidates",
17
+ "dynamic_prefix_breakers",
18
+ "cache_miss_hypotheses",
19
+ "ttl_diagnostics",
20
+ "headroom_diagnostics",
21
+ "caveats"
22
+ ],
23
+ "properties": {
24
+ "schema_version": {
25
+ "const": "contextguard.cache-diagnostics.v1"
26
+ },
27
+ "status": {
28
+ "enum": [
29
+ "available",
30
+ "partial",
31
+ "missing"
32
+ ]
33
+ },
34
+ "confidence": {
35
+ "enum": [
36
+ "observed",
37
+ "partial",
38
+ "hypothesis",
39
+ "unavailable"
40
+ ]
41
+ },
42
+ "evidence": {
43
+ "enum": [
44
+ "observed",
45
+ "inferred",
46
+ "unavailable"
47
+ ]
48
+ },
49
+ "heuristic": {
50
+ "type": "boolean",
51
+ "const": true
52
+ },
53
+ "observations": {
54
+ "type": "object",
55
+ "additionalProperties": true,
56
+ "required": [
57
+ "cache_fields",
58
+ "cache_read_tokens",
59
+ "cache_creation_tokens"
60
+ ],
61
+ "properties": {
62
+ "cache_read_tokens": {
63
+ "type": "integer",
64
+ "minimum": 0
65
+ },
66
+ "cache_creation_tokens": {
67
+ "type": "integer",
68
+ "minimum": 0
69
+ },
70
+ "cache_fields": {
71
+ "type": "object",
72
+ "additionalProperties": true,
73
+ "required": [
74
+ "status",
75
+ "evidence",
76
+ "present_fields",
77
+ "zero_values_observed",
78
+ "derived"
79
+ ],
80
+ "properties": {
81
+ "status": {
82
+ "enum": [
83
+ "available",
84
+ "partial",
85
+ "missing"
86
+ ]
87
+ },
88
+ "evidence": {
89
+ "enum": [
90
+ "observed",
91
+ "inferred",
92
+ "unavailable"
93
+ ]
94
+ },
95
+ "present_fields": {
96
+ "type": "object",
97
+ "required": [
98
+ "cache_read",
99
+ "cache_creation"
100
+ ],
101
+ "properties": {
102
+ "cache_read": {
103
+ "type": "integer",
104
+ "minimum": 0
105
+ },
106
+ "cache_creation": {
107
+ "type": "integer",
108
+ "minimum": 0
109
+ }
110
+ },
111
+ "additionalProperties": true
112
+ },
113
+ "zero_values_observed": {
114
+ "type": "object",
115
+ "required": [
116
+ "cache_read",
117
+ "cache_creation"
118
+ ],
119
+ "properties": {
120
+ "cache_read": {
121
+ "type": "boolean"
122
+ },
123
+ "cache_creation": {
124
+ "type": "boolean"
125
+ }
126
+ },
127
+ "additionalProperties": true
128
+ },
129
+ "derived": {
130
+ "$ref": "#/$defs/derivedRatios"
131
+ }
132
+ }
133
+ }
134
+ }
135
+ },
136
+ "derived_ratios": {
137
+ "$ref": "#/$defs/derivedRatios"
138
+ },
139
+ "stable_prefix_candidates": {
140
+ "type": "array",
141
+ "items": {
142
+ "$ref": "#/$defs/prefixCandidate"
143
+ }
144
+ },
145
+ "dynamic_prefix_breakers": {
146
+ "type": "array",
147
+ "items": {
148
+ "$ref": "#/$defs/prefixBreaker"
149
+ }
150
+ },
151
+ "cache_miss_hypotheses": {
152
+ "type": "array",
153
+ "items": {
154
+ "$ref": "#/$defs/hypothesis"
155
+ }
156
+ },
157
+ "ttl_diagnostics": {
158
+ "type": "object",
159
+ "additionalProperties": true,
160
+ "required": [
161
+ "status",
162
+ "evidence",
163
+ "confidence",
164
+ "timestamped_cache_record_count",
165
+ "positive_timestamped_cache_record_count",
166
+ "timestamped_cache_record_span_seconds",
167
+ "candidate",
168
+ "reason",
169
+ "interval_basis",
170
+ "caveats"
171
+ ],
172
+ "properties": {
173
+ "status": {
174
+ "enum": [
175
+ "hypothesis",
176
+ "unavailable"
177
+ ]
178
+ },
179
+ "evidence": {
180
+ "enum": [
181
+ "inferred",
182
+ "unavailable"
183
+ ]
184
+ },
185
+ "confidence": {
186
+ "enum": [
187
+ "partial",
188
+ "hypothesis",
189
+ "unavailable"
190
+ ]
191
+ },
192
+ "timestamped_cache_record_count": {
193
+ "type": "integer",
194
+ "minimum": 0
195
+ },
196
+ "positive_timestamped_cache_record_count": {
197
+ "type": "integer",
198
+ "minimum": 0
199
+ },
200
+ "timestamped_cache_record_span_seconds": {
201
+ "type": [
202
+ "integer",
203
+ "null"
204
+ ],
205
+ "minimum": 0
206
+ },
207
+ "candidate": {
208
+ "type": [
209
+ "string",
210
+ "null"
211
+ ],
212
+ "enum": [
213
+ "within-5m",
214
+ "between-5m-and-1h",
215
+ "beyond-1h",
216
+ null
217
+ ]
218
+ },
219
+ "reason": {
220
+ "type": "string"
221
+ },
222
+ "interval_basis": {
223
+ "const": "positive_timestamped_cache_records"
224
+ },
225
+ "caveats": {
226
+ "type": "array",
227
+ "items": {
228
+ "type": "string"
229
+ }
230
+ }
231
+ }
232
+ },
233
+ "headroom_diagnostics": {
234
+ "type": "object",
235
+ "additionalProperties": true,
236
+ "required": [
237
+ "status",
238
+ "evidence",
239
+ "observable_via",
240
+ "reason",
241
+ "historical_total_tokens_are_not_headroom",
242
+ "required_observation"
243
+ ],
244
+ "properties": {
245
+ "status": {
246
+ "enum": [
247
+ "missing",
248
+ "unavailable"
249
+ ]
250
+ },
251
+ "evidence": {
252
+ "const": "unavailable"
253
+ },
254
+ "observable_via": {
255
+ "const": "live_statusline_snapshot"
256
+ },
257
+ "required_observation": {
258
+ "const": "live_statusline_snapshot"
259
+ },
260
+ "historical_total_tokens_are_not_headroom": {
261
+ "type": "boolean",
262
+ "const": true
263
+ },
264
+ "reason": {
265
+ "type": "string"
266
+ }
267
+ }
268
+ },
269
+ "caveats": {
270
+ "type": "array",
271
+ "items": {
272
+ "type": "string"
273
+ }
274
+ }
275
+ },
276
+ "$defs": {
277
+ "derivedRatios": {
278
+ "type": "object",
279
+ "additionalProperties": true,
280
+ "required": [
281
+ "cache_read_share",
282
+ "cache_reuse_ratio"
283
+ ],
284
+ "properties": {
285
+ "cache_read_share": {
286
+ "$ref": "#/$defs/ratio"
287
+ },
288
+ "cache_reuse_ratio": {
289
+ "$ref": "#/$defs/ratio"
290
+ }
291
+ }
292
+ },
293
+ "ratio": {
294
+ "type": "object",
295
+ "additionalProperties": true,
296
+ "required": [
297
+ "value",
298
+ "evidence"
299
+ ],
300
+ "properties": {
301
+ "value": {
302
+ "type": [
303
+ "number",
304
+ "null"
305
+ ]
306
+ },
307
+ "evidence": {
308
+ "enum": [
309
+ "inferred",
310
+ "unavailable"
311
+ ]
312
+ }
313
+ }
314
+ },
315
+ "prefixCandidate": {
316
+ "type": "object",
317
+ "additionalProperties": true,
318
+ "required": [
319
+ "position",
320
+ "stability",
321
+ "volatile_share",
322
+ "unique_hashes",
323
+ "sample_count",
324
+ "evidence",
325
+ "confidence",
326
+ "action"
327
+ ],
328
+ "properties": {
329
+ "position": {
330
+ "type": "integer",
331
+ "minimum": 0
332
+ },
333
+ "stability": {
334
+ "type": "number",
335
+ "minimum": 0,
336
+ "maximum": 1
337
+ },
338
+ "volatile_share": {
339
+ "type": "number",
340
+ "minimum": 0,
341
+ "maximum": 1
342
+ },
343
+ "unique_hashes": {
344
+ "type": "integer",
345
+ "minimum": 0
346
+ },
347
+ "sample_count": {
348
+ "type": "integer",
349
+ "minimum": 0
350
+ },
351
+ "evidence": {
352
+ "const": "inferred"
353
+ },
354
+ "confidence": {
355
+ "enum": [
356
+ "partial",
357
+ "hypothesis"
358
+ ]
359
+ },
360
+ "action": {
361
+ "type": "string"
362
+ }
363
+ }
364
+ },
365
+ "prefixBreaker": {
366
+ "type": "object",
367
+ "additionalProperties": true,
368
+ "required": [
369
+ "position",
370
+ "trigger",
371
+ "volatile_share",
372
+ "stability",
373
+ "unique_hashes",
374
+ "sample_count",
375
+ "evidence",
376
+ "confidence",
377
+ "heuristic",
378
+ "action"
379
+ ],
380
+ "properties": {
381
+ "position": {
382
+ "type": "integer",
383
+ "minimum": 0
384
+ },
385
+ "trigger": {
386
+ "type": "string"
387
+ },
388
+ "volatile_share": {
389
+ "type": "number",
390
+ "minimum": 0,
391
+ "maximum": 1
392
+ },
393
+ "stability": {
394
+ "type": "number",
395
+ "minimum": 0,
396
+ "maximum": 1
397
+ },
398
+ "unique_hashes": {
399
+ "type": "integer",
400
+ "minimum": 0
401
+ },
402
+ "sample_count": {
403
+ "type": "integer",
404
+ "minimum": 0
405
+ },
406
+ "evidence": {
407
+ "const": "inferred"
408
+ },
409
+ "confidence": {
410
+ "enum": [
411
+ "partial",
412
+ "hypothesis"
413
+ ]
414
+ },
415
+ "heuristic": {
416
+ "type": "boolean",
417
+ "const": true
418
+ },
419
+ "action": {
420
+ "type": "string"
421
+ }
422
+ }
423
+ },
424
+ "hypothesis": {
425
+ "type": "object",
426
+ "additionalProperties": true,
427
+ "required": [
428
+ "id",
429
+ "evidence",
430
+ "confidence",
431
+ "reason",
432
+ "action"
433
+ ],
434
+ "properties": {
435
+ "id": {
436
+ "type": "string"
437
+ },
438
+ "evidence": {
439
+ "enum": [
440
+ "inferred",
441
+ "unavailable"
442
+ ]
443
+ },
444
+ "confidence": {
445
+ "enum": [
446
+ "partial",
447
+ "hypothesis",
448
+ "unavailable"
449
+ ]
450
+ },
451
+ "reason": {
452
+ "type": "string"
453
+ },
454
+ "action": {
455
+ "type": "string"
456
+ }
457
+ }
458
+ }
459
+ }
460
+ }
@@ -13,17 +13,19 @@ ContextGuard separates **install** from **activation**.
13
13
  | Claude Code plugin | shipped | `/plugin marketplace add ictechgy/context-guard` then `/plugin install context-guard@context-guard` | Best native Claude Code workflow. |
14
14
  | npm global | added | `npm install -g @ictechgy/context-guard` | Installs `context-guard` and helper aliases on PATH. |
15
15
  | npx/npm exec | added | `npx @ictechgy/context-guard --version` | One-off usage; activation still requires explicit setup. |
16
- | Homebrew | draft | `brew tap ictechgy/contextguard && brew install context-guard` | Formula template exists under `packaging/homebrew/`; publish after release artifact SHA is known. |
16
+ | Homebrew | shipped | `brew install ictechgy/tap/context-guard` | Formula is published in `ictechgy/homebrew-tap`; update it from a tagged release tarball SHA. |
17
17
 
18
18
  ## Activation examples
19
19
 
20
20
  ```bash
21
+ context-guard doctor --root . --json
21
22
  context-guard setup --agent codex --scope project --with-init --with-skill --plan
22
23
  context-guard setup --agent codex --scope project --with-init --with-skill --yes
24
+ context-guard setup --agent claude --scope user --verify --json
23
25
  context-guard setup --agent claude --scope user --plan
24
26
  ```
25
27
 
26
- Project scope is the default. User scope is opt-in and requires an explicit agent for writes. Supported user-scope writes record backups and rollback metadata under `.context-guard/rollback` in the user home directory.
28
+ Project scope is the default. `context-guard doctor` and `context-guard setup --verify` are read-only health checks. User scope is opt-in and requires an explicit agent for writes. Supported user-scope writes record backups and rollback metadata under `.context-guard/rollback` in the user home directory.
27
29
 
28
30
  ## Runtime requirements
29
31
 
@@ -0,0 +1,36 @@
1
+ # Experimental benchmark fixtures
2
+
3
+ These fixtures are **fixture-only** starter scaffolds for future visual/OCR and learned-compression experiments. They are **synthetic**, package-visible examples for `context-guard-bench` task and variant shapes; they are **not a shipped runtime feature**, not an OCR/compression implementation, and not a hosted API savings claim.
4
+
5
+ Use them when designing an experiment that starts from ContextGuard's existing benchmark discipline:
6
+
7
+ 1. Run `context-guard-bench --tasks ... --variants ... --csv ... --dry-run` first to validate command shape. Dry-run output confirms only the argv shape; it is not benchmark evidence.
8
+ Unchanged fixture files are dry-run-only starters: before any non-dry-run benchmark, replace the placeholder prompts and replace the failing placeholder `success_command` with an explicit success check or documented manual correction/evaluation workflow.
9
+ 2. Replace the placeholder prompts with sanitized project tasks and run baseline plus variant on the same task set.
10
+ 3. Compare only **matched successful tasks**.
11
+ 4. Record the **failure-rate guardrail**, **human corrections**, and **shifted-cost accounting** for work moved to local tools, subagents, artifact stores, OCR tools, or compressors.
12
+ 5. Treat byte counts, image dimensions, OCR confidence, and local compressor ratios as proxy evidence. Real token/cost claims require **provider-measured** primary token/cost fields on both sides.
13
+ 6. Keep private screenshots, raw secrets, and external service endpoints out of fixture files.
14
+
15
+ ## Included fixture sets
16
+
17
+ | Fixture set | Task file | Variant file | Intended future experiment |
18
+ | --- | --- | --- | --- |
19
+ | Visual/OCR evidence | [`benchmark-fixtures/visual-ocr.tasks.example.json`](benchmark-fixtures/visual-ocr.tasks.example.json) | [`benchmark-fixtures/visual-ocr.variants.example.json`](benchmark-fixtures/visual-ocr.variants.example.json) | Compare full visual evidence against cropped or OCR-derived evidence after the user supplies sanitized artifacts and provider telemetry. |
20
+ | Learned compression | [`benchmark-fixtures/learned-compression.tasks.example.json`](benchmark-fixtures/learned-compression.tasks.example.json) | [`benchmark-fixtures/learned-compression.variants.example.json`](benchmark-fixtures/learned-compression.variants.example.json) | Compare baseline context packs or artifact digests against a future learned-compression candidate after quality gates and shifted costs are measured. |
21
+
22
+ ## Visual/OCR fixture notes
23
+
24
+ The visual/OCR fixtures describe placeholder evidence only. They do not crop images, run OCR, prune visual tokens, or call a model. Future experiments should record image dimensions, crop area, OCR confidence/error notes, provider image/text token telemetry when available, task success, corrections, and any external/local processing cost.
25
+
26
+ ## Learned-compression fixture notes
27
+
28
+ The learned-compression fixtures describe already-sanitized context-pack or artifact-digest comparisons. They do not invoke LLMLingua-style, gist-token, latent-context, or reranking implementations. Future experiments should preserve exact retrieval for lossy transforms where possible and record bytes before/after, primary provider tokens, cost, success, corrections, compressor latency, and external cost.
29
+
30
+ ## Safe wording
31
+
32
+ Use language like:
33
+
34
+ > This synthetic fixture validates benchmark task/variant shape only. A real claim needs provider-measured token/cost data for matched successful baseline and variant tasks, plus failure-rate, correction, and shifted-cost guardrails.
35
+
36
+ Avoid language that presents dry-run output, bytes saved, OCR text, or compressor ratios as hosted API token/cost savings evidence.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ictechgy/context-guard",
3
- "version": "0.4.0",
3
+ "version": "0.4.3",
4
4
  "description": "ContextGuard CLI helpers for keeping AI coding agent context focused and local-first.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/ictechgy/context-guard#readme",
@@ -19,6 +19,7 @@
19
19
  "context-guard-audit": "plugins/context-guard/bin/context-guard-audit",
20
20
  "context-guard-trim-output": "plugins/context-guard/bin/context-guard-trim-output",
21
21
  "context-guard-sanitize-output": "plugins/context-guard/bin/context-guard-sanitize-output",
22
+ "context-guard-filter": "plugins/context-guard/bin/context-guard-filter",
22
23
  "context-guard-artifact": "plugins/context-guard/bin/context-guard-artifact",
23
24
  "context-guard-pack": "plugins/context-guard/bin/context-guard-pack",
24
25
  "context-guard-tool-prune": "plugins/context-guard/bin/context-guard-tool-prune",
@@ -29,7 +30,8 @@
29
30
  "context-guard-guard-read": "plugins/context-guard/bin/context-guard-guard-read",
30
31
  "context-guard-failed-nudge": "plugins/context-guard/bin/context-guard-failed-nudge",
31
32
  "context-guard-statusline": "plugins/context-guard/bin/context-guard-statusline",
32
- "context-guard-statusline-merged": "plugins/context-guard/bin/context-guard-statusline-merged"
33
+ "context-guard-statusline-merged": "plugins/context-guard/bin/context-guard-statusline-merged",
34
+ "context-guard-cost": "plugins/context-guard/bin/context-guard-cost"
33
35
  },
34
36
  "files": [
35
37
  "CHANGELOG.md",
@@ -50,6 +52,13 @@
50
52
  "plugins/context-guard/lib/**",
51
53
  "plugins/context-guard/skills/**",
52
54
  "docs/distribution.md",
55
+ "docs/cache-diagnostics-schema.md",
56
+ "docs/cache-diagnostics.schema.json",
57
+ "docs/cache-diagnostics.example.json",
58
+ "docs/benchmark-workflows/*.example.json",
59
+ "docs/benchmark-workflow-examples.md",
60
+ "docs/benchmark-fixtures/*.example.json",
61
+ "docs/experimental-benchmark-fixtures.md",
53
62
  "packaging/homebrew/context-guard.rb.template"
54
63
  ],
55
64
  "engines": {
@@ -5,7 +5,7 @@ class ContextGuard < Formula
5
5
 
6
6
  desc "Local-first context guardrails for AI coding agents"
7
7
  homepage "https://github.com/ictechgy/context-guard"
8
- url "https://github.com/ictechgy/context-guard/archive/refs/tags/v0.4.0.tar.gz"
8
+ url "https://github.com/ictechgy/context-guard/archive/refs/tags/v0.4.3.tar.gz"
9
9
  sha256 "REPLACE_WITH_RELEASE_TARBALL_SHA256"
10
10
  license "Apache-2.0"
11
11
 
@@ -17,7 +17,8 @@ class ContextGuard < Formula
17
17
  libexec.install "plugins"
18
18
 
19
19
  python_shebang = detected_python_shebang
20
- Dir[libexec/"plugins/context-guard/bin/*"].each do |command|
20
+ Dir[libexec/"plugins/context-guard/bin/*"].each do |path|
21
+ command = Pathname(path)
21
22
  next unless command.file?
22
23
 
23
24
  first_line = command.open { |file| file.gets.to_s }