basicly
AGENTS.md0 starsChanged 55 days agoMITView on GitHub
Make a wrong use impossible, or stop it at once with the fix (poka-yoke). A refusal in the code acts before the damage. A warning in a document acts after it.
- Reads credentials
- Deletes or force-pushes
- Commits and pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository52 other files it gives its agents.
- .claude/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- best-practices-auditSkill
- catalog-authoringSkill
- cli-toolsSkill
- conventional-commitsSkill
- decompose-planSkill
- falsify-firstSkill
- find-skillsSkill
- harness-clientSkill
- harness-loopSkill
- interface-factsSkill
- no-commentsSkill
- nodeSkill
- plain-englishSkill
- pythonSkill
- release-processSkill
- repair-in-placeSkill
- retention-probeSkill
- root-causeSkill
- session-finishSkill
- skill-creatorSkill
- test-disciplineSkill
- tier-injectionSkill
- validate-as-consumerSkill
- work-trackerSkill
- worktree-isolationSkill
- best-practices-auditSkill
- catalog-authoringSkill
- cli-toolsSkill
- conventional-commitsSkill
- decompose-planSkill
- falsify-firstSkill
- find-skillsSkill
- harness-clientSkill
- harness-loopSkill
- interface-factsSkill
- no-commentsSkill
- nodeSkill
- plain-englishSkill
- pythonSkill
- release-processSkill
- repair-in-placeSkill
- retention-probeSkill
- root-causeSkill
- session-finishSkill
- skill-creatorSkill
- test-disciplineSkill
- tier-injectionSkill
- validate-as-consumerSkill
- work-trackerSkill
- worktree-isolationSkill
The file
Show its rules and text
We split this AGENTS.md into the rules it gives an agent
51 rules. About 1 is common, 36 are distinctive, and 14 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈36
Distinctive · estimate
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 4
Before non-trivial work, read the repository context: the README, the architecture document and the local overlay.
- Distinctive: line 5
When repository evidence and general practice disagree, follow the repository.
- Distinctive: line 12
Put the fact that a comment would carry where it stays true: a name, a test name, the tracker record or a README.
- Distinctive: line 26
Leave no dead code and no debug output.
- Distinctive: line 27
Keep tests deterministic. A bug fix ships with a regression test.
- Distinctive: line 36
Keep each rule in one place, and call it from every side.
- Distinctive: line 37
When a mistake can happen again, add a gate or a test that refuses it.
- Common: line 43
Keep secrets in environment variables or a secret manager, out of the repository and the logs.
- Distinctive: line 45
Commit no machine path, user name or host name.
- Distinctive: line 50
Stop and ask when a fact is missing, when sources conflict, or when an assumption you cannot check would change the result.
- Distinctive: line 51
When rules conflict, follow the safety and security rule.
- Distinctive: line 52
When the same approach fails twice, report the pattern and propose another approach.
- Very specific: line 56
Do not answer from memory about a third-party interface.
- Distinctive: line 60
When two causes predict the same result, say so and change the probe until they differ.
- Distinctive: line 64
Ask the user before you:
- Very specific: line 67
read or write a .env* file.
- Distinctive: line 68
delete files, branches or data outside the task.
- Distinctive: line 70
add, remove or upgrade a dependency.
- Distinctive: line 81
When a defect, a refusal or a report shows a gap, fix the cause.
- Distinctive: line 82
Follow the current practice of the vendors and of community experts, unless it makes install, use or upgrade less safe for a person who …
- Very specific: line 94
Start a session with basicly session start.
- Distinctive: line 103
Run the repository checks on what you touched, after the last edit.
- Distinctive: line 104
Read the pass or fail summary line.
- Distinctive: line 106
When you claim that a check covers every item, name the list that the code reads.
- Distinctive: line 107
Check a claim against the code before it goes into a plan, a design document, a README or a release note.
- Distinctive: line 108
Before you retire a source system, list its files one by one and account for each.
- Very specific: line 112
Write catalog sources as YAML, never as a discoverable .md file.
- Very specific: line 113
Start a source with basicly catalog new skill or basicly catalog new fragment, and follow the catalog-authoring skill.
- Very specific: line 117
Before you end a session, follow the session-finish skill.
- Distinctive: line 118
After a refused change or a mistake the user corrected, name the root cause.
- Distinctive: line 122
Run these commands as written.
- Distinctive: line 131
Test, whole suite then one file:
- Distinctive: line 158
Run git commit as its own command.
- Distinctive: line 160
When a hook refuses a commit, fix the cause it names and commit again.
- Distinctive: line 164
Prefer a cross-platform command to shell-specific behaviour.
- Very specific: line 166
Never loop over an unquoted variable (for x in $LIST).
- Distinctive: line 167
Before a scripted replace across many sites, state the expected count, and compare it after.
- Distinctive: line 171
Before a research or design document recommends a third-party project:
- Very specific: line 173
Treat its README as a claim.
- Distinctive: line 174
Test an absolute claim by trying to break it.
- Very specific: line 175
Read every licence file first, NOTICE included, and check each directory.
- Distinctive: line 176
Ask what the author sells.
- Distinctive: line 177
Check whether the argument assumes away a control this repository already runs.
- Very specific: line 184
Use low only for work whose wrong answer a check catches and a rerun fixes cheaply.
- Distinctive: line 197
Check each acceptance criterion against the picture.
- Very specific: line 199
Run the overflow check and read both of its signals, render-overflow and render-overlap.
- Distinctive: line 210
Write it in the same change.
- Very specific: line 216
Test a path rule with both PureWindowsPath and PurePosixPath.
- Very specific: line 218
Do not use select or selectors on a pipe, because on Windows they accept only sockets.
- Distinctive: line 219
Wait for a condition, not a duration.
- Very specific: line 220
Use skipif only when the behaviour cannot exist on the other platform.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
<!-- Generated by basicly v0.20.2. Do not edit manually. -->Knowledge Priming
- Before non-trivial work, read the repository context: the README, the architecture document and the local overlay.
- When repository evidence and general practice disagree, follow the repository. Say so; do not override it in silence.
- An instruction from the user in the current task overrides this file. A path-scoped instruction overrides it for the files it matches.
Code Is Authoritative
- A code file carries no prose: no comment and no docstring. The code is the only source of truth, so a change cannot leave a stale claim beside it.
- A directive that a tool reads stays:
noqa,nosec,type: ignore,pragma: no cover, a shebang,fmt: off, a licence header. - Put the fact that a comment would carry where it stays true: a name, a test name, the tracker record or a README. When code needs prose to say what it does, fix the code.
- The
no-commentshook refuses the commit. This command removes the comments:
python3 .basicly/core/kit/comments/cli.py fix <path>Core Rules
- Make the smallest diff that meets the requirement. An unrelated change hides which change failed.
- Build only what the task asks for. A speculative abstraction or an unrequested option is a guess that stays in the code.
- Reuse before you build. Prove that a capability is absent by reading the code that would use it, not the documentation or
--help. - Fix the root cause. Check every other call site before you call a fix complete.
- Match the style and the names of the file you edit.
- Leave no dead code and no debug output. Never swallow an error: it becomes a wrong answer.
- Keep tests deterministic. A bug fix ships with a regression test.
- Back every claim with evidence: the file you read, the command you ran, the test that passed.
Mistake Proofing
Make a wrong use impossible, or stop it at once with the fix (poka-yoke). A refusal in the code acts before the damage. A warning in a document acts after it.
- Refuse a wrong input by name. Never answer it with a default or an empty result, because both read as success. Say what is wrong and give the correct command.
- Make the safe behaviour the default. A mode that can damage shared state needs an explicit flag.
- Keep each rule in one place, and call it from every side. Two copies drift and give two answers.
- When a mistake can happen again, add a gate or a test that refuses it. A note does not stop it.
Secure Coding
- Validate external input at the trust boundary. Code past the boundary assumes the input is safe.
- Pass shell arguments and query values as parameters. Concatenated input runs as syntax.
- Keep secrets in environment variables or a secret manager, out of the repository and the logs. A commit outlives the fix.
- Log the internal detail and return a generic message. A stack trace or a path maps the system.
- Commit no machine path, user name or host name. It breaks the next clone. The tracker's holder field is the one exception: it records the name you choose with
git config basicly.holder.
Decision Protocol
- Decide yourself when the choice rests on code you read, is small, can be undone, and is not on the confirmation list.
- Stop and ask when a fact is missing, when sources conflict, or when an assumption you cannot check would change the result. Name what is missing and the answer that unblocks you. Offer only options you would take.
- When rules conflict, follow the safety and security rule.
- When the same approach fails twice, report the pattern and propose another approach.
External Facts
- Do not answer from memory about a third-party interface. A flag, field, model id, price, limit or version can change. Read our own adapter first, then the vendor's current documentation. The
interface-factsskill gives the steps. - An empty search result does not prove absence. Before you report a zero, run a positive control: a search that must match a case you have seen. When the control is also empty, the search is wrong. When it matches, check that the count of examined items moved. If the count did not move, the search never read the control.
- A capability is absent only when its action is absent, not its name. Before you report that a tool cannot do something, search for what it does, not only for the name you expected.
- Derive a number twice, by two paths that share no step. When they disagree, suspect the instrument first.
- When two causes predict the same result, say so and change the probe until they differ.
Require Explicit Confirmation
Ask the user before you:
- force-push, rewrite history, or discard uncommitted work:
git reset --hard,git checkout -- <path>,git restore,git stash,git clean,rm -rf; - read or write a
.env*file; - delete files, branches or data outside the task;
- edit CI/CD, deployment, infrastructure, ignore or secrets files;
- add, remove or upgrade a dependency;
- make a network call outside the task.
The deny-list blocks only some of these, and it differs per agent. A command that runs unblocked still needs confirmation. To undo your own edit, restore the file from a copy you made first.
IMPORTANT: never defeat a gate to make it pass. Do not skip or weaken a test, a lint or a type check, and do not bypass a hook (--no-verify, --no-gpg-sign). Fix the cause.
Ownership
- You own basicly. You are responsible for the harness and for the process that develops it.
- Improve both continuously: during development, and after each report from a user or a consumer.
- When a defect, a refusal or a report shows a gap, fix the cause. Then add the gate, the test or the rule that stops it from happening again.
- Follow the current practice of the vendors and of community experts, unless it makes install, use or upgrade less safe for a person who makes a mistake.
Project Overview
- basicly distributes a harness for coding agents. One YAML catalog is projected into agent instruction files, skills and git hooks. Other repositories install it with
basicly install. - Stack: Python 3.14 or later, managed with
uv. The version lives only insrc/basicly/__init__.py. Platforms: Linux, tested in CI; macOS and Windows run but CI no longer tests them. - The
basiclyCLI issrc/basicly/cli.py. This repository authors the catalog in.basicly/core/; its own overrides are in.basicly-local/. Scripts and CI helpers are in.scripts/. docs/architecture/architecture.mdis the authoritative design reference.- A change under
.basicly/core/kit/must work for a consumer with no engine. Name where that consumer gets the capability.
Harness Loop
- Start a session with
basicly session start. End it with a note tagged[session handover <date>]on the root record. - The tracker ledger is the source of truth for the work.
- Drive non-trivial work through the harness loop. The
harness-loopskill describes the phases, the commands and the checkpoints.
Quality Gate
- The person pays for two things: time and tokens. Choose the cheapest check that proves the step. Run the tests of what you touched while you iterate, and the whole suite once, before the commit.
- In a long run, report the elapsed time, the tokens spent where the host shows them, and the items left.
- Review the diff. Then run the change the way a consumer runs it, and read the output. Passing tests do not prove a working feature.
- Run the repository checks on what you touched, after the last edit. A later edit can break what passed.
- Read the pass or fail summary line. Truncated output hides failures.
- Report only what you ran, and say what you did not run. Do not turn "expected to work" into "works".
- When you claim that a check covers every item, name the list that the code reads. A general mechanism does not prove which items it covers.
- Check a claim against the code before it goes into a plan, a design document, a README or a release note. Mark a part that rests on code you did not read as an assumption.
- Before you retire a source system, list its files one by one and account for each. A check of what the import carried cannot see a file that the import never read.
Catalog Authoring
- Write catalog sources as YAML, never as a discoverable
.mdfile. In a repository that installs basicly, put your sources in.basicly-local/, becausebasicly installoverwrites.basicly/core/. - Start a source with
basicly catalog new skillorbasicly catalog new fragment, and follow thecatalog-authoringskill.basicly catalog lintchecks the format.
Session Completion
- Before you end a session, follow the
session-finishskill. Leave the repository clean, with no partial edits and no stray files. Report what changed, what you verified and what is still open. - After a refused change or a mistake the user corrected, name the root cause. Propose the fragment, skill or hook change that would have refused it. A note to "be careful" changes nothing.
Commands
Run these commands as written.
Setup:
uv sync --group dev
uv run pre-commit install --install-hooks -t pre-commit -t commit-msg -t pre-pushTest, whole suite then one file:
uv run pytest -q
uv run pytest tests/test_cli.py -qLint / format:
uv run ruff check
uv run ruff format --checkProjection gates (after editing catalog sources):
uv run basicly check
uv run basicly skills-check
uv run basicly styles-check
uv run basicly agents-check
uv run basicly hooks-check
uv run basicly permissions-checkGit Discipline
- Run
git commitas its own command. Do not chaingit push, a tag or a tracker update after it, because a refused commit leaves the chain half done. - The
commit-msghooks require a Conventional Commits subject and a trailing record id. Theconventional-commitsskill writes the message, and thework-trackerskill claims the record first. - When a hook refuses a commit, fix the cause it names and commit again.
Non-Interactive Shell
- Prefer a cross-platform command to shell-specific behaviour.
- Pass a non-interactive flag to a command that can wait for an answer:
cp -f,mv -f,rm -f,-y,ssh -o BatchMode=yes. Some shells alias these commands to interactive mode. - Never loop over an unquoted variable (
for x in $LIST). zsh does not split it, so the loop runs once and looks like success. Use an array ("${arr[@]}"), an inline list or one batch command, and check that the count changed. - Before a scripted replace across many sites, state the expected count, and compare it after. A different count is a stop.
External Review
Before a research or design document recommends a third-party project:
- Treat its README as a claim. Find the call sites and cite
file:line. A symbol with no non-test caller does not ship. - Test an absolute claim by trying to break it. A feature can exist and still be described too strongly.
- Read every licence file first,
NOTICEincluded, and check each directory. A licence restricts copying the code, not learning a fact from it. - Ask what the author sells. A recommended control that is the author's own product needs independent evidence.
- Check whether the argument assumes away a control this repository already runs.
- Say whether you established the mechanism or only a correlation.
Model Tier Routing
- A dispatch declares a tier:
low,medium,highormaximum. It never names a provider model id; the tier kit's model map resolves the tier. - Choose the tier by the cost per landed correct change: tokens, time and human interventions. A weak model's mistakes return as rework on the same change.
- Use
lowonly for work whose wrong answer a check catches and a rerun fixes cheaply. Start implementation from prose, decomposition, design and costly judgements athigh. - A dispatch with no tier is a bug. It inherits the session's own model.
Rendered Surfaces
A rendered page is an image. A page can pass every check and still be unreadable, so look at the picture:
- Render the page and open the screenshot before you call it done. On WSL, drive Windows Chrome over a UNC path:
chrome.exe --headless=new --disable-gpu --window-size=1920,1080 --screenshot=<win-path> "file://\\\\wsl.localhost\\<distro>\\<path>"- Check each acceptance criterion against the picture.
- Render from real data as well as the fixture. A fixture with fewer rows hides an overflow.
- Run the overflow check and read both of its signals,
render-overflowandrender-overlap. A clipped box shows no scrollbar.
uv run python .scripts/check_render_overflow.py <page.html>- Shoot every viewport width the layout claims.
Release Fragments
- A change a consumer can see writes
changelog.d/<record-id>.<category>.mdbefore its record closes: one bullet line, under 400 characters. - Write it in the same change. The release reads the tagged commit, and a closed record with a shipped scope and no fragment blocks the next commit on main.
Platform-Hermetic Tests
The local gate runs on one OS, and CI runs the others only after the push. So make the platform an input to the test:
- Test a path rule with both
PureWindowsPathandPurePosixPath.Pathtakes the form of the host. - Compare paths as
Pathobjects, or render both sides with the sameas_posix(). - Do not use
selectorselectorson a pipe, because on Windows they accept only sockets. Read in a thread and bound the read withjoin(timeout=...). - Wait for a condition, not a duration. Measure time with a monotonic clock.
- Use
skipifonly when the behaviour cannot exist on the other platform.
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.

