Files
Aleksandr Vishniakov b30bfa076d refactor: dev scripts (#2573)
## PR summary

### What

Completes the developer tooling refactor: unified workspace commands,
Python tooling parity, CI restructure, parallel E2E, and shared agent
config.

**Frontend commands** — root `package.json` now owns all entrypoints:

| Area | Check / Run | Fix |
|---|---|---|
| Lint JS/TS | `pnpm lint` | `pnpm lint:fix` |
| Format JS/TS | `pnpm format-check` | `pnpm format` |
| Type check | `pnpm type-check` | — |
| Build | `pnpm build` | — |
| Unit tests | `pnpm test` | — |
| E2E tests | `pnpm test:e2e` | — |
| E2E tests (interactive) | `pnpm test:e2e:interactive` | — |

**Note:** `Copilot` is excluded from type checking because of its
unusual structure: it depends directly on frontend sources rather than
on a shared package.

**Python tooling** — mirrors the JS side; all run from repo root:

| Area | Check | Fix |
|---|---|---|
| Lint | `uv run scripts/lint.py` | `uv run scripts/lint.py --fix` |
| Format | `uv run scripts/format.py --check` | `uv run
scripts/format.py` |
| Type check | `uv run scripts/type_check.py` | — |


- Root `pyproject.toml` added: `ruff`, `mypy`, and `pytest` config moved
here from `backend/pyproject.toml`
- `uv.lock` promoted to repo root
- **Python `<3.14` now explicitly declared.**

#### Other changes

**CI** — restructure checks so CI, lint-staged, and local dev all call
the same entrypoints, eliminating the class of "works locally but fails
in CI" bugs:

- Rename and restructure lint workflows to use a matrix (lint / format /
type-check), now calling the same commands as local dev:

| Old | New | Commands |
|---|---|---|
| `lint-backend` | `check-backend` | - `scripts/lint.py` <br> -
`scripts/format.py --check` <br> - `scripts/type_check.py` |
| `lint-ui` | `check-frontend` | - `pnpm lint` <br> - `pnpm
format-check` <br> - `pnpm type-check` |

- Rename `pytest.yaml` → `tests.yaml`; add `pnpm test` alongside pytest
so frontend unit tests run in CI too
- Pin action versions across all workflows
- Add concurrency cancellation for non-main branches

**E2E** — reduce CI time and improve isolation:

- Add `cypress-split` to distribute specs across configurable parallel
shards per OS
- Cache the Cypress binary before `pnpm install`
- Upload screenshots per OS + shard index

**lint-staged** — use new root commands for all pre-commit checks:

- JS/TS lint, format, and type-check now go through the same root `pnpm`
commands as CI
- Add `actionlint` for `.github/workflows/` changes

**AI agent config** — introduce `.shared/` so Claude, Cursor, and
Copilot read agent settings, rules, and skills from one place:

- Add MCP-first requirement to `AGENTS.md`
- Refresh `CONTRIBUTING.md` and Copilot instructions to match new
commands

**Docs** — add CI cache P2 implementation plan

### Why

- Developers, CI, and lint-staged were calling different entrypoints for
the same tools; now all three use the same commands.
- Python tooling lacked the file-scopeable, locally runnable wrappers
that JS already had.
- Matrix-based `check-backend` / `check-frontend` surface individual
failures faster than the old monolithic lint jobs.
- Parallel E2E shards reduce total CI time proportionally to shard
count; binary caching eliminates a repeated download on every run.
- `.shared/` removes copy-paste drift across Claude, Cursor, and Copilot
configurations.

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Composer 2 <noreply@cursor.com>
Co-authored-by: GPT-5.4 <noreply@openai.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-04-08 03:04:38 +00:00
..
2026-04-08 03:04:38 +00:00
2026-04-08 03:04:38 +00:00
2026-04-08 03:04:38 +00:00