Skip to content

Storyblok copy limits ​

Storyblok projects may set cms_schema and cms_stories in the adapter to local JSON exports. Run devkit design adapter-check before implementation and again after source corrections; no credentials or live calls are used. Both paths are required together; without them copy is unchecked.

The schema export contains components entries with name and schema; the story export contains stories with stable uuid and content. Nested bloks retain their _uid. Supply one resolved locale per snapshot; unresolved field-level translation keys (__i18n__) stop with a specific diagnostic instead of claiming coverage. Missing/duplicate identities, unknown components/fields, malformed exports and unsupported limits stop with exit 2.

COPY_SLOT JSON derives text/textarea/markdown maxima directly from schema max_length (missing/null: unbounded) and minimum 1 for required fields, otherwise 0. Component/field/type identify the slot; variant selectors remain story data. Desktop/mobile lines and width remain null because schema cannot establish rendered limits.

Counting uses raw UTF-16 code units, including whitespace, newlines and Markdown syntax; no trimming, normalization or truncation. This is the adapter convention, not a vendor guarantee of Unicode parity. Required missing/null/empty strings and wrong types produce findings too. COPY_FINDING JSON identifies story UUID, block UID, field and code; its id is their JSON tuple, independent of order/copy.

Refresh complete exports and rerun after corrections: COPY_RECHECK reports checked fields/findings. Exit 1 means findings remain; exit 0 certifies only this snapshot, not live content or rendered layout.

Assemble a local story snapshot ​

For individual local story files, use jq to build the required nonempty stories wrapper. Each input must be a story object with uuid and content, not an array or a response envelope such as {"story": {...}}; for that envelope, save its story object as the input first.

For example, cms/home.json contains:

json
json
{"uuid":"home","content":{"component":"page","_uid":"home-root","title":"Home"}}

And cms/about.json contains:

json
json
{"uuid":"about","content":{"component":"page","_uid":"about-root","title":"About"}}

From the target project root, require one object per file and replace the snapshot only after successful assembly (use an unused temporary filename):

sh
sh
jq -e -n --slurpfile home cms/home.json --slurpfile about cms/about.json '
  if ($home | length) == 1 and ($about | length) == 1
     and ($home[0] | type) == "object" and ($about[0] | type) == "object"
  then {stories: [$home[0], $about[0]]}
  else error("Expected one story object per input file")
  end' > cms/stories.json.tmp &&
  mv cms/stories.json.tmp cms/stories.json

In the existing ## Adapter block in .agents/context/DESIGN.md, set:

text
text
cms_schema  cms/components.json
cms_stories cms/stories.json

The reusable shape is {"stories":[<story object>, ...]}; the filenames, UUIDs, component and field names above are illustrative. Use your complete local exports for one resolved locale, preserve every story uuid and block _uid (including nested blocks), and provide the matching components schema in cms/components.json. Keep inputs separate from the output to avoid overwriting a source file. Then run devkit design adapter-check from the target project root; assembling the wrapper alone does not validate the content.

Source: Storyblok Management API field schema, retrieved 2026-11-18: max_length applies to Text, Textarea and Markdown; required defaults false. Unicode counting units are unspecified; fixture regressions pin our convention.

Internal docs — onedot-devkit · devkit

devkitdevkit syncdevkit statusdevkit doctordevkit helpInternal docs · ONEDOT digital crew