semantic-atlas 0.2.0 → 0.3.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 (51) hide show
  1. package/.agents/skills/semantic-atlas/SKILL.md +3 -0
  2. package/.agents/skills/semantic-atlas/references/product-feedback.md +34 -0
  3. package/.agents/skills/semantic-atlas-insights/SKILL.md +55 -0
  4. package/README.md +203 -88
  5. package/README.zh-CN.md +181 -85
  6. package/dist/cli/argument-parser.js +9 -1
  7. package/dist/cli/bin.js +10 -2
  8. package/dist/cli/cli-application.d.ts +1 -0
  9. package/dist/cli/cli-application.d.ts.map +1 -1
  10. package/dist/cli/cli-application.js +64 -12
  11. package/dist/cli/insights-cli.d.ts +6 -0
  12. package/dist/cli/insights-cli.d.ts.map +1 -0
  13. package/dist/cli/insights-cli.js +236 -0
  14. package/dist/cli/main.d.ts.map +1 -1
  15. package/dist/cli/main.js +94 -2
  16. package/dist/cli/standalone-cli.d.ts.map +1 -1
  17. package/dist/cli/standalone-cli.js +36 -5
  18. package/dist/cli/types.d.ts +2 -0
  19. package/dist/cli/types.d.ts.map +1 -1
  20. package/dist/contracts/cli.d.ts +63 -0
  21. package/dist/contracts/cli.d.ts.map +1 -1
  22. package/dist/contracts/cli.js +7 -0
  23. package/dist/contracts/insights.d.ts +2 -0
  24. package/dist/contracts/insights.d.ts.map +1 -0
  25. package/dist/contracts/insights.js +1 -0
  26. package/dist/contracts/public-contracts.d.ts +1 -0
  27. package/dist/contracts/public-contracts.d.ts.map +1 -1
  28. package/dist/contracts/public-contracts.js +1 -0
  29. package/dist/insights/contracts.d.ts +266 -0
  30. package/dist/insights/contracts.d.ts.map +1 -0
  31. package/dist/insights/contracts.js +124 -0
  32. package/dist/insights/insights-store.d.ts +73 -0
  33. package/dist/insights/insights-store.d.ts.map +1 -0
  34. package/dist/insights/insights-store.js +246 -0
  35. package/dist/setup/package-upgrader.d.ts +54 -0
  36. package/dist/setup/package-upgrader.d.ts.map +1 -0
  37. package/dist/setup/package-upgrader.js +169 -0
  38. package/dist/setup/skill-installer.d.ts +3 -2
  39. package/dist/setup/skill-installer.d.ts.map +1 -1
  40. package/dist/setup/skill-installer.js +67 -36
  41. package/dist/storage/atlas-database.d.ts +1 -0
  42. package/dist/storage/atlas-database.d.ts.map +1 -1
  43. package/dist/storage/atlas-database.js +13 -6
  44. package/docs/contracts/cli-v1.md +25 -4
  45. package/docs/contracts/insights-v1.md +84 -0
  46. package/docs/index.md +2 -0
  47. package/docs/log.md +24 -0
  48. package/docs/product-contract.md +15 -8
  49. package/package.json +3 -1
  50. package/schemas/cli-envelope-v1.schema.json +85 -1
  51. package/schemas/insights-envelope-v1.schema.json +428 -0
