feat: create .workflows/solve-issue.yaml #372

Merged
xiaoju merged 5 commits from feat/370-solve-issue-workflow into main 2026-05-22 06:02:15 +00:00
Owner

What

Create .workflows/solve-issue.yaml — a TDD-driven issue resolution workflow tailored to this project.

Why

The project needs a project-local workflow for resolving small, focused issues with automated TDD flow (#370).

Roles

Role Purpose
planner Analyzes issue, produces TDD test spec stored in CAS
developer TDD implementation (tests first, then code)
reviewer Code standards compliance only (not functionality)
tester Functional correctness against test spec
committer Git commit + PR creation

Graph

$START → planner
  ├─ insufficient_info → $END
  └─ ready → developer
      ├─ failed → $END
      └─ done → reviewer
          ├─ not_approved → developer
          └─ approved → tester
              ├─ fix_code → developer
              ├─ fix_spec → planner
              └─ passed → committer
                  ├─ hook_failed → developer
                  └─ success → $END

Changes

  • .workflows/solve-issue.yaml — new project-local workflow definition

Ref

Refs #370

## What Create `.workflows/solve-issue.yaml` — a TDD-driven issue resolution workflow tailored to this project. ## Why The project needs a project-local workflow for resolving small, focused issues with automated TDD flow (#370). ## Roles | Role | Purpose | |------|---------| | **planner** | Analyzes issue, produces TDD test spec stored in CAS | | **developer** | TDD implementation (tests first, then code) | | **reviewer** | Code standards compliance only (not functionality) | | **tester** | Functional correctness against test spec | | **committer** | Git commit + PR creation | ## Graph ``` $START → planner ├─ insufficient_info → $END └─ ready → developer ├─ failed → $END └─ done → reviewer ├─ not_approved → developer └─ approved → tester ├─ fix_code → developer ├─ fix_spec → planner └─ passed → committer ├─ hook_failed → developer └─ success → $END ``` ## Changes - `.workflows/solve-issue.yaml` — new project-local workflow definition ## Ref Refs #370
xiaoju added 1 commit 2026-05-22 05:21:45 +00:00
TDD-driven issue resolution workflow with 5 roles:
- planner: analyzes issue, outputs TDD test spec (stored in CAS)
- developer: implements code following TDD
- reviewer: code standards compliance check (not functionality)
- tester: functional correctness verification
- committer: commits and creates PR

Graph handles bounce-backs: reviewer→developer, tester→developer,
tester→planner (fix_spec), committer→developer (hook_failed).

Refs #370
Owner

Review 意见

🔧 需要改动

1. npmbun 统一
developer 和 reviewer 的 procedure 里用了 npm run buildnpm testnpx biome check,项目统一用 bun,应改为 bun run buildbun testbun run biome check

2. tea CLI 用法有误
planner procedure 里 tea issues comment <number> "..." 应为 tea comment <number> -r owner/repo(body 通过 stdin 管道传入)。读 issue 也建议显式加 -r 参数。

3. developer capability cursor-agentprogramming
cursor-agent 是具体工具实现,workflow 应该描述抽象能力。建议改成 programmingcoding,让 engine 层面决定用什么 agent 来满足。

4. committer 缺少分支创建步骤
procedure 直接 git push -u origin <branch-name>,没说明分支从哪来。需要明确是继承 developer 的 worktree 状态还是需要 git checkout -b

5. meta.plan 应在 ready 时必填
planner 的 required: [status] 没包含 plan,但 ready 状态时 plan hash 是必须的。建议至少在 procedure 里强调。

6. committer PR 描述应遵循模板
项目规范要求 PR 描述包含 What/Why/Changes/Ref,建议在 procedure 里明确要求。

7. 缺少循环上限保护
reviewer↔developer、tester↔developer 可能无限循环,需说明是否依赖 engine 的 maxRounds 保护。

做得好的

  • Graph 完整,bounce-back 路径覆盖全面
  • 关注点分离清晰(reviewer 管 standards,tester 管 functionality)
  • CAS 传递 plan hash,符合项目理念
## Review 意见 ### 🔧 需要改动 **1. `npm` → `bun` 统一** developer 和 reviewer 的 procedure 里用了 `npm run build`、`npm test`、`npx biome check`,项目统一用 bun,应改为 `bun run build`、`bun test`、`bun run biome check`。 **2. `tea` CLI 用法有误** planner procedure 里 `tea issues comment <number> "..."` 应为 `tea comment <number> -r owner/repo`(body 通过 stdin 管道传入)。读 issue 也建议显式加 `-r` 参数。 **3. developer capability `cursor-agent` → `programming`** `cursor-agent` 是具体工具实现,workflow 应该描述抽象能力。建议改成 `programming` 或 `coding`,让 engine 层面决定用什么 agent 来满足。 **4. committer 缺少分支创建步骤** procedure 直接 `git push -u origin <branch-name>`,没说明分支从哪来。需要明确是继承 developer 的 worktree 状态还是需要 `git checkout -b`。 **5. `meta.plan` 应在 ready 时必填** planner 的 `required: [status]` 没包含 `plan`,但 `ready` 状态时 plan hash 是必须的。建议至少在 procedure 里强调。 **6. committer PR 描述应遵循模板** 项目规范要求 PR 描述包含 What/Why/Changes/Ref,建议在 procedure 里明确要求。 **7. 缺少循环上限保护** reviewer↔developer、tester↔developer 可能无限循环,需说明是否依赖 engine 的 `maxRounds` 保护。 ### ✅ 做得好的 - Graph 完整,bounce-back 路径覆盖全面 - 关注点分离清晰(reviewer 管 standards,tester 管 functionality) - CAS 传递 plan hash,符合项目理念
xiaoju added 1 commit 2026-05-22 05:27:28 +00:00
1. npm/npx → bun/bunx (project standard)
2. Fix tea CLI usage (tea comment + -r flag)
3. cursor-agent → coding (abstract capability)
4. Clarify committer inherits developer's worktree
5. Mark meta.plan required when status=ready
6. PR description must follow What/Why/Changes/Ref template
7. Note maxRounds loop protection in description
xiaoju added 1 commit 2026-05-22 05:31:51 +00:00
- Last transition in each graph node is now the fallback (no condition)
- Remove redundant positive conditions (ready, devDone, approved, passed, pushSuccess)
- notApproved → rejected (positive naming)
xiaoju added 1 commit 2026-05-22 05:33:48 +00:00
xiaoju added 1 commit 2026-05-22 05:42:23 +00:00
xiaoju merged commit 8ea554bb5e into main 2026-05-22 06:02:15 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#372