From eb87236ffb14886142ad04e01e0e622e32f02e40 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 15 Nov 2024 21:31:12 -0800 Subject: [PATCH] update prompt file docs --- docs/docs/chat/how-to-customize.md | 1 + .../docs/customize/deep-dives/prompt-files.md | 8 +++--- docs/docs/customize/deep-dives/rules.md | 27 +++++++++++++++++++ 3 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 docs/docs/customize/deep-dives/rules.md diff --git a/docs/docs/chat/how-to-customize.md b/docs/docs/chat/how-to-customize.md index 943d5e7ac..9df6ec020 100644 --- a/docs/docs/chat/how-to-customize.md +++ b/docs/docs/chat/how-to-customize.md @@ -7,6 +7,7 @@ sidebar_position: 5 There are a number of different ways to customize Chat +- You can add a [`.continuerules`](../customize/deep-dives/rules.md) file to the root of your project to customize the system prompt - You can configure [`@Codebase`](../customize/deep-dives/codebase.md) - You can create your own [custom code RAG](../customize/tutorials/custom-code-rag.md) - You can configure [`@Docs`](../customize/deep-dives/docs.md) diff --git a/docs/docs/customize/deep-dives/prompt-files.md b/docs/docs/customize/deep-dives/prompt-files.md index 91f3557ea..e69902a42 100644 --- a/docs/docs/customize/deep-dives/prompt-files.md +++ b/docs/docs/customize/deep-dives/prompt-files.md @@ -10,11 +10,11 @@ Prompt files provide a convenient way to standardize common patterns and share a To assist you in getting started, [we've curated a small library of `.prompt` files](https://github.com/continuedev/prompt-file-examples). We encourage community contributions to this repository, so please consider opening up a pull request with your own prompts! ::: --> -Below is a quick example of setting up a prompt file to write unit tests using Jest. +Below is a quick example of setting up a prompt file to de -1. Create a folder called `.prompts/` at the top level of your workspace. -2. Add a file called `test.prompt` to this folder. The name of this file will be the name of the slash command you will use to generate your prompt. -3. Write the following contents to `test.prompt` and save. +1. Create a folder called `.continue/prompts` at the top level of your workspace (or you can use the button in the UI by typing @, selecting "Prompt Files", and selecting "New Prompt File"). +2. Add a file called `rails.prompt` to this folder. +3. Write the following contents to `rails.prompt` and save. ``` name: Rails Project diff --git a/docs/docs/customize/deep-dives/rules.md b/docs/docs/customize/deep-dives/rules.md new file mode 100644 index 000000000..30100aaeb --- /dev/null +++ b/docs/docs/customize/deep-dives/rules.md @@ -0,0 +1,27 @@ +--- +description: Learn how to customize the system prompt with a `.continuerules` file +keywords: [rules, .continuerules, system, prompt, message] +--- + +# `.continuerules` + +You can create a project-specific system message by adding a `.continuerules` file to the root of your project. This file is raw text and its contents will be inserted into the system message for all LLM requests. + +## Simple Examples + +- If you want concise answers: + +```title=.continuerules +Please provide concise answers. Do explain obvious concepts. You can assume that I am knowledgable about most programming topics. +``` + +- If you want to ensure certain practices are followed, for example in React: + +```title=.continuerules +Whenever you are writing React code, make sure to +- use functional components instead of class components +- use hooks for state management +- define an interface for your component props +- use Tailwind CSS for styling +- modularize components into smaller, reusable pieces +```