Skip to content

Update AGENTS.md and move the coding guidelines into docs/guidelines - #6135

Open
danielmarbach wants to merge 3 commits into
masterfrom
update-agents-md-guidelines-and-skills
Open

danielmarbach wants to merge 3 commits into
masterfrom
update-agents-md-guidelines-and-skills

Conversation

@danielmarbach

Copy link
Copy Markdown
Contributor

Updates AGENTS.md to the current engineering context template, copied unchanged from Particular/Platform@c0a82fc (Platform#1700), and moves docs/coding-and-design-guidelines.md into the guideline structure the template describes.

Guidelines

The page becomes three guidelines under docs/guidelines/, each stating when it applies and listed in docs/README.md:

  • microsoft-abstractions.md
  • explicit-container-registration.md
  • explicit-persistence-operations.md

The persistence guideline keeps its rules unchanged. The other two follow the current code:

  • Autofac is gone from the service instances, so the Autofac rules and exceptions are removed. It remains only in src/ServiceControl.Config, which the guidelines exclude.
  • Extensions target IHostApplicationBuilder instead of IHostBuilder.
  • The logging rule is reversed. The old page told code to use NServiceBus logging. The instances now use ILogger<T> in 126 files and LogManager in one, so the guideline says new code should use ILogger<T>. This follows the NServiceBus logging guidance, now listed as an upstream contract.
  • The property injection rule is folded into the registration guideline, because the Microsoft container does not support it.
  • The sentence that this page takes precedence over other coding guidelines is dropped.

The guidelines do not adopt [LoggerMessage] source generation, which the NServiceBus guidance prefers. No ServiceControl file uses it today.

Docs and guidelines

  • Docs reviewed: docs/README.md and docs/coding-and-design-guidelines.md. docs/README.md now lists the guidelines and upstream contracts and no longer links the moved page.
  • Guidelines: none applied before this pull request, which adds them.

Takes AGENTS.md unchanged from Particular/Platform@c0a82fc. The Code changes
workflow now reads the guidelines the docs index lists, requires a Guidelines:
line in the change description, and asks docs pages to describe the current
design. Adds the Guidelines and skills section.
Splits docs/coding-and-design-guidelines.md into three guidelines that each
state when they apply, and lists them in docs/README.md. The rules follow the
current code: the instances run on the Generic Host with the Microsoft
container and log through ILogger<T>. Links the NServiceBus logging guidance
as an upstream contract.
Comment thread docs/README.md Resolved
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.

1 participant