Skip to content

Conversation

@0xDEnYO
Copy link
Contributor

@0xDEnYO 0xDEnYO commented Dec 18, 2025

Which Jira task belongs to this PR?

Why did I implement it this way?

Checklist before requesting a review

Checklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)

  • I have checked that any arbitrary calls to external contracts are validated and or restricted
  • I have checked that any privileged calls (i.e. storage modifications) are validated and or restricted
  • I have ensured that any new contracts have had AT A MINIMUM 1 preliminary audit conducted on by <company/auditor>

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 18, 2025

Walkthrough

This change updates cursor rule documentation and adds a new branching policy configuration. Updates include enhanced guidance for rule-writing (avoiding 'Related Files' sections and separating implementation details), a new Solidity 0.8.17 event emission documentation rule, and a new whitelist config branching strategy policy targeting the main branch. The rule index is updated accordingly.

Changes

Cohort / File(s) Summary
Rule Documentation & Guidance
.cursor/commands/add-new-rule.md, .cursor/rules/README.md
Enhanced rule-writing guidance with new subsections on avoiding 'Related Files' and keeping implementation details separate; added index entry for new whitelist-branching rule.
Rule Definitions
.cursor/rules/101-solidity-contracts.mdc, .cursor/rules/502-whitelist-branching.mdc
Added Solidity 0.8.17 event emission documentation guideline; introduced new policy file defining whitelist config branching strategy with main-branch-only modification requirement and workflow enforcement.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Review new policy requirements in 502-whitelist-branching.mdc for clarity and consistency with project workflow
  • Verify alignment between rule documentation updates (add-new-rule.md) and existing rule structure
  • Cross-check README entry matches new rule file definitions

Possibly related PRs

  • .cursorrules V1 #1513: Overlaps in same .cursor rule and command files, indicating related documentation and policy updates.

Suggested labels

AuditNotRequired

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete; it contains only the template structure with all fields unfilled (no Jira task, no implementation rationale, no completed checklists). Fill in the Jira task reference, explain the implementation approach, and provide clear answers to why these cursor rules were added.
Title check ❓ Inconclusive The title 'Add cursorrule' is vague and generic, providing no meaningful information about which cursorrule is being added or what specific problem it solves. Replace with a more specific title that describes the main change, such as 'Add whitelist branching cursorrule' or 'Add Solidity event reference rule'.
✅ Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-cursorrule

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • JIRA integration encountered authorization issues. Please disconnect and reconnect the integration in the CodeRabbit UI.

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.

Copy link
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: 0

🧹 Nitpick comments (1)
.cursor/commands/add-new-rule.md (1)

92-104: Consider moving Smart-contract Department Checklist to a dedicated rule or appendix.

The "Smart-contract Department Checklist" (lines 92–104) is comprehensive and valuable, but its length and depth may be better suited to a dedicated .cursor/rules/ file (e.g., a refined 002-architecture or similar) rather than embedded in a command file. Command files should remain lean and focused on the workflow itself.

If keeping it here, consider splitting into a summary checklist with references to the detailed rules where each point is enforced.

📜 Review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between d9b00e4 and 8914f58.

