docs: add YAML front matter to the SLI API reference docs#61
Conversation
The three docs/api_reference/trellis-api-sli*.md files used bold-markdown headers instead of the YAML front matter (package / namespaces / types / version / last_verified / audience: [llm]) that the Trellis framework reference docs use. Tooling or LLMs that key off audience:[llm] or the types metadata skipped or misclassified these docs relative to the rest of the Trellis reference set. Prepend the standard front matter to all three (additive -- the human-readable **Package** / **Namespace** / **Purpose** lines stay). The docs are auto-packed into each package's trellis/ folder by Directory.Build.targets, so republished packages carry the metadata for every downstream consumer (framework, templates, future consumers). Verified by packing Trellis.ServiceLevelIndicators: the trellis/trellis-api-sli.md entry now begins with the front matter block.
…nceRoot - Prepend the standard YAML front matter (package / namespaces / types / version / last_verified / audience: [llm]) to the three template/.github/trellis-api-sli*.md docs so the full 28-doc set is uniformly machine-indexable. Content mirrors the canonical upstream fix in xavierjohn/Trellis.ServiceLevelIndicators#61 (those docs are the single source, packed into the SLI nupkgs); a re-sync after the SLI republish is a no-op. - Quote $root in the copilot-instructions sync snippet so checkout paths containing spaces pass as a single MSBuild argument.
There was a problem hiding this comment.
⚠️ Not ready to approve
The new types front matter appears inconsistent with the docs’ actual ### type sections (includes non-type headings/method names), which undermines the indexing goal of the change.
Pull request overview
This PR updates the API reference markdown in docs/api_reference/ to align with Trellis reference-doc conventions by adding YAML front matter (e.g., package, namespaces, types, version, last_verified, audience) while preserving the existing human-readable **Package:** / **Namespace:** / **Purpose:** headers.
Changes:
- Added standard YAML front matter blocks to the core SLI, ASP integration, and API versioning reference docs.
- Introduced
typesmetadata intended to reflect each doc’s documented API surface for indexing/tooling.
File summaries
| File | Description |
|---|---|
| docs/api_reference/trellis-api-sli.md | Adds YAML front matter for the core SLI package API reference. |
| docs/api_reference/trellis-api-sli-asp.md | Adds YAML front matter for the ASP.NET Core integration API reference. |
| docs/api_reference/trellis-api-sli-apiversioning.md | Adds YAML front matter for the API versioning integration API reference. |
Copilot's findings
- Files reviewed: 3/3 changed files
- Comments generated: 2
Note
Your feedback helps us improve the quality of this feature.
Please use 👍 or 👎 to tell us whether this assessment is correct.
| --- | ||
| package: Trellis.ServiceLevelIndicators | ||
| namespaces: [Trellis.ServiceLevelIndicators] | ||
| types: [ServiceLevelIndicator, ServiceLevelIndicatorOptions, MeasuredOperation, SliOutcome, IEnrichmentContext, "IEnrichment<T>", IServiceLevelIndicatorBuilder, ServiceLevelIndicatorMeterProviderBuilderExtensions, AddServiceLevelIndicator, AddServiceLevelIndicatorInstrumentation] |
There was a problem hiding this comment.
Good catch -- addressed in follow-up #62. Tightened types: to each doc's actual ### type sections: dropped method names and types whose sections live in a sibling doc (e.g. SliOutcome / IServiceLevelIndicatorBuilder here, AddApiVersion in the api-versioning doc).
| --- | ||
| package: Trellis.ServiceLevelIndicators.Asp.ApiVersioning | ||
| namespaces: [Trellis.ServiceLevelIndicators] | ||
| types: [ServiceLevelIndicatorServiceCollectionExtensions, ApiVersionEnrichment, AddApiVersion] |
There was a problem hiding this comment.
Good catch -- addressed in follow-up #62. Tightened types: to each doc's actual ### type sections: dropped method names and types whose sections live in a sibling doc (e.g. SliOutcome / IServiceLevelIndicatorBuilder here, AddApiVersion in the api-versioning doc).
Summary
The three SLI API reference docs (
docs/api_reference/trellis-api-sli*.md) used bold-markdown headers (**Package:**,**Namespace:**,**Purpose:**) instead of the YAML front matter that the Trellis framework reference docs use. Any tooling/LLM indexing that keys offaudience: [llm]or thetypes:metadata would skip or misclassify these three docs relative to the rest of the Trellis reference set.Change
Prepend the standard front matter to all three docs — additive only, the human-readable
**Package**/**Namespace**/**Purpose**lines stay:typeslists are extracted from each doc's### Typesections. Repo convention preserved (UTF-8 no-BOM, CRLF).Why this is the right layer
docs/api_reference/is the single source —Directory.Build.targetsauto-packs eachtrellis-api-<TrellisApiRefName>.mdinto the package'strellis/folder. So a republish flows the metadata to every downstream consumer (the framework, bothdotnet newtemplates, and any future consumer) instead of being patched per-repo.Verification
Packed
Trellis.ServiceLevelIndicatorslocally — thetrellis/trellis-api-sli.mdentry inside the.nupkgnow begins with the front matter block. Docs-only change; no code or test impact.