phosphor-cam
AGENTS.md167 starsChanged 3 months agoMITView on GitHub
- 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 35,196 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.
- public/llms-full.txtllms.txt
- public/llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is 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.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 32
Don't edit dist/ (generated).
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 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
Commands
- Bun is the package manager (
bun@1.4.0in.bun-version,bun.lock); CI usesbun install --frozen-lockfile. Ignore CONTRIBUTING.md's npm instructions. bun run dev— Vite onhttp://localhost:5173(camera needs HTTPS or localhost).bun run build—tsc -b && bun --bun vite build;bun run previewservesdist/.- CI gate, in order:
bun run format:check→bun run lint→bun run typecheck→bun run build. bun run typecheckchecks nothing: roottsconfig.jsonhasfiles: []and only referencestsconfig.node.json, sotsc --noEmitloads zero source files. Usebunx tsc -b(orbun run build) for a real typecheck.- There is no test suite; the CI job named
testonly runs lint/typecheck/build. Verify with the CI chain plus a manual browser check — don't claim tests passed. - Formatting is oxfmt (double quotes, semicolons, 80 cols, LF, sorted imports and Tailwind classes). Run
bun run format; husky + lint-staged also runs on commit.
Architecture
- React 19 + TypeScript + Vite + Tailwind v4 + Zustand.
@/maps tosrc/in both Vite and TS. Fully client-side; no API or backend. - Routes in
src/App.tsx:/camera,/studioempty state,/studio/editeditor. Opening/studio/editwithout a loaded image redirects to/studio. - Render path: source frame →
downsampleFrame→ renderer fromRENDERERS(src/core/renderers/registry.ts) →runEffectPipeline→ canvas. Both surfaces run this in a module worker withOffscreenCanvas; main-thread controllers only send bitmaps and settings. src/core/is worker-safe shared code: no React orwindow/document.src/features/camandsrc/features/studioown their stores, workers, and UI.src/sharedholds the settings contract, constants, and controls used by both.AsciiSettingsis the single settings shape for camera and Studio. Adding a control generally touchessrc/shared/types/ascii.ts,src/shared/constants/defaultSettings.ts, desktop UI insrc/shared/components/settings/desktop/, mobile UI insrc/shared/components/settings/mobile/tools/, and possiblysrc/features/studio/constants/presets.ts.- Effects run in fixed order from
EFFECT_PIPELINE(chromatic aberration → glow → bloom → halation → vignette → scanlines → grain). Order changes output; don't reorder casually. - Adding a render mode: extend
RenderMode, add a factory toRENDERERS, add a label toRENDER_MODES, and implement theRendererInstanceinterface (optionalcaptureImage/getAsciiText). CHAR_SETShas 22 sets, butAsciiSettings["characterSet"]is still a 5-value union and the pickers cast around it. Widen the union when adding sets.
Gotchas
- README and
index.htmlmarketing copy lags the code:index.htmlsays 5 character sets and "4K"; actual is 22 sets and 1×–20× export. README says "color wheel"; actual UI is H/S/B sliders. Derive behavior fromsrc/, not prose. - Version lives in
src/features/cam/constants/version.ts(v1.4.0) andandroid/app/build.gradle(versionName/versionCode).package.jsonis intentionally0.0.0and is not the source of truth. - Studio intentionally downscales uploads to a 1600 px long edge / viewport pixel budget (
getStudioSourceSize). It keeps previews and 20× exports from allocating huge canvases; don't remove it as an "optimization". public/sw.jsis hand-written and registered only in production builds. It can serve cached shell/assets after a deploy; test with a fresh profile or cleared site data.- Native is Capacitor Android (
site.aroy.phosphor). GuardFilesystem/App/StatusBarbehindisNative(); runbun run android:syncafter web changes.android:devneeds a connected device withadb reverse. - Static discovery files live in
public/:robots.txt,sitemap.xml,llms.txt,llms-full.txt,humans.txt,.well-known/security.txt. Update them when routes or features change. - Don't edit
dist/(generated).archive/is old, gitignored material, not current docs. PRODUCT.mdforbids fabricated social proof, benchmarks, and pricing claims; don't invent them in docs or metadata.
Delivery
- Push/merge to
main→ CI "Lint & Build" →deploy.ymldeploysdist/to Cloudflare Pages. There is no manual deploy step. - Publishing a GitHub release triggers
android-release.yml, which builds, signs, and attaches the APK. Localbun run android:releaseneeds theANDROID_*signing variables in.env(gitignored).
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.

