- Decouple getHoseProvisionalAuthLink from internal closeapi session cache to prevent silent truncation and cache pollution (#137) - Add --force, --refresh, -f options and positive integer validation to auth hose-link - Clarify distinction between Hose web assistance links and Seal delegation tokens across CLI help, SKILL.md, and docs - Add modular issue resolution and PR workflow rule under .agents/rules/
38 lines
2.6 KiB
Markdown
38 lines
2.6 KiB
Markdown
---
|
||
description: "GitHub Issue 排查、方案汇报、PR 提交与非发版标准工作流"
|
||
trigger: "manual"
|
||
---
|
||
|
||
# GitHub Issue 解决与 PR 提交工作流 (Issue -> Plan -> PR -> No Release)
|
||
|
||
当任务涉及排查、分析或解决 GitHub Issue 时,必须严格遵循以下标准流程,严禁在未经用户显式指令前执行发版操作:
|
||
|
||
## 1. Issue 研判与方案汇报 (Investigate & Report)
|
||
- **读取 Issue 详情**:通过 `gh issue view <issue-id>` 提取完整复现环境、用户诉求与上下文背景。
|
||
- **事实与根因排查**:对照实际代码与调用链路,核实 Issue 反馈是否准确,定位具体代码行与根因。
|
||
- **方案汇报与对齐**:向用户清晰汇报研判结果、设计边界与拟采取的解决方案。在方案获得用户确认前,不盲目做大规模代码变动。
|
||
|
||
## 2. 代码实现与质量校验 (Implement & Verify)
|
||
- **最小且规范的改动**:严格遵循 ESM 规范(显式 `.js` 扩展名)、CLI `stdout`(纯 JSON 数据)与 `stderr`(引导排查日志)协议。
|
||
- **完善单元测试**:针对 Bug 场景或新增选项在 `*.test.ts` 中补充自动化测试(使用 `bun:test`),保证测试环境清理(`afterEach`)。
|
||
- **全量无回归验证**:
|
||
1. 运行 `bun test` 确保全仓所有测试 100% 通过;
|
||
2. 运行 `bun run check` 确保 TypeScript 类型检查 0 错误;
|
||
3. 若修改涉及 MCP Server 或构建入口,运行 `bun run build:plugin` 保持 `dist/mcp/server.js` 产物同步。
|
||
|
||
## 3. 分支提交与 Pull Request (Commit & PR)
|
||
- **提交信息**:使用清晰的简短祈使句,关联对应 Issue(例如 `Fix #137: decouple auth hose-link from internal session cache`)。
|
||
- **推送分支与创建 PR**:
|
||
- 推送至对应工作分支(例如 `git push origin HEAD:refs/heads/...`);
|
||
- 使用 `gh pr create --base main --head <branch> --title "..." --body "..."` 创建指向 `main` 的 Pull Request;
|
||
- 检查 CI 运行状态,协助审查与合入。
|
||
|
||
## 4. 核心红线:严禁自动/私自发版 (Strictly No Premature Release)
|
||
- **绝对禁止在修复 Issue 或提交 PR 时自动触发发布流程**:
|
||
- **严禁** 执行 `bun run bump <version>`;
|
||
- **严禁** 打 Git Tag(如 `git tag vX.Y.Z`);
|
||
- **严禁** 推送标签(`git push ... refs/tags/...`)或触发 Release 发布工作流;
|
||
- **发版职责边界**:
|
||
- 修复 Issue 的终点是“创建 PR 并完成代码评审/合并”,绝非发版;
|
||
- 只有在用户明确下达发版指令(例如“执行发版”、“发布新版本 vX.Y.Z”)时,才可依照 `AGENTS.md` 中的 `Release & Publishing Guidelines` 执行发版流程。
|