Parent: Sprint: Production-ready authenticated MyPayTag user portal
Brainstorm/Architecture Task: Define SIWC user portal architecture and API contracts
Sequence: Goal 1 of 6
Objective
Add or update canonical SDK protocol and OpenAPI contracts required by the authenticated user portal, if the architecture task determines these surfaces are public or cross-repo contracts.
Execution Tasks
- Add user preference and history protocol schemas and validators.
- Refresh generated artifacts, fixtures, examples, OpenAPI, Postman, and conformance checks.
Sequence Context
- Depends on: architecture/API-contract task.
- Enables: backend and site implementation to consume stable typed contracts.
- Run independently by: a fresh Codex thread after the architecture task is complete.
Non-Goals
- Do not expose private backend-only operational fields in public SDK contracts.
- Do not publish Cubid-owned grant, stamp issuance, or identity lifecycle internals as MyPayTag user portal APIs.
Guardrails
- Public contracts must not include raw wallet graph data, provider secrets, private diagnostics, service-role concepts, or Cubid internals beyond approved identity/session references.
- Existing NEAR 1Click MVP constraints and Phase 2 solver boundaries must remain intact.
Expected Codebase Surfaces
api/openapi.yaml
packages/protocol/schemas/*
packages/protocol/src/index.ts
packages/protocol/src/validators.ts
packages/protocol/src/fixtures.ts
packages/protocol/src/protocol.test.ts
packages/sdk/src/*
packages/provider-sdk/src/* when provider-facing history or receipt contracts require it
scripts/generate-postman-collection.mjs
- Examples under
examples/* when public integration flows change
Acceptance Criteria
- Preference, quote detail, selected quote, payment intent summary, and transaction/receipt summary contracts exist where the architecture task says they belong in the SDK.
- OpenAPI, JSON Schemas, generated TypeScript, fixtures, validators, and examples agree.
- Unsupported/private backend details are excluded from public contracts.
- Generated artifacts are refreshed through repo scripts, not hand-edited.
Validation Plan
pnpm validate
- Source review for browser/public-boundary leakage.
Child Tasks
- Add user preference and history protocol contracts.
- Refresh generated artifacts and SDK validation evidence.
Risks And Mitigations
- Risk: contracts drift from backend implementation. Mitigation: make backend implementation depend on this Goal or explicitly document backend-only surfaces.
Stop Condition
Stop when SDK contracts are either updated and validated or the architecture task documents that no SDK changes are required.
Parent: Sprint: Production-ready authenticated MyPayTag user portal
Brainstorm/Architecture Task: Define SIWC user portal architecture and API contracts
Sequence: Goal 1 of 6
Objective
Add or update canonical SDK protocol and OpenAPI contracts required by the authenticated user portal, if the architecture task determines these surfaces are public or cross-repo contracts.
Execution Tasks
Sequence Context
Non-Goals
Guardrails
Expected Codebase Surfaces
api/openapi.yamlpackages/protocol/schemas/*packages/protocol/src/index.tspackages/protocol/src/validators.tspackages/protocol/src/fixtures.tspackages/protocol/src/protocol.test.tspackages/sdk/src/*packages/provider-sdk/src/*when provider-facing history or receipt contracts require itscripts/generate-postman-collection.mjsexamples/*when public integration flows changeAcceptance Criteria
Validation Plan
pnpm validateChild Tasks
Risks And Mitigations
Stop Condition
Stop when SDK contracts are either updated and validated or the architecture task documents that no SDK changes are required.