docs: reconcile canonical memory with merged Go backend

This commit is contained in:
zn-admin committed 2026-08-14 07:19:41 +08:00
1 parent f10cdd9695
commit eacb4c67de
14 files changed
+171 -57

No files matched your search

+15 -7
View File
@@ -2,28 +2,36 @@
## One-line Positioning
This project is {one-line project positioning}.
智念AIGC平台 (Zhinian AIGC Platform) is a production-deployable Web workbench for AI image and video creation with organization accounts, usage tracking, and billing.
## Primary Goal
The project exists to {primary project goal}.
The project exists to give organizations an Alibaba Cloud ACK-deployable AI creation platform: prompt authoring, material upload, image generation (即梦/Jimeng 4.6 and EvoLink GPT Image 2), video generation (Seedance 2.0), task management, result download, account and role management, usage reporting, and organization billing backed by direct RDS PostgreSQL persistence.
## Target Users / Consumers
- {primary user or consumer}
- Ordinary organization members: create images and videos, manage their own account and password.
- Organization administrators: manage members, organizations, and engine settings.
- Super administrators: own pricing rules, wallets, ledger adjustments, and platform logs.
- External partner systems: consume the API-key authenticated public `/api/v1` surface.
## Non-goals
This project does not aim to {non-goal or boundary}.
- This project does not aim to be a model-training, dataset, or labeling platform.
- It is not a public social sharing site; assets stay account and organization scoped.
- In the current version it is not a horizontally auto-scaled multi-region SaaS: one Web replica until generated assets move to shared OSS.
## Core Constraints
- {core constraint}
- Same-origin browser authentication through signed, chunked `zhinian_session` cookies with per-request account/organization/sessionVersion revalidation.
- Production persistence fails closed: explicit RDS PostgreSQL through a server-only adapter; local JSON is development/test only.
- Cross-instance concurrency stays in PostgreSQL: `claim_generation_jobs` for job claims and `billing_post_wallet_entry` for wallet idempotency; no process-local lock replacements.
- Chinese-first product surfaces; production deployment targets Alibaba Cloud ACK.
## Quality Bar
A good solution should {quality bar}.
A good solution should preserve current HTTP/Cookie/authorization behavior, keep provider, billing, and storage semantics idempotent and tenant-scoped, pass the executable contract tests under `contracts/`, and remain reversible through a single-writer cutover.
## Last Reviewed
{YYYY-MM-DD}
2026-08-14
+8 -4
View File
@@ -2,16 +2,20 @@
## Project Success
- {observable project-level success condition}
- Production cutover of the Go backend passes the executable contract suites under `contracts/` with real RDS/OSS/provider/Webhook dependencies, without visible user-facing behavior change.
## Task Completion Standard
- {condition that means a task is complete}
- A task is complete when the Concurrent Task Gate and Planning Gate passed, the implementation meets its scope and constraints, verification commands pass, the task record is updated with outcome and promotion candidates, the drift check passes, and ownership is released from a clean worktree.
## Quality Checks
- {verification command, review expectation, or acceptance check}
- `npm test` (full Vitest suite), `npx tsc --noEmit`, and `npm run build` pass.
- `go test -count=1 ./...` and `go vet ./...` pass for backend changes.
- `node scripts/check-ack-manifests.mjs` and `npm run deploy:check` pass for deployment changes.
- `check_project_docs.py` and `check_doc_drift.py --task-id <task_id>` pass for documentation changes.
- Diff hygiene: no generated binaries, secrets, or unrelated files committed.
## Last Reviewed
{YYYY-MM-DD}
2026-08-14