Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .agents/skills/labkit-app-builder/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ Build the app in this order:

## Validation

Use `labkit-test-planner` to choose suites. Common checks:
Use `labkit-test-planner` to choose build tasks. Common checks:

```bash
scripts/run_matlab_tests.sh --suite project
scripts/run_matlab_tests.sh --suite apps/electrochem
scripts/run_matlab_tests.sh --suite apps/dic --gui
scripts/run_matlab_tests.sh --suite apps/image_measurement --gui
scripts/run_matlab_tests.sh --suite apps/wearable --gui
scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui
buildtool testProject
buildtool testAppsElectrochem
buildtool testAppsDicGui
buildtool testAppsImageMeasurementGui
buildtool testAppsWearableGui
buildtool testLabkitUiGui testAppsGui
```

For reusable facade changes, also use `labkit-boundary-guard`.
Expand Down
12 changes: 6 additions & 6 deletions .agents/skills/labkit-boundary-guard/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,16 @@ For UI boundary work, prefer `labkit.ui.app.createShell`, `labkit.ui.app.dispatc
Always run or recommend:

```bash
scripts/run_matlab_tests.sh --suite project
buildtool testProject
```

Add focused suites by touched boundary:
Add focused tasks by touched boundary:

```bash
scripts/run_matlab_tests.sh --suite labkit/dta --suite apps/electrochem
scripts/run_matlab_tests.sh --suite labkit/biosignal --suite apps/wearable
scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui
scripts/run_matlab_tests.sh --suite apps/electrochem
buildtool testLabkitDta testAppsElectrochem
buildtool testLabkitBiosignal testAppsWearableGui
buildtool testLabkitUiGui testAppsGui
buildtool testAppsElectrochem
```

If MATLAB is unavailable, report that clearly and do not claim tests passed.
Expand Down
24 changes: 12 additions & 12 deletions .agents/skills/labkit-test-planner/SKILL.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: labkit-test-planner
description: "Use for LabKit validation planning, running tests, pre-commit checks, MATLAB source/test/fixture changes, or deciding which suite to run. Trigger on validate, test plan, before commit, CI, GUI check, parser regression, fixture, or sample hygiene work."
description: "Use for LabKit validation planning, running tests, pre-commit checks, MATLAB source/test/fixture changes, or deciding which build task to run. Trigger on validate, test plan, before commit, CI, GUI check, parser regression, fixture, or sample hygiene work."
---

# LabKit Test Planner
Expand All @@ -16,40 +16,40 @@ Choose visible, source-aligned validation without overstating coverage.
3. `docs/testing.md`
4. touched source, tests, and fixture files

## Suite Routing
## Task Routing

Use the smallest set that covers the touched boundary:

```text
project startup, architecture, package surface, sample-data hygiene
labkit/dta DTA parser, facade, session, item, pulse behavior
labkit/biosignal biosignal import, processing, ECG peaks, segments, measurements
labkit/ui reusable UI helpers; add --gui for layout/callback/shell/debug checks
labkit/ui reusable UI helpers; use testLabkitUiGui for layout/callback/shell/debug checks
apps/electrochem electrochem app-owned calculations, exports, layout
apps/dic DIC app layout; usually --gui
apps/dic DIC app layout; usually testAppsDicGui
apps/image_measurement image measurement calculations, exports, layout
apps/wearable wearable app layout; usually --gui
apps/wearable wearable app layout; usually testAppsWearableGui
apps/smoke cross-app noninteractive launch checks
```

Pair reusable changes with downstream apps when the app-facing contract could be affected:

```bash
scripts/run_matlab_tests.sh --suite labkit/dta --suite apps/electrochem
scripts/run_matlab_tests.sh --suite labkit/biosignal --suite apps/wearable
scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui
buildtool testLabkitDta testAppsElectrochem
buildtool testLabkitBiosignal testAppsWearableGui
buildtool testLabkitUiGui testAppsGui
```

Use the default non-GUI suite for broad changes:
Use the default non-GUI build task for broad changes:

```bash
scripts/run_matlab_tests.sh
buildtool test
```

On Windows, use:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 --suite project
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 testProject
```

## GUI Claims
Expand All @@ -68,4 +68,4 @@ Report:
- automated tests run and pass/fail result
- GUI/manual validation status
- unverified behavior
- why any relevant suite was not run
- why any relevant task was not run
14 changes: 7 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,22 +78,22 @@ When using local lab files to reproduce a bug:

## Validation

Run relevant automated checks after executable MATLAB, test, fixture, package, or validation-rule changes. Use focused checks during iteration and the default non-GUI suite for broad changes.
Run relevant automated checks after executable MATLAB, test, fixture, package, or validation-rule changes. Use focused checks during iteration and the default non-GUI build task for broad changes.

Common commands:

