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
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ jobs:
- name: PrePluginPack
# The pluginpack-action runs `npx pluginpack diff/build` directly (not
# `npm run build`), so the repo's prebuild esbuild step never fires.
# sources/local-mcp/dist/index.js is gitignored, so build it here or
# pluginpack's additionalFiles source read fails for every target.
# shared/glean/mcp/dist/index.js is gitignored, so build it here or
# pluginpack's MCP shipping-file source read fails for every target.
run: npm run build:bundle

- name: Resolve pinned pluginpack version
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ node_modules/
# Generated build output (published to the target repos by CI)
dist/
# local-mcp runtime MCP server bundle (regenerated by build:bundle / prebuild)
sources/local-mcp/dist/
shared/glean/mcp/dist/

# Claude Code runtime cache (local-mcp skills cache written during local runs)
.claude/tmp/
Expand Down
65 changes: 34 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
# Glean Agent Plugins

The source-of-truth repository for Glean's official plugins for AI coding
assistants. One portable library of skills, agents, rules, commands, and hooks
is authored here once, and [`pluginpack`](https://github.com/gleanwork/pluginpack)
assistants. Each plugin is authored once under `shared/`, and
[`pluginpack`](https://github.com/gleanwork/pluginpack)
compiles it into the native plugin layout each host expects — today **Claude
Code**, **Cursor**, and **Codex**. Most skills share one base source; target
overrides handle the few host-specific setup and capability differences.
Code**, **Cursor**, and **Codex**. Target overrides handle the few host-specific
setup and capability differences.

## Layout

| Path | What it is |
|------|------------|
| `skills/` | The portable skill library — one `SKILL.md` (plus optional `references/`) per capability, with host-specific files only under `targets/<host>/`. **The source of truth.** |
| `sources/shared/` | Components shared by targets that support them (subagents). |
| `sources/claude/` | Claude-only components (slash-commands, hooks). |
| `sources/codex/` | Codex-only plugin documentation and static files. |
| `sources/cursor/` | Cursor-only components (rules, commands, assets). |
| `sources/dev-docs/` | Source for the separate `glean-dev-docs` plugin. |
| `pluginpack.config.ts` | Build config — which sources compose into which plugin, per target. |
| `plugins/`, `glean/`, `glean-dev-docs/`, `.agents/`, `.codex-plugin/`, `.claude-plugin/`, `.cursor-plugin/` | **Generated** output. Don't edit by hand — it's rebuilt from source. |
| Path | What it is |
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ |
| `shared/glean/` | Canonical Glean plugin: skills, agents, static files, and the local MCP implementation. |
| `shared/glean-dev-docs/` | Canonical source for the separate developer-docs plugin. |
| `overrides/<target>/<plugin>/` | Target-specific additions and replacements applied after the shared source. |
| `repositories/<target>/` | Files emitted at the root of each generated marketplace repository. |
| `pluginpack.config.ts` | Build config — which shared source, overrides, and content kinds each target includes. |
| `dist/<target>/` | **Generated** marketplace repositories. Don't edit them by hand — they're rebuilt from `shared/`, `overrides/`, and `repositories/`. |

## Plugins produced

Expand All @@ -28,13 +26,17 @@ Each target gets two single-purpose plugins:
code exploration, people and experts, meetings, onboarding, and personal
productivity. Skills auto-trigger by task; there's no per-skill install.
- **`glean-dev-docs`** — searches the public Glean developer documentation
(separate MCP server, for people *building with* Glean).
(separate MCP server, for people _building with_ Glean).

## How it works

`pluginpack` reads `pluginpack.config.ts`, collects the configured skills and
components, and emits each host's native format:

Nothing under `shared/` ships implicitly. Each emitted plugin names its shared
`source`, optional target `overrides`, and any `include` or `exclude` selection in
`pluginpack.config.ts`.

- **Claude Code** — a marketplace + plugin manifest with convention-discovered
skills, commands, and hooks.
- **Cursor** — a marketplace + `plugin.json` referencing skills, agents, rules,
Expand All @@ -44,42 +46,43 @@ components, and emits each host's native format:

Skills use the open Agent Skills format — `SKILL.md` with `name`/`description`
frontmatter and optional `references/` loaded on demand — which Claude Code,
Codex, Cursor, Gemini CLI, and Copilot all support. Base skills ship everywhere;
target overrides handle the few host-specific differences.
Codex, Cursor, Gemini CLI, and Copilot all support. Shared skills ship to each
target that includes them; target overrides handle host-specific differences.

> The plugins don't bundle a Glean MCP server — users connect one themselves
> (your host's Glean MCP setup guides that). The skills then use whatever Glean MCP
> tools are available in the host.
The Claude and Codex `glean` plugins bundle the local Glean MCP adapter under
`shared/glean/mcp/`. Cursor excludes that capability and uses a separately
connected Glean MCP server. MCP configuration lives in `mcp/config.json`, while
`mcp/pluginpack.json` lists the implementation files that ship.

## Develop

Requires Node >= 24. Install once with `npm install`.

| Command | What it does |
|---------|--------------|
| `npm run build` | Compile all targets into the generated plugin output. |
| `npm run validate` | Validate each target's generated output. |
| `npm test` | Build every target, then validate each generated output. |
| `npm run prune` | Remove stale generated files. |
| `npm run clean` | Remove all generated output. |
| Command | What it does |
| ------------------ | -------------------------------------------------------- |
| `npm run build` | Compile all targets into the generated plugin output. |
| `npm run validate` | Validate each target's generated output. |
| `npm test` | Build every target, then validate each generated output. |
| `npm run prune` | Remove stale generated files. |
| `npm run clean` | Remove all generated output. |

### Add or change a skill

1. Edit or create `skills/<name>/SKILL.md` (add `references/*.md` for deep,
1. Edit or create `shared/glean/skills/<name>/SKILL.md` (add `references/*.md` for deep,
load-on-demand detail).
2. `npm run build` to regenerate the plugins.
3. `npm test` to confirm every target builds and validates cleanly.

Base skill changes reach every target that includes them. When one host needs
different instructions, add a full replacement at
`skills/<name>/targets/<host>/SKILL.md`; other targets keep the base file.
`overrides/<host>/glean/skills/<name>/SKILL.md`; other targets keep the shared file.

### Commit conventions

Releases and the changelog are driven by [Conventional Commits](https://www.conventionalcommits.org/).
In this repo the skill markdown *is* the shipped product, so:
In this repo the skill markdown _is_ the shipped product, so:

- Use `feat:` / `fix:` for any change to `skills/` or `sources/` content —
- Use `feat:` / `fix:` for any change to `shared/` or `overrides/` content —
it alters what users install, even when the change is "just docs".
- Reserve `docs:` for repo-level documentation that doesn't ship (README,
contributing notes, etc.).
Expand Down
4 changes: 2 additions & 2 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ release is what triggers the actual plugin distribution (below).
1. Determine the next version from commits since the last tag (`feat` →
minor, `fix` → patch, a `BREAKING CHANGE` footer → major).
2. Regenerate `CHANGELOG.md`. Its `after:bump` hook then runs `npm run
build`, which syncs that changelog into `sources/claude`,
`sources/codex`, `sources/cursor`, `sources/dev-docs`, and rebuilds the
build`, which syncs that changelog into `shared/glean` and
`shared/glean-dev-docs`, then rebuilds the
generated plugin output — all of which is included in the release
commit.
3. Commit as `chore: release v${version}`, tag `v${version}`, and push both
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"mcpServers": {
"glean_plugin": {
"command": "node",
"args": ["./start.mjs"],
"args": ["./mcp/start.mjs"],
"cwd": ".",
"env": {
"ENABLE_HITL": "true",
Expand Down
File renamed without changes.
Binary file added overrides/cursor/glean/assets/avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 15 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,23 @@
"type": "module",
"scripts": {
"build": "pluginpack build",
"build:bundle": "node sources/local-mcp/build.mjs",
"build:bundle": "node shared/glean/mcp/build.mjs",
"clean": "pluginpack clean",
"check:no-shell": "node scripts/check-no-shell-scripts.mjs",
"prune": "pluginpack prune",
"typecheck:bundle": "tsc --noEmit -p sources/local-mcp/tsconfig.json",
"test:bundle": "vitest run --root sources/local-mcp",
"typecheck:bundle": "tsc --noEmit -p shared/glean/mcp/tsconfig.json",
"test:bundle": "vitest run --root shared/glean/mcp",
"validate": "pluginpack validate --target claude --dir dist/claude && pluginpack validate --target cursor --dir dist/cursor && pluginpack validate --target codex --dir dist/codex",
"test": "npm run build && npm run validate",
"prebuild": "node scripts/sync-changelog.mjs && npm run build:bundle",
"prebuild": "node scripts/sync-release-metadata.mjs && npm run build:bundle",
"release": "release-it"
},
"dependencies": {
"@modelcontextprotocol/sdk": "^1.12.1",
"yaml": "^2.7.0"
},
"devDependencies": {
"@gleanwork/pluginpack": "^0.9.0",
"@gleanwork/pluginpack": "^0.11.0",
"@release-it/conventional-changelog": "^11.0.1",
"@types/node": "^22.0.0",
"esbuild": "^0.28.1",
Expand Down
75 changes: 46 additions & 29 deletions pluginpack.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@ import pkg from "./package.json" with { type: "json" };
export default defineConfig({
name: "glean-plugins",
version: pkg.version,
source: {
plugins: "sources",
skills: "skills",
rootPlugin: {
id: "glean-lib",
description: "Portable Glean skill library.",
},
},
metadata: {
author: {
name: "Glean",
Expand All @@ -27,22 +19,22 @@ export default defineConfig({
claude: {
outDir: "dist/claude",
version: pkg.version,
rootFiles: { "README.md": "roots/claude/README.md" },
repositoryFiles: "repositories/claude",
manifest: {
description:
"Official Glean plugins for Claude Code — enterprise knowledge, search, people, code, and meetings.",
},
plugins: {
glean: {
from: ["glean-lib", "shared", "claude", "local-mcp"],
components: ["skills", "agents", "hooks"],
source: "shared/glean",
overrides: "overrides/claude/glean",
displayName: "Glean",
description:
"Official Glean plugin — search documents, Slack, and email; explore code across repos; find experts and stakeholders; prep for meetings and onboarding.",
},
"glean-dev-docs": {
from: ["dev-docs"],
components: ["skills"],
source: "shared/glean-dev-docs",
include: ["skills", "static"],
displayName: "Glean Developer Docs",
description:
"Search the public Glean developer documentation — APIs, SDKs, MCP, and integration guides for building with Glean.",
Expand All @@ -52,31 +44,58 @@ export default defineConfig({
cursor: {
outDir: "dist/cursor",
version: pkg.version,
rootFiles: { "README.md": "roots/cursor/README.md" },
repositoryFiles: "repositories/cursor",
manifest: {
metadata: {
description:
"Official Glean plugins for Cursor — enterprise knowledge, code search, and people discovery.",
keywords: ["glean", "enterprise-search", "knowledge-management", "productivity", "workplace", "mcp"],
keywords: [
"glean",
"enterprise-search",
"knowledge-management",
"productivity",
"workplace",
"mcp",
],
},
},
plugins: {
glean: {
from: ["glean-lib", "shared", "cursor"],
components: ["skills", "agents", "rules", "assets"],
source: "shared/glean",
overrides: "overrides/cursor/glean",
exclude: ["mcp", "hooks", "scripts"],
displayName: "Glean",
description:
"Official Glean plugin — search documents, Slack, and email; explore code across repos; find experts and stakeholders; prep for meetings and onboarding.",
manifest: {
logo: "assets/avatar.svg",
keywords: ["glean", "enterprise-search", "knowledge-management", "productivity", "workplace", "code-search", "people-search", "mcp"],
keywords: [
"glean",
"enterprise-search",
"knowledge-management",
"productivity",
"workplace",
"code-search",
"people-search",
"mcp",
],
category: "productivity",
tags: ["mcp", "enterprise", "search", "documents", "slack", "code", "people", "experts", "org"],
tags: [
"mcp",
"enterprise",
"search",
"documents",
"slack",
"code",
"people",
"experts",
"org",
],
},
},
"glean-dev-docs": {
from: ["dev-docs"],
components: ["skills"],
source: "shared/glean-dev-docs",
include: ["skills", "static"],
displayName: "Glean Developer Docs",
description:
"Search the public Glean developer documentation — APIs, SDKs, MCP, and integration guides for building with Glean.",
Expand All @@ -85,18 +104,15 @@ export default defineConfig({
},
codex: {
outDir: "dist/codex",
rootFiles: {
"README.md": "roots/codex/README.md",
LICENSE: "LICENSE",
},
repositoryFiles: "repositories/codex",
manifest: {
name: "glean-codex-plugins",
interface: { displayName: "Glean for Codex" },
},
plugins: {
glean: {
from: ["glean-lib", "codex", "codex-assets", "local-mcp"],
components: ["skills", "assets"],
source: "shared/glean",
overrides: "overrides/codex/glean",
description:
"Official Glean plugin — search documents, Slack, and email; explore code across repos; find experts and stakeholders; prep for meetings and onboarding.",
manifest: {
Expand Down Expand Up @@ -126,8 +142,9 @@ export default defineConfig({
},
},
"glean-dev-docs": {
from: ["dev-docs", "codex-assets"],
components: ["skills", "assets"],
source: "shared/glean-dev-docs",
overrides: "overrides/codex/glean-dev-docs",
include: ["skills", "assets", "static"],
description:
"Search the public Glean developer documentation — APIs, SDKs, MCP, and integration guides for building with Glean.",
manifest: {
Expand Down
7 changes: 3 additions & 4 deletions sources/dev-docs/LICENSE → repositories/claude/LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Glean Technologies, Inc.
Copyright (c) 2025 Glean

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -17,6 +17,5 @@ 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.

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
File renamed without changes.
Loading