Repository navigation
Make audit-docs cut long comments a pull request adds - #625
Merged
Merged
Conversation
A comment the diff added was treated as an existing comment, so the rule to keep every reason, constraint, edge case, or warning protected AI padding. It now gets the same two-sentence limit as a comment the audit writes, with the cut reasons listed in the report. The verbose test also cuts sentences that argue the code is safe, work out a scenario no code states, or explain a library in general. The drift test runs before the other tests rather than deciding alone, and the change-sync step adds at most one sentence to a comment. The typescript-code-and-test-standards skill gets the same rules. Also updates @sentry/nextjs to 11.12.0 and markdownlint-cli2 to 0.24.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Conflicting comment-retention rules and incompatible padding-report evidence requirements remain unresolved, leaving reviewers with inconsistent guidance on which scenarios to retain or report.
3 open issues
What changed in this PR
This follow-up to #624 tightens comment-auditing guidance used alongside the portfolio codebase. It applies the two-sentence limit to comments added by a pull request while retaining public-documentation safeguards.
Changes:
- Aligns the audit prompt, skills, and supporting agents on trimming added comments and tightening comments after correcting drift.
- Adds examples and report fields for comment line counts and removed reasons.
- Updates
@sentry/nextjsto 11.12.0 andmarkdownlint-cli2to 0.24.0, with lockfile changes.
| File | Description |
|---|---|
package.json |
Updates Sentry and Markdown lint dependencies. |
package-lock.json |
Records dependency updates and transitive changes. |
.github/prompts/audit-docs.prompt.md |
Adds trimming limits, ordered checks, and reporting requirements. |
.claude/skills/typescript-code-and-test-standards/SKILL.md |
Extends comment-trimming rules to added comments. |
.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md |
Expands supporting comment-preservation guidance. |
.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md |
Adds the new limits to generated instructions. |
.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md |
Refines padding classifications and retained-sentence guidance. |
.claude/skills/audit-docs/SKILL.md |
Defines the revised audit sequence and length checks. |
.claude/skills/audit-docs/references/existing-comments.md |
Adds examples for drifted and newly added comments. |
.claude/skills/audit-docs/assets/audit-report.template.md |
Records trimming counts and removed reasons. |
.claude/skills/audit-docs/agents/surface-auditor.md |
Expands padding checks and reports comment length. |
Review effort: Balanced
markdownlint-cli2 0.24.0 pins markdownlint 0.42.0, which pins re2js 2.8.6 (GHSA-gg6h-894w-4m9c, high). The patched markdownlint-cli2 0.24.1 is newer than the 14-day min-release-age, so the bump waits for it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sentry/nextjs installs `sentry` (the Sentry CLI) through @sentry/bundler-plugins. It declares FSL-1.1-Apache-2.0, which is not an SPDX identifier, so GitHub reports it as LicenseRef-bad-fsl-1.1-apache-2.0 and every Sentry update failed the licence check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CLAUDE.md, docs-authoring.md, and copilot-instructions.md gain the added-comment length limit and the correct-then-tighten order. The surface-auditor CUT entry accepts a padding kind as its evidence, and its report-nothing bar applies to CONTRADICTED only. The TypeScript skill's verbose-block rule uses the same evidence sources as its comment rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A comment test 1 corrects now skips test 2, so it is tightened but never deleted. A comment the diff only moved stays an existing comment, and a licence header is exempt from the two-sentence limit. One rule now governs how far an added comment may grow, Phase 1's handoff to Phase 3 covers only files in scope, and the undefined "edit set" is replaced. Tightening a corrected comment applies only inside the requested scope, across the mirrored rule text and the TypeScript skill. The comment-and-jsdoc auditor's evidence line carries the line count it is asked for. testing.md states that FSL-1.1-Apache-2.0 is not an SPDX identifier, rather than that the licence is missing from the SPDX list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully 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.

The
audit-docsskill now cuts a long comment that a pull request added, instead of keeping or extending it.A comment the diff added was treated as an existing comment. The rule to keep every sentence giving a reason, constraint, edge case, or warning then protected AI padding, because padding reads as reasons. The two-sentence limit covered only comments the audit wrote itself.
A comment the diff added now has that same two-sentence limit. The reasons cut from it are listed in the report, for the pull request description.
The verbose test also cuts sentences that argue the code is safe, work out a scenario no code states, or explain a library in general. The drift test runs before the other tests rather than deciding alone, so a corrected comment is still tightened. The change-sync step adds at most one sentence to a comment.
The
typescript-code-and-test-standardsskill gets the same rules.On a fixture pull request adding a 32-line comment, two runs of the previous skill kept 20 and 17 lines of it. Two runs of this version kept 5 and 7 lines, and every guard comment in the fixture stayed.
PR also includes the following changes:
@sentry/nextjsupdated from 11.11.0 to 11.12.0.LicenseRef-bad-fsl-1.1-apache-2.0. GitHub reports that identifier forsentry, the Sentry CLI that@sentry/nextjsinstalls through@sentry/bundler-plugins.npm view sentry@0.49.0 licenseprintsFSL-1.1-Apache-2.0, which is not an SPDX identifier.CLAUDE.md,docs-authoring.md, andcopilot-instructions.mdcarry the same comment-length rules as the skills.brag.mp4