test-plan-score-test-function
Score generated test function code for completeness, quality, and convention adherence using a 5-criteria rubric. Use for validating generated test code quality before including in the final implement
SKILL.mdskills/test-plan-score-test-function/SKILL.md
GitHubTest Function Quality Scorer
Internal scorer sub-agent that evaluates generated test function code using a 5-criteria quality rubric. Forked by test-plan.case-implement in Step 5.6.
Usage
This skill is not user-invocable. It is called by:
test-plan.case-implement(Step 5.6) for quality assurance of generated tests
Inputs
From arguments
Parse $ARGUMENTS to extract:
--test-code-file: Path to file containing generated test code--tc-file: Path to TC-*.md specification--conventions-file: Path to repository conventions markdown--framework: Test framework (pytest, Go testing, Jest, etc.)--output-file: Path where assessment should be written (for revision feedback)--calibration-file: Path to preloaded calibration examples fromload_calibration.py(parent writes JSON.calibration_textto this file; this skill has no Bash). Read it as score anchors. Do not globcalibration/. Adding a pair is a new file undercalibration/core/,calibration/ui/, orcalibration/<team>/— no SKILL.md edit.
Process
Step 1: Read Scoring Instructions
Read the detailed scoring rubric from ${CLAUDE_SKILL_DIR}/prompts/score-test-function.md.
Step 2: Execute Scoring
Apply the prompt with substitutions:
{TEST_CODE_FILE}=--test-code-fileargument{TC_FILE}=--tc-fileargument{CONVENTIONS_FILE}=--conventions-fileargument{FRAMEWORK}=--frameworkargument{OUTPUT_FILE}=--output-fileargument{CALIBRATION_FILE}=--calibration-fileargument (Read this file as score anchors)
The scoring rubric evaluates:
- Coverage (0-2): All TC requirements implemented?
- Assertions (0-2): Specific and meaningful?
- Convention Adherence (0-2): Follows repo patterns?
- Test Data (0-2): Uses realistic values from TC?
- Code Quality (0-2): Clean, no excessive TODOs?
Step 3: Write Assessment to File
Write the structured markdown assessment to the --output-file path.
The output includes:
- Per-criterion scores with issues
- Total score (0-10)
- Verdict (Ready/Good/Revise/Rework)
- Coverage analysis (preconditions, steps, assertions implemented)
- Specific issues found
- Revision recommendations (if needed)
IMPORTANT: The orchestrating skill needs this file to:
- Extract the verdict to decide if revision is needed
- Extract specific issues to pass as feedback to the test generator
- Keep an audit trail of quality assessments
What This Skill Does NOT Do
- Does NOT modify the generated test code (only assesses it)
- Does NOT trigger auto-revision (that's handled by the orchestrating skill)
- Does NOT make the revision decision (returns verdict, orchestrating skill decides)
- For scoring + auto-revision, the orchestrating skill (
test-plan.case-implement) handles the revision loop
$ARGUMENTS