@supatent/skills 0.5.0 → 0.5.1
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.
- package/package.json +1 -1
- package/skills/supatent-content-blog/SKILL.md +3 -0
- package/skills/supatent-content-landing/SKILL.md +3 -0
- package/skills/supatent-core/SKILL.md +14 -3
- package/skills/supatent-references/schema-reference.md +20 -1
- package/skills/supatent-references/workflow-reference.md +15 -1
- package/skills-codex/supatent-content-blog/SKILL.md +3 -0
- package/skills-codex/supatent-content-landing/SKILL.md +3 -0
- package/skills-codex/supatent-core/SKILL.md +14 -3
- package/skills-codex/supatent-references/schema-reference.md +20 -1
- package/skills-codex/supatent-references/workflow-reference.md +15 -1
package/package.json
CHANGED
|
@@ -170,6 +170,7 @@ Generate a URL-friendly slug from the title (lowercase, hyphens, no special char
|
|
|
170
170
|
**Body content:**
|
|
171
171
|
- Default length: 1000-1500 words
|
|
172
172
|
- Format: markdown with headings (H2, H3), paragraphs, lists, and emphasis as the content demands
|
|
173
|
+
- For Supatent assets in the `body`, use slug links: ``, `[Link](asset-slug)`, or `<img src="asset-slug" ...>`
|
|
173
174
|
- SEO-conscious writing: include target keywords in the first paragraph, use semantic keyword variations throughout, structure headings around searchable concepts
|
|
174
175
|
- Content-driven structure: do NOT use a rigid template. Let the topic dictate whether the post needs numbered lists, narrative flow, comparison tables, or a mix.
|
|
175
176
|
- Match the tone and style the user selected in the interview
|
|
@@ -243,6 +244,7 @@ After writing, check `.supatent/.validation-status.json` for errors. Common JSON
|
|
|
243
244
|
|-------|-------|-----|
|
|
244
245
|
| `unsupported @type` | Using BlogPosting instead of Article | Change `@type` to `"Article"` |
|
|
245
246
|
| `image: expected uri format` | Using asset slug instead of URL | Remove `image` or use a full URL |
|
|
247
|
+
| `markdown references missing asset slug` | `body` contains an asset slug link with no matching local asset | Add/update `.supatent/assets/{slug}.{locale}.json` or change link target |
|
|
246
248
|
| `required property 'name' is missing` | Author object missing name | Add `"name"` to the author Person object |
|
|
247
249
|
|
|
248
250
|
## Multi-Locale Translation
|
|
@@ -298,3 +300,4 @@ Format the guidance as:
|
|
|
298
300
|
> Here are the images you will need for this post: [list with recommended sizes and format notes]
|
|
299
301
|
|
|
300
302
|
Remind the user that images can be uploaded via the Supatent dashboard (drag-and-drop) or via the CLI asset upload flow. After uploading, set the `cover-image` field value to the asset slug returned by the upload.
|
|
303
|
+
For in-body assets, embed with slug syntax (`` or `<img src="asset-slug" ...>`), not raw URLs.
|
|
@@ -240,6 +240,7 @@ Confirm these counts with the user during adaptive questions. Adjust if requeste
|
|
|
240
240
|
- If context is too vague for a section, ask the user for more detail rather than generating filler
|
|
241
241
|
- Match the tone preference from the interview throughout all sections
|
|
242
242
|
- `features-list` on pricing tiers: use markdown bullet list format, one feature per line
|
|
243
|
+
- In markdown fields, reference Supatent assets by slug: ``, `[Link](asset-slug)`, or `<img src="asset-slug" ...>`
|
|
243
244
|
- `is-featured` on pricing tiers: set `"true"` on the recommended/most popular tier, `"false"` on others
|
|
244
245
|
- Image fields: leave empty string `""` -- note images needed in the Image Guidance section
|
|
245
246
|
- CTA URLs: use the website URL from the interview if provided, otherwise use placeholder `#`
|
|
@@ -331,6 +332,7 @@ After writing, check `.supatent/.validation-status.json` for errors. Common JSON
|
|
|
331
332
|
|-------|-------|-----|
|
|
332
333
|
| `unsupported @type` | Using WebPage instead of Organization | Change `@type` to `"Organization"` |
|
|
333
334
|
| `image: expected uri format` | Using asset slug instead of URL | Remove `image` or use a full URL |
|
|
335
|
+
| `markdown references missing asset slug` | Markdown content references an unknown asset slug | Add/update `.supatent/assets/{slug}.{locale}.json` or change link target |
|
|
334
336
|
| `mainEntity: required` | FAQPage missing Question array | Add at least one Question to `mainEntity` |
|
|
335
337
|
|
|
336
338
|
## Multi-Locale Translation
|
|
@@ -384,3 +386,4 @@ After content generation, provide a section-by-section image checklist. Only inc
|
|
|
384
386
|
| Metadata | -- | -- | No images |
|
|
385
387
|
|
|
386
388
|
Images can be uploaded via the Supatent dashboard (drag-and-drop) or the CLI asset upload flow. After uploading, set the image field value to the asset slug returned by the upload.
|
|
389
|
+
For markdown fields, embed/link those assets with slug syntax (`` or `<img src="asset-slug" ...>`).
|
|
@@ -64,8 +64,9 @@ npm view @supatent/skills version 2>/dev/null
|
|
|
64
64
|
|------|-----------|--------------|
|
|
65
65
|
| `text` | `textInput`, `textarea` | Plain string |
|
|
66
66
|
| `number` | `numberInput` | Numeric value |
|
|
67
|
-
| `image` | `singleImage`, `multiImage` |
|
|
68
|
-
| `
|
|
67
|
+
| `image` | `singleImage`, `multiImage` | Asset slug string (`string`/`string[]`) or legacy object |
|
|
68
|
+
| `video` | `singleVideo`, `multiVideo` | Asset slug string (`string`/`string[]`) or legacy object |
|
|
69
|
+
| `markdown` | `markdownEditor` | Markdown string (supports asset slugs in links and image embeds) |
|
|
69
70
|
| `jsonLd` | `jsonLdEditor` | JSON-LD structured data object |
|
|
70
71
|
|
|
71
72
|
**Interface determines the UI editor**, not the storage format. For example, `text` with `textInput` gives a single-line input; `text` with `textarea` gives a multi-line editor.
|
|
@@ -169,6 +170,16 @@ Write a JSON file to `.supatent/content/{schemaSlug}/{itemSlug}.{locale}.json`:
|
|
|
169
170
|
|
|
170
171
|
Field keys must match the field slugs defined in the schema. Each locale gets its own file (e.g., `my-post.en.json`, `my-post.fr.json`).
|
|
171
172
|
|
|
173
|
+
### Markdown asset slug links
|
|
174
|
+
|
|
175
|
+
For markdown fields, use asset slugs directly when linking or embedding Supatent assets:
|
|
176
|
+
|
|
177
|
+
- ``
|
|
178
|
+
- `[Link text](asset-slug)`
|
|
179
|
+
- `<img src="asset-slug" width="1200" height="630" alt="...">`
|
|
180
|
+
|
|
181
|
+
Do not use file extensions or full API URLs when referencing Supatent assets in markdown. Missing slugs generate warning-only `markdown-asset` validation warnings.
|
|
182
|
+
|
|
172
183
|
### Validating
|
|
173
184
|
|
|
174
185
|
If dev mode is running, validation happens automatically on file save. Otherwise:
|
|
@@ -215,7 +226,7 @@ The `interface` value is not valid for the given `type`. Each field type only su
|
|
|
215
226
|
|
|
216
227
|
### "Unknown field type"
|
|
217
228
|
|
|
218
|
-
|
|
229
|
+
Six field types are supported: `text`, `number`, `image`, `video`, `markdown`, `jsonLd`. Check for typos or capitalization errors (`jsonLd` not `jsonld` or `JsonLd`).
|
|
219
230
|
|
|
220
231
|
### "Singleton must use default slug"
|
|
221
232
|
|
|
@@ -13,6 +13,8 @@ Every field in a schema has a `type` and an `interface`. The type determines the
|
|
|
13
13
|
| `number` | `numberInput` | `number` or `null` | Numeric input; `null` represents empty (distinct from `0`) |
|
|
14
14
|
| `image` | `singleImage` | `string` or `null` | Asset slug string (e.g., `"hero-image"`), or legacy object with `assetPath` |
|
|
15
15
|
| `image` | `multiImage` | `string[]` | Array of asset slug strings (e.g., `["hero", "banner"]`) |
|
|
16
|
+
| `video` | `singleVideo` | `string` or `null` | Asset slug string (e.g., `"promo-video"`), or legacy object with `assetPath` |
|
|
17
|
+
| `video` | `multiVideo` | `string[]` | Array of asset slug strings (e.g., `["intro-video", "demo-video"]`) |
|
|
16
18
|
| `markdown` | `markdownEditor` | `string` | Markdown-formatted text |
|
|
17
19
|
| `jsonLd` | `jsonLdEditor` | `object` | JSON-LD object with `@context` and `@type` |
|
|
18
20
|
|
|
@@ -24,6 +26,7 @@ Every field in a schema has a `type` and an `interface`. The type determines the
|
|
|
24
26
|
text -> textInput, textarea
|
|
25
27
|
number -> numberInput
|
|
26
28
|
image -> singleImage, multiImage
|
|
29
|
+
video -> singleVideo, multiVideo
|
|
27
30
|
markdown -> markdownEditor
|
|
28
31
|
jsonLd -> jsonLdEditor
|
|
29
32
|
```
|
|
@@ -75,7 +78,7 @@ Schema files live at `.supatent/schema/{slug}.json`. The complete structure:
|
|
|
75
78
|
| `slug` | Yes | `string` | Unique within the schema. Lowercase alphanumeric with hyphens. |
|
|
76
79
|
| `name` | Yes | `string` | Display name. Minimum 1 character. |
|
|
77
80
|
| `description` | No | `string` | Optional description of the field's purpose. |
|
|
78
|
-
| `type` | Yes | `string` | One of: `text`, `number`, `image`, `markdown`, `jsonLd` |
|
|
81
|
+
| `type` | Yes | `string` | One of: `text`, `number`, `image`, `video`, `markdown`, `jsonLd` |
|
|
79
82
|
| `interface` | Yes | `string` | Must be valid for the field's type (see compatibility map above). |
|
|
80
83
|
| `order` | Yes | `number` | Integer >= 0. Controls display order in the editor. |
|
|
81
84
|
|
|
@@ -163,9 +166,25 @@ The file is a flat JSON object where keys are field slugs from the schema:
|
|
|
163
166
|
| `number` | `number` or `null` | `42` or `null` |
|
|
164
167
|
| `image` (singleImage) | `string` (asset slug) or `null` | `"hero-image"` |
|
|
165
168
|
| `image` (multiImage) | `string[]` (asset slugs) | `["photo-1", "photo-2"]` |
|
|
169
|
+
| `video` (singleVideo) | `string` (asset slug) or `null` | `"promo-video"` |
|
|
170
|
+
| `video` (multiVideo) | `string[]` (asset slugs) | `["intro-video", "demo-video"]` |
|
|
166
171
|
| `markdown` | `string` | `"# Heading\n\nParagraph"` |
|
|
167
172
|
| `jsonLd` | `object` | `{ "@context": "https://schema.org", "@type": "Article" }` |
|
|
168
173
|
|
|
174
|
+
### Markdown Asset Slug Syntax
|
|
175
|
+
|
|
176
|
+
Markdown fields support direct asset slug references. Use these forms inside markdown content:
|
|
177
|
+
|
|
178
|
+
- Image embed (resolved to optimized image URL): ``
|
|
179
|
+
- Asset link (resolved to asset URL): `[Download file](asset-slug)`
|
|
180
|
+
- HTML image tag (resolved to optimized image URL): `<img src="asset-slug" width="1200" height="630" alt="Hero">`
|
|
181
|
+
|
|
182
|
+
Rules:
|
|
183
|
+
|
|
184
|
+
- Use raw slugs only (example: `hero-image`), not full URLs and not file extensions.
|
|
185
|
+
- Slugs must match `^[a-z0-9]+(?:-[a-z0-9]+)*$`.
|
|
186
|
+
- Missing slugs produce `markdown-asset` warnings (non-blocking).
|
|
187
|
+
|
|
169
188
|
### File Naming
|
|
170
189
|
|
|
171
190
|
- Collection: `{itemSlug}.{locale}.json` (e.g., `my-post.en.json`, `my-post.fr.json`)
|
|
@@ -173,6 +173,7 @@ All Supatent files live under the `.supatent/` directory in the project root:
|
|
|
173
173
|
- `text` -> `textInput`, `textarea`
|
|
174
174
|
- `number` -> `numberInput`
|
|
175
175
|
- `image` -> `singleImage`, `multiImage`
|
|
176
|
+
- `video` -> `singleVideo`, `multiVideo`
|
|
176
177
|
- `markdown` -> `markdownEditor`
|
|
177
178
|
- `jsonLd` -> `jsonLdEditor`
|
|
178
179
|
|
|
@@ -208,6 +209,19 @@ All Supatent files live under the `.supatent/` directory in the project root:
|
|
|
208
209
|
|
|
209
210
|
**Fix:** Add the missing field to the content file with the correct value type.
|
|
210
211
|
|
|
212
|
+
### Missing Markdown Asset Slug (Warning)
|
|
213
|
+
|
|
214
|
+
**Warning:** `Field 'body': markdown references missing asset slug 'hero-image'`
|
|
215
|
+
|
|
216
|
+
**Cause:** A markdown field references an asset slug that does not exist in local asset metadata. Checked forms include:
|
|
217
|
+
- ``
|
|
218
|
+
- `[text](asset-slug)`
|
|
219
|
+
- `<img src="asset-slug" ...>`
|
|
220
|
+
|
|
221
|
+
**Fix:** Create the asset metadata/file for that slug (for example `.supatent/assets/hero-image.en.json`) or update the markdown link to an existing slug.
|
|
222
|
+
|
|
223
|
+
**Agent note:** This is warning-only (`type: "markdown-asset"`). It appears in `supatent validate`, `supatent dev`, and pre-push validation, but does not block sync.
|
|
224
|
+
|
|
211
225
|
### JSON-LD Validation Errors
|
|
212
226
|
|
|
213
227
|
**Error:** `Field 'structured-data': @root: Missing required property "@context"` or `Missing required property "@type"`
|
|
@@ -333,7 +347,7 @@ The `.validation-status.json` file is written by `supatent validate` and `supate
|
|
|
333
347
|
**Key fields for AI agents:**
|
|
334
348
|
- `valid`: `true` if no errors (warnings are acceptable)
|
|
335
349
|
- `errors[]`: Each error includes `path`, `message`, and `help` (actionable fix instruction)
|
|
336
|
-
- `warnings[]`: Non-blocking issues (locale coverage, empty JSON-LD fields)
|
|
350
|
+
- `warnings[]`: Non-blocking issues (locale coverage, empty JSON-LD fields, missing markdown asset slugs)
|
|
337
351
|
- `trigger`: What caused this validation (`"file-change"`, `"manual"`, or `"startup"`)
|
|
338
352
|
|
|
339
353
|
**Workflow for AI agents:**
|
|
@@ -168,6 +168,7 @@ Generate a URL-friendly slug from the title (lowercase, hyphens, no special char
|
|
|
168
168
|
**Body content:**
|
|
169
169
|
- Default length: 1000-1500 words
|
|
170
170
|
- Format: markdown with headings (H2, H3), paragraphs, lists, and emphasis as the content demands
|
|
171
|
+
- For Supatent assets in the `body`, use slug links: ``, `[Link](asset-slug)`, or `<img src="asset-slug" ...>`
|
|
171
172
|
- SEO-conscious writing: include target keywords in the first paragraph, use semantic keyword variations throughout, structure headings around searchable concepts
|
|
172
173
|
- Content-driven structure: do NOT use a rigid template. Let the topic dictate whether the post needs numbered lists, narrative flow, comparison tables, or a mix.
|
|
173
174
|
- Match the tone and style the user selected in the interview
|
|
@@ -241,6 +242,7 @@ After writing, check `.supatent/.validation-status.json` for errors. Common JSON
|
|
|
241
242
|
|-------|-------|-----|
|
|
242
243
|
| `unsupported @type` | Using BlogPosting instead of Article | Change `@type` to `"Article"` |
|
|
243
244
|
| `image: expected uri format` | Using asset slug instead of URL | Remove `image` or use a full URL |
|
|
245
|
+
| `markdown references missing asset slug` | `body` contains an asset slug link with no matching local asset | Add/update `.supatent/assets/{slug}.{locale}.json` or change link target |
|
|
244
246
|
| `required property 'name' is missing` | Author object missing name | Add `"name"` to the author Person object |
|
|
245
247
|
|
|
246
248
|
## Multi-Locale Translation
|
|
@@ -296,3 +298,4 @@ Format the guidance as:
|
|
|
296
298
|
> Here are the images you will need for this post: [list with recommended sizes and format notes]
|
|
297
299
|
|
|
298
300
|
Remind the user that images can be uploaded via the Supatent dashboard (drag-and-drop) or via the CLI asset upload flow. After uploading, set the `cover-image` field value to the asset slug returned by the upload.
|
|
301
|
+
For in-body assets, embed with slug syntax (`` or `<img src="asset-slug" ...>`), not raw URLs.
|
|
@@ -238,6 +238,7 @@ Confirm these counts with the user during adaptive questions. Adjust if requeste
|
|
|
238
238
|
- If context is too vague for a section, ask the user for more detail rather than generating filler
|
|
239
239
|
- Match the tone preference from the interview throughout all sections
|
|
240
240
|
- `features-list` on pricing tiers: use markdown bullet list format, one feature per line
|
|
241
|
+
- In markdown fields, reference Supatent assets by slug: ``, `[Link](asset-slug)`, or `<img src="asset-slug" ...>`
|
|
241
242
|
- `is-featured` on pricing tiers: set `"true"` on the recommended/most popular tier, `"false"` on others
|
|
242
243
|
- Image fields: leave empty string `""` -- note images needed in the Image Guidance section
|
|
243
244
|
- CTA URLs: use the website URL from the interview if provided, otherwise use placeholder `#`
|
|
@@ -329,6 +330,7 @@ After writing, check `.supatent/.validation-status.json` for errors. Common JSON
|
|
|
329
330
|
|-------|-------|-----|
|
|
330
331
|
| `unsupported @type` | Using WebPage instead of Organization | Change `@type` to `"Organization"` |
|
|
331
332
|
| `image: expected uri format` | Using asset slug instead of URL | Remove `image` or use a full URL |
|
|
333
|
+
| `markdown references missing asset slug` | Markdown content references an unknown asset slug | Add/update `.supatent/assets/{slug}.{locale}.json` or change link target |
|
|
332
334
|
| `mainEntity: required` | FAQPage missing Question array | Add at least one Question to `mainEntity` |
|
|
333
335
|
|
|
334
336
|
## Multi-Locale Translation
|
|
@@ -382,3 +384,4 @@ After content generation, provide a section-by-section image checklist. Only inc
|
|
|
382
384
|
| Metadata | -- | -- | No images |
|
|
383
385
|
|
|
384
386
|
Images can be uploaded via the Supatent dashboard (drag-and-drop) or the CLI asset upload flow. After uploading, set the image field value to the asset slug returned by the upload.
|
|
387
|
+
For markdown fields, embed/link those assets with slug syntax (`` or `<img src="asset-slug" ...>`).
|
|
@@ -63,8 +63,9 @@ npm view @supatent/skills version 2>/dev/null
|
|
|
63
63
|
|------|-----------|--------------|
|
|
64
64
|
| `text` | `textInput`, `textarea` | Plain string |
|
|
65
65
|
| `number` | `numberInput` | Numeric value |
|
|
66
|
-
| `image` | `singleImage`, `multiImage` |
|
|
67
|
-
| `
|
|
66
|
+
| `image` | `singleImage`, `multiImage` | Asset slug string (`string`/`string[]`) or legacy object |
|
|
67
|
+
| `video` | `singleVideo`, `multiVideo` | Asset slug string (`string`/`string[]`) or legacy object |
|
|
68
|
+
| `markdown` | `markdownEditor` | Markdown string (supports asset slugs in links and image embeds) |
|
|
68
69
|
| `jsonLd` | `jsonLdEditor` | JSON-LD structured data object |
|
|
69
70
|
|
|
70
71
|
**Interface determines the UI editor**, not the storage format. For example, `text` with `textInput` gives a single-line input; `text` with `textarea` gives a multi-line editor.
|
|
@@ -168,6 +169,16 @@ Write a JSON file to `.supatent/content/{schemaSlug}/{itemSlug}.{locale}.json`:
|
|
|
168
169
|
|
|
169
170
|
Field keys must match the field slugs defined in the schema. Each locale gets its own file (e.g., `my-post.en.json`, `my-post.fr.json`).
|
|
170
171
|
|
|
172
|
+
### Markdown asset slug links
|
|
173
|
+
|
|
174
|
+
For markdown fields, use asset slugs directly when linking or embedding Supatent assets:
|
|
175
|
+
|
|
176
|
+
- ``
|
|
177
|
+
- `[Link text](asset-slug)`
|
|
178
|
+
- `<img src="asset-slug" width="1200" height="630" alt="...">`
|
|
179
|
+
|
|
180
|
+
Do not use file extensions or full API URLs when referencing Supatent assets in markdown. Missing slugs generate warning-only `markdown-asset` validation warnings.
|
|
181
|
+
|
|
171
182
|
### Validating
|
|
172
183
|
|
|
173
184
|
If dev mode is running, validation happens automatically on file save. Otherwise:
|
|
@@ -214,7 +225,7 @@ The `interface` value is not valid for the given `type`. Each field type only su
|
|
|
214
225
|
|
|
215
226
|
### "Unknown field type"
|
|
216
227
|
|
|
217
|
-
|
|
228
|
+
Six field types are supported: `text`, `number`, `image`, `video`, `markdown`, `jsonLd`. Check for typos or capitalization errors (`jsonLd` not `jsonld` or `JsonLd`).
|
|
218
229
|
|
|
219
230
|
### "Singleton must use default slug"
|
|
220
231
|
|
|
@@ -13,6 +13,8 @@ Every field in a schema has a `type` and an `interface`. The type determines the
|
|
|
13
13
|
| `number` | `numberInput` | `number` or `null` | Numeric input; `null` represents empty (distinct from `0`) |
|
|
14
14
|
| `image` | `singleImage` | `string` or `null` | Asset slug string (e.g., `"hero-image"`), or legacy object with `assetPath` |
|
|
15
15
|
| `image` | `multiImage` | `string[]` | Array of asset slug strings (e.g., `["hero", "banner"]`) |
|
|
16
|
+
| `video` | `singleVideo` | `string` or `null` | Asset slug string (e.g., `"promo-video"`), or legacy object with `assetPath` |
|
|
17
|
+
| `video` | `multiVideo` | `string[]` | Array of asset slug strings (e.g., `["intro-video", "demo-video"]`) |
|
|
16
18
|
| `markdown` | `markdownEditor` | `string` | Markdown-formatted text |
|
|
17
19
|
| `jsonLd` | `jsonLdEditor` | `object` | JSON-LD object with `@context` and `@type` |
|
|
18
20
|
|
|
@@ -24,6 +26,7 @@ Every field in a schema has a `type` and an `interface`. The type determines the
|
|
|
24
26
|
text -> textInput, textarea
|
|
25
27
|
number -> numberInput
|
|
26
28
|
image -> singleImage, multiImage
|
|
29
|
+
video -> singleVideo, multiVideo
|
|
27
30
|
markdown -> markdownEditor
|
|
28
31
|
jsonLd -> jsonLdEditor
|
|
29
32
|
```
|
|
@@ -75,7 +78,7 @@ Schema files live at `.supatent/schema/{slug}.json`. The complete structure:
|
|
|
75
78
|
| `slug` | Yes | `string` | Unique within the schema. Lowercase alphanumeric with hyphens. |
|
|
76
79
|
| `name` | Yes | `string` | Display name. Minimum 1 character. |
|
|
77
80
|
| `description` | No | `string` | Optional description of the field's purpose. |
|
|
78
|
-
| `type` | Yes | `string` | One of: `text`, `number`, `image`, `markdown`, `jsonLd` |
|
|
81
|
+
| `type` | Yes | `string` | One of: `text`, `number`, `image`, `video`, `markdown`, `jsonLd` |
|
|
79
82
|
| `interface` | Yes | `string` | Must be valid for the field's type (see compatibility map above). |
|
|
80
83
|
| `order` | Yes | `number` | Integer >= 0. Controls display order in the editor. |
|
|
81
84
|
|
|
@@ -163,9 +166,25 @@ The file is a flat JSON object where keys are field slugs from the schema:
|
|
|
163
166
|
| `number` | `number` or `null` | `42` or `null` |
|
|
164
167
|
| `image` (singleImage) | `string` (asset slug) or `null` | `"hero-image"` |
|
|
165
168
|
| `image` (multiImage) | `string[]` (asset slugs) | `["photo-1", "photo-2"]` |
|
|
169
|
+
| `video` (singleVideo) | `string` (asset slug) or `null` | `"promo-video"` |
|
|
170
|
+
| `video` (multiVideo) | `string[]` (asset slugs) | `["intro-video", "demo-video"]` |
|
|
166
171
|
| `markdown` | `string` | `"# Heading\n\nParagraph"` |
|
|
167
172
|
| `jsonLd` | `object` | `{ "@context": "https://schema.org", "@type": "Article" }` |
|
|
168
173
|
|
|
174
|
+
### Markdown Asset Slug Syntax
|
|
175
|
+
|
|
176
|
+
Markdown fields support direct asset slug references. Use these forms inside markdown content:
|
|
177
|
+
|
|
178
|
+
- Image embed (resolved to optimized image URL): ``
|
|
179
|
+
- Asset link (resolved to asset URL): `[Download file](asset-slug)`
|
|
180
|
+
- HTML image tag (resolved to optimized image URL): `<img src="asset-slug" width="1200" height="630" alt="Hero">`
|
|
181
|
+
|
|
182
|
+
Rules:
|
|
183
|
+
|
|
184
|
+
- Use raw slugs only (example: `hero-image`), not full URLs and not file extensions.
|
|
185
|
+
- Slugs must match `^[a-z0-9]+(?:-[a-z0-9]+)*$`.
|
|
186
|
+
- Missing slugs produce `markdown-asset` warnings (non-blocking).
|
|
187
|
+
|
|
169
188
|
### File Naming
|
|
170
189
|
|
|
171
190
|
- Collection: `{itemSlug}.{locale}.json` (e.g., `my-post.en.json`, `my-post.fr.json`)
|
|
@@ -173,6 +173,7 @@ All Supatent files live under the `.supatent/` directory in the project root:
|
|
|
173
173
|
- `text` -> `textInput`, `textarea`
|
|
174
174
|
- `number` -> `numberInput`
|
|
175
175
|
- `image` -> `singleImage`, `multiImage`
|
|
176
|
+
- `video` -> `singleVideo`, `multiVideo`
|
|
176
177
|
- `markdown` -> `markdownEditor`
|
|
177
178
|
- `jsonLd` -> `jsonLdEditor`
|
|
178
179
|
|
|
@@ -208,6 +209,19 @@ All Supatent files live under the `.supatent/` directory in the project root:
|
|
|
208
209
|
|
|
209
210
|
**Fix:** Add the missing field to the content file with the correct value type.
|
|
210
211
|
|
|
212
|
+
### Missing Markdown Asset Slug (Warning)
|
|
213
|
+
|
|
214
|
+
**Warning:** `Field 'body': markdown references missing asset slug 'hero-image'`
|
|
215
|
+
|
|
216
|
+
**Cause:** A markdown field references an asset slug that does not exist in local asset metadata. Checked forms include:
|
|
217
|
+
- ``
|
|
218
|
+
- `[text](asset-slug)`
|
|
219
|
+
- `<img src="asset-slug" ...>`
|
|
220
|
+
|
|
221
|
+
**Fix:** Create the asset metadata/file for that slug (for example `.supatent/assets/hero-image.en.json`) or update the markdown link to an existing slug.
|
|
222
|
+
|
|
223
|
+
**Agent note:** This is warning-only (`type: "markdown-asset"`). It appears in `supatent validate`, `supatent dev`, and pre-push validation, but does not block sync.
|
|
224
|
+
|
|
211
225
|
### JSON-LD Validation Errors
|
|
212
226
|
|
|
213
227
|
**Error:** `Field 'structured-data': @root: Missing required property "@context"` or `Missing required property "@type"`
|
|
@@ -333,7 +347,7 @@ The `.validation-status.json` file is written by `supatent validate` and `supate
|
|
|
333
347
|
**Key fields for AI agents:**
|
|
334
348
|
- `valid`: `true` if no errors (warnings are acceptable)
|
|
335
349
|
- `errors[]`: Each error includes `path`, `message`, and `help` (actionable fix instruction)
|
|
336
|
-
- `warnings[]`: Non-blocking issues (locale coverage, empty JSON-LD fields)
|
|
350
|
+
- `warnings[]`: Non-blocking issues (locale coverage, empty JSON-LD fields, missing markdown asset slugs)
|
|
337
351
|
- `trigger`: What caused this validation (`"file-change"`, `"manual"`, or `"startup"`)
|
|
338
352
|
|
|
339
353
|
**Workflow for AI agents:**
|