agentleFS
10k1110k11/flux/AGENTS.md

flux

AGENTS.md69 starsChanged 8 days agoMITView on GitHub

Welcome, agent. AI-assisted contributions are explicitly welcome in this repository. This file tells you everything needed to make a good PR. Humans: this is also a fast architecture tour. A self-hostable media workspace: paste a link, pick MP4/MP3, save offline. Node.js (>=22.9) back end that drives its media engine and FFmpeg; plain HTML/CSS/ES-module front end with no build step. Only two runtime dependencies (google-auth-library, ipaddr.js). Keep it that way. A PR must pass check, format:check and test. CI runs these…

  • Reads credentials
  • 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 32,671 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 repository2 other files it gives its agents.

The file

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

6 rules. About 0 are common, 4 are distinctive, and 2 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.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Don't fabricate UI state: No fake progress, fake availability or placeholder data in production code.

    line 41
  2. Very specific:

    Keep accessibility intact: semantic HTML, keyboard operable, prefers-reduced-motion respected.

    line 44
  3. Distinctive:

    Commit messages: short imperative subject.

    line 51
  4. Distinctive:

    Keep PRs small (one concern).

    line 58
  5. Distinctive:

    If the task is unclear or conflicts with these rules, ask in the issue instead of guessing.

    line 59
  6. Very specific:

    Never open public issues for vulnerabilities.

    line 67

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

AGENTS.md: guide for AI coding agents

Welcome, agent. AI-assisted contributions are explicitly welcome in this repository. This file tells you everything needed to make a good PR. Humans: this is also a fast architecture tour.

What Flux is

A self-hostable media workspace: paste a link, pick MP4/MP3, save offline. Node.js (>=22.9) back end that drives its media engine and FFmpeg; plain HTML/CSS/ES-module front end with no build step. Only two runtime dependencies (google-auth-library, ipaddr.js). Keep it that way.

Commands

npm ci                 # install
npm run setup          # fetch the media engine (+ FFmpeg on Windows)
npm run dev            # http://localhost:3000, auto-restart
npm run check          # parse every module
npm test               # node:test unit/integration (needs ffmpeg on PATH or in ./bin)
npm run format:check   # Prettier (fix: npx prettier --write public lib server.mjs test scripts/check.mjs)
npm run test:browser   # Playwright e2e (server must be running)
npm run test:a11y      # axe-core WCAG A/AA (server must be running)

A PR must pass check, format:check and test. CI runs these on Node 22 and 24.

Map of the code

PathResponsibility
server.mjsHTTP routing, job queue/worker, rate limits, file delivery (range-enabled)
lib/auth.mjsGoogle OAuth (state, PKCE, nonce), hashed sessions, CSRF
lib/egress.mjsLoopback proxy for media-engine traffic: DNS pinning, public IPs only (SSRF defence)
lib/media.mjsEngine argument builder, format/quality rules, validation
lib/platforms.mjsSupported source families
public/Static front end: index.html, styles.css, app.js, api.js, components.js, icons.js
test/*.test.mjs = node:test; browser.mjs and accessibility.mjs = Playwright

Hard rules (PRs violating these will be closed)

  1. Never weaken security. Owner checks on every job/file, CSRF on every POST, guests cannot get full files (API returns 401), egress proxy cannot be bypassed. Any change in lib/auth.mjs, lib/egress.mjs, URL validation or file delivery must include a test for the denial path.
  2. No new runtime dependencies unless there is no reasonable alternative. Devtools are fine.
  3. No build step, no frameworks, no TypeScript migration. Plain JS, ES modules.
  4. Don't fabricate UI state. No fake progress, fake availability or placeholder data in production code.
  5. No DRM circumvention and no extraction from services that only license streaming (e.g. Spotify audio).
  6. No secrets, .env, binaries, downloaded media or large generated files in commits.
  7. Keep accessibility intact: semantic HTML, keyboard operable, prefers-reduced-motion respected.
  8. Source-platform allowlist changes need a test including a look-alike host (youtube.com.evil.test).

Style

  • Prettier defaults (config-free). Small, focused functions. Match surrounding code.
  • Tests: node:test + node:assert/strict. Prefer real behaviour over mocks.
  • Commit messages: short imperative subject.

How to contribute as an agent

  1. Pick an issue labelled good first issue or help wanted. Comment that you're taking it, to avoid duplicate work.
  2. Fork, branch, open a PR against main. Contributors do not push to main directly. Maintainers merge after CI and review.
  3. Fill in the PR template honestly: what you ran, what you did not run. Disclose that the PR is AI-assisted (a one-line note is enough) and make sure a human has reviewed it before submitting where your operator is able to.
  4. Keep PRs small (one concern). Large refactors need an issue and agreement first.
  5. If the task is unclear or conflicts with these rules, ask in the issue instead of guessing.

Ideas that would be especially welcome

See open issues. Standing wishes: more tests on edge cases (range requests, expiry, cross-owner isolation), accessibility improvements, docs for more deployment setups, platform fixes, and performance of the queue/worker.

Security

Never open public issues for vulnerabilities. See SECURITY.md.

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.