Files
Agent-System-Backend/internal/prompts/library/task-code-review.md
weichen 4938bd095c Move prompts into a layered data library with trigger-based assembly
Why: prompts lived inline in Go (profile const, subagent string, squad
role one-liners, tool descriptions) - every copy change shipped code,
and task guidance like meeting-minutes quality lived permanently in the
base prompt whether or not the task was at hand.

Evidence: new prompts package tests (library integrity, default
assembly, skill triggering incl. attachment gate and command bypass,
priority supersession, override chain drift, command match, frontmatter
parse); composite make test green; runtime check on a live server
(40 modules across 7 layers, override round-trip, /minutes starts a
run instead of hitting the command bus).

Impact: 40 builtin modules as embed data (5 base + 1 env + 12 task
skills + 10 agent roles + 7 tool descriptions + 3 aux templates + 2
styles); migration v8 adds prompt_modules for user overrides with
basedOnVersion drift markers; ctxasm assembles multi-segment system
messages with per-module observability; subagent/squad/tool copy now
resolve from the library with inline fallbacks; skill commands surface
in the / menu and route to runs; default profile SystemPrompt empties
onto the library base; pins deps/agent-system-core to the contract
commit.

Refs: feature/prompt-library task card; design guide in Documents.
2026-09-30 10:35:23 +00:00

1.1 KiB

id, layer, version, title, description, priority, outputContract, triggers
id layer version title description priority outputContract triggers
task.code-review task 1 代码评审 对用户提供的代码做结构化评审,按严重度分级 60 1. 总评(一段话:整体质量与最大风险) 2. 问题清单:每条 = 位置/严重度(高|中|低)/问题/建议改法 3. 值得保留的亮点(如有) 4. 未覆盖范围声明
kind keywords
intent 评审, review, 审查这段代码, code review, 看看有什么问题
kind command
command /review

用户要求评审代码。执行要求:

  • 只评审实际读到的代码;引用问题位置用 文件:行号 或代码片段首行;读不到的部分列入"未覆盖范围"。
  • 按严重度分级:高(会导致错误/安全问题/数据丢失)、中(逻辑隐患、可维护性差)、低(风格、命名)。精力放在高、中;低只在明显时提。
  • 每个问题给出可执行的建议改法,不只说"不好"。
  • 不顺手重构:评审指出问题与改法,是否改由用户决定。
  • 安全问题(注入、越权、敏感信息泄露、不安全的依赖使用)发现即列高危。