studiograph 1.1.2 → 1.2.0-beta.1

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 (349) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +301 -10
  3. package/dist/agent/orchestrator.d.ts +17 -9
  4. package/dist/agent/orchestrator.js +142 -97
  5. package/dist/agent/orchestrator.js.map +1 -1
  6. package/dist/agent/prompts/system.md +186 -0
  7. package/dist/agent/skill-loader.d.ts +48 -0
  8. package/dist/agent/skill-loader.js +166 -0
  9. package/dist/agent/skill-loader.js.map +1 -0
  10. package/dist/agent/skills/enrich-entities.md +136 -0
  11. package/dist/agent/skills/entity-schema.md +502 -0
  12. package/dist/agent/skills/gather-context.md +46 -0
  13. package/dist/agent/skills/obsidian-source-setup.md +246 -0
  14. package/dist/agent/skills/skill-loader.d.ts +48 -0
  15. package/dist/agent/skills/skill-loader.js +166 -0
  16. package/dist/agent/skills/skill-loader.js.map +1 -0
  17. package/dist/agent/skills/sync-configuration.md +144 -0
  18. package/dist/agent/skills/sync-setup.md +68 -0
  19. package/dist/agent/tools/connector-tools.d.ts +37 -0
  20. package/dist/agent/tools/connector-tools.js +132 -0
  21. package/dist/agent/tools/connector-tools.js.map +1 -0
  22. package/dist/agent/tools/fs-tools.d.ts +39 -0
  23. package/dist/agent/tools/fs-tools.js +106 -0
  24. package/dist/agent/tools/fs-tools.js.map +1 -0
  25. package/dist/agent/tools/graph-tools.d.ts +30 -2
  26. package/dist/agent/tools/graph-tools.js +154 -37
  27. package/dist/agent/tools/graph-tools.js.map +1 -1
  28. package/dist/agent/tools/load-skill.d.ts +42 -0
  29. package/dist/agent/tools/load-skill.js +45 -0
  30. package/dist/agent/tools/load-skill.js.map +1 -0
  31. package/dist/agent/tools/sync-tools.d.ts +25 -0
  32. package/dist/agent/tools/sync-tools.js +691 -0
  33. package/dist/agent/tools/sync-tools.js.map +1 -0
  34. package/dist/agent/tools/tool-loader.d.ts +25 -0
  35. package/dist/agent/tools/tool-loader.js +73 -0
  36. package/dist/agent/tools/tool-loader.js.map +1 -0
  37. package/dist/auth/github.d.ts +11 -8
  38. package/dist/auth/github.js +56 -75
  39. package/dist/auth/github.js.map +1 -1
  40. package/dist/cli/colors.d.ts +54 -0
  41. package/dist/cli/colors.js +133 -0
  42. package/dist/cli/colors.js.map +1 -0
  43. package/dist/cli/commands/app.d.ts +7 -0
  44. package/dist/cli/commands/app.js +167 -0
  45. package/dist/cli/commands/app.js.map +1 -0
  46. package/dist/cli/commands/auth.d.ts +1 -1
  47. package/dist/cli/commands/auth.js +26 -10
  48. package/dist/cli/commands/auth.js.map +1 -1
  49. package/dist/cli/commands/clone.d.ts +9 -0
  50. package/dist/cli/commands/clone.js +167 -0
  51. package/dist/cli/commands/clone.js.map +1 -0
  52. package/dist/cli/commands/commit.d.ts +8 -0
  53. package/dist/cli/commands/commit.js +43 -0
  54. package/dist/cli/commands/commit.js.map +1 -0
  55. package/dist/cli/commands/config.d.ts +13 -0
  56. package/dist/cli/commands/config.js +276 -0
  57. package/dist/cli/commands/config.js.map +1 -0
  58. package/dist/cli/commands/connector.d.ts +33 -0
  59. package/dist/cli/commands/connector.js +178 -0
  60. package/dist/cli/commands/connector.js.map +1 -0
  61. package/dist/cli/commands/deploy.d.ts +11 -0
  62. package/dist/cli/commands/deploy.js +153 -0
  63. package/dist/cli/commands/deploy.js.map +1 -0
  64. package/dist/cli/commands/enrich.d.ts +11 -0
  65. package/dist/cli/commands/enrich.js +135 -0
  66. package/dist/cli/commands/enrich.js.map +1 -0
  67. package/dist/cli/commands/graphrag.d.ts +12 -0
  68. package/dist/cli/commands/graphrag.js +122 -0
  69. package/dist/cli/commands/graphrag.js.map +1 -0
  70. package/dist/cli/commands/index.d.ts +15 -0
  71. package/dist/cli/commands/index.js +117 -0
  72. package/dist/cli/commands/index.js.map +1 -0
  73. package/dist/cli/commands/init.js +110 -210
  74. package/dist/cli/commands/init.js.map +1 -1
  75. package/dist/cli/commands/join.js +89 -24
  76. package/dist/cli/commands/join.js.map +1 -1
  77. package/dist/cli/commands/lint.d.ts +8 -0
  78. package/dist/cli/commands/lint.js +70 -0
  79. package/dist/cli/commands/lint.js.map +1 -0
  80. package/dist/cli/commands/mcp.d.ts +27 -0
  81. package/dist/cli/commands/mcp.js +56 -0
  82. package/dist/cli/commands/mcp.js.map +1 -0
  83. package/dist/cli/commands/orphans.d.ts +8 -0
  84. package/dist/cli/commands/orphans.js +125 -0
  85. package/dist/cli/commands/orphans.js.map +1 -0
  86. package/dist/cli/commands/provision.d.ts +8 -0
  87. package/dist/cli/commands/provision.js +116 -0
  88. package/dist/cli/commands/provision.js.map +1 -0
  89. package/dist/cli/commands/r2.d.ts +2 -0
  90. package/dist/cli/commands/r2.js +87 -6
  91. package/dist/cli/commands/r2.js.map +1 -1
  92. package/dist/cli/commands/reset.d.ts +12 -0
  93. package/dist/cli/commands/reset.js +137 -0
  94. package/dist/cli/commands/reset.js.map +1 -0
  95. package/dist/cli/commands/review.d.ts +19 -0
  96. package/dist/cli/commands/review.js +128 -0
  97. package/dist/cli/commands/review.js.map +1 -0
  98. package/dist/cli/commands/serve.js +47 -2
  99. package/dist/cli/commands/serve.js.map +1 -1
  100. package/dist/cli/commands/source.d.ts +16 -0
  101. package/dist/cli/commands/source.js +159 -0
  102. package/dist/cli/commands/source.js.map +1 -0
  103. package/dist/cli/commands/start.js +472 -103
  104. package/dist/cli/commands/start.js.map +1 -1
  105. package/dist/cli/commands/sync-entities.d.ts +13 -0
  106. package/dist/cli/commands/sync-entities.js +242 -0
  107. package/dist/cli/commands/sync-entities.js.map +1 -0
  108. package/dist/cli/commands/sync.js +40 -9
  109. package/dist/cli/commands/sync.js.map +1 -1
  110. package/dist/cli/commands/update.d.ts +8 -0
  111. package/dist/cli/commands/update.js +155 -0
  112. package/dist/cli/commands/update.js.map +1 -0
  113. package/dist/cli/index.js +114 -3
  114. package/dist/cli/index.js.map +1 -1
  115. package/dist/cli/scaffolding.d.ts +10 -0
  116. package/dist/cli/scaffolding.js +302 -0
  117. package/dist/cli/scaffolding.js.map +1 -0
  118. package/dist/cli/setup-wizard.d.ts +30 -0
  119. package/dist/cli/setup-wizard.js +244 -0
  120. package/dist/cli/setup-wizard.js.map +1 -0
  121. package/dist/cli/sync-review-interactive.d.ts +31 -0
  122. package/dist/cli/sync-review-interactive.js +393 -0
  123. package/dist/cli/sync-review-interactive.js.map +1 -0
  124. package/dist/cli/theme.d.ts +31 -0
  125. package/dist/cli/theme.js +116 -0
  126. package/dist/cli/theme.js.map +1 -0
  127. package/dist/core/graph.d.ts +16 -9
  128. package/dist/core/graph.js +263 -145
  129. package/dist/core/graph.js.map +1 -1
  130. package/dist/core/migration-runner.d.ts +42 -0
  131. package/dist/core/migration-runner.js +232 -0
  132. package/dist/core/migration-runner.js.map +1 -0
  133. package/dist/core/migration-types.d.ts +101 -0
  134. package/dist/core/migration-types.js +21 -0
  135. package/dist/core/migration-types.js.map +1 -0
  136. package/dist/core/migrations/20260219-formalize-memory-location.d.ts +2 -0
  137. package/dist/core/migrations/20260219-formalize-memory-location.js +35 -0
  138. package/dist/core/migrations/20260219-formalize-memory-location.js.map +1 -0
  139. package/dist/core/migrations/20260220-add-workspace-metadata.d.ts +12 -0
  140. package/dist/core/migrations/20260220-add-workspace-metadata.js +65 -0
  141. package/dist/core/migrations/20260220-add-workspace-metadata.js.map +1 -0
  142. package/dist/core/migrations/20260220-add-workspace-readme.d.ts +11 -0
  143. package/dist/core/migrations/20260220-add-workspace-readme.js +82 -0
  144. package/dist/core/migrations/20260220-add-workspace-readme.js.map +1 -0
  145. package/dist/core/migrations/20260220-migrate-yaml-to-json.d.ts +9 -0
  146. package/dist/core/migrations/20260220-migrate-yaml-to-json.js +64 -0
  147. package/dist/core/migrations/20260220-migrate-yaml-to-json.js.map +1 -0
  148. package/dist/core/migrations/index.d.ts +11 -0
  149. package/dist/core/migrations/index.js +23 -0
  150. package/dist/core/migrations/index.js.map +1 -0
  151. package/dist/core/schema-registry.d.ts +36 -0
  152. package/dist/core/schema-registry.js +161 -0
  153. package/dist/core/schema-registry.js.map +1 -0
  154. package/dist/core/types.d.ts +242 -3
  155. package/dist/core/types.js +21 -2
  156. package/dist/core/types.js.map +1 -1
  157. package/dist/core/user-config.d.ts +16 -0
  158. package/dist/core/user-config.js +8 -0
  159. package/dist/core/user-config.js.map +1 -1
  160. package/dist/core/validation.d.ts +973 -32
  161. package/dist/core/validation.js +163 -4
  162. package/dist/core/validation.js.map +1 -1
  163. package/dist/core/workspace-manager.d.ts +26 -2
  164. package/dist/core/workspace-manager.js +113 -15
  165. package/dist/core/workspace-manager.js.map +1 -1
  166. package/dist/core/workspace.d.ts +20 -11
  167. package/dist/core/workspace.js +123 -34
  168. package/dist/core/workspace.js.map +1 -1
  169. package/dist/mcp/connector-manager.d.ts +65 -0
  170. package/dist/mcp/connector-manager.js +223 -0
  171. package/dist/mcp/connector-manager.js.map +1 -0
  172. package/dist/mcp/connectors/asana.d.ts +2 -0
  173. package/dist/mcp/connectors/asana.js +20 -0
  174. package/dist/mcp/connectors/asana.js.map +1 -0
  175. package/dist/mcp/connectors/definitions.d.ts +45 -0
  176. package/dist/mcp/connectors/definitions.js +32 -0
  177. package/dist/mcp/connectors/definitions.js.map +1 -0
  178. package/dist/mcp/connectors/figma.d.ts +5 -0
  179. package/dist/mcp/connectors/figma.js +21 -0
  180. package/dist/mcp/connectors/figma.js.map +1 -0
  181. package/dist/mcp/connectors/gdrive.d.ts +2 -0
  182. package/dist/mcp/connectors/gdrive.js +20 -0
  183. package/dist/mcp/connectors/gdrive.js.map +1 -0
  184. package/dist/mcp/connectors/granola.d.ts +2 -0
  185. package/dist/mcp/connectors/granola.js +12 -0
  186. package/dist/mcp/connectors/granola.js.map +1 -0
  187. package/dist/mcp/connectors/linear.d.ts +2 -0
  188. package/dist/mcp/connectors/linear.js +19 -0
  189. package/dist/mcp/connectors/linear.js.map +1 -0
  190. package/dist/mcp/connectors/obsidian.d.ts +2 -0
  191. package/dist/mcp/connectors/obsidian.js +19 -0
  192. package/dist/mcp/connectors/obsidian.js.map +1 -0
  193. package/dist/mcp/connectors/pipedrive.d.ts +2 -0
  194. package/dist/mcp/connectors/pipedrive.js +20 -0
  195. package/dist/mcp/connectors/pipedrive.js.map +1 -0
  196. package/dist/mcp/connectors/slack.d.ts +2 -0
  197. package/dist/mcp/connectors/slack.js +21 -0
  198. package/dist/mcp/connectors/slack.js.map +1 -0
  199. package/dist/mcp/oauth-provider.d.ts +41 -0
  200. package/dist/mcp/oauth-provider.js +160 -0
  201. package/dist/mcp/oauth-provider.js.map +1 -0
  202. package/dist/mcp/server.d.ts +11 -0
  203. package/dist/mcp/server.js +28 -0
  204. package/dist/mcp/server.js.map +1 -0
  205. package/dist/mcp/tools.d.ts +14 -0
  206. package/dist/mcp/tools.js +172 -0
  207. package/dist/mcp/tools.js.map +1 -0
  208. package/dist/server/index.js +17 -4
  209. package/dist/server/index.js.map +1 -1
  210. package/dist/server/plugin-loader.d.ts +15 -0
  211. package/dist/server/plugin-loader.js +68 -2
  212. package/dist/server/plugin-loader.js.map +1 -1
  213. package/dist/server/routes/graph-api.js +1 -1
  214. package/dist/server/routes/graph-api.js.map +1 -1
  215. package/dist/server/routes/webhook.js +33 -0
  216. package/dist/server/routes/webhook.js.map +1 -1
  217. package/dist/services/github-provisioner.d.ts +9 -3
  218. package/dist/services/github-provisioner.js +46 -8
  219. package/dist/services/github-provisioner.js.map +1 -1
  220. package/dist/services/lint-service.d.ts +27 -0
  221. package/dist/services/lint-service.js +83 -0
  222. package/dist/services/lint-service.js.map +1 -0
  223. package/dist/services/markdown.d.ts +9 -0
  224. package/dist/services/markdown.js +26 -5
  225. package/dist/services/markdown.js.map +1 -1
  226. package/dist/services/memory-service.d.ts +1 -2
  227. package/dist/services/memory-service.js +5 -4
  228. package/dist/services/memory-service.js.map +1 -1
  229. package/dist/services/orphan-service.d.ts +31 -0
  230. package/dist/services/orphan-service.js +100 -0
  231. package/dist/services/orphan-service.js.map +1 -0
  232. package/dist/services/sync/commit.d.ts +58 -0
  233. package/dist/services/sync/commit.js +350 -0
  234. package/dist/services/sync/commit.js.map +1 -0
  235. package/dist/services/sync/context-index.d.ts +69 -0
  236. package/dist/services/sync/context-index.js +280 -0
  237. package/dist/services/sync/context-index.js.map +1 -0
  238. package/dist/services/sync/derive.d.ts +34 -0
  239. package/dist/services/sync/derive.js +164 -0
  240. package/dist/services/sync/derive.js.map +1 -0
  241. package/dist/services/sync/enrichment-state.d.ts +31 -0
  242. package/dist/services/sync/enrichment-state.js +63 -0
  243. package/dist/services/sync/enrichment-state.js.map +1 -0
  244. package/dist/services/sync/enrichment.d.ts +25 -0
  245. package/dist/services/sync/enrichment.js +121 -0
  246. package/dist/services/sync/enrichment.js.map +1 -0
  247. package/dist/services/sync/frontmatter-extractor.d.ts +40 -0
  248. package/dist/services/sync/frontmatter-extractor.js +273 -0
  249. package/dist/services/sync/frontmatter-extractor.js.map +1 -0
  250. package/dist/services/sync/graph-match-state.d.ts +33 -0
  251. package/dist/services/sync/graph-match-state.js +61 -0
  252. package/dist/services/sync/graph-match-state.js.map +1 -0
  253. package/dist/services/sync/graph-match.d.ts +53 -0
  254. package/dist/services/sync/graph-match.js +316 -0
  255. package/dist/services/sync/graph-match.js.map +1 -0
  256. package/dist/services/sync/graphrag-client.d.ts +43 -0
  257. package/dist/services/sync/graphrag-client.js +94 -0
  258. package/dist/services/sync/graphrag-client.js.map +1 -0
  259. package/dist/services/sync/graphrag-config.d.ts +16 -0
  260. package/dist/services/sync/graphrag-config.js +39 -0
  261. package/dist/services/sync/graphrag-config.js.map +1 -0
  262. package/dist/services/sync/graphrag-context.d.ts +14 -0
  263. package/dist/services/sync/graphrag-context.js +109 -0
  264. package/dist/services/sync/graphrag-context.js.map +1 -0
  265. package/dist/services/sync/graphrag-indexer.d.ts +30 -0
  266. package/dist/services/sync/graphrag-indexer.js +358 -0
  267. package/dist/services/sync/graphrag-indexer.js.map +1 -0
  268. package/dist/services/sync/llm.d.ts +32 -0
  269. package/dist/services/sync/llm.js +115 -0
  270. package/dist/services/sync/llm.js.map +1 -0
  271. package/dist/services/sync/mcp-client.d.ts +59 -0
  272. package/dist/services/sync/mcp-client.js +285 -0
  273. package/dist/services/sync/mcp-client.js.map +1 -0
  274. package/dist/services/sync/model-factory.d.ts +10 -0
  275. package/dist/services/sync/model-factory.js +24 -0
  276. package/dist/services/sync/model-factory.js.map +1 -0
  277. package/dist/services/sync/name-quality.d.ts +31 -0
  278. package/dist/services/sync/name-quality.js +60 -0
  279. package/dist/services/sync/name-quality.js.map +1 -0
  280. package/dist/services/sync/output-schemas.d.ts +92 -0
  281. package/dist/services/sync/output-schemas.js +43 -0
  282. package/dist/services/sync/output-schemas.js.map +1 -0
  283. package/dist/services/sync/prompts.d.ts +19 -0
  284. package/dist/services/sync/prompts.js +128 -0
  285. package/dist/services/sync/prompts.js.map +1 -0
  286. package/dist/services/sync/reconciler.d.ts +48 -0
  287. package/dist/services/sync/reconciler.js +295 -0
  288. package/dist/services/sync/reconciler.js.map +1 -0
  289. package/dist/services/sync/source-config.d.ts +45 -0
  290. package/dist/services/sync/source-config.js +208 -0
  291. package/dist/services/sync/source-config.js.map +1 -0
  292. package/dist/services/sync/source-definitions/asana.d.ts +15 -0
  293. package/dist/services/sync/source-definitions/asana.js +48 -0
  294. package/dist/services/sync/source-definitions/asana.js.map +1 -0
  295. package/dist/services/sync/source-definitions/definitions.d.ts +21 -0
  296. package/dist/services/sync/source-definitions/definitions.js +26 -0
  297. package/dist/services/sync/source-definitions/definitions.js.map +1 -0
  298. package/dist/services/sync/source-definitions/gdrive.d.ts +16 -0
  299. package/dist/services/sync/source-definitions/gdrive.js +68 -0
  300. package/dist/services/sync/source-definitions/gdrive.js.map +1 -0
  301. package/dist/services/sync/source-definitions/granola.d.ts +2 -0
  302. package/dist/services/sync/source-definitions/granola.js +28 -0
  303. package/dist/services/sync/source-definitions/granola.js.map +1 -0
  304. package/dist/services/sync/source-definitions/linear.d.ts +2 -0
  305. package/dist/services/sync/source-definitions/linear.js +60 -0
  306. package/dist/services/sync/source-definitions/linear.js.map +1 -0
  307. package/dist/services/sync/source-definitions/obsidian.d.ts +2 -0
  308. package/dist/services/sync/source-definitions/obsidian.js +55 -0
  309. package/dist/services/sync/source-definitions/obsidian.js.map +1 -0
  310. package/dist/services/sync/source-definitions/pipedrive.d.ts +2 -0
  311. package/dist/services/sync/source-definitions/pipedrive.js +52 -0
  312. package/dist/services/sync/source-definitions/pipedrive.js.map +1 -0
  313. package/dist/services/sync/staging.d.ts +53 -0
  314. package/dist/services/sync/staging.js +131 -0
  315. package/dist/services/sync/staging.js.map +1 -0
  316. package/dist/services/sync/structured-extractor.d.ts +49 -0
  317. package/dist/services/sync/structured-extractor.js +344 -0
  318. package/dist/services/sync/structured-extractor.js.map +1 -0
  319. package/dist/services/sync/sync-runner.d.ts +32 -0
  320. package/dist/services/sync/sync-runner.js +195 -0
  321. package/dist/services/sync/sync-runner.js.map +1 -0
  322. package/dist/services/sync/sync-state.d.ts +43 -0
  323. package/dist/services/sync/sync-state.js +154 -0
  324. package/dist/services/sync/sync-state.js.map +1 -0
  325. package/dist/services/sync/types.d.ts +203 -0
  326. package/dist/services/sync/types.js +8 -0
  327. package/dist/services/sync/types.js.map +1 -0
  328. package/dist/services/sync/unstructured-extractor.d.ts +29 -0
  329. package/dist/services/sync/unstructured-extractor.js +197 -0
  330. package/dist/services/sync/unstructured-extractor.js.map +1 -0
  331. package/dist/services/vector-service.d.ts +88 -0
  332. package/dist/services/vector-service.js +322 -0
  333. package/dist/services/vector-service.js.map +1 -0
  334. package/dist/utils/git.d.ts +26 -4
  335. package/dist/utils/git.js +55 -7
  336. package/dist/utils/git.js.map +1 -1
  337. package/dist/utils/merge-resolver.d.ts +34 -0
  338. package/dist/utils/merge-resolver.js +201 -0
  339. package/dist/utils/merge-resolver.js.map +1 -0
  340. package/dist/utils/preflight.d.ts +2 -1
  341. package/dist/utils/preflight.js +8 -1
  342. package/dist/utils/preflight.js.map +1 -1
  343. package/dist/utils/version-checker.d.ts +23 -0
  344. package/dist/utils/version-checker.js +116 -0
  345. package/dist/utils/version-checker.js.map +1 -0
  346. package/dist/utils/workspace-config.d.ts +8 -0
  347. package/dist/utils/workspace-config.js +22 -0
  348. package/dist/utils/workspace-config.js.map +1 -0
  349. package/package.json +24 -11
