diff options
Diffstat (limited to 'docs/docs')
| -rw-r--r-- | docs/docs/concepts/agent.md | 9 | ||||
| -rw-r--r-- | docs/docs/concepts/core.md | 13 | ||||
| -rw-r--r-- | docs/docs/concepts/gui.md | 13 | ||||
| -rw-r--r-- | docs/docs/concepts/history.md | 5 | ||||
| -rw-r--r-- | docs/docs/concepts/ide.md | 81 | ||||
| -rw-r--r-- | docs/docs/concepts/llm.md | 7 | ||||
| -rw-r--r-- | docs/docs/concepts/policy.md | 7 | ||||
| -rw-r--r-- | docs/docs/concepts/recipe.md | 7 | ||||
| -rw-r--r-- | docs/docs/concepts/sdk.md | 48 | ||||
| -rw-r--r-- | docs/docs/concepts/state.md | 9 | ||||
| -rw-r--r-- | docs/docs/concepts/step.md | 53 | ||||
| -rw-r--r-- | docs/docs/create-a-recipe.md | 64 | ||||
| -rw-r--r-- | docs/docs/intro.md | 21 | 
13 files changed, 337 insertions, 0 deletions
| diff --git a/docs/docs/concepts/agent.md b/docs/docs/concepts/agent.md new file mode 100644 index 00000000..0528b305 --- /dev/null +++ b/docs/docs/concepts/agent.md @@ -0,0 +1,9 @@ +# Agent
 +
 +`Agent` contains the
 +- History
 +- LLM
 +- Policy
 +- IDE
 +
 +**Q: should we really call this abstraction agent?**
\ No newline at end of file diff --git a/docs/docs/concepts/core.md b/docs/docs/concepts/core.md new file mode 100644 index 00000000..ee58cbb2 --- /dev/null +++ b/docs/docs/concepts/core.md @@ -0,0 +1,13 @@ +# Core
 +
 +The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
 +
 +The `Core` includes
 +- IDE protocol
 +- GUI protocol
 +- SDK
 +- Agent
 +
 +There is a two-way sync between an IDE and the GUI that happens through Core.
 +
 +**Q: does this make sense as a concept?**
