Lint fixes

This commit is contained in:
den (work)
2025-10-21 15:12:33 -07:00
parent 115b4335d9
commit 9786e588b7
25 changed files with 176 additions and 143 deletions

View File

@@ -68,12 +68,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)
@@ -102,12 +104,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 ...
@@ -131,14 +135,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 ...
@@ -151,14 +157,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 ...
@@ -200,6 +208,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
@@ -207,6 +216,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
@@ -222,6 +232,7 @@ if agent_key == "cursor":
```
**Correct approach** (no mapping needed):
```python
AGENT_CONFIG = {
"cursor-agent": { # Matches the actual executable name
@@ -234,6 +245,7 @@ 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
@@ -289,6 +301,7 @@ echo "✅ Done"
### CLI-Based Agents
Require a command-line tool to be installed:
- **Claude Code**: `claude` CLI
- **Gemini CLI**: `gemini` CLI
- **Cursor**: `cursor-agent` CLI
@@ -298,16 +311,20 @@ Require a command-line tool to be installed:
- **CodeBuddy CLI**: `codebuddy` 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
**Standard format:**
```markdown
---
description: "Command description"
@@ -317,6 +334,7 @@ Command content with {SCRIPT} and $ARGUMENTS placeholders.
```
**GitHub Copilot Chat Mode format:**
```markdown
---
description: "Command description"
@@ -327,6 +345,7 @@ Command content with {SCRIPT} and $ARGUMENTS placeholders.
```
### TOML Format
Used by: Gemini, Qwen
```toml
@@ -348,6 +367,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)
@@ -383,4 +403,3 @@ When adding new agents:
---
*This documentation should be updated whenever new agents are added to maintain accuracy and completeness.*