一键导入
tdd-workflow
Structured red-green-refactor workflow for Loan Workbench implementation tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Structured red-green-refactor workflow for Loan Workbench implementation tasks
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Terraform-focused pre-commit + atomic-commit Skill for IaC repos (fmt/validate/tflint/terraform-docs) with strict atomicity and no AI commit signatures.
PR workflow Skill for Terraform/Terragrunt repos: branch naming, PR hygiene, read-only CI gates, and versioning expectations for interface changes.
Workflow for changing Loan Workbench application behavior in src/.
| name | tdd-workflow |
| description | Structured red-green-refactor workflow for Loan Workbench implementation tasks |
A structured test-driven development workflow for the Loan Workbench API.
Use this skill when implementing a new feature, fixing a bug, or adding a business rule. It enforces the red→green→refactor cycle with explicit handoffs between testing and implementation roles.
Read the relevant specification:
specs/product-spec-notification-preferences.md for functional requirementsspecs/non-functional-requirements.md for NFR constraintsIdentify:
Create tests in tests/ using Vitest:
describe("feature-name", () => {
it("happy path behavior", async () => {
// Arrange: set up request with valid data
// Act: call the endpoint
// Assert: verify expected response
});
it("edge case — annotated pattern from specs", async () => {
// FALSE POSITIVE or HARD NEGATIVE test
// Arrange: set up the subtle scenario
// Act: call the endpoint
// Assert: verify the non-obvious correct behavior
});
});
Run npx vitest run to confirm the tests fail for the right reason.
If a test checks a human-readable error or reason field, prefer semantic
matching over exact prose. Normalize the text and assert stable business
markers. Reserve exact string checks for explicit contract identifiers such as
LEGAL-218.
If a test covers a business-rule rejection on an existing route, prefer
asserting stable semantics over one exact 400 vs 422 choice unless HTTP
status behavior is itself part of the requirement.
Hand off to the implementer with:
The implementer makes the minimal change to pass the tests.
Run npx vitest run again:
Hand off to the reviewer with:
The reviewer checks for:
Summarize the TDD cycle: