4.7 KiB
4.7 KiB
Tasks: add-payment-provider-stripe
Every checkbox reflects work actually done in this change. No retroactive ticking.
1. Spec authoring
- 1.1 Read
../suaveplan/enterprise/payment-providers.mdend-to-end - 1.2 Read
openspec/specs/payment-providers/spec.md(slim-core canonical spec) - 1.3 Read
openspec/AGENTS.mdSections 13 and 14 - 1.4 Draft
proposal.mdfromopenspec/templates/proposal.md - 1.5 Fill in
## Source mapping— every requirement cites a line range in the upstream source or appears in the "no source line" table with justification - 1.6 Draft
specs/payment-provider-stripe/spec.mdfromopenspec/templates/spec-delta.md - 1.7 Every requirement in the spec delta carries a
**Verified by:**line naming concreteit(...)titles
2. Implementation
- 2.1 Scaffold
packages/universal/payment-provider-stripe/(package.jsonat0.1.0,vite.config.ts,vitest.config.ts,tsconfig.json,tsconfig.lib.json) - 2.2 Implement
src/stripe/stripe.types.ts—StripeConfig,StripeIntent,StripeRefundwire-format types - 2.3 Implement
src/stripe/stripe.ts—StripeProviderclass, everyPaymentProvidermethod routed throughhttpRequestwith Bearer auth +Idempotency-Keyforwarding, mappers from Stripe domain toPaymentIntent/Refund, every error raised through the slim-corePaymentProviderError - 2.4
src/stripe/index.ts— explicit named barrel - 2.5
src/index.ts— package root barrel re-exportingStripeProvider+StripeConfig - 2.6
package.json#exports— root +./stripe/stripesubpath
3. Tests
- 3.1
src/stripe/stripe.test.ts— covers every public method, Bearer-auth header presence,Idempotency-Keyforwarding when caller supplies it AND absence when caller omits, every status / refund-status / refund-reason branch, payment-method absence,provider: "stripe"discriminant propagation on raised errors, injectedFetchLike+ callersignalforwarding - 3.2
tests/dep-graph.test.ts— pins universal-tier purity (nonode:/bun:/fs/path/stream/net/http/cryptoimports undersrc/) - 3.3 Every
it(...)carries{ timeout: 5000 } - 3.4 Zero
vi.mock/vi.stubGlobal/jest.mock— all tests use real recordingFetchLikeclosures
4. Documentation
- 4.1
src/stripe/stripe.md— sibling doc with Purpose, Features, Basic Usage, Advanced Usage, API Reference, Implementation Notes (≥200 words excl. code) - 4.2
README.mdat package root linking the module doc under## Modules - 4.3 Update
CLAUDE.mdpackage listing under the Network or Foundation section — addpayment-provider-stripeto thepayment-providersfamily description
5. Pre-archive verification (the 5-gate triple)
- 5.1
bun run check— Biome 0/0/0 across the monorepo - 5.2
bunx turbo lint typecheck test --filter=@suaveplan/payment-provider-stripe— green - 5.3
bunx turbo test:coverage --filter=@suaveplan/payment-provider-stripe— 100/100/100/100 - 5.4
bun scripts/openspec-conformance.ts @suaveplan/payment-provider-stripe— exit 0 (PASS 0 error, 0 warn, 0 info) - 5.5
bunx turbo build --filter=@suaveplan/payment-provider-stripe— green
6. Pre-archive 9-row checklist (AGENTS.md Section 13)
- 6.1 Generics threaded; literal
name: "stripe"pinned at the type level - 6.2 Wire-format Stripe responses parsed through typed
StripeIntent/StripeRefundinterfaces - 6.3 Every slim-core error code raised by
httpRequestflows through this provider withprovider: "stripe"discriminant - 6.4 N/A — no strict-mode toggle on the provider
- 6.5 N/A — no OTel instruments in this change
- 6.6 N/A — provider holds no in-flight dedup state
- 6.7 No retroactive tick
- 6.8 No
export *in any feature barrel — scan returns zero output - 6.9 No direct
vitest/bun:testimports — scan returns zero output
7. Root-doc refresh (§13b)
- 7.1
bun scripts/folder-reorg/generate-manifest.ts—MANIFEST.mdrefreshed (258 packages, 34 plugins; new row for payment-provider-stripe) - 7.2
bun scripts/generate-missing.ts— DEFERRED: pre-existing failure on missingFOLDERS.yml(unrelated to this change) - 7.3 Added
@suaveplan/payment-provider-striperow toSTATUS.md - 7.4 Added per-package paragraph to
SUMMARY.md - 7.5
bunx markdownlint-cli2 --fix— exit 0; no findings in touched files
8. Archive
- 8.1 Fold
specs/payment-provider-stripe/spec.mdintoopenspec/specs/payment-provider-stripe/spec.md - 8.2 Move
openspec/changes/add-payment-provider-stripe/→openspec/archive/2026-05-17-add-payment-provider-stripe/