evolve-integrate
Integrate AICP with new external systems — fleet projects (openfleet via cluster peering), cloud backends (new OpenRouter model, new Anthropic feature), monitoring stack (new Prometheus exporter, new
SKILL.md.claude/skills/evolve-integrate/SKILL.md
GitHubevolve-integrate
Add a new external system integration to AICP. The "integrate" stage of
the lifecycle: NEW capability via NEW dependency, distinct from evolving
an existing API (evolve-api-version) or migrating data
(evolve-migrate).
Trigger phrases (when to load this skill)
Load when the conversation matches any of:
- Direct verb: "integrate AICP with X", "add a new backend", "connect to Y system", "add Z to monitoring", "wire up <new external service>"
- Backend integration: adding a new model provider (e.g., new OpenRouter model variant, new Anthropic feature)
- Fleet integration: connecting AICP to openfleet machines (per
CLAUDE.md
## Infrastructure target) - Tooling integration: adding GitHub Actions, GitLab CI, Codecov, etc.
Do NOT load when:
- The concern is versioning an EXISTING API (load
evolve-api-version) - The concern is migrating an EXISTING integration (load
evolve-migrate) - The concern is the implementation pattern itself (load
architecture-proposefor design, then THIS skill for the integration)
Operations
Operation 1 — Author the integration decision
When: a new integration is being considered.
Process:
- Per Knowledge Evolution Standards, author a decision page at
wiki/decisions/00_inbox/integrate-<system>.md:- WHY: what does this integration enable that AICP doesn't have today?
- ALTERNATIVES: at least 2 (e.g., "build it ourselves", "use existing similar system")
- REVERSIBILITY: can we remove the integration without breaking AICP?
- DEPENDENCIES: what new packages/services/configs are pulled in?
- Get operator approval before implementing
- The decision page is the contract for what gets built
Quality bar: NEVER skip the decision page for a new integration. Integrations create dependencies; future operators need to know WHY the dependency exists.
Operation 2 — Wire the integration into AICP
When: decision approved; build the integration.
Process:
- Choose surface for the integration:
- Backend: add to
aicp/backends/<name>.py(matches existinglocalai.py,claude_code.pyshape) - MCP tool: per
infra-apiskill + audit criteria, default to CLI+Skills unless legitimate cross-conversation use case - Monitoring exporter: add to
aicp/core/prometheus.pyor extend Grafana dashboards - CI: add
.github/workflows/<name>.ymlor equivalent
- Backend: add to
- Implement following AICP conventions (snake_case, type hints, docstring,
tests in
tests/) - Add config keys to
config/default.yamlif the integration is tunable; document in.env.exampleif env vars are needed - Add a test in
tests/exercising the integration (mock the external service for unit tests; provide a smoke-test fixture for integration tests)
Quality bar: integration code follows AICP patterns; test coverage exists; config is operator-discoverable. NEVER ship without these.
Operation 3 — Document the integration for operators
When: integration is shipped; operators need to know how to use it.
Process:
- Add a row to CLAUDE.md
## Tech Stackif the integration adds a runtime dependency - Add a section to relevant skill (e.g., new backend → mention in
aicp-model-mgmtrelated skills table) - Update
.env.examplewith any new secrets/tokens - If the integration affects deployment, update
config-deployskill reference - Add to CHANGELOG
Quality bar: an operator running git pull should be able to
discover the integration from documentation alone. Code-only integration
is operationally invisible.
Operation 4 — Test the integration end-to-end
When: pre-merge verification.
Process:
- Unit tests pass:
pytest tests/test_<integration>.py(mocked external) - Integration smoke test: run with the real external service connected (or a docker-compose fixture if available)
aicp --checkshows the integration in its status output (if applicable)aicp --self-testincludes the integration probe (if applicable — add a_probe(...)call in_run_self_test())
Quality bar: integrations that aren't covered by --check or
--self-test are operationally invisible at runtime; add the probe.
Gotchas
Detection: agent adds an integration without authoring a decision page. Rule: every new integration gets a decision page in
wiki/decisions/00_inbox/. Reasoning: integrations create dependencies; without the decision page, future operators inherit the dependency without context for WHY.Detection: agent defaults a new tool to MCP without applying the audit criteria. Rule: per the MCP audit + CLI-beats-MCP lesson, default new exposures to CLI+Skills. Reasoning: AICP has too many MCP tools already (per audit); adding more without justification compounds the schema overhead.
Detection: agent adds an integration without updating
--checkor--self-test. Rule: integrations that affect runtime should be discoverable via--check(reachability) and--self-test(functional). Reasoning: invisible integrations make operator diagnostic harder — they can't tell if the integration is healthy.Detection: agent adds new env vars without updating
.env.example. Rule: every new env var goes in.env.examplewith comment explaining purpose. Reasoning: undocumented env vars are operational landmines (per theconfig-envskill).Detection: agent skips reversibility consideration in the decision page. Rule: every integration's decision page must answer "can we remove this without breaking AICP?" — and if not, why is the dependency acceptable. Reasoning: integrations accumulate; without reversibility analysis, AICP becomes brittle over time.
Reference exemplars
aicp/backends/localai.py— backend integration shape (the canonical pattern for new backends)aicp/backends/claude_code.py— second backend example, including subprocess invocation patternwiki/decisions/01_drafts/localai-over-ollama-vllm-for-multi-model-orchestration.md— example of an integration decision page (alternatives + rationale)tests/test_*.py— integration test patterns.github/workflows/(if exists) — CI integration shapewiki/decisions/00_inbox/aicp-mcp-tool-surface-audit-2026-04-19.md— the audit criteria for whether to expose via MCP vs CLI
Domain context
AICP has 2 backend integrations today (LocalAI + Claude Code) and several
optional ones (OpenRouter, fleet peers via planned cluster peering).
The aicp/backends/base.py interface defines the contract new backends
must satisfy. Cloud backends require careful secrets handling
(per config-secrets skill). Fleet integrations require cluster peering
(planned per CLAUDE.md ## The Mission Stage 4 partial).
Related skills
| Skill | When to use |
|---|---|
architecture-propose |
When the integration requires significant architectural design |
infra-api |
When the integration adds a new API surface |
config-secrets |
When the integration requires new secrets/tokens |
config-env |
When the integration adds new env vars or config keys |
infra-monitoring |
When integrating monitoring tools specifically |
evolve-migrate |
When the integration replaces an existing one (migration) |
evolve-api-version |
When the integration is a new VERSION of an existing API |