Repository navigation
feat(skill): generate-test-data skill for tables that already exist - #63
Merged
Merged
Conversation
A second skill in the nanook plugin: start from an existing workbook, inspect it, write and register the generators it calls, generate one JSON fixture per test case, check the count and use the fixtures in Vitest or Playwright tests. - inspect-workbook.mts: lists tables, Execute/NeverExecute/Multiplicity, filters and the minimum fixture count; reports unregistered generators and filter processors, unknown faker paths and text instructions, broken references and test cases dropped by NeverExecute - generate-fixtures.mts: registers SimpleArrayFilter and SimpleArrayIgnoreFilter, so tables with a FilterSection run; the text generator caches per instruction, so several gen::text cells in one test case no longer share one value - create-equivalence-class-table: x in the ExecuteSection is false, not true; points to the new skill for existing tables - plugin 0.4.0, README, test that keeps the script copies in sync Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
🎉 This PR is included in version 3.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
4 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A second skill in the
nanookplugin,generate-test-data. It starts from a decision table that already exists (hand-made, from Nanook 2.x, or fromcreate-equivalence-class-table):inspect-workbook.mts, new)generate-fixtures.mts)Fixes on the way
generate-fixtures.mtsregistered no filter processor, so a workbook with filters exited 1 and ignored the filters. It now registersSimpleArrayFilterandSimpleArrayIgnoreFilter.textgenerator: severalgen::text:…cells in one test case got the same value (the base class caches by instance id only). It now caches per instruction.create-equivalence-class-table: saidxin the ExecuteSection is true; the parser treats it as false.Packaging
plugin.json, README and the slash command point to ittests/skills/scriptsInSync.test.tskeeps the two copies ofgenerate-fixtures.mtsidentical and the versions consistentThe skill text assumes the next release is 3.2.0 (scripts in
node_modules/@xhubio/nanook-table/skills/generate-test-data/); for 3.1.x it describes a way withoutinspect-workbook.mts.Test plan
--strictinspect-workbook.mtsandgenerate-fixtures.mtsover 12 workbooks fromtests/processor/fixtures: same exit code everywhere, count ≥ minimum where generation succeedstemplatereported, generator from the skill template, 20 fixtures, Vitest 20/20npx skills add <repo> --skill generate-test-datainstalls SKILL.md and both scriptsclaude plugin validate/plugin install nanook@nanookafter mergeFollow-ups (not in this PR)
DataGeneratorBasecaches by instance id only;docs/guide/directives.mdsaysgen::is always newdocs/tutorials/create-generator.mdwritesgeneratorPerson:firstNamewithoutgen:, which Nanook reads as a static stringcallTree.instanceIdof the root never matches the key indata(ids are renewed after the call tree is built)npx skills add xhubio/nanook-tablealso offers the internal dev skills from.claude/skillsuse-with-aipage in the landing-page repo should mention the second skill🤖 Generated with Claude Code