principle-test-behavior-not-implementation
Skill1 starsChanged 11 days agoMITView on GitHub
Apply when you write, change, or keep a data test, pipeline check, or unit test for analysis code. Assert what the users of the output can observe, such as values, row sets, schema, and written tables, so the test fails when the result breaks and survives internal refactors.
37 other projects use a version of this, 15 of them edited.
Adopted by
Most recently taken up by
- painhardcore/pstackedited, first seen Nov 8, 2026
- paramcodes/skillstheir own version, first seen Nov 8, 2026
- tristanphvn/keeledited, first seen Nov 8, 2026
- requie/endostacktheir own version, first seen Nov 8, 2026
- creedants/pstack-t3edited, first seen Nov 3, 2026
- thiskevinwang/skillsedited, first seen Nov 1, 2026
Used with
Projects with it also use poteto-help, ketchup-video and 4 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.
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
JoshueOsunaSkillPoteto Mode
poteto's agent style for concise, detailed responses, deliberate subagents, unslopped prose, simple code, and verified work. Use for poteto, /poteto-mode, or requests to work in this style.
Also in 3 projects that use this
instructureSkillketchup
Rebuild context after /clear by analyzing uncommitted changes across Canvas LMS and all plugin repositories
Also in 18 projects that use this
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 15
- backnotprop/pstack★ 3.8k36% same
- dsebban/skills★ 7136% same
- creedants/pstack-t3★ 1837% same
- painhardcore/pstack★ 1837% same
- mariusflorescu/pstack-t3★ 1336% same
- adjohn/pstack★ 936% same
- alexnthnz/keel★ 536% same
- conscientiousness/herdr-pstack-orchestrator★ 236% same
- christofferbergj/agent-skills★ 137% same
- lengjingxu/pstack-for-codex★ 137% same
5 more not listed
Wrote their own version · 22
- jtaroreh/agystack★ 128same name
- uzairansaruzi/p3-stack★ 126same name
- TheOnlyFusionCube/potetos-for-everyone★ 21same name
- Scino/fstack★ 18same name
- requie/endostack★ 4same name
- dhanji4U/skills★ 2same name
- fullerzz/agent-skills★ 2same name
- jaydubya818/MissionControl★ 2same name
- JoshueOsuna/pstack★ 2same name
- Timmyy3000/skills★ 2same name
12 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 repository50 other files it gives its agents.
- analyst-modeSkill
- architectSkill
- arenaSkill
- astack-helpSkill
- benchmark-checklistSkill
- blast-radiusSkill
- catch-upSkill
- correctSkill
- create-formal-verification-skillSkill
- figure-it-outSkill
- howSkill
- interrogateSkill
- in-your-own-wordsSkill
- maintain-formal-verification-skillSkill
- no-commentsSkill
- plain-wordsSkill
- principle-attack-the-premiseSkill
- principle-boundary-disciplineSkill
- principle-build-the-leverSkill
- principle-define-the-questionSkill
- principle-encode-lessons-in-structureSkill
- principle-experience-firstSkill
- principle-explain-the-numberSkill
- principle-fix-root-causesSkill
- principle-foundational-thinkingSkill
- principle-guard-the-context-windowSkill
- principle-laziness-protocolSkill
- principle-make-operations-idempotentSkill
- principle-minimize-reader-loadSkill
- principle-model-the-domainSkill
- principle-name-the-estimandSkill
- principle-never-block-on-the-humanSkill
- principle-prove-it-worksSkill
- principle-reproduce-from-clean-stateSkill
- principle-respect-the-grainSkill
- principle-sequence-verifiable-unitsSkill
- principle-simulate-the-methodSkill
- principle-subtract-before-you-addSkill
- recallSkill
- reflectSkill
- retail-analyticsSkill
- sharpenSkill
- show-me-your-workSkill
- statechartSkill
- swarmSkill
- tddSkill
- teachSkill
- technical-writingSkill
- unslopSkill
- whySkill
The file
Files
Test Behavior, Not Implementation
A test is a claim about what the code does for its users: a notebook reader, a downstream table, a dashboard, or another service. Behavior is what those users can observe through the interface they use. That includes returned values, the row set, the schema, errors, and effects outside the code, such as a table written or a file emitted. Implementation is what they cannot observe: private helpers, the order of internal calls, intermediate frames, and which internal expression did the work.
Judge each test against two imagined edits.
- Break the behavior. Make the code return a wrong value, drop a row, or double count. If the test still passes, it proves nothing. The usual causes are an assertion looser than the contract, an expected value computed by the code under test, and assertions on data the test built itself.
- Change the internals. Keep every observable result the same and restructure the code underneath, for example by moving from eager to lazy frames. If the test now fails, it is pinned to the implementation.
Keep a test that catches the first edit and survives the second. Rewrite or delete the rest. To build such a test, feed the code a small hand-made frame through its public function. Derive the expected value from the definition, not from a run of the code. Assert what the contract promises, no less and no more.
The contract decides, not the shape of the assertion. If the promise is "refunds are excluded from revenue", assert the revenue value on a frame with a refund, and pair it with a frame without one, so the test shows it can see the effect. A call to an internal helper is implementation. A value that a mocked external service receives is behavior, because that service observes it. An exact warning string pins wording no caller reads. An error type that callers branch on is the contract.
An invariant can be the test. "Every order_id in the fact table exists in the customer dimension" is a behavior of the output, so assert it on the output.
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.

