feat(skills): add test-hardening skill and plugin manifest - #11
Conversation
| icon: shield | ||
| capability: Reasoning | ||
| workspace: required | ||
| tools: chat |
There was a problem hiding this comment.
This one line stops the skill being able to do what it describes.
In src/skills/format.ts the toolset vocabulary is 'full' | 'chat' | 'plan', and chat is the read-only one. The validator's own warning text spells it out: an unrecognised value falls back to chat and the message reads "so this skill runs read-only".
The core discipline here is Mutate, Observe, Restore, and all three need write access or command execution:
- Mutate: "Apply a targeted mutation" needs a file edit
- Observe: "Run or evaluate the tests and identify the failure BY NAME" needs to run the suite
- Restore: "Immediately restore the code to its clean state" needs a file edit
Under chat the model can do none of those, so it has to imagine all three. Then the Output section asks it to fill in "Hardened Tests: the list of tests verified with deliberate mutations, naming the exact mutation applied and the named test failure observed". A read-only model filling that in is reporting verification it did not perform, which is the exact failure this skill was written to catch.
| tools: chat | |
| tools: full |
The reason you gave in the PR description is a good one and I do not want to lose it. Not generating mounds of unverified test code is right. That belongs in the body as an instruction rather than in the toolset, because the toolset takes away the ability to verify at the same time as the ability to write. Add a line saying the skill does not author new test files, it mutates existing code temporarily and restores it.
Everything else stands. "Passing is the null result" is the right opening, and the worked example that ends "The test failed on mutation, but the test is still wrong" is the best paragraph in the file, because it stops the skill overselling itself.
ms-shashank
left a comment
There was a problem hiding this comment.
I have reviewed this. The writing is genuinely strong and I want it in, but there is one line in the frontmatter that makes the skill unable to do the thing it describes.
The frontmatter says tools: chat. In src/skills/format.ts the toolset vocabulary is 'full' | 'chat' | 'plan', and chat is the read-only one. The validator's own warning text spells it out: an unrecognised value falls back to chat and the message reads "so this skill runs read-only".
The core discipline in this skill is Mutate, Observe, Restore. All three need write access or command execution:
Mutate: "Apply a targeted mutation" needs a file edit
Observe: "Run or evaluate the tests and identify the failure BY NAME" needs to run the suite
Restore: "Immediately restore the code to its clean state" needs a file edit
Under chat the model can do none of those, so it would have to imagine all three. Then the required output section asks it to fill in "Hardened Tests: the list of tests verified with deliberate mutations, naming the exact mutation applied and the named test failure observed". A read-only model filling in that section is reporting verification it did not perform, which is the exact failure this skill was written to catch.
The reason you gave for chat in the PR description is a good one and I do not want to lose it. Not generating mounds of unverified test code is right. That belongs in the body as an instruction rather than in the toolset, because the toolset removes the ability to verify at the same time as it removes the ability to write.
So: tools: full, and add a line to the body saying the skill does not author new test files, it mutates existing code temporarily and restores it.
Everything else stands. "Passing is the null result" is the right opening. The worked example that ends "The test failed on mutation, but the test is still wrong" is the best paragraph in the file, because it stops the skill overselling itself.
Rebase on top of #12 when you push, the marketplace entry will conflict.
356dfb5 to
850994e
Compare
|
@ms-shashank done! |
|
Holding the merge on the red check rather than overriding it. The Most likely cause: this branch was cut before #12 merged, so main has moved. If it is still red after the rebase, paste the failing step here and I will look at it with you. Two of the checks in that workflow are worth knowing about generally, because they are easy to trip and the reason is not obvious:
Both worth a paragraph each in SKILL_STYLE.md when you get to #3. |
|
@ms-shashank I checked why the check failed. The tests didn't actually fail. GitHub Actions couldn't start the test runner because of an account billing issue: I checked everything locally on my machine and all 5 tests passed:
Everything is ready to merge whenever you're ready! |
|
Correcting myself: I told you to rebase and paste the failing step, and the red has nothing to do with your code. It is a billing issue on the org, so the runner never starts, which is why the job reports failure in a couple of seconds with no steps at all. Sorry for sending you looking for something that was not there, and for the three PRs that sat behind it.
|
850994e to
7249dd7
Compare
Summary
Closes #4
Adds the new
test-hardeningskill, manifest, and marketplace entry.Most test advice just tells you to increase coverage numbers. This skill forces a simple discipline: break the code on purpose, watch the exact test fail by name, and restore the code. If the test doesn't fail when the code is broken, it's not actually protecting anything.
What task was this used on, and what changed in the answer?
"I will change X to Y, and I expect <test name> to fail"), checks if that exact test failed by name, and flags any surviving mutation as an issue.What was deliberately left out, and why?
tools: chat(read-only review mode). Its job is to find weak tests and guide you, not generate mounds of unverified test code.