> For the complete documentation index, see [llms.txt](https://purecodedocs.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://purecodedocs.gitbook.io/docs/features/global-and-project-custom-instructions/global-instructions.md).

# 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 :

{% stepper %}
{% step %}

### **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.
{% endstep %}

{% step %}

### 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
{% endstep %}
{% endstepper %}

***

## Examples:&#x20;

1. Naming Conventions:

   * *Instruction:* Use camelCase for variable and function names, and PascalCase for class names.
   * Benefi&#x74;*:* Ensures consistent and readable naming throughout your codebase.

2. Standardize Error Handling Mechanisms:

   * Instructio&#x6E;*:* Use try-catch blocks for exception handling in asynchronous functions and ensure all errors are logged with relevant context.
   * Benefi&#x74;*:* Promotes robust error management and simplifies debugging processes.

3. Commenting Practices:

   * Instructio&#x6E;*:* Write JSDoc comments for all public functions and classes.
   * Benefi&#x74;*:* Improves code documentation and aids in generating API documentation.

4. Import Order:

   * Instructio&#x6E;*:* Organize imports alphabetically, with external libraries first, followed by internal modules.
   * Benefi&#x74;*:* Enhances readability and maintainability of import statements.

5. Implement Comprehensive Commenting Practices:

   * Instructio&#x6E;*:* Write clear and concise comments for all complex code blocks, including function descriptions, parameter explanations, and return value details.
   * Benefi&#x74;*:* Improves code maintainability and aids team members in understanding intricate logic.
