Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ dist/
.DS_Store
*.log
commands/ops-server.md
.agent-surface/workflows/
.agent-surface/backups/
.agent-surface/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@
[submodule "external/codex-redteam-mode"]
path = external/codex-redteam-mode
url = https://github.com/chAng-L19/codex-redteam-mode.git
[submodule "external/rev-skills"]
path = external/rev-skills
url = https://github.com/Lyther/rev-skills.git
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# is still useful as a packaging sanity check and should not bundle rendered output.
node_modules/
dist/
.agent-surface/
mcps/*/node_modules/
mcps/*/dist/
.DS_Store
Expand Down
11 changes: 8 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,25 @@ Notable changes to agent-surface and its first-party MCP services. Format: [Keep

### Added

- **Grimoire MCP (v0.1)** — read-only, just-in-time retrieval over large Agent-Skill packs. Serves the 754-skill `anthropic-cybersecurity-skills` pack from a self-contained `node:sqlite` FTS5 index so the model searches for a skill instead of loading a 750-entry startup catalog. 4 tools (`grimoire_search`/`list`/`get`/`file_get`), build-on-install index, real-pack eval gate (hit@5 0.80 / MRR 0.686). See `mcps/grimoire/`.
- **First-party MCP auto-wiring across all 17 MCP-capable hosts** — Synapse + Grimoire are generated and **non-destructively merged** into each host's native config across JSON, TOML, and YAML families. Adds VSCodium, Grok Build, Antigravity CLI (JSON) and Goose, Poolside (YAML, via a new safe block-merge that preserves keys/comments/siblings and is idempotent). Full matrix: `docs/reference/targets.md`.
- **Grimoire MCP (v0.1 package; v1.0 tool contract)** - read-only, just-in-time retrieval over the `anthropic-cybersecurity-skills` and `rev-skills` packs from a self-contained `node:sqlite` FTS5 index. Four tools (`grimoire_search`/`list`/`get`/`file_get`) expose source/license attribution and fail closed on stale provenance.
- **First-party MCP auto-wiring across all 22 MCP-capable hosts** - Synapse + Grimoire are generated and non-destructively merged into each host's native config across JSON, TOML, and YAML families. Full matrix: `docs/reference/targets.md`.
- **2026 runtime portfolio refresh** - adds DSH, Qoder, Qwen Code, and Kiro; upgrades Copilot CLI, Grok Build, Antigravity CLI, and Trae; retires VSCodium; records Amp, Auggie, Crush, and Warp as planned.
- **`doctor` MCP health** — checks linked binaries, the synapse sidecar, and grimoire **index freshness** (installed manifest pin vs the repo registry pin).
- **CI** — a Node-22 `mcp` job runs the grimoire (incl. real-pack eval) and synapse package suites + audits on every PR.

### Changed

- **`/ops:docs` command** rewritten to the Diátaxis + minimalism model: aggressive, repo-fit, opinionated on a clean/less-is-more house style (653 → 159 lines).
- **`ops-docs` skill** rewritten to the Diátaxis + minimalism model: aggressive, repo-fit, and concise by default.
- **README** rewritten lean (203 → ~100 lines); the full target matrix moved to `docs/reference/targets.md`.
- **Full-access policy ownership** - Kilo and OpenCode full installs replace the complete permission object with wildcard allow while preserving unrelated top-level settings; category-only MCP installs do not alter host-wide permission or sharing controls.

### Fixed

- **MCP opt-in** — `--category mcps` without `--service` now selects first-party services only; external/secret-bearing MCPs (e.g. `agentmemory`) require an explicit `--service`.
- **Install correctness** — `grimoire-index` wrapper resolves the real entrypoint (derived from `package.json#bin`); a missing required pack fails the install (exit 1) non-destructively instead of silently succeeding.
- **Grimoire provenance and lifecycle** - requires explicit attribution, marks Git-less input `uncommitted`, fingerprints complete skill source, cleans failed publication temporaries, and reopens atomic index replacements.
- **Reinstall safety** - cleans exact declared Gemini/VSCodium and adapter-migration routes while preserving outputs still shared with active targets; maintained JSONC, TOML, and YAML libraries preserve unrelated config; Claude Code and Copilot can share the standard project `.mcp.json` route.
- **Synapse cross-project reads** - binds the cursor to the selected project and returns non-mutable cross-project ids, preventing row-id collisions from reaching local `memory_get` or `memory_forget`.

## Components

Expand Down
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Contributing

agent-surface compiles one source tree into 21 agent-host targets. Architecture: [docs/architecture.md](docs/architecture.md). Registries are the source of truth; `check` + `test` gate every change.
agent-surface compiles one source tree into 25 agent-host targets. Architecture: [docs/architecture.md](docs/architecture.md). Registries are the source of truth; `check` + `test` gate every change.

## Setup

Expand All @@ -10,7 +10,7 @@ npm run check # registry/schema/producer coherence
npm test # behaviour snapshots
```

No runtime dependencies. Node 20 runs the repo; the MCP packages under `mcps/` need Node 22.17 (`node:sqlite`).
The root compiler uses locked Ajv and JSONC/TOML/YAML format dependencies and supports Node >= 18. The MCP packages under `mcps/` need Node >= 22.17 (`node:sqlite`).

## The loop

Expand All @@ -21,15 +21,15 @@ No runtime dependencies. Node 20 runs the repo; the MCP packages under `mcps/` n

## Adding things

- **Command / rule / subagent** add the file under `commands/`, `rules/`, or `subagents/`. It renders to every target automatically. Run `check` + `test`.
- **Command / rule / subagent** - add the file under `commands/`, `rules/`, or `subagents/`. It renders only through adapters that declare that source surface; update normalized subagent target flags when adding a target. Run `check` + `test`.
- **Target** — add the adapter entry (+ its producers) to `scripts/agent-surface/targets.mjs`, its render fns to `scripts/agent-surface/render.mjs`, and its install root to `scripts/agent-surface/roots.mjs`; then a matching entry in **`registry/targets.json`** (`renders` tokens) and **`registry/target-capabilities.json`** (`generated_render_tokens` + `surfaces`). The three must agree — `check` enforces it. Add an `adapters/<target>/README.md` and snapshot assertions in `tests/`.
- **MCP wiring for a host** — add `mcpConfig` to the adapter in `targets.mjs` (`relativeOutput`, `format`, `defaultEnabled`; `scopes`/`emitOutput` as needed), with the merge logic in `scripts/agent-surface/merge.mjs`, and add the `mcps` token to both registries. New config formats need a **non-destructive merge** that preserves siblings/comments, is idempotent, and **blocks (never corrupts)** on an ambiguous shape — plus a merge test. Then classify the target `generated` in `surfaces.mcp`.
- **External skill pack** — add it as a pinned submodule under `external/` and a `skill-pack` entry with `skill_roots` in `registry/optional-services.json`. Large packs that shouldn't load at startup stay `source-pack` (no `skill_roots`) and are served by an MCP via `served_by`.
- **First-party MCP service** — build it under `mcps/<name>/` (own `package.json`/tests/`install.sh`) and declare it `first_party kind:"mcp"` in `optional-services.json`. It rides the shared distribution rails into all MCP-capable hosts.

## Rules

- **Merge, never clobber.** The compiler owns only the keys it writes; user entries and comments are preserved.
- **Merge, never clobber.** The compiler owns only the keys it writes; user sibling values and comments outside regenerated owned subtrees are preserved.
- **Honest matrix.** Every target is `generated` / `manual` / `not-generated` / `not-applicable` with a reason in `target-capabilities.json` — no silent gaps.
- **Evidence, not invention.** Docs claims trace to a file/command/config; unknowns are marked, not guessed.
- **CI is the gate.** `check`, `test`, `build --target all`, and the MCP package suites must be green before merge.
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Write your coding-agent setup **once**, render it into **every** agent host.

Reusable workflows, rules, subagents, external skill packs, ignore files, and first-party MCP services live once in this repo's source tree. `agent-surface` compiles them into the native formats of twenty-two host targets Claude Code, Codex, Cursor, Droid, Kilo, Kimi Code, Zed, OpenCode, OpenHands, and more so you maintain one source instead of twenty-two bespoke configs.
Reusable workflows, rules, subagents, external skill packs, ignore files, and first-party MCP services live once in this repo's source tree. `agent-surface` compiles them into the native formats of twenty-five host targets - Claude Code, Codex, Cursor, Droid, Kilo, Kimi Code, Qoder, Qwen Code, Kiro, DSH, Zed, OpenCode, OpenHands, and more - so you maintain one source instead of twenty-five bespoke configs.

It is a **source compiler**, not an app: there is no `src/`. Typed source primitives in → host-native surfaces out, validated by `check` and tracked by per-target manifests.

Expand All @@ -29,16 +29,16 @@ The `install` step wires each host's MCP *config* to point at `~/.local/bin/syna

- **Compiles source primitives** — `skills/`, manual-only `commands/`, `rules/`, `subagents/`, external packs, and `ignores/` become per-target outputs via explicit producers.
- **Speaks each host natively** — each target gets the surfaces it understands: commands, workflows, skills, instructions, plugins, rules, subagents, MCP config, or ignore files.
- **Wires first-party MCP** Synapse (shared memory) and Grimoire (just-in-time skill retrieval) auto-merge, secretlessly and non-destructively, into all 19 MCP-capable hosts (JSON, TOML, and YAML config families).
- **Wires first-party MCP** - Synapse (shared memory) and Grimoire (just-in-time skill retrieval) auto-merge, secretlessly and non-destructively, into all 22 MCP-capable hosts (JSON, TOML, and YAML config families).
- **Installs deterministically** — dry-run previews, project-scope gating, manifest tracking, generated-file strict-sync, and non-destructive config merges that preserve unknown sibling entries.

## Supported targets

Twenty-two targets, ranked 1–5 by how much of the source model maps to native surfaces. Every supported agent runtime receives the canonical skill catalog, all configured external skill packs, and every high-impact manual command. Commands use a native explicit surface where one exists and an explicit-invocation compatibility skill otherwise.
Twenty-five targets, ranked 1–5 by how much of the source model maps to native surfaces. Full adapters receive the canonical skill catalog, configured external skill packs, and every high-impact manual command; the intentionally limited DSH adapter receives skills only. Commands use a native explicit surface where one exists and an explicit-invocation compatibility skill otherwise.

**Full matrix per-target surfaces, file counts, and MCP wiring: [docs/reference/targets.md](docs/reference/targets.md).**
**Full matrix - per-target surfaces and MCP wiring: [docs/reference/targets.md](docs/reference/targets.md).**

Out of scope: Gemini CLI (EoLuse Antigravity CLI), Roo Code (EoL), Xcode.
Planned: Amp, Auggie, Crush, and Warp. Out of scope: Gemini CLI (individual-account EoL; use Antigravity CLI), iFlow CLI (shutdown), Roo Code (archived), VSCodium (no maintained native agent runtime), and Xcode.

## Project layout

Expand Down Expand Up @@ -78,15 +78,15 @@ node scripts/agent-surface.mjs install --target <t> --scope user --dry-run
- Project-only artifacts (`ignores/`) are skipped on user-scope installs — pass `--dest <project>` to write them.
- A live write to the real scope root needs `--allow-scope-root` (or an explicit `--dest`) after a dry-run.
- First-party secretless MCPs (Synapse, Grimoire) are generated by default for MCP-capable targets and **merged** into existing host config; external/secret-bearing MCPs stay opt-in via `--category mcps --service <id>`.
- External skill packs (the in-scope optional packs) are included in a full install and pruned by strict-sync when they leave scope; `--category external` narrows an install to external packs only. The 754-skill `anthropic-cybersecurity-skills` pack is deliberately **not** emitted (it is a `source-pack` with no `skill_roots`) and is served just-in-time by Grimoire instead.
- Install manifests in `.agent-surface/<target>-manifest.json` track generated files and owned config entries. Full installs overwrite current generated assets, remove previously owned stale assets, and preserve unknown sibling config entries.
- External skill packs (the in-scope optional packs) are included in a full install and pruned by strict-sync when they leave scope; `--category external` narrows an install to external packs only. Large `source-pack` catalogs (`anthropic-cybersecurity-skills`, `rev-skills`) are deliberately **not** emitted (no `skill_roots`) and are served just-in-time by Grimoire instead.
- Install manifests in `.agent-surface/<target>-manifest.json` track generated files and owned MCP config entries. Full installs overwrite current generated assets, remove previously owned stale assets, and preserve unknown sibling config entries. Merged host policy fields are persistent operator settings, not reverse-restored lifecycle state.

## First-party MCP services

Built from `mcps/`, installed once, then auto-wired (non-destructive merge) into all 19 MCP-capable hosts across JSON/TOML/YAML config families see [docs/reference/targets.md](docs/reference/targets.md):
Built from `mcps/`, installed once, then auto-wired (non-destructive merge) into all 22 MCP-capable hosts across JSON/TOML/YAML config families - see [docs/reference/targets.md](docs/reference/targets.md):

- **Synapse** — shared multi-agent memory + file-lock coordination.
- **Grimoire** — read-only, just-in-time retrieval over large Agent-Skill packs (serves the 754-skill `anthropic-cybersecurity-skills` pack so the model searches for a skill instead of loading a 750-entry catalog).
- **Grimoire** — read-only, just-in-time retrieval over large Agent-Skill packs (serves the 754-skill `anthropic-cybersecurity-skills` pack and the 121-skill `rev-skills` pack so the model searches instead of loading those catalogs at startup).

`npm run install:mcps` builds both binaries and links them into `~/.local/bin` (Synapse also deploys its sidecar service); the agent-surface `install` step merges each server into every host's MCP config. Both steps are required — one wires the config, the other provides the binary it points at. (`npm run install:synapse` / `install:grimoire` install just one.) Details: [mcps/synapse/README.md](mcps/synapse/README.md), [mcps/grimoire/README.md](mcps/grimoire/README.md).

Expand Down
34 changes: 13 additions & 21 deletions adapters/antigravity-cli/README.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,22 @@
# Antigravity CLI plugin adapter

Package canonical Agent Skills, all available high-impact commands, always-on rules, scoped rule references, and normalized subagents. Commands use explicit-invocation compatibility skills with `disable-model-invocation: true`; Antigravity CLI enforcement remains unproven.
Packages canonical skills, explicit high-impact workflow skills, rules, scoped references, subagents, external skills, and first-party MCP wiring under Antigravity CLI's active staged-plugin root:

Default user install target:
- `~/.gemini/antigravity-cli/plugins/agent-surface/plugin.json`
- `~/.gemini/antigravity-cli/plugins/agent-surface/skills/<name>/SKILL.md`
- `~/.gemini/antigravity-cli/plugins/agent-surface/agents/<name>.md`
- `~/.gemini/antigravity-cli/plugins/agent-surface/rules/<rule>.md`
- `~/.gemini/antigravity-cli/plugins/agent-surface/references/rules/<rule>.md`
- `~/.gemini/antigravity-cli/plugins/agent-surface/mcp_config.json`

- `~/.gemini/config/plugins/agent-surface/plugin.json`
- `~/.gemini/config/plugins/agent-surface/README.md`
- `~/.gemini/config/plugins/agent-surface/rules/<always-on-rule>.md`
- `~/.gemini/config/plugins/agent-surface/references/rules/<scoped-rule>.md`
- `~/.gemini/config/plugins/agent-surface/skills/<name>/SKILL.md`
- `~/.gemini/config/plugins/agent-surface/skills/<external-skill>/SKILL.md`
- `~/.gemini/config/plugins/agent-surface/agents/<name>.md`
- `~/.gemini/config/plugins/agent-surface/mcp_config.json` `mcpServers.{synapse,grimoire}`

Validate generated output with:
Validate and register the staged plugin with:

```bash
agy plugin validate ~/.gemini/config/plugins/agent-surface
agy plugin validate ~/.gemini/antigravity-cli/plugins/agent-surface
agy plugin install ~/.gemini/antigravity-cli/plugins/agent-surface
agy plugin list
```

Canonical skills use the standard directory form. Re-run `agy plugin validate` after Antigravity changes its plugin loader before claiming live plugin compatibility.

External skill packs render only when the optional-service entry declares `skill_roots`. `anthropic-cybersecurity-skills` is kept as a pinned source asset but is not emitted into the Antigravity CLI plugin by default.

The separate `antigravity` binary is a desktop-supervised surface unless current help/probe output proves a headless mode. Gemini CLI is EoL in this project; do not use it as an adapter or as proof that Antigravity CLI plugin packaging works.

Only `alwaysApply: true` rules are packaged under plugin `rules/`. Cybersecurity policy is always-on; scoped language policies are reference files and should be attached by project-aware commands only when applicable.
The install command creates Antigravity's runtime-owned imported copy and registry entry; agent-surface owns only the staged source above. The prior direct `~/.gemini/config/plugins/agent-surface` output could validate as a directory without being registered, so agent-surface no longer writes that route. Gemini CLI is also retired from the target portfolio and is not valid proof for this adapter.

First-party MCP services (Synapse, Grimoire) are generated and non-destructively merged into the plugin's `mcp_config.json` (`mcpServers` map), which Antigravity discovers from the staged plugin. External or secret-bearing MCPs remain opt-in. Confirm the plugin MCP loads with a live `agy`/Antigravity probe before treating the host as runtime-verified (the file shape follows Antigravity's documented plugin `mcp_config.json` + shared `~/.gemini/config/mcp_config.json`).
Reference: [Antigravity CLI plugins](https://antigravity.google/docs/cli/plugins/)
Loading
Loading