Skip to content

fix(library): attribute sim counts by clause and table row, not capitalized words - #10115

Merged
waleedlatif1 merged 10 commits into
stagingfrom
fix/library-sim-count-clause-attribution
Nov 17, 2026
Merged

waleedlatif1 merged 10 commits into
stagingfrom
fix/library-sim-count-clause-attribution

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • sim-count attributed a count to Sim only when no capitalized word sat between "Sim" and the number, within 12 words. That skipped real Sim claims such as "Sim combines Chat with 270+ integrations", "Sim's Agent blocks … connect to 270+ integrations", and | Sim | … | 270+ integrations | table rows, so an overclaim written that way would pass. It checked 19 of the library's Sim count claims.
  • Attribution is now by clause: a count belongs to Sim when "Sim" comes before it in the same clause and no other product's possessive directly precedes it ("Zapier's 9,000+"). Sentence ends and contrasts (while, whereas, but, unlike, compared with/to, versus) start a new clause, and an opening "Unlike Sim, …" or "Like Sim, …" is dropped.
  • Table rows belong to Sim when their first cell is Sim, plain or linked.
  • Removes the 12-word cap and the capitalized-word guard. The rule now checks 33 Sim claims in current library content, with no competitor counts attributed.

Type of Change

  • Bug fix

Testing

  • scripts/check-library-content.test.ts: new reject cases (linked product name, mid-clause capitals, plain and linked Sim table rows) and accept cases ("Unlike Sim, …", "Like Sim, …", "…, while Zapier lists …", "fewer than Zapier's …", a competitor table row, a count before the Sim mention). Each fails with its guard reverted.
  • bun run test:scripts (773 tests) and bun run check:library-content (204 posts) pass.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing (new tests pass the test-audit authoring gate)
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
docs Ignored Ignored Preview Nov 17, 2026 4:36am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge, with no outstanding findings.

Summary

Updates sim-count to check Sim claims by clause and table row instead of word distance and capitalization.

  • Library count checks now assign counts to Sim by clause and row.

Reviews (10) · Last reviewed commit: "docs(library): describe sim-count table ..." · Reviewed by Greptile

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

3 issues found across 2 files

Confidence score: 3/5

  • In scripts/check-library-content.ts, the , which / , who split can detach a relative clause about Sim when it follows a non-Sim noun, leaving Sim’s count unattributed. Keep the clause attached unless the preceding subject is Sim.
  • In scripts/check-library-content.ts, replacing the delimiter can attribute a competitor’s relative-clause count to Sim. Preserve the delimiter when splitting the sentence.
  • In scripts/check-library-content.ts, valid GFM table rows without a leading | bypass row classification, so competitor counts can be treated as Sim’s. Recognize rows without requiring that leading pipe.
Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="scripts/check-library-content.ts">

<violation number="1" location="scripts/check-library-content.ts:156">
P2: The `, which` / `, who` clause break also fires after non-Sim nouns, so a relative clause about Sim is split off and its count goes unattributed. "Sim is an AI workspace, which connects to 1,000+ integrations" passes. Only split on `, which|who` when the referent is another product, or drop the relative-clause break and rely on the contrast and sentence breaks.</violation>

<violation number="2" location="scripts/check-library-content.ts:177">
P2: This replacement erases the delimiter needed to separate a competitor’s relative clause, so `Sim has 280+ integrations, unlike Zapier, which has 9,000+ integrations` incorrectly validates Zapier’s count as Sim’s. Preserve the clause boundary and handle product names containing digits such as `n8n`.</violation>

<violation number="3" location="scripts/check-library-content.ts:192">
P2: Valid GFM rows without a leading `|` bypass the table-row classifier. A competitor row such as `n8n | Alternative to Sim | 2,000+ integrations |` then enters prose attribution and is falsely treated as Sim’s count; recognize both table forms or parse table structure before attributing counts.</violation>
</file>

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved

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

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 force-pushed the fix/library-sim-count-clause-attribution branch from 67603e5 to dee23a4 Compare November 17, 2026 03:58
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved
@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved
Comment thread scripts/check-library-content.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check-library-content.ts Resolved
@waleedlatif1
waleedlatif1 force-pushed the fix/library-sim-count-clause-attribution branch from 6f89fa6 to 168317b Compare November 17, 2026 04:21
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

Comment thread scripts/check-library-content.ts Resolved

@cubic-dev-ai cubic-dev-ai Bot left a comment •

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.

All reported issues were addressed across 2 files

Reply with feedback, questions, or to request a fix.

Turn on auto-fix | Re-trigger cubic

Comment thread scripts/check-library-content.ts Resolved
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

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

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cubic-dev-ai review this PR

@cubic-dev-ai

cubic-dev-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@cubic-dev-ai review this PR

@waleedlatif1 I have started the AI code review. It will take a few minutes to complete.

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

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.

No issues found across 2 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Turn on auto-fix | Re-trigger cubic

@waleedlatif1
waleedlatif1 merged commit 165c3db into staging Nov 17, 2026
75 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/library-sim-count-clause-attribution branch November 17, 2026 06:07
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.

1 participant