Skip to content

Update Cursor rules#806

Merged
DZakh merged 2 commits into
mainfrom
dz/clean-up-cursor-config
Nov 4, 2025
Merged

Update Cursor rules#806
DZakh merged 2 commits into
mainfrom
dz/clean-up-cursor-config

Conversation

@DZakh

@DZakh DZakh commented Nov 3, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation

    • Added comprehensive testing best practices section with guidelines and implementation examples
    • Expanded contributor guide with detailed testing setup instructions, prerequisites, and development workflows
    • Removed legacy documentation including migration guides and development framework guidance files
  • Chores

    • Updated .gitignore configuration to broaden build artifact exclusion patterns

@DZakh DZakh requested a review from JonoPrest November 3, 2025 10:00
@coderabbitai

coderabbitai Bot commented Nov 3, 2025

Copy link
Copy Markdown
Contributor

Walkthrough

This change removes several cursor rule documentation files across the repository, adds testing best practices documentation, updates the .gitignore target directory pattern from one-level-deep to any-level matching, and expands CONTRIBUTING.md with testing prerequisites and workflow commands.

Changes

Cohort / File(s) Summary
Cursor Rules Documentation
\.cursor/rules/rescript.mdc`, `.cursor/rules/subgraph-migration.mdc``
Added "Testing Best Practices" section to rescript.mdc with guidelines and code examples; deleted subgraph-migration.mdc entirely (removed comprehensive migration guide with 7-step process, entity handling patterns, BigDecimal/BigInt guidance, Effect API usage, validation checklists, and runtime testing mandates)
Scenario-specific Cursor Rules
scenarios/fuel_test/.cursor/rules/hyperindex.mdc, scenarios/test_codegen/.cursor/rules/hyperindex.mdc
Removed HyperIndex development guidance documents from both scenario directories (eliminated generated README-like guides covering objectives, environment requirements, codegen workflows, entity update patterns, external call procedures, EnvIO vs TheGraph differences, schema/config rules, and validation guidance)
Project Configuration
\.gitignore``
Replaced ignore pattern from \*/target to target, broadening omission scope to match target directories at any nesting level rather than one level deep
Contributing Guide
CONTRIBUTING.md
Added Testing section detailing prerequisites, commands, and development workflow for test_codegen including codegen execution, test running, and live compilation procedures

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • All changes are documentation-related or configuration updates with no functional logic modifications
  • File deletions are straightforward removals without dependencies to track
  • Single .gitignore pattern change is trivial
  • New documentation in rescript.mdc and CONTRIBUTING.md follows existing style and adds content incrementally

Possibly related PRs

Suggested reviewers

  • DenhamPreen
  • JonoPrest

Poem

🐰 The rules take flight, like autumn leaves,
Documentation tidied up with ease,
Old guides fade to make room anew,
Target patterns grow broader too,
Testing practices now crystalline bright! 📚✨

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title check ❓ Inconclusive The pull request title 'Update Cursor rules' is vague and generic. While it relates to changes in the PR (which does update Cursor rule files in .cursor/rules directories), the title uses a non-descriptive term that doesn't convey meaningful information about what specifically changed. The PR involves removing two HyperIndex guidance documents, adding Testing Best Practices to ReScript rules, modifying .gitignore, and updating CONTRIBUTING.md — but the title provides no insight into these substantive changes or their primary purpose. Consider replacing the title with a more specific description of the main changes, such as 'Remove HyperIndex guidance documents and update cursor rules' or 'Clean up cursor rules and add testing documentation' to better convey the primary intent of the changeset to reviewers scanning the history.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dz/clean-up-cursor-config

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6685bdb and 8a75eeb.

