From cb566c98a1769dfd6da34a300431c0b46e01dbf8 Mon Sep 17 00:00:00 2001 From: Alexander Sullivan Date: Tue, 24 Nov 2026 20:30:18 -0500 Subject: [PATCH 1/5] Make audit-docs cut long comments a pull request adds 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 --- .claude/skills/audit-docs/SKILL.md | 18 +- .../audit-docs/agents/surface-auditor.md | 9 +- .../assets/audit-report.template.md | 5 + .../references/existing-comments.md | 62 ++- .../SKILL.md | 4 +- .../agents/comment-and-jsdoc-auditor.md | 2 +- .../assets/copilot-instructions.template.md | 2 +- .../references/comments-and-jsdoc.md | 2 +- .github/prompts/audit-docs.prompt.md | 20 +- package-lock.json | 400 ++++++++++-------- package.json | 4 +- 11 files changed, 329 insertions(+), 199 deletions(-) diff --git a/.claude/skills/audit-docs/SKILL.md b/.claude/skills/audit-docs/SKILL.md index 99e5dd8..42f9521 100644 --- a/.claude/skills/audit-docs/SKILL.md +++ b/.claude/skills/audit-docs/SKILL.md @@ -10,7 +10,7 @@ argument-hint: '[paths or area to audit; defaults to the active pull request or Read this whole file before you start. These rules hold however the skill was invoked. - **Documentation has two parts, and you audit both.** One part is the Markdown pages. The other is the comments in the code: documentation comments, inline comments, and file headers. On a pull request, audit the comments in every code file the diff touched, not only the Markdown. -- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. +- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to that same length: tighten a longer one in this run, and never add to it. - **Write plain English for people.** Your reader is a developer reading once. Write complete, grammatical sentences, one idea each, with ordinary pronouns and transitions where the meaning is clear. State what the code does. Do not work out scenarios or consequences that no code, test, or document states. - **Edit only what the request covers.** Edit in full only the files the scope resolves to (see [Scope](#scope)). On a pull request or working changes, those are the files the diff touched. Any other document gets only the edits the change itself requires. A file you opened only for context stays exactly as you found it. - **Files keep their path and name.** Rename, move, split, merge, or delete a file, or create a directory, only when the request asks for it or the user approves it. Where one looks necessary, ask the user and wait. Where you cannot ask, propose it in your report instead. @@ -63,6 +63,7 @@ Run this phase only when there is an active pull request or working changes. Tre - List what the diff changed in behaviour: added, removed, or modified. - For each change, update whichever documentation describes that behaviour: a Markdown page, a code comment, or both. Do this even where the pull request did not touch the docs. - Document only behaviour the change made. Edit the existing sentence the change made false before you consider adding one. A new sentence states the new behaviour and stops. +- A comment gains at most one sentence in this phase. Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. - Report whether you made changes or found the documentation already accurate. ## Phase 2: audit the Markdown pages @@ -85,14 +86,18 @@ Run this phase on every audit, over every code file in scope, whatever Phases 1 ### Judge each existing comment with these tests, in order -The first test that applies decides. [`existing-comments.md`](references/existing-comments.md) has before-and-after pairs. +Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, so a comment you corrected is still tightened. [`existing-comments.md`](references/existing-comments.md) has before-and-after pairs. 1. **Drifted.** It states something the code no longer does. Correct it from the body, and keep the wording that is still true. 2. **Wholly redundant.** Every sentence restates the name, the signature, or the line beneath it, such as `// Increment counter`, and gives no reason, constraint, edge case, or warning. Delete it, unless the floor keeps it. -3. **Verbose.** A useful fact sits inside padding. Keep the summary sentence and each sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives. Cut whole sentences that restate the signature, describe members that have their own comments, walk through the body, describe alternatives that were not taken, tell the history of the code, or repeat a reason already given. This test never removes a whole comment. Put every comment longer than about five lines through this test. +3. **Verbose.** A useful fact sits inside padding. Keep the summary sentence and each sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives. Cut whole sentences that restate the signature, describe members that have their own comments, walk through the body, describe alternatives that were not taken, tell the history of the code, or repeat a reason already given. Also cut a sentence that argues the code is correct or safe, works out a scenario or consequence that no code, test, or document states, or explains what a language, library, or platform does in general. These read like reasons but give none about this code. This test never removes a whole comment. Put every comment longer than about five lines through this test. 4. **Otherwise, it stays as written.** -**Cut by whole sentences.** Keep every sentence you do not cut word for word. Where a kept sentence depends on a cut one ("also", "these"), keep both or cut both. A rewritten or merged sentence is a new claim and needs its own proof. Correct a comment that is both wrong and long before you tighten it. +**Cut by whole sentences.** Keep every sentence you do not cut word for word. Where a kept sentence depends on a cut one ("also", "these"), keep both or cut both. A rewritten or merged sentence is a new claim and needs its own proof. + +### A comment the change added + +On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. The floor and the closed delete list still apply. **The closed delete list.** Besides test 2, delete only: @@ -246,7 +251,8 @@ Before you write the report, confirm each item and fix what fails inside the sco - Every existing list, table, and code block kept its form; any code block you removed only transcribed code and is now a link. - No hedging, no new subjective adjectives, and no em-dashes or en-dashes in what you wrote. - No comment was deleted except under the closed list, no public symbol's comment dropped below its floor, and every tightened comment lost whole sentences only. -- Every comment you wrote is at most two sentences, and it sits on a declaration, not above a use. +- Every comment you wrote, and every comment the diff added, is at most two sentences, and a comment you wrote sits on a declaration, not above a use. No comment you edited grew by more than one Phase 1 sentence. +- Every comment in the edit set longer than about five lines went through test 3, and the report gives its line count before and after. - Each page you edited in full opens by naming its subject, and nothing in it stops a newcomer, or your report names the place that does. - Every diagram has `accTitle` and `accDescr` and parses, and every image has real alt text. Every table you touched still has matching cell counts, and nested lists render. - Every file link resolves to a file, not a directory. @@ -254,4 +260,4 @@ Before you write the report, confirm each item and fix what fails inside the sco ## Reminder -Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. +Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched; never extend it. diff --git a/.claude/skills/audit-docs/agents/surface-auditor.md b/.claude/skills/audit-docs/agents/surface-auditor.md index 7942d68..7ce6c20 100644 --- a/.claude/skills/audit-docs/agents/surface-auditor.md +++ b/.claude/skills/audit-docs/agents/surface-auditor.md @@ -106,9 +106,12 @@ A comment can be true, non-repeated, and still carry sentences its reader does n - a sentence listing or re-describing members that carry their own comments, which is how a package or type comment turns into a tour of the interface: each member's own comment, and the reference the language generates from them, already carry it; - a sentence describing an alternative that was considered and not taken, where another sentence already states the approach the code uses; - a sentence telling the history of the code, such as what an earlier version did; -- a sentence repeating a reason, constraint, or warning that another kept sentence already gives. +- a sentence repeating a reason, constraint, or warning that another kept sentence already gives; +- a sentence arguing that the code is correct or safe; +- a sentence working out a scenario or consequence that no code, test, or document states; +- a sentence explaining what a language, library, or platform does in general rather than what this code does with it. -Report the comment's own sentences in two verbatim sets: `KEEP`, the sentences carrying something the code does not show, and `CUT`, each sentence of the kinds above beside the code string or member comment it restates. **`KEEP` is never empty for any comment reported here, public or private, documentation or inline**: keep its summary sentence, or the first sentence if unclear. This list tightens a comment and never removes one; a comment whose every sentence restates the line beneath it, with nothing kept, is outside this list and the caller judges it. A sentence giving a reason, a constraint, an edge case, a warning, or an explanation of non-obvious logic that no other kept sentence already gives is always `KEEP`, since that is what the code cannot show. A sentence that only restates one of those, argues against an alternative not taken, or tells the history is `CUT`. A wrong comment is corrected from the body, never deleted; an unread body means keep and report it. Never write replacement text: the caller writes any new wording from code it opens itself. A wrong comment also goes under `CONTRADICTED`, and the caller corrects it before cutting. +Report the comment's own sentences in two verbatim sets: `KEEP`, the sentences carrying something the code does not show, and `CUT`, each sentence of the kinds above beside the code string or member comment it restates. **`KEEP` is never empty for any comment reported here, public or private, documentation or inline**: keep its summary sentence, or the first sentence if unclear. This list tightens a comment and never removes one; a comment whose every sentence restates the line beneath it, with nothing kept, is outside this list and the caller judges it. A sentence giving a reason, a constraint, an edge case, a warning, or an explanation of non-obvious logic about this code that no other kept sentence already gives is `KEEP`, since that is what the code cannot show. A sentence that only restates one of those, argues against an alternative not taken, tells the history, or is one of the last three kinds above is `CUT`, even where it reads like a reason. `KEEP` marks what the code cannot show, not what must survive: the caller may still cut a `KEEP` sentence under its own length limit for a comment the change added. A wrong comment is corrected from the body, never deleted; an unread body means keep and report it. Never write replacement text: the caller writes any new wording from code it opens itself. A wrong comment also goes under `CONTRADICTED`, and the caller corrects it before cutting. ```python # We need to check if the user is eligible for the discount. @@ -200,7 +203,7 @@ DECLARATION: BLOCKED BY: VERBOSE - :: + :: :: KEEP: CUT: :: diff --git a/.claude/skills/audit-docs/assets/audit-report.template.md b/.claude/skills/audit-docs/assets/audit-report.template.md index 607363d..91d7a93 100644 --- a/.claude/skills/audit-docs/assets/audit-report.template.md +++ b/.claude/skills/audit-docs/assets/audit-report.template.md @@ -74,6 +74,10 @@ Code files in scope: [every code file the scope resolved to, each with its resul - `[file]`: [kind of change]. - `[file]`: audited, all accurate, no change. +Comments tightened, with line counts: [`[file]` above `[symbol]`, 37 to 3 lines; or write "none"]. + +Reasons cut from comments the change added, for the author to move to the pull request description or a decision record: [the cut sentence, verbatim, with its file; or write "none"]. + Public symbols left as they stand because their implementation was not read: [`Cache::evict` in `[file]`, `settle_invoice` in `[file]`, or write "none"]. Undocumented public symbols outside the change, listed rather than documented: [`Pool::resize` in `[file]`, or write "none"]. @@ -129,6 +133,7 @@ This run edits documentation, so a code defect is reported here and left alone. - Every symbol reported in Phase 3 as left as it stands because its implementation was not read also appears under Unverified. - No documentation comment on a public or exported symbol, public structure member, package, or module was deleted or cut below one sentence. - Every comment removed, public or private, documentation or inline, is on the closed delete list; every other comment was kept, corrected, or tightened by whole sentences inside the requested scope. +- Every comment the change added is at most two sentences, every comment longer than about five lines in the edit set went through the verbose test, and no edited comment grew by more than one Phase 1 sentence. - Every file changed is inside the scope, and none was renamed, moved, split, or deleted unless the request asked for it or the user approved it. - Every file named in a phase result appears in the files changed table, and every row of that table is a file that was edited. - The file count in the summary matches the number of rows in the table. diff --git a/.claude/skills/audit-docs/references/existing-comments.md b/.claude/skills/audit-docs/references/existing-comments.md index 6dc01ca..3a29d25 100644 --- a/.claude/skills/audit-docs/references/existing-comments.md +++ b/.claude/skills/audit-docs/references/existing-comments.md @@ -1,11 +1,13 @@ # Existing comments: correct, tighten, keep, or delete -An existing comment was written by someone who knew something about the code. The audit's job is to keep that knowledge accurate, not to restyle it. Each pair below shows one outcome of the ordered tests in Phase 3: the first test that applies decides, and deletion is the narrowest outcome. +An existing comment was written by someone who knew something about the code. The audit's job is to keep that knowledge accurate, not to restyle it. Each pair below shows one outcome of the ordered tests in Phase 3: test 1 runs first, then the first of the other tests that applies decides, and deletion is the narrowest outcome. - [Existing comments: correct, tighten, keep, or delete](#existing-comments-correct-tighten-keep-or-delete) - [Drifted private comment: correct it](#drifted-private-comment-correct-it) - [Verbose private documentation comment: tighten it](#verbose-private-documentation-comment-tighten-it) - [Long rationale comment: cut to the decision and its reasons](#long-rationale-comment-cut-to-the-decision-and-its-reasons) + - [Drifted and long comment: correct it, then tighten it](#drifted-and-long-comment-correct-it-then-tighten-it) + - [Comment the change added: cut it to the length of a new comment](#comment-the-change-added-cut-it-to-the-length-of-a-new-comment) - [In-body comment explaining why: keep it](#in-body-comment-explaining-why-keep-it) - [Comment restating the line beneath it: delete it](#comment-restating-the-line-beneath-it-delete-it) - [Change narration carrying a current fact: rewrite it](#change-narration-carrying-a-current-fact-rewrite-it) @@ -95,6 +97,62 @@ let tmp = index_path.with_extension("tmp"); The cut sentences are the history ("Originally we wrote…"), the two alternatives not taken (the lock and the checksum), and "This is the main reason for the design", which restates the reason before it. The warning stays because it is the instruction a maintainer needs. +## Drifted and long comment: correct it, then tighten it + +Correcting a comment does not end the audit of it. Test 1 fixes the count, and test 3 still runs on the corrected comment. + +Before (Kotlin), where `MAX_RETRIES` is `5`: + +```kotlin +// Sends the event batch, retrying up to three times. +// The function takes a list of events and returns true on success. +// It loops over the attempts and calls the client each time. +// The server rejects a batch larger than MAX_BATCH, so the caller must +// split it first. +fun send(events: List): Boolean = retrying(MAX_RETRIES) { client.post(events) } +``` + +After: + +```kotlin +// Sends the event batch, retrying up to `MAX_RETRIES` times. +// The server rejects a batch larger than MAX_BATCH, so the caller must +// split it first. +fun send(events: List): Boolean = retrying(MAX_RETRIES) { client.post(events) } +``` + +The second sentence restates the signature and the third walks through the body. The caller duty stays. + +## Comment the change added: cut it to the length of a new comment + +The pull request added this comment, so it is new writing under review, not knowledge to preserve. It keeps one sentence saying what the code does and one sentence for the constraint a caller needs. + +Before (C#): + +```csharp +// Caches the parsed manifest so repeated lookups skip the disk read. +// This is safe because the manifest is immutable once loaded, and +// ConcurrentDictionary guarantees thread-safe access across callers. +// ConcurrentDictionary uses fine-grained locking, so readers never block +// each other. If two threads miss the cache at the same moment, both may +// parse the file, but GetOrAdd keeps one result for every caller. This +// could matter in a busy deployment where many requests arrive at startup. +// The cache is never invalidated, so a manifest edited on disk is not +// picked up until the process restarts. +private static readonly ConcurrentDictionary Cache = new(); +``` + +After: + +```csharp +// Caches the parsed manifest so repeated lookups skip the disk read. +// The cache is never invalidated, so a manifest edited on disk is not +// picked up until the process restarts. +private static readonly ConcurrentDictionary Cache = new(); +``` + +The cut sentences argue the code is safe, explain what `ConcurrentDictionary` does in general, and work out a busy-deployment scenario that no code states. The report lists the safety argument as a reason cut, so the author can move it to the pull request description. + ## In-body comment explaining why: keep it The comment names the code beneath it and says why it is written this way, which the code cannot show. It passes the name-the-code test and states a reason, so it stays as written, however short the function. @@ -155,3 +213,5 @@ Each of these removes knowledge the code does not carry, and none is on the clos - Replacing a verbose comment with nothing instead of cutting its padding sentences. - Deleting a comment you are unsure about instead of keeping it and reporting it. - Trimming a redundant or verbose comment outside the requested scope, where only a drifted comment is corrected. +- Correcting a long drifted comment and stopping there, without putting it through the verbose test. +- Adding a sentence to a comment the change added when it already holds two. diff --git a/.claude/skills/typescript-code-and-test-standards/SKILL.md b/.claude/skills/typescript-code-and-test-standards/SKILL.md index 6b6ef63..1c4448c 100644 --- a/.claude/skills/typescript-code-and-test-standards/SKILL.md +++ b/.claude/skills/typescript-code-and-test-standards/SKILL.md @@ -118,7 +118,7 @@ Pick one. - **Name the code the comment describes**: a line, a block, the function it sits on, or the file. A comment giving the reason the code is written as it is describes that code and passes. _Bad:_ `// Removed the retry wrapper here since the SDK retries internally.` names a wrapper that is not there. Correct it to the current fact it carries, `// The SDK retries internally, so this call is not wrapped.`, and delete it only when no current fact remains. - **Never argue that the code is correct or safe.** Say what something does or why it exists; do not justify that it works. - A comment that contradicts the code is **corrected, not deleted**. When the two disagree, the code is the truth. -- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the name, signature, or line beneath it, a comment about code that no longer exists with no current fact to correct it towards, change narration stating no current fact, and a copy above a use of what the declaration's comment already says, removed only under the guard in the next rule. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. +- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the name, signature, or line beneath it, a comment about code that no longer exists with no current fact to correct it towards, change narration stating no current fact, and a copy above a use of what the declaration's comment already says, removed only under the guard in the next rule. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. - Inside a function body, a comment restating the line beneath it is noise. Delete those, and keep anything carrying a reason, constraint, hazard, or non-obvious behaviour. A comment you write inside a body is one or two sentences: the reason, and a warning where one is needed, never the history or the alternatives not taken. On a public surface, one sentence saying what a symbol does is not a defect even where its name says so too; a block restating the signature at length is (see **Documentation blocks**). - **A fact about a symbol is documented once, on its declaration.** An export or re-export statement is a declaration, not a use. Never repeat the fact above a line that reads, calls, or branches on the symbol: `// isBetaEnabled mirrors the beta-features flag` belongs on its declaration, not above each `if (isBetaEnabled)`. Each member of an exported structure is its own declaration and keeps its own block. Remove a use-site copy only where both sites are in scope, the declaration's body was read, and the copy says no more than the declaration's comment; fold any additional constraint into the declaration first, and otherwise leave both and say so. - **Never delete a tooling directive.** `//@ts-check`, `/// `, `// @ts-expect-error`, `eslint-disable`, `biome-ignore`, `istanbul ignore`, and `prettier-ignore` are instructions to a tool, not commentary. **Moving one is not deleting it.** Where the same directive repeats across files and the tool reads that same setting from its own configuration, setting the key once and removing the copies relocates the instruction rather than discarding it, and the number of copies removed goes in the change. What this rule forbids is stripping a directive during work that had no reason to touch it. @@ -128,7 +128,7 @@ Pick one. - **Every exported symbol carries a documentation block**, as do members of an exported structure: interface properties, object keys, and enum values. Never delete or cut below one sentence a block on an exported symbol, an exported structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. Write new blocks from the body, never the name: one sentence saying what the symbol does, and a second only for an error, input constraint, or caller obligation the body or a test proves. Write no reason or invariant you cannot point to in the code. - **A file-level block** (`@file`, `@fileoverview`, `@packageDocumentation`) **is one sentence saying what the module is for.** It never lists or re-describes exports that carry their own blocks. -- **Cut a verbose block by whole sentences, above the public floor.** A summary sentence and every sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives stay. A sentence telling the history, describing an alternative not taken, or repeating a kept reason goes. Keep every other sentence word for word, and keep or cut together sentences that depend on one another. A reworded or merged sentence is a new claim that needs the body behind it. Tags follow the rule on existing tags below. +- **Cut a verbose block by whole sentences, above the public floor.** A summary sentence and every sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives stay. A sentence telling the history, describing an alternative not taken, repeating a kept reason, arguing the code is safe, working out a scenario no code states, or explaining what a library does in general goes. Keep every other sentence word for word, and keep or cut together sentences that depend on one another. A reworded or merged sentence is a new claim that needs the body behind it. Tags follow the rule on existing tags below. - A private helper gets a **new** block only when its behaviour is not evident from its name and signature: non-obvious logic, a reason, or a constraint. An existing block on one is kept under the rules in **Comments**. A binding declared inside a function body gets no new block. - **Types in a documentation block depend on whether the file is type-checked.** In a file TypeScript checks, omit `@param {string}`, `@returns {number}`, `@type`, and `@typedef`: the compiler already carries the type, so the annotation becomes prose that drifts from the signature. **In a plain JavaScript file where the documentation block is the type system**, those annotations are load-bearing and stay. Check `tsconfig.json`, `jsconfig.json`, and any `//@ts-check` directive before removing one. - **Leave existing tags alone unless they are wrong.** Read the surrounding code, correct what is factually wrong, and change nothing else: do not strip a `{type}` annotation, reword accurate prose, or delete a tag for looking redundant. Delete one only when it is wrong and uncorrectable, such as documenting a parameter the signature no longer has. diff --git a/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md b/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md index 9209990..798aed7 100644 --- a/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md +++ b/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md @@ -87,7 +87,7 @@ Report a tag only when it is **factually wrong**: it describes a parameter the s - **Argues the code is correct or safe.** A comment defending a decision or asserting that something works documents the edit rather than the code. Finding. - **Contradicts the code.** Finding, and the fix is to **correct the comment, not delete it**. The code is the truth; the mismatch is often the most interesting thing in the file. - **Restates the line beneath it**, inside a function body, in every sentence. Finding, and the fix is deletion. A comment with any sentence giving a reason, constraint, edge case, or warning is not this finding; where padding surrounds such a sentence, it is the verbose finding below. On a public surface, one sentence saying what the symbol does is not a finding even where its name says so too. -- **A documentation block carrying sentences its reader does not need.** A sentence restating the signature or code beneath it, other than the public floor sentence, a sentence re-describing documented members, or a sentence narrating alternatives where the code needs only the conclusion. Finding. Quote the sentences to cut and keep. A summary sentence and every reason, constraint, edge case, or warning are always `KEEP`, so `KEEP` is never empty on any comment. A public or exported symbol, public structure member, package, or module always has a non-empty `KEEP`: the sentence saying what it does, or the first sentence when unclear. Correct a wrong comment from the body, never delete it; if the body was not read, keep and report it. Cut whole sentences and reword none. Tags are not part of this finding. +- **A documentation block carrying sentences its reader does not need.** A sentence restating the signature or code beneath it, other than the public floor sentence, a sentence re-describing documented members, a sentence narrating alternatives where the code needs only the conclusion, a sentence arguing the code is correct or safe, a sentence working out a scenario or consequence no code, test, or document states, or a sentence explaining what a language, library, or platform does in general. Finding. Quote the sentences to cut and keep, and give the comment's line count. A summary sentence and every reason, constraint, edge case, or warning about this code are `KEEP`, so `KEEP` is never empty on any comment. `KEEP` marks what the code cannot show, not what must survive: the caller may still cut a `KEEP` sentence from a comment the change under review added, which is held to the length of a new comment. A public or exported symbol, public structure member, package, or module always has a non-empty `KEEP`: the sentence saying what it does, or the first sentence when unclear. Correct a wrong comment from the body, never delete it; if the body was not read, keep and report it. Cut whole sentences and reword none. Tags are not part of this finding. - **Commented-out code.** Finding, and the fix is deletion. - **Markdown link syntax inside a documentation block.** `[text](url)`, and worse `[name](#anchor)`, which renders as dead text in a hover tooltip. Finding. The fix is `{@link SymbolName}`, `@see https://example.com`, or `{@link https://example.com Display text}`. - **A block comment inside a function body.** Finding, with one exception: naming an argument at a call site, `someFunction(/* shouldRender= */ true)`. diff --git a/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md b/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md index 351413b..e219e86 100644 --- a/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md +++ b/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md @@ -30,7 +30,7 @@ Everything below is what those tools cannot check. - **Comments describe the code as it stands.** Never narrate a change, a fix, or a prior state ("now uses", "changed to", "previously", "no longer", "restored"). Version control carries that, and the comment outlives the change that prompted it. - **Name the code a comment describes**: a line, a block, the function, or the file. A comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. -- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the code beneath it, change narration stating no current fact, and a use-site copy of what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken. Trim only inside the code you were asked to work on. Never delete or cut below one sentence the comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. +- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the code beneath it, change narration stating no current fact, and a use-site copy of what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken. Trim only inside the code you were asked to work on. A comment you correct for drift is still tightened. A comment the change added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show; cut a longer one by whole sentences and never extend it. Never delete or cut below one sentence the comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. - **Never argue that the code is correct or safe.** A note defending a decision documents the edit rather than the code; a sentence giving the reason the code is written as it is stays. - A comment that contradicts the code is **corrected, not deleted**. The code is the truth. - Delete commented-out code. diff --git a/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md b/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md index 00e1220..45417d6 100644 --- a/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md +++ b/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md @@ -86,7 +86,7 @@ Say what something does, or why it exists. Do not justify that it works. **When a comment contradicts the code, the code is the truth and the comment is corrected.** Deleting it loses whatever the comment was reaching for, and the mismatch is often the most interesting thing in the file: it usually means either the comment described an intent the code abandoned, or the code drifted from a constraint that still holds. -**An existing comment is kept by default, public and private alike.** Delete one only when it is commented-out code, every sentence restates the name, signature, or line beneath it, it describes code that no longer exists with no current fact to correct it towards, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even if it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. +**An existing comment is kept by default, public and private alike.** Delete one only when it is commented-out code, every sentence restates the name, signature, or line beneath it, it describes code that no longer exists with no current fact to correct it towards, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even if it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. ## Comments that restate the line beneath them diff --git a/.github/prompts/audit-docs.prompt.md b/.github/prompts/audit-docs.prompt.md index 53d2453..b540f92 100644 --- a/.github/prompts/audit-docs.prompt.md +++ b/.github/prompts/audit-docs.prompt.md @@ -10,7 +10,7 @@ agent: 'agent' Read this whole prompt before you start. Check the project's own files (#codebase), resolving each reference with your own file-search, pull request, and diff tools if it is not handed to you. - **Documentation has two parts, and you audit both.** One part is the Markdown pages. The other is the comments in the code: documentation comments, inline comments, and file headers. On a pull request, audit the comments in every code file the diff touched, not only the Markdown. -- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. +- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to that same length: tighten a longer one in this run, and never add to it. - **Write plain English for people.** Your reader is a developer reading once. Write complete, grammatical sentences, one idea each, with ordinary pronouns and transitions where the meaning is clear. State what the code does. Do not work out scenarios or consequences that no code, test, or document states. - **Edit only what the request covers.** Edit in full only the files the scope resolves to (see [Scope](#scope)). On a pull request or working changes, those are the files the diff touched. Any other document gets only the edits the change itself requires. A file you opened only for context stays exactly as you found it. - **Files keep their path and name.** Rename, move, split, merge, or delete a file, or create a directory, only when the request asks for it or the user approves it. Where one looks necessary, ask the user and wait. Where you cannot ask, propose it in your report instead. @@ -63,6 +63,7 @@ Run this phase only when there is an active pull request or working changes. Tre - List what the diff changed in behaviour: added, removed, or modified. - For each change, update whichever documentation describes that behaviour: a Markdown page, a code comment, or both. Do this even where the pull request did not touch the docs. - Document only behaviour the change made. Edit the existing sentence the change made false before you consider adding one. A new sentence states the new behaviour and stops. +- A comment gains at most one sentence in this phase. Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. - Report whether you made changes or found the documentation already accurate. ## Phase 2: audit the Markdown pages @@ -85,14 +86,18 @@ Run this phase on every audit, over every code file in scope, whatever Phases 1 ### Judge each existing comment with these tests, in order -The first test that applies decides. +Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, so a comment you corrected is still tightened. 1. **Drifted.** It states something the code no longer does. Correct it from the body, and keep the wording that is still true. 2. **Wholly redundant.** Every sentence restates the name, the signature, or the line beneath it, such as `// Increment counter`, and gives no reason, constraint, edge case, or warning. Delete it, unless the floor keeps it. -3. **Verbose.** A useful fact sits inside padding. Keep the summary sentence and each sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives. Cut whole sentences that restate the signature, describe members that have their own comments, walk through the body, describe alternatives that were not taken, tell the history of the code, or repeat a reason already given. This test never removes a whole comment. Put every comment longer than about five lines through this test. +3. **Verbose.** A useful fact sits inside padding. Keep the summary sentence and each sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives. Cut whole sentences that restate the signature, describe members that have their own comments, walk through the body, describe alternatives that were not taken, tell the history of the code, or repeat a reason already given. Also cut a sentence that argues the code is correct or safe, works out a scenario or consequence that no code, test, or document states, or explains what a language, library, or platform does in general. These read like reasons but give none about this code. This test never removes a whole comment. Put every comment longer than about five lines through this test. 4. **Otherwise, it stays as written.** -**Cut by whole sentences.** Keep every sentence you do not cut word for word. Where a kept sentence depends on a cut one ("also", "these"), keep both or cut both. A rewritten or merged sentence is a new claim and needs its own proof. Correct a comment that is both wrong and long before you tighten it. +**Cut by whole sentences.** Keep every sentence you do not cut word for word. Where a kept sentence depends on a cut one ("also", "these"), keep both or cut both. A rewritten or merged sentence is a new claim and needs its own proof. + +### A comment the change added + +On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. The floor and the closed delete list still apply. **The closed delete list.** Besides test 2, delete only: @@ -213,7 +218,8 @@ Before you write the report, confirm each item and fix what fails inside the sco - Every existing list, table, and code block kept its form; any code block you removed only transcribed code and is now a link. - No hedging, no new subjective adjectives, and no em-dashes or en-dashes in what you wrote. - No comment was deleted except under the closed list, no public symbol's comment dropped below its floor, and every tightened comment lost whole sentences only. -- Every comment you wrote is at most two sentences, and it sits on a declaration, not above a use. +- Every comment you wrote, and every comment the diff added, is at most two sentences, and a comment you wrote sits on a declaration, not above a use. No comment you edited grew by more than one Phase 1 sentence. +- Every comment in the edit set longer than about five lines went through test 3, and the report gives its line count before and after. - Each page you edited in full opens by naming its subject, and nothing in it stops a newcomer, or your report names the place that does. - Every diagram has `accTitle` and `accDescr` and parses, and every image has real alt text. Every table you touched still has matching cell counts, and nested lists render. - Every file link resolves to a file, not a directory. @@ -221,8 +227,8 @@ Before you write the report, confirm each item and fix what fails inside the sco ## Report -End with a report under these headings: scope and summary (the rule that applied, files read and changed); Phase 1, Phase 2, and Phase 3 results, each with a status line, where Phase 3 names every code file in scope with its result; files changed, one row per file with the kind of change and its line count before and after; Unverified; observed outside scope; and code problems observed but not changed. Name files in code spans. Write "none" under a heading with nothing to report. +End with a report under these headings: scope and summary (the rule that applied, files read and changed); Phase 1, Phase 2, and Phase 3 results, each with a status line, where Phase 3 names every code file in scope with its result, each tightened comment with its line count before and after, and each reason cut from a comment the change added; files changed, one row per file with the kind of change and its line count before and after; Unverified; observed outside scope; and code problems observed but not changed. Name files in code spans. Write "none" under a heading with nothing to report. ## Reminder -Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. +Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched; never extend it. diff --git a/package-lock.json b/package-lock.json index fde05af..9644879 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@emotion/styled": "^11.14.1", "@mui/icons-material": "^9.5.0", "@mui/material": "^9.5.0", - "@sentry/nextjs": "^11.11.0", + "@sentry/nextjs": "^11.12.0", "@vercel/speed-insights": "^2.1.0", "firebase": "^13.2.0", "lodash": "^4.18.1", @@ -39,7 +39,7 @@ "eslint": "^10.14.0", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "markdownlint-cli2": "^0.23.3", + "markdownlint-cli2": "^0.24.0", "prettier": "^3.9.10", "sass": "^1.108.1", "start-server-and-test": "^3.0.13", @@ -7233,30 +7233,30 @@ ] }, "node_modules/@sentry/browser": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-11.11.0.tgz", - "integrity": "sha512-UEq04DIcfCVUMF+T0rH9nLTEjVlymmZC8D/7JELJyZkpxMCtnf8iq3aPJ3DXICDCjSo7CuuOI9OIZ32KmmsyPA==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-11.12.0.tgz", + "integrity": "sha512-oiSs0ZZQGVLVLASxTk/Z+MW4cGOHhC65IKc3B//M54eaZEa4p6JqP2DM++ta4IqDQx8+lSD6+TglAIsHBdSyVQ==", "license": "MIT", "dependencies": { - "@sentry/browser-utils": "11.11.0", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0", - "@sentry/feedback": "11.11.0", - "@sentry/replay": "11.11.0", - "@sentry/replay-canvas": "11.11.0" + "@sentry/browser-utils": "11.12.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0", + "@sentry/feedback": "11.12.0", + "@sentry/replay": "11.12.0", + "@sentry/replay-canvas": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/browser-utils": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/browser-utils/-/browser-utils-11.11.0.tgz", - "integrity": "sha512-sL1BK7Z7ubIBp+cnz5VIQcVPn+t4PgWTWYaK/AWklPzeA75CJ5xeeCrx0RUvg65k0BbUcc/XvWVxg5v73RQqiQ==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/browser-utils/-/browser-utils-11.12.0.tgz", + "integrity": "sha512-OttAHqf557R1gfLQRqb/dpGUK1UQd21qkeeN0KA/ThuymYXTNY+qTpJIOqmzgpk6fOmE922mTT6xmnMEiGYZBQ==", "license": "MIT", "dependencies": { - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0", "web-vitals": "^6.2.3" }, "engines": { @@ -7264,18 +7264,17 @@ } }, "node_modules/@sentry/bundler-plugins": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/bundler-plugins/-/bundler-plugins-11.11.0.tgz", - "integrity": "sha512-et1v8V74ARNOSQ+k4VG7PRiNJl2APGAzlRCiUt42izw8yD+X+E4oCe7wwHjohmv3zufvD1VntHDptSC0/9ChQw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/bundler-plugins/-/bundler-plugins-11.12.0.tgz", + "integrity": "sha512-7vBXoHMoYKjYu08anYv5I0nplSWOfQyl7BqV0VOrLxEtGoOpk1+DxL2dyBiaWoAtISkaqJEV/ft813OsCGuuMg==", "license": "MIT", "dependencies": { - "@sentry/core": "11.11.0", + "@sentry/core": "11.12.0", "dotenv": "^17.4.2", "glob": "^14.0.3", "magic-string": "~0.30.8 || ^1.0.0", "oxc-parser": "^0.152.0", - "sentry": "^0.45.0", - "supports-color": "^8.1.1" + "sentry": "^0.49.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" @@ -7294,16 +7293,16 @@ } }, "node_modules/@sentry/cloudflare": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/cloudflare/-/cloudflare-11.11.0.tgz", - "integrity": "sha512-N3s9PjTDNvkIDFdoTbPtJnJsxDVUPvd0AEh/aMtZaqJK90vk2yULpP7VjU96nCIl4VMwc8E/YpNbPyBX0eAxhQ==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/cloudflare/-/cloudflare-11.12.0.tgz", + "integrity": "sha512-m/nls+rx8NTCfxqgIMsw57lit5Rbo8VKbbrGDEZF65qsG12uV7wORDrUV6PnGi/MCjXx1Cc+tfdc90ljAlamwQ==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.1", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0", - "@sentry/opentelemetry": "11.11.0", - "@sentry/server-utils": "11.11.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0", + "@sentry/opentelemetry": "11.12.0", + "@sentry/server-utils": "11.12.0", "magic-string": "~0.30.21" }, "engines": { @@ -7327,57 +7326,57 @@ } }, "node_modules/@sentry/conventions": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/@sentry/conventions/-/conventions-0.30.0.tgz", - "integrity": "sha512-WTumd5A2iFmHTRubi6mc6gLHU8LswPQqoNaZu6T1cxiTUmy3WdEw0i8FAnVbcgxTlsumX5oh63/b4B9lY5wAPQ==", + "version": "0.32.0", + "resolved": "https://registry.npmjs.org/@sentry/conventions/-/conventions-0.32.0.tgz", + "integrity": "sha512-WkSQcDhUUsz1SwxR23LpmyPKba+dgxxiH0DWV4VSM9yaAvhhl87ppW2Ts3g4piIKCVflc31aJeWy+biUbYfsMQ==", "license": "MIT", "engines": { "node": ">=14" } }, "node_modules/@sentry/core": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-11.11.0.tgz", - "integrity": "sha512-PRrcEdPrTYuHcbDa6DhJZR9Qg2d+2gjKVXiv2QeiTgxvhvXDxYiaVSXH0lldKTR099Er5TAEChiX7aEu4yNlUw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-11.12.0.tgz", + "integrity": "sha512-HKER7EcRpPPgC8mLRe5BzP6njfRYFZ53BFLZxVp1whWbY6lp/b2mvTBk4q6+rKsUFhLhRDsd6jL8y/8ddEWv6A==", "license": "MIT", "dependencies": { - "@sentry/conventions": "^0.30.0" + "@sentry/conventions": "^0.32.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/feedback": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/feedback/-/feedback-11.11.0.tgz", - "integrity": "sha512-KP1AYilzLYLIDcDiUD8eaEV955x5rKnwdxpXE70sJpuHUWuEB28MyyDe+tPWU8/MZtdmFGrqCxRqGQN9dNuvtw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/feedback/-/feedback-11.12.0.tgz", + "integrity": "sha512-vYOIeby3tVoKZ/q70D1NJ48D4APMVcojyvCjlaZkFOQR6DIEsOjF/uC9MkhnCP3cpa4oADdMatsIpkhlPM+qng==", "license": "MIT", "dependencies": { - "@sentry/core": "11.11.0" + "@sentry/core": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/nextjs": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-11.11.0.tgz", - "integrity": "sha512-JbdOylp8K2ImT/zihYwJUiwhfjZ1c1PKpzEy+bT4+meA5+Shzwlkzk3X/BVOr1i4nBl4iYg6VtpVdWa6bxeYTw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/nextjs/-/nextjs-11.12.0.tgz", + "integrity": "sha512-IFmUbw8J+hrJTN3SoFG+CilZ8kMiRpA7G2Or8frCER3kfB+ZxkYJdYf0PJf/OMd0xKmSyfAozcqXJAfkEXIHIw==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.1", "@rollup/plugin-commonjs": "28.0.1", - "@sentry/browser-utils": "11.11.0", - "@sentry/bundler-plugins": "11.11.0", - "@sentry/cloudflare": "11.11.0", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0", - "@sentry/node": "11.11.0", - "@sentry/opentelemetry": "11.11.0", - "@sentry/react": "11.11.0", - "@sentry/server-runtime-injection": "11.11.0", - "@sentry/server-utils": "11.11.0", - "@sentry/vercel-edge": "11.11.0", + "@sentry/browser-utils": "11.12.0", + "@sentry/bundler-plugins": "11.12.0", + "@sentry/cloudflare": "11.12.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0", + "@sentry/node": "11.12.0", + "@sentry/opentelemetry": "11.12.0", + "@sentry/react": "11.12.0", + "@sentry/server-runtime-injection": "11.12.0", + "@sentry/server-utils": "11.12.0", + "@sentry/vercel-edge": "11.12.0", "rollup": "^4.60.3", "stacktrace-parser": "^0.1.11" }, @@ -7389,31 +7388,31 @@ } }, "node_modules/@sentry/node": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/node/-/node-11.11.0.tgz", - "integrity": "sha512-6hbFui4AwP/1KGQD7wgvG0rjve4vgb9x+cBAaHV2N7YwZDZUoKdVaJr/S4PYByuI6UPR8xtwGluFlMFXOScz+Q==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/node/-/node-11.12.0.tgz", + "integrity": "sha512-MNSZDOd92Twrq5Z4ZAkxZdIfhr3YGytFb1T+vh5bNXVHkqByWpI/P2VtTSrzBR4Pi1IDRMz0i8t/OWNOsuAuBg==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.1", - "@sentry/bundler-plugins": "11.11.0", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0", - "@sentry/opentelemetry": "11.11.0", - "@sentry/server-runtime-injection": "11.11.0", - "@sentry/server-utils": "11.11.0" + "@sentry/bundler-plugins": "11.12.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0", + "@sentry/opentelemetry": "11.12.0", + "@sentry/server-runtime-injection": "11.12.0", + "@sentry/server-utils": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/opentelemetry": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-11.11.0.tgz", - "integrity": "sha512-L1lXAF1hNUSOTLG8NLkBaopvWWpXqlYgQ++cfWr8Gw4wdmReNp9ec533bEj4r6ZJ6PvIYNdIVNI22GdvmbP6xg==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/opentelemetry/-/opentelemetry-11.12.0.tgz", + "integrity": "sha512-oWJwUdc2OSSvyOPXn/E1nWkC3GV5KNTWfR5prbw/0XxlKJepdlBsW19y+FAE9n3QznZ52aMZmetWEAFMsPJ0KQ==", "license": "MIT", "dependencies": { - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0" + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" @@ -7423,14 +7422,14 @@ } }, "node_modules/@sentry/react": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-11.11.0.tgz", - "integrity": "sha512-c0Z+MPFIahsFximTIq4kmxldKY9XG1FWmIgblosRxqd5xEj27/TbfZsv2/yYg6jMNVvSkYwbZ3nm7xoBryGZWw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-11.12.0.tgz", + "integrity": "sha512-tNr2yyfj//7Wrn0scoauR8D9FG93PWSRPQakWuvlVXGIXEAx/pwVkOjWYKUD1Xhyo8Hbvu5f6ddQ0+StsL3zyw==", "license": "MIT", "dependencies": { - "@sentry/browser": "11.11.0", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0" + "@sentry/browser": "11.12.0", + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" @@ -7446,67 +7445,67 @@ } }, "node_modules/@sentry/replay": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-11.11.0.tgz", - "integrity": "sha512-di2nOSxPOu9kgNb4G3Y0uAOCX4mKmTCfzyJxTQBKaj0F9ymugUO9Epu4n5Vez7x96KpfIZPA1AzbNVArYmVX2g==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-11.12.0.tgz", + "integrity": "sha512-SF1064TKmOvIQTKo8WelVB34IZWtYtrflInsydPeB9jMTpy2iE3LqKRizDJr3YivjMUPDgIGn67b+0kaxiwQ4g==", "license": "MIT", "dependencies": { - "@sentry/browser-utils": "11.11.0", - "@sentry/core": "11.11.0" + "@sentry/browser-utils": "11.12.0", + "@sentry/core": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/replay-canvas": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/replay-canvas/-/replay-canvas-11.11.0.tgz", - "integrity": "sha512-iVI8+Y+iC6/B6oEjDv63HzxzCsOIEiyb0MzyJiU45/IgQnriP1FUehqO6GitFtjEasl9//lWQL0RwPy97Eb7NQ==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/replay-canvas/-/replay-canvas-11.12.0.tgz", + "integrity": "sha512-kx9Q3TY8pMp0b12fpcR0tziGoEW7Z8PpFKncmzD9XYWE3YzMt//B+cjkR+vmmZSUVxOuQATYDFp9c1jRTnbrug==", "license": "MIT", "dependencies": { - "@sentry/core": "11.11.0", - "@sentry/replay": "11.11.0" + "@sentry/core": "11.12.0", + "@sentry/replay": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/server-runtime-injection": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/server-runtime-injection/-/server-runtime-injection-11.11.0.tgz", - "integrity": "sha512-nHHWfOYi2sB7db9Hjr3i/H66e1/YK9WMlBx3MSI6p/Ha66BGHF3vea/+gILjPz21viQclg1xq37mj8k9KLkGJw==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/server-runtime-injection/-/server-runtime-injection-11.12.0.tgz", + "integrity": "sha512-fAZjCFyEfhvyfEdbav0/X13Yqbom5Ka1+hG0Nyl6bd7GxkQIWd68unSIw/Rvzfj/DSO8A1JidezST3D6omALkw==", "license": "MIT", "dependencies": { - "@sentry/core": "11.11.0", - "@sentry/server-utils": "11.11.0" + "@sentry/core": "11.12.0", + "@sentry/server-utils": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/server-utils": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/server-utils/-/server-utils-11.11.0.tgz", - "integrity": "sha512-t1lx9Zw+zhRre0ko+F3CsucG2BqB/7KOZmG1W+Wv/fSvYSnT06vg7WhIvmvH+df7BSFO+cFGBpkxwQWGq3zj+w==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/server-utils/-/server-utils-11.12.0.tgz", + "integrity": "sha512-gAP5FLhXSiMs9vsU7guc54QNY1OzUJmhqyXMjhiP4SYlhQltoKtipcyo8pFWVsmylIzIkA8e2eGR6e0YA6YF3A==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.1", - "@sentry/conventions": "^0.30.0", - "@sentry/core": "11.11.0" + "@sentry/conventions": "^0.32.0", + "@sentry/core": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" } }, "node_modules/@sentry/vercel-edge": { - "version": "11.11.0", - "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-11.11.0.tgz", - "integrity": "sha512-/EA3ilVCh7bPes6a2Qbs/M6C17kBQAeQy0yL10W/26hDKapAuO5PnjimbwslEpgxDyZFZUzGBQByp0StyDlVFQ==", + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/@sentry/vercel-edge/-/vercel-edge-11.12.0.tgz", + "integrity": "sha512-+s+XyGtncoeQQd0f1hjdXbjIORcAt5IdhmcV1mz0vwBlyilfq3bB40bCg1j91g2L4xTlVmTm01X2ofGeKkZuew==", "license": "MIT", "dependencies": { "@opentelemetry/api": "^1.9.1", - "@sentry/core": "11.11.0", - "@sentry/server-utils": "11.11.0" + "@sentry/core": "11.12.0", + "@sentry/server-utils": "11.12.0" }, "engines": { "node": ">=20.19.0 <22.0.0 || >=22.12.0 <23.0.0 || >=23.2.0" @@ -9943,19 +9942,6 @@ "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" } }, - "node_modules/concurrently/node_modules/supports-color": { - "version": "10.2.2", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", - "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -10250,6 +10236,22 @@ "node": ">=8" } }, + "node_modules/cypress/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/dashdash": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", @@ -10541,9 +10543,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.478", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.478.tgz", - "integrity": "sha512-pftG+ma5Lm8O6/p45bhYT6StBN5ziQymaRzmCZwFl8DwWHKPPD93FdOmP1aqftcepolQYvrcyTLa17kE8Yf+jg==", + "version": "1.5.480", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.480.tgz", + "integrity": "sha512-7WLDoWPKc+YiH37GshK2sLagySSbcQk3K2s6swA3x+BtWUH8BtphwL+YqarJQi09Sbf+LOCIW75RQooN2PqXsA==", "dev": true, "license": "ISC" }, @@ -11474,9 +11476,9 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "11.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.5.tgz", - "integrity": "sha512-snPlVppFcYWfLLFQGhDxUyBcHNtMlWmn3jtj7pEaO+DP8pqL0IvAzXhMYmn1z9ASNtgmwLBdFxSf4tMUB0OTKA==", + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.7.tgz", + "integrity": "sha512-Tnk+M9mPjqKDZlUd77eMSjPjhnlBIa1mABOwetMryIshUwi1YmOBdGFfQnHgn4Z8A66eLT8ENzJrxwYmKfqrZg==", "license": "BlueOak-1.0.0", "dependencies": { "@isaacs/nonrecursive-glob-match": "^1.1.0", @@ -11587,6 +11589,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, "license": "MIT", "engines": { "node": ">=8" @@ -13894,6 +13897,22 @@ "node": "^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0" } }, + "node_modules/jest-worker/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, "node_modules/joi": { "version": "18.3.2", "resolved": "https://registry.npmjs.org/joi/-/joi-18.3.2.tgz", @@ -14497,9 +14516,9 @@ } }, "node_modules/markdown-it": { - "version": "15.0.1", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.1.tgz", - "integrity": "sha512-9/7gE95FNPkfUWrjJIoHZza2iLmuJlPD0UNMxPi7bxUrbCR525YZY0r+zyfes0dZI5ZZ/uNIXUJca0pJvtw41g==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.3.tgz", + "integrity": "sha512-+Az7Ojz3iRGu8KYMvJ6xVhvrxP3eE+vEtJX75Ow88XBpcQNV/0lGX5ZynIIBftREo4DC2jsveAMDaeltmm8QvQ==", "dev": true, "funding": [ { @@ -14513,9 +14532,9 @@ ], "license": "MIT", "dependencies": { - "argparse": "^3.0.0", - "entities": "^8.0.0", - "linkify-it": "^6.0.0", + "argparse": "^3.0.3", + "entities": "^8.1.0", + "linkify-it": "^6.1.0", "mdurl": "^2.1.0", "punycode.js": "^2.3.1", "uc.micro": "^3.0.0" @@ -14555,21 +14574,22 @@ } }, "node_modules/markdownlint": { - "version": "0.41.1", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.41.1.tgz", - "integrity": "sha512-qHKeU2E1bdyNAT077go2FVTNXvYcktN5IHtF6XyeD1l0PClxzSp2tUApAV14ORI8DGX4H9bNKZEzelZp4qn8IA==", + "version": "0.42.0", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.42.0.tgz", + "integrity": "sha512-kzsCV/rPWRFn3jUhcB919YF4Qgeh0g9tcogoXFadGSo6Zxj6662YOqWXv0jDn8nv5KCCxDfMKJZv6N4HkNkvTg==", "dev": true, "license": "MIT", "dependencies": { - "micromark": "4.0.2", - "micromark-core-commonmark": "2.0.3", + "micromark": "4.0.3", + "micromark-core-commonmark": "2.0.4", "micromark-extension-directive": "4.0.0", "micromark-extension-gfm-autolink-literal": "2.1.0", "micromark-extension-gfm-footnote": "2.1.0", - "micromark-extension-gfm-table": "2.1.1", + "micromark-extension-gfm-table": "2.1.2", "micromark-extension-math": "3.1.0", - "micromark-util-types": "2.0.2", - "string-width": "8.2.1" + "micromark-util-types": "2.0.3", + "re2js": "2.8.6", + "string-width": "8.3.0" }, "engines": { "node": ">=22" @@ -14579,21 +14599,21 @@ } }, "node_modules/markdownlint-cli2": { - "version": "0.23.3", - "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.23.3.tgz", - "integrity": "sha512-xAr5o/TGpC3v6lE6cKIW4b5eOFRrRX5u7Vtjae9ix3RALv8nNOd94XMkD/1OXXBtpMcJ4uQGbpSo3hv5UqS4uQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.24.0.tgz", + "integrity": "sha512-c5hU2MDoTlS230MLzdNlkIyxImXq5acxGKz4nYz4aDhH/2BgFtpsA7iK9/OoTHMgZ4FuR0wedTQA31K6Lp9I/Q==", "dev": true, "license": "MIT", "dependencies": { "globby": "16.2.4", - "js-yaml": "5.4.1", + "js-yaml": "5.4.3", "jsonc-parser": "3.3.1", "jsonpointer": "5.0.1", - "markdown-it": "15.0.1", - "markdownlint": "0.41.1", + "markdown-it": "15.0.3", + "markdownlint": "0.42.0", "markdownlint-cli2-formatter-default": "0.0.6", "micromatch": "4.0.8", - "smol-toml": "1.8.0" + "smol-toml": "1.9.1" }, "bin": { "markdownlint-cli2": "markdownlint-cli2-bin.mjs" @@ -14619,9 +14639,9 @@ } }, "node_modules/markdownlint-cli2/node_modules/js-yaml": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.1.tgz", - "integrity": "sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==", + "version": "5.4.3", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.3.tgz", + "integrity": "sha512-yzzNtgczwgoVHNigCyKTXcQJU4Y8t/ikU4UxXW0BvrLfHTGWZhsNcOT2s/a7vn81/4KqVnNmHjaUEPlvWnNwVw==", "dev": true, "funding": [ { @@ -14641,10 +14661,20 @@ "js-yaml": "bin/js-yaml.mjs" } }, + "node_modules/markdownlint/node_modules/re2js": { + "version": "2.8.6", + "resolved": "https://registry.npmjs.org/re2js/-/re2js-2.8.6.tgz", + "integrity": "sha512-xLgQil4kIUCrAzVk9fRSkxkFNwmygLFjVxXrLc65aE1F0+Zsb8rxumFBy4XKyvgMCTL6kilDq3EZ0piE2dP/Dg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/markdownlint/node_modules/string-width": { - "version": "8.2.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz", - "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", + "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", "dev": true, "license": "MIT", "dependencies": { @@ -14700,9 +14730,9 @@ } }, "node_modules/micromark": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", - "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.3.tgz", + "integrity": "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==", "dev": true, "funding": [ { @@ -14726,6 +14756,7 @@ "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", + "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", @@ -14736,9 +14767,9 @@ } }, "node_modules/micromark-core-commonmark": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", - "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.4.tgz", + "integrity": "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==", "dev": true, "funding": [ { @@ -14756,18 +14787,19 @@ "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", - "micromark-factory-space": "^2.0.0", + "micromark-factory-space": "^2.1.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", + "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.0" + "micromark-util-types": "^2.0.3" } }, "node_modules/micromark-extension-directive": { @@ -14829,9 +14861,9 @@ } }, "node_modules/micromark-extension-gfm-table": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", - "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz", + "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==", "dev": true, "license": "MIT", "dependencies": { @@ -15082,6 +15114,26 @@ "micromark-util-symbol": "^2.0.0" } }, + "node_modules/micromark-util-edit-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/micromark-util-edit-map/-/micromark-util-edit-map-1.0.0.tgz", + "integrity": "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==", + "dev": true, + "funding": [ + { + "type": "GitHub Sponsors", + "url": "https://github.com/sponsors/unifiedjs" + }, + { + "type": "OpenCollective", + "url": "https://opencollective.com/unified" + } + ], + "license": "MIT", + "dependencies": { + "micromark-util-types": "^2.0.0" + } + }, "node_modules/micromark-util-encode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", @@ -15219,9 +15271,9 @@ "license": "MIT" }, "node_modules/micromark-util-types": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", - "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz", + "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==", "dev": true, "funding": [ { @@ -16225,9 +16277,9 @@ "license": "MIT" }, "node_modules/re2js": { - "version": "2.9.1", - "resolved": "https://registry.npmjs.org/re2js/-/re2js-2.9.1.tgz", - "integrity": "sha512-JIT3bEEUZTOR2YS1walNEIfH4cF/cQeZcBUFq7ldqO6lR6g0X5CBq/S8rsa9omzZcsNf8qc36jCkWpKKtncrZg==", + "version": "2.10.0", + "resolved": "https://registry.npmjs.org/re2js/-/re2js-2.10.0.tgz", + "integrity": "sha512-/P6FNnLbHjXJMRF1dPoZoVTyHvFcuVhbDpzml9DPMlbeErYlZ18GueAaG9GhYhAm/9AN7i7Y6crmDrLX0DeJ4Q==", "license": "MIT", "engines": { "node": ">=20.0.0" @@ -16685,9 +16737,9 @@ } }, "node_modules/sentry": { - "version": "0.45.0", - "resolved": "https://registry.npmjs.org/sentry/-/sentry-0.45.0.tgz", - "integrity": "sha512-kgmEbLlC22lL7uneeUm9Sjz65rp5cvwYOMTxXbZCmBum4sbVre/lLT3zTV3kwXHJ9/BM8ZS0/GhZe9Cl1t6WyA==", + "version": "0.49.0", + "resolved": "https://registry.npmjs.org/sentry/-/sentry-0.49.0.tgz", + "integrity": "sha512-9tjS0jTx5FQzhwAGhpcnwvqE0MlQiwJtunsIUNqGkw6E9CBOMbijlamIDUqvZTDtJAveVwa9L5ziP44bOJUzcQ==", "license": "FSL-1.1-Apache-2.0", "bin": { "sentry": "dist/bin.cjs" @@ -16917,9 +16969,9 @@ } }, "node_modules/smol-toml": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.8.0.tgz", - "integrity": "sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==", + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.1.tgz", + "integrity": "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -17326,15 +17378,13 @@ "license": "MIT" }, "node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, "license": "MIT", - "dependencies": { - "has-flag": "^4.0.0" - }, "engines": { - "node": ">=10" + "node": ">=18" }, "funding": { "url": "https://github.com/chalk/supports-color?sponsor=1" diff --git a/package.json b/package.json index beeacde..203b6d3 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "@emotion/styled": "^11.14.1", "@mui/icons-material": "^9.5.0", "@mui/material": "^9.5.0", - "@sentry/nextjs": "^11.11.0", + "@sentry/nextjs": "^11.12.0", "@vercel/speed-insights": "^2.1.0", "firebase": "^13.2.0", "lodash": "^4.18.1", @@ -64,7 +64,7 @@ "eslint": "^10.14.0", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "markdownlint-cli2": "^0.23.3", + "markdownlint-cli2": "^0.24.0", "prettier": "^3.9.10", "sass": "^1.108.1", "start-server-and-test": "^3.0.13", From 37683a86be19be8f843ba2f7b3d6e1e786a0a753 Mon Sep 17 00:00:00 2001 From: Alexander Sullivan Date: Tue, 24 Nov 2026 20:51:14 -0500 Subject: [PATCH 2/5] Hold markdownlint-cli2 at 0.23.3 to drop vulnerable re2js 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 --- package-lock.json | 123 +++++++++++++++++----------------------------- package.json | 2 +- 2 files changed, 46 insertions(+), 79 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9644879..0099011 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "eslint": "^10.14.0", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "markdownlint-cli2": "^0.24.0", + "markdownlint-cli2": "^0.23.3", "prettier": "^3.9.10", "sass": "^1.108.1", "start-server-and-test": "^3.0.13", @@ -14516,9 +14516,9 @@ } }, "node_modules/markdown-it": { - "version": "15.0.3", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.3.tgz", - "integrity": "sha512-+Az7Ojz3iRGu8KYMvJ6xVhvrxP3eE+vEtJX75Ow88XBpcQNV/0lGX5ZynIIBftREo4DC2jsveAMDaeltmm8QvQ==", + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-15.0.1.tgz", + "integrity": "sha512-9/7gE95FNPkfUWrjJIoHZza2iLmuJlPD0UNMxPi7bxUrbCR525YZY0r+zyfes0dZI5ZZ/uNIXUJca0pJvtw41g==", "dev": true, "funding": [ { @@ -14532,9 +14532,9 @@ ], "license": "MIT", "dependencies": { - "argparse": "^3.0.3", - "entities": "^8.1.0", - "linkify-it": "^6.1.0", + "argparse": "^3.0.0", + "entities": "^8.0.0", + "linkify-it": "^6.0.0", "mdurl": "^2.1.0", "punycode.js": "^2.3.1", "uc.micro": "^3.0.0" @@ -14574,22 +14574,21 @@ } }, "node_modules/markdownlint": { - "version": "0.42.0", - "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.42.0.tgz", - "integrity": "sha512-kzsCV/rPWRFn3jUhcB919YF4Qgeh0g9tcogoXFadGSo6Zxj6662YOqWXv0jDn8nv5KCCxDfMKJZv6N4HkNkvTg==", + "version": "0.41.1", + "resolved": "https://registry.npmjs.org/markdownlint/-/markdownlint-0.41.1.tgz", + "integrity": "sha512-qHKeU2E1bdyNAT077go2FVTNXvYcktN5IHtF6XyeD1l0PClxzSp2tUApAV14ORI8DGX4H9bNKZEzelZp4qn8IA==", "dev": true, "license": "MIT", "dependencies": { - "micromark": "4.0.3", - "micromark-core-commonmark": "2.0.4", + "micromark": "4.0.2", + "micromark-core-commonmark": "2.0.3", "micromark-extension-directive": "4.0.0", "micromark-extension-gfm-autolink-literal": "2.1.0", "micromark-extension-gfm-footnote": "2.1.0", - "micromark-extension-gfm-table": "2.1.2", + "micromark-extension-gfm-table": "2.1.1", "micromark-extension-math": "3.1.0", - "micromark-util-types": "2.0.3", - "re2js": "2.8.6", - "string-width": "8.3.0" + "micromark-util-types": "2.0.2", + "string-width": "8.2.1" }, "engines": { "node": ">=22" @@ -14599,21 +14598,21 @@ } }, "node_modules/markdownlint-cli2": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.24.0.tgz", - "integrity": "sha512-c5hU2MDoTlS230MLzdNlkIyxImXq5acxGKz4nYz4aDhH/2BgFtpsA7iK9/OoTHMgZ4FuR0wedTQA31K6Lp9I/Q==", + "version": "0.23.3", + "resolved": "https://registry.npmjs.org/markdownlint-cli2/-/markdownlint-cli2-0.23.3.tgz", + "integrity": "sha512-xAr5o/TGpC3v6lE6cKIW4b5eOFRrRX5u7Vtjae9ix3RALv8nNOd94XMkD/1OXXBtpMcJ4uQGbpSo3hv5UqS4uQ==", "dev": true, "license": "MIT", "dependencies": { "globby": "16.2.4", - "js-yaml": "5.4.3", + "js-yaml": "5.4.1", "jsonc-parser": "3.3.1", "jsonpointer": "5.0.1", - "markdown-it": "15.0.3", - "markdownlint": "0.42.0", + "markdown-it": "15.0.1", + "markdownlint": "0.41.1", "markdownlint-cli2-formatter-default": "0.0.6", "micromatch": "4.0.8", - "smol-toml": "1.9.1" + "smol-toml": "1.8.0" }, "bin": { "markdownlint-cli2": "markdownlint-cli2-bin.mjs" @@ -14639,9 +14638,9 @@ } }, "node_modules/markdownlint-cli2/node_modules/js-yaml": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.3.tgz", - "integrity": "sha512-yzzNtgczwgoVHNigCyKTXcQJU4Y8t/ikU4UxXW0BvrLfHTGWZhsNcOT2s/a7vn81/4KqVnNmHjaUEPlvWnNwVw==", + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-5.4.1.tgz", + "integrity": "sha512-28R/k+NAjeuf7+CKlTxWZVExJGwVVLwY06DgEnOMz2gEpfNkDcD7QvyiVPT0xy0XXhU8vHsd4Ot42OOPdJG7dQ==", "dev": true, "funding": [ { @@ -14661,20 +14660,10 @@ "js-yaml": "bin/js-yaml.mjs" } }, - "node_modules/markdownlint/node_modules/re2js": { - "version": "2.8.6", - "resolved": "https://registry.npmjs.org/re2js/-/re2js-2.8.6.tgz", - "integrity": "sha512-xLgQil4kIUCrAzVk9fRSkxkFNwmygLFjVxXrLc65aE1F0+Zsb8rxumFBy4XKyvgMCTL6kilDq3EZ0piE2dP/Dg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=18.0.0" - } - }, "node_modules/markdownlint/node_modules/string-width": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.3.0.tgz", - "integrity": "sha512-ZbmZM0JCihQN91dWnxoipT2KOEyHqEyfRXUyjuRhW8b/xnqPDoq4gWEVApTVa9db2wN8mmoikgFBbjh71+cGeQ==", + "version": "8.2.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-8.2.1.tgz", + "integrity": "sha512-IIaP0g3iy9Cyy18w3M9YcaDudujEAVHKt3a3QJg1+sr/oX96TbaGUubG0hJyCjCBThFH+tFpcIyoUHUn1ogaLA==", "dev": true, "license": "MIT", "dependencies": { @@ -14730,9 +14719,9 @@ } }, "node_modules/micromark": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.3.tgz", - "integrity": "sha512-oGYfQzHSG5dOMovQcJ3fyTmZlWAWpi0XA0sJwJs+i6OT88o1+Jtw/8z0CmdowSLxGhhFK89rQ/oXph/wN02PNw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromark/-/micromark-4.0.2.tgz", + "integrity": "sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==", "dev": true, "funding": [ { @@ -14756,7 +14745,6 @@ "micromark-util-chunked": "^2.0.0", "micromark-util-combine-extensions": "^2.0.0", "micromark-util-decode-numeric-character-reference": "^2.0.0", - "micromark-util-edit-map": "^1.0.0", "micromark-util-encode": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", @@ -14767,9 +14755,9 @@ } }, "node_modules/micromark-core-commonmark": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.4.tgz", - "integrity": "sha512-wxEeE8v8XVvOrxn1TZj74qYhAtTQsSqufHVS3uNVyT1MupXxhyaHk8/9xDNPh9BmL77QNDgWTkZ3RsYHB2ry7w==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/micromark-core-commonmark/-/micromark-core-commonmark-2.0.3.tgz", + "integrity": "sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==", "dev": true, "funding": [ { @@ -14787,19 +14775,18 @@ "devlop": "^1.0.0", "micromark-factory-destination": "^2.0.0", "micromark-factory-label": "^2.0.0", - "micromark-factory-space": "^2.1.0", + "micromark-factory-space": "^2.0.0", "micromark-factory-title": "^2.0.0", "micromark-factory-whitespace": "^2.0.0", "micromark-util-character": "^2.0.0", "micromark-util-chunked": "^2.0.0", "micromark-util-classify-character": "^2.0.0", - "micromark-util-edit-map": "^1.0.0", "micromark-util-html-tag-name": "^2.0.0", "micromark-util-normalize-identifier": "^2.0.0", "micromark-util-resolve-all": "^2.0.0", "micromark-util-subtokenize": "^2.0.0", "micromark-util-symbol": "^2.0.0", - "micromark-util-types": "^2.0.3" + "micromark-util-types": "^2.0.0" } }, "node_modules/micromark-extension-directive": { @@ -14861,9 +14848,9 @@ } }, "node_modules/micromark-extension-gfm-table": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.2.tgz", - "integrity": "sha512-pRzm4kDTu0MjlmBkxmS9yYhw60nncfcEwu9NNdPFSQEFXS95ZKyIIyTSHu/o3ReBUrLKYEq+7YaXCRn/bPB4MA==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/micromark-extension-gfm-table/-/micromark-extension-gfm-table-2.1.1.tgz", + "integrity": "sha512-t2OU/dXXioARrC6yWfJ4hqB7rct14e8f7m0cbI5hUmDyyIlwv5vEtooptH8INkbLzOatzKuVbQmAYcbWoyz6Dg==", "dev": true, "license": "MIT", "dependencies": { @@ -15114,26 +15101,6 @@ "micromark-util-symbol": "^2.0.0" } }, - "node_modules/micromark-util-edit-map": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/micromark-util-edit-map/-/micromark-util-edit-map-1.0.0.tgz", - "integrity": "sha512-Pa2ljlsEL6sVwFaYeyrOLSYbQt73JvGbPOYFq+9AElXiSnfI5Q4465RRZ1sHv7lDjDOnGRDDaqPXqClqWK/q1Q==", - "dev": true, - "funding": [ - { - "type": "GitHub Sponsors", - "url": "https://github.com/sponsors/unifiedjs" - }, - { - "type": "OpenCollective", - "url": "https://opencollective.com/unified" - } - ], - "license": "MIT", - "dependencies": { - "micromark-util-types": "^2.0.0" - } - }, "node_modules/micromark-util-encode": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/micromark-util-encode/-/micromark-util-encode-2.0.1.tgz", @@ -15271,9 +15238,9 @@ "license": "MIT" }, "node_modules/micromark-util-types": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.3.tgz", - "integrity": "sha512-oxB2Ik03hI0gv+VNn9tnh1t1YEe9MDPptViAEgfdf3YQHsn0pzGTgCdlSCJXcwhqm8phaEuM7zeEu3QQzVBrPg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/micromark-util-types/-/micromark-util-types-2.0.2.tgz", + "integrity": "sha512-Yw0ECSpJoViF1qTU4DC6NwtC4aWGt1EkzaQB8KPPyCRR8z9TWeV0HbEFGTO+ZY1wB22zmxnJqhPyTpOVCpeHTA==", "dev": true, "funding": [ { @@ -16969,9 +16936,9 @@ } }, "node_modules/smol-toml": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.9.1.tgz", - "integrity": "sha512-j7WyPdf0CJoutMzMoPLF/bVXHtKZIT9Rb4eGeEbWw8X2t5oirjPgpL+OpaENZrILYaXqYwnVH+qgUwVbl+pUJQ==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/smol-toml/-/smol-toml-1.8.0.tgz", + "integrity": "sha512-kCZr2V3ch9i00x8zXRhjUNVcjG9ijES5dDudkXvUVCT5QlJNQWElSJdZqyPemffHoLNUYwOcou0Fy+ojN0uHSQ==", "dev": true, "license": "BSD-3-Clause", "engines": { diff --git a/package.json b/package.json index 203b6d3..4d4eec0 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "eslint": "^10.14.0", "jest": "^30.5.2", "jest-environment-jsdom": "^30.5.2", - "markdownlint-cli2": "^0.24.0", + "markdownlint-cli2": "^0.23.3", "prettier": "^3.9.10", "sass": "^1.108.1", "start-server-and-test": "^3.0.13", From 4f21bd9a23bd7ec6912c87ab69d84fb6d60175cc Mon Sep 17 00:00:00 2001 From: Alexander Sullivan Date: Tue, 24 Nov 2026 20:56:25 -0500 Subject: [PATCH 3/5] Allow the Sentry CLI's FSL-1.1-Apache-2.0 licence in dependency review @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 --- .github/workflows/dependency-review.yaml | 3 ++- docs/usage/testing.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml index 29c122f..c163f3c 100644 --- a/.github/workflows/dependency-review.yaml +++ b/.github/workflows/dependency-review.yaml @@ -23,9 +23,10 @@ jobs: vulnerability-check: true fail-on-severity: high fail-on-scopes: runtime, development, unknown + # LicenseRef-bad-fsl-1.1-apache-2.0 is how GitHub reports FSL-1.1-Apache-2.0, the licence of `sentry`, the Sentry CLI that @sentry/nextjs installs through @sentry/bundler-plugins. allow-licenses: >- 0BSD, Apache-2.0, BSD-2-Clause, BSD-3-Clause, BlueOak-1.0.0, CC-BY-4.0, CC0-1.0, ISC, MIT, MIT-0, MPL-2.0, Python-2.0, PSF-2.0, - Unlicense + Unlicense, LicenseRef-bad-fsl-1.1-apache-2.0 retry-on-snapshot-warnings: true retry-on-snapshot-warnings-timeout: 120 diff --git a/docs/usage/testing.md b/docs/usage/testing.md index a174fea..dd1cca3 100644 --- a/docs/usage/testing.md +++ b/docs/usage/testing.md @@ -153,7 +153,7 @@ The [dependency-review.yaml](../../.github/workflows/dependency-review.yaml) wor The workflow sets these policy inputs: -- **`allow-licenses`**: Accepts `0BSD`, `Apache-2.0`, `BSD-2-Clause`, `BSD-3-Clause`, `BlueOak-1.0.0`, `CC-BY-4.0`, `CC0-1.0`, `ISC`, `MIT`, `MIT-0`, `MPL-2.0`, `Python-2.0`, `PSF-2.0`, and `Unlicense`. These are Software Package Data Exchange (SPDX) identifiers, standardized names for licences. The action evaluates compound licence expressions against this list. `MPL-2.0` covers `axe-core`, the accessibility engine `cypress-axe` runs, and `CC-BY-4.0` covers `caniuse-lite`, the browser support data that `next` and `browserslist` depend on. No package-specific licence exceptions are configured. +- **`allow-licenses`**: Accepts `0BSD`, `Apache-2.0`, `BSD-2-Clause`, `BSD-3-Clause`, `BlueOak-1.0.0`, `CC-BY-4.0`, `CC0-1.0`, `ISC`, `MIT`, `MIT-0`, `MPL-2.0`, `Python-2.0`, `PSF-2.0`, `Unlicense`, and `LicenseRef-bad-fsl-1.1-apache-2.0`. All but the last are Software Package Data Exchange (SPDX) identifiers, standardized names for licences. The last is the identifier GitHub reports for `FSL-1.1-Apache-2.0`, the licence `sentry` declares, which is not on the SPDX list. The action evaluates compound licence expressions against this list. `MPL-2.0` covers `axe-core`, the accessibility engine `cypress-axe` runs, `CC-BY-4.0` covers `caniuse-lite`, the browser support data that `next` and `browserslist` depend on, and `LicenseRef-bad-fsl-1.1-apache-2.0` covers `sentry`, the Sentry command-line tool that `@sentry/nextjs` installs through `@sentry/bundler-plugins`. No package-specific licence exceptions are configured. - **`fail-on-severity`**: Fails on introduced known vulnerabilities rated `high` or `critical`. - **`fail-on-scopes`**: Includes `runtime`, `development`, and `unknown`, covering application dependencies, development tools, and dependencies whose scope GitHub cannot determine. Detected transitive dependencies, packages brought in by other dependencies, are included in the review. - **`retry-on-snapshot-warnings`**: Retries dependency comparisons with snapshot warnings for up to 120 seconds while GitHub processes dependency data. From 1d8a6a2d1d7cdd01f44453f97aaa608221a2096d Mon Sep 17 00:00:00 2001 From: Alexander Sullivan Date: Tue, 24 Nov 2026 20:56:25 -0500 Subject: [PATCH 4/5] Align comment-length rules across shared conventions 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 --- .claude/rules/docs-authoring.md | 2 +- .claude/skills/audit-docs/agents/surface-auditor.md | 4 ++-- .claude/skills/typescript-code-and-test-standards/SKILL.md | 2 +- .github/copilot-instructions.md | 2 +- CLAUDE.md | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.claude/rules/docs-authoring.md b/.claude/rules/docs-authoring.md index 7666a42..86d8949 100644 --- a/.claude/rules/docs-authoring.md +++ b/.claude/rules/docs-authoring.md @@ -14,7 +14,7 @@ When creating or editing any markdown file, follow the discipline below. These a - **Prove it.** Before writing any technical claim, know the exact file (and ideally lines) that prove it. If you can't, don't write it. Silence beats speculation: no "appears to", "should", "will", or planned/intended behaviour. - Fix existing statements that contradict the code. - **Cut a comment by whole sentences, above the public floor.** Never delete or cut below one sentence the documentation comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. Cut other sentences that restate code, re-describe documented members, or narrate alternatives or reasoning where the code needs only the conclusion, keeping every other sentence word for word. A package or file comment says what the unit is for and never tours its members. -- **Current state only.** Describe the code as it is now, in prose and in comments alike. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. Future intent lives in a `TODO` in the code, never in the documentation. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. A note about a deliberate omission the code depends on and a file header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](../../docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. +- **Current state only.** Describe the code as it is now, in prose and in comments alike. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. Future intent lives in a `TODO` in the code, never in the documentation. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. A note about a deliberate omission the code depends on and a file header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](../../docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. ## Style diff --git a/.claude/skills/audit-docs/agents/surface-auditor.md b/.claude/skills/audit-docs/agents/surface-auditor.md index 7ce6c20..1d81f65 100644 --- a/.claude/skills/audit-docs/agents/surface-auditor.md +++ b/.claude/skills/audit-docs/agents/surface-auditor.md @@ -169,7 +169,7 @@ A contradiction is reported only with a verbatim string copied out of the body. - **A signature, a type, or a declaration proves what is declared and never what runs.** A function named `delete_user` returning a success type settles nothing about whether a row is removed. - **A comment cannot be evidence about another comment.** Where a file-level header and a symbol's own comment disagree, quote the body or report neither. -- **Where the whole body was read and no string either supports or contradicts the comment, report nothing.** The outcome may be fixed by a value supplied elsewhere, or the comment may state something the body cannot show. Silence costs the caller one entry; a guess puts an invented contradiction into the audit. +- **Where the whole body was read and no string either supports or contradicts the comment, report nothing under `CONTRADICTED`.** The outcome may be fixed by a value supplied elsewhere, or the comment may state something the body cannot show. Silence costs the caller one entry; a guess puts an invented contradiction into the audit. ## Output format returned @@ -205,7 +205,7 @@ BLOCKED BY: VERBOSE :: :: KEEP: -CUT: :: +CUT: :: COUNTS Files in scope: diff --git a/.claude/skills/typescript-code-and-test-standards/SKILL.md b/.claude/skills/typescript-code-and-test-standards/SKILL.md index 1c4448c..2b26d84 100644 --- a/.claude/skills/typescript-code-and-test-standards/SKILL.md +++ b/.claude/skills/typescript-code-and-test-standards/SKILL.md @@ -128,7 +128,7 @@ Pick one. - **Every exported symbol carries a documentation block**, as do members of an exported structure: interface properties, object keys, and enum values. Never delete or cut below one sentence a block on an exported symbol, an exported structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. Write new blocks from the body, never the name: one sentence saying what the symbol does, and a second only for an error, input constraint, or caller obligation the body or a test proves. Write no reason or invariant you cannot point to in the code. - **A file-level block** (`@file`, `@fileoverview`, `@packageDocumentation`) **is one sentence saying what the module is for.** It never lists or re-describes exports that carry their own blocks. -- **Cut a verbose block by whole sentences, above the public floor.** A summary sentence and every sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives stay. A sentence telling the history, describing an alternative not taken, repeating a kept reason, arguing the code is safe, working out a scenario no code states, or explaining what a library does in general goes. Keep every other sentence word for word, and keep or cut together sentences that depend on one another. A reworded or merged sentence is a new claim that needs the body behind it. Tags follow the rule on existing tags below. +- **Cut a verbose block by whole sentences, above the public floor.** A summary sentence and every sentence giving a reason, constraint, edge case, or warning that no other kept sentence gives stay. A sentence telling the history, describing an alternative not taken, repeating a kept reason, arguing the code is safe, working out a scenario or consequence no code, test, or document states, or explaining what a library does in general goes. Keep every other sentence word for word, and keep or cut together sentences that depend on one another. A reworded or merged sentence is a new claim that needs the body behind it. Tags follow the rule on existing tags below. - A private helper gets a **new** block only when its behaviour is not evident from its name and signature: non-obvious logic, a reason, or a constraint. An existing block on one is kept under the rules in **Comments**. A binding declared inside a function body gets no new block. - **Types in a documentation block depend on whether the file is type-checked.** In a file TypeScript checks, omit `@param {string}`, `@returns {number}`, `@type`, and `@typedef`: the compiler already carries the type, so the annotation becomes prose that drifts from the signature. **In a plain JavaScript file where the documentation block is the type system**, those annotations are load-bearing and stay. Check `tsconfig.json`, `jsconfig.json`, and any `//@ts-check` directive before removing one. - **Leave existing tags alone unless they are wrong.** Read the surrounding code, correct what is factually wrong, and change nothing else: do not strip a `{type}` annotation, reword accurate prose, or delete a tag for looking redundant. Delete one only when it is wrong and uncorrectable, such as documenting a parameter the signature no longer has. diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 478a215..070a0b8 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -175,7 +175,7 @@ Each rule is decidable from the component's code; the sources are [MDN Accessibi ### Comments & JSDoc -- **Comments describe the code as it stands.** Never narrate a change, fix, or prior state ("now uses", "previously", "no longer", "restored", "replaces", "used to", "formerly", "for the first time"), and never name a file, flag, or tool that no longer exists. Never argue that the code is correct or safe; a sentence giving the reason the code is written as it is is not an argument and stays. **Name the code each comment describes** (a line, a block, the function, or the file). Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. **An existing comment, public or private, is kept by default**: delete it only when it is commented-out code, every sentence restates the code beneath it, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says (under the guard below). Being private or short is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken, and only inside the requested scope. Delete commented-out code. A comment contradicting the code is corrected, not deleted. A note about a deliberate omission the code depends on, and a file header, pass this test. +- **Comments describe the code as it stands.** Never narrate a change, fix, or prior state ("now uses", "previously", "no longer", "restored", "replaces", "used to", "formerly", "for the first time"), and never name a file, flag, or tool that no longer exists. Never argue that the code is correct or safe; a sentence giving the reason the code is written as it is is not an argument and stays. **Name the code each comment describes** (a line, a block, the function, or the file). Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. **An existing comment, public or private, is kept by default**: delete it only when it is commented-out code, every sentence restates the code beneath it, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says (under the guard below). Being private or short is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken, and only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Delete commented-out code. A comment contradicting the code is corrected, not deleted. A note about a deliberate omission the code depends on, and a file header, pass this test. - **Every exported symbol carries a `/** */` block**, as do members of an exported structure (interface properties, object keys, enum values). Never delete the block or cut it below one sentence. Keep the sentence saying what the symbol does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the block and report it. Write new blocks from the body: one sentence saying what the symbol does, and a second only for an error, constraint, or caller obligation the body or a test proves. A file-level block says what the module is for and never tours its exports. Cut other sentences by whole sentences; tags follow the rule on existing tags below. - A private helper gets a **new** block only when its name and signature do not carry it (non-obvious logic, a reason, or a constraint); an existing one is kept under the rule above. A binding inside a function body gets no new block, and a comment there whose every sentence restates the next line is noise. **A fact about a symbol is stated once, on its declaration.** An export or re-export statement is a declaration, not a use. Never repeat a fact above a line that reads, calls, or branches on the symbol. A member of an exported structure is its own declaration. Remove a copy above a use only where both sites are in scope, the declaration's body was read, and the copy says no more than the declaration's comment; fold any additional constraint into the declaration first. Otherwise leave both and say so. - **In a block you write, do not put types in JSDoc.** TypeScript ignores `@param {string}`, `@returns {number}`, `@type`, and `@typedef` in `.ts`/`.tsx`, so they drift from the signature. Skip `@implements`, `@enum`, `@private`, and `@override` beside the keyword, and add `@param`/`@returns` where they say more than the name and type do diff --git a/CLAUDE.md b/CLAUDE.md index 7f04810..1480d1d 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ This repo is worked on by **both** GitHub Copilot and Claude Code. Keep these au ### Documentation and comments describe the current state -**This applies to every file type, not only markdown**, because a path-scoped rule can only cover the extensions someone thought to list. A comment, document, or config header states what the code does now. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. The future belongs nowhere but a `TODO`. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. A note about a deliberate omission the code depends on and a file-level header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. +**This applies to every file type, not only markdown**, because a path-scoped rule can only cover the extensions someone thought to list. A comment, document, or config header states what the code does now. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. The future belongs nowhere but a `TODO`. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. A note about a deliberate omission the code depends on and a file-level header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. ## Git and GitHub From 26be1353451afbab2df4eb20b9edb61d00bdbee1 Mon Sep 17 00:00:00 2001 From: Alexander Sullivan Date: Tue, 24 Nov 2026 22:49:25 -0500 Subject: [PATCH 5/5] Close gaps in the added-comment length rules 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 --- .claude/rules/docs-authoring.md | 2 +- .claude/skills/audit-docs/SKILL.md | 12 ++++++------ .../audit-docs/assets/audit-report.template.md | 2 +- .../audit-docs/references/existing-comments.md | 4 ++-- .../typescript-code-and-test-standards/SKILL.md | 2 +- .../agents/comment-and-jsdoc-auditor.md | 2 +- .../assets/copilot-instructions.template.md | 2 +- .../references/comments-and-jsdoc.md | 2 +- .github/copilot-instructions.md | 2 +- .github/prompts/audit-docs.prompt.md | 12 ++++++------ CLAUDE.md | 2 +- docs/usage/testing.md | 2 +- 12 files changed, 23 insertions(+), 23 deletions(-) diff --git a/.claude/rules/docs-authoring.md b/.claude/rules/docs-authoring.md index 86d8949..66997d9 100644 --- a/.claude/rules/docs-authoring.md +++ b/.claude/rules/docs-authoring.md @@ -14,7 +14,7 @@ When creating or editing any markdown file, follow the discipline below. These a - **Prove it.** Before writing any technical claim, know the exact file (and ideally lines) that prove it. If you can't, don't write it. Silence beats speculation: no "appears to", "should", "will", or planned/intended behaviour. - Fix existing statements that contradict the code. - **Cut a comment by whole sentences, above the public floor.** Never delete or cut below one sentence the documentation comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. Cut other sentences that restate code, re-describe documented members, or narrate alternatives or reasoning where the code needs only the conclusion, keeping every other sentence word for word. A package or file comment says what the unit is for and never tours its members. -- **Current state only.** Describe the code as it is now, in prose and in comments alike. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. Future intent lives in a `TODO` in the code, never in the documentation. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. A note about a deliberate omission the code depends on and a file header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](../../docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. +- **Current state only.** Describe the code as it is now, in prose and in comments alike. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. Future intent lives in a `TODO` in the code, never in the documentation. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. Inside that scope, a comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. A note about a deliberate omission the code depends on and a file header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](../../docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. ## Style diff --git a/.claude/skills/audit-docs/SKILL.md b/.claude/skills/audit-docs/SKILL.md index 42f9521..0f9301c 100644 --- a/.claude/skills/audit-docs/SKILL.md +++ b/.claude/skills/audit-docs/SKILL.md @@ -10,7 +10,7 @@ argument-hint: '[paths or area to audit; defaults to the active pull request or Read this whole file before you start. These rules hold however the skill was invoked. - **Documentation has two parts, and you audit both.** One part is the Markdown pages. The other is the comments in the code: documentation comments, inline comments, and file headers. On a pull request, audit the comments in every code file the diff touched, not only the Markdown. -- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to that same length: tighten a longer one in this run, and never add to it. +- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to the limit in [A comment the change added](#a-comment-the-change-added): tighten a longer one in this run, and never take it past two sentences. - **Write plain English for people.** Your reader is a developer reading once. Write complete, grammatical sentences, one idea each, with ordinary pronouns and transitions where the meaning is clear. State what the code does. Do not work out scenarios or consequences that no code, test, or document states. - **Edit only what the request covers.** Edit in full only the files the scope resolves to (see [Scope](#scope)). On a pull request or working changes, those are the files the diff touched. Any other document gets only the edits the change itself requires. A file you opened only for context stays exactly as you found it. - **Files keep their path and name.** Rename, move, split, merge, or delete a file, or create a directory, only when the request asks for it or the user approves it. Where one looks necessary, ask the user and wait. Where you cannot ask, propose it in your report instead. @@ -63,7 +63,7 @@ Run this phase only when there is an active pull request or working changes. Tre - List what the diff changed in behaviour: added, removed, or modified. - For each change, update whichever documentation describes that behaviour: a Markdown page, a code comment, or both. Do this even where the pull request did not touch the docs. - Document only behaviour the change made. Edit the existing sentence the change made false before you consider adding one. A new sentence states the new behaviour and stops. -- A comment gains at most one sentence in this phase. Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. +- A comment gains at most one sentence in this phase. In a file in scope, Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. - Report whether you made changes or found the documentation already accurate. ## Phase 2: audit the Markdown pages @@ -86,7 +86,7 @@ Run this phase on every audit, over every code file in scope, whatever Phases 1 ### Judge each existing comment with these tests, in order -Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, so a comment you corrected is still tightened. [`existing-comments.md`](references/existing-comments.md) has before-and-after pairs. +Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, except that a comment test 1 corrected skips test 2, so it is still tightened and never deleted. [`existing-comments.md`](references/existing-comments.md) has before-and-after pairs. 1. **Drifted.** It states something the code no longer does. Correct it from the body, and keep the wording that is still true. 2. **Wholly redundant.** Every sentence restates the name, the signature, or the line beneath it, such as `// Increment counter`, and gives no reason, constraint, edge case, or warning. Delete it, unless the floor keeps it. @@ -97,7 +97,7 @@ Run test 1 on every comment first. Then the first of tests 2 to 4 that applies d ### A comment the change added -On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. The floor and the closed delete list still apply. +On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. A comment the diff only moved, with the same lines removed elsewhere in the diff, stays an existing comment, and a licence header is not held to this limit. The floor and the closed delete list still apply. **The closed delete list.** Besides test 2, delete only: @@ -252,7 +252,7 @@ Before you write the report, confirm each item and fix what fails inside the sco - No hedging, no new subjective adjectives, and no em-dashes or en-dashes in what you wrote. - No comment was deleted except under the closed list, no public symbol's comment dropped below its floor, and every tightened comment lost whole sentences only. - Every comment you wrote, and every comment the diff added, is at most two sentences, and a comment you wrote sits on a declaration, not above a use. No comment you edited grew by more than one Phase 1 sentence. -- Every comment in the edit set longer than about five lines went through test 3, and the report gives its line count before and after. +- Every comment longer than about five lines in a code file in scope went through test 3, and the report gives the line count before and after of each one it tightened. - Each page you edited in full opens by naming its subject, and nothing in it stops a newcomer, or your report names the place that does. - Every diagram has `accTitle` and `accDescr` and parses, and every image has real alt text. Every table you touched still has matching cell counts, and nested lists render. - Every file link resolves to a file, not a directory. @@ -260,4 +260,4 @@ Before you write the report, confirm each item and fix what fails inside the sco ## Reminder -Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched; never extend it. +Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched, and add at most one sentence to any comment. diff --git a/.claude/skills/audit-docs/assets/audit-report.template.md b/.claude/skills/audit-docs/assets/audit-report.template.md index 91d7a93..995019f 100644 --- a/.claude/skills/audit-docs/assets/audit-report.template.md +++ b/.claude/skills/audit-docs/assets/audit-report.template.md @@ -133,7 +133,7 @@ This run edits documentation, so a code defect is reported here and left alone. - Every symbol reported in Phase 3 as left as it stands because its implementation was not read also appears under Unverified. - No documentation comment on a public or exported symbol, public structure member, package, or module was deleted or cut below one sentence. - Every comment removed, public or private, documentation or inline, is on the closed delete list; every other comment was kept, corrected, or tightened by whole sentences inside the requested scope. -- Every comment the change added is at most two sentences, every comment longer than about five lines in the edit set went through the verbose test, and no edited comment grew by more than one Phase 1 sentence. +- Every comment the change added is at most two sentences, every comment longer than about five lines in a code file in scope went through the verbose test, and no edited comment grew by more than one Phase 1 sentence. - Every file changed is inside the scope, and none was renamed, moved, split, or deleted unless the request asked for it or the user approved it. - Every file named in a phase result appears in the files changed table, and every row of that table is a file that was edited. - The file count in the summary matches the number of rows in the table. diff --git a/.claude/skills/audit-docs/references/existing-comments.md b/.claude/skills/audit-docs/references/existing-comments.md index 3a29d25..ebe5354 100644 --- a/.claude/skills/audit-docs/references/existing-comments.md +++ b/.claude/skills/audit-docs/references/existing-comments.md @@ -1,6 +1,6 @@ # Existing comments: correct, tighten, keep, or delete -An existing comment was written by someone who knew something about the code. The audit's job is to keep that knowledge accurate, not to restyle it. Each pair below shows one outcome of the ordered tests in Phase 3: test 1 runs first, then the first of the other tests that applies decides, and deletion is the narrowest outcome. +An existing comment was written by someone who knew something about the code. The audit's job is to keep that knowledge accurate, not to restyle it. Each pair below shows one outcome of the ordered tests in Phase 3: test 1 runs first, then the first of the other tests that applies decides, a comment test 1 corrected is never deleted, and deletion is the narrowest outcome. - [Existing comments: correct, tighten, keep, or delete](#existing-comments-correct-tighten-keep-or-delete) - [Drifted private comment: correct it](#drifted-private-comment-correct-it) @@ -213,5 +213,5 @@ Each of these removes knowledge the code does not carry, and none is on the clos - Replacing a verbose comment with nothing instead of cutting its padding sentences. - Deleting a comment you are unsure about instead of keeping it and reporting it. - Trimming a redundant or verbose comment outside the requested scope, where only a drifted comment is corrected. -- Correcting a long drifted comment and stopping there, without putting it through the verbose test. +- Correcting a long drifted comment inside the requested scope and stopping there, without putting it through the verbose test. - Adding a sentence to a comment the change added when it already holds two. diff --git a/.claude/skills/typescript-code-and-test-standards/SKILL.md b/.claude/skills/typescript-code-and-test-standards/SKILL.md index 2b26d84..25192b8 100644 --- a/.claude/skills/typescript-code-and-test-standards/SKILL.md +++ b/.claude/skills/typescript-code-and-test-standards/SKILL.md @@ -118,7 +118,7 @@ Pick one. - **Name the code the comment describes**: a line, a block, the function it sits on, or the file. A comment giving the reason the code is written as it is describes that code and passes. _Bad:_ `// Removed the retry wrapper here since the SDK retries internally.` names a wrapper that is not there. Correct it to the current fact it carries, `// The SDK retries internally, so this call is not wrapped.`, and delete it only when no current fact remains. - **Never argue that the code is correct or safe.** Say what something does or why it exists; do not justify that it works. - A comment that contradicts the code is **corrected, not deleted**. When the two disagree, the code is the truth. -- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the name, signature, or line beneath it, a comment about code that no longer exists with no current fact to correct it towards, change narration stating no current fact, and a copy above a use of what the declaration's comment already says, removed only under the guard in the next rule. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. +- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the name, signature, or line beneath it, a comment about code that no longer exists with no current fact to correct it towards, change narration stating no current fact, and a copy above a use of what the declaration's comment already says, removed only under the guard in the next rule. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. Trim only inside the code you were asked to work on; elsewhere, only correct drift. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. - Inside a function body, a comment restating the line beneath it is noise. Delete those, and keep anything carrying a reason, constraint, hazard, or non-obvious behaviour. A comment you write inside a body is one or two sentences: the reason, and a warning where one is needed, never the history or the alternatives not taken. On a public surface, one sentence saying what a symbol does is not a defect even where its name says so too; a block restating the signature at length is (see **Documentation blocks**). - **A fact about a symbol is documented once, on its declaration.** An export or re-export statement is a declaration, not a use. Never repeat the fact above a line that reads, calls, or branches on the symbol: `// isBetaEnabled mirrors the beta-features flag` belongs on its declaration, not above each `if (isBetaEnabled)`. Each member of an exported structure is its own declaration and keeps its own block. Remove a use-site copy only where both sites are in scope, the declaration's body was read, and the copy says no more than the declaration's comment; fold any additional constraint into the declaration first, and otherwise leave both and say so. - **Never delete a tooling directive.** `//@ts-check`, `/// `, `// @ts-expect-error`, `eslint-disable`, `biome-ignore`, `istanbul ignore`, and `prettier-ignore` are instructions to a tool, not commentary. **Moving one is not deleting it.** Where the same directive repeats across files and the tool reads that same setting from its own configuration, setting the key once and removing the copies relocates the instruction rather than discarding it, and the number of copies removed goes in the change. What this rule forbids is stripping a directive during work that had no reason to touch it. diff --git a/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md b/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md index 798aed7..cee3264 100644 --- a/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md +++ b/.claude/skills/typescript-code-and-test-standards/agents/comment-and-jsdoc-auditor.md @@ -108,7 +108,7 @@ Return findings only. ```text SEVERITY file:symbol What: one sentence naming the defect. - Evidence: the exact comment or declaration, quoted, with any credential value replaced by [REDACTED]. + Evidence: the exact comment or declaration, quoted, with any credential value replaced by [REDACTED], and, for a verbose block, its line count. Fix: the concrete change. ``` diff --git a/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md b/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md index e219e86..e2c597d 100644 --- a/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md +++ b/.claude/skills/typescript-code-and-test-standards/assets/copilot-instructions.template.md @@ -30,7 +30,7 @@ Everything below is what those tools cannot check. - **Comments describe the code as it stands.** Never narrate a change, a fix, or a prior state ("now uses", "changed to", "previously", "no longer", "restored"). Version control carries that, and the comment outlives the change that prompted it. - **Name the code a comment describes**: a line, a block, the function, or the file. A comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. -- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the code beneath it, change narration stating no current fact, and a use-site copy of what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken. Trim only inside the code you were asked to work on. A comment you correct for drift is still tightened. A comment the change added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show; cut a longer one by whole sentences and never extend it. Never delete or cut below one sentence the comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. +- **An existing comment is kept by default, public and private alike.** Delete only commented-out code, a comment whose every sentence restates the code beneath it, change narration stating no current fact, and a use-site copy of what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken. A comment you correct for drift is still tightened. Trim only inside the code you were asked to work on. A comment the change added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show; cut a longer one by whole sentences and never extend it. Never delete or cut below one sentence the comment on a public or exported symbol, a public structure member, or a package or module. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. - **Never argue that the code is correct or safe.** A note defending a decision documents the edit rather than the code; a sentence giving the reason the code is written as it is stays. - A comment that contradicts the code is **corrected, not deleted**. The code is the truth. - Delete commented-out code. diff --git a/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md b/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md index 45417d6..69218fb 100644 --- a/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md +++ b/.claude/skills/typescript-code-and-test-standards/references/comments-and-jsdoc.md @@ -86,7 +86,7 @@ Say what something does, or why it exists. Do not justify that it works. **When a comment contradicts the code, the code is the truth and the comment is corrected.** Deleting it loses whatever the comment was reaching for, and the mismatch is often the most interesting thing in the file: it usually means either the comment described an intent the code abandoned, or the code drifted from a constraint that still holds. -**An existing comment is kept by default, public and private alike.** Delete one only when it is commented-out code, every sentence restates the name, signature, or line beneath it, it describes code that no longer exists with no current fact to correct it towards, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. Trim only inside the code you were asked to work on; elsewhere, only correct drift. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even if it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. +**An existing comment is kept by default, public and private alike.** Delete one only when it is commented-out code, every sentence restates the name, signature, or line beneath it, it describes code that no longer exists with no current fact to correct it towards, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says, where both sites are in scope, the declaration's body was read, and the copy adds nothing. Being private, short, or not a comment you would have written is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, edge case, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken; it is never removed whole. It also loses each sentence that argues the code is correct or safe, works out a scenario or consequence no code, test, or document states, or explains what a language, library, or platform does in general. A comment you correct for drift is still tightened. Trim only inside the code you were asked to work on; elsewhere, only correct drift. A comment the change under review added is held to the length of a new one: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Cut a longer one by whole sentences in that change, and never extend it. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even if it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the comment and report it. ## Comments that restate the line beneath them diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md index 070a0b8..3b72200 100644 --- a/.github/copilot-instructions.md +++ b/.github/copilot-instructions.md @@ -175,7 +175,7 @@ Each rule is decidable from the component's code; the sources are [MDN Accessibi ### Comments & JSDoc -- **Comments describe the code as it stands.** Never narrate a change, fix, or prior state ("now uses", "previously", "no longer", "restored", "replaces", "used to", "formerly", "for the first time"), and never name a file, flag, or tool that no longer exists. Never argue that the code is correct or safe; a sentence giving the reason the code is written as it is is not an argument and stays. **Name the code each comment describes** (a line, a block, the function, or the file). Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. **An existing comment, public or private, is kept by default**: delete it only when it is commented-out code, every sentence restates the code beneath it, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says (under the guard below). Being private or short is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken, and only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Delete commented-out code. A comment contradicting the code is corrected, not deleted. A note about a deliberate omission the code depends on, and a file header, pass this test. +- **Comments describe the code as it stands.** Never narrate a change, fix, or prior state ("now uses", "previously", "no longer", "restored", "replaces", "used to", "formerly", "for the first time"), and never name a file, flag, or tool that no longer exists. Never argue that the code is correct or safe; a sentence giving the reason the code is written as it is is not an argument and stays. **Name the code each comment describes** (a line, a block, the function, or the file). Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. **An existing comment, public or private, is kept by default**: delete it only when it is commented-out code, every sentence restates the code beneath it, it narrates a change stating no current fact, or it copies above a use what the declaration's comment already says (under the guard below). Being private or short is never a reason. A verbose comment is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives, and cutting its history and the alternatives not taken, and only inside the requested scope. Inside that scope, a comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Delete commented-out code. A comment contradicting the code is corrected, not deleted. A note about a deliberate omission the code depends on, and a file header, pass this test. - **Every exported symbol carries a `/** */` block**, as do members of an exported structure (interface properties, object keys, enum values). Never delete the block or cut it below one sentence. Keep the sentence saying what the symbol does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. Correct a wrong or absent-content claim from the body. If the body was not read, keep the block and report it. Write new blocks from the body: one sentence saying what the symbol does, and a second only for an error, constraint, or caller obligation the body or a test proves. A file-level block says what the module is for and never tours its exports. Cut other sentences by whole sentences; tags follow the rule on existing tags below. - A private helper gets a **new** block only when its name and signature do not carry it (non-obvious logic, a reason, or a constraint); an existing one is kept under the rule above. A binding inside a function body gets no new block, and a comment there whose every sentence restates the next line is noise. **A fact about a symbol is stated once, on its declaration.** An export or re-export statement is a declaration, not a use. Never repeat a fact above a line that reads, calls, or branches on the symbol. A member of an exported structure is its own declaration. Remove a copy above a use only where both sites are in scope, the declaration's body was read, and the copy says no more than the declaration's comment; fold any additional constraint into the declaration first. Otherwise leave both and say so. - **In a block you write, do not put types in JSDoc.** TypeScript ignores `@param {string}`, `@returns {number}`, `@type`, and `@typedef` in `.ts`/`.tsx`, so they drift from the signature. Skip `@implements`, `@enum`, `@private`, and `@override` beside the keyword, and add `@param`/`@returns` where they say more than the name and type do diff --git a/.github/prompts/audit-docs.prompt.md b/.github/prompts/audit-docs.prompt.md index b540f92..c104770 100644 --- a/.github/prompts/audit-docs.prompt.md +++ b/.github/prompts/audit-docs.prompt.md @@ -10,7 +10,7 @@ agent: 'agent' Read this whole prompt before you start. Check the project's own files (#codebase), resolving each reference with your own file-search, pull request, and diff tools if it is not handed to you. - **Documentation has two parts, and you audit both.** One part is the Markdown pages. The other is the comments in the code: documentation comments, inline comments, and file headers. On a pull request, audit the comments in every code file the diff touched, not only the Markdown. -- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to that same length: tighten a longer one in this run, and never add to it. +- **Keep it short.** Match the length to what the change needs. Cover the substance, and add no filler sections, repeated summaries, or boilerplate. On a pull request, the documentation edit is about the size of the code change: fix the sentence the change made false, and add a sentence only for behaviour the change added. A comment you write is one sentence, or two when the second states an error, a constraint, or a caller duty. A comment the change added is held to the limit in [A comment the change added](#a-comment-the-change-added): tighten a longer one in this run, and never take it past two sentences. - **Write plain English for people.** Your reader is a developer reading once. Write complete, grammatical sentences, one idea each, with ordinary pronouns and transitions where the meaning is clear. State what the code does. Do not work out scenarios or consequences that no code, test, or document states. - **Edit only what the request covers.** Edit in full only the files the scope resolves to (see [Scope](#scope)). On a pull request or working changes, those are the files the diff touched. Any other document gets only the edits the change itself requires. A file you opened only for context stays exactly as you found it. - **Files keep their path and name.** Rename, move, split, merge, or delete a file, or create a directory, only when the request asks for it or the user approves it. Where one looks necessary, ask the user and wait. Where you cannot ask, propose it in your report instead. @@ -63,7 +63,7 @@ Run this phase only when there is an active pull request or working changes. Tre - List what the diff changed in behaviour: added, removed, or modified. - For each change, update whichever documentation describes that behaviour: a Markdown page, a code comment, or both. Do this even where the pull request did not touch the docs. - Document only behaviour the change made. Edit the existing sentence the change made false before you consider adding one. A new sentence states the new behaviour and stops. -- A comment gains at most one sentence in this phase. Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. +- A comment gains at most one sentence in this phase. In a file in scope, Phase 3 still judges it afterwards, so a long comment you corrected here is also tightened there. - Report whether you made changes or found the documentation already accurate. ## Phase 2: audit the Markdown pages @@ -86,7 +86,7 @@ Run this phase on every audit, over every code file in scope, whatever Phases 1 ### Judge each existing comment with these tests, in order -Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, so a comment you corrected is still tightened. +Run test 1 on every comment first. Then the first of tests 2 to 4 that applies decides, except that a comment test 1 corrected skips test 2, so it is still tightened and never deleted. 1. **Drifted.** It states something the code no longer does. Correct it from the body, and keep the wording that is still true. 2. **Wholly redundant.** Every sentence restates the name, the signature, or the line beneath it, such as `// Increment counter`, and gives no reason, constraint, edge case, or warning. Delete it, unless the floor keeps it. @@ -97,7 +97,7 @@ Run test 1 on every comment first. Then the first of tests 2 to 4 that applies d ### A comment the change added -On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. The floor and the closed delete list still apply. +On a pull request or working changes, a comment whose lines the diff added is new writing under review, not an existing comment. It meets the length of a comment you write: one sentence saying what the code does, plus at most one sentence for an error, a constraint, a caller duty, or the one reason the code cannot show. Choose the kept sentences by the tests above, then cut the rest by whole sentences. List each reason you cut in your report, so the author can move it to the pull request description or a decision record. Sentences the diff added to an older comment are held to the same limit; the older sentences stay under the tests above. A comment the diff only moved, with the same lines removed elsewhere in the diff, stays an existing comment, and a licence header is not held to this limit. The floor and the closed delete list still apply. **The closed delete list.** Besides test 2, delete only: @@ -219,7 +219,7 @@ Before you write the report, confirm each item and fix what fails inside the sco - No hedging, no new subjective adjectives, and no em-dashes or en-dashes in what you wrote. - No comment was deleted except under the closed list, no public symbol's comment dropped below its floor, and every tightened comment lost whole sentences only. - Every comment you wrote, and every comment the diff added, is at most two sentences, and a comment you wrote sits on a declaration, not above a use. No comment you edited grew by more than one Phase 1 sentence. -- Every comment in the edit set longer than about five lines went through test 3, and the report gives its line count before and after. +- Every comment longer than about five lines in a code file in scope went through test 3, and the report gives the line count before and after of each one it tightened. - Each page you edited in full opens by naming its subject, and nothing in it stops a newcomer, or your report names the place that does. - Every diagram has `accTitle` and `accDescr` and parses, and every image has real alt text. Every table you touched still has matching cell counts, and nested lists render. - Every file link resolves to a file, not a directory. @@ -231,4 +231,4 @@ End with a report under these headings: scope and summary (the rule that applied ## Reminder -Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched; never extend it. +Keep every edit as short as the change allows, in plain English a developer understands on the first read. Audit the comments in every code file in scope, not only the Markdown. Tighten a long comment the change added or touched, and add at most one sentence to any comment. diff --git a/CLAUDE.md b/CLAUDE.md index 1480d1d..349d127 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -17,7 +17,7 @@ This repo is worked on by **both** GitHub Copilot and Claude Code. Keep these au ### Documentation and comments describe the current state -**This applies to every file type, not only markdown**, because a path-scoped rule can only cover the extensions someone thought to list. A comment, document, or config header states what the code does now. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. The future belongs nowhere but a `TODO`. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. A comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. A note about a deliberate omission the code depends on and a file-level header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. +**This applies to every file type, not only markdown**, because a path-scoped rule can only cover the extensions someone thought to list. A comment, document, or config header states what the code does now. Never narrate the past ("replaces", "used to", "formerly", "for the first time", "unlike the old") and never name a file, flag, or tool that no longer exists. The future belongs nowhere but a `TODO`. Name the code a comment describes (a line, a block, the function, or the file); a comment giving the reason the code is written as it is passes. Where no code corresponds, correct the comment to the current fact it carries, and delete it only when none remains. An existing comment, public or private, is kept unless it is commented-out code, every sentence restates the code beneath it, or it narrates a change stating no current fact; a verbose one is tightened by whole sentences, keeping its summary and every reason, constraint, or warning that no other kept sentence gives while cutting its history and the alternatives not taken, and trimming happens only inside the requested scope. Inside that scope, a comment you correct for drift is still tightened, and tightening also cuts a sentence arguing the code is safe, a scenario or consequence no code, test, or document states, or a general explanation of what a language, library, or platform does. A comment the change added is held to the length of a new comment: one sentence saying what the code does, plus at most one for an error, a constraint, a caller duty, or the reason the code cannot show. Never delete or cut below one sentence a public or exported symbol's comment, a public structure member's comment, or a package or module comment. Keep the sentence saying what it does, even where it restates the name, code, or syntax; where unclear, keep the first sentence. If the body was not read, keep the comment and report it. A note about a deliberate omission the code depends on and a file-level header pass this test. An architectural or cross-cutting decision goes in a decision record of its own under [`docs/`](docs/index.md). The reason a particular piece of code is written as it is stays in a comment beside that code. ## Git and GitHub diff --git a/docs/usage/testing.md b/docs/usage/testing.md index dd1cca3..70dd6f8 100644 --- a/docs/usage/testing.md +++ b/docs/usage/testing.md @@ -153,7 +153,7 @@ The [dependency-review.yaml](../../.github/workflows/dependency-review.yaml) wor The workflow sets these policy inputs: -- **`allow-licenses`**: Accepts `0BSD`, `Apache-2.0`, `BSD-2-Clause`, `BSD-3-Clause`, `BlueOak-1.0.0`, `CC-BY-4.0`, `CC0-1.0`, `ISC`, `MIT`, `MIT-0`, `MPL-2.0`, `Python-2.0`, `PSF-2.0`, `Unlicense`, and `LicenseRef-bad-fsl-1.1-apache-2.0`. All but the last are Software Package Data Exchange (SPDX) identifiers, standardized names for licences. The last is the identifier GitHub reports for `FSL-1.1-Apache-2.0`, the licence `sentry` declares, which is not on the SPDX list. The action evaluates compound licence expressions against this list. `MPL-2.0` covers `axe-core`, the accessibility engine `cypress-axe` runs, `CC-BY-4.0` covers `caniuse-lite`, the browser support data that `next` and `browserslist` depend on, and `LicenseRef-bad-fsl-1.1-apache-2.0` covers `sentry`, the Sentry command-line tool that `@sentry/nextjs` installs through `@sentry/bundler-plugins`. No package-specific licence exceptions are configured. +- **`allow-licenses`**: Accepts `0BSD`, `Apache-2.0`, `BSD-2-Clause`, `BSD-3-Clause`, `BlueOak-1.0.0`, `CC-BY-4.0`, `CC0-1.0`, `ISC`, `MIT`, `MIT-0`, `MPL-2.0`, `Python-2.0`, `PSF-2.0`, `Unlicense`, and `LicenseRef-bad-fsl-1.1-apache-2.0`. All but the last are Software Package Data Exchange (SPDX) identifiers, standardized names for licences. The last is the identifier GitHub reports for `FSL-1.1-Apache-2.0`, which is not an SPDX identifier. `sentry`, the Sentry command-line tool that `@sentry/nextjs` installs through `@sentry/bundler-plugins`, declares that licence string. The action evaluates compound licence expressions against this list. `MPL-2.0` covers `axe-core`, the accessibility engine `cypress-axe` runs, and `CC-BY-4.0` covers `caniuse-lite`, the browser support data that `next` and `browserslist` depend on. No package-specific licence exceptions are configured. - **`fail-on-severity`**: Fails on introduced known vulnerabilities rated `high` or `critical`. - **`fail-on-scopes`**: Includes `runtime`, `development`, and `unknown`, covering application dependencies, development tools, and dependencies whose scope GitHub cannot determine. Detected transitive dependencies, packages brought in by other dependencies, are included in the review. - **`retry-on-snapshot-warnings`**: Retries dependency comparisons with snapshot warnings for up to 120 seconds while GitHub processes dependency data.