Prompt recipes
These prompts are designed for “web LLM” usage (internet access + GitHub browsing, no local repo access). They use spx-examples on GitHub as the canonical spec and convention source.
Before generating any code, instruct the LLM to open and follow these files from the repo:
LLM contract:
https://github.com/HammerHeads-Engineers/spx-examples/blob/main/docs/LLM_SPEC.mdModel DSL:
https://github.com/HammerHeads-Engineers/spx-examples/blob/main/docs/MODEL_LANGUAGE.mdValidation script:
https://github.com/HammerHeads-Engineers/spx-examples/blob/main/tools/validate_models.pyCatalog (new models must be registered):
https://github.com/HammerHeads-Engineers/spx-examples/blob/main/library/catalog/models.yaml
Important: a web LLM must not claim it ran commands. It should output:
file-by-file changes (or a unified diff),
exact local validation commands to run (
python tools/validate_models.py,pytest/poetry run pytest),and any assumptions/questions when documentation is incomplete.
1) Create a new model (copy the closest template)
You are preparing a patch for the spx-examples repository:
https://github.com/HammerHeads-Engineers/spx-examples (branch: main)
Goal: add a new model for <DEVICE> exposed over <PROTOCOL>.
Hard requirements:
- Follow these specs (read them first):
- https://github.com/HammerHeads-Engineers/spx-examples/blob/main/docs/LLM_SPEC.md
- https://github.com/HammerHeads-Engineers/spx-examples/blob/main/docs/MODEL_LANGUAGE.md
- Place the model under: library/domains/<domain>/<vendor|generic>/<new_model>.yaml
- File name and `name:` must be lower_snake_case and aligned.
- Update library/catalog/models.yaml with a new entry for this model.
- Add/extend tests under tests/ so pytest covers the new model behavior.
- Do not claim you ran anything; output the exact commands I should run locally:
- python tools/validate_models.py
- pytest (or poetry run pytest)
Start from this closest template:
- <TEMPLATE_PATH> (relative path in repo, plus GitHub URL)
Implement:
- New model path: <NEW_MODEL_PATH>
- Attributes (with units in names):
- <attr_1>: <type>, default <value>, notes <...>
- <attr_2>: ...
- Communication mapping:
- protocol block: <protocol-specific mapping rules>
- Scenarios:
- <scenario_name>: description, duration, overrides/actions
Deliverables:
- Patch with the new YAML model, catalog entry, and tests.
- Short PR summary + how to validate locally.2) Add protocol mapping to an existing model
3) Add faults + MiL tests (scenarios are the contract)
4) Generate a model + protocol mapping from device/protocol documentation
Use this when you have a device datasheet, protocol manual, or register map and want the LLM to “recreate the protocol surface” with the minimum simulation behavior required for MiL tests.
Last updated

