WELIFE Docs Swagger Admin Web

09 — Agent audit queue (Cursor coding)

Đọc file này khi user nói «tiếp» / «Next» / bắt đầu WP mới. Snapshot: STATUS.md · BE STUB: agent-work-queue.json · P9 FE: figma-fe-work-queue.json Cập nhật: 2026-08-15 · STUB 0 · Soft next = OWNER (P9 DONE_QUEUE)

0. Gate 30 giây (bắt buộc)

  1. Đọc STATUS.md.
  2. BE STUB agent-work-queue.json null → không invent API/vertical.
  3. «tiếp» → P9 figma-fe-work-queue.json nextRecommended (doc 19). Hết P9 → OWNER / DONE_QUEUE.
  4. OWNER Pay / SMS / MoMo → smoke/docs; không blast SMS / không mở payUrl hộ / không bịa secret.
  5. Xong WP: cập nhật doc 19 + JSON nextRecommended + 05-PHASE-BACKLOG.
npm run env:check
node scripts/audit-imp-stub.mjs
# queue: docs/references/agent-work-queue.json → nextRecommended
# OWNER duyệt: docs/references/agent-owner-gate.json · Dashboard → Agent (AI)

OWNER duyệt agent: Dashboard → Duyệt → Agent (AI) → bấm chip catalog (agent-wp-catalog.json) → Lưu duyệt. File agent-owner-gate.json · API GET /feature-flags/agent-gate + GET /feature-flags/agent-wp-catalog. paused / requireApproval + approvedWp: null → agent dừng.

OWNER còn lại: VNPay payUrl e2e · SMS OTP phone · MoMo merchant · (optional) Firebase Admin SA. Hub: OWNER-GATES.md · wire: OWNER-WIRE-CHECKLIST.md.

0b. Gate tiếp (khi còn STUB — hiện không)

  1. Chọn đúng 1 WP từ queue hoặc user.
  2. Footer: Domain · WP · Surfaces · Status.
  3. Clone vertical mới từ hotels / rentals nếu cần.
  4. Done → matrix + backlog.

1. Hiện trạng (đừng làm lại)

Đã IMP — không đụng trừ bug Ghi chú
Auth OTP core · User · Places · Media · Addr · Wallet · Pay Platform
FNB · Rides+GPS WS · Driver · Park · Fuel · ATM Vertical P1
Hotels · Rentals · Pharmacy · Medical · Schools · Favorites · Assistant · Chat WS · Social · Notif P2/P3
Partner home · Driver trip · EAS CON/DRV/PAR · Figma Home→Pharmacy sync Surfaces/UI
P7a–c harden · CI · OSRM self · backup Ops

Clone reference (đọc trước khi code STUB mới):

Pattern BE FE Consumer
Nearby + book api/src/modules/hotels/ mobile/src/features/hotels/
Listing + schedule api/src/modules/rentals/ mobile/src/features/rentals/
Nearby list api/src/modules/parking/ mobile/src/features/geo/ + parking
PostGIS table api/src/common/geo/nearby-postgis.ts thêm tên bảng

2. Hàng đợi STUB → IMP

EMPTY (2026-08-14). Audit: 397 IMP / 0 STUB / 43 tags.

Lịch sử P8 / P0–P1 / P7: xem git + 05-PHASE-BACKLOG.md · 16-PHASE-P7-HARDEN.md · 17-PHASE-P8-GAP-VERTICALS.md.

Soft next (không phải STUB)

# Track Doc
1 P9 Figma/JPG function-on-image 19-FIGMA-FUNCTION-QUEUE · DONE_QUEUE (26/26)
2 OWNER Pay VNPay e2e (song song) OWNER-PAY-E2E-2026-08-14
3 OWNER SMS phone e2e OWNER-SMS-READY-2026-08-14
4 OWNER MoMo portal OWNER-MOMO-FAIL-2026-08-14

3. Prompt mẫu (khi user chỉ WP)

Domain: D-…
WP: WP-…-…
Surfaces: CON|PAR|DRV|ADM|API
Đọc: docs/STATUS.md + docs/00-DOC-MAP.md
AC: …
Không commit .env / secret.

Autonomous loop: 10-AGENT-AUTONOMOUS-LOOP.md — dừng trước OWNER.