studiograph 1.2.0-beta.9 → 1.2.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/README.md +13 -18
- package/dist/agent/orchestrator.d.ts +56 -0
- package/dist/agent/orchestrator.js +167 -22
- package/dist/agent/orchestrator.js.map +1 -1
- package/dist/agent/prompts/system.md +51 -63
- package/dist/agent/skill-loader.js +8 -0
- package/dist/agent/skill-loader.js.map +1 -1
- package/dist/agent/skills/entity-schema.md +4 -19
- package/dist/agent/skills/gather-context.md +1 -1
- package/dist/agent/tools/graph-tools.d.ts +41 -1
- package/dist/agent/tools/graph-tools.js +133 -57
- package/dist/agent/tools/graph-tools.js.map +1 -1
- package/dist/agent/tools/ops-tools.js +82 -0
- package/dist/agent/tools/ops-tools.js.map +1 -1
- package/dist/agent/tools/permission-tools.d.ts +90 -0
- package/dist/agent/tools/permission-tools.js +207 -0
- package/dist/agent/tools/permission-tools.js.map +1 -0
- package/dist/agent/tools/sync-tools.js +2 -2
- package/dist/agent/tools/sync-tools.js.map +1 -1
- package/dist/auth/github.d.ts +1 -1
- package/dist/auth/github.js +21 -13
- package/dist/auth/github.js.map +1 -1
- package/dist/cli/commands/access.d.ts +11 -0
- package/dist/cli/commands/access.js +156 -0
- package/dist/cli/commands/access.js.map +1 -0
- package/dist/cli/commands/app.js +25 -2
- package/dist/cli/commands/app.js.map +1 -1
- package/dist/cli/commands/clear.d.ts +5 -0
- package/dist/cli/commands/clear.js +36 -0
- package/dist/cli/commands/clear.js.map +1 -0
- package/dist/cli/commands/clone.js +3 -3
- package/dist/cli/commands/clone.js.map +1 -1
- package/dist/cli/commands/collection.d.ts +10 -0
- package/dist/cli/commands/collection.js +187 -0
- package/dist/cli/commands/collection.js.map +1 -0
- package/dist/cli/commands/commit.js +2 -1
- package/dist/cli/commands/commit.js.map +1 -1
- package/dist/cli/commands/config.d.ts +100 -0
- package/dist/cli/commands/config.js +1 -1
- package/dist/cli/commands/config.js.map +1 -1
- package/dist/cli/commands/deploy.js +10 -1
- package/dist/cli/commands/deploy.js.map +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.js +32 -40
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/join.d.ts +0 -6
- package/dist/cli/commands/join.js +26 -111
- package/dist/cli/commands/join.js.map +1 -1
- package/dist/cli/commands/lint.js +1 -2
- package/dist/cli/commands/lint.js.map +1 -1
- package/dist/cli/commands/mcp.js +6 -5
- package/dist/cli/commands/mcp.js.map +1 -1
- package/dist/cli/commands/org.d.ts +10 -0
- package/dist/cli/commands/org.js +132 -0
- package/dist/cli/commands/org.js.map +1 -0
- package/dist/cli/commands/orphans.js +1 -2
- package/dist/cli/commands/orphans.js.map +1 -1
- package/dist/cli/commands/provision.js +3 -3
- package/dist/cli/commands/provision.js.map +1 -1
- package/dist/cli/commands/resolve.d.ts +8 -0
- package/dist/cli/commands/resolve.js +85 -0
- package/dist/cli/commands/resolve.js.map +1 -0
- package/dist/cli/commands/serve.js +55 -25
- package/dist/cli/commands/serve.js.map +1 -1
- package/dist/cli/commands/start.js +22 -205
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/sync.js +53 -8
- package/dist/cli/commands/sync.js.map +1 -1
- package/dist/cli/commands/team.d.ts +12 -0
- package/dist/cli/commands/team.js +185 -0
- package/dist/cli/commands/team.js.map +1 -0
- package/dist/cli/index.js +41 -34
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/scaffolding.d.ts +5 -3
- package/dist/cli/scaffolding.js +191 -97
- package/dist/cli/scaffolding.js.map +1 -1
- package/dist/cli/setup-wizard.js +20 -10
- package/dist/cli/setup-wizard.js.map +1 -1
- package/dist/cli/sync-review-interactive.js +1 -1
- package/dist/cli/sync-review-interactive.js.map +1 -1
- package/dist/core/graph.d.ts +5 -10
- package/dist/core/graph.js +84 -85
- package/dist/core/graph.js.map +1 -1
- package/dist/core/migration-runner.d.ts +42 -0
- package/dist/core/migration-runner.js +232 -0
- package/dist/core/migration-runner.js.map +1 -0
- package/dist/core/migration-types.d.ts +101 -0
- package/dist/core/migration-types.js +21 -0
- package/dist/core/migration-types.js.map +1 -0
- package/dist/core/migrations/20260219-formalize-memory-location.d.ts +2 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js +35 -0
- package/dist/core/migrations/20260219-formalize-memory-location.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.d.ts +12 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js +65 -0
- package/dist/core/migrations/20260220-add-workspace-metadata.js.map +1 -0
- package/dist/core/migrations/20260220-add-workspace-readme.d.ts +11 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js +82 -0
- package/dist/core/migrations/20260220-add-workspace-readme.js.map +1 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.d.ts +9 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js +64 -0
- package/dist/core/migrations/20260220-migrate-yaml-to-json.js.map +1 -0
- package/dist/core/migrations/index.d.ts +11 -0
- package/dist/core/migrations/index.js +23 -0
- package/dist/core/migrations/index.js.map +1 -0
- package/dist/core/types.d.ts +19 -34
- package/dist/core/types.js +3 -21
- package/dist/core/types.js.map +1 -1
- package/dist/core/user-config.d.ts +27 -0
- package/dist/core/user-config.js +51 -0
- package/dist/core/user-config.js.map +1 -1
- package/dist/core/validation.d.ts +978 -2182
- package/dist/core/validation.js +242 -397
- package/dist/core/validation.js.map +1 -1
- package/dist/core/workspace-manager.d.ts +32 -31
- package/dist/core/workspace-manager.js +171 -186
- package/dist/core/workspace-manager.js.map +1 -1
- package/dist/core/workspace.d.ts +0 -5
- package/dist/core/workspace.js +33 -101
- package/dist/core/workspace.js.map +1 -1
- package/dist/lib/lib/utils.d.ts +2 -0
- package/dist/lib/lib/utils.js +6 -0
- package/dist/lib/lib/utils.js.map +1 -0
- package/dist/mcp/tools.js +13 -13
- package/dist/mcp/tools.js.map +1 -1
- package/dist/server/chrome/chrome.css +562 -0
- package/dist/server/chrome/chrome.js +540 -0
- package/dist/server/index.js +163 -10
- package/dist/server/index.js.map +1 -1
- package/dist/server/plugin-loader.d.ts +7 -0
- package/dist/server/plugin-loader.js +9 -1
- package/dist/server/plugin-loader.js.map +1 -1
- package/dist/server/routes/chat.d.ts +3 -2
- package/dist/server/routes/chat.js +67 -16
- package/dist/server/routes/chat.js.map +1 -1
- package/dist/server/routes/git-api.d.ts +9 -0
- package/dist/server/routes/git-api.js +82 -0
- package/dist/server/routes/git-api.js.map +1 -0
- package/dist/server/routes/graph-api.d.ts +2 -2
- package/dist/server/routes/graph-api.js +267 -3
- package/dist/server/routes/graph-api.js.map +1 -1
- package/dist/server/routes/permissions-api.d.ts +9 -0
- package/dist/server/routes/permissions-api.js +176 -0
- package/dist/server/routes/permissions-api.js.map +1 -0
- package/dist/server/routes/workspace-api.d.ts +9 -0
- package/dist/server/routes/workspace-api.js +283 -0
- package/dist/server/routes/workspace-api.js.map +1 -0
- package/dist/services/assets/base.d.ts +2 -2
- package/dist/services/assets/base.js +4 -4
- package/dist/services/assets/base.js.map +1 -1
- package/dist/services/assets/index.d.ts +6 -6
- package/dist/services/assets/index.js +12 -12
- package/dist/services/assets/index.js.map +1 -1
- package/dist/services/git.d.ts +35 -0
- package/dist/services/git.js +93 -0
- package/dist/services/git.js.map +1 -1
- package/dist/services/github-provisioner.js +1 -2
- package/dist/services/github-provisioner.js.map +1 -1
- package/dist/services/github-service.d.ts +99 -0
- package/dist/services/github-service.js +310 -0
- package/dist/services/github-service.js.map +1 -0
- package/dist/services/markdown.js +4 -9
- package/dist/services/markdown.js.map +1 -1
- package/dist/services/memory-service.d.ts +4 -0
- package/dist/services/memory-service.js +13 -1
- package/dist/services/memory-service.js.map +1 -1
- package/dist/services/sync/commit.d.ts +2 -0
- package/dist/services/sync/commit.js +21 -6
- package/dist/services/sync/commit.js.map +1 -1
- package/dist/services/sync/graphrag-indexer.js +2 -2
- package/dist/services/sync/graphrag-indexer.js.map +1 -1
- package/dist/utils/git.d.ts +5 -0
- package/dist/utils/git.js +10 -0
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/merge-resolver.d.ts +33 -8
- package/dist/utils/merge-resolver.js +157 -55
- package/dist/utils/merge-resolver.js.map +1 -1
- package/dist/utils/preflight.d.ts +1 -1
- package/dist/utils/preflight.js +1 -1
- package/dist/web/_app/env.js +1 -0
- package/dist/web/_app/immutable/assets/0.CDbX4Cwz.css +1 -0
- package/dist/web/_app/immutable/assets/2.DRHi7ABa.css +1 -0
- package/dist/web/_app/immutable/assets/3.BJy7pVXi.css +1 -0
- package/dist/web/_app/immutable/assets/4.Ad16uh9o.css +1 -0
- package/dist/web/_app/immutable/assets/5.BhKgiXd2.css +1 -0
- package/dist/web/_app/immutable/assets/6.CeHKR5ZY.css +1 -0
- package/dist/web/_app/immutable/assets/AppShell.CXdE5aqF.css +1 -0
- package/dist/web/_app/immutable/assets/ChatPanel.RFD5GGYI.css +1 -0
- package/dist/web/_app/immutable/assets/editor.CPAf2SRV.css +1 -0
- package/dist/web/_app/immutable/chunks/3_5VIr68.js +1 -0
- package/dist/web/_app/immutable/chunks/4QY4j-jX.js +1 -0
- package/dist/web/_app/immutable/chunks/B0nldqWF.js +23 -0
- package/dist/web/_app/immutable/chunks/BB_5th5W.js +3383 -0
- package/dist/web/_app/immutable/chunks/BButMJ6M.js +1 -0
- package/dist/web/_app/immutable/chunks/BiubvAUI.js +2 -0
- package/dist/web/_app/immutable/chunks/CAXuTUkp.js +1 -0
- package/dist/web/_app/immutable/chunks/CUzqHQY_.js +1 -0
- package/dist/web/_app/immutable/chunks/CYrVHOHA.js +1 -0
- package/dist/web/_app/immutable/chunks/CqkleIqs.js +1 -0
- package/dist/web/_app/immutable/chunks/DPmdIe6Y.js +1 -0
- package/dist/web/_app/immutable/chunks/Dh_H7Owr.js +18 -0
- package/dist/web/_app/immutable/chunks/DnlgZ_Tk.js +5 -0
- package/dist/web/_app/immutable/chunks/DsERsGWg.js +64 -0
- package/dist/web/_app/immutable/chunks/DtVH--hH.js +6 -0
- package/dist/web/_app/immutable/chunks/F20aIBpJ.js +1 -0
- package/dist/web/_app/immutable/chunks/PPVm8Dsz.js +1 -0
- package/dist/web/_app/immutable/chunks/WSUKABI_.js +1 -0
- package/dist/web/_app/immutable/chunks/YFT1281h.js +2 -0
- package/dist/web/_app/immutable/chunks/aosHekRC.js +1 -0
- package/dist/web/_app/immutable/chunks/fwnBoL5x.js +1 -0
- package/dist/web/_app/immutable/chunks/hHxe9oXh.js +1 -0
- package/dist/web/_app/immutable/chunks/nZKqDQ0w.js +6 -0
- package/dist/web/_app/immutable/entry/app.B6Ngvu5P.js +2 -0
- package/dist/web/_app/immutable/entry/start.NykKAKQv.js +1 -0
- package/dist/web/_app/immutable/nodes/0.DQ5KdeNU.js +1 -0
- package/dist/web/_app/immutable/nodes/1.BR6DZ9ov.js +1 -0
- package/dist/web/_app/immutable/nodes/2.COSjVZ_C.js +1 -0
- package/dist/web/_app/immutable/nodes/3.B9r1XIlO.js +1 -0
- package/dist/web/_app/immutable/nodes/4.p-c6hlFf.js +16 -0
- package/dist/web/_app/immutable/nodes/5.CPc-Bqal.js +4 -0
- package/dist/web/_app/immutable/nodes/6.jJ67YnBc.js +2 -0
- package/dist/web/_app/version.json +1 -0
- package/dist/web/index.html +43 -0
- package/package.json +21 -3
- package/dist/agent/skills/bundled/enrich-entities.md +0 -124
- package/dist/agent/skills/bundled/gather-context.md +0 -46
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
7
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
8
|
+
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
9
|
+
<link rel="stylesheet" href="/api/chrome/chrome.css">
|
|
10
|
+
<link href="/_app/immutable/entry/start.NykKAKQv.js" rel="modulepreload">
|
|
11
|
+
<link href="/_app/immutable/chunks/DPmdIe6Y.js" rel="modulepreload">
|
|
12
|
+
<link href="/_app/immutable/chunks/fwnBoL5x.js" rel="modulepreload">
|
|
13
|
+
<link href="/_app/immutable/entry/app.B6Ngvu5P.js" rel="modulepreload">
|
|
14
|
+
<link href="/_app/immutable/chunks/PPVm8Dsz.js" rel="modulepreload">
|
|
15
|
+
<link href="/_app/immutable/chunks/BiubvAUI.js" rel="modulepreload">
|
|
16
|
+
<link href="/_app/immutable/chunks/hHxe9oXh.js" rel="modulepreload">
|
|
17
|
+
<link href="/_app/immutable/chunks/BButMJ6M.js" rel="modulepreload">
|
|
18
|
+
<link href="/_app/immutable/chunks/3_5VIr68.js" rel="modulepreload">
|
|
19
|
+
<link href="/_app/immutable/chunks/F20aIBpJ.js" rel="modulepreload">
|
|
20
|
+
|
|
21
|
+
</head>
|
|
22
|
+
<body data-sveltekit-preload-data="hover" data-sg-workspace="true">
|
|
23
|
+
<div style="display: contents">
|
|
24
|
+
<script>
|
|
25
|
+
{
|
|
26
|
+
__sveltekit_9esqok = {
|
|
27
|
+
base: ""
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const element = document.currentScript.parentElement;
|
|
31
|
+
|
|
32
|
+
Promise.all([
|
|
33
|
+
import("/_app/immutable/entry/start.NykKAKQv.js"),
|
|
34
|
+
import("/_app/immutable/entry/app.B6Ngvu5P.js")
|
|
35
|
+
]).then(([kit, app]) => {
|
|
36
|
+
kit.start(app, element);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
</div>
|
|
41
|
+
<script src="/api/chrome/chrome.js"></script>
|
|
42
|
+
</body>
|
|
43
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiograph",
|
|
3
|
-
"version": "1.2.0
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "Team-based AI agent platform with Git-backed knowledge graphs",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/studiograph/studiograph"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://studiograph.dev",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=20"
|
|
14
|
+
},
|
|
7
15
|
"bin": {
|
|
8
16
|
"studiograph": "dist/cli/index.js"
|
|
9
17
|
},
|
|
@@ -12,11 +20,14 @@
|
|
|
12
20
|
"README.md"
|
|
13
21
|
],
|
|
14
22
|
"scripts": {
|
|
15
|
-
"build": "node --max-old-space-size=8192 node_modules/typescript/bin/tsc && mkdir -p dist/agent/prompts dist/agent/skills && cp src/agent/prompts/*.md dist/agent/prompts/ && cp src/agent/skills/*.md dist/agent/skills/",
|
|
23
|
+
"build": "node --max-old-space-size=8192 node_modules/typescript/bin/tsc && mkdir -p dist/agent/prompts dist/agent/skills dist/server/chrome && cp src/agent/prompts/*.md dist/agent/prompts/ && cp src/agent/skills/*.md dist/agent/skills/ && cp src/server/chrome/* dist/server/chrome/",
|
|
24
|
+
"build:web": "cd web && npm run build",
|
|
25
|
+
"build:all": "npm run build && npm run build:web",
|
|
16
26
|
"dev": "tsc --watch",
|
|
27
|
+
"dev:web": "cd web && npm run dev",
|
|
17
28
|
"test": "vitest",
|
|
18
29
|
"lint": "eslint src --ext .ts",
|
|
19
|
-
"prepublishOnly": "npm run build"
|
|
30
|
+
"prepublishOnly": "npm run build:all"
|
|
20
31
|
},
|
|
21
32
|
"keywords": [
|
|
22
33
|
"ai",
|
|
@@ -34,7 +45,9 @@
|
|
|
34
45
|
"@anthropic-ai/sdk": "^0.78.0",
|
|
35
46
|
"@aws-sdk/client-s3": "^3.500.0",
|
|
36
47
|
"@clack/prompts": "^0.7.0",
|
|
48
|
+
"@fastify/cookie": "^11.0.2",
|
|
37
49
|
"@fastify/cors": "^10.1.0",
|
|
50
|
+
"@fastify/multipart": "^9.4.0",
|
|
38
51
|
"@lancedb/lancedb": "^0.26.2",
|
|
39
52
|
"@mariozechner/pi-agent-core": "^0.54.2",
|
|
40
53
|
"@mariozechner/pi-ai": "^0.54.2",
|
|
@@ -57,11 +70,16 @@
|
|
|
57
70
|
"picocolors": "^1.1.1",
|
|
58
71
|
"zod": "^3.22.4"
|
|
59
72
|
},
|
|
73
|
+
"optionalDependencies": {
|
|
74
|
+
"playwright": "^1.58.2"
|
|
75
|
+
},
|
|
60
76
|
"devDependencies": {
|
|
61
77
|
"@types/node": "^20.11.0",
|
|
62
78
|
"@typescript-eslint/eslint-plugin": "^6.19.0",
|
|
63
79
|
"@typescript-eslint/parser": "^6.19.0",
|
|
80
|
+
"clsx": "^2.1.1",
|
|
64
81
|
"eslint": "^8.56.0",
|
|
82
|
+
"tailwind-merge": "^3.5.0",
|
|
65
83
|
"typescript": "^5.3.3",
|
|
66
84
|
"vitest": "^1.2.0"
|
|
67
85
|
}
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: enrich-entities
|
|
3
|
-
description: Proactively suggest enrichment for incomplete entities using context
|
|
4
|
-
loading: eager
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Entity Enrichment
|
|
8
|
-
|
|
9
|
-
When you discover incomplete entities (missing recommended fields), proactively suggest enrichment using contextual inference.
|
|
10
|
-
|
|
11
|
-
## When to Enrich
|
|
12
|
-
|
|
13
|
-
**Proactive discovery:**
|
|
14
|
-
- User asks to "clean up" or "enrich" entities
|
|
15
|
-
- You call `lint_entities` and find incomplete records
|
|
16
|
-
- You fetch an entity and notice missing recommended fields
|
|
17
|
-
|
|
18
|
-
**During normal work:**
|
|
19
|
-
- User asks about a specific entity and you notice gaps
|
|
20
|
-
- You're creating related entities and spot incomplete references
|
|
21
|
-
|
|
22
|
-
## How to Enrich
|
|
23
|
-
|
|
24
|
-
### 1. Discover gaps
|
|
25
|
-
Use `lint_entities` to find incomplete entities:
|
|
26
|
-
```
|
|
27
|
-
lint_entities({ entityType: "project" })
|
|
28
|
-
→ 12 projects missing client, start_date, or end_date
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
### 2. Gather context for each incomplete entity
|
|
32
|
-
- **Fetch the entity:** `get_entity({ entityId: "..." })`
|
|
33
|
-
- **Find related entities:** `get_backlinks({ entityId: "..." })`
|
|
34
|
-
- **Search for references:** Look in meeting notes, proposals, briefs
|
|
35
|
-
- **Check memory:** Review past conversations about this entity
|
|
36
|
-
|
|
37
|
-
### 3. Infer missing values from context
|
|
38
|
-
|
|
39
|
-
**Missing client:**
|
|
40
|
-
- Search entity markdown body for `[[client-name]]` wikilinks
|
|
41
|
-
- Check backlinks from meetings, proposals, deals
|
|
42
|
-
- Look for client mentions in related artifacts
|
|
43
|
-
|
|
44
|
-
**Missing dates:**
|
|
45
|
-
- Extract from related meetings (kickoff = start_date)
|
|
46
|
-
- Check proposal expected_start or contract signed_date
|
|
47
|
-
- Look for date mentions in project description
|
|
48
|
-
|
|
49
|
-
**Missing relationships:**
|
|
50
|
-
- Scan for wikilinks in markdown body
|
|
51
|
-
- Check what entities reference this one (backlinks)
|
|
52
|
-
- Infer from entity type (artifact → deliverable → project)
|
|
53
|
-
|
|
54
|
-
### 4. Suggest, don't assume
|
|
55
|
-
Always confirm before updating:
|
|
56
|
-
|
|
57
|
-
> "I notice this project is missing a client. I see Meridian Health mentioned in 3 related meetings and the project brief. Should I add `client: [[meridian-rebrand]]`?"
|
|
58
|
-
|
|
59
|
-
Wait for user confirmation, then call `update_entity`.
|
|
60
|
-
|
|
61
|
-
## Example Workflows
|
|
62
|
-
|
|
63
|
-
**Batch enrichment:**
|
|
64
|
-
```
|
|
65
|
-
User: "Help me fill in missing clients for incomplete projects"
|
|
66
|
-
|
|
67
|
-
You:
|
|
68
|
-
1. lint_entities({ entityType: "project" }) → 8 missing client
|
|
69
|
-
2. For each project:
|
|
70
|
-
- get_entity() → read markdown body
|
|
71
|
-
- get_backlinks() → find meetings, proposals
|
|
72
|
-
- Search for client wikilinks
|
|
73
|
-
- Suggest: "Add client: [[acme]]?" → confirm → update
|
|
74
|
-
3. Report: "Enriched 6/8 projects. 2 need manual review (no clear client in context)."
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
**Focused enrichment:**
|
|
78
|
-
```
|
|
79
|
-
User: "Fill in missing deal values"
|
|
80
|
-
|
|
81
|
-
You:
|
|
82
|
-
1. lint_entities({ entityType: "deal" }) → 5 deals missing deal_value
|
|
83
|
-
2. For each deal:
|
|
84
|
-
- get_backlinks() → find related proposal
|
|
85
|
-
- get_entity() on proposal → extract fees
|
|
86
|
-
- Suggest: "This deal's proposal shows $50k. Add deal_value: 50000?" → confirm → update
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
**Inline during work:**
|
|
90
|
-
```
|
|
91
|
-
User: "Show me the Acme project"
|
|
92
|
-
|
|
93
|
-
You:
|
|
94
|
-
1. get_entity({ entityId: "acme-rebrand" })
|
|
95
|
-
2. Notice missing: client, start_date
|
|
96
|
-
3. Get context: search for Acme client entity, check proposal
|
|
97
|
-
4. Suggest inline: "This project is missing a client and start date. I found the Acme client entity and a proposal dated 2026-01-15. Should I add those?"
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
## Guidelines
|
|
101
|
-
|
|
102
|
-
**Do:**
|
|
103
|
-
- Use multiple context sources (backlinks, search, memory, markdown body)
|
|
104
|
-
- Present evidence: "I see X mentioned in 3 meetings"
|
|
105
|
-
- Batch similar fields: "Should I add client and start_date?"
|
|
106
|
-
- Report progress: "Enriched 8/12, 4 need review"
|
|
107
|
-
|
|
108
|
-
**Don't:**
|
|
109
|
-
- Update without confirmation
|
|
110
|
-
- Guess when evidence is weak ("I'm not sure which client this is")
|
|
111
|
-
- Over-enrich — only fill recommended fields that are clearly missing
|
|
112
|
-
- Make up data — if no context exists, say so: "I couldn't find a clear client reference. Would you like to specify it?"
|
|
113
|
-
|
|
114
|
-
## Priority Fields
|
|
115
|
-
|
|
116
|
-
Focus enrichment on high-value semantic fields:
|
|
117
|
-
1. **Relationships** — client, project, deliverable (wikilinks)
|
|
118
|
-
2. **Dates** — start_date, due_date, expected_close
|
|
119
|
-
3. **People** — assignee, decision_makers, attendees
|
|
120
|
-
4. **Values** — deal_value, fees, budget
|
|
121
|
-
|
|
122
|
-
Low-priority (often intentionally omitted):
|
|
123
|
-
- Tags, notes, optional descriptions
|
|
124
|
-
- Status (user may want to set this themselves)
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: gather-context
|
|
3
|
-
description: Gather full context on named entities before taking action
|
|
4
|
-
loading: eager
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
# Context Gathering
|
|
8
|
-
|
|
9
|
-
When a user references a specific named entity in their request, gather full context before proceeding:
|
|
10
|
-
|
|
11
|
-
## When to Gather Context
|
|
12
|
-
|
|
13
|
-
User mentions a specific entity by name:
|
|
14
|
-
- "Help me write a proposal for Acme"
|
|
15
|
-
- "Create a deck for the FII10 project"
|
|
16
|
-
- "What's the status of the Meridian Health deliverables?"
|
|
17
|
-
- "Find all open tasks for the Terra Finance project"
|
|
18
|
-
|
|
19
|
-
## What to Gather
|
|
20
|
-
|
|
21
|
-
1. **Fetch the named entity** — use `get_entity` to load the full record
|
|
22
|
-
2. **Pull related entities** — use `get_backlinks` to find connections:
|
|
23
|
-
- For clients: related projects, deals, contacts, proposals
|
|
24
|
-
- For projects: client, deliverables, artifacts, meetings, decisions, tasks
|
|
25
|
-
- For deals: client, contacts, proposal documents
|
|
26
|
-
3. **Check recent activity** — search for recent meetings, decisions, or tasks related to the entity
|
|
27
|
-
4. **Load memory context** — check if there's relevant session memory about this entity
|
|
28
|
-
|
|
29
|
-
## Example Flow
|
|
30
|
-
|
|
31
|
-
User: "Help me write a proposal for Acme"
|
|
32
|
-
|
|
33
|
-
**Before writing anything:**
|
|
34
|
-
1. `get_entity({ repo: "clients", entityType: "client", entityId: "acme" })`
|
|
35
|
-
2. `get_backlinks({ repo: "clients", entityType: "client", entityId: "acme" })`
|
|
36
|
-
3. `search_entities({ query: "Acme", entityTypes: ["deal", "project", "person", "proposal"] })`
|
|
37
|
-
4. Review memory for past Acme conversations
|
|
38
|
-
|
|
39
|
-
**Then proceed** with full context to draft the proposal.
|
|
40
|
-
|
|
41
|
-
## Important
|
|
42
|
-
|
|
43
|
-
- Don't make assumptions about entity details — fetch them first
|
|
44
|
-
- A few seconds gathering context saves minutes of back-and-forth
|
|
45
|
-
- If the entity doesn't exist, offer to create it before proceeding
|
|
46
|
-
- Present a brief context summary to the user before taking action: "I see Acme is a prospect with two past deals and three contacts on file. Let me draft a proposal..."
|