SuperAPI AI 工具集

stack-feedback

编程与开发

查看项目

更新于 10-16 07:44

技能介绍

用途

Stack Feedback 用于在使用 @outfitter/* 系列包的过程中,把发现的问题整理成 GitHub issue 提交到 outfitter-dev/outfitter 仓库。适用的触发场景包括:@outfitter/* 包中的 bug、能改善开发体验(DX)的缺失功能、造成困惑的文档不清、指南缺失的模式缺口,以及让任务比预期更麻烦的易用性问题。

主要能力

该技能为不同类型的问题提供了预置分类与标签,例如 bug、enhancement(feature)、docs(documentation)、unclear-pattern(question)、dx(dx)等,并针对迁移相关场景提供 migration-pattern、conversion-helper、compatibility、migration-docs 等类别(对应 adoption、migration、documentation 等标签)。每类问题有对应的必填字段,通过脚本可以查看模板要求。

使用方式

首选方式是调用辅助脚本。基本用法如下:

bun plugins/outfitter-stack/skills/stack-feedback/scripts/create-issue.ts \
  --type bug \
  --title "Result.unwrap throws on valid input" \
  --package "@outfitter/contracts" \
  --description "When calling unwrap on Ok value, it unexpectedly throws" \
  --actual "Throws TypeError instead of returning value"

脚本默认运行在 dry-run 模式,会输出包含 gh 命令的 JSON,而不会真正执行。添加 --submit 参数后才实际创建 issue:

bun plugins/outfitter-stack/skills/stack-feedback/scripts/create-issue.ts \
  --type enhancement \
  --title "Add Result.tap helper" \
  --package "@outfitter/contracts" \
  --description "Helper to run side effects without unwrapping" \
  --useCase "Logging without breaking method chains" \
  --submit

仅传入 --type 可以查看该类型所需的必填与可选字段,例如:

bun plugins/outfitter-stack/skills/stack-feedback/scripts/create-issue.ts --type bug

脚本还会自动检测当前目录的 git origin,并在 issue 正文中添加“Discovered In”部分及来源仓库链接,用于追踪反馈来源。

如果脚本不适用,也可以直接用 gh 命令手动创建 issue:

gh issue create \
  --repo outfitter-dev/outfitter \
  --title "[Bug] Brief description" \
  --label "bug" \
  --label "feedback" \
  --label "source/agent" \
  --body "$(cat <<'EOF'
## Package

`@outfitter/package-name`

## Description

What went wrong or what's missing.

## Actual Behavior

What actually happens.

---

*Created via `outfitter-stack:stack-feedback` skill*
EOF
)"

创建完成后,可以在项目中跟踪反馈,例如记录“- [ ] #123: Result.unwrap throws on valid input — bug”。创建前建议先检查是否已有相同 issue:

gh issue list --repo outfitter-dev/outfitter --label feedback
gh issue list --repo outfitter-dev/outfitter --search "{{KEYWORDS}}"

若累积了多条反馈,可批量处理:先审查全部反馈项,对相似问题去重,创建 issue 时在相关条目之间添加交叉引用,再用 issue 编号更新跟踪列表。

适用场景

适合在开发中遇到 @outfitter/* 包 bug、缺失功能、文档或模式指引缺失、迁移与兼容性问题时使用。

限制

反馈目标固定为 outfitter-dev/outfitter 仓库;脚本默认不提交,需要 --submit 才会真正创建 issue。不同 issue 类型有各自的必填字段,缺失时需按模板补齐。资料未提供脚本运行环境的更多依赖、权限要求或失败处理细节。