@trohde/earos 1.0.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 (135) hide show
  1. package/README.md +156 -0
  2. package/assets/init/.agents/skills/earos-artifact-gen/SKILL.md +106 -0
  3. package/assets/init/.agents/skills/earos-artifact-gen/references/interview-guide.md +313 -0
  4. package/assets/init/.agents/skills/earos-artifact-gen/references/output-guide.md +367 -0
  5. package/assets/init/.agents/skills/earos-assess/SKILL.md +212 -0
  6. package/assets/init/.agents/skills/earos-assess/references/calibration-benchmarks.md +160 -0
  7. package/assets/init/.agents/skills/earos-assess/references/output-templates.md +311 -0
  8. package/assets/init/.agents/skills/earos-assess/references/scoring-protocol.md +281 -0
  9. package/assets/init/.agents/skills/earos-calibrate/SKILL.md +153 -0
  10. package/assets/init/.agents/skills/earos-calibrate/references/agreement-metrics.md +188 -0
  11. package/assets/init/.agents/skills/earos-calibrate/references/calibration-protocol.md +263 -0
  12. package/assets/init/.agents/skills/earos-create/SKILL.md +257 -0
  13. package/assets/init/.agents/skills/earos-create/references/criterion-writing-guide.md +268 -0
  14. package/assets/init/.agents/skills/earos-create/references/dependency-rules.md +193 -0
  15. package/assets/init/.agents/skills/earos-create/references/rubric-interview-guide.md +123 -0
  16. package/assets/init/.agents/skills/earos-create/references/validation-checklist.md +238 -0
  17. package/assets/init/.agents/skills/earos-profile-author/SKILL.md +251 -0
  18. package/assets/init/.agents/skills/earos-profile-author/references/criterion-writing-guide.md +280 -0
  19. package/assets/init/.agents/skills/earos-profile-author/references/design-methods.md +158 -0
  20. package/assets/init/.agents/skills/earos-profile-author/references/profile-checklist.md +173 -0
  21. package/assets/init/.agents/skills/earos-remediate/SKILL.md +118 -0
  22. package/assets/init/.agents/skills/earos-remediate/references/output-template.md +199 -0
  23. package/assets/init/.agents/skills/earos-remediate/references/remediation-patterns.md +330 -0
  24. package/assets/init/.agents/skills/earos-report/SKILL.md +85 -0
  25. package/assets/init/.agents/skills/earos-report/references/portfolio-template.md +181 -0
  26. package/assets/init/.agents/skills/earos-report/references/single-artifact-template.md +168 -0
  27. package/assets/init/.agents/skills/earos-review/SKILL.md +130 -0
  28. package/assets/init/.agents/skills/earos-review/references/challenge-patterns.md +163 -0
  29. package/assets/init/.agents/skills/earos-review/references/output-template.md +180 -0
  30. package/assets/init/.agents/skills/earos-template-fill/SKILL.md +177 -0
  31. package/assets/init/.agents/skills/earos-template-fill/references/evidence-writing-guide.md +186 -0
  32. package/assets/init/.agents/skills/earos-template-fill/references/section-rubric-mapping.md +200 -0
  33. package/assets/init/.agents/skills/earos-validate/SKILL.md +113 -0
  34. package/assets/init/.agents/skills/earos-validate/references/fix-patterns.md +281 -0
  35. package/assets/init/.agents/skills/earos-validate/references/validation-checks.md +287 -0
  36. package/assets/init/.claude/CLAUDE.md +4 -0
  37. package/assets/init/AGENTS.md +293 -0
  38. package/assets/init/CLAUDE.md +635 -0
  39. package/assets/init/README.md +507 -0
  40. package/assets/init/calibration/gold-set/.gitkeep +0 -0
  41. package/assets/init/calibration/results/.gitkeep +0 -0
  42. package/assets/init/core/core-meta-rubric.yaml +643 -0
  43. package/assets/init/docs/consistency-report.md +325 -0
  44. package/assets/init/docs/getting-started.md +194 -0
  45. package/assets/init/docs/profile-authoring-guide.md +51 -0
  46. package/assets/init/docs/terminology.md +126 -0
  47. package/assets/init/earos.manifest.yaml +104 -0
  48. package/assets/init/evaluations/.gitkeep +0 -0
  49. package/assets/init/examples/aws-event-driven-order-processing/artifact.yaml +2056 -0
  50. package/assets/init/examples/aws-event-driven-order-processing/evaluation.yaml +973 -0
  51. package/assets/init/examples/aws-event-driven-order-processing/report.md +244 -0
  52. package/assets/init/examples/example-solution-architecture.evaluation.yaml +136 -0
  53. package/assets/init/examples/multi-cloud-data-analytics/artifact.yaml +715 -0
  54. package/assets/init/overlays/data-governance.yaml +94 -0
  55. package/assets/init/overlays/regulatory.yaml +154 -0
  56. package/assets/init/overlays/security.yaml +92 -0
  57. package/assets/init/profiles/adr.yaml +225 -0
  58. package/assets/init/profiles/capability-map.yaml +223 -0
  59. package/assets/init/profiles/reference-architecture.yaml +426 -0
  60. package/assets/init/profiles/roadmap.yaml +205 -0
  61. package/assets/init/profiles/solution-architecture.yaml +227 -0
  62. package/assets/init/research/architecture-assessment-rubrics-research.docx +0 -0
  63. package/assets/init/research/architecture-assessment-rubrics-research.md +566 -0
  64. package/assets/init/research/reference-architecture-research.md +751 -0
  65. package/assets/init/standard/EAROS.md +1426 -0
  66. package/assets/init/standard/schemas/artifact.schema.json +1295 -0
  67. package/assets/init/standard/schemas/artifact.uischema.json +65 -0
  68. package/assets/init/standard/schemas/evaluation.schema.json +284 -0
  69. package/assets/init/standard/schemas/rubric.schema.json +383 -0
  70. package/assets/init/templates/evaluation-record.template.yaml +58 -0
  71. package/assets/init/templates/new-profile.template.yaml +65 -0
  72. package/bin.js +188 -0
  73. package/dist/assets/_basePickBy-BVu6YmSW.js +1 -0
  74. package/dist/assets/_baseUniq-CWRzQDz_.js +1 -0
  75. package/dist/assets/arc-CyDBhtDM.js +1 -0
  76. package/dist/assets/architectureDiagram-2XIMDMQ5-BH6O4dvN.js +36 -0
  77. package/dist/assets/blockDiagram-WCTKOSBZ-2xmwdjpg.js +132 -0
  78. package/dist/assets/c4Diagram-IC4MRINW-BNmPRFJF.js +10 -0
  79. package/dist/assets/channel-CiySTNoJ.js +1 -0
  80. package/dist/assets/chunk-4BX2VUAB-DGQTvirp.js +1 -0
  81. package/dist/assets/chunk-55IACEB6-DNMAQAC_.js +1 -0
  82. package/dist/assets/chunk-FMBD7UC4-BJbVTQ5o.js +15 -0
  83. package/dist/assets/chunk-JSJVCQXG-BCxUL74A.js +1 -0
  84. package/dist/assets/chunk-KX2RTZJC-H7wWZOfz.js +1 -0
  85. package/dist/assets/chunk-NQ4KR5QH-BK4RlTQF.js +220 -0
  86. package/dist/assets/chunk-QZHKN3VN-0chxDV5g.js +1 -0
  87. package/dist/assets/chunk-WL4C6EOR-DexfQ-AV.js +189 -0
  88. package/dist/assets/classDiagram-VBA2DB6C-D7luWJQn.js +1 -0
  89. package/dist/assets/classDiagram-v2-RAHNMMFH-D7luWJQn.js +1 -0
  90. package/dist/assets/clone-ylgRbd3D.js +1 -0
  91. package/dist/assets/cose-bilkent-S5V4N54A-DS2IOCfZ.js +1 -0
  92. package/dist/assets/cytoscape.esm-CyJtwmzi.js +331 -0
  93. package/dist/assets/dagre-KLK3FWXG-BbSoTTa3.js +4 -0
  94. package/dist/assets/defaultLocale-DX6XiGOO.js +1 -0
  95. package/dist/assets/diagram-E7M64L7V-C9TvYgv0.js +24 -0
  96. package/dist/assets/diagram-IFDJBPK2-DowUMWrg.js +43 -0
  97. package/dist/assets/diagram-P4PSJMXO-BL6nrnQF.js +24 -0
  98. package/dist/assets/erDiagram-INFDFZHY-rXPRl8VM.js +70 -0
  99. package/dist/assets/flowDiagram-PKNHOUZH-DBRM99-W.js +162 -0
  100. package/dist/assets/ganttDiagram-A5KZAMGK-INcWFsBT.js +292 -0
  101. package/dist/assets/gitGraphDiagram-K3NZZRJ6-DMwpfE91.js +65 -0
  102. package/dist/assets/graph-DLQn37b-.js +1 -0
  103. package/dist/assets/index-BFFITMT8.js +650 -0
  104. package/dist/assets/index-H7f6VTz1.css +1 -0
  105. package/dist/assets/infoDiagram-LFFYTUFH-B0f4TWRM.js +2 -0
  106. package/dist/assets/init-Gi6I4Gst.js +1 -0
  107. package/dist/assets/ishikawaDiagram-PHBUUO56-CsU6XimZ.js +70 -0
  108. package/dist/assets/journeyDiagram-4ABVD52K-CQ7ibNib.js +139 -0
  109. package/dist/assets/kanban-definition-K7BYSVSG-DzEN7THt.js +89 -0
  110. package/dist/assets/katex-B1X10hvy.js +261 -0
  111. package/dist/assets/layout-C0dvb42R.js +1 -0
  112. package/dist/assets/linear-j4a8mGj7.js +1 -0
  113. package/dist/assets/mindmap-definition-YRQLILUH-DP8iEuCf.js +68 -0
  114. package/dist/assets/ordinal-Cboi1Yqb.js +1 -0
  115. package/dist/assets/pieDiagram-SKSYHLDU-BpIAXgAm.js +30 -0
  116. package/dist/assets/quadrantDiagram-337W2JSQ-DrpXn5Eg.js +7 -0
  117. package/dist/assets/requirementDiagram-Z7DCOOCP-Bg7EwHlG.js +73 -0
  118. package/dist/assets/sankeyDiagram-WA2Y5GQK-BWagRs1F.js +10 -0
  119. package/dist/assets/sequenceDiagram-2WXFIKYE-q5jwhivG.js +145 -0
  120. package/dist/assets/stateDiagram-RAJIS63D-B_J9pE-2.js +1 -0
  121. package/dist/assets/stateDiagram-v2-FVOUBMTO-Q_1GcybB.js +1 -0
  122. package/dist/assets/timeline-definition-YZTLITO2-dv0jgQ0z.js +61 -0
  123. package/dist/assets/treemap-KZPCXAKY-Dt1dkIE7.js +162 -0
  124. package/dist/assets/vennDiagram-LZ73GAT5-BdO5RgRZ.js +34 -0
  125. package/dist/assets/xychartDiagram-JWTSCODW-CpDVe-8v.js +7 -0
  126. package/dist/index.html +23 -0
  127. package/export-docx.js +1583 -0
  128. package/init.js +353 -0
  129. package/manifest-cli.mjs +207 -0
  130. package/package.json +83 -0
  131. package/schemas/artifact.schema.json +1295 -0
  132. package/schemas/artifact.uischema.json +65 -0
  133. package/schemas/evaluation.schema.json +284 -0
  134. package/schemas/rubric.schema.json +383 -0
  135. package/serve.js +238 -0
