@precisionutilityguild/liquid-shadow 1.0.4 → 1.0.6

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 (37) hide show
  1. package/README.md +4 -4
  2. package/dist/data/migrations/000_baseline.sql +315 -0
  3. package/dist/data/migrations/010_type_graph_edges.sql +27 -0
  4. package/dist/data/migrations/011_handoff_embeddings.sql +2 -0
  5. package/dist/data/migrations/012_ember_state.sql +18 -0
  6. package/dist/entry/cli/index.js +640 -616
  7. package/dist/entry/ember/index.js +545 -0
  8. package/dist/entry/mcp/server.js +497 -324
  9. package/dist/index.js +493 -322
  10. package/dist/logic/domain/embeddings/worker.js +1 -1
  11. package/dist/logic/parser/index.js +14 -13
  12. package/dist/skills/shadow_audit/SKILL.md +43 -0
  13. package/dist/skills/shadow_chronicle/SKILL.md +40 -0
  14. package/dist/skills/shadow_continue/SKILL.md +63 -0
  15. package/dist/skills/shadow_crystallize/SKILL.md +41 -0
  16. package/dist/skills/shadow_mission/SKILL.md +53 -0
  17. package/dist/skills/shadow_onboard/SKILL.md +39 -0
  18. package/dist/skills/shadow_research/SKILL.md +34 -0
  19. package/dist/skills/shadow_sync/SKILL.md +18 -0
  20. package/dist/skills/shadow_synthesize/SKILL.md +48 -0
  21. package/dist/skills/shadow_trace_impact/SKILL.md +55 -0
  22. package/dist/skills/shadow_understand/SKILL.md +57 -0
  23. package/dist/skills/shadow_workspace/SKILL.md +30 -0
  24. package/dist/web-manifest.json +11 -4
  25. package/package.json +4 -3
  26. package/skills/shadow_audit/SKILL.md +43 -0
  27. package/skills/shadow_chronicle/SKILL.md +40 -0
  28. package/skills/shadow_continue/SKILL.md +63 -0
  29. package/skills/shadow_crystallize/SKILL.md +41 -0
  30. package/skills/shadow_mission/SKILL.md +53 -0
  31. package/skills/shadow_onboard/SKILL.md +39 -0
  32. package/skills/shadow_research/SKILL.md +34 -0
  33. package/skills/shadow_sync/SKILL.md +18 -0
  34. package/skills/shadow_synthesize/SKILL.md +48 -0
  35. package/skills/shadow_trace_impact/SKILL.md +55 -0
  36. package/skills/shadow_understand/SKILL.md +57 -0
  37. package/skills/shadow_workspace/SKILL.md +30 -0
@@ -0,0 +1,48 @@
1
+ ---
2
+ name: synthesize
3
+ description: Distill mission logs into Architectural Decision Records (ADRs) and persist them to the Shadow Engine and Git Notes. Use when completing missions, creating ADRs, synthesizing architectural decisions, or when the user asks about decision records, mission completion, or architectural documentation.
4
+ ---
5
+
6
+ # Architectural Synthesis
7
+
8
+ Distill mission logs into an Architectural Decision Record (ADR) and persist it to the Shadow Engine.
9
+
10
+ > **AUTO-PILOT ACTIVE**: Synthesis is **automatically triggered** when a mission status is set to `completed` via `shadow_ops_track`. The system handles: ADR distillation (recursive for child missions), Git Notes persistence, and **cascade parent completion** (if all siblings are done, the parent auto-completes and synthesizes too).
11
+
12
+ ## Workflow
13
+
14
+ 1. **Complete Mission**: `shadow_ops_track` (missionId, status: "completed", repoPath).
15
+ - The Shadow Engine will automatically:
16
+ - Distill all intent logs (recursive for child missions).
17
+ - Format the ADR using markdown and **Liquid Anchors**.
18
+ - Persist the record to SQLite and **Git Notes**.
19
+ - **Cascade**: If all sibling missions under the same parent are completed, the parent mission auto-completes with its own ADR synthesis.
20
+ 2. **Verify**: Check the synthesized record via `shadow_ops_chronicle` (limit: 5, repoPath).
21
+ 3. **Manual Synthesis**: Use `shadow_ops_synthesize` only to **re-generate** an existing record or for specific partial distillations.
22
+ 4. **Pre-synthesis Compression** (optional): For missions with many raw logs, `shadow_ops_crystallize` (missionId, repoPath) compresses logs into a crystal summary before synthesis for cleaner ADRs.
23
+
24
+ ## Precise Tooling
25
+
26
+ | Action | Atomic Tool | Usage |
27
+ | :-------------------- | :--------------------------------------- | :---------------------------------------------------------------- |
28
+ | **Complete & Seal** | `shadow_ops_track` (status: "completed") | **Primary**. Triggers auto-synthesis + cascade. |
29
+ | **Manual Distill** | `shadow_ops_synthesize` | Re-run synthesis manually (re-gen only). |
30
+ | **Crystallize First** | `shadow_ops_crystallize` | Compress raw logs before synthesis. |
31
+ | **Theme Crystallize** | `shadow_ops_crystallize_theme` | Cross-mission: cluster semantic themes across ALL missions' logs. |
32
+ | **View Chronicle** | `shadow_ops_chronicle` | View the combined narrative feed. |
33
+
34
+ _Note: Synthesis consolidation includes all child missions recursively. Cascade parent completion propagates upward through the entire hierarchy._
35
+
36
+ ## Cascade Parent Completion
37
+
38
+ When the last child mission under a parent is completed:
39
+
40
+ 1. Parent status is set to `completed`
41
+ 2. A system intent log records the cascade event
42
+ 3. Parent ADR is synthesized (recursive child distillation)
43
+ 4. Parent is synced to Git Notes
44
+ 5. If the parent itself has a parent, the cascade continues upward
45
+
46
+ ## Tooling Strategy
47
+
48
+ Synthesis is the final commit of the mission's logic into the repository's permanent history. Avoid manual markdown files for ADRs; trust the **Git Notes** architecture to preserve the "Story of the Code."
@@ -0,0 +1,55 @@
1
+ ---
2
+ name: trace-impact
3
+ description: Map the blast radius of a change by analyzing impact, flow traces, cross-repo dependencies, and boundary maps. Use when analyzing change impact, assessing risk, tracing dependencies, or when the user asks about change impact, blast radius, or dependency analysis.
4
+ ---
5
+
6
+ # Impact Analysis
7
+
8
+ Map the blast radius of a change using the full Shadow analyze toolkit.
9
+
10
+ ## 🚀 Workflow
11
+
12
+ 1. **Session Context**: `shadow_ops_context` (repoPath) — **ONE CALL** for hologram + chronicle + briefing. Check if symbol is in gravity zones.
13
+ 2. **Impact (Blast Radius)**: `shadow_analyze_impact` (symbolName, filePath, depth: 3, repoPath) — ALL affected files.
14
+ 3. **Dependencies**:
15
+ - `shadow_analyze_deps` (filePath, direction: "imported_by", repoPath) — Who imports this?
16
+ - `shadow_analyze_deps` (filePath, direction: "imports", repoPath) — What does it import?
17
+ 4. **Flow Trace**: `shadow_analyze_flow` (symbolName, filePath, repoPath) — Execution path.
18
+ 5. **Health Check**:
19
+ - `shadow_analyze_debt` (mode: "circular-deps", repoPath) — Any import cycles?
20
+ - `shadow_analyze_debt` (mode: "dead-code", limit: 50, repoPath) — Unused exports?
21
+ 6. **Cross-Repo Check** (if multi-repo):
22
+ - `shadow_workspace_fuse` (repoPaths, repoPath).
23
+ - `shadow_search_symbol` (query, limit: 50, repoPath).
24
+ 7. **Boundary Map**: `shadow_recon_topography` (repoPath) — Layer crossing check.
25
+ 8. **Log Risk**: `shadow_ops_log` (missionId, type: "discovery", content, symbolName, repoPath).
26
+
27
+ ## 🛠 Precise Tooling
28
+
29
+ | Impact Layer | Atomic Tool |
30
+ | :------------------- | :------------------------------------------------------------------------- |
31
+ | **Session Start** 🚀 | `shadow_ops_context` (repoPath) — **START HERE** for context |
32
+ | **Hologram** | `shadow_recon_hologram` (repoPath) — if you need standalone |
33
+ | **Blast Radius** | `shadow_analyze_impact` (symbolName, depth: 3) |
34
+ | **Dependents** | `shadow_analyze_deps` (filePath, direction: "imported_by") |
35
+ | **Dependencies** | `shadow_analyze_deps` (filePath, direction: "imports") |
36
+ | **Flow Path** | `shadow_analyze_flow` (symbolName, filePath) |
37
+ | **Circular Deps** | `shadow_analyze_debt` (mode: "circular-deps") |
38
+ | **Dead Code** | `shadow_analyze_debt` (mode: "dead-code", **confidenceThreshold: "high"**) |
39
+ | **File Discovery** | `shadow_search_path` (query, **ranked: true**) — gravity-sorted |
40
+ | **Workspace Fuse** | `shadow_workspace_fuse` (repoPaths, repoPath) |
41
+ | **Topography** | `shadow_recon_topography` |
42
+
43
+ ## 💡 Intelligence Options
44
+
45
+ - **`shadow_search_path` with `ranked: true`**: Find related files sorted by gravity (high-import files first) with layer classification. Helps identify which affected files are architecturally critical.
46
+ - **`shadow_analyze_debt` confidence levels**: Use `confidenceThreshold: "high"` to focus on likely dead code, avoiding noise from test fixtures and migrations.
47
+
48
+ _Note: **Start with `shadow_ops_context`** for instant gravity zones + architectural context. Use depth higher than 3 for impact analysis only if the symbol is a fundamental primitive (e.g., RepositoryFactory)._
49
+
50
+ ## 🛠 Risk Classification
51
+
52
+ - **Critical Risk**: Symbol in gravity zones (top 10) + >20 dependents + crosses layers
53
+ - **High Risk**: >10 dependents OR crosses layers (e.g., Test -> Logic)
54
+ - **Medium Risk**: 5-10 dependents within same layer
55
+ - **Low Risk**: <5 dependents, same layer, no circular deps
@@ -0,0 +1,57 @@
1
+ ---
2
+ name: understand
3
+ description: Find the high-signal path to understanding complex logic through intent retrieval, topological placement, relational analysis, and mechanics inspection. Use when understanding architecture, analyzing complex code, tracing logic flow, or when the user asks about how something works, architectural patterns, or code comprehension.
4
+ ---
5
+
6
+ # Architectural Understanding
7
+
8
+ Find the high-signal path to understanding complex logic.
9
+
10
+ ## Workflow
11
+
12
+ 1. **Session Context (The Fast Lane)**: `shadow_ops_context` (repoPath) — **ONE CALL** returns hologram + chronicle(5) + briefing (relevance-ranked candidates).
13
+ - Skip to step 3 if you have what you need from context alone.
14
+ 2. **Optional Expanded Context** (only if shadow_ops_context wasn't enough):
15
+ - `shadow_recon_topography` (repoPath) — Detailed layer breakdown beyond hologram summary.
16
+ - `shadow_recon_tree` (subPath: "src/services", maxDepth: 2, repoPath) — Visual file hierarchy.
17
+ - `shadow_ops_briefing` (scope: "mission", missionId, altitude: "ground") — Full mission detail with raw logs, working set, collisions.
18
+ 3. **Relational Analysis (The Who)**:
19
+ - `shadow_analyze_impact` (symbolName, filePath, depth: 3, repoPath) — Blast radius.
20
+ - `shadow_analyze_deps` (filePath, direction: "imported_by", repoPath) — Who depends on this?
21
+ - `shadow_search_concept` (query, repoPath) — Semantic search.
22
+ - `shadow_analyze_mesh` (repoPath) — When the system is event-driven: map all HTTP routes, socket events, pubsub topics and their producers/consumers.
23
+ - `shadow_analyze_type_graph` (filePath, repoPath) — When understanding a type system: interface/class inheritance chains.
24
+ 4. **Mechanics (The How)**:
25
+ - **For Logic**: `shadow_analyze_flow` (symbolName, filePath, repoPath) — Trace execution.
26
+ - **For Objects**: `shadow_inspect_file` (filePath, detailLevel: "signatures", repoPath) — All exports.
27
+ - **For Symbol Deep Dive**: `shadow_inspect_symbol` (symbolName, filePath, context: "full", repoPath) — With deps.
28
+ - **For Change History**: `shadow_analyze_explain_diff` (fromCommit, toCommit, repoPath) — Semantic narrative of what changed and why between commits.
29
+ 5. **Synthesis**: `shadow_ops_log` (missionId, type: "discovery", content, symbolName, repoPath).
30
+
31
+ ## Precise Tooling
32
+
33
+ | Discovery Layer | Atomic Tool |
34
+ | :----------------- | :--------------------------------------------------------------------------------------------------- |
35
+ | **Session Start** | `shadow_ops_context` (repoPath) — **START HERE** |
36
+ | **Hologram** | `shadow_recon_hologram` (repoPath) — if you need standalone hologram |
37
+ | **History** | `shadow_ops_chronicle` (limit: 5) — if you need more than 5 from context |
38
+ | **Layers** | `shadow_recon_topography` — detailed breakdown |
39
+ | **Mission Detail** | `shadow_ops_briefing` (altitude: "ground") — full logs + working set |
40
+ | **Blast Radius** | `shadow_analyze_impact` (symbolName, depth: 3) |
41
+ | **Dependents** | `shadow_analyze_deps` (filePath, direction: "imported_by") |
42
+ | **Flow Trace** | `shadow_analyze_flow` (symbolName, filePath) |
43
+ | **Structure** | `shadow_inspect_file` (detailLevel: "signatures") |
44
+ | **Deep Dive** | `shadow_inspect_symbol` (context: "full") |
45
+ | **File Discovery** | `shadow_search_path` (query, **ranked: true**) — gravity-sorted results with layer classification |
46
+ | **Event Mesh** | `shadow_analyze_mesh` (repoPath) — HTTP routes, socket events, pubsub topics + producers/consumers |
47
+ | **Type Graph** | `shadow_analyze_type_graph` (filePath) — interface/class inheritance chains |
48
+ | **Explain Diff** | `shadow_analyze_explain_diff` (fromCommit, toCommit) — semantic narrative of changes between commits |
49
+
50
+ _Note: **ALWAYS start with `shadow_ops_context`** for instant architectural context + history + mission state in ONE call. Use `context: "definition"` for token-efficient single symbol inspection._
51
+
52
+ ## Intelligence Options
53
+
54
+ - **`shadow_search_path` with `ranked: true`**: Results sorted by gravity (high-import files first) with layer classification (Entry/Logic/Data). Use when you need to find the most architecturally important files matching a pattern.
55
+ - **`shadow_search_concept` with `compact: true`**: Omits code snippets for ~60% token savings. Use for broad exploration before deep dives.
56
+ - **Briefing altitude levels**: Use `orbit` for quick status, `atmosphere` for strategy + crystals, `ground` for raw logs + collisions.
57
+ - **`shadow_ops_crystallize`**: If a mission has excessive raw logs, crystallize them first for leaner briefings.
@@ -0,0 +1,30 @@
1
+ ---
2
+ name: workspace
3
+ description: Manage multi-repository workspaces and cross-repo mission links using the Shadow Engine. Use when working with multiple repositories, federated search across repos, linking missions across repos, or when the user asks about workspace management, multi-repo workflows, or cross-repository dependencies.
4
+ ---
5
+
6
+ # Workspace Orchestration
7
+
8
+ Manage multi-repository workspaces and cross-repo mission links using the Shadow Engine.
9
+
10
+ ## 🚀 Workflow
11
+
12
+ 1. **List Workspaces**: `shadow_workspace_list` (repoPath, repoPaths).
13
+ 2. **Federated Search**: `shadow_workspace_fuse` (repoPath, repoPaths).
14
+ 3. **Link Missions**: `shadow_workspace_link` (parentRepoPath, parentMissionId, childRepoPath, childMissionId, relationship, repoPath).
15
+ 4. **Verify Graph**: `shadow_ops_graph` (missionId, depth, repoPath).
16
+
17
+ ## 🛠 Precise Tooling
18
+
19
+ | Action | Atomic Tool | Example |
20
+ | :------------ | :---------------------- | :----------------------------------------------- |
21
+ | **List** | `shadow_workspace_list` | `{ repoPath, repoPaths: [...] }` |
22
+ | **Fuse** | `shadow_workspace_fuse` | `{ repoPath, repoPaths: [...] }` |
23
+ | **Link** | `shadow_workspace_link` | `{ parentMissionId: 1, childMissionId: 2, ... }` |
24
+ | **Visualize** | `shadow_ops_graph` | `{ missionId: 1, depth: 3, repoPath }` |
25
+
26
+ _Note: Use fused search after `shadow_workspace_fuse` to look up concepts across all repositories simultaneously._
27
+
28
+ ## 🛠 Tooling Strategy
29
+
30
+ Use **`shadow_workspace_fuse`** early in multi-repo sessions to unlock "X-Ray" vision across boundaries.