Logo: Factory Tests

Factory Tests

Communautéit
MikeFishbeinAtherial
factory-tests

Etapp 3 vun der Software Factory an och e Standalone-Skill: verwandelt Aufgaben, Funktiounen oder e ganze Bestanddeel a Krittären an Tester, déi BEWISEN, datt d’Aarbecht korrekt ass, sou datt eng Coding-Loop sech selwer iwwerpréiwe kann, amplaz Iech ëm Vertrauen ze froen. Formel aus Verhalen a Beweiser, véier Test-Tieren a obligatoresch Feelerfäll. Funktionéiert mat engem factory PLAN.md, enger eenzeger Aufgab oder all Funktiounsbeschreiwung. Ausléiser – „define tests“, „acceptance criteria“, „how do I know it works“, „factory tests“.

Add to TypingMind

Iwwersiicht

EditeurMikeFishbeinAtherial
Repositoryinfinite-headcount
Skill-Nummfactory-tests
Stären
50
Forks
5
Matgeliwwert Dateien
Nëmmen Instruktiounen
LizenzMIT
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

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

Installatioun

Installéiert de KI-Skill Factory Tests an TypingMind, fir e mat all LLM ze benotzen, oder setzt 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 „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/MikeFishbeinAtherial/infinite-headcount/tree/main/factory-tests
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng 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 d'Skill-Verzeechnes vun deem KI-Agent.

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

An TypingMind benotzen

Aktivéiert Factory Tests 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 Factory Tests automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Factory Tests 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-Schlësselen.

  • 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.

Factory Tests

The factory's one rule: if you can't check it by running something, it isn't done — it's a hope. This skill turns "build X" into "build X, and here is the command and the observable result that proves X works," so an unattended coding loop can grade itself honestly all night.

Three ways in:

  • Factory mode (default via /factory): read factory/PLAN.md, fill every task's acceptance criteria: _pending factory-tests_ hole, add a component-level contract at the top.
  • Single task/feature: user describes one thing ("the login form", "task B3") → produce criteria + tests for just that.
  • Whole component/app: produce the component-level contract — the 15-30 assertions that define done for the entire build.

The formula: behavior + evidence

Every acceptance criterion is one sentence with three parts — the setup, the action, the observable result:

Given <input/state>, when , then .

  • Bad: "Handles Instagram URLs." "Login works." "Handles errors gracefully."
  • Good: "Given a public Instagram reel URL, when the CLI runs, then it exits successfully and the report folder contains report.md and a video file."
  • Good: "Given a wrong password, when the user submits the login form, then they see 'wrong email or password' and are NOT taken to the dashboard."

If a criterion doesn't name the action and the observable, a verifier will rubber-stamp it. Rewrite until it does.

For non-technical users: criteria are written in plain language first — you should be able to read every criterion and picture yourself checking it by hand. The test code that automates the check is the loop's job, not yours.

The four test tiers (organize by cost + trustworthiness)

Tag every criterion with a tier. The tier decides when it runs during the overnight loop — this line goes verbatim into the handoff:

TierWhatWhen the loop runs itExample
1 — Offline (free, always trustworthy)Pure logic: parsers, calculators, formatters, validation. Golden tests (known input → exact expected output, saved to a file). All error paths.Every pass."Given the URL youtu.be/abc, the router returns source=youtube, id=abc."
2 — Live, gated (costs pennies or minutes)Your code against real external services, switched on by an env var (e.g. RUN_LIVE=1). Fixtures you control — your own uploads, your own test account. Never random public URLs.End of each stage + once before final sign-off."Given the 5-second fixture video, when transcription runs live, then the output is schema-valid with timestamps inside the video's duration."
3 — End-to-end smoke (cheap, catches wiring)One run of the real thing: CLI on a fixture file, one API round-trip, one page load + action in a real browser.Every pass if offline; stage ends if it needs live services."When the CLI runs on fixture.mp4, then the report folder appears with all expected files."
4 — Canary (tests the world, not your code)Is the external dependency itself still alive and unchanged?Never blocks the loop. Failure = log it, flag it, move on. An agent "fixing" your working code at 2am because some platform changed something will wreck the codebase."yt-dlp can still download from YouTube today."

Error paths are not optional

An unattended loop lives in the error paths — wrong input, dead URL, empty file, timeout, someone clicking the wrong button. For every task, write at least one criterion for the most likely failure, with the exact expected behavior ("shows message X", "exits with code 2", "creates nothing"). A contract that only describes the happy path will pass review and then die on first contact with a real user — you.

Testing AI/LLM output (when the build calls a model)

Exact-match tests don't work on model output. Assert properties instead: the output matches the expected schema, values are in legal ranges (timestamps inside the video, prices non-negative), required parts are non-empty. For quality ("is this summary good?"), write a short rubric — 2-4 axes, a named good example, a 0-1 threshold — and have a fresh agent grade against it. Properties gate correctness; the rubric gates taste.

Component-level contract

Above the per-task criteria sits the whole-build contract: 15-30 assertions that define done for everything (fewer gets rubber-stamped). Sources: the brief's "Done looks like" section, every task's criteria rolled up, the error paths, and 2-3 assertions nothing else covers (performance floor, data never lost on refresh, works in the browser the user actually uses).

Output

Factory mode edits factory/PLAN.md in place:

markdown
### A1. <task title>
- ...
- acceptance criteria:
  - [tier 1] Given ..., when ..., then ...
  - [tier 1, error] Given ..., when ..., then ...
  - [tier 3] Given ..., when ..., then ...
- test notes: <where tests live, fixtures needed, gate var if tier 2>

...and adds ## Contract (the component-level assertions) at the top of PLAN.md. Standalone mode outputs the same shapes to chat or the file the user names.

Two standing rules to embed wherever the criteria go:

  1. Every bug found later gets a criterion here first, then the fix. The contract grows to match reality.
  2. The builder never grades its own work — criteria are checked by running them, and final judgment belongs to a fresh reviewer (factory-review) that never saw the code being written.

Close out (factory mode)

Update factory/STATE.md → stage 4, next action "walkthrough + handoff with factory-handoff". If factory/STATE.md doesn't exist (standalone use), create it first with a minimal version of the schema described in factory/SKILL.md. Offer factory-explain — with plan and proof now written, this is the ideal moment for the user to see the whole build as a picture before it costs a night of compute.

Heefeg gestallte Froen

Wat mécht de KI-Skill Factory Tests?

Etapp 3 vun der Software Factory an och e Standalone-Skill: verwandelt Aufgaben, Funktiounen oder e ganze Bestanddeel a Krittären an Tester, déi BEWISEN, datt d’Aarbecht korrekt ass, sou datt eng Coding-Loop sech selwer iwwerpréiwe kann, amplaz Iech ëm Vertrauen ze froen. Formel aus Verhalen a Beweiser, véier Test-Tieren a obligatoresch Feelerfäll. Funktionéiert mat engem factory PLAN.md, enger eenzeger Aufgab oder all Funktiounsbeschreiwung. Ausléiser – „define tests“, „acceptance criteria“, „how do I know it works“, „factory tests“.

Firwat Factory Tests op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Factory Tests 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 en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Factory Tests an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/MikeFishbeinAtherial/infinite-headcount/tree/main/factory-tests 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 Factory Tests 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 Factory Tests benotzen?

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

Ass de KI-Skill Factory Tests gratis?

Jo. MikeFishbeinAtherial huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen 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 e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

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