📒 Files selected for processing (4)
  • .cursor/commands/add-new-rule.md (1 hunks)
  • .cursor/rules/101-solidity-contracts.mdc (1 hunks)
  • .cursor/rules/502-whitelist-branching.mdc (1 hunks)
  • .cursor/rules/README.md (1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
.cursor/rules/*.mdc

📄 CodeRabbit inference engine (.cursor/rules/README.md)

.cursor/rules/*.mdc: Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files
Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like */

Files:

  • .cursor/rules/101-solidity-contracts.mdc
  • .cursor/rules/502-whitelist-branching.mdc
.cursor/rules/10[0-7]-*.mdc

📄 CodeRabbit inference engine (.cursor/rules/README.md)

Solidity rule activations: Use glob pattern /*.sol for all Solidity files, src//.sol for production contracts (excluding test and script files), src/Facets/**/.sol for facets, src/Interfaces/**/*.sol for interfaces

Files:

  • .cursor/rules/101-solidity-contracts.mdc
.cursor/commands/*.md

📄 CodeRabbit inference engine (.cursor/rules/README.md)

All custom commands must live in .cursor/commands/ and be invoked via /... syntax in Cursor chat

Files:

  • .cursor/commands/add-new-rule.md
🧠 Learnings (39)
📓 Common learnings
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/10[0-7]-*.mdc : Solidity rule activations: Use glob pattern **/*.sol for all Solidity files, src/**/*.sol for production contracts (excluding test and script files), src/Facets/**/*.sol for facets, src/Interfaces/**/*.sol for interfaces
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-0]{3}-*.mdc : Use alwaysApply: true sparingly and only for truly critical global rules within the 000-099 range
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/40[0-2]-*.mdc : Testing rule activations: Use glob patterns test/**/*.t.sol for Solidity tests, **/*.test.ts for TypeScript tests, and test/**/*.t.sol + **/*.test.ts + script/**/*.ts for cross-language testing rules
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/002-architecture.mdc:0-0
Timestamp: 2025-12-17T10:27:21.072Z
Learning: For any change that could affect selector layout, upgrade flows, or storage layout, cross-check relevant rules and documentation and call out the impact explicitly before editing
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/000-global-standards.mdc:0-0
Timestamp: 2025-12-17T10:26:39.863Z
Learning: Maintain active rules list with compact tags (e.g. 000-global-standards, 100-solidity-basics); list at task start/after context reset; only mention when rules change
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1196
File: script/helperFunctions.sh:1447-1462
Timestamp: 2025-06-19T06:23:47.848Z
Learning: 0xDEnYO prefers to keep eval usage in local bash scripts when the security risk is acceptable in their controlled environment, prioritizing simplicity over security hardening for local tooling.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1266
File: script/deploy/safe/execute-pending-timelock-tx.ts:627-628
Timestamp: 2025-07-17T04:21:26.825Z
Learning: In the lifinance/contracts repository, 0xDEnYO prefers to keep '0x0' as a fallback address in gas estimation calls rather than throwing errors when the wallet account address is not available, prioritizing code simplicity over strict validation.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1325
File: script/tasks/diamondSyncDEXs.sh:116-116
Timestamp: 2025-08-27T08:45:59.606Z
Learning: In script/tasks/diamondSyncDEXs.sh, user 0xDEnYO has chosen to selectively apply ShellCheck fixes, keeping array assignments using $() construct and other patterns as-is in their controlled deployment environment, prioritizing functionality over strict ShellCheck compliance.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1212
File: .github/workflows/convertForkedPRsToInternal.yml:81-106
Timestamp: 2025-07-16T06:18:02.682Z
Learning: 0xDEnYO prefers to use printf "%q" for shell escaping in GitHub workflows to increase security and protection from potential injections, even when it might cause formatting issues, prioritizing security over convenience.
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Rule file format must use MDC (Markdown with frontmatter) containing: name, description, globs array, and optional alwaysApply boolean

Applied to files:

  • .cursor/rules/README.md
  • .cursor/commands/add-new-rule.md
  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/[0-9]{3}-*.mdc : Organize rule files with numeric prefixes by category: 000-099 (Global/standards), 100-199 (Solidity), 200-299 (TypeScript), 300-399 (Bash), 400-499 (Testing), 500-599 (Git/GitHub Actions/Audit), 600-699 (Mixed)

Applied to files:

  • .cursor/rules/README.md
  • .cursor/commands/add-new-rule.md
  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/50[0-1]-*.mdc : GitHub Actions rule activations: Use glob patterns .github/workflows/**/*.yml and .github/workflows/**/*.yaml for workflow files

