gitea-workflow
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitea Workflow Orchestrator
Gitea工作流编排器
A skill that guides agents through structured agile development workflows for Gitea repositories by intelligently invoking commands in sequence. Uses checkpoint-based flow control to auto-progress between steps while pausing at key decision points.
这是一个通过按顺序智能调用命令,指导Agent完成Gitea仓库结构化敏捷开发工作流的Skill。它使用基于检查点的流控制,在步骤间自动推进,同时在关键决策点暂停。
When to Use This Skill
何时使用本Skill
Use this skill when:
- Working with a Gitea-hosted repository
- Starting work for the day ("run morning standup", "start my day")
- Working on a task ("implement next task", "continue working")
- Completing a development cycle ("finish this task", "prepare PR")
- Running sprint ceremonies ("start sprint", "end sprint", "retrospective")
- Resuming interrupted work ("what's next", "where was I")
Do NOT use this skill when:
- Working with GitHub repositories (use agile-workflow instead)
- Running a single specific command (use that command directly)
- Just checking status (use directly)
/status - Only doing code review without full cycle (use directly)
/review-code - Researching or planning without implementation
在以下场景使用本Skill:
- 处理Gitea托管的仓库
- 开启当日工作(如“运行早会”、“开启我的一天”)
- 处理任务(如“实现下一个任务”、“继续工作”)
- 完成开发周期(如“完成此任务”、“准备PR”)
- 执行迭代仪式(如“开始迭代”、“结束迭代”、“回顾会”)
- 恢复中断的工作(如“下一步做什么”、“我之前做到哪了”)
请勿在以下场景使用本Skill:
- 处理GitHub仓库(请使用agile-workflow)
- 运行单个特定命令(直接使用该命令即可)
- 仅检查状态(直接使用)
/status - 仅进行代码评审而不涉及完整周期(直接使用)
/review-code - 仅进行研究或规划而不涉及实现
Prerequisites
前置条件
Before using this skill:
- Git repository initialized with worktree support
- Gitea Tea CLI installed and authenticated ()
tea login - Context network with backlog structure at
context-network/backlog/ - Task status files at
context-network/backlog/by-status/*.md - GITEA_URL environment variable set (or configured in tea)
- GITEA_TOKEN environment variable set for API scripts
使用本Skill前需满足:
- Git仓库已初始化并支持工作区(worktree)
- Gitea Tea CLI已安装并完成认证(执行)
tea login - 上下文网络在路径下有积压任务结构
context-network/backlog/ - 在路径下存在任务状态文件
context-network/backlog/by-status/*.md - 已设置环境变量(或在tea中配置)
GITEA_URL - 已设置环境变量以支持API脚本
GITEA_TOKEN
Workflow Types Overview
工作流类型概览
WORKFLOW TYPES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TASK CYCLE (Primary) DAILY SPRINT
────────────────────── ────────────────── ──────────────────
sync Morning: Start:
↓ sync --last 1d sync --all
next → [CHECKPOINT] status --brief groom --all
↓ groom --ready plan sprint-goals
implement status
↓ Evening:
[CHECKPOINT] checklist End:
↓ discovery sync --sprint
review-code sync --last 1d retrospective
review-tests audit --sprint
↓ maintenance --deep
[CHECKPOINT]
↓
apply-recommendations (if issues)
↓
pr-prep → [CHECKPOINT]
↓
pr-complete
↓
update-backlog & status
↓
END
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━WORKFLOW TYPES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
TASK CYCLE (Primary) DAILY SPRINT
────────────────────── ────────────────── ──────────────────
sync Morning: Start:
↓ sync --last 1d sync --all
next → [CHECKPOINT] status --brief groom --all
↓ groom --ready plan sprint-goals
implement status
↓ Evening:
[CHECKPOINT] checklist End:
↓ discovery sync --sprint
review-code sync --last 1d retrospective
review-tests audit --sprint
↓ maintenance --deep
[CHECKPOINT]
↓
apply-recommendations (if issues)
↓
pr-prep → [CHECKPOINT]
↓
pr-complete
↓
update-backlog & status
↓
END
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━State Detection
状态检测
The skill determines current workflow state automatically. No manual tracking needed.
本Skill会自动检测当前工作流状态,无需手动跟踪。
Detection Signals
检测信号
| Signal | How to Check | Indicates |
|---|---|---|
| Worktree exists | | Task in progress |
| Task branch active | | Active implementation |
| Uncommitted changes | | Active coding |
| PR exists | | In review |
| PR merged | | Ready for cleanup |
| 信号 | 检查方式 | 表示含义 |
|---|---|---|
| 工作区存在 | | 任务正在进行中 |
| 任务分支激活 | | 正在进行实现 |
| 存在未提交变更 | | 正在编写代码 |
| PR已创建 | | 处于评审阶段 |
| PR已合并 | | 已准备好清理工作 |
State Matrix
状态矩阵
STATE DETECTION LOGIC
─────────────────────────────────────────────────────────────
Check → State → Next Step
─────────────────────────────────────────────────────────────
No worktree, no in-progress → IDLE → sync, next
Worktree exists, uncommitted → IMPLEMENTING → continue implement
Worktree exists, all committed → READY_REVIEW → review-code
PR open, CI pending → AWAITING_CI → wait or address
PR open, CI pass → READY_MERGE → pr-complete
PR merged, worktree exists → CLEANUP → pr-complete
─────────────────────────────────────────────────────────────For detailed detection algorithms, see references/state-detection.md.
STATE DETECTION LOGIC
─────────────────────────────────────────────────────────────
Check → State → Next Step
─────────────────────────────────────────────────────────────
No worktree, no in-progress → IDLE → sync, next
Worktree exists, uncommitted → IMPLEMENTING → continue implement
Worktree exists, all committed → READY_REVIEW → review-code
PR open, CI pending → AWAITING_CI → wait or address
PR open, CI pass → READY_MERGE → pr-complete
PR merged, worktree exists → CLEANUP → pr-complete
─────────────────────────────────────────────────────────────如需了解详细的检测算法,请查看references/state-detection.md。
Invocation Patterns
调用方式
bash
undefinedbash
undefinedAuto-detect state and continue from where you are
自动检测状态并从当前位置继续
/gitea-workflow
/gitea-workflow
Start specific workflow phase
启动特定工作流阶段
/gitea-workflow --phase task-cycle
/gitea-workflow --phase daily-morning
/gitea-workflow --phase daily-evening
/gitea-workflow --phase sprint-start
/gitea-workflow --phase sprint-end
/gitea-workflow --phase task-cycle
/gitea-workflow --phase daily-morning
/gitea-workflow --phase daily-evening
/gitea-workflow --phase sprint-start
/gitea-workflow --phase sprint-end
Resume work on specific task
恢复特定任务的工作
/gitea-workflow --task TASK-123
/gitea-workflow --task TASK-123
Preview what would happen without executing
预览执行内容但不实际运行
/gitea-workflow --dry-run
undefined/gitea-workflow --dry-run
undefinedTask Cycle Phase
任务周期阶段
The primary workflow for completing a single task from selection to merge.
这是从任务选择到合并完成单个任务的核心工作流。
Step 1: Sync Reality
步骤1:同步实际状态
Ensure context network matches actual project state.
Run: sync --last 1d --dry-run
Purpose: Detect drift between documented and actual state
Output: Sync report showing completions, partial work, divergences确保上下文网络与项目实际状态一致。
执行: sync --last 1d --dry-run
目的: 检测文档记录与实际状态的偏差
输出: 显示完成项、部分工作内容和差异的同步报告Step 2: Select Task
步骤2:选择任务
Identify the next task to work on.
Run: next
Purpose: Find highest priority ready task
Output: Task ID, title, branch name suggestionCHECKPOINT: TASK_SELECTED
- Pause to confirm task selection
- User can accept or choose different task
- On accept: continue to implementation
确定下一个要处理的任务。
执行: next
目的: 找到优先级最高的就绪任务
输出: 任务ID、标题、分支名称建议检查点:TASK_SELECTED
- 暂停以确认任务选择
- 用户可接受当前任务或选择其他任务
- 确认接受后:进入实现阶段
Step 3: Implement
步骤3:实现
Test-driven development in isolated worktree.
Run: implement [TASK-ID]
Purpose: Create worktree, write tests first, implement, verify
Output: Working implementation with passing testsCHECKPOINT: IMPL_COMPLETE
- Pause after implementation completes
- Show test results and coverage
- On success: continue to review
在独立工作区中进行测试驱动开发。
执行: implement [TASK-ID]
目的: 创建工作区,先编写测试,再实现功能,最后验证
输出: 可运行的实现代码及通过的测试检查点:IMPL_COMPLETE
- 实现完成后暂停
- 展示测试结果和覆盖率
- 成功则:进入评审阶段
Step 4: Review
步骤4:评审
Quality validation of implementation.
Run: review-code --uncommitted
Run: review-tests --uncommitted
Purpose: Identify quality issues, security concerns, test gaps
Output: Review reports with issues and recommendationsCHECKPOINT: REVIEWS_DONE
- Display combined review results
- If critical issues: must address before continuing
- If no issues: auto-continue to PR prep
- User decides: apply recommendations now or defer
对实现内容进行质量验证。
执行: review-code --uncommitted
执行: review-tests --uncommitted
目的: 识别质量问题、安全隐患和测试缺口
输出: 包含问题和建议的评审报告检查点:REVIEWS_DONE
- 展示合并后的评审结果
- 若存在严重问题:必须解决后才能继续
- 若无问题:自动进入PR准备阶段
- 用户可决定:立即应用建议或延后处理
Step 5: Apply Recommendations (Conditional)
步骤5:应用建议(可选)
Address review findings intelligently.
Run: apply-recommendations [review-output]
Purpose: Apply quick fixes now, defer complex changes to tasks
Output: Applied fixes + created follow-up tasks智能处理评审发现的问题。
执行: apply-recommendations [review-output]
目的: 立即应用快速修复,将复杂变更延后为后续任务
输出: 已应用的修复内容 + 创建的后续任务Step 6: Prepare PR
步骤6:准备PR
Create pull request with full documentation.
Run: pr-prep
Purpose: Validate, document, and create PR
Output: PR created with description, tests verifiedCHECKPOINT: PR_CREATED
- Display PR URL and CI status
- Wait for CI checks to complete (verify manually or via API script)
- On CI pass + approval: continue to merge
- On CI fail: stop, address issues
创建包含完整文档的拉取请求(PR)。
执行: pr-prep
目的: 验证、记录并创建PR
输出: 已创建的PR,包含描述和已验证的测试检查点:PR_CREATED
- 展示PR链接和CI状态
- 等待CI检查完成(手动验证或通过API脚本)
- CI通过并获得批准后:进入合并阶段
- CI失败:停止并解决问题
Step 7: Complete PR
步骤7:完成PR
Merge and cleanup.
Run: pr-complete [PR-NUMBER]
Purpose: Merge PR, delete branch, remove worktree, update status
Output: Task marked complete, cleanup done合并PR并清理资源。
执行: pr-complete [PR-NUMBER]
目的: 合并PR、删除分支、移除工作区、更新状态
输出: 任务标记为完成,清理工作已完成Step 8: Update Backlog and Project Status
步骤8:更新积压任务和项目状态
Persist progress to source-of-truth documentation.
Run: Part of pr-complete (Phase 6)
Purpose: Update epic file (task → complete), unblock dependents, update project status
Output: Backlog and project status reflect actual progressWhy this step matters: Without it, completed tasks remain marked "ready" in backlog files and project status stays stale. Internal tracking files are session-scoped; the backlog and status files are the persistent source of truth.
For detailed task-cycle instructions, see references/phases/task-cycle.md.
将进度保存到可信的文档源中。
执行: 作为pr-complete(第6阶段)的一部分
目的: 更新史诗文件(任务→完成)、解除依赖项阻塞、更新项目状态
输出: 积压任务和项目状态反映实际进度此步骤的重要性: 若跳过此步骤,已完成的任务在积压任务文件中仍会标记为“就绪”,项目状态也会过时。内部跟踪文件仅在会话范围内有效;积压任务和状态文件是持久化的可信源。
如需详细的任务周期说明,请查看references/phases/task-cycle.md。
Daily Phase
日常阶段
Quick sequences for start and end of workday.
用于工作日开始和结束的快速序列。
Morning Standup (~5 min)
早会(约5分钟)
Run sequence:
1. sync --last 1d --dry-run # What actually happened yesterday
2. status --brief --sprint # Current sprint health
3. groom --ready-only # What's ready to work on
Output: Clear picture of today's priorities执行序列:
1. sync --last 1d --dry-run # 查看昨天实际完成的工作
2. status --brief --sprint # 当前迭代健康状况
3. groom --ready-only # 查看可开始处理的任务
输出: 清晰展示今日优先级Evening Wrap-up (~10 min)
晚间收尾(约10分钟)
Run sequence:
1. checklist # Ensure nothing lost
2. discovery # Capture learnings
3. sync --last 1d # Update task statuses
Output: Knowledge preserved, state synchronizedFor detailed daily instructions, see references/phases/daily.md.
执行序列:
1. checklist # 确保没有遗漏事项
2. discovery # 记录学习成果
3. sync --last 1d # 更新任务状态
输出: 知识已留存,状态已同步如需详细的日常阶段说明,请查看references/phases/daily.md。
Sprint Phase
迭代阶段
Ceremonies for sprint boundaries.
用于迭代边界的仪式。
Sprint Start (~60 min)
迭代启动(约60分钟)
Run sequence:
1. sync --all # Full reality alignment
2. groom --all # Comprehensive grooming
3. plan sprint-goals # Architecture and goals
4. status --detailed # Baseline metrics
Output: Sprint plan with groomed, ready backlog执行序列:
1. sync --all # 全面对齐实际状态
2. groom --all # 全面梳理任务
3. plan sprint-goals # 确定架构和目标
4. status --detailed # 基线指标
输出: 包含已梳理就绪积压任务的迭代计划Sprint End (~90 min)
迭代结束(约90分钟)
Run sequence:
1. sync --sprint # Final sprint sync
2. retrospective # Capture learnings
3. audit --scope sprint # Quality review
4. status --metrics # Sprint metrics
5. maintenance --deep # Context network cleanup
Output: Sprint closed, learnings captured, ready for nextFor detailed sprint instructions, see references/phases/sprint.md.
执行序列:
1. sync --sprint # 迭代最终同步
2. retrospective # 记录学习成果
3. audit --scope sprint # 质量评审
4. status --metrics # 迭代指标
5. maintenance --deep # 上下文网络清理
输出: 迭代已关闭,学习成果已留存,准备进入下一个迭代如需详细的迭代阶段说明,请查看references/phases/sprint.md。
Checkpoint Handling
检查点处理
Checkpoints are pauses for human decision-making.
检查点是供人工决策的暂停点。
Checkpoint Behavior
检查点行为
At each checkpoint:
- Summarize what just completed
- Show key results and any issues
- Present next steps
- Wait for user input
在每个检查点:
- 总结刚完成的内容
- 展示关键结果和任何问题
- 呈现下一步计划
- 等待用户输入
Checkpoint Responses
检查点响应
| Response | Action |
|---|---|
| "continue" / "proceed" / "yes" | Move to next step |
| "stop" / "pause" | Save state, exit workflow |
| "back" | Re-run previous step |
| "skip" | Skip current step (use cautiously) |
| Custom input | May adjust next step parameters |
| 响应 | 操作 |
|---|---|
| "continue" / "proceed" / "yes" | 进入下一步 |
| "stop" / "pause" | 保存状态,退出工作流 |
| "back" | 重新执行上一步 |
| "skip" | 跳过当前步骤(谨慎使用) |
| 自定义输入 | 可能会调整下一步的参数 |
Auto-Continue Conditions
自动继续条件
Some checkpoints can auto-continue when conditions are met:
| Checkpoint | Auto-Continue If |
|---|---|
| IMPL_COMPLETE | All tests pass, build succeeds |
| REVIEWS_DONE | No critical or high severity issues |
| PR_CREATED | CI passes (verified via API), required approvals obtained |
For detailed checkpoint handling, see references/checkpoint-handling.md.
当满足特定条件时,部分检查点可自动继续:
| 检查点 | 自动继续条件 |
|---|---|
| IMPL_COMPLETE | 所有测试通过,构建成功 |
| REVIEWS_DONE | 无严重或高优先级问题 |
| PR_CREATED | CI通过(通过API验证),已获得必要批准 |
如需详细的检查点处理说明,请查看references/checkpoint-handling.md。
Command Reference
命令参考
Each workflow step uses embedded command instructions:
| Command | Reference | Purpose |
|---|---|---|
| sync | references/commands/sync.md | Reality synchronization |
| groom | references/commands/groom.md | Task refinement |
| next | references/commands/next.md | Task selection |
| implement | references/commands/implement.md | TDD implementation |
| review-code | references/commands/review-code.md | Code quality review |
| review-tests | references/commands/review-tests.md | Test quality review |
| apply-recommendations | references/commands/apply-recommendations.md | Triage and apply fixes |
| pr-prep | references/commands/pr-prep.md | PR creation |
| pr-complete | references/commands/pr-complete.md | PR merge and cleanup |
| discovery | references/commands/discovery.md | Learning capture |
| retrospective | references/commands/retrospective.md | Post-work analysis |
| maintenance | references/commands/maintenance.md | Context network cleanup |
每个工作流步骤都使用内嵌的命令说明:
| 命令 | 参考文档 | 目的 |
|---|---|---|
| sync | references/commands/sync.md | 实际状态同步 |
| groom | references/commands/groom.md | 任务细化 |
| next | references/commands/next.md | 任务选择 |
| implement | references/commands/implement.md | 测试驱动开发实现 |
| review-code | references/commands/review-code.md | 代码质量评审 |
| review-tests | references/commands/review-tests.md | 测试质量评审 |
| apply-recommendations | references/commands/apply-recommendations.md | 分类处理并应用修复 |
| pr-prep | references/commands/pr-prep.md | PR创建 |
| pr-complete | references/commands/pr-complete.md | PR合并与清理 |
| discovery | references/commands/discovery.md | 学习成果记录 |
| retrospective | references/commands/retrospective.md | 事后分析 |
| maintenance | references/commands/maintenance.md | 上下文网络清理 |
Example: Complete Task Cycle
示例:完整任务周期
Scenario: Start of day, implement next available task
Invocation:
/gitea-workflow --phase task-cycleFlow:
Agent: Detecting current state...
No worktree found, checking ready tasks...
Agent: Running sync --last 1d --dry-run
[Sync output: 0 tasks completed but undocumented]
Agent: Running next
Found: TASK-042 - Add user preferences endpoint
Priority: High | Size: Small | Branch: task/TASK-042-preferences
╔═══════════════════════════════════════════╗
║ CHECKPOINT: Task Selection ║
╠═══════════════════════════════════════════╣
║ Selected: TASK-042 ║
║ Proceed with implementation? ║
║ ║
║ [continue] [stop] [other task] ║
╚═══════════════════════════════════════════╝
User: continue
Agent: Creating worktree at .worktrees/TASK-042/
Running implement TASK-042
[Implementation proceeds with TDD...]
Tests: 12 passing
Coverage: 87%
Build: Success
╔═══════════════════════════════════════════╗
║ CHECKPOINT: Implementation Complete ║
╠═══════════════════════════════════════════╣
║ All tests passing, ready for review ║
║ Proceed to code review? ║
║ ║
║ [continue] [stop] ║
╚═══════════════════════════════════════════╝
[Flow continues through review, PR, merge...]场景: 工作日开始,实现下一个可用任务
调用:
/gitea-workflow --phase task-cycle流程:
Agent: 正在检测当前状态...
未找到工作区,检查就绪任务...
Agent: 执行 sync --last 1d --dry-run
[同步输出:0个已完成但未记录的任务]
Agent: 执行 next
找到:TASK-042 - 添加用户偏好设置端点
优先级:高 | 规模:小 | 分支:task/TASK-042-preferences
╔═══════════════════════════════════════════╗
║ CHECKPOINT: 任务选择 ║
╠═══════════════════════════════════════════╣
║ 已选择:TASK-042 ║
║ 是否继续执行实现? ║
║ ║
║ [continue] [stop] [other task] ║
╚═══════════════════════════════════════════╝
用户: continue
Agent: 在 .worktrees/TASK-042/ 创建工作区
执行 implement TASK-042
[采用测试驱动开发进行实现...]
测试:12项通过
覆盖率:87%
构建:成功
╔═══════════════════════════════════════════╗
║ CHECKPOINT: 实现完成 ║
╠═══════════════════════════════════════════╣
║ 所有测试通过,准备进入评审阶段 ║
║ 是否进入代码评审? ║
║ ║
║ [continue] [stop] ║
╚═══════════════════════════════════════════╝
[流程继续执行评审、PR、合并...]Gitea-Specific Notes
Gitea特定说明
CI Status Checking
CI状态检查
Gitea uses external CI systems (Drone, Woodpecker, Jenkins, etc.). To check CI status:
- Via API Script: Use to query commit statuses
scripts/gitea-ci-status.sh - Manual Verification: Check your CI dashboard directly
- PR Mergeability: Check if PR shows as mergeable in Gitea UI
Gitea使用外部CI系统(如Drone、Woodpecker、Jenkins等)。如需检查CI状态:
- 通过API脚本:使用查询提交状态
scripts/gitea-ci-status.sh - 手动验证:直接查看CI仪表板
- PR可合并性:在Gitea UI中检查PR是否显示为可合并
Tea CLI Command Reference
Tea CLI命令参考
| Operation | Tea CLI Command |
|---|---|
| List open PRs | |
| Create PR | |
| View PR | |
| Merge PR (squash) | |
| Merge PR (merge) | |
| Merge PR (rebase) | |
| Approve PR | |
| List issues | |
| 操作 | Tea CLI命令 |
|---|---|
| 查看开放的PR | |
| 创建PR | |
| 查看PR | |
| 合并PR( squash方式) | |
| 合并PR( merge方式) | |
| 合并PR( rebase方式) | |
| 批准PR | |
| 查看问题 | |
API Scripts
API脚本
For operations not available in the tea CLI, use the provided API scripts:
- - Check CI status via Gitea API
scripts/gitea-ci-status.sh - - Get PR review/approval status
scripts/gitea-pr-checks.sh
对于tea CLI不支持的操作,可使用提供的API脚本:
- - 通过Gitea API检查CI状态
scripts/gitea-ci-status.sh - - 获取PR评审/批准状态
scripts/gitea-pr-checks.sh
Limitations
局限性
- Requires context network with specific backlog structure
- Gitea-centric (uses CLI for PR operations)
tea - Single-task focus (parallel task work not orchestrated)
- Manual CI verification may be needed (Gitea uses external CI)
- Some features depend on Gitea version and configuration
- 需要具有特定积压任务结构的上下文网络
- 以Gitea为中心(使用CLI执行PR操作)
tea - 单任务聚焦(不支持并行任务编排)
- 可能需要手动验证CI状态(Gitea使用外部CI)
- 部分功能依赖Gitea版本和配置
Related Skills
相关Skill
- skill-maker - Create new skills following agentskills.io spec
- research-workflow - For research tasks before implementation
- gitea-coordinator - For multi-task orchestration with Gitea
- skill-maker - 按照agentskills.io规范创建新Skill
- research-workflow - 用于实现前的研究任务
- gitea-coordinator - 用于Gitea的多任务编排