Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
"owner": {
"name": "SyncWin"
},
"metadata": {
"description": "AI+ keeps every Claude session efficient: the lead model plans and reviews, cheap subagents execute."
},
"plugins": [
{
"name": "aiplus",
"source": "./adapters/claude",
"description": "Keeps every Claude session efficient: lead model plans and reviews, cheap subagents execute, minimal reads, one retry, routing to your installed plugins.",
"version": "0.5.1"
"version": "0.6.0"
}
]
}
82 changes: 4 additions & 78 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: CI

# Checks on every push and pull request. On push to main, also builds the hook-free directory
# edition of the plugin from adapters/claude and fast-forwards it to the `release` branch,
# which the Anthropic plugin directory submission tracks. main keeps hooks and scripts.
# Checks on every push and pull request. main is the only branch: adapters/claude is the text-only plugin
# that the Anthropic plugin directory tracks, and dev/ holds maintainer-only scripts that never ship.
on:
push:
branches: [main]
Expand Down Expand Up @@ -44,82 +43,9 @@ jobs:
- name: Unit tests
run: |
for t in tests/test_*.py; do python "$t"; done
- name: Validate the plugin for the directory (blocking)
run: python .checker-tools/dev/aiaddon-review/scripts/validate_extension.py adapters/claude --strict --target directory --require-meta author,company
- name: Check the router against its evals
run: python .checker-tools/dev/aiaddon-review/scripts/route_check.py adapters/claude
- name: Scan the tree and the full git history for secrets and private data (blocking)
run: python .checker-tools/dev/aiaddon-review/scripts/scan_secrets.py . --history

release:
# Directory edition: adapters/claude without hooks, scripts, .mcp.json, contract.yaml, evals and prompt data; the recipes
# in skills/aiplus/references/ replace the hooks and scripts.
name: Update the release branch
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: [checks]
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/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: syncwin/aiaddon
ref: ${{ env.TOOLS_REF }}
path: .checker-tools
persist-credentials: false
- uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13"
- name: Build the shipped tree without hooks
env:
SHIP: ${{ runner.temp }}/ship
run: |
python scripts/build_adapters.py
python - <<'PY'
import json, os, shutil
src, out = "adapters/claude", os.environ["SHIP"]
drop = {"hooks", "scripts", "evals", "prompts", ".mcp.json", "contract.yaml"} # top level only
def ignore(d, names):
top = os.path.normpath(d) == os.path.normpath(src)
return [n for n in names if (top and n in drop) or n == "__pycache__" or n.endswith(".pyc")]
shutil.copytree(src, out, ignore=ignore)
pj = os.path.join(out, ".claude-plugin", "plugin.json")
with open(pj, encoding="utf-8") as f:
m = json.load(f)
for k in ("hooks", "mcpServers"):
m.pop(k, None)
with open(pj, "w", encoding="utf-8", newline="\n") as f:
json.dump(m, f, indent=2, ensure_ascii=False)
f.write("\n")
for gone in ("hooks", "scripts", ".mcp.json"):
assert not os.path.exists(os.path.join(out, gone)), gone + " must not ship"
# Each dropped hook or script has a Markdown recipe that must ship (text, in the skill references).
for r in ("session-start", "prompt-nudge", "agent-notice", "screen-injection", "evidence-check", "plugin-scan"):
assert os.path.isfile(os.path.join(out, "skills", "aiplus", "references", r + ".md")), r + " recipe must ship"
print("built", out, "version", m["version"])
PY
- name: Validate the shipped tree for the directory (blocking)
env:
SHIP: ${{ runner.temp }}/ship
run: |
python .checker-tools/dev/aiaddon-review/scripts/validate_extension.py "$SHIP" --strict --target directory --require-meta author,company
python .checker-tools/dev/aiaddon-review/scripts/scan_secrets.py "$SHIP"
- name: Push the release branch
env:
SHIP: ${{ runner.temp }}/ship
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: |
# The shipped tree becomes the root of the release branch. Fast-forward only (no force-push):
# a new commit on top of the current release branch.
export GIT_INDEX_FILE="$RUNNER_TEMP/release.index"
git --work-tree="$SHIP" add -A -f
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: directory edition from ${GITHUB_SHA::7}")
git push origin "$commit:refs/heads/release"
8 changes: 7 additions & 1 deletion .github/workflows/release-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,14 @@ jobs:
continue
p = os.path.join(d, f)
z.write(p, os.path.relpath(p, root).replace(os.sep, "/"))
text_ext = {".md", ".json", ".yaml", ".yml", ".txt"}
text_names = {"LICENSE", ".gitignore"}
with zipfile.ZipFile(out) as z:
assert ".claude-plugin/plugin.json" in z.namelist(), "plugin.json missing at zip root"
names = z.namelist()
assert ".claude-plugin/plugin.json" in names, "plugin.json missing at zip 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, "non-text files must not ship: " + ", ".join(bad)
assert not [n for n in names if n.split("/")[0] in ("hooks", "scripts") or n == ".mcp.json"], "hooks, scripts and .mcp.json must not ship"
with open(os.environ.get("GITHUB_OUTPUT", os.devnull), "a") as g:
g.write("version=" + version + "\n")
print("built", out, "version", version)
Expand Down
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@