📒 Files selected for processing (6)
  • .cursor/rules/rescript.mdc (1 hunks)
  • .cursor/rules/subgraph-migration.mdc (0 hunks)
  • .gitignore (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • scenarios/fuel_test/.cursor/rules/hyperindex.mdc (0 hunks)
  • scenarios/test_codegen/.cursor/rules/hyperindex.mdc (0 hunks)
💤 Files with no reviewable changes (3)
  • .cursor/rules/subgraph-migration.mdc
  • scenarios/test_codegen/.cursor/rules/hyperindex.mdc
  • scenarios/fuel_test/.cursor/rules/hyperindex.mdc
🧰 Additional context used
🧠 Learnings (9)
📚 Learning: 2025-07-22T07:15:55.433Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: .cursor/rules/rescript.mdc:0-0
Timestamp: 2025-07-22T07:15:55.433Z
Learning: Applies to **/*.{res,resi} : ReScript has record types which require a type definition before hand. You can access record fields by dot like `foo.myField`.

Applied to files:

  • .cursor/rules/rescript.mdc
📚 Learning: 2025-07-22T07:15:55.433Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: .cursor/rules/rescript.mdc:0-0
Timestamp: 2025-07-22T07:15:55.433Z
Learning: Applies to **/*.{res,resi} : Use records when working with structured data, and objects to conveniently pass payload data between functions.

Applied to files:

  • .cursor/rules/rescript.mdc
📚 Learning: 2025-07-22T07:15:55.433Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: .cursor/rules/rescript.mdc:0-0
Timestamp: 2025-07-22T07:15:55.433Z
Learning: Always use ReScript 11 documentation.

Applied to files:

  • .cursor/rules/rescript.mdc
📚 Learning: 2025-07-22T07:15:55.433Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: .cursor/rules/rescript.mdc:0-0
Timestamp: 2025-07-22T07:15:55.433Z
Learning: Applies to **/*.{res,resi} : Never use %raw to access object fields if you know the type.

Applied to files:

  • .cursor/rules/rescript.mdc
📚 Learning: 2025-10-21T16:31:22.127Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: .cursor/rules/navigation.mdc:0-0
Timestamp: 2025-10-21T16:31:22.127Z
Learning: Applies to **/*.res : Prefer reading ReScript .res modules directly

Applied to files:

  • .cursor/rules/rescript.mdc
📚 Learning: 2025-08-11T08:49:57.399Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: scenarios/test_codegen/.cursor/rules/hyperindex.mdc:0-0
Timestamp: 2025-08-11T08:49:57.399Z
Learning: Applies to scenarios/test_codegen/**/schema.graphql : After changing schema.graphql, run: pnpm codegen

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-08-11T08:49:57.399Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: scenarios/test_codegen/.cursor/rules/hyperindex.mdc:0-0
Timestamp: 2025-08-11T08:49:57.399Z
Learning: Applies to scenarios/test_codegen/**/*.ts : After changing any TypeScript files, run: pnpm tsc --noEmit to ensure successful compilation

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-08-11T08:47:04.346Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: scenarios/fuel_test/.cursor/rules/hyperindex.mdc:0-0
Timestamp: 2025-08-11T08:47:04.346Z
Learning: Applies to scenarios/fuel_test/**/schema.graphql : After any change to schema.graphql, run `pnpm codegen`

Applied to files:

  • CONTRIBUTING.md
📚 Learning: 2025-08-11T08:49:57.399Z
Learnt from: CR
Repo: enviodev/hyperindex PR: 0
File: scenarios/test_codegen/.cursor/rules/hyperindex.mdc:0-0
Timestamp: 2025-08-11T08:49:57.399Z
Learning: Applies to scenarios/test_codegen/**/config.yaml : After changing config.yaml, run: pnpm codegen

Applied to files:

  • CONTRIBUTING.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: build_and_test
🔇 Additional comments (3)
.gitignore (1)

1-1: Correct pattern scope for monorepo structure.

The change from */target to target appropriately broadens the ignore scope to handle target/ directories at any nesting depth. This is the right approach for a monorepo with nested Rust crates (like codegenerator/cli), which each generate their own target/ directory.

CONTRIBUTING.md (1)

240-257: Clear and helpful testing documentation with accurate workflow guidance.

The new Testing section consolidates the test_codegen prerequisites and workflow clearly. The distinction between library code changes (which support hot recompilation via pnpm rescript -w) and template/config changes (which require pnpm codegen) matches the guidance in lines 85–89 and aligns with the learnings that reference running codegen after schema/config modifications.

.cursor/rules/rescript.mdc (1)

28-41: Well-crafted testing guidelines that complement the CONTRIBUTING.md additions.

The new Testing Best Practices section provides ReScript-specific testing guidance that aligns well with the test_codegen workflow documented in CONTRIBUTING.md. The emphasis on assertions over logging and the try/catch-as-expression pattern (lines 34–40) are solid practices. The code example is clear and demonstrates the pattern effectively.


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.

@@ -1,1883 +0,0 @@
# 🚨 MANDATORY: READ THIS FIRST 🚨

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Removed it from here, since it's in template now

@DZakh DZakh enabled auto-merge (squash) November 4, 2025 13:15
@DZakh DZakh merged commit 6f38ca7 into main Nov 4, 2025
2 checks passed
@DZakh DZakh deleted the dz/clean-up-cursor-config branch November 4, 2025 13:24
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