Skip to content

feat(agents): add typescript-reviewer agent#647

Merged
affaan-m merged 10 commits intoaffaan-m:mainfrom
teee32:feat/typescript-reviewer-agent
Mar 20, 2026
Merged

feat(agents): add typescript-reviewer agent#647
affaan-m merged 10 commits intoaffaan-m:mainfrom
teee32:feat/typescript-reviewer-agent

Conversation

@teee32
Copy link
Copy Markdown
Contributor

@teee32 teee32 commented Mar 19, 2026

Summary

  • add agents/typescript-reviewer.md as a dedicated TypeScript/JavaScript reviewer agent
  • cover type safety, async correctness, Node/web security, and common React/Next.js review pitfalls while staying framework-agnostic
  • update AGENTS.md and sync README.md agent counts so repository catalog checks stay green

Why

TypeScript already has first-class rules in ECC, but it was missing a dedicated language reviewer agent unlike Go, Kotlin, Python, Java, and Rust. This keeps the contribution small and merge-friendly while filling a real gap in the agent catalog.

Related to #543.

Type

  • Agent
  • Skill
  • Hook
  • Command

Testing

  • node scripts/ci/validate-agents.js
  • npm test

Checklist

  • Follows existing agent format
  • No sensitive info
  • Clear descriptions and review priorities
  • Minimal scoped change

Summary by cubic

Adds a dedicated typescript-reviewer agent for TS/JS code review with scoped diffs, non-emitting type/lint checks, and merge-readiness gates. Updates docs to 26 agents and adds direct-invoke guidance in docs/COMMAND-AGENT-MAP.md.

  • New Features

    • Introduces typescript-reviewer focused on type safety, async correctness, security, and idiomatic Node/React/Next.
    • Review flow: auto-detect PR base; prefer staged/local diffs with git show fallback; scope to TS/JS; run non-emitting typecheck and lint; gate on CI/merge state; output Approve/Warning/Block with diagnostic commands (types/lint/tests and package audits for npm/yarn/pnpm/bun).
  • Bug Fixes

    • Prefer project typecheck scripts over raw tsc; when falling back, run non-emitting checks (tsc --noEmit -p <config> or a non-emitting solution check) and avoid tsc -b/build mode.
    • Hardened TS/JS diff detection with explicit stop/report when no relevant changes; clarified PR vs local behavior, shallow-history fallback, and package-audit guidance.

Written for commit 975d2e7. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Added four specialized agents: docs-lookup, cpp-reviewer, cpp-build-resolver, and typescript-reviewer — platform now totals 26 agents.
  • Documentation

    • Updated agent counts in README and AGENTS.md to 26.
    • Added a TypeScript/JavaScript reviewer workflow describing review scope, diagnostic checks (type/lint/tests), security and quality rubrics, and approval guidance.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 19, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Docs updated to register four new agents (docs-lookup, cpp-reviewer, cpp-build-resolver, typescript-reviewer) and increment agent counts from 25 → 26; a new agents/typescript-reviewer.md workflow was added describing TypeScript/JavaScript review rules.

Changes

Cohort / File(s) Summary
Top-level docs
AGENTS.md, README.md
Incremented agent count from 25 → 26 and added new agent entries (docs-lookup, cpp-reviewer, cpp-build-resolver, typescript-reviewer) in the agents listing and feature parity table.
New agent configuration
agents/typescript-reviewer.md
Added a new TypeScript/JavaScript reviewer workflow: invocation steps (PR base detection/fallbacks), scope limiting to *.ts, *.tsx, *.js, *.jsx, optional diagnostics (tsc --noEmit, eslint .), strict report-only constraints, CRITICAL/HIGH/MEDIUM rubric, diagnostic command examples, and approval criteria.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested reviewers

  • affaan-m
  • gustavo075ncc

Poem

🐰 I hopped in quick with floppy ears,
Four bright agents joined the peers.
TypeScript checked and linted right,
Docs and C++ now join the light.
I nibble notes and hop from cheers. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat(agents): add typescript-reviewer agent' accurately and clearly describes the primary change—adding a new TypeScript/JavaScript reviewer agent. It is specific, concise, and directly reflects the main objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 19, 2026

Greptile Summary

This PR adds a dedicated typescript-reviewer agent to fill the gap in the language-reviewer catalog alongside Go, Python, Kotlin, Java, Rust, and C++. It also backfills three previously-missing agent rows in AGENTS.md (docs-lookup, cpp-reviewer, cpp-build-resolver), syncs the agent count to 26, and adds a "Direct-Use Agents" section to docs/COMMAND-AGENT-MAP.md to document the direct-invocation pattern since no /typescript-review slash command was added.

The agent's review-priority rubric is thorough and well-scoped: it correctly uses eslint . --ext .ts,.tsx,.js,.jsx, scoped tsc --noEmit -p <relevant-config>, the git show --patch HEAD shallow-history fallback, and a clear Approve/Warning/Block gate. The main structural concern is a workflow step-ordering flaw: the empty-diff guard (step 5) appears after the typecheck and eslint steps (3–4), meaning the agent runs expensive tooling even when no TypeScript/JavaScript files were changed — and may surface pre-existing type errors that have nothing to do with the PR under review. The rust-reviewer and go-reviewer peers diff the relevant files first and only then invoke diagnostics, which is the correct pattern here too.

Key points:

  • Step ordering flaw: empty-diff guard (step 5) should precede typecheck/eslint steps (3–4) to avoid misleading reviews on non-TS PRs
  • npm run typecheck --if-present in the Diagnostic Commands block is npm-specific; pnpm/yarn/bun equivalents are missing, inconsistent with the multi-PM awareness in step 3
  • No /typescript-review slash command is added (acknowledged in the PR); the direct-invoke pattern is documented cleanly in COMMAND-AGENT-MAP.md
  • Documentation updates in AGENTS.md and README.md are accurate and clean

Confidence Score: 3/5

  • Safe to merge after fixing the step-ordering flaw in the agent workflow; documentation changes are clean and low-risk.
  • The content of the agent is well-considered and the documentation changes are accurate. However, the agent workflow has a logic ordering bug — running typecheck and eslint before checking whether the diff contains any TS/JS files can cause the agent to block valid PRs with pre-existing, unrelated type errors. This is a behavioral correctness issue in the agent instructions that warrants a fix before merging.
  • agents/typescript-reviewer.md — step ordering (steps 3–4 before step 5) needs correction

Important Files Changed

Filename Overview
agents/typescript-reviewer.md Adds a well-structured TypeScript/JavaScript reviewer agent. The review-priority rubric is comprehensive and correctly uses --ext .ts,.tsx,.js,.jsx for eslint and scoped -p <config> for tsc. However, the empty-diff guard (step 5) is placed after the expensive typecheck/eslint steps (3–4), meaning the agent runs diagnostics even when no TS/JS files were changed — a logic ordering flaw that can mislead reviews with pre-existing errors. The Diagnostic Commands also list npm run typecheck --if-present without pnpm/yarn/bun equivalents, inconsistent with the multi-PM awareness in step 3.
AGENTS.md Increments agent count from 25 to 26, adds the three previously-missing table rows (docs-lookup, cpp-reviewer, cpp-build-resolver), and inserts the new typescript-reviewer row. Also corrects the skills count in the project-structure block from 102 to 108. Changes are accurate and clean.
README.md Updates the agent count (25→26), adds the three previously-missing agent file entries to the project tree, and appends the typescript-reviewer Quick Reference row noting direct invocation. Changes are consistent and correct.
docs/COMMAND-AGENT-MAP.md Adds a new "Direct-Use Agents" section and a typescript-reviewer entry, clearly communicating that no slash command exists yet. Title change ("plus notable direct-invoke agents") is accurate. Low risk.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A([typescript-reviewer invoked]) --> B[Step 1: Establish review scope\ngit diff / gh pr view / git show --patch]
    B --> C[Step 2: Inspect merge readiness\ngh pr view --json mergeStateStatus]
    C -->|Conflicts / failing CI| D([Stop & report])
    C -->|Merge-ready or unverifiable| E[Step 3: Run canonical typecheck\nnpm/pnpm/yarn/bun run typecheck\nor tsc --noEmit -p config]
    E --> F[Step 4: Run eslint\neslint . --ext .ts,.tsx,.js,.jsx]
    F -->|Fails| G([Stop & report errors])
    F -->|Passes| H{Step 5: Any TS/JS\nchanges in diff?}
    H -->|No| I([Stop & report — scope\ncannot be established])
    H -->|Yes| J[Step 6: Read modified files\n+ surrounding context]
    J --> K[Step 7: Begin review\nagainst priority rubric]
    K --> L{Issues found?}
    L -->|CRITICAL or HIGH| M([Block])
    L -->|MEDIUM only| N([Warning])
    L -->|None| O([Approve])

    style E fill:#ffdddd,stroke:#cc0000
    style F fill:#ffdddd,stroke:#cc0000
    style H fill:#ffdddd,stroke:#cc0000

    subgraph note[" ⚠️ Current ordering flaw"]
        E
        F
        H
    end