Newest first.

## 0.6.0: 2026-11-13

One branch: `main` is now both the public repo and the Anthropic plugin directory source. The separate `release` branch and its CI job are gone.

**Removed**
- Hooks from the plugin: `adapters/claude/hooks/` is gone, and so are `.mcp.json` (the Composio connector is optional and added by the user) and every script and data file in the plugin root. Features are kept as recipes (`skills/aiplus/references/`), not hooks.

**Changed**
- The Python hook sources, `hooks.json`, `reminder.txt` and the connector sample moved unchanged to the maintainer-only `dev/` folder (`dev/scripts`, `dev/hooks`, `dev/mcp.json`). Tests and `scripts/build_adapters.py` read them there; the generator no longer writes hooks, scripts or `.mcp.json` into the plugin root.
- The skill's "Hook steps" table is now "Required steps": each step is always required, no hooks run, and the recipes are the method. Rules 2 and 14 are now marked as guidance and no longer claim a hook runs.
- CI: the `release` job is removed; the checks job validates `adapters/claude` for the directory directly. The release workflow packages the same text-only tree.
- README, adapters README and plugin README describe one text-only plugin.

## 0.5.1: 2026-11-13

**Added**
Expand Down
47 changes: 19 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ Keeps every Claude session efficient: lead model plans and reviews, cheap subage

