From 38ce9c59c83c24e57e8cd51d5109d539290358fe Mon Sep 17 00:00:00 2001 From: Ben Potter Date: Thu, 13 Mar 2025 15:41:24 +0000 Subject: [PATCH] fix: add Agent Freedom Setting documentation and templates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/ISSUE_TEMPLATE/config.yml | 3 + .github/PULL_REQUEST_TEMPLATE.md | 38 +++++++++++++ agent-freedom-settings.md | 91 +++++++++++++++++++++++++++++++ 3 files changed, 132 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 agent-freedom-settings.md diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index d38f9c823d..113245ae6e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -8,3 +8,6 @@ contact_links: - name: Coder Discord Community url: https://discord.gg/coder 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 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..69b22b2d00 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,38 @@ +## Description + + +## Related Issues + + +## Type of Change + +- [ ] Bug fix +- [ ] New feature +- [ ] Breaking change +- [ ] Documentation update +- [ ] Code cleanup/refactor +- [ ] Other (please describe): + +## Agent Freedom Setting + + + +[Agent Freedom Setting: Proactive (88/100)] + +## Testing + + + +## Screenshots (if applicable) + + +## 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 + \ No newline at end of file diff --git a/agent-freedom-settings.md b/agent-freedom-settings.md new file mode 100644 index 0000000000..b532758395 --- /dev/null +++ b/agent-freedom-settings.md @@ -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] +``` \ No newline at end of file