@precisionutilityguild/liquid-shadow 1.0.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.
- package/LICENSE +184 -0
- package/README.md +194 -0
- package/dist/data/migrations/001_initial_schema.sql +79 -0
- package/dist/data/migrations/002_fts_indexes.sql +94 -0
- package/dist/data/migrations/003_mission_system.sql +86 -0
- package/dist/data/migrations/004_event_mesh.sql +17 -0
- package/dist/data/migrations/005_index_metadata.sql +15 -0
- package/dist/data/migrations/006_search_history.sql +17 -0
- package/dist/data/migrations/007_hologram_snapshot.sql +14 -0
- package/dist/entry/cli/index.js +822 -0
- package/dist/entry/mcp/server.js +894 -0
- package/dist/index.js +453 -0
- package/dist/logic/domain/embeddings/worker.js +1 -0
- package/package.json +100 -0
- package/skills/audit/SKILL.md +29 -0
- package/skills/chronicle/SKILL.md +33 -0
- package/skills/continue/SKILL.md +44 -0
- package/skills/mission/SKILL.md +35 -0
- package/skills/onboard/SKILL.md +27 -0
- package/skills/understand/SKILL.md +35 -0
- package/skills/workspace/SKILL.md +25 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parentPort as i,workerData as y}from"worker_threads";import g from"pino";var p={10:"TRACE",20:"DEBUG",30:"INFO",40:"WARN",50:"ERROR",60:"FATAL"},m=g({level:process.env.LOG_LEVEL||"info",base:{service:"liquid-shadow"},formatters:{level(e,r){return{level:e,severity:p[r]??"INFO"}}},transport:{target:"pino-pretty",options:{colorize:!0,translateTime:"HH:MM:ss",destination:2,levelKey:"severity",messageKey:"message"}}}),a=m;var n=null;async function f(){return n||(n=await import("@xenova/transformers"),n.env.cacheDir=y?.cacheDir||"./.cache",n.env.allowLocalModels=!1),n}var c=null;async function M(){let{pipeline:e}=await f();c=await e("feature-extraction","Xenova/all-MiniLM-L6-v2")}async function h(e){if(e.length===0)return[];try{let r=await c(e,{pooling:"mean",normalize:!0}),[t,s]=r.dims,o=[];for(let l=0;l<t;l++){let d=l*s,u=d+s;o.push(Array.from(r.data.slice(d,u)))}return o}catch(r){a.error({err:r,batchSize:e.length},"Vectorized batch embedding failed, falling back to sequential");let t=[];for(let s of e){if(!s||s.trim().length===0){t.push(null);continue}try{let o=await c(s,{pooling:"mean",normalize:!0});t.push(Array.from(o.data))}catch{t.push(null)}}return t}}async function b(e){if(e.type==="shutdown"&&process.exit(0),e.type==="embed")try{let r=await h(e.texts),t={type:"result",id:e.id,embeddings:r};i?.postMessage(t)}catch(r){let t={type:"error",id:e.id,error:r instanceof Error?r.message:String(r)};i?.postMessage(t)}}async function v(){await M();let e={type:"ready"};i?.postMessage(e),i?.on("message",r=>{b(r).catch(t=>{a.error({error:t},"Worker error")})})}v().catch(e=>{a.error({error:e},"Failed to initialize embedding worker"),process.exit(1)});
|
package/package.json
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@precisionutilityguild/liquid-shadow",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Tactical Repository Intelligence Operative - Liquid Shadow Ecosystem",
|
|
5
|
+
"homepage": "https://liquidshadow.pugcorp.online/",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/PrecisionUtilityGuild/liquid-shadow.git"
|
|
9
|
+
},
|
|
10
|
+
"publishConfig": {
|
|
11
|
+
"access": "public",
|
|
12
|
+
"registry": "https://registry.npmjs.org/"
|
|
13
|
+
},
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"skills"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"bin": {
|
|
21
|
+
"liquid-shadow": "./dist/entry/cli/index.js",
|
|
22
|
+
"liquid-shadow-mcp": "./dist/entry/mcp/server.js"
|
|
23
|
+
},
|
|
24
|
+
"exports": {
|
|
25
|
+
".": "./dist/index.js",
|
|
26
|
+
"./mcp": "./dist/entry/mcp/server.js",
|
|
27
|
+
"./cli": "./dist/entry/cli/index.js"
|
|
28
|
+
},
|
|
29
|
+
"imports": {
|
|
30
|
+
"#src/*.js": [
|
|
31
|
+
"./src/*.ts",
|
|
32
|
+
"./dist/*.js"
|
|
33
|
+
],
|
|
34
|
+
"#src/*": [
|
|
35
|
+
"./src/*",
|
|
36
|
+
"./dist/*"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "node scripts/build.js",
|
|
41
|
+
"dev": "tsx src/entry/cli/index.ts",
|
|
42
|
+
"mcp": "tsx src/entry/mcp/server.ts",
|
|
43
|
+
"start": "node dist/entry/cli/index.js",
|
|
44
|
+
"start-mcp": "node dist/mcp/server.js",
|
|
45
|
+
"lint": "tsc --noEmit",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest",
|
|
48
|
+
"test:ui": "vitest --ui",
|
|
49
|
+
"test:coverage": "vitest run --coverage",
|
|
50
|
+
"format": "prettier --write .",
|
|
51
|
+
"audit": "npm audit",
|
|
52
|
+
"audit:fix": "npm audit fix",
|
|
53
|
+
"benchmark": "tsx src/entry/cli/index.ts benchmark",
|
|
54
|
+
"migrate:strategies": "tsx src/utility/migrate-strategies.ts",
|
|
55
|
+
"prepare": "npm run build",
|
|
56
|
+
"postinstall": "node -e \"console.log('\\nTo enable shell completions:\\n bash: source <(liquid-shadow completion bash)\\n zsh: source <(liquid-shadow completion zsh)\\n')\""
|
|
57
|
+
},
|
|
58
|
+
"keywords": [
|
|
59
|
+
"typescript",
|
|
60
|
+
"cli",
|
|
61
|
+
"repo",
|
|
62
|
+
"summarizer",
|
|
63
|
+
"LLM",
|
|
64
|
+
"AI"
|
|
65
|
+
],
|
|
66
|
+
"author": "Precision Utility Guild",
|
|
67
|
+
"license": "Apache-2.0",
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@clack/prompts": "^0.11.0",
|
|
70
|
+
"@modelcontextprotocol/sdk": "^1.25.2",
|
|
71
|
+
"@swc/core": "^1.15.8",
|
|
72
|
+
"@swc/helpers": "^0.5.18",
|
|
73
|
+
"@types/node": "^25.0.8",
|
|
74
|
+
"@xenova/transformers": "^2.17.2",
|
|
75
|
+
"better-sqlite3": "^12.6.0",
|
|
76
|
+
"clerc": "^1.3.0-beta.1",
|
|
77
|
+
"dotenv": "^17.2.3",
|
|
78
|
+
"fast-glob": "^3.3.3",
|
|
79
|
+
"ignore": "^7.0.5",
|
|
80
|
+
"js-yaml": "^4.1.1",
|
|
81
|
+
"p-limit": "^7.2.0",
|
|
82
|
+
"pino": "^10.1.1",
|
|
83
|
+
"pino-pretty": "^13.1.3",
|
|
84
|
+
"ts-node": "^10.9.2",
|
|
85
|
+
"tsconfig-paths": "^4.2.0",
|
|
86
|
+
"typescript": "^5.9.3",
|
|
87
|
+
"web-tree-sitter": "^0.26.3"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
91
|
+
"@types/js-yaml": "^4.0.9",
|
|
92
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
93
|
+
"@vitest/ui": "^4.0.18",
|
|
94
|
+
"esbuild": "^0.27.2",
|
|
95
|
+
"prettier": "^3.8.1",
|
|
96
|
+
"tsc-alias": "^1.8.16",
|
|
97
|
+
"tsx": "^4.21.0",
|
|
98
|
+
"vitest": "^4.0.18"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Comprehensive health audit using Shadow analyze toolkit.
|
|
2
|
+
|
|
3
|
+
## Workflow
|
|
4
|
+
|
|
5
|
+
1. **Architecture baseline**: `shadow_recon_hologram({ repoPath: "..." })` — Topography + gravity only (lighter). Use `shadow_ops_context` when you want hologram + chronicle + briefing in one call.
|
|
6
|
+
2. **Metrics Check**: `ReadMcpResourceTool(server: "lish", uri: "repo://current/metrics")` — Index health, query performance.
|
|
7
|
+
3. **Dead Code Detection**: `shadow_analyze_debt({ limit: 100, includeTests: false, repoPath: "..." })` — Unused exports.
|
|
8
|
+
4. **Circular Dependencies**: `shadow_analyze_debt({ limit: 20, repoPath: "..." })` — Import cycles (debt tool covers circular-deps).
|
|
9
|
+
5. **Layer Integrity**: `shadow_recon_topography({ repoPath: "..." })` — Check separation of concerns.
|
|
10
|
+
6. **Dependency Graph**: `ReadMcpResourceTool(server: "lish", uri: "repo://current/dependency-graph")` — Full import map.
|
|
11
|
+
7. **Log Findings**: `shadow_ops_log({ missionId: ..., type: "discovery", content: "...", repoPath: "..." })`.
|
|
12
|
+
8. **Create Cleanup Mission** (optional): `shadow_ops_plan({ name: "Codebase Cleanup", goal: "...", repoPath: "..." })`.
|
|
13
|
+
|
|
14
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
15
|
+
|
|
16
|
+
| Audit Target | Tool Call |
|
|
17
|
+
| :---------------- | :-------------------------------------------------------------------------------------------------- |
|
|
18
|
+
| **Architecture** | `shadow_recon_hologram({ repoPath })` — baseline only; `shadow_ops_context` for full session bundle |
|
|
19
|
+
| **Metrics** | `ReadMcpResourceTool(server: "lish", uri: "repo://current/metrics")` |
|
|
20
|
+
| **Dead Code** | `shadow_analyze_debt({ limit: 100, repoPath })` |
|
|
21
|
+
| **Circular Deps** | `shadow_analyze_debt({ limit: 20, repoPath })` |
|
|
22
|
+
| **Layers** | `shadow_recon_topography({ repoPath })` |
|
|
23
|
+
| **Dep Graph** | `ReadMcpResourceTool(server: "lish", uri: "repo://current/dependency-graph")` |
|
|
24
|
+
|
|
25
|
+
## Health Criteria
|
|
26
|
+
|
|
27
|
+
- **Critical Issues**: Circular deps in core logic, >50 dead exports
|
|
28
|
+
- **Warning Signs**: Layer violations (Test → Logic), >20 dead exports
|
|
29
|
+
- **Good Health**: Clean layers, <10 dead exports, no circular deps
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Retrieve narrative archive from Git-native memory.
|
|
2
|
+
|
|
3
|
+
## Workflow
|
|
4
|
+
|
|
5
|
+
1. **Recent History**: `shadow_ops_chronicle({ limit: 10, format: "markdown", repoPath: "..." })` — Last 10 entries.
|
|
6
|
+
2. **Time-Filtered**:
|
|
7
|
+
- `shadow_ops_chronicle({ since: 1769700000, limit: 20, repoPath: "..." })` — Unix timestamp
|
|
8
|
+
- `shadow_ops_chronicle({ until: 1769800000, limit: 20, repoPath: "..." })`
|
|
9
|
+
3. **Structured Data**: `shadow_ops_chronicle({ format: "json", limit: 50, repoPath: "..." })` — For processing.
|
|
10
|
+
4. **Paginated**: `shadow_ops_chronicle({ limit: 10, offset: 10, repoPath: "..." })` — Second page.
|
|
11
|
+
|
|
12
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
13
|
+
|
|
14
|
+
| Chronicle Query | Tool Call |
|
|
15
|
+
| :-------------------- | :------------------------------------------------------------------ |
|
|
16
|
+
| **Recent (Markdown)** | `shadow_ops_chronicle({ limit: 10, format: "markdown", repoPath })` |
|
|
17
|
+
| **Time Range** | `shadow_ops_chronicle({ since: <unix>, until: <unix>, repoPath })` |
|
|
18
|
+
| **JSON Data** | `shadow_ops_chronicle({ format: "json", limit: 50, repoPath })` |
|
|
19
|
+
| **Pagination** | `shadow_ops_chronicle({ limit: 10, offset: 10, repoPath })` |
|
|
20
|
+
|
|
21
|
+
## Output Formats
|
|
22
|
+
|
|
23
|
+
- **`format: "markdown"`** (default): Human-readable narrative feed with missions grouped as Strategic Initiatives and Standalone Episodes
|
|
24
|
+
- **`format: "json"`**: Structured data for programmatic analysis (includes missionId, steps, timestamps, ADRs)
|
|
25
|
+
|
|
26
|
+
## Use Cases
|
|
27
|
+
|
|
28
|
+
- **Onboarding**: Read last 10 entries to catch up
|
|
29
|
+
- **Release Notes**: Get completed missions since last release
|
|
30
|
+
- **ADR Review**: Extract all architectural decisions
|
|
31
|
+
- **Progress Reports**: Show what's been done this week
|
|
32
|
+
|
|
33
|
+
**Note:** Chronicle reads from Git Notes, so it's persistent across branches and clones. **Context vs this tool:** `shadow_ops_context` returns only the last 5 entries; use **this tool** when you need a different limit, time range (`since`/`until`), pagination (`offset`), or `format: "json"`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Get briefing (+ optional trace), pick **one mission** from **next_work_candidates**, then work that mission to completion — all remaining steps in one run. Update and log as you go. No status reports; when you're done with that mission, it's done.
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## 1. Context
|
|
6
|
+
|
|
7
|
+
- **One call**: `shadow_ops_context({ repoPath: "..." })` → hologram + chronicle(5) + briefing (including **next_work_candidates**). Use when you want full session context.
|
|
8
|
+
- **Briefing only**: `shadow_ops_briefing({ scope: "project", includeGroupedByParent: true, repoPath: "..." })` when you already have context and only need next_work_candidates (lighter than calling context again).
|
|
9
|
+
- `shadow_sync_trace({ repoPath: "..." })` only if you care about external changes. Otherwise skip.
|
|
10
|
+
|
|
11
|
+
## 2. Pick one mission
|
|
12
|
+
|
|
13
|
+
- Choose one mission from **next_work_candidates** (no parent-only — they're umbrellas). Prefer in-progress, then planned. That mission is your scope for this run.
|
|
14
|
+
|
|
15
|
+
## 3. Work the whole mission
|
|
16
|
+
|
|
17
|
+
- For that mission, run through **all remaining steps** (not just one):
|
|
18
|
+
- **Surgical Discovery:** `shadow_analyze_flow({ symbolName: "...", filePath: "...", repoPath: "..." })`.
|
|
19
|
+
- **Execute Step**: Set in-progress → implement → `shadow_ops_track({ missionId: ..., stepId: "...", status: "completed", repoPath: "..." })`.
|
|
20
|
+
- **Atomic Logging:** At least once per step. `shadow_ops_log({ missionId: ..., type: "decision", content: "...", symbolName: "...", repoPath: "..." })`.
|
|
21
|
+
- When all steps are done: `shadow_ops_track({ missionId: ..., status: "completed", repoPath: "..." })`.
|
|
22
|
+
- **Final Synthesis**: `shadow_ops_synthesize({ missionId: ..., repoPath: "..." })`.
|
|
23
|
+
|
|
24
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
25
|
+
|
|
26
|
+
| Action | Tool Call Example |
|
|
27
|
+
| :-------------- | :-------------------------------------------------------------------------------- |
|
|
28
|
+
| **Context** | `shadow_ops_context({ repoPath })` — hologram + chronicle + briefing |
|
|
29
|
+
| **Briefing** | `shadow_ops_briefing({ scope: "project", repoPath })` — next_work_candidates only |
|
|
30
|
+
| **Flow Trace** | `shadow_analyze_flow({ symbolName: "handleRequest", repoPath })` |
|
|
31
|
+
| **Step Update** | `shadow_ops_track({ missionId: 4, stepId: "s2", status: "completed", repoPath })` |
|
|
32
|
+
| **Intent Log** | `shadow_ops_log({ missionId: 4, type: "fix", content: "...", repoPath })` |
|
|
33
|
+
| **Seal** | `shadow_ops_synthesize({ missionId: 4, repoPath })` |
|
|
34
|
+
|
|
35
|
+
_Note: Always use `symbolName` in `shadow_ops_log` to create Liquid Anchors._
|
|
36
|
+
|
|
37
|
+
## 4. Don't
|
|
38
|
+
|
|
39
|
+
- Don't do one step and stop — /continue is "finish a mission," not "do one step."
|
|
40
|
+
- Don't long status reports. Don't ask "what should I work on?" unless a real tie. Don't auto-commit.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
**Tools:** shadow*ops_context (or shadow_ops_briefing), shadow_ops_track, shadow_ops_log, shadow_sync_trace. For discovery: shadow_search*_, shadow*recon*_, shadow*analyze*\*. Server: **user-lish**.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Mission Strategy & Setup
|
|
2
|
+
|
|
3
|
+
Define the objective, strategy, and success criteria for a new mission. This workflow is for **Strategic Alignment and Planning**.
|
|
4
|
+
|
|
5
|
+
> **IMPORTANT**: This workflow stops at the "Ready to Execute" state. For implementation and automated execution, use **/continue**.
|
|
6
|
+
|
|
7
|
+
## Workflow
|
|
8
|
+
|
|
9
|
+
1. **Session Context** (one call): `shadow_ops_context({ repoPath })` — Briefing (next_work_candidates) + chronicle(5) + hologram. Or use `shadow_ops_briefing` / `shadow_ops_chronicle` alone if you need only one.
|
|
10
|
+
2. **Topological Recon**: `shadow_recon_topography({ repoPath })` — Align the goal with the target architectural layers (Entry/Logic/Data).
|
|
11
|
+
3. **Strategic Plan**: `shadow_ops_plan({ name: "...", goal: "...", outcomeContract: "...", repoPath })`.
|
|
12
|
+
- **Strategy DAG**: Define logical steps and verification rules.
|
|
13
|
+
- **Initiative vs Mission**: Decide if this is a parent (Initiative) or a leaf (Mission).
|
|
14
|
+
4. **Alignment**: Present the plan to the user. Do not begin execution until the user approves the strategy.
|
|
15
|
+
|
|
16
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
17
|
+
|
|
18
|
+
| Setup Action | Precise Tool Call | Usage |
|
|
19
|
+
| :-------------------- | :---------------------------------------------------- | :------------------------------------------- |
|
|
20
|
+
| **Establish Plan** | `shadow_ops_plan({ repoPath })` | Create the mission and strategy. |
|
|
21
|
+
| **Architectural Map** | `shadow_recon_topography({ repoPath })` | Contextualize the target layers. |
|
|
22
|
+
| **Context** | `shadow_ops_context({ repoPath })` | Briefing + chronicle + hologram in one call. |
|
|
23
|
+
| **Briefing only** | `shadow_ops_briefing({ scope: "project", repoPath })` | When you need only next_work_candidates. |
|
|
24
|
+
| **Graph View** | `shadow_ops_graph({ repoPath })` | Visualize the initiative's hierarchy. |
|
|
25
|
+
|
|
26
|
+
_Note: Pure Missions are about setting the destination and the route. Ensure the `outcomeContract` is binary and verifiable. Use briefing or chronicle **alone** when you already have context and need only one piece (lighter)._
|
|
27
|
+
|
|
28
|
+
## Intent Logging (Strategic Quality)
|
|
29
|
+
|
|
30
|
+
Capture the "Why" and "How" during the planning phase to ensure the final ADR has architectural depth.
|
|
31
|
+
|
|
32
|
+
- **Decision Logs**: Capture why a specific strategy or library was chosen.
|
|
33
|
+
- **Discovery Logs**: Record insights found during initial reconnaissance.
|
|
34
|
+
|
|
35
|
+
**Hand-off**: Once the mission is planned and logged, the setup phase is over. Execute via `/continue`.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Repository Onboarding
|
|
2
|
+
|
|
3
|
+
Initialize and analyze a new repository for deep intelligence.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **Semantic Init**: `shadow_recon_onboard({ repoPath: "..." })` — First run: full baseline index. **Re-run**: skips heavy indexing when already indexed and up-to-date; only refreshes hologram/summary.
|
|
8
|
+
2. **Unified Sync**: `shadow_sync_trace({ repoPath: "..." })` — Indexing + ghost analysis + mission re-hydration.
|
|
9
|
+
3. **Session Context** (one call): `shadow_ops_context({ repoPath: "..." })` — Returns hologram + chronicle (last 5) + briefing (counts, next_work_candidates). No separate holo/chronicle/briefing calls.
|
|
10
|
+
4. **Optional deep dive**: `shadow_recon_topography({ repoPath })`, `shadow_ops_chronicle({ limit: 10, repoPath })` — Only when you need layers or longer history.
|
|
11
|
+
5. **Hooks**: `shadow_env_hooks({ action: "install", repoPath })`.
|
|
12
|
+
6. **Mission**: `shadow_ops_plan({ name: "...", goal: "...", repoPath })`.
|
|
13
|
+
|
|
14
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
15
|
+
|
|
16
|
+
| Action | Tool |
|
|
17
|
+
| :----------- | :-------------------------------------------------------------------------------------- |
|
|
18
|
+
| **Index** | `shadow_recon_onboard({ repoPath })` |
|
|
19
|
+
| **Sync** | `shadow_sync_trace({ repoPath })` |
|
|
20
|
+
| **Context** | `shadow_ops_context({ repoPath })` — hologram + chronicle + briefing in one call |
|
|
21
|
+
| **Metrics** | `fetch_mcp_resource(server: "lish", uri: "repo://current/metrics")` |
|
|
22
|
+
| **Layers** | `shadow_recon_topography({ repoPath })` |
|
|
23
|
+
| **History** | `shadow_ops_chronicle({ limit: 10, repoPath })` |
|
|
24
|
+
| **Briefing** | `shadow_ops_briefing({ scope: "project", repoPath })` — only if you need briefing alone |
|
|
25
|
+
| **Hooks** | `shadow_env_hooks({ action: "install", repoPath })` |
|
|
26
|
+
|
|
27
|
+
_Use absolute paths for `repoPath`. Default flow: onboard → sync_trace → **context** (one shot). Keep separate tools: use hologram/briefing/chronicle alone when you need **one piece** (lighter) or chronicle with **different params** (limit, since/until, offset, format)._
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Architectural Understanding
|
|
2
|
+
|
|
3
|
+
Find the high-signal path to understanding complex logic.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **Session Context** (one call): `shadow_ops_context({ repoPath: "..." })` — Hologram + chronicle (last 5) + briefing. Use when you want "the world" in one shot. For a single piece only: `shadow_recon_hologram` or `shadow_ops_chronicle({ limit: 5 })`.
|
|
8
|
+
2. **Topological Placement (The Where)**:
|
|
9
|
+
- `shadow_recon_topography({ repoPath: "..." })` — Identify Entry/Logic/Data layers.
|
|
10
|
+
- `shadow_recon_tree({ subPath: "src/services", maxDepth: 2, repoPath: "..." })` — Focused tree.
|
|
11
|
+
3. **Relational Analysis (The Who)**:
|
|
12
|
+
- `shadow_analyze_impact({ symbolName: "...", filePath: "...", depth: 3, repoPath: "..." })` — Blast radius.
|
|
13
|
+
- `shadow_analyze_deps({ filePath: "...", direction: "imported_by", repoPath: "..." })` — Who depends on this?
|
|
14
|
+
- `shadow_search_concept({ query: "...", includeTests: false, repoPath: "..." })` — Semantic search.
|
|
15
|
+
4. **Mechanics (The How)**:
|
|
16
|
+
- **For Logic**: `shadow_analyze_flow({ symbolName: "...", filePath: "...", repoPath: "..." })` — Trace execution.
|
|
17
|
+
- **For Objects**: `shadow_inspect_file({ filePath: "...", detailLevel: "signatures", repoPath: "..." })` — All exports.
|
|
18
|
+
- **For Symbol Deep Dive**: `shadow_inspect_symbol({ symbolName: "...", filePath: "...", context: "full", repoPath: "..." })` — With deps.
|
|
19
|
+
5. **Synthesis**: `shadow_ops_log({ missionId: ..., type: "discovery", content: "...", symbolName: "...", repoPath: "..." })`.
|
|
20
|
+
|
|
21
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
22
|
+
|
|
23
|
+
| Discovery Layer | Precise Tool Call |
|
|
24
|
+
| :---------------- | :------------------------------------------------------------------- |
|
|
25
|
+
| **Context** | `shadow_ops_context({ repoPath })` — hologram + chronicle + briefing |
|
|
26
|
+
| **Hologram only** | `shadow_recon_hologram({ repoPath })` |
|
|
27
|
+
| **History only** | `shadow_ops_chronicle({ limit: 5, repoPath })` |
|
|
28
|
+
| **Layers** | `shadow_recon_topography({ repoPath })` |
|
|
29
|
+
| **Blast Radius** | `shadow_analyze_impact({ symbolName: "...", depth: 3, repoPath })` |
|
|
30
|
+
| **Dependents** | `shadow_analyze_deps({ direction: "imported_by", repoPath })` |
|
|
31
|
+
| **Flow Trace** | `shadow_analyze_flow({ symbolName: "...", repoPath })` |
|
|
32
|
+
| **Structure** | `shadow_inspect_file({ detailLevel: "signatures", repoPath })` |
|
|
33
|
+
| **Deep Dive** | `shadow_inspect_symbol({ context: "full", repoPath })` |
|
|
34
|
+
|
|
35
|
+
_Note: Prefer `shadow_ops_context` for session start (one call). Use hologram or chronicle **alone** when you need one piece (lighter) or chronicle with different params (limit, since/until, format). Use `context: "definition"` in inspect for token-efficient symbol inspection._
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Workspace Orchestration
|
|
2
|
+
|
|
3
|
+
Manage multi-repository workspaces and cross-repo mission links using the Shadow Engine.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **List Workspaces**: `shadow_workspace_list({ repoPaths: ["...", "..."], repoPath: "..." })`.
|
|
8
|
+
2. **Federated Search**: `shadow_workspace_fuse({ repoPaths: [...], repoPath: "..." })`.
|
|
9
|
+
3. **Link Missions**: `shadow_workspace_link({ parentRepoPath: "...", parentMissionId: 1, childRepoPath: "...", childMissionId: 2, relationship: "blocks", repoPath: "..." })`.
|
|
10
|
+
4. **Verify Graph**: `shadow_ops_graph({ missionId: 1, depth: 3, repoPath: "..." })`.
|
|
11
|
+
|
|
12
|
+
## Precise Tooling (Lish Shadow MCP)
|
|
13
|
+
|
|
14
|
+
| Action | Precise Tool Call |
|
|
15
|
+
| :------------ | :------------------------------------------------------ |
|
|
16
|
+
| **List** | `shadow_workspace_list({ repoPaths: [...], repoPath })` |
|
|
17
|
+
| **Fuse** | `shadow_workspace_fuse({ repoPaths: [...], repoPath })` |
|
|
18
|
+
| **Link** | `shadow_workspace_link({ parentMissionId: 1, ... })` |
|
|
19
|
+
| **Visualize** | `shadow_ops_graph({ missionId: 1, repoPath })` |
|
|
20
|
+
|
|
21
|
+
_Note: Use `fused-search` after `fuse` to look up concepts across all repositories simultaneously._
|
|
22
|
+
|
|
23
|
+
## Tooling Strategy
|
|
24
|
+
|
|
25
|
+
This skill relies on the **Lish Shadow Engine** (MCP). Use `shadow_workspace_fuse` early in multi-repo sessions to unlock "X-Ray" vision across boundaries.
|