/tl:test-strategy [task description or task reference]from tl
Classifies specification knowledge (codified/articulated/tacit) and selects the appropriate testing approach — TDD when specs exist, exploratory when they don't.
Ships in tl. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are running the test-strategy skill — a structured testing workflow that matches the testing approach to the nature of the specification. Task: $ARGUMENTS
Phase 0 — Classify
Glob/grep for spec artifacts + scan task description
-> evidence-based classification into epistemic level
|
+-- Codified (formal spec) ---> Phase 1 (generate mechanically)
| |
+-- Articulated (NL spec) ---> Phase 1 (transcribe faithfully)
| |
+-- Tacit (no spec) ---> Phase 3 (implement first)
|
Phase 2 — Red Gate
confirm ALL new tests fail
|
Phase 3 — Green Implementation
implement; 3 attempts max
|
Phase 4 — Test-After (tacit or escape)
document boundaries discovered
This phase is near-zero cost. Do it before writing a single line of code or tests.
Search the project for formal specification artifacts:
# OpenAPI / Swagger
glob: openapi.yaml, openapi.json, swagger.yaml, swagger.json, **/*.oas.yaml
# Protocol Buffers
glob: **/*.proto
# JSON Schema
glob: **/*.schema.json, **/schema.json
# TypeScript / GraphQL types that double as contracts
glob: **/*.d.ts, **/*.graphql, **/*.gql
# Existing tests for the target module
glob: **/*.test.*, **/*.spec.*, **/test_*.py, **/*_test.go
Read any spec artifacts found that are relevant to the task.
Parse $ARGUMENTS for:
Assign one of three epistemic levels based on evidence:
| Level | Signal | Testing Approach |
|---|---|---|
| Codified | Formal spec exists (OpenAPI, proto, JSON Schema, type interface) | Generate tests mechanically from the spec; spec is ground truth |
| Articulated | Natural-language spec with concrete examples (user story, bug report with repro, acceptance criteria) | Write tests first; translating spec → test IS the value |
| Tacit | No spec; behavior is emergent or exploratory | Implement first; write tests after to document what was built |
Default to Tacit when evidence is absent or only vague intent is expressed. Do not fabricate a spec.
Read the existing test files for the target module:
State your classification explicitly before proceeding:
Classification: [Codified | Articulated | Tacit]
Evidence: [what you found that supports this]
Test framework: [framework and conventions observed]
Proceeding to: [Phase 1 | Phase 3]
Tacit classification skips directly to Phase 3.
Use this naming convention consistently:
Example (Python / pytest):
class GivenSearchEndpointWithIndexedDocuments:
def test_when_query_matches_returns_ranked_results(self):
...
def test_when_query_is_empty_returns_bad_request(self):
...
def test_when_no_results_found_returns_empty_list_not_404(self):
...
class GivenSearchEndpointWithEmptyIndex:
def test_when_any_query_returns_empty_list(self):
...
Example (Jest / TypeScript):
describe('Given search endpoint with indexed documents', () => {
it('when query matches, returns ranked results', () => { ... });
it('when query is empty, returns 400 Bad Request', () => { ... });
it('when no results found, returns empty list not 404', () => { ... });
});
Every test assertion must have a provenance comment linking it to the specification:
# Per requirement: max 3 retry attempts (openapi.yaml: POST /auth/login -> x-max-retries)
assert response.status_code == 429
assert response.json()["retries_remaining"] == 0
# Per acceptance criteria: case-insensitive search (ticket AC-3)
assert results == search(query="PYTHON") == search(query="python")
For Articulated specs, if you encounter an ambiguity the spec does not address, flag it explicitly rather than silently picking an interpretation:
# Ambiguity: spec does not address pagination when results == 0.
# Assuming empty list response (not 404). Confirm with product owner or remove.
assert response.json()["results"] == []
assert response.status_code == 200
Write 8-10 tests maximum per task. Cover:
Explicitly avoid:
Write tests to the appropriate location following the project's conventions. Commit nothing yet.
Run tests. ALL new tests must fail.
# Run only the new test file to check initial state
pytest path/to/test_module.py -v # Python
npm test -- --testPathPattern=module # Jest
go test ./pkg/module/... -run TestName # Go
| Outcome | Interpretation | Action |
|---|---|---|
| All new tests fail (expected) | Gate PASSED — proceed to implementation | Continue to Phase 3 |
| A test passes before any implementation | Either existing code already handles it (test is redundant) OR the test has a logic bug | Investigate before continuing |
| A test errors with import/fixture failure | Infrastructure bug, not behavioral — fix it, re-run, does not break immutability | Fix setup only, re-run |
Once all new tests fail for behavioral reasons, declare the tests IMMUTABLE:
Red Gate: PASSED
Tests frozen at: [timestamp or git hash]
All N new tests fail for behavioral reasons (not infrastructure errors).
Tests are now IMMUTABLE. Assertions may only change with written justification
referencing a specific discovered constraint (file:line evidence).
No assertion changes past this point without written justification.
Implement the feature to make the frozen tests pass.
Run the full test suite after each implementation attempt:
# Attempt N/3: run frozen tests
pytest path/to/test_module.py -v
Attempt 1: Initial implementation. If all pass, proceed to 3d.
Attempt 2: If tests still fail, read the failure messages carefully. Identify the gap. Revise implementation.
Attempt 3: Final attempt. If any test still fails after 3 attempts, trigger the escape valve (3c).
If 3 attempts do not yield a green suite:
@pytest.mark.skip(reason="could not satisfy after 3 attempts — requires human review")
def test_when_edge_case_returns_expected():
...
If during implementation you discover a genuine constraint that makes an assertion wrong (not just hard to pass), you may modify that assertion ONLY if:
# JUSTIFICATION: Changed sort order from descending to ascending.
# Existing convention at utils/sorting.py:42 — all list endpoints return ascending.
# Original assertion assumed descending (spec ambiguous on sort direction).
assert results == sorted(results, key=lambda r: r["score"])
Unexplained assertion changes are a test quality failure.
After all tests pass, run the full module test suite (not just the new tests) to confirm no regressions:
pytest path/to/module/ -v # Python
npm test -- --testPathPattern=dir # Jest
go test ./pkg/module/... # Go
If regressions appear, fix them before declaring done.
Use this phase when:
Test boundaries discovered during implementation, not internals invented for coverage:
| Test this | Skip this |
|---|---|
| Public function signatures with representative inputs/outputs | Private helper functions |
| Error paths that required explicit handling | Pure delegation (functions that just call another) |
| Integration points with external systems | Trivial accessors and getters |
| Observed edge cases that caused real handling decisions | Behavior not actually implemented |
Every test-after test must carry a provenance comment:
# Source: discovered during implementation, no prior spec
# Behavior: returns None when record not found (not raises KeyError)
def test_when_record_missing_returns_none_not_exception():
result = find_record(id="nonexistent")
assert result is None
Apply the same three-facet convention (Given/When+Then) as Phase 1.
The testing workflow has a 15-20% overhead budget on tool calls relative to the implementation alone. If you find yourself spending more than that on test infrastructure, the task has likely grown beyond its original scope. Flag this and propose scoping the task down.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
55 skills in this plugin
/active-learnUse when an agent's performance is uneven and you want systematic improvement. Runs diagnose -> challenge-gen -> challenge-run -> update learnings in a loop. Works with or without a team. Keywords: active-learn, training, adversarial, improve, agent, loop, capability, tuning, solo./adviseUse when you're unsure what to work on next. Reads git state, session history, and task tracker to recommend next actions. Works with just git, richer with more context. Keywords: advise, suggest, next, what now, recommend, orient./assembleUse when starting a project, forming a team for long-horizon work, or upgrading from ad-hoc agent dispatch. Creates persistent roles with ownership and learnings that improve across sessions. Keywords: team, project, setup, roles, persistent, agents, staff, learning./assessUse when items need categorical triage (critical/warning/ok), not numeric scoring. Groups items by verdict against a rubric. Unlike rank (scores) or filter (binary). Keywords: evaluate, judge, categorize, triage, verdict, rubric, severity, classify./blossomUse when a goal is vague and you need to explore before planning. Runs spikes to discover what work exists, then produces a prioritized backlog. Keywords: explore, discover, spike, plan, epic, backlog, investigate./bootstrapUse when starting a new project or adding Claude Code support to an existing one. Sets up CLAUDE.md, hooks, rules, and generates tailored agents. Keywords: bootstrap, scaffold, setup, new project, init, kickstart.npx claudepluginhub tyevans/tackline --plugin tacklineOther plugins' skills for the same job