```bash
scripts/run_matlab_tests.sh --suite project
scripts/run_matlab_tests.sh --suite labkit/dta
scripts/run_matlab_tests.sh --suite labkit/biosignal
scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui
scripts/run_matlab_tests.sh
buildtool testProject
buildtool testLabkitDta
buildtool testLabkitBiosignal
buildtool testLabkitUiGui testAppsGui
buildtool test
```

On Windows PowerShell:

```powershell
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 --suite project
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\run_matlab_tests.ps1 testProject
matlab -batch "buildtool checkProject"
matlab -batch "buildtool packageDryRun"
```
Expand Down
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Workflow-specific calculations, plot choices, summaries, and exports stay in the
| Image measurement | Interactive curve tracing, calibrated scale/length measurement, curvature/radius measurement, and microscope focus stacking |
| Wearable biosignals | ECG preview, filtering, peak detection, segments, templates, and SNR-style measurements |
| Reusable foundation | Layered MATLAB UI foundation plus DTA and biosignal facades for app-facing workflows |
| Validation | Focused MATLAB suites, architecture guardrails, synthetic fixtures, and GitHub Actions CI |
| Validation | Focused MATLAB build tasks, architecture guardrails, synthetic fixtures, and GitHub Actions CI |

## Quick Start

Expand Down Expand Up @@ -80,35 +80,35 @@ Status labels:

## Tests

Run the default non-GUI MATLAB suite:
Run the default non-GUI MATLAB build task:

```bash
scripts/run_matlab_tests.sh
buildtool test
```

On Windows PowerShell:
The local scripts are optional wrappers around build tasks:

```powershell
.\scripts\run_matlab_tests.ps1
.\scripts\run_matlab_tests.ps1 test
```

Focused checks are available during development:

```bash
buildtool checkStyle
buildtool checkProject
buildtool packageDryRun
scripts/run_matlab_tests.sh --suite labkit/dta
scripts/run_matlab_tests.sh --suite labkit/biosignal
scripts/run_matlab_tests.sh --suite apps/wearable --gui
scripts/run_matlab_tests.sh --suite labkit/ui --suite apps --gui
buildtool testLabkitDta
buildtool testLabkitBiosignal
buildtool testAppsWearableGui
buildtool testLabkitUiGui testAppsGui
```

The Windows script accepts the same `--suite`, `--test`, and `--gui` options.
`buildtool checkProject` verifies the MATLAB Project path/startup metadata, and
`buildtool packageDryRun` checks package boundaries without exporting a toolbox.
GitHub Actions runs quality, unit/coverage, and integration jobs on pushes and
pull requests to `main`; manual and scheduled runs also cover GUI structural and
non-blocking gesture jobs.
Script arguments are build task names; selector flags such as `--suite`,
`--test`, and `--gui` are not supported. GitHub Actions runs quality,
unit/coverage, and integration jobs on pushes and pull requests to `main`;
manual and scheduled runs also cover GUI structural and non-blocking gesture
jobs.

## Repository Layout

Expand Down
101 changes: 101 additions & 0 deletions buildfile.m
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@
plan("test").Description = "Run the full non-GUI test entry point.";
plan("testUnit").Description = "Run official unit tests.";
plan("testIntegration").Description = "Run official integration tests.";
plan("testProject").Description = "Run project guardrails.";
plan("testLabkitDta").Description = "Run DTA facade/parser tests.";
plan("testLabkitBiosignal").Description = "Run biosignal facade tests.";
plan("testLabkitUi").Description = "Run reusable UI non-GUI tests.";
plan("testLabkitUiGui").Description = "Run reusable UI GUI tests.";
plan("testAppsElectrochem").Description = "Run electrochem app non-GUI tests.";
plan("testAppsElectrochemGui").Description = "Run electrochem app GUI tests.";
plan("testAppsDicGui").Description = "Run DIC app GUI tests.";
plan("testAppsImageMeasurement").Description = "Run image-measurement app non-GUI tests.";
plan("testAppsImageMeasurementGui").Description = "Run image-measurement app GUI tests.";
plan("testAppsWearableGui").Description = "Run wearable app GUI tests.";
plan("testAppsGui").Description = "Run all app GUI tests.";
plan("testAppsSmokeGui").Description = "Run cross-app GUI smoke tests.";
plan("testGuiStructural").Description = "Run noninteractive GUI structural tests.";
plan("testGuiGesture").Description = "Run noninteractive/manual GUI gesture tests.";
plan("coverage").Description = "Run official tests with coverage artifacts.";
Expand Down Expand Up @@ -40,6 +53,94 @@ function testIntegrationTask(~)
"FailIfNoTests", false);
end

function testProjectTask(~)
runBuildTests("testProject", ...
"Suites", "project", ...
"FailIfNoTests", false);
end

function testLabkitDtaTask(~)
runBuildTests("testLabkitDta", ...
"Suites", "labkit/dta", ...
"FailIfNoTests", false);
end

function testLabkitBiosignalTask(~)
runBuildTests("testLabkitBiosignal", ...
"Suites", "labkit/biosignal", ...
"FailIfNoTests", false);
end

