principle-test-behavior-not-implementation
Skill0 starsChanged 6 days agoMITView on GitHub
試験を書く・変える・残すときに適用する。利用者が観察できることを確かめ、振る舞いが壊れたら落ち、内部だけを変えたときは通り続ける試験にする。
41 other projects use a version of this.
Adopted by
Most recently taken up by
- sammyjoyce/prime-pstacktheir own version, first seen Nov 15, 2026
- upamune/skillstheir own version, first seen Nov 15, 2026
- mdsmithaustin/pstacktheir own version, first seen Nov 15, 2026
- painhardcore/pstacktheir own version, first seen Nov 8, 2026
- paramcodes/skillstheir own version, first seen Nov 8, 2026
- tristanphvn/keeltheir own version, first seen Nov 8, 2026
Used with
Projects with it also use principle-explain-the-number, poteto-help and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
ianclearySkillprinciple-explain-the-number
Apply before you trust, report, or act on a number you measured: a speedup, a regression, a throughput, a latency, or an eval result. Find what limits it, and rule out that it measured something other than the work you think.
Also in 30 projects that use this
ianclearySkillpoteto-help
Guides users through pstack setup, /poteto-mode, and picking the skill, playbook, or principle for a task. Type /poteto-help with a question.
Also in 14 projects that use this
tristanphvnSkillketchup-video
Catch the user up like /keel:ketchup, with a short silent video of slides for what happened and the waiting calls as text under it. Use for /keel:ketchup-video.
Also in 11 projects that use this
eryzerzSkillmake-bot-ui
Use when building a custom UI (page, dashboard, buttons) that should wake a Grok Bot over a webhook, when the user must provide a webhook sender key, or when exposing that UI on Tailscale.
Also in 16 projects that use this
bnemaSkillsetup-pstack
Configure which Pi models pstack uses per role. Detects available provider/model specs and writes pstack's user configuration. Use for /setup-pstack, "configure pstack models", or changing pstack model choices.
Also in 19 projects that use this
drafaelSkillin-your-own-words
Restate the user's goals and the problem they are trying to solve to check understanding. Manual invocation only; use when the user explicitly invokes in-your-own-words or requests this understanding check. Do not solve the task or rewrite the assistant's last answer.
Also in 21 projects that use this
Other versions41 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 41
- backnotprop/pstack★ 3.8ksame name
- jtaroreh/agystack★ 128same name
- uzairansaruzi/p3-stack★ 126same name
- dsebban/skills★ 71same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- creedants/pstack-t3★ 18same name
- painhardcore/pstack★ 18same name
- Scino/fstack★ 18same name
- mariusflorescu/pstack-t3★ 13same name
- adjohn/pstack★ 9same name
31 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository39 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- verify-parallelSkill
- bb-writSkill
- correctSkill
- create-formal-verification-skillSkill
- create-property-test-skillSkill
- create-verification-skillSkill
- delegateSkill
- interrogateSkill
- playbook-bugSkill
- playbook-deliverSkill
- playbook-docs-skillSkill
- playbook-evalSkill
- playbook-featureSkill
- playbook-investigationSkill
- playbook-parallelSkill
- playbook-pause-safelySkill
- playbook-session-pickupSkill
- playbook-verifySkill
- principle-attack-the-premiseSkill
- principle-encode-lessons-in-structureSkill
- principle-experience-firstSkill
- principle-fail-loudSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-laziness-protocolSkill
- principle-model-the-domainSkill
- principle-never-block-on-the-humanSkill
- principle-no-budget-cap-on-qualitySkill
- principle-no-speculative-structureSkill
- principle-prove-it-worksSkill
- principle-route-lessonsSkill
- principle-sequence-verifiable-unitsSkill
- principle-single-user-machineSkill
- principle-subtract-before-you-addSkill
- principle-two-human-rolesSkill
- reflectSkill
- unknownsSkill
The file
Files
実装でなく振る舞いを試験する
試験は、コードがその利用者(呼び出し元・使う人・別のサービス)に何をするかの主張にする。振る舞いは、利用者が使う接点から観察できること(返り値・エラー・読み戻せる状態・外への作用)。実装は、観察できないこと(内部の補助関数・呼び出しの順番・途中のデータ)。
なぜ: 内部に結び付いた試験は、リファクタのたびに書き直しになり、それでも不具合を捕まえない。振る舞いを見ない試験は、通っても何も証明しない。
適用する場面:
- 新しい試験を書くとき。
- リファクタで既存の試験が落ち、試験の方を直そうとしたとき。
- 解析の出力を、コードを 1 回走らせた結果の写しで固定しようとしたとき。
やること:
- 2 つの仮の変更で試験を判定する。振る舞いを壊す(誤った値を返す、作用を飛ばす、作用を 2 回する)と落ちるか。観察できる結果を保ったまま内部を組み替えると通るか。両方を満たす試験を残し、残りは書き直すか消す。
- 利用者の接点から具体的な入力で動かす。期待値は試験対象のコードの実行からでなく、要件から導く。
- 決めるのは約束で、確かめ方の形ではない。外部のサービスが受け取る内容は振る舞い、内部の補助関数の呼び出しは実装。呼び出し側が分岐に使うエラーの型は約束で、誰も読まないエラーの文言は固定しない。「呼ばれない」を確かめるなら、呼ばれる場合の試験と組にする。
使わないとき: 約束が呼び出しでなく不変条件(2 つの表に同じ鍵がある、型の検査が通る)のときは、観察の接点を探さず、不変条件を直接固定する。それがその場合の振る舞い。
確かめる例: 試験の期待値が要件の文から読み取れ、試験対象のコードで計算されていない。内部の関数名を変えるだけで落ちる試験が無い。
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

