code-review-and-quality
Skill501 starsChanged 17 days agoApache-2.0View on GitHub
Five-axis code review before merge, plus responsive-parity and documentation-accuracy gates. Use for quality passes after implementation, before merge, and when asked to review a diff.
- Reads credentials
83 other projects use a version of this.
Adopted by
Most recently taken up by
- tkbk-online/skillstheir own version, first seen Nov 15, 2026
- slantview/pi-agentstheir own version, first seen Nov 15, 2026
- addyosmani/agent-skillstheir own version, first seen Nov 14, 2026
- thistleknot/skillstheir own version, first seen Nov 8, 2026
- xuweizhengo/skills-hubtheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Agent-Skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use constraint-driven-development, observability-and-instrumentation and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MrCipherSmithSkillconstraint-driven-development
Use when a project needs a persistent, measurable quality bar — starting a project without documented standards, 'set up constraints', or when coverage/perf/a11y thresholds get re-debated per-PR. Produces CONSTRAINTS.md with enforceable numbers, ratchets, and a guard against silent weakening. NOT for throwaway prototypes or a one-off CI setup.
Also in 15 projects that use this
HK-hubSkillobservability-and-instrumentation
Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data.
Also in 34 projects that use this
HK-hubSkillcode-simplification
Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity.
Also in 58 projects that use this
seikaikyoSkilldoubt-driven-development
對非平凡決策啟動新鮮 context 對抗審查(找碴不背書),在修正還便宜的時候抓出錯誤方向。適用:高風險改動(production、資安敏感邏輯、不可逆操作)、不熟的程式碼、要宣稱「這樣是安全的 / 可行的」之前。機械性操作與一行修改不適用。
Also in 37 projects that use this
seikaikyoSkillinterview-me
需求不明時的意圖萃取訪談:一次一題、每題附上自己的猜測、聽出「真正想要 vs 覺得應該要」,直到能預測使用者反應(約 95% 信心)才動工。適用:需求缺少對象 / 動機 / 成功標準 / 約束,或使用者點名「訪談我」「先確認一下」「我們確定嗎」。明確自足的指示、純資訊查詢、機械性操作不適用。
Also in 37 projects that use this
JetBrainsSkillmodern-web-guidance
Search tool for modern web development best practices. MANDATORY: Execute FIRST for all HTML/CSS and clientside JS tasks. Do NOT skip — web APIs evolve rapidly and training weights contain obsolete patterns.
Also in 3 projects that use this
- +2 more from HK-hub
Other versions83 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 83
- addyosmani/agent-skills★ 118ksame name
- sanity-io/sanity★ 6.4ksame name
- ollaya-dev/ollaya★ 1.4ksame name
- SkafteNicki/dtu_mlops★ 806same name
- shashankswe2020-ux/whoop-mcp★ 181same name
- muratgur/ordinus★ 111same name
- enes-alatas/spool★ 48same name
- vinvcn/addyosmani-agent-skills-zh★ 46same name
- jmxt3/gitscape.ai★ 33same name
- sampleXbro/agentsmesh★ 27same name
73 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/a11y.mdcCursor rule
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- address-current-branch-reviewSkill
- api-designSkill
- celebration-scene-ideasSkill
- create-ticketSkill
- dep-scanSkill
- dep-triageSkill
- dial-docsSkill
- extract-to-libSkill
- figmaSkill
- fix-cve-backportSkill
- git-shipSkill
- i18n-stringsSkill
- lean-verificationSkill
- lib-themingSkill
- monitor-ciSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- proactive-security-monitorSkill
- refactoring-auditSkill
- chat-release-notesSkill
- responsive-designSkill
- security-monitor-triagerSkill
- snyk-jira-ingestSkill
- snyk-scan-stubSkill
- snyk-triageSkill
- ui-kit-reviewSkill
- nx-generateSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- nx-generateSkill
- nx-importSkill
- nx-pluginsSkill
- nx-run-tasksSkill
- nx-workspaceSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
46 rules. 0 are common, 34 are distinctive, and 12 are very specific to this project.
0
Common
Most of the 76 edited versions we read keep these.
34
Distinctive
This author's own choices. Worth a look.
12
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 17
Before merge / when asked to review a change
- Distinctive: line 18
After implementation (self-review or cross-review)
- Distinctive: line 19
After bugfixes (review fix and regression coverage)
- Distinctive: line 20
When evaluating code produced by another agent or author
- Distinctive: line 38
Use this mode when the review is executed by CI, a scheduled bot, or any non-interactive automation.
- Distinctive: line 43
Read full changed files and related artifacts for context, but comments/findings must point to changed lines or changed artifacts whenever …
- Very specific: line 44
Do not run Nx build targets from this review pipeline.
- Very specific: line 82
Use verdict: "fail" when any finding is blocking or a required verification command failed.
- Very specific: line 88
Every finding must include a non-empty message containing the full review comment body.
- Very specific: line 104
Do not fail the pipeline for nit, optional, or fyi findings.
- Distinctive: line 110
If a pipeline job is configured to publish comments:
- Very specific: line 113
Do not post inline comments for nit by default unless explicitly configured.
- Very specific: line 114
Do not attempt inline comments for findings with anchorable: false.
- Distinctive: line 115
Always post one top-level PR conversation comment.
- Distinctive: line 116
If everything is good, post a concise positive summary instead of staying silent, for example:
- Distinctive: line 126
If there are findings, the top-level comment must summarize the verdict, count blocking/non-blocking findings, and list verification status.
- Very specific: line 130
Add the PR head SHA as commit_id at publish time.
- Distinctive: line 132
If the API rejects an inline comment because the line is not in the diff, retry once as a top-level PR comment entry and mark the finding …
- Distinctive: line 137
If the change is tied to OpenSpec, review the artifacts before judging the code:
- Very specific: line 140
Read the relevant artifacts under openspec/changes/<change>/:
- Distinctive: line 145
Check the diff against the artifacts:
- Distinctive: line 150
If implementation reveals a design/spec gap, request an artifact update before or alongside code changes.
- Distinctive: line 170
Do not request extraction just because code could be abstracted.
- Distinctive: line 181
No unjustified new patterns.
- Distinctive: line 182
No sneaky circular deps or leaky module APIs
- Distinctive: line 191
No secrets in code, logs, or repo.
- Distinctive: line 199
Only flag with measurable or clear scaling reasoning when possible
- Distinctive: line 227
Use the repository skills and rules as the source of truth before applying generic advice:
- Distinctive: line 243
Do not import generic standards that conflict with these repo rules.
- Distinctive: line 247
Use these as cross-cutting checks after applying repo-specific rules:
- Very specific: line 249
Prefer clear, specific names over generic data, result, temp, item when the domain is known.
- Distinctive: line 250
Keep control flow shallow with early returns or extracted helpers when nesting hides the main path.
- Distinctive: line 251
When new code repeats behavior across files or components, call out whether it should become a reusable utility, hook, component, or method.
- Distinctive: line 252
When a single function grows to mix several responsibilities, suggest extracting the smallest named helper that makes the main path easier …
- Distinctive: line 253
Avoid functions that mix validation, IO, transformation, and presentation unless the surrounding pattern already does so.
- Distinctive: line 254
Avoid magic numbers; name domain thresholds, debounce delays, limits, and TTLs.
- Distinctive: line 255
Avoid mutation of shared state.
- Distinctive: line 259
No TODO/FIXME in merge-ready code unless linked to an accepted follow-up and non-blocking by design.
- Distinctive: line 274
Use a prefix so authors know what is mandatory:
- Distinctive: line 299
When checking "tests / build / lint":
- Very specific: line 301
Prefer npm exec nx test <project>, npm exec nx lint <project>, npm exec nx build <project> for touched projects (see openspec/config.yaml …
- Very specific: line 304
Do not use origin/main as the affected base in this workspace.
- Very specific: line 305
When unsure which project owns a path, use npm exec nx show projects or npm exec nx show project <name> --json.
- Distinctive: line 327
Use a clear verdict:
- Distinctive: line 351
Use as a literal template when writing a review:
- Distinctive: line 435
Only glancing at tests, ignoring other axes
“Common” is measured: kept by at least 6 in 10 of the 76 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code review and quality
Overview
Review every non-trivial change before it lands on the main line. Use five axes: correctness, readability, architecture, security, performance — plus the two repo-specific gates below them, responsive parity and documentation accuracy.
Approval bar: Approve when the change clearly improves or preserves overall code health and matches project conventions. Do not block because you would have written it differently. Do block on real defects, security issues, or violations of agreed patterns.
When to use
- Before merge / when asked to review a change
- After implementation (self-review or cross-review)
- After bugfixes (review fix and regression coverage)
- When evaluating code produced by another agent or author
Review modes
Choose the review mode from the user's request and available context:
| Mode | Use when | Required context |
| Local review | Reviewing uncommitted local changes | git status, git diff, full changed files, related OpenSpec artifacts if any |
| PR review | Reviewing a GitHub PR number or URL | PR metadata, PR diff, full changed files at PR head, related OpenSpec artifacts |
| Self-review | Finishing an implementation slice | Touched files, completed task, tests run, remaining task status |
| OpenSpec review | Reviewing an OpenSpec-backed change | proposal.md, design.md, tasks.md, changed specs, implementation diff |
| Pipeline review | CI/bot review of a PR diff | Base/head refs, PR diff, full changed files, related OpenSpec artifacts, relevant check output |
For PR review, read full changed files, not only diff hunks. Diffs show what changed; full files show whether the change fits the surrounding design.
Pipeline review mode
Use this mode when the review is executed by CI, a scheduled bot, or any non-interactive automation. Keep the normal five-axis review, but make the result deterministic and machine-readable.
Scope
- Review only the PR/diff scope. Do not fail the pipeline for pre-existing issues unless the PR worsens them or makes them newly reachable.
- Read full changed files and related artifacts for context, but comments/findings must point to changed lines or changed artifacts whenever possible.
- Do not run Nx
buildtargets from this review pipeline. Treat build as a separate CI concern and only record its status when an existing CI check already provides it. - Separate review from publishing:
- Review step produces a structured result artifact.
- Comment-publishing step may post inline comments and one top-level summary, but only from the structured result.
Output artifact
Emit a JSON object with this shape:
{
"verdict": "pass | warn | fail",
"summary": "Short human-readable summary.",
"findings": [
{
"severity": "critical | required | warning | nit | optional | fyi",
"category": "correctness | readability | architecture | security | performance | responsive | documentation | openspec | verification",
"file": "path/from/repo/root",
"line": 123,
"side": "RIGHT | LEFT",
"startLine": null,
"startSide": null,
"anchorable": true,
"message": "Review comment body.",
"blocking": true
}
],
"verification": [
{
"command": "npm exec nx test @epam/chat",
"status": "passed | failed | skipped",
"reason": "Only for failed/skipped or notable context."
}
],
"topLevelComment": "Markdown summary suitable for a PR conversation comment."
}Use verdict: "fail" when any finding is blocking or a required verification command failed. Use verdict: "warn" only for non-blocking risks or skipped verification. Use verdict: "pass" when there are no blocking findings and required verification is green or explicitly covered by trusted CI.
file, line, side, startLine, and startSide are intended to be compatible with GitHub pull request review comments. Use side: "RIGHT" for new/head lines and side: "LEFT" only when the finding must anchor to a removed/base line. Use startLine/startSide only for multi-line comments; otherwise set them to null.
Set anchorable: true only when the finding points to a line present in the PR diff. If the issue is real but cannot be anchored to a changed line, set anchorable: false, keep file/line as best-effort context if known, and include the finding in topLevelComment instead of attempting an inline comment.
Every finding must include a non-empty message containing the full review comment body. Do not put the explanation only in custom fields, summary text, or the top-level comment; pipeline publishers use message for both inline review comments and the sticky summary table.
Pipeline fail rules
Fail the pipeline for:
- Any
criticalorrequiredfinding. - Relevant non-build Nx target failure run by this review pipeline, such as test, lint, OpenAPI, or generated-client checks.
- OpenSpec drift: implementation materially diverges from proposal/design/tasks/specs.
- API/OpenAPI/generated-client contract mismatch.
- Hand-authored
libs/*leaking host/external integration details. - A color added or changed in
libs/*that does not come from a*Colorsprop asvar(--<prefix>-x, fallback)in the component's.module.scss(a confirmedlib-themingfinding on an added line), or adial-*-textclass hardcoded in lib JSX instead of a*ClassNameprop default. - User-visible text added in the diff that is not translated: a literal in lib JSX instead of a
*Labelsprop, a literal or rawt('…')key inapps/chat, or a new lib label field the app does not pass (a confirmedi18n-stringsfinding). - Security, authz, secret exposure, data loss, or broken public contract risks.
npm run validate:docsfailure, or a lib's public API changing without its README, when the diff toucheslibs/*/src/index.ts, any README, ordocs/**.
Do not fail the pipeline for nit, optional, or fyi findings. Use warning for non-blocking risk, missing non-critical evidence, or human-follow-up items.
Simplification and extraction findings usually use nit or optional. Use warning only when duplication or missing extraction creates meaningful maintenance risk, repeated bug-prone logic, expensive test setup, or an ownership-boundary concern. Use required only when the structure causes a concrete defect, violates library isolation, or breaks a documented architecture rule.
Comment publishing
If a pipeline job is configured to publish comments:
- Post inline comments only for
critical,required, and high-signalwarningfindings withanchorable: true. - Do not post inline comments for
nitby default unless explicitly configured. - Do not attempt inline comments for findings with
anchorable: false; summarize them in the top-level PR comment. - Always post one top-level PR conversation comment.
- If everything is good, post a concise positive summary instead of staying silent, for example:
Automated review passed.
- No blocking findings.
- Verification: `npm exec nx affected --target=test --base=origin/development` passed.
- Scope checked: correctness, architecture boundaries, security, performance, responsive parity, documentation accuracy, and OpenSpec alignment.If there are findings, the top-level comment must summarize the verdict, count blocking/non-blocking findings, and list verification status. Inline comments carry the detailed code-specific feedback.
GitHub publishing step requirements:
- Add the PR head SHA as
commit_idat publish time; do not require the review agent to hardcode it into findings. - For individual inline comments, use GitHub's pull request review comment API with
path,line,side, optionalstart_line/start_side,body, andcommit_id. - If the API rejects an inline comment because the line is not in the diff, retry once as a top-level PR comment entry and mark the finding as not anchored in the publishing log.
- For the top-level summary, use a PR conversation comment or a review body, depending on the CI integration.
OpenSpec review gate
If the change is tied to OpenSpec, review the artifacts before judging the code:
- Identify the change from the branch, PR description, user request, or
openspec list --json. - Read the relevant artifacts under
openspec/changes/<change>/:proposal.mdfor problem, scope, non-goalsdesign.mdfor architecture and local patternstasks.mdfor promised implementation and verification- changed specs under
specs/**/spec.mdwhen present
- Check the diff against the artifacts:
- Implementation matches the accepted scope and does not add silent scope creep.
- Completed task checkboxes correspond to real code and tests.
- New requirements discovered during implementation are captured in specs/design/tasks, not only in code.
- Non-goals are still respected.
- If implementation reveals a design/spec gap, request an artifact update before or alongside code changes.
Block merge for OpenSpec-backed work when code behavior materially diverges from the artifacts, when tasks are marked complete without implementation, or when API/user-facing requirements were implemented without updating the relevant spec/design/task.
Five-axis review
1. Correctness
- Matches spec, task, or PR description
- Edge cases: null, empty, boundaries, errors — not only happy path
- Tests exist, assert behavior, and would catch regressions
- Watch for off-by-one, races, inconsistent state
2. Readability and simplicity
- Names are specific; avoid meaningless
data,result,temp - Control flow is easy to follow; avoid unnecessary cleverness
- Abstractions earn their complexity; prefer duplication over wrong abstraction until patterns repeat
- Flag simplification opportunities: repeated logic, deeply nested code, broad functions, or verbose conditionals that would become clearer as a focused helper, hook, component, utility, or method.
- Recommend extracting reusable utilities, hooks, components, or methods when the same behavior appears in multiple places, when a local helper would clarify a complex block, or when nearby features are likely to reuse the behavior.
- Do not request extraction just because code could be abstracted; require a concrete readability, testability, reuse, or ownership-boundary benefit.
- Comments only where intent is non-obvious; remove dead code and noise
3. Architecture
- Fits existing Nx boundaries (
apps/*,libs/*) and import direction - Libraries stay host-agnostic: no host-owned integration details inside
libs/*, including hardcoded/apipaths, generated clients, server-api imports, app contexts, auth/session/cookie/env access, feature flags, routing/navigation, analytics/telemetry/logging clients, deployment/tenant/provider details, third-party SDK setup, platform bridges, app-specific URL schemes, or app storage keys/schemas - Exception:
libs/chat-api-clientis generated by OpenAPI scripts, so generated endpoint paths, DTOs, runtime transport code, and OpenAPI artifacts are allowed there. Block hand-authored app behavior in that package and direct generated-client usage from other hand-authored libs. - Every color in
libs/*comes from a*Colorsprop through a CSS custom property —var(--<prefix>-x, var(--theme-token, #hex))in the component's.module.scss, set withbuildCssVars— never a Tailwind color utility in lib JSX (text-secondary,bg-layer-raised,border-tertiary,hover:bg-*), a literal hex in lib CSS, or a bare theme token no prop can override. Typography follows the same rule: everydial-*-textclass comes from a*ClassNameprop (or*Typographyfield) default, never written straight into JSX, a module constant, or a hardcoded*ClassNamepassed to a child, and no raw Tailwind font utilities or font CSS. Runnode .claude/skills/lib-theming/scan.mjs --base <base>on any diff that toucheslibs/*and verify each hit per.claude/skills/lib-theming/SKILL.md. An added line isrequired; a pre-existing hit in a touched file isoptional. - Every user-visible string is translated: in
libs/*it comes from a*Labelsprop with an English default (noreact-i18nextin libs), andapps/chatpasses every*Labelsfield of a lib component it renders, built witht()and atranslation-keys.tsenum member. Runnode .claude/skills/i18n-strings/scan.mjs --base <base>and verify each hit per.claude/skills/i18n-strings/SKILL.md. A literal string or an untranslated label on an added line isrequired. - Host/external integrations are adapted at the app edge and passed into libs through props, callbacks, resolved values, or narrow interfaces
- No unjustified new patterns; justified new ones are called out
- No sneaky circular deps or leaky module APIs
- Reusable helpers live at the right ownership level: app-specific helpers stay in
apps/*, host-agnostic helpers/components may move tolibs/*, and shared types stay inlibs/chat-shared - Relative
.ts/.tsximports and re-exports omit.js,.jsx,.ts, and.tsx; Vite projects use bundler resolution rather than Node ESM source specifiers - Named finite sets of statuses, modes, variants, or lifecycle states use string enums instead of string-literal unions when exported, reused, or compared
- Duplication: only consolidate when the rule of three (or team norm) says so
4. Security
- User and external input validated at boundaries; treat external data as untrusted
- No secrets in code, logs, or repo; authz where required
- Injection-safe queries and APIs; XSS-aware rendering in UI code
- New dependencies: necessity, maintenance, size, license,
npm auditawareness
5. Performance
- N+1, unbounded loops/fetches, missing pagination on lists
- UI: avoidable re-renders, huge props, sync work on hot paths
- Only flag with measurable or clear scaling reasoning when possible
6. Responsive parity
- UI changes use the project's named breakpoint prefixes (
mobile:/desktop:), not nonexistentsmall_tablet:/large_tablet:/large_desktop:, Tailwind defaults such assm:/md:/lg:, or arbitrarymin-[…]:queries - Authoring style is mobile-first — base classes describe the smallest supported viewport, larger bands are added via the named prefixes
- Components that branch in JS use
useIsMobilefrom@epam/ai-dial-chat-shared, not directwindow.innerWidthreads - Touch targets meet ~44×44 CSS px on mobile; no
:hover-only affordances; no horizontal scroll at 360px - Verification story names which breakpoints were exercised — "desktop verified only" is a request-changes signal for any user-facing change
- See
.claude/skills/responsive-design/SKILL.mdfor the full rubric
7. Documentation accuracy
Docs drift silently — no build breaks when a README documents a component that
was renamed two releases ago. Nothing in lint/test/build covers it, so the
review is the only gate.
npm run validate:docsis green. It checks README coverage and H1/package identity, libpackage.jsonmetadata (description,license), that every relative markdown link resolves, and that every name a lib README imports from its own package is actually exported. Treat a failure asrequired.- A change to a lib's
src/index.ts— added, renamed, or removed export — carries a matching README change in the same diff. - A renamed prop, a changed prop type, or a newly required prop is reflected in every README example that passes it.
- README code fences name only symbols that exist, with the required props present, the right value types, and imports from the package that actually exports the name (
CatalogEntityTypeis@epam/ai-dial-chat-shared, not@epam/ai-dial-catalog). - Prose describes what the code does today, not an intended capability. A claimed feature the component lacks is
required, not a nit — readers act on it. - Structural additions (lib, app, backend domain, context, route,
ApiEndpointsentry) updatedocs/architecture.md; new or removed environment variables updateapps/chat-api/README.mdand.env.template. - Deleting a doc means fixing every link to it, including the
dial-docsskill index. - See
.claude/rules/docs.mdfor the same-change update matrix and the drift classes already found here.
Repo-specific routing
Use the repository skills and rules as the source of truth before applying generic advice:
| Change area | Read / apply |
| Workspace structure, project ownership | openspec/config.yaml, AGENTS.md, .agents/skills/nx-workspace/SKILL.md |
| Multi-file implementation or refactor | thin vertical slices + per-slice verify (openspec/config.yaml task rules) |
| HTTP API contract or generated client | .agents/skills/api-design/SKILL.md |
apps/chat-api/** | apps/chat-api/AGENTS.md |
libs/* React components | openspec/config.yaml, library isolation rules from AGENTS.md, openspec/lib-styling-guide.md plus exported-symbol JSDoc rules |
| User-visible text, i18n | .claude/skills/i18n-strings/SKILL.md — run its scanner with --base and verify each hit |
Colors and typography in libs/* | .claude/skills/lib-theming/SKILL.md — run its scanner with --base and verify each hit |
| UI kit components | .claude/skills/ui-kit-review/SKILL.md; use the @epam/ai-dial-ui-kit MCP tools before recommending raw HTML primitives |
| Responsive / mobile parity | .claude/skills/responsive-design/SKILL.md |
READMEs, docs/**, lib public API | .claude/rules/docs.md plus npm run validate:docs; use the dial-docs skill to find the authoritative doc |
| CI status or self-healing fixes | .agents/skills/monitor-ci/SKILL.md; do not replace it with ad hoc polling |
Do not import generic standards that conflict with these repo rules. For example, do not require a new REST response envelope, direct frontend REST helpers, raw HTML controls, or a generic project structure when local conventions say otherwise.
Code quality standards
Use these as cross-cutting checks after applying repo-specific rules:
- Prefer clear, specific names over generic
data,result,temp,itemwhen the domain is known. - Keep control flow shallow with early returns or extracted helpers when nesting hides the main path.
- When new code repeats behavior across files or components, call out whether it should become a reusable utility, hook, component, or method. Keep the suggested location consistent with ownership boundaries.
- When a single function grows to mix several responsibilities, suggest extracting the smallest named helper that makes the main path easier to read and test.
- Avoid functions that mix validation, IO, transformation, and presentation unless the surrounding pattern already does so.
- Avoid magic numbers; name domain thresholds, debounce delays, limits, and TTLs.
- Avoid mutation of shared state. Local mutation is acceptable only when contained, intentional, and clearer or measurably faster.
- Comments should explain why a choice exists, not restate what the code does.
- React components should expose event callback props as
onEventand name internal handlershandleEvent. - No
console.login application code; use the app's logging pattern. - No TODO/FIXME in merge-ready code unless linked to an accepted follow-up and non-blocking by design.
- Tests should assert observable behavior and meaningful edge/error paths, not implementation details.
Change sizing
| Size (approx.) | Expectation |
| ~100 lines | Good — one focused review |
| ~300 lines | OK if one logical change + tests |
| ~1000+ lines | Too large — ask to split (stack, vertical slices, or refactor vs feature) |
Never mix large refactor with new behavior in one changeset unless team explicitly allows.
Comment severity
Use a prefix so authors know what is mandatory:
| Label | Meaning |
| (none) or Required: | Must fix before merge |
| Critical: | Blocks merge — security, data loss, broken contract |
| Warning: | Non-blocking risk or missing non-critical evidence |
| Nit: | Optional — style, minor preference |
| Optional: / Consider: | Worth discussing, not blocking |
| FYI: | Context only |
In pipeline JSON, use lowercase severity values: critical, required, warning, nit, optional, fyi.
Review process
- Context — What does this change do? Which spec/task? Expected behavior?
- OpenSpec gate — If applicable, read artifacts and compare implementation to proposal/design/tasks/specs
- Tests first — Coverage, names, edge cases, behavioral (not brittle implementation) assertions
- Implementation — Walk files with the five axes
- Findings — Every item labeled with severity above
- Verification story — What was run, what still needs a human check (UI screenshots if relevant)
- Verdict — Approve, comment, request changes, or block
This workspace (Nx)
When checking "tests / build / lint":
- Prefer
npm exec nx test <project>,npm exec nx lint <project>,npm exec nx build <project>for touched projects (seeopenspec/config.yamlandAGENTS.md). - For broad checks, use affected targets with the repository base branch:
npm exec nx affected --target=<target> --base=origin/development. - In CI pipeline review mode, do not run
npm exec nx build ...ornpm exec nx affected --target=build ...; rely on dedicated CI build jobs if build evidence is needed. - Do not use
origin/mainas the affected base in this workspace. - When unsure which project owns a path, use
npm exec nx show projectsornpm exec nx show project <name> --json.
Validation matrix
CI / pipeline review mode: never run build targets. In CI, skip every build command in the table below regardless of change type. Rely on dedicated CI build jobs; record their status from existing CI check output instead.
Select the smallest validation set that proves the change:
| Change type | Expected validation (interactive/local only — skip build rows in CI) |
| Frontend component / hook | npm exec nx test chat, npm exec nx lint chat; build if route/bundling/shared imports changed |
Backend apps/chat-api/** | npm exec nx test chat-api, npm exec nx lint chat-api, npm exec nx build chat-api when startup/module/config wiring changed |
| HTTP API contract | Backend checks plus npm run openapi, npm run openapi:check, npm exec nx build chat-api-client, npm exec nx lint chat-api-client |
| Shared lib | Test/lint/build for the touched lib and any directly affected app when behavior is consumed, plus npm run validate:docs when its public API or README changed |
README / docs/** | npm run validate:docs; npm run validate:agent-docs as well when .claude/**, .agents/**, AGENTS.md, or CLAUDE.md changed |
| Broad cross-project change | npm exec nx affected --target=lint --base=origin/development and affected test/build targets as appropriate |
| CI-only review | Prefer monitor-ci skill for Nx Cloud status and self-healing context; do not start build targets from the review job |
Record skipped checks with a reason. A review without a verification story is incomplete.
Decision policy
Use a clear verdict:
| Verdict | Use when |
| Approve | No blocking issues; relevant verification is green or CI covers it |
| Approve/comment | Only optional or low-risk improvements remain |
| Request changes | Required issues, failing relevant checks, missing tests for risky behavior, OpenSpec drift |
| Block | Security issue, data loss risk, broken public contract, secrets exposure, invalid auth flow |
| Comment only | Draft PR, exploratory review, or user explicitly asked for non-blocking feedback |
For pipeline JSON, map these to pass, warn, or fail:
pass: equivalent to Approve.warn: equivalent to Approve/comment or Comment only with non-blocking findings.fail: equivalent to Request changes or Block.
Commit / PR description
- Subject: imperative, informative alone in history ("Add retry to chat API client" not "Fix stuff").
- Body: what, why, tradeoffs, links to tasks/issues when useful.
- Weak subjects: "Fix bug", "WIP", "Phase 1", "Small changes".
Review checklist
Use as a literal template when writing a review:
## Review: [title]
### Context
- [ ] I understand intent and expected behavior
- [ ] I read related OpenSpec artifacts, or confirmed none apply
### Correctness
- [ ] Matches spec/task
- [ ] Edge and error paths
- [ ] Tests adequate and meaningful
### Readability
- [ ] Clear names and flow
- [ ] No unnecessary complexity
### Architecture
- [ ] Fits monorepo boundaries and patterns
- [ ] Hand-authored `libs/*` remain isolated from host/external integration details
- [ ] Every lib color added in the diff comes from a `*Colors` prop as `var(--<prefix>-x, fallback)` and every lib typography class from a `*ClassName` prop default (`lib-theming` scanner run, hits verified)
- [ ] Every user-visible string added in the diff is translated (`i18n-strings` scanner run, hits verified)
- [ ] `libs/chat-api-client` changes, if any, are generated OpenAPI client changes
- [ ] Coupling and abstraction level appropriate
- [ ] API/generated-client/OpenSpec contract rules followed when relevant
- [ ] Relative TypeScript source imports are extensionless
- [ ] Named finite TypeScript value sets use string enums where the project convention applies
### Security
- [ ] No secrets; boundaries validated; auth as needed
- [ ] New deps justified
### Performance
- [ ] No obvious N+1 / unbounded work / UI hot-path issues
### Responsive parity
- [ ] Uses project's named breakpoint prefixes; mobile-first authoring
- [ ] JS branches go through `useIsMobile`, not `window.innerWidth`
- [ ] Touch targets, hover-only affordances, and 360px overflow checked
- [ ] Verification names the breakpoints exercised
### Documentation accuracy
- [ ] `npm run validate:docs` green
- [ ] Public API changes (`libs/*/src/index.ts`, prop renames, new required props) reflected in the lib README in this diff
- [ ] README examples name only existing symbols, include required props, and import from the owning package
- [ ] Prose describes current behavior, not intended behavior
- [ ] `docs/architecture.md` updated for structural changes; `apps/chat-api/README.md` + `.env.template` for env vars
- [ ] No links left pointing at a deleted or renamed doc
### Verification
- [ ] Relevant Nx targets (or CI) green
- [ ] OpenAPI/generated-client checks run when API contracts changed
- [ ] `npm run validate:docs` run when READMEs, `docs/**`, or a lib's public API changed
- [ ] Manual / visual check noted if UI
### Verdict
- [ ] Approve | [ ] Request changes (list blocking items)Rationalizations to reject
| Excuse | Response |
| "It works, ship it" | Readability, security, and architecture debt still compound. |
| "I wrote it, it's fine" | Second pass catches blind spots. |
| "We'll clean up later" | Cleanup before merge unless true emergency + tracked follow-up. |
| "Tests pass, so it's good" | Tests don't replace architecture or security review. |
| "It's only a README" | READMEs are the public contract; callers copy the examples. Nothing type-checks a code fence, so review is the only gate. |
| "I'll update the docs after" | Docs updated later are docs not updated. Same change or it drifts. |
Red flags
- Merge with no real review or evidence
- Only glancing at tests, ignoring other axes
- Huge PR with "no time to split"
- Bugfix without regression test
- Comments without severity — author cannot prioritize
- Rubber-stamp "LGTM"
After review
- All Critical / Required items closed or explicitly deferred with reason
- Tests and build (for touched scope) are green
- OpenSpec tasks/specs/design reflect the implementation state
- Verdict and severity-labeled notes are clear for the author
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

