chore: seal Design Vision v1 and monorepo scaffold

Archive the differentiated YuXinGu product docs, AI engineering system,
design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity
over early innovation (see .ai/product/STRATEGY.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-02 16:00:44 +08:00
co-authored by Cursor
parent 2686866376
commit 2fb1dfee14
193 changed files with 8854 additions and 1851 deletions
+37
View File
@@ -0,0 +1,37 @@
# Coding — Golden Rules
## Size
- One responsibility per file.
- One responsibility per function.
- No function longer than **50** lines.
- No file longer than **400** lines (hard preference; split earlier if possible).
- No circular dependency.
## Go
- Business packages by domain: `auth`, `profile`, `report`, `order`, `payment` — not `utils`.
- Interface defined at **caller** (usually handler), implemented by service.
- First parameter of I/O methods: `context.Context`.
- Errors: `return fmt.Errorf("create user: %w", err)`.
- Never `panic` in request path.
- Never use package-level mutable globals for request state.
- Export comments required on public funcs (what / in / out / side effects).
## TypeScript / Vue
- `strict: true`. No casual `any`.
- Components: `PascalCase.vue` (`UserCard.vue`).
- Pages under `src/pages/`, composables under `src/hooks/`.
- No direct `fetch` in pages — use SDK.
- Shared domain types go to `packages/types`.
## Naming
- Consistent domain words: profile, report, scale, membership, order.
- Prefer boring clear names over clever short names.
## Comments
- Public APIs: always document.
- Do not narrate obvious code. Document intent, invariants, side effects.