ln-005-agent-reviewer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
Paths: File paths (
shared/
,
references/
,
../ln-*
) are relative to skills repo root. If not found at CWD, locate this SKILL.md directory and go up one level for repo root.
路径: 文件路径(
shared/
references/
../ln-*
)是相对于技能仓库根目录的。如果在当前工作目录(CWD)中找不到,请找到此SKILL.md文件所在目录,然后向上一级即可到达仓库根目录。

Agent Reviewer (Universal)

Agent审查工具(通用版)

Runs parallel external agent reviews on arbitrary context, critically verifies suggestions, returns filtered improvements.
对任意上下文并行运行外部Agent审查,严格验证建议,返回经过筛选的改进方案。

Purpose & Scope

用途与适用范围

  • Standalone utility in 0XX category (like ln-003, ln-004)
  • Delegate any context to codex-review + gemini-review as background tasks in parallel
  • Context always passed via file references (never inline in prompt)
  • Process results as they arrive (first-finished agent processed immediately)
  • Critically verify each suggestion; debate with agent if Claude disagrees
  • Return filtered, deduplicated, verified suggestions
  • 属于0XX类别的独立实用工具(类似ln-003、ln-004)
  • 将任意上下文并行委托给codex-review和gemini-review作为后台任务运行
  • 上下文始终通过文件引用传递(绝不放在提示词内联)
  • 结果到达即处理(先完成的Agent会被立即处理)
  • 严格验证每条建议;如果Claude不认同,会与Agent进行辩论
  • 返回经过筛选、去重、验证的建议

When to Use

适用场景

  • Manual invocation by user for independent review of any artifact
  • Called by any skill needing external second opinion on plans, decisions, documents
  • NOT tied to Linear, NOT tied to any pipeline
  • Works with any context that can be saved to a file
  • 用户手动调用,对任意产物进行独立审查
  • 任何需要对计划、决策、文档获取外部第二意见的技能都可调用
  • 不绑定Linear,不绑定任何流水线
  • 适用于所有可保存为文件的上下文

Parameters

参数

ParameterValue
review_type
contextreview
skill_group
005
prompt_template
shared/agents/prompt_templates/context_review.md
verdict_acceptable
CONTEXT_ACCEPTABLE
参数
review_type
contextreview
skill_group
005
prompt_template
shared/agents/prompt_templates/context_review.md
verdict_acceptable
CONTEXT_ACCEPTABLE

Inputs

输入项

InputRequiredDescription
context_files
YesList of file paths containing context to review (relative to CWD)
identifier
NoShort label for file naming (default:
review_YYYYMMDD_HHMMSS
)
focus
NoList of areas to focus on (default: all 6)
review_title
NoHuman-readable title (default:
"Context Review"
)
Context delivery rule: Context is ALWAYS passed via files.
  • If context already exists as files (plans, docs, code) -> pass file paths directly
  • If context is a statement/decision from chat -> caller creates a temporary file in
    .agent-review/context/
    with the content, then passes the file path
