CtrlK
BlogDocsLog inGet started
Tessl Logo
SkillPublic

local-ci

Run Local CI, the slow check steps that run on next after landing instead of before it. Use for /local-ci, "is next green", "Local CI status", "rerun Local CI", the old name "deep check", installing or removing its launchd job on a Mac, and when a local-ci task names a red step. The `operator` skill starts and runs the session that fixes each red step.

Quality

89%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide
SecuritybySnyk

Medium

Suggest reviewing before use

SKILL.md
Quality
Evals
Security

Local CI

pnpm check --affected, which every landing runs, runs only the steps marked land in tooling/scripts/check.mjs: typecheck, the fast test files, the plitejs, platejs and @platejs/test test files that import a changed file directly, the checks that take a second or two, and the knowledge and api-reference checks, which take under a minute. Local CI runs every other step on the newest origin/next, the slow test files, the formal checks and the whole-repo lint included, with the steps --build --browser add. tooling/scripts/local-ci.mjs is the lane:

  • A launchd job runs local-ci.mjs run every 20 minutes on each Mac that installed it. The owner's Mac is the main CI and checks every step with --deep. Once a day, its first run after 04:00 runs --build --browser --reads with fresh seeds instead. Another teammate's Mac checks only the steps its install named, and its daily run checks those steps with fresh seeds. A run exits at once when another run on that Mac holds the lock or next has not moved.
  • A run moves the persistent worktree <main checkout>/.claude/worktrees/local-ci and its private half to the newest next, and the job runs that worktree's copy of the script, so a fix to it reaches the job when it lands. A run checks next there, through proof.mjs under the one-hour budget. On green, main pushes refs/pstack/local-ci-green forward, because that ref claims every step passed. Another Mac keeps its last green commit in its own state.json.
  • A step that fails with only the failures the run before reported is the same red, so it reruns nothing and keeps that run's first bad commit. In one week, 58 of 68 reruns only confirmed such a red. A step with a new failure reruns only its failed test files when its runner takes files, and reruns alone otherwise. A step that passes its rerun is a flake. Local CI reports every flake, because a test that fails only sometimes depends on timing or host load, which is a defect to fix like any red (owner's word, 2026-11-20). A later pass does not dismiss a flake's task. A step still running when the hour runs out keeps the run before's red while that red's fix task is open. Otherwise it reruns alone, and passing alone clears it, because it never failed. A step that fails its rerun gets its first bad commit searched for from the last commit that step passed on, while the hour lasts. The search judges each commit by the new failures, so it finds a culprit even while other steps keep next red.
  • .agents/expected-failures.json lists the failures a step may have while their owner task stays open, each as { "step", "file", "test", "owner" }. file is the test file's path from the repository root, or null when the step's output names no file, and test is the test's full name, as tooling/scripts/step-failures.mjs reads them from the step's output. A red event's failures names each failure as <file> › <test>. owner is the id of an open task on the suggested-task ledger, and a line whose task closed no longer holds. pnpm check passes a step whose only failures the list names, and fails it when a listed failure stops failing, so the fix that clears one removes its line. A run of named test files judges only the listed failures in those files. test and test-slow split the root suite by this clone's test timings, so a line under either holds in both. Each of the two judges only the listed failures in the files it ran. A step whose output names no failure key, such as a formal check, has nothing to list.
  • A report offers a P0 task under topic local-ci that owns the red step, and that Mac's operator starts its fix. A red event names the first bad commit's author email as author. On a Mac other than main, when someone else authored a red's first bad commit and main also checks that step, the run writes the red with wake: false and leftToMain: true and offers no task, because main finds that red too and offers it. Someone else is any author other than this Mac's git config user.email. Every other red, flake and cleared event reports as it does on main. So main takes any red no other Mac claims, and a Mac takes a red on a step only it checks, whoever broke it. A report first syncs the ledger with refs/pstack/ledger on origin, so a task another Mac offered during the run counts as open and the step gets one task. While that task stays open, the step's reds wake the operator again once six hours pass with no ledger row or wake for the task, because a fix that dies with its session, such as in an app restart, leaves the task open with nobody working on it. When a step that was red in the last run passes, the run writes a passed event and dismisses the step's offered task, because a fix for another step already cleared it. Nothing in the lane posts to the team channel: not the runner, the operator or the fix run (owner's word, 2026-11-17). status and the board show what is red.
  • Each red gets its own fix task, but a failure that keeps coming back shows that no check before landing catches its kind of break, so it also gets one task that adds that check. A failure is a step and one test file its output names, or the step alone when the output names no file, such as for a formal check or a timeout. A failure starts when it fails in a run after a run where it did not fail, so a red that stays across runs starts once. When a failure starts in the newest run and has started three times in the last seven days, the run offers one P3 task for its step under topic red-recurrence. The task has via: hook and no owner, so /chips all cards it. That task finds what the failures share and adds the guard that would have caught them before landing, in the order /pstack:correct uses: the architecture or the types, then a lint, then a fast check in the landing list, then the skill or rule that let it through. A step gets no second such task while one is open. When that task closes, the count starts again after its last ledger row. tooling/scripts/red-recurrence.mjs counts the starts.
  • The runner keeps state.json, events.jsonl, its lock and, on a Mac other than main, config.json in plate-local-ci/ in the git common directory, and its logs in docs/plans/artifacts/local-ci/<day>/.

Run every command below from the main checkout. Each runs the Local CI worktree's copy of the script, because every run moves that copy to the newest next, while the main checkout's copy moves only when someone pulls there. Pick the mode from $ARGUMENTS. With none, watch or supervise, load the operator skill and run its Keep watching.

status

Run node .claude/worktrees/local-ci/tooling/scripts/local-ci.mjs status. Report whether the job is loaded and running, which steps this Mac checks, the email it compares each first bad commit's author with, the last run, the last green commit and the newest events. For a red event, also name its step, its first bad commit or the range still unsearched, and its log. Report the red now: lines, which say how long each step has been red, and the time to green over the last 14 days.

rerun

  1. Run node .claude/worktrees/local-ci/tooling/scripts/local-ci.mjs run --force in the background. It checks this Mac's steps on next even when the last run already did, and it takes up to an hour. Use run --full for the daily fresh run.
  2. To check a commit other than next's tip, run run --ref <sha> --green <last green sha> [--step <name>] --dry. --dry writes the event only: no ref push or task.
  3. When it exits, run status and report what the run found.

install and uninstall

node .claude/worktrees/local-ci/tooling/scripts/local-ci.mjs install writes the dev.plate.local-ci launchd agent and loads it, and uninstall removes it. When that worktree does not exist yet, run node tooling/scripts/local-ci.mjs install from a checkout that has the script; install makes the worktree at the newest next first. The owner's Mac (zbeyens) is the main CI and installs without --steps. Another teammate's Mac installs with --steps <name,name>, naming the check steps that suit its work, such as its sweep lanes. Overlap with main is fine. install --steps writes the names to config.json, and plain install removes that file. Install refuses a name pnpm check --list lacks, and refuses --steps while the main checkout's git config user.email is empty, before it changes anything. Each Mac runs its own operator, as the operator skill's Keep watching says. Confirm with launchctl print gui/$(id -u)/dev.plate.local-ci.

Repository

udecode/plate

Path

.agents/skills/local-ci/SKILL.md

Last updated
First committed

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.