agentleFS
MSKazemiMSKazemi/idkmesh/AGENTS.md

idkmesh

AGENTS.md2 starsChanged 2 months agoApache-2.0View on GitHub

Core prototypes live in experiments/, simulations in randomness_lab/ and sim/, bindings in interop/, and utilities in tools/ and scripts/. Put tests in tests/ (or interop/tests/) and fixtures under tests/fixtures/ or verification/fixtures/. JSON contracts belong in schemas/, samples in examples/, outputs in results/, policies/state in config/ and state/, and rationale in docs/. Read README.md, CONTRIBUTING.md, and PROJECT_RULES.md first. Use ARCHITECTURE.md for the current system map, ROADMAP.md for evidence-gated future work, and docs/README.md for deeper subsystem/research indexes. The supported local entry points…

  • Installs packages
  • 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,736 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 repositoryOne other file it gives its agents.

The file

We split this AGENTS.md into the rules it gives an agent

4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    keep public documentation in the same bounded change when commands, interfaces, architecture, or evidence boundaries change.

    line 39
  2. Distinctive:

    run the smallest useful feedback loop while editing, then the repository gate appropriate to the final diff.

    line 40
  3. Distinctive:

    never represent owner-controlled automation as independent human or external-agent review.

    line 42
  4. Distinctive:

    Prefer one reviewable outcome per branch/PR over broad speculative rewrites.

    line 44

≈ “Common” is an estimate: at least 1 in 5 of the 16,597 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

Repository Guidelines

Project Structure & Module Organization

Core prototypes live in experiments/, simulations in randomness_lab/ and sim/, bindings in interop/, and utilities in tools/ and scripts/. Put tests in tests/ (or interop/tests/) and fixtures under tests/fixtures/ or verification/fixtures/. JSON contracts belong in schemas/, samples in examples/, outputs in results/, policies/state in config/ and state/, and rationale in docs/. Read README.md, CONTRIBUTING.md, and PROJECT_RULES.md first. Use ARCHITECTURE.md for the current system map, ROADMAP.md for evidence-gated future work, and docs/README.md for deeper subsystem/research indexes.

Build, Test, and Development Commands

The supported local entry points now live in the repository and delegate to the same scripts/testkit.py tiers used by the documented development workflow:

make setup          # create .venv and install core test dependencies
make smoke          # tests affected by the current working-tree change
make gate           # cheapest complete tier for the current change
make test           # full non-simulation/unit tier
make integration    # unit + schema/link integration gates

make setup and the Makefile targets are intended for POSIX-style development environments. The direct Python path remains supported and is the portable fallback:

python -m venv .venv && source .venv/bin/activate
python -m pip install -r requirements-phase0.txt pytest
python -m pytest -q
python -m randomness_lab --policy thompson --rounds 100 --seed 42

pytest.ini sets the repository root on pythonpath, so PYTHONPATH=. is no longer required for pytest on current main. See docs/TESTING.md for tier budgets, caching, hooks, CI parity, and Windows-specific guidance. Use a focused module, such as python -m pytest -q tests/test_r2.py, while iterating.

Do not use python -m unittest discover to check your work. It silently under-collects: unittest only finds TestCase subclasses, so the 315 module-level test_* functions spread across 32 files in tests/ are invisible to it — roughly a tenth of the suite, reported as OK with no warning that anything was missed. tests/test_documented_test_counts.py re-measures both figures and the gap they explain, so this paragraph fails the suite if it drifts.

Agent Contribution Loop

Autonomous agents should treat current repository state as evidence, not memory. Before changing code or docs:

  1. refresh from current main and note the exact base revision;
  2. inspect relevant open issues and pull requests so work is not duplicated;
  3. distinguish code already on main from PR-only, proposed, historical, or experimental behavior;
  4. keep public documentation in the same bounded change when commands, interfaces, architecture, or evidence boundaries change;
  5. run the smallest useful feedback loop while editing, then the repository gate appropriate to the final diff;
  6. report the commands actually run, their actual result, remaining uncertainty, and AI/tool provenance;
  7. never represent owner-controlled automation as independent human or external-agent review.

Prefer one reviewable outcome per branch/PR over broad speculative rewrites. If a requested feature depends on a human-only evidence gate or missing authority, document the blocker instead of manufacturing evidence.

Agent publication backpressure

When an agent or automation writes several files through the GitHub API, batch the finished candidate into one branch commit / one ref update whenever practical. Do not use one Contents-API mutation per file on an open PR: every branch-head change can create a new synchronize event, invalidate exact-head evidence, and start another Actions wave.

tools/github_atomic_commit.py is the supported path. Plan offline first, then publish once the bounded change and its focused checks are ready:

python tools/github_atomic_commit.py plan \
  --branch agent/my-work \
  --expected-head <sha> \
  --write path/in/repo=/tmp/file \
  --json

