CW-301a · Module 1
Plugin Testing & Iteration
3 min read
Plugins are software. They have bugs, edge cases, and failure modes. Testing them systematically is not optional — it is the difference between a plugin that works in demos and a plugin that works in production. And those are very different things.
The testing framework has three layers. Layer one: happy path testing. Run the plugin through its intended workflow with clean, well-structured input. Does it produce the expected output? Does every skill fire when it should? Does every command do what the documentation says? If the happy path fails, nothing else matters — fix these issues first.
Layer two: edge case testing. What happens when the input is messy? When a required field is missing? When the data is in an unexpected format? When the user gives a prompt that is ambiguous? Edge cases reveal the assumptions your plugin makes — and every assumption is a potential failure in production. A contract review plugin that assumes every contract has a termination clause will silently skip the review when it encounters a contract without one.
Layer three: adversarial testing. Try to break it on purpose. Give it contradictory instructions. Provide data that violates the domain rules. Ask it to do something outside its scope. Adversarial testing reveals what happens at the boundaries — does the plugin fail gracefully with a clear error, or does it produce confidently wrong output? Graceful failure is a feature. Confident wrongness is the worst possible outcome.
Do This
- Test the happy path first — if it fails, nothing else matters
- Document every edge case you discover and add it to your test suite
- Test with messy, incomplete, and contradictory input — production data is never clean
- Version your plugins and keep a changelog — track what changed and why
Avoid This
- Ship after one successful demo — demos use clean data, production does not
- Assume the meta plugin produced bug-free output — it produced a first draft
- Skip adversarial testing because "users would not do that" — they will
- Update plugins in-place without versioning — you will need to roll back eventually