You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude-plugin/marketplace.json
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,6 @@
1
1
{
2
2
"name": "controlplane",
3
+
"description": "Official Control Plane marketplace. Skills, agents, guardrails, and MCP configuration for deploying and managing containerized workloads across AWS, GCP, Azure, and private clouds.",
3
4
"owner": {
4
5
"name": "Control Plane",
5
6
"email": "support@controlplane.com"
@@ -9,7 +10,8 @@
9
10
"name": "cpln",
10
11
"source": {
11
12
"source": "github",
12
-
"repo": "controlplane-com/ai-plugin"
13
+
"repo": "controlplane-com/ai-plugin",
14
+
"path": "plugins/cpln"
13
15
},
14
16
"description": "Control Plane AI workflows, skills, guardrails, and MCP configuration.",
Copy file name to clipboardExpand all lines: CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/) and this
8
8
9
9
### Added
10
10
11
+
- Gemini-format hook config at repo-root `hooks/hooks.json` (`BeforeTool` guards on `run_shell_command` for generic `cpln secret create` and `cpln apply` missing `--file`). Gemini auto-discovers it; Claude and Codex never see it because their plugin root now resolves to `plugins/cpln/`.
12
+
11
13
### Changed
12
14
15
+
-**Repo restructured.** All Claude + Codex plugin content (skills, agents, commands, rules, references, assets, hooks, `.claude-plugin/plugin.json`, `.codex-plugin/`, `.claude-mcp.json`, `.app.json`) moved into `plugins/cpln/`. Marketplaces (`.claude-plugin/marketplace.json`, `.agents/plugins/marketplace.json`) now point at `plugins/cpln`. Gemini extension manifest, marketplace JSONs, and contributor docs stay at repo root. Existing install commands are unchanged; users get the new layout on their next `/plugin upgrade` or marketplace re-add.
16
+
- Claude + Codex hooks now ship in `plugins/cpln/hooks/cpln-hooks.json` and are declared explicitly via the `hooks` field in each plugin manifest, replacing the auto-discovered default path.
Copy file name to clipboardExpand all lines: CLAUDE.md
+45-25Lines changed: 45 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,38 +4,51 @@ For end-user installation, capabilities, and supported clients, see `README.md`.
4
4
5
5
## Repo layout
6
6
7
+
The repo is split into two zones: **repo root** holds marketplace manifests, the Gemini extension, and contributor docs; **`plugins/cpln/`** holds the actual Claude + Codex plugin content. Both Claude and Codex resolve their plugin root to `plugins/cpln/` via their marketplace manifests; Gemini uses the repo root as its extension dir. This split exists because Gemini, Claude, and Codex all auto-discover `hooks/hooks.json` at their respective roots with incompatible schemas — keeping their roots distinct lets each tool ship its own hook config without cross-tool warnings or load failures. The Apr 27, 2026 audit confirmed this layout against each CLI's source.
8
+
9
+
### Repo root (marketplace + Gemini)
10
+
11
+
-`.claude-plugin/marketplace.json` — Claude marketplace entry. `source.path` points at `plugins/cpln`.
12
+
-`.agents/plugins/marketplace.json` — Codex marketplace entry. `source` is `{local, path: "./plugins/cpln"}`.
13
+
-`gemini-extension.json` — Gemini CLI extension manifest. Declares the `cpln` MCP server and points `contextFileName` at `GEMINI.md`. Gemini treats this directory (the repo root) as the extension dir.
14
+
-`GEMINI.md` — Gemini runtime guardrails. Loaded for every Gemini session via `contextFileName`. Keep it short.
15
+
-`hooks/hooks.json` — **Gemini-only** hook config. Uses Gemini's schema (`BeforeTool`/`AfterTool`, matcher on `run_shell_command`, output `{decision:"deny", reason:"..."}`). Gemini auto-discovers this file from the extension dir; the path is hardcoded in `packages/cli/src/config/extension-manager.ts` and cannot be redirected via the manifest.
-`skills/` — Domain-knowledge skill modules. Each lives in its own subdirectory with a `SKILL.md` carrying frontmatter (`name`, `description`).
8
21
-`agents/` — Guided workflow agents. Each is a top-level `<agent>.md` with frontmatter. Companion reference docs that an agent loads on demand live under `references/<agent>/` (kept out of `agents/` so the loader doesn't try to register them as standalone agents).
9
-
-`references/` — On-demand reference docs cited by agents (e.g., `references/workload-troubleshooter/diagnostics.md`). Plain markdown, no frontmatter required. Ships with the plugin install.
22
+
-`references/` — On-demand reference docs cited by agents (e.g., `references/workload-troubleshooter/diagnostics.md`). Plain markdown, no frontmatter required.
10
23
-`commands/` — Slash commands. Each command has a paired `<command>.md` (Claude) and `<command>.toml` (Gemini-style prompt template); keep them aligned.
11
-
-`rules/` — Validation guardrails and manifest references. Files with `alwaysApply: true` in frontmatter (`cli-conventions.md`, `cpln-guardrails.md`) are concatenated and injected into every Claude Code session by the `SessionStart` entry in `hooks/hooks.json`. `alwaysApply` is **not** a native Claude Code field — the hook is what gives it meaning, so adding a new always-on rule means dropping a file with `alwaysApply: true` and nothing else. Treat changes to those files as broad-impact.
12
-
-`hooks/hooks.json` — **Claude-specific**PreToolUse guards on `cpln` Bash patterns plus the `SessionStart` rule injector. Gemini and Codex ignore this file; the Gemini-side equivalents live in `GEMINI.md`.
13
-
-`assets/` — Logos and icons referenced by plugin/marketplace manifests.
14
-
-`.claude-plugin/` — Claude plugin manifest (`plugin.json`) and marketplace entry (`marketplace.json`).
-`gemini-extension.json` — Gemini CLI extension manifest. Declares the `cpln` MCP server and points `contextFileName` at `GEMINI.md` (loaded for end users every session — keep it short).
18
-
-`.claude-mcp.json`, `.codex-plugin/mcp.json`, MCP block in `gemini-extension.json` — three per-client MCP configs pointing at the same hosted server (`https://mcp.cpln.io/mcp`). Keep all three in sync when changing the server URL or auth shape. The Codex file lives inside `.codex-plugin/` (rather than at the repo root as `.mcp.json`) so Claude Code's cwd auto-discovery doesn't try to parse the Codex-format file as a project MCP config when developing in this repo.
24
+
-`rules/` — Validation guardrails and manifest references. Files with `alwaysApply: true` in frontmatter (`cli-conventions.md`, `cpln-guardrails.md`) are concatenated and injected into every Claude **and Codex**session by the `SessionStart` entry in `hooks/cpln-hooks.json`. `alwaysApply` is not a native field — the hook is what gives it meaning. Codex works out of the box because it sets `CLAUDE_PLUGIN_ROOT` for OOTB compatibility (verified in `codex-rs/hooks/src/engine/discovery.rs`) and accepts the same `hookSpecificOutput.additionalContext` schema. Gemini gets the same rules content from `GEMINI.md` via `contextFileName`.
25
+
-`hooks/cpln-hooks.json` — Shared **Claude + Codex**hook config (`PreToolUse` Bash guards + `SessionStart` rule injector). Declared explicitly in `.claude-plugin/plugin.json` and `.codex-plugin/plugin.json` via the `hooks` field. Lives at a non-default name so neither tool's strict auto-discovery picks it up alongside the manifest declaration; Claude merges defaults with manifest hooks and Codex 0.x merges too in some paths, so an explicit path is the safest.
26
+
-`assets/` — Logos and icons referenced by plugin manifests.
27
+
-`.claude-plugin/plugin.json` — Claude plugin manifest. All paths in this file (`./skills/`, `./hooks/cpln-hooks.json`, etc.) are relative to `plugins/cpln/`.
28
+
-`.codex-plugin/plugin.json` — Codex plugin manifest. Same path conventions.
29
+
-`.codex-plugin/mcp.json` — Codex MCP config. Lives inside `.codex-plugin/` (rather than as a project-level `.mcp.json`) so Claude's cwd auto-discovery doesn't try to parse the Codex-format file as a project MCP config when developing.
30
+
-`.claude-mcp.json`, `.codex-plugin/mcp.json`, MCP block in `gemini-extension.json` — three per-client MCP configs pointing at the same hosted server (`https://mcp.cpln.io/mcp`). Keep them in sync when changing the server URL or auth shape.
- Frontmatter on skills, agents, and commands: `name` and `description`. Don't add a `version:` field — Claude Code, Codex, and Gemini all ignore it, and the only version users see comes from the per-client manifests (`.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`, `gemini-extension.json`). Rules use `description` plus `alwaysApply` when applicable.
36
+
- Frontmatter on skills, agents, and commands: `name` and `description`. Don't add a `version:` field — Claude, Codex, and Gemini all ignore it, and the only version users see comes from the per-client manifests (`plugins/cpln/.claude-plugin/plugin.json`, `plugins/cpln/.codex-plugin/plugin.json`, `gemini-extension.json`). Rules use `description` plus `alwaysApply` when applicable.
- MCP tool names in Claude-side examples use the `mcp__cpln__` prefix (Claude Code's convention); Gemini and Codex use the bare tool name.
26
-
-**Never write a `cpln` command from memory** when authoring or editing examples in skills/agents/rules. Verify shape and flags with `cpln <command> --help` or `mcp__cpln__cpln_suggest`. `rules/cli-conventions.md` is the canonical CLI reference inside this repo; if you change CLI examples, cross-check against it.
39
+
-**Never write a `cpln` command from memory** when authoring or editing examples in skills/agents/rules. Verify shape and flags with `cpln <command> --help` or `mcp__cpln__cpln_suggest`. `plugins/cpln/rules/cli-conventions.md` is the canonical CLI reference inside this repo; if you change CLI examples, cross-check against it.
27
40
28
41
## Local development
29
42
30
43
Two install paths — pick based on what you're doing.
31
44
32
-
**Fast iteration** — load the plugin directly from this working tree, no marketplace round-trip. This is the inner-loop workflow most edits use:
45
+
**Fast iteration** — load the plugin directly from this working tree, no marketplace round-trip. The plugin lives in a subdirectory, so target it explicitly:
33
46
34
47
```bash
35
-
claude --plugin-dir .
48
+
claude --plugin-dir ./plugins/cpln
36
49
```
37
50
38
-
`--plugin-dir` loads the plugin for that session only. Edits to skills, agents, commands, and rules pick up on `/reload-plugins`; edits to `plugin.json`, `hooks/hooks.json`, or MCP config files require restarting the session.
51
+
`--plugin-dir` loads the plugin for that session only. Edits to skills, agents, commands, and rules pick up on `/reload-plugins`; edits to `plugin.json`, `hooks/cpln-hooks.json`, or MCP config files require restarting the session.
39
52
40
53
**Pre-release verification** — exercise the actual user-facing install path before tagging a release:
41
54
@@ -49,24 +62,31 @@ Use this to catch install-time issues `--plugin-dir` skips: missing files in the
49
62
### Validation
50
63
51
64
```bash
52
-
claude plugin validate .# validates .claude-plugin/* manifests
Codex has no native validator on the CLI; it validates implicitly at install/load. After `codex plugin marketplace add "$(pwd)"`, start a session and check `~/.codex/log/codex-tui.log` for `cpln` or `controlplane` warnings — none should appear.
81
+
60
82
### Debug plugin loading
61
83
62
84
```bash
63
-
claude --debug
85
+
claude --plugin-dir ./plugins/cpln --debug hooks
64
86
```
65
87
66
-
Look for "loading plugin" messages and confirm each component directory (skills, agents, commands, hooks) appears. Use `--debug hooks` (or other category filters shown in `claude --help`) to narrow the output.
67
-
68
-
To exercise a hook, trigger the matching tool call (Bash for the current hooks) and watch for the `BLOCK:` stderr message; hook definitions live in `hooks/hooks.json`.
88
+
Look for "loading plugin" messages and confirm each component directory (skills, agents, commands, hooks) appears. Use `--debug hooks` (or other category filters shown in `claude --help`) to narrow the output. To exercise a hook, trigger the matching tool call (Bash for the current hooks) and watch for the deny message — hook definitions for Claude/Codex live in `plugins/cpln/hooks/cpln-hooks.json` and the Gemini equivalents live in `hooks/hooks.json` at repo root.
69
89
70
90
## Versioning
71
91
72
-
Versions in `.claude-plugin/plugin.json`, `.codex-plugin/plugin.json`, and `gemini-extension.json` must stay aligned. See `CONTRIBUTING.md` for the full release checklist.
92
+
Versions in `plugins/cpln/.claude-plugin/plugin.json`, `plugins/cpln/.codex-plugin/plugin.json`, and `gemini-extension.json` must stay aligned. See `CONTRIBUTING.md` for the full release checklist.
0 commit comments