























@@ -111,6 +111,11 @@ Skills own workflows; root owns hard policy and routing.
111111- No `@ts-nocheck`. Lint suppressions only intentional + explained.
112112- External boundaries: prefer `zod` or existing schema helpers.
113113- Runtime branching: discriminated unions/closed codes over freeform strings. Avoid semantic sentinels (`?? 0`, empty object/string).
114+- If formatter output becomes a jagged staircase, refactor the expression instead of accepting the formatted shape.
115+- For function calls with config objects, compute complex fields above the call; keep object fields simple.
116+- Avoid dense inline plumbing: no nested ternaries, long `??` chains, or repeated `params.foo?.bar` inside argument objects.
117+- Prefer named intermediate values when a value has domain meaning, e.g. `channel`, `parentSessionKey`, `selectedModelRef`, `sourceProvider`.
118+- Code should read top-down: gather inputs, normalize/resolve, then call helpers.
114119- Dynamic import: no static+dynamic import for same prod module. Use `*.runtime.ts` lazy boundary. After edits: `pnpm build`; check `[INEFFECTIVE_DYNAMIC_IMPORT]`.
115120- Cycles: keep `pnpm check:import-cycles` + architecture/madge green.
116121- Classes: no prototype mixins/mutations. Prefer inheritance/composition. Tests prefer per-instance stubs.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。