Skip to content

Make audit-docs cut long comments a pull request adds - #625

Merged
AlexJSully merged 5 commits into
mainfrom
ajs-261124-audit-docs
Nov 25, 2026
Merged

AlexJSully merged 5 commits into
mainfrom
ajs-261124-audit-docs

Conversation

@AlexJSully

@AlexJSully AlexJSully commented Nov 25, 2026 •

Copy link
Copy Markdown
Owner

The audit-docs skill 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-standards skill 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/nextjs updated from 11.11.0 to 11.12.0.
  • Dependency review allows LicenseRef-bad-fsl-1.1-apache-2.0. GitHub reports that identifier for sentry, the Sentry CLI that @sentry/nextjs installs through @sentry/bundler-plugins. npm view sentry@0.49.0 license prints FSL-1.1-Apache-2.0, which is not an SPDX identifier.
  • CLAUDE.md, docs-authoring.md, and copilot-instructions.md carry the same comment-length rules as the skills.
brag.mp4

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>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
portfolio Ready Ready Preview Nov 25, 2026 3:51am UTC

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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/nextjs to 11.12.0 and markdownlint-cli2 to 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>
AlexJSully and others added 2 commits November 24, 2026 20:56
@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>
@AlexJSully
AlexJSully merged commit 1293936 into main Nov 25, 2026
9 checks passed
@AlexJSully
AlexJSully deleted the ajs-261124-audit-docs branch November 25, 2026 04:04

This branch was successfully deployed

1 active deployment
Preview — 26be1353 Deployed Nov 25, 2026 by vercel[bot]
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