重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
workflow-patterns by oimiragieo/agent-studio
npx skills add https://github.com/oimiragieo/agent-studio --skill workflow-patterns使用 TDD 工作流实现任务、管理阶段检查点、处理 git 提交以及执行确保整个实施过程质量的验证协议的指南。
为每个任务遵循以下 11 个步骤:
阅读 plan.md 并识别下一个待处理的 [ ] 任务。在当前阶段内按顺序选择任务。不要跳转到后续阶段。
更新 plan.md 以将任务标记为 [~]:
- [~] **Task 2.1**: Implement user validation
将此状态更改与实现分开提交。
在编写实现之前,编写定义预期行为的测试:
示例:
def test_validate_user_email_valid():
user = User(email="test@example.com")
assert user.validate_email() is True
def test_validate_user_email_invalid():
user = User(email="invalid")
assert user.validate_email() is False
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
编写使测试通过所需的最小化代码:
在测试通过的情况下,改进代码:
检查测试覆盖率是否达到 80% 的目标:
pytest --cov=module --cov-report=term-missing
如果覆盖率低于 80%:
如果实现偏离了计划或引入了新的依赖项:
为任务创建一个专注的提交:
git add -A
git commit -m "feat(user): implement email validation
- Add validate_email method to User class
- Handle empty and malformed emails
- Add comprehensive test coverage
Task: 2.1
Track: user-auth_20250115"
提交消息格式:
添加详细的任务摘要作为 git 备注:
git notes add -m "Task 2.1: Implement user validation
Summary:
- Added email validation using regex pattern
- Handles edge cases: empty, no @, no domain
- Coverage: 94% on validation module
Files changed:
- src/models/user.py (modified)
- tests/test_user.py (modified)
Decisions:
- Used simple regex over email-validator library
- Reason: No external dependency for basic validation"
更新 plan.md,使用提交 SHA 标记任务完成:
- [x] **Task 2.1**: Implement user validation `abc1234`
提交计划状态更新:
git add .claude/context/tracks/*/plan.md
git commit -m "docs: update plan - task 2.1 complete
Track: user-auth_20250115"
当一个阶段的所有任务都完成后,执行验证协议:
列出自上一个检查点以来修改的所有文件:
git diff --name-only <last-checkpoint-sha>..HEAD
对于每个修改的文件:
执行完整的测试套件:
pytest -v --tb=short
所有测试必须在继续之前通过。
创建手动验证清单:
## Phase 1 Verification Checklist
- [ ] User can register with valid email
- [ ] Invalid email shows appropriate error
- [ ] Database stores user correctly
- [ ] API returns expected response codes
向用户展示验证清单:
Phase 1 complete. Please verify:
1. [ ] Test suite passes (automated)
2. [ ] Coverage meets target (automated)
3. [ ] Manual verification items (requires human)
Respond with 'approved' to continue, or note issues.
没有明确批准,不要继续。
批准后,创建检查点提交:
git add -A
git commit -m "checkpoint: phase 1 complete - user-auth_20250115
Verified:
- All tests passing
- Coverage: 87%
- Manual verification approved
Phase 1 tasks:
- [x] Task 1.1: Setup database schema
- [x] Task 1.2: Implement user model
- [x] Task 1.3: Add validation logic"
更新 plan.md 中的检查点表格:
## Checkpoints
| Phase | Checkpoint SHA | Date | Status |
| ------- | -------------- | ---------- | -------- |
| Phase 1 | def5678 | 2025-01-15 | verified |
| Phase 2 | | | pending |
在标记任何任务完成之前,验证这些关卡:
type: ignore<type>(<scope>): <subject>
<body>
<footer>
类型:
feat:新功能fix:错误修复refactor:无功能/修复的代码更改test:添加测试docs:文档chore:维护将详细摘要附加到提交:
git notes add -m "<detailed summary>"
查看备注:
git log --show-notes
好处:
完成任务时始终记录提交 SHA:
- [x] **Task 1.1**: Setup schema `abc1234`
- [x] **Task 1.2**: Add model `def5678`
这实现了:
在实施过程中,可能会出现与计划的偏差。请系统地处理它们:
范围增加 发现原始规范中未包含的需求。
范围缩减 在实施过程中认为不必要的功能。
[-](已跳过)并说明原因技术偏差 与计划不同的实现方法。
需求变更 在工作过程中对需求的理解发生变化。
当完成一个有偏差的任务时:
- [x] **Task 2.1**: Implement validation `abc1234`
- DEVIATION: Used library instead of custom code
- Reason: Better edge case handling
- Impact: Added email-validator to dependencies
如果在达到绿阶段后测试失败:
如果用户拒绝一个检查点:
如果任务无法进行:
[!] 并附上阻塞描述开始前:
cat .claude/context/memory/learnings.md
完成后:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.md假设中断:如果不在记忆中,那就没有发生过。
每周安装次数
55
仓库
GitHub 星标数
19
首次出现
2026年1月27日
安全审计
安装于
github-copilot54
gemini-cli53
kimi-cli52
amp52
codex52
opencode52
Guide for implementing tasks using TDD workflow, managing phase checkpoints, handling git commits, and executing the verification protocol that ensures quality throughout implementation.
Follow these 11 steps for each task:
Read plan.md and identify the next pending [ ] task. Select tasks in order within the current phase. Do not skip ahead to later phases.
Update plan.md to mark the task as [~]:
- [~] **Task 2.1**: Implement user validation
Commit this status change separately from implementation.
Write tests that define the expected behavior before writing implementation:
Example:
def test_validate_user_email_valid():
user = User(email="test@example.com")
assert user.validate_email() is True
def test_validate_user_email_invalid():
user = User(email="invalid")
assert user.validate_email() is False
Write the minimum code necessary to make tests pass:
With green tests, improve the code:
Check test coverage meets the 80% target:
pytest --cov=module --cov-report=term-missing
If coverage is below 80%:
If implementation deviated from plan or introduced new dependencies:
Create a focused commit for the task:
git add -A
git commit -m "feat(user): implement email validation
- Add validate_email method to User class
- Handle empty and malformed emails
- Add comprehensive test coverage
Task: 2.1
Track: user-auth_20250115"
Commit message format:
Add rich task summary as git note:
git notes add -m "Task 2.1: Implement user validation
Summary:
- Added email validation using regex pattern
- Handles edge cases: empty, no @, no domain
- Coverage: 94% on validation module
Files changed:
- src/models/user.py (modified)
- tests/test_user.py (modified)
Decisions:
- Used simple regex over email-validator library
- Reason: No external dependency for basic validation"
Update plan.md to mark task complete with commit SHA:
- [x] **Task 2.1**: Implement user validation `abc1234`
Commit the plan status update:
git add .claude/context/tracks/*/plan.md
git commit -m "docs: update plan - task 2.1 complete
Track: user-auth_20250115"
When all tasks in a phase are complete, execute the verification protocol:
List all files modified since the last checkpoint:
git diff --name-only <last-checkpoint-sha>..HEAD
For each modified file:
Execute complete test suite:
pytest -v --tb=short
All tests must pass before proceeding.
Create checklist of manual verifications:
## Phase 1 Verification Checklist
- [ ] User can register with valid email
- [ ] Invalid email shows appropriate error
- [ ] Database stores user correctly
- [ ] API returns expected response codes
Present verification checklist to user:
Phase 1 complete. Please verify:
1. [ ] Test suite passes (automated)
2. [ ] Coverage meets target (automated)
3. [ ] Manual verification items (requires human)
Respond with 'approved' to continue, or note issues.
Do NOT proceed without explicit approval.
After approval, create checkpoint commit:
git add -A
git commit -m "checkpoint: phase 1 complete - user-auth_20250115
Verified:
- All tests passing
- Coverage: 87%
- Manual verification approved
Phase 1 tasks:
- [x] Task 1.1: Setup database schema
- [x] Task 1.2: Implement user model
- [x] Task 1.3: Add validation logic"
Update plan.md checkpoints table:
## Checkpoints
| Phase | Checkpoint SHA | Date | Status |
| ------- | -------------- | ---------- | -------- |
| Phase 1 | def5678 | 2025-01-15 | verified |
| Phase 2 | | | pending |
Before marking any task complete, verify these gates:
<type>(<scope>): <subject>
<body>
<footer>
Types:
feat: New featurefix: Bug fixrefactor: Code change without feature/fixtest: Adding testsdocs: Documentationchore: MaintenanceAttach detailed notes to commits:
git notes add -m "<detailed summary>"
View notes:
git log --show-notes
Benefits:
Always record the commit SHA when completing tasks:
- [x] **Task 1.1**: Setup schema `abc1234`
- [x] **Task 1.2**: Add model `def5678`
This enables:
During implementation, deviations from the plan may occur. Handle them systematically:
Scope Addition Discovered requirement not in original spec.
Scope Reduction Feature deemed unnecessary during implementation.
[-] (skipped) with reasonTechnical Deviation Different implementation approach than planned.
Requirement Change Understanding of requirement changes during work.
When completing a task with deviation:
- [x] **Task 2.1**: Implement validation `abc1234`
- DEVIATION: Used library instead of custom code
- Reason: Better edge case handling
- Impact: Added email-validator to dependencies
If tests fail after reaching GREEN:
If user rejects a checkpoint:
If task cannot proceed:
[!] with blocker descriptionBefore starting:
cat .claude/context/memory/learnings.md
After completing:
.claude/context/memory/learnings.md.claude/context/memory/issues.md.claude/context/memory/decisions.mdASSUME INTERRUPTION: If it's not in memory, it didn't happen.
Weekly Installs
55
Repository
GitHub Stars
19
First Seen
Jan 27, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
github-copilot54
gemini-cli53
kimi-cli52
amp52
codex52
opencode52
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
123,700 周安装