Skill Tracer
Skills › Archify › archify › common.schema.json

common.schema.json

181 lines · archify/schemas/common.schema.json at a406594

1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://github.com/tt-a1i/archify/schemas/common.schema.json",
4 "title": "Archify Shared Definitions",
5 "$defs": {
6 "id": {
7 "type": "string",
8 "pattern": "^[a-zA-Z][a-zA-Z0-9_-]*$"
9 },
10 "locale": {
11 "type": "string",
12 "pattern": "^[a-z]{2,3}(-[A-Za-z0-9]{2,8})*$",
13 "maxLength": 35
14 },
15 "translations": {
16 "type": "object",
17 "propertyNames": { "pattern": "^[a-z][a-zA-Z0-9]*(\\.[a-z][a-zA-Z0-9]*)*$" },
18 "additionalProperties": { "type": "string", "minLength": 1, "maxLength": 400 },
19 "maxProperties": 600
20 },
21 "animation": {
22 "enum": ["trace", "none"]
23 },
24 "visualPreset": {
25 "enum": ["classic", "signal-flow", "blueprint", "editorial"]
26 },
27 "qualityProfile": {
28 "enum": ["standard", "showcase"]
29 },
30 "portableOutputPath": {
31 "description": "A portable POSIX-relative HTML output path. It must be safe to interpret identically on every supported host filesystem.",
32 "type": "string",
33 "minLength": 1,
34 "pattern": "^[^/]+(?:/[^/]+)*$",
35 "allOf": [
36 { "pattern": "(?:^|/)[^/]+[.][Hh][Tt][Mm][Ll]$" },
37 { "not": { "pattern": "[\\\\<>:\"|?*\\u0000-\\u001F\\u007F-\\u009F]" } },
38 { "not": { "pattern": "[\\uD800-\\uDFFF]" } },
39 { "not": { "pattern": "(^|/)[.]{1,2}(/|$)" } },
40 { "not": { "pattern": "[. ](/|$)" } },
41 { "not": { "pattern": "(^|/)[^/]{256}" } },
42 {
43 "not": {
44 "pattern": "(^|/)(?:[Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Nn][Ii][Nn][$]|[Cc][Oo][Nn][Oo][Uu][Tt][$]|[Cc][Oo][Mm][1-9¹²³]|[Ll][Pp][Tt][1-9¹²³])(?:[.]|/|$)"
45 }
46 },
47 {
48 "not": {
49 "pattern": "(^|/)[^/]*~[1-9][0-9]*(?:[.]|/|$)"
50 }
51 }
52 ]
53 },
54 "side": {
55 "enum": ["left", "right", "top", "bottom"]
56 },
57 "relationshipWidth": {
58 "type": "number",
59 "minimum": 0.5
60 },
61 "point": {
62 "type": "array",
63 "prefixItems": [
64 { "type": "number" },
65 { "type": "number" }
66 ],
67 "items": false,
68 "minItems": 2,
69 "maxItems": 2
70 },
71 "componentType": {
72 "enum": ["frontend", "backend", "database", "cloud", "security", "messagebus", "external"]
73 },
74 "nodeIcon": {
75 "description": "Decorative corner icon. Omit the icon field for the type default; none hides it. Does not change type, color, or legend grouping.",
76 "enum": ["calendar", "clock", "person", "briefcase", "flag", "moon", "frontend", "backend", "database", "cloud", "security", "messagebus", "external", "start", "active", "waiting", "decision", "success", "failure", "stop", "neutral", "none"]
77 },
78 "brandMark": {
79 "oneOf": [
80 {
81 "type": "string",
82 "minLength": 1,
83 "maxLength": 2048,
84 "anyOf": [
85 { "maxLength": 80, "pattern": "^[^\\r\\n]+$" },
86 { "pattern": "^https?://" }
87 ]
88 },
89 {
90 "type": "object",
91 "additionalProperties": false,
92 "required": ["url", "sha256"],
93 "properties": {
94 "url": { "type": "string", "minLength": 8, "maxLength": 2048, "pattern": "^https?://" },
95 "sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }
96 }
97 }
98 ]
99 },
100 "variant": {
101 "enum": ["default", "emphasis", "security", "dashed"]
102 },
103 "legendMode": {
104 "enum": ["auto", "all", "hidden"]
105 },
106 "legendEntry": {
107 "type": "object",
108 "additionalProperties": false,
109 "minProperties": 1,
110 "properties": {
111 "label": { "type": "string", "minLength": 1, "maxLength": 80 },
112 "visible": { "type": "boolean" }
113 }
114 },
115 "guidedViews": {
116 "type": "array",
117 "maxItems": 5,
118 "items": {
119 "type": "object",
120 "additionalProperties": false,
121 "required": ["id", "label", "focus"],
122 "properties": {
123 "id": { "$ref": "#/$defs/id" },
124 "label": { "type": "string", "minLength": 1, "maxLength": 48 },
125 "focus": {
126 "type": "array",
127 "minItems": 1,
128 "items": { "$ref": "#/$defs/id" }
129 },
130 "note": { "type": "string", "maxLength": 140 }
131 }
132 }
133 },
134 "repository": {
135 "type": "object",
136 "additionalProperties": false,
137 "required": ["url", "revision"],
138 "properties": {
139 "url": {
140 "type": "string",
141 "minLength": 1
142 },
143 "provider": { "enum": ["github", "gitee", "gitlab"] },
144 "link_mode": { "enum": ["web", "local-only"] },
145 "revision": { "type": "string", "pattern": "^[a-fA-F0-9]{40}$" }
146 }
147 },
148 "sourceReferences": {
149 "type": "array",
150 "minItems": 1,
151 "maxItems": 3,
152 "items": {
153 "type": "object",
154 "additionalProperties": false,
155 "required": ["path"],
156 "properties": {
157 "path": { "type": "string", "minLength": 1, "maxLength": 240 },
158 "line": { "type": "integer", "minimum": 1 },
159 "end_line": { "type": "integer", "minimum": 1 },
160 "label": { "type": "string", "minLength": 1, "maxLength": 48 }
161 }
162 }
163 },
164 "cards": {
165 "type": "array",
166 "items": {
167 "type": "object",
168 "additionalProperties": false,
169 "required": ["dot", "title", "items"],
170 "properties": {
171 "dot": { "enum": ["cyan", "emerald", "violet", "amber", "rose", "orange", "slate"] },
172 "title": { "type": "string", "minLength": 1 },
173 "items": {
174 "type": "array",
175 "items": { "type": "string" }
176 }
177 }
178 }
179 }
180 }