Applied to files:

  • .cursor/rules/README.md
  • .cursor/commands/add-new-rule.md
  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Define specific glob patterns in rules to target file types precisely and avoid unnecessary activation; avoid overly broad patterns like **/*

Applied to files:

  • .cursor/rules/README.md
  • .cursor/commands/add-new-rule.md
  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/40[0-2]-*.mdc : Testing rule activations: Use glob patterns test/**/*.t.sol for Solidity tests, **/*.test.ts for TypeScript tests, and test/**/*.t.sol + **/*.test.ts + script/**/*.ts for cross-language testing rules

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/200-*.mdc : TypeScript rule activations: Use glob patterns script/**/*.ts and tasks/**/*.ts for TypeScript scripting and helper files

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/10[0-7]-*.mdc : Solidity rule activations: Use glob pattern **/*.sol for all Solidity files, src/**/*.sol for production contracts (excluding test and script files), src/Facets/**/*.sol for facets, src/Interfaces/**/*.sol for interfaces

Applied to files:

  • .cursor/rules/README.md
  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to src/**/*.sol : All contracts in `src/` require audits except Interfaces in `src/Interfaces/**` (type definitions only) and external dependencies in `lib/`

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Applies to .github/workflows/*{audit,version}*.yml : CI workflows must enforce audit-log and audit-report expectations through automated verification in `.github/workflows/versionControlAndAuditCheck.yml`

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:29:05.622Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/200-typescript.mdc:0-0
Timestamp: 2025-12-17T10:29:05.622Z
Learning: Applies to {script,tasks}/**/*.ts : New TypeScript helpers must be covered by a colocated `*.test.ts` file using Bun (`describe` / `it` / `expect`) with 100% coverage. Cover edge cases and error paths.

Applied to files:

  • .cursor/rules/README.md
