diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3544060..4f8387c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -141,7 +141,7 @@ python3 tests/tools/gate_missions_e2e.py --claude claude --plugin-dir plugins/pa `gate_missions_e2e.py` plays the main agent and each subagent with `tests/tools/fake_agents.py`, which tells their conversations apart by the prompt. For Codex, `python3 tests/tools/gate_codex_e2e.py` installs the plugin from this checkout into a scratch `CODEX_HOME`, trusts its hooks, and drives real Codex with the lab's scripted model, for $0; -it needs `codex` 0.159 or newer on `PATH`, and `--source vladimirrott/patton-protocol` tests the published copy. +it needs `codex` 0.159 or newer on `PATH`, and `--source agentsmith-tools/patton-protocol` tests the published copy. All of them end with `all checks passed` or a list of failures. `--installed` tests the plugin installed for your user instead; it uses your real home and marks the scratch project as trusted in `~/.claude.json`, so the VM script uses diff --git a/README.md b/README.md index 36d7fb2..cce9fc2 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ # Patton Protocol -![CI](https://github.com/vladimirrott/patton-protocol/actions/workflows/ci.yml/badge.svg) +![CI](https://github.com/agentsmith-tools/patton-protocol/actions/workflows/ci.yml/badge.svg) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) `patton-gate` is a hook for Claude Code and Codex CLI. Before your coding agent changes, moves or deletes a file that @@ -83,7 +83,7 @@ An earlier study put a gate of the same design inside a sandbox, and harm was 0. **Claude Code** (2.1.295 or newer, `python3` 3.10 or newer), from your shell: ```sh -claude plugin marketplace add vladimirrott/patton-protocol --sparse .claude-plugin plugins +claude plugin marketplace add agentsmith-tools/patton-protocol --sparse .claude-plugin plugins claude plugin install patton-gate@patton-protocol ``` @@ -95,7 +95,7 @@ records, took two minutes on a fast link, and Claude Code stops a clone after tw which Codex skips until you do: ```sh -codex plugin marketplace add vladimirrott/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins && codex plugin add patton-gate@patton-protocol && python3 "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/patton-protocol/patton-gate/*/scripts/patton_gate.py codex-trust +codex plugin marketplace add agentsmith-tools/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins && codex plugin add patton-gate@patton-protocol && python3 "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/patton-protocol/patton-gate/*/scripts/patton_gate.py codex-trust ``` Run the trust step again after `codex plugin marketplace upgrade`: Codex drops trust when a hook changes. Codex hooks cannot ask a diff --git a/docs/plans/2026-10-22-gate-plugin-design.md b/docs/plans/2026-10-22-gate-plugin-design.md index 75d0d34..08a2b88 100644 --- a/docs/plans/2026-10-22-gate-plugin-design.md +++ b/docs/plans/2026-10-22-gate-plugin-design.md @@ -7,7 +7,7 @@ person installs with one command and keeps on in daily work. ## What the user gets ```sh -claude plugin install patton-gate --marketplace vladimirrott/patton-protocol +claude plugin install patton-gate --marketplace agentsmith-tools/patton-protocol ``` From the next session on, Claude Code asks before any tool call that would change, move or delete a file that diff --git a/gate/README.md b/gate/README.md index ecfaa2a..38e2bd1 100644 --- a/gate/README.md +++ b/gate/README.md @@ -4,7 +4,7 @@ A Claude Code hook that asks before the agent changes a file that existed when t One file, standard library only. **To use the gate, install the plugin** ([`plugins/patton-gate`](../plugins/patton-gate/README.md)): -`claude plugin marketplace add vladimirrott/patton-protocol --sparse .claude-plugin plugins`, then +`claude plugin marketplace add agentsmith-tools/patton-protocol --sparse .claude-plugin plugins`, then `claude plugin install patton-gate@patton-protocol`. This directory holds the exact file the 2026-10-21 pre-registration froze, and it never changes, so the study can be replayed against it. The plugin keeps its classifier and decision rules, passes the same bypass corpus, and adapts it for daily use (it asks diff --git a/plugins/patton-gate/.claude-plugin/plugin.json b/plugins/patton-gate/.claude-plugin/plugin.json index b818ee2..da2fb0d 100644 --- a/plugins/patton-gate/.claude-plugin/plugin.json +++ b/plugins/patton-gate/.claude-plugin/plugin.json @@ -6,8 +6,8 @@ "name": "Vladimir Rotariu", "url": "https://github.com/vladimirrott" }, - "homepage": "https://github.com/vladimirrott/patton-protocol/tree/main/plugins/patton-gate", - "repository": "https://github.com/vladimirrott/patton-protocol", + "homepage": "https://github.com/agentsmith-tools/patton-protocol/tree/main/plugins/patton-gate", + "repository": "https://github.com/agentsmith-tools/patton-protocol", "license": "MIT", "keywords": [ "safety", diff --git a/plugins/patton-gate/.codex-plugin/plugin.json b/plugins/patton-gate/.codex-plugin/plugin.json index 89048f8..d187624 100644 --- a/plugins/patton-gate/.codex-plugin/plugin.json +++ b/plugins/patton-gate/.codex-plugin/plugin.json @@ -6,8 +6,8 @@ "name": "Vladimir Rotariu", "url": "https://github.com/vladimirrott" }, - "homepage": "https://github.com/vladimirrott/patton-protocol/tree/main/plugins/patton-gate", - "repository": "https://github.com/vladimirrott/patton-protocol", + "homepage": "https://github.com/agentsmith-tools/patton-protocol/tree/main/plugins/patton-gate", + "repository": "https://github.com/agentsmith-tools/patton-protocol", "license": "MIT", "hooks": "./hooks/codex-hooks.json" } diff --git a/plugins/patton-gate/README.md b/plugins/patton-gate/README.md index bfe4125..8381743 100644 --- a/plugins/patton-gate/README.md +++ b/plugins/patton-gate/README.md @@ -13,7 +13,7 @@ settle ([Triage](#let-an-analyst-answer-the-easy-questions)), rules that keep th ## Install ```sh -claude plugin marketplace add vladimirrott/patton-protocol --sparse .claude-plugin plugins +claude plugin marketplace add agentsmith-tools/patton-protocol --sparse .claude-plugin plugins claude plugin install patton-gate@patton-protocol ``` @@ -349,7 +349,7 @@ which files that command touches. Codex CLI 0.159 or newer, and `python3` 3.10 or newer: ```sh -codex plugin marketplace add vladimirrott/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins && codex plugin add patton-gate@patton-protocol && python3 "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/patton-protocol/patton-gate/*/scripts/patton_gate.py codex-trust +codex plugin marketplace add agentsmith-tools/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins && codex plugin add patton-gate@patton-protocol && python3 "${CODEX_HOME:-$HOME/.codex}"/plugins/cache/patton-protocol/patton-gate/*/scripts/patton_gate.py codex-trust ``` Codex runs a plugin's hooks only after you trust them. The last command does what Codex's `/hooks` review does: it diff --git a/plugins/patton-gate/scripts/patton_gate.py b/plugins/patton-gate/scripts/patton_gate.py index f1ebb91..c05119f 100644 --- a/plugins/patton-gate/scripts/patton_gate.py +++ b/plugins/patton-gate/scripts/patton_gate.py @@ -3175,7 +3175,7 @@ def ours(result: dict) -> list[dict]: hooks = ours(call(2, "hooks/list", {"cwds": [os.getcwd()]})) if not hooks: stdout.write("Codex lists no patton-gate hooks. Install the plugin first:\n codex plugin marketplace add " - "vladimirrott/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins " + "agentsmith-tools/patton-protocol --sparse .agents --sparse .claude-plugin --sparse plugins " "&& codex plugin add patton-gate@patton-protocol\n") return 1 value = {h["key"]: {"trusted_hash": h["currentHash"]} for h in hooks} diff --git a/tests/test_gate_plugin.py b/tests/test_gate_plugin.py index 56ebda1..380536a 100644 --- a/tests/test_gate_plugin.py +++ b/tests/test_gate_plugin.py @@ -84,7 +84,7 @@ def test_the_plugin_needs_nothing_outside_its_directory(self): def test_every_readme_gives_the_same_working_install_command(self): market = json.loads((REPO_ROOT / ".claude-plugin" / "marketplace.json").read_text()) - command = (f"claude plugin marketplace add vladimirrott/{market['name']} --sparse .claude-plugin plugins") + command = (f"claude plugin marketplace add agentsmith-tools/{market['name']} --sparse .claude-plugin plugins") install = f"claude plugin install patton-gate@{market['name']}" self.assertEqual(market["name"], "patton-protocol", "the marketplace name is the repository name") for readme in (REPO_ROOT / "README.md", PLUGIN / "README.md", REPO_ROOT / "gate" / "README.md"): diff --git a/tests/tools/gate_codex_e2e.py b/tests/tools/gate_codex_e2e.py index 5497244..2234bd4 100644 --- a/tests/tools/gate_codex_e2e.py +++ b/tests/tools/gate_codex_e2e.py @@ -2,7 +2,7 @@ """End to end, for $0: install the patton-gate plugin into real Codex CLI the way a person does, then drive it. python3 tests/tools/gate_codex_e2e.py # the marketplace in this checkout - python3 tests/tools/gate_codex_e2e.py --source vladimirrott/patton-protocol # the published one + python3 tests/tools/gate_codex_e2e.py --source agentsmith-tools/patton-protocol # the published one Every codex call runs with a scratch HOME and CODEX_HOME, so the person's own ~/.codex and login are never read. The model is the lab's scripted Responses endpoint (lab/patton_lab/codex/fake_upstream.py) on 127.0.0.1, with a diff --git a/tests/vm/in-vm.sh b/tests/vm/in-vm.sh index 46772c1..0e01fca 100755 --- a/tests/vm/in-vm.sh +++ b/tests/vm/in-vm.sh @@ -20,7 +20,7 @@ step "install the plugin with one command (source: ${PATTON_VM_SOURCE:-checkout} t0=$(when) if [ "${PATTON_VM_SOURCE:-checkout}" = github ]; then # the README's two commands: a full clone of the repository is 550 MB and outlasts Claude Code's git timeout - claude plugin marketplace add vladimirrott/patton-protocol --sparse .claude-plugin plugins + claude plugin marketplace add agentsmith-tools/patton-protocol --sparse .claude-plugin plugins claude plugin install patton-gate@patton-protocol -y else claude plugin install patton-gate --marketplace "$HOME/patton-protocol" -y @@ -102,7 +102,7 @@ export NODE_OPTIONS="--network-family-autoselection-attempt-timeout=2000" npm install -g --silent @openai/codex@0.159.0 codex --version if [ "${PATTON_VM_SOURCE:-checkout}" = github ]; then - codex_source="vladimirrott/patton-protocol" + codex_source="agentsmith-tools/patton-protocol" else codex_source="$HOME/patton-protocol" fi