jianzhichun/emerge/policy-optimization
Claude Code and agent skill by jianzhichun/emerge
- community
Checking that the SKILL.md file is still in the repository.
Use when policy health needs tuning: too many explore pipelines, repeated failures, stalled promotions, or noisy rollback behavior. Produces a prioritized optimization plan with safe threshold recommendations.
Install
npx vskill@latest install jianzhichun/emerge/policy-optimizationSKILL.md
Policy Optimization
Overview
Use this skill when /policy output shows drift, stalls, or noisy failure patterns. Goal: improve promotion quality and stability without unsafe threshold changes.
Core principle: diagnose first, tune second. Do not change thresholds without clear evidence from attempts, success_rate, verify_rate, and failure patterns.
When to Use
explorecount is high and long-lived.- Any pipeline has
consecutive_failures >= 1. canarypipelines fail to reachstabledespite enough attempts.- Rollbacks are frequent (
rollback_executed_countgrows). - The team asks "which policy threshold should we tune next?"
Do not use when:
- The request is only to display status (use
policycommand only). - There are no meaningful signals (too little data / low attempts).
Workflow
1) Capture policy snapshot
If parsing is needed:
2) Classify risk buckets
Classify each pipeline into one bucket:
- Critical:
consecutive_failures >= rollback_consecutive_failures - Warning:
consecutive_failures == 1or verify_rate materially low - Stalled: high attempts but still
explore/canary - Healthy: stable or trend strongly positive
3) Prioritize remediation
Priority order:
- Fix
Criticalpipelines first (execution correctness and rollback safety) - Fix high-volume
Warningpipelines - Promote
Stalledbut healthy candidates (remove lifecycle friction) - Leave
Healthyunchanged
Tie-breakers:
- Higher
consecutive_failuresfirst - Then lower
verify_rate - Then higher policy traffic (
policy_enforced_count)
4) Propose threshold tuning (guardrailed)
Threshold changes are allowed only when:
- Sample size is credible (attempts near/above promotion thresholds)
- Signal is consistent across multiple pipelines (not one-off noise)
- A specific failure mode is identified
Guardrails:
- Never relax all gates at once.
- Change one threshold group at a time, then observe.
- Keep rollback protection conservative (
rollback_consecutive_failures). - Prefer pipeline fixes over threshold relaxation when failures are deterministic.
5) Define verification window
After any tuning, run a short observation window and re-check:
- status movement (
explore -> canary -> stable) - success/verify trend
- new consecutive failure bursts
- rollback/stop counts
Output Contract
Return a concise optimization report:
- Snapshot: total pipelines, status distribution, threshold values
- Findings: critical/warning/stalled groups with evidence
- Actions: top 3-5 actions in execution order
- Threshold proposal: optional, with explicit risk statement
- Verification plan: what to watch and pass/fail criteria
Common Mistakes
| Mistake | Better approach | |
|---|---|---|
| Tune thresholds from one bad run | Wait for enough attempts and consistent pattern | |
| Lower multiple promotion gates together | Change one gate group, then observe | |
| Ignore verify_rate and focus only on success_rate | Treat verify as first-class gate for safety | |
| Keep retrying a broken pipeline in explore | Fix pipeline logic before policy tuning | |
| Optimize by intuition | Base every action on measurable policy signals |
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/policy-optimization/SKILL.md
Popularity
- Repository stars
- 106
- Repository forks
- 13
- 7-day trend score
- 23
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/jianzhichun/emerge/policy-optimization)