tdd
Acceptance-first TDD workflow for solo implementation work. Use when handling a coding change directly and you want to follow a disciplined sequence: read context, define acceptance criteria, write failing tests when feasible, implement, verify, and conclude with passed, failed, or skipped with reason.
- License 许可
- MIT
- 最近更新
- 2026-03-30
- Stars
- ★ 33
- Forks
- 3
01 前言 Front Matter
- name
- tdd
- description
- Acceptance-first TDD workflow for solo implementation work. Use when handling a coding change directly and you want to follow a disciplined sequence: read context, define acceptance criteria, write failing tests when feasible, implement, verify, and conclude with passed, failed, or skipped with reason.
02 资源文件 68
- 参考文档agents/openai.yaml576 B
- 脚本datasheet_types/__init__.py1.9 KB
- 脚本datasheet_types/base_block.py6.5 KB
- 脚本datasheet_types/cache_reader.py11.6 KB
- 脚本datasheet_types/codec.py6.3 KB
- 脚本datasheet_types/extraction.py8.0 KB
- 脚本datasheet_types/pinout.py5.2 KB
- 脚本datasheet_types/regulator.py5.3 KB
- 脚本datasheet_types/spec_value.py2.4 KB
- 脚本datasheet_types/trust_gating.py4.1 KB
- 脚本distributor_core/__init__.py—
- 脚本distributor_core/cli.py2.9 KB
- 脚本distributor_core/download.py25.3 KB
- 脚本distributor_core/inputs.py8.9 KB
- 脚本distributor_core/manifest.py5.7 KB
- 脚本distributor_core/sync.py20.2 KB
- 脚本distributor_core/verify.py11.9 KB
- 参考文档examples/abm8g-106-12.000mhz-t.json9.4 KB
- 参考文档examples/irlml6344.json16.0 KB
- 参考文档examples/lm2596-adj.json14.3 KB
- 参考文档examples/lm358.json15.6 KB
- 参考文档examples/mbrs540t3g.json12.3 KB
- 参考文档examples/stm32f103c8t6.json51.1 KB
- 参考文档prompts/base.md4.5 KB
- 参考文档prompts/crystal.md8.8 KB
- 参考文档prompts/diode.md8.3 KB
- 参考文档prompts/mcu.md9.6 KB
- 参考文档prompts/opamp.md10.7 KB
- 参考文档prompts/pinout.md4.7 KB
- 参考文档prompts/regulator.md4.4 KB
- 参考文档prompts/scout.md3.5 KB
- 参考文档prompts/transistor.md12.5 KB
- 参考文档references/cache-layout.md8.2 KB
- 参考文档references/consumer-api.md10.8 KB
- 参考文档references/dispatch-claude-code.md9.4 KB
- 参考文档references/dispatcher-contract.md8.2 KB
- 参考文档references/extraction-pipeline.md1.7 KB
- 参考文档references/extraction-schema.md18.0 KB
- 参考文档references/field-extraction-guide.md14.9 KB
- 参考文档references/quality-scoring.md8.4 KB
- 参考文档schemas/base.schema.json9.3 KB
- 参考文档schemas/CHANGELOG.md16.0 KB
- 参考文档schemas/crystal.schema.json7.2 KB
- 参考文档schemas/diode.schema.json7.9 KB
- 参考文档schemas/extraction.schema.json3.7 KB
- 参考文档schemas/fixtures/lm2596-adj.example.json14.3 KB
- 参考文档schemas/fixtures/manifest.example.json1000 B
- 参考文档schemas/fixtures/minimal.example.json2.1 KB
- 参考文档schemas/manifest.schema.json3.0 KB
- 参考文档schemas/mcu.schema.json12.4 KB
- 参考文档schemas/opamp.schema.json9.2 KB
- 参考文档schemas/pinout.schema.json5.9 KB
- 参考文档schemas/plan.schema.json4.6 KB
- 参考文档schemas/regulator.schema.json8.4 KB
- 参考文档schemas/scout.schema.json2.9 KB
- 参考文档schemas/spec_value.schema.json3.0 KB
- 参考文档schemas/transistor.schema.json12.0 KB
- 脚本scripts/_smoke_v14_roundtrip.py8.9 KB
- 脚本scripts/datasheet_extract_cache.py17.8 KB
- 脚本scripts/datasheet_features.py17.4 KB
- 脚本scripts/datasheet_page_selector.py16.7 KB
- 脚本scripts/datasheet_score.py15.5 KB
- 脚本scripts/datasheet_verify.py46.1 KB
- 脚本scripts/extraction_schema.py1.7 KB
- 脚本scripts/merge_results.py12.5 KB
- 脚本scripts/plan_extraction.py9.5 KB
- 脚本scripts/validate_extraction_result.py3.9 KB
- 脚本scripts/validate_sanity_vector.py6.2 KB
03 SKILL.md 正文
TDD
Use this skill as a single-user workflow. Do not introduce worker, task assignment, or team coordination concepts.
Core Rules
- Read the request, relevant code, and constraints before implementing.
- Define what counts as done before writing production code.
- Prefer a red phase when the task supports automated tests.
- Do not default to E2E. Use E2E only when explicitly requested, already required by the task contract, or when lower-cost verification cannot cover the acceptance risk.
- If the task needs test-case design, regression planning, acceptance coverage, or broader QA execution, invoke
qa-expertinstead of expanding this skill into a full QA workflow. - If automated tests are not appropriate, define manual verification before implementing.
- Do not treat the work as complete until verification finishes.
- If verification is skipped, state the reason and residual risk explicitly.
Workflow
Follow this sequence:
- Read context
- Define acceptance criteria
- Write failing tests when feasible
- Implement
- Verify
- Conclude
Do not skip ahead unless the previous step is clearly satisfied.
Step 1: Read Context
Inspect the request and the surrounding implementation before changing anything.
Confirm:
- goal
- scope
- constraints
- non-goals
- existing verification options
If the request is ambiguous, stop and resolve the ambiguity before continuing.
Step 2: Define Acceptance Criteria
Write acceptance criteria before implementation.
Cover:
- expected behavior
- edge cases
- failure cases
- observable completion conditions
If acceptance criteria cannot be written yet, the task is not ready for implementation.
Step 3: Write Failing Tests When Feasible
If the task supports automated verification, write or update tests before implementation.
Target a real red phase:
- new behavior is asserted
- current code fails that assertion
- expected outcome is clear
If automated tests are not a good fit, explicitly define the manual verification procedure before moving on.
Step 4: Implement
Implement against the acceptance criteria and verification plan.
Do not expand scope during implementation unless the acceptance criteria are updated first.
Step 5: Verify
Use the strongest available verification path in this order:
- Existing automated tests
- New automated tests added for the change
- Repeatable manual verification with concrete steps and expected results
skippedonly when verification is blocked in the current environment
E2E is not the default verification path. Prefer lower-cost checks first unless E2E is explicitly required or the acceptance risk cannot be covered otherwise.
If the task needs dedicated test-case design, regression execution, or broader QA coverage during verification, invoke qa-expert.
If verification fails, return to implementation and fix the issue before concluding.
Step 6: Conclude
End with exactly one of these outcomes:
passedfailedskipped
When concluding, include:
- brief summary of what changed
- verification used
- result
- remaining risk if any
If the result is skipped, include the reason and the specific risk introduced by not verifying.
Failure Conditions
Stop and resolve the issue before implementation when:
- requirements are unclear
- acceptance criteria are missing
- no verification strategy is defined
Loop back and keep working when:
- tests fail unexpectedly
- the verification command fails
- manual verification does not satisfy acceptance criteria
Optional Artifacts
Use lightweight artifacts only when they help:
proposal.mddesign.mdtests.md- explicit verify command
Do not require a fixed directory structure unless the surrounding project already has one.
04 同仓库更多 Skills
workflow-orchestrator
Governance-only workflow plan entry for controller and human sessions. Use when the user asks to generate, approve, activate, or close workflow plans through `agent-team workflow plan`.
worker-reply-main
Worker-first reporting entry for sending completion, blocker, or decision-needed messages back to main through `agent-team reply-main`.
worker-recovery
Worker-first recovery entry for resuming the current assignment from file artifacts. Use when a worker needs to recover task context, continue work, or re-anchor after a pause.
worker-inspector
Read-only worker inspection skill for controller and human sessions. Use when the user wants to view worker status without opening a worker or sending a reply.
worker-dispatch
Controller-side worker dispatch entry for opening workers, checking targeted worker status, and replying to workers with existing `agent-team worker` and `agent-team reply` commands.
task-splitting
Decompose requirement, design, or brainstorming documents into reviewable task drafts with one function per task and one file per task, then create `agent-team` task packages only after explicit approval. Use when turning a document into tasks, splitting oversized tasks, validating task boundaries, or preparing approved task files for `agent-team task create`.