agentleFS
MicrosoftKnown publishermicrosoft/snmalloc/.github/copilot-instructions.md

snmalloc

Copilot instructions2k starsChanged 59 days agoMITView on GitHub

- Read the relevant code before proposing or making changes. Keep changes focused, preserve existing structure where practical, and avoid unrelated renames or refactoring. - Use a written plan for genuinely multi-stage work or when the user requests one. Store repository plans in PLAN.md, and obtain approval before implementing a plan that introduces significant design choices. - Match validation effort to the risk and scope of the change. Establish a relevant baseline before broad or high-risk work; small changes may…

Trending

Less talk lately.about the whole repository

Dec 2025: 1 mentionJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 3 mentionsApr 2026: 0 mentionsMay 2026: 1 mentionJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 5 mentionsSep 2026: 3 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the microsoft/snmalloc repository that our weekly crawl found. There is no adoption data for this file yet.

Who's talking about microsoft/snmalloc

The biggest 5 of 46 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 46

Talked about on GitHub, Hacker News and Bluesky (46 times).

On GitHub · 35

30 more on GitHub

On Hacker News · 9

4 more on Hacker News

The file

Show its rules and text

We split this copilot-instructions.md into the rules it gives an agent

15 rules. About 0 are common, 10 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the relevant code before proposing or making changes.

    line 5
  2. Very specific:

    Use a written plan for genuinely multi-stage work or when the user requests one.

    line 8
  3. Distinctive:

    Verify hypotheses before implementing a workaround.

    line 26
  4. Very specific:

    Start by checking new or changed code, but do not claim that main is broken from a local failure alone.

    line 28
  5. Distinctive:

    When a bug pattern may occur more than once, search the complete change for other instances and fix the relevant occurrences together.

    line 31
  6. Distinctive:

    Prefer designs simple enough that their correctness is evident.

    line 36
  7. Very specific:

    Use the cross-platform macros from ds_core/defines.h rather than raw compiler attributes such as __attribute__((used)) or __forceinline.

    line 39
  8. Distinctive:

    Do not encode platform assumptions such as a fixed virtual-address width or maximum allocation derived from one current platform.

    line 41
  9. Distinctive:

    Keep headers minimal and include only direct dependencies.

    line 47
  10. Very specific:

    Do not depend directly on the C++ standard library.

    line 48
  11. Distinctive:

    Prefer explicit wiring and conversions over hidden dependencies or convention-based behaviour.

    line 50
  12. Distinctive:

    Document behavioural coupling at the component whose modification could break the dependency.

    line 52
  13. Distinctive:

    Avoid over-engineering and review churn.

    line 59
  14. Distinctive:

    Update comments, tests, and documentation made stale by the change.

    line 63
  15. Very specific:

    Follow .github/skills/building_and_testing.md.

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 1,644 Copilot instructions 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
copilot-instructions.md

AI Guidelines for snmalloc

Working Style

  • Read the relevant code before proposing or making changes. Keep changes focused, preserve existing structure where practical, and avoid unrelated renames or refactoring.
  • Use a written plan for genuinely multi-stage work or when the user requests one. Store repository plans in PLAN.md, and obtain approval before implementing a plan that introduces significant design choices.
  • Match validation effort to the risk and scope of the change. Establish a relevant baseline before broad or high-risk work; small changes may use targeted validation. Use CI or origin/main when failure attribution is unclear.
  • Complete approved work through validation and a bounded self-review before reporting it done. Use independent review when the breadth, risk, or complexity of the change warrants it.
  • Report incidental findings separately unless they are necessary to make the requested change correct. Challenge instructions or assumptions when evidence contradicts them.

Debugging

  • Allocator tracing must use write() directly to stderr or a file rather than printf or message, which may recurse through the allocator.
  • Verify hypotheses before implementing a workaround. Inspect the actual data, write a minimal reproducer, or compare against a known-good revision.
  • Start by checking new or changed code, but do not claim that main is broken from a local failure alone. Check CI and, when useful, reproduce on origin/main.
  • When a bug pattern may occur more than once, search the complete change for other instances and fix the relevant occurrences together.

Code Quality

  • Prefer designs simple enough that their correctness is evident. Do not mistake the absence of an obvious bug in a complicated design for evidence that the design is correct.
  • Use the cross-platform macros from ds_core/defines.h rather than raw compiler attributes such as __attribute__((used)) or __forceinline.
  • Do not encode platform assumptions such as a fixed virtual-address width or maximum allocation derived from one current platform.
  • Trust existing API-boundary bounds checks. Internal code should defer edge cases to the backend rather than adding redundant checks.
  • New caches and intermediate data structures must safely bypass inputs outside the range they handle.
  • Keep headers minimal and include only direct dependencies.
  • Do not depend directly on the C++ standard library. Use C headers such as <stdint.h> and <stddef.h>, or the wrappers in src/snmalloc/stl/.
  • Prefer explicit wiring and conversions over hidden dependencies or convention-based behaviour.
  • Document behavioural coupling at the component whose modification could break the dependency.
  • Design code to be easy to change, but do not add extension points or abstractions for hypothetical requirements.

Change Discipline

  • Avoid over-engineering and review churn. Preserve names and function boundaries unless changing them improves correctness or clarity.
  • Evaluate copied implementation patterns in their new context rather than reproducing incidental choices.
  • Update comments, tests, and documentation made stale by the change.
  • Comments and documentation describe current behaviour, not the history of the change.

Building, Testing, and Benchmarking

Follow .github/skills/building_and_testing.md. Select validation based on the affected behaviour and report commands and failures factually.

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.