Agentic software factory Part 4: TypeScript workspace gate: Prettier, ESLint, root validate, CI
Author: cliffhallCreated Sep 27, 2026Updated Sep 28, 2026
Labelsenhancementv2
Part of the agentic software factory tracker #4858, Wave 2. Proposed as S3 in docs/agent-guidance-inception.md (PR #4861) §9, from #4859.
Depends on
After Part 3 (#4863), whose root-guards CI job this extends and whose verify:format-coverage wiring allowance this removes. Supersedes #197.
Scope
This is the design decided in #4473.
- A root Prettier config, with
formatandformat:check.everything's per-package Prettier setup folds into it. - A root ESLint flat config:
- type-aware
--max-warnings 0@typescript-eslint/no-floating-promisesat error- build output (
dist/,coverage/) ignored
- Split fast tests from coverage. Every TS workspace's
testcurrently runsvitest run --coverage. Maketestthe fast run, and move the instrumented run to a separatecoveragescript, which #4854 then gives its per-file thresholds. - A per-workspace
validatescript in each TS server, runningformat:check→lint→build→testfor that package only. - A root
npm run validatethat aggregates them (npm run validate --workspaces), plus any root-only guards. - Adapt
verify:format-coverageandverify:typecheck-coveragefrom the Inspector, using workspace globs. Portscripts/lib/tsc-program.mjs(+ tests), whichverify-typecheck-coverageimports. Both guards also import Part 3'slib/npm-scripts.mjs. typescript.ymlkeeps its per-package matrix, and each leg runs only its own package'svalidate, not the whole monorepo.- Remove Part 3's temporary
verify:format-coveragewiring allowance. - Extend the root-guards CI job (created by Part 3, #4863) with what no package leg covers: root
format/lintof root files,verify:format-coverage,verify:typecheck-coverage,test:scripts(the guard scripts' own unit tests, added by Part 3), and a shared-devDependency guard. That guard, adapted from the Inspector'sverify:dep-lockstep, checks that every shared TS devDependency (typescript,vitest,@vitest/coverage-v8,prettier,@types/node) is declared with one range across workspaces, or hoisted to the root. Todaytypescriptalone has three ranges. - Add the rules to
AGENTS.md. If Part 2 (AGENTS.md, #4862) hasn't merged yet, hand them to it instead:npm run formatbefore committingvalidateis the inner loop- lint has no warning tier
- build output is never a gate target
- no suppression through config
Acceptance criteria
-
npm run validatepasses on a clean checkout, and so doesnpm run validate -w <package>for each server. - Each CI matrix leg gates only its own package, and the root-guards job gates the rest.
- CI fails on a divergent shared devDependency range.
- CI fails a PR that has a formatting or lint finding.
- Existing findings are fixed, not suppressed through config.
Branch
Targets v2/main. Closes #N won't auto-close an issue on a non-default branch, so close this one by hand on merge and move the card to Done.
Source: modelcontextprotocol/servers