shorts-studio
AGENTS.md2 starsChanged 3 days agoApache-2.0View on GitHub
Rules for people and AI agents who work in this repository. Claude Code and Codex both read this file. Don't add a CLAUDE.md: Claude Code would stop loading this one. For what shorts-studio is, see README.md. Run nix develop (or direnv with .envrc), then pnpm install and bin/shorts-studio doctor. Run doctor before you decide something is broken. A missing key, or an FFmpeg without libass, fails in ways that look like bugs.
- 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 31,439 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 repository16 other files it gives its agents.
- make-shortsSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- story-directionSkill
- make-shortsSkill
- openspec-apply-changeSkill
- openspec-archive-changeSkill
- openspec-exploreSkill
- openspec-proposeSkill
- openspec-sync-specsSkill
- openspec-update-changeSkill
- story-directionSkill
The file
We split this AGENTS.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 22
Run nix develop (or direnv with .envrc), then pnpm install and bin/shorts-studio doctor.
- Very specific: line 31
Commits: follow the commit skill, with the settings in .claude/git-workflow.md.
- Distinctive: line 38
Brand-neutral: No product, client or brand names in code, docs or samples.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 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
Rules for people and AI agents who work in this repository. Claude Code and Codex both read this file. Don't add a CLAUDE.md: Claude Code would stop loading this one. For what shorts-studio is, see README.md.
Where things are
| Topic | Source |
| Commands, flags and outputs | bin/shorts-studio --help, bin/shorts-studio schema show, or MCP tools/list |
| Architecture, data model, exit codes, key decisions | docs/architecture.md |
| Behaviour today (specs) and planned changes | openspec/ |
| Every number for pacing, motion and captions | packages/domain/src/direction.ts |
| The evidence behind those numbers | docs/research/ |
| Providers, keys and costs | docs/providers.md |
| Installing, keys, Claude Code and Codex setup | docs/getting-started.md |
| Getting a change in, releasing | CONTRIBUTING.md, CHANGELOG.md |
| Vendored Effect source | docs/vendors/README.md |
| The daily loop; directing beats | make-shorts, story-direction skills |
Setup
Run nix develop (or direnv with .envrc), then pnpm install and bin/shorts-studio doctor. Run doctor before you decide something is broken. A missing key, or an FFmpeg without libass, fails in ways that look like bugs.
How to work
- Behaviour changes start in OpenSpec.
openspec/specs/is how the system behaves today.openspec/changes/is pending work. Propose a change (openspec-proposeskill) before you write code. Keepopenspec validate --all --strictpassing. Archive the change once it ships. - Tests sit next to the module they test (
beats.tsandbeats.test.ts) and follow thetest-bddskill:should …names and// GIVEN / WHEN / THENcomments. Use cases get in-memory fake ports; providers are tested against a local fake of their service. Shared helpers (test context, fakes, contracts, fake services) live in each package'ssrc/test/, which production code can't import (a biome rule) and the Nix package leaves out. Anything that needs ffmpeg, the network or a paid API goes in*.integration.test.tsand runs only on request (pnpm test:integration). - A new operation goes in
packages/usecases/src/operations/and itsindex.ts. It then appears on both the CLI and MCP, and the parity test checks both. - A new provider goes in
packages/providers/src/, implementing a port frompackages/usecases/src/ports.ts, plus one line inproviders/src/index.ts. Its test file runs that port's shared contract (imageMakerContract,transcriberContract) against a local fake of the service. Layers point inward: apps → providers → usecases → domain (architecture). - Checks before pushing:
pnpm check && pnpm check-types && pnpm test && pnpm check-links. After you change the Post, Config or Brand schema, runpnpm schemas. After you changepnpm-lock.yaml, update thepnpmDepshash inflake.nix(nix buildprints it). - Commits follow the
commitskill, with the settings in.claude/git-workflow.md. Show the preview and wait for the user's OK before committing. - Before committing a larger change, review it. Use Effect where it fits, and check its API in the installed
.d.ts. Comments explain why, in a line or two. Run thereadability-improveragent over the changed code.
Rules
- No secrets in git. Key names live in .env.example. Key values live in the environment or the macOS Keychain. Never print or log them.
- No user content in git. Posts, media,
brand.jsonand the ledger live underSHORTS_POSTS_DIR/SHORTS_DATA_DIR. - Brand-neutral. No product, client or brand names in code, docs or samples.
- One place per fact. Link to it instead of repeating it. The table above says where each thing lives.
- The user decides. Approving a script (
script approve) or a draft (post review) is CLI-only and needs the user's terminal. Never run them for the user. Run spending commands with--dry-runfirst and show the estimate. The repo's agent settings ask before each paid call. Never raise spending caps unless the user asks. - Effect where it fits. The repo uses
effect@4.1.2(effect/cli,effect/ai). Outside services are ports (Effect services) with one layer per provider. Failures are oneShortsErrorwith a taggedreason. Child processes usespawnwithstopWhenAborted. Check every API againstnode_modules/effect/dist/**/*.d.tsor docs/vendors/effect, never from memory. Why: key decisions.
Skills
Edit skills only in .agents/skills/, where Codex reads them. Then run pnpm skills:sync. .claude/skills/ is a copy for Claude Code, and the pre-commit hook refuses a commit where the two differ. openspec update generates the openspec-* skills, so don't edit them by hand. commit, pr, test-bdd and the readability-improver agent come from the guillempuche/ai-standards plugin marketplace (setup per tool).
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.

