[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CA9JYYQKV2RM6VVR542PVZ":3,"skill-same:01M6CA9JYYQKV2RM6VVR542PVZ":97},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":60,"linkOnly":61,"markdownContent":62,"markdownBody":63,"frontMatter":64,"refName":41,"commitSha":65,"skillDirectory":66,"forksCount":67,"repositoryHtmlUrl":68,"repositoryHomepageUrl":13,"ownerHtmlUrl":69,"ownerBlogUrl":13,"ownerDescription":13,"updatedAt":70,"install":71,"resources":84},"01M6CA9JYYQKV2RM6VVR542PVZ","god-mode-generic-mechanic-handoff","God-Mode通用机制交接","Use when handing a Jeff-approved, setting-agnostic god-mode\u002Fdivine mechanic to AO — covers \"generic\" framing rules, the four-mechanic contract set (avatar partition\u002Fdual-sheet, original→shell interpolation, shell-vs-original separation, rank-anchored DHP), canonical formula-registry directive surface, TDD RED→GREEN harness, \u002Fes real-LLM capture, mandatory clean replay on origin\u002Fmain, and forced-recovery from agent drift or untracked worktrees. Trigger phrases include \"approve generic mechanic\", \"generalize avatar partition\", \"surface formula registry\", \"god mode directives \u002F canonical formula registry\", \"\u002Frepro god mode\", \"issue 8538\", \"bead rev-ct974\", \"PR","当把 Jeff 批准、与设置无关的 god-mode\u002F神圣机制交接给 AO 时使用——涵盖“通用”框架规则、四机制契约集（avatar partition\u002Fdual-sheet、original→shell 插值、shell 与 original 分离、rank-anchored DHP）、规范公式注册表指令接口、TDD RED→GREEN 测试框架、\u002Fes real-LLM 采集、在 origin\u002Fmain 上强制干净重放，以及从 agent 漂移或未跟踪 worktree 中强制恢复。触发短语包括“approve generic mechanic”、“generalize avatar partition”、“surface formula registry”、“god mode directives \u002F canonical formula registry”、“\u002Frepro god mode”、“issue 8538”、“bead rev-ct974”、“PR”。","jleechanorg\u002Fjleechan-skills","jleechanorg","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F221404966?v=4","01M6C1VJ99XG950X1DWPEBCBGX",null,"01M6C1VJDK5YVDNT3362RT5WSB",6,"MIT","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fgod-mode-generic-mechanic-handoff\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8BRN0DBCRG4XGJMB6QQEP11","编码任务委派","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59],"handoff","generic","mode","mechanic","god mode","god mode generic mechanic handoff","when","interpolation","directives","green","drift","main","clean","formula","worktrees","\u002Fes","ao","issue","repro","use","partition","capture","Rules","shell","recovery","SET","harness","registry","pr","tdd","2026-11-10 10:12:30",false,"---\nname: god-mode-generic-mechanic-handoff\ndescription: Use when handing a Jeff-approved, setting-agnostic god-mode\u002Fdivine mechanic to AO — covers \"generic\" framing rules, the four-mechanic contract set (avatar partition\u002Fdual-sheet, original→shell interpolation, shell-vs-original separation, rank-anchored DHP), canonical formula-registry directive surface, TDD RED→GREEN harness, \u002Fes real-LLM capture, mandatory clean replay on origin\u002Fmain, and forced-recovery from agent drift or untracked worktrees. Trigger phrases include \"approve generic mechanic\", \"generalize avatar partition\", \"surface formula registry\", \"god mode directives \u002F canonical formula registry\", \"\u002Frepro god mode\", \"issue 8538\", \"bead rev-ct974\", \"PR #8541\".\n---\n# god-mode-generic-mechanic-handoff\n\nReplay-safe handoff for a Jeff-approved, setting-agnostic god-mode\u002Fdivine mechanic into `$GITHUB_REPOSITORY` via Agent-Orchestrator. Lessons learned during the 2026-07-22→2026-07-23 implementation cycle that drove PR #8541 (HEAD `0b0bc4ac7`) and audit failures on earlier failed workers (`wa-3380`, `wa-3382`, `wa-3384`).\n\n## When to use\n- Jeffrey approves a generic (setting-agnostic, no campaign-specific names) god-mode\u002Fdivine mechanic.\n- An issue like #8538 or bead like `rev-ct974` is opened tracking a 4-part contract: avatar partition\u002Fdual-sheet, original→shell interpolation, shell-vs-original separation, rank-anchored DHP + canonical formula registry directive surface.\n- The BQ evidence base already shows the model is reading the prompt but the loaded block omits the canonical formula or dual-sheet rules.\n\n## Generic framing rules (non-negotiable)\n1. No campaign-specific names, numbers, or lore in shared `$PROJECT_ROOT\u002Fprompts\u002F**` files, `agent_prompts.py`, or contract tests. Put those in `custom_campaign_state.formula_registry` \u002F `directives` only.\n2. `current_shell_level` is the mortal sheet (HP, stats, Story Mode reads). `original_level` is the underlying divine level. Never collapse the two.\n3. `current_shell_level` is interpolated via `formula_registry.shell_level_from_original` (lower\u002Fupper anchors). Never copy `original_level` into `current_shell_level`. Never flatten every divine actor to the mortal cap.\n4. HP is bounded by the mortal HP table at `current_shell_level`. Divine HP (DHP) is a separate stat read from `formula_registry.divine_hp_cap` (or named equivalent) anchored on `rank_table[original_level]`. DHP is **NEVER** `hp_current * k`.\n5. The \"Canonical Formula Registry\" block must be appended verbatim to the god-mode directives block when `custom_campaign_state.formula_registry` is present, and **omitted** when absent (no spurious empty section).\n\n## Branching & clean-replay contract\n1. `git checkout -B \u003Cbranch> origin\u002Fmain` BEFORE writing code. Never branch off an existing non-clean history.\n2. Stage ONLY the four intended files: `$PROJECT_ROOT\u002Fagent_prompts.py`, `$PROJECT_ROOT\u002Fprompts\u002Fgod_mode_instruction.md`, `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_formula_registry_contract.py`, `testing_mcp\u002Ftest_god_mode_avatar_partition_contract_real_api.py`.\n3. After staging, run `git diff --name-only origin\u002Fmain..HEAD` and STOP if you see drift files (`bq_logging.py`, `world_logic.py`, `roadmap\u002F**`, deleted test files unrelated to the task, `.beads\u002F**`, `.claude\u002Fsettings.json`).\n4. Recovery pattern when the agent already polluted history: `git checkout -B \u003Cbranch> origin\u002Fmain`, `git show \u003Cbad-sha> -- \u003Cfour intended files> | git apply --include=\u003Ceach path>`, commit cleanly, `git push --force-with-lease origin \u003Cbranch>`.\n5. After force-push, verify with `git rev-parse origin\u002F\u003Cbranch>` and confirm `gh pr view \u003CN> --json files` lists only the four intended paths. If PR #8541 already existed, the headRefOid will update on the same PR — do NOT close and re-open.\n\n## Spawn the right worker (lesson: MiniMax-M3 + agy gate)\n1. AO exposes 2-3 worker harnesses. Prefer mid-tier explicit override.\n   - MiniMax-M3 (`ao spawn ... --agent minimax`) — fastest path, but verify it has not silently hung with `kill -CONT $(pgrep -P \u003Cpane>)` if pane stalls.\n   - `agy --prompt-interactive ... --model gemini-3.8-flash-high --dangerously-skip-permissions --new-project` — works well for TDD cycles; needs `HOME=$HOME GEMINI_CLI_TRUST_WORKSPACE=true` in the env block.\n   - Codex harness — historical reliability issues; do NOT use it for prompt-only contracts.\n2. Heartbeat the agent before `ao spawn`: `agy --print --model \u003Ctier> --print-timeout 60s --prompt \"pong\"`. If it stalls >90s, kill and switch tiers. **Never** retry the same tier that failed.\n3. Provide the task brief via `env -i ... $AO spawn -p worldarchitect --agent minimax \"\u003Ctask text>\"`. Pass full task brief as the task argument — never condense.\n4. Include in the brief, verbatim: `Issue 8538 \u002F bead rev-ct974. Explicit mid-tier \u003Ctier>. Immediately implement via TDD; no broad research. Use current origin\u002Fmain. Write RED tests, minimal generic loaded prompt\u002Fdynamic-delivery fix, GREEN, real \u002Fes, commit, push, clean draft PR. Do not stop before push + PR.`\n5. DO NOT trust `--agent agy` AO plugin flag without confirming with `ao spawn --help`; MiniMax plugin is currently the explicit mid-tier option.\n\n## TDD contract tests (RED→GREEN)\n1. Write `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_formula_registry_contract.py` FIRST. Required assertions:\n   - `Canonical Formula Registry` block is appended when `formula_registry` is set.\n   - Section header, formula `name`, expression, anchors (`lower_anchor`\u002F`upper_anchor`) are all rendered verbatim.\n   - Empty `formula_registry` produces no spurious block.\n2. Write the prompt-text assertions for the four protocol rules:\n   - `current_shell_level` bounded by mortal cap; not flat-translated from `original_level`.\n   - DHP comes from rank-table, NOT HP multipliers.\n   - Lower-case the prompt text in the test, not the assertions, to dodge case-fold edge cases (`do NOT flatten` ⇆ `do not flatten`).\n3. GREEN with the `_build_formula_registry_block` helper that joins `name`, `expression`, `anchors`, `applies_when` only when `expression` is a non-empty string. Skip entries that aren't dicts or have no expression.\n4. Re-run the broader regression suite under `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_*` — the canonical block must not break neighboring tests.\n\n## \u002Fes real-server + real-LLM evidence (non-negotiable)\n1. The repo AGENTS.md says any non-test change under `$PROJECT_ROOT\u002F**` requires `\u002Fes` (real local server + real services + real LLM where the path uses an LLM). Unit tests alone FAIL the gate.\n2. Required: `testing_mcp\u002Ftest_god_mode_avatar_partition_contract_real_api.py` that uses `MCPTestBase`, starts a real `gunicorn mvp_site.main:app` on a free port (e.g. 8055 or 56958), runs a real god-mode LLM turn, then greps the captured JSONL traces for:\n   - `Canonical Formula Registry` header\n   - `shell_level_from_original` formula name\n   - The interpolation expression text (read the file with `cat` and copy the exact expected string verbatim)\n   - `lower_anchor` and `upper_anchor` substrings\n   - `rank_table[original_level]` expression\n3. The grep helper must walk nested dicts\u002Flists and stringify any string field — do NOT rely on `row.get(\"system_text\")` shape. Working pattern:\n   ```python\n   def _row_string_fields(row):\n       parts=[]; _walk(row)  # recursive walk\n       def _walk(v):\n           if isinstance(v,str): parts.append(v)\n           elif isinstance(v,list): [ _walk(i) for i in v ]\n           elif isinstance(v,dict): [ _walk(x) for x in v.values() ]\n       return parts\n   def _grep_all_jsonl(paths, needle):\n       nl=needle.lower()\n       for p in paths:\n           for row in _scan_jsonl(p):\n               for v in _row_string_fields(row):\n                   if nl in v.lower(): return True\n       return False\n   ```\n4. Use `$PROJECT_ROOT\u002FCLAUDE.md` as a hint for what trace files exist (`llm_request_responses.jsonl`, `provider_http_request_responses.jsonl`, `request_responses.jsonl`). Check `MCP_TEST_EVIDENCE_DIR` env var if available.\n5. Real `\u002Fes` takes ~3–7 minutes per turn because of full server startup + real LLM call. Budget 10m timeout.\n\n## Failures the agent WILL hit (and how to recover)\n1. **Worker over-researches**: it will spend 5–8 minutes on file inspection when the brief names the loaded files explicitly. Send `ao send \u003Csession-id> 'You are over-researching. Stop now and execute TDD. Write the RED contract test immediately, run it, implement minimal fix. Do not inspect more files.'` The MiniMax harness responds to `ao send`; agy responds to tmux send-keys.\n2. **Worker claims \"pure prompt exception\" for \u002Fes**: push back hard. Repo AGENTS.md is fail-closed for `$PROJECT_ROOT\u002F**` non-test changes. Worker must run the real-LLM harness.\n3. **Worker attaches evidence to an unrelated PR** (e.g. PR 8539 was an MBTI fix when this task wanted PR 8541). Verify `gh pr list --head \u003Cbranch> --json number,headRefName` immediately. If the worker created PR 8539 by accident, send a correction: `'Critical topology correction: PR 8539 is unrelated... Do not reference, update, push to, or attach evidence to PR 8539. Your branch currently has no PR. After real \u002Fes + tests + commit + push, create a NEW clean draft PR from \u003Cbranch> to main, closing issue 8538.'`\n4. **Worker drift files**: 5 extra files land in the PR diff (`bq_logging.py`, `world_logic.py`, deleted unrelated test files, `roadmap\u002F**`). Apply the recovery pattern under \"Branching & clean-replay contract\" §4.\n5. **Worker tmux exits but `ao send` keeps queuing**: if you see the worker output stream go quiet for >2 min AND tmux session no longer in `tmux list-sessions`, the lifecycle manager killed it. Treat as killed. Inspect `$HOME\u002F.agent-orchestrator\u002F\u003Cproject-hash>-*\u002Fobservability\u002Fprocesses\u002Flifecycle-manager-*.json` for `lifecycle.transition` events with `newStatus:\"killed\"`.\n6. **Wdefunct agy.real pid blocking tmux pane**: when `kill -TERM` leaves a `\u003Cdefunct>` zombie, do `kill -CONT \u003Cparent_tmux_pid>` to wake the tmux server so new sessions spawn. The zombie won't go away without sudo, but the parent tmux is the only thing you need for new sessions.\n\n## Hard-coded paths the skill assumes\n- `$HOME\u002Fprojects\u002Fyour-project.com\u002F.claude\u002Fworktrees\u002Fbq-llm-logging\u002Fscripts\u002Fbq_evidence_query.sql` — schema-stable BQ query template for god-mode turns.\n- `$HOME\u002F.hermes\u002Flib\u002Foutbound_secret_gate.py` — always run on PR body and any log artifacts before push.\n- `$HOME\u002F.hermes\u002Fskills\u002Ffinish-the-job\u002FSKILL.md` — for the FINISH state contract.\n- `$HOME\u002F.hermes\u002Fskills\u002Fagento\u002FSKILL.md` — for AO spawn\u002Fsend\u002Freview.\n- `$HOME\u002F.hermes\u002Fskills\u002Feval-vendor-tooling\u002FSKILL.md` — Pitfall P1 (directives must route via system_instruction, not contents[]) is what made this generic contract get lost in the first place.\n- `$HOME\u002F.hermes\u002Fskills\u002Fworkflow\u002Falways-pr-never-local-edit\u002FSKILL.md` — the durable end-state contract.\n- `$HOME\u002F.hermes\u002Fskills\u002Fworkflow\u002Fpr-cleanup-replay\u002FSKILL.md` — the recipe applied when the AO worker polluted the branch.\n\n## Verification checklist before posting \"done\"\n- [ ] `git -C $WT diff --name-only origin\u002Fmain..HEAD` shows EXACTLY the 4 intended files (no `.claude\u002Fsettings.json`, no `roadmap\u002F**`, no deleted unrelated tests).\n- [ ] `git -C $WT rev-parse origin\u002Fmain origin\u002F$BR` — local and remote HEAD match.\n- [ ] `gh pr view \u003CN> --json files` lists only the 4 paths and matches the diff above.\n- [ ] `\u002Fes` evidence (real server + real LLM trace grep) is captured in a `\u002Ftmp\u002Fyour-project.com\u002F\u003Cbranch>\u002Fgod_mode_avatar_partition_contract_real_api\u002F` artifact and pasted into PR description `## Evidence` section.\n- [ ] No `gh pr merge` was issued; orchestrator owns the merge.\n- [ ] Slack status posted to `#ai-general` with PR URL + the new HEAD SHA + the bq campaign id used for repro.\n\n## Out-of-scope (do NOT do)\n- Do not close PR 8541 if the same branch was force-pushed to a clean replay — the PR is updated in place.\n- Do not create a fresh bead ID when one already exists in caller repo.\n- Do not edit `.claude\u002Fsettings.json` or include `AO-TASK-BRIEF.md` in git history.\n- Do not propose \"send raw\" repro LLM requests to BQ from inside this skill — that lives in `repro-twin-clone-evidence`.\n- Do not promise to \"generalize later\" — the brief is for the single, approved mechanic at a time.\n","# god-mode-generic-mechanic-handoff\n\nReplay-safe handoff for a Jeff-approved, setting-agnostic god-mode\u002Fdivine mechanic into `$GITHUB_REPOSITORY` via Agent-Orchestrator. Lessons learned during the 2026-07-22→2026-07-23 implementation cycle that drove PR #8541 (HEAD `0b0bc4ac7`) and audit failures on earlier failed workers (`wa-3380`, `wa-3382`, `wa-3384`).\n\n## When to use\n- Jeffrey approves a generic (setting-agnostic, no campaign-specific names) god-mode\u002Fdivine mechanic.\n- An issue like #8538 or bead like `rev-ct974` is opened tracking a 4-part contract: avatar partition\u002Fdual-sheet, original→shell interpolation, shell-vs-original separation, rank-anchored DHP + canonical formula registry directive surface.\n- The BQ evidence base already shows the model is reading the prompt but the loaded block omits the canonical formula or dual-sheet rules.\n\n## Generic framing rules (non-negotiable)\n1. No campaign-specific names, numbers, or lore in shared `$PROJECT_ROOT\u002Fprompts\u002F**` files, `agent_prompts.py`, or contract tests. Put those in `custom_campaign_state.formula_registry` \u002F `directives` only.\n2. `current_shell_level` is the mortal sheet (HP, stats, Story Mode reads). `original_level` is the underlying divine level. Never collapse the two.\n3. `current_shell_level` is interpolated via `formula_registry.shell_level_from_original` (lower\u002Fupper anchors). Never copy `original_level` into `current_shell_level`. Never flatten every divine actor to the mortal cap.\n4. HP is bounded by the mortal HP table at `current_shell_level`. Divine HP (DHP) is a separate stat read from `formula_registry.divine_hp_cap` (or named equivalent) anchored on `rank_table[original_level]`. DHP is **NEVER** `hp_current * k`.\n5. The \"Canonical Formula Registry\" block must be appended verbatim to the god-mode directives block when `custom_campaign_state.formula_registry` is present, and **omitted** when absent (no spurious empty section).\n\n## Branching & clean-replay contract\n1. `git checkout -B \u003Cbranch> origin\u002Fmain` BEFORE writing code. Never branch off an existing non-clean history.\n2. Stage ONLY the four intended files: `$PROJECT_ROOT\u002Fagent_prompts.py`, `$PROJECT_ROOT\u002Fprompts\u002Fgod_mode_instruction.md`, `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_formula_registry_contract.py`, `testing_mcp\u002Ftest_god_mode_avatar_partition_contract_real_api.py`.\n3. After staging, run `git diff --name-only origin\u002Fmain..HEAD` and STOP if you see drift files (`bq_logging.py`, `world_logic.py`, `roadmap\u002F**`, deleted test files unrelated to the task, `.beads\u002F**`, `.claude\u002Fsettings.json`).\n4. Recovery pattern when the agent already polluted history: `git checkout -B \u003Cbranch> origin\u002Fmain`, `git show \u003Cbad-sha> -- \u003Cfour intended files> | git apply --include=\u003Ceach path>`, commit cleanly, `git push --force-with-lease origin \u003Cbranch>`.\n5. After force-push, verify with `git rev-parse origin\u002F\u003Cbranch>` and confirm `gh pr view \u003CN> --json files` lists only the four intended paths. If PR #8541 already existed, the headRefOid will update on the same PR — do NOT close and re-open.\n\n## Spawn the right worker (lesson: MiniMax-M3 + agy gate)\n1. AO exposes 2-3 worker harnesses. Prefer mid-tier explicit override.\n   - MiniMax-M3 (`ao spawn ... --agent minimax`) — fastest path, but verify it has not silently hung with `kill -CONT $(pgrep -P \u003Cpane>)` if pane stalls.\n   - `agy --prompt-interactive ... --model gemini-3.8-flash-high --dangerously-skip-permissions --new-project` — works well for TDD cycles; needs `HOME=$HOME GEMINI_CLI_TRUST_WORKSPACE=true` in the env block.\n   - Codex harness — historical reliability issues; do NOT use it for prompt-only contracts.\n2. Heartbeat the agent before `ao spawn`: `agy --print --model \u003Ctier> --print-timeout 60s --prompt \"pong\"`. If it stalls >90s, kill and switch tiers. **Never** retry the same tier that failed.\n3. Provide the task brief via `env -i ... $AO spawn -p worldarchitect --agent minimax \"\u003Ctask text>\"`. Pass full task brief as the task argument — never condense.\n4. Include in the brief, verbatim: `Issue 8538 \u002F bead rev-ct974. Explicit mid-tier \u003Ctier>. Immediately implement via TDD; no broad research. Use current origin\u002Fmain. Write RED tests, minimal generic loaded prompt\u002Fdynamic-delivery fix, GREEN, real \u002Fes, commit, push, clean draft PR. Do not stop before push + PR.`\n5. DO NOT trust `--agent agy` AO plugin flag without confirming with `ao spawn --help`; MiniMax plugin is currently the explicit mid-tier option.\n\n## TDD contract tests (RED→GREEN)\n1. Write `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_formula_registry_contract.py` FIRST. Required assertions:\n   - `Canonical Formula Registry` block is appended when `formula_registry` is set.\n   - Section header, formula `name`, expression, anchors (`lower_anchor`\u002F`upper_anchor`) are all rendered verbatim.\n   - Empty `formula_registry` produces no spurious block.\n2. Write the prompt-text assertions for the four protocol rules:\n   - `current_shell_level` bounded by mortal cap; not flat-translated from `original_level`.\n   - DHP comes from rank-table, NOT HP multipliers.\n   - Lower-case the prompt text in the test, not the assertions, to dodge case-fold edge cases (`do NOT flatten` ⇆ `do not flatten`).\n3. GREEN with the `_build_formula_registry_block` helper that joins `name`, `expression`, `anchors`, `applies_when` only when `expression` is a non-empty string. Skip entries that aren't dicts or have no expression.\n4. Re-run the broader regression suite under `$PROJECT_ROOT\u002Ftests\u002Ftest_god_mode_*` — the canonical block must not break neighboring tests.\n\n## \u002Fes real-server + real-LLM evidence (non-negotiable)\n1. The repo AGENTS.md says any non-test change under `$PROJECT_ROOT\u002F**` requires `\u002Fes` (real local server + real services + real LLM where the path uses an LLM). Unit tests alone FAIL the gate.\n2. Required: `testing_mcp\u002Ftest_god_mode_avatar_partition_contract_real_api.py` that uses `MCPTestBase`, starts a real `gunicorn mvp_site.main:app` on a free port (e.g. 8055 or 56958), runs a real god-mode LLM turn, then greps the captured JSONL traces for:\n   - `Canonical Formula Registry` header\n   - `shell_level_from_original` formula name\n   - The interpolation expression text (read the file with `cat` and copy the exact expected string verbatim)\n   - `lower_anchor` and `upper_anchor` substrings\n   - `rank_table[original_level]` expression\n3. The grep helper must walk nested dicts\u002Flists and stringify any string field — do NOT rely on `row.get(\"system_text\")` shape. Working pattern:\n   ```python\n   def _row_string_fields(row):\n       parts=[]; _walk(row)  # recursive walk\n       def _walk(v):\n           if isinstance(v,str): parts.append(v)\n           elif isinstance(v,list): [ _walk(i) for i in v ]\n           elif isinstance(v,dict): [ _walk(x) for x in v.values() ]\n       return parts\n   def _grep_all_jsonl(paths, needle):\n       nl=needle.lower()\n       for p in paths:\n           for row in _scan_jsonl(p):\n               for v in _row_string_fields(row):\n                   if nl in v.lower(): return True\n       return False\n   ```\n4. Use `$PROJECT_ROOT\u002FCLAUDE.md` as a hint for what trace files exist (`llm_request_responses.jsonl`, `provider_http_request_responses.jsonl`, `request_responses.jsonl`). Check `MCP_TEST_EVIDENCE_DIR` env var if available.\n5. Real `\u002Fes` takes ~3–7 minutes per turn because of full server startup + real LLM call. Budget 10m timeout.\n\n## Failures the agent WILL hit (and how to recover)\n1. **Worker over-researches**: it will spend 5–8 minutes on file inspection when the brief names the loaded files explicitly. Send `ao send \u003Csession-id> 'You are over-researching. Stop now and execute TDD. Write the RED contract test immediately, run it, implement minimal fix. Do not inspect more files.'` The MiniMax harness responds to `ao send`; agy responds to tmux send-keys.\n2. **Worker claims \"pure prompt exception\" for \u002Fes**: push back hard. Repo AGENTS.md is fail-closed for `$PROJECT_ROOT\u002F**` non-test changes. Worker must run the real-LLM harness.\n3. **Worker attaches evidence to an unrelated PR** (e.g. PR 8539 was an MBTI fix when this task wanted PR 8541). Verify `gh pr list --head \u003Cbranch> --json number,headRefName` immediately. If the worker created PR 8539 by accident, send a correction: `'Critical topology correction: PR 8539 is unrelated... Do not reference, update, push to, or attach evidence to PR 8539. Your branch currently has no PR. After real \u002Fes + tests + commit + push, create a NEW clean draft PR from \u003Cbranch> to main, closing issue 8538.'`\n4. **Worker drift files**: 5 extra files land in the PR diff (`bq_logging.py`, `world_logic.py`, deleted unrelated test files, `roadmap\u002F**`). Apply the recovery pattern under \"Branching & clean-replay contract\" §4.\n5. **Worker tmux exits but `ao send` keeps queuing**: if you see the worker output stream go quiet for >2 min AND tmux session no longer in `tmux list-sessions`, the lifecycle manager killed it. Treat as killed. Inspect `$HOME\u002F.agent-orchestrator\u002F\u003Cproject-hash>-*\u002Fobservability\u002Fprocesses\u002Flifecycle-manager-*.json` for `lifecycle.transition` events with `newStatus:\"killed\"`.\n6. **Wdefunct agy.real pid blocking tmux pane**: when `kill -TERM` leaves a `\u003Cdefunct>` zombie, do `kill -CONT \u003Cparent_tmux_pid>` to wake the tmux server so new sessions spawn. The zombie won't go away without sudo, but the parent tmux is the only thing you need for new sessions.\n\n## Hard-coded paths the skill assumes\n- `$HOME\u002Fprojects\u002Fyour-project.com\u002F.claude\u002Fworktrees\u002Fbq-llm-logging\u002Fscripts\u002Fbq_evidence_query.sql` — schema-stable BQ query template for god-mode turns.\n- `$HOME\u002F.hermes\u002Flib\u002Foutbound_secret_gate.py` — always run on PR body and any log artifacts before push.\n- `$HOME\u002F.hermes\u002Fskills\u002Ffinish-the-job\u002FSKILL.md` — for the FINISH state contract.\n- `$HOME\u002F.hermes\u002Fskills\u002Fagento\u002FSKILL.md` — for AO spawn\u002Fsend\u002Freview.\n- `$HOME\u002F.hermes\u002Fskills\u002Feval-vendor-tooling\u002FSKILL.md` — Pitfall P1 (directives must route via system_instruction, not contents[]) is what made this generic contract get lost in the first place.\n- `$HOME\u002F.hermes\u002Fskills\u002Fworkflow\u002Falways-pr-never-local-edit\u002FSKILL.md` — the durable end-state contract.\n- `$HOME\u002F.hermes\u002Fskills\u002Fworkflow\u002Fpr-cleanup-replay\u002FSKILL.md` — the recipe applied when the AO worker polluted the branch.\n\n## Verification checklist before posting \"done\"\n- [ ] `git -C $WT diff --name-only origin\u002Fmain..HEAD` shows EXACTLY the 4 intended files (no `.claude\u002Fsettings.json`, no `roadmap\u002F**`, no deleted unrelated tests).\n- [ ] `git -C $WT rev-parse origin\u002Fmain origin\u002F$BR` — local and remote HEAD match.\n- [ ] `gh pr view \u003CN> --json files` lists only the 4 paths and matches the diff above.\n- [ ] `\u002Fes` evidence (real server + real LLM trace grep) is captured in a `\u002Ftmp\u002Fyour-project.com\u002F\u003Cbranch>\u002Fgod_mode_avatar_partition_contract_real_api\u002F` artifact and pasted into PR description `## Evidence` section.\n- [ ] No `gh pr merge` was issued; orchestrator owns the merge.\n- [ ] Slack status posted to `#ai-general` with PR URL + the new HEAD SHA + the bq campaign id used for repro.\n\n## Out-of-scope (do NOT do)\n- Do not close PR 8541 if the same branch was force-pushed to a clean replay — the PR is updated in place.\n- Do not create a fresh bead ID when one already exists in caller repo.\n- Do not edit `.claude\u002Fsettings.json` or include `AO-TASK-BRIEF.md` in git history.\n- Do not propose \"send raw\" repro LLM requests to BQ from inside this skill — that lives in `repro-twin-clone-evidence`.\n- Do not promise to \"generalize later\" — the brief is for the single, approved mechanic at a time.\n",{"name":5,"description":7},"05df7380981a2c4af868ce0fa57962ae0eea62a9","hermes\u002Fskills\u002Fgod-mode-generic-mechanic-handoff",0,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills","https:\u002F\u002Fgithub.com\u002Fjleechanorg","2026-11-14 14:55:35",{"source":9,"skillName":5,"commands":72,"prompt":82,"zipAvailable":83},[73,76,79],{"tool":74,"command":75},"npx","npx skills add jleechanorg\u002Fjleechan-skills --skill god-mode-generic-mechanic-handoff",{"tool":77,"command":78},"bunx","bunx skills add jleechanorg\u002Fjleechan-skills --skill god-mode-generic-mechanic-handoff",{"tool":80,"command":81},"pnpm","pnpm dlx skills add jleechanorg\u002Fjleechan-skills --skill god-mode-generic-mechanic-handoff","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fgod-mode-generic-mechanic-handoff\u002FSKILL.md",true,[85,91],{"path":86,"resourceType":87,"resourceTypeDesc":88,"sizeBytes":89,"sourceHtmlUrl":90},"references\u002Fverify-checklist.md","REFERENCE","参考文档",1174,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fgod-mode-generic-mechanic-handoff\u002Freferences\u002Fverify-checklist.md",{"path":92,"resourceType":93,"resourceTypeDesc":94,"sizeBytes":95,"sourceHtmlUrl":96},"tests\u002Ftest_skill_contract.py","SCRIPT","脚本",2777,"https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002Fhermes\u002Fskills\u002Fgod-mode-generic-mechanic-handoff\u002Ftests\u002Ftest_skill_contract.py",[98,106,113,120,128,137],{"skillNo":99,"name":100,"nameZh":13,"description":101,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":102,"categories":103,"keywords":104,"publishedAt":105},"01M7DRVZXXMGY4G81K5GVF4V20","disk-reclaim-playbook","Use Disk Magician to diagnose disk growth or qualify cleanup on macOS or Linux.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fdisk-reclaim-playbook\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":107,"name":108,"nameZh":13,"description":109,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":105},"01M7B63PNTT2TY78RFKHD8SP3X","claudea-bench","Compare `claudea` and normal `claude` on a fair split of comparable work by default; use `--strict` for duplicate runs of the exact same task.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fclaudea-bench\u002FSKILL.md",[],[],{"skillNo":114,"name":58,"nameZh":13,"description":115,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":116,"categories":117,"keywords":118,"publishedAt":119},"01M7622KQJ32AV4K5BXEMVSSEB","Alias for the canonical pr-lifecycle PR workflow skill (\u002Fpr-workflow, \u002Fprw).","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fpr\u002FSKILL.md",[],[],"2026-11-12 13:55:43",{"skillNo":121,"name":122,"nameZh":13,"description":123,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":127},"01M7432W92AKC4D1TKJ00VCMMT","whisper","OpenAI's general-purpose speech recognition model. Supports 99 languages, transcription, translation to English, and language identification. Six model sizes from tiny (39M params) to large (1550M params). Use for speech-to-text, podcast transcription, or multilingual audio processing. Best for robust, multilingual ASR.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwhisper\u002FSKILL.md",[],[],"2026-11-11 15:11:14",{"skillNo":129,"name":130,"nameZh":13,"description":131,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":132,"licenseFileUrl":133,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":127},"01M7432T6BN1A9SHB8RBQR5EMP","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":138,"name":139,"nameZh":13,"description":140,"descriptionZh":13,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":13,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":127},"01M7432NDC7S6C6MX7M6RW8CTT","pr-report","This skill should be used when the user asks for a PR report, PR audit, PR delta analysis, \u002Fpr-report, or wants per-PR summary with delta files\u002Flines. Generates a structured report for one or more open PRs covering purpose, files changed, +\u002F− line counts, \u002Fcode-standards + \u002Fthermo review findings, \u002Fponytail simplification opportunities, file-overlap combination candidates, and \u002Fgreen status per pr-green-definition. Output: machine-readable JSONL + human-readable markdown. Read-only by default; can apply simplifications if user opts in.","https:\u002F\u002Fgithub.com\u002Fjleechanorg\u002Fjleechan-skills\u002Fblob\u002Fmain\u002F.claude\u002Fskills_archive\u002F2026-11-09-no-usage-evidence\u002Fpr-report\u002FSKILL.md",[],[]]