The words of this tutorial, step by step. The text lives in src/smappy/tutorial/topics/; the directions it follows are in src/smappy/tutorial/STYLE.md.
1. card: Your own plugins: an analysis described, then run
Sometimes no plugin measures what you need. Then make one: a plugin of your own works like every other, with its settings, Run and figures.
You do not have to program it. Describe it to an AI assistant, and it writes the plugin.
spoken: When no plugin measures what you need, make your own. An AI assistant can write it from your description.
2. Plugins, New plugin asks for a name, and puts a working example under that name in your plugin folder.
3. card: Your plugin folder
Every plugin in this folder is in SMAPpy, under User. Nothing has to be installed, and SMAPpy need not be restarted.
Beside your plugins are the instructions an AI assistant reads, so it knows how a SMAPpy plugin is written.
spoken: Your plugins live in this folder, beside the instructions an assistant reads.
4. It is in the Plugins menu, under User. The plus in a tab pins it, as any other plugin.
5. The example measures how far each localization is from its nearest neighbour: its settings, and Run.
6. It is small on purpose: a starting point to change into what you need.
7. card: Ask an assistant
Open a terminal in your plugin folder, start an AI assistant there, and say what to measure, on which localizations, and what to show.
With a chat assistant, paste AGENTS.md and your description, and save the answer in the folder.
spoken: Start an assistant in your plugin folder, and describe what to measure and what to show.
8. Open it from the Plugins menu again, and the new version is there, with the setting you asked for.
9. Run: how many neighbours each localization has, and the median. If it is not what you meant, tell the assistant, and run again.
10. card: Up to you
A plugin for one dataset can be deleted when you are done. One you keep can have a help page and tests, which the assistant offers, but nothing requires them.
A plugin others would use can become part of SMAPpy, by a pull request on GitHub. Then it needs a help page and tests.
spoken: Delete it, keep it, or share it: a plugin others would use can become part of SMAPpy.
11. card: What to remember
- Plugins, New plugin: a working example, in your plugin folder.
- Describe what you need to an assistant started in that folder.
- Your plugins are under Plugins, User; open one again to get the new version.
- The help page Your own plugins has the details.
spoken: That is your own plugin: start from the example, describe what you need, and run it.