agentleFS
guillempucheguillempuche/shorts-studio/AGENTS.md

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

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
  1. Very specific:

    Run nix develop (or direnv with .envrc), then pnpm install and bin/shorts-studio doctor.

    line 22
  2. Very specific:

    Commits: follow the commit skill, with the settings in .claude/git-workflow.md.

    line 31
  3. Distinctive:

    Brand-neutral: No product, client or brand names in code, docs or samples.

    line 38

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

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

TopicSource
Commands, flags and outputsbin/shorts-studio --help, bin/shorts-studio schema show, or MCP tools/list
Architecture, data model, exit codes, key decisionsdocs/architecture.md
Behaviour today (specs) and planned changesopenspec/
Every number for pacing, motion and captionspackages/domain/src/direction.ts
The evidence behind those numbersdocs/research/
Providers, keys and costsdocs/providers.md
Installing, keys, Claude Code and Codex setupdocs/getting-started.md
Getting a change in, releasingCONTRIBUTING.md, CHANGELOG.md
Vendored Effect sourcedocs/vendors/README.md
The daily loop; directing beatsmake-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-propose skill) before you write code. Keep openspec validate --all --strict passing. Archive the change once it ships.
  • Tests sit next to the module they test (beats.ts and beats.test.ts) and follow the test-bdd skill: should … names and // GIVEN / WHEN / THEN comments. 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's src/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.ts and runs only on request (pnpm test:integration).
  • A new operation goes in packages/usecases/src/operations/ and its index.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 from packages/usecases/src/ports.ts, plus one line in providers/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, run pnpm schemas. After you change pnpm-lock.yaml, update the pnpmDeps hash in flake.nix (nix build prints it).
  • Commits follow the commit skill, 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 the readability-improver agent over the changed code.

Rules

  1. 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.
  2. No user content in git. Posts, media, brand.json and the ledger live under SHORTS_POSTS_DIR / SHORTS_DATA_DIR.
  3. Brand-neutral. No product, client or brand names in code, docs or samples.
  4. One place per fact. Link to it instead of repeating it. The table above says where each thing lives.
  5. 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-run first and show the estimate. The repo's agent settings ask before each paid call. Never raise spending caps unless the user asks.
  6. 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 one ShortsError with a tagged reason. Child processes use spawn with stopWhenAborted. Check every API against node_modules/effect/dist/**/*.d.ts or 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).

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.