You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Deterministic trace compression and operational context validation for autonomous agent systems.**
15
+
**Deterministic Rust CLI for CompText trace packaging, replay-sidecar validation, and SPARK-ready context artifacts.**
19
16
20
17
</div>
21
18
22
19
---
23
20
24
-
## 🚀 Overview
21
+
## Overview
22
+
23
+
**CompText-Sparkctl** is a local Rust command-line toolkit for turning agent or operational traces into compact, verifiable packages and SPARK-style context artifacts.
24
+
25
+
The project is built around one hard rule: **compression must not destroy replay-critical state**. CompText separates compact linguistic payloads from replay-sensitive metadata, then validates the result with a replay sidecar, SHA-256 integrity anchors, schema checks, and offline context validation flows.
26
+
27
+
The repository currently exposes two CLI entry points:
25
28
26
-
`sparkctl` is the unified operations controller and command-line interface for the **Antigravity-CompText v7 / SPARK Context Layer**. It streamlines local diagnostics, codebase validation, pipeline lifecycle orchestration, and integration demonstrations under a clean, secure, and offline execution environment.
29
+
-`sparkctl` — the validated compatibility surface for local diagnostics, Rust validation, context pipeline checks, demo execution, and handoff checks.
30
+
-`agy-ct` — the newer CompText command surface, currently wired to safe compatibility wrappers for selected existing `sparkctl` functionality.
31
+
32
+
Previously, this project used the working name **Antigravity-CompText v7**. The current public project name is **CompText-Sparkctl**.
33
+
34
+
---
27
35
28
-
CompText v7 separates compressible linguistic payloads from replay-critical state, then reconstructs canonical traces with cryptographic sidecar integrity. The SPARK Context Layer provides offline Rust pipelines for packaging, schema validation, token-light rendering, and structured context checking.
36
+
## What it does
29
37
30
-
Classic lossy trace compression fails when validators expect exact tool order, commitment tokens, state hashes, and canonical replay strings. CompText v7 avoids that failure mode by splitting each trace into two coordinated streams:
38
+
CompText-Sparkctl validates the split between compressible trace content and replay-critical state:
31
39
32
40
| Layer | Purpose | Target property |
33
41
|---|---|---|
34
42
|**CompText payload**| Pruned, compact linguistic trace | Lower token and transport cost |
35
43
|**Replay sidecar**| Tool sequence, commitments, hashes, state anchors | Deterministic reconstruction in the validated scope |
36
44
|**SHA-256 audit chain**| Integrity metadata over critical replay data | Tamper-sensitive validation |
|**SPARK context artifacts**| Structured operational context and rendered summaries | Local validation and handoff readiness |
38
47
39
-
---
40
-
41
-
## 🛠 Command Surface
42
-
43
-
`sparkctl` consolidates all operations under a single command-line interface:
44
-
45
-
***`sparkctl doctor`**: Diagnoses local project readiness by verifying the presence of key configuration files, JSON schemas, and output artifacts.
46
-
***`sparkctl rust-validate`**: Automates execution of local crate quality checks (`cargo fmt`, `cargo check`, `cargo test`, `cargo clippy`).
47
-
***`sparkctl context-all`**: Coordinates the local context pipeline sequence (`context-build`, `context-render`, `context-validate`).
48
-
***`sparkctl spark-demo`**: Orchestrates the full end-to-end integration lifecycle (`compress`, `context-build`, `context-render`, `context-validate`).
49
-
***`sparkctl handoff-check`**: Validates file completeness and command availability to ensure clean repository handoff status.
48
+
Classic lossy compression fails when validators expect exact tool order, commitment tokens, state hashes, and canonical replay strings. CompText-Sparkctl keeps those replay-sensitive fields outside the lossy zone.
50
49
51
50
---
52
51
53
-
## ⚡ Quickstart
52
+
## Command Surface
53
+
54
+
### `sparkctl`
54
55
55
-
To run `sparkctl`, navigate to the `agy7rust` directory and use `cargo run`:
56
+
`sparkctl` is the validated operations controller:
56
57
57
58
```bash
58
59
cd agy7rust
@@ -63,60 +64,79 @@ cargo run --bin sparkctl -- spark-demo
63
64
cargo run --bin sparkctl -- handoff-check
64
65
```
65
66
66
-
### Artifact Outputs
67
-
The SPARK pipeline generates and validates the following key artifacts under `artifacts/spark/`:
68
-
-`artifacts/spark/extraction.spkg`: The deterministically compressed trace package containing payload and sidecar metadata.
69
-
-`artifacts/spark/context.json`: The compiled structured operational context mapping dependencies and security parameters.
70
-
-`artifacts/spark/context_render.txt`: The token-light rendered text view for verification and summarization.
67
+
Validated command responsibilities:
71
68
72
-
---
69
+
-`sparkctl doctor` checks local project readiness.
70
+
-`sparkctl rust-validate` runs local Rust quality checks.
71
+
-`sparkctl context-all` runs the local context build/render/validate sequence.
72
+
-`sparkctl spark-demo` runs the local end-to-end demonstration flow.
73
+
-`sparkctl handoff-check` checks local repository handoff readiness.
73
74
74
-
##🔒 Safety, Boundaries & Claim Hygiene
75
+
### `agy-ct`
75
76
76
-
***Offline Execution:** All subcommands operate completely locally. Offline behavior was deterministic in the validated test scope.
77
-
***Leak Boundaries:** Configured leak checks passed in the validated scope.
78
-
***Local Handoff Checks:**`sparkctl handoff-check` validates local repository readiness and file availability only; it does not verify remote CI or GitHub Actions status.
79
-
***Compatibility:** No official SPARK compatibility claim is made.
80
-
***Compliance:** No compliance claim (such as EU AI Act compliance) is made.
81
-
***Risks:** No blocking risks found in the validated scope.
77
+
`agy-ct` is the newer command surface for CompText-Sparkctl. It currently provides the command tree and safe compatibility wrappers without introducing a new run orchestrator.
Other `agy-ct` commands remain explicit placeholders until their implementation phase is approved.
90
100
91
101
---
92
102
93
-
## 🏛 Architecture
103
+
## SPARK Context Artifacts
104
+
105
+
The local SPARK-style demo and context pipeline generates and validates artifacts under `artifacts/spark/`:
106
+
107
+
-`artifacts/spark/extraction.spkg` — compact trace package containing payload and replay-sidecar metadata.
108
+
-`artifacts/spark/context.json` — structured operational context for validation and handoff.
109
+
-`artifacts/spark/context_render.txt` — token-light rendered context view for review and summarization.
94
110
95
-
CompText v7 is built around one hard rule: **payload compression must never destroy replay-critical state**.
111
+
These artifacts are intended for local, reproducible validation and review workflows.
112
+
113
+
---
114
+
115
+
## Architecture
96
116
97
117
```mermaid
98
118
flowchart TD
99
-
raw["Raw Agent / LMCache Trace"]
119
+
raw["Raw Agent / Operational Trace"]
100
120
101
-
subgraph split["KVTC Split Layer"]
121
+
subgraph split["CompText Split Layer"]
102
122
splitter["Trace Splitter"]
103
123
classifier["Replay-Critical Field Classifier"]
104
124
end
105
125
106
126
subgraph payload["Compressible Payload Stream"]
107
127
text["Linguistic Payload"]
108
128
prune["Redundancy Pruning"]
109
-
compact["CompText v7 Compact Payload"]
129
+
compact["Compact Payload"]
110
130
end
111
131
112
-
subgraph sidecar["Deterministic Replay Sidecar"]
132
+
subgraph sidecar["Replay Sidecar"]
113
133
order["Tool Order"]
114
134
commits["Commitment Tokens"]
115
135
state["State Hashes"]
116
136
anchors["Validation Anchors"]
117
137
end
118
138
119
-
subgraph context["Operational Context Layer"]
139
+
subgraph context["SPARK Context Layer"]
120
140
ctxbuild["context-build"]
121
141
ctxrender["context-render"]
122
142
ctxvalidate["context-validate"]
@@ -166,7 +186,7 @@ flowchart LR
166
186
H["Context validation anchors"]
167
187
end
168
188
169
-
subgraph output["CompText v7 Package"]
189
+
subgraph output["CompText Package"]
170
190
I["Compact payload"]
171
191
J["Replay sidecar"]
172
192
K["SHA-256 audit chain"]
@@ -186,48 +206,41 @@ flowchart LR
186
206
187
207
---
188
208
189
-
## 🦀 Rust Integration
209
+
## Rust Integration
190
210
191
-
Rust is integrated as the execution path for the parts that should be fast, deterministic in the validated scope, and easy to audit:
211
+
Rust is the hardened local execution path for components that need to be fast, auditable, and deterministic in the validated scope:
192
212
193
213
- byte-level payload handling
194
214
- deterministic hashing and verification
195
215
- replay-sidecar validation
196
216
- schema-sidecar validation
197
217
- operational context build/render/validate flows
198
-
-low-overhead execution inside local validation workflows
218
+
-local CLI validation and handoff checks
199
219
200
-
Python remains useful as the reference and experimentation layer. Rust is the direction for hardened execution.
220
+
Python remains useful as a reference and experimentation layer. Rust is the direction for hardened execution.
201
221
202
222
---
203
223
204
-
## 🔒 Security Model
205
-
206
-
CompText v7 does not treat compression as a purely cosmetic optimization. Every replay-sensitive field is part of the integrity surface.
207
-
208
-
The sidecar protects:
209
-
210
-
- tool execution order
211
-
- commitment and control tokens
212
-
- final state hash
213
-
- replay metadata
214
-
- validation-critical anchors
215
-
- context validation anchors
224
+
## Safety, Boundaries & Claim Hygiene
216
225
217
-
If a compressed package is modified without updating the expected integrity chain, reconstruction fails loudly instead of producing a misleading replay.
226
+
-**Offline execution:** Validated commands operate locally. Offline behavior was deterministic in the validated test scope.
227
+
-**Leak boundaries:** Configured leak checks passed in the validated scope.
228
+
-**Local handoff checks:**`sparkctl handoff-check` checks local repository readiness and file availability only; it does not verify remote CI or GitHub Actions status.
229
+
-**SPARK:** No official SPARK compatibility claim is made.
230
+
-**Compliance:** No compliance claim, including EU AI Act compliance, is made.
231
+
-**Risk statement:** No blocking risks found in the validated scope.
218
232
219
233
Non-claims:
220
234
221
-
- no official SPARK compatibility claim
222
-
- no EU AI Act compliance claim
223
235
- no legal evidentiary-status claim
224
236
- no forensic certainty claim
225
-
- no MCP server capability
237
+
- no MCP server capability claim
226
238
- no RAG, embeddings, vector database, or external tool-orchestration layer
239
+
- no production-readiness, certification, or compliance claim
227
240
228
241
---
229
242
230
-
## 📊 Benchmarks
243
+
## Benchmarks
231
244
232
245
Current validation targets are based on the existing CompText v7 benchmark profile:
233
246
@@ -238,19 +251,20 @@ Current validation targets are based on the existing CompText v7 benchmark profi
238
251
| C | Regex pruning |~68 % of raw | 1.00 | No forensic integrity |
├── benchmarks/ # Benchmark profiles and comparison material
255
269
├── core/ # KVTC / replay core components
256
270
├── datasets/ # Fixtures and trace datasets
@@ -263,34 +277,18 @@ The design goal is not maximum textual compression at any cost. The goal is maxi
263
277
264
278
---
265
279
266
-
## 🤝 Contributing
280
+
## Project Phase Status
267
281
268
-
Contributions are welcome. The project is especially interested in work that improves determinism, compression quality, auditability, Rust hardening, or SPARK-style administrative AI verification.
269
-
270
-
Good first contribution areas:
271
-
272
-
- add new trace fixtures
273
-
- add SPARK-style extraction fixtures
274
-
- improve benchmark coverage
275
-
- document edge cases
276
-
- add Rust-side validation tests
277
-
- tighten schema-sidecar checks
278
-
- improve CI reproducibility
279
-
- extend operational context validation while preserving leak boundaries
280
-
281
-
Contribution flow:
282
-
283
-
1. Fork the repository.
284
-
2. Create a feature branch: `git checkout -b feature/your-improvement`.
285
-
3. Make a focused change.
286
-
4. Run tests locally.
287
-
5. Open a pull request with a clear before/after explanation.
288
-
289
-
Please keep PRs small, reproducible, and validation-oriented.
-[ ] v8 generalization layer for enterprise agent pipelines
309
311
310
312
---
311
313
312
-
## 🌟 Support the project
314
+
## Contributing
315
+
316
+
Contributions are welcome, especially work that improves determinism, compression quality, auditability, Rust hardening, SPARK-style administrative AI verification, or reproducible validation.
317
+
318
+
Good first contribution areas:
319
+
320
+
- add new trace fixtures
321
+
- add SPARK-style extraction fixtures
322
+
- improve benchmark coverage
323
+
- document edge cases
324
+
- add Rust-side validation tests
325
+
- tighten schema-sidecar checks
326
+
- improve CI reproducibility
327
+
- extend operational context validation while preserving leak boundaries
313
328
314
-
If this project helps you reason about safer agent traces, compression, or deterministic replay, consider leaving a star. It makes the project easier to discover and helps attract contributors who care about reliable agent infrastructure.
329
+
Please keep pull requests small, reproducible, and validation-oriented.
315
330
316
331
---
317
332
318
-
## 📄 License
333
+
## License
319
334
320
335
This project is released under the MIT License.
321
336
322
337
---
323
338
324
339
<divalign="center">
325
340
326
-
**CompText v7: compress the noise, preserve the proof.**
341
+
**CompText-Sparkctl: compress the noise, preserve the proof.**
0 commit comments