Repository navigation
Add AgentDocs guidance for coding agents to Asp.Versioning.Http (draft proposal) - #1233
Draft
xavierjohn wants to merge 1 commit into
Draft
xavierjohn wants to merge 1 commit into
xavierjohn wants to merge 1 commit into
Conversation
Pack three Markdown guides for coding agents in Asp.Versioning.Http: a short required guide for registration, endpoint versioning and default behavior, and on-demand guides for version sources and defaults and for deprecation and error responses. The guides are packed by the build-only Trellis.AgentDocs.Packaging helper (PrivateAssets="all"), which adds no dependency to the package. Consumers opt in separately with the Trellis.AgentDocs tool, and a restored package is never read until they approve it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a proposal, opened as a draft so the team can decide whether it fits the project before any further work.
It packs three short Markdown guides for coding agents (Copilot, Claude Code and similar) inside the
Asp.Versioning.Httppackage, so an agent working in a project that references the package can read guidance for the installed version instead of guessing or relying on stale web pages.agent-guide.md(required, about 1.9 KB): registration, versioning Minimal API endpoints, and the default behavior an agent must know.version-sources-and-defaults.md(on demand): query string, header and URL segment readers, how a custom reader replaces the defaults, andAssumeDefaultVersionWhenUnspecified.deprecation-and-errors.md(on demand):HasDeprecatedApiVersion, the version headers, the unspecified, unsupported and invalid problem responses, and version-neutral endpoints.Every behavioral statement in the guides was checked by running the code against current
main(status codes, headers and problem types), including some non-obvious ones, for example that settingApiVersionReaderreplaces the default readers and that an unsupported version in a URL segment is a 404.What changes in the package
guidance/reference-manifest.jsonandguides/*.mdto the nupkg.PackageReferencetoTrellis.AgentDocs.Packaging(PrivateAssets="all"). It does not appear in the nuspec dependencies and nothing is added to the library or its runtime dependencies. I confirmed the dependency list of the packed nuspec is unchanged.How consumers see it
Nothing happens by default. Restoring the package never modifies a repository. A developer opts in with the separate
Trellis.AgentDocs.NET tool; guidance from a package is read only after they approve that package ID in a committedpolicy.json.Scope and open questions
Asp.Versioning.Httpis included. Other packages (Mvc, ApiExplorer, OData, Abstractions) are left for later, so the team can judge the approach on one package first.0.1.0-preview.22. A newer helper is needed before multi-targeted packages such asAsp.Versioning.Abstractionscan carry guidance.ReleaseNotes.txtor the version, since those follow your release process.Verification
dotnet packof the project produces the manifest and the three guides alongside the existing README, analyzer and library.agentdocs validate --stricton the package: 0 errors, 0 warnings.agentdocs init, approved the package and ransync; the required guide and both on-demand guides installed and the generated index lists them.