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.
- .github/copilot-instructions.mdCopilot instructions
- llms.txtllms.txt
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
- Distinctive: line 41
Don't fabricate UI state: No fake progress, fake availability or placeholder data in production code.
- Very specific: line 44
Keep accessibility intact: semantic HTML, keyboard operable, prefers-reduced-motion respected.
- Distinctive: line 51
Commit messages: short imperative subject.
- Distinctive: line 58
Keep PRs small (one concern).
- Distinctive: line 59
If the task is unclear or conflicts with these rules, ask in the issue instead of guessing.
- Very specific: line 67
Never open public issues for vulnerabilities.
≈ “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.
Files
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
| Path | Responsibility |
server.mjs | HTTP routing, job queue/worker, rate limits, file delivery (range-enabled) |
lib/auth.mjs | Google OAuth (state, PKCE, nonce), hashed sessions, CSRF |
lib/egress.mjs | Loopback proxy for media-engine traffic: DNS pinning, public IPs only (SSRF defence) |
lib/media.mjs | Engine argument builder, format/quality rules, validation |
lib/platforms.mjs | Supported 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)
- 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. - No new runtime dependencies unless there is no reasonable alternative. Devtools are fine.
- No build step, no frameworks, no TypeScript migration. Plain JS, ES modules.
- Don't fabricate UI state. No fake progress, fake availability or placeholder data in production code.
- No DRM circumvention and no extraction from services that only license streaming (e.g. Spotify audio).
- No secrets,
.env, binaries, downloaded media or large generated files in commits. - Keep accessibility intact: semantic HTML, keyboard operable,
prefers-reduced-motionrespected. - 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
- Pick an issue labelled
good first issueorhelp wanted. Comment that you're taking it, to avoid duplicate work. - Fork, branch, open a PR against
main. Contributors do not push tomaindirectly. Maintainers merge after CI and review. - 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.
- Keep PRs small (one concern). Large refactors need an issue and agreement first.
- 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.
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.

