Files
Gitea-Tools/docs/wiki/Workflow.md
T

2.0 KiB

Workflow Model

Navigation

Step 1: Review queue first (reviewer profile)

  1. gitea_resolve_task_capability(task="review_pr")
  2. List open PRs; pick the oldest eligible PR (not self-authored, mergeable).
  3. Pin head SHA; validate diff scope and run tests locally.
  4. gitea_mark_final_review_decisiongitea_review_pr / gitea_submit_pr_review
  5. gitea_merge_pr only with confirmation="MERGE PR <n>" and pinned head SHA.

Step 2: Implement issues (author profile)

  1. Work Selection Rule — verify a work lease before any mutations (open PRs, issue-linked PRs, branches, worktrees, dirty worktrees, active leases/ handoffs, merged-PR completion). Stop if another session owns the lease. gitea_lock_issue records an operation-scoped author_issue_work lease with issue, branch, worktree, claimant, created, expiry, and heartbeat fields; active or expired same-operation leases require recovery review before takeover. 0b. Global LLM Worktree Rule — main checkout on master/main/dev only; mutate only from a branches/ worktree after proving root, cwd, branch, stable main-checkout branch, and session worktree path (no exceptions).
  2. gitea_resolve_task_capability for the author task.
  3. gitea_lock_issue before implementation mutations.
  4. Claim with gitea_mark_issue / status:in-progress label.
  5. Branch, implement, test, push, gitea_create_pr.
  6. Release claim when done; never self-review the PR.

Step 3: Operator follow-ups

Wiki publication, credential provisioning, and cross-repo mirror operations are operator-confirmed actions — see Runbooks.

Full Gitea-specific runbooks: docs/llm-workflow-runbooks.md in the repository.