[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6JGTX3NW0PFBVP05G0VCEQB":3,"skill-same:01M6JGTX3NW0PFBVP05G0VCEQB":96},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":28,"publishedAt":49,"linkOnly":50,"markdownContent":51,"markdownBody":52,"frontMatter":53,"refName":73,"commitSha":74,"skillDirectory":75,"forksCount":76,"repositoryHtmlUrl":77,"repositoryHomepageUrl":78,"ownerHtmlUrl":79,"ownerBlogUrl":6,"ownerDescription":80,"updatedAt":81,"install":82,"resources":95},"01M6JGTX3NW0PFBVP05G0VCEQB","phase-execute",null,"Autonomous phase runner for numbered plans (docs\u002Fplans\u002F*, docs\u002Fprd\u002F*):\nscoped gates per task, full gate only at phase boundaries, checkpoint to\n.claude\u002Fstate\u002Fphase-run.json after every task so a run resumes at the\nexact next task, edit-guard.mjs against concurrent writers, explicit E2E\nservers, flaky quarantine, deliverables report at phase end. Use for\n\"execute phase X of \u003Cplan>\", \"drive the next phase\", \"phase-execute\n\u003Cplan>\", \"resume the phase\", or \"dry-run phase X\".","ancyloce\u002Fanvilkit-studio","ancyloce","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F103255835?v=4","01M6JGS0GSF9KTQE3VS6HA5FZ2","Ancyloce","01M6JGS0NK83XM8EJYT39C39CD",2,"MIT","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphase-execute\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":26,"taxonomyTypeDesc":27},"01JBSEEDCAT000000000000038","人力资源","PROFESSION","适用职业",[29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],"phase execute","execute","only","for","at","dry","end","full","next","milestone","runner","run","autonomous","edit","write","read","run phase","advance","plan","Bash","2026-11-10 10:12:30",false,"---\nname: phase-execute\ndescription: |\n  Autonomous phase runner for numbered plans (docs\u002Fplans\u002F*, docs\u002Fprd\u002F*):\n  scoped gates per task, full gate only at phase boundaries, checkpoint to\n  .claude\u002Fstate\u002Fphase-run.json after every task so a run resumes at the\n  exact next task, edit-guard.mjs against concurrent writers, explicit E2E\n  servers, flaky quarantine, deliverables report at phase end. Use for\n  \"execute phase X of \u003Cplan>\", \"drive the next phase\", \"phase-execute\n  \u003Cplan>\", \"resume the phase\", or \"dry-run phase X\".\ntriggers:\n  - phase execute\n  - execute phase\n  - drive the next phase\n  - advance the milestone\n  - resume the phase\n  - dry-run the phase\nallowed-tools:\n  - Bash\n  - Read\n  - Write\n  - Edit\n  - Grep\n  - Glob\n  - Agent\n  - AskUserQuestion\n  - Skill\n  - TaskCreate\n  - TaskUpdate\n  - TaskList\n---\n\n# Phase Execute\n\nRuns one phase task-by-task with a durable checkpoint after every task.\nPrevents this repo's two costliest failures: an interrupted session losing\nthe phase's context, and a gate believed green that was never proven green.\n**All CLAUDE.md rules apply; this file adds only the phase-runner deltas.**\n\n## 0. Startup\n\n`git rev-parse --show-toplevel` must be `\u002Froot\u002FRhett\u002Fanvilkit-studio` (never\na `.claude\u002Fworktrees\u002F*` copy) — abort loudly otherwise.\n\nRead `.claude\u002Fstate\u002Fphase-run.json`:\n\n- `nextTask` non-null, or any task `in_progress` → **RESUME**: do not\n  re-read the plan or re-explore the baseline. Report the last done task,\n  continue at exactly `nextTask`. Drift check only: `git rev-parse HEAD` vs\n  `baseline.head`, `git status --porcelain` vs `baseline.porcelain`; on\n  drift, log to `interference` and `edit-guard verify` before touching\n  guarded files. Resume — never restart.\n- File is for a different plan\u002Fphase → surface it; archive to\n  `.claude\u002Fstate\u002Fphase-run-\u003Cphase>-\u003CMMDD-HHMM>.archived.json` only with\n  user confirmation.\n- Missing, or `nextTask: null` → fresh run (§1).\n\nSchema — the single durable record. Write it after EVERY task, atomically\n(Write `….json.tmp`, then `mv -f`); `nextTask: null` is the completion\nmarker:\n\n```json\n{\n  \"version\": 1, \"plan\": \"docs\u002Fplans\u002F\u003Cfile>.md\", \"phase\": \"0\",\n  \"mode\": \"execute|dry-run\", \"startedAt\": \"\u003CISO>\", \"updatedAt\": \"\u003CISO>\",\n  \"baseline\": { \"head\": \"\u003Csha>\", \"porcelain\": [\"\u003Clines>\"], \"dirtyCount\": 0 },\n  \"scopeContract\": [\"\u003Cpath allowlist>\"],\n  \"tasks\": [{\n    \"phase\": \"0\", \"taskId\": \"P0-01\", \"title\": \"\u003Cfrom the plan>\",\n    \"status\": \"pending|in_progress|done|done-flaky|dry-run-done|blocked|failed\",\n    \"gatesPassed\": { \"typecheck\": \"\u003Cevidence|skipped>\", \"lint\": \"…\", \"test\": \"…\" },\n    \"filesTouched\": [], \"retryCount\": 0, \"lastError\": null, \"notes\": \"\"\n  }],\n  \"nextTask\": \"P0-03|null\",\n  \"interference\": [], \"flakes\": [], \"deferred\": [],\n  \"phaseBoundaryGate\": null, \"deliverablesReport\": null\n}\n```\n\nFile hashes are NOT stored here — `scripts\u002Fedit-guard.mjs` owns them in\n`.claude\u002Fstate\u002Fedit-guard.json`, keyed by the same `taskId`.\n\n## 1. Fresh-run resolution\n\n- Read the plan end-to-end. No phase named → the lowest phase with no\n  `done` tasks and no `docs\u002Freports\u002Fphase-\u003CN>-*` file.\n- Quote the phase's scope + exit gate back in 3–6 lines. Check\n  `docs\u002Ftasks\u002F` for an existing decomposition before making one.\n- **Doc register**: newer plans list \"DOC-nn must exist before task X\"\n  prerequisites (delivered to `docs\u002Fdesigns\u002F`). A missing prerequisite doc\n  marks its dependent tasks `blocked` — never skip silently.\n- Puck-contract conflict in any task → stop and surface before executing.\n\n## 2. Tasks + scope contract\n\nUse the plan's tasks, or split into 3–8 atomic, independently verifiable\nones. Record a path-allowlist `scopeContract`; out-of-scope work becomes a\n`deferred` entry, never a silent expansion. Print list + contract, then run\nwithout per-task approval. Halt only for: 4th gate failure, unauthorized\ndeletion, a new dependency, plan ambiguity, or a Puck-contract conflict.\n\n## 3. Task loop — guard → edit → gates → checkpoint\n\nMark `in_progress` in state at task start so a crash mid-task is visible.\n\n**Guard (mandatory — the old prose hashing had 0\u002F8 compliance; concurrent\nwriters here have destroyed stale-content edits twice):**\n\n```bash\nnode scripts\u002Fedit-guard.mjs record \u003CtaskId> \u003Cfile...>  # before reading\u002Fthinking\nnode scripts\u002Fedit-guard.mjs verify \u003CtaskId>            # before FIRST and EACH later write\n```\n\n`verify` exit 1 = drift: do NOT write — re-read, re-derive against current\ncontent, `record` again, log to `interference`. Also porcelain-diff vs\n`baseline` at task start (inside submodule working trees too) and log\nsurprises to `interference`.\n\n**Edit:**\n\n- New dependency → halt for confirmation; pnpm `minimumReleaseAge` (7 days\n  in the components workspace) fails too-fresh installs — pin older.\n- Deletion is never autonomous, with one carve-out: test\u002Fspec\u002Ffixture\n  deletions the plan authorizes via the deferred-verification ledger\n  (`docs\u002Ftasks\u002F0026-deferred-verification-ledger.md`) — delete + ledger row\n  + `pnpm check:ledger` in the same task. Anything else: record inbound-ref\n  counts in `notes`, mark `blocked`, stop.\n\n**Gates — scoped per task; the full gate runs ONLY at the phase boundary\n(§4). This cadence intentionally overrides CLAUDE.md's\ngate-full-after-multi-file-change default:**\n\n```bash\npnpm --filter \u003Cpkg> typecheck && pnpm --filter \u003Cpkg> lint && pnpm --filter \u003Cpkg> test\n```\n\n- Components tree = nested pnpm workspace (also claims\n  `packages\u002Fruntime\u002Fui`, `packages\u002Fcapabilities\u002Fanalytics\u002F*`,\n  `packages\u002Ftooling\u002Fconfigs\u002F*`): run from `packages\u002Fextensions\u002Fcomponents\u002F`;\n  installs follow `.claude\u002Frules\u002Fpnpm-install-order.md` (components BEFORE\n  root, else duplicate-React crashes).\n- Rebuild affected packages before any gate consuming their `dist`. A bare\n  rebuild of `@anvilkit\u002Fcore` wipes its compiled `styles.css` — use the\n  package's own build script.\n- Evidence into `gatesPassed`: the quoted numeric summary line. Pipes hide\n  exit codes — check `${PIPESTATUS[0]}` or scan for `ELIFECYCLE`. Record\n  before → after test counts when a task claims new tests.\n\n**Retry (cap 3 per task).** Classify before retrying, in gate-playbook\nvocabulary (`ENVIRONMENT_ROT`\u002F`CODE_REGRESSION`\u002F`PRE_EXISTING`\u002F`UNKNOWN`):\n\n1. Environment rot — CLAUDE.md's Environment Hygiene list, then\n   `.claude\u002Frules\u002Fgate-playbook.md` signatures\u002Fremedies (the `gate-guardian`\n   skill runs this end-to-end; `release-gate-triager` settles\n   pre-existing-vs-regression). Apply the remedy, re-run only the failed\n   gate, `retryCount++`, classification → `lastError`.\n2. Regression from this task's edit → fix within scope, re-run.\n3. Pre-existing (red on clean baseline, e.g. the 5 stable `@anvilkit\u002Fui`\n   base-ui failures) → `notes` + `deferred`; not counted against the task.\n4. Unknown → root-cause, then append a new gate-playbook entry.\n\n4th failure: `status: \"blocked\"`, checkpoint, write\n`docs\u002Freports\u002Fphase-\u003CN>-diagnostic-\u003CtaskId>-\u003CMMDD-HHMM>.md` (command,\nfailing-output tail, classifications tried, remedies, state snapshot), stop\nthe phase.\n\n**Checkpoint** atomically the moment a task reaches terminal status —\nbefore anything else. Then print:\n\n```\n\u003CtaskId>: \u003Ctitle> — \u003Cstatus>. Gates: \u003Cevidence>. Files: \u003Cn>. Retries: \u003Cn>.\n```\n\n## 4. Phase boundary\n\n1. `pnpm gate:full`; record exact pass\u002Ffail counts from THIS run.\n2. **Expect the documented concurrency phantom**: a shifting 11–14-package\n   ELIFECYCLE sweep under full-workspace turbo test load — it hit\n   essentially every plan-0025\u002F0028 boundary (see `docs\u002Fflaky-tests.md`).\n   Re-run each failed package's tests isolated, same hour; the isolated\n   file\u002Ftest counts are the evidence → `phaseBoundaryGate`. Green iff every\n   failure is isolated-green (phantom) or documented pre-existing; anything\n   else → §3 retry protocol.\n3. Extra gates when in scope (deliberately omitted from `gate:full`):\n   `pnpm size` (release), `pnpm check:submodules` (submodule pointers\n   moved), `pnpm check:ledger` (ledgered test deletions).\n4. Final drift check vs `baseline`; then write\n   `docs\u002Freports\u002Fphase-\u003CN>-deliverables.md` (never overwrite — disambiguate\n   with plan id \u002F `-MMDD-HHMM`). Sections: run metadata (start\u002Ffinish, mode,\n   baseline sha); task table `| Task | Title | Status | Gates (evidence) |\n   Files |`; boundary gate (command, counts, phantom\u002Fpre-existing\n   classification with isolated evidence); tests added (per package\n   before → after); flakes quarantined; deferred items; files touched\n   (submodule files listed separately).\n5. Fill `phaseBoundaryGate` + `deliverablesReport` in state, set\n   `nextTask: null`, final checkpoint, report — noting `docs\u002Freports\u002F` is\n   git-ignored working documentation.\n\n## 5. E2E — clean, explicit servers, Playwright never boots them\n\nPorts: studio `:3000` + collab relay `:21234` · playground `:3100`\n(`PLAYGROUND_PORT` overrides) · docs `:4321`.\n\n```bash\n# 1. cleanup, always\npkill -f '[p]laywright' 2>\u002Fdev\u002Fnull; sleep 1\nPID=$(ss -tlnp 2>\u002Fdev\u002Fnull | grep \":${PORT} \" | grep -oP 'pid=\\K[0-9]+' | head -1)\n[ -n \"$PID\" ] && kill \"$PID\" && sleep 2\n```\n\nWSL2: Windows port reservations can block a port even with an empty `ss`\nlisting — switch ports rather than fight (why the relay is on 21234, not\n1234\u002F11234). If any `dist` was rebuilt this session:\n`rm -rf apps\u002F\u003Capp>\u002F.next` — kill the server first, never while running.\n\n```bash\n# 2. explicit servers — studio needs BOTH\n(cd apps\u002Fstudio && ANVILKIT_PAGE_STORAGE=memory PORT=3000 pnpm dev \\\n  > \"$CLAUDE_JOB_DIR\u002Ftmp\u002Fstudio-dev.log\" 2>&1 &)\n(node packages\u002Fextensions\u002Fplugins\u002Fplugin-collab-yjs\u002Fexamples\u002Fy-websocket-server.mjs 21234 \\\n  > \"$CLAUDE_JOB_DIR\u002Ftmp\u002Fcollab-relay.log\" 2>&1 &)\n# 3. health-check before Playwright\nfor i in $(seq 60); do curl --noproxy '*' -sf -o \u002Fdev\u002Fnull \"http:\u002F\u002Flocalhost:$PORT\" && break; sleep 5; done\n```\n\n`ANVILKIT_PAGE_STORAGE=memory` is load-bearing — the sqlite default's commit\nlatency turns the undo\u002Fhistory-debounce race (§6) into hard failures.\n`--noproxy '*'` is mandatory. Studio boots ~2.5 min silent (normal; allow\n≥5 min). Health check never passes → environment failure, no Playwright.\n\nRun against the running servers (`reuseExistingServer` attaches — override\nany config lacking it), `--workers=1`, unique room IDs for collab. Leave\nenv-gated projects OFF locally: `ANVILKIT_E2E_VISUAL=1` (baselines are\nCI-generated; WSL2 headless screenshots verifiably broken) and\n`ANVILKIT_E2E_MATRIX=1` (browser deps CI-provisioned). Run a known-green\nbaseline spec first — an identical failure means environmental, not the new\nspec. Postflight: a non-zero passed count, or it is a FAILURE.\n\n## 6. Flaky policy (any spec failure)\n\n1. Re-run only that spec (`pnpm --filter \u003Cpkg> exec vitest run \u003Cpath>` \u002F\n   `pnpm --filter \u003Capp> exec playwright test \u003Cspec> --workers=1`), ≤3 total\n   attempts.\n2. Signature per attempt: strip ANSI (`sed 's\u002F\\x1b\\[[0-9;]*m\u002F\u002Fg'`), first\n   assertion\u002FError line, drop timestamps\u002Fdurations\u002Fports\u002Faddresses.\n3. Pass on retry → flaky: append (never rewrite) to `docs\u002Fflaky-tests.md`,\n   header `| Date | Spec \u002F package | Failure signature | Evidence | Run |`\n   (UPDATE rows over edits; package-level rows legitimate). Add to state\n   `flakes`, mark `done-flaky`, continue.\n4. 3 identical failures → deterministic: stop per §3's 4th-failure protocol.\n5. 3 differing signatures → unstable environment: classify once; no match →\n   stop as `blocked: env`, not a regression.\n\nKnown env-not-regression patterns (all logged in `docs\u002Fflaky-tests.md`):\nthe full-gate ELIFECYCLE phantom (§4); studio `visual-editor.spec.ts`\ninline-undo racing Puck's ~300 ms history debounce (quarantined; possibly a\nreal UX bug — no ad-hoc fixes); wall-clock perf budgets under machine load;\nsidebar-modules visual baselines missing on Linux; headless Chromium\nscreenshot hangs (`xvfb-run` + `headless: false`); jsdom rendering 0\nvirtual rows without layout.\n\n## 7. Dry-run\n\nRead-only validation — no edits, installs, servers, or suite runs. Per\ntask: verify preconditions against the actual tree (files\u002FAPIs assumed, §1\ndoc register), enumerate planned edits, `edit-guard record \u003CtaskId>\n\u003Ctargets>` (real hashes prime §3 for a later execute), `gatesPassed:\n\"skipped (dry-run)\"`, `status: \"dry-run-done\"`. Checkpoint protocol\nUNCHANGED — dry-run partly exists to prove the resume machinery. A failed\nprecondition → `blocked` with the mismatch in `lastError`. Emit the\ndeliverables report with mode `dry-run`; leave the state file as the primed\nbaseline unless the user wants the slot freed (`nextTask: null`).\n","# Phase Execute\n\nRuns one phase task-by-task with a durable checkpoint after every task.\nPrevents this repo's two costliest failures: an interrupted session losing\nthe phase's context, and a gate believed green that was never proven green.\n**All CLAUDE.md rules apply; this file adds only the phase-runner deltas.**\n\n## 0. Startup\n\n`git rev-parse --show-toplevel` must be `\u002Froot\u002FRhett\u002Fanvilkit-studio` (never\na `.claude\u002Fworktrees\u002F*` copy) — abort loudly otherwise.\n\nRead `.claude\u002Fstate\u002Fphase-run.json`:\n\n- `nextTask` non-null, or any task `in_progress` → **RESUME**: do not\n  re-read the plan or re-explore the baseline. Report the last done task,\n  continue at exactly `nextTask`. Drift check only: `git rev-parse HEAD` vs\n  `baseline.head`, `git status --porcelain` vs `baseline.porcelain`; on\n  drift, log to `interference` and `edit-guard verify` before touching\n  guarded files. Resume — never restart.\n- File is for a different plan\u002Fphase → surface it; archive to\n  `.claude\u002Fstate\u002Fphase-run-\u003Cphase>-\u003CMMDD-HHMM>.archived.json` only with\n  user confirmation.\n- Missing, or `nextTask: null` → fresh run (§1).\n\nSchema — the single durable record. Write it after EVERY task, atomically\n(Write `….json.tmp`, then `mv -f`); `nextTask: null` is the completion\nmarker:\n\n```json\n{\n  \"version\": 1, \"plan\": \"docs\u002Fplans\u002F\u003Cfile>.md\", \"phase\": \"0\",\n  \"mode\": \"execute|dry-run\", \"startedAt\": \"\u003CISO>\", \"updatedAt\": \"\u003CISO>\",\n  \"baseline\": { \"head\": \"\u003Csha>\", \"porcelain\": [\"\u003Clines>\"], \"dirtyCount\": 0 },\n  \"scopeContract\": [\"\u003Cpath allowlist>\"],\n  \"tasks\": [{\n    \"phase\": \"0\", \"taskId\": \"P0-01\", \"title\": \"\u003Cfrom the plan>\",\n    \"status\": \"pending|in_progress|done|done-flaky|dry-run-done|blocked|failed\",\n    \"gatesPassed\": { \"typecheck\": \"\u003Cevidence|skipped>\", \"lint\": \"…\", \"test\": \"…\" },\n    \"filesTouched\": [], \"retryCount\": 0, \"lastError\": null, \"notes\": \"\"\n  }],\n  \"nextTask\": \"P0-03|null\",\n  \"interference\": [], \"flakes\": [], \"deferred\": [],\n  \"phaseBoundaryGate\": null, \"deliverablesReport\": null\n}\n```\n\nFile hashes are NOT stored here — `scripts\u002Fedit-guard.mjs` owns them in\n`.claude\u002Fstate\u002Fedit-guard.json`, keyed by the same `taskId`.\n\n## 1. Fresh-run resolution\n\n- Read the plan end-to-end. No phase named → the lowest phase with no\n  `done` tasks and no `docs\u002Freports\u002Fphase-\u003CN>-*` file.\n- Quote the phase's scope + exit gate back in 3–6 lines. Check\n  `docs\u002Ftasks\u002F` for an existing decomposition before making one.\n- **Doc register**: newer plans list \"DOC-nn must exist before task X\"\n  prerequisites (delivered to `docs\u002Fdesigns\u002F`). A missing prerequisite doc\n  marks its dependent tasks `blocked` — never skip silently.\n- Puck-contract conflict in any task → stop and surface before executing.\n\n## 2. Tasks + scope contract\n\nUse the plan's tasks, or split into 3–8 atomic, independently verifiable\nones. Record a path-allowlist `scopeContract`; out-of-scope work becomes a\n`deferred` entry, never a silent expansion. Print list + contract, then run\nwithout per-task approval. Halt only for: 4th gate failure, unauthorized\ndeletion, a new dependency, plan ambiguity, or a Puck-contract conflict.\n\n## 3. Task loop — guard → edit → gates → checkpoint\n\nMark `in_progress` in state at task start so a crash mid-task is visible.\n\n**Guard (mandatory — the old prose hashing had 0\u002F8 compliance; concurrent\nwriters here have destroyed stale-content edits twice):**\n\n```bash\nnode scripts\u002Fedit-guard.mjs record \u003CtaskId> \u003Cfile...>  # before reading\u002Fthinking\nnode scripts\u002Fedit-guard.mjs verify \u003CtaskId>            # before FIRST and EACH later write\n```\n\n`verify` exit 1 = drift: do NOT write — re-read, re-derive against current\ncontent, `record` again, log to `interference`. Also porcelain-diff vs\n`baseline` at task start (inside submodule working trees too) and log\nsurprises to `interference`.\n\n**Edit:**\n\n- New dependency → halt for confirmation; pnpm `minimumReleaseAge` (7 days\n  in the components workspace) fails too-fresh installs — pin older.\n- Deletion is never autonomous, with one carve-out: test\u002Fspec\u002Ffixture\n  deletions the plan authorizes via the deferred-verification ledger\n  (`docs\u002Ftasks\u002F0026-deferred-verification-ledger.md`) — delete + ledger row\n  + `pnpm check:ledger` in the same task. Anything else: record inbound-ref\n  counts in `notes`, mark `blocked`, stop.\n\n**Gates — scoped per task; the full gate runs ONLY at the phase boundary\n(§4). This cadence intentionally overrides CLAUDE.md's\ngate-full-after-multi-file-change default:**\n\n```bash\npnpm --filter \u003Cpkg> typecheck && pnpm --filter \u003Cpkg> lint && pnpm --filter \u003Cpkg> test\n```\n\n- Components tree = nested pnpm workspace (also claims\n  `packages\u002Fruntime\u002Fui`, `packages\u002Fcapabilities\u002Fanalytics\u002F*`,\n  `packages\u002Ftooling\u002Fconfigs\u002F*`): run from `packages\u002Fextensions\u002Fcomponents\u002F`;\n  installs follow `.claude\u002Frules\u002Fpnpm-install-order.md` (components BEFORE\n  root, else duplicate-React crashes).\n- Rebuild affected packages before any gate consuming their `dist`. A bare\n  rebuild of `@anvilkit\u002Fcore` wipes its compiled `styles.css` — use the\n  package's own build script.\n- Evidence into `gatesPassed`: the quoted numeric summary line. Pipes hide\n  exit codes — check `${PIPESTATUS[0]}` or scan for `ELIFECYCLE`. Record\n  before → after test counts when a task claims new tests.\n\n**Retry (cap 3 per task).** Classify before retrying, in gate-playbook\nvocabulary (`ENVIRONMENT_ROT`\u002F`CODE_REGRESSION`\u002F`PRE_EXISTING`\u002F`UNKNOWN`):\n\n1. Environment rot — CLAUDE.md's Environment Hygiene list, then\n   `.claude\u002Frules\u002Fgate-playbook.md` signatures\u002Fremedies (the `gate-guardian`\n   skill runs this end-to-end; `release-gate-triager` settles\n   pre-existing-vs-regression). Apply the remedy, re-run only the failed\n   gate, `retryCount++`, classification → `lastError`.\n2. Regression from this task's edit → fix within scope, re-run.\n3. Pre-existing (red on clean baseline, e.g. the 5 stable `@anvilkit\u002Fui`\n   base-ui failures) → `notes` + `deferred`; not counted against the task.\n4. Unknown → root-cause, then append a new gate-playbook entry.\n\n4th failure: `status: \"blocked\"`, checkpoint, write\n`docs\u002Freports\u002Fphase-\u003CN>-diagnostic-\u003CtaskId>-\u003CMMDD-HHMM>.md` (command,\nfailing-output tail, classifications tried, remedies, state snapshot), stop\nthe phase.\n\n**Checkpoint** atomically the moment a task reaches terminal status —\nbefore anything else. Then print:\n\n```\n\u003CtaskId>: \u003Ctitle> — \u003Cstatus>. Gates: \u003Cevidence>. Files: \u003Cn>. Retries: \u003Cn>.\n```\n\n## 4. Phase boundary\n\n1. `pnpm gate:full`; record exact pass\u002Ffail counts from THIS run.\n2. **Expect the documented concurrency phantom**: a shifting 11–14-package\n   ELIFECYCLE sweep under full-workspace turbo test load — it hit\n   essentially every plan-0025\u002F0028 boundary (see `docs\u002Fflaky-tests.md`).\n   Re-run each failed package's tests isolated, same hour; the isolated\n   file\u002Ftest counts are the evidence → `phaseBoundaryGate`. Green iff every\n   failure is isolated-green (phantom) or documented pre-existing; anything\n   else → §3 retry protocol.\n3. Extra gates when in scope (deliberately omitted from `gate:full`):\n   `pnpm size` (release), `pnpm check:submodules` (submodule pointers\n   moved), `pnpm check:ledger` (ledgered test deletions).\n4. Final drift check vs `baseline`; then write\n   `docs\u002Freports\u002Fphase-\u003CN>-deliverables.md` (never overwrite — disambiguate\n   with plan id \u002F `-MMDD-HHMM`). Sections: run metadata (start\u002Ffinish, mode,\n   baseline sha); task table `| Task | Title | Status | Gates (evidence) |\n   Files |`; boundary gate (command, counts, phantom\u002Fpre-existing\n   classification with isolated evidence); tests added (per package\n   before → after); flakes quarantined; deferred items; files touched\n   (submodule files listed separately).\n5. Fill `phaseBoundaryGate` + `deliverablesReport` in state, set\n   `nextTask: null`, final checkpoint, report — noting `docs\u002Freports\u002F` is\n   git-ignored working documentation.\n\n## 5. E2E — clean, explicit servers, Playwright never boots them\n\nPorts: studio `:3000` + collab relay `:21234` · playground `:3100`\n(`PLAYGROUND_PORT` overrides) · docs `:4321`.\n\n```bash\n# 1. cleanup, always\npkill -f '[p]laywright' 2>\u002Fdev\u002Fnull; sleep 1\nPID=$(ss -tlnp 2>\u002Fdev\u002Fnull | grep \":${PORT} \" | grep -oP 'pid=\\K[0-9]+' | head -1)\n[ -n \"$PID\" ] && kill \"$PID\" && sleep 2\n```\n\nWSL2: Windows port reservations can block a port even with an empty `ss`\nlisting — switch ports rather than fight (why the relay is on 21234, not\n1234\u002F11234). If any `dist` was rebuilt this session:\n`rm -rf apps\u002F\u003Capp>\u002F.next` — kill the server first, never while running.\n\n```bash\n# 2. explicit servers — studio needs BOTH\n(cd apps\u002Fstudio && ANVILKIT_PAGE_STORAGE=memory PORT=3000 pnpm dev \\\n  > \"$CLAUDE_JOB_DIR\u002Ftmp\u002Fstudio-dev.log\" 2>&1 &)\n(node packages\u002Fextensions\u002Fplugins\u002Fplugin-collab-yjs\u002Fexamples\u002Fy-websocket-server.mjs 21234 \\\n  > \"$CLAUDE_JOB_DIR\u002Ftmp\u002Fcollab-relay.log\" 2>&1 &)\n# 3. health-check before Playwright\nfor i in $(seq 60); do curl --noproxy '*' -sf -o \u002Fdev\u002Fnull \"http:\u002F\u002Flocalhost:$PORT\" && break; sleep 5; done\n```\n\n`ANVILKIT_PAGE_STORAGE=memory` is load-bearing — the sqlite default's commit\nlatency turns the undo\u002Fhistory-debounce race (§6) into hard failures.\n`--noproxy '*'` is mandatory. Studio boots ~2.5 min silent (normal; allow\n≥5 min). Health check never passes → environment failure, no Playwright.\n\nRun against the running servers (`reuseExistingServer` attaches — override\nany config lacking it), `--workers=1`, unique room IDs for collab. Leave\nenv-gated projects OFF locally: `ANVILKIT_E2E_VISUAL=1` (baselines are\nCI-generated; WSL2 headless screenshots verifiably broken) and\n`ANVILKIT_E2E_MATRIX=1` (browser deps CI-provisioned). Run a known-green\nbaseline spec first — an identical failure means environmental, not the new\nspec. Postflight: a non-zero passed count, or it is a FAILURE.\n\n## 6. Flaky policy (any spec failure)\n\n1. Re-run only that spec (`pnpm --filter \u003Cpkg> exec vitest run \u003Cpath>` \u002F\n   `pnpm --filter \u003Capp> exec playwright test \u003Cspec> --workers=1`), ≤3 total\n   attempts.\n2. Signature per attempt: strip ANSI (`sed 's\u002F\\x1b\\[[0-9;]*m\u002F\u002Fg'`), first\n   assertion\u002FError line, drop timestamps\u002Fdurations\u002Fports\u002Faddresses.\n3. Pass on retry → flaky: append (never rewrite) to `docs\u002Fflaky-tests.md`,\n   header `| Date | Spec \u002F package | Failure signature | Evidence | Run |`\n   (UPDATE rows over edits; package-level rows legitimate). Add to state\n   `flakes`, mark `done-flaky`, continue.\n4. 3 identical failures → deterministic: stop per §3's 4th-failure protocol.\n5. 3 differing signatures → unstable environment: classify once; no match →\n   stop as `blocked: env`, not a regression.\n\nKnown env-not-regression patterns (all logged in `docs\u002Fflaky-tests.md`):\nthe full-gate ELIFECYCLE phantom (§4); studio `visual-editor.spec.ts`\ninline-undo racing Puck's ~300 ms history debounce (quarantined; possibly a\nreal UX bug — no ad-hoc fixes); wall-clock perf budgets under machine load;\nsidebar-modules visual baselines missing on Linux; headless Chromium\nscreenshot hangs (`xvfb-run` + `headless: false`); jsdom rendering 0\nvirtual rows without layout.\n\n## 7. Dry-run\n\nRead-only validation — no edits, installs, servers, or suite runs. Per\ntask: verify preconditions against the actual tree (files\u002FAPIs assumed, §1\ndoc register), enumerate planned edits, `edit-guard record \u003CtaskId>\n\u003Ctargets>` (real hashes prime §3 for a later execute), `gatesPassed:\n\"skipped (dry-run)\"`, `status: \"dry-run-done\"`. Checkpoint protocol\nUNCHANGED — dry-run partly exists to prove the resume machinery. A failed\nprecondition → `blocked` with the mismatch in `lastError`. Emit the\ndeliverables report with mode `dry-run`; leave the state file as the primed\nbaseline unless the user wants the slot freed (`nextTask: null`).\n",{"name":5,"triggers":54,"description":60,"allowed-tools":61},[29,55,56,57,58,59],"execute phase","drive the next phase","advance the milestone","resume the phase","dry-run the phase","Autonomous phase runner for numbered plans (docs\u002Fplans\u002F*, docs\u002Fprd\u002F*):\nscoped gates per task, full gate only at phase boundaries, checkpoint to\n.claude\u002Fstate\u002Fphase-run.json after every task so a run resumes at the\nexact next task, edit-guard.mjs against concurrent writers, explicit E2E\nservers, flaky quarantine, deliverables report at phase end. Use for\n\"execute phase X of \u003Cplan>\", \"drive the next phase\", \"phase-execute\n\u003Cplan>\", \"resume the phase\", or \"dry-run phase X\".\n",[48,62,63,64,65,66,67,68,69,70,71,72],"Read","Write","Edit","Grep","Glob","Agent","AskUserQuestion","Skill","TaskCreate","TaskUpdate","TaskList","main","e4eeaefbd56226a251b228f1beb87a293ab3140a",".claude\u002Fskills\u002Fphase-execute",1,"https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio","http:\u002F\u002Fanvilkit.aiiua.com\u002F","https:\u002F\u002Fgithub.com\u002Fancyloce","🧙‍♂️  Front-end mage with a secret back-end talent. \r\n🔮  Fluent in React, Vue, Go, and Rust.\r\n📚  Book addict and  🎵  music lover. Let's create some  ✨ magic","2026-11-01 10:38:50",{"source":8,"skillName":5,"commands":83,"prompt":93,"zipAvailable":94},[84,87,90],{"tool":85,"command":86},"npx","npx skills add ancyloce\u002Fanvilkit-studio --skill phase-execute",{"tool":88,"command":89},"bunx","bunx skills add ancyloce\u002Fanvilkit-studio --skill phase-execute",{"tool":91,"command":92},"pnpm","pnpm dlx skills add ancyloce\u002Fanvilkit-studio --skill phase-execute","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fphase-execute\u002FSKILL.md",true,[],[97,127,149,170,192,198],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":106,"publishedAt":49},"01M6JGVQAQWDRDT2CAQ2VH7D9V","react-doctor","Use when finishing a feature, fixing a bug, before committing React code, or when the user types `\u002Fdoctor`, asks to scan, triage, or clean up React diagnostics. Covers lint, accessibility, bundle size, architecture. Includes a regression check and a full local-triage workflow that fetches the canonical playbook.","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002Fpackages\u002Fruntime\u002Fcore\u002F.claude\u002Fskills\u002Freact-doctor\u002FSKILL.md",[103],{"categoryNo":104,"categoryName":105,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126],"react","doctor","react doctor","workflow","architecture","lint","code","playbook","regression","bundle size","check","use","regression check","up","clean","scan","local","feature","types","size",{"skillNo":128,"name":129,"nameZh":6,"description":130,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":131,"categories":132,"keywords":133,"publishedAt":49},"01M6JGVJ7H21GFHTJ57RBWC6C1","review-remediate","Use for the review-then-fix-everything loop on a package or diff — deliver a grounded review report immediately (no scoping questions, no plan-approval), then remediate every finding as tracked numbered items, gating each batch on typecheck\u002Flint\u002Ftest\u002Fbuild plus an independent Codex pass until clean. Trigger on \"review and fix \u003Cpackage>\", \"remediate the review\", \"review-fix-verify\", or when the user wants a deep review followed by autonomous remediation. Distinct from gstack `review` (pre-landing PR review) and `code-review` (diff only) — this reviews from scratch AND fixes to green.","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Freview-remediate\u002FSKILL.md",[],[134,135,136,137,138,41,139,140,118,141,31,121,142,143,144,145,146,32,147,148],"review","review remediate","pr review","pr","package","fix","landing","diff","green","deep","as","trigger","reviews","fixes","review report",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"publishedAt":49},"01M6JGVDZD39P3Q97XGQPTTKQN","review-fixes","Close out an EXISTING code-review findings report — one subagent per finding, each with a regression test — then regenerate EN\u002Fzh\u002Fja\u002Fko docs, run all gates, and verify no stale or unexported symbols remain. Trigger on \"\u002Freview-fixes\", \"fix all N review findings\", \"close the review findings\", or when the user hands over a findings report to remediate. Distinct from review-remediate, which produces the review itself first — this skill starts from a report that already exists.","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Freview-fixes\u002FSKILL.md",[],[134,147,156,157,113,158,159,160,161,115,139,162,163,164,165,145,166,167,168,169],"review fixes","test","code-review","first","verify","subagent","regression test","en","zh","gates","with","review findings","which","Existing",{"skillNo":171,"name":172,"nameZh":6,"description":173,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":174,"categories":175,"keywords":176,"publishedAt":49},"01M6JGV8J3ZRFGCXR2W3Q9ZWYK","release-prep","Pre-release verification + go\u002Fno-go checklist for publishing @anvilkit packages. Detects the release surface (main workspace fixed-group vs components submodule), runs changeset status and the check:all release gates, enforces this repo's publish gotchas (version.ts drift, ui peer ranges, never-publish canvas-templates, bundle\u002Fapi-snapshot), then hands the exact publish command to the user. Use when asked to \"prep a release\", \"check release readiness\", \"\u002Frelease-prep\", or before cutting a version. Does NOT commit or publish.","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Frelease-prep\u002FSKILL.md",[],[177,178,179,180,181,182,183,48,184,185,118,186,187,188,189,73,190,165,191,32],"release","prep","release prep","canvas","components","commit","api","changeset","repo","version","never","publishing","peer","drift","true",{"skillNo":193,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":194,"categories":195,"keywords":197,"publishedAt":49},"01M6JGV33MBTTHMZ1SNJZHAA6H","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Freact-doctor\u002FSKILL.md",[196],{"categoryNo":104,"categoryName":105,"taxonomyType":21,"taxonomyTypeDesc":22},[107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126],{"skillNo":199,"name":200,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":201,"categories":202,"keywords":206,"publishedAt":49},"01M6JGV1KQAFYH6ZQ864ZBCVVH","pre-refactor","https:\u002F\u002Fgithub.com\u002Fancyloce\u002Fanvilkit-studio\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpre-refactor\u002FSKILL.md",[203],{"categoryNo":204,"categoryName":205,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000007","代码审查",[207,208],"refactor","pre refactor"]