Skip to content

Customize NEX with NEX.md

A NEX.md file is the primary way to customize NEX's behavior. By adding persistent instructions to this configuration file, you can teach NEX about your projects, coding conventions, preferred workflows, and personal engineering preferences.

NEX.md can be stored in two different locations. The location determines the scope of the instructions:

  • Workspace or local NEX.md (./NEX.md) applies only to the current project.
  • User or global NEX.md (~/.nex/NEX.md) applies to every project you work on.

NEX automatically loads both files at the start of every session, allowing it to consistently follow your instructions without requiring you to repeat them in every prompt.

Tip

You can edit these files manually in your preferred editor or simply ask NEX to update them for you.

Local NEX.md File

The local NEX.md file lives in your project's root directory and captures knowledge that is specific to that repository. Typical examples include project terminology, coding standards, directory layouts, verification workflows, and design assumptions.

To update it through NEX, simply include the word local in your request, for example:

Prompt
Update the local NEX.md to document our verification workflow.

Global NEX.md File

The global NEX.md file stores personal preferences that should follow you across every project. It is ideal for recording coding style preferences, commit message conventions, documentation style, or any other long-term instructions.

To update it through NEX, include the word global in your request, for example:

Prompt
Update the global NEX.md to always generate concise commit messages.

In practice, most users keep personal preferences in the global NEX.md and project knowledge in the local NEX.md. This separation makes it easy to reuse your personal workflow while allowing each repository to define its own conventions.

Example Use Cases

The following examples are particularly well suited for inclusion in a NEX.md file.

Project Glossary

Prevents NEX from misinterpreting project-specific terms.

NEX.md
...
- "PMU" = our custom Power Management Unit (`rtl/pmu/`), not a performance-monitoring unit.
- "Clean timing" = WNS ≥ 0 and zero hold violations on any path, no waivers.
...

Resource Locations

Points NEX to existing assets so it reuses them instead of guessing or recreating them from scratch.

NEX.md
...
- Reusable IP (FIFOs, CDC synchronizers, arbiters): `/shared/common_lib`
- Vendor datasheets: `/docs/datasheets`
- Golden / signed-off designs (read-only): `/releases`
- Regression results: `/reports/regression/latest`
...

Engineering Conventions

Keeps NEX's output consistent with your team's workflow and tooling requirements.

NEX.md
...
- Apply Test-Driven Development (TDD): write the testbench and expected assertions first, then the minimum RTL to satisfy them, then refactor.
- When generating scripts for EDA tools, always use Tcl, not bash as our tools are Tcl-native consoles.
...