ltcai 9.5.0 → 9.7.0

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 (71) hide show
  1. package/README.md +67 -43
  2. package/auto_setup.py +11 -1
  3. package/docs/CHANGELOG.md +86 -0
  4. package/docs/COMMUNITY_AND_PLUGINS.md +2 -2
  5. package/docs/DEVELOPMENT.md +8 -8
  6. package/docs/LEGACY_COMPATIBILITY.md +1 -1
  7. package/docs/ONBOARDING.md +2 -2
  8. package/docs/OPERATIONS.md +1 -1
  9. package/docs/PERFORMANCE.md +106 -0
  10. package/docs/TRUST_MODEL.md +1 -1
  11. package/docs/WHY_LATTICE.md +1 -1
  12. package/docs/kg-schema.md +1 -1
  13. package/docs/mcp-tools.md +1 -1
  14. package/kg_schema.py +11 -1
  15. package/knowledge_graph.py +12 -2
  16. package/knowledge_graph_api.py +11 -1
  17. package/lattice_brain/__init__.py +1 -1
  18. package/lattice_brain/graph/proactive.py +583 -0
  19. package/lattice_brain/graph/retrieval.py +211 -7
  20. package/lattice_brain/graph/retrieval_vector.py +102 -0
  21. package/lattice_brain/ingestion.py +360 -4
  22. package/lattice_brain/quality.py +44 -9
  23. package/lattice_brain/runtime/multi_agent.py +38 -2
  24. package/latticeai/__init__.py +1 -1
  25. package/latticeai/api/brain_intelligence.py +27 -2
  26. package/latticeai/api/change_proposals.py +89 -0
  27. package/latticeai/api/chat_agent_http.py +2 -0
  28. package/latticeai/api/review_queue.py +66 -2
  29. package/latticeai/app_factory.py +23 -0
  30. package/latticeai/cli/entrypoint.py +3 -1
  31. package/latticeai/core/agent.py +273 -101
  32. package/latticeai/core/agent_eval.py +411 -0
  33. package/latticeai/core/agent_trace.py +104 -0
  34. package/latticeai/core/legacy_compatibility.py +15 -1
  35. package/latticeai/core/marketplace.py +1 -1
  36. package/latticeai/core/tool_governor.py +101 -0
  37. package/latticeai/core/workspace_os.py +1 -1
  38. package/latticeai/runtime/router_registration.py +2 -0
  39. package/latticeai/services/architecture_readiness.py +1 -1
  40. package/latticeai/services/brain_intelligence.py +97 -1
  41. package/latticeai/services/change_proposals.py +322 -0
  42. package/latticeai/services/product_readiness.py +1 -1
  43. package/latticeai/services/review_queue.py +47 -3
  44. package/latticeai/tools/__init__.py +6 -1
  45. package/llm_router.py +10 -1
  46. package/local_knowledge_api.py +10 -1
  47. package/ltcai_cli.py +11 -1
  48. package/mcp_registry.py +10 -1
  49. package/p_reinforce.py +10 -1
  50. package/package.json +1 -1
  51. package/scripts/agent_eval.py +46 -0
  52. package/scripts/brain_quality_eval.py +1 -1
  53. package/scripts/check_current_release_docs.mjs +2 -1
  54. package/scripts/profile_kg.py +360 -0
  55. package/setup_wizard.py +10 -1
  56. package/src-tauri/Cargo.lock +1 -1
  57. package/src-tauri/Cargo.toml +1 -1
  58. package/src-tauri/tauri.conf.json +1 -1
  59. package/static/app/asset-manifest.json +11 -11
  60. package/static/app/assets/{Act-Cdfqx4wN.js → Act-B6c39ays.js} +2 -1
  61. package/static/app/assets/{Brain-w_tAuyg6.js → Brain-D7Qg4k6M.js} +1 -1
  62. package/static/app/assets/{Capture-iJwi9LmS.js → Capture-VF_di68r.js} +1 -1
  63. package/static/app/assets/{Library-Do-jjhzi.js → Library-D_Gis2PA.js} +1 -1
  64. package/static/app/assets/{System-DFg_q3E6.js → System-C5s5H2ov.js} +1 -1
  65. package/static/app/assets/{index-BN6HIWVC.css → index-85wQvEie.css} +1 -1
  66. package/static/app/assets/index-DJC_2oub.js +18 -0
  67. package/static/app/assets/{primitives-ZTUlU7pR.js → primitives-DL4Nip8C.js} +1 -1
  68. package/static/app/assets/{textarea-CMfhqPhE.js → textarea-woZfCXHy.js} +1 -1
  69. package/static/app/index.html +2 -2
  70. package/static/sw.js +1 -1
  71. package/static/app/assets/index-aJuRi-Xo.js +0 -17
package/README.md CHANGED
@@ -1,9 +1,17 @@
1
1
  # Lattice AI
2
2
 
3
- **Lattice AI 9.5.0 is the local-first Digital Brain platform. The Command Center puts everything one keystroke away: a Cmd+K palette that searches knowledge, past conversations, automations, and app pages in one query, and a daily briefing that condenses recent knowledge, automation state, pending reviews, Brain health, and suggested next steps into one glance with one-click quick actions.**
3
+ **Lattice AI 9.6.0 is the local-first Digital Brain platform. The Trusted Agent Loop makes autonomous work transparent and git-like: the reasoning loop reports every model call, format repair, and tool outcome; a deterministic evaluation harness gates every release on weak-model robustness; and change governance is proposal-first creating new files is frictionless while edits and deletions of existing content become reviewable proposals you approve or reject before anything changes.**
4
4
 
5
5
  **Lattice AI는 모델이 바뀌어도 내 지식과 맥락을 보존하는 로컬 우선 AI 브레인입니다.**
6
6
 
7
+ > The 9.6.0 release engineers trust into the agent loop: a structured
8
+ > LoopTrace makes every run observable (llm calls, parse recoveries, format
9
+ > repairs, corrections, tool outcomes — returned as `loop` in the agent API),
10
+ > weak-model tolerance gains python-literal repair and escalating format
11
+ > corrections, a deterministic agent evaluation harness gates CI, and a
12
+ > central change governor stages edits/deletions of existing files as review
13
+ > proposals (`/api/proposals`) applied exactly as reviewed — while new-file
14
+ > creation now runs without approval friction.
7
15
  > The 9.5.0 release adds the Command Center: a deterministic, local
8
16
  > `/api/command` surface serving a daily briefing (recent knowledge,
9
17
  > conversation activity, automation state, pending reviews, health snapshot,
@@ -108,11 +116,11 @@ You need Lattice AI when:
108
116
  The screenshots below are the latest checked-in visual evidence captures. They
109
117
  keep the first-run Brain flow, memory graph, source capture, model library,
110
118
  system view, admin console, and review center visible as release gates while
111
- 9.5.0 puts the whole Brain one keystroke away: the Cmd+K Command Palette
112
- searches knowledge, conversations, automations, and pages in one query, and
113
- Today's Briefing condenses the Brain's state into one glance with one-click
114
- next steps. The captures below are the checked-in 9.5.0 visual release
115
- evidence for that product flow.
119
+ 9.6.0 makes autonomous work trustworthy: agents create new things freely,
120
+ but every change to existing content becomes a reviewable proposal with a
121
+ diff, and the reasoning loop itself is observable and regression-gated. The
122
+ captures below are the checked-in 9.6.0 visual release evidence for that
123
+ product flow.
116
124
 
117
125
  ### 1. Wake Brain
118
126
 
@@ -124,21 +132,21 @@ confirm owner, check the computer, choose the Brain voice.
124
132
  Choose the owner of the Brain. The profile is not a SaaS account by default; it
125
133
  is the local identity for the knowledge you keep.
126
134
 
127
- ![Login](output/release/v9.5.0/screenshots/01-login.png)
135
+ ![Login](output/release/v9.7.0/screenshots/01-login.png)
128
136
 
129
137
  ### 3. Recommended Models
130
138
 
131
139
  Start with a short list: safest recommendation, faster model, stronger model.
132
140
  Advanced details stay available without overwhelming first-time users.
133
141
 
134
- ![Recommended Models](output/release/v9.5.0/screenshots/02-recommended-models.png)
142
+ ![Recommended Models](output/release/v9.7.0/screenshots/02-recommended-models.png)
135
143
 
136
144
  ### 4. Install And Load
137
145
 
138
146
  Download and load only after consent. Lattice explains model size, local
139
147
  execution, and network use before work starts.
140
148
 
141
- ![Install and Load](output/release/v9.5.0/screenshots/03-install-load-progress.png)
149
+ ![Install and Load](output/release/v9.7.0/screenshots/03-install-load-progress.png)
142
150
 
143
151
  ### 5. Brain Chat
144
152
 
@@ -150,14 +158,14 @@ and its visible life signal follow real listening, recall, synthesis, and action
150
158
  state. Detailed memory rings, provenance, conversation history, and
151
159
  model/runtime proof open as overlays only when requested.
152
160
 
153
- ![One-viewport Living Brain Home](output/release/v9.5.0/screenshots/04-brain-chat-home.png)
161
+ ![One-viewport Living Brain Home](output/release/v9.7.0/screenshots/04-brain-chat-home.png)
154
162
 
155
163
  ### 6. Review Center
156
164
 
157
165
  Automation results are staged for review before they become durable decisions.
158
166
  Snooze, unsnooze, run now, approve, and dismiss actions stay explicit.
159
167
 
160
- ![Review Center](output/release/v9.5.0/screenshots/12-review-center.png)
168
+ ![Review Center](output/release/v9.7.0/screenshots/12-review-center.png)
161
169
 
162
170
  ## Brain Depths
163
171
 
@@ -173,10 +181,10 @@ The user travels inward from everyday memory to deeper structure:
173
181
 
174
182
  Walkthrough:
175
183
 
176
- ![v9.5.0 Living Brain walkthrough](output/release/v9.5.0/gifs/v9.5.0-living-brain-walkthrough.gif)
184
+ ![v9.7.0 Living Brain walkthrough](output/release/v9.7.0/gifs/v9.7.0-living-brain-walkthrough.gif)
177
185
 
178
186
  Screenshot index and capture notes:
179
- [output/release/v9.5.0/SCREENSHOT_INDEX.md](output/release/v9.5.0/SCREENSHOT_INDEX.md)
187
+ [output/release/v9.7.0/SCREENSHOT_INDEX.md](output/release/v9.7.0/SCREENSHOT_INDEX.md)
180
188
 
181
189
  ## Install
182
190
 
@@ -261,45 +269,59 @@ See [docs/DEVELOPMENT.md](docs/DEVELOPMENT.md) for developer workflow details.
261
269
 
262
270
  ## Current Release
263
271
 
264
- The current release is **9.5.0 — Command Center**:
265
-
266
- - A new `CommandCenterService` (`/api/command/briefing`, `/api/command/search`)
267
- aggregates every Brain surface read-only and deterministically: recent
268
- knowledge from the scoped graph, conversation activity, automation
269
- enable/draft counts, pending review items, a Brain-health snapshot, and the
270
- top automation suggestions each section degrades independently when a
271
- backend is unavailable.
272
- - State-derived quick actions with stable ids ("N items waiting for review",
273
- "enable your draft automations", "connect a knowledge folder") give the UI
274
- one-click jumps that always reflect the actual product state.
275
- - Universal search groups results across knowledge nodes (scoped keyword
276
- search), the user's own conversations (deduped per conversation, newest
277
- first), and installed automations all scoped to the requesting user and
278
- workspace.
279
- - The frontend gains a Cmd+K Command Palette (grouped results, keyboard
280
- navigation, page jumps, fully ko/en localized) and a Today's Briefing panel
281
- on the Brain home with stat chips, recent knowledge, and quick actions.
282
- - Everything is read-only, local, and model-free: no model calls, no writes,
283
- no external actions.
284
-
285
- Expected artifacts for 9.5.0 release must use exact filenames:
286
-
287
- - `dist/ltcai-9.5.0-py3-none-any.whl`
288
- - `dist/ltcai-9.5.0.tar.gz`
289
- - `ltcai-9.5.0.tgz`
290
- - `dist/ltcai-9.5.0.vsix`
291
- - `src-tauri/target/release/bundle/dmg/Lattice AI_9.5.0_aarch64.dmg`
272
+ The current release is **9.7.0 — Proactive Hybrid Brain**:
273
+
274
+ - Retrieval is unified: `KnowledgeGraphStore.hybrid_search()` fuses lexical
275
+ and vector search in the graph layer itself (normalized scores, per-source
276
+ provenance, rank fusion), degrades honestly to `lexical_only` when the
277
+ vector index is unavailable, and `context_for_query()` can opt into it.
278
+ - The vector index stays in sync automatically: every successful ingest runs
279
+ an incremental `index_node_incremental()` pass (opt-out via
280
+ `LATTICEAI_AUTO_VECTOR_INDEX`), and failures downgrade to an explicit
281
+ `pending` status that the next `rebuild_vector_index` picks up.
282
+ - Ingestion covers whole folders: `ingest_folder()` walks directories with
283
+ `.latticeignore` support (gitignore-like globs), size/extension filters,
284
+ and optional background scheduling; `ingest_web_page()` formalizes the
285
+ web seamfetching/parsing stays upstream, the graph receives clean text.
286
+ - The Brain is proactive in the graph layer: `lattice_brain/graph/proactive.py`
287
+ finds duplicate and contradictory knowledge, produces a combined quality
288
+ report with stale-node and edge-quality signals, and plans consent-first
289
+ duplicate consolidation surfaced at `GET /api/brain/duplicates`,
290
+ `GET /api/brain/quality-report`, and the existing contradiction/consolidate
291
+ endpoints.
292
+ - The change-governance loop is closed: Review Center approval now applies
293
+ staged proposals through the single application path (no more
294
+ status-only approvals), proposals carry tool/risk/change-class/conversation
295
+ provenance, reject records a reason, and pending-proposal counts badge the
296
+ review inbox.
297
+ - The agent evaluation gate grew to 12 scenarios, adding file-generation
298
+ happy path and recovery, a 3-step multi-step workflow chain, and a
299
+ governed-write proposal path that pins the approve()-excludes-governed-tools
300
+ invariant.
301
+ - Engineering health: `SingleAgentRuntime.execute` decomposed into focused
302
+ helpers, multi-agent/single-agent runtime consistency pinned by tests, all
303
+ root legacy modules emit deprecation warnings pointing at their package
304
+ homes, and `scripts/profile_kg.py` + `docs/PERFORMANCE.md` establish a
305
+ measured KG performance baseline.
306
+
307
+ Expected artifacts for 9.7.0 release must use exact filenames:
308
+
309
+ - `dist/ltcai-9.7.0-py3-none-any.whl`
310
+ - `dist/ltcai-9.7.0.tar.gz`
311
+ - `ltcai-9.7.0.tgz`
312
+ - `dist/ltcai-9.7.0.vsix`
313
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_9.7.0_aarch64.dmg`
292
314
 
293
315
  Do not use wildcard artifact uploads. Package registry publishing remains owner-run.
294
316
 
295
317
  See [docs/ROADMAP_RECOMMENDATIONS.md](docs/ROADMAP_RECOMMENDATIONS.md) for the
296
- strategic roadmap slices applied through 9.5.0 and the follow-up tracks.
318
+ strategic roadmap slices applied through 9.7.0 and the follow-up tracks.
297
319
 
298
320
  ## Known Limitations
299
321
 
300
322
  - External package registries are owner-published and can lag behind GitHub.
301
323
  - PostgreSQL/pgvector is optional scale/migration tooling. SQLite remains the
302
- live local Brain store in 9.5.0.
324
+ live local Brain store in 9.7.0.
303
325
  - Docker, model downloads, cloud model calls, Telegram, Brain Network, and update
304
326
  checks require explicit user action.
305
327
  - Conversation does not fabricate answers when no model is loaded.
@@ -311,6 +333,8 @@ strategic roadmap slices applied through 9.5.0 and the follow-up tracks.
311
333
 
312
334
  | Version | Theme |
313
335
  | --- | --- |
336
+ | 9.7.0 | Proactive Hybrid Brain: graph-native hybrid lexical+vector retrieval with automatic incremental vector indexing, folder ingestion with `.latticeignore`, proactive duplicate/contradiction detection and quality reporting in the graph layer, and a fully closed proposal→Review Center→apply governance loop |
337
+ | 9.6.0 | Trusted Agent Loop: observable agent reasoning (LoopTrace + loop API payload), python-literal/fence/think weak-model repairs with escalating corrections, a deterministic CI agent-eval harness, and proposal-first change governance where edits/deletions of existing files become reviewable diffs |
314
338
  | 9.5.0 | Command Center: a Cmd+K palette searching knowledge, conversations, automations, and pages in one query, plus a daily briefing with Brain state at a glance and state-derived one-click quick actions |
315
339
  | 9.4.0 | Question-Driven Everyday Automation: the Brain mines recurring user questions and connected knowledge folders into one-click, consent-first automation suggestions installed as review-gated drafts |
316
340
  | 9.3.0 | Proactive Brain Intelligence: the Brain diagnoses its own health, surfaces contradictions and stale knowledge, proposes consent-first duplicate consolidation, and recalls with hybrid lexical+semantic evidence behind an honest quality gate |
package/auto_setup.py CHANGED
@@ -1,6 +1,16 @@
1
1
  """Compatibility shim for :mod:`latticeai.setup.auto_setup`."""
2
2
 
3
- from latticeai.setup import auto_setup as _impl
3
+ import warnings
4
+
5
+ warnings.warn(
6
+ "Importing 'auto_setup' from the repository root is deprecated; "
7
+ "use 'from latticeai.setup import auto_setup' instead. "
8
+ "The root shim will be removed in a future major release.",
9
+ DeprecationWarning,
10
+ stacklevel=2,
11
+ )
12
+
13
+ from latticeai.setup import auto_setup as _impl # noqa: E402
4
14
 
5
15
 
6
16
  if __name__ == "__main__":
package/docs/CHANGELOG.md CHANGED
@@ -4,6 +4,92 @@ The top entry is either the current unreleased main-branch work or the current
4
4
  release line. Older entries are historical and may describe behavior as it
5
5
  existed at that release.
6
6
 
7
+ ## [9.7.0] - 2026-07-20
8
+
9
+ ### Added
10
+ - Added `KnowledgeGraphStore.hybrid_search()`: graph-native fusion of
11
+ lexical and vector retrieval with normalized scores, per-source
12
+ provenance, chunk→parent roll-up, workspace scoping, and an honest
13
+ `lexical_only` fallback; `context_for_query()` gains an opt-in
14
+ `use_hybrid` flag.
15
+ - Added `index_node_incremental()` and automatic post-ingest vector-index
16
+ sync in `IngestionPipeline` (opt-out `LATTICEAI_AUTO_VECTOR_INDEX`);
17
+ vector failures downgrade to `indexing_status: pending` instead of
18
+ failing the ingest.
19
+ - Added `IngestionPipeline.ingest_folder()` (recursive walk,
20
+ `.latticeignore` gitignore-like filtering, size/extension limits,
21
+ optional background queue) and `ingest_web_page()` (formalized
22
+ extracted-text web seam; fetching/parsing stays upstream).
23
+ - Added `lattice_brain/graph/proactive.py` (`ProactiveBrain`): duplicate
24
+ detection, contradiction detection, combined `quality_report()`,
25
+ consent-first `consolidate_duplicates()` planning, and the pure
26
+ `gate_ingest_candidate()` quality-gating seam.
27
+ - Added `GET /api/brain/duplicates` and `GET /api/brain/quality-report`;
28
+ `/api/brain/contradictions` and `/api/brain/consolidate` return
29
+ graph-layer results additively.
30
+ - Added `GET /api/proposals/counts`, `GET /api/proposals/{id}` (diff +
31
+ staged content), reject-with-reason, and
32
+ `GET /automation/reviews/counts`; the Review Center UI gains a
33
+ `change_proposal` filter, diff preview, tier/deletion badges, a
34
+ pending-count badge, and a reject-reason input (ko/en parity).
35
+ - Added 4 agent-eval scenarios (12 total): file-generation happy path,
36
+ file-generation recovery, multi-step workflow chain, and a
37
+ governed-write proposal path pinning the
38
+ approve()-excludes-governed-tools invariant.
39
+ - Added `tests/unit/test_runtime_consistency.py`,
40
+ `scripts/profile_kg.py`, and `docs/PERFORMANCE.md` (measured synthetic
41
+ KG baseline; flags brute-force `vector_search()` as the next
42
+ optimization target).
43
+
44
+ ### Changed
45
+ - Review Center approval of `change_proposal` items now applies the staged
46
+ content through `ChangeProposalService.approve_and_apply` (single
47
+ application path, 409 on replay) instead of only flipping status.
48
+ - Change proposals carry tool/risk/change-class/conversation-id
49
+ provenance; the agent loop forwards `conversation_id` to the governor.
50
+ - `SingleAgentRuntime.execute` decomposed into six focused helpers
51
+ (behavior-preserving); the multi-agent orchestrator surfaces real
52
+ failure reasons in `execution_failed` timeline events.
53
+ - All root legacy modules emit `DeprecationWarning` pointing at their
54
+ package homes; the legacy-compatibility registry tracks all 13 shims.
55
+
56
+ ### Security
57
+ - Proposal apply/reject stays fail-closed end-to-end: approval applies
58
+ exactly the reviewed staged content, replays are rejected with 409, and
59
+ reject reasons land in provenance for audit.
60
+
61
+ ## [9.6.0] - 2026-07-20
62
+
63
+ ### Added
64
+ - Added `latticeai/core/agent_trace.py` (`LoopTrace`): typed observability
65
+ for the single-agent reasoning loop, returned as `loop` with every agent
66
+ API response.
67
+ - Added `latticeai/core/agent_eval.py` + `scripts/agent_eval.py`: a
68
+ deterministic scripted-model evaluation harness over the real agent state
69
+ machine, wired into CI as a release gate.
70
+ - Added `latticeai/core/tool_governor.py` and
71
+ `latticeai/services/change_proposals.py` + `/api/proposals` router:
72
+ central read/additive/mutation/destructive classification with
73
+ proposal-first governance — edits/deletions of existing files are staged
74
+ as review-queue proposals (source `change_proposal`) with unified diffs
75
+ and applied exactly as reviewed on approval.
76
+ - Added the "변경 제안 / Change proposals" Brain home panel with diff
77
+ previews and one-click approve/reject.
78
+
79
+ ### Changed
80
+ - The action parser tolerates Python-literal dicts and reports every repair
81
+ by name; repeated formatting slips escalate the correction with the valid
82
+ tool list.
83
+ - Additive file creates in the agent loop run without plan-approval
84
+ friction; plan approval no longer hard-blocks governor-managed tools.
85
+ - Ruff per-file lint ignores trimmed from 9 entries to 3.
86
+
87
+ ### Security
88
+ - Mutations and deletions of existing workspace files by the agent can no
89
+ longer apply silently: they stage as reviewable proposals, and approve
90
+ applies the exact reviewed content with full audit events.
91
+ - AGENTS.md is now inside the machine-checked release documentation gate.
92
+
7
93
  ## [9.5.0] - 2026-07-20
8
94
 
9
95
  ### Added
@@ -1,13 +1,13 @@
1
1
  # Community And Plugins
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  LatticeAI defines the path from a strong local-first framework (8.4.0
6
6
  action-aware baseline, 8.5.0 registry+DI hardening, 8.6.0 capture/navigation
7
7
  reliability, 8.7.0 runtime-state hygiene, 8.8.0 Brain Core extraction
8
8
  readiness, 8.9.0 scoped Tool API hardening, 9.0.0 cleanup closure, 9.1.0
9
9
  fail-closed review completion, 9.2.0 model-agnostic file generation, 9.3.0
10
- proactive Brain intelligence, 9.4.0 question-driven everyday automation, and 9.5.0 Command Center)
10
+ proactive Brain intelligence, 9.4.0 question-driven everyday automation, 9.5.0 Command Center, and 9.6.0 Trusted Agent Loop)
11
11
  to a product ecosystem. The
12
12
  immediate goal is small and practical: make it clear how
13
13
  contributors can extend the Brain without weakening local-first trust,
@@ -1,10 +1,10 @@
1
1
  # Lattice AI Development
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  This document is for contributors working on the local-first Digital Brain
6
6
  codebase. Product positioning and quick start stay in `README.md`; release
7
- history is intentionally limited to 8.0.0-9.5.0 in `docs/CHANGELOG.md` and
7
+ history is intentionally limited to 8.0.0-9.6.0 in `docs/CHANGELOG.md` and
8
8
  `RELEASE.md`.
9
9
 
10
10
  ## Product Contract
@@ -153,10 +153,10 @@ For user-facing, API, runtime, release, or packaging changes, check:
153
153
  Release/publish examples must use exact target-version filenames. Do not
154
154
  document wildcard artifact upload commands.
155
155
 
156
- For 9.5.0 release work, exact artifacts are:
156
+ For 9.6.0 release work, exact artifacts are:
157
157
 
158
- - `dist/ltcai-9.5.0-py3-none-any.whl`
159
- - `dist/ltcai-9.5.0.tar.gz`
160
- - `ltcai-9.5.0.tgz`
161
- - `dist/ltcai-9.5.0.vsix`
162
- - `src-tauri/target/release/bundle/dmg/Lattice AI_9.5.0_aarch64.dmg`
158
+ - `dist/ltcai-9.6.0-py3-none-any.whl`
159
+ - `dist/ltcai-9.6.0.tar.gz`
160
+ - `ltcai-9.6.0.tgz`
161
+ - `dist/ltcai-9.6.0.vsix`
162
+ - `src-tauri/target/release/bundle/dmg/Lattice AI_9.6.0_aarch64.dmg`
@@ -1,6 +1,6 @@
1
1
  # Legacy Compatibility Map
2
2
 
3
- Current target: **9.5.0 — Command Center**.
3
+ Current target: **9.6.0 — Trusted Agent Loop**.
4
4
 
5
5
  Lattice AI is moving toward a smaller, modular architecture centered on
6
6
  `lattice_brain`, `latticeai.services`, `latticeai.api`, and `latticeai.runtime`.
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Onboarding
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  The first-run goal is a five-minute path from "I opened the app" to "my Brain
6
6
  has a source, a question, and proof." This page is the product contract behind
@@ -40,7 +40,7 @@ read the docs first.
40
40
 
41
41
  ## Release Gate
42
42
 
43
- 9.5.0 treats onboarding as a release gate, not marketing copy. The current
43
+ 9.6.0 treats onboarding as a release gate, not marketing copy. The current
44
44
  machine-checkable product readiness report requires this five-minute contract,
45
45
  the Brain Home surface, setup helpers, graph ingestion tests, and exact release
46
46
  artifact documentation before the release can be called complete.
@@ -1,4 +1,4 @@
1
- # Lattice AI — Operations Guide (v9.5.0)
1
+ # Lattice AI — Operations Guide (v9.6.0)
2
2
 
3
3
  ## 1. 데이터 파일 위치
4
4
 
@@ -0,0 +1,106 @@
1
+ # Knowledge Graph Performance Baseline
2
+
3
+ Synthetic performance and memory baseline for `KnowledgeGraphStore`
4
+ (`lattice_brain/graph/`). Measured with `scripts/profile_kg.py`.
5
+
6
+ **This is a synthetic baseline, not a real-workload benchmark.** Use it for
7
+ release-over-release regression comparison, not as a marketing number.
8
+
9
+ ## Methodology
10
+
11
+ - `scripts/profile_kg.py` builds a throwaway store the same way the unit tests
12
+ do (`KnowledgeGraphStore(tmp/graph.sqlite, tmp/blobs)`) and ingests N
13
+ synthetic text sources through the real `ingest_source()` pipeline
14
+ (chunking, rule-based concept/triple extraction, provenance edges).
15
+ - Corpus: fixed-vocabulary English + Korean text, seeded RNG (`--seed`,
16
+ default 42), ~60% short (~40 words) / 30% medium (~160) / 10% long (~520)
17
+ documents with recurring entities so concept nodes are shared and edges form.
18
+ - Fully offline: no LLM router is registered (extraction takes the rules
19
+ path) and the embedder is the built-in deterministic hash model. No network,
20
+ no model downloads.
21
+ - Timing: `time.perf_counter()` per call; p50/p95/mean over all calls in a
22
+ phase. Memory: `tracemalloc` peak, reset per phase.
23
+ - Caveat: tracemalloc runs for the whole profile and roughly doubles Python
24
+ allocation cost, so absolute timings are conservative upper bounds.
25
+ - Caveat: the synthetic vocabulary is small, so FTS selectivity and concept
26
+ density differ from real user data; every tenth query is a guaranteed miss
27
+ to avoid measuring only warm hits.
28
+
29
+ Run it:
30
+
31
+ ```bash
32
+ .venv/bin/python scripts/profile_kg.py # 5000 sources, 50 queries
33
+ .venv/bin/python scripts/profile_kg.py --nodes 500 # quick run (~10 s)
34
+ .venv/bin/python scripts/profile_kg.py --json # machine-readable
35
+ ```
36
+
37
+ ## Measured baseline (2026-07-20, v9.6.0 working tree)
38
+
39
+ Apple Silicon (darwin), Python 3.x from `.venv`, SQLite with FTS5 trigram
40
+ available, tracemalloc enabled.
41
+
42
+ ### 500 sources (quick profile, ~9 s total)
43
+
44
+ Graph produced: 2,019 nodes / 6,546 edges, 21.2 MB SQLite file.
45
+
46
+ | phase | calls | p50 ms | p95 ms | wall s | peak MB |
47
+ |----------------------|------:|-------:|-------:|-------:|--------:|
48
+ | ingest_source | 500 | 6.9 | 17.7 | 4.1 | 0.6 |
49
+ | search | 50 | 1.2 | 2.5 | 0.07 | 0.6 |
50
+ | context_for_query | 50 | 1.0 | 2.4 | 0.06 | 0.5 |
51
+ | neighbors | 50 | 0.35 | 0.45 | 0.02 | 0.6 |
52
+ | traverse (depth 2) | 50 | 4.8 | 5.2 | 0.24 | 1.1 |
53
+ | stats | 5 | 1.5 | 1.7 | 0.01 | 0.4 |
54
+ | rebuild_vector_index | 1 | 1319 | 1319 | 1.3 | 5.0 |
55
+ | vector_search | 10 | 287 | 294 | 2.9 | 14.4 |
56
+
57
+ Ingestion throughput: **~122 items/sec** (412 KB corpus).
58
+
59
+ ### 5000 sources (default profile, ~2.5 min total)
60
+
61
+ Graph produced: 18,426 nodes / 62,534 edges, 198.8 MB SQLite file
62
+ (4.26 MB corpus). Measured while other processes shared the CPU, so treat as
63
+ an upper bound.
64
+
65
+ | phase | calls | p50 ms | p95 ms | wall s | peak MB |
66
+ |----------------------|------:|-------:|-------:|-------:|--------:|
67
+ | ingest_source | 5000 | 20.1 | 54.6 | 119.9 | 1.4 |
68
+ | search | 50 | 4.3 | 19.8 | 0.40 | 1.2 |
69
+ | context_for_query | 50 | 4.1 | 18.5 | 0.40 | 1.2 |
70
+ | neighbors | 50 | 0.39 | 0.50 | 0.03 | 1.2 |
71
+ | traverse (depth 2) | 50 | 12.2 | 15.8 | 0.64 | 1.7 |
72
+ | stats | 5 | 13.1 | 13.5 | 0.07 | 1.1 |
73
+ | rebuild_vector_index | 1 | 14624 | 14624 | 14.6 | 45.6 |
74
+ | vector_search | 10 | 1732 | 1774 | 17.4 | 83.5 |
75
+
76
+ Ingestion throughput: **~42 items/sec** at this scale.
77
+
78
+ Scaling signal (500 → 5000 sources, 10x): per-item ingest p50 grew ~3x
79
+ (6.9 ms → 20.1 ms) — ingestion cost is superlinear in DB size (FTS triggers,
80
+ dedup lookups, edge upserts against growing tables). `vector_search` p50 grew
81
+ ~6x (287 ms → 1732 ms), consistent with its O(index size) brute-force scan.
82
+ Keyword search p50 grew ~3.6x but stays under 5 ms.
83
+
84
+ Regenerate with `.venv/bin/python scripts/profile_kg.py` after graph-layer
85
+ changes and compare against these tables.
86
+
87
+ ## Observations
88
+
89
+ - Keyword `search()` / `context_for_query()` stay low-millisecond thanks to
90
+ the FTS5 trigram index; they are not the scaling bottleneck.
91
+ - `traverse(depth=2)` cost grows with edge fan-out (synthetic corpus creates
92
+ dense shared-concept hubs); p95 is ~5 ms at 500 sources and ~16 ms at 5000.
93
+ - `vector_search()` is a brute-force scan over every stored embedding
94
+ (O(index size) per query). It is the dominant cost at scale and the first
95
+ candidate for an ANN/pruning optimization if vector recall becomes a hot
96
+ path. The profiler caps vector queries at 10 for this reason.
97
+ - `rebuild_vector_index(full=True)` embeds documents and chunks with the hash
98
+ embedder; with a real embedding provider expect this phase to be slower by
99
+ the provider's per-call latency times the item count.
100
+
101
+ ## Regression workflow
102
+
103
+ 1. Before a graph-layer change: `.venv/bin/python scripts/profile_kg.py --nodes 500 --json > /tmp/kg-before.json`
104
+ 2. After the change: same command to `/tmp/kg-after.json`.
105
+ 3. Compare phase p50/p95 and `db_size_mb`; investigate anything that moved
106
+ more than ~20% beyond run-to-run noise.
@@ -1,6 +1,6 @@
1
1
  # Lattice AI Trust Model
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  Lattice AI is local-first, explicit about external communication, and honest
6
6
  when a capability is unavailable.
@@ -1,6 +1,6 @@
1
1
  # Why Lattice AI Exists
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  **Lattice AI is a local-first Digital Brain that keeps your knowledge durable
6
6
  across any AI model.**
package/docs/kg-schema.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Knowledge Graph Schema
2
2
 
3
- Current release: **9.5.0 — Command Center**.
3
+ Current release: **9.7.0 — Proactive Hybrid Brain**.
4
4
 
5
5
  명세 출처: `lattice_ai_full_spec.pptx` 슬라이드 20·21·22
6
6
  구현: `kg_schema.py`
package/docs/mcp-tools.md CHANGED
@@ -1,4 +1,4 @@
1
- # MCP 도구 카탈로그 (v9.5.0)
1
+ # MCP 도구 카탈로그 (v9.6.0)
2
2
 
3
3
  Lattice AI는 MCP(Model Context Protocol) 서버로 동작하여 Claude Desktop, Cursor 등에서 직접 도구를 사용할 수 있습니다.
4
4
 
package/kg_schema.py CHANGED
@@ -1,3 +1,13 @@
1
1
  """Compatibility shim for the v4 Knowledge Graph schema."""
2
2
 
3
- from lattice_brain.graph.schema import * # noqa: F403,F401
3
+ import warnings as _warnings
4
+
5
+ _warnings.warn(
6
+ "Importing 'kg_schema' from the repository root is deprecated; "
7
+ "use 'from lattice_brain.graph.schema import ...' instead. "
8
+ "The root shim will be removed in a future major release.",
9
+ DeprecationWarning,
10
+ stacklevel=2,
11
+ )
12
+
13
+ from lattice_brain.graph.schema import * # noqa: F403,F401,E402
@@ -4,7 +4,17 @@ The implementation now lives under :mod:`lattice_brain`. Root imports are
4
4
  kept for older integrations and tests.
5
5
  """
6
6
 
7
- from lattice_brain.graph._kg_common import ( # noqa: F401
7
+ import warnings as _warnings
8
+
9
+ _warnings.warn(
10
+ "Importing 'knowledge_graph' from the repository root is deprecated; "
11
+ "use 'from lattice_brain.graph.store import KnowledgeGraphStore' instead. "
12
+ "The root shim will be removed in a future major release.",
13
+ DeprecationWarning,
14
+ stacklevel=2,
15
+ )
16
+
17
+ from lattice_brain.graph._kg_common import ( # noqa: F401,E402
8
18
  EDGE_VERB,
9
19
  GRAPH_SCHEMA_VERSION,
10
20
  LOCAL_CODE_EXTENSIONS,
@@ -24,7 +34,7 @@ from lattice_brain.graph._kg_common import ( # noqa: F401
24
34
  _slug,
25
35
  set_llm_router,
26
36
  )
27
- from lattice_brain.graph.store import KnowledgeGraphStore
37
+ from lattice_brain.graph.store import KnowledgeGraphStore # noqa: E402
28
38
 
29
39
  __all__ = [
30
40
  "KnowledgeGraphStore",
@@ -6,7 +6,17 @@ importable for the deprecation window and will be removed in a future major
6
6
  release.
7
7
  """
8
8
 
9
- from latticeai.api.knowledge_graph import ( # noqa: F401
9
+ import warnings as _warnings
10
+
11
+ _warnings.warn(
12
+ "Importing 'knowledge_graph_api' from the repository root is deprecated; "
13
+ "use 'from latticeai.api.knowledge_graph import create_knowledge_graph_router' instead. "
14
+ "The root shim will be removed in a future major release.",
15
+ DeprecationWarning,
16
+ stacklevel=2,
17
+ )
18
+
19
+ from latticeai.api.knowledge_graph import ( # noqa: F401,E402
10
20
  KnowledgeGraphIngestRequest,
11
21
  create_knowledge_graph_router,
12
22
  )
@@ -26,7 +26,7 @@ from .storage import (
26
26
  storage_from_env,
27
27
  )
28
28
 
29
- __version__ = "9.5.0"
29
+ __version__ = "9.7.0"
30
30
 
31
31
  __all__ = [
32
32
  "AgentRuntime",