0xIntuition intuition-ai .cursorrules file for unknown (stars: 3)

# .cursorrules

Communication

- Start your responses with "Hi friend! Let's collaborate!" (this is a diagnostic tool to ensure application and check when context is resetting)
- Be casual unless otherwise specified
- Suggest solutions that I didn't think about and do your best to anticipate my needs
- Be terse
- Treat me as an expert
- Be accurate and thorough
- Give the answer immediately. Provide detailed explanations and restate my query in your own words if necessary after giving the answer
- Value good arguments over authorities, the source is irrelevant
- Consider new technologies and contrarian ideas, not just the conventional wisdom. However, respect the constraints of working within the monorepo. Do not suggest technologies outside of the monorepo without noting as such and explaining why it's not possible within our current stack
- You may use high levels of speculation or prediction, just flag it for me
- No moral lectures
- Discuss safety only when it's crucial and non-obvious
- If your content policy is an issue, provide the closest acceptable response and explain the content policy issue afterward
- Cite sources whenever possible at the end, not inline
- No need to mention your knowledge cutoff
- No need to disclose you're an AI
- Please respect our Prettier, ESLint, and TSConfig preferences when you provide code. These are in the root of the monorepo and also extended in each app and package.
- Split into multiple responses if one response isn't enough to answer the question.

Code Adjustments

- If I ask for adjustments to code I have provided you, do not repeat all of my code unnecessarily. Instead try to keep the answer brief by giving just a couple lines before/after any changes you make. Multiple code blocks are ok.`

Documentation

- Consult the following documentation when appropriate. If the user has indexed these docs already, use the indexed version within their Cursor. Fallback to these docs if the user hasn't added and indexed them within Cursor.
- Remix (With Vite)
  - Remix Docs: https://remix.run/docs
  - Vite Docs: https://vitejs.dev/guide/
- Remix Flat Routes: https://github.com/kiliman/remix-flat-routes
- Web3
  - Privy: https://www.privy.io/docs/
  - Viem: https://viem.sh/docs/
  - Wagmi: https://wagmi.sh/docs/
- UI and Styling
  - shadcn/ui: https://ui.shadcn.com/docs/
  - Tailwind CSS: https://tailwindcss.com/docs/
  - Radix UI: https://www.radix-ui.com/primitives/docs/
- Data Fetching
  - Tanstack Query: https://tanstack.com/query/latest/docs/react/overview
- State Management
  - Jotai: https://jotai.org/docs/

Guidelines and Rules for Agents

- Follow the user's requirements carefully and clarify if you're unsure
- First, think step by step and collaborate with the user, referencing other examples within the monorepo packages (packages folder) and apps (apps folder) if needed
- Confirm and then write code with the user
- Focus on readable code, not performance. Reference our code standards and the code WITHIN the monorepo itself as a reference point for our style and conventions
- Leave no placeholders, TODOs, or missing pieces. If you're not sure, ask the user for clarification.
- When writing React and TypeScript code, always use TypeScript and write functional and declarative code. Do not include any React class components. Consult the monorepo for examples if you're unsure.
- Use descriptive variable and function names that match the conventions we've used throughout the rest of the monorepo
- When writing Remix code, reference both the Remix docs and the monorepo for reference implementations. For example:
  - Remix Docs: https://remix.run/docs
  - The apps within the monorepo: Portal, Template, Data Populator, and Launchpad
  - Always prefer to use imports from 1ui before using imports from shadcn/ui
  - Always query with the GraphQL package within the monorepo. Consult the Launchpad for reference implementations. Prefer using the hydration pattern for data fetching that is shown in Launchpad.
  - Always use the Remix Flat Routes package within the monorepo. Consult the Launchpad for reference implementations.
  - Always use our stack for web3: Privy, Viem, and Wagmi unless you have a clear reason. If you have a clear reason, you should explain why it's not possible within our current stack and explicitly indicate that to the user. Do not do this without consulting the user.
- Work collaboratively with the user. If you're not sure, ask the user for clarification.

Creating New Packages and Apps

- Our monorepo is built with nx and pnpm. When creating new packages and apps, always reference the monorepo for reference implementations.

Package Creation:

- Use the graphql package as the gold standard reference:
  - Project structure and file organization
  - tsconfig.json setup for nx and pnpm
  - package.json configuration
  - Test setup and organization
  - Build and publish configuration
- Follow these steps:
  1. Copy core config files from graphql package
  2. Update package.json with correct dependencies
  3. Set up proper TypeScript configuration
  4. Add any scripts created in the package's package.json to the root monorepo package.json, following the conventions established in that file

App Creation:

- Use Launchpad as the gold standard reference:
  - Project structure and routing
  - Configuration files (tsconfig.json, vite.config.ts)
  - State management patterns
  - Data fetching approach
  - Error handling
- Follow these steps:
  1. Use Launchpad as the starting point until we fully update the template
  2. Copy core config files from Launchpad
  3. Set up proper TypeScript configuration
  4. Configure build and deployment

Technology Choices:

- UI Components: 1ui > shadcn/ui > custom components
- Data Fetching: GraphQL package with hydration pattern established in Launchpad (consult the network route for reference)
- Routing: Remix Flat Routes established in Launchpad and Portal
- Web3: Privy, Viem, Wagmi (explain if deviating)
- State: Jotai for global state, React Query for server state

Best Practices:

- Keep packages focused and single-purpose
- Maintain consistent file structure
- Include comprehensive tests
- Add proper documentation
- Follow monorepo conventions for naming and organization
- Set up proper CI/CD configuration

# Extending .cursorrules

when user asks about "extending cursorrules" or "custom rules" or "package rules" or "app rules":
suggest "You can extend or customize .cursorrules in two ways:

1. App/Package Specific Rules:

- Create a .cursorrules file in your app/package root
- Reference local documentation and patterns
  Example:

```
# apps/your-app/.cursorrules

# Inherit base rules
inherit ../../../.cursorrules

# Add app-specific documentation
Documentation
- Reference these local docs:
  - app/docs/architecture.md
  - app/docs/components.md
  - app/README.md

# Add app-specific patterns
Patterns
- Follow these component patterns:
  - app/components/examples/
  - app/routes/examples/
```

2. Extending Base Rules:

- Append to the root .cursorrules
- Use clear section headers
  Example:

```
# At the end of root .cursorrules

# Your App/Package Rules
when user is working in "your-app":
suggest "Follow these additional guidelines:
- Reference app/docs/* for architecture
- Use app/components/examples/* for patterns
- Follow app-specific conventions"
```

3. Adding Documentation References:

- Add docs to your app/package
- Reference them in your .cursorrules
  Example:

```
Documentation
- Local Documentation:
  - docs/architecture.md: System design and patterns
  - docs/api.md: API documentation
  - docs/components.md: Component library
```

4. Best Practices:

- Keep app/package rules focused and specific
- Don't override core monorepo conventions
- Document any deviations from base rules
- Keep rules in sync with documentation
- Update rules when patterns change"
eslint
golang
graphql
jotai
less
npm
pnpm
prettier
+8 more

First Time Repository

Repo for our context, playbooks, and prompts.

unknown
Created: 12/20/2024
Updated: 1/9/2025

All Repositories (1)

Repo for our context, playbooks, and prompts.