The tool binds publication to an exact expected head, rechecks that head immediately before moving the ref, publishes one Git tree and one commit, and updates the branch with a non-force ref update. A changed branch head is a stop/replan condition, not permission to force-push. Direct writes to main remain forbidden by the normal contribution path. See docs/operations/JULES_AUTOMATION.md for the full guarantees, CLI reference, and failure modes.

Provider-owned agents that cannot call this tool directly must still follow the same behavioural rule: accumulate a coherent candidate provider-side, then minimize PR-head updates rather than streaming a commit for every file edit or repair step.

Jules Dispatch Boundary

For repository-operated Google Jules work, agent-ready is an explicit maintainer/trusted-triager approval boundary. Separately, the deterministic Issue Model Router may emit agent:jules-eligible for the narrow automatic lane; the dispatcher accepts that route only for trusted GitHub author associations and still applies hard veto labels, capacity limits, duplicate protection, and provider-session reconciliation. Automatic execution goes through the official Jules REST API and records agent:jules-dispatched; failed/stalled sessions move to agent:jules-needs-attention, which blocks automatic redispatch. The legacy jules label is manual/native-App fallback only and must not be added by automation. Never approve or auto-route work that requires genuine human observation, independent research/evidence, security approval, governance judgment, secret handling, or broad decomposition. See docs/operations/JULES_AUTOMATION.md and config/jules-dispatch.json for the full queue/trust/watchdog contract. The router-to-dispatcher handoff through local workflow_call, the issue_number reusable-workflow input, and tools/check_jules_contract.py in the required PR Gate and both production workflows are protected integration invariants: do not replace them with gh workflow run, remove them, or duplicate the queue-label contract in code without an explicit reviewed architecture change. The router alone owns control-plane push recovery; do not add a second dispatcher push trigger. Keep Jules account/provider concurrency in config/jules-dispatch.json under provider_concurrency.max_concurrent_tasks; repository review reservations and provider-active session occupancy are separate budgets, and dispatcher code must use the smaller remaining budget without counting terminal provider sessions as running work. GitHub Actions verification backlog is a third admission gate: the dispatcher must read it with actions: read, fail closed when the signal is unavailable, and never add new dispatch reservations above the configured queued/in-progress ceilings. Provider/CI backpressure must leave work queued rather than bypassing a cap.

Local Coding-Agent Sandbox Boundary

Local coding-agent presets are untrusted candidate workers. A preset with sandbox_required=true must never be executed through raw run_bounded_process() as a fallback. Use the LocalSandboxExecutor boundary defined by docs/specifications/LOCAL_AGENT_EXECUTION_BOUNDARY_V0_1.md; execution fails closed unless process-tree, CPU, memory, disk, PID, filesystem, credential, and network enforcement match the canonical WorkUnit and AgentPreset. Candidate patches/logs are captured after execution outside worker authority and carry no verification, acceptance, or merge authority. Issue #804 owns the first real sandbox backend; until it is proven, do not represent goose/Gemini/mini-SWE-agent as safely executable on the host.

Coding Style & Naming Conventions

Follow existing Python conventions: four-space indentation, type hints for public interfaces, and deterministic seeded experiments. Use snake_case for files/functions, PascalCase for classes, and uppercase constants. Keep CLI scripts runnable from the repository root. No formatter or linter is mandated; match nearby code and avoid unnecessary dependencies.

Testing Guidelines

pytest is the canonical runner. The suite intentionally contains both unittest.TestCase-style tests and module-level pytest test_* functions, so do not infer collection from one style alone. Add regression tests and deterministic fixtures. There is no numeric coverage threshold; run the relevant focused tests while editing and the appropriate scripts/testkit.py/Makefile tier before proposing integration. Schema, link, workflow, self-test, CLI, and simulation checks are mirrored by repository workflows as documented in docs/TESTING.md and .github/workflows/.

Branch Integration & Merge Safety

Never merge branch refs directly or bulk-merge stale branches. Follow docs/planning/BRANCH_CONVERGENCE_POLICY.md: open a bounded PR, review its exact diff, and require green checks and current evidence for the exact head SHA. Drafts and evidence-frozen branches remain blocked until their named gates pass. Prefer squash merge for ordinary short-lived work. After every merge, refresh main and re-evaluate the next PR; prior eligibility is stale. For diverged work, transplant only the useful delta onto a clean current-main branch. main is protected: gate (3.11) and gate (3.13) are required checks, and force-pushes and branch deletion are blocked. Protection does not enforce the rest of this section—it requires zero approving reviews, does not bind administrators, does not require a branch to be current with main before merging, and cannot judge whether evidence is current for the exact head SHA—so maintainers must still apply the review, evidence, and merge-order rules above manually.

Commit & Pull Request Guidelines

Use concise, imperative subjects with useful prefixes such as docs:, interop:, evidence:, or E015:. Keep commits and PRs focused. Complete the PR template with motivation, verification, related issues, risks, Community Impact, and AI/tool provenance. Discuss large or costly changes in an issue/RFC first. Report vulnerabilities through SECURITY.md, never a public issue.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.