What problem does it solve?
Keeping a heavily diverged fork of @anthropic-ai/claude-agent-acp current with upstream releases is error-prone: SDK bumps carry hidden breaking changes, upstream commits mix valuable fixes with irrelevant churn, and PostHog-specific behavior can be accidentally overwritten. This runbook provides a repeatable process for triaging upstream commits, porting only the valuable changes, and preserving every intentional fork divergence.
Core Features & Use Cases
- Commit triage and mapping: Buckets each upstream commit since the last sync into port, dependency-bump, or skip, and maps upstream files (e.g. acp-agent.ts) to the fork's split modules via the UPSTREAM.md file mapping.
- Dependency and breaking-change handling: Bumps @anthropic-ai/claude-agent-sdk, @agentclientprotocol/sdk, and @anthropic-ai/sdk, then uses typecheck errors across the whole packages/agent workspace to surface the breaking-change surface, including name-mangled ACP generated types.
- Divergence preservation and verification: Ports bug fixes before features while protecting PostHog-only code (single-session model, gateway models, _posthog/* extensions, steer mode), then runs typecheck, build, biome, and tests, and finally updates UPSTREAM.md with ported and skipped changes.
- Use Case: When asked to "upgrade the claude adapter" or "bump the agent SDK", follow the runbook to diff the upstream checkout against the last-synced commit, port the relevant changes, verify the full repo compiles, and record the new sync state.
Quick Start
Ask the agent to follow the upgrade skill in the claude adapter directory to sync the fork with the latest upstream claude-agent-acp release, providing the path to your local upstream checkout.