**Download:** [aiplus.plugin](https://github.com/syncwin/aiplus/releases/latest/download/aiplus.plugin) (always the latest release)

**Version** 0.5.1 - **Author** SyncWin - **License** MIT
**Version** 0.6.0 - **Author** SyncWin - **License** MIT

## Layout

```
core/ platform-neutral rules (rules.md, rules.yaml): the single source
adapters/claude/ the Claude plugin (.claude-plugin, skills, hooks, scripts, evals)
adapters/claude/ the Claude plugin, text only: .claude-plugin, skills (with recipes), evals, prompts, contract.yaml
dev/ maintainer-only hooks, scripts and data (never shipped)
adapters/README.md how to add another platform
tests/ run `python tests/test_contract_check.py`
tests/ run `python tests/test_recipes.py` (and the other test files)
scripts/build_adapters.py regenerates adapter files from core
.claude-plugin/marketplace.json points to adapters/claude
```
Expand All @@ -21,10 +22,11 @@ scripts/build_adapters.py regenerates adapter files from core

Edit rules in `core/`, then run `python scripts/build_adapters.py` (`--check` verifies nothing is stale).

## Editions
## One plugin, text only

- **Local (main):** the full plugin with hooks, scripts and the Composio connector, installed from this repo.
- **Directory (`release` branch):** built by CI (`.github/workflows/ci.yml`, job `release`) from `adapters/claude` without `hooks/`, `scripts/`, `.mcp.json`, `contract.yaml`, evals and prompt data, for the Anthropic plugin directory. Every hook and script has a Markdown recipe in `adapters/claude/skills/aiplus/references/` (`session-start`, `prompt-nudge`, `agent-notice`, `screen-injection`, `evidence-check`, `plugin-scan`) and a required step in the `aiplus` skill ("Hook steps"), so the directory edition keeps the behaviour: Claude does by reading and checking what the hooks do automatically. Differences: the injection screen is a judged checklist instead of a scored model, and the optional Composio connector is not bundled (add it yourself under Customize > Connectors, address `https://connect.composio.dev/mcp`). The Python files stay in this repo as maintainer tooling and the local edition.
`main` is the public repo and the source for the Anthropic plugin directory. `adapters/claude` is the plugin root and ships only text: skills, references, `evals/`, `prompts/` and `contract.yaml`. It has no hooks, scripts or bundled connector.

Features that used to be hooks are recipes in `adapters/claude/skills/aiplus/references/` (`session-start`, `prompt-nudge`, `agent-notice`, `screen-injection`, `evidence-check`, `plugin-scan`). The `aiplus` skill lists a required step for each ("Required steps"), and Claude follows the recipe by reading and checking. The injection screen is a judged checklist, not a scored model. The Python hook sources and data stay in `dev/` as maintainer tooling and are not shipped.

## Skills

Expand All @@ -34,25 +36,17 @@ Edit rules in `core/`, then run `python scripts/build_adapters.py` (`--check` ve
| `aiplus-handoff` | One condensed handoff file for a new chat |
| `aiplus-setup` | Best-practice project setup (AGENTS.md, CLAUDE.md, README, CHANGELOG, CI) |

## Connect Composio

AI+ declares one connector, Composio (`https://connect.composio.dev/mcp`), so tasks can reach apps Claude has no connector for. It ships no account and no key. It is optional: every skill works without it.

1. Install AI+ (below).
2. Open Customize > Plugins > AI+ > Connectors and choose Connect on Composio (in Claude Code, run `/mcp` and pick it).
3. Sign in with your own Composio account.
## Optional: Composio connector

AI+ asks once per connector per task before using it and never sends personal data or secrets without asking. If Composio is already connected at the same address, Claude uses that one.
AI+ bundles no connector. If you want tasks to reach apps Claude has no connector for, add Composio yourself under Customize > Connectors (address `https://connect.composio.dev/mcp`) and sign in with your own account. AI+ asks once per connector per task before using it and never sends personal data or secrets without asking. Every skill works without it.

## Injection guardrail

A PostToolUse hook screens output from MCP tools (connectors such as Composio) with a small local model. Nothing leaves your machine. If output looks like a prompt injection, Claude is warned to treat it as data and ask you first. It is silent when clean, never blocks if Python is missing, and is a screen, not a verdict. The matcher `mcp__.*` covers every MCP tool in the session on purpose (rule 32 steers work to all connectors), so it also screens servers unrelated to AI+; the cost is a short local scan per call. Remove the `PostToolUse` entry in `hooks/hooks.json` to turn it off.
Claude screens output from MCP tools and web results as data, following `skills/aiplus/references/screen-injection.md` (rule 13). If output looks like a prompt injection, Claude flags it and asks you first. It is a judged checklist, not a verdict, and nothing leaves your machine.

## Requirements

- **Python 3.9 or newer** for the local edition's hooks (the directory edition needs none; it follows the recipes): the agent notice, prompt nudge, end-of-turn evidence check, connector injection screen and plugin scan are Python scripts. The rules, the session-start reminder and the skills work without it, so AI+ never breaks; those extras just switch off.
- Install: Windows `winget install -e --id Python.Python.3.12` (or python.org, tick "Add to PATH"); macOS `brew install python`; Linux `sudo apt install python3`.
- You do not need to check yourself: when Python is missing, AI+ says so at session start and offers to install it (only after you confirm). On claude.ai chat it gives these steps or a prompt to paste into Claude Code.
None. The plugin is text only and needs no Python or other install.

## Install

Expand All @@ -61,20 +55,20 @@ A PostToolUse hook screens output from MCP tools (connectors such as Composio) w
/plugin install aiplus@aiplus
```

Start with `/aiplus`, or let it load when a multi-step task begins. The session-start reminder needs nothing installed. The other hooks and scan use Python 3 and find it on their own (`python3`, `python` or `py`, skipping the Windows Store stub); without Python they skip without blocking.
Start with `/aiplus`, or let it load when a multi-step task begins.

## How AI+ stays on

AI+ applies on its own; you never have to mention it. The strongest mechanism per surface:

| Surface | What keeps it on | Your one-time step |
|---|---|---|
| Claude Code (terminal, IDE, desktop Code tab) | SessionStart hook injects the must-rules on start, resume, clear and compact; UserPromptSubmit hook nudges rule 15 on long prompts; the skill description says to load it always | Install the plugin |
| Cowork | Plugin skills (description loads it); plugin hooks load | Enable the plugin (Customize > Plugins) |
| Chat (web, desktop, mobile) | No hooks run. Account preferences are the always-on path; the skill description helps when the plugin is enabled | Paste the block below once into Settings > Profile > Preferences, and enable the plugin |
| Claude Code (terminal, IDE, desktop Code tab) | The skill description says to load it always; the skill then applies the required steps | Install the plugin |
| Cowork | Plugin skills (the description loads it) | Enable the plugin (Customize > Plugins) |
| Chat (web, desktop, mobile) | Account preferences are the always-on path; the skill description helps when the plugin is enabled | Paste the block below once into Settings > Profile > Preferences, and enable the plugin |
| A chat Project | Project instructions apply to every chat in it | Paste the same block into the Project instructions |

Hooks: SessionStart output is added as context and `additionalContext` is capped at 10,000 characters; UserPromptSubmit receives the `prompt` (https://code.claude.com/docs/en/hooks). Skills: the description is always in context and decides loading (https://code.claude.com/docs/en/skills). Anthropic's pages state no length limit for Profile Preferences (unverified; third parties report about 1,500 characters), so the block is kept near 1,000.
Skills: the description is always in context and decides loading (https://code.claude.com/docs/en/skills).

Paste-ready account instructions:

Expand All @@ -100,11 +94,8 @@ Rule 11 (no overengineering) draws its generic ideas (build only what is asked,

## What it runs, reads, and sends

Local edition (this repo, `main`); the directory edition runs none of these and follows the recipes instead:
Nothing runs: the plugin has no hooks, scripts, connectors or network access. Claude follows the recipes using Read and Glob on the Claude config folder and the working folder.

- `adapters/claude/scripts/scan.py`: reads `~/.claude/plugins/installed_plugins.json` and skill folders (local, read-only) and prints a table. No network.
- `adapters/claude/scripts/reminder.py` (SessionStart): prints `hooks/reminder.txt`.
- `adapters/claude/scripts/contract_check.py` (Stop): reads the session transcript and the `contract.yaml` files of installed plugins (local, read-only; never executed); once per session may block with the list of missing evidence; writes a small flag file in the OS temp folder.
- No connectors, no network, no secrets.
Maintainer tooling in `dev/` (not shipped): `scripts/scan.py` (plugin table), `reminder.py`, `prompt_nudge.py`, `agent_notice.py`, `screen_text.py` and `contract_check.py` with their data, plus `hooks/hooks.json` as a reference for anyone who wants to wire them into their own Claude Code settings.

Before a directory submission, add a square listing icon (PNG or JPEG, 512 to 2048 px) named icon in the adapters/claude/.claude-plugin folder.
4 changes: 2 additions & 2 deletions adapters/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@

| Adapter | Output | Status |
|---|---|---|
| `claude` | Claude plugin: skill, hooks, scripts | 0.5.1 |
| `claude` | Claude plugin: skills and recipes, text only | 0.6.0 |
| `chatgpt` | custom instructions text, or a custom GPT | not started |
| `gemini` | Gem instructions or GEMINI.md | not started |

## Add an adapter

1. Create `adapters/<platform>/` with the files that platform needs (instructions file, config, docs).
2. In `scripts/build_adapters.py`, add a function that reads `load_rules()` and writes the generated parts (use marker comments for blocks inside hand-written files). Rules marked `enforce: hook` need a platform feature; where there is none, list them as plain guidance.
2. In `scripts/build_adapters.py`, add a function that reads `load_rules()` and writes the generated parts (use marker comments for blocks inside hand-written files). Every rule is plain guidance; hooks are recipes, not shipped code.
3. Run `python scripts/build_adapters.py`, then `--check`.
4. Keep platform-specific wording in the adapter, never in `core/`.
5. Add the adapter to the table above and to the changelog.
Expand Down
4 changes: 2 additions & 2 deletions adapters/claude/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "aiplus",
"displayName": "AI+",
"version": "0.5.1",
"version": "0.6.0",
"description": "Keeps every Claude session efficient: lead model plans and reviews, cheap subagents execute, minimal reads, one retry, routing to your installed plugins.",
"license": "MIT",
"author": {
Expand All @@ -10,7 +10,7 @@
},
"metadata": {
"displayName": "AI+",
"version": "0.5.1",
"version": "0.6.0",
"author": "SyncWin",
"company": "SyncWin"
},
Expand Down
8 changes: 0 additions & 8 deletions adapters/claude/.mcp.json

This file was deleted.

Loading