From 615f32e3a4d0a4fe87aaa8c15f6d14cf3da1af99 Mon Sep 17 00:00:00 2001 From: Sebastien Taggart Date: Thu, 9 Apr 2026 18:34:53 -0400 Subject: [PATCH] Fix sync.sh --validate to respect {{#if}} conditionals --- sync.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sync.sh b/sync.sh index 238ee57..af6e906 100755 --- a/sync.sh +++ b/sync.sh @@ -351,10 +351,11 @@ def validate_placeholders(skill_files, project_config): for skill_path in skill_files: raw = skill_path.read_text() fm, body = parse_frontmatter(raw) - # Check body and frontmatter description - text_to_check = body + # Evaluate conditionals first — placeholders inside stripped blocks + # are not part of the final output and should not be reported. + text_to_check = apply_conditionals(body, project_config) if fm.get('description'): - text_to_check += '\n' + fm['description'] + text_to_check += '\n' + apply_conditionals(fm['description'], project_config) missing = [p for p in find_unresolved(text_to_check) if p not in project_config] for p in missing: errors.append(f" {skill_path.name}: {{{{{p}}}}} not defined in config")