agf-writing-github-issuelisted
Install: claude install-skill pcliangx/AppGenesisForge
# Writing a GitHub Issue
> Examples 段含具体项目(RolexOps)实例(image tag、cookie name、目录路径),保留以提高参考价值;使用时按你项目的实际值替换。
Use this skill when any of the following:
- 用户说 "写 issue / 提一个 issue / 报 bug / 上 GitHub / track 一下 / 立个 ticket"
- product-lead 把 PRD 里的 AC 拆成可分派的 issue
- dev 在 SIT 自跑中发现 P0 / P1 缺陷(**特殊路径,见下**)
- qa-engineer 在 E2E / UAT 中发现 P0 / P1 问题(**特殊路径,见下**)
- 主 Claude / 任意 agent 准备调用 `gh issue create`
## 最小输入模式(用户授权 / 2026-05-13)
> **默认行为**:用户只给"关键信息",agent 智能补全其他字段,直接 `gh issue create`,不走草稿 gate。
### 用户必须给的最少信息
| 信息 | 说明 |
|---|---|
| **要解决什么 / 想做什么** | 一两句话描述问题或功能想法,bug / feature / chore 可推断 |
**就这一条**——其他字段都由 agent 推断 + 补全。
### Agent 必须自动补全的字段
| 字段 | 推断规则 |
|---|---|
| **Title** | 按用户描述拟动宾结构 + type prefix `feat(...)` / `fix(...)` / `chore(...)` / `docs(...)`,≤70 char |
| **Why / 背景** | 从用户原话扩写 1-2 段;若有相关 PRD / ADR / 历史 issue,主动 grep `docs/prd/` `docs/adr/` 并 cite |
| **AC** | 按 feature/bug 套模板生成 2-4 条可验证条件;bug 必含 "修复后用什么验证" |
| **type label** | 按关键词判 feat(新功能)/ bug(修缺陷)/ chore(重构/构建/文档)/ adr(架构决策) |
| **area label** | grep 用户描述关键词:`frontend`/`React`/`UI`/`组件` → area:frontend;`API`/`endpoint`/`后端`/`数据库`/`migration` → area:backend;`LLM`/`prompt`/`豆包`/`Qwen`/`embedding` → area:ai;`docker`/`compose`/`caddy`/`redis` → area:infra |
| **priority** | bug 默认 P1(核心流程影响);feature 默认 P2(用户说"急/紧急/blocking"→ P1);data loss / 安全 / 线上挂 → P0 |
| **severity**(bug 专用) | 与 priority 同步:P0/P1 |
| **epic 关联** | grep 当前 branch 名(`release/v1.6.0` etc.)+ 最近 commit + `docs/prd/`,能锁定 Epic N 才加;不确