@@ -0,0 +1,428 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/lzj960515/semantic-atlas/main/schemas/insights-envelope-v1.schema.json",
4
+ "title": "Semantic Atlas insights envelope v1",
5
+ "oneOf": [
6
+ {
7
+ "type": "object",
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "type": "number",
11
+ "const": 1
12
+ },
13
+ "status": {
14
+ "type": "string",
15
+ "const": "ok"
16
+ },
17
+ "data": {
18
+ "oneOf": [
19
+ {
20
+ "type": "object",
21
+ "properties": {
22
+ "command": {
23
+ "type": "string",
24
+ "const": "insights.summary"
25
+ },
26
+ "range": {
27
+ "$ref": "#/$defs/__schema0"
28
+ },
29
+ "summary": {
30
+ "type": "object",
31
+ "properties": {
32
+ "commands": {
33
+ "type": "object",
34
+ "properties": {
35
+ "total": {
36
+ "$ref": "#/$defs/__schema2"
37
+ },
38
+ "outcomes": {
39
+ "type": "object",
40
+ "properties": {
41
+ "ok": {
42
+ "$ref": "#/$defs/__schema2"
43
+ },
44
+ "partial": {
45
+ "$ref": "#/$defs/__schema2"
46
+ },
47
+ "error": {
48
+ "$ref": "#/$defs/__schema2"
49
+ }
50
+ },
51
+ "required": [
52
+ "ok",
53
+ "partial",
54
+ "error"
55
+ ],
56
+ "additionalProperties": false
57
+ },
58
+ "byCommand": {
59
+ "type": "array",
60
+ "items": {
61
+ "type": "object",
62
+ "properties": {
63
+ "command": {
64
+ "type": "string",
65
+ "enum": [
66
+ "status",
67
+ "index",
68
+ "map.view",
69
+ "map.search",
70
+ "map.show",
71
+ "code.search",
72
+ "learn",
73
+ "changes",
74
+ "feedback.report"
75
+ ]
76
+ },
77
+ "count": {
78
+ "$ref": "#/$defs/__schema2"
79
+ }
80
+ },
81
+ "required": [
82
+ "command",
83
+ "count"
84
+ ],
85
+ "additionalProperties": false
86
+ }
87
+ },
88
+ "warningCodes": {
89
+ "type": "array",
90
+ "items": {
91
+ "type": "object",
92
+ "properties": {
93
+ "code": {
94
+ "type": "string",
95
+ "minLength": 1
96
+ },
97
+ "count": {
98
+ "$ref": "#/$defs/__schema2"
99
+ }
100
+ },
101
+ "required": [
102
+ "code",
103
+ "count"
104
+ ],
105
+ "additionalProperties": false
106
+ }
107
+ }
108
+ },
109
+ "required": [
110
+ "total",
111
+ "outcomes",
112
+ "byCommand",
113
+ "warningCodes"
114
+ ],
115
+ "additionalProperties": false
116
+ },
117
+ "feedback": {
118
+ "type": "object",
119
+ "properties": {
120
+ "total": {
121
+ "$ref": "#/$defs/__schema2"
122
+ },
123
+ "byCategory": {
124
+ "type": "array",
125
+ "items": {
126
+ "type": "object",
127
+ "properties": {
128
+ "category": {
129
+ "$ref": "#/$defs/__schema3"
130
+ },
131
+ "count": {
132
+ "$ref": "#/$defs/__schema2"
133
+ }
134
+ },
135
+ "required": [
136
+ "category",
137
+ "count"
138
+ ],
139
+ "additionalProperties": false
140
+ }
141
+ }
142
+ },
143
+ "required": [
144
+ "total",
145
+ "byCategory"
146
+ ],
147
+ "additionalProperties": false
148
+ }
149
+ },
150
+ "required": [
151
+ "commands",
152
+ "feedback"
153
+ ],
154
+ "additionalProperties": false
155
+ }
156
+ },
157
+ "required": [
158
+ "command",
159
+ "range",
160
+ "summary"
161
+ ],
162
+ "additionalProperties": false
163
+ },
164
+ {
165
+ "type": "object",
166
+ "properties": {
167
+ "command": {
168
+ "type": "string",
169
+ "const": "insights.feedback"
170
+ },
171
+ "range": {
172
+ "$ref": "#/$defs/__schema0"
173
+ },
174
+ "reports": {
175
+ "type": "array",
176
+ "items": {
177
+ "$ref": "#/$defs/__schema4"
178
+ }
179
+ }
180
+ },
181
+ "required": [
182
+ "command",
183
+ "range",
184
+ "reports"
185
+ ],
186
+ "additionalProperties": false
187
+ },
188
+ {
189
+ "type": "object",
190
+ "properties": {
191
+ "command": {
192
+ "type": "string",
193
+ "const": "insights.feedback.update"
194
+ },
195
+ "report": {
196
+ "$ref": "#/$defs/__schema4"
197
+ }
198
+ },
199
+ "required": [
200
+ "command",
201
+ "report"
202
+ ],
203
+ "additionalProperties": false
204
+ }
205
+ ]
206
+ }
207
+ },
208
+ "required": [
209
+ "schemaVersion",
210
+ "status",
211
+ "data"
212
+ ],
213
+ "additionalProperties": false
214
+ },
215
+ {
216
+ "type": "object",
217
+ "properties": {
218
+ "schemaVersion": {
219
+ "type": "number",
220
+ "const": 1
221
+ },
222
+ "status": {
223
+ "type": "string",
224
+ "const": "error"
225
+ },
226
+ "data": {
227
+ "type": "object",
228
+ "properties": {
229
+ "command": {
230
+ "anyOf": [
231
+ {
232
+ "type": "string",
233
+ "enum": [
234
+ "insights.summary",
235
+ "insights.feedback",
236
+ "insights.feedback.update"
237
+ ]
238
+ },
239
+ {
240
+ "type": "null"
241
+ }
242
+ ]
243
+ },
244
+ "error": {
245
+ "type": "object",
246
+ "properties": {
247
+ "code": {
248
+ "type": "string",
249
+ "pattern": "^[A-Z][A-Z0-9_]*$"
250
+ },
251
+ "message": {
252
+ "type": "string",
253
+ "minLength": 1
254
+ }
255
+ },
256
+ "required": [
257
+ "code",
258
+ "message"
259
+ ],
260
+ "additionalProperties": false
261
+ }
262
+ },
263
+ "required": [
264
+ "command",
265
+ "error"
266
+ ],
267
+ "additionalProperties": false
268
+ }
269
+ },
270
+ "required": [
271
+ "schemaVersion",
272
+ "status",
273
+ "data"
274
+ ],
275
+ "additionalProperties": false
276
+ }
277
+ ],
278
+ "$defs": {
279
+ "__schema0": {
280
+ "type": "object",
281
+ "properties": {
282
+ "from": {
283
+ "$ref": "#/$defs/__schema1"
284
+ },
285
+ "to": {
286
+ "$ref": "#/$defs/__schema1"
287
+ }
288
+ },
289
+ "required": [
290
+ "from",
291
+ "to"
292
+ ],
293
+ "additionalProperties": false
294
+ },
295
+ "__schema1": {
296
+ "type": "string",
297
+ "format": "date-time",
298
+ "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
299
+ },
300
+ "__schema2": {
301
+ "type": "integer",
302
+ "minimum": 0,
303
+ "maximum": 9007199254740991
304
+ },
305
+ "__schema3": {
306
+ "type": "string",
307
+ "enum": [
308
+ "misleading-result",
309
+ "missing-knowledge",
310
+ "workflow-friction",
311
+ "performance",
312
+ "cli-error",
313
+ "skill-instruction"
314
+ ]
315
+ },
316
+ "__schema4": {
317
+ "type": "object",
318
+ "properties": {
319
+ "kind": {
320
+ "type": "string",
321
+ "enum": [
322
+ "problem",
323
+ "suggestion"
324
+ ]
325
+ },
326
+ "category": {
327
+ "$ref": "#/$defs/__schema3"
328
+ },
329
+ "impact": {
330
+ "type": "string",
331
+ "enum": [
332
+ "blocked",
333
+ "slowed",
334
+ "minor"
335
+ ]
336
+ },
337
+ "observed": {
338
+ "type": "string",
339
+ "minLength": 1,
340
+ "maxLength": 4000
341
+ },
342
+ "expected": {
343
+ "type": "string",
344
+ "minLength": 1,
345
+ "maxLength": 4000
346
+ },
347
+ "suggestion": {
348
+ "type": "string",
349
+ "minLength": 1,
350
+ "maxLength": 4000
351
+ },
352
+ "sourceConfirmed": {
353
+ "type": "boolean"
354
+ },
355
+ "id": {
356
+ "type": "string",
357
+ "format": "uuid",
358
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
359
+ },
360
+ "repositoryId": {
361
+ "type": "string",
362
+ "pattern": "^[a-f0-9]{64}$"
363
+ },
364
+ "snapshotId": {
365
+ "anyOf": [
366
+ {
367
+ "type": "string",
368
+ "pattern": "^[a-f0-9]{64}$"
369
+ },
370
+ {
371
+ "type": "null"
372
+ }
373
+ ]
374
+ },
375
+ "contextEventIds": {
376
+ "type": "array",
377
+ "items": {
378
+ "type": "string",
379
+ "format": "uuid",
380
+ "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
381
+ }
382
+ },
383
+ "status": {
384
+ "type": "string",
385
+ "enum": [
386
+ "new",
387
+ "triaged",
388
+ "resolved",
389
+ "dismissed"
390
+ ]
391
+ },
392
+ "note": {
393
+ "anyOf": [
394
+ {
395
+ "type": "string"
396
+ },
397
+ {
398
+ "type": "null"
399
+ }
400
+ ]
401
+ },
402
+ "createdAt": {
403
+ "$ref": "#/$defs/__schema1"
404
+ },
405
+ "updatedAt": {
406
+ "$ref": "#/$defs/__schema1"
407
+ }
408
+ },
409
+ "required": [
410
+ "kind",
411
+ "category",
412
+ "impact",
413
+ "observed",
414
+ "expected",
415
+ "sourceConfirmed",
416
+ "id",
417
+ "repositoryId",
418
+ "snapshotId",
419
+ "contextEventIds",
420
+ "status",
421
+ "note",
422
+ "createdAt",
423
+ "updatedAt"
424
+ ],
425
+ "additionalProperties": false
426
+ }
427
+ }
428
+ }