Merge branch 'main' into main

This commit is contained in:
Den Delimarsky
2025-10-21 15:29:08 -07:00
committed by GitHub
38 changed files with 594 additions and 191 deletions

View File

@@ -69,12 +69,14 @@ AGENT_CONFIG = {
```
**Key Design Principle**: The dictionary key should match the actual executable name that users install. For example:
- ✅ Use `"cursor-agent"` because the CLI tool is literally called `cursor-agent`
- ❌ Don't use `"cursor"` as a shortcut if the tool is `cursor-agent`
This eliminates the need for special-case mappings throughout the codebase.
**Field Explanations**:
- `name`: Human-readable display name shown to users
- `folder`: Directory where agent-specific files are stored (relative to project root)
- `install_url`: Installation documentation URL (set to `None` for IDE-based agents)
@@ -103,12 +105,14 @@ Update the **Supported AI Agents** section in `README.md` to include the new age
Modify `.github/workflows/scripts/create-release-packages.sh`:
##### Add to ALL_AGENTS array:
##### Add to ALL_AGENTS array
```bash
ALL_AGENTS=(claude gemini copilot cursor-agent qwen opencode windsurf q)
```
##### Add case statement for directory structure:
##### Add case statement for directory structure
```bash
case $agent in
# ... existing cases ...
@@ -132,14 +136,16 @@ gh release create "$VERSION" \
#### 5. Update Agent Context Scripts
##### Bash script (`scripts/bash/update-agent-context.sh`):
##### Bash script (`scripts/bash/update-agent-context.sh`)
Add file variable:
```bash
WINDSURF_FILE="$REPO_ROOT/.windsurf/rules/specify-rules.md"
```
Add to case statement:
```bash
case "$AGENT_TYPE" in
# ... existing cases ...
@@ -152,14 +158,16 @@ case "$AGENT_TYPE" in
esac
```
##### PowerShell script (`scripts/powershell/update-agent-context.ps1`):
##### PowerShell script (`scripts/powershell/update-agent-context.ps1`)
Add file variable:
```powershell
$windsurfFile = Join-Path $repoRoot '.windsurf/rules/specify-rules.md'
```
Add to switch statement:
```powershell
switch ($AgentType) {
# ... existing cases ...
@@ -201,6 +209,7 @@ elif selected_ai == "windsurf":
**CRITICAL**: When adding a new agent to AGENT_CONFIG, always use the **actual executable name** as the dictionary key, not a shortened or convenient version.
**Why this matters:**
- The `check_tool()` function uses `shutil.which(tool)` to find executables in the system PATH
- If the key doesn't match the actual CLI tool name, you'll need special-case mappings throughout the codebase
- This creates unnecessary complexity and maintenance burden
@@ -208,6 +217,7 @@ elif selected_ai == "windsurf":
**Example - The Cursor Lesson:**
**Wrong approach** (requires special-case mapping):
```python
AGENT_CONFIG = {
"cursor": { # Shorthand that doesn't match the actual tool
@@ -223,6 +233,7 @@ if agent_key == "cursor":
```
**Correct approach** (no mapping needed):
```python
AGENT_CONFIG = {
"cursor-agent": { # Matches the actual executable name
@@ -235,32 +246,83 @@ AGENT_CONFIG = {
```
**Benefits of this approach:**
- Eliminates special-case logic scattered throughout the codebase
- Makes the code more maintainable and easier to understand
- Reduces the chance of bugs when adding new agents
- Tool checking "just works" without additional mappings
#### 7. Update Devcontainer files (Optional)
For agents that have VS Code extensions or require CLI installation, update the devcontainer configuration files:
##### VS Code Extension-based Agents
For agents available as VS Code extensions, add them to `.devcontainer/devcontainer.json`:
```json
{
"customizations": {
"vscode": {
"extensions": [
// ... existing extensions ...
// [New Agent Name]
"[New Agent Extension ID]"
]
}
}
}
```
##### CLI-based Agents
For agents that require CLI tools, add installation commands to `.devcontainer/post-create.sh`:
```bash
#!/bin/bash
# Existing installations...
echo -e "\n🤖 Installing [New Agent Name] CLI..."
# run_command "npm install -g [agent-cli-package]@latest" # Example for node-based CLI
# or other installation instructions (must be non-interactive and compatible with Linux Debian "Trixie" or later)...
echo "✅ Done"
```
**Quick Tips:**
- **Extension-based agents**: Add to the `extensions` array in `devcontainer.json`
- **CLI-based agents**: Add installation scripts to `post-create.sh`
- **Hybrid agents**: May require both extension and CLI installation
- **Test thoroughly**: Ensure installations work in the devcontainer environment
## Agent Categories
### CLI-Based Agents
Require a command-line tool to be installed:
- **Claude Code**: `claude` CLI
- **Gemini CLI**: `gemini` CLI
- **Cursor**: `cursor-agent` CLI
- **Qwen Code**: `qwen` CLI
- **opencode**: `opencode` CLI
- **Amazon Q Developer CLI**: `q` CLI
- **CodeBuddy CLI**: `codebuddy` CLI
- **Amp**: `amp` CLI
### IDE-Based Agents
Work within integrated development environments:
- **GitHub Copilot**: Built into VS Code/compatible editors
- **Windsurf**: Built into Windsurf IDE
## Command File Formats
### Markdown Format
Used by: Claude, Cursor, opencode, Windsurf, Amazon Q Developer, Amp
```markdown
@@ -272,6 +334,7 @@ Command content with {SCRIPT} and $ARGUMENTS placeholders.
```
### TOML Format
Used by: Gemini, Qwen
```toml
@@ -293,6 +356,7 @@ Command content with {SCRIPT} and {{args}} placeholders.
## Argument Patterns
Different agents use different argument placeholders:
- **Markdown/prompt-based**: `$ARGUMENTS`
- **TOML-based**: `{{args}}`
- **Script placeholders**: `{SCRIPT}` (replaced with actual script path)
@@ -328,4 +392,3 @@ When adding new agents:
---
*This documentation should be updated whenever new agents are added to maintain accuracy and completeness.*