improve: solve-issue — replace tea pr create with Gitea API #581

Merged
xiaoju merged 4 commits from retrospect/fix-committer-tea into main 2026-05-30 23:37:31 +00:00
Owner

What

Fix the committer role's inefficiency in the solve-issue workflow by replacing the problematic tea pr create command with direct Gitea API calls.

Why

Thread 06F7JE4NDERP6J3W2RWVFQVQ7G analysis revealed that the committer agent wasted 15-18 turns (~30-40% overhead) attempting to use the incorrect tea pr create command, which had multiple issues:

  • Wrong command syntax
  • Missing critical flags (--login, --head)
  • Ambiguous working directory context
  • CLI version and configuration dependencies

Changes

  1. Committer procedure — Replaced tea pr create with direct curl calls to Gitea API
  2. Planner enhancement — Extract and propagate repoRemote (owner/repo) to eliminate repeated git parsing
  3. Frontmatter schemas — Added repoRemote field to all roles for consistent propagation
  4. Graph prompts — Pass {{{repoRemote}}} through all transitions
  5. Tests — Updated solve-issue-tea-worktree.test.ts to expect curl instead of tea

Expected Impact

  • 15-18 fewer turns per thread in committer role (30-40% reduction)
  • ~20-30 seconds saved per thread execution
  • Improved reliability — no CLI version/configuration dependencies
  • Cross-platform compatibility — works anywhere with curl and git

Ref

Fixes #36

## What Fix the committer role's inefficiency in the `solve-issue` workflow by replacing the problematic `tea pr create` command with direct Gitea API calls. ## Why Thread `06F7JE4NDERP6J3W2RWVFQVQ7G` analysis revealed that the committer agent wasted **15-18 turns (~30-40% overhead)** attempting to use the incorrect `tea pr create` command, which had multiple issues: - Wrong command syntax - Missing critical flags (`--login`, `--head`) - Ambiguous working directory context - CLI version and configuration dependencies ## Changes 1. **Committer procedure** — Replaced `tea pr create` with direct `curl` calls to Gitea API 2. **Planner enhancement** — Extract and propagate `repoRemote` (owner/repo) to eliminate repeated git parsing 3. **Frontmatter schemas** — Added `repoRemote` field to all roles for consistent propagation 4. **Graph prompts** — Pass `{{{repoRemote}}}` through all transitions 5. **Tests** — Updated `solve-issue-tea-worktree.test.ts` to expect curl instead of tea ## Expected Impact - 15-18 fewer turns per thread in committer role (30-40% reduction) - ~20-30 seconds saved per thread execution - Improved reliability — no CLI version/configuration dependencies - Cross-platform compatibility — works anywhere with curl and git ## Ref Fixes https://git.shazhou.work/uncaged/workflow/issues/36
xiaoju added 3 commits 2026-05-30 22:39:25 +00:00
- Remove --repo flag from tea pr create (fails in git worktrees)
- Add guard to skip staging when developer already committed changes

Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
Fixes hallucination issues observed in thread 06F7FSTXQGY3D5CY5YPQFK2Y3W:

1. Developer self-verification (critical): Added step 12 requiring
   mandatory verification of branch, file existence, and git status
   before reporting done status. Prevents hallucinated completions
   without actual tool execution.

2. Reviewer hard-check enforcement (critical): Added critical warning
   and step 0 requiring cd/pwd verification before review. Prevents
   false rejections based on assumptions without actual path checks.

3. Test debugging escalation (medium): Added structured debugging
   guidance with escalation path after 3 test cycles. Prevents
   infinite retry loops by providing strategy and fail-fast guidance.

Also added 3 test cases to verify the new procedure steps exist.

Based on change plan 9EVZPDTS16PMG analyzing execution anomalies
that resulted in 58% waste (13 of 23 minutes).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes the committer role's inefficiency (thread 06F7JE4NDERP6J3W2RWVFQVQ7G analysis).

1. **Committer procedure**: Replace `tea pr create` with direct Gitea API calls via curl
   - Eliminates 15-18 wasted turns (~30-40% overhead) caused by incorrect tea CLI syntax
   - Adds verification steps: check push success + verify PR creation response
   - Warns explicitly: "do NOT use tea pr create — it fails in worktrees"

2. **Planner enhancement**: Extract and propagate `repoRemote` (owner/repo) in frontmatter
   - Downstream roles no longer need to extract repo info from git remote
   - Reduces discovery overhead and shell parsing errors

3. **Frontmatter schema updates**: Add `repoRemote` field to all roles
   - Developer, reviewer, tester, committer all propagate repoRemote
   - Ensures consistent data flow through the graph

4. **Graph prompt updates**: Pass `{{{repoRemote}}}` through all transitions
   - All roles receive repo remote context in task prompts
   - Committer receives "Repo remote (owner/repo): {{{repoRemote}}}"

5. **Test updates**: Update `solve-issue-tea-worktree.test.ts`
   - Expect curl API instead of tea pr create
   - Verify warning against tea pr create exists
   - All 8 tests pass

-  15-18 fewer turns per thread in committer role (30-40% reduction)
-  ~20-30 seconds saved per thread execution
-  Improved reliability — no CLI version/config dependencies
-  Cross-platform compatibility — works anywhere with curl + git

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
xiaoju added 1 commit 2026-05-30 23:37:27 +00:00
fix: add repoRemote to planner required fields
CI / check (pull_request) Successful in 1m15s
f9b8cf025e
xiaoju merged commit 9fb817a99c into main 2026-05-30 23:37:31 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/workflow#581