[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7FDSNKH822HVRQQZMZ8CEVS":3,"skill-same:01M7FDSNKH822HVRQQZMZ8CEVS":48},{"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":26,"commitSha":27,"skillDirectory":28,"forksCount":29,"repositoryHtmlUrl":30,"repositoryHomepageUrl":6,"ownerHtmlUrl":31,"ownerBlogUrl":6,"ownerDescription":32,"updatedAt":33,"install":34,"resources":47},"01M7FDSNKH822HVRQQZMZ8CEVS","meta-optimize",null,"Analyze ARIS usage logs and propose optimizations to SKILL.md files, reviewer prompts, and workflow defaults. Outer-loop harness optimization inspired by Meta-Harness (Lee et al., 2026). Use when user says \"优化技能\", \"meta optimize\", \"improve skills\", \"分析使用记录\", or wants to optimize ARIS's own harness components based on accumulated experience.","CZX-LBJ\u002Fdeepseek-science","CZX-LBJ","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F204594689?v=4","01M7FC59WQ9PFXT04MKGJDCFFT","czx","01M7FC59XB2GW0BKWN9JTDBQS7",1,"MIT","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fmeta-optimize\u002FSKILL.md",[],[],"2026-11-16 10:05:34",false,"---\nname: meta-optimize\ndescription: \"Analyze ARIS usage logs and propose optimizations to SKILL.md files, reviewer prompts, and workflow defaults. Outer-loop harness optimization inspired by Meta-Harness (Lee et al., 2026). Use when user says \\\"优化技能\\\", \\\"meta optimize\\\", \\\"improve skills\\\", \\\"分析使用记录\\\", or wants to optimize ARIS's own harness components based on accumulated experience.\"\nargument-hint: \"[target-skill-or-all]\"\nallowed-tools: Bash(*), Read, Write, Edit, Grep, Glob\n---\n\n# Meta-Optimize: Outer-Loop Harness Optimization for ARIS\n\nAnalyze accumulated usage logs and propose optimizations for: **$ARGUMENTS**\n\n## Context\n\nARIS is a **research harness** — a system of skills, bridges, workflows, and artifact contracts that wraps around LLMs to orchestrate research. This skill implements a prototype **outer loop** that observes how the harness is used and proposes improvements to the harness itself (not to the research artifacts it produces).\n\nInspired by Meta-Harness (Lee et al., 2026): the key insight is that harness design matters as much as model weights, and harness engineering can be partially automated by logging execution traces and using them to guide improvements.\n\n## What This Skill Optimizes (Harness Components)\n\n| Component | Example | Optimizable? |\n|-----------|---------|:---:|\n| SKILL.md prompts | Reviewer instructions, quality gates, step descriptions | Yes |\n| Default parameters | `difficulty: medium`, `MAX_ROUNDS: 4`, `threshold: 6\u002F10` | Yes |\n| Convergence rules | When to stop the review loop, retry counts | Yes |\n| Workflow ordering | Skill chain sequence within a workflow | Yes |\n| Artifact schemas | What fields go in EXPERIMENT_LOG.md, idea-stage\u002FIDEA_REPORT.md | Cautious |\n| MCP bridge config | Which reviewer model, routing rules | No (infra) |\n\n**Not optimized**: The research artifacts themselves (papers, code, experiments). That's what the regular workflows do.\n\n## Prerequisites\n\n1. **Logging must be active.** Codex mirror installs do not create Claude Code hooks. Provide `.aris\u002Fmeta\u002Fevents.jsonl` from a Codex-compatible event logger, an external wrapper, or a manually exported trace log before running this skill.\n2. **Sufficient data.** At least 5 complete workflow runs logged in `.aris\u002Fmeta\u002Fevents.jsonl`. The skill will check and warn if insufficient.\n\n## Workflow\n\n### Step 0: Check Data Availability\n\n```bash\nEVENTS_FILE=\".aris\u002Fmeta\u002Fevents.jsonl\"\nif [ ! -f \"$EVENTS_FILE\" ]; then\n    echo \"ERROR: No event log found at $EVENTS_FILE\"\n    echo \"Enable Codex-compatible logging first: create .aris\u002Fmeta\u002Fevents.jsonl from your Codex wrapper, external event logger, or exported trace log.\"\n    exit 1\nfi\n\nEVENT_COUNT=$(wc -l \u003C \"$EVENTS_FILE\")\nSKILL_INVOCATIONS=$(grep -c '\"skill_invoke\"' \"$EVENTS_FILE\" || echo 0)\nSESSIONS=$(grep -c '\"session_start\"' \"$EVENTS_FILE\" || echo 0)\n\necho \"📊 Event log: $EVENT_COUNT events, $SKILL_INVOCATIONS skill invocations, $SESSIONS sessions\"\n\nif [ \"$SKILL_INVOCATIONS\" -lt 5 ]; then\n    echo \"⚠️  Insufficient data (\u003C5 skill invocations). Continue using ARIS normally and re-run later.\"\n    exit 0\nfi\n```\n\n### Step 1: Analyze Usage Patterns\n\nRead `.aris\u002Fmeta\u002Fevents.jsonl` and compute:\n\n**Frequency analysis:**\n- Which skills are invoked most often?\n- Which slash commands do users type most?\n- What parameter overrides are most common? (These suggest bad defaults.)\n\n**Failure analysis:**\n- Which tools fail most often? In which skills?\n- What error patterns repeat? (OOM, import, compilation, timeout)\n- How many auto-debug retries per workflow run?\n\n**Convergence analysis (for auto-review-loop):**\n- Average rounds to reach threshold\n- Score trajectory shape (fast improvement? plateau? oscillation?)\n- Which review round catches the most critical issues?\n- Do users override difficulty mid-run?\n\n**Human intervention analysis:**\n- Where do users interrupt with manual prompts during workflows?\n- What manual corrections do users make most? (These indicate skill gaps.)\n\n**Model-delta analysis (harness diet):**\n- Has the session model or the pinned reviewer model changed since a skill's\n  SKILL.md was last touched? A model bump is a **trigger to re-read, not\n  evidence by itself**: a deletion proposal must cite TARGET-SPECIFIC evidence\n  (a capability-specific release note, or repeated post-bump event-log behavior\n  showing the scaffold is unused). **Never deletion candidates**: privilege\n  boundaries, acceptance\u002Freview gates, corpus\u002Fprovenance rules, output\n  contracts, safety checks. The diet targets model-compensation scaffolding\n  only — a capability the new model has natively is pure overhead. A harness\n  that only ever grows is a harness nobody is re-reading.\n\n**Trigger-rate analysis (measured, not from the event log):** the log shows\nwhich skills were USED, not which were WANTED-but-omitted. Mainline ships\n`tools\u002Fmeta_opt\u002Ftrigger_eval.py`, which measures Claude Code's skill triggering\nvia `claude -p` probes (trigger \u002F confusion \u002F miss). It is Claude-Code-specific\n— there is no equivalent `codex` skill-selection probe yet, so for a Codex\nexecutor treat trigger-rate as a mainline signal, not a step you run here.\nMeasure-only regardless: a low rate is INPUT to a proposal, never a self-applied\nrewrite; the confusion matrix (which sibling a query lands on) points at\ndisambiguation, not \"make it pushier\".\n\nPresent findings as a structured summary table.\n\n### Step 1.5: Name the Current Bottleneck\n\nSynthesize the Step-1 analyses into **one sentence naming the single\nmost-limiting pipeline stage right now** — e.g. \"planning\", \"verification\nquality\", \"experiment execution reliability\", \"writing polish\" — with evidence.\nThe bottleneck always moves: coding → planning → verification → taste. Step 2's\nranked table should read as sub-fixes for this one named constraint.\n\nAppend the verdict to the append-only ledger `.aris\u002Fmeta\u002Fbottleneck_log.jsonl`\n(never edit or delete prior lines — succession history is the point):\n\n```bash\nmkdir -p .aris\u002Fmeta\n# json.dumps, NOT hand-interpolated shell strings: bottleneck\u002Fevidence are\n# natural language — a stray quote must not break the JSONL (or the shell).\npython3 - \u003C\u003C'PY'\nimport json, datetime\nentry = {\n    \"ts\": datetime.datetime.now().astimezone().isoformat(timespec=\"seconds\"),\n    \"cycle\": 3,\n    \"bottleneck\": \"verification quality\",\n    \"evidence\": \"review rounds plateau at 6\u002F10 while tool failures are rare\",\n    \"top_patch_ids\": [\"P1\", \"P2\"],\n}\nwith open(\".aris\u002Fmeta\u002Fbottleneck_log.jsonl\", \"a\", encoding=\"utf-8\") as fh:\n    fh.write(json.dumps(entry, ensure_ascii=False) + \"\\n\")\nPY\n```\n\nOn the next run, read the last line first and open the report by stating\nwhether that bottleneck was resolved and what it has moved to.\n\n### Step 2: Identify Optimization Targets\n\nBased on Step 1, rank optimization opportunities by expected impact:\n\n```markdown\n## Optimization Opportunities (ranked)\n\n| # | Target | Signal | Proposed Change | Expected Impact |\n|---|--------|--------|-----------------|-----------------|\n| 1 | auto-review-loop default threshold | Users override to 7\u002F10 in 60% of runs | Change default from 6\u002F10 to 7\u002F10 | Fewer manual overrides |\n| 2 | experiment-bridge retry count | 40% of runs hit max retries on OOM | Add OOM-specific recovery (reduce batch size) | Fewer failed experiments |\n| 3 | paper-write de-AI patterns | Users manually fix \"delve\" in 80% of runs | Add \"delve\" to default watchword list | Fewer manual edits |\n| 4 | experiment-bridge Phase-2 hand-holding steps | Model bump; scaffold untouched for 2 generations; zero failures in the guarded steps | **DELETE steps N–M — the new model does this unprompted** | Smaller harness, less drift surface |\n```\n\nThe Proposed-Change column is explicitly allowed to be a **deletion** — \"DELETE\nstep N, new model does this for free\" is a first-class optimization.\n\nIf `$ARGUMENTS` specifies a target skill, focus analysis on that skill only.\nIf `$ARGUMENTS` is empty or \"all\", analyze all skills with sufficient data.\n\n### Step 3: Generate Patch Proposals\n\nFor each optimization target, generate a concrete diff:\n\n```diff\n--- a\u002Fskills\u002Fauto-review-loop\u002FSKILL.md\n+++ b\u002Fskills\u002Fauto-review-loop\u002FSKILL.md\n@@ -15,7 +15,7 @@\n ## Constants\n \n-- **SCORE_THRESHOLD = 6** — Minimum review score to accept.\n+- **SCORE_THRESHOLD = 7** — Minimum review score to accept. (Raised based on usage data: 60% of users overrode to 7+.)\n```\n\n**Rules for patch generation:**\n- One patch per optimization target\n- Each patch must include a comment explaining WHY (with data from the log)\n- Patches must be minimal — change only what the data supports\n- Never change artifact schemas or MCP bridge config in v1\n- Never change behavior that would break existing user workflows\n- **Anti-self-poisoning screen:** resolve `$ARIS_REPO` from\n  `.aris\u002Finstalled-skills-codex.txt`, then run\n  `$ARIS_REPO\u002Ftools\u002Fcapture_filter.py` (or project-local\n  `tools\u002Fcapture_filter.py`) against each proposed patch rationale. If it flags\n  an environment failure, transient error, negative tool-capability claim, or\n  one-off narrative, rewrite the proposal to the fix\u002Fconfig\u002Fworkaround or drop\n  it. Warn-and-skip only when the helper cannot be resolved. See\n  [`capture-antipatterns.md`](..\u002Fshared-references\u002Fcapture-antipatterns.md).\n\n### Step 4: Fresh-Agent Review of Patches (same-family provisional)\n\nSend each patch to GPT-6-Astra xhigh for adversarial review:\n\n```text\nspawn_agent:\n  model: gpt-6-astra\n  reasoning_effort: xhigh\n  message: |\n    You are reviewing a proposed optimization to an ARIS SKILL.md file.\n    \n    ## Original Skill (relevant section)\n    [paste original]\n    \n    ## Proposed Patch\n    [paste diff]\n    \n    ## Evidence from Usage Log\n    [paste summary stats]\n    \n    Review this patch:\n    1. Does the evidence support the change?\n    2. Could this change hurt other use cases?\n    3. Is the change minimal and safe?\n    4. Score 1-10: should this be applied?\n    \n    If score \u003C 7, explain what additional evidence would be needed.\n\n    === SCOPE LIMITS (these bound what you PROPOSE, never what you look for) ===\n    Report anything that is actually wrong here — including a rare-looking case, if\n    this repo actually produces it. Then keep the fix in scope:\n    1. This is a RESEARCH-WORKFLOW tool, not a security paper. Verification is\n       welcome; over-defense is not. Assume a cooperating operator on their own\n       machine — a malicious local user is NOT in the threat model.\n    2. Do NOT propose SHA \u002F hash \u002F content-fingerprint \u002F digest-binding schemes.\n       Reporting a real defect in hashing code that already exists is fine.\n    3. NO speculative machinery: do not add feature flags, migration frameworks,\n       compat layers, wrappers, pins, or similar mechanisms unless evidence shows\n       a current repo defect they fix or an explicit existing invariant they must\n       preserve. \"Load-bearing\", \"compatibility\", and \"not scaffolding\" are labels,\n       not evidence. Point to the failing path\u002Fartifact or invariant, and check the\n       proposal's factual premises, such as whether a named package version exists.\n    4. NO corner-case obsession: exotic encodings, symlink races, RTL text and\n       millisecond races are out of scope unless you can show the case arises here.\n    5. Where a rubric or checklist is genuinely needed, do not over-mechanize\n       judgement. A clear sentence a human reads beats a scored table nobody\n       maintains.\n    Exception: code that runs remote commands, starts a network service, or installs\n    an MCP server runs on the user's machine with their credentials — trust-boundary\n    findings there are in scope and the default is strict.\n    Say plainly when something is correct. Do not manufacture findings.\n```\n\n### Step 5: Present Results\n\nOutput a structured report:\n\n```markdown\n# ARIS Meta-Optimization Report\n\n**Date**: [today]\n**Data**: [N] events, [M] skill invocations, [K] sessions\n**Target**: [skill name or \"all\"]\n\n## Current Bottleneck\n\n**[one-phrase name]** — [one-line evidence]. Prior cycle's bottleneck: [name —\nresolved by \u003Cpatch ids> \u002F unresolved \u002F first recorded cycle]. (Ledger:\n`.aris\u002Fmeta\u002Fbottleneck_log.jsonl`)\n\n## Proposed Changes\n\n### Change 1: [title]\n- **Target**: [skill\u002Ffile:line]\n- **Signal**: [what the data shows]\n- **Patch**: [diff]\n- **Reviewer Score**: [X\u002F10]\n- **Reviewer Notes**: [summary]\n- **Status**: ✅ Recommended \u002F ⚠️ Needs more data \u002F ❌ Rejected\n\n### Change 2: ...\n\n## Changes NOT Made (insufficient evidence)\n- [pattern observed but too few samples]\n\n## Recommendations\n- [ ] Apply Change 1 (reviewer approved)\n- [ ] Collect more data for Change 3 (need N more runs)\n- [ ] Consider manual review of Change 2\n\n## Next Steps\nRun `\u002Fmeta-optimize apply 1` to apply a specific change, or\n`\u002Fmeta-optimize apply all` to apply all recommended changes.\n```\n\n### Step 6: Apply Changes (if user approves)\n\nIf user runs `\u002Fmeta-optimize apply [N]`:\n1. Back up original SKILL.md to `.aris\u002Fmeta\u002Fbackups\u002F`\n2. Apply the patch\n3. Log the change to `.aris\u002Fmeta\u002Foptimizations.jsonl`\n4. Remind user to test the changed skill on their next run\n\n**Never auto-apply without user approval.**\n\n## Key Rules\n\n- **Log-driven, not speculative.** Every proposed change must cite specific data from the event log. No \"I think this would be better.\"\n- **Minimal patches.** Change one thing at a time. Don't rewrite entire skills — the one sanctioned large edit is a scaffolding **deletion** backed by TARGET-SPECIFIC model-delta evidence (capability-specific release note, or repeated post-bump event-log behavior; a model-name change alone is never sufficient). Privilege boundaries, acceptance gates, corpus\u002Fprovenance rules, output contracts, and safety checks are never deletion candidates. Deletions go through the same review + approval gates.\n- **Reviewer-gated.** Every patch goes through fresh-agent same-family provisional review before recommendation.\n- **Reversible.** Always back up before applying. Always log what changed.\n- **User-approved.** Never auto-apply. Present, explain, let the user decide.\n- **Honest about uncertainty.** If the data is insufficient, say so. Don't optimize on noise.\n- **Portable.** Optimizations should improve the skill for all users, not just one user's style. If a change seems user-specific, flag it.\n\n## Event Schema Reference\n\nThe log at `.aris\u002Fmeta\u002Fevents.jsonl` contains JSONL records with these shapes:\n\n```jsonl\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"skill_invoke\",\"skill\":\"auto-review-loop\",\"args\":\"difficulty: hard\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"PostToolUse\",\"tool\":\"Bash\",\"input_summary\":\"pdflatex main.tex\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"spawn_agent\",\"tool\":\"spawn_agent\",\"input_summary\":\"review...\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"tool_failure\",\"tool\":\"Bash\",\"input_summary\":\"python train.py\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"slash_command\",\"command\":\"\u002Fauto-review-loop\",\"args\":\"\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"user_prompt\",\"prompt_preview\":\"change difficulty to hard\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"session_start\",\"source\":\"startup\",\"model\":\"claude-opus-4-6\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"session_end\"}\n```\n\n## Triggering\n\nThis skill is NOT part of the standard W1→W1.5→W2→W3→W4 pipeline. It is a **maintenance workflow** with three trigger mechanisms:\n\n1. **Passive logging** (always on): Claude Code hooks record events to `.aris\u002Fmeta\u002Fevents.jsonl` automatically during normal usage. Zero user effort.\n\n2. **Automatic readiness check** (SessionEnd hook): When a Claude Code session ends, `check_ready.sh` counts skill invocations since the last `\u002Fmeta-optimize` run. If ≥5 new invocations have accumulated, it prints a reminder:\n   ```\n   📊 ARIS has logged 8 skill runs since last optimization. Run \u002Fmeta-optimize to check for improvement opportunities.\n   ```\n   This is a **suggestion only** — it does not auto-run optimization.\n\n3. **Manual trigger**: User runs `\u002Fmeta-optimize` when they see the reminder or whenever they want.\n\n**After each `\u002Fmeta-optimize` run**, the skill writes the current timestamp to `.aris\u002Fmeta\u002F.last_optimize` so the readiness check only counts new invocations.\n\n## Acknowledgements\n\nInspired by [Meta-Harness](https:\u002F\u002Farxiv.org\u002Fabs\u002F2603.28052) (Lee et al., 2026) — end-to-end optimization of model harnesses via filesystem-based experience access and agentic code search.\n\n## Output Protocols\n\n> Follow these shared protocols for all output files:\n> - **[Output Versioning Protocol](..\u002Fshared-references\u002Foutput-versioning.md)** — write timestamped file first, then copy to fixed name\n> - **[Output Manifest Protocol](..\u002Fshared-references\u002Foutput-manifest.md)** — log every output to MANIFEST.md\n> - **[Output Language Protocol](..\u002Fshared-references\u002Foutput-language.md)** — respect the project's language setting\n\n## Review Tracing\n\nAfter each reviewer agent call, save the trace following `shared-references\u002Freview-tracing.md` (Policy C — forensic; never silently skip). Use `save_trace.sh` (resolved per the chain in `shared-references\u002Fintegration-contract.md` §2) or write files directly to `.aris\u002Ftraces\u002F\u003Cskill>\u002F\u003Cdate>_run\u003CNN>\u002F`. Respect the `--- trace:` parameter (default: `full`).\n","# Meta-Optimize: Outer-Loop Harness Optimization for ARIS\n\nAnalyze accumulated usage logs and propose optimizations for: **$ARGUMENTS**\n\n## Context\n\nARIS is a **research harness** — a system of skills, bridges, workflows, and artifact contracts that wraps around LLMs to orchestrate research. This skill implements a prototype **outer loop** that observes how the harness is used and proposes improvements to the harness itself (not to the research artifacts it produces).\n\nInspired by Meta-Harness (Lee et al., 2026): the key insight is that harness design matters as much as model weights, and harness engineering can be partially automated by logging execution traces and using them to guide improvements.\n\n## What This Skill Optimizes (Harness Components)\n\n| Component | Example | Optimizable? |\n|-----------|---------|:---:|\n| SKILL.md prompts | Reviewer instructions, quality gates, step descriptions | Yes |\n| Default parameters | `difficulty: medium`, `MAX_ROUNDS: 4`, `threshold: 6\u002F10` | Yes |\n| Convergence rules | When to stop the review loop, retry counts | Yes |\n| Workflow ordering | Skill chain sequence within a workflow | Yes |\n| Artifact schemas | What fields go in EXPERIMENT_LOG.md, idea-stage\u002FIDEA_REPORT.md | Cautious |\n| MCP bridge config | Which reviewer model, routing rules | No (infra) |\n\n**Not optimized**: The research artifacts themselves (papers, code, experiments). That's what the regular workflows do.\n\n## Prerequisites\n\n1. **Logging must be active.** Codex mirror installs do not create Claude Code hooks. Provide `.aris\u002Fmeta\u002Fevents.jsonl` from a Codex-compatible event logger, an external wrapper, or a manually exported trace log before running this skill.\n2. **Sufficient data.** At least 5 complete workflow runs logged in `.aris\u002Fmeta\u002Fevents.jsonl`. The skill will check and warn if insufficient.\n\n## Workflow\n\n### Step 0: Check Data Availability\n\n```bash\nEVENTS_FILE=\".aris\u002Fmeta\u002Fevents.jsonl\"\nif [ ! -f \"$EVENTS_FILE\" ]; then\n    echo \"ERROR: No event log found at $EVENTS_FILE\"\n    echo \"Enable Codex-compatible logging first: create .aris\u002Fmeta\u002Fevents.jsonl from your Codex wrapper, external event logger, or exported trace log.\"\n    exit 1\nfi\n\nEVENT_COUNT=$(wc -l \u003C \"$EVENTS_FILE\")\nSKILL_INVOCATIONS=$(grep -c '\"skill_invoke\"' \"$EVENTS_FILE\" || echo 0)\nSESSIONS=$(grep -c '\"session_start\"' \"$EVENTS_FILE\" || echo 0)\n\necho \"📊 Event log: $EVENT_COUNT events, $SKILL_INVOCATIONS skill invocations, $SESSIONS sessions\"\n\nif [ \"$SKILL_INVOCATIONS\" -lt 5 ]; then\n    echo \"⚠️  Insufficient data (\u003C5 skill invocations). Continue using ARIS normally and re-run later.\"\n    exit 0\nfi\n```\n\n### Step 1: Analyze Usage Patterns\n\nRead `.aris\u002Fmeta\u002Fevents.jsonl` and compute:\n\n**Frequency analysis:**\n- Which skills are invoked most often?\n- Which slash commands do users type most?\n- What parameter overrides are most common? (These suggest bad defaults.)\n\n**Failure analysis:**\n- Which tools fail most often? In which skills?\n- What error patterns repeat? (OOM, import, compilation, timeout)\n- How many auto-debug retries per workflow run?\n\n**Convergence analysis (for auto-review-loop):**\n- Average rounds to reach threshold\n- Score trajectory shape (fast improvement? plateau? oscillation?)\n- Which review round catches the most critical issues?\n- Do users override difficulty mid-run?\n\n**Human intervention analysis:**\n- Where do users interrupt with manual prompts during workflows?\n- What manual corrections do users make most? (These indicate skill gaps.)\n\n**Model-delta analysis (harness diet):**\n- Has the session model or the pinned reviewer model changed since a skill's\n  SKILL.md was last touched? A model bump is a **trigger to re-read, not\n  evidence by itself**: a deletion proposal must cite TARGET-SPECIFIC evidence\n  (a capability-specific release note, or repeated post-bump event-log behavior\n  showing the scaffold is unused). **Never deletion candidates**: privilege\n  boundaries, acceptance\u002Freview gates, corpus\u002Fprovenance rules, output\n  contracts, safety checks. The diet targets model-compensation scaffolding\n  only — a capability the new model has natively is pure overhead. A harness\n  that only ever grows is a harness nobody is re-reading.\n\n**Trigger-rate analysis (measured, not from the event log):** the log shows\nwhich skills were USED, not which were WANTED-but-omitted. Mainline ships\n`tools\u002Fmeta_opt\u002Ftrigger_eval.py`, which measures Claude Code's skill triggering\nvia `claude -p` probes (trigger \u002F confusion \u002F miss). It is Claude-Code-specific\n— there is no equivalent `codex` skill-selection probe yet, so for a Codex\nexecutor treat trigger-rate as a mainline signal, not a step you run here.\nMeasure-only regardless: a low rate is INPUT to a proposal, never a self-applied\nrewrite; the confusion matrix (which sibling a query lands on) points at\ndisambiguation, not \"make it pushier\".\n\nPresent findings as a structured summary table.\n\n### Step 1.5: Name the Current Bottleneck\n\nSynthesize the Step-1 analyses into **one sentence naming the single\nmost-limiting pipeline stage right now** — e.g. \"planning\", \"verification\nquality\", \"experiment execution reliability\", \"writing polish\" — with evidence.\nThe bottleneck always moves: coding → planning → verification → taste. Step 2's\nranked table should read as sub-fixes for this one named constraint.\n\nAppend the verdict to the append-only ledger `.aris\u002Fmeta\u002Fbottleneck_log.jsonl`\n(never edit or delete prior lines — succession history is the point):\n\n```bash\nmkdir -p .aris\u002Fmeta\n# json.dumps, NOT hand-interpolated shell strings: bottleneck\u002Fevidence are\n# natural language — a stray quote must not break the JSONL (or the shell).\npython3 - \u003C\u003C'PY'\nimport json, datetime\nentry = {\n    \"ts\": datetime.datetime.now().astimezone().isoformat(timespec=\"seconds\"),\n    \"cycle\": 3,\n    \"bottleneck\": \"verification quality\",\n    \"evidence\": \"review rounds plateau at 6\u002F10 while tool failures are rare\",\n    \"top_patch_ids\": [\"P1\", \"P2\"],\n}\nwith open(\".aris\u002Fmeta\u002Fbottleneck_log.jsonl\", \"a\", encoding=\"utf-8\") as fh:\n    fh.write(json.dumps(entry, ensure_ascii=False) + \"\\n\")\nPY\n```\n\nOn the next run, read the last line first and open the report by stating\nwhether that bottleneck was resolved and what it has moved to.\n\n### Step 2: Identify Optimization Targets\n\nBased on Step 1, rank optimization opportunities by expected impact:\n\n```markdown\n## Optimization Opportunities (ranked)\n\n| # | Target | Signal | Proposed Change | Expected Impact |\n|---|--------|--------|-----------------|-----------------|\n| 1 | auto-review-loop default threshold | Users override to 7\u002F10 in 60% of runs | Change default from 6\u002F10 to 7\u002F10 | Fewer manual overrides |\n| 2 | experiment-bridge retry count | 40% of runs hit max retries on OOM | Add OOM-specific recovery (reduce batch size) | Fewer failed experiments |\n| 3 | paper-write de-AI patterns | Users manually fix \"delve\" in 80% of runs | Add \"delve\" to default watchword list | Fewer manual edits |\n| 4 | experiment-bridge Phase-2 hand-holding steps | Model bump; scaffold untouched for 2 generations; zero failures in the guarded steps | **DELETE steps N–M — the new model does this unprompted** | Smaller harness, less drift surface |\n```\n\nThe Proposed-Change column is explicitly allowed to be a **deletion** — \"DELETE\nstep N, new model does this for free\" is a first-class optimization.\n\nIf `$ARGUMENTS` specifies a target skill, focus analysis on that skill only.\nIf `$ARGUMENTS` is empty or \"all\", analyze all skills with sufficient data.\n\n### Step 3: Generate Patch Proposals\n\nFor each optimization target, generate a concrete diff:\n\n```diff\n--- a\u002Fskills\u002Fauto-review-loop\u002FSKILL.md\n+++ b\u002Fskills\u002Fauto-review-loop\u002FSKILL.md\n@@ -15,7 +15,7 @@\n ## Constants\n \n-- **SCORE_THRESHOLD = 6** — Minimum review score to accept.\n+- **SCORE_THRESHOLD = 7** — Minimum review score to accept. (Raised based on usage data: 60% of users overrode to 7+.)\n```\n\n**Rules for patch generation:**\n- One patch per optimization target\n- Each patch must include a comment explaining WHY (with data from the log)\n- Patches must be minimal — change only what the data supports\n- Never change artifact schemas or MCP bridge config in v1\n- Never change behavior that would break existing user workflows\n- **Anti-self-poisoning screen:** resolve `$ARIS_REPO` from\n  `.aris\u002Finstalled-skills-codex.txt`, then run\n  `$ARIS_REPO\u002Ftools\u002Fcapture_filter.py` (or project-local\n  `tools\u002Fcapture_filter.py`) against each proposed patch rationale. If it flags\n  an environment failure, transient error, negative tool-capability claim, or\n  one-off narrative, rewrite the proposal to the fix\u002Fconfig\u002Fworkaround or drop\n  it. Warn-and-skip only when the helper cannot be resolved. See\n  [`capture-antipatterns.md`](..\u002Fshared-references\u002Fcapture-antipatterns.md).\n\n### Step 4: Fresh-Agent Review of Patches (same-family provisional)\n\nSend each patch to GPT-6-Astra xhigh for adversarial review:\n\n```text\nspawn_agent:\n  model: gpt-6-astra\n  reasoning_effort: xhigh\n  message: |\n    You are reviewing a proposed optimization to an ARIS SKILL.md file.\n    \n    ## Original Skill (relevant section)\n    [paste original]\n    \n    ## Proposed Patch\n    [paste diff]\n    \n    ## Evidence from Usage Log\n    [paste summary stats]\n    \n    Review this patch:\n    1. Does the evidence support the change?\n    2. Could this change hurt other use cases?\n    3. Is the change minimal and safe?\n    4. Score 1-10: should this be applied?\n    \n    If score \u003C 7, explain what additional evidence would be needed.\n\n    === SCOPE LIMITS (these bound what you PROPOSE, never what you look for) ===\n    Report anything that is actually wrong here — including a rare-looking case, if\n    this repo actually produces it. Then keep the fix in scope:\n    1. This is a RESEARCH-WORKFLOW tool, not a security paper. Verification is\n       welcome; over-defense is not. Assume a cooperating operator on their own\n       machine — a malicious local user is NOT in the threat model.\n    2. Do NOT propose SHA \u002F hash \u002F content-fingerprint \u002F digest-binding schemes.\n       Reporting a real defect in hashing code that already exists is fine.\n    3. NO speculative machinery: do not add feature flags, migration frameworks,\n       compat layers, wrappers, pins, or similar mechanisms unless evidence shows\n       a current repo defect they fix or an explicit existing invariant they must\n       preserve. \"Load-bearing\", \"compatibility\", and \"not scaffolding\" are labels,\n       not evidence. Point to the failing path\u002Fartifact or invariant, and check the\n       proposal's factual premises, such as whether a named package version exists.\n    4. NO corner-case obsession: exotic encodings, symlink races, RTL text and\n       millisecond races are out of scope unless you can show the case arises here.\n    5. Where a rubric or checklist is genuinely needed, do not over-mechanize\n       judgement. A clear sentence a human reads beats a scored table nobody\n       maintains.\n    Exception: code that runs remote commands, starts a network service, or installs\n    an MCP server runs on the user's machine with their credentials — trust-boundary\n    findings there are in scope and the default is strict.\n    Say plainly when something is correct. Do not manufacture findings.\n```\n\n### Step 5: Present Results\n\nOutput a structured report:\n\n```markdown\n# ARIS Meta-Optimization Report\n\n**Date**: [today]\n**Data**: [N] events, [M] skill invocations, [K] sessions\n**Target**: [skill name or \"all\"]\n\n## Current Bottleneck\n\n**[one-phrase name]** — [one-line evidence]. Prior cycle's bottleneck: [name —\nresolved by \u003Cpatch ids> \u002F unresolved \u002F first recorded cycle]. (Ledger:\n`.aris\u002Fmeta\u002Fbottleneck_log.jsonl`)\n\n## Proposed Changes\n\n### Change 1: [title]\n- **Target**: [skill\u002Ffile:line]\n- **Signal**: [what the data shows]\n- **Patch**: [diff]\n- **Reviewer Score**: [X\u002F10]\n- **Reviewer Notes**: [summary]\n- **Status**: ✅ Recommended \u002F ⚠️ Needs more data \u002F ❌ Rejected\n\n### Change 2: ...\n\n## Changes NOT Made (insufficient evidence)\n- [pattern observed but too few samples]\n\n## Recommendations\n- [ ] Apply Change 1 (reviewer approved)\n- [ ] Collect more data for Change 3 (need N more runs)\n- [ ] Consider manual review of Change 2\n\n## Next Steps\nRun `\u002Fmeta-optimize apply 1` to apply a specific change, or\n`\u002Fmeta-optimize apply all` to apply all recommended changes.\n```\n\n### Step 6: Apply Changes (if user approves)\n\nIf user runs `\u002Fmeta-optimize apply [N]`:\n1. Back up original SKILL.md to `.aris\u002Fmeta\u002Fbackups\u002F`\n2. Apply the patch\n3. Log the change to `.aris\u002Fmeta\u002Foptimizations.jsonl`\n4. Remind user to test the changed skill on their next run\n\n**Never auto-apply without user approval.**\n\n## Key Rules\n\n- **Log-driven, not speculative.** Every proposed change must cite specific data from the event log. No \"I think this would be better.\"\n- **Minimal patches.** Change one thing at a time. Don't rewrite entire skills — the one sanctioned large edit is a scaffolding **deletion** backed by TARGET-SPECIFIC model-delta evidence (capability-specific release note, or repeated post-bump event-log behavior; a model-name change alone is never sufficient). Privilege boundaries, acceptance gates, corpus\u002Fprovenance rules, output contracts, and safety checks are never deletion candidates. Deletions go through the same review + approval gates.\n- **Reviewer-gated.** Every patch goes through fresh-agent same-family provisional review before recommendation.\n- **Reversible.** Always back up before applying. Always log what changed.\n- **User-approved.** Never auto-apply. Present, explain, let the user decide.\n- **Honest about uncertainty.** If the data is insufficient, say so. Don't optimize on noise.\n- **Portable.** Optimizations should improve the skill for all users, not just one user's style. If a change seems user-specific, flag it.\n\n## Event Schema Reference\n\nThe log at `.aris\u002Fmeta\u002Fevents.jsonl` contains JSONL records with these shapes:\n\n```jsonl\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"skill_invoke\",\"skill\":\"auto-review-loop\",\"args\":\"difficulty: hard\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"PostToolUse\",\"tool\":\"Bash\",\"input_summary\":\"pdflatex main.tex\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"spawn_agent\",\"tool\":\"spawn_agent\",\"input_summary\":\"review...\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"tool_failure\",\"tool\":\"Bash\",\"input_summary\":\"python train.py\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"slash_command\",\"command\":\"\u002Fauto-review-loop\",\"args\":\"\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"user_prompt\",\"prompt_preview\":\"change difficulty to hard\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"session_start\",\"source\":\"startup\",\"model\":\"claude-opus-4-6\"}\n{\"ts\":\"...\",\"session\":\"...\",\"event\":\"session_end\"}\n```\n\n## Triggering\n\nThis skill is NOT part of the standard W1→W1.5→W2→W3→W4 pipeline. It is a **maintenance workflow** with three trigger mechanisms:\n\n1. **Passive logging** (always on): Claude Code hooks record events to `.aris\u002Fmeta\u002Fevents.jsonl` automatically during normal usage. Zero user effort.\n\n2. **Automatic readiness check** (SessionEnd hook): When a Claude Code session ends, `check_ready.sh` counts skill invocations since the last `\u002Fmeta-optimize` run. If ≥5 new invocations have accumulated, it prints a reminder:\n   ```\n   📊 ARIS has logged 8 skill runs since last optimization. Run \u002Fmeta-optimize to check for improvement opportunities.\n   ```\n   This is a **suggestion only** — it does not auto-run optimization.\n\n3. **Manual trigger**: User runs `\u002Fmeta-optimize` when they see the reminder or whenever they want.\n\n**After each `\u002Fmeta-optimize` run**, the skill writes the current timestamp to `.aris\u002Fmeta\u002F.last_optimize` so the readiness check only counts new invocations.\n\n## Acknowledgements\n\nInspired by [Meta-Harness](https:\u002F\u002Farxiv.org\u002Fabs\u002F2603.28052) (Lee et al., 2026) — end-to-end optimization of model harnesses via filesystem-based experience access and agentic code search.\n\n## Output Protocols\n\n> Follow these shared protocols for all output files:\n> - **[Output Versioning Protocol](..\u002Fshared-references\u002Foutput-versioning.md)** — write timestamped file first, then copy to fixed name\n> - **[Output Manifest Protocol](..\u002Fshared-references\u002Foutput-manifest.md)** — log every output to MANIFEST.md\n> - **[Output Language Protocol](..\u002Fshared-references\u002Foutput-language.md)** — respect the project's language setting\n\n## Review Tracing\n\nAfter each reviewer agent call, save the trace following `shared-references\u002Freview-tracing.md` (Policy C — forensic; never silently skip). Use `save_trace.sh` (resolved per the chain in `shared-references\u002Fintegration-contract.md` §2) or write files directly to `.aris\u002Ftraces\u002F\u003Cskill>\u002F\u003Cdate>_run\u003CNN>\u002F`. Respect the `--- trace:` parameter (default: `full`).\n",{"name":5,"description":7,"allowed-tools":24,"argument-hint":25},"Bash(*), Read, Write, Edit, Grep, Glob","[target-skill-or-all]","main","18193d71ea3441d7c033dbf195b8a7c75ac96f75","packages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fmeta-optimize",0,"https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science","https:\u002F\u002Fgithub.com\u002FCZX-LBJ","一个没事喜欢随便写点代码的小菜鸡\r\n","2026-10-22 09:48:04",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":46},[36,39,42],{"tool":37,"command":38},"npx","npx skills add CZX-LBJ\u002Fdeepseek-science --skill meta-optimize",{"tool":40,"command":41},"bunx","bunx skills add CZX-LBJ\u002Fdeepseek-science --skill meta-optimize",{"tool":43,"command":44},"pnpm","pnpm dlx skills add CZX-LBJ\u002Fdeepseek-science --skill meta-optimize","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fskills-codex\u002Fmeta-optimize\u002FSKILL.md",true,[],[49,56,63,70,77,84],{"skillNo":50,"name":51,"nameZh":6,"description":52,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":53,"categories":54,"keywords":55,"publishedAt":19},"01M7FEEKSNMRMKW6JEK93PFDFY","bio-free-energy-calculations","Performs alchemical free-energy calculations including relative binding free energy (RBFE \u002F FEP+) and absolute binding free energy (ABFE) via OpenFE, FEP+, GROMACS, AMBER pmemd, and OpenMM with explicit lambda scheduling, soft-core potentials, MBAR\u002FBAR analysis, cycle-closure validation, and protocol-appropriate enhanced sampling. Compares ML alternatives (Boltz-2 affinity, DeepDock). Use when ranking analogs by binding affinity beyond docking accuracy, performing prospective lead optimization, or validating SAR predictions.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Ffree-energy-calculations\u002FSKILL.md",[],[],{"skillNo":57,"name":58,"nameZh":6,"description":59,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":60,"categories":61,"keywords":62,"publishedAt":19},"01M7FEE5CTE5QK55CEMXNNVWY9","bio-conformer-generation","Generates 3D conformer ensembles using RDKit ETKDGv3 with knowledge-enhanced distance geometry, MMFF94\u002FUFF force-field optimization, CREST + GFN2-xTB semi-empirical refinement, and macrocycle-aware torsion preferences. Provides explicit decision rules for single vs ensemble conformer use, RMSD pruning, energy windows, conformer count, and force-field choice. Use when preparing 3D ligands for docking, generating descriptor input for 3D QSAR, or sampling macrocycle\u002Fpeptide conformational ensembles.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fconformer-generation\u002FSKILL.md",[],[],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":69,"publishedAt":19},"01M7FEDNGFEMFWD1MSEDR5H7CY","bio-admet-prediction","Predicts ADMET properties using ADMETlab 3.0 (119 platform features, including 77 prediction models with modeled-endpoint uncertainty), ADMET-AI, DeepChem MolNet, and chemprop D-MPNN with explicit handling of OECD QSAR principles, applicability domain assessment, calibration, hERG\u002FCYP\u002FAMES endpoints, and PAINS \u002F Lipinski \u002F Ro5 \u002F Veber \u002F BBB druglikeness filters. Use when filtering compounds for drug-likeness, prioritizing leads by predicted safety, or building an in-house ADMET QSAR model.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Fbioskills\u002Fchemoinformatics\u002Fadmet-prediction\u002FSKILL.md",[],[],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"publishedAt":19},"01M7FED69GFB54FRF7AV5066DN","writing-systems-papers","Paragraph-level structural blueprint for 10-12 page systems papers targeting OSDI, SOSP, ASPLOS, NSDI, and EuroSys. Provides page allocation, paragraph templates, and writing patterns. Use when user says \"写系统论文\", \"systems paper structure\", \"OSDI paper\", \"SOSP paper\", or wants fine-grained structural guidance for a systems conference submission.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwriting-systems-papers\u002FSKILL.md",[],[],{"skillNo":78,"name":79,"nameZh":6,"description":80,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":19},"01M7FECVVDWZ0X0VEDTCE4B4DZ","wiki-enrich","Fill in the per-paper TODO sections of research-wiki\u002Fpapers\u002F\u003Cslug>.md pages that literature-ingest skills leave as bare scaffolds. Use when user says 'enrich wiki', 'fill paper TODOs', 'wiki body 補完', '把 paper 摘要寫進 wiki', 'research-wiki 自動填', or after a batch ingest that left papers\u002F as TODO scaffolds.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fwiki-enrich\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":19},"01M7FECD4BCJ2MTSBDDSE3ZAJ5","web-debug-search","Search GitHub, Stack Exchange, Chinese technical communities, official documentation, and general developer web sources for software errors, compatibility problems, API usage questions, and real-world workarounds. Use for debugging and discovery only; results are not paper-citation evidence.","https:\u002F\u002Fgithub.com\u002FCZX-LBJ\u002Fdeepseek-science\u002Fblob\u002Fmain\u002Fpackages\u002Fskill\u002Fskill-science\u002Fassets\u002Fsources\u002Faris\u002Fskills\u002Fweb-debug-search\u002FSKILL.md",[],[]]