apply-tdd-loop-en — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited apply-tdd-loop-en (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Drives a strict Test-Driven Development loop — RED → GREEN → REFACTOR — as an agentic cycle. Accepts two entry points: a list of requirements (test-first, greenfield) or existing code that needs test coverage added. The loop runs until all requirements are covered or all code paths are tested.
create-tested-algorithms-from-requirements-en)delegates the inner TDD loop to this skill
"write test first", "drive TDD on", "add tests then implement"
Input:
Goal: implement each requirement exactly once, test-first.
Input:
Goal: write a failing test for each untested path, make it pass, then refactor.
For Entry Point B, start by listing all public methods / branches without tests. Treat each as a mini-requirement and proceed with the standard loop below.
LOOP:
1. RED — write ONE failing test for the next requirement / untested path
2. GREEN — write the minimal code to make ONLY that test pass
3. REFACTOR — clean up code and tests without breaking anything
4. CHECK — are all requirements / paths covered? if YES → EXIT LOOP
if NO → next iteration (go to 1)Track the following state across iterations. If the session may span multiple turns, persist this in a Handover-State.md file.
# Handover-State.md — TDD loop state
skill: apply-tdd-loop-en
entry_point: A | B # which entry point was used
language: <e.g. Python, Java, TypeScript>
test_framework: <e.g. pytest, JUnit 5, Jest>
requirements: # Entry Point A
- [ ] req-1: <text>
- [ ] req-2: <text>
untested_paths: # Entry Point B
- [ ] path-1: <method / branch>
- [ ] path-2: <method / branch>
current_iteration: 1
current_phase: RED | GREEN | REFACTOR
last_test_added: <test name>
last_code_change: <brief description>
last_green_commit: <git SHA of last fully green state>
exit_condition_met: falseUpdate the state after each phase before proceeding to the next.
test_<what>_<when>_<expected>)(missing implementation, not a syntax error or wrong import).
current_phase: GREENminutes, do NOT debug excessively — instead:
git revert HEAD # or: git checkout -- .Reset current_phase: RED, rethink the test or the minimal code, retry.
current_phase: REFACTORextract helpers, simplify logic.
[x] in loop state. git add -A
git commit -m "test: add test for <requirement>" # after RED
git commit -m "feat: implement <requirement>" # after GREEN
git commit -m "refactor: clean <what>" # after REFACTOR (if changed)Small commits mean any future failure can be reverted instantly without losing other work.
last_green_commit: <sha>current_phase: RED, increment current_iterationAfter REFACTOR, check:
All items in requirements[] or untested_paths[] are marked [x]?
YES → set exit_condition_met: true, summarise results, EXIT LOOP
NO → continue to next RED phaseRequirements input:
1. add(a, b) returns the sum of two integers
2. add(a, b) raises TypeError if either argument is not an integerIteration 1 — RED:
# test_calculator.py
def test_add_returns_sum_of_two_integers():
assert add(1, 2) == 3 # FAILS — add() not defined yetIteration 1 — GREEN:
# calculator.py
def add(a, b):
return a + bIteration 1 — REFACTOR: no duplication, naming is clear — nothing to change.
Iteration 2 — RED:
def test_add_raises_type_error_for_non_integer():
with pytest.raises(TypeError):
add("x", 2) # FAILS — no type check yetIteration 2 — GREEN:
def add(a, b):
if not isinstance(a, int) or not isinstance(b, int):
raise TypeError("Both arguments must be integers")
return a + bIteration 2 — REFACTOR: extract guard if reused elsewhere — not needed here.
All requirements covered → EXIT LOOP.
Existing untested method:
public int divide(int a, int b) {
return a / b;
}Untested paths identified:
1. normal division: divide(10, 2) → 5
2. division by zero: divide(5, 0) → ArithmeticExceptionProceed with the standard loop, treating each path as a requirement.
it defeats the discipline of TDD.
readable without opening the implementation.
Even "nothing to refactor" is a valid outcome — but it must be checked.
possible thing (even hardcoded), then let the next iteration force generalisation (triangulation).
Handover-State.md to the working directory.Resume by loading state and continuing from current_phase.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.