Remove old_repo now that the rebuilt platform is the active implementation. Point documentation to current code and Git history, preserve local environment setup guidance, and drop obsolete archive exclusions from build and quality tools.
3.1 KiB
3.1 KiB
Repository workflow
This repository is the rebuilt AI Platform. Historical implementation is retained only in Git history; current code lives under src/ai_platform/ and apps/web/. The approved rebuild plan authorizes implementation; docs/specs/ai-platform-lead-scoring.md is review-ready for cross-service acceptance, so unverified Omni/AIHub wire details are not release claims.
- Before changing Lead Scoring behavior, read
docs/specs/ai-platform-lead-scoring.md,CONTEXT.md, andARCHITECTURE.md. Readstack.mdwhen choosing a runtime or dependency. Generated OpenAPI and small Omni fixtures own exact wire shapes. - Put app/admin authentication, configuration and shared DB setup in
platform; put deterministic rules/metrics and run lifecycle inlead_scoring/domain; orchestration inapplication, I/O ininfrastructure, HTTP mapping inpresentation, and wiring inbootstrap. Churn follows the same layout only when a specification exists. - Omni owns rules/weights/HITL/CRM; AI Platform owns AI profile and technical run status. V-Key is request-scoped RAM only. One app key per Omni installation authenticates the platform; run context includes account_id. Admin Web uses a distinct session. Terminal webhook triggers Omni GET.
- Kiểm tra tính nhất quán trước khi tối ưu một phần: đối chiếu API với fixture Omni, tên env với
Settings/Compose/CI, lệnh build với package/lockfile và UI với design system ởARCHITECTURE.md. Web dùng Tailwind CSS v4 cho semantic tokens, shadcn-svelte cho component cần thiết, Bits UI cho tương tác phức tạp; dùng HTML native cho form/bảng đơn giản, không tự tái tạo primitives. Xemrewrite_architect.mdđể hiểu lý do chọn stack, không dùng nó làm contract song song. - File trên 200 dòng là tín hiệu review: kiểm tra trách nhiệm trộn lẫn, tách tại boundary có nghĩa. Giữ một OpenAPI generated và vài Omni fixtures thật, không tạo hệ schema thứ hai.
- Trước bàn giao, chạy Ruff/Pyright/Import Linter/pytest, Svelte checks/build/tests, migration và contract generation có liên quan. Báo chính xác pass/fail; hook opt-in, CI là gate. Không stage
.env,.env.test, ignored assets hoặc secrets. - Thay đổi ranh giới kiến trúc, dependency direction, DI/composition root hoặc ownership transaction do main agent trực tiếp phân tích, quyết định và triển khai. Có thể giao review/test chỉ đọc độc lập, nhưng không giao phần thiết kế và implementation các thay đổi này.
- Sau khi code hoàn tất và trước mỗi commit, review toàn bộ tracked/untracked changes theo
docs/project_quality.md; báo chính xác các kiểm tra đã chạy, phát hiện còn lại và phần chưa xác minh.
Use README.md for current local commands; stack.md for decisions and deferred production hosting/TLS/secret/backup/alerts. Preserve the user's existing ignored files unless explicitly authorized to replace them. No global tool installs or system configuration changes during repo work.