opencli-browser-sitemap
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chineseopencli-browser-sitemap
opencli-browser-sitemap
Use this skill when or reports , or when the user asks you to use a site's sitemap.
opencli browser openopencli browser analyzesitemap.available: trueThe sitemap is prior knowledge, not ground truth. It should reduce blind clicking, but it must never override the live browser state.
当或报告,或者用户要求你使用站点的sitemap时,使用此技能。
opencli browser openopencli browser analyzesitemap.available: true站点地图是先验知识,而非客观事实。它应减少盲目点击,但绝不能覆盖浏览器的实时状态。
Consumption Loop
使用流程
- Run or reuse to know the current page.
opencli browser <session> state - Read only the smallest relevant sitemap files:
- for site-level orientation.
SITE.md - One matching for current state.
pages/<page-id>.md - One matching for the user goal.
workflows/<task-id>.md - only when blocked or warned by the workflow.
pitfalls.md
- Prefer the workflow's Best path. If it names an adapter such as , use that before raw browser actions.
opencli twitter post - If the adapter is unavailable or fails, use the Fallback path browser workflow.
- After each navigation or state-changing action, refresh and compare the workflow's
state.state_signature - If reality disagrees, trust reality, continue probing, and write a local stale note or draft patch.
- If an action recovery includes , update the local overlay workflow that references that adapter so future agents go straight to the fallback path.
adapter_health_update: <adapter> -> suspect|broken
- 运行或复用以了解当前页面。
opencli browser <session> state - 仅读取最小范围的相关站点地图文件:
- 用于站点级定位。
SITE.md - 一个匹配的文件,对应当前状态。
pages/<page-id>.md - 一个匹配的文件,对应用户目标。
workflows/<task-id>.md - 仅在被流程阻止或警告时读取。
pitfalls.md
- 优先选择流程的最佳路径(Best path)。如果它指定了如这样的适配器,请在执行原始浏览器操作前使用该适配器。
opencli twitter post - 如果适配器不可用或执行失败,使用**回退路径(Fallback path)**浏览器流程。
- 每次导航或状态变更操作后,刷新并对比流程的
state。state_signature - 如果实际情况与流程不符,信任实际情况,继续探查,并在本地添加过时记录或草稿补丁。
- 如果操作恢复步骤包含,更新引用该适配器的本地覆盖流程,以便后续Agent直接使用回退路径。
adapter_health_update: <adapter> -> suspect|broken
Lookup Order
查找顺序
Read local overlay first, then global seed:
text
~/.opencli/sites/<site>/sitemap/
skills/opencli-sitemap-author/references/site-memory/<site>/sitemap/Local files override global files with the same stable id.
Do not load an entire large sitemap into context. If the directory is large, list filenames first and then read only the page/workflow you need.
先读取本地覆盖文件,再读取全局种子文件:
text
~/.opencli/sites/<site>/sitemap/
skills/opencli-sitemap-author/references/site-memory/<site>/sitemap/本地文件会覆盖具有相同稳定ID的全局文件。
不要将整个大型站点地图加载到上下文中。如果目录较大,先列出文件名,再仅读取你需要的页面/流程文件。
Trust Reality Rule
信任实际情况规则
If sitemap says a button, URL, route, or API should exist but the browser does not show it:
- Re-run or
statewith semantic anchors.find - Check whether login, locale, viewport, A/B test, or route state differs.
- Follow the real page if a safe path is visible.
- Mark the sitemap item stale in local overlay.
Never keep clicking because "the sitemap says it should work."
如果站点地图显示某个按钮、URL、路由或API应该存在,但浏览器中并未显示:
- 重新运行或使用语义锚点运行
state。find - 检查登录状态、区域设置、视口、A/B测试或路由状态是否存在差异。
- 如果可见安全路径,跟随实际页面。
- 在本地覆盖中标记该站点地图条目为过时。
绝不要因为“站点地图显示应该可行”而持续点击。
Stale / Draft Notes
过时/草稿记录
When you discover drift, write a small local note under the relevant page/workflow file or a draft file in the local overlay:
md
Stale note:
- observed_at: YYYY-MM-DD
- current_url:
- expected:
- actual:
- next_probe:Do not edit global seed files unless the task is explicitly a sitemap-authoring or repo PR task.
当你发现差异时,在相关页面/流程文件下或本地覆盖中的草稿文件中添加一条简短的本地记录:
md
Stale note:
- observed_at: YYYY-MM-DD
- current_url:
- expected:
- actual:
- next_probe:除非任务明确是站点地图编写或仓库PR任务,否则不要编辑全局种子文件。
Adapter Health Write-Back
适配器健康状态回写
When an adapter fails and the sitemap action or workflow tells you to update adapter health:
- Find the local workflow file under whose
~/.opencli/sites/<site>/sitemap/workflows/references the adapter command.Best path - If no local workflow exists, copy the matching global workflow into the local overlay first; never edit the global seed directly during browser task execution.
- Set or
adapter_health: suspectas directed.broken - Add a short stale note with observed error, current URL, and timestamp.
- Continue with the browser fallback path.
This write-back is the memory loop: the current agent falls back once, and the next agent does not waste a turn retrying a known-suspect adapter.
当适配器失败且站点地图操作或流程要求你更新适配器健康状态时:
- 在下找到其最佳路径引用该适配器命令的本地流程文件。
~/.opencli/sites/<site>/sitemap/workflows/ - 如果不存在本地流程文件,先将匹配的全局流程复制到本地覆盖中;在浏览器任务执行期间绝不要直接编辑全局种子文件。
- 根据指示设置或
adapter_health: suspect。broken - 添加一条简短的过时记录,包含观察到的错误、当前URL和时间戳。
- 继续执行浏览器回退路径。
这种回写是记忆循环:当前Agent会回退一次,后续Agent不会浪费时间重试已知有问题的适配器。
Output Discipline
输出规范
When reporting back, include:
- Path chosen: adapter best path or browser fallback.
- Checkpoint reached: current URL/state signature.
- Sitemap health: used as-is, stale marked, or missing workflow.
Keep the report task-focused. Do not summarize the whole sitemap.
当反馈结果时,需包含:
- 选择的路径:适配器最佳路径或浏览器回退路径。
- 到达的检查点:当前URL/state_signature。
- 站点地图健康状态:原样使用、标记为过时或缺少流程。
保持报告聚焦于任务。不要总结整个站点地图。