\ No newline at end of file diff --git a/docs/docs/concepts/gui.md b/docs/docs/concepts/gui.md new file mode 100644 index 00000000..dfdc2a7a --- /dev/null +++ b/docs/docs/concepts/gui.md @@ -0,0 +1,13 @@ +# GUI
 +
 +The `GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly.
 +
 +**From GUI to Core**
 +- Natural language instructions from the developer
 +- Hover / clicked on a step
 +- Other user input
 +
 +**From Core to GUI**
 +- Updates to state (e.g. a new step)
 +
 +**Q: do we call this the Continue GUI or Notebook?**
\ No newline at end of file diff --git a/docs/docs/concepts/history.md b/docs/docs/concepts/history.md new file mode 100644 index 00000000..e6c2a5ea --- /dev/null +++ b/docs/docs/concepts/history.md @@ -0,0 +1,5 @@ +# History
 +
 +`History` is the ordered record of all past steps.
 +
 +**Q: What step data and metadata is stored in the history?**
\ No newline at end of file diff --git a/docs/docs/concepts/ide.md b/docs/docs/concepts/ide.md new file mode 100644 index 00000000..980b589d --- /dev/null +++ b/docs/docs/concepts/ide.md @@ -0,0 +1,81 @@ +# IDE
 +
 +## Supported IDEs
 +
 +### VS Code
 +
 +The VS Code extension implementation can be found at `/continue/extension/src`
 +
 +## IDE Protocol methods
 +
 +### handle_json
 +
 +Handle a json message
 +
 +### showSuggestion
 +
 +Show a suggestion to the user
 +
 +### getWorkspaceDirectory
 +
 +Get the workspace directory
 +
 +### setFileOpen
 +
 +Set whether a file is open
 +
 +### openNotebook
 +
 +Open a notebook
 +
 +### showSuggestionsAndWait
 +
 +Show suggestions to the user and wait for a response
 +
 +### onAcceptRejectSuggestion
 +
 +Called when the user accepts or rejects a suggestion
 +
 +### onTraceback
 +
 +Called when a traceback is received
 +
 +### onFileSystemUpdate
 +
 +Called when a file system update is received
 +
 +### onCloseNotebook
 +
 +Called when a notebook is closed
 +
 +### onOpenNotebookRequest
 +
 +Called when a notebook is requested to be opened
 +
 +### getOpenFiles
 +
 +Get a list of open files
 +
 +### getHighlightedCode
 +
 +Get a list of highlighted code
 +
 +### readFile
 +
 +Read a file
 +
 +### readRangeInFile
 +
 +Read a range in a file
 +
 +### editFile
 +
 +Edit a file
 +
 +### applyFileSystemEdit
 +
 +Apply a file edit
 +
 +### saveFile
 +
 +Save a file
\ No newline at end of file diff --git a/docs/docs/concepts/llm.md b/docs/docs/concepts/llm.md new file mode 100644 index 00000000..11bbacc7 --- /dev/null +++ b/docs/docs/concepts/llm.md @@ -0,0 +1,7 @@ +# LLM
 +
 +`LLM` is the large language model that can be used in steps to automate that require some judgement based on context (e.g. generating code based on docs, explaining an error given a stack trace, etc)
 +
 +**Q: should we call this LLM? Perhaps just model?**
 +
 +**Q: should this abstraction be connected to agent?**
\ No newline at end of file diff --git a/docs/docs/concepts/policy.md b/docs/docs/concepts/policy.md new file mode 100644 index 00000000..6fbbc8d7 --- /dev/null +++ b/docs/docs/concepts/policy.md @@ -0,0 +1,7 @@ +# Policy
 +
 +The policy determines what step to run next
 +
 +**Q: what else do folks need to understand about policies?**
 +
 +**Q: what is the future plan for policies?**
\ No newline at end of file diff --git a/docs/docs/concepts/recipe.md b/docs/docs/concepts/recipe.md new file mode 100644 index 00000000..bc171b1d --- /dev/null +++ b/docs/docs/concepts/recipe.md @@ -0,0 +1,7 @@ +# Recipe
 +
 +An ordered sequence of steps that are intended to accomplish some complete task
 +
 +Actually just a step that is composed of only other steps / recipes.
 +
 +Altnerative names: workflow, plugin
\ No newline at end of file diff --git a/docs/docs/concepts/sdk.md b/docs/docs/concepts/sdk.md new file mode 100644 index 00000000..e5ca2f99 --- /dev/null +++ b/docs/docs/concepts/sdk.md @@ -0,0 +1,48 @@ +# SDK
 +
 +The `SDK` gives you access to tools (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps.
 +
 +## SDK methods
 +
 +### run_step
 +
 +### edit_file
 +
 +Edits a file
 +
 +#### Parameters
 +
 +- `filepath` (required): the location of the file that should be edited
 +- `prompt` (required): instructions for how the LLM should edit the file
 +
 +### run
 +
 +Runs a command
 +
 +#### Parameters
 +
 +- `command` (required): the command that should be run
 +
 +### wait_for_user_confirmation
 +
 +Waits for the user to review the steps that ran before running the next steps
 +
 +#### Paramaters
 +
 +- `question` (required): asks the user to confirm something specific
 +
 +### ide.getOpenFiles
 +
 +Gets the name of the files that are open in the IDE currently
 +
 +### sdk.ide.readFile
 +
 +Gets the contents of the file located at the `filepath` 
 +
 +#### Paramaters
 +
 +- `filepath` (required): the location of the file that should be read
 +
 +### sdk.ide.get_recent_edits
 +
 +**Q: what does this method do?**
\ No newline at end of file diff --git a/docs/docs/concepts/state.md b/docs/docs/concepts/state.md new file mode 100644 index 00000000..d48dbe88 --- /dev/null +++ b/docs/docs/concepts/state.md @@ -0,0 +1,9 @@ +# State
 +
 +*Note: this is only a proposed concept at this point*
 +
 +Steps can add, edit, and remove observations / memories stored in state.
 +
 +Allows you to pass context of previous steps, other files, etc.
 +
 +Alternative names: memory, observation store
\ No newline at end of file diff --git a/docs/docs/concepts/step.md b/docs/docs/concepts/step.md new file mode 100644 index 00000000..d381f06e --- /dev/null +++ b/docs/docs/concepts/step.md @@ -0,0 +1,53 @@ +# Step
 +
 +A step is
 +
 +## Step methods
 +
 +### `run` (required)
 +
 +the code that should run when executed by the policy
 +
 +### `description` (optional)
 +
 +the definition of what the step does in natural language
 +
 +### `reverse` (optional)
 +
 +the code that should run when the step is reversed
 +
 +### `modify` (optional)
 +
 +the code that should run when the step is rerun with feedback
 +
 +## Steps
 +
 +### Core
 +
 +#### RunCommandStep
 +
 +#### EditCodeStep
 +
 +#### ManualEditStep
 +
 +### Community
 +
 +#### CreateTableStep
 +
 +Create a table in TypeORM
 +
 +#### MigrationStep
 +
 +Create and run an alembic migration
 +
 +##### Parameters
 +
 +- `edited_file`: 
 +
 +#### WritePytestsStep
 +
 +Write unit tests for this file.
 +
 +##### Parameters
 +
 +- for_filepath (required): the path of the file that unit tests should be created for
\ No newline at end of file diff --git a/docs/docs/create-a-recipe.md b/docs/docs/create-a-recipe.md new file mode 100644 index 00000000..21d937b5 --- /dev/null +++ b/docs/docs/create-a-recipe.md @@ -0,0 +1,64 @@ +# Create a Recipe
 +
 +## 1. Create a step
 +
 +### Using the SDK
 +
 +You will want to use the SDK when you are opening directories, editing files, using models, etc.
 +
 +This will ensure that these actions are recorded as steps, so they are reviewable, reversable, and rerunnable.
 +
 +### Allow for configurability
 +
 +Steps can include optional parameters that allow users to configure them
 +
 +```python
 +from continueos import ContinueSDK
 +
 +class CreatePytestsStep(Step):
 +
 +    input_file_path: str
 +    output_file_prefix: str
 +    output_dir_path: str
 +
 +    async def run(self, sdk: ContinueSDK):
 +
 +        code = await sdk.ide.readFile(self.input_file_path)
 +        sdk.run_step(CreateDirStep(output_dir_path))
 +        sdk.run_step(WritePytestsStep(code, output_file_prefix, output_dir_path))
 +```
 +
 +### Adjust for different OS
 +
 +You might want to implement your steps, so that they can run on Linux, MacOS, and Windows.
 +
 +```python
 +from continueos import ContinueSDK
 +import platform
 +
 +class SetUpVenvStep(Step):
 +
 +    async def run(self, sdk: ContinueSDK):
 +
 +        os = platform.system()
 +
 +        if os == "Windows":
 +            await sdk.run("python -m venv env; .\\env\\Scripts\\activate")
 +        else:
 +            await sdk.run("python3 -m venv env && source env/bin/activate") # MacOS and Linux
 +```
 +
 +## 2. Compose steps together
 +
 +By convention, the name of every recipe ends with `Recipe`.
 +
 +```python
 +class CreatePipelineRecipe(Step):
 +
 +    async def run(self, sdk: ContinueSDK):
 +        await sdk.run_step(
 +            WaitForUserInputStep(prompt="What API do you want to load data from?") >>
 +            SetupPipelineStep() >>
 +            ValidatePipelineStep()
 +        )
 +```
\ No newline at end of file diff --git a/docs/docs/intro.md b/docs/docs/intro.md new file mode 100644 index 00000000..854385af --- /dev/null +++ b/docs/docs/intro.md @@ -0,0 +1,21 @@ +# Introduction + +## Scripts reimagined in the age of LLMs + +### Automate more steps of your software development workflows using LLMs + +#### An open-source framework to accelerate your use of LLMs while coding + +1. Leverage steps created by others in your workflows as you code. +2. Customize steps and compose them together to fit your workflows. +3. Review, reverse, and rerun steps to use LLMs with confidence. + +## How Continue works + +The Continue framework consists of a `SDK`, a `GUI`, and a `Core` that brings everything together. + +The `SDK` gives you access to tools (e.g. open a directory, edit a file, call an LLM, etc), which you can use when defining how a step should work and composing them with other steps. + +The `GUI` enables you to guide steps and makes everything transparent, so you can review all steps that were automated, giving you the opportunity to undo and rerun any that ran incorrectly. + +The `Core` connects the SDK and GUI with the IDE (i.e. in VS Code, a web browser, etc), enabling the steps to make changes to your code and accelerate your software development workflows.
\ No newline at end of file | 
