Logo vun Harness First

Harness First

Communautéit
peterpme
harness-first

Use when a change is meant to move a number: faster, smaller, smoother, cheaper or less flaky (startup, jank, frame drops, bundle size, memory, CI time, API cost, eval scores, any hill climb), or when Peter asks how you know it is faster. Measure a baseline first, then report the change against it. Not for a bug with a repro.

Iwwersiicht

Editeurpeterpme
Repositoryskills
Skill-Nummharness-first
Stären
28
Forks
0
Matgeliwwert Fichieren
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum peterpme op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Harness First an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/peterpme/skills/tree/main/harness-first
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/peterpme/skills.git /tmp/skills
mkdir -p .claude/skills
cp -r /tmp/skills/harness-first .claude/skills/harness-first
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Harness First an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Harness First automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Harness First net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Harness first

A number nobody measured before the change is a guess, and a guess in a PR body is a claim nobody can check. Peter's rule: no change meant to improve a number lands without a committed baseline from a harness in the repo.

1. Name the number

Before reading code for fixes, write down: the metric and its unit (late frames per scenario, cold start ms, bundle bytes, p95 latency, flaky failures per 100 runs), which direction is better, the environment users run (physical device model, release build, production bundler, real data), and Peter's target if he gave one. This goes in the contract's acceptance checks as "baseline X on base SHA, after Y on head SHA, same harness, same environment".

2. Find the harness before writing one

Search, and record what you found and why it fits or not:

  • scripts/, tools/, bench*, perf*, profil*, verify*, package and task-runner scripts, CI workflows.
  • The repo's agents file and docs, and the skills installed for the stack (profilers, e2e recorders).
  • Earlier PRs: gh pr list --search "perf OR benchmark OR baseline" --state all. A PR with a before-and-after table names its harness.

Use an existing harness when it measures the named number in the environment users run. Extend it before replacing it.

3. No harness: building it is the first PR

The harness PR holds no optimization, so it is reviewable on its own and a later PR cannot quietly change how it measures. It contains:

  • one command that runs it, documented in its README and the repo's agents file;
  • the shipped runtime: a release build on a real device for app performance, the production bundle for size, the deployed stack or a copy of it for latency. A cheaper proxy only after you show it moves with the real number;
  • warm-up, at least five runs, median and spread, machine-readable output, and a way to run two builds or refs back to back (A/B);
  • the baseline: a file next to the harness, baselines/<YYYY-MM-DD>-<metric>.md, with the base SHA, environment, run count, median and spread per scenario.

If the spread is larger than the effect you expect, fix the noise (more runs, pinned device state, fixed data) before any optimization.

When a harness exists but no committed baseline does, or it was taken on older code or another environment, run it on the base and commit the baseline the same way.

The baseline, with the harness if it is new, is its own PR, opened before any optimization work and never a commit inside the optimization PR. It is the one exception to starting a build as one draft PR: it holds no behavior change, so it can merge while the optimization is still being built, and the optimization PR stacks on it.

4. Every change: the same harness, the same environment, the delta

Each optimization PR body carries a table: scenario, baseline (base SHA), after (head SHA), delta, runs, spread. A delta inside the spread is "no change", not a win. Run both orders when the device can drift (A then B, B then A). Never change the harness and the code in one PR: a harness change needs a new baseline first.

On a hill climb, keep a log of each attempt with its delta and whether you kept or reverted it. Keep a change only when its delta beats the spread. Revert the rest.

5. Blast radius: one real run per flow

The number shows the target got better, not that nothing else broke. Before changing code, write the flow list into the contract: every user flow that passes through the files you will touch (find them from the callers and screens that import them), each with its steps and the expected result. After the change, run each one end to end on the same build you measured, one row per flow in the proof table. A visual spot check of the target screen is not a flow run. A flow you could not run is its own row marked unverified.

For a change to an API or shared code, add a caller check to the number: list the callers, state what each depends on, and make one real call per caller before and after.

Never

  • Quote a number from another environment (a dev build, a simulator, a different device) as the result.
  • Tune the harness, scenarios or run count after seeing the new numbers.
  • Drop a scenario or a run because it went the wrong way. Report regressions in the same table.

Heefeg gestallte Froen

Wat mécht de KI-Skill Harness First?

Use when a change is meant to move a number: faster, smaller, smoother, cheaper or less flaky (startup, jank, frame drops, bundle size, memory, CI time, API cost, eval scores, any hill climb), or when Peter asks how you know it is faster. Measure a baseline first, then report the change against it. Not for a bug with a repro.

Firwat Harness First op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Harness First besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Harness First an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/peterpme/skills/tree/main/harness-first an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Harness First benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Harness First benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Harness First domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Harness First gratis?

De Skill gëtt vum peterpme op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