[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M75C0C5908SMD71067S8JJGR":3,"skill-same:01M75C0C5908SMD71067S8JJGR":46},{"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":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":6,"ownerDescription":30,"updatedAt":31,"install":32,"resources":45},"01M75C0C5908SMD71067S8JJGR","review-init",null,"Internal helper reached from `superheroes:configure` to refresh review-crew's calibration layer for a project. Not a front door; owners run `superheroes:configure` instead.","zwrose\u002Fsuperheroes","zwrose","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F4790575?v=4","01M75BY6XGBZAMPTCT9R25XXC6","Zach Rose","01M75BY6Y519H0CAD79EFWSW3N",1,"MIT","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Freview-init\u002FSKILL.md",[],[],"2026-11-12 13:55:43",false,"---\nname: review-init\ndescription: \"Internal helper reached from `superheroes:configure` to refresh review-crew's calibration layer for a project. Not a front door; owners run `superheroes:configure` instead.\"\n---\n\nThis skill speaks in host-neutral actions. Resolve them to your runtime's tools by reading the host tool map at `${CLAUDE_PLUGIN_ROOT}\u002Fhosts\u002F\u003Cyour-host>-tools.md` (the leading variable is this plugin's root directory) — `claude-tools.md` on Claude Code, `codex-tools.md` on Codex.\n\n# review-init\n\nGenerate or refresh a project's **review profile** — `.claude\u002Freview-profile.md` —\nthe per-project calibration the review-crew engine reads (threat model, verify\ncommand, scope, focus hints, canonical patterns). Two modes: **create** (no\nprofile yet) and **reconcile** (profile exists → re-detect and migrate).\n\n## The profile is a CLAUDE.md-aware ADDER\n\nThe profile carries ONLY what the project's `CLAUDE.md` does not already cover.\nRead `CLAUDE.md` first; never duplicate its conventions into the profile —\n`## Conventions` points at `CLAUDE.md`. Skip any interview question whose answer\nis already clear from detection or `CLAUDE.md`.\n\n## Step 1 — Detect (no questions where the repo answers)\n\nRun these and read the results; do not ask the user what you can observe:\n\n```bash\nROOT=$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull || pwd)\n# Package manager \u002F stack\nls \"$ROOT\"\u002Fpackage.json \"$ROOT\"\u002Fpyproject.toml \"$ROOT\"\u002FCargo.toml \"$ROOT\"\u002Fgo.mod 2>\u002Fdev\u002Fnull\n# Verify-command candidates (JS): a fast-check script first, else a \"check\"\u002F\"test\" script\n[ -f \"$ROOT\u002Fpackage.json\" ] && python3 -B -c \"import json;print(json.load(open('$ROOT\u002Fpackage.json')).get('scripts',{}))\" 2>\u002Fdev\u002Fnull\n# Default branch\ngit symbolic-ref --quiet refs\u002Fremotes\u002Forigin\u002FHEAD 2>\u002Fdev\u002Fnull | sed 's@^refs\u002Fremotes\u002Forigin\u002F@@' \\\n  || git rev-parse --abbrev-ref HEAD\n# Forge\ngit remote get-url origin 2>\u002Fdev\u002Fnull\n# Top-level source dirs\nls -d \"$ROOT\"\u002Fsrc \"$ROOT\"\u002Flib \"$ROOT\"\u002Fapp 2>\u002Fdev\u002Fnull\n```\n\nDerive: **package manager \u002F framework \u002F test runner**; a **verify-command**\ncandidate — prefer the project's **fast iteration check**, a single script it already defines that\nruns lint, types or the touched tests (for example `check:fast` or `test:changed`); only when it has\nnone, fall back to the full gate (`npm run check` → `npm test` → `pnpm\u002Fyarn` equivalents →\n`make check`) → none (`skills\u002Fconfigure\u002Freference\u002Fset-up.md` § 3 says why); **default-branch** (the `git symbolic-ref` result, else current branch);\n**forge** (`github` if the remote host is github.com, `gitlab` if gitlab.*, else\n`none`); **dep-set** (top-level dependency names, with major version where cheap);\n**src-dirs**. Also **read `CLAUDE.md`** (root and any nested) to learn what\nconventions\u002Fthreat context it already states.\n\nRead the engine versions for provenance:\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nsed -n '1p' \"$ROOT_DIR\u002Frubric\u002Freview-base.md\"          # -> \u003C!-- rubric-version: N -->\npython3 -B -c \"import json;print(json.load(open('$ROOT_DIR\u002F.claude-plugin\u002Fplugin.json'))['version'])\"\n```\n\n## Step 2 — Choose mode\n\nResolve where the profile lives (it may be in-repo under `.\u002F.claude\u002F` or in the\nglobal per-repo store). `review_store.py resolve` returns the resolved path, or\n`location: none` when no profile exists yet:\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nRES=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" resolve --kind profile) \\\n  || RES='{\"location\":\"none\",\"exists\":false,\"path\":null}'\nLOCATION=$(printf '%s' \"$RES\" | jq -r .location)\nPROFILE=$(printf '%s' \"$RES\" | jq -r '.path \u002F\u002F empty')\n# FR-7\u002F8: surface the single coalesced storage-mode reconcile nudge (non-blocking, ack-gated).\nNUDGE_MSG=$(python3 -B \"$ROOT_DIR\u002Flib\u002Fmode_reconcile.py\" signals 2>\u002Fdev\u002Fnull | jq -r 'if . == null then empty else .message end' 2>\u002Fdev\u002Fnull)\n[ -n \"$NUDGE_MSG\" ] && echo \"⚠ storage-mode: $NUDGE_MSG\"\n```\n\nIf `$LOCATION` is not `none` (a profile resolved at `$PROFILE`) → **Reconcile**\n(Step 5). Otherwise (`$LOCATION` is `none`) → **Create** (Steps 3–4); decide the\nstorage location and mint the path before writing:\n\n\u003C!-- decision-point: id=review-init-storage-location mode=notify kind=storage-location default=\"returned .mode (recorded when configured, else the lib's provisional default)\" carrier=review-crew-layer -->\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nif [ \"$LOCATION\" = \"none\" ]; then\n  DEC=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" decide-location) || { echo \"decide-location exited non-zero (exit $?); halting rather than taking an undisclosed storage default\" >&2; exit 1; }\n  LOC=$(printf '%s' \"$DEC\" | jq -r '.mode')            # \"in-repo\" | \"global\" — never \"ask\"\n  SOURCE=$(printf '%s' \"$DEC\" | jq -r '.source')\n  PROVISIONAL=$(printf '%s' \"$DEC\" | jq -r '.provisional')   # \"true\" | \"false\"\n  [ -n \"$LOC\" ] && [ -n \"$PROVISIONAL\" ] && [ -n \"$SOURCE\" ] || { echo \"decide-location returned no usable decision; halting rather than taking an undisclosed storage default\" >&2; exit 1; }\n  PROFILE=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" create --kind profile --location \"$LOC\")\nfi\n```\n\n**Storage location (`decide-location`).** `decide-location` returns JSON: `.mode` is `in-repo` or\n`global` (`ask` no longer exists); `.source` is where the decision came from: `env` (environment\noverride `REVIEW_CREW_STORAGE` for this run only; never recorded), `registry` (a mode the owner\nrecorded; authoritative), `backfilled` (a mode inferred from consistent existing evidence and then\nrecorded), `provisional` (nothing recorded and no consistent evidence; the lib's default, re-taken\nnext run); `.provisional` is `true` when the mode was not owner-recorded. **Default:**\nthe returned `.mode` (recorded when configured, else the lib's provisional default). Bootstrap\nblocks never record — an unrecorded mode is re-taken next run. **Disclosure.** Write into the\n**review-crew layer body** (`$REVIEW_LAYER_BODY`, written through `core_md.py write-layer` in Step\n4b — a `## Setup disclosures` section, not the generated provenance block): the storage mode\ntaken, its source, whether it is provisional, and that `\u002Fsuperheroes:configure` changes it. When\n`.provisional` is `true`, also state that it is a provisional default rather than an owner choice\nand will be re-taken on the next run when not recorded. **Follow-up:** `\u002Fsuperheroes:configure`.\nThe minted `$PROFILE` is the path Step 4 writes to.\nNOTIFY: take the returned `.mode` from `decide-location`, record mode\u002Fsource\u002Fprovisional status in\n`## Setup disclosures` within `$REVIEW_LAYER_BODY`, and the run continues. Follow-up:\n`\u002Fsuperheroes:configure`.\n\u003C!-- \u002Fdecision-point: id=review-init-storage-location -->\n\n## Step 3 — Create: detection + defaults (no interview)\n\nDo not interview. Build the profile from Step 1 detection + `CLAUDE.md` + named provisional\ndefaults. Write `status: provisional` always on this path — the interview branch that produced\n`status: confirmed` is retired; only `\u002Fsuperheroes:configure` confirms a profile that has a verify\ncommand. State in the **review-crew layer body** (`$REVIEW_LAYER_BODY`, `## Setup disclosures`\nsection piped to `core_md.py write-layer` in Step 4b) which fields were defaulted rather than\nanswered.\n\nDefaults when detection + `CLAUDE.md` did not answer:\n\n1. **Threat model** — `strict` (provisional default when unknown).\n2. **Verify command** — if none was detected, record none (`verifyCommand` left unset in\n   `$CORE_FACTS_JSON`) and disclose in `## Setup disclosures` the message the resolver gives: once the\n   core is written (Step 4b), run `python3 -B \"$ROOT_DIR\u002Flib\u002Freview_code_config.py\"` from the\n   project root and quote its `verifyRefusal.message`, which tells the owner code review is not\n   available until a verify command is set. If\n   only a full-gate candidate was detected, propose it and disclose that\n   `skills\u002Fconfigure\u002Freference\u002Fset-up.md` § 3 advises a fast iteration check, which the owner can\n   set through `\u002Fsuperheroes:configure`.\n3. **Scope exclusions** — none (provisional default).\n\nIf **no `CLAUDE.md` exists**, record a minimal conventions pointer in `## Conventions` (point at\n`CLAUDE.md` once the owner adds one); do not generate or commit `CLAUDE.md` here.\n\n## Step 4 — Create: seed canonical patterns, assemble core + layer bodies\n\nSeed `## Canonical patterns` by detection — grep for the project's own idioms so\ngeneralized agents stay sharp (each is `pattern: file:line`):\n\n```bash\ngrep -rnE \"getServerSession|requireAuth|withAuth|authorize\\(\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1   # auth wrapper\ngrep -rlE \"export const [A-Z_]+_ERRORS|errors?\\.(ts|js|py)$\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1     # error constants\ngrep -rnE \"userId|ownerId|tenantId\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1                              # ownership idiom\n```\n\nRecord only patterns you actually found. From the Step 3 interview, assemble two payloads —\n**do not** write the legacy single-file template to `$PROFILE` (that path is the unified layer\nfile; clobbering it breaks dispatch):\n\n- `$CORE_FACTS_JSON` — JSON for `core_md.py write`: `verifyCommand`, `stackTags`, `threatModel`,\n  `patterns` (canonical patterns block as a string).\n- `$REVIEW_LAYER_BODY` — markdown body for `core_md.py write-layer`: `## Setup disclosures`\n  (storage mode, source, provisional status, and `\u002Fsuperheroes:configure` follow-up from Step 2\n  when bootstrap ran), `## Scope exclusions`, `## Focus hints`, `## Conventions` (hero-owned\n  sections only; no provenance block).\n\nProceed to Step 4b to write both files. When the layer path is in-repo (under\n`.\u002F.claude\u002Fsuperheroes\u002F`), **do not commit** — write the files and leave them **uncommitted and\nuntracked**. State that in the run output; the owner commits via git or confirms via\n`\u002Fsuperheroes:configure`.\n\n`status` is always `provisional` on this create path; `confirmed` is reached only through\n`\u002Fsuperheroes:configure` after a verify command is set.\n\n### Step 4b — Write the shared brain (core.md) + the review-crew layer\n\nThe shared facts (stack, verify command, threat model, canonical patterns) belong in\nthe band-wide `core.md`; review-crew's own sections (scope exclusions, focus hints,\nconventions) belong in its layer `review-crew.md`. Both are written through the lib —\nnever hand-format core.md (CONVENTIONS §2.2). Always pass `--status provisional` on this create path\n(FR-5); `confirmed` is reached only via `\u002Fsuperheroes:configure`:\n\nFail-closed guard below — not the mechanical-carrier redesign: it refuses to execute a write whose\npiped input is missing, because `write-layer` replaces the entire layer file.\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nSTATUS=provisional   # always on this create path; confirmed only via \u002Fsuperheroes:configure (FR-5)\n[ -n \"$CORE_FACTS_JSON\" ] && [ -n \"$REVIEW_LAYER_BODY\" ] || { echo \"assembly produced empty payloads; halting rather than writing an empty layer\" >&2; exit 1; }\n# CREATE: shared facts → core.md (lock-guarded, reuse-not-clobber FR-6\u002FFR-7; a\n# `proposed`\u002F`deferred` action is surfaced, never silently overwritten).\nprintf '%s' \"$CORE_FACTS_JSON\" \\\n  | python3 -B \"$ROOT_DIR\u002Flib\u002Fcore_md.py\" write --status \"$STATUS\"\n# No verify command recorded: run lib\u002Freview_code_config.py now and add its verifyRefusal.message\n# to the `## Setup disclosures` section of $REVIEW_LAYER_BODY before the layer is written (Step 3).\n# CREATE: review-crew's own sections → its layer file (FR-3).\nprintf '%s' \"$REVIEW_LAYER_BODY\" \\\n  | python3 -B \"$ROOT_DIR\u002Flib\u002Fcore_md.py\" write-layer --hero review-crew --status \"$STATUS\" --rubric-version \"$RUBRIC_VERSION\"\n```\n\n`write` above is the **create** path: on an existing core it returns `reused`\u002F`proposed`\u002F`refused`\u002F`deferred`.\nA `refused` result (including `fable-on-external-engine`, `core-md-unreadable`, or\n`dispatch-gate-evaluation-failed`) means the write did not apply — surface the `violations` to the\nowner and **stop**; never proceed to write the layer as if the write had succeeded. On refusal the\n`## Setup disclosures` block (including which fields were defaulted) never lands in the review-crew\nlayer — those disclosures are stated in the run output instead, naming which fields were\ndefaulted, so a refused write does not silently take the disclosure with it. For\n`core-md-unreadable`, the existing `core.md` could not be read, so the write was refused rather than\noverwriting it — surface the path from the violation's `detail` to the owner. On a successful create path without refusal, `reused`\u002F`proposed`\napply as before. Confirming a pre-existing **provisional** core\u002Flayer is a separate path —\n`core_md.py confirm` (reached from `superheroes:configure`'s fix flow), which re-renders the core\nand surgically flips each layer, preserving `created`\u002F`nudge-ack` and bumping `updated` (FR-18).\n\nOn **reconcile** (a pre-existing legacy profile), nothing is adopted automatically —\n`core_md.resolve_shared` returns the `legacy-profile-unsupported` refusal, surfaced to the owner\nwith its `remedy` and routed to `superheroes:configure` — there are no shared facts to read yet;\nthe owner must re-calibrate through configure first (`core_md resolve` is only meaningful after\n`core.md` exists). Settle any ambiguous\u002Fprovisional state through the single coalesced reconcile\nnudge (already surfaced in Step 2). See CONVENTIONS §2.1 (layout) and §2.2 (format).\n\n## Step 5 — Reconcile (profile already exists)\n\n1. Read the existing profile and its `schema:`.\n2. **Read-side guard:** if the profile's `schema` is **higher** than this plugin\n   supports (the template's `schema` above), STOP with a loud message\n   (\"profile schema N is newer than this review-crew; upgrade the plugin\") and do\n   not rewrite it — degrade conservatively (strict posture) rather than misread\n   newer fields.\n3. **Apply migrations** for each step between the profile's `schema` and the\n   plugin's. *(Schema 1 is current; there are no migration steps yet. When a\n   future schema adds\u002Frenames fields, each `N→N+1` step is listed here and applied\n   in order.)*\n4. Re-read `CLAUDE.md` and re-detect (Step 1). Compute proposed changes: new\n   `dep-set`, changed `default-branch`\u002F`forge`, newly-covered-by-CLAUDE.md items\n   to drop from the profile, etc.\n   **Detect `rubric-version` drift.** Read the engine's current rubric-version\n   (Step 1: the `\u003C!-- rubric-version: N -->` line of `review-base.md`). If the profile's\n   `rubric-version` is **lower** than the engine's, flag\n   it as drift in the proposed-changes diff (\"rubric-version M→N: the review rubric\n   has advanced; recalibrating\") and update it on write (step 7). This is the same\n   signal `repo_doctor.py` surfaces as a staleness nudge during a review — reconcile\n   is where it actually gets cleared.\n5. **Migration rules:** unknown `## ` sections\u002Fkeys are **preserved verbatim**\n   (forward-compat); missing fields are filled per the create defaults only when\n   safe; never silently delete user calibration. The `nudge-ack` map is user\n   state — **preserve it verbatim** across the reconcile (do not reset acks the\n   user has already dismissed). Add the `nudge-ack:` field (empty `{}`) only if an\n   older profile predates it.\n6. **Do not apply by default.** Write the proposed-changes **diff** into the run output as\n   disclosure (the conservative default — this path can overwrite user calibration). Point the\n   owner at `\u002Fsuperheroes:configure` to apply, edit, or skip. Preserve all hand-edits below the\n   provenance block unless the owner approves a change through configure.\n7. Write the profile only when the owner applies via `\u002Fsuperheroes:configure`; on this init path\n   without an explicit apply, **do not write** the reconciled profile — the diff disclosure is the\n   hand-back. When configure applies: bump `updated:` and refresh `signals` + `rubric-version` +\n   `plugin` (set `rubric-version` to the engine's current value, clearing any\n   drift detected in step 4). **Preserve the `nudge-ack` map** (carry the existing\n   acks forward unchanged). `status` stays `provisional` until `\u002Fsuperheroes:configure` confirms\n   with a verify command set.\n\n## Common mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Duplicating CLAUDE.md conventions into the profile | The profile is an adder — point `## Conventions` at CLAUDE.md; only add gaps. |\n| Asking the user something detection\u002FCLAUDE.md already answers | Detect and read first; the interview covers only the remainder. |\n| Rewriting a profile from a newer schema | Honor the read-side guard: stop and tell the user to upgrade. |\n| Silently dropping hand-edits on reconcile | Preserve everything below provenance; show a diff; only change on approval. |\n| Editing the user's build config to \"set up\" a verify command | Propose the command; let the user add it. |\n","This skill speaks in host-neutral actions. Resolve them to your runtime's tools by reading the host tool map at `${CLAUDE_PLUGIN_ROOT}\u002Fhosts\u002F\u003Cyour-host>-tools.md` (the leading variable is this plugin's root directory) — `claude-tools.md` on Claude Code, `codex-tools.md` on Codex.\n\n# review-init\n\nGenerate or refresh a project's **review profile** — `.claude\u002Freview-profile.md` —\nthe per-project calibration the review-crew engine reads (threat model, verify\ncommand, scope, focus hints, canonical patterns). Two modes: **create** (no\nprofile yet) and **reconcile** (profile exists → re-detect and migrate).\n\n## The profile is a CLAUDE.md-aware ADDER\n\nThe profile carries ONLY what the project's `CLAUDE.md` does not already cover.\nRead `CLAUDE.md` first; never duplicate its conventions into the profile —\n`## Conventions` points at `CLAUDE.md`. Skip any interview question whose answer\nis already clear from detection or `CLAUDE.md`.\n\n## Step 1 — Detect (no questions where the repo answers)\n\nRun these and read the results; do not ask the user what you can observe:\n\n```bash\nROOT=$(git rev-parse --show-toplevel 2>\u002Fdev\u002Fnull || pwd)\n# Package manager \u002F stack\nls \"$ROOT\"\u002Fpackage.json \"$ROOT\"\u002Fpyproject.toml \"$ROOT\"\u002FCargo.toml \"$ROOT\"\u002Fgo.mod 2>\u002Fdev\u002Fnull\n# Verify-command candidates (JS): a fast-check script first, else a \"check\"\u002F\"test\" script\n[ -f \"$ROOT\u002Fpackage.json\" ] && python3 -B -c \"import json;print(json.load(open('$ROOT\u002Fpackage.json')).get('scripts',{}))\" 2>\u002Fdev\u002Fnull\n# Default branch\ngit symbolic-ref --quiet refs\u002Fremotes\u002Forigin\u002FHEAD 2>\u002Fdev\u002Fnull | sed 's@^refs\u002Fremotes\u002Forigin\u002F@@' \\\n  || git rev-parse --abbrev-ref HEAD\n# Forge\ngit remote get-url origin 2>\u002Fdev\u002Fnull\n# Top-level source dirs\nls -d \"$ROOT\"\u002Fsrc \"$ROOT\"\u002Flib \"$ROOT\"\u002Fapp 2>\u002Fdev\u002Fnull\n```\n\nDerive: **package manager \u002F framework \u002F test runner**; a **verify-command**\ncandidate — prefer the project's **fast iteration check**, a single script it already defines that\nruns lint, types or the touched tests (for example `check:fast` or `test:changed`); only when it has\nnone, fall back to the full gate (`npm run check` → `npm test` → `pnpm\u002Fyarn` equivalents →\n`make check`) → none (`skills\u002Fconfigure\u002Freference\u002Fset-up.md` § 3 says why); **default-branch** (the `git symbolic-ref` result, else current branch);\n**forge** (`github` if the remote host is github.com, `gitlab` if gitlab.*, else\n`none`); **dep-set** (top-level dependency names, with major version where cheap);\n**src-dirs**. Also **read `CLAUDE.md`** (root and any nested) to learn what\nconventions\u002Fthreat context it already states.\n\nRead the engine versions for provenance:\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nsed -n '1p' \"$ROOT_DIR\u002Frubric\u002Freview-base.md\"          # -> \u003C!-- rubric-version: N -->\npython3 -B -c \"import json;print(json.load(open('$ROOT_DIR\u002F.claude-plugin\u002Fplugin.json'))['version'])\"\n```\n\n## Step 2 — Choose mode\n\nResolve where the profile lives (it may be in-repo under `.\u002F.claude\u002F` or in the\nglobal per-repo store). `review_store.py resolve` returns the resolved path, or\n`location: none` when no profile exists yet:\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nRES=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" resolve --kind profile) \\\n  || RES='{\"location\":\"none\",\"exists\":false,\"path\":null}'\nLOCATION=$(printf '%s' \"$RES\" | jq -r .location)\nPROFILE=$(printf '%s' \"$RES\" | jq -r '.path \u002F\u002F empty')\n# FR-7\u002F8: surface the single coalesced storage-mode reconcile nudge (non-blocking, ack-gated).\nNUDGE_MSG=$(python3 -B \"$ROOT_DIR\u002Flib\u002Fmode_reconcile.py\" signals 2>\u002Fdev\u002Fnull | jq -r 'if . == null then empty else .message end' 2>\u002Fdev\u002Fnull)\n[ -n \"$NUDGE_MSG\" ] && echo \"⚠ storage-mode: $NUDGE_MSG\"\n```\n\nIf `$LOCATION` is not `none` (a profile resolved at `$PROFILE`) → **Reconcile**\n(Step 5). Otherwise (`$LOCATION` is `none`) → **Create** (Steps 3–4); decide the\nstorage location and mint the path before writing:\n\n\u003C!-- decision-point: id=review-init-storage-location mode=notify kind=storage-location default=\"returned .mode (recorded when configured, else the lib's provisional default)\" carrier=review-crew-layer -->\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nif [ \"$LOCATION\" = \"none\" ]; then\n  DEC=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" decide-location) || { echo \"decide-location exited non-zero (exit $?); halting rather than taking an undisclosed storage default\" >&2; exit 1; }\n  LOC=$(printf '%s' \"$DEC\" | jq -r '.mode')            # \"in-repo\" | \"global\" — never \"ask\"\n  SOURCE=$(printf '%s' \"$DEC\" | jq -r '.source')\n  PROVISIONAL=$(printf '%s' \"$DEC\" | jq -r '.provisional')   # \"true\" | \"false\"\n  [ -n \"$LOC\" ] && [ -n \"$PROVISIONAL\" ] && [ -n \"$SOURCE\" ] || { echo \"decide-location returned no usable decision; halting rather than taking an undisclosed storage default\" >&2; exit 1; }\n  PROFILE=$(python3 -B \"$ROOT_DIR\u002Flib\u002Freview_store.py\" create --kind profile --location \"$LOC\")\nfi\n```\n\n**Storage location (`decide-location`).** `decide-location` returns JSON: `.mode` is `in-repo` or\n`global` (`ask` no longer exists); `.source` is where the decision came from: `env` (environment\noverride `REVIEW_CREW_STORAGE` for this run only; never recorded), `registry` (a mode the owner\nrecorded; authoritative), `backfilled` (a mode inferred from consistent existing evidence and then\nrecorded), `provisional` (nothing recorded and no consistent evidence; the lib's default, re-taken\nnext run); `.provisional` is `true` when the mode was not owner-recorded. **Default:**\nthe returned `.mode` (recorded when configured, else the lib's provisional default). Bootstrap\nblocks never record — an unrecorded mode is re-taken next run. **Disclosure.** Write into the\n**review-crew layer body** (`$REVIEW_LAYER_BODY`, written through `core_md.py write-layer` in Step\n4b — a `## Setup disclosures` section, not the generated provenance block): the storage mode\ntaken, its source, whether it is provisional, and that `\u002Fsuperheroes:configure` changes it. When\n`.provisional` is `true`, also state that it is a provisional default rather than an owner choice\nand will be re-taken on the next run when not recorded. **Follow-up:** `\u002Fsuperheroes:configure`.\nThe minted `$PROFILE` is the path Step 4 writes to.\nNOTIFY: take the returned `.mode` from `decide-location`, record mode\u002Fsource\u002Fprovisional status in\n`## Setup disclosures` within `$REVIEW_LAYER_BODY`, and the run continues. Follow-up:\n`\u002Fsuperheroes:configure`.\n\u003C!-- \u002Fdecision-point: id=review-init-storage-location -->\n\n## Step 3 — Create: detection + defaults (no interview)\n\nDo not interview. Build the profile from Step 1 detection + `CLAUDE.md` + named provisional\ndefaults. Write `status: provisional` always on this path — the interview branch that produced\n`status: confirmed` is retired; only `\u002Fsuperheroes:configure` confirms a profile that has a verify\ncommand. State in the **review-crew layer body** (`$REVIEW_LAYER_BODY`, `## Setup disclosures`\nsection piped to `core_md.py write-layer` in Step 4b) which fields were defaulted rather than\nanswered.\n\nDefaults when detection + `CLAUDE.md` did not answer:\n\n1. **Threat model** — `strict` (provisional default when unknown).\n2. **Verify command** — if none was detected, record none (`verifyCommand` left unset in\n   `$CORE_FACTS_JSON`) and disclose in `## Setup disclosures` the message the resolver gives: once the\n   core is written (Step 4b), run `python3 -B \"$ROOT_DIR\u002Flib\u002Freview_code_config.py\"` from the\n   project root and quote its `verifyRefusal.message`, which tells the owner code review is not\n   available until a verify command is set. If\n   only a full-gate candidate was detected, propose it and disclose that\n   `skills\u002Fconfigure\u002Freference\u002Fset-up.md` § 3 advises a fast iteration check, which the owner can\n   set through `\u002Fsuperheroes:configure`.\n3. **Scope exclusions** — none (provisional default).\n\nIf **no `CLAUDE.md` exists**, record a minimal conventions pointer in `## Conventions` (point at\n`CLAUDE.md` once the owner adds one); do not generate or commit `CLAUDE.md` here.\n\n## Step 4 — Create: seed canonical patterns, assemble core + layer bodies\n\nSeed `## Canonical patterns` by detection — grep for the project's own idioms so\ngeneralized agents stay sharp (each is `pattern: file:line`):\n\n```bash\ngrep -rnE \"getServerSession|requireAuth|withAuth|authorize\\(\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1   # auth wrapper\ngrep -rlE \"export const [A-Z_]+_ERRORS|errors?\\.(ts|js|py)$\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1     # error constants\ngrep -rnE \"userId|ownerId|tenantId\" \"$ROOT\"\u002Fsrc 2>\u002Fdev\u002Fnull | head -1                              # ownership idiom\n```\n\nRecord only patterns you actually found. From the Step 3 interview, assemble two payloads —\n**do not** write the legacy single-file template to `$PROFILE` (that path is the unified layer\nfile; clobbering it breaks dispatch):\n\n- `$CORE_FACTS_JSON` — JSON for `core_md.py write`: `verifyCommand`, `stackTags`, `threatModel`,\n  `patterns` (canonical patterns block as a string).\n- `$REVIEW_LAYER_BODY` — markdown body for `core_md.py write-layer`: `## Setup disclosures`\n  (storage mode, source, provisional status, and `\u002Fsuperheroes:configure` follow-up from Step 2\n  when bootstrap ran), `## Scope exclusions`, `## Focus hints`, `## Conventions` (hero-owned\n  sections only; no provenance block).\n\nProceed to Step 4b to write both files. When the layer path is in-repo (under\n`.\u002F.claude\u002Fsuperheroes\u002F`), **do not commit** — write the files and leave them **uncommitted and\nuntracked**. State that in the run output; the owner commits via git or confirms via\n`\u002Fsuperheroes:configure`.\n\n`status` is always `provisional` on this create path; `confirmed` is reached only through\n`\u002Fsuperheroes:configure` after a verify command is set.\n\n### Step 4b — Write the shared brain (core.md) + the review-crew layer\n\nThe shared facts (stack, verify command, threat model, canonical patterns) belong in\nthe band-wide `core.md`; review-crew's own sections (scope exclusions, focus hints,\nconventions) belong in its layer `review-crew.md`. Both are written through the lib —\nnever hand-format core.md (CONVENTIONS §2.2). Always pass `--status provisional` on this create path\n(FR-5); `confirmed` is reached only via `\u002Fsuperheroes:configure`:\n\nFail-closed guard below — not the mechanical-carrier redesign: it refuses to execute a write whose\npiped input is missing, because `write-layer` replaces the entire layer file.\n\n```bash\nROOT_DIR=\"${CLAUDE_PLUGIN_ROOT}\"\nSTATUS=provisional   # always on this create path; confirmed only via \u002Fsuperheroes:configure (FR-5)\n[ -n \"$CORE_FACTS_JSON\" ] && [ -n \"$REVIEW_LAYER_BODY\" ] || { echo \"assembly produced empty payloads; halting rather than writing an empty layer\" >&2; exit 1; }\n# CREATE: shared facts → core.md (lock-guarded, reuse-not-clobber FR-6\u002FFR-7; a\n# `proposed`\u002F`deferred` action is surfaced, never silently overwritten).\nprintf '%s' \"$CORE_FACTS_JSON\" \\\n  | python3 -B \"$ROOT_DIR\u002Flib\u002Fcore_md.py\" write --status \"$STATUS\"\n# No verify command recorded: run lib\u002Freview_code_config.py now and add its verifyRefusal.message\n# to the `## Setup disclosures` section of $REVIEW_LAYER_BODY before the layer is written (Step 3).\n# CREATE: review-crew's own sections → its layer file (FR-3).\nprintf '%s' \"$REVIEW_LAYER_BODY\" \\\n  | python3 -B \"$ROOT_DIR\u002Flib\u002Fcore_md.py\" write-layer --hero review-crew --status \"$STATUS\" --rubric-version \"$RUBRIC_VERSION\"\n```\n\n`write` above is the **create** path: on an existing core it returns `reused`\u002F`proposed`\u002F`refused`\u002F`deferred`.\nA `refused` result (including `fable-on-external-engine`, `core-md-unreadable`, or\n`dispatch-gate-evaluation-failed`) means the write did not apply — surface the `violations` to the\nowner and **stop**; never proceed to write the layer as if the write had succeeded. On refusal the\n`## Setup disclosures` block (including which fields were defaulted) never lands in the review-crew\nlayer — those disclosures are stated in the run output instead, naming which fields were\ndefaulted, so a refused write does not silently take the disclosure with it. For\n`core-md-unreadable`, the existing `core.md` could not be read, so the write was refused rather than\noverwriting it — surface the path from the violation's `detail` to the owner. On a successful create path without refusal, `reused`\u002F`proposed`\napply as before. Confirming a pre-existing **provisional** core\u002Flayer is a separate path —\n`core_md.py confirm` (reached from `superheroes:configure`'s fix flow), which re-renders the core\nand surgically flips each layer, preserving `created`\u002F`nudge-ack` and bumping `updated` (FR-18).\n\nOn **reconcile** (a pre-existing legacy profile), nothing is adopted automatically —\n`core_md.resolve_shared` returns the `legacy-profile-unsupported` refusal, surfaced to the owner\nwith its `remedy` and routed to `superheroes:configure` — there are no shared facts to read yet;\nthe owner must re-calibrate through configure first (`core_md resolve` is only meaningful after\n`core.md` exists). Settle any ambiguous\u002Fprovisional state through the single coalesced reconcile\nnudge (already surfaced in Step 2). See CONVENTIONS §2.1 (layout) and §2.2 (format).\n\n## Step 5 — Reconcile (profile already exists)\n\n1. Read the existing profile and its `schema:`.\n2. **Read-side guard:** if the profile's `schema` is **higher** than this plugin\n   supports (the template's `schema` above), STOP with a loud message\n   (\"profile schema N is newer than this review-crew; upgrade the plugin\") and do\n   not rewrite it — degrade conservatively (strict posture) rather than misread\n   newer fields.\n3. **Apply migrations** for each step between the profile's `schema` and the\n   plugin's. *(Schema 1 is current; there are no migration steps yet. When a\n   future schema adds\u002Frenames fields, each `N→N+1` step is listed here and applied\n   in order.)*\n4. Re-read `CLAUDE.md` and re-detect (Step 1). Compute proposed changes: new\n   `dep-set`, changed `default-branch`\u002F`forge`, newly-covered-by-CLAUDE.md items\n   to drop from the profile, etc.\n   **Detect `rubric-version` drift.** Read the engine's current rubric-version\n   (Step 1: the `\u003C!-- rubric-version: N -->` line of `review-base.md`). If the profile's\n   `rubric-version` is **lower** than the engine's, flag\n   it as drift in the proposed-changes diff (\"rubric-version M→N: the review rubric\n   has advanced; recalibrating\") and update it on write (step 7). This is the same\n   signal `repo_doctor.py` surfaces as a staleness nudge during a review — reconcile\n   is where it actually gets cleared.\n5. **Migration rules:** unknown `## ` sections\u002Fkeys are **preserved verbatim**\n   (forward-compat); missing fields are filled per the create defaults only when\n   safe; never silently delete user calibration. The `nudge-ack` map is user\n   state — **preserve it verbatim** across the reconcile (do not reset acks the\n   user has already dismissed). Add the `nudge-ack:` field (empty `{}`) only if an\n   older profile predates it.\n6. **Do not apply by default.** Write the proposed-changes **diff** into the run output as\n   disclosure (the conservative default — this path can overwrite user calibration). Point the\n   owner at `\u002Fsuperheroes:configure` to apply, edit, or skip. Preserve all hand-edits below the\n   provenance block unless the owner approves a change through configure.\n7. Write the profile only when the owner applies via `\u002Fsuperheroes:configure`; on this init path\n   without an explicit apply, **do not write** the reconciled profile — the diff disclosure is the\n   hand-back. When configure applies: bump `updated:` and refresh `signals` + `rubric-version` +\n   `plugin` (set `rubric-version` to the engine's current value, clearing any\n   drift detected in step 4). **Preserve the `nudge-ack` map** (carry the existing\n   acks forward unchanged). `status` stays `provisional` until `\u002Fsuperheroes:configure` confirms\n   with a verify command set.\n\n## Common mistakes\n\n| Mistake | Fix |\n| --- | --- |\n| Duplicating CLAUDE.md conventions into the profile | The profile is an adder — point `## Conventions` at CLAUDE.md; only add gaps. |\n| Asking the user something detection\u002FCLAUDE.md already answers | Detect and read first; the interview covers only the remainder. |\n| Rewriting a profile from a newer schema | Honor the read-side guard: stop and tell the user to upgrade. |\n| Silently dropping hand-edits on reconcile | Preserve everything below provenance; show a diff; only change on approval. |\n| Editing the user's build config to \"set up\" a verify command | Propose the command; let the user add it. |\n",{"name":5,"description":7},"main","29c87a13937804687577d3b71e3005f63883f35c","plugins\u002Fsuperheroes\u002Fskills\u002Freview-init",0,"https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes","https:\u002F\u002Fgithub.com\u002Fzwrose","Learning, tinkering, and other such stuff. ","2026-11-15 04:46:57",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add zwrose\u002Fsuperheroes --skill review-init",{"tool":38,"command":39},"bunx","bunx skills add zwrose\u002Fsuperheroes --skill review-init",{"tool":41,"command":42},"pnpm","pnpm dlx skills add zwrose\u002Fsuperheroes --skill review-init","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Freview-init\u002FSKILL.md",true,[],[47,54,61,68,75,82],{"skillNo":48,"name":49,"nameZh":6,"description":50,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":51,"categories":52,"keywords":53,"publishedAt":19},"01M75C14YXJ1W26N03VHRDP38K","test-pilot-plan","Use when a PR\u002Fbranch needs a manual test plan with seeded data — \"write a test plan\", \"seed test data for this PR\", \"set up manual testing\". Seeds scenarios via the test-pilot engine and posts a checkbox plan to the PR. Does NOT execute the plan (that is test-pilot-execute).","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Ftest-pilot-plan\u002FSKILL.md",[],[],{"skillNo":55,"name":56,"nameZh":6,"description":57,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":58,"categories":59,"keywords":60,"publishedAt":19},"01M75C11VXVBT356RSPSYFHM2W","test-pilot-init","Internal helper reached from `superheroes:configure` to refresh test-pilot's profile, seeding blocks, and browser tooling layer. Not a front door; owners run `superheroes:configure` instead.","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Ftest-pilot-init\u002FSKILL.md",[],[],{"skillNo":62,"name":63,"nameZh":6,"description":64,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":19},"01M75C0YKSEDN9TQCSA2MY01WQ","test-pilot-execute","Use when a test-pilot plan should be exercised before human spot-check — \"run the test plan\", \"pilot this PR\", \"verify the branch in the browser\". Drives the app via a browser MCP, or the lane's simulated iPhone, and posts a results comment. Observe-and-report only — a bug it finds is a finding, never an edit.","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Ftest-pilot-execute\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":72,"categories":73,"keywords":74,"publishedAt":19},"01M75C0FC2AADQP6HR4XC94NV0","showrunner-handoff","Use in the showrunner advisor seat you are leaving while it is still alive — deliberate handover before the seat goes dark. Leaves durable state for the incoming seat. Emits no paste block. Not checkpoint (`\u002Fcompact`); not showrunner-resume (incoming seat).","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Fshowrunner-handoff\u002FSKILL.md",[],[],{"skillNo":76,"name":77,"nameZh":6,"description":78,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":79,"categories":80,"keywords":81,"publishedAt":19},"01M75C08CZA02HRPRJ1TFJSS9H","review-code","Use when reviewing code changes on a local branch or an open pull request before merging — including when you want the review's findings auto-fixed locally. Gives a multi-specialist review with a fix-and-re-review loop. Not a whole-repo debt sweep (that is guardian).","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Freview-code\u002FSKILL.md",[],[],{"skillNo":83,"name":84,"nameZh":6,"description":85,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M75C03Q2TVB7N66V95WXCHHR","guardian","Use to run the Guardian sweep — a periodic read-only sweep of repo health (duplication, complexity, coupling, dependency and doc freshness, dead code). Reports maintainability drift since the last sweep as plain-language consequences; it never edits code or files issues. Not code review of a change (that is review-code).","https:\u002F\u002Fgithub.com\u002Fzwrose\u002Fsuperheroes\u002Fblob\u002Fmain\u002Fplugins\u002Fsuperheroes\u002Fskills\u002Fguardian\u002FSKILL.md",[],[]]