@hermes-hq/hodios-schema 0.1.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.
@@ -0,0 +1,694 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "$id": "https://hermes-ide.com/prompts/schema/v1/entry.schema.json",
4
+ "title": "Hodios entry",
5
+ "description": "Frontmatter of a Hodios library entry (prompt, persona, workflow, rule or style). A superset of Agent Skills SKILL.md frontmatter.",
6
+ "type": "object",
7
+ "required": [
8
+ "schema",
9
+ "id",
10
+ "kind",
11
+ "title",
12
+ "description",
13
+ "category",
14
+ "version",
15
+ "status"
16
+ ],
17
+ "additionalProperties": false,
18
+ "properties": {
19
+ "schema": {
20
+ "const": 1,
21
+ "description": "Entry format version. Always 1."
22
+ },
23
+ "id": {
24
+ "type": "string",
25
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$",
26
+ "description": "Globally unique, immutable id. Equals the entry folder name."
27
+ },
28
+ "kind": {
29
+ "enum": [
30
+ "prompt",
31
+ "persona",
32
+ "workflow",
33
+ "rule",
34
+ "style"
35
+ ],
36
+ "description": "Entry kind. Equals the entry file name."
37
+ },
38
+ "title": {
39
+ "type": "string",
40
+ "minLength": 3,
41
+ "maxLength": 80
42
+ },
43
+ "description": {
44
+ "type": "string",
45
+ "minLength": 1,
46
+ "maxLength": 1024,
47
+ "description": "Third person; says what it does and when to use it (lint PS023: 40-200 chars)."
48
+ },
49
+ "category": {
50
+ "type": "string",
51
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
52
+ "description": "Primary category from vocab/category.yml. Path: library/<domain>/<category>/<id>/; the domain comes from the vocab."
53
+ },
54
+ "subcategory": {
55
+ "type": "string",
56
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
57
+ "description": "Optional value from vocab/subcategory.yml whose parent is the category (TAXONOMY.md §2.4)."
58
+ },
59
+ "proposed_category": {
60
+ "type": "string",
61
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$",
62
+ "description": "Only for category \"unsorted\": the category this entry should graduate into (TAXONOMY.md §2.5)."
63
+ },
64
+ "version": {
65
+ "type": "string",
66
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$",
67
+ "description": "Entry semver."
68
+ },
69
+ "status": {
70
+ "enum": [
71
+ "incubating",
72
+ "experimental",
73
+ "stable",
74
+ "deprecated"
75
+ ]
76
+ },
77
+ "aliases": {
78
+ "type": "array",
79
+ "items": {
80
+ "type": "string",
81
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
82
+ },
83
+ "uniqueItems": true,
84
+ "description": "Old ids that resolve to this entry. Never the entry’s own id."
85
+ },
86
+ "replaced_by": {
87
+ "type": "string",
88
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$",
89
+ "description": "Successor id when status is deprecated."
90
+ },
91
+ "sunset": {
92
+ "type": "string",
93
+ "pattern": "^20\\d{2}\\.([1-9]|1[0-2])(0[1-9]|[12]\\d|3[01])\\.(0|[1-9]\\d*)$",
94
+ "description": "Catalog version after which a deprecated entry may be removed."
95
+ },
96
+ "stage": {
97
+ "type": "array",
98
+ "description": "Lifecycle stages from vocab/stage.yml.",
99
+ "items": {
100
+ "type": "string",
101
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
102
+ },
103
+ "uniqueItems": true
104
+ },
105
+ "stack": {
106
+ "type": "array",
107
+ "description": "Technologies from vocab/stack.yml. Empty means stack-agnostic.",
108
+ "items": {
109
+ "type": "string",
110
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
111
+ },
112
+ "uniqueItems": true
113
+ },
114
+ "requires": {
115
+ "type": "array",
116
+ "description": "Capabilities from vocab/requires.yml, or mcp:<server>.",
117
+ "items": {
118
+ "type": "string",
119
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*(:[a-z0-9][a-z0-9._-]*)?$"
120
+ },
121
+ "uniqueItems": true
122
+ },
123
+ "role": {
124
+ "type": "array",
125
+ "description": "Audience roles from vocab/role.yml. Empty means anyone.",
126
+ "items": {
127
+ "type": "string",
128
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
129
+ },
130
+ "uniqueItems": true,
131
+ "maxItems": 4
132
+ },
133
+ "subject": {
134
+ "type": "array",
135
+ "description": "Subjects, fields or human languages from vocab/subject.yml. Empty means any.",
136
+ "items": {
137
+ "type": "string",
138
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
139
+ },
140
+ "uniqueItems": true,
141
+ "maxItems": 4
142
+ },
143
+ "advice_risk": {
144
+ "type": "array",
145
+ "description": "Professional-advice areas from vocab/advice-risk.yml (TAXONOMY.md §3.9).",
146
+ "items": {
147
+ "type": "string",
148
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
149
+ },
150
+ "uniqueItems": true,
151
+ "maxItems": 4
152
+ },
153
+ "lang": {
154
+ "type": "string",
155
+ "pattern": "^[a-z]{2,3}(-[A-Z][a-z]{3})?(-([A-Z]{2}|\\d{3}))?$",
156
+ "description": "BCP 47 language of the entry text. Defaults to en."
157
+ },
158
+ "inputs": {
159
+ "type": "array",
160
+ "description": "Input types from vocab/inputs.yml.",
161
+ "items": {
162
+ "type": "string",
163
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
164
+ },
165
+ "uniqueItems": true
166
+ },
167
+ "output": {
168
+ "type": "array",
169
+ "description": "Output types from vocab/output.yml.",
170
+ "items": {
171
+ "type": "string",
172
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
173
+ },
174
+ "uniqueItems": true
175
+ },
176
+ "tags": {
177
+ "type": "array",
178
+ "description": "Free tags, normalized by vocab/tags.yml (lint PS007: at most 8).",
179
+ "items": {
180
+ "type": "string",
181
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
182
+ },
183
+ "uniqueItems": true
184
+ },
185
+ "risk": {
186
+ "enum": [
187
+ "read-only",
188
+ "edits-files",
189
+ "runs-commands",
190
+ "network",
191
+ "external"
192
+ ]
193
+ },
194
+ "invocation": {
195
+ "enum": [
196
+ "user",
197
+ "model",
198
+ "both"
199
+ ]
200
+ },
201
+ "effort": {
202
+ "enum": [
203
+ "quick",
204
+ "standard",
205
+ "deep"
206
+ ]
207
+ },
208
+ "interaction": {
209
+ "enum": [
210
+ "one-shot",
211
+ "interactive",
212
+ "autonomous"
213
+ ]
214
+ },
215
+ "model_tier": {
216
+ "enum": [
217
+ "small",
218
+ "mid",
219
+ "frontier"
220
+ ]
221
+ },
222
+ "reasoning": {
223
+ "enum": [
224
+ "off",
225
+ "optional",
226
+ "recommended"
227
+ ]
228
+ },
229
+ "level": {
230
+ "enum": [
231
+ "beginner",
232
+ "intermediate",
233
+ "expert"
234
+ ]
235
+ },
236
+ "pairs_with": {
237
+ "type": "object",
238
+ "description": "UI hint only; never a runtime dependency.",
239
+ "additionalProperties": false,
240
+ "properties": {
241
+ "prompts": {
242
+ "type": "array",
243
+ "items": {
244
+ "type": "string",
245
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
246
+ },
247
+ "uniqueItems": true
248
+ },
249
+ "personas": {
250
+ "type": "array",
251
+ "items": {
252
+ "type": "string",
253
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
254
+ },
255
+ "uniqueItems": true
256
+ },
257
+ "workflows": {
258
+ "type": "array",
259
+ "items": {
260
+ "type": "string",
261
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
262
+ },
263
+ "uniqueItems": true
264
+ },
265
+ "rules": {
266
+ "type": "array",
267
+ "items": {
268
+ "type": "string",
269
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
270
+ },
271
+ "uniqueItems": true
272
+ },
273
+ "styles": {
274
+ "type": "array",
275
+ "items": {
276
+ "type": "object",
277
+ "required": [
278
+ "id"
279
+ ],
280
+ "additionalProperties": false,
281
+ "properties": {
282
+ "id": {
283
+ "type": "string",
284
+ "pattern": "^(@[a-z0-9](-?[a-z0-9]){0,38}/)?(?=[a-z0-9-]{1,64}$)[a-z0-9]+(-[a-z0-9]+)*$"
285
+ },
286
+ "level": {
287
+ "type": "integer",
288
+ "minimum": 1,
289
+ "maximum": 5
290
+ }
291
+ }
292
+ }
293
+ }
294
+ }
295
+ },
296
+ "args": {
297
+ "type": "array",
298
+ "description": "Typed arguments, referenced in the body as {{name}}.",
299
+ "items": {
300
+ "type": "object",
301
+ "required": [
302
+ "name",
303
+ "description",
304
+ "type"
305
+ ],
306
+ "additionalProperties": false,
307
+ "properties": {
308
+ "name": {
309
+ "type": "string",
310
+ "pattern": "^[a-z][a-z0-9_]*$"
311
+ },
312
+ "description": {
313
+ "type": "string",
314
+ "minLength": 1,
315
+ "maxLength": 300
316
+ },
317
+ "type": {
318
+ "enum": [
319
+ "string",
320
+ "text",
321
+ "enum",
322
+ "number",
323
+ "boolean"
324
+ ]
325
+ },
326
+ "required": {
327
+ "type": "boolean"
328
+ },
329
+ "default": {
330
+ "type": [
331
+ "string",
332
+ "number",
333
+ "boolean"
334
+ ]
335
+ },
336
+ "enum": {
337
+ "type": "array",
338
+ "items": {
339
+ "type": "string"
340
+ },
341
+ "minItems": 2,
342
+ "uniqueItems": true
343
+ }
344
+ },
345
+ "if": {
346
+ "properties": {
347
+ "type": {
348
+ "const": "enum"
349
+ }
350
+ }
351
+ },
352
+ "then": {
353
+ "required": [
354
+ "enum"
355
+ ]
356
+ },
357
+ "else": {
358
+ "not": {
359
+ "required": [
360
+ "enum"
361
+ ]
362
+ }
363
+ }
364
+ }
365
+ },
366
+ "output_contract": {
367
+ "type": "object",
368
+ "required": [
369
+ "format"
370
+ ],
371
+ "additionalProperties": false,
372
+ "properties": {
373
+ "format": {
374
+ "enum": [
375
+ "markdown",
376
+ "json",
377
+ "yaml",
378
+ "text",
379
+ "diff"
380
+ ]
381
+ },
382
+ "sections": {
383
+ "type": "array",
384
+ "items": {
385
+ "type": "string",
386
+ "minLength": 1
387
+ },
388
+ "uniqueItems": true
389
+ },
390
+ "strict": {
391
+ "type": "boolean"
392
+ }
393
+ }
394
+ },
395
+ "authorship": {
396
+ "enum": [
397
+ "human",
398
+ "ai-assisted",
399
+ "ai-generated"
400
+ ]
401
+ },
402
+ "authors": {
403
+ "type": "array",
404
+ "items": {
405
+ "type": "string",
406
+ "pattern": "^[A-Za-z0-9](-?[A-Za-z0-9]){0,38}$"
407
+ },
408
+ "minItems": 1,
409
+ "uniqueItems": true,
410
+ "description": "GitHub logins of the accountable humans."
411
+ },
412
+ "last_reviewed": {
413
+ "type": "string",
414
+ "pattern": "^\\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\\d|3[01])$"
415
+ },
416
+ "changelog": {
417
+ "type": "array",
418
+ "items": {
419
+ "type": "object",
420
+ "required": [
421
+ "version",
422
+ "note"
423
+ ],
424
+ "additionalProperties": false,
425
+ "properties": {
426
+ "version": {
427
+ "type": "string",
428
+ "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)$"
429
+ },
430
+ "note": {
431
+ "type": "string",
432
+ "minLength": 1,
433
+ "maxLength": 300
434
+ }
435
+ }
436
+ }
437
+ },
438
+ "targets": {
439
+ "type": "object",
440
+ "description": "Per-target escape hatch. Every use prints a compiler warning.",
441
+ "propertyNames": {
442
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
443
+ },
444
+ "additionalProperties": {
445
+ "type": "object"
446
+ }
447
+ },
448
+ "voice": {
449
+ "type": "string",
450
+ "minLength": 1,
451
+ "maxLength": 200,
452
+ "description": "Persona only."
453
+ },
454
+ "tools": {
455
+ "type": "array",
456
+ "items": {
457
+ "enum": [
458
+ "read",
459
+ "search",
460
+ "edit",
461
+ "write",
462
+ "shell",
463
+ "web",
464
+ "git"
465
+ ]
466
+ },
467
+ "uniqueItems": true,
468
+ "description": "Persona only. Abstract tools, mapped per target."
469
+ },
470
+ "color": {
471
+ "enum": [
472
+ "red",
473
+ "orange",
474
+ "yellow",
475
+ "green",
476
+ "cyan",
477
+ "blue",
478
+ "purple",
479
+ "pink"
480
+ ],
481
+ "description": "Persona only."
482
+ },
483
+ "keep_coding_instructions": {
484
+ "type": "boolean",
485
+ "description": "Persona only."
486
+ },
487
+ "steps": {
488
+ "type": "array",
489
+ "minItems": 1,
490
+ "description": "Workflow only. Ordered, gated steps; each file lives in steps/.",
491
+ "items": {
492
+ "type": "object",
493
+ "required": [
494
+ "id",
495
+ "file",
496
+ "stage",
497
+ "gate"
498
+ ],
499
+ "additionalProperties": false,
500
+ "properties": {
501
+ "id": {
502
+ "type": "string",
503
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
504
+ },
505
+ "file": {
506
+ "type": "string",
507
+ "pattern": "^steps/\\d{2}-[a-z0-9]+(-[a-z0-9]+)*\\.md$"
508
+ },
509
+ "stage": {
510
+ "type": "string",
511
+ "pattern": "^[a-z0-9]+(-[a-z0-9]+)*$"
512
+ },
513
+ "gate": {
514
+ "enum": [
515
+ "approve",
516
+ "none"
517
+ ]
518
+ },
519
+ "artifact": {
520
+ "type": "string",
521
+ "minLength": 1
522
+ }
523
+ }
524
+ }
525
+ },
526
+ "applies_to": {
527
+ "type": "array",
528
+ "items": {
529
+ "type": "string",
530
+ "minLength": 1
531
+ },
532
+ "uniqueItems": true,
533
+ "description": "Rule only. Glob patterns; omit for an always-on rule."
534
+ },
535
+ "levels": {
536
+ "type": "array",
537
+ "minItems": 5,
538
+ "maxItems": 5,
539
+ "description": "Style only. Exactly 5 levels, from lightest (1) to strongest (5).",
540
+ "items": {
541
+ "type": "object",
542
+ "required": [
543
+ "label",
544
+ "instruction"
545
+ ],
546
+ "additionalProperties": false,
547
+ "properties": {
548
+ "label": {
549
+ "type": "string",
550
+ "minLength": 1,
551
+ "maxLength": 40
552
+ },
553
+ "instruction": {
554
+ "type": "string",
555
+ "minLength": 1,
556
+ "maxLength": 600
557
+ }
558
+ }
559
+ }
560
+ }
561
+ },
562
+ "allOf": [
563
+ {
564
+ "if": {
565
+ "properties": {
566
+ "kind": {
567
+ "const": "workflow"
568
+ }
569
+ }
570
+ },
571
+ "then": {
572
+ "required": [
573
+ "steps"
574
+ ]
575
+ },
576
+ "else": {
577
+ "not": {
578
+ "required": [
579
+ "steps"
580
+ ]
581
+ }
582
+ }
583
+ },
584
+ {
585
+ "if": {
586
+ "properties": {
587
+ "kind": {
588
+ "const": "style"
589
+ }
590
+ }
591
+ },
592
+ "then": {
593
+ "required": [
594
+ "levels"
595
+ ]
596
+ },
597
+ "else": {
598
+ "not": {
599
+ "required": [
600
+ "levels"
601
+ ]
602
+ }
603
+ }
604
+ },
605
+ {
606
+ "if": {
607
+ "properties": {
608
+ "kind": {
609
+ "const": "rule"
610
+ }
611
+ }
612
+ },
613
+ "else": {
614
+ "not": {
615
+ "required": [
616
+ "applies_to"
617
+ ]
618
+ }
619
+ }
620
+ },
621
+ {
622
+ "if": {
623
+ "properties": {
624
+ "kind": {
625
+ "const": "persona"
626
+ }
627
+ }
628
+ },
629
+ "else": {
630
+ "not": {
631
+ "anyOf": [
632
+ {
633
+ "required": [
634
+ "voice"
635
+ ]
636
+ },
637
+ {
638
+ "required": [
639
+ "tools"
640
+ ]
641
+ },
642
+ {
643
+ "required": [
644
+ "color"
645
+ ]
646
+ },
647
+ {
648
+ "required": [
649
+ "keep_coding_instructions"
650
+ ]
651
+ }
652
+ ]
653
+ }
654
+ }
655
+ },
656
+ {
657
+ "if": {
658
+ "properties": {
659
+ "status": {
660
+ "const": "deprecated"
661
+ }
662
+ },
663
+ "required": [
664
+ "status"
665
+ ]
666
+ },
667
+ "then": {
668
+ "required": [
669
+ "replaced_by"
670
+ ]
671
+ }
672
+ },
673
+ {
674
+ "if": {
675
+ "properties": {
676
+ "authorship": {
677
+ "enum": [
678
+ "ai-assisted",
679
+ "ai-generated"
680
+ ]
681
+ }
682
+ },
683
+ "required": [
684
+ "authorship"
685
+ ]
686
+ },
687
+ "then": {
688
+ "required": [
689
+ "authors"
690
+ ]
691
+ }
692
+ }
693
+ ]
694
+ }