artifact-fs
AGENTS.md1.2k starsChanged 8 months agoApache-2.0View on GitHub
Repository-specific guidance for artifact-fs.
Trending
Quiet since April.thin dataabout the whole repository
Who's talking about cloudflare/artifact-fs
- @matsuu.bsky.social“Gitに対応したバージョン管理ファイルシステムCloudflare Artifactsの実装部分をオープンソースで公開したものかな。FUSE実装になってる。実装言語はGo”Bluesky · Apr 29, 2026 · 1 likes
- langchain-ai/deepagents“test(sdk): artifact-fs FUSE mount integration test against LangSmith sandbox”GitHub · Apr 27, 2026
- EnterOS-AI/enter-os-core“feat(platform): Cloudflare Artifacts demo integration (#595)”GitHub · Apr 17, 2026
The biggest 3 of 3 mentions linking to the repository that our crawl found. Each line is their own headline.
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 repositoryOne other file it gives its agents.
- artifact-fsSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
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
- Very specific: line 9
Keep GIT_NO_LAZY_FETCH=1 on git cat-file --batch-check in batchResolveSizes.
- Very specific: line 11
Use the canonical model.* interfaces for snapshot, overlay, hydrator, and gitstore access.
- Very specific: line 39
Start with the narrowest relevant test: go test ./internal/<pkg> or go test -run TestName ./internal/<pkg>.
≈ “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
AGENTS.md
Repository-specific guidance for artifact-fs.
Code review rules
- Flag credentials in Git CLI arguments or unredacted logs. Pass credentials through the environment-based helper in
internal/gitstore/gitstore.go, and redact log output withauth.RedactString. - Flag blob bytes converted to
string. KeepBlobToCachebinary-safe by streaminggit cat-file --batchoutput to disk. - Keep
GIT_NO_LAZY_FETCH=1ongit cat-file --batch-checkinbatchResolveSizes. Removing it turns size resolution in blobless clones into network round-trips. - Normalize paths only with
model.CleanPath(). Do not add local wrappers. - Use the canonical
model.*interfaces for snapshot, overlay, hydrator, and gitstore access. Do not add subset interfaces around them.
Architecture
cmd/artifact-fsis the only binary entrypoint.internal/cliwires commands ontodaemon.Service.internal/daemonowns repo lifecycle: registry sync, snapshot publish, overlay reconcile, FUSE mount, watcher, refresh loop.internal/fusefsis the merged view and writable filesystem layer.internal/gitstoreis the performance-sensitive git wrapper; most easy-to-break invariants live there.internal/snapshotandinternal/overlayare persistent SQLite-backed stores.
Runtime contracts
ARTIFACT_FS_ROOTis the state root.artifact-fs daemon --rootis the mount root. They are different things.add-repois one-shot by default: register repo, clone blobless, build the initial snapshot, then exit. It does not mount FUSE or start background goroutines.add-repo --asynconly registers prepare state. The daemon mounts a gated placeholder, prepares clone/fetch and snapshot in the background, then opens the gate and starts watcher/refresh.daemonis long-running: it mounts registered repos and starts watcher, refresh, and hydrator workers.git.CloneBloblessalready populates the git index withread-tree HEAD; be careful about extra index resets because they can discard staged state.
Code conventions
Readdir()stays thin; merged directory logic belongs inReaddirTyped().- The watcher polls
HEADplus the current HEAD ref path. If you change it, preserve branch-switch and packed-ref behavior covered byinternal/watcher/watcher_test.go. - The overlay stores deletes as SQLite entries with
kind='delete'; there is no on-disk whiteout file layer. - SQLite is
modernc.org/sqlitein WAL mode viainternal/meta.
Validation
- Start with the narrowest relevant test:
go test ./internal/<pkg>orgo test -run TestName ./internal/<pkg>. - For non-trivial code changes, reproduce CI in order:
go build ./cmd/artifact-fs,go vet ./..., thengo test ./.... - Build only the CLI with
go build ./cmd/artifact-fs. - Benchmarks are opt-in:
AFS_RUN_BENCH=1 go test -run TestBenchRepos -v. - FUSE e2e tests are opt-in:
AFS_RUN_E2E_TESTS=1 go test -run TestE2E -v .. They require macFUSE on macOS or/dev/fuseon Linux. - E2E tests use a local bare repository by default. Set
AFS_E2E_REPOonly when intentionally testing a real remote. - E2E benchmark coverage is separate:
AFS_RUN_E2E_BENCH=1 go test -run TestE2EBenchmarkRepos -v .. - Package tests live beside the code. Benchmarks and
e2e*_test.golive in the root package.
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.

