Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
Summary
Make it easy for EEG researchers to create high-quality EEGPrep extensions without needing to understand the entire EEGPrep codebase.
This phase focuses on concrete authoring assets: template packages, scaffold tooling if justified, reusable examples, and test scaffolds. The broader docs/trust-level explanation and the agent skill are split into Phase 4b so this phase can stay implementation-focused.
Key Work
- Add a minimal extension template package that demonstrates
pyproject.toml, entry point registration,ExtensionSpec, onepop_*function, one menu item, one help Markdown resource, tests, and sample data usage. - Add examples for common extension types: pure signal transform, file importer/exporter, GUI dialog, plot/browser integration, and plugin with optional dependency.
- Add a developer checklist for GUI parity, console/history behavior, data semantics, package data, dependencies, tests, and version compatibility.
- Consider a small scaffold command only if it stays simple and maintainable. If added, it should generate from templates and not become a custom package manager.
- Explain how the template can be installed locally with
uv add -e /path/to/eegprep-ext-foo, from GitHub withuv add git+https://github.com/lab/eegprep-ext-foo, or from PyPI withuv add eegprep-ext-foo. - Keep the template aligned with the Phase 1 SDK and Phase 2 runtime integration contract.
Edge Cases To Cover
- Extension needs optional dependencies.
- Extension needs packaged data or model weights.
- Extension contributes GUI but user launches
--no-plugins. - Extension handles a failed GUI dialog/cancel path.
- Extension action mutates EEG and must update
LASTCOM/ALLCOM. - Extension is private and never submitted to the curated catalog.
- Extension is a port of an EEGLAB plugin with MATLAB-only pieces.
Acceptance Criteria
- A researcher can use the template to create, install editable, and run a minimal extension.
- The template's tests pass and verify menu, console, history, help, and package data behavior.
- Examples cover local/private, GitHub, and PyPI-oriented packaging paths.
- Template code does not depend on
src/eegprep/eeglabat runtime. - Phase 4b owns the high-level docs/trust-level narrative and Codex skill, so this phase does not duplicate those deliverables.
/goal Prompt
/goal Build the EEGPrep extension authoring toolkit: template package, optional simple scaffold command, examples, test scaffold, and developer checklist. Make the workflow easy for EEG researchers creating private, GitHub-hosted, or PyPI-published extensions, while enforcing EEGPrep session/history/GUI/console conventions, standalone runtime behavior, package-data correctness, and maintainable tests.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
claude commentedon Jun 2, 2026
🤖 Plan:
Research
Phase 4 depends on a Phase 1 contract (#113:
ExtensionSpec, registry,eegprep.extensionsentry-point group, lazy loading, status model) that does not exist indevelop. Nosrc/eegprep/extensions.py, no entry-point group inpyproject.toml, andplugin_menu.pystill holds a static_BUNDLED_PLUGINStuple — there is nothing for a template package to register against. Per the epic in #112, recommended merge order is1 -> 2 + 3 + 4 + 5 -> 6, so opening a Phase 4 PR now would either fork the API or block on a moving target. Scope is also well over the 100-line / multi-module threshold (template package + 4 docs pages + Codex skill + 5 example flavors + test scaffold).Relevant code
Proposed Approach
Treat Phase 4 as a follow-up to #113. When Phase 1 lands, deliver Phase 4 as three small PRs against `feature/eegprep-extension-completion` rather than one mega-PR:
Template package + test scaffold. Add `examples/eegprep-extension-template/` (not under `src/eegprep/`) containing `pyproject.toml` with a `[project.entry-points."eegprep.extensions"]` line, one `pop_.py` returning `(EEG, com)` with `return_com=True`, one menu placeholder, one `resources/help/.md`, a sample-data smoke test using `tests/fixtures.py` patterns, and an editable-install README snippet. Tests assert: entry point loads, menu placeholder registers, console auto-store of bare `pop_*` works, history records, help resource resolves, GUI dialog cancel path returns no com. Reuses Phase 1 registry — does not add a parallel one.
Docs. Four new pages under `docs/source/user_guide/`: `create_extension.rst`, `port_eeglab_plugin.rst`, `publish_extension.rst`, `submit_to_catalog.rst`, plus a developer checklist page. Cover the seven edge cases in the issue (optional deps, packaged data, `--no-plugins`, cancel path, `LASTCOM`/`ALLCOM` mutation, private extensions, MATLAB-only pieces). Index from `docs/source/index.rst`. No `auto_examples` changes unless we ship a Sphinx-Gallery example, which I'd defer.
Codex skill. Add `.agents/skills/eegprep-extension-development/SKILL.md` modeled on `eegprep-feature-development/SKILL.md` (same length, same structure). Sections: when to use, required reads (AGENTS.md, Phase 1 API doc, template README), planning checklist, GUI parity loop reference, console/history verification steps, test bar, packaging/publish steps, catalog-submission gate. Explicitly out of scope: any runtime dependency on `src/eegprep/eeglab/`.
Open questions for a maintainer before implementation begins:
Not opening a PR. Awaiting Phase 1 (#113) merge and maintainer feedback on the three questions above before starting implementation.
[-]Phase 4: Researcher authoring toolkit, template package, examples, docs, and Codex skill[/-][+]Phase 4: Researcher authoring toolkit, template package, examples, and scaffolding[/+]