repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by bugabinga

docs: design mise task architecture

46852fa2df5183d72eb9865b717dd265964eaa07

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

+143 / −0 text lines

Diff layout

docs/super/specs/2026-07-12-mise-task-architecture-design.md

Added
new file mode 100644

+143 / −0 text lines

1# Mise Task Architecture Design
2
3## Goal
4
5Make the root task list describe repository-wide workflows only.
6Move extension-specific benchmarks and browser tests beside their owning extensions.
7Provide one root command for each aggregate workflow.
8
9## Principles
11- Root tasks own repository lifecycle and cross-extension aggregation.
12- Extension tasks own extension-specific execution details.
13- Vitest remains centralized because one configuration already discovers the complete unit and integration suite efficiently.
14- Browser E2E tests cover every extension that serves interactive HTML.
15- Benchmarks remain opt-in and never gate CI.
16- CI has one explicit, reproducible order.
18## Mise Monorepo
20The root `mise.toml` enables mise monorepo mode.
21Its explicit config roots cover `extensions/*`.
22Extension tasks are addressable from the root through mise's `//extensions/<name>:<task>` syntax.
24The root continues to own shared tool versions.
25Extension configs inherit those tools and add no duplicate versions unless an extension genuinely needs an override.
27## Root Tasks
29The root task surface is:
31- `default`: list root tasks.
32- `install`: install repository dependencies.
33- `lock`: regenerate the npm lockfile.
34- `fmt`: format the repository.
35- `lint`: verify formatting, lint, and skill structure.
36- `test`: run the centralized Vitest unit and integration suite.
37- `e2e`: install required browsers once and aggregate extension E2E tasks.
38- `bench`: aggregate extension benchmarks sequentially.
39- `check`: run static extension and packaging checks.
40- `ci`: run `lint`, `test`, `e2e`, then `check`.
41- Existing repository-wide extension listing, changelog, README, demo, release, publish, clean, and Git-hook tasks remain at root.
43The following extension-specific root tasks are removed:
45- `bench-q`.
46- `e2e-diff-review`.
47- `install-e2e-browsers` as a public extension-specific task.
48- `goal-expect`.
50## Unit And Integration Tests
52`mise run test` continues to invoke the root Vitest configuration.
53Vitest discovers `extensions/**/__tests__/**/*.test.ts` and skill tests.
54It excludes `__e2e__` suites.
55Its existing fast and web projects retain their isolation and worker behavior.
57Extensions do not receive local `test` tasks by default.
58A local `test` task is justified only when an extension later requires infrastructure that the shared Vitest configuration cannot provide.
60## Browser E2E Tests
62Four extensions currently serve interactive HTML and require Playwright smoke coverage:
64- `diff-review`.
65- `ui`.
66- `the-system`, for the mockup browser.
67- `tune`, for its browser interface.
69Each extension owns:
71- Its Playwright configuration.
72- Its E2E specs.
73- A local `e2e` mise task.
75Every suite runs against Chromium and Firefox.
76The root `e2e` workflow installs both browsers once, then dispatches all extension-local `e2e` tasks.
77A failing browser or extension suite fails the aggregate task and CI.
79The tests are smoke tests across the actual browser boundary.
80They verify page startup, essential rendering, one primary interaction, and browser-to-server communication where applicable.
81Detailed logic remains in Vitest.
83Extensions that only parse or transform HTML, such as `web`, do not need browser E2E tests.
85## Benchmarks
87Six extensions currently contain benchmarks:
89- `goal`.
90- `llmiterate`.
91- `prompt-autopsy`.
92- `q`.
93- `terse`.
94- `web`.
96Each receives a local `bench` mise task that runs every benchmark owned by that extension.
97Existing benchmark sources remain intact.
98The root `bench` task dispatches all local benchmark tasks sequentially to reduce measurement interference.
99Benchmarks remain manual and excluded from `ci`.
101A developer can run one benchmark group from the repository root with `mise //extensions/<name>:bench`.
102A developer can run all benchmark groups with `mise run bench`.
104## Goal Expect Smoke Script
106The `goal-expect` workflow is removed.
107It depends on an external model, a hard-coded provider choice, Expect, timing assumptions, and live credentials.
108That makes it nondeterministic and unsuitable for CI.
109The existing deterministic goal unit and integration tests remain the supported verification path.
111## CI
113The release gate executes in this order:
1151. `lint`.
1162. `test`.
1173. `e2e`.
1184. `check`.
120Dependency installation is shared and cached through the existing `install` task.
121E2E browser installation happens once before extension suites run.
122Benchmark tasks never run in CI.
124The GitHub workflow continues to call only `mise run ci`.
125No extension names or browser commands are duplicated in GitHub Actions.
127## Documentation
129`AGENTS.md` documents the root task surface and qualified extension task syntax.
130Extension READMEs document their local `bench` or `e2e` task where relevant.
131The root task list no longer exposes extension-specific names.
133## Acceptance Criteria
135- `mise tasks ls` at the root shows only repository-wide tasks.
136- `mise tasks --all` shows qualified extension-local benchmark and E2E tasks.
137- `mise run test` runs all Vitest unit and integration tests and no Playwright tests.
138- `mise run e2e` runs all four HTML-serving extensions in Chromium and Firefox.
139- `mise run bench` runs all six extension benchmark groups sequentially.
140- `mise //extensions/q:bench` runs only the q benchmark group.
141- `mise run ci` runs lint, Vitest, all E2E suites, and static checks in the documented order.
142- `goal-expect` and its script are absent.
143- Existing unrelated dirty work remains untouched.