Q: markdown scripts in this project support params and vars, but when i defined params using frontmatter, and use the defined params as {{ param }}, the value doesn't get replaced
A: The frontmatter parameters are being parsed but never connected to the variable interpolation system.
Problem: In mustache.ts:21, splitMarkdown() extracts frontmatter and discards it, only processing the content for variable interpolation. The frontmatter
parameters never make it into the variable resolution system.
Missing Connection: Frontmatter parameters should be merged with script parameters in template.ts:parsePromptScriptMeta() and made available to
vars.ts:parsePromptParameters().
Current Working Scenarios:
- JavaScript scripts with script({ parameters: {...} })
- CLI --var options
- Environment variables
Non-Working: Frontmatter-defined parameters in markdown scripts.
The fix requires modifying template.ts to extract frontmatter parameters and merge them into the script's parameter definition before variable interpolation occurs.
Q: markdown scripts in this project support params and vars, but when i defined params using frontmatter, and use the defined params as
{{ param }}, the value doesn't get replacedA: The frontmatter parameters are being parsed but never connected to the variable interpolation system.
Problem: In mustache.ts:21, splitMarkdown() extracts frontmatter and discards it, only processing the content for variable interpolation. The frontmatter
parameters never make it into the variable resolution system.
Missing Connection: Frontmatter parameters should be merged with script parameters in template.ts:parsePromptScriptMeta() and made available to
vars.ts:parsePromptParameters().
Current Working Scenarios:
Non-Working: Frontmatter-defined parameters in markdown scripts.
The fix requires modifying template.ts to extract frontmatter parameters and merge them into the script's parameter definition before variable interpolation occurs.