Repository navigation
Closed
Labels
phaseEpic implementation phase
Description
🤖 Part of #207. This phase cleans up agent-facing CLI and extension architecture so there is one command/output contract and one extension metadata source.
Summary
Remove duplicated CLI transform/pipeline dispatch, fragile JSON detection, stale per-module harness assumptions, and duplicated extension catalog/registry metadata. This improves maintainability and keeps EEGPrep’s agent-friendly CLI reliable.
Scope
Covers remaining findings from #197/#205 including:
cli/commands/pipeline.pyduplicating transform command application logic fromcli/commands/transforms.py.qc--jsondetection special-cased throughargparse.REMAINDERincli/main.py.- Stale per-module CLI
main()harness contracts and duplicate exception-to-payload handling. extension_catalog.pymanager catalog vs curation validator split.- Duplicated extension entry-point/version helpers and active-record predicates.
- Bundled-plugin metadata in
plugin_menu.pydrifting from the extension registry.
Acceptance Criteria
- CLI transform subcommands and pipeline steps share canonical apply functions while preserving documented command surfaces and stable JSON schemas.
--jsondetection works uniformly for CLI errors and does not require command-specific root-parser hacks.- Per-module CLI harnesses are removed, clearly marked test-only, or routed through the real dispatcher so docs match behavior.
- Extension catalog runtime loading and catalog validation are separated by ownership, with entry points updated and tests covering both surfaces.
- Bundled plugin metadata comes from the registry or one canonical projection.
- Agent-facing CLI docs and skill/help text remain accurate.
References
AGENTS.md.agents/skills/eegprep-feature-development/SKILL.md.agents/skills/eegprep-extension-development/SKILL.md- Existing CLI docs and
src/eegprep/resources/skills/eegprep-cli.md.
/goal Prompt
/goal Complete Fable 5 architecture closeout Phase 4 from issue #<THIS_ISSUE>: consolidate CLI transform/pipeline execution and JSON error handling, remove stale per-module CLI contracts, and split/centralize extension catalog and bundled-plugin metadata ownership. Preserve agent-friendly JSON schemas, stable error codes, public CLI behavior, and extension manager UX; add integration tests for CLI subcommands, pipeline configs, extension catalog validation, and bundled plugin discovery; run focused pytest plus ruff, format, ty, and pre-commit.
Metadata
Metadata
Assignees
Labels
phaseEpic implementation phase
Activity
suraj-ranganath commentedon Jun 12, 2026
🤖
Research
No overlapping open PRs were found for #211, CLI, or extension architecture; the only matching open issue in the extension-catalog search is #211. CLI transform execution is still split: top-level transform commands use
transforms.py, while pipeline steps import the samepop_*functions and maintain separate_apply_*paths, so parameters/history can drift. JSON error handling is centralized only partly through a class-level argv scan, standalone command mains still emit their own payloads, and extension metadata ownership is blurred by runtime catalog re-exporting curation validation plus duplicated plugin active/status predicates.Relevant code
src/eegprep/cli/commands/transforms.py#L90-L188- transform command pathsrc/eegprep/cli/commands/pipeline.py#L469-L591- duplicate step applicationsrc/eegprep/cli/main.py#L55-L101- JSON/error dispatchersrc/eegprep/extension_catalog.py#L329-L344- validator re-export couplingsrc/eegprep/functions/adminfunc/plugin_menu.py#L32-L48- duplicated status predicatesProposed Fix
Make
transforms.pyexpose reusable canonical transform apply functions and have pipeline steps call them through normalized args, preserving public command grammar and JSON schemas. Replace global parser JSON state with command-agnostic argv detection attached to the parser/namespace soqc --jsonand parse errors use the same top-level path. Route stale per-module command mains through the canonical CLI dispatcher or clearly keep only test-only dispatch helpers, split catalog validation imports/entry point toextension_catalog_validation, and haveplugin_menuderive active/installed state from registry records/shared helpers instead of parallel predicates. Add focused tests for CLI JSON errors, pipeline/subcommand transform equivalence, catalog kind separation, and bundled plugin discovery.suraj-ranganath commentedon Jun 12, 2026
🤖 Completed by merged phase PR #218 into feature/fable5-architecture-closeout.