What problem does it solve?
This Skill removes ambiguity and implementation drift when building or modifying the TDLib adapter layer and its interaction/test strategy, ensuring a consistent contract between raw TDLib surfaces and the project’s consumer-side interfaces.
Core Features & Use Cases
- TDLib adapter ownership: defines the canonical place for TDLib-facing wrapping (clientAdapter) and what must stay in repo/telegram package internals.
- Consumer-side telegramRepo contract: specifies how handlers and other consumers should depend on a partially-applied telegramRepo interface using raw TDLib types plus repo-provided composites.
- Test strategy for reliability: distinguishes TDLib-independent unit tests (mocking telegramRepo), from BDD tests running against a real TDLib with test data center, and explicitly discourages long-term fake TDLib implementations.
- Authorization lifecycle control: clarifies that the auth flow (WaitPhone → WaitCode → WaitPassword → Ready) belongs to repo.go and is expressed via domain AuthState* events.
Quick Start
Use the x-tdlib skill when you change a method in internal/repo/telegram/ and need to update the adapter boundary, consumer-side telegramRepo interface, and the corresponding unit/BDD test expectations accordingly.