Repository navigation
Comment rules, /refactor:tidy-comments, and a first tidy of BoxProvisioning - #4590
Merged
Merged
Conversation
documentation.md gains a "Comments in Code" section: XML docs on public members only, at most a comment above the signature elsewhere, none inside method bodies, and no issue/spec references, history or reviewer notes. code_style.md and CONTRIBUTING.md now align with it, and the authoring and review skills carry the rule. /refactor:tidy-comments applies it to a unit of work and reports comments that side-stepped a refactoring. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7
…R 0058 Moves the reasoning from inline comments in BoxProvisioningHostedService and SqlBoxProvisioner into the ADR, ahead of tidying those comments. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7
Delete comments that narrate code or record change history, strip spec, issue and PR references, convert XML docs on a private method to a // comment, and move the span-tag and pre-lock-hint rationale above the signatures of the methods they explain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7
Replace explanatory comments in SqlBoxMigrationRunner.MigrateAsync, SqlBoxProvisioner.ProvisionAsync and UseBoxProvisioning with private methods whose names carry the intent (GuardIdentifiers, GetMigrations, RollbackWithoutMaskingAsync, ReleaseAsync, ReadHistoryExistsHintAsync, RegisterProvisionersThenMarker, ...), keeping a short comment above a signature only where the name cannot carry a trap. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7
…old ranges Size the scope before reading it and propose one-project slices, named as '<range> <path>' commands; tidy files as they are now when a range is old, marking comments added after it for the user to include or not; track the slice queue in PROMPT.md; add 'file a GitHub issue' to Phase 5. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7
iancooper
requested review from
DevJonny,
holytshirt and
preardon
as code owners
October 11, 2026 22:13
This was referenced Oct 12, 2026
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.
Why
Comments written by agents have been creeping into method bodies: about 1,100
//lines were added tosrc/between 1 September and 11 October, many carrying spec or issue numbers, change history or notes to a reviewer. The rules about where comments go were spread acrossdocumentation.mdandcode_style.md, partly contradicted each other, and were missing from the skills agents actually work from.What
The rule —
.agent_instructions/documentation.mdgains a Comments in Code section, which is now the single statement of the rule:///XML documentation on public and protected members of public types only.<summary>,<param>and so on say how to use the API;<remarks>holds notes to the user.//or/* */comment above the signature, when the method is complex or guards against a trap.//Arrange//Act//Assert, the reason on an analyser suppression, and a rare one-line trap that cannot be extracted.code_style.mdandCONTRIBUTING.mdnow align with it, and/test-first,/spec:implement,/spec:ralph-implement,/tidy-first,/bugfix:fixand/spec:reviewall carry it.The skill —
/refactor:tidy-comments [ref | range] [path...]gives each comment in a unit of work one action: keep, delete, strip a reference, trim, move above the signature, convert///to//, or replace with Extract Method/Variable. It applies them as a comment-onlyrefactor:commit and then an extractionrefactor:commit, with tests unedited and no public signature changed. Rationale missing from an ADR goes to the user, not the bin. It also reports comments that were written instead of a refactoring ("must be called first", "can be null when…") and schedules them. A large scope is sliced per project and the queue is tracked inPROMPT.md.First slice —
src/Paramore.Brighter.BoxProvisioning, from the PR #4039 merge (83e0e5e47):SqlBoxMigrationRunner.MigrateAsync,SqlBoxProvisioner.ProvisionAsyncandUseBoxProvisioning, e.g.GuardIdentifiers,RollbackWithoutMaskingAsync,ReleaseAsync,ReadHistoryExistsHintAsync,RegisterProvisionersThenMarker. Comments inside method bodies in this package go from 116 lines to none.Two refactorings the comments had been papering over are filed rather than done here: #4588 (static
ApplicationLogginglogger inSqlBoxProvisioner) and #4589 (SchemaNameconversion from a null or empty string yields a non-nullSchemaName).Testing
Paramore.Brighter.BoxProvisioning.Tests: 111/111 passing on net9.0 and net10.0, before and after, with no test edited.Paramore.Brighter.Sqlite.Tests --filter BoxProvisioning: 66/66 passing on net9.0 and net10.0, before and after.Next
The remaining slices (the BoxProvisioning backends, the rest of
src/, thentests/) follow as separate PRs.🤖 Generated with Claude Code
https://claude.ai/code/session_01HsKD52dnGHFLSEr93VZyR7