Self-Correcting SDKs: Keeping Specs and Implementatio...
summary
PostHog runs agents that detect spec drift across 17 repositories and ~40 published packages, using OpenSpec for human-readable contracts, a Docker-based SDK test harness for executable conformance tests, and agent workflows (posthog codes + a GitHub action called posthog watcher) that open draft PRs and labels. Daily runs find real issues — an iOS fix triggers automated Android and spec PRs, reviewhog flags an edge case, humans fix and merge, and the system reduces repetitive porting work.
AI-written summary · about
chapters (15)
- 0:00Introduction to self-correcting SDKs
- 1:24Customer bug report and iOS fix
- 3:31SDK contract and specification design
- 7:25OpenSpec language and testing
- 10:12Automating SDK reconciliation
- 13:24Handling all possible fix paths
- 15:12Survey feature bug and Android fix
- 17:39Human review and regression checks
- 21:16PostHog Watcher and issue triage
- 24:46Draft PR review and human adjustments
- 25:27SDK harness and conformance testing
- 28:15Test harness updates and CI failures
- 29:18Daily workflow and cascade changes
- 31:04Challenges and fine-tuning
- 32:29Conclusion and Q&A
