You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(templates): add per-template example inputs, render-all validation test, and template render -d #55
Only a small subset of shipped .json.tmpl policy templates in templates/ are rendered in unit tests (pkg/template/mm_render_test.go), and there is no sidecar set of canonical synthetic inputs (typical, edge, minimal) or schema-level contract check verifying every template against structured_server.py's parse_schema invariants (unique non-empty question IDs, non-empty instructions, valid question types, choice option count limits, and acyclic depends_on / ask_if dependencies).
discoverTemplates in cmd/serve.go uses a naive regex that can misread .field substrings inside escaped string literals (for example in secops_iam_change_audit.json.tmpl), marks text-only multimodal/call_quality_audio.json.tmpl as image-multimodal, and leaves several template variables empty in defaultSampleVars.
Proposed Solution
Add companion templates/**/<name>.examples.json files (typical, edge, minimal synthetic inputs + optional unambiguous expected_answers) for every shipped .json.tmpl policy, along with minimal fallback defaults on parameterized templates so {} renders cleanly.
Add pkg/template.ValidateRenderedPayload and TestAllShippedTemplatesRenderAndValidate to render and validate all shipped templates across every example and sample_vars round-trip.
Wire -d / --data in dgem template render, fix extractTemplateVars and defaultSampleVars in cmd/serve.go, and expose examples on GET /api/templates.
Activity
feat(templates): add example inputs, render-all validation, and templ…