docs: design mise task architecture
46852fa2df5183d72eb9865b717dd265964eaa07
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
- Parent 1: b5ba6b31b977
bugabingas pi extensions
46852fa2df5183d72eb9865b717dd265964eaa07
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
+143 / −0 text lines
new file mode 100644+143 / −0 text lines
# Mise Task Architecture Design## GoalMake the root task list describe repository-wide workflows only.Move extension-specific benchmarks and browser tests beside their owning extensions.Provide one root command for each aggregate workflow.## Principles- Root tasks own repository lifecycle and cross-extension aggregation.- Extension tasks own extension-specific execution details.- Vitest remains centralized because one configuration already discovers the complete unit and integration suite efficiently.- Browser E2E tests cover every extension that serves interactive HTML.- Benchmarks remain opt-in and never gate CI.- CI has one explicit, reproducible order.## Mise MonorepoThe root `mise.toml` enables mise monorepo mode.Its explicit config roots cover `extensions/*`.Extension tasks are addressable from the root through mise's `//extensions/<name>:<task>` syntax.The root continues to own shared tool versions.Extension configs inherit those tools and add no duplicate versions unless an extension genuinely needs an override.## Root TasksThe root task surface is:- `default`: list root tasks.- `install`: install repository dependencies.- `lock`: regenerate the npm lockfile.- `fmt`: format the repository.- `lint`: verify formatting, lint, and skill structure.- `test`: run the centralized Vitest unit and integration suite.- `e2e`: install required browsers once and aggregate extension E2E tasks.- `bench`: aggregate extension benchmarks sequentially.- `check`: run static extension and packaging checks.- `ci`: run `lint`, `test`, `e2e`, then `check`.- Existing repository-wide extension listing, changelog, README, demo, release, publish, clean, and Git-hook tasks remain at root.The following extension-specific root tasks are removed:- `bench-q`.- `e2e-diff-review`.- `install-e2e-browsers` as a public extension-specific task.- `goal-expect`.## Unit And Integration Tests`mise run test` continues to invoke the root Vitest configuration.Vitest discovers `extensions/**/__tests__/**/*.test.ts` and skill tests.It excludes `__e2e__` suites.Its existing fast and web projects retain their isolation and worker behavior.Extensions do not receive local `test` tasks by default.A local `test` task is justified only when an extension later requires infrastructure that the shared Vitest configuration cannot provide.## Browser E2E TestsFour extensions currently serve interactive HTML and require Playwright smoke coverage:- `diff-review`.- `ui`.- `the-system`, for the mockup browser.- `tune`, for its browser interface.Each extension owns:- Its Playwright configuration.- Its E2E specs.- A local `e2e` mise task.Every suite runs against Chromium and Firefox.The root `e2e` workflow installs both browsers once, then dispatches all extension-local `e2e` tasks.A failing browser or extension suite fails the aggregate task and CI.The tests are smoke tests across the actual browser boundary.They verify page startup, essential rendering, one primary interaction, and browser-to-server communication where applicable.Detailed logic remains in Vitest.Extensions that only parse or transform HTML, such as `web`, do not need browser E2E tests.## BenchmarksSix extensions currently contain benchmarks:- `goal`.- `llmiterate`.- `prompt-autopsy`.- `q`.- `terse`.- `web`.Each receives a local `bench` mise task that runs every benchmark owned by that extension.Existing benchmark sources remain intact.The root `bench` task dispatches all local benchmark tasks sequentially to reduce measurement interference.Benchmarks remain manual and excluded from `ci`.A developer can run one benchmark group from the repository root with `mise //extensions/<name>:bench`.A developer can run all benchmark groups with `mise run bench`.## Goal Expect Smoke ScriptThe `goal-expect` workflow is removed.It depends on an external model, a hard-coded provider choice, Expect, timing assumptions, and live credentials.That makes it nondeterministic and unsuitable for CI.The existing deterministic goal unit and integration tests remain the supported verification path.## CIThe release gate executes in this order:1. `lint`.2. `test`.3. `e2e`.4. `check`.Dependency installation is shared and cached through the existing `install` task.E2E browser installation happens once before extension suites run.Benchmark tasks never run in CI.The GitHub workflow continues to call only `mise run ci`.No extension names or browser commands are duplicated in GitHub Actions.## Documentation`AGENTS.md` documents the root task surface and qualified extension task syntax.Extension READMEs document their local `bench` or `e2e` task where relevant.The root task list no longer exposes extension-specific names.## Acceptance Criteria- `mise tasks ls` at the root shows only repository-wide tasks.- `mise tasks --all` shows qualified extension-local benchmark and E2E tasks.- `mise run test` runs all Vitest unit and integration tests and no Playwright tests.- `mise run e2e` runs all four HTML-serving extensions in Chromium and Firefox.- `mise run bench` runs all six extension benchmark groups sequentially.- `mise //extensions/q:bench` runs only the q benchmark group.- `mise run ci` runs lint, Vitest, all E2E suites, and static checks in the documented order.- `goal-expect` and its script are absent.- Existing unrelated dirty work remains untouched.