Skip to content

Phase 4b: Extension docs, trust levels, and agent skill #119

Closed

Description

@suraj-ranganath

Summary

Put the EEGPrep external extension model into repo documentation and release a dedicated agent skill that helps researchers build EEGPrep extensions correctly.

This phase owns the user-facing explanation of the extension ecosystem: install paths, required package format, registration rules, trust levels, curation meaning, and how an agent should help create an extension without violating EEGPrep conventions.

Key Work

  • Add repo docs explaining the external user workflow:
    • install EEGPrep;
    • install an extension from local editable path, GitHub, PyPI, or a private package index;
    • launch eegprep-gui or eegprep-console;
    • see extension menus/actions automatically;
    • run extension pop_* functions from console;
    • inspect EEG, LASTCOM, and ALLCOM after GUI or console actions.
  • Add docs explaining the required extension package format:
    • Python package with pyproject.toml;
    • eegprep.extensions entry point;
    • register() returning a valid ExtensionSpec;
    • declarative menus rather than direct Qt mutation;
    • pop_* functions with return_com=True where user-facing/history-relevant;
    • packaged Markdown help resources;
    • packaged data/model files through package resources;
    • no runtime dependency on src/eegprep/eeglab.
  • Add docs explaining all supported distribution paths:
    • local/private editable install: uv add -e /path/to/eegprep-ext-foo;
    • GitHub install: uv add git+https://github.com/lab/eegprep-ext-foo;
    • PyPI install: uv add eegprep-ext-foo;
    • private package index, if applicable.
  • Add trust-level docs and Extension Manager language:
    • Bundled/Core: ships with EEGPrep and is covered by EEGPrep CI/release process.
    • Curated: catalog-reviewed and mechanically validated, but not scientific endorsement.
    • Installed: present in the user's environment, not necessarily reviewed by SCCN/EEGPrep.
    • Failed/Incompatible/Disabled: visible states with clear user action.
  • Create .agents/skills/eegprep-extension-development/SKILL.md to guide agents and researchers through extension development.
  • The skill should cover planning, EEGLAB reference inspection when porting, SDK registration, menu/help/console/history behavior, tests, visual parity for GUI extensions, package-data handling, distribution path choice, and catalog submission checks.
  • Add lightweight tests or docs checks ensuring the skill/docs reference the real SDK symbols and supported install paths once those symbols exist.

Edge Cases To Cover

  • Researcher does not know how to publish to PyPI and wants GitHub-only distribution.
  • Researcher wants a local/private lab extension only.
  • Extension requires optional dependencies or large model files.
  • Extension is scientifically experimental and should not imply EEGPrep endorsement.
  • Extension is curated in the catalog but not installed locally.
  • Extension is installed locally but not curated.
  • Extension breaks after EEGPrep version changes.
  • Agent tries to mutate EEGPrep internals directly instead of using the SDK.

Acceptance Criteria

  • Repo docs clearly explain how external users install and use extensions from all supported paths.
  • Repo docs clearly explain the required extension format and rules.
  • Trust levels are documented in user-facing language and match Extension Manager terminology.
  • The eegprep-extension-development skill exists, is concise enough to be usable, and has correct references to AGENTS.md, the SDK, feature-development workflow, visual parity skill, and GUI flow QA skill.
  • A future builder agent can use the skill to create an extension without needing out-of-band instructions.
  • Docs make clear that EEGPrep does not host or unzip arbitrary extension zips and that installing extensions means installing third-party Python code.

/goal Prompt

/goal Document EEGPrep's external extension model and create the eegprep-extension-development skill. Cover local/GitHub/PyPI/private-index install paths, required package and ExtensionSpec format, pop_* history/console/session rules, package data/help rules, trust levels, curation meaning, and agent workflow for building extensions. Keep docs accurate against the implemented SDK, avoid runtime EEGLAB dependency, and add lightweight checks where practical.

