-
Couldn't load subscription status.
- Fork 43
📝 docs: improve askAI plugin documentation #630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 9 commits
2ae58c1
8123b12
c1440a3
baae64c
0331f23
05bb5f8
8343db2
cd859d0
3c760c9
cb80d1f
70d17b0
30d4b04
d46280f
bb66f63
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,11 +14,12 @@ Choose which repositories are permitted to use GitHub Actions. | |
|
|
||
| [x] Allow all actions and reusable workflows | ||
|
|
||
| ## Does gitStream services have access to my code? | ||
| ## Does gitStream have access to my code? | ||
|
|
||
| Like any other CI/CD automation, the source code is being scanned in the repo and is not shared with any external services. Only metadata related to and affecting the workflow is shared to allow rule-based automation on the repo. | ||
| Like any other CI/CD automation, the source code is being scanned in the repo and is not shared with any external services. By default, only metadata related to and affecting the workflow is shared to allow rule-based automation on the repo. Your own gitStream plugins that may connect to other services, such as using the [`askAI`](/filter-function-plugins/#askai) plugin which will provide context to the configured model provider. | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we should also add that the user fully controls the data that is shared with LinearB or any other service as they have the control over the arguments for each filter |
||
|
|
||
| ## Why does gitStream require permission to write code? | ||
|
|
||
| To support automations that either Approve or Merge PRs, the git providers require code write scope. | ||
|
|
||
| ## What repos are supported? | ||
|
|
@@ -34,7 +35,7 @@ Yes. When a merge queue is used, and gitStream is set as a required check, gitSt | |
|
|
||
| The `.cm` file uses YAML with JINJA2. For your favorite editor to automatically choose the right syntax, you can use modelines. | ||
|
|
||
| Add the following line to the top of the `.cm` file (the default has it already): | ||
| Add the following line to the top of the `.cm` file (the default has it already): | ||
|
|
||
| ``` | ||
| # -*- mode: yaml -*- | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,43 +1,39 @@ | ||
| --- | ||
| title: Integrate gitStream with AI | ||
| description: Use gitStream to integrate with AI services for Review, describe and add tests. | ||
| description: Use gitStream to integrate with AI for different use cases. | ||
| category: [quality, genai, copilot, tests, efficiency] | ||
| --- | ||
| # Integrate gitStream with AI | ||
|
|
||
| <!-- --8<-- [start:examples]--> | ||
| !!! warning "Required gitStream Plugins" | ||
| This example requires you to install the [`askAI`](/filter-function-plugins/#askai) plugin. | ||
| These examples requires you to install the [`askAI`](/filter-function-plugins/#askai) plugin, which will provide context to the configured model provider and may incur API costs. | ||
|
|
||
| [Learn more about gitStream plugins](/plugins/). | ||
|
|
||
| ## Ask AI to Summarize the Changes in a PR | ||
| ## Ask AI to Summarize a PR | ||
|
|
||
| --8<-- "docs/automations/integrations/askAI/summarize-pr/README.md:example" | ||
|
|
||
| ## Ask AI to Suggest Tests | ||
|
|
||
| --8<-- "docs/automations/integrations/askAI/add-tests/README.md:example" | ||
|
|
||
| ## Ask AI for a Code Review | ||
| ## Ask AI for a PR Review Checklist | ||
|
|
||
| --8<-- "docs/automations/integrations/askAI/code-review/README.md:example" | ||
|
|
||
| ## Ask AI for Documentation | ||
| ## Ask AI for PR Improvements | ||
|
|
||
| --8<-- "docs/automations/integrations/askAI/document/README.md:example" | ||
| --8<-- "docs/automations/integrations/askAI/improve/README.md:example" | ||
|
|
||
| ## Ask AI for Code Improvements | ||
| ## Ask AI to Generate Documentation | ||
|
|
||
| --8<-- "docs/automations/integrations/askAI/improve/README.md:example" | ||
| --8<-- "docs/automations/integrations/askAI/document/README.md:example" | ||
|
|
||
| <!-- ## Ask AI for anything | ||
| ## Ask AI to Generate Tests | ||
azigler marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| --8<-- "docs/automations/integrations/askAI/code-review/README.md:example" --> | ||
| --8<-- "docs/automations/integrations/askAI/add-tests/README.md:example" | ||
| <!-- --8<-- [end:examples]--> | ||
|
|
||
| ## Additional Resources | ||
|
|
||
| --8<-- "docs/snippets/general.md" | ||
|
|
||
| --8<-- "docs/snippets/automation-footer.md" | ||
| --8<-- "docs/snippets/automation-footer.md" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm concerned about putting the prompt info into the CM file, rather than incorporating it into the plugin code because this has a risk of becoming messy if we build out additional use cases this way.
Is it possible to incorporate the prompt into the plugin? I'm imagining it as a JSON file that's pulled into the code for easy updates.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BenLloydPearson One way we could do this is using the gitStream
readFilefilter in a.cmconfig to import*.txtfiles from aaskAI/prompts/folder as strings. Then we could maintain the prompts there or even use multiplereadFilefunction calls to "build" a prompt for each use case. Something like this:Using variables in this approach makes it so each AI automation uses the same base configuration, and you simply adjust behavior by swapping in and out prompts. I think a small folder of combinable prompts is the good way to approach this for longevity while keeping it flat and intuitive, but open to more brainstorming here.
Alternatively, we could change the plugin's
.jsfile to load prompts this way, but feels less composable for dev adoption in the long run. @PavelLinearB probably has an opinion on a good approach.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love this solution.
I think your naming convention for the txt files should work, but just be wary that we'll want to make sure we follow something that's consistent, descriptive, and sorts properly alphabetically (i.e. the prompt and role should appear next to each other when viewed inside the directory.) I believe your convention should check all these boxes, and we can adjust in the future if we find too many edge cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the ReadFile filter looks great imo! It will require a bit more work from users tho, but once we'll open PRs to install automations this will be super easy and neat