Update README.md
This commit is contained in:
parent
0085754697
commit
f48331aea9
40
README.md
40
README.md
@ -5,7 +5,9 @@
|
||||
|
||||
# DevChat Visual Studio Code Extension
|
||||
|
||||
**The pragmatic AI coding assistant that keeps humans in the loop. No overblown intelligence. Built for extensibility.**
|
||||
**The pragmatic AI coding assistant that keeps humans in the loop.**
|
||||
|
||||
**No overblown AI. No complex prompt engineering. Built for extensibility.**
|
||||
|
||||
</div>
|
||||
<br>
|
||||
@ -28,10 +30,10 @@ DevChat is an open-source platform that empowers developers to leverage AI for c
|
||||
|
||||
## Why DevChat?
|
||||
|
||||
While there are many AI coding tools available, we developed DevChat for our own use, drawing on our practical insights from generating tens of thousands of lines of code. DevChat makes the following distinctive design choices:
|
||||
While there are many AI coding tools available, we developed DevChat based on our practical insights from generating tens of thousands of lines of code. DevChat makes the following distinctive design choices:
|
||||
|
||||
- **Precise control over the context embedded in a prompt**. Precise control over context is the key to effective AI use. We believe that most other tools tend to over-guess what a user needs to put into the context of a prompt. This typically introduces more noise than LLMs can effectively manage.
|
||||
- **A simple, extensible prompt directory**. This enables developers or teams to easily integrate their own predefined prompt templates into DevChat, avoiding significant engineering effort or a steep learning curve. You don't need a complex framework to make AI work for you. All it takes is a standard editor operating on your filesystem.
|
||||
- **Precise manual control over the context embedded in a prompt**. Precise control over context is the key to effective AI use. We find that most other "intelligent" or "automatic" tools tend to over-guess what a user needs to put into the context of a prompt. That typically introduces more noise than LLMs can effectively manage.
|
||||
- **A simple, extensible prompt directory**. This enables developers or teams to easily integrate their own prompt templates into DevChat, avoiding significant engineering effort or a steep learning curve. You don't need a complex framework to make AI work for you. All it takes is a standard editor operating on your filesystem.
|
||||
|
||||
## Feature Overview
|
||||
|
||||
@ -53,44 +55,30 @@ Great output requires great input, to maximize the power of AI, DevChat assists
|
||||
|
||||
DevChat utilizes a directory to manage predefined prompt templates. You can easily add your own or modify existing ones using a text editor. Let's delve into the directory structure and its functionality.
|
||||
|
||||
- **Location**: By default, the directory is named `workflows` and located in the `.chat` folder at your home directory. You can run `ls ~/.chat/workflows` in a terminal to see what's inside.
|
||||
By default, the directory is named `workflows` and located in the `.chat` folder at your home directory. You can run `ls ~/.chat/workflows` in a terminal to see what's inside.
|
||||
|
||||
- **Paths**: The `workflows` directory contains three subdirectories, `sys`, `org`, and `usr`. The `sys` (system) directory is a clone of https://github.com/devchat-ai/workflows, which contains the default templates. You can overwrite those system prompts. For instance, if you create `commit_message` in the `usr` directory and define your own `prompt.txt`, DevChat will use your version instead of the default one in `sys`.
|
||||
The `workflows` directory typically contains three subdirectories, `sys`, `org`, and `usr`. The `sys` (system) directory is a clone of https://github.com/devchat-ai/workflows, which contains the default prompt templates. You can overwrite those system prompts. For instance, if you create `commit_message` in the `usr` directory and define your own `prompt.txt`, DevChat will use your version instead of the default one in `sys` or `org`.
|
||||
|
||||
```
|
||||
workflows
|
||||
├── sys
|
||||
│ └── commit_message
|
||||
│ └── prompt.txt
|
||||
├── org
|
||||
│ └── commit_message
|
||||
│ └── prompt.txt
|
||||
└── usr
|
||||
└── commit_message
|
||||
└── prompt.txt
|
||||
```
|
||||
|
||||
In addition to `sys` and `usr`, the `org` directory is reserved for team-wise conventions. Your team can maintain a Git repository to store prompts in `org`, and every team member can locally sync `org` with the repository. Those prompts will overwrite those in `sys`, while you can still further customize them for yourself by providing any in `usr`.
|
||||
The `org` directory is useful for maintain team-wise conventions or requirements. Your team can share a Git repository to store prompts in `org`, and every team member can locally sync `~/.chat/workflows/org` with the repository. Those prompts will overwrite those in `sys`, while an individual developer can still further customize them in `usr`.
|
||||
|
||||
- **Names**: You can utilize a prompt template by typing a "command" with the corresponding name in the DevChat input. Type `/` followed by the command name.
|
||||
You can embed a template in your prompt by typing a "command" with the corresponding name in the DevChat input. Type `/` followed by the command name.
|
||||
|
||||
<img width="386" alt="image" src="https://github.com/devchat-ai/devchat-vscode/assets/592493/145d94eb-a3e8-42ca-bb88-a462b6070b2f">
|
||||
|
||||
The `/`-separated path to the prompt directory in `usr` corresponds to a `.`-separated command name to incorporate the `prompt.txt` file in the directory. For example, `path/to/dir` is represented as `/path.to.dir` for the DevChat input. Note that `sys`, `org`, or `usr` do not need to be included in a command name. DevChat will first look up the corresponding path under `usr`, then `org`, and finally `sys`.
|
||||
|
||||
- **Inheritance**: By default, a command will incorporate the `prompt.txt` file in the corresponding directory and all the `prompt.txt` files in the parent and ancestor directories. For example, if you want to write a general `code` template with specific requirements for different programming languages, the prompts can be organized as follows:
|
||||
|
||||
```
|
||||
workflows
|
||||
└── usr
|
||||
└── code
|
||||
├── prompt.txt
|
||||
├── go
|
||||
│ └── prompt.txt
|
||||
├── js
|
||||
│ └── prompt.txt
|
||||
└── py
|
||||
└── prompt.txt
|
||||
```
|
||||
|
||||
When you type `/code.py` in DevChat, it will include both `prompt.txt` in `usr/code/` and `prompt.txt` in `usr/code/py/`. This structure aligns with our `sys` directory. You can refer to the contents of [sys/code/prompt.txt](https://github.com/devchat-ai/workflows/blob/main/code/prompt.txt) and [sys/code/py/prompt.txt](https://github.com/devchat-ai/workflows/blob/main/code/py/prompt.txt) for more details.
|
||||
The `/`-separated path to the prompt directory corresponds to a `.`-separated command name. For instance, if you want to embed the 'prompt.txt' file located in `path/to/dir` into your current prompt, you should type `/path.to.dir` into the DevChat input field, along with the other content of the prompt. Note that `sys`, `org`, or `usr` do not need to be included in a command name. DevChat will first look up the corresponding path under `usr`, then `org`, and finally `sys`.
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user