Sprite Data Model & Schema
iris intermediate 5 min read
ELI5
A sprite is like a detailed résumé for an AI agent. It has a unique name (like SOL-FORGE), a version number, a job description (system_prompt), a list of skills (capabilities), and a cryptographic ID badge (fingerprint). Just like a résumé, it must follow strict formatting rules so every system can read it the same way.
Technical Deep Dive
Sprite JSON Schema (iris.schema.json)
A valid Sprite document must pass iris.schema.json (Draft 2020-12). It is one of three top-level types (mutually exclusive via oneOf with Sprite, Council, Chain).
Required Fields
| Field | Type | Constraints |
|---|---|---|
id | UUID | Server-generated, lowercase RFC 4122 |
name | string | ^[A-Z][A-Z0-9]*(-[A-Z0-9]+)*$, 2–64 chars. Examples: SOL-FORGE, CORTEX-01, LEWIS-06 |
version | string | Full SemVer 2.0.0 with optional pre-release and build metadata |
capabilities | array | minItems: 1, uniqueItems. Each capability has name, description, parameters (JSON Schema) |
system_prompt | string | Up to 65,536 chars; can be inline or $ref: URI to external file |
metadata | object | Required sub-fields: author, created, updated, tags |
fingerprint | object | type (enum: blake3, sha256) + hash (64-char lowercase hex) |
Optional Fields
| Field | Type | Purpose |
|---|---|---|
chains | UUID[] | References to chain IDs this sprite participates in |
tests | TestCase[] | Declarative test cases for sprite behaviour validation |
role | enum | One of: architect, reviewer, documenter, operator, test-architect, planner |
protected | boolean | If true, cannot be bypassed or deleted without ?force=true |
gate_authority | boolean | If true, this sprite holds veto authority in its council (max 1 per council) |
Class Diagram
classDiagram class Sprite { +UUID id +SpriteName name +Semver version +Role role +Capability[] capabilities +string system_prompt +SpriteMetadata metadata +Fingerprint fingerprint +UUID[] chains +TestCase[] tests +boolean protected +boolean gate_authority +from_file(path) Sprite +validate(strict) boolean +compute_fingerprint() HexHash } class Capability { +string name +string description +JSONSchema parameters } class SpriteMetadata { +string author +datetime created +datetime updated +string[] tags } class Fingerprint { +HashAlgorithm type +HexHash hash } class TestCase { +string name +object input +object expected_output +string[] tags } Sprite --> Capability : has Sprite --> SpriteMetadata : has Sprite --> Fingerprint : has Sprite --> TestCase : hasSprite Role Hierarchy
| Role | Authority | Typical Example |
|---|---|---|
architect | Design decisions, default chain routing | WATNEY-01 |
reviewer | Code/content review; protected: true means cannot bypass | BECK-02 |
documenter | Technical writing, documentation generation | JOHANSSEN-03 |
operator | CI/CD, deployment, infrastructure | MARTINEZ-04 |
test-architect | Test strategy, validation | VOGEL-05 |
planner | Planning, gate authority (veto power) | LEWIS-06 |
Capability Structure
Each capability is a JSON Schema-described interface:
{ "name": "generate_code", "description": "Generate production-ready code from a specification", "parameters": { "type": "object", "properties": { "language": { "type": "string", "enum": ["python", "typescript", "rust"] }, "spec": { "type": "string", "minLength": 1 } }, "required": ["language", "spec"] }}Packet Structure Diagram
packet-beta title Sprite Fingerprint Packet 0-3: "algo" 4-7: "ver" 8-39: "hash_lo" 40-71: "hash_hi"The fingerprint format is blake3:{64-char-hex} or sha256:{64-char-hex}. The 64-character hex string represents a 256-bit digest.
Key Terms
- SpriteName → Strict uppercase pattern:
^[A-Z][A-Z0-9]*(-[A-Z0-9]+)*$. No lowercase, no underscores. - Capability → A named skill with a JSON Schema parameter definition, declaring what a sprite can do
- Protected sprite → A sprite that cannot be bypassed in chain execution; requires
?force=truefor deletion - Gate authority → The single sprite per council with veto power over chain execution
- Fingerprint → Cryptographic identity hash computed via the 5-stage Blake3 canonical pipeline
- SemVer → Semantic Versioning 2.0.0; IRIS supports pre-release (
1.0.0-alpha) and build metadata (1.0.0+build.123)
Q&A
Q: Why are sprite names uppercase with hyphens?
A: The naming convention (SOL-FORGE, CORTEX-01) creates visual distinction from variables, file names, and standard identifiers. It also prevents accidental collisions with common words. The regex enforces machine-parseable uniformity.
Q: Can a sprite have zero capabilities?
A: No. capabilities requires minItems: 1 in the JSON Schema. A sprite without capabilities would have no defined behaviour.
Q: What happens to the fingerprint when I update a sprite?
A: The fingerprint is recomputed on every PUT. The server strips id, created, fingerprint fields from the canonical representation before hashing, so only semantic changes affect the hash.
Q: Can the system_prompt reference an external file?
A: Yes. Use $ref: https://... or $ref: file:///... URIs. The server dereferences these before validation. The referenced content becomes part of the canonical representation for fingerprinting.
Examples
A sprite is like a skilled tradesperson’s union card:
- Name = Their registered trade name (
SOL-FORGElike “Master Smith”) - Version = Their certification level (1.0.0 = apprentice, 2.0.0 = journeyman, 3.0.0 = master)
- Capabilities = Their licensed skills (welding, plumbing, electrical)
- System prompt = Their professional code of conduct and specialty instructions
- Fingerprint = The union’s tamper-proof hologram on their card — proves it’s authentic
neighbors on the map
- Council Orchestration Model creating a new council
- Chain & ChainStep Schema designing a new chain
- GRACE Session Structure & Context Lifecycle starting a new GRACE session