Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
b67d1f9
Added new GitHub action, check conventions and guidelines
purriza Feb 6, 2026
88e7e4c
Removed GitHub action to check conventions
purriza Feb 9, 2026
ef1fcfc
test: Add Solidity contract violations for CodeRabbit testing
purriza Feb 9, 2026
afb68fc
refactor: organize CodeRabbit violations by category and add deployme…
purriza Feb 10, 2026
ebf06ab
fix: move deployment script violations to script/deploy/ for CodeRabb…
purriza Feb 10, 2026
a6bc51f
fix: move Solidity violations to src/ for CodeRabbit detection
purriza Feb 10, 2026
e16776c
fix: resolve security warnings in violation examples
purriza Feb 10, 2026
1a20495
feat: add TypeScript violation examples for CodeRabbit validation
purriza Feb 10, 2026
72d67b8
fix: improve TypeScript violation examples for better CodeRabbit dete…
purriza Feb 10, 2026
f4d1c89
fix: update BadCodeQuality and BadImportOrder with improved violations
purriza Feb 10, 2026
bde5903
Merge branch 'main' into SMAR-49-Create-AI-conventions-checker-git-ac…
purriza Feb 10, 2026
21b3949
Removed TypeScript violation examples. Added bash examples
purriza Feb 11, 2026
61729ac
Added Solidity violation file
purriza Feb 11, 2026
f958a82
Removed solidity violation file
purriza Feb 11, 2026
8f34c9a
Added violation test files
purriza Feb 12, 2026
1e74227
Removed scripts
purriza Feb 12, 2026
949c271
Merge branch 'main' into SMAR-49-Create-AI-conventions-checker-git-ac…
purriza Feb 12, 2026
94bd7a8
Added workflow violation file
purriza Feb 12, 2026
5b3b1af
Added .sh violation files
purriza Feb 12, 2026
b6c1b02
Added .cursorrules for Coderabbit
purriza Feb 17, 2026
c0dbe42
Removed script violations and added .sol
purriza Feb 17, 2026
1ea00ba
Merge branch 'main' into SMAR-49-Create-AI-conventions-checker-git-ac…
purriza Feb 19, 2026
cf8c767
Solidity violation files moved
purriza Feb 19, 2026
fad4d82
Removed .sol and added .t.sol violations
purriza Feb 19, 2026
acc9bd9
Updated test to force violations
purriza Feb 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .cursorrules
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# LI.FI Project Rules for CodeRabbit

**IMPORTANT: This file is a pointer to dynamic rules. CodeRabbit should read and apply all rules from `.cursor/rules/*.mdc` files.**

## Dynamic Rules Location

All project conventions and rules are defined in `.cursor/rules/*.mdc` files. These files are:
- **Dynamic**: Updated frequently as new rules are added
- **Organized**: Each file covers a specific domain (Solidity, TypeScript, Architecture, etc.)
- **Tracked**: All files are version-controlled in git

## Rule Files to Apply

CodeRabbit should read and apply ALL rules from the following directory:
- `.cursor/rules/` - Contains all rule files (*.mdc)

All rule files (24 total):
- `.cursor/rules/000-global-standards.mdc` - Global guardrails, anti-hallucination, context hygiene
- `.cursor/rules/001-project-structure.mdc` - Directory structure, file organization, and where to place new files
- `.cursor/rules/002-architecture.mdc` - Core architectural principles for Diamond, separation of concerns, and governance
- `.cursor/rules/003-context-monitor.mdc` - Context window monitoring, warn when approaching limits, and handle information rollover
- `.cursor/rules/004-config-structure.mdc` - How to structure JSON config files in config/ for deployments and deploy scripts
- `.cursor/rules/099-finish.mdc` - Completion checklist to keep repo green
- `.cursor/rules/100-solidity-basics.mdc` - Solidity conventions (license, pragma, NatSpec, naming)
- `.cursor/rules/101-solidity-contracts.mdc` - Contract-specific requirements
- `.cursor/rules/102-facets.mdc` - Facet requirements and patterns
- `.cursor/rules/103-solidity-interfaces.mdc` - Interface conventions
- `.cursor/rules/104-receiver-contracts.mdc` - Receiver contract patterns
- `.cursor/rules/105-security.mdc` - Security guidelines
- `.cursor/rules/106-gas.mdc` - Gas-efficiency guidance aligned with existing patterns
- `.cursor/rules/107-solidity-scripts.mdc` - Foundry deployment/update script patterns
- `.cursor/rules/200-typescript.mdc` - TypeScript conventions
- `.cursor/rules/201-safe-decode-scripts.mdc` - Safe/timelock decode and display conventions for script/deploy/safe
- `.cursor/rules/300-bash.mdc` - Deployment bash structure and safety
- `.cursor/rules/400-solidity-tests.mdc` - Foundry test structure, naming, and expectations
- `.cursor/rules/401-testing-patterns.mdc` - Cross-language testing, coverage, and structure expectations
- `.cursor/rules/402-typescript-tests.mdc` - Bun test structure, coverage, and expectations for `.test.ts`
- `.cursor/rules/500-github-actions.mdc` - Structure, conventions, and best practices for GitHub Actions workflows
- `.cursor/rules/501-audits.mdc` - Rules for maintaining audit logs, audit reports, and audit-related workflows
- `.cursor/rules/502-whitelist-branching.mdc` - Ensure whitelist config files are only changed in main branch to prevent segregation
- `.cursor/rules/600-transaction-analysis.mdc` - Transaction analysis activation gate

## Instructions for CodeRabbit

1. **Read all `.cursor/rules/*.mdc` files** - These contain the actual rules and conventions
2. **Apply rules based on file globs** - Each rule file specifies which files it applies to (via `globs` in frontmatter)
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ test/solidity/TestPlayground.t.sol
.claude*
.copilot*
.direnv/
.cursorrules

AGENTS.md
CLAUDE.md
Expand Down
4 changes: 3 additions & 1 deletion test/solidity/Facets/GenericSwapFacet.t.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
// SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.17;

import { GenericSwapFacet } from "lifi/Facets/GenericSwapFacet.sol";
// VIOLATION: Incorrect import order - should be external libs → interfaces → libraries → contracts
import { LibSwap, TestBase } from "../utils/TestBase.sol";
import { GenericSwapFacet } from "lifi/Facets/GenericSwapFacet.sol";
import { TestWhitelistManagerBase } from "../utils/TestWhitelistManagerBase.sol";

// Stub GenericSwapFacet Contract
Expand Down Expand Up @@ -108,6 +109,7 @@ contract GenericSwapFacetTest is TestBase {

function test_CanSwapMultiple() public {
vm.startPrank(USDC_HOLDER);
// VIOLATION: Missing blank line after vm.startPrank(address)
usdc.approve(address(genericSwapFacet), 10 * 10 ** usdc.decimals());

// Swap1: USDC to DAI
Expand Down
Loading