@sentropic/focus 0.5.0 → 0.6.0-rc.13

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 (69) hide show
  1. package/dist/artifact/check.d.ts +54 -0
  2. package/dist/artifact/check.d.ts.map +1 -0
  3. package/dist/artifact/check.js +148 -0
  4. package/dist/artifact/check.js.map +1 -0
  5. package/dist/artifact/index.d.ts +5 -0
  6. package/dist/artifact/index.d.ts.map +1 -0
  7. package/dist/artifact/index.js +3 -0
  8. package/dist/artifact/index.js.map +1 -0
  9. package/dist/artifact/manifest.d.ts +148 -0
  10. package/dist/artifact/manifest.d.ts.map +1 -0
  11. package/dist/artifact/manifest.js +485 -0
  12. package/dist/artifact/manifest.js.map +1 -0
  13. package/dist/cli/index.d.ts +1 -1
  14. package/dist/cli/index.d.ts.map +1 -1
  15. package/dist/cli/index.js +12 -3
  16. package/dist/cli/index.js.map +1 -1
  17. package/dist/index.d.ts +4 -2
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +2 -1
  20. package/dist/index.js.map +1 -1
  21. package/dist/model.d.ts +39 -5
  22. package/dist/model.d.ts.map +1 -1
  23. package/dist/model.js +3 -2
  24. package/dist/model.js.map +1 -1
  25. package/dist/registry/definitions.d.ts.map +1 -1
  26. package/dist/registry/definitions.js +44 -17
  27. package/dist/registry/definitions.js.map +1 -1
  28. package/dist/render/evidence.d.ts +13 -3
  29. package/dist/render/evidence.d.ts.map +1 -1
  30. package/dist/render/evidence.js +60 -7
  31. package/dist/render/evidence.js.map +1 -1
  32. package/dist/render/html.d.ts +3 -3
  33. package/dist/render/html.d.ts.map +1 -1
  34. package/dist/render/html.js +42 -6
  35. package/dist/render/html.js.map +1 -1
  36. package/dist/render/markdown-table.d.ts +5 -0
  37. package/dist/render/markdown-table.d.ts.map +1 -0
  38. package/dist/render/markdown-table.js +9 -0
  39. package/dist/render/markdown-table.js.map +1 -0
  40. package/dist/render/md.d.ts +3 -3
  41. package/dist/render/md.d.ts.map +1 -1
  42. package/dist/render/md.js +34 -5
  43. package/dist/render/md.js.map +1 -1
  44. package/dist/render/presentation.d.ts +2 -2
  45. package/dist/render/presentation.d.ts.map +1 -1
  46. package/dist/render/presentation.js +2 -2
  47. package/dist/render/presentation.js.map +1 -1
  48. package/dist/render/terminal.d.ts +3 -3
  49. package/dist/render/terminal.d.ts.map +1 -1
  50. package/dist/render/terminal.js +28 -8
  51. package/dist/render/terminal.js.map +1 -1
  52. package/dist/track/index.js +3 -3
  53. package/dist/track/index.js.map +1 -1
  54. package/dist/validation/index.d.ts +18 -3
  55. package/dist/validation/index.d.ts.map +1 -1
  56. package/dist/validation/index.js +212 -14
  57. package/dist/validation/index.js.map +1 -1
  58. package/dist/validation/readability.d.ts +14 -2
  59. package/dist/validation/readability.d.ts.map +1 -1
  60. package/dist/validation/readability.js +232 -14
  61. package/dist/validation/readability.js.map +1 -1
  62. package/package.json +8 -3
  63. package/registry/entries.v1.json +45 -6
  64. package/schemas/decision-dossier-document.v1.0.schema.json +193 -0
  65. package/schemas/decision-dossier-document.v1.schema.json +31 -7
  66. package/schemas/decision-dossier-document.v2.0.schema.json +925 -0
  67. package/schemas/decision-dossier-document.v2.schema.json +156 -6
  68. package/schemas/report-document.v1.schema.json +1068 -0
  69. package/skills/focus/SKILL.md +24 -4
