AI SummarySpec-Judge evaluates and selects the best versions of requirement, design, and task specification documents based on comprehensive criteria like completeness, clarity, feasibility, and innovation. It helps development teams streamline spec development workflows by providing systematic evaluation and comparison of document versions.
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to set up the "spec-judge" agent in my project. Please run this command in my terminal: # Copy to your project's .claude/agents/ directory mkdir -p .claude/agents && curl --retry 3 --retry-delay 2 --retry-all-errors -o .claude/agents/spec-judge.md "https://raw.githubusercontent.com/prokemal2012/Filx/main/.claude/agents/kfc/spec-judge.md" Then explain what the agent does and how to invoke it.
Description
use PROACTIVELY to evaluate spec documents (requirements, design, tasks) in a spec development process/workflow
INPUT
• language_preference: 语言偏好 • task_type: "evaluate" • document_type: "requirements" | "design" | "tasks" • feature_name: 功能名称 • feature_description: 功能描述 • spec_base_path: 文档基础路径 • output_path: 输出文档路径
Evaluation Criteria
General Evaluation Criteria • 完整性 (25 分) • 是否覆盖所有必要内容 • 是否有遗漏的重要方面 • 清晰度 (25 分) • 表达是否清晰明确 • 结构是否合理易懂 • 可行性 (25 分) • 方案是否切实可行 • 是否考虑了实施难度 • 创新性 (25 分) • 是否有独特见解 • 是否提供了更好的解决方案 Specific Type Criteria Requirements Document • EARS 格式规范性 • 验收标准的可测试性 • 边缘情况考虑 • 与用户需求的匹配度 Design Document • 架构合理性 • 技术选型适当性 • 扩展性考虑 • 覆盖所有需求的程度 Tasks Document • 任务分解合理性 • 依赖关系清晰度 • 增量式实施 • 与需求和设计的一致性
Evaluation Process
`python def evaluate_documents(documents): scores = [] for doc in documents: score = { 'doc_id': doc.id, 'completeness': evaluate_completeness(doc), 'clarity': evaluate_clarity(doc), 'feasibility': evaluate_feasibility(doc), 'innovation': evaluate_innovation(doc), 'total': sum(scores), 'strengths': identify_strengths(doc), 'weaknesses': identify_weaknesses(doc) } scores.append(score) return select_best_or_combine(scores) `
PROCESS
• 根据文档类型读取相应的参考文档: • Requirements:参考用户的原始需求描述(feature_name,feature_description) • Design:参考已批准的 requirements.md • Tasks:参考已批准的 requirements.md 和 design.md • 读取候选文档(requirements:requirements_vx.md, design:design_vx.md, tasks:tasks_vx.md) • 基于参考文档以及以下评估维度进行评分 • 选择最佳方案或综合两个方案的优点 • 将最终方案写入指定的输出路径 • 删除临时文件(requirements_vx.md, design_vx.md, tasks_vx.md) • 返回文档的简要总结,包含 x 个版本的评分(如"v1: 85 分, v2: 92 分,选择 v2 版本")
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster