AI Agents SDE Task Viewer
      • Context
      • Plan
      • Prd
  1. Home
  2. AgentSDE
  3. agent-core
  4. gh-345
  5. plan
  6. plan.md
plan.md(2.4 KB)· Apr 8, 2026· 2 min read
  • Summary
  • Files
  • Steps
  • Verification
  • Risks

Plan — MT-1: PlatformProvider Interface + GitHubPlatformProvider#

Summary#

Create the PlatformProvider abstraction interface mirroring the GitHubService public API, implement GitHubPlatformProvider as a thin delegation wrapper, and wire both into a new PlatformModule. This is a pure additive change — no existing files are modified.

Files#

FileActionDescription
src/platform/platform-provider.interface.tscreatePlatformProvider interface + PLATFORM_PROVIDER injection token symbol
src/platform/github/github-platform.provider.tscreateGitHubPlatformProvider class — injects GitHubService, delegates all calls
src/platform/platform.module.tscreateNestJS module — imports GitHubModule, provides/exports PLATFORM_PROVIDER
src/platform/github/github-platform.provider.spec.tscreateUnit tests verifying every method delegates to the GitHubService mock

Steps#

  1. Read src/github/github.service.ts and extract all public method signatures (17 methods across IssueOps, LabelOps, PullRequestOps, BranchOps, ProjectOps, FileOps groups).
  2. Create src/platform/platform-provider.interface.ts — define PLATFORM_PROVIDER = Symbol('PLATFORM_PROVIDER'), PlatformProvider interface with readonly platform: string and all 17 method signatures. Mark setProjectItemStatus as optional (?).
  3. Create src/platform/github/github-platform.provider.ts — @Injectable() class implementing PlatformProvider, constructor-injecting GitHubService, setting platform = 'github', and delegating every method with return this.github.<method>(...).
  4. Create src/platform/platform.module.ts — import GitHubModule, register { provide: PLATFORM_PROVIDER, useClass: GitHubPlatformProvider }, export PLATFORM_PROVIDER.
  5. Create src/platform/github/github-platform.provider.spec.ts — mock GitHubService, instantiate GitHubPlatformProvider, verify each of the 17 methods calls the corresponding mock method with correct args and returns its result.

Verification#

  • npx tsc --noEmit passes with zero errors
  • npm run lint passes with zero warnings
  • npm run test -- --testPathPattern=platform — all delegation tests pass

Risks#

  • Signature drift: If GitHubService gains new methods before this PR merges, the interface will be incomplete. Mitigation: verify against the latest rc/multi-tenant HEAD at implementation time.
ContextPrd