2.4 KiB
2.4 KiB
Tasks: templates-spec-conformance
1. Inline drift fixes
- 1.1 Add
@opentelemetry/apiruntime dep (catalog:observability) topackages/primitives/templates/package.json. - 1.2 Create
src/otel/templates-otel.tswithrecordRender,recordPluginCall,startRenderTimer,_resetInstruments+ sibling.md. - 1.3 Wire
recordRender(success / error) andrecordPluginCall(success / skip / error) intoTemplateEngineandapplyPlugin/applyPluginAsync. - 1.4 Validate
TemplateEngineOptionsviaTemplateEngineOptionsSchema.safeParsein the constructor, throwingTemplateError(TEMPLATE.PARSE_ERROR)on failure. - 1.5 Validate
ParseOptionsviaParseOptionsSchema.safeParseinparse/parseAsyncwhen callers pass options. - 1.6 Mark
PluginPrioritySchemaas// schema: boundary-only. - 1.7 Add
src/otel/templates-otel.tsto thetests/no-disallowed.test.tsAPPROVEDset so the OTel timing helper can useDate.now.
2. Spec rewrite (folded)
- 2.1 Rewrite
openspec/specs/templates/spec.mdto fourteen### TPL-NN — namerequirement blocks. - 2.2 Add
**Verified by:**lines under each requirement naming the test files / cases that pin it.
3. Conformance tests
- 3.1
src/__tests__/package-shape.spec-conformance.test.ts— TPL-01 / TPL-02. - 3.2
src/__tests__/types.spec-conformance.test.ts— TPL-04 (PluginPriority enum, SKIP_PLUGIN symbol, generic threading). - 3.3
src/engine/ParseState.spec-conformance.test.ts— TPL-05. - 3.4
src/engine/TemplateEngine.spec-conformance.test.ts— TPL-06 / TPL-07 / TPL-09. - 3.5
src/engine/apply-plugin.spec-conformance.test.ts— TPL-08. - 3.6
src/errors/template-error.spec-conformance.test.ts— TPL-03. - 3.7
src/otel/templates-otel.spec-conformance.test.ts— TPL-13. - 3.8
src/plugins/plugins.spec-conformance.test.ts— TPL-10. - 3.9
src/presets/presets.spec-conformance.test.ts— TPL-11.
4. Archive hygiene
- 4.1 Replace the bulk-archive marker line in
openspec/archive/2026-04-19-enterprise-templates/tasks.mdwith a pointer to this change folder.
5. Verification
- 5.1
bun scripts/openspec-conformance.ts @suaveplan/templates— green (no errors; warnings for boundary-only schemas tolerated). - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/templates— green. - 5.3
bunx turbo test:coverage --filter=@suaveplan/templates— 100/100/100/100.