一键导入
tdd-workflow
Red-green-refactor workflow adapted for a 100% branch-coverage trading CLI — narrow regression tests first, no coverage regressions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Red-green-refactor workflow adapted for a 100% branch-coverage trading CLI — narrow regression tests first, no coverage regressions.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use the pinned external CocoIndex Code MCP workflow for broad repository routing, then prove exact candidates with rg and direct file reads.
Bound repository context reads and semantic-search output without weakening source, test, or evidence verification.
Choose staged contract tests that catch partial AI-generated fixes across models, data, risk, execution ownership, and CLI/Windows parity.
Keep concise user docs and machine-readable model evidence synchronized with real behavior without losing provenance or caveats.
Apply four anti-error coding principles plus this repository's stricter financial-evidence, safety, and single-session rules.
Research the existing implementation, tests, primary technical sources, and financial rationale before adding trading code or dependencies.
| name | tdd-workflow |
| description | Red-green-refactor workflow adapted for a 100% branch-coverage trading CLI — narrow regression tests first, no coverage regressions. |
| origin | adapted from ZMB-UZH/omero-docker-extended tdd-workflow |
Use this skill whenever you add a feature, fix a bug, or change a behavior that users or tests can observe.
shell quits on Ctrl-D without error" / "fetch --batch-size 2000 clamps to the exchange limit"). If you can't name it, you don't know the change yet.tests/ under the matching file. Target branches, not just happy paths. If the branch is error handling, assert both the failure and the recovery.pytest -q tests/test_<module>.py), then the full suite, then coverage with --fail-under=100.This repo runs coverage report --fail-under=100 in CI. A new branch with no test assertion is a CI break, not a style issue. When you add code:
if, elif, else, except, with, and early return needs a test that exercises it.# pragma: no cover unless you also leave a comment explaining why the branch exists.fake_candles, trained_model_stub) over opaque tuples.BinanceClient at a lower level than necessary. The existing tests stub at the HTTP seam — follow that pattern.time.sleep in tests. Monkey-patch the clock or inject a sleep hook.requests.Session.request at the seam.