Skip to content

Add Change Intelligence service integration#96

Open
manthan787 wants to merge 1 commit intomainfrom
feat/change-intelligence-cli-integration
Open

Add Change Intelligence service integration#96
manthan787 wants to merge 1 commit intomainfrom
feat/change-intelligence-cli-integration

Conversation

@manthan787
Copy link
Collaborator

Summary

  • Adds an optional integration with the Change Intelligence servicegit blame, but for agents
  • When enabled, the CLI can surface recent changes during incident triage, correlate changes with affected services, and predict blast radius before changes land
  • Disabled by default (providers.changeIntelligence.enabled: false) — zero impact on existing users

What's included

Area Files What it does
Adapter src/providers/change-intelligence/adapter.ts HTTP client with inlined types — no new dependencies
Config src/utils/config.ts providers.changeIntelligence schema (enabled, baseUrl, apiKey)
Agent tools src/tools/registry.ts 4 tools: query_change_events, correlate_changes, predict_blast_radius, get_change_velocity
Tool gating src/cli/runtime-tools.ts Tools hidden unless changeIntelligence.enabled is true
Triage src/agent/investigation-orchestrator.ts correlate_changes wired as a triage source
Causal queries src/agent/causal-query.ts Change correlation added to deployment_issues pattern
Summarizers src/agent/tool-summarizer.ts Summaries for correlation and change event results
Mutation hook src/integrations/hook-handlers.ts Detects mutations (deploys, infra changes) in postToolUse and registers them as change events
MCP src/mcp/server.ts 2 MCP tools: query_changes, predict_change_impact
CLI src/cli.tsx runbook changes subcommands: list, register, correlate, blast-radius, velocity

How to enable

# .runbook.yaml
providers:
  changeIntelligence:
    enabled: true
    baseUrl: http://localhost:3001  # default
    # apiKey: optional

Test plan

  • npm run typecheck passes
  • All 433 existing tests pass — no regressions
  • Manual: start change-intelligence service → runbook changes list → verify connectivity
  • Manual: runbook changes register -s api-gateway --type deployment --summary "Deploy v2" → verify event stored
  • Manual: trigger runbook investigate with change-intelligence enabled → verify correlation appears in triage

🤖 Generated with Claude Code

Integrate with the Change Intelligence service (github.com/Runbook-Agent/change-intelligence)
to surface recent changes during incident triage, correlate changes with affected services,
and predict blast radius. The integration is optional and disabled by default.

- Add HTTP adapter with inlined types (no new dependencies)
- Register 4 agent tools: query_change_events, correlate_changes, predict_blast_radius, get_change_velocity
- Gate tools behind providers.changeIntelligence.enabled config (default: false)
- Wire correlate_changes into investigation orchestrator triage sources
- Add deployment_issues causal query patterns for change correlation
- Add tool summarizers for change correlation and event query results
- Detect mutations in postToolUse hook and register as change events
- Expose query_changes and predict_change_impact via MCP server
- Add `runbook changes` CLI subcommands (list, register, correlate, blast-radius, velocity)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments