meticulous-iterative-dev
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIterative Frontend Development with Meticulous
使用Meticulous进行迭代前端开发
Use this skill when implementing a multi-step frontend change. After each step, run a quick local visual check using Meticulous to catch regressions and unintended side effects early. After all steps are complete, run a full cloud test run to validate across all recorded sessions.
Before starting, run theskill to ensure the Meticulous CLI is up to date — unless it has already run earlier in this conversation, in which case skip it.meticulous-cli-update
当你实施多步骤前端变更时,可以使用本技能。每完成一步后,使用Meticulous快速运行本地视觉检查,尽早发现回归问题和意外副作用。所有步骤完成后,运行完整的云测试,在所有录制的会话中进行验证。
开始前,请运行技能以确保Meticulous CLI是最新版本——除非在本次对话中已经运行过该技能,否则可跳过此步骤。meticulous-cli-update
Prerequisites
前提条件
- Local dev server running (e.g. or
npm run dev), serving the app at a known URL such aspnpm devhttp://localhost:3000 - API token configured: or
~/.meticulous/config.jsonenvironment variableMETICULOUS_API_TOKEN - Meticulous CLI installed and on (the
PATHskill handles this)meticulous-cli-update
- 本地开发服务器已启动(例如或
npm run dev),应用通过已知URL提供服务,如pnpm devhttp://localhost:3000 - 已配置API令牌:或
~/.meticulous/config.json环境变量METICULOUS_API_TOKEN - 已安装Meticulous CLI并添加至(
PATH技能可完成此操作)meticulous-cli-update
Per-step loop
分步循环流程
Repeat the following for each step of your change.
针对变更的每一步,重复以下操作。
Step 1 — Implement the step's changes
步骤1 — 实现当前步骤的变更
Make your code changes for this step.
为当前步骤进行代码修改。
Step 2 — Find relevant sessions
步骤2 — 查找相关会话
Run:
bash
meticulous local relevant-sessionsIf you have already committed previous steps and want to find sessions relevant only to this step's uncommitted changes, pass the SHA of the last commit:
bash
meticulous local relevant-sessions --startingPointSha=<sha-of-last-commit>For full option reference see the skill. The key fields to extract from each session in the output:
meticulous-cli-local- Session ID — pass as when simulating
--sessionId - Base replay ID — the replay of this session on the base branch; pass as to diff against. May be absent if the session has never been replayed on the base branch.
--baseReplayId - Relevance — /
IsRelevantmeans the session directly exercises changed code.IsRelevantBeta
If no sessions are returned, the changed code is not covered by any recorded session. Proceed to Step 4 (commit) and rely on the final cloud run for coverage.
运行:
bash
meticulous local relevant-sessions如果你已经提交了之前的步骤,且只想查找与当前步骤未提交变更相关的会话,请传入最后一次提交的SHA值:
bash
meticulous local relevant-sessions --startingPointSha=<sha-of-last-commit>如需完整选项参考,请查看技能。需从输出的每个会话中提取的关键字段:
meticulous-cli-local- Session ID — 模拟时作为参数传入
--sessionId - Base replay ID — 该会话在基准分支上的回放ID;作为传入以进行对比。如果该会话从未在基准分支上回放过,则可能不存在此ID。
--baseReplayId - Relevance — /
IsRelevant表示该会话直接涉及被修改的代码。IsRelevantBeta
如果未返回任何会话,说明修改的代码未被任何录制的会话覆盖。直接进入步骤4(提交),并依赖最终的云测试来覆盖。
Step 3 — Simulate and analyse
步骤3 — 模拟与分析
Pick 1–2 of the most relevant sessions (prefer over ). For each, follow the skill using:
IsRelevantIsRelevantBetameticulous-simulate-and-diff- and
--sessionIdfrom step 2's output--baseReplayId - pointing at your local dev server
--appUrl=http://localhost:<port> - (required — agents should not operate a visible browser)
--headless
If was absent from the output, omit it; use quick-check mode from that skill instead.
baseReplayIdAlso consider simulating a session for an unexpected flow surfaced by — one that covers code you didn't intend to change — to check for unintended side effects.
local relevant-sessionsOnce you have the analysis, classify each visual difference:
- Expected — a direct, intended consequence of this step's changes. Proceed.
- Unexpected — a visual change that was not a goal of this step (including side effects of your code, even if explainable). Investigate.
If unexpected and the cause is clear: fix the code and re-simulate.
If the cause is unclear: create a self-contained AI-readable debug workspace using the replay IDs from the simulation output URL (see the skill):
meticulous-cli-debugbash
meticulous debug replay <headReplayId> --baseReplayId=<baseReplayId>Both IDs come from the simulation output URL: the head replay ID is the last path segment of the URL; the base replay ID is the used in the simulate command. Open the workspace to diagnose, fix, and re-simulate.
View simulation at:--baseReplayId选择1-2个最相关的会话(优先选择而非)。针对每个会话,按照技能的指引,使用以下参数:
IsRelevantIsRelevantBetameticulous-simulate-and-diff- 步骤2输出中的和
--sessionId--baseReplayId - 指向你的本地开发服务器
--appUrl=http://localhost:<port> - (必填——Agent不应操作可见浏览器)
--headless
如果输出中没有,则省略该参数;改用该技能中的快速检查模式。
baseReplayId还可以考虑模拟显示的意外流程会话——即涉及你未打算修改的代码的会话——以检查是否存在意外副作用。
local relevant-sessions完成分析后,对每个视觉差异进行分类:
- 预期差异 — 当前步骤变更直接导致的预期结果。继续操作。
- 意外差异 — 并非当前步骤目标的视觉变化(包括代码的副作用,即使可解释)。需进行调查。
**如果是意外差异且原因明确:**修复代码并重新模拟。
**如果原因不明确:**使用模拟输出URL中的回放ID创建一个独立的AI可读调试工作区(请查看技能):
meticulous-cli-debugbash
meticulous debug replay <headReplayId> --baseReplayId=<baseReplayId>这两个ID均来自模拟输出URL:head回放ID是 URL的最后一个路径段;基准回放ID是模拟命令中使用的。打开工作区进行诊断、修复并重新模拟。
View simulation at:--baseReplayIdStep 4 — Commit
步骤4 — 提交
Once the step's visual output is correct, commit your changes:
bash
git add -p
git commit -m "<concise description of this step>"Committing after each step means the next iteration's call computes the diff relative to this checkpoint, preventing prior steps' changes from inflating the set of relevant sessions.
--startingPointShaReturn to Step 1 for the next step.
确认当前步骤的视觉输出无误后,提交你的变更:
bash
git add -p
git commit -m "<concise description of this step>"每一步后提交意味着下一次迭代的调用会基于此检查点计算差异,避免之前步骤的变更扩大相关会话的范围。
--startingPointSha返回步骤1进行下一步操作。
After all steps — full cloud test run
所有步骤完成后 — 完整云测试运行
Once all steps are complete and committed, run a full cloud test run to validate across all recorded sessions (not just the 1–2 you simulated locally):
Follow theskill.meticulous-test
The cloud run compares your branch against the base branch across the full golden set of sessions and reports any visual regressions.
所有步骤完成并提交后,运行完整的云测试,在所有录制的会话中进行验证(而不仅仅是你本地模拟的1-2个会话):
按照技能的指引操作。meticulous-test
云测试会将你的分支与基准分支在所有黄金会话集中进行对比,并报告所有视觉回归问题。