Skip to content

[#201] Style → Cap comment length and ban issue references - #204

Merged
revett merged 10 commits into
mainfrom
revett/fix/201
Aug 7, 2026
Merged

revett merged 10 commits into
mainfrom
revett/fix/201

Conversation

@revett

@revett revett commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #201

Problem

  • Comments make up 24% of source lines, and the longest single block runs to 29 lines
  • typescript-as-go already caps a doc comment at one sentence, but nothing enforced it, so design rationale accumulated above type aliases where it cannot be reviewed and goes stale unnoticed
  • Rationale is often restated above two or three symbols, and references such as (#86) mean nothing to a reader without access to the tracker

Why

  • Reviewers spend their attention on prose rather than code, and a change to one line of logic drags fifteen lines of comment along with it
  • Rationale kept in docs/ reads as one argument rather than three fragments, and outlives the code it describes
  • Putting the rule in CI is what stops it decaying back into a preference nobody holds

Greptile Summary

The PR formalizes concise TypeScript comment standards, adds an automated CI check, and moves extensive design rationale into reorganized technical documentation.

  • Adds a three-line comment-block limit and bans tracker references in source comments.
  • Introduces scripts/check-comments.mjs and runs it through a dedicated CI job.
  • Updates existing TypeScript comments to satisfy the policy.
  • Reorganizes technical documentation around the affected subsystems.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
scripts/check-comments.mjs Adds the source-comment policy checker; the current TypeScript tree satisfies its enforced rules.
.github/workflows/ci.yml Adds a dedicated CI job that runs the comment checker with the repository’s configured Node version.
.agents/skills/typescript-as-go/SKILL.md Defines the new comment-length, rationale-placement, and tracker-reference conventions.
AGENTS.md Makes the TypeScript skill the authoritative comment and code-style guide.
docs/technical_introduction.md Introduces the reorganized technical documentation and summarizes the project’s major invariants.

Reviews (5): Last reviewed commit: "Add to AGENTS" | Re-trigger Greptile

Comment thread scripts/check-comments.mjs
@revett
revett merged commit 33da3df into main Aug 7, 2026
11 checks passed
@revett
revett deleted the revett/fix/201 branch August 7, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Reduce verbosity of logging

1 participant