@tienne/gestalt 0.88.0 → 0.89.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 (197) hide show
  1. package/CLAUDE.md +6 -2
  2. package/README.ko.md +2 -1
  3. package/README.md +3 -1
  4. package/dist/package.json +2 -1
  5. package/dist/plugin/skills/_shared/proactive-routing.md +1 -0
  6. package/dist/plugin/skills/architecture/SKILL.md +913 -0
  7. package/dist/schemas/architecture-ir.schema.json +596 -0
  8. package/dist/src/architecture/canvas-geometry.d.ts +40 -0
  9. package/dist/src/architecture/canvas-geometry.d.ts.map +1 -0
  10. package/dist/src/architecture/canvas-geometry.js +212 -0
  11. package/dist/src/architecture/canvas-geometry.js.map +1 -0
  12. package/dist/src/architecture/codeowners.d.ts +16 -0
  13. package/dist/src/architecture/codeowners.d.ts.map +1 -0
  14. package/dist/src/architecture/codeowners.js +58 -0
  15. package/dist/src/architecture/codeowners.js.map +1 -0
  16. package/dist/src/architecture/compare-layout.d.ts +27 -0
  17. package/dist/src/architecture/compare-layout.d.ts.map +1 -0
  18. package/dist/src/architecture/compare-layout.js +72 -0
  19. package/dist/src/architecture/compare-layout.js.map +1 -0
  20. package/dist/src/architecture/dataflow-layout.d.ts +29 -0
  21. package/dist/src/architecture/dataflow-layout.d.ts.map +1 -0
  22. package/dist/src/architecture/dataflow-layout.js +229 -0
  23. package/dist/src/architecture/dataflow-layout.js.map +1 -0
  24. package/dist/src/architecture/doc-fresh.d.ts +31 -0
  25. package/dist/src/architecture/doc-fresh.d.ts.map +1 -0
  26. package/dist/src/architecture/doc-fresh.js +84 -0
  27. package/dist/src/architecture/doc-fresh.js.map +1 -0
  28. package/dist/src/architecture/doc-link.d.ts +84 -0
  29. package/dist/src/architecture/doc-link.d.ts.map +1 -0
  30. package/dist/src/architecture/doc-link.js +396 -0
  31. package/dist/src/architecture/doc-link.js.map +1 -0
  32. package/dist/src/architecture/doc-routes.d.ts +39 -0
  33. package/dist/src/architecture/doc-routes.d.ts.map +1 -0
  34. package/dist/src/architecture/doc-routes.js +123 -0
  35. package/dist/src/architecture/doc-routes.js.map +1 -0
  36. package/dist/src/architecture/doc-scan.d.ts +107 -0
  37. package/dist/src/architecture/doc-scan.d.ts.map +1 -0
  38. package/dist/src/architecture/doc-scan.js +617 -0
  39. package/dist/src/architecture/doc-scan.js.map +1 -0
  40. package/dist/src/architecture/doc-stale.d.ts +32 -0
  41. package/dist/src/architecture/doc-stale.d.ts.map +1 -0
  42. package/dist/src/architecture/doc-stale.js +60 -0
  43. package/dist/src/architecture/doc-stale.js.map +1 -0
  44. package/dist/src/architecture/drilldown.d.ts +51 -0
  45. package/dist/src/architecture/drilldown.d.ts.map +1 -0
  46. package/dist/src/architecture/drilldown.js +1160 -0
  47. package/dist/src/architecture/drilldown.js.map +1 -0
  48. package/dist/src/architecture/endpoint-match.d.ts +43 -0
  49. package/dist/src/architecture/endpoint-match.d.ts.map +1 -0
  50. package/dist/src/architecture/endpoint-match.js +133 -0
  51. package/dist/src/architecture/endpoint-match.js.map +1 -0
  52. package/dist/src/architecture/flow-layout.d.ts +79 -0
  53. package/dist/src/architecture/flow-layout.d.ts.map +1 -0
  54. package/dist/src/architecture/flow-layout.js +519 -0
  55. package/dist/src/architecture/flow-layout.js.map +1 -0
  56. package/dist/src/architecture/focus.d.ts +14 -0
  57. package/dist/src/architecture/focus.d.ts.map +1 -0
  58. package/dist/src/architecture/focus.js +107 -0
  59. package/dist/src/architecture/focus.js.map +1 -0
  60. package/dist/src/architecture/global-context.d.ts +23 -0
  61. package/dist/src/architecture/global-context.d.ts.map +1 -0
  62. package/dist/src/architecture/global-context.js +67 -0
  63. package/dist/src/architecture/global-context.js.map +1 -0
  64. package/dist/src/architecture/html-client.d.ts +35 -0
  65. package/dist/src/architecture/html-client.d.ts.map +1 -0
  66. package/dist/src/architecture/html-client.js +1852 -0
  67. package/dist/src/architecture/html-client.js.map +1 -0
  68. package/dist/src/architecture/html-renderer.d.ts +22 -0
  69. package/dist/src/architecture/html-renderer.d.ts.map +1 -0
  70. package/dist/src/architecture/html-renderer.js +1290 -0
  71. package/dist/src/architecture/html-renderer.js.map +1 -0
  72. package/dist/src/architecture/html-theme.d.ts +25 -0
  73. package/dist/src/architecture/html-theme.d.ts.map +1 -0
  74. package/dist/src/architecture/html-theme.js +681 -0
  75. package/dist/src/architecture/html-theme.js.map +1 -0
  76. package/dist/src/architecture/index.d.ts +9 -0
  77. package/dist/src/architecture/index.d.ts.map +1 -0
  78. package/dist/src/architecture/index.js +9 -0
  79. package/dist/src/architecture/index.js.map +1 -0
  80. package/dist/src/architecture/ir-schema.d.ts +1832 -0
  81. package/dist/src/architecture/ir-schema.d.ts.map +1 -0
  82. package/dist/src/architecture/ir-schema.js +343 -0
  83. package/dist/src/architecture/ir-schema.js.map +1 -0
  84. package/dist/src/architecture/kind-text.d.ts +21 -0
  85. package/dist/src/architecture/kind-text.d.ts.map +1 -0
  86. package/dist/src/architecture/kind-text.js +42 -0
  87. package/dist/src/architecture/kind-text.js.map +1 -0
  88. package/dist/src/architecture/layout.d.ts +227 -0
  89. package/dist/src/architecture/layout.d.ts.map +1 -0
  90. package/dist/src/architecture/layout.js +627 -0
  91. package/dist/src/architecture/layout.js.map +1 -0
  92. package/dist/src/architecture/mcp-tool-match.d.ts +49 -0
  93. package/dist/src/architecture/mcp-tool-match.d.ts.map +1 -0
  94. package/dist/src/architecture/mcp-tool-match.js +53 -0
  95. package/dist/src/architecture/mcp-tool-match.js.map +1 -0
  96. package/dist/src/architecture/merge.d.ts +54 -0
  97. package/dist/src/architecture/merge.d.ts.map +1 -0
  98. package/dist/src/architecture/merge.js +681 -0
  99. package/dist/src/architecture/merge.js.map +1 -0
  100. package/dist/src/architecture/micro-app.d.ts +20 -0
  101. package/dist/src/architecture/micro-app.d.ts.map +1 -0
  102. package/dist/src/architecture/micro-app.js +41 -0
  103. package/dist/src/architecture/micro-app.js.map +1 -0
  104. package/dist/src/architecture/name-ref-match.d.ts +43 -0
  105. package/dist/src/architecture/name-ref-match.d.ts.map +1 -0
  106. package/dist/src/architecture/name-ref-match.js +127 -0
  107. package/dist/src/architecture/name-ref-match.js.map +1 -0
  108. package/dist/src/architecture/packs/data.d.ts +109 -0
  109. package/dist/src/architecture/packs/data.d.ts.map +1 -0
  110. package/dist/src/architecture/packs/data.js +64 -0
  111. package/dist/src/architecture/packs/data.js.map +1 -0
  112. package/dist/src/architecture/packs/generic.d.ts +47 -0
  113. package/dist/src/architecture/packs/generic.d.ts.map +1 -0
  114. package/dist/src/architecture/packs/generic.js +35 -0
  115. package/dist/src/architecture/packs/generic.js.map +1 -0
  116. package/dist/src/architecture/packs/harness.d.ts +96 -0
  117. package/dist/src/architecture/packs/harness.d.ts.map +1 -0
  118. package/dist/src/architecture/packs/harness.js +66 -0
  119. package/dist/src/architecture/packs/harness.js.map +1 -0
  120. package/dist/src/architecture/packs/index.d.ts +840 -0
  121. package/dist/src/architecture/packs/index.d.ts.map +1 -0
  122. package/dist/src/architecture/packs/index.js +87 -0
  123. package/dist/src/architecture/packs/index.js.map +1 -0
  124. package/dist/src/architecture/packs/infra.d.ts +91 -0
  125. package/dist/src/architecture/packs/infra.d.ts.map +1 -0
  126. package/dist/src/architecture/packs/infra.js +57 -0
  127. package/dist/src/architecture/packs/infra.js.map +1 -0
  128. package/dist/src/architecture/packs/knowledge.d.ts +72 -0
  129. package/dist/src/architecture/packs/knowledge.d.ts.map +1 -0
  130. package/dist/src/architecture/packs/knowledge.js +58 -0
  131. package/dist/src/architecture/packs/knowledge.js.map +1 -0
  132. package/dist/src/architecture/packs/process.d.ts +87 -0
  133. package/dist/src/architecture/packs/process.d.ts.map +1 -0
  134. package/dist/src/architecture/packs/process.js +52 -0
  135. package/dist/src/architecture/packs/process.js.map +1 -0
  136. package/dist/src/architecture/packs/render-classes.d.ts +11 -0
  137. package/dist/src/architecture/packs/render-classes.d.ts.map +1 -0
  138. package/dist/src/architecture/packs/render-classes.js +92 -0
  139. package/dist/src/architecture/packs/render-classes.js.map +1 -0
  140. package/dist/src/architecture/packs/types.d.ts +66 -0
  141. package/dist/src/architecture/packs/types.d.ts.map +1 -0
  142. package/dist/src/architecture/packs/types.js +18 -0
  143. package/dist/src/architecture/packs/types.js.map +1 -0
  144. package/dist/src/architecture/packs/web-product.d.ts +348 -0
  145. package/dist/src/architecture/packs/web-product.d.ts.map +1 -0
  146. package/dist/src/architecture/packs/web-product.js +226 -0
  147. package/dist/src/architecture/packs/web-product.js.map +1 -0
  148. package/dist/src/architecture/sequence-layout.d.ts +50 -0
  149. package/dist/src/architecture/sequence-layout.d.ts.map +1 -0
  150. package/dist/src/architecture/sequence-layout.js +140 -0
  151. package/dist/src/architecture/sequence-layout.js.map +1 -0
  152. package/dist/src/architecture/service-facts.d.ts +30 -0
  153. package/dist/src/architecture/service-facts.d.ts.map +1 -0
  154. package/dist/src/architecture/service-facts.js +88 -0
  155. package/dist/src/architecture/service-facts.js.map +1 -0
  156. package/dist/src/architecture/store.d.ts +50 -0
  157. package/dist/src/architecture/store.d.ts.map +1 -0
  158. package/dist/src/architecture/store.js +320 -0
  159. package/dist/src/architecture/store.js.map +1 -0
  160. package/dist/src/architecture/types.d.ts +400 -0
  161. package/dist/src/architecture/types.d.ts.map +1 -0
  162. package/dist/src/architecture/types.js +75 -0
  163. package/dist/src/architecture/types.js.map +1 -0
  164. package/dist/src/architecture/validator.d.ts +65 -0
  165. package/dist/src/architecture/validator.d.ts.map +1 -0
  166. package/dist/src/architecture/validator.js +1249 -0
  167. package/dist/src/architecture/validator.js.map +1 -0
  168. package/dist/src/core/errors.d.ts +4 -0
  169. package/dist/src/core/errors.d.ts.map +1 -1
  170. package/dist/src/core/errors.js +8 -0
  171. package/dist/src/core/errors.js.map +1 -1
  172. package/dist/src/mcp/schemas.d.ts +317 -0
  173. package/dist/src/mcp/schemas.d.ts.map +1 -1
  174. package/dist/src/mcp/schemas.js +151 -0
  175. package/dist/src/mcp/schemas.js.map +1 -1
  176. package/dist/src/mcp/server.d.ts.map +1 -1
  177. package/dist/src/mcp/server.js +7 -1
  178. package/dist/src/mcp/server.js.map +1 -1
  179. package/dist/src/mcp/tools/architecture-passthrough.d.ts +9 -0
  180. package/dist/src/mcp/tools/architecture-passthrough.d.ts.map +1 -0
  181. package/dist/src/mcp/tools/architecture-passthrough.js +587 -0
  182. package/dist/src/mcp/tools/architecture-passthrough.js.map +1 -0
  183. package/dist/src/utils/claude-projects.d.ts +19 -0
  184. package/dist/src/utils/claude-projects.d.ts.map +1 -0
  185. package/dist/src/utils/claude-projects.js +157 -0
  186. package/dist/src/utils/claude-projects.js.map +1 -0
  187. package/dist/src/utils/read-only-tools.d.ts +19 -0
  188. package/dist/src/utils/read-only-tools.d.ts.map +1 -0
  189. package/dist/src/utils/read-only-tools.js +132 -0
  190. package/dist/src/utils/read-only-tools.js.map +1 -0
  191. package/package.json +2 -1
  192. package/plugin/.codex-plugin/plugin.json +1 -1
  193. package/plugin/.mcp.json +1 -1
  194. package/plugin/mcp.json +1 -1
  195. package/plugin/skills/_shared/proactive-routing.md +1 -0
  196. package/plugin/skills/architecture/SKILL.md +913 -0
  197. package/schemas/architecture-ir.schema.json +596 -0
