templates/plan_render library
Token substitution for the M7 plan templates.
The seed Markdown at templates/import_plan.md and
templates/describe_plan.md carries {{TOKEN}} placeholders. This
renderer expands them from the loaded DialectProject. Token shape:
uppercase identifier inside double braces, no whitespace. Unknown
tokens are left untouched so a typo in the seed is loud, not silent.
Functions
-
commonPlanTokens(
DialectProject project) → Map< String, String> -
Tokens common to both
importanddescribeplans, derived from the loaded project. Commands layer their own command-specific tokens (FROM,PATH, …) on top. -
renderPlanTemplate(
String template, Map< String, String> tokens) → String -
Expand
{{TOKEN}}placeholders intemplateusing the values intokens. Tokens are case-sensitive; missing tokens are left in place so they show up in the rendered plan (and any test that snapshots the output).