3.2 KiB
3.2 KiB
Tasks — @suaveplan/api-graphql
Every checkbox MUST reflect work actually done in this change.
0. Pre-flight (non-negotiable)
- 0.1 Confirm clean working tree (
git statusreports nothing) and no in-flight worktrees with uncommitted work - 0.2 Worktree audit complete; isolated agent worktree.
- 0.3 Confirm the package set in
MANIFEST.mdmatches package count
1. Spec authoring
- 1.1 Read design doc §10
- 1.2 Read
openspec/specs/api-graphql/spec.md(does not exist yet) - 1.3 Read
openspec/AGENTS.mdSections 13, 14 - 1.4 Draft
proposal.md - 1.5 Source-mapping table
- 1.6 Draft
specs/api-graphql/spec.md - 1.7
**Verified by:**line on every requirement
2. Implementation
- 2.1 Scaffold
packages/api-stack/api/api-graphql/(0.1.0,sideEffects: false, deps locked) - 2.2
src/registry/— abstractGraphqlRegistry+ concretecreateGraphqlRegistryaccumulator with freeze() - 2.3
src/resolver/—Resolverre-export +ResolverMap/ResolverFieldMap - 2.4
src/loader/—LoaderFactoryre-export +BatchFnsignature - 2.5
src/subscription/—SubscriptionResolver+graphql-wsZod schema + transport assertion - 2.6
src/federation/—mergeSdl,applyNamespace,parseSdl - 2.7
src/directives/—@auth+@rateLimitdescriptors +HOST_DIRECTIVES - 2.8
src/engine/—GraphqlEnginelifecycle interface - 2.9
src/capability-id/—GraphqlCapabilityIdliteral + runtime constant - 2.10
src/error-codes/—GRAPHQL_CODES(7) +GraphqlError - 2.11
src/testing/—runGraphqlEngineConformance - 2.12
src/validators/—validateResolvers,lookupDirective,lookupLoader - 2.13
src/index.ts— explicit named re-exports - 2.14
package.jsonexportsper subpath
3. Tests
- 3.1 Unit tests per feature
- 3.2 Spec-conformance tests (type-level) for resolver / subscription / engine / capability-id / error-codes
- 3.3 Federation collision + namespace property tests
- 3.4 Every
it(...)carries{ timeout: 5000 }
4. Documentation
- 4.1 Sibling
.mdfor every implementation.ts(9/9 100%) - 4.2
README.mdlinking every feature module - 4.3 No CLAUDE.md update
5. Pre-archive verification
- 5.1
bun run check— clean - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/api-graphql— green (82/82 tests) - 5.3
bunx turbo test:coverage --filter=@suaveplan/api-graphql— 100/100/100/100 - 5.4
bunx turbo build --filter=@suaveplan/api-graphql— green
6. Pre-archive 7-row checklist
- 6.1 Generics on
Resolver<Parent, Args, Result, Caps>+expectTypeOf - 6.2 Zod wired on subscription protocol envelope
- 6.3 Every
GRAPHQL_CODESentry thrown by a production path (verified by error-codes.spec-conformance) - 6.4 Federation collision strict-mode tested on / off
- 6.5 OTel — N/A (engines emit)
- 6.6 Lifecycle dedup — N/A
- 6.7 No retroactive tick
7. Archive
- 7.1 Fold spec delta into
openspec/specs/api-graphql/spec.md - 7.2 Move to
openspec/archive/2026-05-25-api-graphql/ - 7.3 Tick umbrella
1.4(deferred — umbrella file owner) - 7.4 Refresh
MANIFEST.md