Factory Testsのロゴ

Factory Tests

コミュニティ
MikeFishbeinAtherial
factory-tests

Software Factoryのステージ3であり、単独でも使えるスキルです。タスク、機能、またはコンポーネント全体を、作業が正しいことを証明する受け入れ基準とテストに変換します。これにより、コーディングループがユーザーに信頼を求めるのではなく、自ら検証できます。「振る舞い+証拠」の公式、4段階のテスト、必須のエラー処理パスを採用しています。factory/PLAN.md、単一のタスク、または機能の説明に対応します。起動キーワード:「テストを定義」「受け入れ基準」「動作確認の方法」「factory tests」。

Add to TypingMind

概要

公開者MikeFishbeinAtherial
リポジトリinfinite-headcount
スキル名factory-tests
スター
50
フォーク
5
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    MikeFishbeinAtherialがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Factory Tests」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/MikeFishbeinAtherial/infinite-headcount/tree/main/factory-tests
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

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
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでFactory Testsを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にFactory Testsを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Factory Testsは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

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.

よくある質問

AIスキル「Factory Tests」では何ができますか?

Software Factoryのステージ3であり、単独でも使えるスキルです。タスク、機能、またはコンポーネント全体を、作業が正しいことを証明する受け入れ基準とテストに変換します。これにより、コーディングループがユーザーに信頼を求めるのではなく、自ら検証できます。「振る舞い+証拠」の公式、4段階のテスト、必須のエラー処理パスを採用しています。factory/PLAN.md、単一のタスク、または機能の説明に対応します。起動キーワード:「テストを定義」「受け入れ基準」「動作確認の方法」「factory tests」。

TypingMindでFactory Testsを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Factory Testsはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにFactory Testsをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/MikeFishbeinAtherial/infinite-headcount/tree/main/factory-testsを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Factory Testsを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Factory Testsで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもFactory Testsを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Factory Tests」は無料ですか?

はい。MikeFishbeinAtherialがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