Skip to content

Add pyem-model-generator skill with templates and offline references#20

Open
shawnrhoads wants to merge 14 commits into
mainfrom
create-skill-for-computational-model-generation-siyrhd
Open

Add pyem-model-generator skill with templates and offline references#20
shawnrhoads wants to merge 14 commits into
mainfrom
create-skill-for-computational-model-generation-siyrhd

Conversation

@shawnrhoads
Copy link
Copy Markdown
Owner

@shawnrhoads shawnrhoads commented Apr 26, 2026

Motivation

  • Provide a reusable skill to scaffold new computational cognitive model modules and example notebooks for pyEM, including from free-text task/model descriptions with equations.
  • Support consistent pyEM-style sim/fit function signatures, parameter transforms, variant handling, and parameter-recovery notebooks.
  • Include offline contract and templates so generation works even when the full pyem package is not available.

Description

  • Add skills/pyem-model-generator with README.md and SKILL.md that explain usage, required clarifications, free-text parsing, and generation workflow.
  • Add an example-notebook template references/example-notebook-template.json to drive code and notebook generation.
  • Add reference specs for common model classes (references/rl.json, references/bayes.json, references/glm.json) and generation helpers (references/model-file-template.py, references/modelclass-utils-template.py).
  • Add offline resources references/pyem-runtime-contract.md and references/parameter-recovery-notebook.md to specify runtime contracts and notebook plotting requirements.

Testing

  • No automated tests were added or executed as part of this change.
  • The skill documentation includes recommended smoke checks (import generated module, run *_sim, run *_fit) that can be wired into CI for future automated validation.

Codex Task

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new pyem-model-generator skill intended to scaffold standalone pyEM-style model modules and parameter-recovery notebooks using bundled offline reference specs/templates.

Changes:

  • Introduces bundled reference specs for RL/Bayes/GLM anchors (references/*.json) to drive generation.
  • Adds Python and notebook templates (model-file-template.py, modelclass-utils-template.py, example-notebook-template.json) plus offline documentation for runtime/notebook contracts.
  • Adds skill-facing docs (SKILL.md, README.md) describing the generation workflow and required clarifications.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
skills/pyem-model-generator/references/rl.json RL anchor spec describing required fields/imports/outputs for generated RL models.
skills/pyem-model-generator/references/bayes.json Bayes anchor spec describing required fields/imports/outputs for generated Bayes models.
skills/pyem-model-generator/references/glm.json GLM anchor spec describing required fields/imports/outputs for generated GLM models.
skills/pyem-model-generator/references/modelclass-utils-template.py Shared utils template intended to be emitted alongside generated model modules.
skills/pyem-model-generator/references/model-file-template.py Per-model Python module template (mod_desc/spec/id + sim/fit contracts).
skills/pyem-model-generator/references/example-notebook-template.json Notebook cell template for simulation → fit → recovery plotting.
skills/pyem-model-generator/references/parameter-recovery-notebook.md Offline reference describing required notebook sections and plots.
skills/pyem-model-generator/references/pyem-runtime-contract.md Offline contract describing expected runtime interfaces for generated code.
skills/pyem-model-generator/SKILL.md Skill definition and generation rules/workflow.
skills/pyem-model-generator/README.md User-facing documentation for what the skill generates and how to prompt it.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread skills/pyem-model-generator/references/model-file-template.py
Comment thread skills/pyem-model-generator/references/example-notebook-template.json Outdated
Comment thread skills/pyem-model-generator/references/modelclass-utils-template.py Outdated
Comment thread skills/pyem-model-generator/references/rl.json Outdated
Comment thread skills/pyem-model-generator/README.md Outdated
Comment thread skills/pyem-model-generator/references/bayes.json Outdated
Comment thread skills/pyem-model-generator/references/glm.json Outdated
Comment thread skills/pyem-model-generator/SKILL.md Outdated
Comment thread skills/pyem-model-generator/README.md
Comment thread skills/pyem-model-generator/references/pyem-runtime-contract.md Outdated
shawnrhoads and others added 7 commits April 26, 2026 20:41
…te.json

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…te prior contract

Agent-Logs-Url: https://github.com/shawnrhoads/pyEM/sessions/3f8576e3-eeb1-4323-92d6-bd7d64320b62

Co-authored-by: shawnrhoads <24925845+shawnrhoads@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants