simplicio-fast 2.0.17__tar.gz

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 (127) hide show
  1. simplicio_fast-2.0.17/PKG-INFO +546 -0
  2. simplicio_fast-2.0.17/README.md +536 -0
  3. simplicio_fast-2.0.17/pyproject.toml +27 -0
  4. simplicio_fast-2.0.17/setup.cfg +4 -0
  5. simplicio_fast-2.0.17/src/simplicio_fast/__init__.py +59 -0
  6. simplicio_fast-2.0.17/src/simplicio_fast/adapters.py +159 -0
  7. simplicio_fast-2.0.17/src/simplicio_fast/catalog.py +353 -0
  8. simplicio_fast-2.0.17/src/simplicio_fast/cli.py +851 -0
  9. simplicio_fast-2.0.17/src/simplicio_fast/content_cache.py +24 -0
  10. simplicio_fast-2.0.17/src/simplicio_fast/context_view.py +822 -0
  11. simplicio_fast-2.0.17/src/simplicio_fast/custodians.py +211 -0
  12. simplicio_fast-2.0.17/src/simplicio_fast/delivery.py +303 -0
  13. simplicio_fast-2.0.17/src/simplicio_fast/engine.py +223 -0
  14. simplicio_fast-2.0.17/src/simplicio_fast/engine_selection.py +106 -0
  15. simplicio_fast-2.0.17/src/simplicio_fast/fwht.py +61 -0
  16. simplicio_fast-2.0.17/src/simplicio_fast/fwht_turboquant.py +130 -0
  17. simplicio_fast-2.0.17/src/simplicio_fast/generation_receipts.py +124 -0
  18. simplicio_fast-2.0.17/src/simplicio_fast/generation_store.py +45 -0
  19. simplicio_fast-2.0.17/src/simplicio_fast/hbp_codec.py +49 -0
  20. simplicio_fast-2.0.17/src/simplicio_fast/hybrid_index.py +21 -0
  21. simplicio_fast-2.0.17/src/simplicio_fast/installation.py +254 -0
  22. simplicio_fast-2.0.17/src/simplicio_fast/integrations.py +257 -0
  23. simplicio_fast-2.0.17/src/simplicio_fast/ipc.py +181 -0
  24. simplicio_fast-2.0.17/src/simplicio_fast/journal.py +192 -0
  25. simplicio_fast-2.0.17/src/simplicio_fast/knowledge.py +168 -0
  26. simplicio_fast-2.0.17/src/simplicio_fast/ledger.py +260 -0
  27. simplicio_fast-2.0.17/src/simplicio_fast/ledger_store.py +292 -0
  28. simplicio_fast-2.0.17/src/simplicio_fast/litert_embeddings.py +148 -0
  29. simplicio_fast-2.0.17/src/simplicio_fast/native_backend.py +218 -0
  30. simplicio_fast-2.0.17/src/simplicio_fast/navigation.py +385 -0
  31. simplicio_fast-2.0.17/src/simplicio_fast/pager.py +389 -0
  32. simplicio_fast-2.0.17/src/simplicio_fast/prism_arena.py +990 -0
  33. simplicio_fast-2.0.17/src/simplicio_fast/prism_context_views.py +300 -0
  34. simplicio_fast-2.0.17/src/simplicio_fast/processor.py +511 -0
  35. simplicio_fast-2.0.17/src/simplicio_fast/quant_benchmark.py +1324 -0
  36. simplicio_fast-2.0.17/src/simplicio_fast/query_planner.py +234 -0
  37. simplicio_fast-2.0.17/src/simplicio_fast/release_policy.json +16 -0
  38. simplicio_fast-2.0.17/src/simplicio_fast/resident_daemon.py +273 -0
  39. simplicio_fast-2.0.17/src/simplicio_fast/rollout.py +64 -0
  40. simplicio_fast-2.0.17/src/simplicio_fast/runtime_backend.py +540 -0
  41. simplicio_fast-2.0.17/src/simplicio_fast/runtime_bridge.py +134 -0
  42. simplicio_fast-2.0.17/src/simplicio_fast/segments.py +317 -0
  43. simplicio_fast-2.0.17/src/simplicio_fast/semantic_pager.py +35 -0
  44. simplicio_fast-2.0.17/src/simplicio_fast/semantic_scoring.py +908 -0
  45. simplicio_fast-2.0.17/src/simplicio_fast/skills.py +200 -0
  46. simplicio_fast-2.0.17/src/simplicio_fast/slot_executor.py +307 -0
  47. simplicio_fast-2.0.17/src/simplicio_fast/snapshot.py +1243 -0
  48. simplicio_fast-2.0.17/src/simplicio_fast/streaming.py +261 -0
  49. simplicio_fast-2.0.17/src/simplicio_fast/temporal.py +465 -0
  50. simplicio_fast-2.0.17/src/simplicio_fast/turboquant.py +260 -0
  51. simplicio_fast-2.0.17/src/simplicio_fast/users/__init__.py +1 -0
  52. simplicio_fast-2.0.17/src/simplicio_fast/users/http.py +83 -0
  53. simplicio_fast-2.0.17/src/simplicio_fast/users/model.py +33 -0
  54. simplicio_fast-2.0.17/src/simplicio_fast/users/repository.py +26 -0
  55. simplicio_fast-2.0.17/src/simplicio_fast/users/service.py +67 -0
  56. simplicio_fast-2.0.17/src/simplicio_fast/vector_contracts.py +194 -0
  57. simplicio_fast-2.0.17/src/simplicio_fast/vector_index.py +178 -0
  58. simplicio_fast-2.0.17/src/simplicio_fast/workspace.py +384 -0
  59. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/PKG-INFO +546 -0
  60. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/SOURCES.txt +125 -0
  61. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/dependency_links.txt +1 -0
  62. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/entry_points.txt +2 -0
  63. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/requires.txt +4 -0
  64. simplicio_fast-2.0.17/src/simplicio_fast.egg-info/top_level.txt +1 -0
  65. simplicio_fast-2.0.17/tests/test_benchmark.py +144 -0
  66. simplicio_fast-2.0.17/tests/test_catalog.py +112 -0
  67. simplicio_fast-2.0.17/tests/test_cli.py +236 -0
  68. simplicio_fast-2.0.17/tests/test_compare_fast.py +18 -0
  69. simplicio_fast-2.0.17/tests/test_conformance.py +112 -0
  70. simplicio_fast-2.0.17/tests/test_content_cache_193.py +22 -0
  71. simplicio_fast-2.0.17/tests/test_context_packet_383.py +40 -0
  72. simplicio_fast-2.0.17/tests/test_context_view_214.py +490 -0
  73. simplicio_fast-2.0.17/tests/test_custodians.py +114 -0
  74. simplicio_fast-2.0.17/tests/test_delivery.py +326 -0
  75. simplicio_fast-2.0.17/tests/test_e2e_benchmark_protocol.py +76 -0
  76. simplicio_fast-2.0.17/tests/test_e2e_matrix.py +39 -0
  77. simplicio_fast-2.0.17/tests/test_engine.py +232 -0
  78. simplicio_fast-2.0.17/tests/test_engine_selection.py +46 -0
  79. simplicio_fast-2.0.17/tests/test_fwht.py +57 -0
  80. simplicio_fast-2.0.17/tests/test_fwht_turboquant.py +79 -0
  81. simplicio_fast-2.0.17/tests/test_generation_receipts_196.py +55 -0
  82. simplicio_fast-2.0.17/tests/test_generation_store_192.py +13 -0
  83. simplicio_fast-2.0.17/tests/test_golden_corpus.py +47 -0
  84. simplicio_fast-2.0.17/tests/test_hbp_codec_contract.py +32 -0
  85. simplicio_fast-2.0.17/tests/test_hybrid_index_195.py +9 -0
  86. simplicio_fast-2.0.17/tests/test_incremental_refresh_benchmark.py +46 -0
  87. simplicio_fast-2.0.17/tests/test_installation.py +110 -0
  88. simplicio_fast-2.0.17/tests/test_integrations.py +52 -0
  89. simplicio_fast-2.0.17/tests/test_integrity_216.py +51 -0
  90. simplicio_fast-2.0.17/tests/test_ipc.py +94 -0
  91. simplicio_fast-2.0.17/tests/test_journal.py +73 -0
  92. simplicio_fast-2.0.17/tests/test_knowledge.py +86 -0
  93. simplicio_fast-2.0.17/tests/test_ledger.py +40 -0
  94. simplicio_fast-2.0.17/tests/test_ledger_store.py +97 -0
  95. simplicio_fast-2.0.17/tests/test_lightweight_import.py +61 -0
  96. simplicio_fast-2.0.17/tests/test_litert_embeddings_186.py +63 -0
  97. simplicio_fast-2.0.17/tests/test_native_backend_197.py +145 -0
  98. simplicio_fast-2.0.17/tests/test_native_bundle_211.py +65 -0
  99. simplicio_fast-2.0.17/tests/test_native_release_workflow_211.py +55 -0
  100. simplicio_fast-2.0.17/tests/test_navigation.py +100 -0
  101. simplicio_fast-2.0.17/tests/test_pager.py +278 -0
  102. simplicio_fast-2.0.17/tests/test_perf_gate.py +168 -0
  103. simplicio_fast-2.0.17/tests/test_prism_arena_213.py +499 -0
  104. simplicio_fast-2.0.17/tests/test_prism_context_views_214.py +133 -0
  105. simplicio_fast-2.0.17/tests/test_processor.py +385 -0
  106. simplicio_fast-2.0.17/tests/test_quant_benchmark_198.py +543 -0
  107. simplicio_fast-2.0.17/tests/test_query_planner.py +104 -0
  108. simplicio_fast-2.0.17/tests/test_release_integrity_216.py +104 -0
  109. simplicio_fast-2.0.17/tests/test_resident_daemon_191.py +157 -0
  110. simplicio_fast-2.0.17/tests/test_rollout.py +20 -0
  111. simplicio_fast-2.0.17/tests/test_runtime_backend_215.py +618 -0
  112. simplicio_fast-2.0.17/tests/test_runtime_bridge_215.py +173 -0
  113. simplicio_fast-2.0.17/tests/test_rust_context_contract.py +11 -0
  114. simplicio_fast-2.0.17/tests/test_segments.py +220 -0
  115. simplicio_fast-2.0.17/tests/test_semantic_pager_194.py +19 -0
  116. simplicio_fast-2.0.17/tests/test_semantic_scoring_186.py +566 -0
  117. simplicio_fast-2.0.17/tests/test_skills.py +99 -0
  118. simplicio_fast-2.0.17/tests/test_slot_executor_199.py +119 -0
  119. simplicio_fast-2.0.17/tests/test_snapshot.py +410 -0
  120. simplicio_fast-2.0.17/tests/test_streaming.py +85 -0
  121. simplicio_fast-2.0.17/tests/test_temporal.py +171 -0
  122. simplicio_fast-2.0.17/tests/test_turboquant.py +113 -0
  123. simplicio_fast-2.0.17/tests/test_users.py +38 -0
  124. simplicio_fast-2.0.17/tests/test_v3_architecture_contract.py +51 -0
  125. simplicio_fast-2.0.17/tests/test_vector_contracts.py +223 -0
  126. simplicio_fast-2.0.17/tests/test_vector_index.py +48 -0
  127. simplicio_fast-2.0.17/tests/test_workspace.py +158 -0
@@ -0,0 +1,546 @@
1
+ Metadata-Version: 2.4
2
+ Name: simplicio-fast
3
+ Version: 2.0.17
4
+ Summary: Semantic project memory and guarded change coordination for AI coding tools
5
+ Requires-Python: >=3.11
6
+ Description-Content-Type: text/markdown
7
+ Provides-Extra: integrated
8
+ Requires-Dist: simplicio-mapper>=0.26.0; extra == "integrated"
9
+ Requires-Dist: simplicio-cli>=0.16.3; extra == "integrated"
10
+
11
+ <p align="center">
12
+ <img src="assets/simplicio-fast-hero-v3.png" alt="simplicio-fast turns source code into a shared binary semantic memory for fast agent execution" width="100%" />
13
+ </p>
14
+
15
+ <h1 align="center">simplicio-fast</h1>
16
+
17
+ <p align="center">
18
+ <strong>Semantic project memory and guarded change coordination for AI coding tools.</strong>
19
+ </p>
20
+
21
+ <p align="center">
22
+ <a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-2.0.16-22c55e?style=for-the-badge" alt="Version 2.0.16"></a>
23
+ <a href="https://www.python.org/"><img src="https://img.shields.io/badge/python-3.11%2B-3776ab?style=for-the-badge&logo=python&logoColor=white" alt="Python 3.11+"></a>
24
+ <a href="https://github.com/wesleysimplicio/simplicio-fast/issues"><img src="https://img.shields.io/github/issues/wesleysimplicio/simplicio-fast?style=for-the-badge" alt="Open issues"></a>
25
+ <img src="https://img.shields.io/badge/core_runtime_dependencies-0-111827?style=for-the-badge" alt="0 core runtime dependencies">
26
+ <img src="https://img.shields.io/badge/integrated_extra_dependencies-2-334155?style=for-the-badge" alt="2 integrated extra dependencies">
27
+ </p>
28
+
29
+ <p align="center">
30
+ <strong>Languages:</strong><br>
31
+ <a href="README.md">English</a> ·
32
+ <a href="READMEs/README.pt-BR.md">Português</a> ·
33
+ <a href="READMEs/README.es-ES.md">Español</a> ·
34
+ <a href="READMEs/README.fr-FR.md">Français</a> ·
35
+ <a href="READMEs/README.de-DE.md">Deutsch</a> ·
36
+ <a href="READMEs/README.it-IT.md">Italiano</a> ·
37
+ <a href="READMEs/README.ja-JP.md">日本語</a> ·
38
+ <a href="READMEs/README.ko-KR.md">한국어</a> ·
39
+ <a href="READMEs/README.zh-CN.md">简体中文</a> ·
40
+ <a href="READMEs/README.ru-RU.md">Русский</a> ·
41
+ <a href="READMEs/README.pl-PL.md">Polski</a> ·
42
+ <a href="READMEs/README.tr-TR.md">Türkçe</a> ·
43
+ <a href="READMEs/README.nl-NL.md">Nederlands</a> ·
44
+ <a href="READMEs/README.hi-IN.md">हिन्दी</a> ·
45
+ <a href="READMEs/README.ar-SA.md">العربية</a>
46
+ </p>
47
+
48
+ ---
49
+
50
+ ## What is simplicio-fast?
51
+
52
+ `simplicio-fast` is the semantic project-memory layer for AI coding workflows. It turns a repository
53
+ into a versioned, memory-mapped snapshot, selects small hash-verified context packets, compiles
54
+ plans, and produces guarded changeset/rollout receipts. The source files remain authoritative; the
55
+ snapshot is a disposable, incrementally refreshed cache.
56
+
57
+ In one sentence: **Fast helps an agent understand the right code and prove which generation a
58
+ proposed change came from, without becoming the LLM, scheduler or policy authority.**
59
+
60
+ Version 2.x coordinates the boundaries between Mapper, Dev CLI, Loop and Runtime:
61
+
62
+ | Fast owns | Other Simplicio components own |
63
+ |---|---|
64
+ | ingestion, binary/mmap memory, bounded context, PlanDAG and hash guards | canonical ContextGraph extraction (Mapper) |
65
+ | generation IDs, worktree overlays and rollout receipts | mechanical source mutation (Dev CLI) |
66
+ | deterministic JSON contracts and fail-closed fallback | policy/effects/receipts (Runtime) and retries/slots/convergence (Loop) |
67
+
68
+ Fast is **not** an LLM, an autonomous scheduler, a source-of-truth database, or a replacement for
69
+ Runtime authorization. It is the small, inspectable coordination layer between repository files and
70
+ those tools.
71
+
72
+ ```text
73
+ normal source files
74
+
75
+ semantic extraction + SHA-256
76
+
77
+ versioned .sfast binary snapshot
78
+ ↓ mmap
79
+ small context query
80
+
81
+ LLM plan and normal source patch
82
+
83
+ tests + incremental refresh
84
+ ```
85
+
86
+ The source repository always remains the source of truth. A `.sfast` file is a disposable derived cache, never a replacement for `.py`, `.ts`, `.rs`, `.cs` or other development files.
87
+
88
+ ## Why it matters
89
+
90
+ - **Fast repeated orientation** — avoid parsing the full repository for every query.
91
+ - **Incremental rebuilds** — unchanged files reuse their semantic records by SHA-256.
92
+ - **Low-copy access** — `mmap` lets the OS page only the bytes that are touched.
93
+ - **Shared project memory** — future Loop slots can pin one immutable base generation.
94
+ - **Smaller LLM context** — send selected symbols and spans instead of repository dumps.
95
+ - **Auditable execution** — generation IDs, source hashes and receipts can bind context to patches.
96
+
97
+ > `simplicio-fast` is designed for broad repository use, but speedups are workload-dependent. The current ~23× result is a measured POC query benchmark, not a universal guarantee. Small repositories and cold one-shot runs may see little or no gain.
98
+
99
+ <p align="center">
100
+ <img src="assets/simplicio-fast-shared-memory-v3.png" alt="One immutable memory-mapped snapshot shared by isolated worktrees" width="920" />
101
+ </p>
102
+
103
+ <p align="center"><em>One canonical memory image, many isolated consumers and future worktree overlays.</em></p>
104
+
105
+ ## Benchmark
106
+
107
+ The included benchmark generates 500 Python modules containing 1,500 symbols. It compares reparsing every AST for each query with querying the binary snapshot through `mmap`.
108
+
109
+ | Operation | Median/total wall time | CPU / incremental behavior |
110
+ |---|---:|---:|
111
+ | Traditional AST query | 40.35 ms median | 40.36 ms CPU |
112
+ | Cold snapshot build | 57.43 ms | 500 parsed |
113
+ | `mmap` snapshot query | 1.75 ms median | 1.76 ms CPU |
114
+ | Rebuild without changes | 26.65 ms | 0 parsed / 500 reused |
115
+ | Rebuild after one file change | 28.05 ms | 1 parsed / 499 reused |
116
+
117
+ **Measured query result:** approximately **23× faster** and **95.65% less query CPU** on the recorded local environment (Python 3.12.13, peak process RSS 21,268 KiB).
118
+
119
+ Reproduce it instead of trusting the table:
120
+
121
+ ```bash
122
+ python benchmarks/run.py
123
+ ```
124
+
125
+ For the quality-first Q0/Q1/Q2 vector matrix, run `PYTHONPATH=src python benchmarks/quant_benchmark_198.py`; it publishes raw measured samples and keeps simulated or capacity-blocked sizes explicitly `null`. See [the quant benchmark contract](docs/quant-benchmark-198.md).
126
+
127
+ The command records wall time, CPU time, peak RSS (or `null` plus an explicit reason when the host does not expose it), cold build, warm query, no-change rebuild, one-file rebuild and whether the changed symbol became visible. It also measures the shared-base overlay path at 1, 5 and 20 slots with ten repetitions per row. Use identical hardware/configuration when comparing integrations.
128
+
129
+ Peak RSS is reported in KiB using POSIX `resource.getrusage` or Windows
130
+ `GetProcessMemoryInfo` through the standard-library `ctypes` bridge. If the operating system
131
+ cannot expose the metric, the command still completes with a partial receipt: `peak_rss_kib` is
132
+ `null`, `peak_rss_reason` contains a deterministic reason code, and both `status` and
133
+ `metrics_status` are `"partial"` in the `simplicio.fast.benchmark/v1` receipt.
134
+
135
+ ## Install
136
+
137
+ ```bash
138
+ git clone https://github.com/wesleysimplicio/simplicio-fast
139
+ cd simplicio-fast
140
+ python -m pip install -e .
141
+ ```
142
+
143
+ The base install is dependency-free and keeps the complete Python fallback.
144
+ For the production Mapper/Dev CLI adapters, install the explicit profile:
145
+
146
+ ```bash
147
+ python -m pip install -e '.[integrated]'
148
+ ```
149
+
150
+ Loop installs Mapper, Dev CLI, and Fast from its pinned submodules, so it does
151
+ not need Fast to pull their transitive stacks into every isolated slot.
152
+
153
+ ### Offline installation verification
154
+
155
+ `simplicio-fast doctor --installation --json` is an offline check: it reports the
156
+ installed Python package, locates `simplicio-fast-rs` (or the path in
157
+ `SIMPLICIO_FAST_RUST`), computes its SHA-256, and validates the Rust engine
158
+ manifest before reporting it as usable. An absent Rust artifact keeps the
159
+ Python-only installation `ready`; an incompatible discovered artifact produces
160
+ `degraded` and is never treated as a valid engine. The command does not download,
161
+ build, or remove files.
162
+
163
+ For a local packaging smoke test on Windows, build both artifacts and install the
164
+ wheel into a clean target directory:
165
+
166
+ ```powershell
167
+ python -m build
168
+ python -m venv .tmp-fast-venv
169
+ & .\.tmp-fast-venv\Scripts\python.exe -m pip install --no-deps (Get-ChildItem dist\simplicio_fast-*.whl).FullName
170
+ & .\.tmp-fast-venv\Scripts\python.exe -m simplicio_fast.cli doctor --installation --json
171
+ ```
172
+
173
+ This is a local Python/wheel check. Cross-OS/architecture wheels, signed
174
+ provenance, and upgrade/downgrade rollback still require the clean VM/container
175
+ matrix tracked by issue #44.
176
+
177
+ ## CLI and agent contract
178
+
179
+ ```bash
180
+ simplicio-fast --help
181
+ simplicio-fast build --help
182
+ simplicio-fast query --help
183
+ simplicio-fast search --help
184
+ simplicio-fast context --help
185
+ simplicio-fast impact --help
186
+ simplicio-fast stats --help
187
+ simplicio-fast doctor --help
188
+ simplicio-fast capabilities --help
189
+ simplicio-fast base --help
190
+ simplicio-fast overlay --help
191
+ simplicio-fast merge --help
192
+ simplicio-fast rollout --help
193
+ simplicio-fast serve --help
194
+ ```
195
+
196
+ Run `simplicio-fast --help` first when integrating a new tool or LLM. Its command descriptions
197
+ state the role of each surface: build/refresh memory, query or bound context, plan a task, validate
198
+ or apply a hash-guarded changeset, inspect readiness, coordinate overlays, and emit rollout state.
199
+ All machine-facing responses are versioned JSON; consumers must preserve `schema`, generation and
200
+ receipt fields and must never read `.sfast` offsets directly.
201
+
202
+ Build and query the current repository:
203
+
204
+ ```bash
205
+ simplicio-fast ingest .
206
+ simplicio-fast understand "change UserService"
207
+ simplicio-fast plan "change UserService"
208
+ simplicio-fast query UserService
209
+ ```
210
+
211
+ Run without installing:
212
+
213
+ ```bash
214
+ PYTHONPATH=src python -m simplicio_fast.cli build .
215
+ PYTHONPATH=src python -m simplicio_fast.cli query UserService
216
+ ```
217
+
218
+ `context --json` emits a versioned `provenance` receipt alongside bounded spans. The receipt
219
+ contains the normalized repository root, the Git commit (or `null` plus an explicit reason outside
220
+ Git), the absolute snapshot path, the SHA-256 digest of the bytes opened by mmap, the stable
221
+ `SFAST001:<digest>` generation, span count and effective limits. Loop and Runtime consumers may pin
222
+ that generation and verify each span's `source_sha256`; they must request semantic context through
223
+ Mapper and must not read `.sfast` offsets directly.
224
+
225
+ ```bash
226
+ PYTHONPATH=src python -m simplicio_fast.cli context UserService \
227
+ --root . --snapshot .simplicio/fast/project.sfast --max-results 10 --max-lines 120 \
228
+ --max-bytes 32000 --max-tokens 8000 --json
229
+ ```
230
+
231
+ The command fails closed with `simplicio.fast.error/v1` when the snapshot is corrupt or a source
232
+ file no longer matches its recorded hash; refresh the derived snapshot before retrying.
233
+
234
+ ## Canonical generations and worktree overlays
235
+
236
+ Issue #3 adds a versioned coordination layer without making `.sfast` a public
237
+ context contract. Build one immutable base generation from the default branch,
238
+ then create one delta per worktree:
239
+
240
+ ```bash
241
+ simplicio-fast base .
242
+ simplicio-fast overlay . --base-generation <base-generation> --worktree-id slot-1
243
+ simplicio-fast merge UserService --base-generation <base-generation> \
244
+ --worktree-id slot-1 --overlay-generation <overlay-generation>
245
+ ```
246
+
247
+ The manifest binds the generation to the source commit, configuration,
248
+ parser capabilities and source SHA-256 values. Overlay records contain only
249
+ changed-file symbols and tombstones; merge is read-only and never rewrites the
250
+ canonical base. Results carry `base_generation` and `overlay_generation` so a
251
+ Mapper/Runtime caller can pin a bounded, auditable context attempt.
252
+
253
+ Use `simplicio-fast pin` while an attempt is active and `simplicio-fast gc`
254
+ afterward. GC is dry-run by default and never removes a generation protected by
255
+ an unexpired lease. `simplicio-fast watch` performs a debounced refresh pass;
256
+ watchers should call the same operation after filesystem events rather than
257
+ building a full snapshot in every slot.
258
+
259
+ Supported adapters are Python AST plus deterministic fallback extractors for
260
+ TypeScript, Rust and C#. `simplicio-fast capabilities` reports whether a native
261
+ parser is available, whether fallback extraction is active, and why a language
262
+ is unavailable. Fallback results are bounded semantic hints and should be
263
+ verified by the native toolchain before mutation.
264
+
265
+ ## CRUD proof of concept
266
+
267
+ The repository includes a dependency-free user API to prove the full cycle: create normal source, map it, query it, alter its behavior and refresh only the changed semantic input.
268
+
269
+ ```bash
270
+ simplicio-fast serve --port 3000
271
+ ```
272
+
273
+ ```bash
274
+ curl -X POST http://127.0.0.1:3000/users \
275
+ -H 'content-type: application/json' \
276
+ -d '{"name":"Wesley","email":"wesley@example.com"}'
277
+
278
+ curl http://127.0.0.1:3000/users
279
+
280
+ curl -X PUT http://127.0.0.1:3000/users/USER_ID \
281
+ -H 'content-type: application/json' \
282
+ -d '{"active":false}'
283
+
284
+ curl -X DELETE http://127.0.0.1:3000/users/USER_ID
285
+ ```
286
+
287
+ ## How an LLM or tool should use it
288
+
289
+ An LLM or tool should not read the `.sfast` binary directly. Ask Fast for a bounded context packet,
290
+ make the decision from those spans, and return a versioned changeset for guarded execution.
291
+
292
+ 1. The task reaches Fast through the Agent or Loop.
293
+ 2. Fast invokes Mapper and stores the canonical graph in mmap.
294
+ 3. `understand` selects bounded, hash-verified context.
295
+ 4. `plan` compiles `simplicio.fast.plandag/v2`.
296
+ 5. The LLM decides and returns `simplicio.fast.changeset/v2`.
297
+ 6. `delivery --changeset changeset.json` wraps the same guarded executor in a delivery receipt. It is a dry-run by default; `--write --profile loop-standalone` performs the local atomic path, verifies before/after hashes, refreshes the snapshot and makes identical retries idempotent. Full writes fail closed until a verified Runtime authorization is integrated. If the native adapter is unavailable or refuses the v2 contract, Fast reports the refusal and may use its explicit atomic bootstrap fallback; the receipt remains versioned and never labels that path as integrated.
298
+ 7. Runtime authorizes effects and Loop validates/converges.
299
+ 8. Fast incrementally refreshes changed files.
300
+
301
+ Version 2.0.16 provides `ingest`, `understand`, `plan`, `apply`, `context`, `doctor`, `refresh`,
302
+ `query` and the CRUD proof. Internal mapping/editing remain bootstrap fallbacks when integrations
303
+ are absent; `doctor` identifies whether the complete integrated path is ready.
304
+ The `build`, `query`, direct-index `search`, bounded `context`, typed `impact`, `stats` and
305
+ `doctor` surfaces remain available for the binary format. Mapper remains the canonical public
306
+ context producer; consumers should use its versioned handles rather than reading this binary
307
+ directly. Full cross-repository integration is tracked in the [integration epic](https://github.com/wesleysimplicio/simplicio-fast/issues/1).
308
+ The compatibility matrix and the atomic shadow/canary/rollback receipt contract
309
+ are documented in [`docs/issue-8-v2-validation.md`](docs/issue-8-v2-validation.md).
310
+
311
+ ### Verified address catalog (Python reference)
312
+
313
+ `simplicio_fast.catalog.AddressCatalog` keeps the complete Mapper SHA-256 as the
314
+ authoritative identity and derives a short handle scoped to the normalized repository
315
+ and generation. `resolve`, `resolve_many`, `verify`, `stat` and binary `save`/`load`
316
+ validate payload digests and fail closed for cross-repository, stale-generation,
317
+ tombstoned or corrupted handles. The catalog never exposes `.sfast` offsets. Rust/mmap
318
+ integration, context-packet handle transport and golden Python/Rust fixtures remain
319
+ explicit follow-up gates for issue #59.
320
+
321
+ ### Bitemporal overlay reference
322
+
323
+ `simplicio_fast.temporal.BitemporalOverlay` records append-only semantic versions with
324
+ logical source/world sequences and observed/system sequences. `as_of` reconstructs a
325
+ generation-scoped view; update, rename and delete create predecessor/successor links or
326
+ tombstones instead of erasing prior evidence. The Python reference does not claim Rust
327
+ storage, compaction, Runtime authorization or cross-repository E2E integration; those are
328
+ the remaining gates for issue #60.
329
+
330
+ ### Semantic pager reference
331
+
332
+ `simplicio_fast.pager.SemanticPager` is the bounded Python reference for a
333
+ generation-scoped working set. It enforces byte/page budgets, validates page digests,
334
+ deduplicates concurrent loads with single-flight, supports leases, deterministic LRU
335
+ eviction, bounded prefetch and selective invalidation. It reports observable cache
336
+ metrics. The Rust reader now opens SFAST files through a read-only mmap, but semantic
337
+ page-in, RSS/page-fault telemetry, Runtime quotas and 20/100-slot E2E behavior remain
338
+ gates for issue #61.
339
+
340
+ ### Delivery ledger reference
341
+
342
+ `simplicio_fast.ledger.DeliveryLedger` provides the Python boundary reference for
343
+ `simplicio.fast.delivery-ledger/v1`: deterministic event IDs, domain-separated chained
344
+ hashes, incremental/full verification, idempotent appends, winner fencing, delivery
345
+ sealing and secret-redaction checks. It projects JSON only at the boundary and does not
346
+ claim to replace the Runtime #3626 HBP/HBI codec, multiprocess persistence or Full/Loop
347
+ E2E integration; those remain gates for issue #62.
348
+
349
+ <p align="center">
350
+ <img src="assets/simplicio-fast-verified-flow-v3.png" alt="Compact context moving through planning, editing, testing and verification gates" width="920" />
351
+ </p>
352
+
353
+ <p align="center"><em>Compact context enters; verified normal source code leaves.</em></p>
354
+
355
+ ## Binary contract 2.0
356
+
357
+ New snapshots are `SFAST001/v2`, little-endian and immutable after publication. The header points to
358
+ an aligned section directory; every section and the complete payload have SHA-256 checksums. The
359
+ fixed-size file and symbol records are validated before mmap access, while direct exact/name-prefix,
360
+ path and kind indexes resolve records without walking the complete symbol table. Stable symbol IDs
361
+ are SHA-256 values derived from repository, relative file, language, qualified symbol and signature.
362
+
363
+ The `relations` section stores deterministic `import`, `reference`, `call`, `definition` and `test`
364
+ edges with origin, destination and confidence. `context` enforces result, line, byte and token budgets
365
+ and includes the source SHA-256 for every span. `doctor` reports the pinned generation and section
366
+ checksums, and rejects truncation, overlap, unknown versions, bad offsets and tampering without a
367
+ process crash.
368
+
369
+ | Section | Purpose |
370
+ |---|---|
371
+ | Header/directory | `SFAST001`, schema version, endian marker, generation, aligned sections and whole-file SHA-256 |
372
+ | File records | path reference, source size, SHA-256 and stable file ID |
373
+ | Symbol records | name/qualified/signature references, file ID, line range, kind and stable ID |
374
+ | Direct indexes | exact qualified name, name prefix, path and kind lookup tables |
375
+ | Relations | typed imports, references, calls and confidence |
376
+ | String table | compact UTF-8 paths, names, qualified names and signatures |
377
+
378
+ Safety properties:
379
+
380
+ - read-only memory mapping;
381
+ - bounds, magic, version and total-size checks;
382
+ - atomic temporary-write and replace;
383
+ - deterministic symbol ordering;
384
+ - source hashes for incremental reuse;
385
+ - safe full rebuild because snapshots are derived.
386
+
387
+ ### Segmented storage and bounded page-in
388
+
389
+ The Python reference can publish immutable SFAST sections as content-addressed segments:
390
+
391
+ ```bash
392
+ simplicio-fast segments publish --directory .simplicio/fast/segments --snapshot .simplicio/fast/project.sfast
393
+ simplicio-fast segments validate --directory .simplicio/fast/segments
394
+ simplicio-fast segments map --directory .simplicio/fast/segments --name symbols
395
+ ```
396
+
397
+ `segments map` validates the selected segment's size and SHA-256, then opens only that segment
398
+ through read-only `mmap`; it never exposes offsets from the monolithic snapshot. Publication
399
+ swaps the manifest atomically and retains content-addressed segments for unchanged generations.
400
+ The Rust reader exposes the same bounded map contract through `simplicio-fast-rs --segment
401
+ <directory> <name>`, with the same path and checksum guards. Python remains the writer authority;
402
+ Rust segmented writing, demand-driven semantic indexes and large-RSS/page-fault benchmarks remain
403
+ open gates for issues #40, #43 and #61.
404
+
405
+ ### Deterministic query planning
406
+
407
+ `query-plan` emits `simplicio.fast.query-plan/v1` with the selected exact, prefix, path, kind,
408
+ or relation index, candidate record count, bounded byte estimate, generation and reason code:
409
+
410
+ ```bash
411
+ simplicio-fast query-plan DeliveryEngine --operation context --max-results 3 --max-bytes 12000
412
+ ```
413
+
414
+ The planner uses index statistics and record sizes; it does not claim provider tokens, does not
415
+ materialize source spans, and keeps causal prefetch disabled until a bounded neighbor policy is
416
+ available. Plan output is explainable and comparable across identical generations.
417
+
418
+ ### Append-only change journal
419
+
420
+ `simplicio_fast.journal.ChangeJournal` provides the bounded reference contract for incremental
421
+ consumers. It stores `simplicio.fast.change-journal/v1` records with canonical create, update,
422
+ rename, delete, config and schema events, source generation, optional before/after SHA-256 values,
423
+ and a SHA-256 chain. Every append fsyncs the record; reads fail closed on schema, path, chain,
424
+ hash or JSON corruption. A final incomplete record can be recovered explicitly with
425
+ `journal.recover()`, which truncates only that tail and returns a versioned recovery receipt.
426
+
427
+ The journal is an evidence log, not a replacement for source files or the published snapshot:
428
+ dependency closure, cross-language adapters, proportional parser reuse and end-to-end daemon
429
+ integration remain separate gates for issue #77.
430
+
431
+ ### Migration from SFAST001/v1
432
+
433
+ Readers accept both the frozen v1 table and v2 section snapshots. A v1 snapshot is read-only during
434
+ the migration window and has no persisted relation/index sections; queries use its validated legacy
435
+ records. Run `simplicio-fast refresh . -o .simplicio/fast/project.sfast` (or `build`) to publish a
436
+ v2 snapshot atomically. Never patch a `.sfast` file in place: if `doctor` reports an incompatible,
437
+ truncated or checksum-failing file, discard the derived cache and rebuild from source. A failed
438
+ refresh leaves the previous complete snapshot untouched.
439
+
440
+ ## Test
441
+
442
+ ```bash
443
+ PYTHONPATH=src python -m unittest discover -s tests -v
444
+ python -m compileall -q src tests benchmarks
445
+ python benchmarks/run.py
446
+ python scripts/check_release_integrity.py --check --json
447
+ ```
448
+
449
+ The wheel carries `simplicio_fast/release_policy.json`, so an installed
450
+ consumer can inspect branch, dependency, native ownership, platform, and
451
+ precompiled-only policy without access to the source checkout. The root
452
+ `release-policy.json` is a checked mirror, and the integrity gate rejects drift
453
+ between the two.
454
+
455
+ Version 2.0.16 covers:
456
+
457
+ - complete user CRUD and later status change;
458
+ - normalized-email conflict;
459
+ - binary build and symbol query;
460
+ - unchanged-file reuse;
461
+ - one-file invalidation and new-symbol visibility.
462
+ - v2 corruption/truncation rejection, direct indexes, typed impact relations and bounded context;
463
+ - frozen SFAST001/v1 read compatibility.
464
+
465
+ The benchmark defaults to ten repetitions at 1,000, 10,000 and 100,000 symbols and records wall
466
+ time, CPU time, peak RSS and page-fault counters where the host exposes them. Use identical source,
467
+ query, Python, hardware and cache conditions when comparing baseline and Fast; unavailable counters
468
+ are emitted as `null`, never estimated.
469
+
470
+ ## Current scope
471
+
472
+ Ready in Fast 2.0.16:
473
+
474
+ - Python 3.11+;
475
+ - Python AST classes, functions and async functions;
476
+ - versioned binary snapshot;
477
+ - read-only `mmap`;
478
+ - incremental SHA-256 reuse;
479
+ - atomic writes;
480
+ - CRUD, tests and benchmark;
481
+ - Mapper/Dev CLI readiness checks with explicit fallback receipts;
482
+ - canonical base generations, isolated worktree overlays, leases and refresh;
483
+ - provenance, apply and rollout receipts for shadow, canary, integrated and rollback states;
484
+ - optional Runtime-first semantic scoring with a complete deterministic offline fallback, documented in [semantic scoring](docs/semantic-scoring.md).
485
+
486
+ External boundaries and follow-ups:
487
+
488
+ - full Mapper, Dev CLI, Loop and Runtime integration remains an integration concern:
489
+ callers must pass Mapper-owned handles and must not read Fast offsets directly;
490
+ - central daemon and native parser bindings remain follow-up work;
491
+ - cross-repository promotion remains owned and verified by the corresponding Loop/Runtime projects.
492
+
493
+ ## Ecosystem architecture
494
+
495
+ | Project | Responsibility |
496
+ |---|---|
497
+ | `simplicio-fast` | central processor, mmap memory, understanding and PlanDAG |
498
+ | `simplicio-mapper` | canonical project extraction and stable IDs |
499
+ | `simplicio-dev-cli` | guarded mechanical source edits |
500
+ | `simplicio-loop` | orientation, slots, convergence and delivery |
501
+ | `simplicio-runtime` | deterministic execution, policy and receipts |
502
+ | `simplicio-agent` | decisions, context selection and patch strategy |
503
+ | `simplicio-code` | integrated developer experience |
504
+
505
+
506
+
507
+ ## V3 architecture and execution profiles
508
+
509
+ Fast is the semantic CPU/cache engine for comprehension and guarded change delivery. It keeps
510
+ repository meaning hot across orientation, impact analysis, planning, editing, validation and
511
+ retries. The source tree remains authoritative; snapshots are derived state.
512
+
513
+ - **Full:** Mapper → Fast → Dev CLI, coordinated by Loop and governed by Runtime.
514
+ - **Loop standalone:** Loop → Fast, with Mapper and Dev CLI adapters encapsulated; Runtime,
515
+ Agent and Code are optional.
516
+ - **Engines:** Python remains the complete reference/fallback. Runtime owns native execution;
517
+ `auto` selects its verified binary adapter only after hash, platform, ABI, version, capability,
518
+ and health gates pass. `rust` fails closed, while `python` and `off` never load a native path.
519
+ - **Compatibility bridge:** CI may publish the legacy `simplicio.fast-native/v1` executable for
520
+ migration and rollback. Consumers only use the precompiled artifact; local Cargo/rustc discovery
521
+ is forbidden. The Runtime adapter supersedes this bridge as its capability becomes available.
522
+
523
+ See [ADR-0001](docs/ADR-0001-fast-v3-ownership.md) and the
524
+ [contract matrix](docs/fast-v3-contract-matrix.md). The executable delivery-engine work is
525
+ tracked in [issue #46](https://github.com/wesleysimplicio/simplicio-fast/issues/46).
526
+
527
+ ## Star history
528
+
529
+ [![Star History Chart](https://api.star-history.com/svg?repos=wesleysimplicio/simplicio-fast&type=Date)](https://star-history.com/#wesleysimplicio/simplicio-fast&Date)
530
+
531
+ > GitHub stars and the chart become externally visible when repository visibility and Star History access permit it.
532
+
533
+ ## Roadmap
534
+
535
+ See the granular cross-repository plan:
536
+
537
+ - [Simplicio Fast epic and core issues](https://github.com/wesleysimplicio/simplicio-fast/issues)
538
+ - [Mapper integration](https://github.com/wesleysimplicio/simplicio-mapper/issues/358)
539
+ - [Dev CLI integration](https://github.com/wesleysimplicio/simplicio-dev-cli/issues/341)
540
+ - [Loop integration](https://github.com/wesleysimplicio/simplicio-loop/issues/746)
541
+ - [Runtime integration](https://github.com/wesleysimplicio/simplicio-runtime/issues/3597)
542
+
543
+ ## License and status
544
+
545
+ Version 2.0.16 is governed by the local release-integrity gate. Review [CHANGELOG.md](CHANGELOG.md),
546
+ `AGENTS.md` and open issues before making it mandatory across the entire Simplicio ecosystem.