@@ -0,0 +1,596 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "architecture-ir.schema.json",
4
+ "title": "Gestalt Architecture IR",
5
+ "description": "Intermediate representation for /architecture views (screen-chain, deploy-path)",
6
+ "type": "object",
7
+ "additionalProperties": true,
8
+ "required": [
9
+ "schemaVersion",
10
+ "view",
11
+ "repos",
12
+ "nodes",
13
+ "edges",
14
+ "unresolved",
15
+ "sourcesUsed",
16
+ "generatedAt"
17
+ ],
18
+ "properties": {
19
+ "schemaVersion": { "type": "string", "const": "1.0.0" },
20
+ "view": {
21
+ "type": "string",
22
+ "enum": ["screen-chain", "deploy-path", "knowledge", "knowledge-link"]
23
+ },
24
+ "packs": {
25
+ "type": "array",
26
+ "items": { "type": "string", "minLength": 1 },
27
+ "description": "vocabulary pack ids this IR uses. Defaults to web-product and harness"
28
+ },
29
+ "repos": { "type": "array", "items": { "$ref": "#/definitions/repo" } },
30
+ "nodes": { "type": "array", "items": { "$ref": "#/definitions/node" } },
31
+ "edges": { "type": "array", "items": { "$ref": "#/definitions/edge" } },
32
+ "unresolved": { "type": "array", "items": { "$ref": "#/definitions/unresolvedQuestion" } },
33
+ "sourcesUsed": { "type": "array", "items": { "$ref": "#/definitions/contextSource" } },
34
+ "generatedAt": { "type": "string" },
35
+ "groups": {
36
+ "type": "array",
37
+ "description": "product groups left by merge; members are the node ids that came from that product's analysis",
38
+ "items": { "$ref": "#/definitions/group" }
39
+ },
40
+ "flows": {
41
+ "type": "array",
42
+ "description": "domain flows of one service: actor lanes, steps left to right, main and side transitions",
43
+ "items": { "$ref": "#/definitions/flow" }
44
+ },
45
+ "stages": {
46
+ "type": "array",
47
+ "description": "left-to-right stages of the technical view, defined by the session (e.g. app, server, another server, DB)",
48
+ "items": { "$ref": "#/definitions/stage" }
49
+ },
50
+ "projections": {
51
+ "type": "array",
52
+ "description": "pictures that each answer one question, drawn over the same nodes and edges",
53
+ "items": { "$ref": "#/definitions/projection" }
54
+ }
55
+ },
56
+ "definitions": {
57
+ "stage": {
58
+ "type": "object",
59
+ "required": ["id", "label"],
60
+ "properties": {
61
+ "id": { "type": "string", "minLength": 1 },
62
+ "label": { "type": "string", "minLength": 1 },
63
+ "nodes": {
64
+ "type": "array",
65
+ "description": "node ids placed in this stage; wins over kinds and repos",
66
+ "items": { "type": "string", "minLength": 1 }
67
+ },
68
+ "kinds": {
69
+ "type": "array",
70
+ "description": "node kinds placed in this stage when the node is not listed by id in any stage",
71
+ "items": { "$ref": "#/definitions/node/properties/kind" }
72
+ },
73
+ "repos": {
74
+ "type": "array",
75
+ "description": "with kinds, both must match",
76
+ "items": { "type": "string", "minLength": 1 }
77
+ }
78
+ }
79
+ },
80
+ "visibility": { "type": "string", "enum": ["public", "private"] },
81
+ "evidence": {
82
+ "type": "object",
83
+ "required": ["type", "location", "visibility"],
84
+ "properties": {
85
+ "type": { "type": "string", "enum": ["code", "spec", "doc", "user", "live"] },
86
+ "location": {
87
+ "type": "string",
88
+ "minLength": 1,
89
+ "description": "code evidence uses <repoId>:<relPath>:<line>; live evidence uses the resource identifier the query found"
90
+ },
91
+ "updatedAt": { "type": "string" },
92
+ "visibility": { "$ref": "#/definitions/visibility" },
93
+ "excerpt": { "type": "string" },
94
+ "command": {
95
+ "type": "string",
96
+ "minLength": 1,
97
+ "description": "live only: the read-only CLI command that ran (its subcommand starts with list, get or describe)"
98
+ },
99
+ "observedAt": {
100
+ "type": "string",
101
+ "format": "date-time",
102
+ "description": "live only: when the query ran (ISO 8601)"
103
+ }
104
+ },
105
+ "if": { "properties": { "type": { "const": "live" } } },
106
+ "then": { "required": ["command", "observedAt"] },
107
+ "else": { "not": { "anyOf": [{ "required": ["command"] }, { "required": ["observedAt"] }] } }
108
+ },
109
+ "platform": { "type": "string", "enum": ["web", "android", "ios"] },
110
+ "repo": {
111
+ "type": "object",
112
+ "required": ["id", "name"],
113
+ "properties": {
114
+ "id": { "type": "string", "minLength": 1 },
115
+ "name": { "type": "string", "minLength": 1 },
116
+ "root": {
117
+ "type": "string",
118
+ "minLength": 1,
119
+ "description": "checkout path. Omit for a document bundle; code evidence into it is rejected"
120
+ },
121
+ "remote": { "type": "string" }
122
+ }
123
+ },
124
+ "node": {
125
+ "type": "object",
126
+ "required": ["id", "kind", "label", "repo", "evidence"],
127
+ "dependencies": { "displayNameInferred": ["displayName"] },
128
+ "properties": {
129
+ "id": { "type": "string", "minLength": 1 },
130
+ "kind": {
131
+ "type": "string",
132
+ "enum": [
133
+ "screen",
134
+ "endpoint",
135
+ "app_module",
136
+ "external_service",
137
+ "db_table",
138
+ "datastore",
139
+ "workflow",
140
+ "build",
141
+ "artifact",
142
+ "deploy_target",
143
+ "service",
144
+ "micro_app",
145
+ "feature",
146
+ "gateway",
147
+ "domain",
148
+ "cdn",
149
+ "bucket",
150
+ "cloud_account",
151
+ "client",
152
+ "skill",
153
+ "agent",
154
+ "component",
155
+ "firewall",
156
+ "network",
157
+ "subnet",
158
+ "cluster",
159
+ "workload",
160
+ "source",
161
+ "topic",
162
+ "pipeline",
163
+ "job",
164
+ "warehouse",
165
+ "dataset",
166
+ "report",
167
+ "org_unit",
168
+ "role",
169
+ "form",
170
+ "system",
171
+ "doc_group",
172
+ "document",
173
+ "design_screen"
174
+ ]
175
+ },
176
+ "label": {
177
+ "type": "string",
178
+ "minLength": 1,
179
+ "description": "technical name; part of the merge key (kind, repo, normalized label). micro_app uses the Module Federation name and leaves repo out of the key"
180
+ },
181
+ "displayName": {
182
+ "type": "string",
183
+ "minLength": 1,
184
+ "description": "human-facing name shown large on the box; not part of the merge key"
185
+ },
186
+ "displayNameInferred": {
187
+ "type": "boolean",
188
+ "description": "true when displayName was condensed from evidence text rather than found verbatim in a document"
189
+ },
190
+ "repo": { "type": "string" },
191
+ "parent": {
192
+ "type": "string",
193
+ "minLength": 1,
194
+ "description": "containment: a screen points to a feature, micro_app or service, a skill points to a feature or service, a feature points to a micro_app or service, a micro_app points to a service, a db_table points to a datastore; other kinds have no parent"
195
+ },
196
+ "description": { "type": "string" },
197
+ "evidence": { "type": "array", "items": { "$ref": "#/definitions/evidence" } },
198
+ "environment": {
199
+ "type": "string",
200
+ "minLength": 1,
201
+ "description": "domain, cdn, bucket, cloud_account, deploy_target and datastore only: prod, stage, qa, dev or another name"
202
+ },
203
+ "account": {
204
+ "type": "string",
205
+ "minLength": 1,
206
+ "description": "id of the cloud_account node this node belongs to; edges whose ends sit in different accounts get another color"
207
+ },
208
+ "platforms": {
209
+ "type": "array",
210
+ "uniqueItems": true,
211
+ "items": { "$ref": "#/definitions/platform" },
212
+ "description": "service only; web is also inferred from serves edges, android and ios need platformEvidence"
213
+ },
214
+ "platformEvidence": {
215
+ "type": "object",
216
+ "description": "service only: evidence per platform",
217
+ "propertyNames": { "$ref": "#/definitions/platform" },
218
+ "additionalProperties": { "type": "array", "items": { "$ref": "#/definitions/evidence" } }
219
+ },
220
+ "protocol": {
221
+ "type": "string",
222
+ "enum": ["http", "mcp"],
223
+ "description": "endpoint only; http when omitted. An mcp endpoint is one MCP tool and its label is the tool name"
224
+ },
225
+ "mcpServer": {
226
+ "type": "string",
227
+ "minLength": 1,
228
+ "description": "mcp endpoint only: name of the MCP server that registers the tool"
229
+ },
230
+ "actions": {
231
+ "type": "array",
232
+ "uniqueItems": true,
233
+ "items": { "type": "string", "minLength": 1 },
234
+ "description": "mcp endpoint only: values the tool dispatches on through its action argument"
235
+ },
236
+ "displayKind": {
237
+ "type": "string",
238
+ "minLength": 1,
239
+ "description": "component only: kind name the reader sees on the chip"
240
+ },
241
+ "renderClass": {
242
+ "type": "string",
243
+ "enum": [
244
+ "actor",
245
+ "client",
246
+ "service",
247
+ "gateway",
248
+ "store",
249
+ "queue",
250
+ "external",
251
+ "infra",
252
+ "step",
253
+ "state",
254
+ "document"
255
+ ],
256
+ "description": "component only: render class that picks color and icon"
257
+ },
258
+ "doc": {
259
+ "type": "object",
260
+ "required": ["path"],
261
+ "description": "doc_group, document and design_screen only. Shared HTML keeps path, numbers, dates and booleans and drops text taken from the document body",
262
+ "properties": {
263
+ "path": { "type": "string", "minLength": 1, "description": "repo-relative path" },
264
+ "updatedAt": {
265
+ "type": "string",
266
+ "minLength": 1,
267
+ "description": "last-updated date the document states in its header"
268
+ },
269
+ "committedAt": {
270
+ "type": "string",
271
+ "minLength": 1,
272
+ "description": "date of the last git commit that touched the file"
273
+ },
274
+ "sections": { "type": "array", "items": { "type": "string", "minLength": 1 } },
275
+ "gaps": {
276
+ "type": "array",
277
+ "items": {
278
+ "type": "object",
279
+ "required": ["kind"],
280
+ "properties": {
281
+ "kind": { "type": "string", "enum": ["gap", "unverified"] },
282
+ "text": { "type": "string" },
283
+ "owner": { "type": "string", "minLength": 1 },
284
+ "line": { "type": "integer", "minimum": 1 }
285
+ }
286
+ }
287
+ },
288
+ "evidenceMix": {
289
+ "type": "object",
290
+ "additionalProperties": { "type": "integer", "minimum": 0 },
291
+ "description": "evidence marker count per kind"
292
+ },
293
+ "links": {
294
+ "type": "object",
295
+ "required": ["total", "broken", "branchOnly", "pinned", "unchecked"],
296
+ "properties": {
297
+ "total": { "type": "integer", "minimum": 0 },
298
+ "broken": { "type": "integer", "minimum": 0 },
299
+ "branchOnly": { "type": "integer", "minimum": 0 },
300
+ "pinned": { "type": "integer", "minimum": 0 },
301
+ "unchecked": { "type": "integer", "minimum": 0 }
302
+ }
303
+ },
304
+ "routes": {
305
+ "type": "array",
306
+ "items": {
307
+ "type": "object",
308
+ "required": ["keywords", "targetPath"],
309
+ "properties": {
310
+ "keywords": {
311
+ "type": "array",
312
+ "minItems": 1,
313
+ "items": { "type": "string", "minLength": 1 }
314
+ },
315
+ "targetPath": { "type": "string", "minLength": 1 },
316
+ "target": { "type": "string", "minLength": 1 }
317
+ }
318
+ }
319
+ },
320
+ "screen": {
321
+ "type": "object",
322
+ "properties": {
323
+ "route": { "type": "string", "minLength": 1 },
324
+ "screenType": { "type": "string", "minLength": 1 },
325
+ "frame": { "type": "string", "minLength": 1 },
326
+ "frameNode": { "type": "string", "minLength": 1 },
327
+ "symbolized": { "type": "boolean" },
328
+ "hasSpec": { "type": "boolean" },
329
+ "synonyms": { "type": "array", "items": { "type": "string", "minLength": 1 } },
330
+ "thumbnail": {
331
+ "type": "string",
332
+ "pattern": "^data:image/(png|jpeg|webp);base64,",
333
+ "description": "private HTML only"
334
+ }
335
+ }
336
+ },
337
+ "reads": { "type": "integer", "minimum": 0 },
338
+ "staleSince": { "type": "string", "minLength": 1 },
339
+ "orphan": { "const": true },
340
+ "keywords": { "type": "array", "items": { "type": "string", "minLength": 1 } }
341
+ }
342
+ },
343
+ "owners": {
344
+ "type": "array",
345
+ "items": { "type": "string", "minLength": 1 },
346
+ "description": "owning team or person from a sourced file such as CODEOWNERS or an ownership table; dropped from shared HTML"
347
+ }
348
+ }
349
+ },
350
+ "edge": {
351
+ "type": "object",
352
+ "required": ["id", "from", "to", "kind", "evidence", "lineStyle"],
353
+ "properties": {
354
+ "id": { "type": "string", "minLength": 1 },
355
+ "from": { "type": "string", "minLength": 1 },
356
+ "to": { "type": "string", "minLength": 1 },
357
+ "kind": {
358
+ "type": "string",
359
+ "enum": [
360
+ "calls",
361
+ "handles",
362
+ "uses",
363
+ "reads_writes",
364
+ "triggers",
365
+ "builds",
366
+ "produces",
367
+ "deploys_to",
368
+ "routes",
369
+ "navigates",
370
+ "resolves_to",
371
+ "origin",
372
+ "serves",
373
+ "loads",
374
+ "spawns",
375
+ "invokes",
376
+ "connects",
377
+ "sends",
378
+ "depends_on",
379
+ "peers",
380
+ "allows",
381
+ "feeds",
382
+ "publishes",
383
+ "hands_over",
384
+ "approves",
385
+ "records",
386
+ "describes",
387
+ "indexes"
388
+ ]
389
+ },
390
+ "evidence": { "type": "array", "items": { "$ref": "#/definitions/evidence" } },
391
+ "lineStyle": { "type": "string", "enum": ["solid", "dashed"] },
392
+ "actions": {
393
+ "type": "array",
394
+ "minItems": 1,
395
+ "items": { "type": "string", "minLength": 1 },
396
+ "description": "calls into an mcp endpoint only: action values this call passes"
397
+ },
398
+ "docLink": {
399
+ "type": "object",
400
+ "required": ["via", "refs"],
401
+ "description": "describes only: files the document points at and whether each exists",
402
+ "properties": {
403
+ "via": {
404
+ "type": "string",
405
+ "enum": ["code-ref", "api-path", "screen-route", "session"]
406
+ },
407
+ "refs": {
408
+ "type": "array",
409
+ "items": {
410
+ "type": "object",
411
+ "required": ["target", "verified"],
412
+ "properties": {
413
+ "target": {
414
+ "type": "string",
415
+ "minLength": 1,
416
+ "description": "<repoId>:<relPath>"
417
+ },
418
+ "verified": { "type": "boolean" },
419
+ "pinned": { "type": "string", "enum": ["branch", "commit", "none"] },
420
+ "committedAt": { "type": "string", "minLength": 1 }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ }
426
+ }
427
+ },
428
+ "unresolvedQuestion": {
429
+ "type": "object",
430
+ "required": ["id", "subject", "question"],
431
+ "properties": {
432
+ "id": { "type": "string", "minLength": 1 },
433
+ "subject": {
434
+ "type": "object",
435
+ "properties": {
436
+ "nodeId": { "type": "string" },
437
+ "edgeId": { "type": "string" },
438
+ "stepId": { "type": "string" },
439
+ "transitionId": { "type": "string" },
440
+ "messageId": { "type": "string" }
441
+ }
442
+ },
443
+ "question": { "type": "string", "minLength": 1 },
444
+ "answer": { "type": "string" }
445
+ }
446
+ },
447
+ "group": {
448
+ "type": "object",
449
+ "required": ["id", "name", "members"],
450
+ "properties": {
451
+ "id": { "type": "string", "minLength": 1 },
452
+ "name": { "type": "string", "minLength": 1 },
453
+ "members": {
454
+ "type": "array",
455
+ "minItems": 1,
456
+ "items": { "type": "string", "minLength": 1 }
457
+ }
458
+ }
459
+ },
460
+ "flowActor": {
461
+ "type": "object",
462
+ "required": ["id", "label", "kind"],
463
+ "properties": {
464
+ "id": { "type": "string", "minLength": 1 },
465
+ "label": { "type": "string", "minLength": 1 },
466
+ "kind": { "type": "string", "enum": ["person", "system", "agent"] }
467
+ }
468
+ },
469
+ "flowStep": {
470
+ "type": "object",
471
+ "required": ["id", "actor", "label", "evidence"],
472
+ "properties": {
473
+ "id": { "type": "string", "minLength": 1 },
474
+ "actor": { "type": "string", "minLength": 1 },
475
+ "label": { "type": "string", "minLength": 1 },
476
+ "description": { "type": "string" },
477
+ "state": { "type": "string", "minLength": 1 },
478
+ "refs": {
479
+ "type": "array",
480
+ "description": "ids of screen, endpoint, feature or micro_app nodes this step touches",
481
+ "items": { "type": "string", "minLength": 1 }
482
+ },
483
+ "evidence": { "type": "array", "items": { "$ref": "#/definitions/evidence" } }
484
+ }
485
+ },
486
+ "flowTransition": {
487
+ "type": "object",
488
+ "required": ["id", "from", "to", "path", "evidence", "lineStyle"],
489
+ "properties": {
490
+ "id": { "type": "string", "minLength": 1 },
491
+ "from": { "type": "string", "minLength": 1 },
492
+ "to": { "type": "string", "minLength": 1 },
493
+ "path": { "type": "string", "enum": ["main", "side"] },
494
+ "label": { "type": "string", "minLength": 1 },
495
+ "evidence": { "type": "array", "items": { "$ref": "#/definitions/evidence" } },
496
+ "lineStyle": { "type": "string", "enum": ["solid", "dashed"] }
497
+ }
498
+ },
499
+ "flow": {
500
+ "type": "object",
501
+ "required": ["id", "title", "actors", "steps", "transitions"],
502
+ "properties": {
503
+ "id": { "type": "string", "minLength": 1 },
504
+ "service": {
505
+ "type": "string",
506
+ "minLength": 1,
507
+ "description": "service node this flow belongs to. Omit for a standalone flow under the overview"
508
+ },
509
+ "title": { "type": "string", "minLength": 1 },
510
+ "description": { "type": "string" },
511
+ "actors": {
512
+ "type": "array",
513
+ "minItems": 1,
514
+ "items": { "$ref": "#/definitions/flowActor" }
515
+ },
516
+ "steps": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/flowStep" } },
517
+ "transitions": { "type": "array", "items": { "$ref": "#/definitions/flowTransition" } }
518
+ }
519
+ },
520
+ "contextSource": {
521
+ "type": "object",
522
+ "required": ["via", "identifier", "readOnly", "probeHit", "visibility"],
523
+ "properties": {
524
+ "via": { "type": "string", "enum": ["repo", "global", "mcp", "skill", "user"] },
525
+ "identifier": { "type": "string", "minLength": 1 },
526
+ "readOnly": { "type": "boolean" },
527
+ "probeHit": { "type": "boolean" },
528
+ "visibility": { "$ref": "#/definitions/visibility" }
529
+ }
530
+ },
531
+ "projectionMessage": {
532
+ "type": "object",
533
+ "required": ["id", "from", "to", "label", "evidence", "lineStyle"],
534
+ "properties": {
535
+ "id": { "type": "string", "minLength": 1 },
536
+ "from": { "type": "string", "minLength": 1 },
537
+ "to": { "type": "string", "minLength": 1 },
538
+ "label": { "type": "string", "minLength": 1 },
539
+ "edge": {
540
+ "type": "string",
541
+ "minLength": 1,
542
+ "description": "edge this message travels on. Its evidence counts for the message"
543
+ },
544
+ "evidence": { "type": "array", "items": { "$ref": "#/definitions/evidence" } },
545
+ "lineStyle": { "type": "string", "enum": ["solid", "dashed"] },
546
+ "reply": { "type": "boolean" },
547
+ "block": { "type": "string", "minLength": 1 },
548
+ "branch": { "type": "string", "minLength": 1 }
549
+ }
550
+ },
551
+ "projectionBlock": {
552
+ "type": "object",
553
+ "required": ["id", "kind", "label"],
554
+ "properties": {
555
+ "id": { "type": "string", "minLength": 1 },
556
+ "kind": { "type": "string", "enum": ["alt", "opt", "loop", "par"] },
557
+ "label": { "type": "string", "minLength": 1 }
558
+ }
559
+ },
560
+ "projection": {
561
+ "type": "object",
562
+ "required": ["id", "shape", "title", "question", "messages"],
563
+ "properties": {
564
+ "id": { "type": "string", "pattern": "^[a-z0-9][a-z0-9-]*$" },
565
+ "shape": { "type": "string", "enum": ["sequence", "dataflow", "compare"] },
566
+ "title": { "type": "string", "minLength": 1 },
567
+ "question": {
568
+ "type": "string",
569
+ "minLength": 1,
570
+ "description": "the one question this picture answers"
571
+ },
572
+ "participants": { "type": "array", "items": { "type": "string", "minLength": 1 } },
573
+ "messages": {
574
+ "type": "array",
575
+ "description": "lines of sequence and dataflow. Leave empty for compare",
576
+ "items": { "$ref": "#/definitions/projectionMessage" }
577
+ },
578
+ "blocks": { "type": "array", "items": { "$ref": "#/definitions/projectionBlock" } },
579
+ "sides": {
580
+ "type": "array",
581
+ "description": "the two groups compare puts side by side, such as before and after",
582
+ "items": { "$ref": "#/definitions/projectionSide" }
583
+ }
584
+ }
585
+ },
586
+ "projectionSide": {
587
+ "type": "object",
588
+ "required": ["id", "label", "nodes"],
589
+ "properties": {
590
+ "id": { "type": "string", "minLength": 1 },
591
+ "label": { "type": "string", "minLength": 1 },
592
+ "nodes": { "type": "array", "items": { "type": "string", "minLength": 1 } }
593
+ }
594
+ }
595
+ }
596
+ }