|
| 1 | +{ |
| 2 | + "$schema": "https://json-schema.org/draft/2020-12/schema", |
| 3 | + "$id": "https://mcp-tool-shop-org.github.io/mcpt-marketing/schema/marketing.schema.json", |
| 4 | + "title": "MarketIR Schema", |
| 5 | + "description": "Deterministic marketing intermediate representation for MCP Tool Shop tools.", |
| 6 | + |
| 7 | + "$defs": { |
| 8 | + "schemaVersion": { |
| 9 | + "type": "string", |
| 10 | + "pattern": "^\\d+\\.\\d+\\.\\d+$", |
| 11 | + "description": "Semver version of the schema this document conforms to." |
| 12 | + }, |
| 13 | + |
| 14 | + "toolId": { |
| 15 | + "type": "string", |
| 16 | + "pattern": "^tool\\.[a-z0-9-]+$" |
| 17 | + }, |
| 18 | + "audienceId": { |
| 19 | + "type": "string", |
| 20 | + "pattern": "^aud\\.[a-z0-9-]+$" |
| 21 | + }, |
| 22 | + "claimId": { |
| 23 | + "type": "string", |
| 24 | + "pattern": "^claim\\.[a-z0-9-]+\\.[a-z0-9-]+$" |
| 25 | + }, |
| 26 | + "evidenceId": { |
| 27 | + "type": "string", |
| 28 | + "pattern": "^ev\\.[a-z0-9-]+\\.[a-z0-9-]+\\.v\\d+$" |
| 29 | + }, |
| 30 | + "messageId": { |
| 31 | + "type": "string", |
| 32 | + "pattern": "^msg\\.[a-z0-9-]+\\.[a-z0-9-]+$" |
| 33 | + }, |
| 34 | + "campaignId": { |
| 35 | + "type": "string", |
| 36 | + "pattern": "^camp\\.[a-z0-9-]+\\.[a-z0-9-]+$" |
| 37 | + }, |
| 38 | + |
| 39 | + "claimStatus": { |
| 40 | + "type": "string", |
| 41 | + "enum": ["proven", "aspirational", "deprecated"] |
| 42 | + }, |
| 43 | + "evidenceType": { |
| 44 | + "type": "string", |
| 45 | + "enum": ["image", "text", "report", "video", "link"] |
| 46 | + }, |
| 47 | + "messageTone": { |
| 48 | + "type": "string", |
| 49 | + "enum": ["technical", "pragmatic", "playful", "executive"] |
| 50 | + }, |
| 51 | + "messageChannel": { |
| 52 | + "type": "string", |
| 53 | + "enum": ["web", "readme", "hn", "x", "linkedin", "newsletter", "presskit"] |
| 54 | + }, |
| 55 | + |
| 56 | + "constraints": { |
| 57 | + "type": "object", |
| 58 | + "description": "Soft advisory constraints for a channel or context.", |
| 59 | + "properties": { |
| 60 | + "maxChars": { |
| 61 | + "type": "integer", |
| 62 | + "minimum": 1 |
| 63 | + }, |
| 64 | + "maxSentences": { |
| 65 | + "type": "integer", |
| 66 | + "minimum": 1 |
| 67 | + }, |
| 68 | + "notes": { |
| 69 | + "type": "string" |
| 70 | + } |
| 71 | + }, |
| 72 | + "additionalProperties": false |
| 73 | + }, |
| 74 | + |
| 75 | + "claim": { |
| 76 | + "type": "object", |
| 77 | + "required": ["id", "status", "statement"], |
| 78 | + "properties": { |
| 79 | + "id": { "$ref": "#/$defs/claimId" }, |
| 80 | + "status": { "$ref": "#/$defs/claimStatus" }, |
| 81 | + "statement": { |
| 82 | + "type": "string", |
| 83 | + "description": "A falsifiable claim about the tool." |
| 84 | + }, |
| 85 | + "evidenceRefs": { |
| 86 | + "type": "array", |
| 87 | + "items": { "$ref": "#/$defs/evidenceId" }, |
| 88 | + "description": "Required when status is proven." |
| 89 | + }, |
| 90 | + "notes": { |
| 91 | + "type": "string" |
| 92 | + } |
| 93 | + }, |
| 94 | + "additionalProperties": false, |
| 95 | + "if": { |
| 96 | + "properties": { "status": { "const": "proven" } } |
| 97 | + }, |
| 98 | + "then": { |
| 99 | + "required": ["evidenceRefs"], |
| 100 | + "properties": { |
| 101 | + "evidenceRefs": { "minItems": 1 } |
| 102 | + } |
| 103 | + } |
| 104 | + }, |
| 105 | + |
| 106 | + "antiClaim": { |
| 107 | + "type": "object", |
| 108 | + "required": ["statement"], |
| 109 | + "properties": { |
| 110 | + "statement": { |
| 111 | + "type": "string", |
| 112 | + "description": "What the tool does NOT do. Prevents misuse and builds trust." |
| 113 | + }, |
| 114 | + "notes": { |
| 115 | + "type": "string" |
| 116 | + } |
| 117 | + }, |
| 118 | + "additionalProperties": false |
| 119 | + }, |
| 120 | + |
| 121 | + "message": { |
| 122 | + "type": "object", |
| 123 | + "required": ["id", "channel", "tone", "text", "claimRefs"], |
| 124 | + "properties": { |
| 125 | + "id": { "$ref": "#/$defs/messageId" }, |
| 126 | + "channel": { "$ref": "#/$defs/messageChannel" }, |
| 127 | + "tone": { "$ref": "#/$defs/messageTone" }, |
| 128 | + "text": { |
| 129 | + "type": "string", |
| 130 | + "description": "The message content." |
| 131 | + }, |
| 132 | + "claimRefs": { |
| 133 | + "type": "array", |
| 134 | + "items": { "$ref": "#/$defs/claimId" }, |
| 135 | + "minItems": 1, |
| 136 | + "description": "Every message must trace to at least one claim." |
| 137 | + }, |
| 138 | + "constraints": { "$ref": "#/$defs/constraints" }, |
| 139 | + "notes": { |
| 140 | + "type": "string" |
| 141 | + } |
| 142 | + }, |
| 143 | + "additionalProperties": false |
| 144 | + }, |
| 145 | + |
| 146 | + "tool": { |
| 147 | + "type": "object", |
| 148 | + "required": ["schemaVersion", "id", "name", "positioning", "audienceRefs", "claims", "antiClaims", "messages"], |
| 149 | + "properties": { |
| 150 | + "schemaVersion": { "$ref": "#/$defs/schemaVersion" }, |
| 151 | + "id": { "$ref": "#/$defs/toolId" }, |
| 152 | + "name": { |
| 153 | + "type": "string" |
| 154 | + }, |
| 155 | + "positioning": { |
| 156 | + "type": "object", |
| 157 | + "required": ["oneLiner", "valueProps"], |
| 158 | + "properties": { |
| 159 | + "oneLiner": { |
| 160 | + "type": "string", |
| 161 | + "description": "One sentence that explains the tool." |
| 162 | + }, |
| 163 | + "valueProps": { |
| 164 | + "type": "array", |
| 165 | + "items": { "type": "string" }, |
| 166 | + "minItems": 1, |
| 167 | + "description": "Key value propositions." |
| 168 | + } |
| 169 | + }, |
| 170 | + "additionalProperties": false |
| 171 | + }, |
| 172 | + "audienceRefs": { |
| 173 | + "type": "array", |
| 174 | + "items": { "$ref": "#/$defs/audienceId" }, |
| 175 | + "minItems": 1 |
| 176 | + }, |
| 177 | + "claims": { |
| 178 | + "type": "array", |
| 179 | + "items": { "$ref": "#/$defs/claim" }, |
| 180 | + "minItems": 1 |
| 181 | + }, |
| 182 | + "antiClaims": { |
| 183 | + "type": "array", |
| 184 | + "items": { "$ref": "#/$defs/antiClaim" }, |
| 185 | + "minItems": 1 |
| 186 | + }, |
| 187 | + "messages": { |
| 188 | + "type": "array", |
| 189 | + "items": { "$ref": "#/$defs/message" }, |
| 190 | + "minItems": 1 |
| 191 | + } |
| 192 | + }, |
| 193 | + "additionalProperties": false |
| 194 | + }, |
| 195 | + |
| 196 | + "audience": { |
| 197 | + "type": "object", |
| 198 | + "required": ["schemaVersion", "id", "name", "description", "painPoints"], |
| 199 | + "properties": { |
| 200 | + "schemaVersion": { "$ref": "#/$defs/schemaVersion" }, |
| 201 | + "id": { "$ref": "#/$defs/audienceId" }, |
| 202 | + "name": { |
| 203 | + "type": "string" |
| 204 | + }, |
| 205 | + "description": { |
| 206 | + "type": "string" |
| 207 | + }, |
| 208 | + "painPoints": { |
| 209 | + "type": "array", |
| 210 | + "items": { "type": "string" }, |
| 211 | + "minItems": 1 |
| 212 | + } |
| 213 | + }, |
| 214 | + "additionalProperties": false |
| 215 | + }, |
| 216 | + |
| 217 | + "evidence": { |
| 218 | + "type": "object", |
| 219 | + "required": ["id", "type", "format", "sha256", "bytes", "provenance"], |
| 220 | + "properties": { |
| 221 | + "id": { "$ref": "#/$defs/evidenceId" }, |
| 222 | + "type": { "$ref": "#/$defs/evidenceType" }, |
| 223 | + "format": { |
| 224 | + "type": "string", |
| 225 | + "description": "MIME type or file extension." |
| 226 | + }, |
| 227 | + "path": { |
| 228 | + "type": "string", |
| 229 | + "description": "Relative path within the repo." |
| 230 | + }, |
| 231 | + "url": { |
| 232 | + "type": "string", |
| 233 | + "format": "uri", |
| 234 | + "description": "External URL if evidence is not local." |
| 235 | + }, |
| 236 | + "sha256": { |
| 237 | + "type": "string", |
| 238 | + "pattern": "^[a-f0-9]{64}$" |
| 239 | + }, |
| 240 | + "bytes": { |
| 241 | + "type": "integer", |
| 242 | + "minimum": 0 |
| 243 | + }, |
| 244 | + "provenance": { |
| 245 | + "type": "object", |
| 246 | + "required": ["generator", "sourceCommit"], |
| 247 | + "properties": { |
| 248 | + "generator": { |
| 249 | + "type": "string", |
| 250 | + "description": "Script or human that produced this artifact." |
| 251 | + }, |
| 252 | + "sourceCommit": { |
| 253 | + "type": "string", |
| 254 | + "description": "Git commit SHA that produced the evidence." |
| 255 | + }, |
| 256 | + "notes": { |
| 257 | + "type": "string" |
| 258 | + } |
| 259 | + }, |
| 260 | + "additionalProperties": false |
| 261 | + } |
| 262 | + }, |
| 263 | + "additionalProperties": false, |
| 264 | + "anyOf": [ |
| 265 | + { "required": ["path"] }, |
| 266 | + { "required": ["url"] } |
| 267 | + ] |
| 268 | + }, |
| 269 | + |
| 270 | + "campaignPhase": { |
| 271 | + "type": "object", |
| 272 | + "required": ["name", "channels"], |
| 273 | + "properties": { |
| 274 | + "name": { |
| 275 | + "type": "string" |
| 276 | + }, |
| 277 | + "channels": { |
| 278 | + "type": "array", |
| 279 | + "items": { "$ref": "#/$defs/messageChannel" }, |
| 280 | + "minItems": 1 |
| 281 | + }, |
| 282 | + "messageRefs": { |
| 283 | + "type": "array", |
| 284 | + "items": { "$ref": "#/$defs/messageId" } |
| 285 | + }, |
| 286 | + "notes": { |
| 287 | + "type": "string" |
| 288 | + } |
| 289 | + }, |
| 290 | + "additionalProperties": false |
| 291 | + }, |
| 292 | + |
| 293 | + "campaign": { |
| 294 | + "type": "object", |
| 295 | + "required": ["schemaVersion", "id", "name", "toolRef", "audienceRefs", "phases"], |
| 296 | + "properties": { |
| 297 | + "schemaVersion": { "$ref": "#/$defs/schemaVersion" }, |
| 298 | + "id": { "$ref": "#/$defs/campaignId" }, |
| 299 | + "name": { |
| 300 | + "type": "string" |
| 301 | + }, |
| 302 | + "toolRef": { "$ref": "#/$defs/toolId" }, |
| 303 | + "audienceRefs": { |
| 304 | + "type": "array", |
| 305 | + "items": { "$ref": "#/$defs/audienceId" }, |
| 306 | + "minItems": 1 |
| 307 | + }, |
| 308 | + "phases": { |
| 309 | + "type": "array", |
| 310 | + "items": { "$ref": "#/$defs/campaignPhase" }, |
| 311 | + "minItems": 1 |
| 312 | + } |
| 313 | + }, |
| 314 | + "additionalProperties": false |
| 315 | + }, |
| 316 | + |
| 317 | + "fileRef": { |
| 318 | + "type": "object", |
| 319 | + "required": ["ref"], |
| 320 | + "properties": { |
| 321 | + "ref": { |
| 322 | + "type": "string", |
| 323 | + "description": "Relative path from marketing/data/ to the file." |
| 324 | + } |
| 325 | + }, |
| 326 | + "additionalProperties": false |
| 327 | + }, |
| 328 | + |
| 329 | + "index": { |
| 330 | + "type": "object", |
| 331 | + "required": ["schemaVersion", "tools", "audiences", "campaigns"], |
| 332 | + "properties": { |
| 333 | + "schemaVersion": { "$ref": "#/$defs/schemaVersion" }, |
| 334 | + "tools": { |
| 335 | + "type": "array", |
| 336 | + "items": { "$ref": "#/$defs/fileRef" } |
| 337 | + }, |
| 338 | + "audiences": { |
| 339 | + "type": "array", |
| 340 | + "items": { "$ref": "#/$defs/fileRef" } |
| 341 | + }, |
| 342 | + "campaigns": { |
| 343 | + "type": "array", |
| 344 | + "items": { "$ref": "#/$defs/fileRef" } |
| 345 | + } |
| 346 | + }, |
| 347 | + "additionalProperties": false |
| 348 | + } |
| 349 | + } |
| 350 | +} |
0 commit comments