@@ -0,0 +1,502 @@
1
+ ---
2
+ name: entity-schema
3
+ description: Complete entity type reference — fields, repo groupings, status enums, file layout, and example frontmatter
4
+ loading: on-demand
5
+ ---
6
+
7
+ # Entity Schema Reference
8
+
9
+ Use this reference when creating, validating, scaffolding, or mapping entities. All entities are Markdown files with YAML frontmatter stored in `{repo}/{entity_id}/main.md` (entity-folder layout).
10
+
11
+ ## Repo Types
12
+
13
+ | Repo Type | Purpose | Typical Entity Types |
14
+ |-----------|---------|---------------------|
15
+ | `project` | One per client/initiative | project, meeting, decision, task, brief, artifact, deliverable |
16
+ | `function` | Business operations | proposal, contract, person, client, financial-plan, deal, vendor, role |
17
+ | `shared-resource` | Team knowledge | template, process, standard, reference, technique, practice-area, case-study |
18
+
19
+ Custom types are also supported via `schema_extensions` in workspace config.
20
+
21
+ ## Base Fields (all entities)
22
+
23
+ Every entity inherits these fields. They are auto-populated by the system on create/update.
24
+
25
+ | Field | Type | Required | Description |
26
+ |-------|------|----------|-------------|
27
+ | `entity_type` | string | Yes | The entity type identifier |
28
+ | `entity_id` | string (kebab-case) | Yes | Unique ID: lowercase, numbers, hyphens, underscores |
29
+ | `created_at` | datetime | Yes | ISO 8601 |
30
+ | `updated_at` | datetime | Yes | ISO 8601 |
31
+ | `created_by` | string | Yes | Username |
32
+ | `updated_by` | string | Yes | Username |
33
+ | `visibility` | enum | No | `public` \| `team` (default) \| `admin` \| `restricted` |
34
+ | `restricted_to` | string[] | No | User IDs (when visibility=restricted) |
35
+ | `sensitive_fields` | string[] | No | Fields containing sensitive data |
36
+ | `tags` | string[] | No | Categorization tags |
37
+
38
+ Schemas use `.passthrough()` — custom fields beyond the schema are preserved.
39
+
40
+ ## Wikilinks
41
+
42
+ Cross-entity references use `[[entity-id]]` wikilink syntax in string or string[] fields. Fields named `related_*`, `contacts`, `team`, `attendees`, `proposals`, `artifacts`, `deliverables` typically hold wikilinks.
43
+
44
+ ---
45
+
46
+ ## Project Repo Entities
47
+
48
+ ### project
49
+
50
+ A client engagement or internal initiative.
51
+
52
+ | Field | Type | Required | Description |
53
+ |-------|------|----------|-------------|
54
+ | `name` | string | Yes | Project name |
55
+ | `client` | string | No | Client name or wikilink |
56
+ | `website_url` | url | No | Project website |
57
+ | `start_date` | string | No | ISO 8601 or human-readable |
58
+ | `end_date` | string | No | Project end date |
59
+ | `target_completion` | string | No | Target completion date |
60
+ | `year_released` | number | No | Year released |
61
+ | `status` | enum | No | `planning` \| `scoping` \| `active` \| `on-hold` \| `completed` \| `archived` |
62
+ | `related_projects` | string[] | No | Related project wikilinks |
63
+ | `related_areas` | string[] | No | Practice area wikilinks |
64
+ | `team` | string[] | No | Team member wikilinks |
65
+ | `deliverables` | string[] | No | Deliverable wikilinks |
66
+ | `deal` | string | No | Originating deal wikilink |
67
+
68
+ ### meeting
69
+
70
+ Meeting notes, decisions, and action items.
71
+
72
+ | Field | Type | Required | Description |
73
+ |-------|------|----------|-------------|
74
+ | `name` | string | Yes | Meeting name/subject |
75
+ | `date` | string | No | Meeting date |
76
+ | `attendees` | string[] | No | Attendee names or wikilinks |
77
+ | `related_projects` | string[] | No | Project wikilinks |
78
+ | `related_organizations` | string[] | No | Organization wikilinks |
79
+ | `related_areas` | string[] | No | Practice area wikilinks |
80
+ | `agenda` | string | No | Agenda (markdown) |
81
+ | `notes` | string | No | Notes (markdown) |
82
+ | `action_items` | string[] | No | Action items |
83
+ | `summary` | string | No | Meeting summary |
84
+
85
+ ### decision
86
+
87
+ Structured decision records (ADR-style). ID format: `DEC-YYYY-NNN`.
88
+
89
+ | Field | Type | Required | Description |
90
+ |-------|------|----------|-------------|
91
+ | `id` | string | Yes | Format: DEC-YYYY-NNN |
92
+ | `title` | string | Yes | Decision title |
93
+ | `date` | string | Yes | Decision date |
94
+ | `status` | enum | No | `proposed` (default) \| `accepted` \| `rejected` \| `deprecated` \| `superseded` |
95
+ | `decision_makers` | string[] | No | Who decided |
96
+ | `stakeholders` | string[] | No | Who's affected |
97
+ | `related_decisions` | string[] | No | Related decision wikilinks |
98
+ | `supersedes` | string | No | Decision this replaces |
99
+ | `superseded_by` | string | No | Decision that replaces this |
100
+ | `context` | string | No | Background |
101
+ | `alternatives` | string | No | Alternatives considered |
102
+ | `decision` | string | No | The actual decision |
103
+ | `rationale` | string | No | Why chosen |
104
+ | `consequences` | string | No | Outcomes and risks |
105
+ | `enables` | string[] | No | Decisions this enables |
106
+
107
+ ### task
108
+
109
+ Lightweight action items and to-dos.
110
+
111
+ | Field | Type | Required | Description |
112
+ |-------|------|----------|-------------|
113
+ | `name` | string | Yes | Task name |
114
+ | `assignee` | string | No | Person wikilink |
115
+ | `due_date` | string | No | Due date |
116
+ | `status` | enum | No | `open` (default) \| `in-progress` \| `done` \| `cancelled` |
117
+ | `priority` | enum | No | `low` \| `medium` \| `high` \| `urgent` |
118
+ | `project` | string | No | Project wikilink |
119
+ | `deliverable` | string | No | Deliverable wikilink |
120
+ | `related_meeting` | string | No | Meeting wikilink |
121
+ | `description` | string | No | Detailed description |
122
+
123
+ ### brief
124
+
125
+ Project briefs and requirements documents.
126
+
127
+ | Field | Type | Required | Description |
128
+ |-------|------|----------|-------------|
129
+ | `project_name` | string | Yes | Project name |
130
+ | `client` | string | No | Client wikilink |
131
+ | `start_date` | string | No | Start date |
132
+ | `target_completion` | string | No | Target completion |
133
+ | `status` | enum | No | `planning` (default) \| `approved` \| `in-progress` \| `completed` |
134
+ | `objectives` | string[] | No | Project objectives |
135
+ | `target_users` | string | No | Target users/audience |
136
+ | `success_criteria` | string[] | No | Success criteria |
137
+ | `constraints` | string | No | Constraints |
138
+ | `stakeholders` | string[] | No | Stakeholder wikilinks |
139
+ | `deliverables` | string[] | No | Expected deliverables |
140
+ | `related_projects` | string[] | No | Related project wikilinks |
141
+
142
+ ### artifact
143
+
144
+ Individual project outputs (files, designs, prototypes).
145
+
146
+ | Field | Type | Required | Description |
147
+ |-------|------|----------|-------------|
148
+ | `name` | string | Yes | Artifact name |
149
+ | `type` | string | No | e.g. presentation, prototype, report, design-file |
150
+ | `project` | string | No | Project wikilink |
151
+ | `deliverable` | string | No | Parent deliverable wikilink |
152
+ | `date_created` | string | No | Creation date |
153
+ | `description` | string | No | Description |
154
+ | `url` | string | No | URL or file path |
155
+ | `version` | string | No | Version number |
156
+
157
+ ### deliverable
158
+
159
+ Scoped, contractual output promised to a client. Higher-level than artifacts: a deliverable (e.g. "Brand Identity System") contains artifacts (logo SVG, style guide PDF).
160
+
161
+ | Field | Type | Required | Description |
162
+ |-------|------|----------|-------------|
163
+ | `name` | string | Yes | Deliverable name |
164
+ | `project` | string | No | Project wikilink |
165
+ | `proposal` | string | No | Originating proposal wikilink |
166
+ | `contract` | string | No | Formalizing contract wikilink |
167
+ | `artifacts` | string[] | No | Component artifact wikilinks |
168
+ | `status` | enum | No | `planned` (default) \| `in-progress` \| `delivered` \| `accepted` \| `rejected` |
169
+ | `due_date` | string | No | Due date |
170
+ | `delivered_date` | string | No | Actual delivery date |
171
+ | `description` | string | No | What this comprises |
172
+
173
+ ---
174
+
175
+ ## Function Repo Entities
176
+
177
+ ### proposal
178
+
179
+ Client proposals and SOWs.
180
+
181
+ | Field | Type | Required | Description |
182
+ |-------|------|----------|-------------|
183
+ | `name` | string | Yes | Proposal name |
184
+ | `client` | string | No | Client wikilink |
185
+ | `project_name` | string | No | Project name |
186
+ | `date` | string | No | Proposal date |
187
+ | `version` | string | No | e.g. v1, v2 |
188
+ | `status` | enum | No | `draft` (default) \| `sent` \| `accepted` \| `rejected` \| `negotiating` |
189
+ | `deliverables` | string[] | No | Proposed deliverables |
190
+ | `phases` | string | No | Project phases (markdown) |
191
+ | `team` | string[] | No | Proposed team members |
192
+ | `schedule` | string | No | Proposed schedule |
193
+ | `fees` | string | No | Fee structure |
194
+ | `payment_terms` | string | No | Payment terms |
195
+
196
+ ### contract
197
+
198
+ SOWs, MSAs, NDAs.
199
+
200
+ | Field | Type | Required | Description |
201
+ |-------|------|----------|-------------|
202
+ | `name` | string | Yes | Contract name |
203
+ | `type` | enum | No | `sow` \| `msa` \| `nda` \| `other` |
204
+ | `client` | string | No | Client wikilink |
205
+ | `project` | string | No | Project wikilink |
206
+ | `date_signed` | string | No | Signature date |
207
+ | `start_date` | string | No | Start date |
208
+ | `end_date` | string | No | End date |
209
+ | `status` | enum | No | `draft` (default) \| `pending` \| `signed` \| `completed` \| `terminated` |
210
+ | `value` | string | No | Contract value |
211
+ | `payment_terms` | string | No | Payment terms |
212
+
213
+ ### person
214
+
215
+ Team members, clients, contacts.
216
+
217
+ | Field | Type | Required | Description |
218
+ |-------|------|----------|-------------|
219
+ | `name` | string | Yes | Full name |
220
+ | `role` | string | No | Role or title |
221
+ | `status` | enum | No | `current` \| `former` \| `contractor` \| `client` \| `partner` |
222
+ | `email` | string | No | Email address |
223
+ | `location` | string | No | Location |
224
+ | `organization` | string | No | Organization wikilink |
225
+ | `years_experience` | number | No | Years of experience |
226
+ | `bio` | string | No | Biography (markdown) |
227
+ | `projects` | string[] | No | Project wikilinks |
228
+ | `reports_to` | string | No | Manager or role wikilink |
229
+ | `department` | string | No | e.g. Creative Technology, Design |
230
+
231
+ ### client
232
+
233
+ Client organizations.
234
+
235
+ | Field | Type | Required | Description |
236
+ |-------|------|----------|-------------|
237
+ | `name` | string | Yes | Client name |
238
+ | `type` | enum | No | `corporate` \| `nonprofit` \| `government` \| `startup` \| `agency` \| `other` |
239
+ | `status` | enum | No | `active` (default) \| `inactive` \| `prospect` \| `former` |
240
+ | `industry` | string | No | Industry sector |
241
+ | `website` | url | No | Website URL |
242
+ | `location` | string | No | Primary location |
243
+ | `size` | enum | No | `small` \| `medium` \| `large` \| `enterprise` |
244
+ | `contacts` | string[] | No | Person wikilinks |
245
+ | `projects` | string[] | No | Project wikilinks |
246
+ | `relationship_start` | string | No | Relationship start date |
247
+ | `notes` | string | No | Additional notes (markdown) |
248
+
249
+ ### financial-plan
250
+
251
+ Budgets, rates, forecasts.
252
+
253
+ | Field | Type | Required | Description |
254
+ |-------|------|----------|-------------|
255
+ | `name` | string | Yes | Plan name |
256
+ | `type` | enum | No | `budget` \| `forecast` \| `rates` \| `compensation` |
257
+ | `period` | string | No | e.g. Q1 2026, FY2026 |
258
+ | `project` | string | No | Project wikilink |
259
+ | `amounts` | string | No | Financial amounts (markdown table) |
260
+
261
+ ### deal
262
+
263
+ Pre-project sales opportunity.
264
+
265
+ | Field | Type | Required | Description |
266
+ |-------|------|----------|-------------|
267
+ | `name` | string | Yes | Deal name |
268
+ | `client` | string | No | Client wikilink |
269
+ | `contacts` | string[] | No | Contact person wikilinks |
270
+ | `stage` | enum | No | `scoping` (default) \| `proposal` \| `negotiating` \| `won` \| `lost` |
271
+ | `deal_value` | number | No | Estimated value (USD) |
272
+ | `probability` | number (0-100) | No | Win probability |
273
+ | `expected_close` | string | No | Expected close date |
274
+ | `source` | enum | No | `referral` \| `inbound` \| `outbound` \| `repeat` \| `partner` \| `other` |
275
+ | `proposals` | string[] | No | Proposal wikilinks |
276
+ | `project` | string | No | Resulting project wikilink (once won) |
277
+ | `lost_reason` | string | No | Why lost |
278
+
279
+ ### vendor
280
+
281
+ External suppliers, freelancers, partners.
282
+
283
+ | Field | Type | Required | Description |
284
+ |-------|------|----------|-------------|
285
+ | `name` | string | Yes | Vendor name |
286
+ | `type` | enum | No | `freelancer` \| `agency` \| `supplier` \| `platform` \| `partner` \| `other` |
287
+ | `status` | enum | No | `active` (default) \| `inactive` \| `preferred` |
288
+ | `contact_name` | string | No | Primary contact |
289
+ | `email` | string | No | Contact email |
290
+ | `website` | url | No | Website URL |
291
+ | `services` | string[] | No | Services provided |
292
+ | `projects` | string[] | No | Project wikilinks |
293
+ | `notes` | string | No | Additional notes (markdown) |
294
+
295
+ ### role
296
+
297
+ Role definitions from the firm's leveling framework. Body holds: Role Overview, Key Responsibilities, Leveling Criteria, Required Skills.
298
+
299
+ | Field | Type | Required | Description |
300
+ |-------|------|----------|-------------|
301
+ | `title` | string | Yes | Role title |
302
+ | `department` | string | No | e.g. Creative Technology, Design |
303
+ | `level` | number | No | Level 1-5 |
304
+ | `type` | enum | No | `staff` \| `contractor` \| `intern` |
305
+ | `status` | enum | No | `active` (default) \| `archived` |
306
+ | `location` | string | No | Location |
307
+ | `reports_to` | string | No | Parent role or person wikilink |
308
+
309
+ ---
310
+
311
+ ## Shared Resource Repo Entities
312
+
313
+ ### template
314
+
315
+ Document templates and boilerplates.
316
+
317
+ | Field | Type | Required | Description |
318
+ |-------|------|----------|-------------|
319
+ | `name` | string | Yes | Template name |
320
+ | `category` | string | No | e.g. proposal, brief, sow, meeting-notes |
321
+ | `description` | string | No | Template description |
322
+ | `template_content` | string | No | Template content (markdown) |
323
+ | `variables` | string[] | No | Template variables e.g. `{{project_name}}` |
324
+
325
+ ### process
326
+
327
+ Workflows, SOPs, and methodologies.
328
+
329
+ | Field | Type | Required | Description |
330
+ |-------|------|----------|-------------|
331
+ | `name` | string | Yes | Process name |
332
+ | `description` | string | No | Process description |
333
+ | `steps` | string | No | Process steps (markdown) |
334
+ | `related_areas` | string[] | No | Practice area wikilinks |
335
+ | `related_templates` | string[] | No | Template wikilinks |
336
+ | `owner` | string | No | Responsible person/team wikilink |
337
+ | `review_cycle` | enum | No | `monthly` \| `quarterly` \| `annual` \| `as-needed` |
338
+
339
+ ### standard
340
+
341
+ Guidelines and best practices.
342
+
343
+ | Field | Type | Required | Description |
344
+ |-------|------|----------|-------------|
345
+ | `name` | string | Yes | Standard name |
346
+ | `category` | string | No | e.g. accessibility, design-principles, code-standards |
347
+ | `description` | string | No | Standard description |
348
+ | `guidelines` | string | No | Guidelines (markdown) |
349
+ | `examples` | string[] | No | Example wikilinks |
350
+
351
+ ### reference
352
+
353
+ External references and inspirations.
354
+
355
+ | Field | Type | Required | Description |
356
+ |-------|------|----------|-------------|
357
+ | `name` | string | Yes | Reference name |
358
+ | `type` | enum | No | `article` \| `video` \| `visualization` \| `website` \| `research` \| `podcast` \| `project` \| `tool` |
359
+ | `date` | string | No | Publication date |
360
+ | `source` | string | No | Source/author |
361
+ | `link` | string | No | URL |
362
+ | `related_projects` | string[] | No | Project wikilinks |
363
+ | `related_people` | string[] | No | People wikilinks |
364
+ | `related_areas` | string[] | No | Practice area wikilinks |
365
+ | `description` | string | No | Description |
366
+
367
+ ### technique
368
+
369
+ Methods and patterns.
370
+
371
+ | Field | Type | Required | Description |
372
+ |-------|------|----------|-------------|
373
+ | `name` | string | Yes | Technique name |
374
+ | `category` | string | No | e.g. visualization, interaction-pattern |
375
+ | `description` | string | No | Description |
376
+ | `difficulty` | enum | No | `beginner` \| `intermediate` \| `advanced` |
377
+ | `related_frameworks` | string[] | No | Framework wikilinks |
378
+ | `examples` | string[] | No | Example wikilinks |
379
+
380
+ ### practice-area
381
+
382
+ Firm capabilities and disciplines.
383
+
384
+ | Field | Type | Required | Description |
385
+ |-------|------|----------|-------------|
386
+ | `name` | string | Yes | Practice area name |
387
+ | `description` | string | No | Overview of the discipline |
388
+ | `capabilities` | string[] | No | Specific service offerings |
389
+ | `related_case_studies` | string[] | No | Case study wikilinks |
390
+ | `related_projects` | string[] | No | Project wikilinks |
391
+
392
+ ### case-study
393
+
394
+ Portfolio narratives for completed projects. Body holds: Objective, Solution, Outcome, Team, Press, Awards.
395
+
396
+ | Field | Type | Required | Description |
397
+ |-------|------|----------|-------------|
398
+ | `title` | string | Yes | Case study title |
399
+ | `client` | string | No | Client wikilink |
400
+ | `year` | number | No | Year of the project |
401
+ | `practice_areas` | string[] | No | Practice area wikilinks |
402
+ | `sectors` | string[] | No | Industry tags |
403
+ | `website_url` | url | No | Project website URL |
404
+ | `description` | string | No | Short description / meta |
405
+
406
+ ---
407
+
408
+ ## Special Entity Types
409
+
410
+ ### dataset
411
+
412
+ Structured tabular data with CSV body.
413
+
414
+ | Field | Type | Required | Description |
415
+ |-------|------|----------|-------------|
416
+ | `name` | string | Yes | Dataset name |
417
+ | `schema` | ColumnDefinition[] | Yes | Column definitions (min 1) |
418
+
419
+ Each column: `{ name, type: "string"|"number"|"boolean"|"date", required?, description? }`
420
+
421
+ ### deck
422
+
423
+ Presentation deck (Schema Slides app plugin). Body is slide markdown.
424
+
425
+ | Field | Type | Required | Description |
426
+ |-------|------|----------|-------------|
427
+ | `title` | string | Yes | Deck title |
428
+ | `client` | string | No | Client |
429
+ | `date` | string | Yes | Date |
430
+ | `phase` | string | No | Phase |
431
+ | `theme` | enum | No | `dark` (default) \| `light` |
432
+ | `status` | enum | No | `draft` (default) \| `review` \| `approved` |
433
+ | `related_project` | string | No | Project wikilink |
434
+ | `related_client` | string | No | Client wikilink |
435
+
436
+ ---
437
+
438
+ ## File Layout
439
+
440
+ Entities use the **entity-folder** layout:
441
+
442
+ ```
443
+ {repo}/
444
+ {entity_id}/
445
+ main.md # Sentinel file (frontmatter + body)
446
+ notes/ # Optional sub-content
447
+ artifacts/ # Optional attachments
448
+ ```
449
+
450
+ - `entity_id` must be kebab-case: `acme-website-redesign`
451
+ - The folder name IS the entity_id
452
+ - `main.md` is the sentinel — its presence defines the entity
453
+ - Sub-content (notes, artifacts) lives alongside main.md
454
+
455
+ ## Example Frontmatter
456
+
457
+ ```yaml
458
+ ---
459
+ entity_type: project
460
+ entity_id: acme-website-redesign
461
+ name: Acme Website Redesign
462
+ client: "[[acme-corp]]"
463
+ start_date: "2026-01-15"
464
+ end_date: "2026-06-30"
465
+ status: active
466
+ related_areas:
467
+ - "[[ux-design]]"
468
+ - "[[design-engineering]]"
469
+ team:
470
+ - "[[christian-schmidt]]"
471
+ - "[[kenton-powell]]"
472
+ tags:
473
+ - website
474
+ - redesign
475
+ created_at: "2026-01-15T00:00:00Z"
476
+ updated_at: "2026-02-20T00:00:00Z"
477
+ created_by: christian-schmidt
478
+ updated_by: christian-schmidt
479
+ ---
480
+
481
+ # Acme Website Redesign
482
+
483
+ Project content goes here. Use [[wikilinks]] to reference other entities.
484
+ ```
485
+
486
+ ## Scaffolding Repos
487
+
488
+ When scaffolding a workspace (Obsidian vault, Google Drive, or file system), create one directory per repo and seed each with README.md or an empty entity folder. Recommended repo groupings:
489
+
490
+ | Repo Name | Repo Type | Entity Types |
491
+ |-----------|-----------|-------------|
492
+ | `projects` | project | project, brief, deliverable, artifact |
493
+ | `meetings` | project | meeting, decision |
494
+ | `clients` | function | client, vendor, deal |
495
+ | `people` | function | person, role |
496
+ | `proposals` | function | proposal, contract |
497
+ | `finance` | function | financial-plan |
498
+ | `case-studies` | shared-resource | case-study |
499
+ | `processes` | shared-resource | process, standard |
500
+ | `practice-areas` | shared-resource | practice-area, technique |
501
+ | `resources` | shared-resource | reference, template |
502
+ | `tasks` | project | task |
@@ -0,0 +1,46 @@
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..."