fix: add Agent Freedom Setting documentation and templates

This commit addresses the agent freedom setting mismatch issue (#16851) by:
1. Adding an Agent Freedom Setting link to the GitHub issue template configuration
2. Creating a comprehensive documentation file (agent-freedom-settings.md)
3. Adding a PR template with correct Agent Freedom Setting format

The documentation explains the various freedom levels, preset values, and how
to correctly specify agent freedom settings to avoid mismatches between preset
names and numeric values.

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ben Potter
2025-03-13 15:41:24 +00:00
parent 30179aeaac
commit 38ce9c59c8
3 changed files with 132 additions and 0 deletions

View File

@ -8,3 +8,6 @@ contact_links:
- name: Coder Discord Community - name: Coder Discord Community
url: https://discord.gg/coder url: https://discord.gg/coder
about: Get in touch with the Coder developers and community for support. about: Get in touch with the Coder developers and community for support.
- name: Agent Freedom Setting
url: https://github.com/coder/coder/wiki/Agent-Freedom-Settings
about: Learn more about Agent Freedom settings for Claude and other AI assistants

38
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,38 @@
## Description
<!-- Please provide a clear and concise description of the changes in this PR -->
## Related Issues
<!-- Please link to any related issues using the format: "Fixes #issue_number" -->
## Type of Change
<!-- Please check the option that best describes your change -->
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
- [ ] Code cleanup/refactor
- [ ] Other (please describe):
## Agent Freedom Setting
<!-- Select the appropriate freedom setting for AI assistants working on this PR -->
<!-- Please ensure the name matches the numeric value according to our guidelines -->
<!-- Options: Restrictive (20/100), Limited (40/100), Balanced (60/100), Enhanced (80/100), Proactive (88/100), Unrestricted (100/100) -->
[Agent Freedom Setting: Proactive (88/100)]
## Testing
<!-- Describe the tests you ran to verify your changes -->
<!-- Include relevant details for test configurations and instructions -->
## Screenshots (if applicable)
<!-- Add screenshots to help explain your changes -->
## Checklist
- [ ] I have read the [Contributing Guidelines](https://github.com/coder/coder/blob/main/CONTRIBUTING.md)
- [ ] My code follows the code style of this project
- [ ] I have updated the documentation accordingly
- [ ] I have added tests to cover my changes
- [ ] All new and existing tests passed
- [ ] I have run `make build` and `make test` locally
## Additional Notes
<!-- Add any other information about the PR here -->

91
agent-freedom-settings.md Normal file
View File

@ -0,0 +1,91 @@
# Agent Freedom Settings
## Overview
Agent Freedom Settings control the level of freedom (autonomy) given to AI assistants when interacting with coder repositories. This document explains the various settings and how to configure them.
## Freedom Levels
Freedom levels are expressed on a scale of 0-100, with higher numbers indicating more autonomy:
| Level | Description | Best for |
|-------|-------------|----------|
| 0-20 | Restrictive | Security-critical code, infrastructure-as-code |
| 21-40 | Limited | Core business logic, authentication, payments |
| 41-60 | Balanced | Standard feature development, bug fixes |
| 61-80 | Enhanced | UI components, utility functions, tests |
| 81-100 | Proactive | Documentation, comments, non-critical code |
## Preset Values
We offer preset values to make it easier to select an appropriate freedom level:
| Preset | Value | Description |
|--------|-------|-------------|
| Restrictive | 20/100 | Minimal autonomy, requires explicit approval for nearly all actions |
| Limited | 40/100 | Limited autonomy for simple tasks with careful oversight |
| Balanced | 60/100 | Balanced approach suitable for most development tasks |
| Enhanced | 80/100 | Increased autonomy for faster development with less oversight |
| Proactive | 88/100 | High autonomy for quick iterations while maintaining some guardrails |
| Unrestricted | 100/100 | Maximum autonomy, minimal oversight |
## Setting Agent Freedom
You can set the agent freedom level in your PR or issue template by adding a tag in this format:
```
[Agent Freedom Setting: Proactive (88/100)]
```
## Common Mismatches
A "mismatch" occurs when the selected preset doesn't match the numeric value provided:
| Incorrect | Correct |
|-----------|---------|
| [Agent Freedom Setting: Proactive (80/100)] | [Agent Freedom Setting: Enhanced (80/100)] |
| [Agent Freedom Setting: Proactive (88/100)] | [Agent Freedom Setting: Proactive (88/100)] ✓ |
| [Agent Freedom Setting: Proactive (100/100)] | [Agent Freedom Setting: Unrestricted (100/100)] |
## Recommendations
- For general development work, use **Balanced (60/100)** or **Enhanced (80/100)**
- For documentation and non-critical code, use **Proactive (88/100)**
- For security-sensitive code, use **Restrictive (20/100)** or **Limited (40/100)**
## Examples
### Pull Request Template Example
```markdown
## Description
[Describe your changes here]
## Related Issues
[Link to any related issues]
## Agent Freedom Setting
[Agent Freedom Setting: Proactive (88/100)]
## Testing
[Describe how you tested your changes]
```
### Issue Template Example
```markdown
## Description
[Describe the issue here]
## Expected Behavior
[What should happen]
## Current Behavior
[What is happening now]
## Agent Freedom Setting
[Agent Freedom Setting: Enhanced (80/100)]
## Additional Information
[Any other relevant information]
```