Repository navigation
Simplify project comments and enforce banned words - #908
Merged
Merged
Conversation
taras
marked this pull request as ready for review
October 14, 2026 12:00
This was referenced Oct 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Source comments had accumulated repeated architecture explanations and narration already clear from adjacent code. Architecture prose and JSDoc also used “claim” for several different actions. This simplifies those explanations and enforces one shared banned-words list so new prose uses concrete terms.
Closes #907
What changes
Shared rationale is stated once, mechanical narration is removed, and oversized local explanations are shortened. Stale synchronous-read, default-plugin and Issue boundary wording now describes existing behavior.
The comment cleanup covers 367 source files across the major packages, scripts and site, plus scoped terminology edits in
architecture.md. Lint tooling adds the enforcement described below. Distinct member contracts, evaluation/caller scope, cancellation and resource ownership, validation/failure order, persistence/replay constraints, specification references and tool/license/provenance annotations remain intact.Banned-words enforcement
scripts/banned-words.jsis the single editable list of words and explicit forms.AGENTS.mdlinks it with generic writing guidance.deno task lintenableslocal/no-banned-jsdoc-wordsfor JSDoc and runs the architecture prose checker using the same matcher. Matching is case-insensitive at whole-word boundaries; diagnostics include the word and its location. Inline/fenced/indented code, JSDoc annotation identifiers and types, and literal link targets remain code references. There is no automatic replacement.Site and smoke-test JSDoc run through a prose-only Oxlint profile, preserving their existing code-style ownership. Other source comments, other Markdown and vendored/generated material are outside this enforcement.
Review guide
Start with
ExecutionInstallationinpackages/core/src/execute.tsfor the shared capture rationale and retained member contracts. Then review the shortened module headers and lifecycle explanations across packages, followed by redundant test and local implementation narration. Every changed comment received contextual review.The inventory covers 1,709 tracked paths: 378 changed, 25 reviewed and kept, 792 scanned with no candidate selected, 85 with no comments, and 429 excluded. The project JSDoc and architecture checks pass with no remaining banned-word errors. Exact API and path references such as
claim(invocation),claim(carrier)andclaims/<n>remain accurate. Search-only triage is distinct from manual contextual review; this does not claim every retained comment was manually reread.What must stay true
The existing product-source edits remain comment-only; functional code additions implement lint enforcement and its regression tests. Parser-produced non-comment tokens, comment-free JavaScript and protected annotations compare identically to base
9c4f4f9a66e25c1c396c0e65c72d35dff722c5ecin all 367 source files. The terminology follow-up separately verifies all non-JSDoc comments unchanged across its 290 source files against90659d220c8708bafa4af5130628b42b0b65e3cf. Architecture edits reconstruct exactly from reviewed contextual replacements, and its fenced examples and inline code remain unchanged. Committed file bytes match the accepted editorial snapshots.The additional configuration edits wire lint and agent guidance. Vendored/generated material, dependencies, executable Markdown and other guides remain intact. Coverage/ownership and boundary checks confirm this scope and unchanged file modes. Five new files supply the list, matcher, JSDoc rule, architecture check and prose-only configuration. The test corpus file set remains unchanged.
How to verify it
Focused policy tests pass all 20 steps, including real configured Oxlint failures, CRLF locations, literal-code controls, isolated list extension through both consumers and lint wiring:
deno task test scripts/tests/oxlint-policy.test.ts deno task lintThe complete lint task passes, including architecture prose, both JSDoc scopes, formatting and dead-code checks. The source-comment cohort retains identical non-comment tokens and emitted JavaScript using TypeScript 5.9.3. Its exact paths can be selected from the reviewed cleanup commit, so the helper does not treat new lint code as a comment-only edit:
The helper compares parsed token kinds/text, comment-free transpilation and full protected comment contents against the exact base. It protects actual JSDoc tags, compiler/linter directives, pure/source-map markers and license/generated/provenance notices. Boundary checks additionally confirmed all 1,709 tracked paths have dispositions, changed paths match the 378 reviewed entries, and excluded/dependency inputs are unchanged. The changed Markdown is limited to architecture wording and generic banned-words guidance in
AGENTS.md.Portable comment-equivalence helper (temporary verification artifact)
Risks and limitations
Token and emit equality establish unchanged code in the comment-cleanup cohort; focused regressions cover the added lint behavior. Manual contextual review checks that consequential prose survives. Neither proves every retained comment is correct. Existing lint warnings remain; oxlint reports no errors and formatting passes. Focused lint-policy regressions cover the enforcement; the product runtime suite remains with CI. CI was not inspected during this focused feedback pass.
Scope confirmation