What problem does this solve?
After the transport and resolvers no longer use the SDK, Linearis should remove the leftover wrapper, command context property, tests, docs, and dependency declaration. Otherwise the architecture still exposes ctx.sdk and the production package still installs @linear/sdk.
Proposed solution
Remove the SDK wrapper and dependency completely.
Scope:
- delete
src/client/linear-client.ts
- remove
sdk from CommandContext
- update resolver call sites from
ctx.sdk to ctx.gql
- update command/common tests that mock or assert SDK usage
- remove
@linear/sdk from package.json and package-lock.json
- update architecture docs and agent instructions to reflect GraphQL-only resolver/client usage
Likely affected files include:
src/common/context.ts
src/common/resolve-filters.ts
src/commands/issues.ts
src/commands/projects.ts
src/commands/initiatives/*
src/commands/documents.ts
src/commands/comments.ts
src/commands/attachments.ts
src/commands/cycles.ts
src/commands/labels.ts
src/commands/milestones.ts
src/commands/teams.ts
- resolver and command tests
- architecture/development docs
Alternatives considered
- Leave
LinearSdkClient as an unused compatibility wrapper: creates dead code and invites new SDK usage.
- Keep
ctx.sdk but point it to GraphQL: confusing naming and weakens the architecture cleanup.
Primary use case
Shell scripting / automation
Additional context
Acceptance criteria:
rg "@linear/sdk|LinearSdkClient|ctx\.sdk|client\.sdk" src tests returns no relevant usage.
package.json no longer lists @linear/sdk.
package-lock.json is updated.
- Architecture docs no longer state that resolvers use
LinearSdkClient by default.
- Full verification passes:
npm run check:ci
npx tsc --noEmit
npm test
npm run build
What problem does this solve?
After the transport and resolvers no longer use the SDK, Linearis should remove the leftover wrapper, command context property, tests, docs, and dependency declaration. Otherwise the architecture still exposes
ctx.sdkand the production package still installs@linear/sdk.Proposed solution
Remove the SDK wrapper and dependency completely.
Scope:
src/client/linear-client.tssdkfromCommandContextctx.sdktoctx.gql@linear/sdkfrompackage.jsonandpackage-lock.jsonLikely affected files include:
src/common/context.tssrc/common/resolve-filters.tssrc/commands/issues.tssrc/commands/projects.tssrc/commands/initiatives/*src/commands/documents.tssrc/commands/comments.tssrc/commands/attachments.tssrc/commands/cycles.tssrc/commands/labels.tssrc/commands/milestones.tssrc/commands/teams.tsAlternatives considered
LinearSdkClientas an unused compatibility wrapper: creates dead code and invites new SDK usage.ctx.sdkbut point it to GraphQL: confusing naming and weakens the architecture cleanup.Primary use case
Shell scripting / automation
Additional context
Acceptance criteria:
rg "@linear/sdk|LinearSdkClient|ctx\.sdk|client\.sdk" src testsreturns no relevant usage.package.jsonno longer lists@linear/sdk.package-lock.jsonis updated.LinearSdkClientby default.npm run check:cinpx tsc --noEmitnpm testnpm run build