Some parts of this document are not translated yet — they are shown in Vietnamese.
User chốt 03/09/2026, sửa lại cùng ngày sau khi user chỉ ra bản đầu quá chặt. Áp cho MỌI agent trong workspace (Claude Code, Codex, Cline, Antigravity) và MỌI công cụ điều khiển trình duyệt.
User confirmed 03/09/2026, edited the same day after the user pointed out that the first version was too strict. Applies to EVERY agent in the workspace (Claude Code, Codex, Cline, Antigravity) and EVERY browser-control tool.
0. Nguyên tắc gốc0. Original principle
Agent truy cập bốn hệ thống này để đọc và hiểu thông tin. Không tự ý chỉnh sửa, không áp dụng, không kích hoạt bất cứ thay đổi nào. Mọi việc chỉnh sửa chỉ làm khi user ra lệnh trực tiếp cho đúng việc đó.
The agent accesses these four systems to read and understand the information. It does not edit on its own, apply anything, or trigger any change. Any editing is done only when the user gives a direct order for exactly that task.
Ranh giới đúng là ĐỌC ↔ GHI, không phải BẤM ↔ KHÔNG BẤMThe real boundary is READ ↔ WRITE, not CLICK ↔ NO CLICK
Bản luật đầu tiên cấm thẳng mọi cú click. Sai ở chỗ: nó rộng hơn chính mục đích của mình. Bấm sang trang 2 của một bảng không đổi giá, không đổi lịch, không gửi gì cho ai — nó chỉ đổi cái agent đang nhìn. Cấm nó không bảo vệ được gì, chỉ làm mất dữ liệu.
The first version of the rule banned every click outright. The mistake was that it went wider than its own purpose: clicking to page 2 of a table changes no price, no calendar, and sends nothing to anyone — it only changes what the agent is looking at. Banning it protected nothing and only lost data.
Phép thử một câu, dùng trước mọi thao tác:
One-sentence test, to use before every action:
Sau thao tác này, có thứ gì trên tài khoản khác đi mà khách, nền tảng, hoặc user nhìn thấy được không?
After this action, does anything change on the account that guests, the platform, or the user can see?
- Không → đọc hoặc điều khiển hiển thị. Xem tầng A và B.
- Có → ghi. Cấm, trừ khi user vừa ra lệnh đúng việc đó. Xem tầng C.
- Không chắc → coi như CÓ. Dừng và hỏi.
- No → reading or controlling display. See tiers A and B.
- Yes → writing. Forbidden, unless the user has just given a direct order for exactly that task. See tier C.
- Not sure → treat it as YES. Stop and ask.
Gọn lại thành một câu để nhớ: bấm để xem thì tự làm, save hay apply thì phải xin.
To condense it into one sentence to remember: clicking to view is self-service; save or apply requires permission.
1. Bốn hệ thống bị ràng buộc1. Four systems that are bound by the rule
| # | Hệ thống | Miền |
|---|---|---|
| 1 | Booking.com — Extranet / Group homepage | admin.booking.com, account.booking.com, partner.booking.com |
| 2 | Airbnb — Host / Hosting dashboard | airbnb.com/hosting/*, airbnb.com/multicalendar, airbnb.com/users/* |
| 3 | Agoda — Partner Portal / YCS | portal.agoda.com, ycs.agoda.com, partnerhub.agoda.com |
| 4 | PriceLabs — Dynamic Pricing | app.pricelabs.co, pricelabs.co |
| # | System | Domains |
|---|---|---|
| 1 | Booking.com — Extranet / Group homepage | admin.booking.com, account.booking.com, partner.booking.com |
| 2 | Airbnb — Host / Hosting dashboard | airbnb.com/hosting/*, airbnb.com/multicalendar, airbnb.com/users/* |
| 3 | Agoda — Partner Portal / YCS | portal.agoda.com, ycs.agoda.com, partnerhub.agoda.com |
| 4 | PriceLabs — Dynamic Pricing | app.pricelabs.co, pricelabs.co |
Bốn hệ thống này điều khiển tiền thật và phòng thật. PriceLabs còn đẩy giá xuống cả ba kênh cùng lúc, nên một thao tác sai ở đó lan ra toàn danh mục.
These four systems control real money and real rooms. PriceLabs also pushes prices to all three channels at once, so one wrong action there spreads across the whole portfolio.
2. Thang ưu tiên — thử hết bậc trên rồi mới xuống bậc dưới2. Priority ladder — try all the higher steps before going down to the lower ones
Bài học 03/09: 26 dòng bảng giá PriceLabs không bị luật chặn, mà bị agent thiếu ý tưởng. Có đường lấy dữ liệu không cần bấm mà agent không nghĩ ra.
Lesson of 03/09: the 26 rows of the PriceLabs price table were not blocked by the rule; the agent simply lacked the idea. There was a way to get the data without clicking, and the agent did not think of it.
| Bậc | Cách lấy | Ghi chú |
|---|---|---|
| 1 | Đọc response API đã tải — list_network_requests rồi get_network_request |
Rẻ nhất, đầy đủ nhất. Endpoint dạng /api/... thường trả trọn bộ dữ liệu, không phân trang như giao diện |
| 2 | Tải lại trang rồi đọc lại network | Dùng khi DevTools bắt đầu ghi sau lúc trang đã tải nên không bắt được request gốc. Reload là điều hướng tới URL xem — hợp lệ |
| 3 | evaluate_script chỉ-đọc trên DOM |
Khi dữ liệu đã render sẵn |
| 4 | Điều khiển hiển thị (tầng B) | Chỉ khi ba bậc trên không ra |
| 5 | Dừng, báo user | Khi cả bốn bậc đều không được |
| Step | Method | Notes |
|---|---|---|
| 1 | Read the API responses already loaded — list_network_requests then get_network_request |
Cheapest and most complete. An endpoint of the /api/... kind usually returns the full data set, without the paging the interface uses |
| 2 | Reload the page and read the network again | Used when DevTools started recording after the page had loaded, so the original request was not caught. A reload navigates to a viewing URL — valid |
| 3 | Read-only evaluate_script on the DOM |
When the data is already rendered |
| 4 | Control the display (tier B) | Only when the three steps above fail |
| 5 | Stop and report to the user | When all four steps above fail |
3. Tầng A — được làm tự do3. Tier A — free to do
- Liệt kê tab, chọn tab, mở tab mới tới một URL xem, tải lại trang, quay lại / tiến tới.
- Chụp màn hình, chụp snapshot a11y.
evaluate_scriptchỉ để đọc:textContent,innerText,getAttribute, đọc bảng, đếm phần tử, dò biến toàn cục.- Đọc console log; liệt kê và đọc nội dung network request đã xảy ra.
- Cuộn trang, đổi kích thước cửa sổ, phóng to thu nhỏ.
- List tabs, select a tab, open a new tab to a URL to view, reload the page, go back / forward.
- Take screenshots, take a11y snapshots.
evaluate_scriptfor reading only:textContent,innerText,getAttribute, reading tables, counting elements, inspecting global variables.- Read console logs; list and read the content of network requests that already occurred.
- Scroll the page, resize the window, zoom in and out.
4. Tầng B — BẤM ĐỂ XEM, được phép4. Tier B — CLICK TO VIEW, permitted
User chốt 03/09/2026: "bạn có thể tự bấm chỗ cần xem, miễn là không save hay áp dụng thay đổi gì."
User confirmed 03/09/2026: "You may click whatever needs viewing yourself, as long as you do not save or apply any change."
Agent được tự bấm vào bất cứ thứ gì mà mục đích là mở ra để nhìn, không cần xin phép từng lần.
The agent may click on its own anything whose purpose is to open it up to look, without asking permission each time.
Được bấm — mọi thao tác nhằm xemClicking allowed — every action aimed at viewing
- Phân trang · số dòng mỗi trang · sắp xếp cột · bộ lọc hiển thị · bật/tắt cột.
- Chuyển tab, bung/thu hàng và khối chi tiết.
- Chuyển tháng / đổi dải ngày trên lịch.
- Mở một listing, một property, một đơn đặt phòng để xem chi tiết.
- Mở panel, popover, drawer, modal chỉ để hiển thị thông tin.
- Mở trang cài đặt để ĐỌC giá trị đang đặt — phí, chính sách, cấu hình listing.
- Đóng modal, đóng banner, quay lại trang trước.
- Pagination · rows per page · column sorting · display filters · show/hide columns.
- Switching tabs, expanding/collapsing rows and detail blocks.
- Changing the month / changing the date range on the calendar.
- Opening a listing, a property or a reservation to view its details.
- Opening panels, popovers, drawers or modals just to display information.
- Opening settings pages to READ the values set — fees, policies, listing configuration.
- Closing modals, closing banners, going back to the previous page.
Ba rào chắn vẫn bắt buộcThree guardrails still required
- Đọc nhãn phần tử trước khi bấm. Lấy
innerText/aria-labelcủa đúng phần tử sắp bấm. Không bao giờ bấm theo toạ độ, không bấm theo thứ tự phần tử. Nhãn khớp danh sách cấm ở tầng C → dừng. - Vào rồi thì chỉ đọc. Mở một trang cài đặt để xem giá trị là hợp lệ; chạm vào ô nhập, kéo thanh trượt, gạt công tắc trong đó thì không — kể cả khi chưa bấm Save. Nhiều giao diện tự lưu khi rời ô.
- Thử bậc 1–3 của thang ưu tiên trước. Đọc API vẫn rẻ và đầy đủ hơn bấm qua từng trang. Bấm là đường sau cùng, không phải đường đầu tiên.
- Read the element's label before clicking. Take the
innerText/aria-labelof the exact element about to be clicked. Never click by coordinates, and never by element order. If the label matches the forbidden list in tier C → stop. - Once inside, read only. Open a settings page to see that a value is valid; do not touch input boxes, drag sliders or toggle switches there — even without clicking Save. Many interfaces save automatically when you leave a field.
- Try tiers 1–3 of the priority ladder first. Reading the API is still cheaper and more complete than clicking through each page. Clicking is the last resort, not the first.
Điều phải khai với userWhat must be disclosed to the user
Vài thao tác xem có ghi thiết lập hiển thị — ví dụ đổi số dòng/trang ghi cookie manage_listings_page_size của PriceLabs. Đó là thiết lập giao diện của chính user, không phải dữ liệu kinh doanh, nên vẫn thuộc tầng B. Nhưng phải nói ra, không lờ đi như thể không ghi gì.
Some viewing actions do write a display setting — for example, changing the rows-per-page count writes the PriceLabs cookie manage_listings_page_size. That is the user's own interface setting, not business data, so it still belongs to tier B. But it must be disclosed, not ignored as if nothing had been written.
Cạm bẫy: trang xem chứa nút ghiPitfall: a viewing page that contains write buttons
Vào xem thì được, chạm vào thứ gì bên trong thì không. Review Prices của PriceLabs mở ra lịch giá — đọc thoải mái, nhưng bên trong có nút lưu và duyệt giá.
You may look, but do not touch anything inside. PriceLabs' Review Prices opens the price calendar — read it freely, but inside there are buttons to save and approve prices.
5. Tầng C — cấm tuyệt đối5. Tier C — absolutely forbidden
Cấm không cần hỏi, kể cả khi trông có vẻ vô hại:
Forbidden without asking, even when it seems harmless:
- Điền form (
fill,fill_form), tải file lên (upload_file), gõ phím vào ô nhập (press_keyvào input). - Kéo thả (
drag) — kéo trên lịch là đổi ngày hoặc đổi giá. - Bấm nút xác nhận trong hộp thoại (
handle_dialogvớiaccept). evaluate_scriptcó tác dụng phụ: gán DOM,el.click(),form.submit(),fetch/XHRphương thức POST · PUT · PATCH · DELETE, ghilocalStorage, gọi hàm nội bộ của trang.- Điều hướng tới URL mang hành động — chứa
action=,save,apply,confirm,delete,bulk,sync,publish,send,approve. - Trả lời tin nhắn khách ở bất kỳ hộp thư nào của bốn kênh.
- Đăng nhập, đăng xuất, đổi tài khoản, đổi mật khẩu, đổi cài đặt thông báo. Gặp trang đăng nhập thì dừng và báo user, không tự điền.
- Filling in forms (
fill,fill_form), uploading files (upload_file), typing keys into an input box (press_keyon an input). - Drag and drop (
drag) — dragging on the calendar changes dates or prices. - Clicking a confirm button in a dialog (
handle_dialogwithaccept). evaluate_scriptwith side effects: assigning to the DOM,el.click(),form.submit(),fetch/XHRwith POST · PUT · PATCH · DELETE, writinglocalStorage, calling the page's internal functions.- Navigating to a URL that carries an action — containing
action=,save,apply,confirm,delete,bulk,sync,publish,send,approve. - Replying to guest messages in any inbox of the four channels.
- Signing in, signing out, changing accounts, changing passwords, changing notification settings. On meeting a sign-in page, stop and report to the user; do not fill it in yourself.
Nhãn nút cấm chạm — dừng ngay khi thấyForbidden button labels — stop immediately when seen
Save · Apply · Update · Publish · Send · Confirm · Submit · Approve · Delete · Remove ·
Bulk edit · Sync now · Sync Price · Update My Prices Now · Add/Re-import Listings ·
Open / Close phòng · List a property · Accept · Decline · Cancel booking · Mark as no-show
Save · Apply · Update · Publish · Send · Confirm · Submit · Approve · Delete · Remove ·
Bulk edit · Sync now · Sync Price · Update My Prices Now · Add/Re-import Listings ·
Open / Close room · List a property · Accept · Decline · Cancel booking · Mark as no-show
6. Vùng nguy hiểm theo từng nền tảng6. Danger zones by platform
| Nền tảng | Chỗ dễ bấm nhầm nhất |
|---|---|
| Booking Extranet | Nút Bulk edit nằm ngay góc phải khối lịch, sát vùng bảng. Hàng Room status bấm được để mở/đóng phòng. Ô giá trong lịch là input, chạm vào là sửa được |
| Airbnb | Banner "We're simplifying service fees" dẫn vào luồng có thể xác nhận đổi phí — chỉ đọc chữ, không bấm. Multicalendar sửa giá ngay tại ô. Toggle Listed/Unlisted gỡ listing khỏi sàn |
| Agoda Partner Portal | Nút List a property. Tab Reservations có hành động với đơn thật |
| PriceLabs | Nguy hiểm nhất vì đẩy giá xuống cả ba kênh. Sync Price ở mỗi hàng, banner Update My Prices Now, Add/Re-import Listings. Review Prices mở trang xem nhưng bên trong có nút lưu |
| Platform | Most easily misclicked spot |
|---|---|
| Booking Extranet | The Bulk edit button sits at the right corner of the calendar block, close to the table area. The Room status row is clickable to open or close a room. The price cells in the calendar are inputs — touching one lets you edit it |
| Airbnb | The banner "We're simplifying service fees" leads into a flow where you can confirm a fee change — read the text only, do not click. The multicalendar edits prices right in the cell. The Listed/Unlisted toggle removes a listing from the marketplace |
| Agoda Partner Portal | The List a property button. The Reservations tab has actions that affect real reservations |
| PriceLabs | The most dangerous, because it pushes prices to all three channels. Sync Price on each row, the banner Update My Prices Now, Add/Re-import Listings. Review Prices opens a page to view, but it contains a save button |
7. Khi thấy việc cần sửa7. When something needing a fix is seen
Không sửa. Làm đủ ba bước:
Do not edit. Do all three steps:
- Ghi lại vào
vault/19-Harthliving-OTA/to-do/issues.md— mãL-nn, mức ưu tiên, sửa ở đâu. - Báo user kèm: thấy gì, ở đâu (kênh + ID listing + ngày), hậu quả nếu để nguyên, và các bấm cụ thể cần làm.
- Đợi lệnh. User nói làm cái gì thì làm đúng cái đó, không làm kèm thứ khác.
- Record it in
vault/19-Harthliving-OTA/to-do/issues.md— theL-nncode, priority, where to fix. - Report to the user, including: what was seen, where (channel + listing ID + date), the consequence if left as is, and the specific clicks needed.
- Wait for an order. When the user says what to do, do exactly that, and nothing else.
8. Phạm vi của một lệnh cho phép8. Scope of a permitted order
Khi user ra lệnh sửa, quyền đó là một lần, cho đúng việc đó, trên đúng listing đó.
When the user orders an edit, that permission is one-time, for exactly that task, on exactly that listing.
- Không suy ra quyền cho listing khác, ngày khác, kênh khác.
- Không suy ra quyền cho lần sau.
- "Mở giá 17/09–01/10 cho căn 502 trên Booking" không cho phép mở giá căn 305, cũng không cho phép mở tháng 10.
- Việc khó lùi (đóng listing, xoá property, gửi tin cho khách, apply giá hàng loạt) phải xác nhận lại một lần nữa ngay trước khi bấm, kể cả khi user đã ra lệnh.
- Báo cáo lại sau khi làm: đã bấm gì, kết quả ra sao, có gì ngoài dự kiến không.
- Ghi sổ vào vault 19 trước khi báo xong — checklist ở
ota-change-record-rule.md(user chốt 30/09/2026).
- Do not infer permission for another listing, another date or another channel.
- Do not infer permission for later.
- "Open the rate for 17/09–01/10 for property 502 on Booking" does not permit opening the rate for property 305, and does not permit opening month 10 (October) either.
- Actions that are hard to reverse (closing a listing, deleting a property, sending a message to a guest, applying prices in bulk) must be confirmed once more right before clicking, even if the user has given the order.
- Report back after the work: what was clicked, what the result was, and anything unexpected.
- Record in vault 19 before reporting done — the checklist is in
ota-change-record-rule.md(user confirmed 30/09/2026).
9. Bảo mật và phạm vi trình duyệt9. Security and browser scope
- Chrome DevTools MCP bám profile Chrome mặc định và thấy mọi cửa sổ của profile đó — gồm cả ngân hàng, email, extranet đang mở. User đóng tab nhạy cảm trước khi cho agent chạy tự do.
- Agent chỉ thao tác trên tab thuộc bốn miền ở mục 1.
- Không ghi thông tin xác thực vào vault. URL extranet chứa
ses=...; response header của API chứa cookie phiên (remember_user_token,cf_clearance…). Lưuhotel_id,listing_id— bỏ hết token, cookie, session. - Không ghép session token vào URL tự chế. Token hết hạn thì trang bật ra màn đăng nhập; agent không được đăng nhập, nên chỉ tạo ra một tab chết. Nhờ user tự mở trang cần xem.
- Chrome DevTools MCP is bound to the default Chrome profile and sees every window of that profile — including banking, email and open extranets. The user closes sensitive tabs before letting the agent run freely.
- The agent only acts on tabs belonging to the four domains in section 1.
- Do not write authentication information into the vault. The extranet URL contains
ses=...; the API response headers contain session cookies (remember_user_token,cf_clearance…). Storehotel_idandlisting_id— drop all tokens, cookies and sessions. - Do not attach a session token to a URL you built yourself. When the token expires, the page shows the sign-in screen; the agent must not sign in, so it only creates a dead tab. Ask the user to open the page they need themselves.
10. Nhật ký sửa luật10. Rule change log
| Ngày | Sửa gì | Vì sao |
|---|---|---|
| 03/09/2026 | Bản đầu: cấm thẳng mọi click |
User yêu cầu chỉ-đọc trên bốn hệ thống |
| 03/09/2026 | Tách ba tầng A/B/C; thêm thang ưu tiên 5 bậc; thêm vùng nguy hiểm từng nền tảng | User chỉ ra bản đầu tự mâu thuẫn: tiêu đề nói "cấm thứ làm đổi trạng thái" nhưng lại cấm cả cú bấm không đổi gì. Hệ quả thật: mất 26/36 dòng bảng giá PriceLabs, trong khi có đường API lấy được mà agent không nghĩ ra |
| 03/09/2026 | Tầng B mở rộng từ danh sách trắng hẹp thành bấm để xem nói chung | User: "bạn có thể tự bấm chỗ cần xem, miễn là không save hay áp dụng thay đổi gì." Ranh giới chốt ở save/apply, không ở cú bấm |
| Date | What changed | Why |
|---|---|---|
| 03/09/2026 | First version: banned every click outright |
The user asked for read-only on the four systems |
| 03/09/2026 | Split into three tiers A/B/C; added a 5-step priority ladder; added danger zones per platform | The user pointed out that the first version contradicted itself: the title said "ban what changes state", but it banned clicks that changed nothing. The real consequence: 26 of 36 rows of the PriceLabs price table were lost, although an API route to the data existed that the agent did not think of |
| 03/09/2026 | Tier B widened from a narrow allow-list to click-to-view in general | The user: "you may click whatever needs viewing yourself, as long as you do not save or apply any change." The line is drawn at save/apply, not at the click |
11. Liên quan11. Related
vault/19-Harthliving-OTA/DATA.md— kho hồ sơ listing, luồng làm việcvault/10-rules/ota-messaging-rules.md— luật nội dung tin nhắn gửi khách (khác việc, cùng ba kênh)vault/10-rules/ota-change-record-rule.md— ghi xong một thay đổi thì cập nhật những file nào trong vault 19
vault/19-Harthliving-OTA/DATA.md— the listing records vault: the data map and the workflowvault/10-rules/ota-messaging-rules.md— content rules for guest messages (a different task, the same three channels)vault/10-rules/ota-change-record-rule.md— after recording a change, which files in vault 19 to update
Vào Booking extranet (02/10/2026, nới 09/10/2026): đọc tab đang mở (
chrome-grab --tab); được tự mở trang/tab extranet mới nhưng CHỈ bằng cú bấm link/menu trên Chrome — cấm gõ/ghép URL rồi navigate. Chi tiết:chrome-profile-rule.mdmục "Vào Booking extranet".