Skip to content

docs: add YAML front matter to the SLI API reference docs#61

Merged
xavierjohn merged 1 commit into
mainfrom
docs/sli-api-reference-front-matter
Jun 19, 2026
Merged

docs: add YAML front matter to the SLI API reference docs#61
xavierjohn merged 1 commit into
mainfrom
docs/sli-api-reference-front-matter

Conversation

@xavierjohn

Copy link
Copy Markdown
Owner

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 off audience: [llm] or the types: 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:

---
package: Trellis.ServiceLevelIndicators
namespaces: [Trellis.ServiceLevelIndicators]
types: [ServiceLevelIndicator, ServiceLevelIndicatorOptions, ...]
version: v10
last_verified: 2026-06-18
audience: [llm]
---

types lists are extracted from each doc's ### Type sections. Repo convention preserved (UTF-8 no-BOM, CRLF).

Why this is the right layer

docs/api_reference/ is the single source — Directory.Build.targets auto-packs each trellis-api-<TrellisApiRefName>.md into the package's trellis/ folder. So a republish flows the metadata to every downstream consumer (the framework, both dotnet new templates, and any future consumer) instead of being patched per-repo.

Verification

Packed Trellis.ServiceLevelIndicators locally — the trellis/trellis-api-sli.md entry inside the .nupkg now begins with the front matter block. Docs-only change; no code or test impact.

Note: version: v10 mirrors the framework's v3 (major-version line) for the SLI 10.x packages — change if a different convention is preferred.

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.
@github-actions

Copy link
Copy Markdown

Test Results

99 tests  ±0   99 ✅ ±0   17s ⏱️ +5s
 3 suites ±0    0 💤 ±0 
 3 files   ±0    0 ❌ ±0 

Results for commit 99f46bc. ± Comparison against base commit 88fcdc5.

xavierjohn added a commit to xavierjohn/Trellis.Microservices.Template that referenced this pull request Jun 19, 2026
…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.
@xavierjohn xavierjohn requested a review from Copilot June 19, 2026 05:53
@xavierjohn xavierjohn merged commit 6bad684 into main Jun 19, 2026
5 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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 types metadata 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]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants