observe

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Step 0 - is the kit here? Check once:
ls ${CLAUDE_SKILL_DIR}/../../../scripts/observe.mjs >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING
On
KIT_MISSING
only the skill folders were installed. Say so, point the user at the plugin install or
npx ux-ui-agent-skills init
, and stop.
Report what the hooks recorded - never a reconstruction from memory.
  1. Run
    node ${CLAUDE_SKILL_DIR}/../../../scripts/observe.mjs --project "$CLAUDE_PROJECT_DIR"
    (or without
    --project
    when the user asks about every project, and with
    --days N
    when they name a window).
  2. Quote the summary lines it prints. If it says no session edited UI, say that and stop: there is nothing to judge.
  3. For each session marked
    BROKE A RULE
    , run it again with
    --session <id>
    and say which rule failed and the timeline line that shows it.
  4. If the user wants the page, run it with
    --html <path>
    and give the path.
What it measures, and what it does not: three counted rules per session - every edited page had a passing gate before the end, no fast-gate finding was left on a file's latest version, and the agent never finished while the Stop hook still had pages open. It says nothing about design quality, and an
unfinished
session is not counted for or against.
步骤 0 - kit 在这里吗? 检查一次:
ls ${CLAUDE_SKILL_DIR}/../../../scripts/observe.mjs >/dev/null 2>&1 && echo KIT_OK || echo KIT_MISSING
如果出现
KIT_MISSING
,说明仅安装了 skill 文件夹。请如实告知用户, 指向插件安装方式或
npx ux-ui-agent-skills init
,然后停止。
报告 hooks 记录的内容——绝不能根据记忆进行推测。
  1. 运行
    node ${CLAUDE_SKILL_DIR}/../../../scripts/observe.mjs --project "$CLAUDE_PROJECT_DIR"
    (当用户询问所有项目时不使用
    --project
    ;当用户指定时间范围时使用
    --days N
    )。
  2. 原样引用它打印的摘要行。如果它表示没有会话编辑过 UI,则说明这一点并停止:没有需要评估的内容。
  3. 对于每个标记为
    BROKE A RULE
    的会话,再次使用
    --session <id>
    运行,并说明违反了哪条规则,以及显示该问题的时间线记录。
  4. 如果用户需要该页面,使用
    --html <path>
    运行,并给出路径。
测量内容与不测量的内容:每个会话统计三条规则 - 每个编辑过的页面都必须在会话结束前通过 gate;文件的最新版本上不能遗留 fast-gate 发现项;Stop hook 仍有打开的页面时,Agent 不能结束会话。它不评估设计质量,
unfinished
会话不计入符合或不符合的统计。