个人学习笔记 个人笔记PERSONAL NOTES
ARTICLE DETAIL

文章详情

整理前端与后端开发技术的学习记录与踩坑思路。

Serena 工具评估提示词全解:如何用一份 Prompt 客观测量 AI 编码 Agent 的工具增量价值

Serena 工具评估提示词全解如何用一份 Prompt 客观测量 AI 编码 Agent 的工具增量价值【免费下载链接】serenaA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent项目地址: https://gitcode.com/GitHub_Trending/ser/serena导读本文围绕 Serena面向 AI 编码 Agent 的语义检索与编辑 MCP 工具包官方评测体系中的两份核心提示词展开主评估提示词Evaluation Prompt与结果摘要提示词Summary Prompt。它们被设计为「一次会话、一份提示词、指向任意代码库」的通用评测机制用于量化回答一个关键问题如果一个熟练使用内置工具Read / Edit / Write / Glob / Grep / Bash的 Agent 只拥有内置能力与额外接入 Serena 相比在能力、工作流与效率上会感受到多大的具体差异读完本文你将掌握评测提示词的完整结构、20 项实操任务的分类逻辑、九段式报告的写作规范以及如何在任意项目上用任意 Agent 复现这套评测并结合仓库源码理解其背后的工具实现。一、评测体系总览两份提示词的分工Serena 官方评测共使用两份提示词它们按顺序传递给 LLM 以生成评测结果见 docs/04-evaluation/020_prompts/000_prompts.md主评估提示词驱动 Agent 在真实代码库上同时使用 Serena 工具与内置工具、逐项完成约 20 个动手任务并产出证据化的增量delta分析报告摘要提示词在评估完成后将整份报告压缩为一句话、面向最终用户的结论——这正是潜在新用户看到的第一句关于 Serena 对 Agent 价值的描述。评测全程采用一次性one-shot会话Agent 只拿到主评估提示词与后续的摘要提示词不读取项目记忆、CLAUDE.md 快捷方式或任何既有笔记。从 docs/04-evaluation/010_methodology.md 可以看到这套设计有三个核心目标通用性任何用户、任何项目、任何 Agent 都能复现、Agent 自评Agent 既是执行者又是评估者因为它是工具的真实使用者、系统性覆盖且结构上抗偏倚用任务类别而非固定任务覆盖全部能力面并强制报告中性/负面结论。已发布的评测结果见 docs/04-evaluation/030_results/000_evaluation-results.md覆盖了多种 Agent 与代码库组合——Claude Code (Opus 4.6) 在大型 Python 代码库、Codex (GPT 5.4) 在 Java 代码库、Copilot CLI 在多语言 monorepo、GLM 5.1 在 Claude Code 中、以及 JetBrains Junie 插件等——均使用 JetBrains 后端版本。不同 Agent、不同语言、不同代码库得出的核心结论高度收敛Serena 的最大贡献是把跨文件、语义感知的多步操作折叠为单个原子调用而小型本地编辑、文本搜索、配置文件与 Shell 工作仍以内置工具为优。二、主评估提示词完整原文下面完整复刻官方主评估提示词正文与 010_evaluation-prompt.md 一致后续各节将逐部分拆解其设计意图并结合源码佐证。# Evaluate Serenas Tools Against Built-Ins You have access to Serenas coding tools alongside your built-in tools (Read, Edit, Write, Glob, Grep, Bash, etc.). I want a thorough, evidence-based evaluation of **what Serenas tools add on top of the built-ins**, assuming both toolsets are used correctly. This is an evaluation, not a user guide, and it is not a binary adoption pitch. Your job is to answer: *if a competent user of both toolsets had only the built-ins, what concrete capabilities and efficiency differences would they experience, and by how much?* A reader who finishes your report should have a clear, specific picture of what Serena adds — as well as where it provides no meaningful improvement or introduces tradeoffs — in terms of capabilities, workflows, and efficiency. Not a thumbs-up/thumbs-down, but a sharp description of the delta. Failure modes from misuse, silent-failure traps, gotcha comparisons, and be careful of X warnings are out of scope. They belong in onboarding material for a developer learning the tools, not in a delta analysis of what the tools add. **Describe the measured differences clearly and neutrally.** Avoid generic or non-informative framing such as both have their place unless supported by concrete findings. If Serena adds substantial capabilities, name and quantify them. If it adds marginal or no capabilities, say that and show why. If there are regressions or tradeoffs, include them explicitly. The two toolsets are complementary — thats a given, not the answer. Serena is an augmentation layer, not a replacement. Do not penalize it for tasks it was not designed to address — instead, note those tasks as built-in only and move on. The evaluation should measure what Serena adds where it applies, not what it fails to add where it doesnt. The answer is a specific list of what Serena contributes (or does not contribute) to a correct-use workflow relative to built-ins. Write the report to serena-evaluation.md in the repo root. ## Ground rules ### Starting conditions - Start fresh. Do not read project memories, CLAUDE.md shortcuts, or prior notes about the repo. Do not read documentation files either. Explore as if youve never seen it, focusing on code. - Use git as your safety net — experiment freely. Any edit can be reverted with git checkout -- file or git stash. Run edits for real; dont simulate. A hands-on comparison is worth far more than a thought experiment. - After each experiment, verify the working tree is clean with git status --short before moving on. ### How to compare — correct use only - **Correct-use rule.** Evaluate each tool on inputs and tasks it was designed for, called the way a competent user would call it. A tool doing exactly what its contract says is not a finding, even if a careless caller could misuse it. - **Know the contract before you call.** Before invoking any tool, have a one-sentence understanding of what it does. If you expect an error or not applicable, dont make the call. - **Refactoring semantics are real.** Inlining requires a substitutable function (typically single-expression, no side effects); moving requires a legal target; safe-delete requires no surviving usages. If the repo has no suitable candidate for a given refactoring, report no suitable candidate in this codebase and skip it — dont contrive a broken input. ### How to compare — workflow level, not single-call level - For every task, write out the full end-to-end call chain on each side before drawing conclusions. Include prerequisite reads and follow-up steps. - Do not evaluate a tool based on criteria that only arise from mixing workflows incorrectly. - Ephemeral addressing is a liability. Line numbers and byte offsets go stale after edits; stable addressing (name paths) may reduce rework. ### How to measure - Track observations during execution. For every tool call, note: number of calls, approximate input size, output size, and any prerequisite or verification steps. - Separate call count, input payload, output payload, and verification cost as distinct axes. - Include prerequisite Reads and post-hoc verification steps in comparisons. When a task falls entirely outside Serenas design scope (e.g., reading config files, small text edits where Edit already sends minimal payload), classify it as not applicable rather than as a negative delta. A negative delta requires that Serena targets the task and performs worse, not that a tool designed for something else is suboptimal when misapplied to it. ## Exploration phase — tasks to actually perform Work through the following. Each item exercises a specific capability under correct use; substitute an equivalent if an item isnt applicable. ### Codebase understanding 1. Get a high-level overview of the repository structure — top-level layout, main packages, entry points. 2. Pick one large source file (300 lines). Get a structural overview of it. Do it with semantic overview tools and with Glob/Grep/Read. Then write out the concrete next step on each side and compare the pair of calls, not just the overview call. 3. Pick a specific method inside a class and retrieve its body without reading the surrounding file. 4. For one non-trivial symbol, find all references across the codebase. Compare recall and precision under the question who uses this in code? vs where is this mentioned anywhere, including docs? 5. For a class, list its subclasses / implementations and its supertypes, including transitively. Compare against what text search would need to do. 6. For at least one symbol from an external dependency (a third-party library), try to retrieve its definition or signature. Note whether each toolset can do this at all and what infrastructure it requires (environment activation, site-packages discovery, language-server indexing, etc.). ### Single-file edits — span the full range of edit sizes 7a. Small tweak (1–3 lines inside a method). Change an error message or rename a local variable inside a larger method. Do it with Edit and with symbolic body replacement. Compare payload sent, payload received, and prerequisite reads. 7b. Medium rewrite (replace ~10–30 lines — most of a method body). Rewrite the main logic of a method while keeping its signature. Do it both ways. 7c. Large/whole-body rewrite. Pick a method of 50 lines and rewrite the entire body. Do it both ways. 8. Insert a new function/method at a specific structural location (for example, right after an existing method). Try both the symbolic-insert path and the manual Edit path. 9. Rename a private helper used only within one file. Compare doing it by hand vs. using a semantic rename. ### Multi-file changes 10. Rename a symbol (function, class, or method) used across several files including imports. Compare the semantic path against the built-in equivalent chain. 11. Move a symbol from one module to another, updating imports at all call sites. Use the semantic move tool if available; plan the built-in equivalent honestly. 12. Move a file or package to a different location, updating imports at all call sites. Use the semantic move tool if available; plan the built-in equivalent honestly. 12. Delete a symbol safely, checking it has no remaining usages. Compare search-then-delete with a safe-delete tool. 13. Delete a symbol and propagate the deletion to all call sites. Compare to how the built-in equivalent would work. 13. Inline a small helper into its call sites — only if the codebase contains a function that is legally inlinable. If no such candidate exists, report no suitable candidate and skip it. ### Reliability correctness under correct use 14. Scope precision. Demonstrate that semantic tools address symbols by name path and can target a specific class method, override, or overload that text search would over-match. 15. Atomicity. A semantic cross-file refactoring is atomic: either all sites are updated or none. A chain of Edit calls is not. 16. Success signals. For each completed refactor, note what each tool returns on success. ### Workflow effects across multiple edits 17. Chain at least three edits in one file. Report what each toolset requires between edits. 18. Multi-step exploration across the repo. Note whether intermediate results remain useful across later edits or have to be refreshed. ### Things where the comparison shouldnt be interesting 19. Read and understand a non-code file (config, changelog, docs, notebook). Semantic-code tools dont apply — use Read. 20. Search for a free-text pattern across the repo (log string, magic constant, URL). Use Grep. ## Evaluation phase Write a report structured for progressive disclosure. **Value-weighting is required.** For every contribution or difference you identify — positive, neutral, or negative — estimate: - **Frequency:** how often this arises in typical coding work - **Value per hit:** calls saved, tokens saved, or correctness impact Order findings by **frequency × value-per-hit**, not novelty. **Every section must end with a one-sentence verdict** summarizing the practical takeaway. ### 1. Headline: what Serena changes Open with a precise description of the delta Serena provides. Distinguish between three categories: (a) tasks where Serena adds capability, (b) tasks where Serena applies but offers no improvement, and (c) tasks outside Serenas scope. Only category (b) constitutes a neutral or negative finding. Category (c) is context, not a finding. A reader stopping here should understand both what is gained and what is not. **Verdict:** (one sentence) ### 2. Added value and differences by area (3–6 bullets) Each bullet must describe: - What Serena changes relative to built-ins (positive, neutral, or negative) - Frequency - Value per hit Avoid framing in terms of wins; describe concrete differences. **Verdict:** (one sentence) ### 3. Detailed evidence, grouped by capability Per task: - What you attempted - Full call chain on both sides - Payloads sent and received Include cases where: - Serena is better - Built-ins are better - No meaningful difference exists End each subsection with a verdict. ### 4. Token-efficiency analysis Address: - Payload differences across edit sizes - Forced reads - Stable vs ephemeral addressing Include cases where each toolset is more efficient. **Verdict:** (one sentence) ### 5. Reliability correctness (under correct use) Address: - Precision of matching - Scope disambiguation - Atomicity - Semantic queries vs text search - External dependency symbol lookup and what setup it depends on Include both strengths and limitations of each toolset. **Verdict:** (one sentence) ### 6. Workflow effects across a session Evaluate multi-step workflows and whether advantages compound or diminish. Include neutral or negative findings where applicable. **Verdict:** (one sentence) ### 7. Unique capabilities (if any) List capabilities that have no practical built-in equivalent. If none exist, explicitly state that. Annotate each with frequency and impact. **Verdict:** (one sentence) ### 8. Tasks outside Serenas scope (built-in only) Identify tasks where built-ins are the natural choice because Serenas tools dont target them. List these briefly for completeness but do not frame them as Serena shortcomings — they are outside its scope. Estimate their share of daily work to contextualize how much of a session Serenas augmentation covers. **Verdict:** (one sentence) ### 9. Practical usage rule Provide a decision rule for choosing between toolsets based on task type. **Verdict:** (one sentence) ## What Im looking for - Claims grounded in observed evidence - Explicit reporting of **positive, neutral, and negative deltas** - Clear quantification of impact - Honest workflow-level comparisons ## What I am not looking for - Misuse-based failure analysis - Gotcha comparisons - Neutral statements without evidence - Binary recommendations - Novelty-driven ordering - Unquantified claims三、提示词拆解一定位、边界与基本规则3.1 评测的对象是「增量」不是「胜负」提示词开篇就划定了评测标的Serena 作为增强层augmentation layer在内置工具之上额外提供了什么而非两款相互竞争的产品。这意味着报告必须是对 delta 的锐利描述而不是点赞/踩的二元结论误用导致的失败模式、静默失败陷阱、小心 X式告诫明确排除在范围之外——这些属于新手上手指南不属于增量分析两个工具集互补是给定前提不是答案本身对 Serena 未设计覆盖的任务应标记为 built-in only 并继续不得视为扣分项。这种边界设计在 docs/04-evaluation/010_methodology.md 中被总结为三类分类法(a)Serena 增加了能力、(b)Serena 适用但无改进、(c)超出 Serena 范围。只有 (b) 类构成中性或负面发现(c) 类是背景而非发现。方法论中还记录了第三方对提示词公平性的审查Claude Opus 认为该提示词通过强制要求 (b) 类发现并显式报告负面 delta在结构上抵消了正确使用规则可能对 Serena 的潜在偏袒。3.2 起始条件空白起点 git 安全网从零开始不读取项目记忆、CLAUDE.md 快捷方式、既往笔记与文档文件把代码库当作从未见过来探索聚焦代码本身。git 作为安全网所有编辑真实执行动手对比远胜于思想实验用git checkout -- file或git stash随时回退每轮实验后用git status --short确认工作树干净再进入下一项。这保证了评测的客观性与可重复性——每位使用者都能在自己选定的代码库上以相同条件复现。3.3 三条对比纪律正确使用规则Correct-use rule只按契约contract评估工具——工具按其定义做好本职工作不构成发现粗心调用者的误用也不构成发现。调用前必须有一句话能说清该工具做什么预期会出错或不适用的场景就不要调用。工作流级对比而非单次调用对比每个任务都要先写出两侧的完整端到端调用链含前置读取与后续步骤并警惕短暂寻址ephemeral addressing的负债——行号与字节偏移在编辑后会失效而基于名称路径name path的稳定寻址能减少返工。量化测量对每次工具调用记录调用次数、输入规模、输出规模及任何前置/验证步骤将调用数、输入载荷、输出载荷、验证成本作为独立维度分开统计前置 Read 与事后验证步骤都必须计入对比。源码佐证Serena 的编辑工具确实返回与成功信号相关的结构化结果。例如 symbol_tools.py 中ReplaceSymbolBodyTool、InsertAfterSymbolTool、InsertBeforeSymbolTool、SafeDeleteSymbol等返回SUCCESS_RESULT并通过EditingToolWithDiagnostics附上编辑后的诊断信息SafeDeleteSymbol在发现残留引用时不会执行删除而是返回Cannot delete, the symbol ... is referenced in: {...}的引用清单——这正是提示词第 16 项成功信号要对比的行为差异。四、提示词拆解二20 项探索任务的能力面提示词把任务组织为类别而非固定任务——这是反挑选的关键设计Agent 从当前代码库中自行挑选具体实例从而让评测自然适配项目实际内容例如 Python 代码库中若无合法可内联候选就如实报告 no suitable candidate 并跳过。4.1 代码库理解任务 1–6任务考察能力1仓库顶层结构、主包、入口点的高层概览2对 300 行大文件做结构概览语义概览工具 vs Glob/Grep/Read并对比下一步调用对而非单次概览调用3按名称路径直接取回类内某方法体而不读取整个文件4全代码库引用查找对比谁在代码里用它与哪里提到它含文档的召回率与精确率5列出类的子类/实现与父类/超类型含传递闭包对比文本搜索所需工作量6第三方依赖符号的定义/签名检索记录各工具集能否做到、需要什么基础设施环境激活、site-packages 发现、语言服务器索引等源码佐证任务 2/3 对应GetSymbolsOverviewTool与FindSymbolToolsymbol_tools.py。概览工具按 kind 分组返回紧凑 JSONdepth-1时对 Java/Kotlin 默认取 1、其余语言取 0FindSymbolTool支持名称路径模式如MyClass/my_method重载用MyClass/my_method[0]下标区分、include_body、include_info、substring_matching、include_kinds/exclude_kinds等参数。任务 4 对应FindReferencingSymbolsTool任务 5 对应FindImplementationsTool与类型层次查询任务 6 对应FindDeclarationTool。JetBrains 后端还有对应的 JetBrainsMoveTool、JetBrainsSafeDeleteTool、JetBrainsTypeHierarchyTool 等。4.2 单文件编辑覆盖全尺寸谱系任务 7a–97a 小微调方法内 1–3 行改错误信息或重命名局部变量用Edit与符号体替换各做一次对比发送/接收载荷与前置读取7b 中等重写约 10–30 行方法主体大部保持签名重写主逻辑7c 大型/整体重写选取 50 行方法整体重写8 结构化插入在特定结构位置如某方法之后插入新函数/方法分别走符号插入路径与手工 Edit 路径9 局部重命名重命名仅在同一文件内使用的私有辅助函数对比手工与语义重命名。这一全尺寸谱系设计直接服务于第 4 节 Token 效率分析不同编辑规模下符号体替换需携带完整方法体与Edit子串匹配、载荷最小的效率对比会有显著差异。4.3 多文件变更任务 10–13覆盖跨文件重命名含 import 更新、符号跨模块移动更新所有调用点 import、文件/包移动、安全删除无残留引用才删、删除并传播到所有调用点、小助手函数内联仅当存在法律上可内联的候选。提示词明确要求Use the semantic move tool if available; plan the built-in equivalent honestly——即内置侧的等价调用链也要如实规划不能因为麻烦就一笔带过。4.4 可靠性与正确性任务 14–16作用域精确性语义工具按名称路径寻址能精确命中特定类方法、覆盖或重载而文本搜索会过度匹配原子性语义跨文件重构要么全部更新要么全部不动而Edit调用链不具备原子性成功信号记录每个工具成功时的返回值。4.5 工作流效应与不应有趣的对比任务 17–2017单文件内串联至少三次编辑报告各工具集在编辑之间需要做什么18多步跨仓库探索中间结果在后续编辑中是否仍然有效、是否需要刷新19/20非代码文件配置、changelog、文档、notebook用Read自由文本模式日志字符串、魔法常量、URL用Grep——这两类明确属于内置工具主场被用来界定 Serena 能力面的边界。源码佐证Serena 自身也提供SearchForPatternToolfile_tools.py但它的文档字符串明确提醒Prefer symbolic operations if you know which symbols you are looking for!——这与提示词第 20 项自由文本搜索用 Grep的定位一致符号类查找走语义工具纯文本检索走文本工具。文件类工具集中的ReadFileTool、ListDirTool、FindFileTool、ReplaceContentTool、ReplaceInFilesTool、InsertAtLineTool等则对应内置侧的能力基线file_tools.py。五、提示词拆解三评估阶段的九段式报告规范提示词要求报告渐进式披露progressive disclosure——先给结论再给证据并强制两条全局纪律价值加权Value-weighting每个发现正/中/负都要估算频率frequency与单次价值value per hit节省的调用数、Token 数或正确性影响并按频率 × 单次价值排序而不是按新奇度排序每节必须有一句话裁决Verdict总结实操要点。九个小节各自的职责Headline精确描述 Serena 带来的 delta区分 (a) 增加能力 / (b) 适用但无改进 / (c) 超出范围只读这一节就能同时理解得到了什么与没得到什么分领域增量3–6 条每条必须写明相对内置工具的差异正/中/负、频率、单次价值禁止用赢了这类措辞只描述具体差异按能力分组的具体证据每个任务记录尝试内容、两侧完整调用链、发送与接收的载荷且必须包含 Serena 更好、内置更好、无明显差异三类案例每小节以裁决收尾Token 效率分析覆盖编辑规模的载荷差异、强制读取forced reads、稳定 vs 短暂寻址并诚实给出各工具集更高效的情形可靠性与正确性正确使用前提下匹配精确度、作用域消歧、原子性、语义查询 vs 文本搜索、外部依赖符号查找及其依赖的搭建条件正反两面都要写会话内工作流效应多步工作流的优势是复合放大还是递减适用时包含中性/负面发现独特能力列出没有实际内置等价物的能力没有就明确说没有逐条标注频率与影响超出 Serena 范围的任务built-in only简要列出内置工具的自然主场并估算其在日常工作中的占比以说明 Serena 的增强覆盖了会话的多大比例实操使用规则给出按任务类型选择工具集的决策规则。最后我在寻找什么 / 不寻找什么两段进一步锁死质量标准要求基于观测证据的主张、正/中/负 delta 的显式报告、影响的可量化、诚实的工作流级对比禁止基于误用的失败分析、陷阱对比、无证据的中性陈述、二元推荐、按新奇度排序与未量化的主张。结果实证已发布的 Claude Code on Tianshou 报告 严格遵循了这一结构。其 Headline 明确指出跨文件重构重命名、移动符号、移动文件1 次原子调用 vs N×(GrepReadEdit) 调用链是 Serena 最强贡献而单文件唯一字符串重命名、方法内 1–3 行小编辑、已知位置的代码插入属于 (b) 类适用但无改进非代码文件、自由文本搜索、Shell/git、从零建文件属于 (c) 类内置主场。六、摘要提示词把整份报告压成一句话评估完成后Agent 会收到 摘要提示词其全文为Write a one-sentence user-facing summary about the value that Serenas tools provide for coding. With a bit of emotion but grounded in the evaluation that you have done above. It should be written from the perspective of a coding AI agent and make it clear whether an AI agent would ask its owner to add Serenas tools or not. It will be the first sentence that a potential new user will see about how useful Serena is for an AI agent.要点解析一句话、面向用户、略带情感但植根于刚完成的评估以编码 AI Agent 的视角撰写明确表态Agent 是否会请求其所有者安装 Serena这句话将成为潜在新用户看到的第一句关于 Serena 对 Agent 价值的话——docs/04-evaluation/000_evaluation-intro.md 顶部展示的三条引言即为此提示词的产物例如 Claude Code (Opus 4.6, medium) 的结论Serenas IDE-backed semantic tools are the single most impactful addition to my toolkit — cross-file renames, moves, and reference lookups that would cost me 8–12 careful, error-prone steps collapse into one atomic call…。intro 文档特别强调These are not marketing quotes——它们是 Agent 在真实代码库上、同时使用两套工具完成动手任务后给出的一己之见。不同的 AgentClaude Code 在大型 Python 库、Codex 在中等规模 Java 项目、Junie 插件等独立收敛到同一核心发现这正是该评测体系可复现性价值的体现。七、方法论设计为什么不用基准测试为什么让 Agent 自评docs/04-evaluation/010_methodology.md 对评测设计给出了完整论证为什么不用标准编码基准SWE-bench、HumanEval 等基准任务通常是小而独立的题读改几个文件即可几乎不触及 Serena 的发光场景跨文件重构、按符号结构导航大型代码库、稳定寻址下的连续编辑、类型层次与外部依赖查询分数主要度量的是Serena 本就不打算帮忙的任务结果无法推广到用户自己的项目——Serena 的价值依赖代码库规模/语言/复杂度、Agent模型/内置工具与客户端Claude Code、Codex、IDE 插件等的组合固定任务必然引入选择偏差而任务类别机制能系统性覆盖能力面又不挑选。为什么让 Agent 自我评估因为 Agent 是工具的真实终端用户能从第一手经验报告工作流摩擦、载荷开销与调用计数避免了人类评估者模拟 Agent 用法的失真。当然也有明确局限已发布结果仅覆盖两个 Agent/代码库组合且均为 JetBrains 后端单次会话存在方差LSP 后端尚未被评测——但这些是成本约束而非方法论缺陷可复现设计恰好邀请用户自行填补。八、如何在你的项目上复现这套评测参考 docs/04-evaluation/030_results/000_evaluation-results.md 的说明复现流程非常简单准备环境让 Agent 同时具备 Serena 工具集与其内置工具Read/Edit/Write/Glob/Grep/Bash。Serena 的工具分两类来源LSP 后端与 JetBrains 后端后者能力更强已发布评测均使用之工具按模块组织于 src/serena/tools/file_tools、symbol_tools、jetbrains_tools、memory_tools、cmd_tools、config_tools、workflow_tools、query_project_tools统一从__init__.py导出一次性会话把 主评估提示词 作为唯一输入指向你选择的代码库Agent 会自行完成约 20 项任务可从任务类别中按项目实际情况替换实例真实执行编辑并用git diff验证、用git checkout -- file/git stash回退产出报告报告写入仓库根目录的serena-evaluation.md遵循九段式结构与每节一句话裁决生成摘要评估结束后再传入 摘要提示词得到一句话用户向结论。无需安装任何额外组件、无需编写脚本——一份提示词就是整个评测框架。你可以在自己的代码库、自己的 Agent 上独立验证官方结论跨文件语义重构是 Serena 价值最高的贡献结构化导航提供中等优势而小型本地编辑由内置工具处理更高效例如 Claude Code 报告实测小编辑内置工具载荷约为 Serena 的 1/4.5Codex 报告也指出方法内微调与单文件简单重命名对 Serena 无增益。关于 JetBrains Junie 场景的独特结论其原生工具与 Serena 仅有重命名能力重叠其余符号与重构工具无内置等价物可参见 Junie 评测报告。结语Serena 的评测提示词本身就是一个值得借鉴的增强层测量方法论范本以任务类别覆盖能力面、以正确使用为前提、以三分类增加能力/无改进/超出范围防止误用惩罚与越界苛责、以价值加权排序保证结论可操作、以每节一句话裁决保证信息可渐进消费。无论你是想验证 Serena 在自己的代码库上的实际价值还是想设计一套针对 AI 编码工具链的客观评测协议这份提示词及其背后的源码实现都提供了可直接复用的完整方案。【免费下载链接】serenaA powerful MCP toolkit for coding, providing semantic retrieval and editing capabilities - the IDE for your agent项目地址: https://gitcode.com/GitHub_Trending/ser/serena创作声明:本文部分内容由AI辅助生成(AIGC),仅供参考
返回列表