@@ -0,0 +1,383 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://raw.githubusercontent.com/ThomasRohde/EAROS/main/standard/schemas/rubric.schema.json",
4
+ "title": "EAROS Rubric/Profile/Overlay Schema",
5
+ "type": "object",
6
+ "required": [
7
+ "rubric_id",
8
+ "version",
9
+ "kind",
10
+ "title",
11
+ "artifact_type",
12
+ "dimensions",
13
+ "scoring",
14
+ "outputs"
15
+ ],
16
+ "properties": {
17
+ "rubric_id": {
18
+ "type": "string",
19
+ "description": "Unique identifier e.g. EAROS-CORE-002"
20
+ },
21
+ "version": {
22
+ "type": "string",
23
+ "pattern": "^\\d+\\.\\d+\\.\\d+$"
24
+ },
25
+ "kind": {
26
+ "type": "string",
27
+ "enum": [
28
+ "core_rubric",
29
+ "profile",
30
+ "overlay"
31
+ ]
32
+ },
33
+ "title": {
34
+ "type": "string"
35
+ },
36
+ "status": {
37
+ "type": "string",
38
+ "enum": [
39
+ "draft",
40
+ "candidate",
41
+ "approved",
42
+ "deprecated"
43
+ ]
44
+ },
45
+ "effective_date": {
46
+ "type": "string",
47
+ "format": "date"
48
+ },
49
+ "next_review_date": {
50
+ "type": "string",
51
+ "format": "date"
52
+ },
53
+ "owner": {
54
+ "type": "string"
55
+ },
56
+ "artifact_type": {
57
+ "type": "string"
58
+ },
59
+ "inherits": {
60
+ "type": "array",
61
+ "items": {
62
+ "type": "string"
63
+ },
64
+ "description": "Rubric IDs this extends"
65
+ },
66
+ "purpose": {
67
+ "type": "array",
68
+ "items": {
69
+ "type": "string"
70
+ }
71
+ },
72
+ "stakeholders": {
73
+ "type": "array",
74
+ "items": {
75
+ "type": "string"
76
+ }
77
+ },
78
+ "viewpoints": {
79
+ "type": "array",
80
+ "items": {
81
+ "type": "string"
82
+ }
83
+ },
84
+ "applicability": {
85
+ "type": "object",
86
+ "description": "Conditions under which this rubric applies"
87
+ },
88
+ "design_method": {
89
+ "type": "string",
90
+ "enum": [
91
+ "decision_centred",
92
+ "viewpoint_centred",
93
+ "lifecycle_centred",
94
+ "risk_centred",
95
+ "pattern_library"
96
+ ],
97
+ "description": "v2.0: Which of the five profile design methods was used"
98
+ },
99
+ "dimensions": {
100
+ "type": "array",
101
+ "minItems": 1,
102
+ "items": {
103
+ "type": "object",
104
+ "required": [
105
+ "id",
106
+ "name",
107
+ "criteria"
108
+ ],
109
+ "properties": {
110
+ "id": {
111
+ "type": "string"
112
+ },
113
+ "name": {
114
+ "type": "string"
115
+ },
116
+ "description": {
117
+ "type": "string"
118
+ },
119
+ "weight": {
120
+ "type": "number",
121
+ "minimum": 0
122
+ },
123
+ "criteria": {
124
+ "type": "array",
125
+ "minItems": 1,
126
+ "items": {
127
+ "type": "object",
128
+ "required": [
129
+ "id",
130
+ "question",
131
+ "metric_type",
132
+ "scale",
133
+ "required_evidence",
134
+ "scoring_guide"
135
+ ],
136
+ "properties": {
137
+ "id": {
138
+ "type": "string"
139
+ },
140
+ "question": {
141
+ "type": "string"
142
+ },
143
+ "description": {
144
+ "type": "string"
145
+ },
146
+ "metric_type": {
147
+ "type": "string",
148
+ "enum": [
149
+ "ordinal",
150
+ "binary",
151
+ "count",
152
+ "presence",
153
+ "coverage"
154
+ ]
155
+ },
156
+ "scale": {
157
+ "oneOf": [
158
+ {
159
+ "type": "array"
160
+ },
161
+ {
162
+ "type": "object"
163
+ },
164
+ {
165
+ "type": "string"
166
+ }
167
+ ]
168
+ },
169
+ "weight": {
170
+ "type": "number"
171
+ },
172
+ "gate": {
173
+ "oneOf": [
174
+ {
175
+ "type": "boolean"
176
+ },
177
+ {
178
+ "type": "object",
179
+ "required": [
180
+ "enabled",
181
+ "severity"
182
+ ],
183
+ "properties": {
184
+ "enabled": {
185
+ "type": "boolean"
186
+ },
187
+ "severity": {
188
+ "type": "string",
189
+ "enum": [
190
+ "advisory",
191
+ "major",
192
+ "critical"
193
+ ]
194
+ },
195
+ "failure_effect": {
196
+ "type": "string"
197
+ }
198
+ }
199
+ }
200
+ ]
201
+ },
202
+ "required_evidence": {
203
+ "type": "array",
204
+ "items": {
205
+ "oneOf": [
206
+ {
207
+ "type": "string"
208
+ },
209
+ {
210
+ "type": "object"
211
+ }
212
+ ]
213
+ }
214
+ },
215
+ "scoring_guide": {
216
+ "type": "object",
217
+ "additionalProperties": {
218
+ "type": "string"
219
+ }
220
+ },
221
+ "anti_patterns": {
222
+ "type": "array",
223
+ "items": {
224
+ "type": "string"
225
+ }
226
+ },
227
+ "remediation_hints": {
228
+ "type": "array",
229
+ "items": {
230
+ "type": "string"
231
+ }
232
+ },
233
+ "examples": {
234
+ "type": "object",
235
+ "properties": {
236
+ "good": {
237
+ "type": "array",
238
+ "items": {
239
+ "type": "string"
240
+ }
241
+ },
242
+ "bad": {
243
+ "type": "array",
244
+ "items": {
245
+ "type": "string"
246
+ }
247
+ }
248
+ },
249
+ "description": "v2.0: Positive and negative examples for AI disambiguation"
250
+ },
251
+ "decision_tree": {
252
+ "type": "string",
253
+ "description": "v2.0: IF/THEN disambiguation logic for AI agents"
254
+ },
255
+ "tags": {
256
+ "type": "array",
257
+ "items": {
258
+ "type": "string"
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ }
266
+ },
267
+ "scoring": {
268
+ "type": "object",
269
+ "required": [
270
+ "scale",
271
+ "method",
272
+ "thresholds"
273
+ ],
274
+ "properties": {
275
+ "scale": {
276
+ "type": "string"
277
+ },
278
+ "agent_scale": {
279
+ "type": "string",
280
+ "description": "v2.0: Optional collapsed scale for pure agent evaluation"
281
+ },
282
+ "method": {
283
+ "type": "string"
284
+ },
285
+ "thresholds": {
286
+ "type": "object"
287
+ },
288
+ "na_policy": {
289
+ "type": "string"
290
+ },
291
+ "confidence_policy": {
292
+ "type": "string"
293
+ },
294
+ "reliability_targets": {
295
+ "type": "object",
296
+ "description": "v2.0: Inter-rater reliability targets",
297
+ "properties": {
298
+ "binary_agreement": {
299
+ "type": "string"
300
+ },
301
+ "ordinal_kappa": {
302
+ "type": "string"
303
+ },
304
+ "overall_correlation": {
305
+ "type": "string"
306
+ }
307
+ }
308
+ }
309
+ }
310
+ },
311
+ "outputs": {
312
+ "type": "object",
313
+ "required": [
314
+ "require_evidence_refs",
315
+ "require_confidence",
316
+ "require_actions"
317
+ ],
318
+ "properties": {
319
+ "require_evidence_refs": {
320
+ "type": "boolean"
321
+ },
322
+ "require_confidence": {
323
+ "type": "boolean"
324
+ },
325
+ "require_actions": {
326
+ "type": "boolean"
327
+ },
328
+ "require_evidence_class": {
329
+ "type": "boolean",
330
+ "description": "v2.0: Require observed/inferred/external classification"
331
+ },
332
+ "require_evidence_anchors": {
333
+ "type": "boolean",
334
+ "description": "v2.0: RULERS-style citation+quotation"
335
+ },
336
+ "formats": {
337
+ "type": "array",
338
+ "items": {
339
+ "type": "string"
340
+ }
341
+ }
342
+ }
343
+ },
344
+ "agent_evaluation": {
345
+ "type": "object",
346
+ "description": "v2.0: Agent-specific evaluation configuration",
347
+ "properties": {
348
+ "dag_steps": {
349
+ "type": "array",
350
+ "items": {
351
+ "type": "string"
352
+ }
353
+ },
354
+ "rubric_locked": {
355
+ "type": "boolean"
356
+ },
357
+ "rubric_lock_version": {
358
+ "type": "string"
359
+ },
360
+ "calibration_method": {
361
+ "type": "string",
362
+ "enum": [
363
+ "rulers_wasserstein",
364
+ "llm_rubric_network",
365
+ "manual"
366
+ ]
367
+ }
368
+ }
369
+ },
370
+ "calibration": {
371
+ "type": "object"
372
+ },
373
+ "change_log": {
374
+ "type": "array",
375
+ "items": {
376
+ "type": "object"
377
+ }
378
+ },
379
+ "metadata": {
380
+ "type": "object"
381
+ }
382
+ }
383
+ }
@@ -0,0 +1,58 @@
1
+ kind: evaluation
2
+ artifact_id: "[ART-YYYY-NNNN]"
3
+ artifact_type: "[artifact_type]"
4
+ artifact_version: "[version]"
5
+ rubric_id: "[EAROS-XXX-NNN]"
6
+ rubric_version: "[version]"
7
+ profiles_applied:
8
+ - "[profile_id]"
9
+ overlays_applied:
10
+ - "[overlay_id]"
11
+ evaluated_by:
12
+ - role: evaluator
13
+ actor: "[human | agent]"
14
+ identity: "[name or model]"
15
+ - role: challenger
16
+ actor: "[human | agent]"
17
+ identity: "[name or model]"
18
+ evaluation_mode: "[human | agent | hybrid]"
19
+ evaluation_date: "YYYY-MM-DD"
20
+ dag_execution:
21
+ steps_completed:
22
+ - structural_validation
23
+ - content_extraction
24
+ - criterion_scoring
25
+ - cross_reference_validation
26
+ - dimension_aggregation
27
+ - challenge_pass
28
+ - calibration
29
+ - status_determination
30
+ rubric_lock_version: "[version]"
31
+ calibration_applied: true
32
+ criterion_results:
33
+ - criterion_id: "[CRIT-ID]"
34
+ score: 0
35
+ confidence: low
36
+ confidence_reason: "[why]"
37
+ evidence_sufficiency: none
38
+ evidence_class: observed
39
+ evidence_refs:
40
+ - section: "[section name]"
41
+ page: 0
42
+ quotation: "[quoted text]"
43
+ rationale: "[explanation]"
44
+ evidence_gaps:
45
+ - "[gap]"
46
+ recommended_actions:
47
+ - "[action]"
48
+ dimension_results:
49
+ - dimension_id: "[DIM-ID]"
50
+ weighted_score: 0.0
51
+ gate_failures: []
52
+ overall_status: "[pass | conditional_pass | rework_required | reject | not_reviewable]"
53
+ overall_score: 0.0
54
+ confidence: low
55
+ recommended_actions:
56
+ - "[action]"
57
+ decision_summary: "[summary]"
58
+ challenger_notes: "[findings from challenge pass]"
@@ -0,0 +1,65 @@
1
+ rubric_id: EAROS-PROF-XXX
2
+ version: 1.0.0
3
+ kind: profile
4
+ title: "[Artifact Type] Profile"
5
+ status: draft
6
+ effective_date: "YYYY-MM-DD"
7
+ owner: "[Owner]"
8
+ artifact_type: "[artifact_type]"
9
+ inherits:
10
+ - EAROS-CORE-002
11
+ design_method: "[decision_centred | viewpoint_centred | lifecycle_centred | risk_centred | pattern_library]"
12
+ purpose:
13
+ - "[purpose]"
14
+ stakeholders:
15
+ - "[stakeholder]"
16
+
17
+ dimensions:
18
+ - id: "[DIM-ID]"
19
+ name: "[Dimension Name]"
20
+ description: "[What this dimension evaluates]"
21
+ weight: 1.0
22
+ criteria:
23
+ - id: "[CRIT-ID]"
24
+ question: "[The question this criterion asks]"
25
+ description: "[Detailed description]"
26
+ metric_type: ordinal
27
+ scale: [0, 1, 2, 3, 4, "N/A"]
28
+ gate: false
29
+ required_evidence:
30
+ - "[evidence type]"
31
+ scoring_guide:
32
+ "0": "[Absent description]"
33
+ "1": "[Weak description]"
34
+ "2": "[Partial description]"
35
+ "3": "[Good description]"
36
+ "4": "[Strong description]"
37
+ anti_patterns:
38
+ - "[common failure]"
39
+ examples:
40
+ good:
41
+ - "[Example of strong evidence]"
42
+ bad:
43
+ - "[Example of weak evidence]"
44
+ decision_tree: "[IF/THEN logic for AI disambiguation]"
45
+ remediation_hints:
46
+ - "[How to improve]"
47
+
48
+ scoring:
49
+ scale: 0-4 ordinal plus N/A
50
+ method: gates_first_then_weighted_average
51
+ thresholds:
52
+ pass: No critical gate failure, overall >= 3.2, and no dimension < 2.0
53
+ conditional_pass: No critical gate failure and overall 2.4-3.19
54
+ rework_required: Overall < 2.4
55
+ reject: Critical gate failure
56
+
57
+ outputs:
58
+ require_evidence_refs: true
59
+ require_confidence: true
60
+ require_actions: true
61
+ require_evidence_class: true
62
+
63
+ calibration:
64
+ required_before_production: true
65
+ minimum_examples: 3
package/bin.js ADDED
@@ -0,0 +1,188 @@
1
+ #!/usr/bin/env node
2
+ import { readFileSync, existsSync } from 'fs'
3
+ import { resolve, dirname } from 'path'
4
+ import { fileURLToPath } from 'url'
5
+ import { spawnSync } from 'child_process'
6
+ import yaml from 'js-yaml'
7
+ import Ajv from 'ajv'
8
+ import addFormats from 'ajv-formats'
9
+
10
+ const __dirname = dirname(fileURLToPath(import.meta.url))
11
+ const args = process.argv.slice(2)
12
+
13
+ /** Find the EAROS repo root: cwd if it has earos.manifest.yaml, else dev fallback. */
14
+ function findRepoRoot() {
15
+ const cwd = process.cwd()
16
+ if (existsSync(resolve(cwd, 'earos.manifest.yaml'))) return cwd
17
+ const devRoot = resolve(__dirname, '../..')
18
+ if (existsSync(resolve(devRoot, 'earos.manifest.yaml'))) return devRoot
19
+ return cwd
20
+ }
21
+
22
+ /** Find schemas dir: bundled with package first, then repo fallback. */
23
+ function findSchemasDir() {
24
+ const bundled = resolve(__dirname, 'schemas')
25
+ if (existsSync(bundled)) return bundled
26
+ return resolve(__dirname, '../../standard/schemas')
27
+ }
28
+
29
+ // ─── validate command ─────────────────────────────────────────────────────────
30
+
31
+ async function validateFile(filePath) {
32
+ const absPath = resolve(filePath)
33
+ let content
34
+ try {
35
+ content = readFileSync(absPath, 'utf8')
36
+ } catch {
37
+ console.error(`Cannot read file: ${absPath}`)
38
+ process.exit(1)
39
+ }
40
+
41
+ let data
42
+ try {
43
+ data = yaml.load(content)
44
+ } catch (e) {
45
+ console.error(`YAML parse error: ${e.message}`)
46
+ process.exit(1)
47
+ }
48
+
49
+ const kind = data?.kind
50
+ const schemasDir = findSchemasDir()
51
+ const schemaFile =
52
+ kind === 'evaluation'
53
+ ? resolve(schemasDir, 'evaluation.schema.json')
54
+ : kind === 'artifact'
55
+ ? resolve(schemasDir, 'artifact.schema.json')
56
+ : resolve(schemasDir, 'rubric.schema.json')
57
+
58
+ const rawSchema = JSON.parse(readFileSync(schemaFile, 'utf8'))
59
+ // Strip $schema/$id so AJV v8 doesn't try to load the draft-2020 meta-schema
60
+ const { $schema: _s, $id: _i, ...schema } = rawSchema
61
+ const ajv = new Ajv({ strict: false, allErrors: true })
62
+ addFormats(ajv)
63
+ const validate = ajv.compile(schema)
64
+ const valid = validate(data)
65
+
66
+ if (valid) {
67
+ console.log(`✓ ${filePath} is valid (kind: ${kind ?? 'unknown'})`)
68
+ process.exit(0)
69
+ } else {
70
+ console.error(`✗ ${filePath} — ${validate.errors.length} error(s):`)
71
+ for (const err of validate.errors) {
72
+ console.error(` ${err.instancePath || '(root)'} ${err.message}`)
73
+ }
74
+ process.exit(1)
75
+ }
76
+ }
77
+
78
+ // ─── CLI dispatch ──────────────────────────────────────────────────────────────
79
+
80
+ if (args[0] === '--help' || args[0] === '-h') {
81
+ console.log(`earos — EAROS editor and CLI
82
+
83
+ Usage:
84
+ earos Open the editor in your browser
85
+ earos <file.yaml> Open the editor with a file pre-loaded
86
+ earos init [dir] [--icons] Scaffold a new EAROS workspace (default: current dir)
87
+ earos validate <file.yaml> Validate a rubric or evaluation YAML (exit 0/1)
88
+ earos export <file.yaml> Export artifact YAML as Word document (.docx)
89
+ earos manifest Regenerate earos.manifest.yaml
90
+ earos manifest add <file> Add a file to the manifest
91
+ earos manifest check Verify manifest matches filesystem
92
+ earos dev Start Vite dev server (development only)`)
93
+ process.exit(0)
94
+ } else if (args[0] === 'export') {
95
+ // Export artifact YAML → Word document
96
+ if (!args[1]) {
97
+ console.error('Usage: earos export <file.yaml>')
98
+ process.exit(1)
99
+ }
100
+ const inputPath = resolve(args[1])
101
+ if (!existsSync(inputPath)) {
102
+ console.error(`File not found: ${inputPath}`)
103
+ process.exit(1)
104
+ }
105
+ let exportContent
106
+ try { exportContent = readFileSync(inputPath, 'utf8') } catch (e) {
107
+ console.error(`Cannot read file: ${e.message}`)
108
+ process.exit(1)
109
+ }
110
+ let artifactData
111
+ try { artifactData = yaml.load(exportContent) } catch (e) {
112
+ console.error(`YAML parse error: ${e.message}`)
113
+ process.exit(1)
114
+ }
115
+ if (artifactData?.kind !== 'artifact') {
116
+ console.error('File does not appear to be an artifact (expected kind: artifact)')
117
+ process.exit(1)
118
+ }
119
+ const { exportToDocx } = await import('./export-docx.js')
120
+ const outputPath = inputPath.replace(/\.(yaml|yml)$/i, '') + '.docx'
121
+ console.log('Rendering diagrams and building Word document…')
122
+ try {
123
+ const { writeFileSync } = await import('fs')
124
+ const buf = await exportToDocx(artifactData)
125
+ writeFileSync(outputPath, buf)
126
+ console.log(`✓ Exported → ${outputPath}`)
127
+ } catch (e) {
128
+ console.error(`Export failed: ${e.message}`)
129
+ process.exit(1)
130
+ }
131
+ } else if (args[0] === 'init') {
132
+ const initArgs = args.slice(1)
133
+ let targetDir = '.'
134
+ let downloadIcons = false
135
+
136
+ for (const arg of initArgs) {
137
+ if (arg === '--icons') {
138
+ downloadIcons = true
139
+ continue
140
+ }
141
+ if (arg.startsWith('--')) {
142
+ console.error(`Unknown init option: ${arg}`)
143
+ process.exit(1)
144
+ }
145
+ if (targetDir === '.') {
146
+ targetDir = arg
147
+ continue
148
+ }
149
+ console.error('Usage: earos init [dir] [--icons]')
150
+ process.exit(1)
151
+ }
152
+
153
+ const { initWorkspace } = await import('./init.js')
154
+ await initWorkspace(targetDir, { downloadIcons })
155
+ } else if (args[0] === 'validate') {
156
+ if (!args[1]) {
157
+ console.error('Usage: earos validate <file.yaml>')
158
+ process.exit(1)
159
+ }
160
+ await validateFile(args[1])
161
+ } else if (args[0] === 'manifest') {
162
+ const manifestCli = resolve(__dirname, 'manifest-cli.mjs')
163
+ const result = spawnSync(process.execPath, [manifestCli, ...args.slice(1)], {
164
+ stdio: 'inherit',
165
+ env: { ...process.env, EAROS_REPO_ROOT: findRepoRoot() },
166
+ })
167
+ if (result.error) {
168
+ console.error('Failed to run manifest CLI:', result.error.message)
169
+ process.exit(1)
170
+ }
171
+ process.exit(result.status ?? 0)
172
+ } else if (args[0] === 'dev') {
173
+ // Development only — starts Vite HMR server (requires devDependencies)
174
+ const result = spawnSync('npx', ['vite'], {
175
+ stdio: 'inherit',
176
+ cwd: __dirname,
177
+ shell: true,
178
+ })
179
+ if (result.error) {
180
+ console.error('Failed to start Vite. Ensure devDependencies are installed: npm install')
181
+ process.exit(1)
182
+ }
183
+ process.exit(result.status ?? 0)
184
+ } else {
185
+ // Default: start the standalone Express server
186
+ const { startServer } = await import('./serve.js')
187
+ await startServer(args[0])
188
+ }
@@ -0,0 +1 @@
1
+ import{e as x,c as O,g as m,k as P,h as p,j as w,l as c,m as A,n as I,t as N,o as _}from"./_baseUniq-CWRzQDz_.js";import{aV as g,aC as $,aW as E,aX as F,aY as M,aZ as b,a_ as B,a$ as T,b0 as y,b1 as S}from"./index-BFFITMT8.js";var C=/\s/;function G(n){for(var r=n.length;r--&&C.test(n.charAt(r)););return r}var H=/^\s+/;function L(n){return n&&n.slice(0,G(n)+1).replace(H,"")}var o=NaN,R=/^[-+]0x[0-9a-f]+$/i,W=/^0b[01]+$/i,X=/^0o[0-7]+$/i,Y=parseInt;function q(n){if(typeof n=="number")return n;if(x(n))return o;if(g(n)){var r=typeof n.valueOf=="function"?n.valueOf():n;n=g(r)?r+"":r}if(typeof n!="string")return n===0?n:+n;n=L(n);var t=W.test(n);return t||X.test(n)?Y(n.slice(2),t?2:8):R.test(n)?o:+n}var v=1/0,z=17976931348623157e292;function K(n){if(!n)return n===0?n:0;if(n=q(n),n===v||n===-v){var r=n<0?-1:1;return r*z}return n===n?n:0}function Z(n){var r=K(n),t=r%1;return r===r?t?r-t:r:0}function fn(n){var r=n==null?0:n.length;return r?O(n):[]}var l=Object.prototype,D=l.hasOwnProperty,dn=$(function(n,r){n=Object(n);var t=-1,i=r.length,a=i>2?r[2]:void 0;for(a&&E(r[0],r[1],a)&&(i=1);++t<i;)for(var f=r[t],e=F(f),s=-1,d=e.length;++s<d;){var u=e[s],h=n[u];(h===void 0||M(h,l[u])&&!D.call(n,u))&&(n[u]=f[u])}return n});function un(n){var r=n==null?0:n.length;return r?n[r-1]:void 0}function J(n){return function(r,t,i){var a=Object(r);if(!b(r)){var f=m(t);r=P(r),t=function(s){return f(a[s],s,a)}}var e=n(r,t,i);return e>-1?a[f?r[e]:e]:void 0}}var Q=Math.max;function U(n,r,t){var i=n==null?0:n.length;if(!i)return-1;var a=t==null?0:Z(t);return a<0&&(a=Q(i+a,0)),p(n,m(r),a)}var hn=J(U);function V(n,r){var t=-1,i=b(n)?Array(n.length):[];return w(n,function(a,f,e){i[++t]=r(a,f,e)}),i}function gn(n,r){var t=B(n)?c:V;return t(n,m(r))}var j=Object.prototype,k=j.hasOwnProperty;function nn(n,r){return n!=null&&k.call(n,r)}function mn(n,r){return n!=null&&A(n,r,nn)}function rn(n,r){return n<r}function tn(n,r,t){for(var i=-1,a=n.length;++i<a;){var f=n[i],e=r(f);if(e!=null&&(s===void 0?e===e&&!x(e):t(e,s)))var s=e,d=f}return d}function on(n){return n&&n.length?tn(n,T,rn):void 0}function an(n,r,t,i){if(!g(n))return n;r=I(r,n);for(var a=-1,f=r.length,e=f-1,s=n;s!=null&&++a<f;){var d=N(r[a]),u=t;if(d==="__proto__"||d==="constructor"||d==="prototype")return n;if(a!=e){var h=s[d];u=void 0,u===void 0&&(u=g(h)?h:y(r[a+1])?[]:{})}S(s,d,u),s=s[d]}return n}function vn(n,r,t){for(var i=-1,a=r.length,f={};++i<a;){var e=r[i],s=_(n,e);t(s,e)&&an(f,I(e,n),s)}return f}export{rn as a,tn as b,V as c,vn as d,on as e,fn as f,hn as g,mn as h,dn as i,Z as j,un as l,gn as m,K as t};