rules.md
Specify rules that get included in all your prompts, allowing you to tailor JSX Tool's behavior to adhere to styling guidelines, programming patterns, or even direct the LLM to focus on specific files and directories.
What is rules.md?
The rules.md file is a file that is appended to all LLM prompts the user sends from JSX Tool, enabling you to define project-specific coding standards, styling preferences, and architectural guidelines. By including these rules with every prompt, you ensure the AI generates and modifies code that seamlessly integrates with your project's conventions, and can even be directed to focus on specific files or directories when making changes.
Creating rules.md
Using the Init Command
The easiest way to create a rules.md file is with the init command:
npx @jsx-tool/jsx-tool initThis creates a .jsxtool/ directory with both rules.md and (for non-Vite projects) config.json.
Manual Creation
You can also create the file manually:
mkdir -p .jsxtool
touch .jsxtool/rules.mdFile Location
The .jsxtool/ directory should be placed next to your package.json:
.jsxtool/
├── config.json # Dev server configuration (non-Vite only)
└── rules.md # Custom prompting rulesMonorepos: Place the .jsxtool/ directory in your app package directory (where your dev server runs), not at the monorepo root.
How It Works
- JSX Tool automatically reads your
rules.mdfile when you use the extension. - The rules are included in the context sent to the LLM.
- Generated and modified code follows your documented conventions.
- You can update the rules at any time and they apply to future interactions.