7 7 **Design Spec:** [`docs/super/specs/2026-07-12-mise-task-architecture-design.md`](../specs/2026-07-12-mise-task-architecture-design.md)
9 9 **Planning Strategy:** Separate task ownership migration from browser coverage because the existing benchmark move is mechanical while each browser suite crosses distinct server, process, and interaction boundaries.
10 +Standardize TypeScript only after complete E2E coverage protects runtime behavior across Pi, Vitest, and standalone execution.
205 206 - `mise run ci` passes in the documented order locally and in GitHub Actions.
206 207 - Root and all-task listings satisfy the design acceptance criteria.
208 -**Phase boundary health:** The repository ends with one complete release gate and no partial migration or extension-specific root task leakage.
209 +**Phase boundary health:** Browser task architecture ends with one complete release gate and no partial migration or extension-specific root task leakage.
212 213 - Adding browser installation to CI increases runtime and may require Playwright’s supported Linux dependency installation path.
213 214 - Tune’s server is embedded in a large extension file, so any test seam must remain minimal and avoid refactoring unrelated behavior.
215 -**Context notes:** Treat CI promotion as the final step after all four suites are stable; do not hide flaky tests with retries beyond the existing justified policy.
216 +**Context notes:** Promote E2E into CI only after all four suites are stable; do not hide flaky tests with retries beyond the existing justified policy.
218 +##
Phase 5: Strict Source-Run TypeScript 220 +**Outcome:** Every repository TypeScript source uses one strict, no-emit project model with explicit `.ts` relative imports and consistent execution tools.
222 +**Why now:** Complete browser and unit coverage must protect runtime behavior before changing module resolution across every extension.
226 +- Keep source TypeScript as the published Pi extension format with no generated JavaScript artifacts.
227 +- Make `tsc --noEmit` the single type authority for production code, tests, scripts, and benchmarks.
228 +- Remove broad TypeScript exclusions and fix newly exposed type errors.
229 +- Standardize relative TypeScript imports on explicit `.ts` extensions.
230 +- Use `tsx` for standalone TypeScript scripts and non-Vitest benchmarks.
231 +- Keep Vitest for tests and Vitest-native benchmarks.
232 +- Keep Pi/Jiti as the extension runtime.
233 +- Remove native Node type-stripping flags and the custom `.js`-to-`.ts` loader when no callers remain.
234 +- Document the source-run toolchain and import convention.
238 +- JavaScript emission.
239 +- Bundling, tree-shaking, or generated `dist/` artifacts.
240 +- Changing Pi’s Jiti runtime.
241 +- Converting JavaScript or `.mjs` tooling to TypeScript without a separate reason.
243 +**Key files/areas likely affected:**
245 +- `tsconfig.json`: strict whole-project coverage and import policy.
246 +- `package.json` and `package-lock.json`: explicit root `tsx` development dependency and script alignment.
247 +- `extensions/**/*.ts`: explicit relative `.ts` imports and newly enforced type fixes.
248 +- `extensions/*/mise.toml`: consistent standalone benchmark execution.
249 +- `scripts/ts-js-loader.mjs`: removal after all `.js` source specifiers disappear.
250 +- `AGENTS.md`: TypeScript runtime and import conventions.
254 +- Phases 1 through 4.
255 +- Complete Chromium and Firefox E2E coverage for all HTML-serving extensions.
259 +- `mise run check` typechecks all repository TypeScript without broad source-category exclusions.
260 +- `mise run test` passes all Vitest suites.
261 +- `mise run bench` passes every benchmark sequentially without custom loader or native stripping flags.
262 +- `mise run e2e` passes every suite in Chromium and Firefox.
263 +- `mise run ci` passes with no generated JavaScript artifacts.
264 +- Repository search finds no relative `.js` or extensionless imports in TypeScript sources.
266 +**Phase boundary health:** The repository remains source-distributed and fully green while module syntax and execution become uniform.
270 +- Previously excluded tests, benchmarks, scripts, and large extension files may expose substantial latent type debt.
271 +- Jiti, Vitest, and tsx must all agree on explicit `.ts` imports.
272 +- Mechanical import changes can hide semantic edits, so migration batches need focused checks and small commits.
273 +- Dynamic imports, workers, and child-process entrypoints require runtime verification beyond typechecking.
275 +**Context notes:** Prefer deletion of compatibility loaders and flags over wrappers.
276 +Do not introduce a build step, emitted JavaScript, or bundler configuration.