Universal Portability Architecture
Security teams don’t work in a single tool. In any modern organization, security engineers and analysts use a mix of AI assistants: GitHub Copilot in the IDE or terminal, Claude Code for autonomous command-line workflows, OpenAI Codex or ChatGPT for research, and custom agent runtimes for orchestration.
Writing separate security playbooks, skills, and configuration files for each assistant is frustrating, tedious, and invites configuration drift. COPS solves this with a “Define Once, Adapt Everywhere” architecture.
The Core Concept
Every security tool in COPS is authored as a host-neutral package. Core logic, defensive skills, schemas, and offline fixtures live together. COPS generates the compatibility adapters each AI assistant needs to discover those tools. Framework integration workflows can also depend on the shared COPS runtime.
flowchart TD
subgraph CanonicalLayer["Canonical Source of Truth"]
Catalog["catalog/plugins.json & categories.json<br/>(Master Inventory)"]
Package["plugins/category/plugin-id/<br/>• package.json & plugin.json<br/>• skills/ & agents/<br/>• scripts/ & tests/<br/>• offline demo & fixtures"]
end
subgraph Generator["COPS Engine (python3 -m cops generate)"]
Engine["Host Adapter Generator & Validator"]
end
subgraph HostSurfaces["Generated Discovery Adapters"]
Copilot[".github/plugin/marketplace.json<br/>(GitHub Copilot)"]
Codex[".agents/plugins/marketplace.json<br/>(OpenAI Codex)"]
Claude[".claude-plugin/marketplace.json<br/>(Claude Code)"]
Portable["dist/agent-plugins/<br/>(Universal Agent Plugins v1.0.0)"]
end
Catalog --> Engine
Package --> Engine
Engine --> Copilot
Engine --> Codex
Engine --> Claude
Engine --> Portable
Two Parallel Spines
To keep the repository clean and avoid mixing developer tools with security runtime tools, COPS maintains two distinct spines:
- The Product Package Spine (
plugins/):- Contains defensive security packages (e.g.,
security-logging-advisor,sentinel-hunt-workbench). - Each package holds its code, tests, documentation, and agent skills.
- Offline playbacks use local fixtures and installed development dependencies; they do not need cloud credentials.
- Contains defensive security packages (e.g.,
- The Repository Contributor Spine (
.agents/,scripts/agent/,Makefile):- Contains contributor-facing skills and automated maintenance workflows.
- Coordinates repository health checks, contract validation, branch management, and automated adapter synchronization.
- Synchronized across agent environments via
make sync-agent-adapters.
The Golden Rules of Portability
To guarantee that any tool added to COPS works reliably across assistants without surprises, every package follows five portability rules:
1. Single Source of Truth
Every package is registered once in catalog/plugins.json and assigned to exactly one primary category in catalog/categories.json. All host-specific marketplace manifests are derived from this catalog; we never edit host manifests by hand.
2. Explicit Runtime Dependencies
Package code, fixtures, documentation, and skills live inside plugins/<category>/<plugin-id>. Shared framework dependencies must be documented. The threat-intelligence and offensive-engagement playbacks use the COPS runtime; engagement scenario lookup also uses catalog/, and specialist handoff routing reads the canonical agents/registry.json. The SOC workbench pins its Sentinel dependency inside the package instead of reading a sibling checkout.
3. Safe, Offline-First Execution
Every package provides a safe offline demonstration. Install the repository’s development prerequisites, then run:
python3 -m cops demo <plugin-id>
You don’t need cloud credentials, API tokens, or an active AI assistant connection to verify that a tool works.
4. Process Safety: Argument Arrays, Never Shell Strings
Commands declared in manifests are always executed as explicit argument arrays (["python3", "scripts/tool.py", "arg"]), never passed to an arbitrary shell (sh -c "..."). This eliminates shell injection vulnerabilities and quoting bugs across different operating systems.
5. Automated Drift Prevention
Whenever a package is modified, running python3 -m cops generate rebuilds the marketplace indexes. Running python3 -m cops generate --check verifies that no files are out of sync.
Universal Agent Plugins v1.0.0 Export
For environments running the open Agent Plugins v1.0.0 specification, COPS can bundle clean, host-agnostic distribution archives:
# Verify that all packages meet the portable export specification
python3 scripts/agent/export_portable.py --check
# Export clean packages to a distribution folder
python3 scripts/agent/export_portable.py --output dist/agent-plugins
The exported packages strip away internal host-specific directories (such as .claude-plugin/ and .codex-plugin/), leaving a lean, standards-compliant plugin containing:
plugin.json: The standard root manifest.skills/: Markdown-documented capabilities conforming to the Agent Skills standard.org.cops/prerequisites.json: Declarative system dependencies.
Required runtime modules, fixtures, and playback documentation also ship in the
export. The SOC workbench includes its exact Sentinel dependency snapshot in
vendor/ with vendor-lock.json; its vendor verifier checks file hashes and
provenance before a hunt handoff. Native adapter files inside that pinned
dependency remain part of the verified snapshot.
Exports use the Git index as their file inventory and copy current working-tree bytes. Add new package files to the index before validating an uncommitted change. Unknown package-root entries and broken package-local documentation links fail the export check.
The acceptance suite runs every source playback twice through cops demo, then
runs every exported playback twice in an isolated directory containing only exported
packages plus cops/, catalog/, and the canonical agents/registry.json. It excludes source tests and contributor
scripts and replaces PYTHONPATH with the isolated runtime. Each runner checks
its domain results and rejection paths. This verifies export completeness for
the documented framework workflow; it does not establish that every plugin is
a standalone installation without COPS or that a live provider works.
COPS uses the project namespace org.cops for both the manifest’s
extensions["org.cops"] key and its support directory. When updating an older
package that uses the username-based namespace, replace the manifest key and
directory together, update references, and regenerate any portable exports.
Declarative Prerequisites (No Surprise Scripts)
Rather than executing arbitrary installation scripts during setup, COPS declares prerequisites as structured JSON metadata. You can inspect what external tools (like git or specific linters) a plugin requires without running untrusted code:
# Check if your system meets all prerequisite requirements
python3 scripts/agent/install_prerequisites.py --check
# Preview the exact package manager commands needed (without running them)
python3 scripts/agent/install_prerequisites.py --dry-run
What Cannot Be Fully Standardized
While COPS standardizes package discovery, skill schemas, and CLI operations, AI assistant hosts differ in ways that cannot—and should not—be papered over:
- Host Sandboxes & Permissions: Claude Code, GitHub Copilot, and Codex have different permission models for filesystem access and bash execution.
- Hook Events: How and when an assistant triggers a tool before or after a model turn varies by host runtime.
- Live Cloud Authentication: Connecting to a real Microsoft Sentinel workspace, AWS environment, or GCP tenant requires organization-specific credentials, IAM roles, and network routing.
COPS explicitly documents these boundaries instead of pretending every assistant runs identically. For details on how we verify each layer, see Compatibility and Evidence Boundaries.