Files
agency-agents/.github/workflows/lint-agents.yml
T
Michael SitarzewskiandClaude Opus 5.5 652b2692f8 fix(qwen): document the 0.25.1 floor and reserve Qwen's launch placeholders (#1143)
Qwen Code through 0.25.0 treats every ${name} in a SubAgent prompt as a value
to fill, and throws "Missing context values for the following keys" when it
has none. Sixteen agents show ${name} in their code examples, so those
releases can't launch them (#1081). 0.25.1 (2026-10-11) leaves any name it
doesn't fill as written, so the agents keep their examples. No escape for
${...} is safe across bash, JavaScript and the other 14 tools anyway.

- Document "Qwen Code 0.25.1 or later" in integrations/qwen/README.md and
  in the README's Qwen section.
- Qwen does fill ${task_prompt}, ${hook_context} and
  ${external_inputs_override}. lint-agents.sh now rejects those three in
  agent bodies, so no agent text is replaced at launch. No current agent uses
  them, and the whole roster still lints clean.
- test-lint-qwen-placeholders.sh covers the three reserved names and four
  look-alikes that must pass. It fails against the previous linter, and CI
  runs it whenever the linter changes.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-15 00:33:20 -05:00

115 lines
4.0 KiB
YAML

name: Lint Agent Files
on:
pull_request:
paths:
- "academic/**"
- "design/**"
- "engineering/**"
- "finance/**"
- "game-development/**"
- "gis/**"
- "healthcare/**"
- "marketing/**"
- "paid-media/**"
- "sales/**"
- "security/**"
- "product/**"
- "project-management/**"
- "research/**"
- "testing/**"
- "support/**"
- "spatial-computing/**"
- "specialized/**"
# Changing the linter itself has to run it. Without these the whole-roster
# job below never fires, and a new rule ships untested: the color check
# went in this way and nothing in CI had ever looked at a color value.
- "scripts/lint-agents.sh"
- "scripts/convert.sh"
- "scripts/lib.sh"
jobs:
lint:
name: Validate agent frontmatter and structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed agent files
id: changed
run: |
FILES=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }}...HEAD -- \
':(glob)academic/**/*.md' ':(glob)design/**/*.md' ':(glob)engineering/**/*.md' ':(glob)finance/**/*.md' ':(glob)game-development/**/*.md' ':(glob)gis/**/*.md' ':(glob)healthcare/**/*.md' ':(glob)marketing/**/*.md' ':(glob)paid-media/**/*.md' ':(glob)sales/**/*.md' ':(glob)security/**/*.md' ':(glob)product/**/*.md' \
':(glob)project-management/**/*.md' ':(glob)research/**/*.md' ':(glob)testing/**/*.md' ':(glob)support/**/*.md' \
':(glob)spatial-computing/**/*.md' ':(glob)specialized/**/*.md')
{
echo "files<<ENDOFLIST"
echo "$FILES"
echo "ENDOFLIST"
} >> "$GITHUB_OUTPUT"
if [ -z "$FILES" ]; then
echo "No agent files changed."
else
echo "Changed files:"
echo "$FILES"
fi
- name: Run agent linter
if: steps.changed.outputs.files != ''
env:
CHANGED_FILES: ${{ steps.changed.outputs.files }}
run: |
chmod +x scripts/lint-agents.sh
./scripts/lint-agents.sh $CHANGED_FILES
- name: Check agent originality
if: steps.changed.outputs.files != ''
env:
CHANGED_FILES: ${{ steps.changed.outputs.files }}
run: |
chmod +x scripts/check-agent-originality.sh
./scripts/check-agent-originality.sh $CHANGED_FILES
lint-all:
name: Whole roster, when the linter changes
runs-on: ubuntu-latest
# The job above lints the agents a PR touched, which is the right scope for
# an agent PR and the wrong one for a rule change: a new rule has to run
# against every agent before it lands, or it either breaks a division nobody
# edited or quietly does nothing.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Did the linter or the color map change?
id: rules
run: |
RULES="scripts/lint-agents.sh scripts/convert.sh scripts/lib.sh"
CHANGED=$(git diff --name-only --diff-filter=ACMR \
"origin/${{ github.base_ref }}...HEAD" -- $RULES)
if [ -n "$CHANGED" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
echo "Linting the whole roster because these changed:"
echo "$CHANGED"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
echo "Linter unchanged - the changed-files job is the right scope here."
fi
- name: Lint every agent in the roster
if: steps.rules.outputs.changed == 'true'
run: |
chmod +x scripts/lint-agents.sh
./scripts/lint-agents.sh
- name: Reject folded frontmatter fixtures
if: steps.rules.outputs.changed == 'true'
run: bash scripts/test-folded-frontmatter.sh
- name: Reject Qwen launch placeholders
if: steps.rules.outputs.changed == 'true'
run: bash scripts/test-lint-qwen-placeholders.sh