diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 88bab49..bb0a701 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -12,7 +12,8 @@ "name": "aiaddon", "displayName": "AI Add-on Builder", "description": "Describe what you want Claude to do, in your own words. AI Add-on Builder plans, builds, checks, and packages the skill or plugin for you, including internal tools for your team, and adds a Prompt Builder form that starts it. Works in Claude Code, Cowork, and claude.ai.", - "source": "./", + "source": "./adapters/claude", + "version": "0.3.0", "category": "developer-tools" } ] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f824c35..32b4289 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,16 +33,16 @@ jobs: python-version: ${{ matrix.python }} - name: Self-test the scripts run: python dev/aiaddon-review/scripts/selftest.py - - name: Validate for the Claude plugin directory - run: python dev/aiaddon-review/scripts/validate_extension.py . --strict --target directory --require-meta author,company + - name: Validate the shipped plugin for the Claude plugin directory (adapters/claude) + run: python dev/aiaddon-review/scripts/validate_extension.py adapters/claude --strict --target directory --require-meta author,company - name: Scan for plain-text secrets run: python dev/aiaddon-review/scripts/scan_secrets.py . - name: Screen docs for prompt injection - run: python dev/aiaddon-review/scripts/screen_text.py . + run: python dev/aiaddon-review/scripts/screen_text.py adapters/claude - name: Check the router against its evals - run: python dev/aiaddon-review/scripts/route_check.py . + run: python dev/aiaddon-review/scripts/route_check.py adapters/claude - name: Simulate skill triggers - run: python dev/aiaddon-review/scripts/simulate.py . triggers + run: python dev/aiaddon-review/scripts/simulate.py adapters/claude triggers - name: Self-test as a non-root user if: matrix.python == '3.13' run: test "$(id -u)" != 0 && python dev/aiaddon-review/scripts/selftest.py | grep -q "PASS read-only source is staged, not written" @@ -63,52 +63,5 @@ jobs: run: python dev/aiaddon-review/scripts/scan_secrets.py . --history - name: Scan built packages, when present (blocking) run: | - python dev/aiaddon-package/scripts/build_skill_zips.py . --out "$RUNNER_TEMP/skill-zips" + python dev/aiaddon-package/scripts/build_skill_zips.py adapters/claude --out "$RUNNER_TEMP/skill-zips" python dev/aiaddon-review/scripts/scan_secrets.py . --artifacts "$RUNNER_TEMP/skill-zips" - - release-branch: - # Publishes the shipped plugin (repo minus maintainer-only files) to the `release` branch, - # which the Anthropic directory submission tracks. Same plugin content as main; no hooks, - # scripts or non-text files (directory policy for non-Verified organizations). - name: Update the release branch - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - needs: [checks, public-safety] - runs-on: ubuntu-24.04 - timeout-minutes: 10 - permissions: - contents: write - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - fetch-depth: 0 - - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 - with: - python-version: "3.13" - - name: Build the shipped tree - run: | - git rm -r -q --cached --ignore-unmatch dev evals .github .claude IMPROVEMENTS.md .public-safety-allow assets/icon.svg - git clean -fdxq - rm -rf dev evals .github .claude IMPROVEMENTS.md .public-safety-allow assets/icon.svg - - name: Validate the shipped tree for the directory (blocking) - run: | - # The validator imports its neighbours (route check, public safety, screen), so extract the whole folder. - git archive HEAD dev/aiaddon-review/scripts | tar -x -C "$RUNNER_TEMP" - # The maintainer allowlist (public support address) is needed to validate but is never shipped: - # it is restored in the working tree only, the index (what gets pushed) stays without it. - git show HEAD:.public-safety-allow > .public-safety-allow - trap 'rm -f .public-safety-allow' EXIT - python "$RUNNER_TEMP/dev/aiaddon-review/scripts/validate_extension.py" . --strict --target directory --require-meta author,company - python "$RUNNER_TEMP/dev/aiaddon-review/scripts/scan_secrets.py" . - - name: Push the release branch - env: - GIT_AUTHOR_NAME: github-actions[bot] - GIT_AUTHOR_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com - GIT_COMMITTER_NAME: github-actions[bot] - GIT_COMMITTER_EMAIL: 41898282+github-actions[bot]@users.noreply.github.com - run: | - # Fast-forward only (no force-push): a new commit on top of the current release branch. - tree=$(git write-tree) - parent=$(git rev-parse -q --verify origin/release || true) - if [ -n "$parent" ] && [ "$(git rev-parse "$parent^{tree}")" = "$tree" ]; then echo "release branch already up to date"; exit 0; fi - commit=$(git commit-tree "$tree" ${parent:+-p "$parent"} -m "release: shipped plugin from ${GITHUB_SHA::7}") - git push origin "$commit:refs/heads/release" diff --git a/.github/workflows/release-plugin.yml b/.github/workflows/release-plugin.yml index 34bd175..8a4b8dd 100644 --- a/.github/workflows/release-plugin.yml +++ b/.github/workflows/release-plugin.yml @@ -1,90 +1,97 @@ name: Release plugin -# Builds aiaddon.plugin from the plugin.json version, plus one .zip per skill (skills/ -> dist/.zip), -# and attaches them all to the GitHub release. -# Release (v* tag): https://github.com/syncwin/aiaddon/releases/latest/download/aiaddon.plugin -# Next (push to the next branch): rolling pre-release tagged "next", -# https://github.com/syncwin/aiaddon/releases/download/next/aiaddon.plugin -# The existing release.yml still attaches the signed, dotted-name package to v* releases. +# Builds aiaddon.plugin from adapters/claude (the shipped plugin) when a v* tag is pushed, plus one .zip per skill, +# the Prompt Builder prompt and SHA256SUMS, signs build provenance, and attaches everything to the GitHub release. +# One-click download: https://github.com/syncwin/aiaddon/releases/latest/download/aiaddon.plugin +# Verify a download: gh attestation verify aiaddon.plugin --repo syncwin/aiaddon on: push: tags: ["v*"] - branches: [next] workflow_dispatch: + inputs: + tag: + description: Existing release tag to rebuild, for example v0.3.0 + required: true permissions: - contents: write + contents: read concurrency: - group: release-plugin-${{ github.ref }} + group: release-plugin-${{ inputs.tag || github.ref_name }} cancel-in-progress: false jobs: release: - name: Build and attach aiaddon.plugin + name: Build, attest, attach aiaddon.plugin runs-on: ubuntu-latest - timeout-minutes: 10 + timeout-minutes: 15 + permissions: + contents: write # create or update the release and attach files + id-token: write # sign the build provenance + attestations: write # store the provenance attestation env: NAME: "AI Add-on Builder" ASSET: aiaddon.plugin - ROOT: . + ROOT: adapters/claude + TAG: ${{ inputs.tag || github.ref_name }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: + ref: ${{ inputs.tag || github.ref }} + fetch-depth: 0 # full history for the secret scan persist-credentials: false + - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 + with: + python-version: "3.13" + - name: Check the tag matches the plugin version + id: version + run: | + v=$(python -c "import json,os;print(json.load(open(os.environ['ROOT'] + '/.claude-plugin/plugin.json'))['version'])") + test "$TAG" = "v$v" || { echo "tag $TAG does not match plugin version $v"; exit 1; } + echo "version=$v" >> "$GITHUB_OUTPUT" + - name: Run every check + run: | + python dev/aiaddon-review/scripts/selftest.py + python dev/aiaddon-review/scripts/validate_extension.py "$ROOT" --strict --target directory --require-meta author,company + python dev/aiaddon-review/scripts/scan_secrets.py . + python dev/aiaddon-review/scripts/scan_secrets.py . --history + python dev/aiaddon-review/scripts/route_check.py "$ROOT" + python dev/aiaddon-review/scripts/screen_text.py "$ROOT" - name: Build the package - id: build run: | - python3 - <<'PY' - import json, os, zipfile - root, asset = os.environ["ROOT"], os.environ["ASSET"] - version = json.load(open(os.path.join(root, ".claude-plugin", "plugin.json"), encoding="utf-8"))["version"] - skip_dirs = {".git", ".github", ".claude", "tests", "node_modules", "__pycache__", "evals", "prompts", "dist", "dev"} - skip_files = {"IMPROVEMENTS.md"} - os.makedirs("dist", exist_ok=True) - out = os.path.join(os.getcwd(), "dist", asset) - if os.path.exists(out): - os.remove(out) - with zipfile.ZipFile(out, "w", zipfile.ZIP_DEFLATED) as z: - for d, dirs, files in os.walk(root): - dirs[:] = sorted(x for x in dirs if x not in skip_dirs) - for f in sorted(files): - if f in skip_files or f.endswith(".pyc"): - continue - p = os.path.join(d, f) - z.write(p, os.path.relpath(p, root).replace(os.sep, "/")) - with zipfile.ZipFile(out) as z: - assert ".claude-plugin/plugin.json" in z.namelist(), "plugin.json missing at zip root" - with open(os.environ.get("GITHUB_OUTPUT", os.devnull), "a") as g: - g.write("version=" + version + "\n") - print("built", out, "version", version) + # package_extension leaves out dev/, evals/, prompts/, .github/, .claude/, IMPROVEMENTS.md and .public-safety-allow. + python dev/aiaddon-package/scripts/package_extension.py "$ROOT" --format plugin --out dist --repo "$GITHUB_REPOSITORY" --force + python dev/aiaddon-package/scripts/build_skill_zips.py "$ROOT" --out dist + cd dist + mv -- "$(ls -- *.plugin | head -1)" "$ASSET" + rm -f -- *" install.md" + python - <<'PY' + import os, zipfile + names = zipfile.ZipFile(os.environ["ASSET"]).namelist() + text_ext = {".md", ".json", ".yaml", ".yml", ".txt", ".png", ".jpg", ".jpeg", ".gif", ".webp", ".ico"} + text_names = {"LICENSE", ".gitignore"} + assert ".claude-plugin/plugin.json" in names, "plugin.json missing at the package root" + bad = [n for n in names if os.path.splitext(n)[1].lower() not in text_ext and os.path.basename(n) not in text_names] + assert not bad, "files the directory refuses: " + ", ".join(bad) + assert not [n for n in names if n.split("/")[0] in ("hooks", "scripts", "dev", "evals", "prompts") or os.path.basename(n) in (".public-safety-allow", "IMPROVEMENTS.md")], "maintainer files or hooks in the package" + print("package ok:", len(names), "files") PY - - name: Build one zip per skill - run: python3 dev/aiaddon-package/scripts/build_skill_zips.py . --out dist + sha256sum -- "$ASSET" ai-add-on-builder.json *.zip > SHA256SUMS + cat SHA256SUMS - name: Scan the built packages for secrets and private data (blocking) - run: python3 dev/aiaddon-review/scripts/scan_secrets.py . --artifacts dist - - name: Check the tag matches the plugin version - if: github.ref_type == 'tag' - env: - VERSION: ${{ steps.build.outputs.version }} - run: test "$GITHUB_REF_NAME" = "v$VERSION" || { echo "tag $GITHUB_REF_NAME does not match plugin version $VERSION"; exit 1; } - - name: Attach to the version release - if: github.ref_type == 'tag' + run: python dev/aiaddon-review/scripts/scan_secrets.py . --artifacts dist + - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 + with: + subject-path: | + dist/${{ env.ASSET }} + dist/ai-add-on-builder.json + - name: Create or update the release env: GH_TOKEN: ${{ github.token }} - VERSION: ${{ steps.build.outputs.version }} run: | - tag="v$VERSION" - if gh release view "$tag" >/dev/null 2>&1; then - gh release upload "$tag" "dist/$ASSET" dist/*.zip --clobber + cd dist + if gh release view "$TAG" >/dev/null 2>&1; then + gh release upload "$TAG" "$ASSET" ai-add-on-builder.json SHA256SUMS *.zip --clobber else - gh release create "$tag" "dist/$ASSET" dist/*.zip --title "$NAME $tag" --generate-notes --target "$GITHUB_SHA" || gh release upload "$tag" "dist/$ASSET" dist/*.zip --clobber + gh release create "$TAG" "$ASSET" ai-add-on-builder.json SHA256SUMS *.zip --title "$NAME $TAG" --generate-notes --verify-tag fi - - name: Update the rolling next pre-release - if: github.ref_type == 'branch' - env: - GH_TOKEN: ${{ github.token }} - VERSION: ${{ steps.build.outputs.version }} - run: | - gh release delete next --cleanup-tag --yes || true - gh release create next "dist/$ASSET" dist/*.zip --prerelease --target "$GITHUB_SHA" --title "$NAME next (v$VERSION)" --notes "Rolling pre-release built from the next branch at $GITHUB_SHA. Not for production; the stable package is on the latest v* release." diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 01904d3..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Release package - -# Builds the .plugin from the tagged commit on GitHub's runners, signs build provenance, and attaches the package, -# the Prompt Builder prompt, and SHA256SUMS to the GitHub release for that tag. Verify a download with: -# gh attestation verify "AI.Add-on.Builder.v1.0.0.plugin" --repo syncwin/aiaddon -on: - push: - tags: ["v*"] - workflow_dispatch: - inputs: - tag: - description: Existing release tag to rebuild, for example v1.0.0 - required: true - -permissions: - contents: read - -concurrency: - group: release-${{ inputs.tag || github.ref_name }} - cancel-in-progress: false - -jobs: - build: - name: Build, attest, attach - runs-on: ubuntu-latest - timeout-minutes: 15 - permissions: - contents: write # attach files to the release - id-token: write # sign the build provenance - attestations: write # store the provenance attestation - env: - TAG: ${{ inputs.tag || github.ref_name }} - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - ref: ${{ inputs.tag || github.ref }} - persist-credentials: false - - uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0 - with: - python-version: "3.13" - - name: Check the tag matches the plugin version - run: | - v=$(python -c "import json;print(json.load(open('.claude-plugin/plugin.json'))['version'])") - test "$TAG" = "v$v" || { echo "tag $TAG does not match plugin version $v"; exit 1; } - - name: Run every check - run: | - python dev/aiaddon-review/scripts/selftest.py - python dev/aiaddon-review/scripts/validate_extension.py . --strict --target directory --require-meta author,company - python dev/aiaddon-review/scripts/scan_secrets.py . - python dev/aiaddon-review/scripts/scan_secrets.py . --history - python dev/aiaddon-review/scripts/route_check.py . - python dev/aiaddon-review/scripts/screen_text.py . - - name: Build the package - id: build - run: | - python dev/aiaddon-package/scripts/package_extension.py . --format plugin --out dist --repo "$GITHUB_REPOSITORY" --force - cd dist - orig=$(ls -- *.plugin | head -1) - asset="${orig// /.}" - mv -- "$orig" "$asset" - sha256sum -- "$asset" ai-add-on-builder.json > SHA256SUMS - cat SHA256SUMS - echo "asset=$asset" >> "$GITHUB_OUTPUT" - echo "label=$orig" >> "$GITHUB_OUTPUT" - - name: Scan the built package for secrets and private data (blocking) - run: python dev/aiaddon-review/scripts/scan_secrets.py . --artifacts dist - - uses: actions/attest-build-provenance@4d101475d8b20a2381f78447822ac1eab6504dd8 # v4.2.2 - with: - subject-path: | - dist/${{ steps.build.outputs.asset }} - dist/ai-add-on-builder.json - - name: Attach to the release - env: - GH_TOKEN: ${{ github.token }} - ASSET: ${{ steps.build.outputs.asset }} - LABEL: ${{ steps.build.outputs.label }} - run: | - cd dist - gh release upload "$TAG" "$ASSET#$LABEL" ai-add-on-builder.json SHA256SUMS --clobber --repo "$GITHUB_REPOSITORY" diff --git a/.public-safety-allow b/.public-safety-allow index 7e59b11..a253b61 100644 --- a/.public-safety-allow +++ b/.public-safety-allow @@ -16,3 +16,11 @@ email:aiaddon/references/standards.md:support@syncwin.com drive-path:AGENTS.md:A:\Automation drive-path:AGENTS.md:D:\SyncWin email:skills/*/references/standards.md:support@syncwin.com +# Single-branch layout: the shipped plugin sits in adapters/claude/, so the same public contact appears under that prefix (the scans also apply these without the prefix when run inside adapters/claude): +email:adapters/claude/.claude-plugin/plugin.json:support@syncwin.com +email:adapters/claude/PRIVACY.md:support@syncwin.com +email:adapters/claude/PUBLIC-SAFETY.md:support@syncwin.com +email:adapters/claude/README.md:support@syncwin.com +email:adapters/claude/SECURITY.md:support@syncwin.com +email:adapters/claude/skills/aiaddon/references/standards.md:support@syncwin.com +email:adapters/claude/skills/*/references/standards.md:support@syncwin.com diff --git a/AGENTS.md b/AGENTS.md index e8e2328..a766f9d 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,17 +2,17 @@ AI Add-on Builder: plans, builds, checks and packages Claude skills, plugins, connectors and agents. -**Structure:** `skills/aiaddon` (router) and `aiaddon-plan|build|maintain|review|package|prompt|clean`, `agents/` (`aiaddon-compare`, `aiaddon-grade`), `dev/` (Python dev tools and the old hook, not shipped), `evals/`, `.github/` (CI). +**Structure (single branch, `main`):** the shipped plugin is `adapters/claude/` (`.claude-plugin/plugin.json`, `adapters/claude/skills/aiaddon` router and `aiaddon-plan|build|maintain|review|package|prompt|clean`, `agents/` (`aiaddon-compare`, `aiaddon-grade`), `prompts/`, `evals/router/cases.json` and `evals/evals.json` for the router check and trigger simulation, plus copies of README, CHANGELOG, LICENSE, PRIVACY, SECURITY, CREDITS, PUBLIC-SAFETY, `.gitignore`). The root keeps `.claude-plugin/marketplace.json` (source `./adapters/claude`), the same docs, `dev/` (Python dev tools and the old hook, not shipped), `evals/` (live model cases, not shipped), `.github/` (CI and the release workflow). Edit the docs in both places and keep the copies identical. ## Commands - Self-test (must pass): `python dev/aiaddon-review/scripts/selftest.py` -- Strict validation (must pass): `python dev/aiaddon-review/scripts/validate_extension.py . --strict --target directory --require-meta author,company` +- Strict validation (must pass): `python dev/aiaddon-review/scripts/validate_extension.py adapters/claude --strict --target directory --require-meta author,company` - Secret scan: `python dev/aiaddon-review/scripts/scan_secrets.py` - Secret and private-data scan (blocking; tree, full history, packages): `python dev/aiaddon-review/scripts/scan_secrets.py . --history`; false positives only in `.public-safety-allow` -- Router check (every eval prompt routes to its expected skill): `python dev/aiaddon-review/scripts/route_check.py .` -- Version bump: `dev/aiaddon-maintain/scripts/bump_version.py`; package: `dev/aiaddon-package/scripts/package_extension.py` -- Validate: `claude plugin validate . --strict` -- Evals (real model calls): `claude plugin eval . --trust-plugin --ablation none --scaffold --allow-tools Read Glob Grep Skill -j 4 --no-publish`. Rebuild cases with `python /plugin-evals/regen_evals.py ` (owner's local tools folder, not in this repo). Write results outside the repo (`//eval-results`, a local folder outside the repo); the packager includes repo files. +- Router check (every eval prompt routes to its expected skill): `python dev/aiaddon-review/scripts/route_check.py adapters/claude` +- Version bump: `dev/aiaddon-maintain/scripts/bump_version.py`; package: `dev/aiaddon-package/scripts/package_extension.py adapters/claude --format plugin --out ` (run both on `adapters/claude`) +- Validate: `claude plugin validate adapters/claude --strict` and `claude plugin validate . --strict` (marketplace) +- Evals (real model calls; cases live in root `evals/`, and `claude plugin eval` reads cases from inside the plugin folder, so copy `adapters/claude` and `evals/` into one scratch folder outside the repo and run it there): `claude plugin eval --trust-plugin --ablation none --scaffold --allow-tools Read Glob Grep Skill -j 4 --no-publish`. Rebuild cases with `python /plugin-evals/regen_evals.py ` (owner's local tools folder, not in this repo). Write results outside the repo (`//eval-results`, a local folder outside the repo); the packager includes repo files. ## Workflow 1. Read the skill or script you change, plus its neighbours. @@ -20,18 +20,18 @@ AI Add-on Builder: plans, builds, checks and packages Claude skills, plugins, co 3. Update `CHANGELOG.md` for behavior changes; log ideas in `IMPROVEMENTS.md`. ## Rules -- **Directory compliance:** the shipped plugin (the `release` branch) has no hooks, no scripts or other non-text files, and text-only frontmatter. Features live as recipes in `skills/*/references/`; the Python in `dev/` is maintainer tooling only. Requests that would break Anthropic rules get a plain warning and the official safe method instead. +- **Directory compliance:** the shipped plugin (`adapters/claude/`, built into the release `.plugin` on a `v*` tag; there is no `release` branch) has no hooks, no scripts or other non-text files, and text-only frontmatter. Features live as recipes in `adapters/claude/skills/*/references/`; the Python in `dev/` is maintainer tooling only. Requests that would break Anthropic rules get a plain warning and the official safe method instead. - **Never publish secrets or private data** (keys, tokens, passwords, personal contact data, client names, internal URLs, local paths) in this repo or anything it builds; the secret and public-safety scans block every commit, push and release. - Run the closest check and the full gate before committing. Never delete or weaken tests or evals. Report failed, skipped or timed-out runs honestly; NOT RUN is never a pass. - Follow neighbouring files. Keep each `SKILL.md` under 500 lines; move detail into `references/`. -- On release, bump `version` in `.claude-plugin/plugin.json` (skills carry no `metadata` block: directory policy wants text-only frontmatter); add a `CHANGELOG.md` entry per behavior change. +- On release, bump `version` in `adapters/claude/.claude-plugin/plugin.json` and the plugin entry in `.claude-plugin/marketplace.json` (skills carry no `metadata` block: directory policy wants text-only frontmatter); add a `CHANGELOG.md` entry per behavior change (root and `adapters/claude/` copies). Release: push a `v` tag; `release-plugin.yml` builds `aiaddon.plugin`. - No commits, pushes or PRs unless asked. Work on a branch and open a PR; never push to main. - No new dependencies without asking (scripts stay on the Python standard library). - Never commit secrets. Never pick names or slugs without user confirmation. - Pin any GitHub Action to a full commit SHA with the version in a comment; give each job least permissions. - A platform fact needs its official page and the date checked. Keep private data (keys, client names, internal URLs) out of every file. - Naming standard (validator `P019` to `P023`): router skill name == plugin name; every other skill, agent and command is prefixed `-`; action-style slugs (`-review`, not `-reviewer`). Router standard (`P024` to `P028`): routing table, tie-breaks, default question, Skill-tool loading, router evals. -- Public safety (`X008` to `X013`): every extension is public; `.gitignore` preset, `PUBLIC-SAFETY.md`, `.env.example`; never auto force-push, history rewrites need the owner's explicit OK (`skills/aiaddon-review/references/public-safety.md`). +- Public safety (`X008` to `X013`): every extension is public; `.gitignore` preset, `PUBLIC-SAFETY.md`, `.env.example`; never auto force-push, history rewrites need the owner's explicit OK (`adapters/claude/skills/aiaddon-review/references/public-safety.md`). ## Model routing Opus plans, decides, writes self-contained briefs with a report word limit, and reviews every result. Haiku for search, reading and mechanical edits. Sonnet for coding, tests and multi-step work. Do 1-2 tool calls inline. diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b28155..ffc6020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,17 @@ Newest first. +## 0.3.0: Single-branch layout + +**Changed** +- The shipped plugin now lives in `adapters/claude/` on `main`; the root keeps the maintainer files, `dev/`, `evals/` and the marketplace manifest, whose plugin source is `./adapters/claude`. +- The `release` branch is retired: CI no longer builds it. Releases build `aiaddon.plugin` (and one zip per skill) from `adapters/claude/` when a `v*` tag is pushed. +- CI validates `adapters/claude/` for the directory (strict), scans the repo and history for secrets, and runs the router check and the self-test. +- The maintainer scripts, commands and docs point at `adapters/claude/`. The allowlist at the repo root also covers the plugin subfolder. + +**Removed** +- The rolling `next` pre-release (there is one branch now) and the duplicate release workflow: one workflow builds, signs and attaches the release. + ## 0.2.1: Final directory review **Fixed** diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 80be885..f310f64 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,13 +2,13 @@ Issues and pull requests are welcome at [github.com/syncwin/aiaddon](https://github.com/syncwin/aiaddon). -1. Read `skills/aiaddon/references/standards.md` (naming, metadata, the lean-build rule) and `platforms.md` (how the layers split). -2. Keep the shipped plugin Markdown only: no scripts, hooks or other non-text files (Anthropic directory policy). Maintainers: dev tools in `dev/` (not shipped). -3. Before you open a pull request, follow the recipes `skills/aiaddon-review/references/selftest.md` and `validate-extension.md` on the repository root (strict, target directory, author and company required). Both must pass. Maintainers: dev tools in `dev/` (not shipped). +1. Read `adapters/claude/skills/aiaddon/references/standards.md` (naming, metadata, the lean-build rule) and `platforms.md` (how the layers split). +2. Keep the shipped plugin Markdown only: no scripts, hooks or other non-text files (Anthropic directory policy). Maintainers: dev tools in `dev/` (not shipped). The shipped plugin is the `adapters/claude/` folder; everything outside it is repository tooling. +3. Before you open a pull request, follow the recipes `adapters/claude/skills/aiaddon-review/references/selftest.md` and `validate-extension.md` on `adapters/claude` (strict, target directory, author and company required). Both must pass. Maintainers: dev tools in `dev/` (not shipped). 4. Pull requests need passing CI (self-tests, strict validation, secret scan, injection screen, CodeQL) and review from the code owner. Pin any GitHub Action you add to a full commit SHA with the version in a comment, and give each job only the permissions it needs. -5. Add a `CHANGELOG.md` line for every behavior change. For a release, bump the plugin version in `.claude-plugin/plugin.json` (skill frontmatter holds text-only name, description and license). +5. Add a `CHANGELOG.md` line for every behavior change. For a release, bump the plugin version in `adapters/claude/.claude-plugin/plugin.json` and `.claude-plugin/marketplace.json`, and mirror README and CHANGELOG edits into `adapters/claude/` (skill frontmatter holds text-only name, description and license). 6. A platform fact needs the official page it came from and the date you checked it. -7. New skills, agents and commands follow the naming standard (router = plugin name, everything else prefixed `aiaddon-`, action-style slugs) and are added to the router's routing table with router evals in `evals/router/cases.json` (recipe `skills/aiaddon-review/references/route-check.md`). -8. Keep private data out: no keys, client names, internal URLs, or personal details in any file, example, or test. The scan checks the tree and full history: the recipes `skills/aiaddon-review/references/scan-secrets.md` and `public-safety-scan.md` (include the history step). Fake keys in tests are assembled at run time, never written out. +7. New skills, agents and commands follow the naming standard (router = plugin name, everything else prefixed `aiaddon-`, action-style slugs) and are added to the router's routing table with router evals in `adapters/claude/evals/router/cases.json` (recipe `adapters/claude/skills/aiaddon-review/references/route-check.md`). +8. Keep private data out: no keys, client names, internal URLs, or personal details in any file, example, or test. The scan checks the tree and full history: the recipes `adapters/claude/skills/aiaddon-review/references/scan-secrets.md` and `public-safety-scan.md` (include the history step). Fake keys in tests are assembled at run time, never written out. Contributions are licensed under the MIT License. diff --git a/README.md b/README.md index 3964027..d52063d 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Tell Claude what you want. Use your own words, and AI Add-on Builder turns that into a working Claude skill or plugin. It plans the build, writes the files, checks them, and hands you something you can install, plus a companion prompt you can import into Prompt Builder to start it from a short form. You don't need to know what a manifest or an MCP server is. -**Download:** [aiaddon.plugin](https://github.com/syncwin/aiaddon/releases/latest/download/aiaddon.plugin) (asset of the latest GitHub release) or the [rolling next build](https://github.com/syncwin/aiaddon/releases/download/next/aiaddon.plugin) +**Download:** [aiaddon.plugin](https://github.com/syncwin/aiaddon/releases/latest/download/aiaddon.plugin) (asset of the latest GitHub release) -**Version** 0.2.1 · **Author** @wasimness · **Company** SyncWin · **Contact** support@syncwin.com · **License** MIT +**Version** 0.3.0 · **Author** @wasimness · **Company** SyncWin · **Contact** support@syncwin.com · **License** MIT ## What you can build @@ -123,7 +123,7 @@ Every change also runs CodeQL, a secret scan, the injection screen, and the full ## Status -Version 0.2.0. Maintainer CI (dev tools in `dev/`, not shipped): every push to `main` and every pull request runs the 195 self-tests and 43 router cases, the directory validator, the secret scan, the injection screen, and the trigger simulation on Python 3.9 to 3.13, and `claude plugin validate --strict` passed before release. The `evals/` folder holds five live cases for `claude plugin eval`; the last full run (2026-10-12, Sonnet as judge) scored 0.93, 0.73 above the same tasks without the plugin; six-run repeats scored 1.00 on audits, intake, and scaffolding. Run them yourself with `claude plugin eval . --allow-tools Bash Write Edit --judge-model sonnet` (the shell cases need the sandbox tools bubblewrap and socat on Linux; the default small judge misreads long, table-heavy replies). Platform facts were checked against Anthropic's documentation on 2026-10-11. If you find a mismatch, please open an issue. +Version 0.3.0. Maintainer CI (dev tools in `dev/`, not shipped): every push to `main` and every pull request runs the 195 self-tests and 43 router cases, the directory validator, the secret scan, the injection screen, and the trigger simulation on Python 3.9 to 3.13, and `claude plugin validate --strict` passed before release. The `evals/` folder holds five live cases for `claude plugin eval`; the last full run (2026-10-12, Sonnet as judge) scored 0.93, 0.73 above the same tasks without the plugin; six-run repeats scored 1.00 on audits, intake, and scaffolding. Run them yourself with `claude plugin eval . --allow-tools Bash Write Edit --judge-model sonnet` (the shell cases need the sandbox tools bubblewrap and socat on Linux; the default small judge misreads long, table-heavy replies). Platform facts were checked against Anthropic's documentation on 2026-10-11. If you find a mismatch, please open an issue. ## Contributing and credits diff --git a/SECURITY.md b/SECURITY.md index 0d78870..79b4d10 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -32,7 +32,7 @@ The README section "What it runs, reads, and sends" lists every case in plain wo - **Build provenance:** the release `.plugin` is built from the tagged commit on GitHub's runners and signed with a provenance attestation. Verify a download: ``` - gh attestation verify "AI.Add-on.Builder.v1.0.0.plugin" --repo syncwin/aiaddon + gh attestation verify "aiaddon.plugin" --repo syncwin/aiaddon sha256sum -c SHA256SUMS ``` - **Maintainer CI** (dev tools in `dev/`, not shipped): every push and pull request runs 113 self-tests (one pass as a non-root user), the directory validator in strict mode, a secret scan, the injection screen, the trigger simulation, and CodeQL (`security-extended`) on the Python and the workflows. OpenSSF Scorecard runs weekly. diff --git a/.claude-plugin/icon.png b/adapters/claude/.claude-plugin/icon.png similarity index 100% rename from .claude-plugin/icon.png rename to adapters/claude/.claude-plugin/icon.png diff --git a/.claude-plugin/plugin.json b/adapters/claude/.claude-plugin/plugin.json similarity index 96% rename from .claude-plugin/plugin.json rename to adapters/claude/.claude-plugin/plugin.json index 34fd469..e9cd8b2 100644 --- a/.claude-plugin/plugin.json +++ b/adapters/claude/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "aiaddon", "displayName": "AI Add-on Builder", - "version": "0.2.1", + "version": "0.3.0", "description": "Describe what you want Claude to do, in your own words. AI Add-on Builder plans, builds, checks, and packages the skill or plugin for you, including internal tools for your team, and adds a Prompt Builder form that starts it. Works in Claude Code, Cowork, and claude.ai.", "author": { "name": "@wasimness", @@ -31,7 +31,7 @@ ], "metadata": { "displayName": "AI Add-on Builder", - "version": "0.2.1", + "version": "0.3.0", "author": "@wasimness", "company": "SyncWin", "homepage": "https://github.com/syncwin/aiaddon", diff --git a/adapters/claude/.gitignore b/adapters/claude/.gitignore new file mode 100644 index 0000000..a20ed8a --- /dev/null +++ b/adapters/claude/.gitignore @@ -0,0 +1,35 @@ +.DS_Store +*.plugin +*.zip +.env +__pycache__/ +*.pyc +evals/results/ +dist/ + +# --- public-safety preset: private data never reaches git --- +.env +.env.* +!.env.example +*.pem +*.key +*.p12 +*.pfx +id_rsa* +id_ed25519* +credentials*.json +service-account*.json +secrets.* +*.log +logs/ +memory/ +.claude/memory/ +.claude/progress/ +progress*.md +*.local.md +.claude/settings.local.json +.npmrc +.pypirc +.netrc +private/ +# --- end public-safety preset --- diff --git a/.mcp.json b/adapters/claude/.mcp.json similarity index 100% rename from .mcp.json rename to adapters/claude/.mcp.json diff --git a/adapters/claude/CHANGELOG.md b/adapters/claude/CHANGELOG.md new file mode 100644 index 0000000..ffc6020 --- /dev/null +++ b/adapters/claude/CHANGELOG.md @@ -0,0 +1,485 @@ +# Changelog + +Newest first. + +## 0.3.0: Single-branch layout + +**Changed** +- The shipped plugin now lives in `adapters/claude/` on `main`; the root keeps the maintainer files, `dev/`, `evals/` and the marketplace manifest, whose plugin source is `./adapters/claude`. +- The `release` branch is retired: CI no longer builds it. Releases build `aiaddon.plugin` (and one zip per skill) from `adapters/claude/` when a `v*` tag is pushed. +- CI validates `adapters/claude/` for the directory (strict), scans the repo and history for secrets, and runs the router check and the self-test. +- The maintainer scripts, commands and docs point at `adapters/claude/`. The allowlist at the repo root also covers the plugin subfolder. + +**Removed** +- The rolling `next` pre-release (there is one branch now) and the duplicate release workflow: one workflow builds, signs and attaches the release. + +## 0.2.1: Final directory review + +**Fixed** +- The package targets reference no longer mentions the removed `--cache` flag; it points to the validate-extension recipe. +- The route-check recipe says a missing `evals/` folder on an installed copy means the check is skipped, not failed. +- aiaddon-maintain no longer lists "clean up" as a trigger, which belongs to aiaddon-clean. + +**Removed** +- The `color` key from both agents, so agent frontmatter holds only name, description, model and tools (directory frontmatter rule). + +## 0.2.0: Directory compliance + +### Added + +- Router hard rules: a public-safety gate (nothing secret or private in anything aiaddon builds, edits or publishes) and a compliance rule (plain warning plus the official safe method when a request would break Claude rules). +- Validator rules for the plugin directory: hooks, refused file types and non-text frontmatter are caught before submission. +- CI rebuilds a `release` branch from `main` after the checks pass (no force-push); the directory submission tracks it. + +### Changed + +- Breaking for maintainers: the 25 scripts are now Markdown recipes in `skills/*/references/`, followed with built-in tools. The Python and the old hook moved unchanged to `dev/` (maintainers only, never shipped). +- The nested `metadata` block is removed from all skills and agents; agent `tools` are plain text. +- New plugins scaffolded by aiaddon follow the directory rules by default. +- Recipe passages the injection screen flagged are reworded as neutral steps or put in code blocks; meaning unchanged. + +### Fixed + +- The validator no longer scans other checkouts under `.claude/worktrees`. +- The install simulator applies the repo's `.public-safety-allow` and forgives only the evals/prompts checks for folders that packages exclude by design. + +## 0.1.0: Naming and public safety + +### Added + +- Naming standard, encoded in the plan, build and review skills and enforced by the validator for every extension it creates: the router skill's name equals the plugin name; every other skill, agent and command is prefixed `-`; slugs are skill or action style, never a role noun (`-review`, not `-reviewer`). New checks `P019` (router), `P020` (skills), `P021` (agents), `P022` (commands), `P023` (role nouns). The scaffolder prefixes with the plugin name and refuses role nouns. +- Router standard: the router skill has an explicit routing table (phrases to exact slug, `| Order | Trigger phrases | Skill | Then |`), tie-break rules, a default (one closed question, never answers the task) and a loading rule (Skill tool with `:`, else the skill's `SKILL.md` by relative path). `evals/router/cases.json` (34 prompts here: at least 2 per skill plus 5 ambiguous) is checked by the new `route_check.py`. New validator checks `P024` (routed slug is not a skill), `P025` (skill unreachable from the router), `P026` (router standard text missing), `P027` (a router eval routes wrong), `P028` (no routing table or no router evals). Section 3a of the router skill. +- Public/private safety in the existing skills (no new skill): `aiaddon-review/references/public-safety.md` (classification, required `.gitignore` preset, `PUBLIC-SAFETY.md` template, the scan, past leak remediation, GitHub switches), referenced from the router and the plan, build, maintain, package, clean and review skills. Plans carry the public/private split and a threat model line; scaffolds include the `.gitignore` preset, `.env.example` (names only), `PUBLIC-SAFETY.md` and `.public-safety-allow` for the author's chosen contact. +- Secret and private-data scan, pure Python standard library: `scan_secrets.py` now covers the working tree (files git would publish), full git history (`--history`, `git log --all -p`) and built artifacts (`--artifacts`, and inside every zip and `.plugin`, nested too), with an allowlist (`.public-safety-allow`). Patterns: GitHub, OpenAI, Anthropic, AWS, Slack and Google keys, private keys, Bearer tokens, password and key assignments, high-entropy strings, e-mails other than noreply or placeholders, absolute user paths (Windows, macOS, Linux), internal hosts, private file names. Every finding is blocking. Engine: `public_safety.py`. New validator checks `X008` (tree), `X009` (`.gitignore` preset), `X010` (`PUBLIC-SAFETY.md`), `X011` (`.env.example`), `X012` (history), `X013` (built packages); `--no-history` skips `X012`. +- Packager: refuses to build or release when the scan finds anything (never bypassed by `--skip-validate`) and scans inside the produced zip or `.plugin`; `build_skill_zips.py` scans each zip and removes one that fails. +- Past leak remediation workflow in the maintain and clean skills: detect, tell the user, rotate or revoke the credential first, rewrite history with `git filter-repo` or BFG, force-push only after explicit user OK (never automatic), re-create affected releases and tags (note forks), ask GitHub Support to purge cached views and PR refs, re-scan to prove zero traces. +- CI: job `public-safety` (full history, working tree and built skill zips) on every push and pull request; push CI also runs on `next`; router check added to the checks job and to the release workflows; release workflows scan the built packages. README notes enabling GitHub secret scanning and push protection. +- Fixture tests in the self-test: a fixture with a fake key fails the scan (tree, history, zip), a clean fixture passes; naming and router violations are caught. + +- Router creation-first rule: a creation request (build me, make me, create, i want claude, turn this into, i need a) routes to `aiaddon-plan` even when it mentions packaging, uploading, publishing, auditing, duplicates or a prompt, unless the target is an existing extension (`!` exclusion phrases in the routing table, mirrored in `route_check.py`); 43 router evals. +- Scan rules for Hugging Face tokens, Stripe keys, JWTs, Slack webhooks, credentials in URLs and absolute drive paths outside the Users folders, with run-time fixtures. The scanner exempts only this plugin's own sources (same folder or identical bytes), never a same-named file in a user plugin; `build_skill_zips.py` refuses when the scanner is missing. + +### Changed + +- Applied the naming standard everywhere (folders, frontmatter names, cross-links, scripts, validator, self-test, evals, CI, release asset names, README, docs). Display names read "AI Add-on Builder". Standards section 1 (Names) now states the naming standard; the older "role or designation" and "acronym prefix never the plugin slug" guidance is replaced by it (the acronym, if the user wants one, becomes the plugin name). +- Version set to 0.1.0 across `plugin.json`, every skill and agent `metadata.version`, README and release names. + +### Removed + +- Retired note about keeping earlier plugin versions (owner, 2026-11-10), removed from `AGENTS.md` together with its marketplace-entry sentence. + +## 0.0.24: Update + +### Changed + +- Fix: the directory validator ignores __pycache__ folders (never part of a plugin), so a leftover .pyc no longer fails the signed release. + +## 0.0.23: aiaddon-clean no-loss gate + +### Added + +- aiaddon-clean no-loss gate: mandatory check before any merge, shorten or de-dup is accepted. Script no_loss_check.py (clause coverage, mapping completeness, strength downgrades, side-by-side file, per-clause pairs for an independent semantic review), reference no-loss-gate.md, rules in SKILL.md (preserve over compress, mandatory fresh-context semantic review, report table), self-tests with a lossy and a clean fixture pair. + +## 0.0.22: Distribution standard + +### Added + +- Reviewer warnings for the SyncWin distribution standard: S021 description over 300 chars, S022 description not trigger-first, S023 skill reading outside its own folder, H008 hook needing python or node with no fallback (S008 already covers a body over 500 lines). +- aiaddon-package/scripts/build_skill_zips.py and a release-plugin.yml step that attach one .zip per skill beside aiaddon.plugin. +- Distribution rules (standards section 7, skills.md, hooks.md, architecture.md, targets.md, directory-checklist.md) and per-skill install paths in the README. + +### Changed + +- Every skill description is now trigger-first: reordered only, every original trigger phrase kept (S021 over 300 chars is advisory). +- The plugin's own guardrail hook and the scaffolded hooks run in plain shell with a python3, python, py fallback and exit 0 when none runs. + +## 0.0.21: aiaddon-clean + +### Added + +- New skill aiaddon:aiaddon-clean: deep clean-up and de-duplication of plugins and skills without losing anything unique. Script-only inventory (files, headings, normalized line hashes, exact and near-duplicate paragraphs by shingle Jaccard), overlap map, a plan where every merge or removal lists where each unique line lands (keep-unique proof), a hard stop for operator approval, smallest diffs, and a before/after proof. Dry-run by default; never deletes (archive folder); Python standard library only, Python 3.9, no bytecode. +- Scripts `inventory.py`, `prove.py` (fails on any lost unique line) and `archive.py` (dry-run move); references `workflow.md` and `plan-template.md`. +- Behavior test `clean-duplicate-plugin` (fixture with a duplicated paragraph and a unique line that must survive), trigger phrases, and self-tests for the three scripts. +- Registered in the router (mode and route table) and the README skill table. + +## 0.0.20: Short skill names and script-path rule + +### Added + +- Hard rule E9: skills that run scripts copy the needed scripts once per session into the working folder (for example `./tools/`) and run them from there; never a `/root/.claude` or `~/.claude` path in a shell command (standards 5c, router, aiaddon-build, aiaddon-review). +- E10: validator `R001` (error) for a shell command naming `/root/.claude` in SKILL.md, commands, agents or hooks, and `R002` (warning) for `~/.claude`. The packager refuses to package while `R001` exists, even with `--skip-validate`. Self-tests: one failing and one passing fixture. + +### Changed + +- Skills share one short prefix (folders, frontmatter, every cross-reference, evals, docs): router `aiaddon` and stage skills `aiaddon-plan`, `aiaddon-build`, `aiaddon-review`, `aiaddon-maintain`, `aiaddon-package`, `aiaddon-prompt`. Content is otherwise unchanged. +- The router slug may be the short prefix shared by the stage skills; validator P009 and the install simulator accept it. +- Skill names no longer contain `claude`, so single-skill uploads are not rejected on that rule. + +## 0.0.19: Research before building + +### Added + +- GitHub Actions workflow `release-plugin.yml` builds `aiaddon.plugin` and attaches it to each v* release and keeps a rolling `next` pre-release updated on every push to the next branch (README links). + +### Changed + +- Standing rule: research before building. Check current official docs and widely recommended, secure practice before choosing an approach, file, tool, config or dependency; cite the source; mark anything unverified; never guess; keep research scoped to the task. + +## 0.0.18: Companion prompt in Markdown + +### Added + +- Markdown companion prompt. Every packaged plugin can ship ` v prompt.md` (raw Markdown, ASCII only, `` and `` tags, {{variables}}) next to the package. It is generated from the same source as the Prompt Builder JSON (companion_prompt.py `to_markdown`, `--to-md`), so the two never drift. +- `--prompts md|json|both` (default both) on package_extension.py, install_guide.py and `--formats` on companion_prompt.py. +- aiaddon-package/references/prompt-builder.md holds `prompt_builder_url` and the one-line, neutral Prompt Builder note. + +### Changed + +- aiaddon-package asks the user once which prompt files they need (Markdown, JSON, both) and mentions Prompt Builder only when relevant. +- The install guide explains the prompt files. +- Selftest covers the Markdown output, the three choices, and `--to-md`. + +## 0.0.17: Prompt Builder + +### Added + +- New skill aiaddon:aiaddon-prompt. Crafts new prompts, tightens existing ones, and makes templates with {{variables}} for any AI model: intake, batched clarifying questions, Markdown draft with XML tags where they help, tighten pass, validation checklist. References for method, structure patterns, platform tips (Claude, OpenAI, Gemini, local models), and credited sources. +- Prompt Builder JSON export. skills/prompt-builder/scripts/export_prompt.py reuses the packager companion_prompt.py schema and checker to emit ready-to-import files. +- ascii_check.py. Generated prompts are ASCII only: the script normalizes common look-alikes (smart quotes, dashes, arrows, check marks, ellipsis) and fails on any other non-ASCII character. +- Three behavior tests (craft, tighten, template with JSON) and new trigger phrases. + +### Changed + +- The router routes prompt requests to prompt-builder. +- Companion prompt files keep plain text. Field text is no longer HTML-escaped on export, because Prompt Builder escapes on import and the old output showed double-escaped characters; the checker now fails on HTML entities and non-ASCII characters in title, description, content, and field text. The Predefined field type from the Prompt Builder repo is accepted. + +### Fixed + +- prompts/ai-add-on-builder.json carried HTML entities; rewritten as plain text. + +## 0.0.16: Update + +### Changed + +- Security first. A shared secure-by-default checklist in standards 5c (exec-form commands, quoted plugin paths, path containment, no secrets, declared hosts, fail-closed guards and fail-open nag hooks, confirm destructive writes). The planner adds a three-line threat model to the plan, the developer builds to the checklist, and the reviewer treats any breach as a blocking Critical or Important finding. +- Hook reference states the failure mode rule: guards fail closed (exit 2), advisory hooks fail open (exit 0). + +### Fixed + +- Scripts no longer crash on Windows cp1252 consoles: every script reconfigures stdout and stderr to UTF-8 (the packager failed printing its scratchpad arrow). + +## 0.0.15: Marketplace and release guidance + +### Added + +- Distribution routes: one repo and one marketplace per product; pick the marketplace name once (distinctive, `-`); what a rename does to existing installs; where users add a marketplace on claude.ai, desktop and mobile versus Claude Code, and why not both; uploaded `.plugin` files never update; how updates arrive and how to prove a repo with an isolated `CLAUDE_CONFIG_DIR` install. +- Release prep: `displayName` in `plugin.json` and the marketplace entry, an `icon` (the square PNG under `./assets/`), and a README that lists every `/:` command. +- Directory route: push nothing to the default branch while a submission is in review; use a separate branch and merge after. +- Standards: names an extension generates on users' projects (such as class prefixes) never hardcode the author's company; ask once, record, neutral default. + +### Changed + +- Versions: set `version` in `plugin.json` only, never also in the marketplace entry (per Claude's host-marketplace docs). + +### Fixed + +- Packager: on Windows an unchanged package was always rebuilt, because the source and package hashes sorted files differently. Both now sort by POSIX path (selftest 117/117). + +## 0.0.14: Icon and listing name + +### Added + +- Plugin icon (a PNG and an SVG under `assets/`), set in `plugin.json`. +- The marketplace entry shows the display name "AI Add-on Builder". + +## 0.0.13: First public release + +Released after the final self-audit, run from an installed copy, and the first live `claude plugin eval` run. + +### Added + +- Composio is declared by default in every plugin the scaffolder makes, at Composio's shared address `https://connect.composio.dev/mcp`. Each user signs in with their own account, so no personal link ships. `--no-composio` leaves it out, and the plan shows it as a default the user can drop. +- Connector guidance: shared addresses versus personal links (personal links go through `userConfig`), and how to avoid loading a connector twice. Claude Code skips a plugin connector only when its address matches one the user already has, so the validator compares against `--known-connectors` (names, URLs, or a `claude mcp list` dump) and flags a different address for the same service (`M008`). +- `userConfig` checks (`P018`): option keys, required fields, types, and unknown keys that would stop the plugin loading. +- Quality checks: repeated rules across skills (`S017`) or copied from project instructions with `--rules CLAUDE.md` (`S018`), oversized skill and reference files (`S016`), skills the router never names and agents no skill uses (`S019`, `A006`), drifted shared files (`F001`), and missing behavior tests (`E004`). +- `--cache` on the validator reuses the last passing result when no file and no option changed. The packager records a content hash in each package and keeps an unchanged one instead of re-checking and rebuilding it (`--force` rebuilds). +- `aiaddon-maintain/scripts/bump_version.py`: one summary becomes the changelog entry and moves every version field (manifest, its metadata, marketplace entry, every skill and agent, README). `--level keep` adds to the current entry without a bump. +- `aiaddon-maintain/scripts/release_diff.py`: files kept, changed, added, and dropped between two versions, from folders or packages. The packager prints it against the previous package. +- `aiaddon-maintain/scripts/sync_shared.py`: shared files live once and are copied into each skill from `.claude-plugin/shared-files.json`, so plugins no longer need their own copy scripts. +- `aiaddon-review/scripts/scan_secrets.py`: scans the extension folders or packages you name for keys stored in plain text. Values are masked, nothing is sent, and CI runs it on this repository. +- `aiaddon-package/scripts/install_guide.py`: install and removal steps for the desktop app, the web, the Code tab, and the terminal, written next to every package. +- Behavior tests are a release step: every callable skill runs against its test prompts and is graded by a separate grader before packaging. The packager reports missing or stale results, and `--require-evals` blocks the build. +- Standards: enforcement and accountability (§5d: routed and gated stages, declared dependencies, scripts as gates), plan-first efficiency, and the lean-but-complete quality bar. +- `aiaddon-build/references/local-models.md`: when a small local model such as a DeBERTa prompt-injection classifier helps (an opt-in Claude Code guardrail add-on) and when it doesn't, based on Red Hat's October 2026 benchmark, plus where Docker Agent, MCP Gateway, and Model Runner fit. +- Platform facts verified 2026-10-11: plugin installs and removal on every surface, the Connectors tab, connector de-duplication, and Composio Connect. +- Request ledger: every scratchpad, in AI Add-on Builder and in the extensions it builds, opens with one row per request the user made (Request, Status, Context), so finished and open work are both accounted for. The validator warns when a scratchpad format has no ledger (`S020`). +- Python routing evaluated and not adopted: on 60 labeled requests, lexical and trained stand-ins for Laya and DeBERTa picked the right skill 42% to 58% of the time, below what Claude does from the descriptions. Numbers and the revisit condition are in `aiaddon-build/references/local-models.md`. +- Injection screen: `aiaddon-review/scripts/screen_text.py` with a 67 KB model learned from two small Apache-2.0 datasets (deepset/prompt-injections, jackhhao/jailbreak-classification). Pure Python, no downloads. Held out: precision 0.96 to 0.97, recall 0.96 on jailbreaks and 0.63 on subtler injections, no false alarms on skill docs. The validator screens skill and agent text (`X005`), docs refreshes screen fetched pages, and the scaffolder adds it as a `PostToolUse` guardrail hook to generated plugins with connectors (`--no-guardrail`). DeBERTa (568 to 739 MB) and Laya (808 MB) were not bundled: too large for a plugin. +- 35 self-tests (102 in total) for the new checks and scripts. +- AI Add-on Builder declares its own connector: Composio at the shared address `https://connect.composio.dev/mcp` (`.mcp.json`), so its plugin page shows a Connectors tab. Nothing personal ships; each user connects and signs in with their own Composio account. The packager uses it to push and release on GitHub, and any role can use it when a build needs an outside app. Every skill still works without it. + +### Changed + +- Directory review: `scan_secrets.py` no longer has `--installed`, which swept `~/.claude` and Cowork's plugin folders for keys. It scans only the folders you name, so the plugin never reads credentials from the user's machine on its own. +- Directory listing icon added (1024 px square PNG). +- Directory review checks: the validator's `--target directory` now reports what Anthropic's portal holds or warns about, so plugins AI Add-on Builder builds pass on the first try: values read from the user's environment or home folder (`D014`), image file names in scripts or code spans and the `icon` field (`D015`), and hooks that download or install code (`D016`). The directory checklist explains each one, the packager makes the listing icon before release (a plain-words step, so no script ever points at an image), and four self-tests cover it (117 in total). +- Guardrail hook now uses exec form (`python3` plus the script path), in AI Add-on Builder and in every plugin it builds, so the directory can read exactly what runs. Where `python3` is missing the hook fails without blocking. +- Directory review: example connector settings use `${user_config.KEY}`, the self-test no longer copies the environment, and the validator's cache folder is set with `--cache-dir` instead of an environment variable, so nothing reads credentials from the user's machine. +- Credits: removed the `skill-creator-plus` entry. +- Docs: shorter plugin description that names claude.ai too; the README status now says exactly what CI runs. +- The audit test's sample skill no longer tells Claude to email anything, so a security scan has nothing to misread. It still has plenty to fail on: vague descriptions, no manifest or license, and an agent with no tool limits. +- Final self-audit from the installed build: + - Scoping now matches the router: defaults go in the plan, with at most three questions asked alongside it. Author, company, license, and acronym appear as plan defaults instead of separate questions, and packaging uses the target the plan settled instead of asking again. + - The developer skill hands any build without an approved plan to the planner, and the planner no longer claims to run before the router. + - Acronym prefixes are optional everywhere (architecture, add-on naming, this changelog), matching the standards. + - Fixed contradictions: the contents-list threshold is 100 lines in every file, the manifest reference points to its current docs address, the platform-facts header shows its full date range, and the README describes CI exactly. + - The companion prompt guide lists all five validator codes (`C000` to `C004`), the GitHub asset example uses the full display name, and the Ponytail credit links to its repository. +- Two self-tests (67 in total): a `Text` field with no length limit passes, and a zero `maxLength` is rejected. +- README, SECURITY.md, the standards, and the GitHub reference now say the plugin declares one connector instead of none, and the README has a connector table (who uses it, for what, and what happens without it). +- AI Add-on Builder now runs its own injection guardrail: `hooks/hooks.json` screens the output of web fetches, web searches, and Composio calls (and no other tool) with the bundled 67 KB screen, warns Claude on a hit, and fails open. Claude Code and Cowork; README, SECURITY.md, and `local-models.md` describe it. +- `claude plugin validate . --strict` passes with the connector and hook in place. +- Live evals run again from a clean container (2026-10-12), which exposed two fixes: + - Packaging: the zip's top folder is now the skill or plugin `name`, not whatever the source folder is called, and a read-only source is packaged from a temp copy instead of being written to. One of three packaging runs had failed on this; after the fix, 3 of 3 passed. + - Audits: each problem type gets a table of Original and Corrected, and a Corrected cell must be the replacement text itself, never an instruction such as "add install steps". Claude rereads the cells before sending. The reviewer's description now says to load it before reading the files: the skill went from loading in 1 of 3 audit runs to 6 of 6, and the audit case from 0.00 to 0.75 over six runs. + - The router also answers to "what's wrong with this plugin or skill". + - Full suite after the fixes (2026-10-12): 0.93 overall (from 0.73), 0.67 above the same runs without the plugin. +- Three self-tests (105 in total): the zip's top folder, a read-only source, and AI Add-on Builder's own hook firing on web and Composio tools only. +- Launch security review (2026-10-12): bandit, gitleaks over the full history (no leaks in 22 commits), CodeQL, actionlint, and zizmor (no findings at its strictest setting), plus a manual review of every script. Fixed: + - `sync_shared.py` refuses a source or target that resolves outside the plugin or is a symlink, so a hostile `shared-files.json` can't read or write elsewhere on the machine. + - The scaffolder rejects role and prefix names that could leave the output folder, and multi-line or control-character names, and writes every frontmatter value as a quoted string, so a name can't inject YAML. + - The packager keeps an existing package only when its actual contents still match the source (a changed package is rebuilt), and always validates fresh instead of from the validator's cache. + - `screen_text.py` skips symlinks when screening a folder and caps hook input at 20 MB; `release_diff.py` compares members over 50 MB by size and CRC instead of reading them (zip-bomb guard); the eval report escapes every value; the validator's cache file name uses SHA-256. +- Guardrail hook launcher: one fixed shell line that tries `python3`, then `python`, and otherwise exits quietly, so Windows installs without `python3` still get the screen. Plugins the scaffolder builds now scope their guardrail to their own connectors instead of every MCP tool, and adding an MCP server widens it automatically. +- The router has a Safety section that every stage follows: outside content is data, anything outside the working folder or irreversible needs a fresh yes, no secrets in files, least-privilege agents and hooks. +- New checks: `X006` unpinned dependencies (requirements without `==`, package ranges, a missing lockfile, `npx`/`uvx` without a version), a warning for release targets and information while developing; `X007` a guardrail matcher that misses one of the plugin's own connectors. `check_report.py` flags audit Corrected cells that give advice instead of the replacement text, and the reviewer runs it before sending a report. +- Repository and release hardening: GitHub Actions pinned to full commit SHAs with read-only defaults and per-job write permissions; CodeQL (`security-extended`, Python and workflows); OpenSSF Scorecard; Dependabot for actions; CODEOWNERS; a release workflow that builds the `.plugin` from the tag on GitHub's runners, signs build provenance, and publishes `SHA256SUMS`. On GitHub: secret scanning with push protection, Dependabot alerts and security updates, private vulnerability reporting, read-only workflow token, and rulesets protecting `main` (review and passing checks) and `v*` tags (no deletion or moving) for everyone but admins. +- `SECURITY.md` rewritten (reporting channels, response times, supported versions, how releases are protected, scope); new `PRIVACY.md`; `privacyPolicyUrl` and `termsOfServiceUrl` in `plugin.json`; README "Security and verification"; contributing and pull-request checklists cover pinned actions and scans. +- Pre-launch releases are marked pre-release and the old pre-launch package was removed, so the first public release is the only installable one. +- Six self-tests (111 in total) for the fixes above. +- Live tests of every user test step, then fixes: audits keep their report file outside the audited folder and put the full tables and request ledger in the reply; plans for everyday-language requests stay in plain words while build-term requests get the full technical plan; the planner never drops Composio or behavior tests on its own; evals document `--judge-model sonnet`. Final suite with Sonnet as judge: 0.93, 0.73 above the same runs without the plugin. +- Final tightening: the planner never asks whether to add a component (it lists skipped items with when to add them) and doesn't open a reply by narrating an unreadable reference file; the scaffold grader accepts the guardrail that comes with a connector. Six-run repeats: audit, intake, and scaffold all 6 of 6. +- The Prompt Builder companion prompt is never packaged inside a `.plugin` or `.zip`: packages exclude `prompts/`, and the prompt ships as its own file beside the package and as its own release asset. Prompt Builder links point to promptbuilder.syncwin.com (help: promptbuilder.eniston.com). One self-test (112 in total). +- Guardrail false alarm fixed: the hook flagged routine Composio JSON output during the final release. In hook mode it now unpacks JSON inside tool output and scores only prose-like passages, so data no longer trips it while an attack hidden in a JSON string is still caught. One self-test (113 in total). + +### Fixed + +- One-skill plugins: the planner now names the single skill after the plugin and skips the router, instead of either adding an empty router or leaving no entry skill. Two or more skills still get a router, and role skills carry the user's acronym when one is set. +- Intake: the router shows a short plan with its defaults first and asks at most three questions, only ones the user alone can answer. The live eval caught it opening with a five-question list. +- Eval suite: the audit and packaging cases had nothing to work on. Each now ships a sample in `fixture/notes-helper`: a deliberately flawed plugin for the audit, a clean skill for packaging. Neither has its own manifest. The packaging case is now `package-skill-upload` and may run the bundled scripts, and the scaffold case's grader follows the one-skill rule. +- Companion prompts: `Text` (single-line) fields are confirmed against a real Prompt Builder export and no longer warned about; `maxLength` may be `""` for no limit on `Text` and `Textarea`. +- Script reports and the scratchpad template no longer use dashes in headings; number ranges in references read "2 to 4". +- Connector check now agrees with `claude plugin validate`: a remote connector with an empty `url` passes (it reports it as info, `M009`), a remote connector with no `url` at all is an error, and a `${user_config.KEY}` that `userConfig` doesn't declare is an error (`M007`). Before, the empty address was wrongly an error and the undeclared setting slipped through. +- The secret check covered only the skills folder. It now scans the whole plugin, including server code, catches key-like values such as `CRM_API_KEY = "..."` (`X003`), and flags a committed `.env` file (`X004`). +- The packaging reference repeated the packager's target rule word for word; the new overlap check found it, and it now points to the skill instead. +- Live eval findings (2 of 5 cases passed on the first run after these changes). The validator refused a plugin folder with no manifest, so audits fell back to reading files; it now audits it and reports the missing manifest (`P001`, an error for the directory and Cowork). Audit reports give every finding, including a missing file, an exact Original and Corrected version instead of advice such as "add one". The packager's report and hand-over now state the validation result. The planner's plan always states version 0.0.1, every skill name (one skill is named like the plugin), and the connectors, with Composio as the default. The scaffold case's grader accepts Composio as a listed default. The router's description now also matches "audit this plugin folder" and "what's wrong with this skill": the audit runs that failed never loaded the plugin. Full suite on 2026-10-11 after the fixes: overall score 0.73 (from 0.40), 0.53 above the same runs without the plugin; the audit case then passed 3 of 3 on its own. + +## 0.0.12: Self-audit fixes + +Pre-release. Findings from AI Add-on Builder's audit of itself, run from an installed copy. + +### Added + +- Work-on-a-copy rule: attached `.plugin`/`.zip` files and installed plugins are unpacked or copied to a working folder; installed copies are read-only. +- Validator: reserved plugin names (`P016`, matching `claude plugin validate`: `claude-`/`anthropic-` prefixes are errors, `claude` as a word is a warning), directory listing fields (`P017`), and a companion prompt that never names its slash command (`C004`). The listing fields no longer trigger unknown-key warnings. +- The scaffolder refuses reserved plugin slugs. +- `plugin.json`: `documentationUrl` and `supportUrl` for the directory listing. +- Platform facts verified 2026-10-05: listing fields, plugin-name rules, data folder lifecycle, automatic Node installs, rejected outbound symlinks. +- Seven self-tests (65 in total). + +### Changed + +- Packaging reference lists the real exclusions and the companion prompt step; public-release steps name the listing fields. + +### Fixed + +- The router named the skill-folder variables literally, so Claude Code replaced them with real paths and the sentence stopped making sense. It now describes the fallback without the variable names. +- Cowork detection looked only for `mnt/.plugins`, which cloud Cowork sessions don't have. It now also checks `/mnt/user-data/outputs`, and the script-finding fallback searches the plugin folders instead of the whole disk. +- MCP server scaffold: Node dependencies sat in `servers//package.json`, where Claude Code never installs them, and the guidance to install into the data folder didn't work for ES modules. Node dependencies now go in the plugin-root `package.json` (installed by Claude Code when a lockfile is committed). Python servers get a `SessionStart` hook that installs `requirements.txt` into the plugin data folder and a `PYTHONPATH` pointing there. +- `.gitignore` now ignores `dist/`, where the packager writes by default. +- Audits no longer end with "hand over the file" when nothing was built. + +## 0.0.11: Companion prompts, metadata, pre-release hardening + +Pre-release. The first public release waits for the final self-audit from a real install. + +### Added + +- Companion prompt for every extension. `aiaddon-package/scripts/companion_prompt.py` writes a Prompt Builder JSON (`prompts/.json`, format `prompt-builder-plain` 2.0) from the manifest or from a spec, checks it, and copies it next to the package. The packager runs it on every build and stops on a broken prompt; the scaffolder writes a default one. Rules in `aiaddon/references/companion-prompt.md`, checked against the Prompt Builder help center and two real exports. +- AI Add-on Builder's own companion prompt: `prompts/ai-add-on-builder.json` (goal, request, audience, surface, files). +- Validator: companion prompt checks (`C000`-`C003`) and version consistency between the manifest, its metadata, and every skill (`P015`, `S015`). +- Router: how to find the bundled scripts when `${CLAUDE_SKILL_DIR}` is not substituted (Cowork, claude.ai), and what to do with no Python or shell. +- Eight self-tests (58 in total): prompt written by the scaffolder, four broken-prompt cases, spec rewrite keeping the prompt `id`, prompt copied beside the package, no bytecode left in a checked plugin. + +### Changed + +- Metadata everywhere: `plugin.json` has author `@wasimness` with company `SyncWin`, and a `metadata` block with display name, version, author, company, homepage, repository, license, and the companion prompt path. Every skill and agent carries `displayName`, `version`, `author`, `company`, and `plugin`. Generated extensions get the same keys from the scaffolder. +- Planner shows the companion prompt's fields in the one plan approval; developer writes them; reviewer checks them; maintainer refreshes them when skills change (keeping the prompt `id`). +- Scaffolded plugins get a README that passes the directory's 40-word rule (install, companion prompt, disclosure sections), a plain `## 0.0.1: ` changelog heading, and no placeholder author name. +- GitHub procedure: attach the companion prompt to releases and label assets, since GitHub turns spaces in asset names into dots. + +### Fixed + +- The validator left `__pycache__` inside the plugin it checked once it began importing the prompt checker; bytecode writing is now off. +- Scaffold usage example suggested a `claude-` slug, which claude.ai and the API reject for uploaded skills. +- The short-README self-test relied on the scaffold's README being short. + +## 0.0.10: Public launch + +### Added + +- Plain-language start. Run `/aiaddon` with no request, or a vague one, and it asks one question: what should Claude do for you? Technical choices are worked out for you and shown as a short plan with one approval. +- Internal business solutions as their own route. The planner now asks who will use the result (just me, my team, the whole organization) and picks the delivery to match: `.plugin` file, private marketplace, or organization rollout. Company rules and templates become reference files; per-user values become `userConfig`. +- Eval case `plain-language-intake` and two business-use trigger prompts. +- `.github/` for the public repo: CI (self-test, strict directory validation, trigger simulation on Python 3.9 to 3.13), bug and feature issue templates, and a pull request checklist. + +### Changed + +- Publisher in `plugin.json` is now SyncWin; @wasimness is listed as maintainer in `metadata`. +- Extensions built for users carry only the author, company, contact, and repo the user supplies. This plugin's own details are never copied into them. +- GitHub steps (push, tag, orphan cleanup) run only when the user asks for GitHub or keeps an existing repo in sync. The owner is always asked, never assumed, and the first push to a repo is confirmed. +- Docs refresh uses whatever web fetch tool the session has and tells the user first; no specific third-party tool is named. +- README rewritten for first-time users, with a full list of what the plugin runs, reads, and sends. SECURITY, CONTRIBUTING, and CREDITS rewritten for a public audience. +- Router description gained business-process phrasings and dropped a reference to a private skill. + +### Fixed + +- README promised a CI workflow and issue template that the package didn't contain. +- A duplicated heading in this changelog. +- Removed personal and internal notes from references and evals. + +## 0.0.9: Platform layering and public-release hardening + +### Added + +- `aiaddon/references/platforms.md`: layers (`ai-` neutral core, `claude-` today, `chatgpt-` and `gemini-` planned), naming, and the steps for adding a platform. +- `SECURITY.md`, `CONTRIBUTING.md`, an issue template, and a GitHub Actions workflow (self-test, strict directory validation, and trigger simulation on Python 3.9 to 3.12). +- README sections: requirements, security and data handling, troubleshooting. + +### Changed + +- Agents are now thin Claude adapters over one platform-neutral protocol (`aiaddon/references/agent-protocols.md`), so another platform needs only its own thin adapter, not new logic. `aiaddon-grade` and `aiaddon-compare` keep their names and tools and carry an inline fallback. +- Claude-only shared references took the platform prefix: `platform-facts.md` became `claude-platform-facts.md`, `docs-sync.md` became `claude-docs-sync.md`. +- The packager leaves `.github/` out of the `.plugin` file. + +- Not run in a real Claude Code or Cowork install; Windows and macOS are not covered by CI. + +## 0.0.8: Platform-prefix naming (`ai-` neutral, `claude-` Claude-specific) + +### Changed + +- Naming decision: `ai-` marks platform-neutral components and `claude-` marks Claude-specific ones, so ChatGPT and Gemini variants can join later as `chatgpt-*` and `gemini-*`. The router keeps the plugin name; stage skills carry the layer prefix and are invoked as `/aiaddon:aiaddon-plan` and so on. +- `standards.md` §1 records the rule and its trade-off. Skill names containing `claude` are rejected when uploaded on their own to claude.ai or the API; the validator now reports that as info for plugin targets and an error for `--target upload`. + +### Fixed + +- Evals and cross-references follow the new slugs. + +## 0.0.7: Bare role slugs, mods, themes, directory checks + +### Added + +- `aiaddon-build/references/mods.md` (hooks modules, events, mods API, limits, admin settings) and `aiaddon-package/references/directory-checklist.md` (Anthropic directory blocks, holds, scan, submission steps), both verified 2026-10-03. +- Validator: `modules` checks (H006, H007), theme `base`/`overrides` checks (T003, T004), and `--target directory` (D001-D011: name rules, README of 40+ words, license, system files, symlinks, Windows-safe names, file size and count limits, unpinned launchers, non-https MCP URLs). Self-tests grew to 50. +- Theme format details (`name`, `base`, `overrides`, `custom:`) in `components-extra.md`. + +### Changed + +- Role skills and agents dropped the repeated plugin name, because Claude Code already namespaces every component as `:` (a skill named like its plugin shows as `/`). The `ai-` prefix rule is gone; generated extensions get bare stage names unless the user supplies an acronym (`scaffold_extension.py --prefix`). +- `standards.md` records the rule: never repeat the plugin name inside a component name. + +- `claude plugin eval` and `claude plugin validate` have not been run in a real Claude Code install. + +### Fixed + +- The validator reported a mods-only `hooks.json` as an unknown hook event. +- `docs-sync.md` and `platform-facts.md` no longer list mods, themes, or the directory checklist as unfetched. The terminal-config themes page could not be fetched; theme facts rest on the changelog and secondary sources and say so. + +## 0.0.6: Display name, GitHub and release names + +### Changed + +- Display name set to **AI Add-on Builder**; plugin and router slug `aiaddon`. The release download file carries the display name and the version. Install as `aiaddon@syncwin`. +- GitHub is now a standing rule: `syncwin/aiaddon`, with push, tag, and orphan-cleanup steps in `github.md` and `versioning.md`. `repository` and `homepage` are set. +- All skill `metadata.version` values now match the plugin version. + +### Fixed + +- Eval grader patterns follow the router slug (`aiaddon`). + +## 0.0.5: Remaining docs, official evals, organization rollout + +### Added + +- Docs-verified references (2026-10-02): themes and workflow formats, mods pointer, surface-support table (Chat / Cowork / Claude Code), `distribution-routes.md` (routes, release prep, directory process, tags/renames, organization managed-settings keys, seed dirs), Agent SDK skills. +- Evals in the official `claude plugin eval` layout (`evals//prompt.md` + `graders/`): scaffold, audit, Cowork packaging, unrelated-request. `testing.md` documents the format, grader types, flags, CI usage, and exit codes. Trigger sets stay in `evals/evals.json` for `simulate.py`. +- Validator checks for workflows, themes, monitors, LSP, output styles, plugin `settings.json`, and eval suites (60+ checks); findings de-duplicated. +- `selftest.py` grew to 39 checks. + +### Changed + +- `docs-sync.md` source list now comes from `llms.txt` and the `/plugins/…` page layout. +- Originality check: an 8-word overlap scan against the studied skills found only a shell path, example-URL boilerplate, and one line from an earlier skill by the same author. + +- GitHub push pending tools; official evals and the claude.com directory checklist still to be run or fetched. + +### Fixed + +- A stale slug in a new reference was caught by the validator before release. + +## 0.0.4: Platform-neutral slugs, simulator, hardening + +### Added + +- `simulate.py`: offline trigger simulator (calibrated lexical proxy: hit rate, false positives, overlapping descriptions) and install simulator (package, extract to a clean dir, validate the copy, list the components a user would see). +- Held-out trigger prompts in `evals/evals.json`. +- 29-check `selftest.py`: BOM/CRLF, malformed JSON, non-object hooks, missing/empty directories, symlinks, missing version, simulator. +- GitHub publishing procedure in the packager skill's `github.md`. + +### Changed + +- Slugs are platform-neutral: "Claude" appears only in the display name, so other platforms can be added later without renaming slugs. The release download file carries the display name and the version. +- Slug prefix rule is now `ai-` (reserved-word conflict with claude.ai/API uploads is gone). Validator option `--must-contain` now takes a prefix. +- Skill descriptions rewritten with real trigger phrasings after simulation found weak spots. + +### Fixed + +- Validator and packager: tolerate BOM/CRLF, skip symlinks and oversized files, reject non-object manifests/hooks/MCP config without crashing, validate the output directory; packager defaults a missing version. + +## 0.0.3: Gap closure + +### Added + +- References: `components-extra.md` (LSP, output styles, monitors, `bin/`, plugin settings, channels), `mcpb-bundles.md`, `upload-and-api.md` (skills outside plugins, claude.ai/API limits), `github.md` (publish procedure). +- Scripts: `scaffold_mcp_server.py` (Node/Python), `eval_report.py` (HTML review page), `selftest.py` (18 checks). +- Agents: `aiaddon-grade`, `aiaddon-compare`; `evals/evals.json` for the builder itself. +- Authoring rules from Anthropic's skill best-practices (degrees of freedom, plan-validate-execute, one-level references, `ServerName:tool_name`, test across models, evals first). + +### Changed + +- Validator: contents-list threshold 100 lines (official), backslash-path warning. +- Tests run: 18/18 self-tests pass; the builder validates itself with 0 errors. + +- Platform docs bar `claude` in uploaded skill names; this plugin's skills keep it by design (works in the installed plugin flow). + +## 0.0.2: Full in-house coverage + +### Added + +- Self-contained lifecycle coverage built from the official Claude Code docs: manifest and `userConfig`, layout rules, private marketplaces, portable vs Claude-Code-only skill frontmatter, connectors, custom MCP servers, agents, hooks, commands, add-ons, updates per extension type, Cowork packaging and customization, baseline testing and trigger tuning. No dependency on other skills or plugins. +- Scripts (Python 3 only): `validate_extension.py`, `package_extension.py` (`.plugin`/`.zip`, versioned names), `scaffold_extension.py`, `aggregate_results.py`. +- `platform-facts.md` (docs verified 2026-10-01) and `docs-sync.md`. +- Efficiency, lean-build, and security standards; coverage table in README. + +### Changed + +- Every skill name contains `claude` (by design). Upload-target risk documented in standards; validator warns, errors under `--target upload`. +- Author `@wasimness` and company SyncWin on every skill and the plugin; SyncWin never used in names. +- Third-party license files removed; credits only (`CREDITS.md`). +- Router and plugin slug fixed as `aiaddon`. +- Skills default to portable frontmatter (works in claude.ai/API upload); Claude-Code-only fields only when the user confirms a Claude-Code-only target. + +## 0.0.1: Initial structure + +### Added + +- Router plus five role skills (planner, developer, maintainer, reviewer, packager); shared `standards.md` and `scratchpad.md`; `marketplace.json` (owner SyncWin); dormant public-release mode; changelog and README. diff --git a/adapters/claude/CREDITS.md b/adapters/claude/CREDITS.md new file mode 100644 index 0000000..beb5b16 --- /dev/null +++ b/adapters/claude/CREDITS.md @@ -0,0 +1,18 @@ +# Credits + +AI Add-on Builder is an independent implementation. It doesn't fork, copy, or need any third-party skill, plugin, or code at runtime. Every capability was written for this plugin from the official Claude documentation (code.claude.com/docs and claude.com/docs) after studying how other tools approach the same jobs. + +Studied, then rewritten: + +- Anthropic's `/skill-creator`: the test, baseline, grading, and description-tuning loop informed `aiaddon-build/references/testing.md` and `scripts/aggregate_results.py`; its packaging and validation steps informed the packager and reviewer scripts. +- Anthropic's `/create-cowork-plugin` and `/cowork-plugin-customizer`: the Cowork build and customization flow in `aiaddon-package/references/cowork.md` and `aiaddon-maintain/references/updating.md`. +- Anthropic's `plugin-dev` and `mcp-server-dev` plugins: their scope only (what plugin, hook, and MCP authoring should cover). +- [Ponytail](https://github.com/DietrichGebert/ponytail), an open-source Claude skill: the lean-implementation principle. + +Training data for the injection screen (`dev/aiaddon-review/scripts/injection_model.json`, maintainer tooling; the shipped screen is the recipe `aiaddon-review/references/screen-text.md`, weights learned here; no data or model files are redistributed): + +- [deepset/prompt-injections](https://huggingface.co/datasets/deepset/prompt-injections), Apache-2.0. +- [jackhhao/jailbreak-classification](https://huggingface.co/datasets/jackhhao/jailbreak-classification), Apache-2.0. +- Benchmarks consulted, not used as training data: Red Hat's "Benchmarking AI decision models against traditional guardrails" (2026-10-02), covering `protectai/deberta-v3-base-prompt-injection-v2` and Laya. + +Not affiliated with or endorsed by Anthropic. diff --git a/adapters/claude/LICENSE b/adapters/claude/LICENSE new file mode 100644 index 0000000..a2156e7 --- /dev/null +++ b/adapters/claude/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 SyncWin + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/adapters/claude/PRIVACY.md b/adapters/claude/PRIVACY.md new file mode 100644 index 0000000..29a03ec --- /dev/null +++ b/adapters/claude/PRIVACY.md @@ -0,0 +1,27 @@ +# Privacy Policy + +AI Add-on Builder, published by SyncWin. Effective 2026-10-12. + +## What we collect + +Nothing. The plugin has no server, no analytics, no telemetry, and no account. SyncWin receives no data from your use of it. + +## What runs, and where + +- **Instructions** run inside your own Claude session. The plugin ships Markdown only: no scripts and no hooks. Claude follows the recipes with its own read, search and write tools and standard OS or git commands, only in the folders you point it at. +- **The injection screen** is a manual step (`skills/aiaddon-review/references/screen-text.md`): after each web fetch, web search or connector call, Claude screens that output for prompt injection and treats flagged text as data. Nothing is stored or sent. +- **Secret scan:** the scan-secrets recipe reads only the folders you name and shows any key it finds masked. It stores and sends nothing. + +## Services you choose to use + +- **Claude** (Anthropic) processes your conversation as it always does, under Anthropic's own terms and privacy policy. +- **Composio** is used only if you connect it and only for actions you ask for, such as publishing to GitHub. You sign in with your own Composio account, and Composio's privacy policy covers that data. +- **GitHub** is used only when you ask to publish, through your own Composio connection, GitHub connector, or `gh` login. + +## Children + +The plugin is a tool for building Claude extensions and is not directed at children under 18. + +## Changes and contact + +Changes to this policy are recorded in `CHANGELOG.md`. Questions: support@syncwin.com. diff --git a/adapters/claude/PUBLIC-SAFETY.md b/adapters/claude/PUBLIC-SAFETY.md new file mode 100644 index 0000000..6df5c1d --- /dev/null +++ b/adapters/claude/PUBLIC-SAFETY.md @@ -0,0 +1,26 @@ +# Public Safety + +This repository is public. Only what is listed under "May be public" is published. + +## May be public +- Source code, skills, agents and Markdown recipes +- Documentation, README, CHANGELOG, LICENSE +- Generic examples with placeholder values, `.env.example` (variable names only) +- Author contact chosen for publication: support@syncwin.com + +## Never published +- Secrets: API keys, tokens, passwords, private keys, `.env` files, credentials +- Personal data: personal e-mails, phone numbers, addresses +- Client names and data; internal URLs and hosts +- Local absolute user paths; private notes, logs, memory or progress files + +## Where private values live instead +- None: the plugin needs no secrets. Connector sign-ins happen in the user's own account. + +## Checks +- Recipes `skills/aiaddon-review/references/scan-secrets.md` and `public-safety-scan.md` (working tree plus full git history) before every release +- CI runs the same scan on every push and pull request (`.github/workflows/ci.yml`, job `public-safety`) +- Allowed false positives: `.public-safety-allow` (the public contact address above) + +## If something leaks +Rotate the credential first, then remove it from history: `skills/aiaddon-review/references/public-safety.md`, section 6. Never force-push without the owner's explicit OK. diff --git a/adapters/claude/README.md b/adapters/claude/README.md new file mode 100644 index 0000000..d52063d --- /dev/null +++ b/adapters/claude/README.md @@ -0,0 +1,130 @@ +# AI Add-on Builder + +Tell Claude what you want. Use your own words, and AI Add-on Builder turns that into a working Claude skill or plugin. It plans the build, writes the files, checks them, and hands you something you can install, plus a companion prompt you can import into Prompt Builder to start it from a short form. You don't need to know what a manifest or an MCP server is. + +**Download:** [aiaddon.plugin](https://github.com/syncwin/aiaddon/releases/latest/download/aiaddon.plugin) (asset of the latest GitHub release) + +**Version** 0.3.0 · **Author** @wasimness · **Company** SyncWin · **Contact** support@syncwin.com · **License** MIT + +## What you can build + +- **Skills** that teach Claude a task the same way every time: a checklist, a house style, a report format. +- **Plugins** that bundle several skills with agents, hooks, or connectors. +- **Connectors** to the services your work already lives in (Notion, Slack, a CRM, your own API). +- **Agents and hooks** for narrower jobs, such as a reviewer that can only read files or a rule that blocks edits to `.env`. +- **Internal business tools**: your team's onboarding steps, proposal checks, or client reporting, packaged so everyone gets the same result. + +Every plugin it builds comes with Composio already declared, so its skills can reach Gmail, Notion, Slack, a CRM, and 1,000+ other apps. Each person signs in with their own Composio account, so nothing personal is stored in the plugin. Plugins that read outside content also get a small injection guardrail. Say so in the plan if you don't want either. + +It also updates, audits, versions, and packages extensions you already have. One summary of what changed becomes the changelog entry and every version number. Each package comes with install and removal steps for the desktop app, the web, the Code tab, and the terminal. A release report shows how many files were kept, changed, added, or dropped. + +## Quick start + +1. Install the plugin (below). +2. Type `/aiaddon`, or just describe what you want: "make a skill that turns my meeting notes into action items." +3. Answer the few questions only you can answer, usually who will use it and where. +4. Approve the short plan. AI Add-on Builder builds it, checks it, and gives you the file, install steps, and its companion prompt. + +More things to try: + +- "My team forgets steps when we onboard a client. Can Claude help with that?" +- "Add a Notion connector to my plugin." +- "Audit my plugin before I share it." +- "Bump the version and package it for Cowork." + +## Install + +**Claude Code** + +``` +claude plugin marketplace add syncwin/aiaddon +claude plugin install aiaddon@syncwin +``` + +**Cowork or claude.ai**: download the `.plugin` file from the [latest release](https://github.com/syncwin/aiaddon/releases/latest) and upload it as a custom plugin. Once the plugin is listed in Anthropic's directory, you can add it from there instead. + +**One skill only**: every skill is self-contained and attached to each release as `.zip` (for example `aiaddon-review.zip`). On claude.ai, Cowork or desktop, upload it under Customize > Skills. In Claude Code, run `npx skills add syncwin/aiaddon --skill aiaddon-review`. Whole plugin on claude.ai, Cowork or desktop: Customize > Plugins > add the GitHub repo as a marketplace. + +## Companion prompt + +Every extension AI Add-on Builder builds comes with a companion prompt: a JSON file for [Prompt Builder](https://promptbuilder.syncwin.com/), a Chrome extension that keeps prompts as fill-in forms and inserts them into Claude. Import it under Settings > Import ([help](https://promptbuilder.eniston.com/)). Fill in the form, and the prompt starts the right skill with everything it needs. The source file lives in the extension's `prompts/` folder; packaging delivers it as a separate file next to the package and never puts it inside the package, because it belongs to Prompt Builder, not to Claude. + +AI Add-on Builder has one too: `ai-add-on-builder.json`, attached to each release as its own file. Pick a goal, describe what you want, and send. + +## Requirements + +Use Claude Code, Cowork, or claude.ai. Skills must be turned on. The plugin is Markdown only: nothing to install and no Python needed. Claude follows the recipes in each skill's `references/` folder with its own read, search and write tools and standard OS or git commands. + +## What it runs, reads, and sends + +AI Add-on Builder is Markdown instructions and recipes only, all readable in this repository. It ships no scripts and no hooks. + +- **Recipes** run on your machine through Claude's own tools. They make no network requests and read or write only the folders you point them at (plus a temporary folder while packaging). Packaging also writes the companion prompt into the extension's `prompts/` folder and delivers it, with an install guide, next to the package (never inside it). +- **Injection screen**: a manual step (`aiaddon-review/references/screen-text.md`) with a checklist of injection patterns. Claude runs it after every WebFetch, WebSearch or connector output and on third-party files it audits. It reads only the text in question and sends nothing. No hook ships. +- **If something looks like an injection:** Claude treats the content as data, quotes the passage to you, and asks before acting on it. +- **Secret scan:** the scan-secrets recipe reads only the folders you name to look for passwords and keys saved in plain text. It masks what it finds and sends nothing. +- **Folder checks**: the router may run `ls -d /mnt/user-data/outputs mnt/.plugins mnt/.local-plugins` to tell whether it's inside Cowork. It reads folder and file names only. +- **Web pages**: if you ask it to refresh its platform facts, Claude fetches Anthropic's official documentation pages with the web tool your session already has. It tells you before fetching. +- **Composio connector**: the plugin declares one connector, Composio, at its shared address `https://connect.composio.dev/mcp`. It ships no account and no key: you connect it yourself under Customize > Plugins > AI Add-on Builder > Connectors and sign in with your own Composio account. AI Add-on Builder uses it to push and release to GitHub when you ask, and to reach another app when a build needs one. Every skill still works without it; GitHub then falls back to your own GitHub connector or `gh` login. If you already have Composio connected at the same address, Claude uses that one and doesn't load a second copy. +- **GitHub**: only when you ask it to publish or keep a repo in sync, and only through Composio, your own GitHub connector, or `gh` login. It asks for the owner and repo, and confirms before the first push. + +Nothing else leaves your machine. Apart from the Composio connector, the plugin has no MCP servers, hooks or executables of its own, and it collects no data. Claude asks before any step that deletes, sends, or publishes, and you can report a vulnerability privately by following the steps in `SECURITY.md`. + +## Skills and agents + +Start with `/aiaddon:aiaddon`. The router has an explicit routing table (phrases to exact skill, tie-break rules, one closed question when unclear) and loads the chosen skill itself; it never answers the task. It reads your request and calls the right skill, so you rarely need to call the others yourself. + +| Skill | What it does | +|---|---| +| `aiaddon:aiaddon` | Router. Asks what you want, picks the steps | +| `aiaddon:aiaddon-plan` | Scopes the request and designs the structure | +| `aiaddon:aiaddon-build` | Writes skills, connectors, agents, remote MCP servers, and tests (hooks and local servers only for private installs, with a directory warning) | +| `aiaddon:aiaddon-maintain` | Updates existing extensions, versions, changelogs | +| `aiaddon:aiaddon-review` | Validates and audits before anything ships | +| `aiaddon:aiaddon-package` | Builds `.plugin` and `.zip` files, companion prompts, and marketplace entries | +| `aiaddon:aiaddon-clean` | Deep clean-up and de-duplication with a keep-unique proof; dry-run, plan approval, never deletes | +| `aiaddon:aiaddon-prompt` | Writes, tightens, and templates prompts for any AI model; exports Prompt Builder JSON | + +Agents: `aiaddon:aiaddon-grade` grades test runs against their assertions, and `aiaddon:aiaddon-compare` compares two outputs blind. + +| Connector | Used by | For | Without it | +|---|---|---|---| +| Composio (`https://connect.composio.dev/mcp`) | `aiaddon:aiaddon-package`, and any role when a build needs an outside app | Pushing, tagging, and releasing on GitHub; reaching other apps a build depends on | Skills work as usual; GitHub goes through your own GitHub connector or `gh` | + +**Naming.** Router skill = plugin name (`aiaddon`); every other skill and agent is prefixed `aiaddon-` and named for an action (`aiaddon-review`, not a role noun). The validator enforces this for every extension it builds. Other platform layers could sit beside this one later (`skills/aiaddon/references/platforms.md`). + +## Public safety + +Everything this plugin creates is treated as a public repository, even when you never say so. Each plan states what is public (source, docs, generic examples) and what stays private (keys, tokens, passwords, personal data, client names, internal URLs, local user paths, logs, memory files). Every scaffold includes a `.gitignore` preset, a `.env.example` with names only, and a `PUBLIC-SAFETY.md`. + +- **Scan, blocking:** the recipes `aiaddon-review/references/scan-secrets.md` and `public-safety-scan.md` check the working tree, every line of git history (`git log --all -p`) and the contents of built `.zip` and `.plugin` files, with standard git and OS commands. Allowed false positives go in `.public-safety-allow`. +- **Enforced three ways:** the validator (`X008` to `X013`), the packager (refuses to build or release on any finding and scans inside the produced zip), and CI (job `public-safety` on every push and pull request). +- **If something already leaked:** detect, tell the user, rotate or revoke the credential first, rewrite history with `git filter-repo` (or BFG), force-push only after your explicit OK, re-create affected releases and tags, ask GitHub Support to purge cached views and pull-request refs, then re-scan to prove zero traces. Steps: `skills/aiaddon-review/references/public-safety.md`. +- **Turn on GitHub's own protection** for every public repository: Settings > Code security > secret scanning and push protection (and private vulnerability reporting). They complement this scan; they do not replace it. + +## Security and verification + +Each release `.plugin` is built from its tagged commit on GitHub's runners and signed with a build-provenance attestation, and the release lists its SHA-256 checksums. To check a download before you install it: + +``` +gh attestation verify "aiaddon.plugin" --repo syncwin/aiaddon +sha256sum -c SHA256SUMS +``` + +Every change also runs CodeQL, a secret scan, the injection screen, and the full self-test suite, with GitHub Actions pinned to exact commits. Report a vulnerability privately as described in `SECURITY.md`. The plugin collects no data (`PRIVACY.md`). + +## Troubleshooting + +- **A skill doesn't trigger.** Say what you want in plain words ("audit my plugin") or call `/aiaddon` directly. To check the descriptions offline, follow `aiaddon-review/references/simulate.md`. +- **Validation fails.** Follow `aiaddon-review/references/validate-extension.md` (strict) on the folder and fix the listed codes. Each message names the file and the rule. +- **A skill upload is rejected on claude.ai.** Skill names that contain `claude` can't be uploaded alone. Upload the `.plugin` file instead. +- **A plugin's connector shows "Not added" though you already use that service.** The plugin points at a different address than your own connector, so Claude treats them as two. Run the validator with `--known-connectors "Name=https://your-connector-url"` and use the address it reports. Claude Code skips a plugin connector only when the address matches exactly. +- **A key or password ended up in a plugin.** Follow `aiaddon-review/references/scan-secrets.md` on the plugin folder, move each value it finds into the plugin's settings, and rotate the key, since anyone who received a copy still has it. + +## Status + +Version 0.3.0. Maintainer CI (dev tools in `dev/`, not shipped): every push to `main` and every pull request runs the 195 self-tests and 43 router cases, the directory validator, the secret scan, the injection screen, and the trigger simulation on Python 3.9 to 3.13, and `claude plugin validate --strict` passed before release. The `evals/` folder holds five live cases for `claude plugin eval`; the last full run (2026-10-12, Sonnet as judge) scored 0.93, 0.73 above the same tasks without the plugin; six-run repeats scored 1.00 on audits, intake, and scaffolding. Run them yourself with `claude plugin eval . --allow-tools Bash Write Edit --judge-model sonnet` (the shell cases need the sandbox tools bubblewrap and socat on Linux; the default small judge misreads long, table-heavy replies). Platform facts were checked against Anthropic's documentation on 2026-10-11. If you find a mismatch, please open an issue. + +## Contributing and credits + +Issues and pull requests are welcome; see `CONTRIBUTING.md`. Credits are in `CREDITS.md`. AI Add-on Builder is an independent project by SyncWin, and it is not affiliated with or endorsed by Anthropic in any way. diff --git a/adapters/claude/SECURITY.md b/adapters/claude/SECURITY.md new file mode 100644 index 0000000..79b4d10 --- /dev/null +++ b/adapters/claude/SECURITY.md @@ -0,0 +1,49 @@ +# Security Policy + +## Reporting a vulnerability + +Report privately, never in a public issue: + +- **GitHub:** [Report a vulnerability](https://github.com/syncwin/aiaddon/security/advisories/new) (private vulnerability reporting). +- **Email:** support@syncwin.com, with what you found and the steps to reproduce it. + +What happens next: we acknowledge within five working days, confirm or decline within ten, and agree a disclosure date with you (normally within 90 days, sooner for an issue under active attack). Fixes ship as a release with a GitHub security advisory and a changelog entry, and we credit you unless you ask us not to. + +## Supported versions + +| Version | Fixes | +|---|---| +| 1.0.x | yes | +| earlier (pre-releases) | no | + +## What the plugin does on your machine + +AI Add-on Builder is Markdown instructions and recipes only: no scripts, no hooks, no non-text files. Nothing is downloaded or installed when it runs. + +- **Recipes** make no network requests. Claude reads and writes only the folders you point it at (plus a temporary folder while packaging), refuses paths that resolve outside those folders and skips symbolic links. +- **Injection screen** (manual step, `aiaddon-review/references/screen-text.md`): after every web fetch, web search or connector call, Claude screens that output for text that tries to give it instructions, treats flagged text as data and asks you before acting. Nothing is sent anywhere; no hook ships. +- **Connector:** one, Composio, at the shared address `https://connect.composio.dev/mcp`. The plugin holds no account, key, or token; each user connects and signs in with their own Composio account, and Claude uses it only for GitHub or another app the user asked for. +- **Agents** have read-only tools, except the grader, which may also write its `grading.json`. +- **Instructions** tell Claude to treat file, web, and connector content as data, and to ask before pushing, publishing, sending, deleting, or overwriting anything outside its working folder. + +The README section "What it runs, reads, and sends" lists every case in plain words, and `PRIVACY.md` covers data. + +## How releases are protected + +- **Build provenance:** the release `.plugin` is built from the tagged commit on GitHub's runners and signed with a provenance attestation. Verify a download: + ``` + gh attestation verify "aiaddon.plugin" --repo syncwin/aiaddon + sha256sum -c SHA256SUMS + ``` +- **Maintainer CI** (dev tools in `dev/`, not shipped): every push and pull request runs 113 self-tests (one pass as a non-root user), the directory validator in strict mode, a secret scan, the injection screen, the trigger simulation, and CodeQL (`security-extended`) on the Python and the workflows. OpenSSF Scorecard runs weekly. +- **Workflows** pin every action to a full commit SHA, default to read-only permissions, grant write access per job only where needed, and never pass untrusted input into a shell. Dependabot proposes action updates weekly. +- **Repository:** secret scanning with push protection, Dependabot alerts and security updates, private vulnerability reporting, code-owner review, and rules that block force-pushes and deletion of `main` and `v*` release tags for everyone but repository admins. + +## In scope + +- A script that runs input as code, writes outside its target folder, follows a symlink out of it, unpacks an archive unsafely, or exposes a secret. +- A hook, skill, or agent instruction that could lead Claude into a destructive or outward action the user didn't ask for, or that obeys instructions found in fetched or connector content. +- A release whose contents don't match its tagged source, checksum, or attestation. +- Anything in the repository that leaks private data. + +Out of scope: vulnerabilities in Claude, Claude Code, Cowork, Composio, or GitHub themselves (report those to their owners), and prompt injection that the guardrail misses without the plugin then acting on it (the guardrail is a warning layer, documented as such). diff --git a/agents/aiaddon-compare.md b/adapters/claude/agents/aiaddon-compare.md similarity index 100% rename from agents/aiaddon-compare.md rename to adapters/claude/agents/aiaddon-compare.md diff --git a/agents/aiaddon-grade.md b/adapters/claude/agents/aiaddon-grade.md similarity index 100% rename from agents/aiaddon-grade.md rename to adapters/claude/agents/aiaddon-grade.md diff --git a/assets/icon.png b/adapters/claude/assets/icon.png similarity index 100% rename from assets/icon.png rename to adapters/claude/assets/icon.png diff --git a/evals/evals.json b/adapters/claude/evals/evals.json similarity index 100% rename from evals/evals.json rename to adapters/claude/evals/evals.json diff --git a/evals/router/cases.json b/adapters/claude/evals/router/cases.json similarity index 100% rename from evals/router/cases.json rename to adapters/claude/evals/router/cases.json diff --git a/prompts/ai-add-on-builder.json b/adapters/claude/prompts/ai-add-on-builder.json similarity index 100% rename from prompts/ai-add-on-builder.json rename to adapters/claude/prompts/ai-add-on-builder.json diff --git a/skills/aiaddon-build/SKILL.md b/adapters/claude/skills/aiaddon-build/SKILL.md similarity index 100% rename from skills/aiaddon-build/SKILL.md rename to adapters/claude/skills/aiaddon-build/SKILL.md diff --git a/skills/aiaddon-build/references/addons.md b/adapters/claude/skills/aiaddon-build/references/addons.md similarity index 100% rename from skills/aiaddon-build/references/addons.md rename to adapters/claude/skills/aiaddon-build/references/addons.md diff --git a/skills/aiaddon-build/references/agents.md b/adapters/claude/skills/aiaddon-build/references/agents.md similarity index 100% rename from skills/aiaddon-build/references/agents.md rename to adapters/claude/skills/aiaddon-build/references/agents.md diff --git a/skills/aiaddon-build/references/aggregate-results.md b/adapters/claude/skills/aiaddon-build/references/aggregate-results.md similarity index 100% rename from skills/aiaddon-build/references/aggregate-results.md rename to adapters/claude/skills/aiaddon-build/references/aggregate-results.md diff --git a/skills/aiaddon-build/references/commands.md b/adapters/claude/skills/aiaddon-build/references/commands.md similarity index 100% rename from skills/aiaddon-build/references/commands.md rename to adapters/claude/skills/aiaddon-build/references/commands.md diff --git a/skills/aiaddon-build/references/components-extra.md b/adapters/claude/skills/aiaddon-build/references/components-extra.md similarity index 100% rename from skills/aiaddon-build/references/components-extra.md rename to adapters/claude/skills/aiaddon-build/references/components-extra.md diff --git a/skills/aiaddon-build/references/connectors.md b/adapters/claude/skills/aiaddon-build/references/connectors.md similarity index 100% rename from skills/aiaddon-build/references/connectors.md rename to adapters/claude/skills/aiaddon-build/references/connectors.md diff --git a/skills/aiaddon-build/references/eval-report.md b/adapters/claude/skills/aiaddon-build/references/eval-report.md similarity index 100% rename from skills/aiaddon-build/references/eval-report.md rename to adapters/claude/skills/aiaddon-build/references/eval-report.md diff --git a/skills/aiaddon-build/references/hooks.md b/adapters/claude/skills/aiaddon-build/references/hooks.md similarity index 100% rename from skills/aiaddon-build/references/hooks.md rename to adapters/claude/skills/aiaddon-build/references/hooks.md diff --git a/skills/aiaddon-build/references/local-models.md b/adapters/claude/skills/aiaddon-build/references/local-models.md similarity index 100% rename from skills/aiaddon-build/references/local-models.md rename to adapters/claude/skills/aiaddon-build/references/local-models.md diff --git a/skills/aiaddon-build/references/mcp-servers.md b/adapters/claude/skills/aiaddon-build/references/mcp-servers.md similarity index 100% rename from skills/aiaddon-build/references/mcp-servers.md rename to adapters/claude/skills/aiaddon-build/references/mcp-servers.md diff --git a/skills/aiaddon-build/references/mcpb-bundles.md b/adapters/claude/skills/aiaddon-build/references/mcpb-bundles.md similarity index 100% rename from skills/aiaddon-build/references/mcpb-bundles.md rename to adapters/claude/skills/aiaddon-build/references/mcpb-bundles.md diff --git a/skills/aiaddon-build/references/mods.md b/adapters/claude/skills/aiaddon-build/references/mods.md similarity index 100% rename from skills/aiaddon-build/references/mods.md rename to adapters/claude/skills/aiaddon-build/references/mods.md diff --git a/skills/aiaddon-build/references/scaffold-extension-files.md b/adapters/claude/skills/aiaddon-build/references/scaffold-extension-files.md similarity index 100% rename from skills/aiaddon-build/references/scaffold-extension-files.md rename to adapters/claude/skills/aiaddon-build/references/scaffold-extension-files.md diff --git a/skills/aiaddon-build/references/scaffold-extension.md b/adapters/claude/skills/aiaddon-build/references/scaffold-extension.md similarity index 100% rename from skills/aiaddon-build/references/scaffold-extension.md rename to adapters/claude/skills/aiaddon-build/references/scaffold-extension.md diff --git a/skills/aiaddon-build/references/scaffold-mcp-server.md b/adapters/claude/skills/aiaddon-build/references/scaffold-mcp-server.md similarity index 100% rename from skills/aiaddon-build/references/scaffold-mcp-server.md rename to adapters/claude/skills/aiaddon-build/references/scaffold-mcp-server.md diff --git a/skills/aiaddon-build/references/skills.md b/adapters/claude/skills/aiaddon-build/references/skills.md similarity index 100% rename from skills/aiaddon-build/references/skills.md rename to adapters/claude/skills/aiaddon-build/references/skills.md diff --git a/skills/aiaddon-build/references/testing.md b/adapters/claude/skills/aiaddon-build/references/testing.md similarity index 100% rename from skills/aiaddon-build/references/testing.md rename to adapters/claude/skills/aiaddon-build/references/testing.md diff --git a/skills/aiaddon-build/references/upload-and-api.md b/adapters/claude/skills/aiaddon-build/references/upload-and-api.md similarity index 100% rename from skills/aiaddon-build/references/upload-and-api.md rename to adapters/claude/skills/aiaddon-build/references/upload-and-api.md diff --git a/skills/aiaddon-clean/SKILL.md b/adapters/claude/skills/aiaddon-clean/SKILL.md similarity index 100% rename from skills/aiaddon-clean/SKILL.md rename to adapters/claude/skills/aiaddon-clean/SKILL.md diff --git a/skills/aiaddon-clean/references/archive.md b/adapters/claude/skills/aiaddon-clean/references/archive.md similarity index 100% rename from skills/aiaddon-clean/references/archive.md rename to adapters/claude/skills/aiaddon-clean/references/archive.md diff --git a/skills/aiaddon-clean/references/inventory.md b/adapters/claude/skills/aiaddon-clean/references/inventory.md similarity index 100% rename from skills/aiaddon-clean/references/inventory.md rename to adapters/claude/skills/aiaddon-clean/references/inventory.md diff --git a/skills/aiaddon-clean/references/no-loss-check.md b/adapters/claude/skills/aiaddon-clean/references/no-loss-check.md similarity index 100% rename from skills/aiaddon-clean/references/no-loss-check.md rename to adapters/claude/skills/aiaddon-clean/references/no-loss-check.md diff --git a/skills/aiaddon-clean/references/no-loss-gate.md b/adapters/claude/skills/aiaddon-clean/references/no-loss-gate.md similarity index 100% rename from skills/aiaddon-clean/references/no-loss-gate.md rename to adapters/claude/skills/aiaddon-clean/references/no-loss-gate.md diff --git a/skills/aiaddon-clean/references/plan-template.md b/adapters/claude/skills/aiaddon-clean/references/plan-template.md similarity index 100% rename from skills/aiaddon-clean/references/plan-template.md rename to adapters/claude/skills/aiaddon-clean/references/plan-template.md diff --git a/skills/aiaddon-clean/references/prove.md b/adapters/claude/skills/aiaddon-clean/references/prove.md similarity index 100% rename from skills/aiaddon-clean/references/prove.md rename to adapters/claude/skills/aiaddon-clean/references/prove.md diff --git a/skills/aiaddon-clean/references/workflow.md b/adapters/claude/skills/aiaddon-clean/references/workflow.md similarity index 100% rename from skills/aiaddon-clean/references/workflow.md rename to adapters/claude/skills/aiaddon-clean/references/workflow.md diff --git a/skills/aiaddon-maintain/SKILL.md b/adapters/claude/skills/aiaddon-maintain/SKILL.md similarity index 100% rename from skills/aiaddon-maintain/SKILL.md rename to adapters/claude/skills/aiaddon-maintain/SKILL.md diff --git a/skills/aiaddon-maintain/references/bump-version.md b/adapters/claude/skills/aiaddon-maintain/references/bump-version.md similarity index 100% rename from skills/aiaddon-maintain/references/bump-version.md rename to adapters/claude/skills/aiaddon-maintain/references/bump-version.md diff --git a/skills/aiaddon-maintain/references/release-diff.md b/adapters/claude/skills/aiaddon-maintain/references/release-diff.md similarity index 100% rename from skills/aiaddon-maintain/references/release-diff.md rename to adapters/claude/skills/aiaddon-maintain/references/release-diff.md diff --git a/skills/aiaddon-maintain/references/sync-shared.md b/adapters/claude/skills/aiaddon-maintain/references/sync-shared.md similarity index 100% rename from skills/aiaddon-maintain/references/sync-shared.md rename to adapters/claude/skills/aiaddon-maintain/references/sync-shared.md diff --git a/skills/aiaddon-maintain/references/updating.md b/adapters/claude/skills/aiaddon-maintain/references/updating.md similarity index 100% rename from skills/aiaddon-maintain/references/updating.md rename to adapters/claude/skills/aiaddon-maintain/references/updating.md diff --git a/skills/aiaddon-maintain/references/versioning.md b/adapters/claude/skills/aiaddon-maintain/references/versioning.md similarity index 100% rename from skills/aiaddon-maintain/references/versioning.md rename to adapters/claude/skills/aiaddon-maintain/references/versioning.md diff --git a/skills/aiaddon-package/SKILL.md b/adapters/claude/skills/aiaddon-package/SKILL.md similarity index 100% rename from skills/aiaddon-package/SKILL.md rename to adapters/claude/skills/aiaddon-package/SKILL.md diff --git a/skills/aiaddon-package/references/build-skill-zips.md b/adapters/claude/skills/aiaddon-package/references/build-skill-zips.md similarity index 100% rename from skills/aiaddon-package/references/build-skill-zips.md rename to adapters/claude/skills/aiaddon-package/references/build-skill-zips.md diff --git a/skills/aiaddon-package/references/companion-prompt.md b/adapters/claude/skills/aiaddon-package/references/companion-prompt.md similarity index 100% rename from skills/aiaddon-package/references/companion-prompt.md rename to adapters/claude/skills/aiaddon-package/references/companion-prompt.md diff --git a/skills/aiaddon-package/references/cowork.md b/adapters/claude/skills/aiaddon-package/references/cowork.md similarity index 100% rename from skills/aiaddon-package/references/cowork.md rename to adapters/claude/skills/aiaddon-package/references/cowork.md diff --git a/skills/aiaddon-package/references/directory-checklist.md b/adapters/claude/skills/aiaddon-package/references/directory-checklist.md similarity index 100% rename from skills/aiaddon-package/references/directory-checklist.md rename to adapters/claude/skills/aiaddon-package/references/directory-checklist.md diff --git a/skills/aiaddon-package/references/distribution-routes.md b/adapters/claude/skills/aiaddon-package/references/distribution-routes.md similarity index 100% rename from skills/aiaddon-package/references/distribution-routes.md rename to adapters/claude/skills/aiaddon-package/references/distribution-routes.md diff --git a/skills/aiaddon-package/references/github.md b/adapters/claude/skills/aiaddon-package/references/github.md similarity index 100% rename from skills/aiaddon-package/references/github.md rename to adapters/claude/skills/aiaddon-package/references/github.md diff --git a/skills/aiaddon-package/references/install-guide.md b/adapters/claude/skills/aiaddon-package/references/install-guide.md similarity index 100% rename from skills/aiaddon-package/references/install-guide.md rename to adapters/claude/skills/aiaddon-package/references/install-guide.md diff --git a/skills/aiaddon-package/references/package-extension.md b/adapters/claude/skills/aiaddon-package/references/package-extension.md similarity index 100% rename from skills/aiaddon-package/references/package-extension.md rename to adapters/claude/skills/aiaddon-package/references/package-extension.md diff --git a/skills/aiaddon-package/references/prompt-builder.md b/adapters/claude/skills/aiaddon-package/references/prompt-builder.md similarity index 100% rename from skills/aiaddon-package/references/prompt-builder.md rename to adapters/claude/skills/aiaddon-package/references/prompt-builder.md diff --git a/skills/aiaddon-package/references/release.md b/adapters/claude/skills/aiaddon-package/references/release.md similarity index 100% rename from skills/aiaddon-package/references/release.md rename to adapters/claude/skills/aiaddon-package/references/release.md diff --git a/skills/aiaddon-package/references/targets.md b/adapters/claude/skills/aiaddon-package/references/targets.md similarity index 100% rename from skills/aiaddon-package/references/targets.md rename to adapters/claude/skills/aiaddon-package/references/targets.md diff --git a/skills/aiaddon-plan/SKILL.md b/adapters/claude/skills/aiaddon-plan/SKILL.md similarity index 100% rename from skills/aiaddon-plan/SKILL.md rename to adapters/claude/skills/aiaddon-plan/SKILL.md diff --git a/skills/aiaddon-plan/references/architecture.md b/adapters/claude/skills/aiaddon-plan/references/architecture.md similarity index 100% rename from skills/aiaddon-plan/references/architecture.md rename to adapters/claude/skills/aiaddon-plan/references/architecture.md diff --git a/skills/aiaddon-plan/references/scoping.md b/adapters/claude/skills/aiaddon-plan/references/scoping.md similarity index 100% rename from skills/aiaddon-plan/references/scoping.md rename to adapters/claude/skills/aiaddon-plan/references/scoping.md diff --git a/skills/aiaddon-prompt/SKILL.md b/adapters/claude/skills/aiaddon-prompt/SKILL.md similarity index 100% rename from skills/aiaddon-prompt/SKILL.md rename to adapters/claude/skills/aiaddon-prompt/SKILL.md diff --git a/skills/aiaddon-prompt/references/ascii-check.md b/adapters/claude/skills/aiaddon-prompt/references/ascii-check.md similarity index 100% rename from skills/aiaddon-prompt/references/ascii-check.md rename to adapters/claude/skills/aiaddon-prompt/references/ascii-check.md diff --git a/skills/aiaddon-prompt/references/export-prompt.md b/adapters/claude/skills/aiaddon-prompt/references/export-prompt.md similarity index 100% rename from skills/aiaddon-prompt/references/export-prompt.md rename to adapters/claude/skills/aiaddon-prompt/references/export-prompt.md diff --git a/skills/aiaddon-prompt/references/method.md b/adapters/claude/skills/aiaddon-prompt/references/method.md similarity index 100% rename from skills/aiaddon-prompt/references/method.md rename to adapters/claude/skills/aiaddon-prompt/references/method.md diff --git a/skills/aiaddon-prompt/references/patterns.md b/adapters/claude/skills/aiaddon-prompt/references/patterns.md similarity index 100% rename from skills/aiaddon-prompt/references/patterns.md rename to adapters/claude/skills/aiaddon-prompt/references/patterns.md diff --git a/skills/aiaddon-prompt/references/platform-tips.md b/adapters/claude/skills/aiaddon-prompt/references/platform-tips.md similarity index 100% rename from skills/aiaddon-prompt/references/platform-tips.md rename to adapters/claude/skills/aiaddon-prompt/references/platform-tips.md diff --git a/skills/aiaddon-prompt/references/sources.md b/adapters/claude/skills/aiaddon-prompt/references/sources.md similarity index 100% rename from skills/aiaddon-prompt/references/sources.md rename to adapters/claude/skills/aiaddon-prompt/references/sources.md diff --git a/skills/aiaddon-review/SKILL.md b/adapters/claude/skills/aiaddon-review/SKILL.md similarity index 100% rename from skills/aiaddon-review/SKILL.md rename to adapters/claude/skills/aiaddon-review/SKILL.md diff --git a/skills/aiaddon-review/references/check-report.md b/adapters/claude/skills/aiaddon-review/references/check-report.md similarity index 100% rename from skills/aiaddon-review/references/check-report.md rename to adapters/claude/skills/aiaddon-review/references/check-report.md diff --git a/skills/aiaddon-review/references/public-safety-scan.md b/adapters/claude/skills/aiaddon-review/references/public-safety-scan.md similarity index 100% rename from skills/aiaddon-review/references/public-safety-scan.md rename to adapters/claude/skills/aiaddon-review/references/public-safety-scan.md diff --git a/skills/aiaddon-review/references/public-safety.md b/adapters/claude/skills/aiaddon-review/references/public-safety.md similarity index 100% rename from skills/aiaddon-review/references/public-safety.md rename to adapters/claude/skills/aiaddon-review/references/public-safety.md diff --git a/skills/aiaddon-review/references/route-check.md b/adapters/claude/skills/aiaddon-review/references/route-check.md similarity index 100% rename from skills/aiaddon-review/references/route-check.md rename to adapters/claude/skills/aiaddon-review/references/route-check.md diff --git a/skills/aiaddon-review/references/scan-secrets.md b/adapters/claude/skills/aiaddon-review/references/scan-secrets.md similarity index 100% rename from skills/aiaddon-review/references/scan-secrets.md rename to adapters/claude/skills/aiaddon-review/references/scan-secrets.md diff --git a/skills/aiaddon-review/references/screen-text.md b/adapters/claude/skills/aiaddon-review/references/screen-text.md similarity index 100% rename from skills/aiaddon-review/references/screen-text.md rename to adapters/claude/skills/aiaddon-review/references/screen-text.md diff --git a/skills/aiaddon-review/references/selftest-checks-1.md b/adapters/claude/skills/aiaddon-review/references/selftest-checks-1.md similarity index 100% rename from skills/aiaddon-review/references/selftest-checks-1.md rename to adapters/claude/skills/aiaddon-review/references/selftest-checks-1.md diff --git a/skills/aiaddon-review/references/selftest-checks-2.md b/adapters/claude/skills/aiaddon-review/references/selftest-checks-2.md similarity index 100% rename from skills/aiaddon-review/references/selftest-checks-2.md rename to adapters/claude/skills/aiaddon-review/references/selftest-checks-2.md diff --git a/skills/aiaddon-review/references/selftest.md b/adapters/claude/skills/aiaddon-review/references/selftest.md similarity index 100% rename from skills/aiaddon-review/references/selftest.md rename to adapters/claude/skills/aiaddon-review/references/selftest.md diff --git a/skills/aiaddon-review/references/simulate.md b/adapters/claude/skills/aiaddon-review/references/simulate.md similarity index 100% rename from skills/aiaddon-review/references/simulate.md rename to adapters/claude/skills/aiaddon-review/references/simulate.md diff --git a/skills/aiaddon-review/references/validate-extension.md b/adapters/claude/skills/aiaddon-review/references/validate-extension.md similarity index 100% rename from skills/aiaddon-review/references/validate-extension.md rename to adapters/claude/skills/aiaddon-review/references/validate-extension.md diff --git a/skills/aiaddon-review/references/validate-rules-core.md b/adapters/claude/skills/aiaddon-review/references/validate-rules-core.md similarity index 100% rename from skills/aiaddon-review/references/validate-rules-core.md rename to adapters/claude/skills/aiaddon-review/references/validate-rules-core.md diff --git a/skills/aiaddon-review/references/validate-rules-release.md b/adapters/claude/skills/aiaddon-review/references/validate-rules-release.md similarity index 100% rename from skills/aiaddon-review/references/validate-rules-release.md rename to adapters/claude/skills/aiaddon-review/references/validate-rules-release.md diff --git a/skills/aiaddon/SKILL.md b/adapters/claude/skills/aiaddon/SKILL.md similarity index 100% rename from skills/aiaddon/SKILL.md rename to adapters/claude/skills/aiaddon/SKILL.md diff --git a/skills/aiaddon/references/agent-protocols.md b/adapters/claude/skills/aiaddon/references/agent-protocols.md similarity index 100% rename from skills/aiaddon/references/agent-protocols.md rename to adapters/claude/skills/aiaddon/references/agent-protocols.md diff --git a/skills/aiaddon/references/claude-docs-sync.md b/adapters/claude/skills/aiaddon/references/claude-docs-sync.md similarity index 100% rename from skills/aiaddon/references/claude-docs-sync.md rename to adapters/claude/skills/aiaddon/references/claude-docs-sync.md diff --git a/skills/aiaddon/references/claude-platform-facts.md b/adapters/claude/skills/aiaddon/references/claude-platform-facts.md similarity index 100% rename from skills/aiaddon/references/claude-platform-facts.md rename to adapters/claude/skills/aiaddon/references/claude-platform-facts.md diff --git a/skills/aiaddon/references/companion-prompt.md b/adapters/claude/skills/aiaddon/references/companion-prompt.md similarity index 100% rename from skills/aiaddon/references/companion-prompt.md rename to adapters/claude/skills/aiaddon/references/companion-prompt.md diff --git a/skills/aiaddon/references/platforms.md b/adapters/claude/skills/aiaddon/references/platforms.md similarity index 100% rename from skills/aiaddon/references/platforms.md rename to adapters/claude/skills/aiaddon/references/platforms.md diff --git a/skills/aiaddon/references/scratchpad.md b/adapters/claude/skills/aiaddon/references/scratchpad.md similarity index 100% rename from skills/aiaddon/references/scratchpad.md rename to adapters/claude/skills/aiaddon/references/scratchpad.md diff --git a/skills/aiaddon/references/standards.md b/adapters/claude/skills/aiaddon/references/standards.md similarity index 100% rename from skills/aiaddon/references/standards.md rename to adapters/claude/skills/aiaddon/references/standards.md diff --git a/dev/aiaddon-review/scripts/public_safety.py b/dev/aiaddon-review/scripts/public_safety.py index 5d82940..87b0f72 100644 --- a/dev/aiaddon-review/scripts/public_safety.py +++ b/dev/aiaddon-review/scripts/public_safety.py @@ -166,6 +166,20 @@ def load_allowlist(path): rules.append((parts[0].strip(), parts[1].strip(), parts[2].strip() if len(parts) > 2 else "")) return rules +def load_allowlist_for(root): + """Allowlist for a scanned folder: its own .public-safety-allow, else the one at the enclosing repo root (single-branch layout, + where the shipped plugin sits in a subfolder and the maintainer allowlist stays at the repo root). Rules written with the + subfolder prefix (adapters/claude/...) also apply with that prefix removed.""" + root = Path(root).resolve(); own = root / ALLOW_FILE + if own.is_file(): return load_allowlist(own) + for up in root.parents: + if (up / ".git").exists(): + if not (up / ALLOW_FILE).is_file(): break + pre = root.relative_to(up).as_posix() + "/" + rules = load_allowlist(up / ALLOW_FILE) + return rules + [(r, g[len(pre):], v) for r, g, v in rules if g.startswith(pre)] + return [] + def is_text(b): return b"\0" not in b[:2048] diff --git a/dev/aiaddon-review/scripts/scan_secrets.py b/dev/aiaddon-review/scripts/scan_secrets.py index 28a533f..6655e6d 100644 --- a/dev/aiaddon-review/scripts/scan_secrets.py +++ b/dev/aiaddon-review/scripts/scan_secrets.py @@ -74,7 +74,7 @@ def take(rows, base=None): f = r["file"] if base is None else str(Path(base) / r["file"]) out.append((f, r["line"], r["rule"], r["value"], r["kind"], r["where"])) for p in paths: - rules = ps.load_allowlist(allow or (p / ps.ALLOW_FILE if p.is_dir() else ps.ALLOW_FILE)) + rules = ps.load_allowlist(allow) if allow else (ps.load_allowlist_for(p) if p.is_dir() else ps.load_allowlist(ps.ALLOW_FILE)) if p.is_file(): try: take(ps.scan_zip_bytes(p.read_bytes(), str(p), rules)) except OSError: pass diff --git a/dev/aiaddon-review/scripts/selftest.py b/dev/aiaddon-review/scripts/selftest.py index 6d694ab..5a39ebb 100644 --- a/dev/aiaddon-review/scripts/selftest.py +++ b/dev/aiaddon-review/scripts/selftest.py @@ -8,6 +8,7 @@ from pathlib import Path S = Path(__file__).resolve().parents[2] +PLUGIN = S.parent / "adapters" / "claude" # the shipped plugin; dev/ and evals/ sit at the repo root RUN = lambda *a: subprocess.run([sys.executable, *map(str, a)], capture_output=True, text=True) V = S / "aiaddon-review/scripts/validate_extension.py" results = [] @@ -59,8 +60,8 @@ def broken(label, code, mutate, args=()): q = td / "nover"; shutil.copytree(p, q); m = json.loads((q / ".claude-plugin/plugin.json").read_text()); m.pop("version"); (q / ".claude-plugin/plugin.json").write_text(json.dumps(m)) r = RUN(S / "aiaddon-package/scripts/package_extension.py", q, "--format", "zip", "--skip-validate", "--out", td / "o3"); check("packager defaults missing version", r.returncode == 0 and any("v0.0.1" in x.name for x in (td / "o3").glob("*.zip")), r.stdout + r.stderr) r = RUN(S / "aiaddon-review/scripts/simulate.py", p, "install"); check("simulator: install", r.returncode == 0 and "Router skill = plugin name | yes" in r.stdout, r.stdout[-400:]) - r = RUN(S / "aiaddon-review/scripts/simulate.py", S.parent, "triggers"); check("simulator: builder triggers", r.returncode == 0, r.stdout[-400:]) - r = RUN(S / "aiaddon-review/scripts/simulate.py", S.parent, "install"); check("simulator: builder install", r.returncode == 0, r.stdout[-400:]) + r = RUN(S / "aiaddon-review/scripts/simulate.py", PLUGIN, "triggers"); check("simulator: builder triggers", r.returncode == 0, r.stdout[-400:]) + r = RUN(S / "aiaddon-review/scripts/simulate.py", PLUGIN, "install"); check("simulator: builder install", r.returncode == 0, r.stdout[-400:]) def mk(label, files): q = td / ("x-" + label); shutil.copytree(p, q) @@ -297,7 +298,7 @@ def mcp(label, cfg, manifest_extra=None, args=()): own = json.loads((S / "hooks/hooks.json").read_text())["hooks"]["PostToolUse"][0]; mt = _re.compile(own["matcher"]) hits = {t: bool(mt.fullmatch(t)) for t in ("WebFetch", "WebSearch", "mcp__plugin_aiaddon_composio__COMPOSIO_SEARCH_TOOLS", "mcp__claude_ai_Composio__X", "Bash", "Write", "Read", "mcp__Gmail__send_message")} check("reference guardrail hook (dev/hooks) fires on web and Composio tools only", list(hits.values()) == [True] * 4 + [False] * 4 and (S / "aiaddon-review/scripts/screen_text.py").exists() and "exit 0" in own["hooks"][0]["command"] and "/screen_text.py" in own["hooks"][0]["command"], str(hits)) - root = S.parent; pj = json.loads((root / ".claude-plugin/plugin.json").read_text(encoding="utf-8")) + root = PLUGIN; pj = json.loads((root / ".claude-plugin/plugin.json").read_text(encoding="utf-8")) check("the plugin ships no hooks (no hooks/ folder, no hooks key in plugin.json)", not (root / "hooks").exists() and "hooks" not in pj, str(sorted(pj))) check("no scripts ship inside skills/ (they live in dev/)", not [x for x in (root / "skills").rglob("*") if x.is_file() and x.suffix in (".py", ".sh", ".js", ".mjs", ".ts")], str([str(x) for x in (root / "skills").rglob("*.py")][:5])) gone = [] @@ -329,8 +330,8 @@ def mcp(label, cfg, manifest_extra=None, args=()): (td / "good-report.md").write_text("| # | Original | Corrected |\n|---|---|---|\n| 1 | `description: Helps.` | `description: Summarises notes. Use when the user says summarise my notes.` |\n| 2 | (missing) | `plugin.json`: `{\"name\": \"notes-helper\"}` |\n") r1 = RUN(CR, td / "bad-report.md"); r2 = RUN(CR, td / "good-report.md") check("report check flags advice in Corrected cells and passes exact text", r1.returncode == 1 and r1.stdout.count("| 3 |") + r1.stdout.count("| 4 |") == 2 and r2.returncode == 0, r1.stdout[-300:] + r2.stdout[-200:]) - r = RUN(V, S.parent, "--require-meta", "author,company"); check("builder validates itself", r.returncode == 0, r.stdout[-400:]) - r = RUN(V, S.parent, "--target", "directory", "--strict"); check("builder passes directory checks", r.returncode == 0, r.stdout[-400:]) + r = RUN(V, PLUGIN, "--require-meta", "author,company"); check("builder validates itself", r.returncode == 0, r.stdout[-400:]) + r = RUN(V, PLUGIN, "--target", "directory", "--strict"); check("builder passes directory checks", r.returncode == 0, r.stdout[-400:]) r = RUN(V, p, "--target", "directory", "--strict"); check("scaffolded plugin reads nothing from the environment (D014)", "D014" not in r.stdout, r.stdout[-400:]) gh = json.loads((p / "hooks/hooks.json").read_text())["hooks"]["PostToolUse"][0]["hooks"][0] if (p / "hooks/hooks.json").exists() else {} check("scaffolded guardrail hook runs without a required runtime (H008)", not gh or ("exit 0" in gh.get("command", "") and "${CLAUDE_PLUGIN_ROOT}/" in gh.get("command", "")), str(gh)) @@ -392,7 +393,7 @@ def _quiet(label, mutate): broken("router with no routing table", "P028", lambda q: (q / "skills/ab-demo/SKILL.md").write_text((q / "skills/ab-demo/SKILL.md").read_text().replace("## Routing table", "## Notes"))) RC = S / "aiaddon-review/scripts/route_check.py" r = RUN(RC, p); check("route_check passes the scaffolded router", r.returncode == 0 and "PASS" in r.stdout, r.stdout[-300:]) - r = RUN(RC, S.parent); check("route_check passes this plugin's router evals", r.returncode == 0 and "PASS" in r.stdout, r.stdout[-300:]) + r = RUN(RC, PLUGIN); check("route_check passes this plugin's router evals", r.returncode == 0 and "PASS" in r.stdout, r.stdout[-300:]) q = td / "rc-bad"; shutil.copytree(p, q); (q / "evals/router/cases.json").write_text(json.dumps({"cases": [{"prompt": "build it", "expected": "ab-demo-other"}]})) r = RUN(RC, q); check("route_check fails a wrong expectation", r.returncode == 1 and "FAIL" in r.stdout, r.stdout[-300:]) fake = "gh" + "p_" + "Ab1" * 12 diff --git a/dev/aiaddon-review/scripts/simulate.py b/dev/aiaddon-review/scripts/simulate.py index 84a4de6..c9d9e7c 100644 --- a/dev/aiaddon-review/scripts/simulate.py +++ b/dev/aiaddon-review/scripts/simulate.py @@ -102,8 +102,9 @@ def install(root, out): if r.returncode != 0: print(r.stdout + r.stderr); return 1 f = next(dest.glob("*.plugin")) inst = td / "installed"; zipfile.ZipFile(f).extractall(inst) - allow = Path(root) / ".public-safety-allow" # maintainer allowlist, kept out of packages on purpose - if allow.is_file(): shutil.copy2(allow, inst / allow.name) + sys.path.insert(0, str(HERE)); import public_safety as _ps # maintainer allowlist (own folder or repo root), kept out of packages on purpose + _rules = _ps.load_allowlist_for(root) + if _rules: (inst / _ps.ALLOW_FILE).write_text("\n".join(f"{r}:{g}" + (f":{v}" if v else "") for r, g, v in _rules) + "\n", encoding="utf-8") vr = subprocess.run([sys.executable, str(v), str(inst), "--strict"], capture_output=True, text=True) if vr.returncode != 0: # evals/ and prompts/ are excluded from packages by design: only their absence is forgiven blocking = re.findall(r"^- `([A-Z]\d{3})`", vr.stdout.split("**Info**")[0], re.M) diff --git a/dev/aiaddon-review/scripts/validate_extension.py b/dev/aiaddon-review/scripts/validate_extension.py index 5306904..ff90827 100644 --- a/dev/aiaddon-review/scripts/validate_extension.py +++ b/dev/aiaddon-review/scripts/validate_extension.py @@ -746,7 +746,7 @@ def check_public_safety(root, plugin=True, history=True): """X008 secrets or private data in the files git would publish, X009 .gitignore preset, X010 PUBLIC-SAFETY.md, X011 .env.example, X012 secrets or private files anywhere in git history, X013 secrets inside built packages (dist/ and *.plugin/*.zip).""" if psafe is None: add("warn", "X008", root, "public_safety.py missing next to the validator: secret and private-data scan skipped"); return - rules = psafe.load_allowlist(root / psafe.ALLOW_FILE) + rules = psafe.load_allowlist_for(root) n = 0 for h in psafe.scan_tree(root, rules): n += 1