[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6J42R2CADWDKN5P21FQRXNJ":3,"skill-same:01M6J42R2CADWDKN5P21FQRXNJ":114},{"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":26,"publishedAt":48,"linkOnly":49,"markdownContent":50,"markdownBody":51,"frontMatter":52,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":14,"repositoryHtmlUrl":58,"repositoryHomepageUrl":6,"ownerHtmlUrl":59,"ownerBlogUrl":6,"ownerDescription":60,"updatedAt":61,"install":62,"resources":75},"01M6J42R2CADWDKN5P21FQRXNJ","cycle",null,"End-to-end feature cycle orchestrator. Runs the full skill chain in\nsequence: \u002Fplan → \u002Faudit-plan → (wait for human implementation) →\n\u002Faudit-code → \u002Fpersona-test (if frontend\u002Ffull-stack) → \u002Fux-lock (if\nfixes shipped) → \u002Fship. Use when starting a new feature or non-trivial\nfix and you want the whole workflow on autopilot. Supports resuming from\nan existing plan or straight to code-audit, per-step skips, max-round\npass-through, an opt-in autonomous mode that implements + audits each\nplan cluster (the default still pauses for the human), and a remediate\nmode that fixes triaged persona-test\u002Faudit findings against an accepted\nplan with a focused audit and a rerun of only the affected journeys.\nTriggers on: \"run the full cycle\", \"do the whole flow\", \"plan + audit\n+ ship\", \"feature cycle\", \"remediate the persona findings\", \"\u002Fcycle\".\nFull command syntax: see the Usage section in this skill.","Lbstrydom\u002Fclaude-engineering-skills","Lbstrydom","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F77991486?v=4","01M6J3X4N2T0FTZT1RKFXDVS0K","Louis Strydom","01M6J3X4SXV0BXWDMXPW90D8BK",0,"MIT","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002FSKILL.md",[18,23],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发","SCENARIO","使用场景",{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[5,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],"default","new","when","lock","mode","affected","you","chain","end","preview","frontend","only","fix","autonomous","stack","wait for","plan","Bash","persona","code","workflow","2026-11-10 10:12:30",false,"---\nname: cycle\ndescription: |\n  End-to-end feature cycle orchestrator. Runs the full skill chain in\n  sequence: \u002Fplan → \u002Faudit-plan → (wait for human implementation) →\n  \u002Faudit-code → \u002Fpersona-test (if frontend\u002Ffull-stack) → \u002Fux-lock (if\n  fixes shipped) → \u002Fship. Use when starting a new feature or non-trivial\n  fix and you want the whole workflow on autopilot. Supports resuming from\n  an existing plan or straight to code-audit, per-step skips, max-round\n  pass-through, an opt-in autonomous mode that implements + audits each\n  plan cluster (the default still pauses for the human), and a remediate\n  mode that fixes triaged persona-test\u002Faudit findings against an accepted\n  plan with a focused audit and a rerun of only the affected journeys.\n  Triggers on: \"run the full cycle\", \"do the whole flow\", \"plan + audit\n  + ship\", \"feature cycle\", \"remediate the persona findings\", \"\u002Fcycle\".\n  Full command syntax: see the Usage section in this skill.\nallowed-tools: Bash(node scripts\u002Fcross-skill.mjs preview-gate --format human)\n---\n\n> **Worktree preflight** — in a linked git worktree the synced tooling tree\n> `scripts\u002F.claude-skills\u002F` is absent — it is gitignored, so `git worktree add`\n> does not populate it, and every command below that uses it dies on a bare\n> `MODULE_NOT_FOUND`. Run `npm run skills:hydrate` first. If this repo defines\n> no such script, `references\u002Fworktree-preflight.md` holds the entry to add — ask\n> the user first, since it edits their `package.json`.\n\n## Usage\n\n```\nUsage: \u002Fcycle \u003Ctask-description>          — Full chain from scratch\nUsage: \u002Fcycle plan \u003Cplan-file>            — Skip \u002Fplan only; still audits the plan, then the implementation gate\nUsage: \u002Fcycle code \u003Cplan-file>            — Skip to code-audit-then-ship (plan accepted, code written)\nUsage: \u002Fcycle remediate \u003Cplan-file> --from persona-test \u003Creport.md> [--persona-url \u003Curl>]  — Fix triaged P0\u002FP1s against an accepted plan; focused audit; rerun affected journeys only\nUsage: \u002Fcycle remediate \u003Cplan-file> --from audit \u003Cresult.json>   — Same, sourcing HIGH findings from an audit result\nUsage: \u002Fcycle \u003Cplan-file> --no-persona    — Skip persona-test step\nUsage: \u002Fcycle \u003Cplan-file> --persona-url \u003Curl> — Explicit persona-test target (local dev server, no PERSONA_TEST_APP_URL needed)\nUsage: \u002Fcycle \u003Cplan-file> --no-uxlock     — Skip ux-lock step (no UI changes)\nUsage: \u002Fcycle \u003Cplan-file> --no-ship       — Stop after audit; don't commit or push\nUsage: \u002Fcycle \u003Cplan-file> --max-rounds N  — Pass through to \u002Faudit-plan and \u002Faudit-code\nUsage: \u002Fcycle --autonomous \u003Cplan-file>    — Opt-in: autonomously implement + audit each §11 cluster (default still pauses for the human; Step 7\u002Fship is NEVER autonomous — see Step 7)\nUsage: \u002Fcycle code \u003Cplan-file> --cluster \u003CID> [--baseline-ref \u003Csha>]  — Resume one declared cluster (human clustered path)\nUsage: \u002Fcycle --autonomous \u003Cplan-file> --authorize-stale-reaudit      — Resume a halted autonomous run; re-process stale clusters\n```\n\n# Feature Cycle Orchestrator\n\n> **This skill's last line is an end marker naming the skill between em-dashes, after\n> the Reference files table.** If that last line is not in your context (context\n> compaction keeps only the start of a skill), re-read\n> `.claude\u002Fskills\u002Fcycle\u002FSKILL.md` in full before continuing — the later steps still apply.\n\nChains the existing atomic skills into one workflow so you don't have to\nremember which to invoke when. Each step is a delegation to the\nunderlying skill — this orchestrator just sequences + waits.\n\n**This skill does NOT duplicate logic from the atomic skills**. If you\nwant fine control over a single step, invoke that step's skill directly\n(`\u002Faudit-code`, `\u002Faudit-plan`, etc.). Use `\u002Fcycle` when you want the\ngolden-path workflow without thinking about it.\n\n\u003C!-- host-contract: no-dispatch; preserves=step-order,step3-pause,skip-flags,blocked-propagation -->\n\n> **On a host with no skill-to-skill dispatch, delegate INLINE.** Claude Code\n> can invoke `\u002Faudit-code` as a command; VS Code Copilot reads the same\n> `.claude\u002Fskills\u002F` tree but has no documented mechanism for one skill to\n> invoke another. Where a step below says \"invoke `\u002Fx`\", such a host instead\n> **opens `.claude\u002Fskills\u002Fx\u002FSKILL.md` and follows it in place**, then returns here and\n> continues with the next step.\n>\n> **Pass the delegated skill its arguments explicitly** — the plan path, the\n> sub-command, the flags. `\u002Fcycle` already holds those values, so this is\n> orchestrator-supplied input (rule 0 of `references\u002Finput-acquisition.md`),\n> not inference — omitting them deadlocks an inline cycle\n> (→ `references\u002Forchestration-rationale.md` §No-dispatch — read when the reason is questioned).\n>\n> **Four invariants survive the fallback, and a run that breaks one is not a\n> `\u002Fcycle` run:**\n>\n> 1. **Step order** — the sequence below is unchanged; inlining is a change of\n>    mechanism, never of order.\n> 2. **The Step 3 pause** — a default (non-`--autonomous`) cycle still stops at\n>    the implementation gate. Inlining must not silently turn a paused cycle\n>    into an autonomous one.\n> 3. **Skip flags** — `--no-persona`, `--no-uxlock`, `--no-ship` are honoured\n>    identically.\n> 4. **Blocked propagation** — a `[BLOCKED]`, `AUDIT_NOT_RUN` or non-converged\n>    result from an inlined skill reaches the Step 8 summary. It must not be\n>    swallowed by the skill that ran inline.\n>\n> **What inlining is NOT**: it is not a subagent and gets no fresh context, so\n> a long inlined skill consumes the parent conversation's budget. Say which\n> steps ran inline in the Step 8 summary, so a reader can tell a dispatched run\n> from an inlined one rather than assuming.\n\n---\n\n## Step 0 — Parse Input\n\n> **A prerequisite that does not resolve is a stop, not a mid-flow death.**\n> \u002Fcycle spends real money on \u002Fplan before it ever reaches an audit step, so\n> resolve the audit prerequisites HERE — the helper scripts, and a GPT route\n> (`OPENAI_API_KEY` **or** an active Azure profile). If one is absent, the\n> ladder in `references\u002Fprerequisite-ladder.md` (the one \u002Faudit-code follows) decides what\n> happens: hydrate and retry, run the labelled adversarial-agent substitute, or\n> report `AUDIT_NOT_RUN` and stop. Whichever rung applies, say so before\n> generating the plan rather than after paying for it, and carry the same\n> `AUDIT_DEGRADED` \u002F `AUDIT_NOT_RUN` label into Step 6's handoff to \u002Fship so a\n> degraded run cannot reach a commit looking clean.\n\n| Input shape | Mode |\n|---|---|\n| `\u002Fcycle \u003Ctask description>` (no file path) | **FULL** — generate plan, audit it, wait for impl, audit code, ship |\n| `\u002Fcycle plan \u003Cplan-file>` | **SKIP_PLAN** — plan exists; skip Step 1 only. Audit it (Step 2), then the Step 3 implementation gate (pause, or implement under `--autonomous`), audit code, ship |\n| `\u002Fcycle code \u003Cplan-file>` | **SKIP_TO_CODE** — plan accepted + impl exist; skip Steps 1–3; audit code, validate UX, ship |\n| `\u002Fcycle remediate \u003Cplan-file> --from \u003Cpersona-test\\|audit> \u003Creport>` | **REMEDIATE** — plan accepted; skip Steps 1–2; triage the report, focused fixes, focused audit, rerun affected journeys, ship — see Step R |\n| `\u002Fcycle \u003Cplan-file>` (no `plan`\u002F`code` keyword) | **AUTO** — detect by checking if any new code exists since plan was written |\n\n**`\u002Faudit-plan` is never skipped by inference.** Only the explicit `code` or\n`remediate` keyword skips it — typing it is the operator's declaration that the\nplan is accepted. `\u002Fcycle` does not auto-detect \"already accepted and unchanged\"\n(no record identifies the approved plan *content*) → `references\u002Fremediate-mode.md`\n§\"The accepted-plan skip\" — read when asked to skip \u002Faudit-plan by inference.\n\nOptional flags:\n- `--no-persona` — skip \u002Fpersona-test (use when no live URL or backend-only)\n- `--persona-url \u003Curl>` — explicit persona-test target. Use this for a repo that\n  only sets `PERSONA_TEST_APP_URL` for CI\u002FPR-preview but runs a normal local dev\n  server otherwise (Step 5 would silently skip without it — see Step 5).\n- `--no-uxlock` — skip \u002Fux-lock (use when no UI changes shipped)\n- `--no-ship` — stop after audit; don't commit or push\n- `--max-rounds N` — pass through to \u002Faudit-plan and \u002Faudit-code\n- `--autonomous` (alias `--implement`) — **opt-in**: autonomously implement + audit each §11 cluster, or the whole plan as one unit when it has no §11 block (Step 3 table). **It does not complete Step 7** — a fully autonomous run still stops at the Step 7 blocked-handoff card; only the human's `\u002Fship` completes it.\n- `--cluster \u003CID>` — implement\u002Faudit a single declared cluster (human resume path).\n- `--baseline-ref \u003Csha>` — audit baseline for a resume where no `clusterStartRef` was captured (work already committed).\n- `--authorize-stale-reaudit` — resume a halted autonomous run by re-processing exactly the `stale` clusters.\n- `--no-cluster` — ignore any §11 block; fall back to the single-audit path.\n- `--from persona-test \u003Creport.md>` | `--from audit \u003Cresult.json>` — REMEDIATE only, required: the findings source. `--include-p2` widens the persona triage to P2.\n\n**§11 detection**: parse the target plan for an `## 11. Execution Clustering`\nblock. If present (and not `--no-cluster`), set `hasClustering` and parse\nthe clusters + each cluster's derived file scope. This activates the\nclustered-execution path (Step 0.7 preflight + Step 3 branch). Absent → the\nclassic linear flow below, unchanged.\n\nShow kickoff card:\n\n```\n═══════════════════════════════════════\n  \u002Fcycle — [MODE]\n  Steps: plan → audit-plan → audit-code → persona-test → ux-lock → ship\n  Skipped: --no-persona, --no-uxlock\n═══════════════════════════════════════\n```\n\n(REMEDIATE's card reads `Steps: triage → fix → focused audit-code → rerun journeys → ux-lock → ship`\nand `Skipped: plan, audit-plan (plan declared accepted by the remediate keyword)`.)\n\n---\n\n## Step 0.5 — Cross-plan coordination check (nudge, not a gate)\n\nWhenever a target plan file already exists (`SKIP_PLAN`\u002F`SKIP_TO_CODE`\u002F`REMEDIATE`\u002F`AUTO`\nmodes — anything but a fresh FULL run, where the plan doesn't exist yet), run\nit before implementation or shipping proceeds:\n\n```bash\nnode scripts\u002Fcheck-plan-status.mjs --check-deps \"$PLAN\"\n```\n\nThis reads the plan's own `- **Depends on**: \u003Cpath>` lines (plan\u002FSKILL.md\nPhase 7) — the structured form of a \"wait for Cluster X to land first\"\ncoordination note — against each referenced plan's current `Status:` line.\nExit is always 0 and the output goes to stderr only, so it never blocks the\nrun; a printed `unmet` line means a declared ordering dependency has not\nlanded yet. **Read it and decide by hand** whether to proceed, hold, or\nsequence with whoever owns the other plan — this only makes the note visible,\nit cannot know whether proceeding anyway is actually safe.\n→ `references\u002Forchestration-rationale.md` §Step 0.5 — read when the check's purpose is questioned.\n\n---\n\n## Step 0.7 — Clustering preflight (when `hasClustering`; fail-closed)\n\nValidate the §11 block **before any execution** — `\u002Fcycle code \u003Cplan>`\nreaches here without having passed `\u002Faudit-plan`, so this is the\nexecution-time safety net (the second of two validation layers). Check:\n\n- **partition** — every §7b implementation phase in exactly one cluster; none omitted\u002Fduplicated; close-out outside the phase set;\n- **contiguous** ascending cluster ranges (grammar rule 1);\n- every `fix-gate` value in `{yes, final, none}`; `Coupling:` present on each cluster;\n- trailing `Final gate` line present;\n- **derived scope** (member `Files:` + tagged `Additional files:`) is non-empty and fully intent-tagged, validated **per cluster against that cluster's `gateStatus`** in the state record, NOT the global `\u002Fcycle` mode: a `pending`\u002Fabsent cluster uses pre-implementation expectations (`(modify)`\u002F`(delete)` resolve on disk; `(create)` has a resolvable parent dir, no collision, no sensitive-path); an `audited`\u002F`gate-clear`\u002F`stale` cluster uses post-implementation expectations (`(create)`\u002F`(delete)` already done — no false collision on resume).\n\n**On any failure**: stop, present the defect, offer (1) correct the plan or\n(2) `--no-cluster` fallback to the single-audit path. Never silently\nproceed with a malformed block.\n\n---\n\n## Step 1 — Plan (FULL mode only)\n\nInvoke `\u002Fplan \u003Ctask description>`. The unified `\u002Fplan` skill auto-detects\nscope (backend \u002F frontend \u002F full-stack) and produces one consolidated\nplan document at `docs\u002Fplans\u002F\u003Cdescriptive-name>.md`.\n\n**On failure**: surface the error and abort. Don't proceed to audit.\n\n---\n\n## Step 2 — Audit Plan\n\nInvoke `\u002Faudit-plan \u003Cplan-file>`. Iteratively refines the plan with\nGPT + Gemini final gate. Max 3 rounds; rigor-pressure stop.\n\n**On verdict**:\n- `APPROVE` (Gemini) → proceed to Step 3\n- `CONCERNS` after Gemini round 2 (cap) → present to user, ask: \"Plan has remaining concerns from final review. Proceed to implementation anyway, fix the plan first, or stop?\"\n- `REJECT` → present to user, recommend stopping the cycle to revise\n\n---\n\n## Step 3 — Implementation gate (branches on mode)\n\n**Decision table (one source of truth — the bullets below elaborate).** The gate is a\npure function of three inputs: the parsed mode, whether the plan carries a §11 block\n(`hasClustering`), and the `--autonomous` flag. Only `SKIP_TO_CODE` means the human\nalready implemented, so only it bypasses the gate (straight to Step 4 audit).\n`SKIP_PLAN` skips Step 1 alone — its plan has been audited in Step 2 but not\nimplemented, so it meets this gate exactly like FULL. `REMEDIATE` never reaches\nthis step; its own remediation gate is Step R.\n\n| Mode | `hasClustering` | `--autonomous` | Action |\n|---|---|---|---|\n| FULL \u002F SKIP_PLAN (plan generated\u002Faudited, not yet implemented) | no | no | **Pause** for the human (card below) |\n| FULL \u002F SKIP_PLAN | no | **yes** | **Degenerate single-cluster autonomous** (whole plan as one unit) |\n| FULL \u002F SKIP_PLAN | yes | no | **Pause** + print cluster guidance; resume `--cluster \u003CID>` |\n| FULL \u002F SKIP_PLAN | yes | **yes** | **Step 3C** clustered autonomous loop |\n| SKIP_TO_CODE (already implemented) | any | any | **Empty-diff guard first** (below); then **no gate** — go to Step 4 audit (per-cluster if `--cluster`, else union diff) |\n\n- **No §11 block + default (no `--autonomous`)** → `\u002Fcycle` **pauses here** for\n  the human to implement; output the \"paused at implementation gate\" card below.\n- **No §11 block + `--autonomous`** → **degenerate single-cluster autonomous path**\n  (do NOT silently fall back to the pause — that contradicts the explicit\n  `--autonomous`). A plan below the §7b Gate-1 \u002F §11 threshold is small + cohesive by\n  construction, so treat its **entire** implementation as ONE implicit cluster and run\n  the Step 3C loop over it: implement → `\u002Faudit-code` over the **union diff** →\n  fix-gate to convergence → the **mandatory** consolidated Gemini gate (Step 3C.2) →\n  close-out → ship. Print one line up front so it's never silent:\n  `plan below the §11 threshold — implementing inline as a single unit (no clustering).`\n  The same within-cluster auto-fix authorization applies; a fix needing files outside\n  the plan's declared `§7`\u002F`§7b` scope still **stops** for confirmation.\n- **§11 block + default (no `--autonomous`)** → still pauses, but prints the\n  cluster plan as implementation guidance and instructs the operator to\n  **implement only the next cluster**, then resume with `\u002Fcycle code \u003Cplan>\n  --cluster \u003CID>` (the `--cluster` arg is **required** on every human resume\n  — `\u002Fcycle` does not auto-divine the next cluster). On resume, Step 4 runs\n  the **per-cluster** audit (see Step 3C). If the operator implemented\n  several clusters at once (per-cluster isolation impossible), `\u002Fcycle` says\n  so and falls back to a single union-diff audit.\n- **§11 block + `--autonomous`** → enter **Step 3C** (the implement-and-audit\n  cluster loop). This is the explicit authorization that relaxes the\n  \"never auto-fix\" hard rule, scoped to within-cluster fixes.\n- **SKIP_TO_CODE empty-implementation guard (do this BEFORE auditing).**\n  `code` assumes the human already implemented — but an *approved-but-unimplemented*\n  plan (e.g. resumed straight after `\u002Faudit-plan`, zero commits since) yields an\n  **empty implementation diff**, and auditing nothing returns a misleading green.\n  So before Step 4, compute the diff base (the plan's commit, or `--baseline-ref`,\n  else the dirty-aware base `\u002Faudit-code` uses) and check it's non-empty.\n  **POSIX shell only** (Git Bash on Windows), not PowerShell:\n  ```bash\n  BASE=$([ -n \"$(git status --porcelain)\" ] && echo HEAD || echo HEAD~1)   # or the plan commit \u002F --baseline-ref\n  [ -z \"$(git diff \"$BASE\" --name-only)$(git ls-files --others --exclude-standard)\" ] && echo EMPTY\n  ```\n  If empty → **do NOT audit a no-op.** Tell the operator the plan looks\n  unimplemented and offer the fork, naming the EXACT command for each side\n  (adding `--autonomous` to a `code` run does nothing): (1) re-run as\n  `\u002Fcycle plan \u003Cplan-file> --autonomous` (let `\u002Fcycle` implement it), or\n  (2) implement manually then re-run `\u002Fcycle code \u003Cplan-file>` unchanged.\n  → `references\u002Forchestration-rationale.md` §Step 3 — read when the guard or the fork is questioned.\n\n```\n═══════════════════════════════════════\n  \u002Fcycle paused at implementation gate\n  Plan: docs\u002Fplans\u002F\u003Cname>.md\n  Resume with: \u002Fcycle code docs\u002Fplans\u002F\u003Cname>.md\n═══════════════════════════════════════\n```\n\n---\n\n## Step 3C — Clustered execution (when `hasClustering`)\n\n### Cluster execution state — `.audit\u002Fcycle-cluster-state.json`\n\nDurable, gitignored, lock-guarded (lock-acquire failure → stop, no racy\noverwrite); one record per cluster with `gateStatus: pending|audited|gate-clear|stale`.\nA `gate-clear` cluster flips to **`stale`** if any `derivedScope` file hash or its\n`scopeHash` changes. → `references\u002Fclustered-execution.md` §Cluster execution\nstate — read before the first read or write of this file in a session.\n\n### Loop (autonomous)\n\nState-driven + resumable: read state first, **skip `gate-clear` clusters**.\nFor each remaining cluster in declared order:\n\n1. **Implement** the cluster's member-file phases.\n2. **Budget**: no runtime splitting in v1 — invoke `\u002Faudit-code` on the cluster's derived scope and let its internal map-reduce handle large diffs. `\u002Fcycle` only enforces **never merge** across a declared boundary.\n   - **Optional author-tier observation** (telemetry only; it does NOT change which model runs) → `references\u002Fclustered-execution.md` §Optional author-tier — read when the cluster carries an `author-tier:` hint.\n3. **Audit envelope**: capture `clusterStartRef` (`vcs.gitCommitSha`) when implementation begins, write the cluster's derived scope one-path-per-line to a scope file, then run the two commands below. On a resume with no recorded `clusterStartRef`, require `--baseline-ref \u003Csha>` or fall back to union-diff — **never** default the base to HEAD (empty diff = silent skip). Round policy is `\u002Faudit-code`'s own cap — no new policy here.\n\n   > **`--files` is the ONLY flag that scopes the audit.** `--changed` is the R2+\n   > impact set for reopen detection and `--diff` is hunk evidence; neither\n   > bounds what the model reads. Do NOT hand-compute the change set or\n   > hand-apply the admission rules: `cycle-cluster-scope.mjs` does that in code.\n   > → `references\u002Fclustered-execution.md` §Why `--files` — read when the scope flags are questioned.\n\n\u003C!-- cycle:cluster-audit-command -->\n```bash\n# 1. Deterministic half, in code. Resolves the base to an immutable OID, builds\n#    the reconciliation set (status-aware: deletes and BOTH rename operands),\n#    filters to on-disk paths for the allowlist, runs the admission pre-flight,\n#    writes the patch. EXITS NON-ZERO on an out-of-scope edit, an unadmittable\n#    path, or a comma-unsafe path — when it does, STOP and show its stderr.\nnode scripts\u002Fcycle-cluster-scope.mjs --base \"$CLUSTER_START\" --scope-file \"$SCOPE_FILE\" --out-dir .audit --cluster \"$ID\" --json > \"$SCOPE_JSON\"\n\n# 2. Audit using ONLY values that call produced. Read them with node, not jq —\n#    node is guaranteed here; jq is not, and is absent from check-deps.mjs.\nFILES=$(node -p \"require('.\u002F$SCOPE_JSON').filesCsv\")\nPATCH=$(node -p \"require('.\u002F$SCOPE_JSON').diffPath\")\nINFRA=$(node -p \"require('.\u002F$SCOPE_JSON').allowInfraScopeRequired ? '--allow-infra-scope' : ''\")\n\nnode scripts\u002Fopenai-audit.mjs code \"$PLAN\" --scope diff --files \"$FILES\" --changed \"$FILES\" --diff \"$PATCH\" $INFRA\n#   --files   : THE scoping flag — an allowlist; makes --scope a no-op\n#   --changed : R2+ reopen\u002Fimpact detection only — does NOT scope\n#   --diff    : hunk evidence — centres every round's read windows on the change\n#               (R2+ also annotates); does NOT scope; must be a real file\n```\n\u003C!-- \u002Fcycle:cluster-audit-command -->\n\n   The script returns two sets (reconciliation set vs on-disk allowlist) — use\n   them as returned → `references\u002Fclustered-execution.md` §Two sets — read when they look inconsistent.\n\n   **A deletion-only cluster has an empty allowlist** and reports\n   `emptyAllowlist: true`. That is correct — there is no code to read. Route it\n   to the consolidated Gemini gate over the union diff, where the deletion IS\n   visible; do not record a vacuous per-cluster pass.\n4. **Fix-gate**: `fix-gate: yes` → reach `\u002Faudit-code` convergence (`HIGH==0 && MEDIUM\u003C=2 && quickFix==0`) **over this cluster's IN-CLUSTER findings** (see 4a) before the next cluster; `none` skips; `final` defers to the consolidated gate. Within-cluster fixing is authorized; a fix needing files **outside** the cluster's scope → **stop** for confirmation (mark any touched `gate-clear` cluster `stale`). Persistent non-convergence → hand back with a summary.\n   - **3a. `clusterStartRef` is validated ON USE, not just captured.** Run\n     `git merge-base --is-ancestor \u003CclusterStartRef> HEAD` before it becomes a\n     diff base. On a non-ancestor (a concurrent session moved HEAD),\n     halt and report rather than demoting to the\n     dirty-aware default, which would quietly widen the range you asked for.\n     → `references\u002Fclustered-execution.md` §3a — read when the base check is questioned.\n   - **4a. The gate scores IN-CLUSTER findings only — otherwise no cluster but the last can ever pass** (→ `references\u002Fclustered-execution.md` §4a — read when in-cluster scoring is challenged). Classify every finding by the cluster owning its cited file — the derived scopes are already computed, so this is mechanical, not a judgement call:\n\n     | Cited file is in… | Class | Effect on THIS gate |\n     |---|---|---|\n     | this cluster's derived scope | `in-cluster` | **gates** — fix it, pre-existing or not |\n     | a **later** cluster's derived scope | `deferred-declared` | does not gate; **must be zero at the final gate** |\n     | an **earlier** cluster's derived scope | `regression` | **gates** — that cluster is now `stale`; go to step 5 |\n     | **no** cluster's derived scope | `out-of-scope` | unchanged: fail closed per step 3 |\n\n     Three properties stop this becoming an escape hatch, and all three are load-bearing: **(1)** deferral is *bounded* — `deferred-declared` means \"owned by a LATER cluster\", and the final cluster has none, so the bucket is empty there by construction and every deferred completeness finding must be satisfied before Step 3C.2; **(2)** *\"pre-existing\" is still not a defer reason* — these buckets are about plan SCHEDULE, never authorship, so AGENTS.md's impact test applies unchanged to anything in-cluster; **(3)** the classification is *derived*, never argued — a finding cannot be talked into a friendlier bucket. **Every `deferred-declared` finding is listed in the cluster's hand-back summary with the cluster that owns it** — a deferral nobody can see is indistinguishable from a dismissal.\n   - **Convergence test scope — run the BROADEST suite, not unit-only (load-bearing for destructive clusters).** When \"iterate to green\" runs the project's tests at the cluster boundary, use the widest command the repo defines (`test:all` \u002F `test:integration` \u002F `test:e2e` — fall back to plain `test` \u002F the full `node --test`), **never `test:unit` alone** (→ `references\u002Fclustered-execution.md` §Why the broadest test suite — read when a unit-only green is proposed). A cluster is \"green\" only when the integration tier passes; a `test:unit`-only green on a destructive cluster is a false-green and does **not** clear the fix-gate.\n4.5. **Finalize outcomes (deterministic capture — WS1)**: once the cluster's audit has converged AND its findings are triaged (the adjudication ledger carries terminal `accepted`\u002F`dismissed`\u002F`severity_adjusted` outcomes), call **once** per converged audit:\n   ```bash\n   node scripts\u002Fcross-skill.mjs finalize-outcomes --run-id \"$CLOUD_RUN_ID\" --ledger \"$FINAL_LEDGER_JSON\" --result \"$FINAL_ROUND_RESULT_JSON\"\n   ```\n   The `run-id` is the audit's `_cloudRunId` (on the `--out` JSON); → `references\u002Fclustered-execution.md` §4.5 — read when asked what it captures. Cloud-off → it no-ops with a hint; an unknown run-id is a hard error. Skip only when the audit produced no cloud run (cloud off).\n5. **After the loop**: if any `gate-clear` cluster went `stale`, **halt + summarize**; resume only with `--authorize-stale-reaudit`, which re-processes exactly the stale clusters (their out-of-scope reconciliation ignores files owned by *other* clusters, since later clusters legitimately committed since the old baseline). No autonomous loop-back.\n\n### Step 3C.1 — Close-out execution (autonomous)\n\nThe loop only iterates §7b phases, so the plan's unclustered close-out\n(e.g. `npm run skills:regenerate` + `npm run skills:check`, build\u002Fcodegen)\nwould never run. After the last cluster clears and **before** the\nconsolidated gate, parse and execute the plan's close-out step(s),\nsurfacing failures. (Human path leaves close-out to the operator.)\n\n### Step 3C.2 — Consolidated Gemini gate (closed loop, mandatory)\n\n**First, the deferrals come due.** Step 4a lets a cluster defer a finding that\nbelongs to a *later* cluster; this is where that debt is settled, because there\nis no later cluster left. Before invoking the reviewer, re-check every\n`deferred-declared` finding accumulated across the run: each must now be\nsatisfied (the file exists, the migration ran, the phase landed). **Any that\nremain are the plan's own §7b work, unimplemented** — halt and summarize rather\nthan asking Gemini to bless an incomplete change set. This check is what makes\n4a a deferral instead of a dismissal, so it is not optional and not\nGemini's job.\n\nAfter all clusters (+ close-out), run **one** Gemini review over the\n**union diff** — mandatory regardless of per-cluster GPT convergence, and a\n**closed loop** driven by the result's code-computed `gateDisposition` (not the\nverdict word): `approve` → done; `approve_with_debt` → done, capture the\nnon-blocking findings with `node scripts\u002Fdebt-auto-capture.mjs --final-review .audit\u002F$SID-gemini-result.json`;\n`blocked` → deliberate, apply fixes scoped to the union diff (the per-cluster\nout-of-scope stop does NOT apply here — no active cluster; touched `gate-clear`\nclusters are flagged `stale` for the next run), **re-run as round 2** with\n`--round 2 --prior .audit\u002F$SID-gemini-result.json` (the round-1 `--out`).\n**Max 2 consolidated rounds — a hard cap enforced by `gemini-review.mjs`,\nwhich refuses `--round 3`.** A round-2\n`blocked` is handed back to the user with its named blocking items (a concrete\n**design\u002Fcorrectness** defect: fix it, then escalate — see `gemini-gate.md`);\n**implementation-completeness** nits (\"specify the store step\", parameter\nplacement) are non-blocking by definition and close as debt, since the classic\n`\u002Faudit-code` path (Step 4) already verified the code against the real\nimplementation. Exit on `approve`\u002F`approve_with_debt`, the capped stop, or\nexplicit handback. Never replaced by GPT rebuttal.\n\n**Between consolidated rounds, apply `gemini-gate.md`'s Step 7.1 deliberation\nprotocol exactly — this closed loop is the SAME one, not a second one.** For\neach `CONCERNS`\u002F`REJECT` finding decide ACCEPT \u002F PARTIAL \u002F CHALLENGE (a\nCHALLENGE must cite evidence); fix the accepted findings; then **rebuild the\ntranscript before re-running Gemini**, passing `--summary` describing what\nround 1 decided per finding — fixed, or challenged-and-why; without it round 2\nre-raises the same findings. → `references\u002Fclustered-execution.md` §3C.2 round 2 — read when round 2 repeats round 1.\n\nInvocation: build the\ntranscript the way `\u002Faudit-code` does (`changed_files`=union file set,\naccumulated per-cluster findings as the `rounds[]` trail), then\n`node scripts\u002Fgemini-review.mjs review \u003Ctarget> \u003Ctranscript.json> --out …` —\nreuse `\u002Faudit-code`'s transcript path, no new gate machinery. **Pass one\n`--ledger \u003Cpath>` per cluster** (`.audit\u002F$CLUSTER_SID-ledger.json` each) —\n`build-audit-transcript.mjs`'s `--ledger` flag is repeatable (mirroring\n`--result`); one ledger alone drops the other clusters' resolutions\n(→ `references\u002Fclustered-execution.md` §3C.2 one `--ledger` — read when a cluster's resolutions are missing). **Concrete transcript\nshape + the no-`GEMINI_API_KEY` degradation ladder (Opus fallback → independent\nadversarial agent over the union diff → only-then skip) are in\n`references\u002Fgemini-gate.md`** (the same contract \u002Faudit-code's Step 7 follows) — when no provider key is present, run the\nindependent-agent substitute rather than skipping the mandatory gate. Generated\n`.claude\u002Fskills\u002F**` copies are byte-verified by `skills:check`, not\nre-reviewed. Then continue to Step 5 (Step 7 still ends even a fully autonomous run in the blocked handoff).\n\n---\n\n## Step R — Remediation (REMEDIATE mode only)\n\nFor narrow defects found **after** a ship, against a plan already accepted:\nreplaying the whole chain re-plans, re-audits the plan and audits the whole\ndirty tree. REMEDIATE runs instead, in order, and nothing else:\n\n1. **R1** load the governing plan — no `\u002Fplan`, no `\u002Faudit-plan`; Step 0.5 still runs.\n2. **R2** triage the `--from` report into a fix list (persona **P0\u002FP1**, or audit\n   **HIGH**, by default) and record it in the plan's `## Implementation Log`.\n3. **R3** implement — **pauses for the human by default**; implements only\n   under `--autonomous`. Capture the base before the first edit.\n4. **R4** focused `\u002Faudit-code` — `--files` pinned to the fix files + the plan\n   via `scripts\u002Fcycle-cluster-scope.mjs`, which exits non-zero on any edit outside\n   that set. Never a whole-dirty-tree diff. **Caps unchanged**: 6 audit rounds,\n   2 final-review rounds.\n5. **R5** rerun **only** the affected persona journey(s), exercising the stateful\n   lifecycle (act → reload → verify persisted → follow-on action → verify).\n6. **R6** update the plan's log with per-finding outcomes, Step 6 `\u002Fux-lock`,\n   then Step 7's blocked `\u002Fship` handoff — never autonomous.\n\nThe commands, triage table, resume card, rerun verdicts and summary card are in\n`references\u002Fremediate-mode.md` — read it before R2.\n\n---\n\n## Step 4 — Audit Code (classic path — no §11 block)\n\nInvoke `\u002Faudit-code \u003Cplan-file>` (default `--scope=diff`). Multi-pass\nparallel GPT audit with R2+ ledger suppression and Gemini final\nreview. Max 6 rounds; quality threshold `HIGH==0 && MEDIUM\u003C=2 && quickFix==0`.\n\n**On verdict**:\n- `CONVERGED` → proceed to Step 5\n- `INCOMPLETE` (passes timed out) → present to user, offer: continue with partial \u002F re-run with higher timeout \u002F stop\n- Persistent HIGH findings after R6 → present to user with finding list, recommend fix-then-retry rather than ship\n\nSolo author-model control needs no `\u002Fcycle` action → `references\u002Forchestration-rationale.md`\n§Step 4 — read when asked whether \u002Fcycle triggers it.\n\n---\n\n## Step 5 — Persona Test (if scope ⊇ frontend, AND not --no-persona)\n\nDetect whether persona-test is applicable:\n- Skip if plan scope is `backend` only\n- Skip if `--no-persona` flag passed\n- Resolve the target URL in the same order `\u002Fpersona-test` itself uses\n  (Phase 0b): `--persona-url` flag → `PERSONA_TEST_APP_URL` env → (in\n  `--autonomous` mode, where there's no human to ask) a running local dev\n  server if one is detectable, else skip (→ `references\u002Forchestration-rationale.md`\n  §Step 5 — read when tempted to resolve from the env var alone). If no\n  target resolves by any of these, **do not skip silently** — print\n  `Step 5 skipped — persona-test has no target (PERSONA_TEST_APP_URL unset;\n  pass --persona-url \u003Curl> to run it)` in the Step 8 summary so the gap is\n  visible rather than assumed-away.\n\n### Step 5.0 — Deploy-topology gate (GREEN ≠ REALIZED #7)\n\nBefore driving the browser, resolve whether persona-test can actually GATE here —\n**call the seam, don't re-decide in prose** (the decision is a tested function):\n\n```bash\nnode scripts\u002Fcross-skill.mjs preview-gate --format human\n```\n\nAct on the directive:\n- **`[HALT]`** (`previewGateMode: pre_merge_required`) — a preview env exists and MUST gate.\n  Run persona-test against the **preview `--url`** and **halt before merge\u002Fship** until it passes;\n  do not let Step 7 ship on a failed\u002Fagain-skipped persona run.\n- **`[WARN]`** (`post_merge_warning` — deploy-from-main \u002F no preview) — surface the warning\n  prominently: persona-test here is **POST-HOC and cannot prevent prod exposure**; its P0\u002FP1\n  findings are fast-follow, NOT a gate. Proceed, but say so in the Step 8 summary.\n- **`[OK]`** (`not_applicable`, default) — silent; proceed normally.\n\nInvoke `\u002Fpersona-test \u003Cpersona> \u003Curl>` — drives a browser as a registered\npersona, collects P0–P3 findings.\n\n**On verdict**:\n- 0 P0 findings AND OVERALL is `Ready for users` → proceed to Step 6\n- 0 P0 findings AND OVERALL is `Needs work` because of `authWallUntested`\n  (persona-test hit a login wall with no auth bootstrap configured — the\n  remedy is \u002Fpersona-test's auth-bootstrap setup, not a \u002Fcycle step) → this is **not** a\n  clean pass; it means the run never reached the app's primary\n  authenticated surfaces. Surface this explicitly in the Step 8 summary\n  (don't silently read \"0 P0\" as \"proceed\") and proceed only as a WARN,\n  same posture as the `[WARN]` deploy-topology case above.\n- ≥1 P0 finding → present to user, recommend fix before ship; offer to feed findings back into a new `\u002Faudit-code` round (under `[HALT]`, a P0 **blocks** ship until fixed)\n\n---\n\n## Step 6 — UX Lock (if any new fixes shipped, AND not --no-uxlock)\n\nFor each HIGH finding fixed in Step 4, AND each P0\u002FP1 fixed in Step 5,\ninvoke `\u002Fux-lock` to generate a Playwright spec that locks the fix.\n\nSkip if no fixes were applied OR `--no-uxlock` flag passed OR backend-only\nscope.\n\n---\n\n## Step 7 — Ship (unless --no-ship)\n\n> **`\u002Fship` cannot actually be invoked from here — by design, every time.**\n> `\u002Fship`'s frontmatter carries `disable-model-invocation: true`, which refuses\n> ANY programmatic call, including one made from inside `\u002Fcycle`'s own\n> orchestration; `--autonomous` does NOT authorize shipping.\n> → `references\u002Forchestration-rationale.md` §Step 7 — read when asked to ship from \u002Fcycle.\n>\n> So Step 7 always ends in a **blocked handoff**, never an \"Invoke `\u002Fship`.\"\n> Show this card and stop — name the plan path so the human never has to go\n> hunting for it (a bare `\u002Fship` with no argument is a second manual step, not\n> a resume command):\n>\n> ```\n> ═══════════════════════════════════════\n>   \u002Fcycle blocked at Step 7 (ship)\n>   \u002Fship requires explicit user invocation — it cannot be called\n>   programmatically, even from \u002Fcycle's own orchestration.\n>   Resume with: \u002Fship docs\u002Fplans\u002F\u003Cname>.md\n> ═══════════════════════════════════════\n> ```\n\n---\n\n## Step 8 — Cycle Summary\n\n```\n═══════════════════════════════════════\n  \u002Fcycle complete — \u003CPLAN-NAME>\n  Plan:        docs\u002Fplans\u002F\u003Cname>.md\n  Audit-plan:  3 rounds, APPROVE\n  Clusters:    A in-cluster H:0 (2 deferred→C); B in-cluster H:0 (autonomous)  ← only if hasClustering\n  Audit-code:  4 rounds, CONVERGED, H:0 M:1 L:2                 ← classic path (no §11)\n  Final gate:  Gemini APPROVE over union diff                  ← only if hasClustering\n  Persona:    0 P0, 1 P1 (deferred)\n  UX-lock:    2 specs generated\n  Ship:       BLOCKED — run: \u002Fship docs\u002Fplans\u002F\u003Cname>.md\n  Total time: 18m\n  Total cost: ~$1.40\n═══════════════════════════════════════\n```\n\n**The `Ship:` line is BLOCKED unless the user already ran `\u002Fship` themselves in\nthis same turn** — Step 7 can never invoke it (see Step 7's note), so\n\"commit abc1234 pushed to main\" is only correct after the human has actually\ntyped `\u002Fship docs\u002Fplans\u002F\u003Cname>.md` and it completed. Never print a commit sha\nhere on the assumption that Step 7 \"ran\" — it didn't.\n\nIf any step was skipped, note why. If any step exited non-success,\nsurface as a warning at the top. For clustered runs, show the per-cluster\ngate result and the preflight outcome.\n\n---\n\n## Hard rules\n\n- **Never auto-fix** between steps without user confirmation — **except** in\n  `--autonomous` mode, where the opt-in flag authorizes within-cluster fixes\n  scoped to the active cluster's derived file set (summaries still surfaced;\n  cross-cluster fixes and persistent non-convergence still hand back).\n- **Never skip `\u002Faudit-plan`** unless explicitly in SKIP_TO_CODE or REMEDIATE mode. SKIP_PLAN skips `\u002Fplan`, not `\u002Faudit-plan`. Never infer \"already accepted\" — there is no mechanical record of which plan content was approved (Step 0).\n- **Never skip `\u002Faudit-code`** unless explicitly in SKIP_TO_SHIP mode (not currently exposed; reserved). REMEDIATE focuses it; it never skips it.\n- **Default is human-orchestrated** — `\u002Fcycle` pauses at the implementation gate (Step 3); only the **opt-in `--autonomous`** flag implements code, and it never activates silently.\n- **`\u002Fcycle` reads the §11 block; it never authors or merges clusters** — it may split-equivalent (defer oversized diffs to `\u002Faudit-code`'s map-reduce) but never merges across a declared boundary. Clustering is the plan's job.\n- **The consolidated Gemini gate is mandatory** after clustered execution, regardless of per-cluster convergence — and Step 3C.2's deferral re-check runs *before* it, so no `deferred-declared` finding survives the run.\n- **A per-cluster fix-gate scores IN-CLUSTER findings only** (Step 4a). Scoring the whole plan against one cluster's diff makes every gate but the last unpassable; deferral is bounded to *later*-cluster scopes and settled at 3C.2. Never widen it to \"pre-existing\" — that is authorship, not schedule.\n- **Cost cap awareness**: estimate total cost upfront from input size and surface it in the kickoff card. A typical full cycle costs $1–3; autonomous clustered runs cost more (one audit per cluster + the final gate).\n\n---\n\n## Reference files\n\nThis skill's canonical flow is above. The files below cover specialised\nsituations — read them only when the trigger applies.\n\n| File | Summary | Read when |\n|---|---|---|\n| `references\u002Finput-acquisition.md` | Where a skill's arguments come from on any host, and what to do when there are none. | The no-dispatch fallback — passing an inlined skill its plan path, sub-command and flags as orchestrator-supplied input (rule 0). |\n| `references\u002Fprerequisite-ladder.md` | Step 0 prerequisite ladder — absent helper bundle or auditor route, and reporting a run that did not happen. | Step 0 — an audit prerequisite did not resolve (helper scripts missing, no GPT route), OR about to report a run that degraded or did not happen. |\n| `references\u002Fverification-discipline.md` | Verification discipline — pinned citations, figure provenance, two-direction proof, attribution, consumer-side checks. | Reporting a degraded or substituted run — §7's coverage rule, which the prerequisite ladder's census rows cite. |\n| `references\u002Fgemini-gate.md` | Step 7 Gemini independent review protocol — transcript, verdict handling, re-review loop. | Autonomous mode's consolidated Gemini gate — building the transcript, OR no `GEMINI_API_KEY` and the degradation ladder decides the substitute. |\n| `references\u002Fremediate-mode.md` | REMEDIATE mode — fix triaged post-ship findings against an accepted plan without replaying the full cycle. | The mode is REMEDIATE (Step R), OR the user asks to skip \u002Faudit-plan because the plan is already accepted. |\n| `references\u002Fclustered-execution.md` | Step 3C detail — cluster-state schema, author-tier hint, scope-flag incident, 4a measurement, round-2 rationale. | Step 3C — first read\u002Fwrite of `.audit\u002Fcycle-cluster-state.json`, an `author-tier:` hint, OR a cluster's scope, class or gate is contested. |\n| `references\u002Forchestration-rationale.md` | Why \u002Fcycle's linear steps are shaped as they are — inline dispatch, plan deps, empty-diff guard, persona URL, ship. | A linear step's rule (Steps 0–7, outside 3C) is questioned or looks safe to skip. |\n| `references\u002Fworktree-preflight.md` | Worktree preflight remedy — the skills:hydrate npm script to add when a linked worktree lacks the tooling tree. | A command dies with `MODULE_NOT_FOUND` in a linked worktree AND this repo has no `skills:hydrate` script. |\n\n— end of \u002Fcycle —\n","> **Worktree preflight** — in a linked git worktree the synced tooling tree\n> `scripts\u002F.claude-skills\u002F` is absent — it is gitignored, so `git worktree add`\n> does not populate it, and every command below that uses it dies on a bare\n> `MODULE_NOT_FOUND`. Run `npm run skills:hydrate` first. If this repo defines\n> no such script, `references\u002Fworktree-preflight.md` holds the entry to add — ask\n> the user first, since it edits their `package.json`.\n\n## Usage\n\n```\nUsage: \u002Fcycle \u003Ctask-description>          — Full chain from scratch\nUsage: \u002Fcycle plan \u003Cplan-file>            — Skip \u002Fplan only; still audits the plan, then the implementation gate\nUsage: \u002Fcycle code \u003Cplan-file>            — Skip to code-audit-then-ship (plan accepted, code written)\nUsage: \u002Fcycle remediate \u003Cplan-file> --from persona-test \u003Creport.md> [--persona-url \u003Curl>]  — Fix triaged P0\u002FP1s against an accepted plan; focused audit; rerun affected journeys only\nUsage: \u002Fcycle remediate \u003Cplan-file> --from audit \u003Cresult.json>   — Same, sourcing HIGH findings from an audit result\nUsage: \u002Fcycle \u003Cplan-file> --no-persona    — Skip persona-test step\nUsage: \u002Fcycle \u003Cplan-file> --persona-url \u003Curl> — Explicit persona-test target (local dev server, no PERSONA_TEST_APP_URL needed)\nUsage: \u002Fcycle \u003Cplan-file> --no-uxlock     — Skip ux-lock step (no UI changes)\nUsage: \u002Fcycle \u003Cplan-file> --no-ship       — Stop after audit; don't commit or push\nUsage: \u002Fcycle \u003Cplan-file> --max-rounds N  — Pass through to \u002Faudit-plan and \u002Faudit-code\nUsage: \u002Fcycle --autonomous \u003Cplan-file>    — Opt-in: autonomously implement + audit each §11 cluster (default still pauses for the human; Step 7\u002Fship is NEVER autonomous — see Step 7)\nUsage: \u002Fcycle code \u003Cplan-file> --cluster \u003CID> [--baseline-ref \u003Csha>]  — Resume one declared cluster (human clustered path)\nUsage: \u002Fcycle --autonomous \u003Cplan-file> --authorize-stale-reaudit      — Resume a halted autonomous run; re-process stale clusters\n```\n\n# Feature Cycle Orchestrator\n\n> **This skill's last line is an end marker naming the skill between em-dashes, after\n> the Reference files table.** If that last line is not in your context (context\n> compaction keeps only the start of a skill), re-read\n> `.claude\u002Fskills\u002Fcycle\u002FSKILL.md` in full before continuing — the later steps still apply.\n\nChains the existing atomic skills into one workflow so you don't have to\nremember which to invoke when. Each step is a delegation to the\nunderlying skill — this orchestrator just sequences + waits.\n\n**This skill does NOT duplicate logic from the atomic skills**. If you\nwant fine control over a single step, invoke that step's skill directly\n(`\u002Faudit-code`, `\u002Faudit-plan`, etc.). Use `\u002Fcycle` when you want the\ngolden-path workflow without thinking about it.\n\n\u003C!-- host-contract: no-dispatch; preserves=step-order,step3-pause,skip-flags,blocked-propagation -->\n\n> **On a host with no skill-to-skill dispatch, delegate INLINE.** Claude Code\n> can invoke `\u002Faudit-code` as a command; VS Code Copilot reads the same\n> `.claude\u002Fskills\u002F` tree but has no documented mechanism for one skill to\n> invoke another. Where a step below says \"invoke `\u002Fx`\", such a host instead\n> **opens `.claude\u002Fskills\u002Fx\u002FSKILL.md` and follows it in place**, then returns here and\n> continues with the next step.\n>\n> **Pass the delegated skill its arguments explicitly** — the plan path, the\n> sub-command, the flags. `\u002Fcycle` already holds those values, so this is\n> orchestrator-supplied input (rule 0 of `references\u002Finput-acquisition.md`),\n> not inference — omitting them deadlocks an inline cycle\n> (→ `references\u002Forchestration-rationale.md` §No-dispatch — read when the reason is questioned).\n>\n> **Four invariants survive the fallback, and a run that breaks one is not a\n> `\u002Fcycle` run:**\n>\n> 1. **Step order** — the sequence below is unchanged; inlining is a change of\n>    mechanism, never of order.\n> 2. **The Step 3 pause** — a default (non-`--autonomous`) cycle still stops at\n>    the implementation gate. Inlining must not silently turn a paused cycle\n>    into an autonomous one.\n> 3. **Skip flags** — `--no-persona`, `--no-uxlock`, `--no-ship` are honoured\n>    identically.\n> 4. **Blocked propagation** — a `[BLOCKED]`, `AUDIT_NOT_RUN` or non-converged\n>    result from an inlined skill reaches the Step 8 summary. It must not be\n>    swallowed by the skill that ran inline.\n>\n> **What inlining is NOT**: it is not a subagent and gets no fresh context, so\n> a long inlined skill consumes the parent conversation's budget. Say which\n> steps ran inline in the Step 8 summary, so a reader can tell a dispatched run\n> from an inlined one rather than assuming.\n\n---\n\n## Step 0 — Parse Input\n\n> **A prerequisite that does not resolve is a stop, not a mid-flow death.**\n> \u002Fcycle spends real money on \u002Fplan before it ever reaches an audit step, so\n> resolve the audit prerequisites HERE — the helper scripts, and a GPT route\n> (`OPENAI_API_KEY` **or** an active Azure profile). If one is absent, the\n> ladder in `references\u002Fprerequisite-ladder.md` (the one \u002Faudit-code follows) decides what\n> happens: hydrate and retry, run the labelled adversarial-agent substitute, or\n> report `AUDIT_NOT_RUN` and stop. Whichever rung applies, say so before\n> generating the plan rather than after paying for it, and carry the same\n> `AUDIT_DEGRADED` \u002F `AUDIT_NOT_RUN` label into Step 6's handoff to \u002Fship so a\n> degraded run cannot reach a commit looking clean.\n\n| Input shape | Mode |\n|---|---|\n| `\u002Fcycle \u003Ctask description>` (no file path) | **FULL** — generate plan, audit it, wait for impl, audit code, ship |\n| `\u002Fcycle plan \u003Cplan-file>` | **SKIP_PLAN** — plan exists; skip Step 1 only. Audit it (Step 2), then the Step 3 implementation gate (pause, or implement under `--autonomous`), audit code, ship |\n| `\u002Fcycle code \u003Cplan-file>` | **SKIP_TO_CODE** — plan accepted + impl exist; skip Steps 1–3; audit code, validate UX, ship |\n| `\u002Fcycle remediate \u003Cplan-file> --from \u003Cpersona-test\\|audit> \u003Creport>` | **REMEDIATE** — plan accepted; skip Steps 1–2; triage the report, focused fixes, focused audit, rerun affected journeys, ship — see Step R |\n| `\u002Fcycle \u003Cplan-file>` (no `plan`\u002F`code` keyword) | **AUTO** — detect by checking if any new code exists since plan was written |\n\n**`\u002Faudit-plan` is never skipped by inference.** Only the explicit `code` or\n`remediate` keyword skips it — typing it is the operator's declaration that the\nplan is accepted. `\u002Fcycle` does not auto-detect \"already accepted and unchanged\"\n(no record identifies the approved plan *content*) → `references\u002Fremediate-mode.md`\n§\"The accepted-plan skip\" — read when asked to skip \u002Faudit-plan by inference.\n\nOptional flags:\n- `--no-persona` — skip \u002Fpersona-test (use when no live URL or backend-only)\n- `--persona-url \u003Curl>` — explicit persona-test target. Use this for a repo that\n  only sets `PERSONA_TEST_APP_URL` for CI\u002FPR-preview but runs a normal local dev\n  server otherwise (Step 5 would silently skip without it — see Step 5).\n- `--no-uxlock` — skip \u002Fux-lock (use when no UI changes shipped)\n- `--no-ship` — stop after audit; don't commit or push\n- `--max-rounds N` — pass through to \u002Faudit-plan and \u002Faudit-code\n- `--autonomous` (alias `--implement`) — **opt-in**: autonomously implement + audit each §11 cluster, or the whole plan as one unit when it has no §11 block (Step 3 table). **It does not complete Step 7** — a fully autonomous run still stops at the Step 7 blocked-handoff card; only the human's `\u002Fship` completes it.\n- `--cluster \u003CID>` — implement\u002Faudit a single declared cluster (human resume path).\n- `--baseline-ref \u003Csha>` — audit baseline for a resume where no `clusterStartRef` was captured (work already committed).\n- `--authorize-stale-reaudit` — resume a halted autonomous run by re-processing exactly the `stale` clusters.\n- `--no-cluster` — ignore any §11 block; fall back to the single-audit path.\n- `--from persona-test \u003Creport.md>` | `--from audit \u003Cresult.json>` — REMEDIATE only, required: the findings source. `--include-p2` widens the persona triage to P2.\n\n**§11 detection**: parse the target plan for an `## 11. Execution Clustering`\nblock. If present (and not `--no-cluster`), set `hasClustering` and parse\nthe clusters + each cluster's derived file scope. This activates the\nclustered-execution path (Step 0.7 preflight + Step 3 branch). Absent → the\nclassic linear flow below, unchanged.\n\nShow kickoff card:\n\n```\n═══════════════════════════════════════\n  \u002Fcycle — [MODE]\n  Steps: plan → audit-plan → audit-code → persona-test → ux-lock → ship\n  Skipped: --no-persona, --no-uxlock\n═══════════════════════════════════════\n```\n\n(REMEDIATE's card reads `Steps: triage → fix → focused audit-code → rerun journeys → ux-lock → ship`\nand `Skipped: plan, audit-plan (plan declared accepted by the remediate keyword)`.)\n\n---\n\n## Step 0.5 — Cross-plan coordination check (nudge, not a gate)\n\nWhenever a target plan file already exists (`SKIP_PLAN`\u002F`SKIP_TO_CODE`\u002F`REMEDIATE`\u002F`AUTO`\nmodes — anything but a fresh FULL run, where the plan doesn't exist yet), run\nit before implementation or shipping proceeds:\n\n```bash\nnode scripts\u002Fcheck-plan-status.mjs --check-deps \"$PLAN\"\n```\n\nThis reads the plan's own `- **Depends on**: \u003Cpath>` lines (plan\u002FSKILL.md\nPhase 7) — the structured form of a \"wait for Cluster X to land first\"\ncoordination note — against each referenced plan's current `Status:` line.\nExit is always 0 and the output goes to stderr only, so it never blocks the\nrun; a printed `unmet` line means a declared ordering dependency has not\nlanded yet. **Read it and decide by hand** whether to proceed, hold, or\nsequence with whoever owns the other plan — this only makes the note visible,\nit cannot know whether proceeding anyway is actually safe.\n→ `references\u002Forchestration-rationale.md` §Step 0.5 — read when the check's purpose is questioned.\n\n---\n\n## Step 0.7 — Clustering preflight (when `hasClustering`; fail-closed)\n\nValidate the §11 block **before any execution** — `\u002Fcycle code \u003Cplan>`\nreaches here without having passed `\u002Faudit-plan`, so this is the\nexecution-time safety net (the second of two validation layers). Check:\n\n- **partition** — every §7b implementation phase in exactly one cluster; none omitted\u002Fduplicated; close-out outside the phase set;\n- **contiguous** ascending cluster ranges (grammar rule 1);\n- every `fix-gate` value in `{yes, final, none}`; `Coupling:` present on each cluster;\n- trailing `Final gate` line present;\n- **derived scope** (member `Files:` + tagged `Additional files:`) is non-empty and fully intent-tagged, validated **per cluster against that cluster's `gateStatus`** in the state record, NOT the global `\u002Fcycle` mode: a `pending`\u002Fabsent cluster uses pre-implementation expectations (`(modify)`\u002F`(delete)` resolve on disk; `(create)` has a resolvable parent dir, no collision, no sensitive-path); an `audited`\u002F`gate-clear`\u002F`stale` cluster uses post-implementation expectations (`(create)`\u002F`(delete)` already done — no false collision on resume).\n\n**On any failure**: stop, present the defect, offer (1) correct the plan or\n(2) `--no-cluster` fallback to the single-audit path. Never silently\nproceed with a malformed block.\n\n---\n\n## Step 1 — Plan (FULL mode only)\n\nInvoke `\u002Fplan \u003Ctask description>`. The unified `\u002Fplan` skill auto-detects\nscope (backend \u002F frontend \u002F full-stack) and produces one consolidated\nplan document at `docs\u002Fplans\u002F\u003Cdescriptive-name>.md`.\n\n**On failure**: surface the error and abort. Don't proceed to audit.\n\n---\n\n## Step 2 — Audit Plan\n\nInvoke `\u002Faudit-plan \u003Cplan-file>`. Iteratively refines the plan with\nGPT + Gemini final gate. Max 3 rounds; rigor-pressure stop.\n\n**On verdict**:\n- `APPROVE` (Gemini) → proceed to Step 3\n- `CONCERNS` after Gemini round 2 (cap) → present to user, ask: \"Plan has remaining concerns from final review. Proceed to implementation anyway, fix the plan first, or stop?\"\n- `REJECT` → present to user, recommend stopping the cycle to revise\n\n---\n\n## Step 3 — Implementation gate (branches on mode)\n\n**Decision table (one source of truth — the bullets below elaborate).** The gate is a\npure function of three inputs: the parsed mode, whether the plan carries a §11 block\n(`hasClustering`), and the `--autonomous` flag. Only `SKIP_TO_CODE` means the human\nalready implemented, so only it bypasses the gate (straight to Step 4 audit).\n`SKIP_PLAN` skips Step 1 alone — its plan has been audited in Step 2 but not\nimplemented, so it meets this gate exactly like FULL. `REMEDIATE` never reaches\nthis step; its own remediation gate is Step R.\n\n| Mode | `hasClustering` | `--autonomous` | Action |\n|---|---|---|---|\n| FULL \u002F SKIP_PLAN (plan generated\u002Faudited, not yet implemented) | no | no | **Pause** for the human (card below) |\n| FULL \u002F SKIP_PLAN | no | **yes** | **Degenerate single-cluster autonomous** (whole plan as one unit) |\n| FULL \u002F SKIP_PLAN | yes | no | **Pause** + print cluster guidance; resume `--cluster \u003CID>` |\n| FULL \u002F SKIP_PLAN | yes | **yes** | **Step 3C** clustered autonomous loop |\n| SKIP_TO_CODE (already implemented) | any | any | **Empty-diff guard first** (below); then **no gate** — go to Step 4 audit (per-cluster if `--cluster`, else union diff) |\n\n- **No §11 block + default (no `--autonomous`)** → `\u002Fcycle` **pauses here** for\n  the human to implement; output the \"paused at implementation gate\" card below.\n- **No §11 block + `--autonomous`** → **degenerate single-cluster autonomous path**\n  (do NOT silently fall back to the pause — that contradicts the explicit\n  `--autonomous`). A plan below the §7b Gate-1 \u002F §11 threshold is small + cohesive by\n  construction, so treat its **entire** implementation as ONE implicit cluster and run\n  the Step 3C loop over it: implement → `\u002Faudit-code` over the **union diff** →\n  fix-gate to convergence → the **mandatory** consolidated Gemini gate (Step 3C.2) →\n  close-out → ship. Print one line up front so it's never silent:\n  `plan below the §11 threshold — implementing inline as a single unit (no clustering).`\n  The same within-cluster auto-fix authorization applies; a fix needing files outside\n  the plan's declared `§7`\u002F`§7b` scope still **stops** for confirmation.\n- **§11 block + default (no `--autonomous`)** → still pauses, but prints the\n  cluster plan as implementation guidance and instructs the operator to\n  **implement only the next cluster**, then resume with `\u002Fcycle code \u003Cplan>\n  --cluster \u003CID>` (the `--cluster` arg is **required** on every human resume\n  — `\u002Fcycle` does not auto-divine the next cluster). On resume, Step 4 runs\n  the **per-cluster** audit (see Step 3C). If the operator implemented\n  several clusters at once (per-cluster isolation impossible), `\u002Fcycle` says\n  so and falls back to a single union-diff audit.\n- **§11 block + `--autonomous`** → enter **Step 3C** (the implement-and-audit\n  cluster loop). This is the explicit authorization that relaxes the\n  \"never auto-fix\" hard rule, scoped to within-cluster fixes.\n- **SKIP_TO_CODE empty-implementation guard (do this BEFORE auditing).**\n  `code` assumes the human already implemented — but an *approved-but-unimplemented*\n  plan (e.g. resumed straight after `\u002Faudit-plan`, zero commits since) yields an\n  **empty implementation diff**, and auditing nothing returns a misleading green.\n  So before Step 4, compute the diff base (the plan's commit, or `--baseline-ref`,\n  else the dirty-aware base `\u002Faudit-code` uses) and check it's non-empty.\n  **POSIX shell only** (Git Bash on Windows), not PowerShell:\n  ```bash\n  BASE=$([ -n \"$(git status --porcelain)\" ] && echo HEAD || echo HEAD~1)   # or the plan commit \u002F --baseline-ref\n  [ -z \"$(git diff \"$BASE\" --name-only)$(git ls-files --others --exclude-standard)\" ] && echo EMPTY\n  ```\n  If empty → **do NOT audit a no-op.** Tell the operator the plan looks\n  unimplemented and offer the fork, naming the EXACT command for each side\n  (adding `--autonomous` to a `code` run does nothing): (1) re-run as\n  `\u002Fcycle plan \u003Cplan-file> --autonomous` (let `\u002Fcycle` implement it), or\n  (2) implement manually then re-run `\u002Fcycle code \u003Cplan-file>` unchanged.\n  → `references\u002Forchestration-rationale.md` §Step 3 — read when the guard or the fork is questioned.\n\n```\n═══════════════════════════════════════\n  \u002Fcycle paused at implementation gate\n  Plan: docs\u002Fplans\u002F\u003Cname>.md\n  Resume with: \u002Fcycle code docs\u002Fplans\u002F\u003Cname>.md\n═══════════════════════════════════════\n```\n\n---\n\n## Step 3C — Clustered execution (when `hasClustering`)\n\n### Cluster execution state — `.audit\u002Fcycle-cluster-state.json`\n\nDurable, gitignored, lock-guarded (lock-acquire failure → stop, no racy\noverwrite); one record per cluster with `gateStatus: pending|audited|gate-clear|stale`.\nA `gate-clear` cluster flips to **`stale`** if any `derivedScope` file hash or its\n`scopeHash` changes. → `references\u002Fclustered-execution.md` §Cluster execution\nstate — read before the first read or write of this file in a session.\n\n### Loop (autonomous)\n\nState-driven + resumable: read state first, **skip `gate-clear` clusters**.\nFor each remaining cluster in declared order:\n\n1. **Implement** the cluster's member-file phases.\n2. **Budget**: no runtime splitting in v1 — invoke `\u002Faudit-code` on the cluster's derived scope and let its internal map-reduce handle large diffs. `\u002Fcycle` only enforces **never merge** across a declared boundary.\n   - **Optional author-tier observation** (telemetry only; it does NOT change which model runs) → `references\u002Fclustered-execution.md` §Optional author-tier — read when the cluster carries an `author-tier:` hint.\n3. **Audit envelope**: capture `clusterStartRef` (`vcs.gitCommitSha`) when implementation begins, write the cluster's derived scope one-path-per-line to a scope file, then run the two commands below. On a resume with no recorded `clusterStartRef`, require `--baseline-ref \u003Csha>` or fall back to union-diff — **never** default the base to HEAD (empty diff = silent skip). Round policy is `\u002Faudit-code`'s own cap — no new policy here.\n\n   > **`--files` is the ONLY flag that scopes the audit.** `--changed` is the R2+\n   > impact set for reopen detection and `--diff` is hunk evidence; neither\n   > bounds what the model reads. Do NOT hand-compute the change set or\n   > hand-apply the admission rules: `cycle-cluster-scope.mjs` does that in code.\n   > → `references\u002Fclustered-execution.md` §Why `--files` — read when the scope flags are questioned.\n\n\u003C!-- cycle:cluster-audit-command -->\n```bash\n# 1. Deterministic half, in code. Resolves the base to an immutable OID, builds\n#    the reconciliation set (status-aware: deletes and BOTH rename operands),\n#    filters to on-disk paths for the allowlist, runs the admission pre-flight,\n#    writes the patch. EXITS NON-ZERO on an out-of-scope edit, an unadmittable\n#    path, or a comma-unsafe path — when it does, STOP and show its stderr.\nnode scripts\u002Fcycle-cluster-scope.mjs --base \"$CLUSTER_START\" --scope-file \"$SCOPE_FILE\" --out-dir .audit --cluster \"$ID\" --json > \"$SCOPE_JSON\"\n\n# 2. Audit using ONLY values that call produced. Read them with node, not jq —\n#    node is guaranteed here; jq is not, and is absent from check-deps.mjs.\nFILES=$(node -p \"require('.\u002F$SCOPE_JSON').filesCsv\")\nPATCH=$(node -p \"require('.\u002F$SCOPE_JSON').diffPath\")\nINFRA=$(node -p \"require('.\u002F$SCOPE_JSON').allowInfraScopeRequired ? '--allow-infra-scope' : ''\")\n\nnode scripts\u002Fopenai-audit.mjs code \"$PLAN\" --scope diff --files \"$FILES\" --changed \"$FILES\" --diff \"$PATCH\" $INFRA\n#   --files   : THE scoping flag — an allowlist; makes --scope a no-op\n#   --changed : R2+ reopen\u002Fimpact detection only — does NOT scope\n#   --diff    : hunk evidence — centres every round's read windows on the change\n#               (R2+ also annotates); does NOT scope; must be a real file\n```\n\u003C!-- \u002Fcycle:cluster-audit-command -->\n\n   The script returns two sets (reconciliation set vs on-disk allowlist) — use\n   them as returned → `references\u002Fclustered-execution.md` §Two sets — read when they look inconsistent.\n\n   **A deletion-only cluster has an empty allowlist** and reports\n   `emptyAllowlist: true`. That is correct — there is no code to read. Route it\n   to the consolidated Gemini gate over the union diff, where the deletion IS\n   visible; do not record a vacuous per-cluster pass.\n4. **Fix-gate**: `fix-gate: yes` → reach `\u002Faudit-code` convergence (`HIGH==0 && MEDIUM\u003C=2 && quickFix==0`) **over this cluster's IN-CLUSTER findings** (see 4a) before the next cluster; `none` skips; `final` defers to the consolidated gate. Within-cluster fixing is authorized; a fix needing files **outside** the cluster's scope → **stop** for confirmation (mark any touched `gate-clear` cluster `stale`). Persistent non-convergence → hand back with a summary.\n   - **3a. `clusterStartRef` is validated ON USE, not just captured.** Run\n     `git merge-base --is-ancestor \u003CclusterStartRef> HEAD` before it becomes a\n     diff base. On a non-ancestor (a concurrent session moved HEAD),\n     halt and report rather than demoting to the\n     dirty-aware default, which would quietly widen the range you asked for.\n     → `references\u002Fclustered-execution.md` §3a — read when the base check is questioned.\n   - **4a. The gate scores IN-CLUSTER findings only — otherwise no cluster but the last can ever pass** (→ `references\u002Fclustered-execution.md` §4a — read when in-cluster scoring is challenged). Classify every finding by the cluster owning its cited file — the derived scopes are already computed, so this is mechanical, not a judgement call:\n\n     | Cited file is in… | Class | Effect on THIS gate |\n     |---|---|---|\n     | this cluster's derived scope | `in-cluster` | **gates** — fix it, pre-existing or not |\n     | a **later** cluster's derived scope | `deferred-declared` | does not gate; **must be zero at the final gate** |\n     | an **earlier** cluster's derived scope | `regression` | **gates** — that cluster is now `stale`; go to step 5 |\n     | **no** cluster's derived scope | `out-of-scope` | unchanged: fail closed per step 3 |\n\n     Three properties stop this becoming an escape hatch, and all three are load-bearing: **(1)** deferral is *bounded* — `deferred-declared` means \"owned by a LATER cluster\", and the final cluster has none, so the bucket is empty there by construction and every deferred completeness finding must be satisfied before Step 3C.2; **(2)** *\"pre-existing\" is still not a defer reason* — these buckets are about plan SCHEDULE, never authorship, so AGENTS.md's impact test applies unchanged to anything in-cluster; **(3)** the classification is *derived*, never argued — a finding cannot be talked into a friendlier bucket. **Every `deferred-declared` finding is listed in the cluster's hand-back summary with the cluster that owns it** — a deferral nobody can see is indistinguishable from a dismissal.\n   - **Convergence test scope — run the BROADEST suite, not unit-only (load-bearing for destructive clusters).** When \"iterate to green\" runs the project's tests at the cluster boundary, use the widest command the repo defines (`test:all` \u002F `test:integration` \u002F `test:e2e` — fall back to plain `test` \u002F the full `node --test`), **never `test:unit` alone** (→ `references\u002Fclustered-execution.md` §Why the broadest test suite — read when a unit-only green is proposed). A cluster is \"green\" only when the integration tier passes; a `test:unit`-only green on a destructive cluster is a false-green and does **not** clear the fix-gate.\n4.5. **Finalize outcomes (deterministic capture — WS1)**: once the cluster's audit has converged AND its findings are triaged (the adjudication ledger carries terminal `accepted`\u002F`dismissed`\u002F`severity_adjusted` outcomes), call **once** per converged audit:\n   ```bash\n   node scripts\u002Fcross-skill.mjs finalize-outcomes --run-id \"$CLOUD_RUN_ID\" --ledger \"$FINAL_LEDGER_JSON\" --result \"$FINAL_ROUND_RESULT_JSON\"\n   ```\n   The `run-id` is the audit's `_cloudRunId` (on the `--out` JSON); → `references\u002Fclustered-execution.md` §4.5 — read when asked what it captures. Cloud-off → it no-ops with a hint; an unknown run-id is a hard error. Skip only when the audit produced no cloud run (cloud off).\n5. **After the loop**: if any `gate-clear` cluster went `stale`, **halt + summarize**; resume only with `--authorize-stale-reaudit`, which re-processes exactly the stale clusters (their out-of-scope reconciliation ignores files owned by *other* clusters, since later clusters legitimately committed since the old baseline). No autonomous loop-back.\n\n### Step 3C.1 — Close-out execution (autonomous)\n\nThe loop only iterates §7b phases, so the plan's unclustered close-out\n(e.g. `npm run skills:regenerate` + `npm run skills:check`, build\u002Fcodegen)\nwould never run. After the last cluster clears and **before** the\nconsolidated gate, parse and execute the plan's close-out step(s),\nsurfacing failures. (Human path leaves close-out to the operator.)\n\n### Step 3C.2 — Consolidated Gemini gate (closed loop, mandatory)\n\n**First, the deferrals come due.** Step 4a lets a cluster defer a finding that\nbelongs to a *later* cluster; this is where that debt is settled, because there\nis no later cluster left. Before invoking the reviewer, re-check every\n`deferred-declared` finding accumulated across the run: each must now be\nsatisfied (the file exists, the migration ran, the phase landed). **Any that\nremain are the plan's own §7b work, unimplemented** — halt and summarize rather\nthan asking Gemini to bless an incomplete change set. This check is what makes\n4a a deferral instead of a dismissal, so it is not optional and not\nGemini's job.\n\nAfter all clusters (+ close-out), run **one** Gemini review over the\n**union diff** — mandatory regardless of per-cluster GPT convergence, and a\n**closed loop** driven by the result's code-computed `gateDisposition` (not the\nverdict word): `approve` → done; `approve_with_debt` → done, capture the\nnon-blocking findings with `node scripts\u002Fdebt-auto-capture.mjs --final-review .audit\u002F$SID-gemini-result.json`;\n`blocked` → deliberate, apply fixes scoped to the union diff (the per-cluster\nout-of-scope stop does NOT apply here — no active cluster; touched `gate-clear`\nclusters are flagged `stale` for the next run), **re-run as round 2** with\n`--round 2 --prior .audit\u002F$SID-gemini-result.json` (the round-1 `--out`).\n**Max 2 consolidated rounds — a hard cap enforced by `gemini-review.mjs`,\nwhich refuses `--round 3`.** A round-2\n`blocked` is handed back to the user with its named blocking items (a concrete\n**design\u002Fcorrectness** defect: fix it, then escalate — see `gemini-gate.md`);\n**implementation-completeness** nits (\"specify the store step\", parameter\nplacement) are non-blocking by definition and close as debt, since the classic\n`\u002Faudit-code` path (Step 4) already verified the code against the real\nimplementation. Exit on `approve`\u002F`approve_with_debt`, the capped stop, or\nexplicit handback. Never replaced by GPT rebuttal.\n\n**Between consolidated rounds, apply `gemini-gate.md`'s Step 7.1 deliberation\nprotocol exactly — this closed loop is the SAME one, not a second one.** For\neach `CONCERNS`\u002F`REJECT` finding decide ACCEPT \u002F PARTIAL \u002F CHALLENGE (a\nCHALLENGE must cite evidence); fix the accepted findings; then **rebuild the\ntranscript before re-running Gemini**, passing `--summary` describing what\nround 1 decided per finding — fixed, or challenged-and-why; without it round 2\nre-raises the same findings. → `references\u002Fclustered-execution.md` §3C.2 round 2 — read when round 2 repeats round 1.\n\nInvocation: build the\ntranscript the way `\u002Faudit-code` does (`changed_files`=union file set,\naccumulated per-cluster findings as the `rounds[]` trail), then\n`node scripts\u002Fgemini-review.mjs review \u003Ctarget> \u003Ctranscript.json> --out …` —\nreuse `\u002Faudit-code`'s transcript path, no new gate machinery. **Pass one\n`--ledger \u003Cpath>` per cluster** (`.audit\u002F$CLUSTER_SID-ledger.json` each) —\n`build-audit-transcript.mjs`'s `--ledger` flag is repeatable (mirroring\n`--result`); one ledger alone drops the other clusters' resolutions\n(→ `references\u002Fclustered-execution.md` §3C.2 one `--ledger` — read when a cluster's resolutions are missing). **Concrete transcript\nshape + the no-`GEMINI_API_KEY` degradation ladder (Opus fallback → independent\nadversarial agent over the union diff → only-then skip) are in\n`references\u002Fgemini-gate.md`** (the same contract \u002Faudit-code's Step 7 follows) — when no provider key is present, run the\nindependent-agent substitute rather than skipping the mandatory gate. Generated\n`.claude\u002Fskills\u002F**` copies are byte-verified by `skills:check`, not\nre-reviewed. Then continue to Step 5 (Step 7 still ends even a fully autonomous run in the blocked handoff).\n\n---\n\n## Step R — Remediation (REMEDIATE mode only)\n\nFor narrow defects found **after** a ship, against a plan already accepted:\nreplaying the whole chain re-plans, re-audits the plan and audits the whole\ndirty tree. REMEDIATE runs instead, in order, and nothing else:\n\n1. **R1** load the governing plan — no `\u002Fplan`, no `\u002Faudit-plan`; Step 0.5 still runs.\n2. **R2** triage the `--from` report into a fix list (persona **P0\u002FP1**, or audit\n   **HIGH**, by default) and record it in the plan's `## Implementation Log`.\n3. **R3** implement — **pauses for the human by default**; implements only\n   under `--autonomous`. Capture the base before the first edit.\n4. **R4** focused `\u002Faudit-code` — `--files` pinned to the fix files + the plan\n   via `scripts\u002Fcycle-cluster-scope.mjs`, which exits non-zero on any edit outside\n   that set. Never a whole-dirty-tree diff. **Caps unchanged**: 6 audit rounds,\n   2 final-review rounds.\n5. **R5** rerun **only** the affected persona journey(s), exercising the stateful\n   lifecycle (act → reload → verify persisted → follow-on action → verify).\n6. **R6** update the plan's log with per-finding outcomes, Step 6 `\u002Fux-lock`,\n   then Step 7's blocked `\u002Fship` handoff — never autonomous.\n\nThe commands, triage table, resume card, rerun verdicts and summary card are in\n`references\u002Fremediate-mode.md` — read it before R2.\n\n---\n\n## Step 4 — Audit Code (classic path — no §11 block)\n\nInvoke `\u002Faudit-code \u003Cplan-file>` (default `--scope=diff`). Multi-pass\nparallel GPT audit with R2+ ledger suppression and Gemini final\nreview. Max 6 rounds; quality threshold `HIGH==0 && MEDIUM\u003C=2 && quickFix==0`.\n\n**On verdict**:\n- `CONVERGED` → proceed to Step 5\n- `INCOMPLETE` (passes timed out) → present to user, offer: continue with partial \u002F re-run with higher timeout \u002F stop\n- Persistent HIGH findings after R6 → present to user with finding list, recommend fix-then-retry rather than ship\n\nSolo author-model control needs no `\u002Fcycle` action → `references\u002Forchestration-rationale.md`\n§Step 4 — read when asked whether \u002Fcycle triggers it.\n\n---\n\n## Step 5 — Persona Test (if scope ⊇ frontend, AND not --no-persona)\n\nDetect whether persona-test is applicable:\n- Skip if plan scope is `backend` only\n- Skip if `--no-persona` flag passed\n- Resolve the target URL in the same order `\u002Fpersona-test` itself uses\n  (Phase 0b): `--persona-url` flag → `PERSONA_TEST_APP_URL` env → (in\n  `--autonomous` mode, where there's no human to ask) a running local dev\n  server if one is detectable, else skip (→ `references\u002Forchestration-rationale.md`\n  §Step 5 — read when tempted to resolve from the env var alone). If no\n  target resolves by any of these, **do not skip silently** — print\n  `Step 5 skipped — persona-test has no target (PERSONA_TEST_APP_URL unset;\n  pass --persona-url \u003Curl> to run it)` in the Step 8 summary so the gap is\n  visible rather than assumed-away.\n\n### Step 5.0 — Deploy-topology gate (GREEN ≠ REALIZED #7)\n\nBefore driving the browser, resolve whether persona-test can actually GATE here —\n**call the seam, don't re-decide in prose** (the decision is a tested function):\n\n```bash\nnode scripts\u002Fcross-skill.mjs preview-gate --format human\n```\n\nAct on the directive:\n- **`[HALT]`** (`previewGateMode: pre_merge_required`) — a preview env exists and MUST gate.\n  Run persona-test against the **preview `--url`** and **halt before merge\u002Fship** until it passes;\n  do not let Step 7 ship on a failed\u002Fagain-skipped persona run.\n- **`[WARN]`** (`post_merge_warning` — deploy-from-main \u002F no preview) — surface the warning\n  prominently: persona-test here is **POST-HOC and cannot prevent prod exposure**; its P0\u002FP1\n  findings are fast-follow, NOT a gate. Proceed, but say so in the Step 8 summary.\n- **`[OK]`** (`not_applicable`, default) — silent; proceed normally.\n\nInvoke `\u002Fpersona-test \u003Cpersona> \u003Curl>` — drives a browser as a registered\npersona, collects P0–P3 findings.\n\n**On verdict**:\n- 0 P0 findings AND OVERALL is `Ready for users` → proceed to Step 6\n- 0 P0 findings AND OVERALL is `Needs work` because of `authWallUntested`\n  (persona-test hit a login wall with no auth bootstrap configured — the\n  remedy is \u002Fpersona-test's auth-bootstrap setup, not a \u002Fcycle step) → this is **not** a\n  clean pass; it means the run never reached the app's primary\n  authenticated surfaces. Surface this explicitly in the Step 8 summary\n  (don't silently read \"0 P0\" as \"proceed\") and proceed only as a WARN,\n  same posture as the `[WARN]` deploy-topology case above.\n- ≥1 P0 finding → present to user, recommend fix before ship; offer to feed findings back into a new `\u002Faudit-code` round (under `[HALT]`, a P0 **blocks** ship until fixed)\n\n---\n\n## Step 6 — UX Lock (if any new fixes shipped, AND not --no-uxlock)\n\nFor each HIGH finding fixed in Step 4, AND each P0\u002FP1 fixed in Step 5,\ninvoke `\u002Fux-lock` to generate a Playwright spec that locks the fix.\n\nSkip if no fixes were applied OR `--no-uxlock` flag passed OR backend-only\nscope.\n\n---\n\n## Step 7 — Ship (unless --no-ship)\n\n> **`\u002Fship` cannot actually be invoked from here — by design, every time.**\n> `\u002Fship`'s frontmatter carries `disable-model-invocation: true`, which refuses\n> ANY programmatic call, including one made from inside `\u002Fcycle`'s own\n> orchestration; `--autonomous` does NOT authorize shipping.\n> → `references\u002Forchestration-rationale.md` §Step 7 — read when asked to ship from \u002Fcycle.\n>\n> So Step 7 always ends in a **blocked handoff**, never an \"Invoke `\u002Fship`.\"\n> Show this card and stop — name the plan path so the human never has to go\n> hunting for it (a bare `\u002Fship` with no argument is a second manual step, not\n> a resume command):\n>\n> ```\n> ═══════════════════════════════════════\n>   \u002Fcycle blocked at Step 7 (ship)\n>   \u002Fship requires explicit user invocation — it cannot be called\n>   programmatically, even from \u002Fcycle's own orchestration.\n>   Resume with: \u002Fship docs\u002Fplans\u002F\u003Cname>.md\n> ═══════════════════════════════════════\n> ```\n\n---\n\n## Step 8 — Cycle Summary\n\n```\n═══════════════════════════════════════\n  \u002Fcycle complete — \u003CPLAN-NAME>\n  Plan:        docs\u002Fplans\u002F\u003Cname>.md\n  Audit-plan:  3 rounds, APPROVE\n  Clusters:    A in-cluster H:0 (2 deferred→C); B in-cluster H:0 (autonomous)  ← only if hasClustering\n  Audit-code:  4 rounds, CONVERGED, H:0 M:1 L:2                 ← classic path (no §11)\n  Final gate:  Gemini APPROVE over union diff                  ← only if hasClustering\n  Persona:    0 P0, 1 P1 (deferred)\n  UX-lock:    2 specs generated\n  Ship:       BLOCKED — run: \u002Fship docs\u002Fplans\u002F\u003Cname>.md\n  Total time: 18m\n  Total cost: ~$1.40\n═══════════════════════════════════════\n```\n\n**The `Ship:` line is BLOCKED unless the user already ran `\u002Fship` themselves in\nthis same turn** — Step 7 can never invoke it (see Step 7's note), so\n\"commit abc1234 pushed to main\" is only correct after the human has actually\ntyped `\u002Fship docs\u002Fplans\u002F\u003Cname>.md` and it completed. Never print a commit sha\nhere on the assumption that Step 7 \"ran\" — it didn't.\n\nIf any step was skipped, note why. If any step exited non-success,\nsurface as a warning at the top. For clustered runs, show the per-cluster\ngate result and the preflight outcome.\n\n---\n\n## Hard rules\n\n- **Never auto-fix** between steps without user confirmation — **except** in\n  `--autonomous` mode, where the opt-in flag authorizes within-cluster fixes\n  scoped to the active cluster's derived file set (summaries still surfaced;\n  cross-cluster fixes and persistent non-convergence still hand back).\n- **Never skip `\u002Faudit-plan`** unless explicitly in SKIP_TO_CODE or REMEDIATE mode. SKIP_PLAN skips `\u002Fplan`, not `\u002Faudit-plan`. Never infer \"already accepted\" — there is no mechanical record of which plan content was approved (Step 0).\n- **Never skip `\u002Faudit-code`** unless explicitly in SKIP_TO_SHIP mode (not currently exposed; reserved). REMEDIATE focuses it; it never skips it.\n- **Default is human-orchestrated** — `\u002Fcycle` pauses at the implementation gate (Step 3); only the **opt-in `--autonomous`** flag implements code, and it never activates silently.\n- **`\u002Fcycle` reads the §11 block; it never authors or merges clusters** — it may split-equivalent (defer oversized diffs to `\u002Faudit-code`'s map-reduce) but never merges across a declared boundary. Clustering is the plan's job.\n- **The consolidated Gemini gate is mandatory** after clustered execution, regardless of per-cluster convergence — and Step 3C.2's deferral re-check runs *before* it, so no `deferred-declared` finding survives the run.\n- **A per-cluster fix-gate scores IN-CLUSTER findings only** (Step 4a). Scoring the whole plan against one cluster's diff makes every gate but the last unpassable; deferral is bounded to *later*-cluster scopes and settled at 3C.2. Never widen it to \"pre-existing\" — that is authorship, not schedule.\n- **Cost cap awareness**: estimate total cost upfront from input size and surface it in the kickoff card. A typical full cycle costs $1–3; autonomous clustered runs cost more (one audit per cluster + the final gate).\n\n---\n\n## Reference files\n\nThis skill's canonical flow is above. The files below cover specialised\nsituations — read them only when the trigger applies.\n\n| File | Summary | Read when |\n|---|---|---|\n| `references\u002Finput-acquisition.md` | Where a skill's arguments come from on any host, and what to do when there are none. | The no-dispatch fallback — passing an inlined skill its plan path, sub-command and flags as orchestrator-supplied input (rule 0). |\n| `references\u002Fprerequisite-ladder.md` | Step 0 prerequisite ladder — absent helper bundle or auditor route, and reporting a run that did not happen. | Step 0 — an audit prerequisite did not resolve (helper scripts missing, no GPT route), OR about to report a run that degraded or did not happen. |\n| `references\u002Fverification-discipline.md` | Verification discipline — pinned citations, figure provenance, two-direction proof, attribution, consumer-side checks. | Reporting a degraded or substituted run — §7's coverage rule, which the prerequisite ladder's census rows cite. |\n| `references\u002Fgemini-gate.md` | Step 7 Gemini independent review protocol — transcript, verdict handling, re-review loop. | Autonomous mode's consolidated Gemini gate — building the transcript, OR no `GEMINI_API_KEY` and the degradation ladder decides the substitute. |\n| `references\u002Fremediate-mode.md` | REMEDIATE mode — fix triaged post-ship findings against an accepted plan without replaying the full cycle. | The mode is REMEDIATE (Step R), OR the user asks to skip \u002Faudit-plan because the plan is already accepted. |\n| `references\u002Fclustered-execution.md` | Step 3C detail — cluster-state schema, author-tier hint, scope-flag incident, 4a measurement, round-2 rationale. | Step 3C — first read\u002Fwrite of `.audit\u002Fcycle-cluster-state.json`, an `author-tier:` hint, OR a cluster's scope, class or gate is contested. |\n| `references\u002Forchestration-rationale.md` | Why \u002Fcycle's linear steps are shaped as they are — inline dispatch, plan deps, empty-diff guard, persona URL, ship. | A linear step's rule (Steps 0–7, outside 3C) is questioned or looks safe to skip. |\n| `references\u002Fworktree-preflight.md` | Worktree preflight remedy — the skills:hydrate npm script to add when a linked worktree lacks the tooling tree. | A command dies with `MODULE_NOT_FOUND` in a linked worktree AND this repo has no `skills:hydrate` script. |\n\n— end of \u002Fcycle —\n",{"name":5,"description":53,"allowed-tools":54},"End-to-end feature cycle orchestrator. Runs the full skill chain in\nsequence: \u002Fplan → \u002Faudit-plan → (wait for human implementation) →\n\u002Faudit-code → \u002Fpersona-test (if frontend\u002Ffull-stack) → \u002Fux-lock (if\nfixes shipped) → \u002Fship. Use when starting a new feature or non-trivial\nfix and you want the whole workflow on autopilot. Supports resuming from\nan existing plan or straight to code-audit, per-step skips, max-round\npass-through, an opt-in autonomous mode that implements + audits each\nplan cluster (the default still pauses for the human), and a remediate\nmode that fixes triaged persona-test\u002Faudit findings against an accepted\nplan with a focused audit and a rerun of only the affected journeys.\nTriggers on: \"run the full cycle\", \"do the whole flow\", \"plan + audit\n+ ship\", \"feature cycle\", \"remediate the persona findings\", \"\u002Fcycle\".\nFull command syntax: see the Usage section in this skill.\n","Bash(node scripts\u002Fcross-skill.mjs preview-gate --format human)","main","938efbef34b7c76f0d112f336d1ac4018224d186","skills\u002Fcycle","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills","https:\u002F\u002Fgithub.com\u002FLbstrydom","Studying M.Sc Computer Science at Heriot Watt","2026-11-12 02:12:09",{"source":8,"skillName":5,"commands":63,"prompt":73,"zipAvailable":74},[64,67,70],{"tool":65,"command":66},"npx","npx skills add Lbstrydom\u002Fclaude-engineering-skills --skill cycle",{"tool":68,"command":69},"bunx","bunx skills add Lbstrydom\u002Fclaude-engineering-skills --skill cycle",{"tool":71,"command":72},"pnpm","pnpm dlx skills add Lbstrydom\u002Fclaude-engineering-skills --skill cycle","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002FSKILL.md",true,[76,82,86,90,94,98,102,106,110],{"path":77,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":80,"sourceHtmlUrl":81},"gate-contract.json","REFERENCE","参考文档",45222,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Fgate-contract.json",{"path":83,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":84,"sourceHtmlUrl":85},"references\u002Fclustered-execution.md",5538,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fclustered-execution.md",{"path":87,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":88,"sourceHtmlUrl":89},"references\u002Fgemini-gate.md",18929,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fgemini-gate.md",{"path":91,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Finput-acquisition.md",4511,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Finput-acquisition.md",{"path":95,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Forchestration-rationale.md",3777,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Forchestration-rationale.md",{"path":99,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fprerequisite-ladder.md",6277,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fprerequisite-ladder.md",{"path":103,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":104,"sourceHtmlUrl":105},"references\u002Fremediate-mode.md",10782,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fremediate-mode.md",{"path":107,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":108,"sourceHtmlUrl":109},"references\u002Fverification-discipline.md",28340,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fverification-discipline.md",{"path":111,"resourceType":78,"resourceTypeDesc":79,"sizeBytes":112,"sourceHtmlUrl":113},"references\u002Fworktree-preflight.md",3413,"https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fcycle\u002Freferences\u002Fworktree-preflight.md",[115,133,144,161,173,206],{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":126,"publishedAt":48},"01M6J45X4FDB2AD5BGS4R4QY8X","stated-absent","Negative fixture — the contract's stated string never appears in this file.","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgate-honesty\u002Fnegative\u002Fstated-absent\u002Fskills\u002Fstated-absent\u002FSKILL.md",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000037","律师与法务","PROFESSION","适用职业",[127,128,129,130,131,132],"stated absent","STRING","contract","fixture","never","file",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":140,"publishedAt":48},"01M6J45TAX2PPHETZ5TJZG20QQ","nonexistent-implementation","Negative fixture — contract references an implementation file that does not exist.","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgate-honesty\u002Fnegative\u002Fnonexistent-implementation\u002Fskills\u002Fnonexistent-implementation\u002FSKILL.md",[139],{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},[141,142,143,129,130,132],"implementation","nonexistent implementation","references",{"skillNo":145,"name":146,"nameZh":6,"description":147,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":148,"categories":149,"keywords":153,"publishedAt":48},"01M6J45P5GN52YFMZ81T7NN1VF","document-only-with-params","Negative fixture — a document-only gate illegally carries params (schema must refuse this fake-check pattern).","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgate-honesty\u002Fnegative\u002Fdocument-only-with-params\u002Fskills\u002Fdocument-only-with-params\u002FSKILL.md",[150],{"categoryNo":151,"categoryName":152,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理",[38,154,155,156,157,158,159,160,130],"document","with","document only with params","check","schema","gate","pattern",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":168,"publishedAt":48},"01M6J45J1CCZ7AXDGQKBA9VC8M","lying-skill","Fixture skill for the gate-honesty self-check — every gate here is deliberately dishonest.","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Ftests\u002Ffixtures\u002Fgate-honesty\u002Flying-skill\u002Fskills\u002Flying-skill\u002FSKILL.md",[167],{"categoryNo":24,"categoryName":25,"taxonomyType":21,"taxonomyTypeDesc":22},[169,157,159,170,171,130,172],"lying skill","fixture skill","self","for",{"skillNo":174,"name":175,"nameZh":6,"description":176,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":177,"categories":178,"keywords":188,"publishedAt":48},"01M6J45CW0DNN7K2W39E3PQHEY","visual-audit","Math-first, deterministic visual\u002Fpaint inspection — the 4th UX lens, complementing\npersona-test (journey), click-test (page), and nav-audit (system). Drives Playwright +\ncomputed styles + bounding boxes + CDP forced-pseudo-state to audit declared-token\nconformance, light\u002Fdark theme parity, layout physics, and affordance signifiers. A VLM\nis advisory-only and never gates. CI gate is drift-only on the changed contracted surface.\nTriggers on: \"visual audit\", \"check styling consistency\", \"theme parity\", \"dark mode parity\",\n\"design token drift\", \"paint audit\", \"button\u002Fcard consistency\", \"focus ring audit\",\n\"\u002Fvisual-audit\".","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fvisual-audit\u002FSKILL.md",[179,182,185],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":183,"categoryName":184,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000015","视觉设计",{"categoryNo":186,"categoryName":187,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000032","设计师",[189,190,191,31,192,193,194,195,196,197,45,198,131,38,199,200,201,202,203,204,205],"visual audit","visual","audit","design token","click","inspection","lens","design","ci","math","cdp","journey","drift","focus","physics","layout","card",{"skillNo":207,"name":208,"nameZh":6,"description":209,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":210,"categories":211,"keywords":216,"publishedAt":48},"01M6J4569S40ZASFWW698CHBKP","ux-lock","Generate Playwright e2e specs. Two modes:\n  1. LOCK mode — pin a fix's DOM contract so it doesn't regress (default).\n  2. VERIFY mode — check that a \u002Fplan plan was actually implemented\n     by parsing its Acceptance Criteria section and driving the live URL.\nVERIFY mode grades a plan against a RUNNING app. To judge the plan document\nitself, before anything is built, that is \u002Faudit-plan.\nTriggers on: \"ux lock\", \"lock ux\", \"lock in the fix\", \"write regression spec\",\n\"generate e2e test for\", \"regression test for commit\", \"lock this fix\",\n\"verify the plan\", \"verify plan implementation\", \"check the plan was built\",\n\"audit frontend implementation\", \"did we ship the plan\".\nFull command syntax: see the Usage section in this skill.","https:\u002F\u002Fgithub.com\u002FLbstrydom\u002Fclaude-engineering-skills\u002Fblob\u002Fmain\u002Fskills\u002Fux-lock\u002FSKILL.md",[212,213,214,215],{"categoryNo":180,"categoryName":181,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":186,"categoryName":187,"taxonomyType":124,"taxonomyTypeDesc":125},{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},[217,30,218,31,219,220,221,191,43,222,223,224,225,39,226,27,227,228,229,230,37],"ux lock","ux","commit","generate","acceptance","regression","syntax","command","write","e2e test","app","judge","URL","verify plan"]