📚 Learning: 2025-12-17T10:27:50.907Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/100-solidity-basics.mdc:0-0
Timestamp: 2025-12-17T10:27:50.907Z
Learning: Applies to **/*.sol : All contracts must use `pragma solidity ^0.8.17;`

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-07-03T01:44:43.968Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: In the lifinance/contracts codebase, use floating pragma directives (e.g., `pragma solidity ^0.8.17;`) rather than locking to exact versions. This allows the contracts to support multiple solc versions as preferred by the team.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:30:20.053Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/501-audits.mdc:0-0
Timestamp: 2025-12-17T10:30:20.053Z
Learning: Any contract version change requires a new audit entry; comment-only or pragma-only changes do not require version bumps or audits

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-07-03T01:44:43.968Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1237
File: conventions.md:56-60
Timestamp: 2025-07-03T01:44:43.968Z
Learning: Always consult the conventions.md file for the latest rules and conventions when reviewing PRs or code changes in the lifinance/contracts repository. Make suggestions when code changes do not match the documented conventions in this file.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-07-17T11:28:17.454Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1283
File: src/Interfaces/KatanaV3/IKatanaV3AggregateRouter.sol:1-2
Timestamp: 2025-07-17T11:28:17.454Z
Learning: In the lifinance/contracts repository, all Solidity files consistently use `pragma solidity ^0.8.17;` for version consistency across the codebase, even though foundry.toml specifies a different version. This is the preferred approach for maintaining consistency.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:28:21.247Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/103-solidity-interfaces.mdc:0-0
Timestamp: 2025-12-17T10:28:21.247Z
Learning: Applies to src/Interfaces/**/*.sol : Parameter naming must follow descriptive lowerCamelCase convention; prefer local clarity over blindly mirroring odd upstream names

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2024-10-10T03:33:59.733Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 782
File: test/solidity/Helpers/WithdrawablePeriphery.t.sol:15-21
Timestamp: 2024-10-10T03:33:59.733Z
Learning: In Solidity, events cannot be imported from another contract; they need to be redefined or imported from an interface.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-08-20T18:05:14.748Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1328
File: test/solidity/Periphery/Lda/Facets/VelodromeV2Facet.t.sol:68-75
Timestamp: 2025-08-20T18:05:14.748Z
Learning: In the lifinance/contracts repository, all Solidity files consistently use `pragma solidity ^0.8.17;` as the standard version, regardless of what is configured in foundry.toml. This is an explicit team preference that should be maintained across all files.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:28:40.630Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/105-security.mdc:0-0
Timestamp: 2025-12-17T10:28:40.630Z
Learning: Applies to {src,script}/**/*.sol : Do not weaken existing access controls, timelock flows, or Safe multisig protections; any change that touches admin-only functionality must call out its governance impact

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:28:03.622Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/101-solidity-contracts.mdc:0-0
Timestamp: 2025-12-17T10:28:03.622Z
Learning: Applies to src/**/*.sol : NatSpec required on contracts/interfaces in `src/`: `title`, `author LI.FI (https://li.fi)`, `notice`, `custom:version X.Y.Z`; document all public/external functions with params/returns.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:27:50.907Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/100-solidity-basics.mdc:0-0
Timestamp: 2025-12-17T10:27:50.907Z
Learning: Applies to **/*.sol : Contracts and interfaces must include NatSpec: `title` (matching contract/interface name), `author LI.FI (https://li.fi)`, `notice` describing purpose, and `custom:version X.Y.Z`

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:28:03.622Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/101-solidity-contracts.mdc:0-0
Timestamp: 2025-12-17T10:28:03.622Z
Learning: Applies to src/**/*.sol : Bug bounty clarity: In contract NatSpec, explicitly document whether the contract is intended to hold/custody funds. If it is **not** designed to hold funds, state that clearly (e.g., "This contract is not intended to custody user funds / hold balances; any funds held are incidental (e.g., transient during execution) and should not persist."). If it _is_ designed to hold funds (e.g., `FeeCollector`), describe what funds it holds and under what conditions.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:27:50.907Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/100-solidity-basics.mdc:0-0
Timestamp: 2025-12-17T10:27:50.907Z
Learning: Applies to **/*.sol : Public and external functions require NatSpec including params and returns documentation

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:28:21.247Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/103-solidity-interfaces.mdc:0-0
Timestamp: 2025-12-17T10:28:21.247Z
Learning: Applies to src/Interfaces/**/*.sol : When copying from or shadowing an external protocol, add a short NatSpec note with a link or identifier that references the original contract or documentation

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-08-26T22:29:29.965Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1328
File: script/deploy/facets/LDA/DeployCurveFacet.s.sol:10-12
Timestamp: 2025-08-26T22:29:29.965Z
Learning: Deployment scripts in the lifinance/contracts repository do not require NatSpec documentation, even for public/external functions. This is an exception to the general NatSpec requirement for public/external functions in the codebase.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:28:03.622Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/101-solidity-contracts.mdc:0-0
Timestamp: 2025-12-17T10:28:03.622Z
Learning: Applies to docs/**/*.md : When adding a new deployable contract, create a corresponding documentation page in `docs/` mirroring existing docs conventions for new integrations/contracts.

Applied to files:

  • .cursor/rules/101-solidity-contracts.mdc
