Load Artifact
@community/step-load-artifact
$ prime install @community/step-load-artifact Projection
Always in _index.xml · the agent never has to ask for this.
LoadArtifact [step] v1.0.0
Loaded when retrieval picks the atom as adjacent / supporting.
LoadArtifact [step] v1.0.0
signature: (artifact: URL | FilePath | Base64Image) -> Document effect: read-only
Errors
- LoadTimeout
- NotFound
- UnsupportedFormat
Body
1. Detect artifact type from extension or MIME:
- .html / .htm → parse as HTML Document
- .png / .jpg / .webp / .gif → treat as screenshot Image
- .fig / .sketch → treat as design file reference (metadata only)
- .pdf → extract text + images per page
2. For URL: fetch with a 30-second timeout. On timeout → throw LoadTimeout.
3. For Image: pass to vision model for structural analysis; extract:
- bounding regions of distinct UI components
- dominant colors (hex values)
- approximate text content
4. For HTML: parse DOM; collect:
- all interactive elements (buttons, links, inputs)
- computed styles on focusable elements
- ARIA roles and labels
5. Return unified Document with fields: { type, raw, components[], colors[], text, metadata }
Loaded when retrieval picks the atom as a focal / direct hit.
LoadArtifact [step] v1.0.0
signature: (artifact: URL | FilePath | Base64Image) -> Document effect: read-only
Errors
- LoadTimeout
- NotFound
- UnsupportedFormat
Body
1. Detect artifact type from extension or MIME:
- .html / .htm → parse as HTML Document
- .png / .jpg / .webp / .gif → treat as screenshot Image
- .fig / .sketch → treat as design file reference (metadata only)
- .pdf → extract text + images per page
2. For URL: fetch with a 30-second timeout. On timeout → throw LoadTimeout.
3. For Image: pass to vision model for structural analysis; extract:
- bounding regions of distinct UI components
- dominant colors (hex values)
- approximate text content
4. For HTML: parse DOM; collect:
- all interactive elements (buttons, links, inputs)
- computed styles on focusable elements
- ARIA roles and labels
5. Return unified Document with fields: { type, raw, components[], colors[], text, metadata }
Errors
- LoadTimeout
- NotFound
- UnsupportedFormat
Body
1. Detect artifact type from extension or MIME:
- .html / .htm → parse as HTML Document
- .png / .jpg / .webp / .gif → treat as screenshot Image
- .fig / .sketch → treat as design file reference (metadata only)
- .pdf → extract text + images per page
2. For URL: fetch with a 30-second timeout. On timeout → throw LoadTimeout.
3. For Image: pass to vision model for structural analysis; extract:
- bounding regions of distinct UI components
- dominant colors (hex values)
- approximate text content
4. For HTML: parse DOM; collect:
- all interactive elements (buttons, links, inputs)
- computed styles on focusable elements
- ARIA roles and labels
5. Return unified Document with fields: { type, raw, components[], colors[], text, metadata }
Source
prime-system/examples/frontend-design/primes/compiled/@community/step-load-artifact/atom.yaml