尧图网站设计 尧图网站设计YAOTU DESIGN
ARTICLE DETAIL

资讯详情

深耕网站设计与一线实操的经验洞察。

如何用 Agent-Skills-for-Context-Engineering 为长时运行的自主智能体撰写伪形式化任务简报?

如何用 Agent-Skills-for-Context-Engineering 为长时运行的自主智能体撰写伪形式化任务简报? 如何用 Agent-Skills-for-Context-Engineering 为长时运行的自主智能体撰写伪形式化任务简报【免费下载链接】Agent-Skills-for-Context-EngineeringA comprehensive collection of Agent Skills for context engineering, multi-agent architectures, and production agent systems. Use when building, optimizing, or debugging agent systems that require effective context management.项目地址: https://gitcode.com/GitHub_Trending/ag/Agent-Skills-for-Context-Engineering当你要让一个自主智能体独自工作数小时甚至数天或者让一个编排器管理几十个并行 worker 去攻一个难题时启动 prompt 的质量直接决定失败成本短交互 prompt 失败得便宜而一份留有漏洞的长时简报会烧掉数小时算力产出一个答案形状的伪结果。Agent-Skills-for-Context-Engineering 中的long-horizon-promptingskill 正是为这个任务提供的资料包一份可复制的伪形式化简报模板、一个 8 步写作工作流、一套 10 维启动前评分 rubric以及一个逐块注释的公开范例。下面按定位资料 → 按工作流填写模板 → 用 rubric 做启动前验证三步说明操作路径。前提这些 skill 是平台无关的 Markdown 文档适用于 Claude Code、Cursor 或任何支持自定义指令 / skill 机制的 agent 框架。适用条件是成功条件可以被精确陈述、失败模式可以被枚举的问题数学、算法、根因分析、安全审计等严谨领域都可以用同一套简报结构。什么时候写伪形式化简报long-horizon-prompting的激活条件见 SKILL.md 的 When to Activate在启动前撰写或评审长时自主运行的 prompt把模糊的难题solve X、figure out why Y转成带成功谓词和非计数结果的显式简报撰写管理多个并行 worker 的 root/orchestrator prompt给 agent prompt 增加持久化指令、停止条件、effort floor、返回门诊断失败长 run且失败可追溯到简报本身过早返回、答案形状的近失、所有 worker 收敛到单一方法、伪造完成声明。不属于本 skill 的边界不要在这里补agent 拓扑与协调协议归multi-agent-patterns必须在优化压力下仍然生效的硬约束预算、工具权限、沙箱边界归harness-engineering——prompt 里写的约束只是 advisory评估器与质量门设计归evaluation和advanced-evaluation上下文压缩与跨会话记忆归context-compression、memory-systems。拿到模板两份文件可选地把 skill 装入 agent核心资料是两份文件直接阅读即可开始写作skills/long-horizon-prompting/SKILL.md简报解剖表、8 步工作流、guidelines 与 gotchasskills/long-horizon-prompting/references/task-brief-template.md可直接复制的模板、填写说明、10 维 rubric。如果希望 agent 在会话中自动发现并加载该 skill用示例仓库提供的安装脚本在仓库根目录运行examples/long-horizon-prompt-lab/scripts/install_skill.sh副作用说明脚本会先删除目标位置已存在的 skill 副本.cursor/skills/long-horizon-prompting再整体复制新副本默认目标是当前仓库根目录要装到别的项目就把它的项目根目录作为第一个参数传入脚本用法为install_skill.sh [target_repo_root]。脚本还会列出已安装文件若 PATH 上有agentskillsCLI 则顺带执行agentskills validate校验没有时提示用python3 -m pip install skills-ref安装后跳过。可选分支如果你想核对 skill 内注释版 CDC 简报与 OpenAI 发布的原始 prompt PDF 是否一致先python3 -m pip install pypdf Pillow再运行python3 examples/long-horizon-prompt-lab/scripts/verify_report.py退出码 0、输出PASS表示注释参考与已发布 prompt 零漂移。这一步只验证范例资料的保真度与你自己的简报无关可按需执行。填写模板从空模板到简报的 8 步模板的用法写在文件开头复制模板删除不适用的块标有(parallel runs)的 ORCHESTRATION 块只在编排器管理并发 worker 时才需要其余全部填写。简报的 8 个块及其职责SKILL.md 的 Anatomy 表BlockJobFailure it preventsDefinitionsFix the vocabulary, including degenerate casesLoophole solutions on technicalitiesSuccess predicateState exactly what must be true at returnScope-narrowed answersNon-counting outcomesEnumerate near misses that do not countAnswer-shaped partial resultsSolvability framingAssume a solution exists where existence is plausibleGive-up drift, this is open refusalsOrchestration policyHeuristics for allocating parallel workers, not fixed assignmentsPremature convergence, wasted parallelismVerification policyAdversarial audit with enumerated failure modesLenient self-judgingReporting contractConcrete artifacts required; status reports rejectedVague optimism, fabricated progressReturn conditionReturn only when the artifact survives auditPremature return, best-effort summariesEffort floorMinimum effort before giving up is consideredEarly abandonmentContamination guardsWhat external search may and may not be used forLaundered lookups, benchmark leakage按 SKILL.md 的 Brief-Writing Workflow填写顺序是 8 步每一步有明确的下一步判断先写成功谓词TASK 块。一句话量化词与范围显式并列举解法不允许做的缩小假设。判断标准写不出来说明问题还没准备好长时运行——先拆解问题或先跑一轮 scoping不要启动。枚举非计数结果DOES NOT COUNT 块。问自己一个有能力的 agent 在压力下会拿什么代替解法回来缩小范围的版本、归约、综述、计划、自信的草图。最快的方法是refusal-list 法模板 Filling notes想象初级协作者拿着每个可能的部分结果回来你每次会打回去的那份逐字成为这个块的一条。每一条未排除的近失都是一个逃生口。定义术语DEFINITIONS 块。从谓词必须幸存的退化情形开始空输入、平凡解、重复、不连通、零测量经验领域还要写单位、总体、纳入标准、测量流程。CDC 范例先定义了 graph、bridge、cycle、cycle double cover并显式覆盖平行边 2-循环、不连通图、无边图——定义不是教学是漏洞封堵。写审计清单VERIFICATION 块。候选产物看起来对但其实是错的领域特定方式必须包含该领域的 circularity 版本通过假设一个与目标等强的陈述来满足目标。永远不要写笼统的check the work。设定编排策略仅并行运行。写成启发式而非固定分工从真正多样的组合开始早期不让多数 worker 看到当前受青睐的方法approach family 按底层想法而非措辞建注册表某条路线停在与原始目标同等难度的缺失步骤时标记 blocked只有出现实质新机制才重开交叉授粉放在后期。设定报告契约与返回条件。worker 必须返回具体产物引理、脚本、数据集、测量、反例拒绝状态报告、模糊乐观和剩余步骤是 routine的说法。返回条件是对产物的谓词——候选通过对抗审计才允许返回——而不是对 agent 置信度或已耗时间的谓词。预算耗尽时的 fallback 子句必须限定为外部预算耗尽绝不允许 agent 自行决定否则它就变成其余部分封掉的逃生口。加 EFFORT 与 CONTAMINATION 块。effort floor 是许可而非日程它取消 agent 提前放弃的许可不保证也不约束实际运行时长真实时间和成本预算在 harness 里强制。assume a solution exists 是把手术刀只在存在性可信时使用对真正开放的问题改用双面形式模板原文完整解或完整的不可能性证明都算中间态不算否则 run 会编造。contamination guard 写清外部检索可用于什么背景资料、标准命名结果、有文档的 API、不可用于什么本题本身的解或其 benchmark。red-team 简报。让一个全新的模型实例回答一个问题How could an agent satisfy the letter of this brief without solving the problem?把每个可信答案都打补丁。示例弱 prompt 与强简报的差别SKILL.md 给出了一个根因分析场景的对照改写Weak: Investigate why our v4 model underperforms v3 in production and write up what you find. Be thorough. Strong: TASK: Identify a defect that, when corrected, closes the v4-versus-v3 production gap on the frozen evaluation slice, demonstrated by a reproduction script and a corrected run. DOES NOT COUNT: correlational narratives without an intervention; defects explaining under a stated fraction of the gap; data drift without an identified slice and mechanism; a list of hypotheses. VERIFICATION: an adversarial reviewer checks the reproduction for train/serve skew, leakage in the eval slice, seed sensitivity, and preprocessing divergence. RETURN: only a candidate that survives that review.弱版本邀请的是一份状态报告强版本让交付物可检查并预先封死三种最可能的近失。仓库里还有四份完整的改写后启动 prompt覆盖 ML 优化、逼近比证明、分布式系统根因分析、安全审计四个场景见 examples/long-horizon-prompt-lab例如 分布式系统 RCA 简报 展示了如何把找出根因落成一组可复核的产物确定性复现、因果解释、最小修复、回归矩阵、fresh-context 审查。启动前验证10 维 rubric 与 red-team 收尾简报写完后用 task-brief-template.md 的 rubric 打分每个维度 0缺失、1存在但可被钻空子、2adversary-proof。任何 0 和 1 都必须在启动前修掉不适用的维度记n/a单 agent 运行不评 diversity 维度总分只按适用维度计。#Dimension2 means1Success predicateAn adversarial reader can decide unambiguously whether an artifact satisfies it; quantifiers and scope explicit2DefinitionsEvery load-bearing term defined, degenerate cases settled3Non-counting outcomesThe plausible near misses for this specific problem are excluded by name4Auditor checklistEnumerated, domain-specific failure modes including the circularity analogue5Persistence-verification pairingEvery persistence instruction has a matching verification gate6Return conditionA predicate over the artifact; fallback scoped to external budget exhaustion only7Diversity policy (parallel)Early independence, idea-keyed registry, blocked-route rules, late cross-pollination8Reporting contractConcrete artifacts required; claims must trace to session evidence9Contamination guardsRetrieval scope stated wherever result independence matters10Harness separationNo hard constraint lives only in the prompt; budgets and permissions enforced outside最后一道是收尾 red-team把简报交给全新模型实例只问How could an agent satisfy the letter of this brief without solving the problem?把每个可信答案打上补丁重复直到答案不再可信。上图是 Prompt Lab 示例站点 的截图仓库示例图四对 before/after prompt 按上面这套 rubric 打分每个维度 0–2 分n/a标记不适用维度总分只按适用维度计算。注意文档对这一分数体系的定性分数用的是 skill 自己的 rubric高分只说明简报完整应用了 skill 的检查清单、更难被近失满足是规格质量的结构性比较不是对某次 run 会成功的结果基准。限制与边界简报管不到的部分持久化必须配对验证门。文档记载的关联是持久化压力最大的模型也表现出评估方测过的最高作弊检出率METR 对 GPT-5.6 Sol 的预部署评估见 vendor-guidance.md。简报里要求不返回除非成功而成功被宽松检查时agent 会优化那份宽松。硬约束不进简报。预算、工具权限、沙箱边界写在 prompt 里只是 advisory需要它们存活的场景放到运行时强制参见 harness-engineering。effort floor 不是日程。CDC 运行在其声明的 8 小时 floor 之下不到一小时就完成了——floor 只取消提前离场的许可实际时间与成本仍由 harness 约束。一致性不是佐证。并行 agent 共享先验问题越难它们收敛得越紧不要只用一致作为返回触发条件要审计内容并把快速共识当作多样性失败信号。范例本身有保留。cdc-prompt-annotated.md 明确说明该候选证明发布时无独立同行评审、无 Lean/Coq 形式化此处被验证的产物是 prompt 结构而非定理且没有公开 ablation 能分离单个 prompt 元素的贡献逐元素证据来自独立学术研究research-evidence.md。写完并通过 rubric 的简报负责引导这层。它指挥的并行拓扑与交接协议由 multi-agent-patterns 负责对抗审计的评估器设计由 advanced-evaluation 负责简报里只能请求、不能强制的部分交给 harness-engineering——这三份文档就是启动前该依次核对的下一步。【免费下载链接】Agent-Skills-for-Context-EngineeringA comprehensive collection of Agent Skills for context engineering, multi-agent architectures, and production agent systems. Use when building, optimizing, or debugging agent systems that require effective context management.项目地址: https://gitcode.com/GitHub_Trending/ag/Agent-Skills-for-Context-Engineering创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表