@@ -0,0 +1,193 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "urn:sentropic:focus:DecisionDossierDocument:1.0.0",
4
+ "title": "DecisionDossierDocument",
5
+ "description": "Read-only decision-dossier snapshot published by @sentropic/focus. Closed: unknown fields refuse. Snapshot interactions are disabled metadata (enabled:false); live decisions, signatures and amendments require separately qualified runtime capabilities.",
6
+ "type": "object",
7
+ "additionalProperties": false,
8
+ "required": ["ref", "subject", "title", "hash", "cursor", "sections", "interactions", "provenance", "amendmentTrace"],
9
+ "properties": {
10
+ "ref": { "type": "string" },
11
+ "subject": { "type": "string" },
12
+ "title": { "type": "string" },
13
+ "hash": { "type": "string" },
14
+ "cursor": { "type": "string" },
15
+ "sections": { "type": "array", "items": { "$ref": "#/$defs/section" } },
16
+ "interactions": { "type": "array", "items": { "$ref": "#/$defs/interaction" } },
17
+ "provenance": { "$ref": "#/$defs/provenance" },
18
+ "amendmentTrace": { "type": "array", "items": { "$ref": "#/$defs/amendmentStep" } },
19
+ "readability": { "$ref": "#/$defs/readability" }
20
+ },
21
+ "$defs": {
22
+ "readability": {
23
+ "type": "object",
24
+ "additionalProperties": false,
25
+ "properties": {
26
+ "ownerRequestQuote": { "type": "string" },
27
+ "noOwnerRequest": { "type": "boolean" },
28
+ "stakes": { "type": "string" },
29
+ "stakesLevel": { "enum": ["low", "medium", "high"] },
30
+ "readingBudgetMinutes": { "type": "number" },
31
+ "glossary": { "type": "array", "items": { "$ref": "#/$defs/glossaryEntry" } }
32
+ }
33
+ },
34
+ "glossaryEntry": {
35
+ "type": "object",
36
+ "additionalProperties": false,
37
+ "required": ["term", "definition"],
38
+ "properties": {
39
+ "term": { "type": "string" },
40
+ "definition": { "type": "string" }
41
+ }
42
+ },
43
+ "section": {
44
+ "oneOf": [
45
+ { "$ref": "#/$defs/proseNode" },
46
+ { "$ref": "#/$defs/questionNode" },
47
+ { "$ref": "#/$defs/optionSetNode" },
48
+ { "$ref": "#/$defs/outcomeNode" },
49
+ { "$ref": "#/$defs/amendmentTraceNode" },
50
+ { "$ref": "#/$defs/diagramNode" }
51
+ ]
52
+ },
53
+ "proseNode": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["kind", "id", "targetRef", "markdown"],
57
+ "properties": {
58
+ "kind": { "const": "prose" },
59
+ "id": { "type": "string" },
60
+ "targetRef": { "type": "string" },
61
+ "markdown": { "type": "string" },
62
+ "questionId": { "type": "string" }
63
+ }
64
+ },
65
+ "questionNode": {
66
+ "type": "object",
67
+ "additionalProperties": false,
68
+ "required": ["kind", "id", "targetRef", "question", "state"],
69
+ "properties": {
70
+ "kind": { "const": "question" },
71
+ "id": { "type": "string" },
72
+ "targetRef": { "type": "string" },
73
+ "question": { "type": "string" },
74
+ "recommendedAnswer": { "type": "string" },
75
+ "answer": { "type": "string" },
76
+ "state": { "enum": ["open", "answered", "validated"] },
77
+ "context": { "type": "string" },
78
+ "readingTimeMinutes": { "type": "number" },
79
+ "recommendedOptionId": { "type": "string" }
80
+ }
81
+ },
82
+ "optionNode": {
83
+ "type": "object",
84
+ "additionalProperties": false,
85
+ "required": ["kind", "id", "targetRef", "label", "annotation"],
86
+ "properties": {
87
+ "kind": { "const": "option" },
88
+ "id": { "type": "string" },
89
+ "targetRef": { "type": "string" },
90
+ "label": { "type": "string" },
91
+ "body": { "type": "string" },
92
+ "annotation": { "enum": ["none", "accept", "reject", "comment"] },
93
+ "annotationComment": { "type": "string" },
94
+ "consequence": { "type": "string" }
95
+ }
96
+ },
97
+ "optionSetNode": {
98
+ "type": "object",
99
+ "additionalProperties": false,
100
+ "required": ["kind", "id", "targetRef", "options"],
101
+ "properties": {
102
+ "kind": { "const": "optionSet" },
103
+ "id": { "type": "string" },
104
+ "targetRef": { "type": "string" },
105
+ "title": { "type": "string" },
106
+ "options": { "type": "array", "items": { "$ref": "#/$defs/optionNode" } },
107
+ "questionId": { "type": "string" }
108
+ }
109
+ },
110
+ "outcomeNode": {
111
+ "type": "object",
112
+ "additionalProperties": false,
113
+ "required": ["kind", "id", "targetRef", "modality", "statement"],
114
+ "properties": {
115
+ "kind": { "const": "outcome" },
116
+ "id": { "type": "string" },
117
+ "targetRef": { "type": "string" },
118
+ "modality": { "enum": ["decision", "orientation", "amendment", "comment"] },
119
+ "statement": { "type": "string" },
120
+ "questionId": { "type": "string" }
121
+ }
122
+ },
123
+ "amendmentTraceNode": {
124
+ "type": "object",
125
+ "additionalProperties": false,
126
+ "required": ["kind", "id", "targetRef", "steps"],
127
+ "properties": {
128
+ "kind": { "const": "amendmentTrace" },
129
+ "id": { "type": "string" },
130
+ "targetRef": { "type": "string" },
131
+ "steps": { "type": "array", "items": { "$ref": "#/$defs/amendmentStep" } }
132
+ }
133
+ },
134
+ "diagramNode": {
135
+ "type": "object",
136
+ "additionalProperties": false,
137
+ "required": ["kind", "id", "targetRef", "syntax", "source", "alt"],
138
+ "properties": {
139
+ "kind": { "const": "diagram" },
140
+ "id": { "type": "string" },
141
+ "targetRef": { "type": "string" },
142
+ "syntax": { "enum": ["mermaid", "plantuml"] },
143
+ "source": { "type": "string" },
144
+ "alt": { "type": "string" },
145
+ "scene": {
146
+ "type": "object",
147
+ "description": "diagram-core SemanticDocument, profile generic@1, without views, geometry or layout hints. Opaque JSON until the design-system publishes its authoritative schema; no Focus-specific scene model."
148
+ }
149
+ }
150
+ },
151
+ "interaction": {
152
+ "type": "object",
153
+ "additionalProperties": false,
154
+ "required": ["name", "targetRef", "label", "enabled"],
155
+ "properties": {
156
+ "name": { "type": "string" },
157
+ "targetRef": { "type": "string" },
158
+ "label": { "type": "string" },
159
+ "enabled": { "const": false }
160
+ }
161
+ },
162
+ "comprehensionEvidence": {
163
+ "type": "object",
164
+ "additionalProperties": false,
165
+ "required": ["subject", "dossierHash"],
166
+ "properties": {
167
+ "subject": { "type": "string" },
168
+ "dossierHash": { "type": "string" },
169
+ "signature": { "type": "string" }
170
+ }
171
+ },
172
+ "provenance": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": ["source", "readAt"],
176
+ "properties": {
177
+ "source": { "type": "string" },
178
+ "readAt": { "type": "string" },
179
+ "comprehensionEvidence": { "$ref": "#/$defs/comprehensionEvidence" }
180
+ }
181
+ },
182
+ "amendmentStep": {
183
+ "type": "object",
184
+ "additionalProperties": false,
185
+ "required": ["at", "author", "summary"],
186
+ "properties": {
187
+ "at": { "type": "string" },
188
+ "author": { "type": "string" },
189
+ "summary": { "type": "string" }
190
+ }
191
+ }
192
+ }
193
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
- "$id": "urn:sentropic:focus:DecisionDossierDocument:1.0.0",
3
+ "$id": "urn:sentropic:focus:DecisionDossierDocument:1.1.0",
4
4
  "title": "DecisionDossierDocument",
5
5
  "description": "Read-only decision-dossier snapshot published by @sentropic/focus. Closed: unknown fields refuse. Snapshot interactions are disabled metadata (enabled:false); live decisions, signatures and amendments require separately qualified runtime capabilities.",
6
6
  "type": "object",
@@ -50,6 +50,16 @@
50
50
  { "$ref": "#/$defs/diagramNode" }
51
51
  ]
52
52
  },
53
+ "sectionInput": {
54
+ "type": "object",
55
+ "additionalProperties": false,
56
+ "required": ["ref", "kind"],
57
+ "properties": {
58
+ "ref": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
59
+ "kind": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
60
+ "label": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" }
61
+ }
62
+ },
53
63
  "proseNode": {
54
64
  "type": "object",
55
65
  "additionalProperties": false,
@@ -59,7 +69,9 @@
59
69
  "id": { "type": "string" },
60
70
  "targetRef": { "type": "string" },
61
71
  "markdown": { "type": "string" },
62
- "questionId": { "type": "string" }
72
+ "questionId": { "type": "string" },
73
+ "inputs": { "type": "array", "items": { "$ref": "#/$defs/sectionInput" } },
74
+ "completionCriterion": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" }
63
75
  }
64
76
  },
65
77
  "questionNode": {
@@ -76,7 +88,9 @@
76
88
  "state": { "enum": ["open", "answered", "validated"] },
77
89
  "context": { "type": "string" },
78
90
  "readingTimeMinutes": { "type": "number" },
79
- "recommendedOptionId": { "type": "string" }
91
+ "recommendedOptionId": { "type": "string" },
92
+ "inputs": { "type": "array", "items": { "$ref": "#/$defs/sectionInput" } },
93
+ "completionCriterion": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" }
80
94
  }
81
95
  },
82
96
  "optionNode": {
@@ -134,19 +148,29 @@
134
148
  "diagramNode": {
135
149
  "type": "object",
136
150
  "additionalProperties": false,
137
- "required": ["kind", "id", "targetRef", "syntax", "source", "alt"],
151
+ "required": ["kind", "id", "targetRef", "alt"],
138
152
  "properties": {
139
153
  "kind": { "const": "diagram" },
140
154
  "id": { "type": "string" },
141
155
  "targetRef": { "type": "string" },
142
156
  "syntax": { "enum": ["mermaid", "plantuml"] },
143
- "source": { "type": "string" },
144
- "alt": { "type": "string" },
157
+ "source": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
158
+ "sourceRef": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9+.-]*:\\S+$" },
159
+ "renderComponent": { "type": "string", "pattern": "^[A-Za-z][A-Za-z0-9-]*$" },
160
+ "alt": { "type": "string", "pattern": "^[\\s\\S]*\\S[\\s\\S]*$" },
145
161
  "scene": {
146
162
  "type": "object",
147
163
  "description": "diagram-core SemanticDocument, profile generic@1, without views, geometry or layout hints. Opaque JSON until the design-system publishes its authoritative schema; no Focus-specific scene model."
148
164
  }
149
- }
165
+ },
166
+ "allOf": [
167
+ { "oneOf": [{ "required": ["source"] }, { "required": ["sourceRef"] }] },
168
+ { "not": { "allOf": [{ "required": ["source"] }, { "not": { "required": ["syntax"] } }] } },
169
+ { "not": { "allOf": [{ "required": ["source"] }, { "required": ["renderComponent"] }] } },
170
+ { "not": { "allOf": [{ "required": ["sourceRef"] }, { "not": { "required": ["renderComponent"] } }] } },
171
+ { "not": { "allOf": [{ "required": ["sourceRef"] }, { "required": ["syntax"] }] } },
172
+ { "not": { "allOf": [{ "required": ["sourceRef"] }, { "required": ["scene"] }] } }
173
+ ]
150
174
  },
151
175
  "interaction": {
152
176
  "type": "object",