From 49ad9879c04ba6c79145b646b1349a5f135070f4 Mon Sep 17 00:00:00 2001 From: Joao Caxaria Date: Sun, 29 Oct 2023 00:32:39 +0100 Subject: [PATCH 1/2] added more information and structure to docs --- docs/Settings/_category_.json | 9 -- docs/Settings/default.md | 17 ---- docs/Settings/ignore.md | 19 ---- docs/community-and-support.md | 19 ++++ docs/configuring-autopilot.md | 89 +++++++++++++++++++ docs/getting-started/_category_.json | 5 +- .../{createissue.md => create-issue.md} | 2 +- docs/getting-started/index.md | 27 ++++++ docs/getting-started/issue-advice.md | 69 ++++++++++++++ docs/getting-started/issueAdvice.md | 31 ------- docs/getting-started/user-guide.md | 28 ++++++ docs/intro.md | 29 +++--- docs/troubleshooting.md | 21 +++++ docusaurus.config.js | 40 +-------- src/css/custom.css | 28 +++--- 15 files changed, 285 insertions(+), 148 deletions(-) delete mode 100644 docs/Settings/_category_.json delete mode 100644 docs/Settings/default.md delete mode 100644 docs/Settings/ignore.md create mode 100644 docs/community-and-support.md create mode 100644 docs/configuring-autopilot.md rename docs/getting-started/{createissue.md => create-issue.md} (96%) create mode 100644 docs/getting-started/index.md create mode 100644 docs/getting-started/issue-advice.md delete mode 100644 docs/getting-started/issueAdvice.md create mode 100644 docs/getting-started/user-guide.md create mode 100644 docs/troubleshooting.md diff --git a/docs/Settings/_category_.json b/docs/Settings/_category_.json deleted file mode 100644 index f902897..0000000 --- a/docs/Settings/_category_.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "position": 3, - "label": "Settings", - "collapsible": true, - "collapsed": false, - "link": { - "type": "generated-index" - } -} \ No newline at end of file diff --git a/docs/Settings/default.md b/docs/Settings/default.md deleted file mode 100644 index aba2847..0000000 --- a/docs/Settings/default.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Work on issues by default - -By default, autopilot works on all issues opened in your repos. You can change this behaviour by adding a setting to the configuration file - - -To do it, add an autopilot.json file in the root of your project with the following like so: - -```json title="/autopilot.json" -{ - // "ignore": ["**/folder_to_ignore/**"], - "workOnAllIssues": false -} -``` - -With this setting, autopilot will only be triggered when issues have @autopilot anywhere on their description or when you add an "autopilot" label to the issue. - diff --git a/docs/Settings/ignore.md b/docs/Settings/ignore.md deleted file mode 100644 index 2cd2936..0000000 --- a/docs/Settings/ignore.md +++ /dev/null @@ -1,19 +0,0 @@ - -# Ignore Files and Folders - -You can tell autopilot to ignore files/folders in your repository. This might be important for 2 reasons: - -- You **save costs** -- You improve the chance of selecting the correct files for a task -- You can **reduce the size of your repo** if your repo is too big - - -To do it, add an autopilot.json file in the root of your project with the following: - -```json title="/autopilot.json" -{ - "ignore": ["**/folder_to_ignore/**"] -} -``` - -This uses glob to identify folders and files. You can test it out using this tool: https://globster.xyz/ \ No newline at end of file diff --git a/docs/community-and-support.md b/docs/community-and-support.md new file mode 100644 index 0000000..45b3344 --- /dev/null +++ b/docs/community-and-support.md @@ -0,0 +1,19 @@ +--- +sidebar_position: 10 +--- +# Community and Support + +Engaging with the community and accessing support are integral aspects of making the most out of Code Autopilot. + +## Providing Feedback + +Your feedback is invaluable to us! If you encounter issues or have suggestions for improving Code Autopilot, please report them through [email](mailto:feedback@codeautopilot.com). + +## Additional Resources + +For further assistance or to learn more about Code Autopilot, consider exploring the following resources: + +- **[Official Website](https://www.codeautopilot.com)**: Discover more about Code Autopilot, its features, and how it can benefit your development process. +- **[GitHub Repository](https://github.com/codeautopilot/docs)**: Explore the Code Autopilot Docs GitHub repository to help build the knowledge base around Autopilot. +- **[Community](https://discord.gg/r72ykfvyx7)**: Join the Code Autopilot community in discord to connect with other users, share experiences, and learn from others. + diff --git a/docs/configuring-autopilot.md b/docs/configuring-autopilot.md new file mode 100644 index 0000000..9821ad5 --- /dev/null +++ b/docs/configuring-autopilot.md @@ -0,0 +1,89 @@ +--- +sidebar_position: 8 +--- +# Configuring Autopilot + +This page provides guidance on configuring Autopilot to suit your project's needs. You can control how Autopilot interacts with issues and specify files or folders to be ignored during its operations. + +## Work on Issues by Default + +By default, Autopilot is activated for all issues opened in your repositories. However, this behavior can be modified through the configuration file. + +Create an `autopilot.json` file in the root of your project and configure it as shown below: + +```json title="/autopilot.json" +{ + "workOnAllIssues": false +} +``` + +With the `workOnAllIssues` set to `false`, Autopilot will only engage with issues that: +- Mention `@autopilot` in their description, or +- Have an "autopilot" label attached to them. + +## Excluding Files and Folders + +Instructing Autopilot to ignore certain files or folders in your repository can be beneficial for: + +- **Cost Efficiency**: Reducing operational costs by excluding unnecessary files or folders. +- **Improved File Selection**: Enhancing the likelihood of Autopilot selecting the correct files for a task. +- **Repo Size Management**: Managing the size of your repository if it's too large. + +Update the `autopilot.json` file at the root of your project to include the ignore configuration: + +```json title="/autopilot.json" +{ + "ignore": ["**/folder_to_ignore/**"] +} +``` + +This configuration utilizes glob patterns to specify the files and folders to be ignored. + +Glob patterns are utilized to match file paths based on wildcard characters. Below is a brief explanation along with examples illustrating how glob works: + +- `*` matches any sequence of characters in a single directory. +- `**` matches any sequence of characters across multiple directories (recursively). +- `?` matches exactly one character. + +### Example 1 +Suppose you have a directory structure like this: +```plaintext +src/ +|-- components/ +| |-- Button.js +| |-- Icon.js +|-- styles/ +| |-- main.css +| |-- reset.css +|-- index.js +``` + +If you want to exclude all JavaScript files in the `**components**` directory, your glob pattern would be: + +```plaintext +src/components/*.js +``` + +### Example 2 +To exclude all CSS files anywhere in the `**src**` directory or its subdirectories: + +```plaintext +src/**/*.css +``` + +### Example 3 +To exclude all files in the `**styles**` directory: + +```plaintext +src/styles/*.* +``` + +### Example 4 +If you only want to exclude a specific file, you would specify the full path: + +```plaintext +src/components/Button.js +``` + +These glob patterns can be tested and visualized using the [Globster](https://globster.xyz/) tool, which can help ensure they are configured correctly to match the desired files and directories. + diff --git a/docs/getting-started/_category_.json b/docs/getting-started/_category_.json index f4f074f..ca46a4c 100644 --- a/docs/getting-started/_category_.json +++ b/docs/getting-started/_category_.json @@ -2,8 +2,5 @@ "position": 2, "label": "Getting Started", "collapsible": true, - "collapsed": false, - "link": { - "type": "generated-index" - } + "collapsed": false } \ No newline at end of file diff --git a/docs/getting-started/createissue.md b/docs/getting-started/create-issue.md similarity index 96% rename from docs/getting-started/createissue.md rename to docs/getting-started/create-issue.md index df38e16..bf836c7 100644 --- a/docs/getting-started/createissue.md +++ b/docs/getting-started/create-issue.md @@ -1,5 +1,5 @@ --- -sidebar_position: 1 +sidebar_position: 3 --- # Create a new issue diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md new file mode 100644 index 0000000..0de94cc --- /dev/null +++ b/docs/getting-started/index.md @@ -0,0 +1,27 @@ +--- +slug: /getting-started +sidebar_position: 2 +tags: + - Getting started +--- + +# Getting Started + +This section guides you through the initial setup process, enabling you to start automating your development tasks with Code Autopilot. Follow the steps below to get started. + +## Prerequisites + +Before you begin with Code Autopilot, ensure you have the following: + +- A GitHub account. If you don’t have a GitHub account, create one [here](https://github.com/join). +- Your code is hosted on a GitHub repository. + +## Installation + +Follow the steps below to set up Code Autopilot: + +1. **Install GitHub App**: Install the Code Autopilot GitHub App on your repositories [here](https://github.com/marketplace/code-autopilot-ai-coder). +2. **Create a New Issue**: In one of your repositories, [**create a new issue**](./getting-started/create-issue) and describe the task you want to automate. Remember to mention `@autopilot` to invoke Autopilot. +3. Autopilot will start indexing your repository and will reply to your issue with a suggested solution + +By completing the above steps, you've successfully set up Code Autopilot and are ready to start automating your development tasks! diff --git a/docs/getting-started/issue-advice.md b/docs/getting-started/issue-advice.md new file mode 100644 index 0000000..7008658 --- /dev/null +++ b/docs/getting-started/issue-advice.md @@ -0,0 +1,69 @@ +--- +sidebar_position: 1 +--- +# How to create good issues + + +Creating well-defined issues is essential for obtaining accurate and helpful suggestions from Code Autopilot. This section provides guidelines on crafting effective issues that communicate your tasks clearly to the AI. + +Creating issues for autopilot is similar to creating issues for humans. +Providing detailed information on your issues will result in better suggestions from the bot. + +You should spend a few minutes making sure that your task is descriptive and issue to understand for someone that is not familiar with your code. + +:::note + +At this moment, autopilot is not able to read images or follow links that you add to the description + +::: + +## Guidelines + +- **Be Descriptive**: Provide as much detail as possible to describe the task at hand. +- **Use Clear Language**: Avoid jargon and ensure your description is easy to understand, even for individuals not familiar with your code. +- **Provide Context**: If the task relates to existing code or features, provide relevant context to help Autopilot understand the bigger picture. +- **Invoke autopilot**: Make sure you mention `@autopilot` so that Autopilot knows it should work on that issue. + + +## Example 1 - OAuth task + +### Issue Title +Implement OAuth 2.0 Authentication + +### Description + +**What**: +Implement OAuth 2.0 authentication to allow users to log in using their Google accounts. + +**Why**: +This will provide a more user-friendly login experience and potentially increase sign-up rates. + +**How**: +1. Set up a project on the Google Developer Console and configure the OAuth 2.0 credentials. +2. Utilize a library such as Passport.js to integrate OAuth 2.0 authentication in our Node.js application. +3. Ensure that the authentication flow works seamlessly and securely, adhering to best practices. + +**Invoke Autopilot**: +@autopilot + + +## Example 2 - Billing task + +### Issue Title +Implement a Robust Billing System + +### Description + +**What**: +Develop and integrate a billing system to handle user subscriptions and payments. + +**Why**: +This will automate the payment processing, making it easier for users to subscribe and for us to manage subscriptions. + +**How**: +1. Evaluate and select a suitable billing platform or library such as Stripe. +2. Design the billing system to handle different subscription tiers, one-time payments, and recurring charges. +3. Ensure the system complies with security standards and regulations, such as PCI DSS. + +**Invoke Autopilot**: +@autopilot diff --git a/docs/getting-started/issueAdvice.md b/docs/getting-started/issueAdvice.md deleted file mode 100644 index c99a888..0000000 --- a/docs/getting-started/issueAdvice.md +++ /dev/null @@ -1,31 +0,0 @@ -# How to create good issues - -Creating issues for autopilot is similar to creating issues for humans. -Providing detailed information on your issues will result in better suggestions from the bot. - -You should spend a few minutes making sure that your task is descriptive and issue to understand for someone that is not familiar with your code. - -:::note - -At this moment, autopilot is not able to read images or follow links that you add to the description - -::: - -## Example - -### Issue Title -Ignore files and folders using a configuration file - -### Description - -**What** - -Read an "autopilot.json" file from the cloned repository of a task -Get the "ignore" value from autopilot.json. This is an array of files or folders to ignore in the task -Use that info to ignore files and folders when reading the user's repository for each task - -**Why** - -This allows users to define folders or files that autopilot should ignore. This can be used to reduce the cost of tasks, improve the quality of the results and allow big repositories to work. - -@autopilot \ No newline at end of file diff --git a/docs/getting-started/user-guide.md b/docs/getting-started/user-guide.md new file mode 100644 index 0000000..f019e62 --- /dev/null +++ b/docs/getting-started/user-guide.md @@ -0,0 +1,28 @@ +--- +sidebar_position: 1 +tags: + - Getting started +--- + +# User Guide + +This section provides a detailed guide on how to use Code Autopilot for various tasks. + +## Proposing a Coding Solution + +1. **Create a New Issue**: In your GitHub repository, create a new issue describing the task for which you need a coding solution. +2. **Invoke Autopilot**: Mention `@autopilot` in the issue description or on a comment to invoke Autopilot on the task. +3. **Review Suggestions**: Once Autopilot processes the task description, review the suggested coding solution provided. + +## Bug Fixing + +1. **Create a Bug Ticket**: Create a ticket describing the bug you wish to fix. +2. **Invoke Autopilot**: Mention `@autopilot` in the ticket description or on a comment to invoke Autopilot on the bug. +3. **Review Suggestions**: Review the suggested bug fix provided by Autopilot, and implement the fix as necessary. + +## Reviewing PRs + +1. **Open a Pull Request**: Open a pull request (PR) in your GitHub repository. +2. **Invoke Autopilot**: `@autopilot` will automatically comment on the PR with the intent of the author and additional improvements, if any. + +These guidelines will help you utilize Code Autopilot effectively for proposing coding solutions, fixing bugs, and reviewing PRs. diff --git a/docs/intro.md b/docs/intro.md index dd87111..6435a2a 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -1,27 +1,26 @@ --- slug: / sidebar_position: 1 -tags: - - Intro +tags: - Getting started --- # Introduction -**Code Autopilot** is tool that applies SOTA LLMs to software development processes. You can ask it to: - -- Provide step-by-step instructions on how to **implement features** -- **Fix bugs** -- **Explain** how a codebase works +## Overview of Code Autopilot +**Code Autopilot** is an advanced tool designed to assist software developers in automating tasks, bug fixing, and code reviewing. By leveraging state-of-the-art Language Models (SOTA LLMs), Code Autopilot simplifies and expedites the software development process, making it an indispensable asset for modern development teams. -## Getting Started +## Core Features -To use Autopilot, you need to have a github account and your code hosted in a github repository. - -Steps: -1. Install our [Github App](https://github.com/marketplace/code-autopilot-ai-coder) in your repositories -2. Go to one of the repositories where you installed the app and [**create a new issue**](./getting-started/createissue) -3. Autopilot will start indexing your repository and will reply to your issue with a suggested solution +- **Proposing Coding Solutions**: Given a task description, Autopilot proposes a coding solution to implement the required functionality. +- **Bug Fixing**: Upon receiving a bug ticket, Autopilot suggests a fix to resolve the identified issue. +- **Reviewing PRs**: Autopilot aids in reviewing pull requests by commenting on the PR, explaining the intent of the author, and offering suggestions for improvement. +- **Explain** how a codebase works +- Help build tasks that are compreensive and refined *(Coming soon)* +- Rewrite commits and pull request descriptions *(Coming soon)* +- Create release notes *(Coming soon)* +- Create documentation *(Coming soon)* +- Chat in the comments for additional information *(Coming soon)* -By default, autopilot will work on all issue opened, but it is possible to change that setting. \ No newline at end of file +To make the most of Code Autopilot, ensure your task descriptions are clear and detailed. Mention `@autopilot` in your issue descriptions to invoke Autopilot on a particular task. diff --git a/docs/troubleshooting.md b/docs/troubleshooting.md new file mode 100644 index 0000000..8f84b6c --- /dev/null +++ b/docs/troubleshooting.md @@ -0,0 +1,21 @@ +--- +sidebar_position: 9 +--- +# Troubleshooting + +Encountering issues is a natural part of the development process. This section aims to provide solutions to common problems you may face while using Code Autopilot. + +## Common Error Messages + +| Error Message | Cause | Resolution | +|----------------------------------|----------------------------------|---------------------------------| + + +## Frequently Asked Questions (FAQs) + +### How do I invoke Autopilot on an issue? +Invoke Autopilot by mentioning `@autopilot` in the issue description. + +### Can I use Code Autopilot for private repositories? +Yes, Code Autopilot can be used for private repositories. Ensure that you have granted the necessary permissions during the setup process. + diff --git a/docusaurus.config.js b/docusaurus.config.js index 3beaf34..111dbdd 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -39,10 +39,8 @@ const config = { ({ docs: { routeBasePath: '/', // Serve the docs at the site's root - // Please change this to your repo. - // Remove this to remove the "edit this page" links. - // editUrl: - // 'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/', + editUrl: + 'https://github.com/codeautopilot/docs/tree/main/', }, blog: false, theme: { @@ -64,32 +62,11 @@ const config = { // src: 'img/logo.svg', // }, items: [ - // { - // type: 'docSidebar', - // sidebarId: 'tutorialSidebar', - // position: 'left', - // label: 'Tutorial', - // }, - // {to: '/blog', label: 'Blog', position: 'left'}, - // { - // href: 'https://github.com/facebook/docusaurus', - // label: 'GitHub', - // position: 'right', - // }, ], }, footer: { style: 'dark', links: [ - // { - // title: 'Docs', - // items: [ - // { - // label: 'Tutorial', - // to: '/docs/intro', - // }, - // ], - // }, { title: 'Community', items: [ @@ -99,19 +76,6 @@ const config = { }, ], }, - // { - // title: 'More', - // items: [ - // { - // label: 'Blog', - // to: '/blog', - // }, - // { - // label: 'GitHub', - // href: 'https://github.com/facebook/docusaurus', - // }, - // ], - // }, ], copyright: `Copyright © ${new Date().getFullYear()} Code Autopilot`, }, diff --git a/src/css/custom.css b/src/css/custom.css index 2bc6a4c..4af08bd 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -6,25 +6,25 @@ /* You can override the default Infima variables here. */ :root { - --ifm-color-primary: #2e8555; - --ifm-color-primary-dark: #29784c; - --ifm-color-primary-darker: #277148; - --ifm-color-primary-darkest: #205d3b; - --ifm-color-primary-light: #33925d; - --ifm-color-primary-lighter: #359962; - --ifm-color-primary-lightest: #3cad6e; + --ifm-color-primary-lightest: #ab8cf9; + --ifm-color-primary-lighter: #905ef4; + --ifm-color-primary-light: #813ceb; + --ifm-color-primary: #752ed8; + --ifm-color-primary-dark: #5f23b4; + --ifm-color-primary-darker: #4f1e94; + --ifm-color-primary-darkest: #301164; --ifm-code-font-size: 95%; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.1); } /* For readability concerns, you should choose a lighter palette in dark mode. */ [data-theme='dark'] { - --ifm-color-primary: #25c2a0; - --ifm-color-primary-dark: #21af90; - --ifm-color-primary-darker: #1fa588; - --ifm-color-primary-darkest: #1a8870; - --ifm-color-primary-light: #29d5b0; - --ifm-color-primary-lighter: #32d8b4; - --ifm-color-primary-lightest: #4fddbf; + --ifm-color-primary-lightest: #eee9fe; + --ifm-color-primary-lighter: #ded6fe; + --ifm-color-primary-light: #c6b6fc; + --ifm-color-primary: #ab8cf9; + --ifm-color-primary-dark: #905ef4; + --ifm-color-primary-darker: #813ceb; + --ifm-color-primary-darkest: #752ed8; --docusaurus-highlighted-code-line-bg: rgba(0, 0, 0, 0.3); } From 2e7d2a99870af7e36436673ab3bb03045b88e8f9 Mon Sep 17 00:00:00 2001 From: Joao Caxaria Date: Sun, 29 Oct 2023 09:21:31 +0000 Subject: [PATCH 2/2] Added test to features --- docs/intro.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/intro.md b/docs/intro.md index 6435a2a..197e677 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -17,6 +17,7 @@ tags: - **Bug Fixing**: Upon receiving a bug ticket, Autopilot suggests a fix to resolve the identified issue. - **Reviewing PRs**: Autopilot aids in reviewing pull requests by commenting on the PR, explaining the intent of the author, and offering suggestions for improvement. - **Explain** how a codebase works +- Create tests *(Coming soon)* - Help build tasks that are compreensive and refined *(Coming soon)* - Rewrite commits and pull request descriptions *(Coming soon)* - Create release notes *(Coming soon)*