function testLabkitUiTask(~)
runBuildTests("testLabkitUi", ...
"Suites", "labkit/ui", ...
"IncludeGui", false, ...
"FailIfNoTests", false);
end

function testLabkitUiGuiTask(~)
runBuildTests("testLabkitUiGui", ...
"Suites", "labkit/ui", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsElectrochemTask(~)
runBuildTests("testAppsElectrochem", ...
"Suites", "apps/electrochem", ...
"IncludeGui", false, ...
"FailIfNoTests", false);
end

function testAppsElectrochemGuiTask(~)
runBuildTests("testAppsElectrochemGui", ...
"Suites", "apps/electrochem", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsDicGuiTask(~)
runBuildTests("testAppsDicGui", ...
"Suites", "apps/dic", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsImageMeasurementTask(~)
runBuildTests("testAppsImageMeasurement", ...
"Suites", "apps/image_measurement", ...
"IncludeGui", false, ...
"FailIfNoTests", false);
end

function testAppsImageMeasurementGuiTask(~)
runBuildTests("testAppsImageMeasurementGui", ...
"Suites", "apps/image_measurement", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsWearableGuiTask(~)
runBuildTests("testAppsWearableGui", ...
"Suites", "apps/wearable", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsGuiTask(~)
runBuildTests("testAppsGui", ...
"Suites", "apps", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testAppsSmokeGuiTask(~)
runBuildTests("testAppsSmokeGui", ...
"Suites", "apps/smoke", ...
"IncludeGui", true, ...
"FailIfNoTests", false);
end

function testGuiStructuralTask(~)
runBuildTests("testGuiStructural", ...
"Suites", "gui", ...
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These docs are written for people who run, maintain, or extend LabKit. Start wit

- `apps.md`: app ownership, current app notes, new-app checklist, and validation guidance.
- `ui.md`: shared GUI shell, tabs, panels, axes, and reusable UI helper contracts.
- `testing.md`: focused app-suite and GUI structural test commands.
- `testing.md`: focused app and GUI structural build-task commands.

## I Work On Reusable APIs

Expand All @@ -22,7 +22,7 @@ These docs are written for people who run, maintain, or extend LabKit. Start wit

## I Need Validation Guidance

- `testing.md`: default suite, focused suites, GUI versus non-GUI checks, fixture expectations, and CI scope.
- `testing.md`: default and focused build tasks, GUI versus non-GUI checks, fixture expectations, and CI scope.

## Component Reference

Expand Down
12 changes: 7 additions & 5 deletions docs/apps.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ Start from the closest existing app, reduce it to the needed workflow, and prese

## Validation

Pure app calculations, export table construction, and plotting helpers belong in the app-family suites and run in the default non-GUI workflow when they do not require graphics. Add `--gui` for noninteractive launch/layout checks:
Pure app calculations, export table construction, and plotting helpers belong
in app-family build tasks. Use the GUI tasks for noninteractive launch/layout
checks:

```bash
scripts/run_matlab_tests.sh --suite apps/electrochem --gui
scripts/run_matlab_tests.sh --suite apps/dic --gui
scripts/run_matlab_tests.sh --suite apps/image_measurement --gui
scripts/run_matlab_tests.sh --suite apps/wearable --gui
buildtool testAppsElectrochem testAppsElectrochemGui
buildtool testAppsDicGui
buildtool testAppsImageMeasurement testAppsImageMeasurementGui
buildtool testAppsWearableGui
```

Interactive file selection, drawing, visual inspection, and full workflow feel are validated manually in MATLAB app windows.
Expand Down
4 changes: 2 additions & 2 deletions docs/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ Private helpers may keep shorter comments, but should still identify expected ca

## Validation Boundary

The default automated validation boundary is the non-GUI MATLAB suite: project architecture checks, `labkit` facade/parser checks, and pure app analysis/export checks. GitHub Actions runs that suite on pushes and pull requests to `main`.
The default automated validation boundary is the non-GUI MATLAB build task: project architecture checks, `labkit` facade/parser checks, and pure app analysis/export checks. GitHub Actions runs that task on pushes and pull requests to `main`.

GUI launch/layout checks live in source-aligned suites and are enabled with `--gui`. Interactive GUI workflows are validated manually in MATLAB app windows.
GUI launch/layout checks live in source-aligned build tasks such as `testLabkitUiGui` and `testAppsGui`. Interactive GUI workflows are validated manually in MATLAB app windows.

## Current Package Surface

Expand Down
2 changes: 1 addition & 1 deletion docs/dta.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Pulse detection:

Lower-level recursive discovery, parser functions, item construction, session mutation, and pulse internals are private DTA implementation details.

The DTA facade and parser fixture checks run in the default GitHub Actions workflow as part of the non-GUI MATLAB suite.
The DTA facade and parser fixture checks run in the default GitHub Actions workflow through the non-GUI MATLAB build task.

## Parser Assumptions

Expand Down
Loading
Loading