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.
Files changed (226) hide show
  1. package/README.md +13 -18
  2. package/dist/agent/orchestrator.d.ts +56 -0
  3. package/dist/agent/orchestrator.js +167 -22
  4. package/dist/agent/orchestrator.js.map +1 -1
  5. package/dist/agent/prompts/system.md +51 -63
  6. package/dist/agent/skill-loader.js +8 -0
  7. package/dist/agent/skill-loader.js.map +1 -1
  8. package/dist/agent/skills/entity-schema.md +4 -19
  9. package/dist/agent/skills/gather-context.md +1 -1
  10. package/dist/agent/tools/graph-tools.d.ts +41 -1
  11. package/dist/agent/tools/graph-tools.js +133 -57
  12. package/dist/agent/tools/graph-tools.js.map +1 -1
  13. package/dist/agent/tools/ops-tools.js +82 -0
  14. package/dist/agent/tools/ops-tools.js.map +1 -1
  15. package/dist/agent/tools/permission-tools.d.ts +90 -0
  16. package/dist/agent/tools/permission-tools.js +207 -0
  17. package/dist/agent/tools/permission-tools.js.map +1 -0
  18. package/dist/agent/tools/sync-tools.js +2 -2
  19. package/dist/agent/tools/sync-tools.js.map +1 -1
  20. package/dist/auth/github.d.ts +1 -1
  21. package/dist/auth/github.js +21 -13
  22. package/dist/auth/github.js.map +1 -1
  23. package/dist/cli/commands/access.d.ts +11 -0
  24. package/dist/cli/commands/access.js +156 -0
  25. package/dist/cli/commands/access.js.map +1 -0
  26. package/dist/cli/commands/app.js +25 -2
  27. package/dist/cli/commands/app.js.map +1 -1
  28. package/dist/cli/commands/clear.d.ts +5 -0
  29. package/dist/cli/commands/clear.js +36 -0
  30. package/dist/cli/commands/clear.js.map +1 -0
  31. package/dist/cli/commands/clone.js +3 -3
  32. package/dist/cli/commands/clone.js.map +1 -1
  33. package/dist/cli/commands/collection.d.ts +10 -0
  34. package/dist/cli/commands/collection.js +187 -0
  35. package/dist/cli/commands/collection.js.map +1 -0
  36. package/dist/cli/commands/commit.js +2 -1
  37. package/dist/cli/commands/commit.js.map +1 -1
  38. package/dist/cli/commands/config.d.ts +100 -0
  39. package/dist/cli/commands/config.js +1 -1
  40. package/dist/cli/commands/config.js.map +1 -1
  41. package/dist/cli/commands/deploy.js +10 -1
  42. package/dist/cli/commands/deploy.js.map +1 -1
  43. package/dist/cli/commands/index.js +1 -1
  44. package/dist/cli/commands/index.js.map +1 -1
  45. package/dist/cli/commands/init.js +32 -40
  46. package/dist/cli/commands/init.js.map +1 -1
  47. package/dist/cli/commands/join.d.ts +0 -6
  48. package/dist/cli/commands/join.js +26 -111
  49. package/dist/cli/commands/join.js.map +1 -1
  50. package/dist/cli/commands/lint.js +1 -2
  51. package/dist/cli/commands/lint.js.map +1 -1
  52. package/dist/cli/commands/mcp.js +6 -5
  53. package/dist/cli/commands/mcp.js.map +1 -1
  54. package/dist/cli/commands/org.d.ts +10 -0
  55. package/dist/cli/commands/org.js +132 -0
  56. package/dist/cli/commands/org.js.map +1 -0
  57. package/dist/cli/commands/orphans.js +1 -2
  58. package/dist/cli/commands/orphans.js.map +1 -1
  59. package/dist/cli/commands/provision.js +3 -3
  60. package/dist/cli/commands/provision.js.map +1 -1
  61. package/dist/cli/commands/resolve.d.ts +8 -0
  62. package/dist/cli/commands/resolve.js +85 -0
  63. package/dist/cli/commands/resolve.js.map +1 -0
  64. package/dist/cli/commands/serve.js +55 -25
  65. package/dist/cli/commands/serve.js.map +1 -1
  66. package/dist/cli/commands/start.js +22 -205
  67. package/dist/cli/commands/start.js.map +1 -1
  68. package/dist/cli/commands/sync.js +53 -8
  69. package/dist/cli/commands/sync.js.map +1 -1
  70. package/dist/cli/commands/team.d.ts +12 -0
  71. package/dist/cli/commands/team.js +185 -0
  72. package/dist/cli/commands/team.js.map +1 -0
  73. package/dist/cli/index.js +41 -34
  74. package/dist/cli/index.js.map +1 -1
  75. package/dist/cli/scaffolding.d.ts +5 -3
  76. package/dist/cli/scaffolding.js +191 -97
  77. package/dist/cli/scaffolding.js.map +1 -1
  78. package/dist/cli/setup-wizard.js +20 -10
  79. package/dist/cli/setup-wizard.js.map +1 -1
  80. package/dist/cli/sync-review-interactive.js +1 -1
  81. package/dist/cli/sync-review-interactive.js.map +1 -1
  82. package/dist/core/graph.d.ts +5 -10
  83. package/dist/core/graph.js +84 -85
  84. package/dist/core/graph.js.map +1 -1
  85. package/dist/core/migration-runner.d.ts +42 -0
  86. package/dist/core/migration-runner.js +232 -0
  87. package/dist/core/migration-runner.js.map +1 -0
  88. package/dist/core/migration-types.d.ts +101 -0
  89. package/dist/core/migration-types.js +21 -0
  90. package/dist/core/migration-types.js.map +1 -0
  91. package/dist/core/migrations/20260219-formalize-memory-location.d.ts +2 -0
  92. package/dist/core/migrations/20260219-formalize-memory-location.js +35 -0
  93. package/dist/core/migrations/20260219-formalize-memory-location.js.map +1 -0
  94. package/dist/core/migrations/20260220-add-workspace-metadata.d.ts +12 -0
  95. package/dist/core/migrations/20260220-add-workspace-metadata.js +65 -0
  96. package/dist/core/migrations/20260220-add-workspace-metadata.js.map +1 -0
  97. package/dist/core/migrations/20260220-add-workspace-readme.d.ts +11 -0
  98. package/dist/core/migrations/20260220-add-workspace-readme.js +82 -0
  99. package/dist/core/migrations/20260220-add-workspace-readme.js.map +1 -0
  100. package/dist/core/migrations/20260220-migrate-yaml-to-json.d.ts +9 -0
  101. package/dist/core/migrations/20260220-migrate-yaml-to-json.js +64 -0
  102. package/dist/core/migrations/20260220-migrate-yaml-to-json.js.map +1 -0
  103. package/dist/core/migrations/index.d.ts +11 -0
  104. package/dist/core/migrations/index.js +23 -0
  105. package/dist/core/migrations/index.js.map +1 -0
  106. package/dist/core/types.d.ts +19 -34
  107. package/dist/core/types.js +3 -21
  108. package/dist/core/types.js.map +1 -1
  109. package/dist/core/user-config.d.ts +27 -0
  110. package/dist/core/user-config.js +51 -0
  111. package/dist/core/user-config.js.map +1 -1
  112. package/dist/core/validation.d.ts +978 -2182
  113. package/dist/core/validation.js +242 -397
  114. package/dist/core/validation.js.map +1 -1
  115. package/dist/core/workspace-manager.d.ts +32 -31
  116. package/dist/core/workspace-manager.js +171 -186
  117. package/dist/core/workspace-manager.js.map +1 -1
  118. package/dist/core/workspace.d.ts +0 -5
  119. package/dist/core/workspace.js +33 -101
  120. package/dist/core/workspace.js.map +1 -1
  121. package/dist/lib/lib/utils.d.ts +2 -0
  122. package/dist/lib/lib/utils.js +6 -0
  123. package/dist/lib/lib/utils.js.map +1 -0
  124. package/dist/mcp/tools.js +13 -13
  125. package/dist/mcp/tools.js.map +1 -1
  126. package/dist/server/chrome/chrome.css +562 -0
  127. package/dist/server/chrome/chrome.js +540 -0
  128. package/dist/server/index.js +163 -10
  129. package/dist/server/index.js.map +1 -1
  130. package/dist/server/plugin-loader.d.ts +7 -0
  131. package/dist/server/plugin-loader.js +9 -1
  132. package/dist/server/plugin-loader.js.map +1 -1
  133. package/dist/server/routes/chat.d.ts +3 -2
  134. package/dist/server/routes/chat.js +67 -16
  135. package/dist/server/routes/chat.js.map +1 -1
  136. package/dist/server/routes/git-api.d.ts +9 -0
  137. package/dist/server/routes/git-api.js +82 -0
  138. package/dist/server/routes/git-api.js.map +1 -0
  139. package/dist/server/routes/graph-api.d.ts +2 -2
  140. package/dist/server/routes/graph-api.js +267 -3
  141. package/dist/server/routes/graph-api.js.map +1 -1
  142. package/dist/server/routes/permissions-api.d.ts +9 -0
  143. package/dist/server/routes/permissions-api.js +176 -0
  144. package/dist/server/routes/permissions-api.js.map +1 -0
  145. package/dist/server/routes/workspace-api.d.ts +9 -0
  146. package/dist/server/routes/workspace-api.js +283 -0
  147. package/dist/server/routes/workspace-api.js.map +1 -0
  148. package/dist/services/assets/base.d.ts +2 -2
  149. package/dist/services/assets/base.js +4 -4
  150. package/dist/services/assets/base.js.map +1 -1
  151. package/dist/services/assets/index.d.ts +6 -6
  152. package/dist/services/assets/index.js +12 -12
  153. package/dist/services/assets/index.js.map +1 -1
  154. package/dist/services/git.d.ts +35 -0
  155. package/dist/services/git.js +93 -0
  156. package/dist/services/git.js.map +1 -1
  157. package/dist/services/github-provisioner.js +1 -2
  158. package/dist/services/github-provisioner.js.map +1 -1
  159. package/dist/services/github-service.d.ts +99 -0
  160. package/dist/services/github-service.js +310 -0
  161. package/dist/services/github-service.js.map +1 -0
  162. package/dist/services/markdown.js +4 -9
  163. package/dist/services/markdown.js.map +1 -1
  164. package/dist/services/memory-service.d.ts +4 -0
  165. package/dist/services/memory-service.js +13 -1
  166. package/dist/services/memory-service.js.map +1 -1
  167. package/dist/services/sync/commit.d.ts +2 -0
  168. package/dist/services/sync/commit.js +21 -6
  169. package/dist/services/sync/commit.js.map +1 -1
  170. package/dist/services/sync/graphrag-indexer.js +2 -2
  171. package/dist/services/sync/graphrag-indexer.js.map +1 -1
  172. package/dist/utils/git.d.ts +5 -0
  173. package/dist/utils/git.js +10 -0
  174. package/dist/utils/git.js.map +1 -1
  175. package/dist/utils/merge-resolver.d.ts +33 -8
  176. package/dist/utils/merge-resolver.js +157 -55
  177. package/dist/utils/merge-resolver.js.map +1 -1
  178. package/dist/utils/preflight.d.ts +1 -1
  179. package/dist/utils/preflight.js +1 -1
  180. package/dist/web/_app/env.js +1 -0
  181. package/dist/web/_app/immutable/assets/0.CDbX4Cwz.css +1 -0
  182. package/dist/web/_app/immutable/assets/2.DRHi7ABa.css +1 -0
  183. package/dist/web/_app/immutable/assets/3.BJy7pVXi.css +1 -0
  184. package/dist/web/_app/immutable/assets/4.Ad16uh9o.css +1 -0
  185. package/dist/web/_app/immutable/assets/5.BhKgiXd2.css +1 -0
  186. package/dist/web/_app/immutable/assets/6.CeHKR5ZY.css +1 -0
  187. package/dist/web/_app/immutable/assets/AppShell.CXdE5aqF.css +1 -0
  188. package/dist/web/_app/immutable/assets/ChatPanel.RFD5GGYI.css +1 -0
  189. package/dist/web/_app/immutable/assets/editor.CPAf2SRV.css +1 -0
  190. package/dist/web/_app/immutable/chunks/3_5VIr68.js +1 -0
  191. package/dist/web/_app/immutable/chunks/4QY4j-jX.js +1 -0
  192. package/dist/web/_app/immutable/chunks/B0nldqWF.js +23 -0
  193. package/dist/web/_app/immutable/chunks/BB_5th5W.js +3383 -0
  194. package/dist/web/_app/immutable/chunks/BButMJ6M.js +1 -0
  195. package/dist/web/_app/immutable/chunks/BiubvAUI.js +2 -0
  196. package/dist/web/_app/immutable/chunks/CAXuTUkp.js +1 -0
  197. package/dist/web/_app/immutable/chunks/CUzqHQY_.js +1 -0
  198. package/dist/web/_app/immutable/chunks/CYrVHOHA.js +1 -0
  199. package/dist/web/_app/immutable/chunks/CqkleIqs.js +1 -0
  200. package/dist/web/_app/immutable/chunks/DPmdIe6Y.js +1 -0
  201. package/dist/web/_app/immutable/chunks/Dh_H7Owr.js +18 -0
  202. package/dist/web/_app/immutable/chunks/DnlgZ_Tk.js +5 -0
  203. package/dist/web/_app/immutable/chunks/DsERsGWg.js +64 -0
  204. package/dist/web/_app/immutable/chunks/DtVH--hH.js +6 -0
  205. package/dist/web/_app/immutable/chunks/F20aIBpJ.js +1 -0
  206. package/dist/web/_app/immutable/chunks/PPVm8Dsz.js +1 -0
  207. package/dist/web/_app/immutable/chunks/WSUKABI_.js +1 -0
  208. package/dist/web/_app/immutable/chunks/YFT1281h.js +2 -0
  209. package/dist/web/_app/immutable/chunks/aosHekRC.js +1 -0
  210. package/dist/web/_app/immutable/chunks/fwnBoL5x.js +1 -0
  211. package/dist/web/_app/immutable/chunks/hHxe9oXh.js +1 -0
  212. package/dist/web/_app/immutable/chunks/nZKqDQ0w.js +6 -0
  213. package/dist/web/_app/immutable/entry/app.B6Ngvu5P.js +2 -0
  214. package/dist/web/_app/immutable/entry/start.NykKAKQv.js +1 -0
  215. package/dist/web/_app/immutable/nodes/0.DQ5KdeNU.js +1 -0
  216. package/dist/web/_app/immutable/nodes/1.BR6DZ9ov.js +1 -0
  217. package/dist/web/_app/immutable/nodes/2.COSjVZ_C.js +1 -0
  218. package/dist/web/_app/immutable/nodes/3.B9r1XIlO.js +1 -0
  219. package/dist/web/_app/immutable/nodes/4.p-c6hlFf.js +16 -0
  220. package/dist/web/_app/immutable/nodes/5.CPc-Bqal.js +4 -0
  221. package/dist/web/_app/immutable/nodes/6.jJ67YnBc.js +2 -0
  222. package/dist/web/_app/version.json +1 -0
  223. package/dist/web/index.html +43 -0
  224. package/package.json +21 -3
  225. package/dist/agent/skills/bundled/enrich-entities.md +0 -124
  226. 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-beta.9",
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..."