mirror of
https://github.com/penpot/penpot.git
synced 2026-09-19 02:16:14 +00:00
Teach agents to verify their changes with ./scripts/ci: module list, task selection flags, log locations under .ci-logs/, and per-module workflows (lint-only pass, --fix, --paren-repair, common/ consumer checks). Register the skill in the skills README, point AGENTS.md at the new memory, and add the script to the critical-info dev scripts. AI-assisted-by: omen-alpha
2.5 KiB
2.5 KiB
CI (scripts/ci)
scripts/ci runs CI-style checks — lint, tests, format — for one or more
monorepo modules and prints a per-task summary. It is the local equivalent
of CI; use it to verify changes before declaring work done.
When to use
- After implementing or fixing code in a module: run its checks before finishing (AGENTS.md: run the applicable lint and format checks).
- When
common/changed: validate its consumers too (frontend, backend, exporter; see the dependency graph inmem:critical-info). - To fix formatting across a module (
--fix) or repair delimiters (--paren-repair) before linting.
How to use (CLI)
Run from the repo root:
./scripts/ci MODULE... # lint + test + fmt per module
./scripts/ci --all --no-test # lint + fmt on all modules
./scripts/ci --lint frontend # lint only
./scripts/ci --fix --no-test frontend # format files, skip tests
./scripts/ci --paren-repair --all # fix delimiters in all Clojure modules
./scripts/ci --dry-run --all # preview what would run
Modules: frontend backend common render-wasm exporter mcp plugins library.
Flags:
- Default tasks:
lint,test,fmt(format check;--fixformats instead). --lint/--test/--fmtrun one task only;--no-lint/--no-test/--no-fmtdrop one task from the default set.--paren-repairruns only the delimiter repair — it wrapsscripts/paren-repairover each module's Clojure/CLJS sources; seemem:scripts/paren-repair.--allselects every module;--exclude MODdrops one (repeatable).--fail-faststops at the first failure;--quietsuppresses failure output;--dry-runprints commands without running;--cleanremoves the log directory.
Logs and exit codes
- Full output of every task:
.ci-logs/<module>-<task>.log. - On failure the script prints the last 30 lines; the final summary lists
every failed
module:taskwith its log path. - Exit code 0 when all selected tasks passed, 1 otherwise.
- Diagnose failures by reading the log file — never pipe test output through filters (AGENTS.md hard rule).
Notes
mcphas no lint task (shows as skipped).render-wasmuses./lint,./test, andcargo fmt.- Test tasks are long-running (backend:
clojure -M:dev:test); use a generous timeout when calling it from an agent shell. - Skill entry point:
.agents/skills/local-ci/SKILL.md. - Testing principles and output discipline:
mem:testing.