chore(openspec): archive add-customer-accounts
Sync the customer-accounts capability and the frontend-mall stats requirement into the main specs, and write the capability Purpose the archive leaves as a placeholder so strict validation stays green.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
## Why
|
||||
|
||||
Account statistics are fixed mall fixtures, and points redemption needs an auditable balance rather than mutable user fields. A customer account boundary establishes safe balances and append-only history before any points-spend flow is introduced.
|
||||
|
||||
## What Changes
|
||||
|
||||
- Add one customer account per supported balance: cash balance, frozen cash, and integer loyalty points.
|
||||
- Add append-only account entries that record the resulting balance, signed delta, reason, reference type, and reference ID.
|
||||
- Add an authenticated customer account summary endpoint and replace the account-stat fixture on the mall user center.
|
||||
- Provide transactional service operations for later flows to credit, debit, freeze, and release funds or points with non-negative-balance checks.
|
||||
|
||||
## Capabilities
|
||||
|
||||
### New Capabilities
|
||||
- `customer-accounts`: Customer balance and points accounts, immutable entries, account summary, and guarded balance mutations.
|
||||
|
||||
### Modified Capabilities
|
||||
- `frontend-mall`: User-center account statistics load through the shared API client.
|
||||
|
||||
## Non-goals
|
||||
|
||||
No top-up, payment-from-balance, withdrawal, refund-to-balance, points earning campaign, merchant settlement, or public account-entry listing is included. The frozen monetary kind is reserved for later freeze/release flows.
|
||||
|
||||
## Impact
|
||||
|
||||
Adds Rust account module and migrations, shared account types/API/locales, a mall live-data migration, and a reusable transactional dependency for the points mall.
|
||||
Reference in New Issue
Block a user