Jason Jean 9a6cc61342
CI / main-linux (push) Has been cancelled
CI / main-macos (push) Has been cancelled
CodeQL / Analyze (csharp) (push) Has been cancelled
CodeQL / Analyze (actions) (push) Has been cancelled
CodeQL / Analyze (javascript-typescript) (push) Has been cancelled
CodeQL / Analyze (rust) (push) Has been cancelled
chore(repo): define the repo's code comment rules and enforce them in review (#36583)
## Current Behavior

The repo has no committed guidance on code comments. The conventions
exist in practice — 41 `TODO(v24)` markers feeding the major-release
deprecation sweep, 183 `@deprecated` tags with a consistent "Use `X`
instead. This will be removed in Nx N." phrasing — but nothing writes
them down, so nothing checks them either. A `@deprecated` tag shipped
without a removal version passes review today.

PR review compounds this. It dispatches the stock
`pr-review-toolkit:comment-analyzer`, whose contract includes a
"completeness" axis and an instruction to write for "the least
experienced future maintainer". Both exist to make comments longer. The
result is review asking authors to document more, with no committed rule
behind the ask.

## Expected Behavior

`.claude/agents/comment-analyzer.md` is the authoritative statement of
the repo's comment rules — what warrants a comment, what doesn't, the
load-bearing markers, and how each is detected and rated. `CLAUDE.md`
carries the orientation paragraph and defers to that file for everything
specific. The paragraph is quoted verbatim in both, so a session that
never opens the rules file still gets the common case right.

The rules document existing practice rather than imposing a new one. The
markers were read out of the codebase, not invented.

Review now dispatches a project-local `comment-analyzer` that checks
whether comments are **true** instead of asking for more of them:

- A comment contradicting its code, one a change left stale, or a marker
missing its version can block a PR.
- A request for more or longer commenting lands in Suggestions and never
drives the verdict — "this claim is false" has an answer, "this needed
explaining" is a judgment call.
- Calibration 10 applies the same bar to any other agent that reaches
for a documentation ask outside its beat.

Two wiring fixes came out of this and are worth a look on their own:

- The toolkit dispatch template hardcoded a `pr-review-toolkit:` prefix
onto every agent name. Left as-is, the project-local agent would never
have been dispatched — the stock one would run and the review would look
completely normal. The subagent type is now separate from the bare agent
name, which still keys the `/tmp/pr-<N>.<agent>.{line,evidence}` paths
that `verify-evidence.sh` globs.
- `PIPELINE_VERSION` is bumped, so drafts written under the old criteria
age out of the SHA dedup instead of being pinned forever.

Sizing: `comment-analyzer` findings appear in 16 of 87 review drafts
(18%), ahead of security (12%), performance (11%), and
alternative-approach (8%). This is a mid-yield agent being refocused,
not a low-yield one being trimmed.

## Related Issue(s)

N/A — repo tooling.

<!-- polygraph-session-start -->
---
<p><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-dark.svg"><img
src="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-light.svg"
width="16" height="22" align="middle" alt="Polygraph"></picture> <a
href="https://app.trypolygraph.com/orgs/6a061dcb561c062131116eca/sessions/Define-the-repos-code-comment-rules-and-enforce-them-in-review-ef0f9879">View
session ↗</a></p>
<!-- polygraph-session-end -->
2026-08-05 16:14:35 -04:00

Nx Logo

Smart Monorepos · Fast Builds

NPM Version GitHub Stars License Discord X (Twitter) Hours saved Cache hit rate Nx Sandboxing Remote caching Self-healing CI Flaky task retries


Docs  •  Changelog  •  Blog  •  Courses  •  YouTube


Nx is a monorepo solution for TypeScript and polyglot codebases. Built with Rust for performance, extensible via TypeScript. Caches what didn't change, runs only what's affected, and comes with an integrated CI solution. Start simple, scale as you grow.

Quick Start

Visit the Nx quickstart docs to get started.

Why Nx?

  • Incremental by design - Run npx nx init in any npm/pnpm/yarn workspace. Nx picks up your existing package.json scripts, caches their outputs, and runs only what's affected. No changes to your setup required.
  • AI-native tooling - The Nx CLI is optimized for autonomous AI agents so they get the context they need and can operate just like a human. Learn more »
  • Polyglot plugin system - Optional plugins auto-discover tasks, configure cache inputs/outputs, and scaffold code based on your actual tooling. Works with Vite, Webpack, Jest, Vitest, ESLint, Gradle, Maven, .NET, Go, and more.
  • Integrated CI solution - Connect Nx to your CI provider (GitHub Actions, GitLab, Azure, etc.) to enable remote caching, task distribution across machines, affected-only runs, and automatic e2e test splitting. Learn more »
  • Self-healing CI - An AI agent on your CI pipeline that detects failures, analyzes root cause, proposes a fix, and verifies it automatically. Local agents connect to CI via MCP to autonomously detect and fix failures. Learn more »

Who uses Nx?

From startups to Fortune 500 companies. See our Nx success stories »

Want to help?

If you want to file a bug or submit a PR, read up on our guidelines for contributing.

Core Team

Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
vsavkin FrozenPandaz bcabanes jaysoo
James Henry Jon Cammisuli Max Kless Juri Strumpflohner
James Henry Jon Cammisuli Max Kless Juri Strumpflohner
JamesHenry cammisuli MaxKless juristr
Caleb Ukle Steven Nance Miroslav Jonaš Leosvel Pérez Espinosa
Caleb Ukle Steven Nance Miroslav Jonaš Leosvel Pérez Espinosa
barbados-clemens llwt meeroslav leosvelperez
Zachary DeRose Craigory Coppola Chau Tran Nicole Oliver
Zachary DeRose Craigory Coppola Chau Tran Nicole Oliver
ZackDeRose AgentEnder nartc nixallover
Rares Matei Altan Stalker Josh VanAllen Louie Weng
Rares Matei Altan Stalker Josh VanAllen Louie Weng
rarmatei StalkAltan joshvanallen lourw
S
Description
Nx 是面向开发者和 AI 智能体的单体仓库平台,能优化构建、加速 CI、自动修复失败的 PR,交付周期缩短一半。|GitHub 镜像 29.2k · 🍴 3k
https://github.com/nrwl/nx Readme MIT 954 MiB
Languages
HTML 100%