Loading

Last reviewed commit: "fix(agents): keep re..."

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
AGENTS.md (1)

3-40: ⚠️ Potential issue | 🟡 Minor

Agent totals conflict with the “Available Agents” table.

Line 3 and Line 138 claim 26 agents, but the table in this section currently lists fewer entries. Please sync the stated totals and the enumerated list to avoid contradictory docs.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 3 - 40, The document header’s agent count ("26"
agents in the intro lines) is inconsistent with the actual enumerated table
under "Available Agents"; update either the numeric totals (the "26" mentions at
the top) or the table entries so they match. Locate the "Available Agents" table
and reconcile the count by either adding the missing agent rows to the table or
reducing the numeric total references to the actual number of listed agents
(ensure you update every occurrence of the totals in the intro paragraphs). Also
search for the specific phrases "26 specialized agents" and "Available Agents"
to ensure all references remain consistent after the change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@AGENTS.md`:
- Line 39: The docs are missing a mapping entry for the new agent
"typescript-reviewer"; update the command-to-agent mapping in
COMMAND-AGENT-MAP.md by adding a row that maps the TypeScript/JavaScript review
command to the "typescript-reviewer" agent (match the table format used for
other agents and include the description "TypeScript/JavaScript code review" and
the scope "TypeScript/JavaScript projects") so the new agent is discoverable in
the command mapping docs.

In `@README.md`:
- Line 1045: The README has inconsistent Claude Code agent counts (one place
shows "26 agents" in the Agents table row containing "| Agents | ✅ 26 agents | ✅
12 agents | **Claude Code leads** |" while the cross-tool parity table later
shows 21); pick the correct authoritative count, then update every occurrence of
the Claude Code agent count (the Agents table row text and the Claude Code entry
in the cross-tool parity table, plus any other mentions) to that single agreed
value so all references match.

---

Outside diff comments:
In `@AGENTS.md`:
- Around line 3-40: The document header’s agent count ("26" agents in the intro
lines) is inconsistent with the actual enumerated table under "Available
Agents"; update either the numeric totals (the "26" mentions at the top) or the
table entries so they match. Locate the "Available Agents" table and reconcile
the count by either adding the missing agent rows to the table or reducing the
numeric total references to the actual number of listed agents (ensure you
update every occurrence of the totals in the intro paragraphs). Also search for
the specific phrases "26 specialized agents" and "Available Agents" to ensure
all references remain consistent after the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6beb9070-fcae-459c-b542-32915c68ba14

📥 Commits

Reviewing files that changed from the base of the PR and between 4bdbf57 and db5a914.

📒 Files selected for processing (3)
  • AGENTS.md
  • README.md
  • agents/typescript-reviewer.md

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

5 issues found across 3 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:12">
P2: Inconsistent lint command guidance (`eslint .` vs explicit TS/JS extensions) can cause incomplete TypeScript lint checks.</violation>

<violation number="2" location="agents/typescript-reviewer.md:14">
P2: Reviewer workflow starts manual review immediately without checking required CI-pass and merge-conflict gates mandated by team feedback.</violation>
</file>

<file name="README.md">

<violation number="1" location="README.md:1045">
P2: README has conflicting catalog totals (26/108/57 vs stale 21/52/102), indicating partial synchronization and inconsistent user-facing metrics.</violation>
</file>

<file name="AGENTS.md">

<violation number="1" location="AGENTS.md:3">
P3: AGENTS.md has inconsistent hardcoded skill counts (108 in intro vs 102 in Project Structure), leaving repository metadata contradictory.</violation>

<violation number="2" location="AGENTS.md:3">
P2: Agent totals are inconsistent: the document claims 26 agents but lists only 23 in the Available Agents table.</violation>
</file>

Since this is your first cubic review, here's how it works:

  • cubic automatically reviews your code and comments on bugs and improvements
  • Teach cubic by replying to its comments. cubic learns from your replies and gets better over time
  • Add one-off context when rerunning by tagging @cubic-dev-ai with guidance or docs links (including llms.txt)
  • Ask questions if you need clarification on any suggestion

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 2 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:11">
P2: Hard-coded `origin/main` makes diff-base resolution brittle across repos/remotes and can break review scope detection.</violation>

<violation number="2" location="agents/typescript-reviewer.md:11">
P2: Documented fallback to `HEAD~1` on `main` is not actually implemented; the unconditional diff can evaluate to `git diff HEAD HEAD` and miss all changes.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:11">
P1: Base ref discovery is ambiguous and may select the wrong remote HEAD, producing inaccurate diff scope for reviews.</violation>

<violation number="2" location="agents/typescript-reviewer.md:11">
P1: Fallback to `git diff -- <pathspec>` can return an empty diff in clean/shallow environments, causing the reviewer to miss changed TS/JS files.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:12">
P2: Fallbacking to `git diff HEAD~1` can miss earlier commits in a multi-commit PR branch, causing incomplete review coverage.</violation>

<violation number="2" location="agents/typescript-reviewer.md:13">
P2: Shallow-checkout fallback uses `git show --name-only --stat`, which hides patch hunks and prevents code-level diff review.</violation>

<violation number="3" location="agents/typescript-reviewer.md:17">
P2: Review instructions do not enforce required CI/conflict preconditions and instead tell the agent to proceed immediately, conflicting with team gating policy.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 19, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:12">
P2: The updated review workflow removed the fallback for missing `HEAD~1`, so diff collection can fail in shallow or single-commit checkouts.</violation>

<violation number="2" location="agents/typescript-reviewer.md:12">
P2: PR diff instructions hard-code `main` as the comparison base, which can produce incorrect or failing diffs for non-`main` PR targets.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2 issues found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:15">
P2: TypeScript check instruction is inconsistent: it detects `tsconfig.*.json` but runs bare `tsc --noEmit`, which does not automatically use non-default config filenames.</violation>

<violation number="2" location="agents/typescript-reviewer.md:19">
P2: CI/merge readiness is documented as advisory instead of a blocking precondition, allowing review to proceed when checks/conflicts should defer review.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 3 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:19">
P2: Type-check guidance over-prioritizes `tsconfig.json`, which can miss relevant package/project-reference checks and produce false-green reviews.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:93">
P2: Fallback `tsc -b` type-check guidance can write build artifacts during review because `--noEmit` is not required.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analyzing 5000 commits...

@ecc-tools
Copy link
Copy Markdown
Contributor

ecc-tools bot commented Mar 20, 2026

Analysis Failed

Not Found - https://docs.github.com/rest/git/refs#get-a-reference

Troubleshooting
Cause Resolution
Large repository Analysis may timeout on repos with extensive history
API rate limits Wait 15 minutes before retrying
Network issues Queue timeout is 15 minutes; retry may succeed
Permissions Verify app has Contents: Read access

Retry: /ecc-tools analyze


Report Issue | ECC Tools

@affaan-m affaan-m merged commit 90c3486 into affaan-m:main Mar 20, 2026
3 checks passed
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="agents/typescript-reviewer.md">

<violation number="1" location="agents/typescript-reviewer.md:19">
P2: Project-reference typecheck guidance became ambiguous by removing the explicit `tsc -b <solution-config>` fallback, which can lead reviewers to run only package-scoped checks and miss cross-project type errors.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

- If required checks are failing or pending, stop and report that review should wait for green CI.
- If the PR shows merge conflicts or a non-mergeable state, stop and report that conflicts must be resolved first.
- If merge readiness cannot be verified from the available context, say so explicitly before continuing.
3. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; in project-reference setups, prefer the repo's non-emitting solution check command rather than invoking build mode blindly. Otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Project-reference typecheck guidance became ambiguous by removing the explicit tsc -b <solution-config> fallback, which can lead reviewers to run only package-scoped checks and miss cross-project type errors.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At agents/typescript-reviewer.md, line 19:

<comment>Project-reference typecheck guidance became ambiguous by removing the explicit `tsc -b <solution-config>` fallback, which can lead reviewers to run only package-scoped checks and miss cross-project type errors.</comment>

<file context>
@@ -16,7 +16,7 @@ When invoked:
    - If the PR shows merge conflicts or a non-mergeable state, stop and report that conflicts must be resolved first.
    - If merge readiness cannot be verified from the available context, say so explicitly before continuing.
-3. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; for project references, prefer `tsc -b <solution-config>`, otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
+3. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; in project-reference setups, prefer the repo's non-emitting solution check command rather than invoking build mode blindly. Otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
 4. Run `eslint . --ext .ts,.tsx,.js,.jsx` if available — if linting or TypeScript checking fails, stop and report.
 5. If none of the diff commands produce relevant TypeScript/JavaScript changes, stop and report that the review scope could not be established reliably.
</file context>
Fix with Cubic

Comment on lines +19 to +23
3. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; in project-reference setups, prefer the repo's non-emitting solution check command rather than invoking build mode blindly. Otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
4. Run `eslint . --ext .ts,.tsx,.js,.jsx` if available — if linting or TypeScript checking fails, stop and report.
5. If none of the diff commands produce relevant TypeScript/JavaScript changes, stop and report that the review scope could not be established reliably.
6. Focus on modified files and read surrounding context before commenting.
7. Begin review
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Empty-diff guard runs after expensive tooling

Steps 3 and 4 invoke tsc and eslint unconditionally before step 5 checks whether the diff even contains TypeScript/JavaScript files. For a PR that touches only Python, Go, or config files, the agent will:

  1. Run npm run typecheck (or tsc --noEmit) — potentially reporting pre-existing type errors completely unrelated to the PR
  2. Run eslint . --ext .ts,.tsx,.js,.jsx — same problem
  3. Then reach step 5, find no TS/JS diff, and stop

This creates two concrete problems: (a) the agent wastes time running expensive tooling on unchanged code, and (b) it may produce a misleading Block outcome due to pre-existing type errors that have nothing to do with the PR under review.

Compare to rust-reviewer and go-reviewer, which diff the relevant files first and only then run diagnostics.

The guard in step 5 should move to immediately after step 2 (merge-readiness check), so the agent exits early before touching any tooling:

Suggested change
3. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; in project-reference setups, prefer the repo's non-emitting solution check command rather than invoking build mode blindly. Otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
4. Run `eslint . --ext .ts,.tsx,.js,.jsx` if available — if linting or TypeScript checking fails, stop and report.
5. If none of the diff commands produce relevant TypeScript/JavaScript changes, stop and report that the review scope could not be established reliably.
6. Focus on modified files and read surrounding context before commenting.
7. Begin review
3. If none of the diff commands from step 1 produce relevant TypeScript/JavaScript changes, stop and report that the review scope could not be established reliably.
4. Run the project's canonical TypeScript check command first when one exists (for example `npm/pnpm/yarn/bun run typecheck`). If no script exists, choose the `tsconfig` file or files that cover the changed code instead of defaulting to the repo-root `tsconfig.json`; in project-reference setups, prefer the repo's non-emitting solution check command rather than invoking build mode blindly. Otherwise use `tsc --noEmit -p <relevant-config>`. Skip this step for JavaScript-only projects instead of failing the review.
5. Run `eslint . --ext .ts,.tsx,.js,.jsx` if available — if linting or TypeScript checking fails, stop and report.
6. Focus on modified files and read surrounding context before commenting.
7. Begin review

## Diagnostic Commands

```bash
npm run typecheck --if-present # Canonical TypeScript check when the project defines one
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 --if-present flag is npm-only

npm run typecheck --if-present uses an npm-specific flag. Its behavior differs across package managers:

  • pnpm run --if-present typecheck — works, but the flag position differs
  • yarn run typecheck — exits with a non-zero code if the script is absent (no --if-present equivalent in Yarn classic)
  • bun run typecheck — also exits with an error if the script is absent

Step 3 correctly describes using npm/pnpm/yarn/bun run typecheck, but the Diagnostic Commands block shows only the npm form. Users copy-pasting the block in a pnpm/yarn/bun project will get unexpected errors. Adding equivalents (or at minimum a clarifying note) would keep this consistent with the multi-PM awareness shown elsewhere in the file:

Suggested change
npm run typecheck --if-present # Canonical TypeScript check when the project defines one
npm run typecheck --if-present # npm: canonical TypeScript check (skip if script absent)
pnpm run --if-present typecheck # pnpm equivalent
yarn run typecheck # yarn (exits with error if script absent — check package.json first)
bun run typecheck # bun equivalent

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.

2 participants