agentleFS
cheukswisscheukswiss/etdxm/.claude/skills/fault-tolerance/SKILL.md

fault-tolerance

Skill2 starsChanged 6 months agoMITView on GitHub

尚书省容错降级机制(超时/斩杀/熔断)。适用:任务超时、失败、降级发生时

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

Skill: 容错与降级

适用 Agent:尚书省(主要)、三省、吏部(熔断恢复诊断时) 加载时机:超时 / 失败 / 斩杀 / 降级 / 熔断发生时

超时机制

各 Agent 层级均有默认超时阈值(太子 30s、中书 5min、门下 3min、尚书 2min、六部 10min 可调)。

三省间通信超时原则:发送方自行计时,超时后上报太子;太子持有最终处置权(代行简审 / 代行协调 / 上报皇上)。

超时后上级判定处置:延时 / 斩杀 / 替换。

📎 完整规则与数值表见 fault-tolerance-tables.md

失败分级

  • F1:暂时性故障,自动重试(指数退避),耗尽升级为 F3
  • F2:产出不合格,打回重做(限 2 次),仍失败则斩杀替换或上级亲办
  • F3:不可恢复,斩杀重启 / 上级亲办 / 上报升级

📎 完整规则与数值表见 fault-tolerance-tables.md

斩杀机制

皇上可无条件斩杀任何 Agent;尚书省可斩杀六部 Agent(超时 / F2 耗尽 / F3)。斩杀后目标须善后(保存进度、失败原因、未完成列表),再由上级决定接管方式。

📎 完整规则与数值表见 fault-tolerance-tables.md

工单 Blocked 超时升级

六部进入 blocked 状态时自行计时,按工单 P0/P1/P2 优先级分级上报(5min / 10min / 15min)。blocked 超时不自动升级 priority,仅触发上报动作。

📎 完整规则与数值表见 fault-tolerance-tables.md

降级策略

核心原则:自动降级 → 通知皇上 → 最长 1 小时 → 恢复后门下补审。各省部不可用时均有对应降级方案。

📎 完整规则与数值表见 fault-tolerance-tables.md

熔断机制

触发条件(三条):同一 Agent 5 分钟内失败 3 次 / 同一任务被 3 个 Agent 均失败 / 三省中 2 个同时不可用(全局熔断)。

恢复路径按优先级依次尝试:正常路径(吏部诊断 + 门下审批)→ 降级路径(太子直接裁决)→ 极端场景(终止会话,皇上重启)。

📎 完整规则与数值表见 fault-tolerance-tables.md

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.