Skip to content

A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy injectors to reality checkers. Each agent is a specialized expert with personality, processes, and proven deliverables.

Shell

fix: align agent lint with convert.sh and CI (#333)

everforge618582cdcc38
diff --git a/.github/workflows/lint-agents.yml b/.github/workflows/lint-agents.yml
index 81245ff8..761772e5 100644
--- a/.github/workflows/lint-agents.yml
+++ b/.github/workflows/lint-agents.yml
@@ -3,18 +3,19 @@ name: Lint Agent Files
on:
pull_request:
paths:
- - 'design/**'
- - 'engineering/**'
- - 'game-development/**'
- - 'marketing/**'
- - 'paid-media/**'
- - 'sales/**'
- - 'product/**'
- - 'project-management/**'
- - 'testing/**'
- - 'support/**'
- - 'spatial-computing/**'
- - 'specialized/**'
+ - "academic/**"
+ - "design/**"
+ - "engineering/**"
+ - "game-development/**"
+ - "marketing/**"
+ - "paid-media/**"
+ - "sales/**"
+ - "product/**"
+ - "project-management/**"
+ - "testing/**"
+ - "support/**"
+ - "spatial-computing/**"
+ - "specialized/**"
jobs:
lint:
@@ -29,7 +30,7 @@ jobs:
id: changed
run: |
FILES=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- \
- 'design/**/*.md' 'engineering/**/*.md' 'game-development/**/*.md' 'marketing/**/*.md' 'paid-media/**/*.md' 'sales/**/*.md' 'product/**/*.md' \
+ 'academic/**/*.md' 'design/**/*.md' 'engineering/**/*.md' 'game-development/**/*.md' 'marketing/**/*.md' 'paid-media/**/*.md' 'sales/**/*.md' 'product/**/*.md' \
'project-management/**/*.md' 'testing/**/*.md' 'support/**/*.md' \
'spatial-computing/**/*.md' 'specialized/**/*.md')
{
diff --git a/scripts/lint-agents.sh b/scripts/lint-agents.sh
index 709aab79..28e08980 100755
--- a/scripts/lint-agents.sh
+++ b/scripts/lint-agents.sh
@@ -10,6 +10,7 @@
set -euo pipefail
+# Keep in sync with AGENT_DIRS in scripts/convert.sh
AGENT_DIRS=(
academic
design
@@ -17,6 +18,7 @@ AGENT_DIRS=(
game-development
marketing
paid-media
+ sales
product
project-management
sales
@@ -36,6 +38,12 @@ warnings=0
lint_file() {
local file="$1"
+ if [[ ! -f "$file" ]]; then
+ echo "ERROR $file: not a file or does not exist"
+ errors=$((errors + 1))
+ return
+ fi
+
# 1. Check frontmatter delimiters
local first_line
first_line=$(head -1 "$file")
@@ -74,8 +82,10 @@ lint_file() {
fi
done
- # 4. Check file has meaningful content
- if [[ $(echo "$body" | wc -w) -lt 50 ]]; then
+ # 4. Check file has meaningful content (awk strips wc's leading whitespace on macOS/BSD)
+ local word_count
+ word_count=$(echo "$body" | wc -w | awk '{print $1}')
+ if [[ "${word_count:-0}" -lt 50 ]]; then
echo "WARN $file: body seems very short (< 50 words)"
warnings=$((warnings + 1))
fi