mirror of
https://github.com/aljazceru/goose.git
synced 2025-12-18 14:44:21 +01:00
update docs around parameters (#2614)
Co-authored-by: Rizel Scarlett <rizel@squareup.com> Co-authored-by: Rizel Scarlett <rizel@tbd.email>
This commit is contained in:
@@ -88,7 +88,7 @@ You'll need to provide both instructions and activities for your Recipe.
|
|||||||
|
|
||||||
You may add parameters to a recipe, which will require uses to fill in data when running the recipe. Parameters can be added to any part of the recipe (instructions, prompt, activities, etc).
|
You may add parameters to a recipe, which will require uses to fill in data when running the recipe. Parameters can be added to any part of the recipe (instructions, prompt, activities, etc).
|
||||||
|
|
||||||
To add parameters, edit your recipe file to include template variables using `{{ variable_name }}` syntax.
|
To add parameters, edit your recipe file to include template variables using `{{ variable_name }}` syntax and define each of them in your yaml using `parameters`.
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary>Example recipe with parameters</summary>
|
<summary>Example recipe with parameters</summary>
|
||||||
@@ -97,16 +97,37 @@ You'll need to provide both instructions and activities for your Recipe.
|
|||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
title: {{ project_name }} Code Review
|
title: {{ project_name }} Code Review
|
||||||
description: Automated code review for {{ project_name }} with {{ language }} focus
|
description: Automated code review for {{ project_name }} with {{ language }} focus
|
||||||
|
parameters:
|
||||||
|
- key: project_name
|
||||||
|
input_type: string
|
||||||
|
description: Name of the project
|
||||||
|
requirement: required
|
||||||
|
- key: language
|
||||||
|
input_type: string
|
||||||
|
description: Language of the code change
|
||||||
|
requirement: required
|
||||||
|
- key: complexity_threshold
|
||||||
|
input_type: number
|
||||||
|
description: The complexity threshold
|
||||||
|
requirement: optional
|
||||||
|
- key: test_coverage
|
||||||
|
input_type: number
|
||||||
|
description: Percentage Test coverage
|
||||||
|
requirement: optional
|
||||||
|
- key: style_guide
|
||||||
|
input_type: string
|
||||||
|
description: Style guide to use
|
||||||
|
requirement: user_prompt
|
||||||
instructions: |
|
instructions: |
|
||||||
You are a code reviewer specialized in {{ language }} development.
|
You are a code reviewer specialized in {{ language }} development.
|
||||||
Apply the following standards:
|
Apply the following standards:
|
||||||
- Complexity threshold: {{ complexity_threshold }}
|
- Complexity threshold: {{ complexity_threshold }}
|
||||||
- Required test coverage: {{ test_coverage }}%
|
- Required test coverage: {{ test_coverage }}%
|
||||||
- Style guide: {{ style_guide }}
|
- Style guide: {{ style_guide }}
|
||||||
activities:
|
activities:
|
||||||
- "Review {{ language }} code for complexity"
|
- "Review {{ language }} code for complexity"
|
||||||
- "Check test coverage against {{ test_coverage }}% requirement"
|
- "Check test coverage against {{ test_coverage }}% requirement"
|
||||||
- "Verify {{ style_guide }} compliance"
|
- "Verify {{ style_guide }} compliance"
|
||||||
```
|
```
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
Reference in New Issue
Block a user