检查质量

danielvm-git2026-10-27查看 347复制 826

交互式 QA 会话,用户以对话方式报告 bug 或问题,agent 将其以结构化审计 schema 记录到 specs/bugs/registry.yaml。在后台探索代码库以获取上下文和领域语言。当用户想要报告 bug、进行 QA,或提到 "QA session" 时使用。

Download (.md)

📘如何使用这个技能

  1. 1
    复制技能内容·点击上方「Copy SKILL.md」复制全部内容,或 Download 下载到本地
  2. 2
    打开你的 AI 客户端·支持 Claude Code、Trae、Cursor、ChatGPT、DeepSeek、Kimi 等任意 AI 助手
  3. 3
    粘贴为系统提示/知识文件·Claude Code:放入 .claude/skills/ 目录;普通对话:作为首条消息发送并说「请严格按这份技能文档执行」
  4. 4
    直接提出你的需求·AI 会按技能定义的工作流、格式和约束来处理,无需再解释背景

💡 提示:技能生效后,每次对话只需一句需求,AI 会按 SKILL.md 的流程执行。

SKILL.md4482 chars
---
name: inspect-quality
model: sonnet
description: "Interactive QA session where user reports bugs or issues conversationally, and the agent logs them to specs/bugs/registry.yaml with a structured audit schema. Explores the codebase in the background for context and domain language. Use when user wants to report bugs, do QA, or mentions \"QA session\"."
disable-model-invocation: true
---

# Inspect Quality
> **HARD GATE** — **HARD GATE** — Quality metrics (coverage, lint, cyclomatic complexity, security scans) must be monitored. If a metric degrades, surface it as a blocker. Do NOT accept regressions.


Run an interactive QA session. The user describes problems they're encountering. You clarify, explore the codebase for context, and log each issue to `specs/bugs/registry.yaml` with a structured, durable format.

## For each issue the user raises

### 1. Listen and lightly clarify

Let the user describe the problem in their own words. Ask **at most 2–3 short clarifying questions** focused on:

- What they expected vs what actually happened
- Steps to reproduce (if not obvious)
- Whether it's consistent or intermittent

Do NOT over-interview. If the description is clear enough to log, move on.

### 2. Explore the codebase in the background

Kick off an Agent (subagent_type=Explore) to understand the relevant area. The goal is NOT to find a fix — it's to:

- Learn the domain language used in that area (check `specs/UBIQUITOUS_LANGUAGE_LATEST.md` if present)
- Understand what the feature is supposed to do
- Identify the user-facing behavior boundary

### 3. Assess scope: single issue or breakdown?

Break down when:

- The fix spans multiple independent areas
- There are clearly separable concerns that could be worked on in parallel
- The user describes something with multiple distinct failure modes

Keep as a single issue when:

- It's one behavior that's wrong in one place
- The symptoms are all caused by the same root behavior

### 4. Log to specs/bugs/registry.yaml

Append the issue to `specs/bugs/registry.yaml`. Create the `specs/bugs/` directory if it doesn't exist.

#### registry.yaml format

The file maintains a Markdown table with the following columns (derived from structured audit practice):

| Field | Description |
|-------|-------------|
| `bug_id` | `BUG-YYYY-MM-DDTHHMMSS` |
| `date` | `YYYY-MM-DD` |
| `severity` | `critical` / `high` / `medium` / `low` |
| `priority` | `p0` / `p1` / `p2` / `p3` |
| `scope` | kebab-case area (e.g. `auth`, `checkout`) |
| `what_happened` | actual behavior (user-facing terms) |
| `what_expected` | expected behavior |
| `steps_to_reproduce` | numbered steps |
| `root_cause` | one-line hypothesis |
| `files_changed` | filled in after fix |
| `approach` | filled in after fix |
| `risk_level` | `low` / `medium` / `high` |
| `new_tests` | count (filled in after fix) |
| `type_check` | `pass` / `fail` (filled in after fix) |
| `lint` | `pass` / `fail` (filled in after fix) |
| `commit_type` | `fix` / `fix!` / `feat` (filled in after fix) |
| `release_type` | `patch` / `minor` / `major` (filled in after fix) |
| `commit_message` | Conventional Commits message (filled in after fix) |
| `follow_ups` | semicolon-separated follow-up items |
| `file` | path to detailed `specs/bugs/BUG-*.md` (filled in by investigate-bug) |
| `status` | `open` / `in-progress` / `fixed` / `wont-fix` |

When a bug is fixed (via `validate-fix`), update the relevant row with the resolution fields.

#### Issue body (for context below the table)

For each bug, also append a detail section:

```markdown
### BUG-YYYY-MM-DDTHHMMSS: [short title]

**What happened:** [actual behavior, plain language]
**What I expected:** [expected behavior]
**Steps to reproduce:**
1. [Step 1]
2. [Step 2]

**Additional context:** [domain-language observations, no file paths]
```

#### Rules for all entries

- **bug_id** uses full timestamp: `BUG-YYYY-MM-DDTHHMMSS` — matches the individual bug file name in `specs/bugs/`
- **No file paths or line numbers** — these go stale
- **Use the project's domain language** (check `specs/UBIQUITOUS_LANGUAGE_LATEST.md` if it exists)
- **Describe behaviors, not code** — "the sync service fails to apply the patch" not "applyPatch() throws"
- **Reproduction steps are mandatory** — if you can't determine them, ask the user

### 5. Continue the session

After logging, ask: "Next issue, or are we done?" Keep going until the user says done. Each issue is independent — don't batch them.
来源:skillsdirectory

评论0

登录后参与评论

还没有评论,来抢沙发吧