mirror of
https://github.com/addyosmani/agent-skills.git
synced 2026-11-11 15:16:22 +00:00
The reference guard in constraint-driven-development promised to include untracked files, catch deleted test files and weakened thresholds, and stay silent when constraints tighten. Run unchanged, it did none of those for ordinary local git changes: - `git diff --no-index /dev/null <file>` exits 1 whenever the sides differ, and the shared git() wrapper turned every nonzero exit into null, so every untracked file diffed as empty and no added-line rule could see it. - The filename came from the `+++` header only, so a deletion (`+++ /dev/null`) sliced to `ev/null` and matched nothing; there was no deletion rule, and staging did not help. - A number going down was treated as weaker, which is right for a minimum (coverage) and inverted for a maximum (size, latency, error budget). - A removed floor bullet was never reported, although the comment said it was. The wrapper now keeps stdout on the expected exit 1 and every other failure exits 2 rather than reading as clean; both diff headers name the file and a deleted test file is its own finding; each threshold carries a direction read from the words around it (>=, at least, must not fall; <=, at most, under, must not grow), a number with no readable direction is reported when it changes; a removed floor bullet or table row is reported, except an Exceptions row, whose removal tightens. The three language patterns are unchanged. scripts/floor-guard-reference-test.js extracts the fenced block and runs it with real git against fourteen fixtures plus three edge cases; eight of them fail on the previous reference and all pass now. The workflow runs it beside the other script tests.
167 lines
4.6 KiB
YAML
167 lines
4.6 KiB
YAML
name: Test Plugin Installation
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
validate-skills:
|
|
name: Validate skill content
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Validate all skills
|
|
run: node scripts/validate-skills.js
|
|
|
|
- name: Test skill lint rules
|
|
run: node --test scripts/lib/skill-lint-test.js
|
|
|
|
- name: Validate manifest versions
|
|
run: node scripts/validate-versions.js
|
|
|
|
- name: Test manifest version validator
|
|
run: node --test scripts/validate-versions-test.js
|
|
|
|
- name: Test skill eval runner
|
|
run: node --test scripts/run-evals-test.js
|
|
|
|
- name: Run skill evals (trigger + routing)
|
|
run: node scripts/run-evals.js --min-rank1 95
|
|
|
|
- name: Validate references/ links in skills
|
|
run: node scripts/validate-reference-links.js
|
|
|
|
- name: Test reference-link validator
|
|
run: node --test scripts/validate-reference-links-test.js
|
|
|
|
- name: Test floor-guard reference
|
|
run: node --test scripts/floor-guard-reference-test.js
|
|
|
|
- name: Test session-start hook payload
|
|
run: bash hooks/session-start-test.sh
|
|
|
|
validate-commands:
|
|
name: Validate command parity and description sync
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Validate commands across all tool directories
|
|
run: node scripts/validate-commands.js
|
|
|
|
- name: Test command validator
|
|
run: node --test scripts/validate-commands-test.js
|
|
|
|
- name: Validate spec/plan/todo artifact paths
|
|
run: node scripts/validate-artifact-paths.js
|
|
|
|
- name: Test artifact-path validator
|
|
run: node --test scripts/validate-artifact-paths-test.js
|
|
|
|
# Ubuntu coverage stays in the existing jobs above, preserving their check names.
|
|
validate-platforms:
|
|
name: Validate tooling (${{ matrix.os }})
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [macos-latest, windows-latest]
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v6
|
|
with:
|
|
node-version: '24'
|
|
|
|
- name: Test validators and eval runner
|
|
run: >-
|
|
node --test
|
|
scripts/lib/skill-lint-test.js
|
|
scripts/validate-versions-test.js
|
|
scripts/run-evals-test.js
|
|
scripts/validate-reference-links-test.js
|
|
scripts/validate-commands-test.js
|
|
scripts/validate-artifact-paths-test.js
|
|
|
|
- name: Validate all skills
|
|
run: node scripts/validate-skills.js
|
|
|
|
- name: Validate manifest versions
|
|
run: node scripts/validate-versions.js
|
|
|
|
- name: Validate references/ links in skills
|
|
run: node scripts/validate-reference-links.js
|
|
|
|
- name: Validate commands across all tool directories
|
|
run: node scripts/validate-commands.js
|
|
|
|
- name: Validate spec/plan/todo artifact paths
|
|
run: node scripts/validate-artifact-paths.js
|
|
|
|
- name: Run skill evals (trigger + routing)
|
|
run: node scripts/run-evals.js --min-rank1 95
|
|
|
|
test-hooks:
|
|
name: Hook regression tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Test sdd-cache hooks (stubbed curl, no network)
|
|
run: bash hooks/sdd-cache-test.sh
|
|
|
|
- name: Test simplify-ignore hook
|
|
run: bash hooks/simplify-ignore-test.sh
|
|
|
|
validate:
|
|
name: Validate plugin structure
|
|
needs: [validate-skills, validate-commands, validate-platforms]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Validate marketplace and plugin manifests
|
|
run: claude plugin validate .
|
|
|
|
test-install:
|
|
name: Test plugin installation
|
|
runs-on: ubuntu-latest
|
|
needs: validate
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install Claude Code
|
|
run: npm install -g @anthropic-ai/claude-code
|
|
|
|
- name: Configure git to use HTTPS
|
|
run: git config --global url."https://github.com/".insteadOf "git@github.com:"
|
|
|
|
- name: Add marketplace
|
|
run: claude plugin marketplace add ./
|
|
|
|
- name: List marketplaces
|
|
run: claude plugin marketplace list
|
|
|
|
- name: Install plugin
|
|
run: claude plugin install agent-skills@addy-agent-skills --scope user
|