📚 Learning: 2025-12-17T10:27:39.700Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/099-finish.mdc:0-0
Timestamp: 2025-12-17T10:27:39.700Z
Learning: In summary format: Start with applied rules (filename/anchor), include tests/lints run, call out follow-ups/gaps

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:26:39.863Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/000-global-standards.mdc:0-0
Timestamp: 2025-12-17T10:26:39.863Z
Learning: Maintain active rules list with compact tags (e.g. 000-global-standards, 100-solidity-basics); list at task start/after context reset; only mention when rules change

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Keep rule files focused with one concern per file to maintain clarity and modularity

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:27:21.072Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/002-architecture.mdc:0-0
Timestamp: 2025-12-17T10:27:21.072Z
Learning: For any change that could affect selector layout, upgrade flows, or storage layout, cross-check relevant rules and documentation and call out the impact explicitly before editing

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Use /add-new-rule command as the standard workflow for adding or updating rules and commands

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:30:42.081Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/README.md:0-0
Timestamp: 2025-12-17T10:30:42.081Z
Learning: Applies to .cursor/rules/*.mdc : Reference conventions via [CONV:*] anchors defined within rule files rather than relying on external Markdown files

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Keep workflows focused on single responsibilities for maintainability

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Step names must be clear and action-oriented (e.g., 'Checkout repository', 'Verify version updates')

Applied to files:

  • .cursor/commands/add-new-rule.md
📚 Learning: 2025-12-10T17:36:54.412Z
Learnt from: mirooon
Repo: lifinance/contracts PR: 1524
File: config/whitelist.json:4358-4366
Timestamp: 2025-12-10T17:36:54.412Z
Learning: Repo lifinance/contracts: In config/whitelist.json, temporary network keys (e.g., "stable") may appear under DEX entries (such as Fly) while deployments are in progress and the corresponding chain configuration PR hasn’t merged yet. This is expected, does not break the workflow, and should not be flagged as an unsupported chain key.

Applied to files:

  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-05-27T12:36:26.987Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.

Applied to files:

  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2025-12-17T10:30:08.145Z
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check base branch targeting using condition: `if: ${{ github.event.pull_request.base.ref == 'main' }}`

Applied to files:

  • .cursor/rules/502-whitelist-branching.mdc
📚 Learning: 2024-11-08T03:42:16.803Z
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the `.github/workflows/protectSecurityRelevantCode.yml` file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.

Applied to files:

  • .cursor/rules/502-whitelist-branching.mdc
⏰ 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: run-unit-tests
🔇 Additional comments (5)
.cursor/commands/add-new-rule.md (1)

39-61: Excellent addition: cross-reference and implementation-detail guidance.

Lines 39–61 provide clear, actionable separation between rule content (requirements, constraints, behavioral expectations) and implementation details (CI workflows, tooling setup). The examples are practical and well-grounded.

.cursor/rules/README.md (1)

110-110: Rule index entry is well-formatted and properly positioned.

The new 502 entry follows the established table format, numeric ordering, and globs convention. Description is clear and concise. No issues.

.cursor/rules/502-whitelist-branching.mdc (2)

1-51: Well-structured policy with clear requirements and agent guidance.

The policy is well-organized, actionable, and appropriately scoped:

  • Core requirement is explicit and unambiguous (main branch only)
  • Rationale justifies the constraint clearly
  • Workflow section handles edge cases (feature-branch stacking, standalone vs. feature-bundled whitelist changes)
  • Agent behavior provides concrete guardrails without over-specifying implementation
  • Exceptions acknowledge edge cases while maintaining the main principle
  • Globs are precise (two specific config files)
  • alwaysApply: false is correct (targeted rule, not universal)

No technical issues with the rule structure.


1-51: ⚠️ BLOCKING: Developer and reviewer checklists are incomplete.

Per PR objectives, the PR includes incomplete checklists:

  • Developer checklist: All items unchecked (self-review, scope, tests, new-facet checklist, documentation)
  • Reviewer checklist: All critical validations unchecked (arbitrary external calls, privileged storage, audit requirements)

These checklists are marked as required before deployment in the PR template. Please complete them before requesting review. Specifically:

  • Confirm self-review is complete
  • Verify PR scope is minimal and focused (adding rules/commands only; no behavior changes)
  • Confirm tests/documentation are updated (e.g., README.md entry for new 502 rule)
  • Confirm no arbitrary external calls or privileged storage modifications
  • Confirm audit checklist is satisfied (if applicable)
⛔ Skipped due to learnings
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1256
File: deployments/zksync.diamond.json:81-87
Timestamp: 2025-07-04T08:59:08.108Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.
Learnt from: mirooon
Repo: lifinance/contracts PR: 1283
File: deployments/ronin.diamond.json:65-68
Timestamp: 2025-08-07T10:20:01.383Z
Learning: When analyzing deployment PRs in the lifinance/contracts repository, carefully verify that target state configuration files (like script/deploy/_targetState.json) and deployment log files have been updated before flagging missing entries. The AI summary section should be consulted to understand all file changes, as manual searches might miss entries due to formatting differences or search limitations.
Learnt from: mirooon
Repo: lifinance/contracts PR: 1048
File: script/deploy/safe/safe-decode-utils.ts:0-0
Timestamp: 2025-03-21T13:48:54.006Z
Learning: When reviewing PRs with a specific focused purpose (like migrating between package managers), restrict suggestions to issues directly related to that purpose rather than general code improvements.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1168
File: script/deploy/_targetState.json:1564-1589
Timestamp: 2025-05-27T12:36:26.987Z
Learning: When reviewing deployment PRs in the lifinance/contracts repository, target state configuration files (like script/deploy/_targetState.json) may be updated for multiple networks even when the PR is focused on deploying to a specific network. The scope should be determined by the PR title and description, not just by all configuration changes present in the files.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1334
File: deployments/mainnet.json:54-54
Timestamp: 2025-08-26T02:20:52.515Z
Learning: For deployment PRs in the lifinance/contracts repository, carefully verify the specific scope mentioned in the PR title and description before suggesting updates to other networks. Not all deployments are cross-network updates - some are targeted to specific chains only.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1140
File: deployments/worldchain.json:28-29
Timestamp: 2025-07-03T10:19:21.132Z
Learning: When reviewing deployment PRs, always perform comprehensive searches for addresses in deployment log files before reporting them as missing. Use multiple search strategies including direct address searches and context-aware searches to avoid false positives about missing entries. Double-check the actual presence of addresses in the deployment logs before flagging inconsistencies.
Learnt from: CR
Repo: lifinance/contracts PR: 0
File: .cursor/rules/500-github-actions.mdc:0-0
Timestamp: 2025-12-17T10:30:08.145Z
Learning: Applies to .github/workflows/**/*.{yml,yaml} : Check base branch targeting using condition: `if: ${{ github.event.pull_request.base.ref == 'main' }}`
Learnt from: mirooon
Repo: lifinance/contracts PR: 1524
File: config/whitelist.json:4358-4366
Timestamp: 2025-12-10T17:36:54.412Z
Learning: Repo lifinance/contracts: In config/whitelist.json, temporary network keys (e.g., "stable") may appear under DEX entries (such as Fly) while deployments are in progress and the corresponding chain configuration PR hasn’t merged yet. This is expected, does not break the workflow, and should not be flagged as an unsupported chain key.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 853
File: .github/workflows/protectSecurityRelevantCode.yml:78-78
Timestamp: 2024-11-08T03:42:16.803Z
Learning: In the `.github/workflows/protectSecurityRelevantCode.yml` file, ensure that any suggested code changes are secure, thoroughly vetted for potential issues, and do not prompt further modifications to previously recommended code.
Learnt from: 0xDEnYO
Repo: lifinance/contracts PR: 1299
File: deployments/arbitrum.staging.json:59-61
Timestamp: 2025-09-01T09:35:29.886Z
Learning: 0xDEnYO has repeatedly emphasized that the target state file (script/deploy/_targetState.json) should NEVER be reviewed, verified, or mentioned in deployment PRs. This instruction has been given multiple times and must be strictly followed without exception.
.cursor/rules/101-solidity-contracts.mdc (1)

14-14: Rule is accurate regarding Solidity 0.8.17 event emission syntax.

The syntax emit ContractName.EventName() for emitting events was introduced as a feature in Solidity 0.8.20, confirming that this pattern is unsupported in 0.8.17. The rule correctly identifies that this syntax cannot be used. Consider clarifying the wording from "must not" to "cannot" for technical precision—the restriction is a language limitation, not a prescriptive rule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants