PureCode AI
  • PureCode AI Extension
  • Getting Started
    • Getting Started
  • Features
    • Chat
      • @Features
        • @Docs
        • @Files
        • @Folder
        • @Code
        • @Git
        • @Terminal
        • @UI
    • Dual Operation Modes
      • Normal Mode [ Chat ]
      • Agent Mode
      • Switching Between Modes
    • Context Awareness
      • Normal Indexing
      • Advance Indexing
    • Human-like Code Understanding with @codebase
    • Interactive Planning Mode
    • Adaptive Learning Preferences
    • Global and Project Custom Instructions
      • Global Instructions
      • Project Chat Instructions:
    • Docs Indexes and UI Docs Indexes
      • Docs Indexes
      • UI Docs Indexes
    • "Reject" and "Accept"
    • Image-to-Code
    • Video Tutorial's
    • Prompting Techniques
    • Chat Vs Codebase Chat
    • Solving Errors
  • Frequently Asked Questions
  • Changelog
Powered by GitBook
On this page
  • How to Use :
  • Examples:
  1. Features
  2. Global and Project Custom Instructions

Global Instructions

  • Purpose: Define overarching coding standards and preferences applicable across all projects.

  • Functionality: Set guidelines that the AI follows universally, maintaining consistency in code quality and style.

  • Usage: Ideal for enforcing company-wide coding conventions & for personal coding habits too.

How to Use :

1

Set Your Preferences:

Decide on the coding conventions you want the AI to follow. For example, you might prefer using single quotes for strings or always adding comments to your code.

2

Configure in PureCode AI:

Enter these preferences into the Global Instructions section of the PureCode AI. This tells the AI to tailor its suggestions according to your specified guidelines


Examples:

  1. Naming Conventions:

    • Instruction: Use camelCase for variable and function names, and PascalCase for class names.

    • Benefit: Ensures consistent and readable naming throughout your codebase.

  2. Standardize Error Handling Mechanisms:

    • Instruction: Use try-catch blocks for exception handling in asynchronous functions and ensure all errors are logged with relevant context.

    • Benefit: Promotes robust error management and simplifies debugging processes.

  3. Commenting Practices:

    • Instruction: Write JSDoc comments for all public functions and classes.

    • Benefit: Improves code documentation and aids in generating API documentation.

  4. Import Order:

    • Instruction: Organize imports alphabetically, with external libraries first, followed by internal modules.

    • Benefit: Enhances readability and maintainability of import statements.

  5. Implement Comprehensive Commenting Practices:

    • Instruction: Write clear and concise comments for all complex code blocks, including function descriptions, parameter explanations, and return value details.

    • Benefit: Improves code maintainability and aids team members in understanding intricate logic.

PreviousGlobal and Project Custom InstructionsNextProject Chat Instructions:

Last updated 2 months ago