auto-eeg-analysis 0.3.3rc1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- auto_eeg_analysis-0.3.3rc1/AGENT_GUIDE.md +209 -0
- auto_eeg_analysis-0.3.3rc1/CHANGELOG.md +115 -0
- auto_eeg_analysis-0.3.3rc1/CITATION.cff +28 -0
- auto_eeg_analysis-0.3.3rc1/CONTRIBUTING.md +122 -0
- auto_eeg_analysis-0.3.3rc1/LICENSE +28 -0
- auto_eeg_analysis-0.3.3rc1/MANIFEST.in +204 -0
- auto_eeg_analysis-0.3.3rc1/PKG-INFO +96 -0
- auto_eeg_analysis-0.3.3rc1/README.ja.md +109 -0
- auto_eeg_analysis-0.3.3rc1/README.md +110 -0
- auto_eeg_analysis-0.3.3rc1/README.zh-CN.md +109 -0
- auto_eeg_analysis-0.3.3rc1/RESOURCE_INDEX.md +40 -0
- auto_eeg_analysis-0.3.3rc1/docs/APPROVED_ERP.md +182 -0
- auto_eeg_analysis-0.3.3rc1/docs/CERTIFICATION_LEVELS.md +123 -0
- auto_eeg_analysis-0.3.3rc1/docs/EEGLAB.md +154 -0
- auto_eeg_analysis-0.3.3rc1/docs/EXAMPLES.md +302 -0
- auto_eeg_analysis-0.3.3rc1/docs/GETTING_STARTED.md +315 -0
- auto_eeg_analysis-0.3.3rc1/docs/MATLAB_NATIVE.md +204 -0
- auto_eeg_analysis-0.3.3rc1/docs/PLATFORM_SUPPORT.md +146 -0
- auto_eeg_analysis-0.3.3rc1/docs/PRELOADED_SKILLS.md +359 -0
- auto_eeg_analysis-0.3.3rc1/docs/REPLAY.md +113 -0
- auto_eeg_analysis-0.3.3rc1/docs/RUN_SETTINGS.md +51 -0
- auto_eeg_analysis-0.3.3rc1/docs/WINDOWS_FIRST_RUN.md +150 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/eeglab/01-eeglab-aea-menu.jpg +0 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/eeglab/02-settings-claude.jpg +0 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/eeglab/03-real-report-metrics.jpg +0 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/fonts/README.md +5 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/library-overview.svg +174 -0
- auto_eeg_analysis-0.3.3rc1/docs/assets/n400-example.png +0 -0
- auto_eeg_analysis-0.3.3rc1/environment.yml +24 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/README.md +111 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_client_command.m +18 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_erp_mean.m +185 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_export.m +50 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_launch_matlab.m +41 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_prepare_matlab.m +104 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_shell_quote.m +10 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/aea_write_json.m +7 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/eegplugin_aea.m +24 -0
- auto_eeg_analysis-0.3.3rc1/extensions/eeglab/aea/pop_aea.m +137 -0
- auto_eeg_analysis-0.3.3rc1/packaging/README.md +60 -0
- auto_eeg_analysis-0.3.3rc1/packaging/RESOURCE_FILES.txt +201 -0
- auto_eeg_analysis-0.3.3rc1/packaging/update_resource_manifest.py +32 -0
- auto_eeg_analysis-0.3.3rc1/pyproject.toml +42 -0
- auto_eeg_analysis-0.3.3rc1/recipes/README.md +103 -0
- auto_eeg_analysis-0.3.3rc1/recipes/_template/RECIPE.md +121 -0
- auto_eeg_analysis-0.3.3rc1/recipes/alpha-attention-cueing/RECIPE.md +128 -0
- auto_eeg_analysis-0.3.3rc1/recipes/alpha-attention-cueing/citation.bib +25 -0
- auto_eeg_analysis-0.3.3rc1/recipes/complexity-anesthesia/RECIPE.md +128 -0
- auto_eeg_analysis-0.3.3rc1/recipes/complexity-anesthesia/citation.bib +47 -0
- auto_eeg_analysis-0.3.3rc1/recipes/ern-flankers/RECIPE.md +231 -0
- auto_eeg_analysis-0.3.3rc1/recipes/ern-flankers/citation.bib +35 -0
- auto_eeg_analysis-0.3.3rc1/recipes/mmn-oddball/RECIPE.md +135 -0
- auto_eeg_analysis-0.3.3rc1/recipes/mmn-oddball/citation.bib +35 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n170-face-inversion/RECIPE.md +135 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n170-face-inversion/citation.bib +25 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n170-faces/RECIPE.md +139 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n170-faces/citation.bib +35 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n400-semantic/RECIPE.md +104 -0
- auto_eeg_analysis-0.3.3rc1/recipes/n400-semantic/citation.bib +30 -0
- auto_eeg_analysis-0.3.3rc1/recipes/p300-oddball/RECIPE.md +142 -0
- auto_eeg_analysis-0.3.3rc1/recipes/p300-oddball/citation.bib +25 -0
- auto_eeg_analysis-0.3.3rc1/recipes/resting-microstate/RECIPE.md +182 -0
- auto_eeg_analysis-0.3.3rc1/recipes/resting-microstate/citation.bib +46 -0
- auto_eeg_analysis-0.3.3rc1/recipes/resting-spectral-connectivity/RECIPE.md +144 -0
- auto_eeg_analysis-0.3.3rc1/recipes/resting-spectral-connectivity/citation.bib +47 -0
- auto_eeg_analysis-0.3.3rc1/setup.cfg +4 -0
- auto_eeg_analysis-0.3.3rc1/setup.py +31 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-audit/SKILL.md +117 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-audit/references/background.md +69 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-audit/references/procedure.md +402 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-behavior/SKILL.md +99 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-behavior/references/background.md +38 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-behavior/references/procedure.md +311 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-behavior/scripts/trials.py +135 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-bids/SKILL.md +76 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-bids/references/background.md +57 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-bids/references/procedure.md +235 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-bids/scripts/events.py +96 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/SKILL.md +137 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/references/background.md +54 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/references/procedure.md +552 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/references/sample-entropy.md +75 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/scripts/lempel_ziv.py +52 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-complexity/scripts/sample_entropy.py +67 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/SKILL.md +145 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/references/background.md +103 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/references/continuous.md +120 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/references/procedure.md +610 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/scripts/continuous.py +57 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-connectivity/scripts/graph.py +86 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-decoding/SKILL.md +134 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-decoding/references/background.md +62 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-decoding/references/procedure.md +539 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-decoding/scripts/validation.py +164 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/SKILL.md +121 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/references/approved-erp.md +91 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/references/background.md +70 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/references/procedure.md +327 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/scripts/erp.py +74 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-epoch/scripts/erp_core_events.py +40 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-erp/SKILL.md +116 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-erp/references/background.md +42 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-erp/references/procedure.md +375 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-erp/scripts/measurements.py +63 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-figure/SKILL.md +116 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-figure/references/background.md +51 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-figure/references/procedure.md +488 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-figure/scripts/variability.py +56 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-group-compare/SKILL.md +113 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-group-compare/references/background.md +69 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-group-compare/references/procedure.md +276 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-group-compare/scripts/statistics.py +40 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-ica/SKILL.md +110 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-ica/references/background.md +95 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-ica/references/procedure.md +318 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-ica/scripts/selection.py +41 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-methods-text/SKILL.md +75 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-methods-text/references/background.md +44 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-methods-text/references/procedure.md +274 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-microstate/SKILL.md +113 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-microstate/references/background.md +56 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-microstate/references/procedure.md +312 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-microstate/scripts/preparation.py +149 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-pipeline/SKILL.md +87 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-pipeline/references/background.md +5 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-pipeline/references/procedure.md +181 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/SKILL.md +128 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/references/background.md +127 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/references/bounded.md +220 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/references/channel-identity.md +74 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/references/procedure.md +206 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/scripts/check_channels.py +58 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-preprocess/scripts/continuous.py +147 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-qc/SKILL.md +120 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-qc/references/background.md +67 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-qc/references/procedure.md +326 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-qc/scripts/spectral.py +77 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-recipe/SKILL.md +70 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-recipe/references/procedure.md +257 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-report/SKILL.md +107 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-report/references/background.md +69 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-report/references/procedure.md +463 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-report/scripts/inputs.py +47 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-source/SKILL.md +113 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-source/references/background.md +114 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-source/references/procedure.md +517 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-source/scripts/roi.py +47 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/SKILL.md +136 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/references/background.md +115 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/references/continuous.md +121 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/references/method-contract.md +56 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/references/procedure.md +454 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-spectral/scripts/continuous.py +181 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-stats/SKILL.md +105 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-stats/references/background.md +84 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-stats/references/method-choices.md +22 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-stats/references/procedure.md +251 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-tfr/SKILL.md +136 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-tfr/references/background.md +74 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-tfr/references/procedure.md +475 -0
- auto_eeg_analysis-0.3.3rc1/skills/eeg-tfr/scripts/itc.py +90 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis/__init__.py +4 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis/__main__.py +3 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis/cli.py +50 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/PKG-INFO +96 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/SOURCES.txt +216 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/dependency_links.txt +1 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/entry_points.txt +2 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/requires.txt +17 -0
- auto_eeg_analysis-0.3.3rc1/src/auto_eeg_analysis.egg-info/top_level.txt +1 -0
- auto_eeg_analysis-0.3.3rc1/templates/ANALYSIS_PLAN.md +62 -0
- auto_eeg_analysis-0.3.3rc1/templates/DATASET_BRIEF.md +89 -0
- auto_eeg_analysis-0.3.3rc1/templates/FIGURE_PLAN.md +40 -0
- auto_eeg_analysis-0.3.3rc1/templates/FINDINGS.md +60 -0
- auto_eeg_analysis-0.3.3rc1/templates/backends/README.md +60 -0
- auto_eeg_analysis-0.3.3rc1/templates/backends/erp_preprocess_eeglab.m +232 -0
- auto_eeg_analysis-0.3.3rc1/templates/backends/erp_preprocess_fieldtrip.m +261 -0
- auto_eeg_analysis-0.3.3rc1/templates/backends/validation/ft_p3_minus6db.json +11 -0
- auto_eeg_analysis-0.3.3rc1/templates/backends/validation/ft_p3_passband.json +11 -0
- auto_eeg_analysis-0.3.3rc1/tools/auto_brief.py +370 -0
- auto_eeg_analysis-0.3.3rc1/tools/baselines/sample_pipeline.json +44 -0
- auto_eeg_analysis-0.3.3rc1/tools/build_resource_index.py +24 -0
- auto_eeg_analysis-0.3.3rc1/tools/check_analysis_outputs.py +372 -0
- auto_eeg_analysis-0.3.3rc1/tools/check_erp_outputs.py +171 -0
- auto_eeg_analysis-0.3.3rc1/tools/check_plan_provenance.py +89 -0
- auto_eeg_analysis-0.3.3rc1/tools/eeglab_bridge.py +210 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/ARCHIVE_VERSION +1 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/backends.json +274 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/check_env.ps1 +166 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/check_env.sh +203 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/deploy_report.ps1 +262 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/deploy_report.sh +284 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/environment-pinned.yml +355 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/requirements-optional.txt +58 -0
- auto_eeg_analysis-0.3.3rc1/tools/env/resolve_backend.py +297 -0
- auto_eeg_analysis-0.3.3rc1/tools/erp_cluster_report.schema.json +70 -0
- auto_eeg_analysis-0.3.3rc1/tools/erp_execution.py +259 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/gen_library_overview.py +83 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/gen_recipe_case_figures.py +116 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/n400/recipe_case_figure_data.npz +0 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/n400/recipe_case_results.json +207 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/plot_style.py +49 -0
- auto_eeg_analysis-0.3.3rc1/tools/examples/run_recipe_case.py +447 -0
- auto_eeg_analysis-0.3.3rc1/tools/gen_receipt.py +135 -0
- auto_eeg_analysis-0.3.3rc1/tools/install_skills.py +73 -0
- auto_eeg_analysis-0.3.3rc1/tools/load_skill.py +117 -0
- auto_eeg_analysis-0.3.3rc1/tools/package_eeglab_plugin.py +31 -0
- auto_eeg_analysis-0.3.3rc1/tools/prepare_analysis_review.py +105 -0
- auto_eeg_analysis-0.3.3rc1/tools/prepare_erp_packet.py +93 -0
- auto_eeg_analysis-0.3.3rc1/tools/prepare_skill_packet.py +44 -0
- auto_eeg_analysis-0.3.3rc1/tools/qc_amplitude.py +113 -0
- auto_eeg_analysis-0.3.3rc1/tools/regression_pipeline.py +187 -0
- auto_eeg_analysis-0.3.3rc1/tools/render_statistical_report.py +205 -0
- auto_eeg_analysis-0.3.3rc1/tools/replay.py +250 -0
- auto_eeg_analysis-0.3.3rc1/tools/run_continuous_plan.py +213 -0
- auto_eeg_analysis-0.3.3rc1/tools/run_erp_plan.py +312 -0
- auto_eeg_analysis-0.3.3rc1/tools/run_settings.py +58 -0
- auto_eeg_analysis-0.3.3rc1/tools/write_erp_derivatives.py +41 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# AGENT_GUIDE.md — How LLM agents should drive AEA
|
|
2
|
+
|
|
3
|
+
This file is the LLM-facing entry point. Read this *before* running any skill.
|
|
4
|
+
|
|
5
|
+
## What AEA is
|
|
6
|
+
|
|
7
|
+
AEA is an open library of EEG analysis skills for MNE-Python, with executable specifications and a numerically certified core. The agent reads each `SKILL.md` and generates analysis code in the user's environment. The repository also includes utility tools, EEGLAB / FieldTrip backend templates, worked examples, and tests. [Certification coverage](docs/CERTIFICATION_LEVELS.md) links the retained comparison records. You orchestrate; MNE-Python is the primary computation backend. Every step writes artifacts to disk so the pipeline survives compaction, crashes, and sleep.
|
|
8
|
+
|
|
9
|
+
## Load the procedure before implementing it
|
|
10
|
+
|
|
11
|
+
The resource index and skill descriptions route you to procedures; they do not
|
|
12
|
+
contain the procedures themselves. Before writing EEG analysis code:
|
|
13
|
+
|
|
14
|
+
1. Select relevant skills from [RESOURCE_INDEX.md](RESOURCE_INDEX.md) using the supplied research task.
|
|
15
|
+
2. Open their `SKILL.md` files for required inputs, essential rules and section
|
|
16
|
+
routing. Read the matching sections in `references/procedure.md` for code
|
|
17
|
+
and numerical conventions; consult `references/background.md` when the
|
|
18
|
+
method needs explanation. For a recipe, also open its referenced skill
|
|
19
|
+
procedures. If tool output is truncated, read the remaining relevant
|
|
20
|
+
sections in separate chunks; a printed file prefix is not the whole skill.
|
|
21
|
+
3. Record the files and sections used with the generated analysis, including
|
|
22
|
+
where the explicit task overrides an example or default. Do not claim a
|
|
23
|
+
procedure or independent check was applied merely because it was listed.
|
|
24
|
+
|
|
25
|
+
For a bounded calculation, apply the relevant procedure to the supplied inputs;
|
|
26
|
+
do not invent completed upstream stages or researcher approvals to satisfy an
|
|
27
|
+
example directory layout. Scientific choices still follow the approved plan.
|
|
28
|
+
|
|
29
|
+
For an explicit approved ERP plan, `tools/prepare_erp_packet.py` selects the
|
|
30
|
+
matching execution section and callable helpers, adding group statistics only
|
|
31
|
+
for group requests. See [approved ERP execution](docs/APPROVED_ERP.md).
|
|
32
|
+
For its four explicit ERP CORE mean-amplitude contrasts, run the saved
|
|
33
|
+
`tools/run_erp_plan.py` entry with the actual plan, input and workspace paths.
|
|
34
|
+
It checkpoints participants, runs the requested tests and checks the saved
|
|
35
|
+
delivery before writing `FINAL_SUBMISSION.md`. Read that actual file for the
|
|
36
|
+
final response. Inspect the recorded PID and state after a timeout before
|
|
37
|
+
resuming a stopped execution. Other ERP tasks retain their matching procedures.
|
|
38
|
+
Complete readable metadata checks and fix programming errors within the already
|
|
39
|
+
approved steps. Missing variable names or normal integer-sample epoch rounding
|
|
40
|
+
do not require renewed scientific approval. Save actual computed artifacts before
|
|
41
|
+
additional diagnostics; do not treat a check not yet run as a reason to stop the
|
|
42
|
+
whole task. A genuinely missing input or unresolved scientific choice still
|
|
43
|
+
blocks the affected step and must be recorded while independent work continues.
|
|
44
|
+
|
|
45
|
+
For a client without native skill loading, the runner can use
|
|
46
|
+
`tools/load_skill.py` to select a skill section and its relevant references,
|
|
47
|
+
then include that complete procedure in the initial model message. This avoids
|
|
48
|
+
losing it to tool-output truncation. Record the source paths and check the
|
|
49
|
+
complete packet in the provider-format request. Keep that check separate from
|
|
50
|
+
evidence that generated code followed the procedure. Changing from autonomous
|
|
51
|
+
discovery to preloaded procedures is a distinct execution condition and must be
|
|
52
|
+
recorded as such in an evaluation.
|
|
53
|
+
|
|
54
|
+
The section loader follows the entrypoint's explicit reference links and returns
|
|
55
|
+
the requested section with its actual source path. Omitting `--section` returns
|
|
56
|
+
only the compact entrypoint, not all its supporting procedures.
|
|
57
|
+
|
|
58
|
+
For an approved MNE continuous GFP, Welch/band-power or Hilbert plan, use
|
|
59
|
+
`tools/run_continuous_plan.py` with the resolved public plan. It executes the
|
|
60
|
+
ordered operations, records actual input/output dimensions, writes the complete
|
|
61
|
+
result and final JSON, and checks the source data. See the
|
|
62
|
+
[complete continuous route](docs/PRELOADED_SKILLS.md#execute-and-check-a-complete-continuous-plan).
|
|
63
|
+
Keep processing extent separate from the saved interval. The task determines
|
|
64
|
+
the operation order and power definition; this runner adds no study defaults.
|
|
65
|
+
|
|
66
|
+
For a selected set of procedures and callable templates, use
|
|
67
|
+
`tools/prepare_skill_packet.py`; see [preloaded procedure setup](docs/PRELOADED_SKILLS.md).
|
|
68
|
+
The public artifact self-check checks structure and internal consistency, and
|
|
69
|
+
can recompute selected operations from the unchanged input when their explicit
|
|
70
|
+
public settings are supplied. Its `coverage` records what actually ran. Keep
|
|
71
|
+
that record separate from packet delivery and independent numerical verification.
|
|
72
|
+
|
|
73
|
+
## Project layout you will encounter
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
projects/<study-name>/
|
|
77
|
+
├── DATASET_BRIEF.md # filled by user — paradigm, subjects, channels, conditions
|
|
78
|
+
├── ANALYSIS_PLAN.md # claim-driven plan (you may help draft, user must approve)
|
|
79
|
+
├── ENVIRONMENT.json # produced by tools/env/check_env.{sh,ps1}
|
|
80
|
+
├── raw/ # original .bdf/.set/.edf/.fif (read-only)
|
|
81
|
+
├── bids/ # BIDS-converted (eeg-bids output)
|
|
82
|
+
├── preprocess-stage/ # filtered, re-referenced, bad-chan-marked .fif
|
|
83
|
+
├── ica-stage/ # .ica, ICLabel decisions, before/after PSD
|
|
84
|
+
├── epoch-stage/ # epoched .fif + AutoReject decisions
|
|
85
|
+
├── erp-stage/ # evoked .fif per condition + GFP
|
|
86
|
+
├── tfr-stage/ # tfr_morlet.h5
|
|
87
|
+
├── stats-stage/ # cluster_perm.json, results.csv
|
|
88
|
+
├── figure-stage/ # *.svg / *.png (paper-ready)
|
|
89
|
+
├── report-stage/ # REPORT.md + report.html (mne.Report)
|
|
90
|
+
├── audit-stage/ # AUDIT.md (cross-model verdict)
|
|
91
|
+
└── FINDINGS.md # accumulated key results across stages
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## The 6 rules
|
|
95
|
+
|
|
96
|
+
### 1. Auto-brief first, ask second
|
|
97
|
+
|
|
98
|
+
When the user points you at a `raw/` directory without a `DATASET_BRIEF.md`, run `python tools/auto_brief.py` to extract what the file headers tell you (channels, sampling rate, events, format, system). Then ask the user **only** about what you couldn't infer — paradigm, condition→marker mapping, epoch window, hypothesis. Do NOT dump a 9-section template and say "please fill this in". Conversational, targeted questions only.
|
|
99
|
+
|
|
100
|
+
### 2. Read environment before claiming a backend works
|
|
101
|
+
|
|
102
|
+
Always read `ENVIRONMENT.json` before invoking a FreeSurfer-dependent path. If a required package is missing:
|
|
103
|
+
- **Degrade explicitly**: log the issue to the stage's `*.json`, and surface it in the eventual `AUDIT.md`.
|
|
104
|
+
- **Never silently skip**: the user must see what is missing and how it affects the analysis.
|
|
105
|
+
|
|
106
|
+
### 3. Use an approved plan for the current task
|
|
107
|
+
|
|
108
|
+
A full study keeps its frozen `ANALYSIS_PLAN.md`: condition contrast, channels/ROI,
|
|
109
|
+
time window, frequency band and statistical test, with planned direction when
|
|
110
|
+
the study has one. A bounded request with already resolved scientific choices
|
|
111
|
+
can supply that plan directly or as approved JSON; save it with the outputs.
|
|
112
|
+
Do not invent epochs, contrasts, hypotheses or new approvals for a single
|
|
113
|
+
calculation. Missing consequential choices still follow the researcher-decision
|
|
114
|
+
policy. Contradictory results remain negative findings; do not retroactively
|
|
115
|
+
edit the plan to make the result fit.
|
|
116
|
+
|
|
117
|
+
Recipe defaults are proposals until approved for this study. In an explicitly
|
|
118
|
+
unattended run, proceed through already approved steps; record missing scientific
|
|
119
|
+
choices as blocked work and continue independent approved units. Do not resolve
|
|
120
|
+
them by treating example values, a timeout or automatic execution as approval.
|
|
121
|
+
Keep the actual plan and skill/recipe version with the run. Saved ICA exclusions
|
|
122
|
+
refer to their saved decomposition, not to the same component indices in a new fit.
|
|
123
|
+
|
|
124
|
+
### 4. Artifact-first, in-memory-second
|
|
125
|
+
|
|
126
|
+
Every stage writes to disk before returning. If the agent crashes mid-pipeline, the next invocation re-reads the most recent stage output and continues. Re-runs retain the approved configuration and their comparison records; seeds alone do not guarantee identical ICA fits across numerical environments.
|
|
127
|
+
|
|
128
|
+
Save the actual executed program and arguments as described in [Replay](docs/REPLAY.md).
|
|
129
|
+
After a tool or terminal timeout, inspect the recorded PID, current process state,
|
|
130
|
+
log and saved artifacts before any retry. A timeout is not proof that a worker
|
|
131
|
+
stopped, and a missing variable is not proof that the whole session was lost.
|
|
132
|
+
The saved-script runner offers `tools/replay.py status --out RUN_DIRECTORY`;
|
|
133
|
+
it does not authorize a retry or certify scientific completion. Preserve failed
|
|
134
|
+
directories and use a new output directory for a revised execution.
|
|
135
|
+
|
|
136
|
+
### 5. The audit step is non-optional
|
|
137
|
+
|
|
138
|
+
`eeg-audit` uses the approved configured reviewer with the plan, stats and figures.
|
|
139
|
+
Read [project run settings](docs/RUN_SETTINGS.md) for the connection/model and
|
|
140
|
+
[reviewer setup](docs/GETTING_STARTED.md#configure-the-reviewer) for supported
|
|
141
|
+
connections. Record actual access, execution and verdict; do not silently switch
|
|
142
|
+
models or treat an unavailable reviewer as passing. The complete-study audit
|
|
143
|
+
requirement remains; the loader itself performs no review.
|
|
144
|
+
|
|
145
|
+
Use direct checks for objective numerical, contract and artifact agreement. The
|
|
146
|
+
model review complements those checks and does not replace independent
|
|
147
|
+
recomputation or certify arbitrary report prose.
|
|
148
|
+
|
|
149
|
+
### 6. GUI tools are not driven, only consumed
|
|
150
|
+
|
|
151
|
+
If the user mentions Brainstorm / BrainVision Analyzer / Curry / Neuroscan, ask them to export to `.set` (EEGLAB), `.fif` (MNE), or `.bdf/.edf` (raw). Do not attempt to script GUI applications.
|
|
152
|
+
|
|
153
|
+
## Skill invocation order (typical)
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
/eeg-bids → raw/ → bids/
|
|
157
|
+
/eeg-preprocess → bids/ → preprocess-stage/
|
|
158
|
+
/eeg-ica → preprocess-stage/ → ica-stage/
|
|
159
|
+
/eeg-epoch → ica-stage/ → epoch-stage/
|
|
160
|
+
/eeg-erp /eeg-tfr /eeg-connectivity /eeg-microstate /eeg-source → epoch-stage/ → <stage>-stage/
|
|
161
|
+
/eeg-stats → <stage>-stage/ → stats-stage/
|
|
162
|
+
/eeg-figure → stats-stage/ + erp-stage/ + … → figure-stage/
|
|
163
|
+
/eeg-report → all stages → report-stage/
|
|
164
|
+
/eeg-audit → all stages → audit-stage/
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
`/eeg-pipeline` chains these and handles gates between stages.
|
|
168
|
+
|
|
169
|
+
## Backend defaults
|
|
170
|
+
|
|
171
|
+
| Skill | Default | When to override |
|
|
172
|
+
|---|---|---|
|
|
173
|
+
| eeg-preprocess | `mne` | `--prefer eeglab` / `--prefer fieldtrip` — both validated on all 5 certified components |
|
|
174
|
+
| eeg-ica | `mne` (mne-icalabel) | EEGLAB ICLabel exists but agreement with mne-icalabel is **unmeasured** |
|
|
175
|
+
| eeg-stats | `mne` | FieldTrip cluster partitions and observed t-maps have been compared for N400, P3b, N170, and ERN at the tested configurations; see [certification coverage](docs/CERTIFICATION_LEVELS.md) |
|
|
176
|
+
| eeg-microstate | `pycrostates` | — |
|
|
177
|
+
| eeg-source | `mne` + FreeSurfer | Brainstorm exports can be consumed via `scipy.io.loadmat` |
|
|
178
|
+
|
|
179
|
+
**MNE-Python is the default and the reference backend.** EEGLAB and FieldTrip provide independent
|
|
180
|
+
validation and are *selectable alternatives* for ERP preprocessing, validated
|
|
181
|
+
against the reference on all five certified ERP CORE components
|
|
182
|
+
([CROSS_TOOLBOX_EVAL.md](https://github.com/dengzhe-hou/auto-eeg-analysis/blob/995f53d42cc74205b164e8711d4b289b8c2ad3a1/tools/benchmark/CROSS_TOOLBOX_EVAL.md): 10/10 runs reproduce the group
|
|
183
|
+
conclusion).
|
|
184
|
+
|
|
185
|
+
Never pick one by hand. Run `tools/env/resolve_backend.py`, which writes `BACKEND_RESOLUTION.md`,
|
|
186
|
+
fails loudly when nothing is available, refuses to switch silently away from a certified reference,
|
|
187
|
+
and refuses to claim equivalence that was never measured. When it resolves to a non-MNE backend,
|
|
188
|
+
emit `templates/backends/erp_preprocess_{eeglab,fieldtrip}.m` rather than ad-hoc code: cross-toolbox
|
|
189
|
+
agreement is a property of how completely the specification is pinned, not of the toolbox.
|
|
190
|
+
|
|
191
|
+
## Things to never do
|
|
192
|
+
|
|
193
|
+
- Run analyses on data without `ENVIRONMENT.json` checked first.
|
|
194
|
+
- Edit `ANALYSIS_PLAN.md` after a stage has run (creates retro-fit bias).
|
|
195
|
+
- Skip `eeg-audit` because results "look reasonable".
|
|
196
|
+
- Drive GUI applications via accessibility / AppleScript / keyboard automation.
|
|
197
|
+
- Use a backend that the env probe didn't confirm — degrade explicitly instead.
|
|
198
|
+
- Switch backends without re-running `resolve_backend.py` and updating `BACKEND_RESOLUTION.md`.
|
|
199
|
+
- Write EEGLAB/FieldTrip code that leaves the filter cutoff convention, transition width, or
|
|
200
|
+
rejection criterion to the toolbox default. Unstated is not neutral — it is silent, and it moved
|
|
201
|
+
per-subject amplitudes by up to 43% of the group effect in AEA's own measurements.
|
|
202
|
+
- Describe two backends' outputs as equivalent when `backends.json` records the agreement as
|
|
203
|
+
unmeasured.
|
|
204
|
+
- Use a different random seed across stages without recording it (cluster perm is RNG-sensitive).
|
|
205
|
+
- Report a p-value without recording the number of permutations and the cluster-forming threshold.
|
|
206
|
+
|
|
207
|
+
## When in doubt
|
|
208
|
+
|
|
209
|
+
Read the relevant `skills/eeg-*/SKILL.md`. If still unclear, ask the user — do not improvise on EEG-specific decisions (filter cutoff, reference scheme, ICA component count, etc.). These are paradigm-dependent and the user knows their data.
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Versions and changes
|
|
2
|
+
|
|
3
|
+
## Choose a version
|
|
4
|
+
|
|
5
|
+
The website and setup commands describe **`main`**, which includes fixes and examples
|
|
6
|
+
added after the latest tagged release, **v0.3.2**. The tag is a fixed historical
|
|
7
|
+
snapshot; it does not receive later fixes.
|
|
8
|
+
|
|
9
|
+
- **Use `main`** for the current instructions, saved-analysis replay helpers and
|
|
10
|
+
complete N400 tutorial. Record the commit used for each study.
|
|
11
|
+
- **Use `v0.3.2`** when reproducing that release's specifications. Keep its original
|
|
12
|
+
configuration and study environment; the current tutorial scripts are not in it.
|
|
13
|
+
The [coverage record](docs/CERTIFICATION_LEVELS.md) identifies certified outputs
|
|
14
|
+
and configurations. A newer checkout does not certify every generated analysis.
|
|
15
|
+
|
|
16
|
+
For a separate checkout of the fixed release:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
git clone --branch v0.3.2 --depth 1 https://github.com/dengzhe-hou/auto-eeg-analysis.git aea-v0.3.2
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Follow the setup guide **inside that checkout**. Do not mix instructions from `main`
|
|
23
|
+
with missing helpers in the older release.
|
|
24
|
+
|
|
25
|
+
## Changes on main since v0.3.2
|
|
26
|
+
|
|
27
|
+
These changes have not been assigned a new library release tag. EEGLAB plugin
|
|
28
|
+
previews use separate tags.
|
|
29
|
+
|
|
30
|
+
- Added Simplified Chinese and Japanese READMEs and homepages, with language
|
|
31
|
+
links, localized navigation and copy feedback. Detailed technical guides,
|
|
32
|
+
skill/recipe source and EEGLAB menus remain primarily in English.
|
|
33
|
+
|
|
34
|
+
- Released EEGLAB plugin preview 0.1.3 with a selectable native
|
|
35
|
+
MATLAB route: EEGLAB preparation/readback, Codex/Claude terminal launch and
|
|
36
|
+
explicit epoched ERP means with figures, HTML report and fresh-process replay.
|
|
37
|
+
This route does not require Python/MNE; the existing MNE route remains available.
|
|
38
|
+
Native runtime and desktop checks passed on the fixed Windows synthetic case.
|
|
39
|
+
Real Claude Code generated and executed a study-local MATLAB entry point;
|
|
40
|
+
independent first-delivery checks and fresh-process replay passed. It also
|
|
41
|
+
read documented reference values, so this is functional known-answer evidence,
|
|
42
|
+
not blind evaluation. All skills are not translated to MATLAB.
|
|
43
|
+
See the [plugin preview](https://github.com/dengzhe-hou/auto-eeg-analysis/releases/tag/eeglab-v0.1.3-preview).
|
|
44
|
+
AEA 0.1.3 was approved by the EEGLAB team and listed in the
|
|
45
|
+
[official extension catalogue](https://sccn.ucsd.edu/eeglab/plugin_uploader/plugin_list_all.php)
|
|
46
|
+
on 2026-10-29. Install it through **File > Manage EEGLAB extensions**,
|
|
47
|
+
then configure the separate AEA checkout and coding client. The library
|
|
48
|
+
release remains v0.3.2.
|
|
49
|
+
|
|
50
|
+
- Added a preview EEGLAB extension with a Tools menu, dataset/event/history
|
|
51
|
+
export, study preparation, interactive Codex/Claude handoff and a report entry.
|
|
52
|
+
Automated checks exercise real EEGLAB/Octave exports and MNE import. MATLAB
|
|
53
|
+
desktop synthetic workflows with real Codex and Claude clients have passed
|
|
54
|
+
independent result checks and replay on Windows. Catalogue registration was
|
|
55
|
+
pending for 0.1.2; approval for 0.1.3 is recorded above. Plugin preview 0.1.2 packages the tested export-menu
|
|
56
|
+
fix. Its companion Python bridge and Windows startup fix come from the updated
|
|
57
|
+
AEA checkout. The library release version remains v0.3.2.
|
|
58
|
+
- Reorganized all 22 skills into compact entrypoints with detailed procedures
|
|
59
|
+
and method background loaded from linked reference files. Added section loading
|
|
60
|
+
with source receipts, a channel-identity check before average referencing,
|
|
61
|
+
a memory-bounded SampEn helper and a bounded structured ERP report checker.
|
|
62
|
+
Checks have stated scopes; they do not certify arbitrary generated workflows.
|
|
63
|
+
- Spectral templates now require the task's or approved plan's scientific
|
|
64
|
+
settings, including Welch segment/taper/overlap/FFT/DC choices, requested band
|
|
65
|
+
definitions and aggregation, and the selected alpha estimator. Example values
|
|
66
|
+
are labelled; short epochs and missing dependencies no longer silently change
|
|
67
|
+
the approved estimator or segment duration. Existing saved runs are unchanged.
|
|
68
|
+
- Redesigned the homepage and README around the library, quickstart and worked
|
|
69
|
+
examples; retained the validation coverage and original evidence links.
|
|
70
|
+
- Corrected time-frequency baseline units, Morlet
|
|
71
|
+
padding and the explicit `zero_mean` setting; separated constant segments,
|
|
72
|
+
low-amplitude warnings and rapid-change diagnostics in QC. These changes can affect newly
|
|
73
|
+
generated scripts and results. See [TFR](skills/eeg-tfr/SKILL.md) and
|
|
74
|
+
[QC](skills/eeg-qc/SKILL.md) for the current conventions.
|
|
75
|
+
- Corrected N100 trial pairing and Flankers inference,
|
|
76
|
+
including restricted permutations. Original and corrected results, assumptions
|
|
77
|
+
and source snapshots remain linked from [Worked examples](docs/EXAMPLES.md).
|
|
78
|
+
- Added saved-code/environment capture and replay, a tested
|
|
79
|
+
Linux package snapshot, and expanded numerical/API checks. See
|
|
80
|
+
[Replay](docs/REPLAY.md) and [Platform support](docs/PLATFORM_SUPPORT.md).
|
|
81
|
+
- Added the complete fixed-cohort N400 recipe runner, saved numerical
|
|
82
|
+
results and compact arrays for figure reproduction without raw EEG. The runner
|
|
83
|
+
reads the official OSF `ses-N400` layout and existing sessionless caches directly.
|
|
84
|
+
Full runs check figure fonts before reading EEG or creating outputs; statistical
|
|
85
|
+
replay does not require fonts. Setup distinguishes this fixed tutorial from the
|
|
86
|
+
agent workflow and includes a copy-ready N400 dataset brief. Full runs also
|
|
87
|
+
check all 20 participants' required input files before reading EEG or creating
|
|
88
|
+
outputs, print stage progress, and document failure retries and completion checks.
|
|
89
|
+
- Corrected ICLabel probability shapes and class-name
|
|
90
|
+
examples. Full seven-class probabilities require `iclabel_label_components`;
|
|
91
|
+
the existing component-rejection logic was unchanged.
|
|
92
|
+
- Focused the default tree on the library, added a workflow
|
|
93
|
+
diagram and N400 figure, and clarified data preparation, study adaptation and help.
|
|
94
|
+
Historical research materials remain accessible through existing source snapshots.
|
|
95
|
+
|
|
96
|
+
The [commit comparison](https://github.com/dengzhe-hou/auto-eeg-analysis/compare/v0.3.2...main)
|
|
97
|
+
contains the complete changes.
|
|
98
|
+
|
|
99
|
+
## Update an existing checkout
|
|
100
|
+
|
|
101
|
+
Save your local edits first. From a checkout on `main`:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
git pull --ff-only
|
|
105
|
+
python tools/install_skills.py --agent codex
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Use `--agent claude` for Claude Code, then restart the client. Existing linked skills
|
|
109
|
+
track file changes automatically; rerunning the installer also discovers new skills.
|
|
110
|
+
The general `environment.yml` is unchanged from v0.3.2. If a later update changes it,
|
|
111
|
+
follow its setup instructions in a separate environment before starting a new study.
|
|
112
|
+
|
|
113
|
+
An update changes the instructions the agent reads. It does not rewrite a saved
|
|
114
|
+
program or reproduce previous results automatically. Keep completed studies' code,
|
|
115
|
+
plans and captured environments unchanged; use [replay](docs/REPLAY.md) to rerun them.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "Automated EEG Analysis (AEA)"
|
|
3
|
+
message: "If you use this software in your research, please cite it as below. If you used a specific recipe, also cite the source paper declared in that recipe's citation.bib."
|
|
4
|
+
type: software
|
|
5
|
+
authors:
|
|
6
|
+
- family-names: Hou
|
|
7
|
+
given-names: Dengzhe
|
|
8
|
+
affiliation: Tohoku University
|
|
9
|
+
repository-code: "https://github.com/dengzhe-hou/auto-eeg-analysis"
|
|
10
|
+
abstract: >
|
|
11
|
+
AEA is an open library of EEG analysis skills for MNE-Python, with executable
|
|
12
|
+
specifications and a numerically certified core. It provides shareable
|
|
13
|
+
paradigm-specific recipes, automatic COBIDAS-MEEG methods-text generation,
|
|
14
|
+
and a pre-submission reviewer-anticipation audit. EEGLAB and FieldTrip provide
|
|
15
|
+
independent validation and selected alternative backend paths.
|
|
16
|
+
keywords:
|
|
17
|
+
- EEG
|
|
18
|
+
- electroencephalography
|
|
19
|
+
- reproducibility
|
|
20
|
+
- LLM agent
|
|
21
|
+
- Claude Code
|
|
22
|
+
- automated analysis
|
|
23
|
+
- MNE-Python
|
|
24
|
+
- EEGLAB
|
|
25
|
+
- FieldTrip
|
|
26
|
+
license: MIT
|
|
27
|
+
version: 0.3.2
|
|
28
|
+
date-released: 2026-10-03
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Contributing to AEA
|
|
2
|
+
|
|
3
|
+
Contributions can add an analysis recipe, improve a skill, fix code and documentation, share a community tutorial, or report a first run on your platform. Start with [Getting started](docs/GETTING_STARTED.md) to set up the environment and load the skills. The [recipe library](recipes/README.md) lists the existing analyses; the [backend registry](tools/env/backends.json) records available backend capabilities.
|
|
4
|
+
|
|
5
|
+
## Your first pull request
|
|
6
|
+
|
|
7
|
+
1. Fork this repository, clone your fork, and create a branch for one focused change. A confusing instruction, a reproducible bug, or a missing method reference is a useful starting point.
|
|
8
|
+
2. Follow the relevant contribution section below. Keep the source references, analysis choices, and existing results visible when changing a skill or recipe.
|
|
9
|
+
3. Run the checks relevant to your change and record their outcomes. Documentation fixes can be reviewed through the diff and changed links; they do not require an EEG dataset or a model account.
|
|
10
|
+
4. Open a pull request against `main`. The pull request template asks what changed, how you checked it, and how to reproduce any analysis result. Maintainers review the method, implementation, and evidence before merging.
|
|
11
|
+
|
|
12
|
+
Use a public or synthetic example when sharing a bug report. Remove account credentials, personal information, and private participant data from logs and screenshots.
|
|
13
|
+
|
|
14
|
+
## Share a community tutorial
|
|
15
|
+
|
|
16
|
+
Official usage tutorials are maintained in English. Community tutorials can use
|
|
17
|
+
any language, including Simplified Chinese and Japanese. A written guide, video,
|
|
18
|
+
translated walkthrough, or explanation of a confusing setup step is welcome.
|
|
19
|
+
|
|
20
|
+
- Submit a link or draft through the [community tutorial form](https://github.com/dengzhe-hou/auto-eeg-analysis/issues/new?template=community-tutorial.md), or open a documentation pull request. You do not need to write code to share a guide.
|
|
21
|
+
- Include the AEA tag or commit, operating system, software and client versions, data source, steps actually tried, and expected outputs. Public or synthetic data make the example easier for others to follow.
|
|
22
|
+
- Credit the original instructions when translating or adapting them. Identify any changes to the analysis settings and explain why they were made.
|
|
23
|
+
- For a guide hosted in this repository, use `docs/community/<descriptive-name>.md`, name its language and author, and link the official English instructions it follows. An external guide can remain on its author's site; share its link and attribution for review.
|
|
24
|
+
|
|
25
|
+
Maintainers review submitted guides before adding them to the documentation.
|
|
26
|
+
Community guides should identify their author, language, tested version and
|
|
27
|
+
tested scope. A tutorial submission alone does not establish numerical
|
|
28
|
+
certification or support for an entire platform.
|
|
29
|
+
|
|
30
|
+
## Report a first run or platform check
|
|
31
|
+
|
|
32
|
+
Use the [first-run and platform feedback form](https://github.com/dengzhe-hou/auto-eeg-analysis/issues/new?template=first-run-platform-feedback.md)
|
|
33
|
+
to share what worked, failed, or was unclear. Reports from macOS users, including
|
|
34
|
+
Intel and Apple Silicon MacBooks, are welcome. You can fill in the form in any
|
|
35
|
+
language, even if you only completed part of the setup.
|
|
36
|
+
|
|
37
|
+
Record the AEA version, operating system and CPU architecture, relevant Python
|
|
38
|
+
or MATLAB/EEGLAB versions, agent client and model if used, instructions followed,
|
|
39
|
+
and the steps actually exercised. Include the outcome, any manual fixes, and
|
|
40
|
+
shareable logs, screenshots or check results. A model account is unnecessary if
|
|
41
|
+
you only tried the fixed tutorial or saved-result replay.
|
|
42
|
+
|
|
43
|
+
Distinguish environment setup, client launch, analysis completion, output checks
|
|
44
|
+
and replay in your report. Maintainers can use a reproducible, scoped report to
|
|
45
|
+
update the [platform record](docs/PLATFORM_SUPPORT.md). Successful client launch
|
|
46
|
+
only establishes that launch step; numerical checks need their actual results.
|
|
47
|
+
Keep failed or incomplete steps visible so the instructions can be improved.
|
|
48
|
+
|
|
49
|
+
## Contribute a recipe
|
|
50
|
+
|
|
51
|
+
A recipe is a reusable Markdown specification of a published EEG analysis: data requirements, parameters, claims, figures, and references.
|
|
52
|
+
|
|
53
|
+
1. Fork the repository and create a branch for your change.
|
|
54
|
+
2. Copy [recipes/_template/](recipes/_template/) to `recipes/<your-slug>/`.
|
|
55
|
+
3. Fill in `RECIPE.md` and add `citation.bib`. State the required channels, sampling rate, event mapping, trial counts or clean recording duration, preprocessing, statistics, and expected outputs.
|
|
56
|
+
4. Run the specified analysis on at least one public dataset. Record where to obtain the data, the exact configuration and command, results, and any deviations from the recipe. Place access instructions in `validation/README.md` if needed; do not commit raw participant data.
|
|
57
|
+
5. Add a regression check under `recipes/<your-slug>/tests/` for the key numerical result. The [ERN test](recipes/ern-flankers/tests/test_ern_flankers.py) demonstrates dataset discovery and bounded numerical assertions. Choose tolerances appropriate to your analysis and record their basis.
|
|
58
|
+
6. Run the checks below and open a pull request titled `recipe: <slug>: <short description>`.
|
|
59
|
+
|
|
60
|
+
Use the recipe template's status vocabulary: `experimental`, `validated`, or `canonical`. Document which dataset and configuration support the status, including unsupported claims or contrasts that have not been tested. Validation of one contrast does not establish every other contrast in the recipe. Keep existing results and limitations visible when adding new evidence.
|
|
61
|
+
|
|
62
|
+
The [eeg-recipe skill](skills/eeg-recipe/SKILL.md) describes the execution sequence and expected project outputs. In the pull request, include the source citation, data access instructions, changed parameters, validation results, and test summary so someone else can repeat the run.
|
|
63
|
+
|
|
64
|
+
## Contribute a skill
|
|
65
|
+
|
|
66
|
+
Skills in `skills/eeg-*/SKILL.md` teach the coding assistant how to perform individual analysis stages. You can add a method, clarify parameters, improve data handling, or fix a supported platform path.
|
|
67
|
+
|
|
68
|
+
- Keep `SKILL.md` as a compact entrypoint: frontmatter, scope, required inputs, essential rules and links to the relevant procedures. Put detailed templates, constants, phases, outputs and failure modes in `references/procedure.md`; put conditional method explanations in `references/background.md`. Link supporting files from the entrypoint so an agent can discover them without loading every reference. [eeg-erp](skills/eeg-erp/SKILL.md) is an example of a computational stage; [eeg-recipe](skills/eeg-recipe/SKILL.md) composes stages.
|
|
69
|
+
- Keep methodology and analysis contracts in Markdown. A helper specific to one skill can live in its `scripts/` directory; shared tools belong in `tools/`, recipe checks in `recipes/<slug>/tests/`, and backend code templates in [templates/backends/](templates/backends/). Test the executable procedure or helper, rather than matching its wording.
|
|
70
|
+
- Verify selected sections with `python tools/load_skill.py eeg-spectral --section "Phase B — PSD computation"` (substitute the changed skill/section). Check that the packet contains the procedure and names its actual reference file. Loading an entrypoint alone does not demonstrate that the computation template was delivered or followed.
|
|
71
|
+
- Add required Python dependencies to [environment.yml](environment.yml). State optional dependencies and how to detect their absence.
|
|
72
|
+
- For backend changes, update [backends.json](tools/env/backends.json) and the relevant probes in [check_env.sh](tools/env/check_env.sh) and [check_env.ps1](tools/env/check_env.ps1). Keep the capability description aligned with the paths you actually exercised.
|
|
73
|
+
- Test the affected path on public or synthetic data that exercises the change. Record the environment and meaningful numerical expectations when the change affects analysis results.
|
|
74
|
+
|
|
75
|
+
MNE is the primary execution backend. Existing EEGLAB and FieldTrip paths have specific capabilities, templates, and comparison results; a contribution should state which stage and configuration it implements. See [platform support](docs/PLATFORM_SUPPORT.md) and the [backend templates](templates/backends/README.md).
|
|
76
|
+
|
|
77
|
+
## Contribute a tool, document, or fix
|
|
78
|
+
|
|
79
|
+
For usage questions, check [troubleshooting](docs/GETTING_STARTED.md#troubleshooting), then
|
|
80
|
+
open a [GitHub issue](https://github.com/dengzhe-hou/auto-eeg-analysis/issues/new/choose).
|
|
81
|
+
Issues are the public support channel for project questions and reproducible bug reports.
|
|
82
|
+
|
|
83
|
+
Bug reports are most useful with the command or prompt, traceback, affected skill or recipe, environment details, and a small public or synthetic example. For documentation fixes, link the relevant instructions and explain the step that was confusing or incorrect.
|
|
84
|
+
|
|
85
|
+
Useful starting points include [tools/env/](tools/env/), [tools/auto_brief.py](tools/auto_brief.py), the [project templates](templates/), and [docs/](docs/). Existing computational skills include decoding, spectral analysis, behavior, connectivity, microstates, source analysis, and BIDS support; check them before proposing a duplicate skill.
|
|
86
|
+
|
|
87
|
+
## Run the checks
|
|
88
|
+
|
|
89
|
+
Choose checks that exercise the changed behavior. For code, skills, recipes, or plugin changes, run the relevant tests and record the actual environment. From the repository root, the full suite uses the `aeais` environment described in [Getting started](docs/GETTING_STARTED.md):
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
conda run -n aeais python -m pytest tools/tests/ recipes/
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For a recipe with its own test directory, you can first run the focused check:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
conda run -n aeais python -m pytest recipes/<your-slug>/tests/ -v
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The suite includes infrastructure checks, recorded-result checks, and tests that execute an analysis when its dataset is available. Read the pass and skip counts together:
|
|
102
|
+
|
|
103
|
+
- The MNE sample-data regression tests skip if the sample dataset is absent. Reuse an existing MNE data cache when possible. Setting `AEA_FETCH_DATA=1` explicitly opts into fetching that dataset for the tests.
|
|
104
|
+
- The ERN recipe test looks for a local ERP CORE Flankers file. Set `AEA_ERP_CORE_FLANKERS` to its path, or use the location documented in [the test](recipes/ern-flankers/tests/test_ern_flankers.py). It skips with setup instructions if the data are missing.
|
|
105
|
+
- A skipped data-dependent test is not evidence that the analysis passed. Report required datasets and skips in the pull request. Do not turn computation failures into skips.
|
|
106
|
+
|
|
107
|
+
[GitHub Actions](.github/workflows/ci.yml) runs the same suite on Ubuntu for pull requests and pushes to `main`. Passing the tests verifies the covered checks; the run record for your new analysis or backend path supplies the additional evidence specific to that contribution.
|
|
108
|
+
|
|
109
|
+
## Recognition
|
|
110
|
+
|
|
111
|
+
All contributors are listed in the repo. For the eventual AEA paper (target: Scientific Data, Article), significant contributors (major recipes, major skills, or sustained engagement) will be invited as co-authors. The bar is real contribution, not a single typo fix.
|
|
112
|
+
|
|
113
|
+
## House rules
|
|
114
|
+
|
|
115
|
+
- Keep skills and recipes readable as standalone methodology specifications, with the source references and parameters needed to reproduce a run.
|
|
116
|
+
- Record backend selection and substitutions explicitly. Stop with a useful error when a required capability is missing.
|
|
117
|
+
- Verify references against their sources. Include the dataset and configuration behind numerical claims.
|
|
118
|
+
- Preserve the analysis plan, seed settings, numerical baselines, and existing result records when changing a stage. Explain any intentional result change in the pull request.
|
|
119
|
+
|
|
120
|
+
## License
|
|
121
|
+
|
|
122
|
+
The repository is distributed under the [MIT License](LICENSE). Existing recipe frontmatter also declares `CC-BY-4.0`; preserve its license and attribution fields when editing a recipe.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Dengzhe Hou and AEA contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
Note on recipes: each recipe under recipes/<name>/RECIPE.md may carry its own
|
|
26
|
+
license declaration in the YAML frontmatter (typically CC-BY-4.0 to encourage
|
|
27
|
+
reuse). The MIT license above governs the AEA code, skills, templates, and
|
|
28
|
+
tools; recipes follow their own declared licenses.
|