@precisionutilityguild/liquid-shadow 1.0.9 → 1.0.11
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.
- package/README.md +279 -62
- package/dist/data/migrations/000_baseline.sql +17 -0
- package/dist/data/migrations/014_tribunal_state.sql +24 -0
- package/dist/data/migrations/015_repo_level_handoffs_nullable.sql +52 -0
- package/dist/data/migrations/016_repair_tribunal_artifact_fk.sql +58 -0
- package/dist/entry/cli/index.js +1296 -928
- package/dist/entry/ember/index.js +313 -254
- package/dist/entry/mcp/server.js +1031 -808
- package/dist/entry/tribunal/index.js +685 -0
- package/dist/index.js +1008 -785
- package/dist/logic/domain/embeddings/worker.js +1 -1
- package/dist/logic/parser/index.js +16 -16
- package/dist/logic/parser/worker.js +1 -1
- package/dist/skills/shadow_audit/SKILL.md +22 -30
- package/dist/skills/shadow_chronicle/SKILL.md +16 -29
- package/dist/skills/shadow_continue/SKILL.md +37 -53
- package/dist/skills/shadow_coordinate/SKILL.md +46 -0
- package/dist/skills/shadow_crystallize/SKILL.md +13 -27
- package/dist/skills/shadow_mission/SKILL.md +27 -41
- package/dist/skills/shadow_onboard/SKILL.md +26 -35
- package/dist/skills/shadow_research/SKILL.md +15 -23
- package/dist/skills/shadow_sync/SKILL.md +18 -9
- package/dist/skills/shadow_synthesize/SKILL.md +14 -36
- package/dist/skills/shadow_trace_impact/SKILL.md +30 -50
- package/dist/skills/shadow_understand/SKILL.md +37 -52
- package/dist/skills/shadow_workspace/SKILL.md +44 -22
- package/dist/web-manifest.json +18 -7
- package/package.json +2 -1
- package/skills/shadow_audit/SKILL.md +22 -30
- package/skills/shadow_chronicle/SKILL.md +16 -29
- package/skills/shadow_continue/SKILL.md +37 -53
- package/skills/shadow_coordinate/SKILL.md +46 -0
- package/skills/shadow_crystallize/SKILL.md +13 -27
- package/skills/shadow_mission/SKILL.md +27 -41
- package/skills/shadow_onboard/SKILL.md +26 -35
- package/skills/shadow_research/SKILL.md +15 -23
- package/skills/shadow_sync/SKILL.md +18 -9
- package/skills/shadow_synthesize/SKILL.md +14 -36
- package/skills/shadow_trace_impact/SKILL.md +30 -50
- package/skills/shadow_understand/SKILL.md +37 -52
- package/skills/shadow_workspace/SKILL.md +44 -22
package/README.md
CHANGED
|
@@ -1,119 +1,336 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://img.shields.io/badge/%F0%9F%8C%91_Liquid_Shadow-MCP_Intelligence_Layer-6D28D9?style=for-the-badge" alt="Liquid Shadow">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Liquid Shadow</h1>
|
|
2
6
|
|
|
3
7
|
<p align="center">
|
|
4
|
-
<
|
|
5
|
-
|
|
8
|
+
<strong>The AI-First Code Intelligence Layer for MCP Agents</strong><br>
|
|
9
|
+
Stop making your agents grep. Give them a brain.
|
|
6
10
|
</p>
|
|
7
11
|
|
|
8
12
|
<p align="center">
|
|
9
|
-
<img src="https://img.shields.io/
|
|
10
|
-
<img src="https://img.shields.io/badge/
|
|
11
|
-
<img src="https://img.shields.io/badge/
|
|
12
|
-
<img src="https://img.shields.io/badge/
|
|
13
|
+
<a href="https://www.npmjs.com/package/@precisionutilityguild/liquid-shadow"><img src="https://img.shields.io/npm/v/@precisionutilityguild/liquid-shadow?color=6D28D9&label=npm" alt="npm version"></a>
|
|
14
|
+
<img src="https://img.shields.io/badge/MCP-Compatible-10B981.svg" alt="MCP Compatible">
|
|
15
|
+
<img src="https://img.shields.io/badge/Tools-52_Atomic-F59E0B.svg" alt="52 Tools">
|
|
16
|
+
<img src="https://img.shields.io/badge/Languages-TS%20%7C%20JS%20%7C%20Python%20%7C%20PHP%20%7C%20Go-3B82F6.svg" alt="Languages">
|
|
17
|
+
<img src="https://img.shields.io/badge/License-Apache--2.0-gray.svg" alt="License">
|
|
13
18
|
</p>
|
|
14
19
|
|
|
15
20
|
---
|
|
16
21
|
|
|
17
|
-
## The
|
|
22
|
+
## The Problem With How Agents Work Today
|
|
23
|
+
|
|
24
|
+
Every time your AI agent needs to understand a codebase, it does this:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
read file → grep → read another file → grep → read another file...
|
|
28
|
+
```
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
That's hundreds of tokens, dozens of tool calls, and a reasoning chain that collapses under its own weight for anything larger than a toy project. The agent never builds a real mental model — it just stumbles through the dark.
|
|
20
31
|
|
|
21
|
-
|
|
32
|
+
**Liquid Shadow fixes this at the architecture level.**
|
|
22
33
|
|
|
23
34
|
---
|
|
24
35
|
|
|
25
|
-
##
|
|
36
|
+
## What It Is
|
|
26
37
|
|
|
27
|
-
|
|
38
|
+
Liquid Shadow is a **Model Context Protocol (MCP) server** that builds a persistent **Relational Intelligence Graph** of your codebase — symbols, dependencies, types, execution flows, git history — and exposes it as 52 high-signal atomic tools your agents can use instead of file reads and grep.
|
|
28
39
|
|
|
29
|
-
|
|
40
|
+
One `shadow_analyze_flow` call returns the entire execution graph from an entrypoint.
|
|
41
|
+
One `shadow_analyze_impact` call shows the full blast radius before a change.
|
|
42
|
+
One `shadow_ops_briefing` call resumes mission context across sessions.
|
|
30
43
|
|
|
31
|
-
|
|
44
|
+
This isn't a smarter `grep`. It's a different paradigm entirely.
|
|
32
45
|
|
|
33
|
-
|
|
46
|
+
---
|
|
34
47
|
|
|
35
|
-
|
|
48
|
+
## What It Actually Does
|
|
36
49
|
|
|
37
|
-
|
|
50
|
+
### 🔍 Semantic Code Discovery
|
|
51
|
+
Natural language search across your entire codebase. Find "authentication logic" — not just files with `auth` in the name. Powered by hybrid **vector + BM25 FTS** search with Reciprocal Rank Fusion scoring.
|
|
38
52
|
|
|
39
|
-
### Relational
|
|
53
|
+
### 📊 Relational Graph Analysis
|
|
54
|
+
Trace full execution flows. Compute blast radius of any change. Resolve type inheritance chains. Map every HTTP route, socket event, and pubsub topic — producers and consumers split.
|
|
40
55
|
|
|
41
|
-
|
|
56
|
+
### 🧠 Token-Optimized Inspection
|
|
57
|
+
The **Semantic Sieve** folds implementation details and surfaces only signatures and intent. Control depth with `Orbit → Atmosphere → Ground` zoom levels. A file summary costs ~20 tokens instead of 2,000.
|
|
42
58
|
|
|
43
|
-
|
|
59
|
+
### 🎯 Mission-Driven Development
|
|
60
|
+
Persistent context that **survives across sessions**. Create missions with outcome contracts, log decisions and discoveries, synthesize Architectural Decision Records, and resume exactly where you left off — even weeks later.
|
|
44
61
|
|
|
45
|
-
|
|
62
|
+
### 🤝 Multi-Agent Coordination
|
|
63
|
+
File-level **claim/release locking** prevents parallel agents from stomping on each other's work. Dispatch plans across agent roles. Submit findings to a peer-review Tribunal. Hand off typed artifacts between RECON → OVERSEER → ENGINEER pipelines.
|
|
46
64
|
|
|
47
|
-
|
|
65
|
+
### 🔧 Zero-Maintenance Indexing
|
|
66
|
+
Git hooks auto-reindex on every commit and branch switch. The **Ember Daemon** builds semantic embeddings in the background at lowest OS priority — your `git commit` is never blocked.
|
|
48
67
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| **Ops Control** | Mission & context management | `shadow_ops_context`, `shadow_ops_briefing` |
|
|
52
|
-
| **Intelligence** | Deep architectural reasoning | `shadow_analyze_impact`, `shadow_analyze_flow` |
|
|
53
|
-
| **Discovery** | Semantic & config retrieval | `shadow_search_concept`, `shadow_search_config` |
|
|
54
|
-
| **Recon** | Structural layer classification | `shadow_recon_topography`, `shadow_recon_hologram` |
|
|
55
|
-
| **Inspection** | Token-optimized code folding | `shadow_inspect_symbol`, `shadow_inspect_file` |
|
|
56
|
-
| **Maintenance** | Intelligence synchronization | `shadow_sync_trace`, `shadow_sync_repair` |
|
|
68
|
+
### 🌐 Cross-Repo Intelligence
|
|
69
|
+
The **Fused Index** unifies multiple repositories at query time via SQLite `ATTACH DATABASE`. Zero data duplication. Trace a frontend API call all the way through to the backend handler across repo boundaries.
|
|
57
70
|
|
|
58
71
|
---
|
|
59
72
|
|
|
60
|
-
##
|
|
73
|
+
## Tool Suite (52 Atomic Tools)
|
|
74
|
+
|
|
75
|
+
| Suite | Tools | Purpose |
|
|
76
|
+
|:------|:------|:--------|
|
|
77
|
+
| **`shadow_recon_*`** | `onboard` `topography` `scout` `tree` `hologram` | Bootstrap index, structural classification, arc maps |
|
|
78
|
+
| **`shadow_search_*`** | `concept` `symbol` `config` `path` | Semantic, symbol, env var, and path searches |
|
|
79
|
+
| **`shadow_analyze_*`** | `impact` `flow` `deps` `mesh` `type_graph` `debt` `explain_diff` | Blast radius, execution flows, API surfaces, dead code, diff narratives |
|
|
80
|
+
| **`shadow_inspect_*`** | `symbol` `file` | Token-folded symbol inspection and file summaries |
|
|
81
|
+
| **`shadow_ops_*`** | `plan` `track` `log` `briefing` `context` `synthesize` `chronicle` `health` `graph` `crystallize` `crystallize_theme` `claim` `release` `dispatch_plan` `tribunal_submit` `tribunal_status` `handoff` `handoff_read` | Full mission lifecycle + multi-agent coordination |
|
|
82
|
+
| **`shadow_sync_*`** | `trace` `index` `repair` | Incremental sync, Nano-Repair auto-healing |
|
|
83
|
+
| **`shadow_env_*`** | `hooks` `diagnose` | Git hook management, system health |
|
|
84
|
+
| **`shadow_workspace_*`** | `list` `link` `fuse` `status` `ensure` `repair` `gc` | Multi-repo Federation |
|
|
85
|
+
|
|
86
|
+
---
|
|
61
87
|
|
|
62
|
-
|
|
88
|
+
## Zero-Config Setup (2 Minutes)
|
|
63
89
|
|
|
64
|
-
|
|
90
|
+
Stop configuring things manually. Liquid Shadow auto-discovers your IDE and injects both the MCP server and the Tactical Skills so your agent is instantly operational.
|
|
65
91
|
|
|
66
92
|
```bash
|
|
67
|
-
|
|
68
|
-
liquid-shadow
|
|
93
|
+
# 1. Install globally
|
|
94
|
+
npm i -g @precisionutilityguild/liquid-shadow
|
|
95
|
+
|
|
96
|
+
# 2. Run the tactical onboarding
|
|
97
|
+
liquid-shadow init
|
|
69
98
|
```
|
|
70
99
|
|
|
71
|
-
|
|
100
|
+
The `init` script automatically configures MCP connections for:
|
|
101
|
+
- ✅ **Claude Code** (`~/.claude.json`)
|
|
102
|
+
- ✅ **Claude Desktop** (`claude_desktop_config.json`)
|
|
103
|
+
- ✅ **Gemini CLI** (`~/.gemini/settings.json`)
|
|
104
|
+
- ✅ **Antigravity IDE** (`mcp_config.json`)
|
|
105
|
+
- ✅ **Cursor** (via `.cursor/mcp.json` context)
|
|
106
|
+
- ✅ **Codex** (`~/.codex/config.toml`)
|
|
72
107
|
|
|
73
|
-
|
|
108
|
+
*(If you are using an unsupported client, simply point it to `liquid-shadow-mcp` with no arguments).*
|
|
74
109
|
|
|
75
|
-
|
|
76
|
-
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## First Run: Onboard Your Repository
|
|
113
|
+
|
|
114
|
+
Once connected, tell your agent:
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Use shadow_recon_onboard on /absolute/path/to/your/repo
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Liquid Shadow scans all source files, extracts symbols, builds dependency graphs, and fires up the Ember Daemon for background embedding generation. Most mid-size projects are ready in under 30 seconds.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## The Skills System
|
|
125
|
+
|
|
126
|
+
Liquid Shadow ships **14 pre-built agent workflows** (called Skills) that are automatically injected into your agent's context on `init`. Instead of calling raw tools and guessing at the right sequence, agents follow optimized tactical playbooks.
|
|
127
|
+
|
|
128
|
+
| Skill | What It Does |
|
|
129
|
+
|:------|:-------------|
|
|
130
|
+
| `/onboard` | Bootstrap index, hooks, and first mission |
|
|
131
|
+
| `/understand` | Concept-to-code mapping and execution tracing |
|
|
132
|
+
| `/mission` | Strategic planning with outcome contracts |
|
|
133
|
+
| `/continue` | Resume the highest-priority active mission |
|
|
134
|
+
| `/trace-impact` | Blast radius and cross-repo dependency maps |
|
|
135
|
+
| `/audit` | Dead code, circular deps, layer drift detection |
|
|
136
|
+
| `/chronicle` | Git-native narrative history of the project |
|
|
137
|
+
| `/synthesize` | Distill mission logs into Architectural Decision Records |
|
|
138
|
+
| `/research` | External dependency research with local + web context |
|
|
139
|
+
| `/workspace` | Multi-repo federation and mission linking |
|
|
140
|
+
| `/crystallize` | Compress mission logs for token-efficient briefings |
|
|
141
|
+
| `/coordinate` | Multi-agent dispatch and Tribunal reviews |
|
|
142
|
+
| `/sync` | Incremental index repair after external changes |
|
|
143
|
+
|
|
144
|
+
Skills reduce "what tools do I call in what order?" from a guessing game to a single directive.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Real Usage Patterns
|
|
149
|
+
|
|
150
|
+
### "What breaks if I change this function?"
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
Use shadow_analyze_impact on the authenticateUser function in src/auth/service.ts
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Returns: every downstream consumer, call depth by default = 3, with file paths and symbol names. Blast radius computed in one call.
|
|
157
|
+
|
|
158
|
+
### "Where is the auth logic?"
|
|
159
|
+
|
|
160
|
+
```
|
|
161
|
+
Use shadow_search_concept to find all authentication and session handling code
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Returns: semantically ranked results. Finds code that *handles auth* even if it doesn't have `auth` in the filename.
|
|
165
|
+
|
|
166
|
+
### "Explain what changed in this diff"
|
|
167
|
+
|
|
168
|
+
```
|
|
169
|
+
Use shadow_analyze_explain_diff with staged:true
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
Returns: a semantic narrative of what your current staged changes actually do — not just a list of lines changed.
|
|
173
|
+
|
|
174
|
+
### "Resume where I left off"
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
Use shadow_ops_briefing on /path/to/repo at Ground altitude
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Returns: active missions, next candidates, recent decisions, health stats — full context reconstruction from persistent storage.
|
|
181
|
+
|
|
182
|
+
### "Find all API endpoints in this service"
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
Use shadow_analyze_mesh on /path/to/repo with topic "/api/"
|
|
77
186
|
```
|
|
78
187
|
|
|
79
|
-
|
|
188
|
+
Returns: every HTTP route, socket event handler, and pubsub topic — producers and consumers mapped separately.
|
|
189
|
+
|
|
190
|
+
---
|
|
80
191
|
|
|
81
|
-
|
|
192
|
+
## Performance
|
|
82
193
|
|
|
83
|
-
|
|
194
|
+
Indexing is CPU-parallel via SWC worker pools. Semantic embeddings are off-thread via the Ember Daemon.
|
|
84
195
|
|
|
85
|
-
|
|
196
|
+
| Repository | Files | Symbols | Time |
|
|
197
|
+
|:-----------|:------|:--------|:-----|
|
|
198
|
+
| VS Code core | 6,100 | 109,000+ | 110.6s |
|
|
199
|
+
| Next.js | 9,700 | — | 24.2s (~400 files/sec) |
|
|
200
|
+
| Django | 2,893 | — | validated |
|
|
201
|
+
| Laravel Framework | 2,854 | — | validated |
|
|
202
|
+
| FastAPI | 1,118 | — | validated |
|
|
86
203
|
|
|
87
|
-
|
|
204
|
+
After the first index, incremental syncs typically complete in 1–3 seconds.
|
|
88
205
|
|
|
89
|
-
|
|
90
|
-
- **/understand**: Concept-to-code mapping and execution tracing.
|
|
91
|
-
- **/mission**: Strategic planning and automated ADR synthesis.
|
|
92
|
-
- **/trace-impact**: Predict blast radius and dependency ripple effects.
|
|
93
|
-
- **/audit**: Detect technical debt, circular deps, and dead code.
|
|
206
|
+
---
|
|
94
207
|
|
|
95
|
-
|
|
208
|
+
## CLI Reference
|
|
96
209
|
|
|
97
|
-
|
|
98
|
-
// 1. RECON: The agent reads the Skill definition
|
|
99
|
-
view_file({ path: '.agent/skills/onboard/SKILL.md' });
|
|
210
|
+
For direct terminal use without an agent:
|
|
100
211
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
212
|
+
```bash
|
|
213
|
+
# Initialize the intelligence index
|
|
214
|
+
npx @precisionutilityguild/liquid-shadow index /path/to/repo
|
|
215
|
+
|
|
216
|
+
# Real-time dashboard
|
|
217
|
+
npx @precisionutilityguild/liquid-shadow dashboard
|
|
218
|
+
|
|
219
|
+
# Quick status
|
|
220
|
+
npx @precisionutilityguild/liquid-shadow status /path/to/repo
|
|
221
|
+
|
|
222
|
+
# Symbol inspection
|
|
223
|
+
npx @precisionutilityguild/liquid-shadow inspect symbol /path/to/repo MyClass
|
|
224
|
+
|
|
225
|
+
# Mission management
|
|
226
|
+
npx @precisionutilityguild/liquid-shadow mission plan /path/to/repo "Migrate Auth" "Replace JWT with OAuth2"
|
|
227
|
+
npx @precisionutilityguild/liquid-shadow mission briefing /path/to/repo
|
|
228
|
+
npx @precisionutilityguild/liquid-shadow mission synthesize /path/to/repo <mission-id>
|
|
229
|
+
|
|
230
|
+
# Semantic search
|
|
231
|
+
npx @precisionutilityguild/liquid-shadow search-concept "authentication middleware"
|
|
232
|
+
|
|
233
|
+
# Deploy/update skills to all detected agents
|
|
234
|
+
npx @precisionutilityguild/liquid-shadow skills update
|
|
235
|
+
|
|
236
|
+
# Git hooks (auto-reindex on commit + branch switch)
|
|
237
|
+
npx @precisionutilityguild/liquid-shadow hooks install
|
|
105
238
|
```
|
|
106
239
|
|
|
107
240
|
---
|
|
108
241
|
|
|
109
|
-
##
|
|
242
|
+
## Supported Languages
|
|
110
243
|
|
|
111
|
-
|
|
244
|
+
| Language | Parser | Status |
|
|
245
|
+
|:---------|:-------|:-------|
|
|
246
|
+
| TypeScript | SWC | ✅ Full |
|
|
247
|
+
| JavaScript | SWC | ✅ Full |
|
|
248
|
+
| Python | Tree-sitter | ✅ Full |
|
|
249
|
+
| PHP | Tree-sitter | ✅ Full |
|
|
250
|
+
| Go | Tree-sitter | ✅ Full |
|
|
112
251
|
|
|
113
|
-
|
|
114
|
-
|
|
252
|
+
More languages are added via Tree-sitter grammars. The parser is auto-selected from file extension.
|
|
253
|
+
|
|
254
|
+
---
|
|
255
|
+
|
|
256
|
+
## Architecture at a Glance
|
|
257
|
+
|
|
258
|
+
```
|
|
259
|
+
Your Agent (Claude / Cursor / Gemini / etc.)
|
|
260
|
+
│
|
|
261
|
+
│ MCP stdio transport
|
|
262
|
+
▼
|
|
263
|
+
┌─────────────────────────────────────────┐
|
|
264
|
+
│ Liquid Shadow MCP Server │
|
|
265
|
+
│ 52 atomic tools across 8 suites │
|
|
266
|
+
│ │
|
|
267
|
+
│ ┌──────────┐ ┌──────────────────────┐ │
|
|
268
|
+
│ │ Recon │ │ Intelligence Engine │ │
|
|
269
|
+
│ │ Layer │ │ (Impact/Flow/Mesh) │ │
|
|
270
|
+
│ └────┬─────┘ └──────────┬───────────┘ │
|
|
271
|
+
│ │ │ │
|
|
272
|
+
│ ┌────▼───────────────────▼───────────┐ │
|
|
273
|
+
│ │ SQLite FTS5 + Vector Index │ │
|
|
274
|
+
│ │ (Symbols · Deps · Embeddings) │ │
|
|
275
|
+
│ └────────────────────────────────────┘ │
|
|
276
|
+
│ │
|
|
277
|
+
│ ┌──────────────┐ ┌────────────────┐ │
|
|
278
|
+
│ │ Mission Store│ │ Ember Daemon │ │
|
|
279
|
+
│ │ (Git Notes) │ │ (bg embeddings)│ │
|
|
280
|
+
│ └──────────────┘ └────────────────┘ │
|
|
281
|
+
└─────────────────────────────────────────┘
|
|
282
|
+
│
|
|
283
|
+
▼
|
|
284
|
+
Your Repository (read-only — never modifies source)
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Liquid Shadow is **fully read-only** on your source code. It maintains its own SQLite index alongside your repository.
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## Multi-Agent & Parallel Safety
|
|
292
|
+
|
|
293
|
+
Running multiple agents on the same codebase simultaneously? Liquid Shadow handles it:
|
|
294
|
+
|
|
295
|
+
- **`shadow_ops_claim`** — agent claims a file before editing
|
|
296
|
+
- **`shadow_ops_release`** — releases the claim after
|
|
297
|
+
- **`shadow_working_set_check`** — query active claims before spawning parallel workers
|
|
298
|
+
- **`shadow_ops_dispatch_plan`** — assign sub-missions to specialized agent roles
|
|
299
|
+
- **`shadow_ops_tribunal_submit/status`** — peer-review findings before merging conclusions
|
|
300
|
+
|
|
301
|
+
Claim entries are TTL-based and auto-expire, so a crashed agent never permanently blocks a file.
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Frequently Asked Questions
|
|
306
|
+
|
|
307
|
+
**Does Liquid Shadow modify my source code?**
|
|
308
|
+
Never. It is strictly read-only on your codebase. The only files it writes are its own SQLite index and Git Notes for mission logs.
|
|
309
|
+
|
|
310
|
+
**How do I keep the index fresh?**
|
|
311
|
+
You don't have to. Every tool automatically runs a JIT (Just-In-Time) git-tree differential check before executing. If you've modified files since the last index, it incrementally syncs only the changed files in milliseconds before answering your query. (You can also install Git hooks via `shadow_env_hooks` for background syncing).
|
|
312
|
+
|
|
313
|
+
**What if I rename files or move symbols?**
|
|
314
|
+
Run `shadow_sync_repair`. Nano-Repair re-links anchors and heals broken intent references without a full re-index.
|
|
315
|
+
|
|
316
|
+
**Can I use this as a library (not MCP)?**
|
|
317
|
+
Yes. The programmatic API (`query.ts`) exposes `searchSymbol`, `analyzeImpact`, and `getBriefing` as direct TypeScript entry-points.
|
|
318
|
+
|
|
319
|
+
**Does it work offline / on private code?**
|
|
320
|
+
Yes. Everything runs locally. No source code is sent anywhere. Embeddings are generated locally via `@xenova/transformers`.
|
|
321
|
+
|
|
322
|
+
---
|
|
323
|
+
|
|
324
|
+
## Links
|
|
325
|
+
|
|
326
|
+
- **Homepage**: [liquidshadow.pugcorp.online](https://liquidshadow.pugcorp.online/)
|
|
327
|
+
- **npm**: [@precisionutilityguild/liquid-shadow](https://www.npmjs.com/package/@precisionutilityguild/liquid-shadow)
|
|
328
|
+
- **GitHub**: [PrecisionUtilityGuild/liquid-shadow](https://github.com/PrecisionUtilityGuild/liquid-shadow)
|
|
329
|
+
- **Changelog**: [CHANGELOG.md](./CHANGELOG.md)
|
|
115
330
|
|
|
116
331
|
---
|
|
117
332
|
|
|
118
333
|
<p align="center">
|
|
119
|
-
|
|
334
|
+
Built on <b>SQLite FTS5</b> · <b>SWC</b> · <b>Tree-sitter</b> · <b>@xenova/transformers</b><br>
|
|
335
|
+
<i>Precision Utility Guild — making agents smarter, not louder.</i>
|
|
336
|
+
</p>
|
|
@@ -257,6 +257,23 @@ INSERT OR IGNORE INTO ember_state (key, value) VALUES ('started_at', NULL);
|
|
|
257
257
|
INSERT OR IGNORE INTO ember_state (key, value) VALUES ('pid', NULL);
|
|
258
258
|
INSERT OR IGNORE INTO ember_state (key, value) VALUES ('repo_path', NULL);
|
|
259
259
|
|
|
260
|
+
CREATE TABLE IF NOT EXISTS tribunal_state (
|
|
261
|
+
session_id TEXT PRIMARY KEY,
|
|
262
|
+
mission_id INTEGER,
|
|
263
|
+
repo_path TEXT NOT NULL,
|
|
264
|
+
status TEXT DEFAULT 'running',
|
|
265
|
+
phase TEXT DEFAULT 'initializing',
|
|
266
|
+
pid INTEGER,
|
|
267
|
+
artifact_id INTEGER,
|
|
268
|
+
started_at REAL DEFAULT (unixepoch()),
|
|
269
|
+
completed_at REAL,
|
|
270
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE SET NULL,
|
|
271
|
+
FOREIGN KEY(artifact_id) REFERENCES mission_artifacts(id) ON DELETE SET NULL
|
|
272
|
+
);
|
|
273
|
+
|
|
274
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_mission_id ON tribunal_state(mission_id);
|
|
275
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_status ON tribunal_state(status);
|
|
276
|
+
|
|
260
277
|
-- ── Metadata / caches ────────────────────────────────────────
|
|
261
278
|
|
|
262
279
|
CREATE TABLE IF NOT EXISTS index_metadata (
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
-- Tribunal daemon session state for asynchronous mission peer-review runs.
|
|
2
|
+
-- Session UUID is the primary key; pid is advisory-only for debugging.
|
|
3
|
+
|
|
4
|
+
CREATE TABLE IF NOT EXISTS tribunal_state (
|
|
5
|
+
session_id TEXT PRIMARY KEY,
|
|
6
|
+
mission_id INTEGER,
|
|
7
|
+
repo_path TEXT NOT NULL,
|
|
8
|
+
status TEXT DEFAULT 'running',
|
|
9
|
+
phase TEXT DEFAULT 'initializing',
|
|
10
|
+
pid INTEGER,
|
|
11
|
+
artifact_id INTEGER,
|
|
12
|
+
started_at REAL DEFAULT (unixepoch()),
|
|
13
|
+
completed_at REAL,
|
|
14
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE SET NULL,
|
|
15
|
+
FOREIGN KEY(artifact_id) REFERENCES mission_artifacts(id) ON DELETE SET NULL
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_mission_id ON tribunal_state(mission_id);
|
|
19
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_status ON tribunal_state(status);
|
|
20
|
+
|
|
21
|
+
-- DOWN
|
|
22
|
+
DROP INDEX IF EXISTS idx_tribunal_status;
|
|
23
|
+
DROP INDEX IF EXISTS idx_tribunal_mission_id;
|
|
24
|
+
DROP TABLE IF EXISTS tribunal_state;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
PRAGMA foreign_keys = OFF;
|
|
2
|
+
|
|
3
|
+
ALTER TABLE mission_artifacts RENAME TO mission_artifacts_old;
|
|
4
|
+
|
|
5
|
+
CREATE TABLE IF NOT EXISTS mission_artifacts (
|
|
6
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
7
|
+
mission_id INTEGER,
|
|
8
|
+
type TEXT NOT NULL,
|
|
9
|
+
identifier TEXT NOT NULL,
|
|
10
|
+
metadata TEXT,
|
|
11
|
+
embedding TEXT DEFAULT NULL,
|
|
12
|
+
created_at INTEGER DEFAULT (unixepoch()),
|
|
13
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE CASCADE
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
INSERT INTO mission_artifacts (id, mission_id, type, identifier, metadata, embedding, created_at)
|
|
17
|
+
SELECT id, NULLIF(mission_id, 0), type, identifier, metadata, embedding, created_at
|
|
18
|
+
FROM mission_artifacts_old;
|
|
19
|
+
|
|
20
|
+
DROP TABLE mission_artifacts_old;
|
|
21
|
+
|
|
22
|
+
CREATE INDEX IF NOT EXISTS idx_mission_artifacts_mission ON mission_artifacts(mission_id);
|
|
23
|
+
CREATE INDEX IF NOT EXISTS idx_mission_artifacts_embedding ON mission_artifacts(id) WHERE embedding IS NOT NULL;
|
|
24
|
+
|
|
25
|
+
PRAGMA foreign_keys = ON;
|
|
26
|
+
|
|
27
|
+
-- DOWN
|
|
28
|
+
PRAGMA foreign_keys = OFF;
|
|
29
|
+
|
|
30
|
+
ALTER TABLE mission_artifacts RENAME TO mission_artifacts_new;
|
|
31
|
+
|
|
32
|
+
CREATE TABLE IF NOT EXISTS mission_artifacts (
|
|
33
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
34
|
+
mission_id INTEGER NOT NULL,
|
|
35
|
+
type TEXT NOT NULL,
|
|
36
|
+
identifier TEXT NOT NULL,
|
|
37
|
+
metadata TEXT,
|
|
38
|
+
embedding TEXT DEFAULT NULL,
|
|
39
|
+
created_at INTEGER DEFAULT (unixepoch()),
|
|
40
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE CASCADE
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
INSERT INTO mission_artifacts (id, mission_id, type, identifier, metadata, embedding, created_at)
|
|
44
|
+
SELECT id, COALESCE(mission_id, 0), type, identifier, metadata, embedding, created_at
|
|
45
|
+
FROM mission_artifacts_new;
|
|
46
|
+
|
|
47
|
+
DROP TABLE mission_artifacts_new;
|
|
48
|
+
|
|
49
|
+
CREATE INDEX IF NOT EXISTS idx_mission_artifacts_mission ON mission_artifacts(mission_id);
|
|
50
|
+
CREATE INDEX IF NOT EXISTS idx_mission_artifacts_embedding ON mission_artifacts(id) WHERE embedding IS NOT NULL;
|
|
51
|
+
|
|
52
|
+
PRAGMA foreign_keys = ON;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
PRAGMA foreign_keys = OFF;
|
|
2
|
+
|
|
3
|
+
ALTER TABLE tribunal_state RENAME TO tribunal_state_old;
|
|
4
|
+
|
|
5
|
+
CREATE TABLE IF NOT EXISTS tribunal_state (
|
|
6
|
+
session_id TEXT PRIMARY KEY,
|
|
7
|
+
mission_id INTEGER,
|
|
8
|
+
repo_path TEXT NOT NULL,
|
|
9
|
+
status TEXT DEFAULT 'running',
|
|
10
|
+
phase TEXT DEFAULT 'initializing',
|
|
11
|
+
pid INTEGER,
|
|
12
|
+
artifact_id INTEGER,
|
|
13
|
+
started_at REAL DEFAULT (unixepoch()),
|
|
14
|
+
completed_at REAL,
|
|
15
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE SET NULL,
|
|
16
|
+
FOREIGN KEY(artifact_id) REFERENCES mission_artifacts(id) ON DELETE SET NULL
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
INSERT INTO tribunal_state (session_id, mission_id, repo_path, status, phase, pid, artifact_id, started_at, completed_at)
|
|
20
|
+
SELECT session_id, mission_id, repo_path, status, phase, pid, artifact_id, started_at, completed_at
|
|
21
|
+
FROM tribunal_state_old;
|
|
22
|
+
|
|
23
|
+
DROP TABLE tribunal_state_old;
|
|
24
|
+
|
|
25
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_mission_id ON tribunal_state(mission_id);
|
|
26
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_status ON tribunal_state(status);
|
|
27
|
+
|
|
28
|
+
PRAGMA foreign_keys = ON;
|
|
29
|
+
|
|
30
|
+
-- DOWN
|
|
31
|
+
PRAGMA foreign_keys = OFF;
|
|
32
|
+
|
|
33
|
+
ALTER TABLE tribunal_state RENAME TO tribunal_state_new;
|
|
34
|
+
|
|
35
|
+
CREATE TABLE IF NOT EXISTS tribunal_state (
|
|
36
|
+
session_id TEXT PRIMARY KEY,
|
|
37
|
+
mission_id INTEGER,
|
|
38
|
+
repo_path TEXT NOT NULL,
|
|
39
|
+
status TEXT DEFAULT 'running',
|
|
40
|
+
phase TEXT DEFAULT 'initializing',
|
|
41
|
+
pid INTEGER,
|
|
42
|
+
artifact_id INTEGER,
|
|
43
|
+
started_at REAL DEFAULT (unixepoch()),
|
|
44
|
+
completed_at REAL,
|
|
45
|
+
FOREIGN KEY(mission_id) REFERENCES missions(id) ON DELETE SET NULL,
|
|
46
|
+
FOREIGN KEY(artifact_id) REFERENCES mission_artifacts_old(id) ON DELETE SET NULL
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
INSERT INTO tribunal_state (session_id, mission_id, repo_path, status, phase, pid, artifact_id, started_at, completed_at)
|
|
50
|
+
SELECT session_id, mission_id, repo_path, status, phase, pid, artifact_id, started_at, completed_at
|
|
51
|
+
FROM tribunal_state_new;
|
|
52
|
+
|
|
53
|
+
DROP TABLE tribunal_state_new;
|
|
54
|
+
|
|
55
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_mission_id ON tribunal_state(mission_id);
|
|
56
|
+
CREATE INDEX IF NOT EXISTS idx_tribunal_status ON tribunal_state(status);
|
|
57
|
+
|
|
58
|
+
PRAGMA foreign_keys = ON;
|