在交付前审查规格、ADR、任务拆解与代码实现的质量完整性
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "quality-gate" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/devsquad-copilot/main/.github/plugins/devsquad/skills/quality-gate/SKILL.md 2. 保存为 ~/.claude/skills/quality-gate/SKILL.md 3. 装好后重载技能,告诉我可以用了
请作为 quality-gate,审查这份产品规格说明是否达到可交付标准。请检查目标是否清晰、范围是否完整、验收标准是否可测试、风险与依赖是否明确,并输出问题清单与修改建议。
一份面向交付前把关的审查结果,包含质量问题、缺失项、风险点及改进建议。
请用 quality-gate 审查这份 ADR。重点检查背景是否充分、备选方案是否合理、决策依据是否清楚、权衡与后果是否完整,并判断该文档是否适合正式提交。
一份 ADR 质量评估,说明是否可提交,并列出需要补充或修正的部分。
请作为 quality-gate 检查以下任务拆解和代码实现:确认任务边界是否清晰、依赖顺序是否合理、遗漏项是否存在、代码是否满足规格与验收标准。请给出阻塞问题和通过结论。
一份综合质量审查报告,包含任务设计缺陷、实现偏差、阻塞项和最终结论。
SDD artifacts propagate quality downstream: a vague spec generates ambiguous tasks that generate incorrect code. Evaluating quality at the point of creation is cheaper than fixing it later.
Use this skill after generating an artifact and before presenting it to the user:
| Agent | Artifact | Activate when |
|---|---|---|
devsquad.specify | spec.md | Spec generated or updated |
devsquad.plan | ADRs, plan.md | ADR created or plan finalized |
devsquad.decompose | tasks.md, work items | Task decomposition completed |
devsquad.implement | Code |
| Medium or high impact task implemented |
Do not use for: low impact tasks (typo, log, formatting), intermediate artifacts that will be reviewed manually, or when the user explicitly asks to skip validation.
Generate artifact → Evaluate against rubric → Identify failures → Fix → Re-evaluate (if needed) → Deliver
Maximum of 2 correction iterations. If after 2 attempts there are still failures, deliver the artifact with documented failures for human decision.
Evaluation depth scales with the artifact's risk. Use the classification from the complexity-analysis skill when available, or infer from context.
| Level | When | What to evaluate |
|---|---|---|
| Quick | Low impact, established pattern | Only critical criteria (immediate FAIL) |
| Standard | Medium impact, most artifacts | Complete rubric for the artifact type |
| Deep | High impact, high risk, first time | Complete rubric + cross-verification with related artifacts |
Each artifact type has a dedicated rubric. Read only the rubric for the artifact being evaluated:
| Artifact | Rubric |
|---|---|
| spec.md (feature) | Read references/rubrica-spec.md |
| spec.md (migration) | Read references/rubrica-migration-spec.md |
| ADR | Read references/rubrica-adr.md |
| tasks.md / work items | Read references/rubrica-tasks.md |
| Code (implementation) | Read references/rubrica-code.md |
To determine spec type: if the spec is under docs/migrations/, use the migration rubric. If under docs/features/, use the feature rubric.
After evaluation, present the result in a compact form. Adapt to the evaluation level.
Evaluation: [artifact type]
Result: OK (N/N critical criteria pass)
Alerts: [list quality criteria that failed, if any]
Proceed with delivery to the user.
Evaluation: [artifact type]
Result: FAILURES FOUND
Critical:
- [ID]: [dimension] — [what is wrong] → [how to fix]
Quality:
- [ID]: [dimension] — [observation]
Fixing automatically...
Fix the critical issues, re-evaluate, and only then deliver.
Evaluation: [artifact type]
Result: PERSISTENT FAILURES (after 2 correction attempts)
Unresolved failures:
- [ID]: [dimension] — [description] — Reason: [why it could not be resolved]
Action needed: Human decision on how to proceed.
Deliver the artifact with documented failures.
| Parameter | Value | Justification |
|---|---|---|
| Max correction iterations | 2 | Avoid infinite loop. If 2 attempts don't resolve it, the problem requires human intervention. |
| Timeout per evaluation | Proportional to artifact | Spec: evaluate all dimensions. Task with 50 items: 30% sampling. |
| Sampling for tasks | If > 20 tasks, evaluate 100% of critical criteria + 30% sample for quality | Balance between coverage and context cost. |
…
在执行修改或命令前强制事实核查,先调查上下文再放行操作以提升质量。