Problem
When working with MAGI files that contain ai-script blocks, there's no way to validate the JSON structure of these blocks during CI.
A malformed ai-script block (e.g., missing required fields like script-id or prompt) won't be caught until runtime when an LLM agent tries to process it.
Proposed Solution
A CLI tool or a lint rule that validates:
- JSON syntax within
ai-script fenced code blocks
- Required fields are present (
script-id, prompt)
- Optional fields conform to expected types
provider and model-name values are from a known set (configurable)
Something like:
Why This Matters
As MAGI adoption grows, having guardrails for content authors will be important. Catching errors at write-time rather than at LLM-processing-time saves a lot of debugging.
Would love to hear if this aligns with the project's roadmap!
Problem
When working with MAGI files that contain
ai-scriptblocks, there's no way to validate the JSON structure of these blocks during CI.A malformed
ai-scriptblock (e.g., missing required fields likescript-idorprompt) won't be caught until runtime when an LLM agent tries to process it.Proposed Solution
A CLI tool or a lint rule that validates:
ai-scriptfenced code blocksscript-id,prompt)providerandmodel-namevalues are from a known set (configurable)Something like:
Why This Matters
As MAGI adoption grows, having guardrails for content authors will be important. Catching errors at write-time rather than at LLM-processing-time saves a lot of debugging.
Would love to hear if this aligns with the project's roadmap!