Activity

  1. added
    phase
    on Jun 2, 2026
  2. claude commented on Jun 2, 2026

    @claude
    Contributor

    🤖 Plan:

    Actionability

    Actionable in goal (clear acceptance criteria), but scope is well over 100 lines (multi-doc + new skill + lightweight checks) and a multi-module change. Per the issue triage rules I am posting an approach for human review instead of opening a PR.

    Research

    Phase 4b owns user-facing docs and the eegprep-extension-development agent skill for the extension ecosystem described in epic #112. The acceptance criteria explicitly require that docs/skill reference the real SDK symbols ("once those symbols exist"), trust-level vocabulary that matches the Extension Manager, and install paths for local editable / GitHub / PyPI / private index.

    Blocking dependency. Phase 1 (#113 — Extension SDK, ExtensionSpec, eegprep.extensions entry-point group, registry, status model) is not implemented. No open PR carries the SDK either: gh pr list --state open shows only #111 (EEGBrowser). The package has no extensions module and no eegprep.extensions entry-point references:

    $ find src/eegprep -name "extension*"          # no results
    $ grep -r "eegprep.extensions" --include=*.py  # no results
    

    Phase 3 (#115 — Extension Manager UX, curated catalog, trust-level statuses) is also not in develop. The trust-level vocabulary Bundled / Curated / Installed / Failed / Incompatible / Disabled in #119 mirrors the status model in #113 and the catalog model in #115; documenting it before either lands would risk renaming churn.

    Relevant code / docs

    Proposed Approach

    Scope: docs-only + one new skill + minimal checks. No runtime code.

    1. New user-guide pages under docs/source/user_guide/extensions/:

      • index.rst — entry to the extension model.
      • installing_extensions.rst — external user workflow (install eegprep, install ext from editable/GitHub/PyPI/private index, launch GUI/console, see menus, run pop_*, inspect EEG / LASTCOM / ALLCOM).
      • extension_format.rst — required package shape: pyproject.toml, eegprep.extensions entry point, register() -> ExtensionSpec, declarative menus (no direct Qt mutation), pop_* with return_com=True, packaged Markdown help under the extension package, packaged data via importlib.resources, no src/eegprep/eeglab dep at runtime.
      • distribution.rst — uv add -e <path>, uv add git+https://…, uv add <pypi-name>, private index notes; explicit statement that EEGPrep does not host/unzip arbitrary extension archives.
      • trust_levels.rst — Bundled/Core, Curated, Installed, Failed, Incompatible, Disabled; vocabulary must match the Extension Manager status enum from Phase 3.
        Wire all five into docs/source/user_guide/index.rst and add a top-level Extensions link in docs/source/index.rst.
    2. New agent skill .agents/skills/eegprep-extension-development/SKILL.md:

      • Front-matter name + description (same pattern as sibling skills).
      • Sections: when to use; required reading (AGENTS.md, SDK reference, feature-development skill, visual-parity skill, GUI flow QA skill); planning checklist; EEGLAB reference inspection rule for ports; SDK registration recipe (entry point + register() returning ExtensionSpec); menu/help/console/history rules (return_com=True, packaged help); test expectations; visual-parity loop for GUI extensions; package data via importlib.resources; distribution path decision tree; catalog submission checklist.
      • Keep terse and link-heavy per house style.
    3. Lightweight checks (only after Phase 1 SDK names are stable):

      • tests/test_extension_docs.py — parse each user-guide page and the skill, assert references to real public symbols (e.g. eegprep.extensions.ExtensionSpec, register, eegprep.extensions entry-point group) resolve via importlib. Parametrize over the documented install commands (string presence is enough — no shell execution). No mocks.
      • Add the test to tests/conftest.py legacy categorization only if it needs a marker.
    4. Out of scope for this issue (handled by Phase 1: Extension SDK, registry, discovery, and compatibility contract #113 / Phase 3: Extension Manager UX, curated catalog metadata, and safe install guidance #115 / Phase 4: Researcher authoring toolkit, template package, examples, and scaffolding #116): the SDK module itself, the Extension Manager UI, trust-level enum implementation, template package, scaffolding CLI.

    Blocking Dependency

    I am stopping before implementation. Two options for the human:

    a) Wait for Phase 1 (#113) and ideally Phase 3 (#115) to merge, then re-run #119; docs will reference real symbols and the canonical status vocabulary without rewrite.

    b) Approve writing docs+skill against a frozen draft of the Phase 1 API names listed in #113 (ExtensionSpec, register, eegprep.extensions entry-point group, status values bundled / curated / installed / disabled / incompatible / failed / invalid / missing-dependency). The lightweight import-resolution test would be added as @pytest.mark.skip(reason="Phase 1 SDK not yet merged") until #113 lands.

    Please confirm (a) or (b), or scope #119 down to just the skill draft (no user-guide pages) if you want to start narrower.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

phase

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions