mirror of
https://github.com/msitarzewski/agency-agents.git
synced 2026-06-10 13:14:56 +03:00
5032f7e75c
Adds scripts/check-agent-originality.sh, which flags new agents that substantially duplicate an existing one. It compares each candidate against the whole roster (and other files in the same change set) using entity-neutralized 8-word shingle overlap, so a find-replace "re-skin" that only swaps a country/platform name can't slip past review. - CI: new "Check agent originality" step in lint-agents.yml runs it on changed agent files; a >=40% match fails the build. - Docs: CONTRIBUTING.md gains a self-run "before submitting" step, a checklist item, and a "things we'll always close" bullet for re-skins. Calibration: across the existing 184-agent library the worst same-pair similarity is ~1.5% (median 0%), so the WARN >=20% / FAIL >=40% defaults leave a wide margin against false positives. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
64 lines
1.9 KiB
YAML
64 lines
1.9 KiB
YAML
name: Lint Agent Files
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- "academic/**"
|
|
- "design/**"
|
|
- "engineering/**"
|
|
- "finance/**"
|
|
- "game-development/**"
|
|
- "marketing/**"
|
|
- "paid-media/**"
|
|
- "sales/**"
|
|
- "product/**"
|
|
- "project-management/**"
|
|
- "testing/**"
|
|
- "support/**"
|
|
- "spatial-computing/**"
|
|
- "specialized/**"
|
|
|
|
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 -- \
|
|
'academic/**/*.md' 'design/**/*.md' 'engineering/**/*.md' 'finance/**/*.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')
|
|
{
|
|
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
|