输入项是否必填说明
context_files
包含待审查上下文的文件路径列表(相对于当前工作目录)
identifier
用于文件命名的短标签(默认值:
review_YYYYMMDD_HHMMSS
focus
重点关注的领域列表(默认:全部6个领域)
review_title
人类可读的标题(默认值:
"Context Review"
上下文传递规则: 上下文始终通过文件传递。
  • 如果上下文已经以文件形式存在(计划、文档、代码)-> 直接传递文件路径
  • 如果上下文是来自聊天的陈述/决策 -> 调用方需要在
    .agent-review/context/
    目录下创建一个包含该内容的临时文件,再传递该文件路径

Workflow

工作流

MANDATORY READ: Load
shared/references/agent_review_workflow.md
for Health Check, Ensure .agent-review/, Run Agents, Critical Verification + Debate, Aggregate + Return, Fallback Rules, Critical Rules, and Definition of Done. Load
shared/references/agent_delegation_pattern.md
for Reference Passing Pattern, Review Persistence Pattern, Agent Timeout Policy, and Debate Protocol.
强制阅读: 加载
shared/references/agent_review_workflow.md
了解健康检查、.agent-review目录初始化、运行Agent、严格验证+辩论、聚合+返回、降级规则、关键规则和完成定义。加载
shared/references/agent_delegation_pattern.md
了解引用传递模式、审查持久化模式、Agent超时策略和辩论协议。

Unique Steps (before shared workflow)

独有步骤(共享工作流之前)

  1. Health check: per shared workflow, filter by
    skill_group
    =
    005
    .
  2. Resolve identifier: If
    identifier
    not provided, generate
    review_YYYYMMDD_HHMMSS
    . Sanitize: lowercase, replace spaces with hyphens, ASCII only.
  3. Ensure .agent-review/: per shared workflow. Additionally create
    .agent-review/context/
    subdir if it doesn't exist (for materialized context files).
  4. Materialize context (if needed): If context is from chat/conversation (not an existing file):
    • Write content to
      .agent-review/context/{identifier}_context.md
    • Add this path to
      context_files
      list
  5. Build prompt: Read template
    shared/agents/prompt_templates/context_review.md
    .
    • Replace
      {review_title}
      with title or
      "Context Review"
    • Replace
      {context_refs}
      with bullet list:
      - {path}
      per context file
    • Replace
      {focus_areas}
      with filtered subset or
      "All default areas"
      if no focus specified
    • Save to
      .agent-review/{identifier}_contextreview_prompt.md
      (single shared file -- both agents read the same prompt)
  1. 健康检查: 按照共享工作流要求,按
    skill_group
    =
    005
    过滤。
  2. 解析标识符: 如果未提供
    identifier
    ,则生成
    review_YYYYMMDD_HHMMSS
    。格式清理:转为小写,空格替换为连字符,仅保留ASCII字符。
  3. 初始化.agent-review目录: 按照共享工作流要求。如果
    .agent-review/context/
    子目录不存在则额外创建(用于存放物化的上下文文件)。
  4. 物化上下文(如有需要): 如果上下文来自聊天/对话(不是现有文件):
    • 将内容写入
      .agent-review/context/{identifier}_context.md
    • 将该路径添加到
      context_files
      列表
  5. 构建提示词: 读取模板
    shared/agents/prompt_templates/context_review.md
    • {review_title}
      替换为指定标题或
      "Context Review"
    • {context_refs}
      替换为项目符号列表:每个上下文文件对应一行
      - {path}
    • {focus_areas}
      替换为筛选后的子集,如果未指定关注领域则替换为
      "All default areas"
    • 保存到
      .agent-review/{identifier}_contextreview_prompt.md
      (单个共享文件——两个Agent都读取同一个提示词)

Shared Workflow Steps

共享工作流步骤

6-8) Run agents, Critical Verification + Debate, Aggregate + Return: per shared workflow.
  • {review_type}
    = review_title or "Context Review" (for challenge template
    {review_type}
    placeholder)
  • {story_ref}
    placeholder in challenge template = identifier
6-8) 运行Agent、严格验证+辩论、聚合+返回: 按照共享工作流执行。
  • {review_type}
    = 审查标题或「Context Review」(用于挑战模板的
    {review_type}
    占位符)
  • 挑战模板中的
    {story_ref}
    占位符 = 标识符

Output Format

输出格式

yaml
verdict: CONTEXT_ACCEPTABLE | SUGGESTIONS | SKIPPED
suggestions:
  - area: "logic | feasibility | completeness | consistency | best_practices | risk"
    issue: "What is wrong or could be improved"
    suggestion: "Specific actionable change"
    confidence: 95
    impact_percent: 15
    source: "codex-review"
    resolution: "accepted | accepted_after_debate | accepted_after_followup | rejected"
Agent stats and debate log per shared workflow output schema.
yaml
verdict: CONTEXT_ACCEPTABLE | SUGGESTIONS | SKIPPED
suggestions:
  - area: "logic | feasibility | completeness | consistency | best_practices | risk"
    issue: "What is wrong or could be improved"
    suggestion: "Specific actionable change"
    confidence: 95
    impact_percent: 15
    source: "codex-review"
    resolution: "accepted | accepted_after_debate | accepted_after_followup | rejected"
按照共享工作流输出规范输出Agent统计数据和辩论日志。

Verdict Escalation

裁决升级规则

  • No escalation. Suggestions are advisory only.
  • Caller decides how to apply accepted suggestions.
  • 无需升级。 建议仅作参考。
  • 调用方决定如何应用已接受的建议。

Reference Files

参考文件

  • Shared workflow:
    shared/references/agent_review_workflow.md
  • Agent delegation pattern:
    shared/references/agent_delegation_pattern.md
  • Prompt template (review):
    shared/agents/prompt_templates/context_review.md
  • Review schema:
    shared/agents/schemas/context_review_schema.json

Version: 1.0.0 Last Updated: 2026-02-25
  • 共享工作流:
    shared/references/agent_review_workflow.md
  • Agent委托模式:
    shared/references/agent_delegation_pattern.md
  • 提示词模板(审查):
    shared/agents/prompt_templates/context_review.md
  • 审查Schema:
    shared/agents/schemas/context_review_schema.json

版本: 1.0.0 最后更新: 2026-02-25