agentleFS
keankean/Nuke/AGENTS.md

Nuke

AGENTS.md8.7k starsChanged yesterdayMITView on GitHub

Image loading for Apple platforms. This file is for agents and people working on Nuke itself. To write an app that uses Nuke, read llms.txt instead. The modules depend on each other as NukeExtensions → NukeUI → Nuke, and NukeVideo → Nuke. NukeUI re-exports Nuke. make ci runs exactly what CI runs: .scripts/ci.sh is the single source of truth for the matrix, and .github/workflows/ci.yml only passes it a group name. New CI work goes in ci.sh. CI runs NukeVideoTests on…

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Tests: use Swift Testing: @Test, #expect, and @Suite(.timeLimit(.minutes(5))).

    line 38
  2. Distinctive:

    Before tagging a release:

    line 52
  3. Very specific:

    Run make llms and commit the three files it writes, on their own, so the diff of the release shows what changed for agents.

    line 54
  4. Very specific:

    Run make release-check, which fails if they are stale.

    line 55

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

Nuke

Image loading for Apple platforms. This file is for agents and people working on Nuke itself. To write an app that uses Nuke, read llms.txt instead.

Layout

PathWhat's there
Sources/NukeThe core: ImagePipeline, ImageRequest, ImageTask, caches, decoders, processors, diagnostics
Sources/NukeUILazyImage, LazyImageView, ImageLoader, FetchImage, and animated image playback
Sources/NukeExtensionsSoft-deprecated UIImageView extensions
Sources/NukeVideoShort video decoding and playback
DocumentationDocC catalogs and migration guides, with Documentation/Migrations/Nuke 14 Migration Guide.md updated as changes land
Tests/DocumentationSnippetsThe code samples from the DocC articles and the skills, verbatim, as a package of their own
DemoThe NukeDemo app, run from Nuke.xcodeproj

The modules depend on each other as NukeExtensions → NukeUI → Nuke, and NukeVideo → Nuke. NukeUI re-exports Nuke.

Commands

make test-one TEST=ImageRequestTests/testInit   # One test or suite, on macOS, with a count of what ran
make test-one TEST=LazyImageTests SCHEME=NukeUI PLATFORM=iOS
make ci-macos                                   # One CI group; `make ci-list` lists them
make snippets                                   # Compile the documentation samples
make llms                                       # Regenerate llms.txt, llms-full.txt, and llms-api.txt (at the release)
make release-check                              # Fail if those three are stale
make docs                                       # Build the docs site in .build/docs. It deploys nothing
make lint                                       # SwiftLint

make ci runs exactly what CI runs: .scripts/ci.sh is the single source of truth for the matrix, and .github/workflows/ci.yml only passes it a group name. New CI work goes in ci.sh.

CI runs NukeVideoTests on macOS and on iOS 27 only, so run the NukeVideo scheme on tvOS too when you change Sources/NukeVideo. The NukeTests and NukeThreadSafetyTests schemes run Thread Sanitizer, which erases dispatch QoS, so use the Nuke scheme for anything about QoS or timing.

Conventions

  • Tests use Swift Testing: @Test, #expect, and @Suite(.timeLimit(.minutes(5))). Mocks are in Tests/Mocks, and helpers in Tests/Helpers.
  • Comments explain why, not what. Match the density and the voice of the file you're in.
  • Performance is not traded for cleanliness. If the only way to remove an @unchecked Sendable costs time, leave it. Don't add a lock to satisfy the checker: if a property is written once before it escapes, annotate it with nonisolated(unsafe).
  • Removed API stays as an @available(*, unavailable) stub whose message names the replacement, in a Deprecated.swift. The message goes straight into the compiler error, so it's the migration guide for anyone who doesn't read one. See the comment at the top of Sources/Nuke/Pipeline/Deprecated.swift.
  • A source-breaking change gets a section in the migration guide with // Nuke 13 and // Nuke 14 samples. If the compiler can't report it, or a default changes, add it to skills/nuke-migrate/SKILL.md as well.
  • A code sample in an article is compiled: add it to Tests/DocumentationSnippets, verbatim. Declare a delegate conformance in an extension, which is the only place the compiler warns about a method that nearly matches a requirement.
  • llms.txt, llms-full.txt, and llms-api.txt are generated from the articles, the skills, and the sources, and only regenerated at the release: don't commit them in a pull request. Every change to an article, a skill, or a public API changes them, so regenerating in each pull request made all of them conflict with each other. CI still checks what can go wrong in a pull request: that a skill is valid, that its samples are compiled, and that the files can be generated. A new article goes in ARTICLE_ORDER in .scripts/generate-llms.py.
  • skills/ is what an agent reads to speed up Nuke (nuke-optimize), and to upgrade to it (nuke-migrate). When the recommended way to do something changes, change it here too. Every sample has to be in a Skill*Snippets.swift file in Tests/DocumentationSnippets/Snippets, which CI checks. Only the // Nuke 14 half of a migration sample is. A delegate method has to match ImagePipeline+Delegate.swift, which CI also checks, because compiling proves nothing about those.
  • A number in nuke-optimize comes from a measurement: note what it was measured on, and rerun it rather than estimating.
  • CHANGELOG.md is updated by the maintainer, in terse entries, one line each, with no period at the end and the PR linked.
  • Commits and PRs carry no Co-Authored-By, session, or "Generated with" lines.

Releasing

Before tagging a release:

  1. Run make llms and commit the three files it writes, on their own, so the diff of the release shows what changed for agents.
  2. Run make release-check, which fails if they are stale. The generator reads the sources it is run on, so run it on the commit you are going to tag.

The files are what a project that depends on Nuke has in its checkout, at the version it resolved, so a tag cut without this step ships documentation from the last release.

Download now (ZIP)

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.

    Of the AGENTS.md files we read, the 28,693 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 repository5 other files it gives its agents.

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.