-
Notifications
You must be signed in to change notification settings - Fork 36
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
📝 docs: improve askAI plugin documentation #630
Open
azigler
wants to merge
10
commits into
linear-b:main
Choose a base branch
from
azigler:azigler-improve-askai-docs-1
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
2ae58c1
📝 docs: improve askAI plugin documentation and FAQ clarity
azigler 8123b12
Merge branch 'main' into azigler-improve-askai-docs-1
PavelLinearB c1440a3
📝 docs: improve clarity of AI plugin documentation and fix example sy…
azigler baae64c
📝 docs: improve clarity and consistency in askAI documentation
azigler 0331f23
📝 docs: improve titles and descriptions in AI integration documentation
azigler 05bb5f8
Merge branch 'main' into azigler-improve-askai-docs-1
azigler 8343db2
Merge branch 'main' into azigler-improve-askai-docs-1
PavelLinearB cd859d0
Merge branch 'main' into azigler-improve-askai-docs-1
PavelLinearB 3c760c9
Merge branch 'main' into azigler-improve-askai-docs-1
azigler cb80d1f
Update docs/integrations/askAI.md
azigler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 -*- | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
readFile
filter in a.cm
config to import*.txt
files from aaskAI/prompts/
folder as strings. Then we could maintain the prompts there or even use multiplereadFile
function 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
.js
file 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