AGENTS.md · diff

git:20261017.cce7e33 to git:20261017.9f7200f

47 added, 27 removed. Audit A to A.

- # Cinefoundry director
+ # Cinefoundry
- <!-- Standing instructions for the director agent. Cinefoundry Harness loads the Rules section for every sub-agent; other Agent Skills hosts read this file as project instructions. -->
+ Cinefoundry (影工坊) is an agentic film studio on one NVIDIA DGX Spark: one idea in, a finished film out. One agent
+ engine (`src/engine`) runs a pipeline per format (`src/pipelines`); every stage is an agent working under its skills
+ (`.agents/skills`), and code checks every result before the next stage starts. This file is read by every agent that
+ works on or with this repository. The `## Rules` section at the end is also injected into every agent the engine runs.
- You are the director of Cinefoundry, a studio that turns an advertising brief into a finished
- short film on one DGX Spark. You plan, delegate to skills, check results, and keep the
- project record truthful. The `cinefoundry` CLI is your hands; the skills are your craft.
+ ## Formats
- ## Pipeline
+ | Format | Command | Pipeline | Defaults |
+ |---|---|---|---|
+ | Ad film | `cinefoundry ad "<brief>"` | brief → creative → script → compliance → storyboard → frames + gate → clips → cut | 30 s master (15 s and 6 s cutdowns), 16:9, native 1080p, 60 fps, −16 LUFS |
+ | Short video | `cinefoundry short "<topic>"` | topic → screenplay → compliance → shots → casting → frames + gate → dialogue → clips → sound → cut → packaging | 45 s, 9:16, 1080p, 30 fps, −14 LUFS |
+ | Micro-drama | `cinefoundry drama "<story>"` | development → screenplay → compliance → shots → casting → frames + gate → dialogue → clips → sound → cut | 60 s episodes, 9:16, 1080p, 24 fps, −14 LUFS |
- Work through the stages in order. Before each stage run
- `cinefoundry project stage --id <id> --stage <stage> --status running`, and set `done` or
- `failed --note "<why>"` after it. The studio board reads this record, so an unset stage
- looks like a stalled job to the person watching.
+ Entry skills: `cinefoundry-ad-film`, `cinefoundry-short-video`, `cinefoundry-micro-drama`. Each project records its
+ stages in `projects/<id>/state.json`; the studio board reads it.
- | Stage | Skill | Output in `projects/<id>/` |
- |---|---|---|
- | brief | `ad-brief-intake` | `state.json`, `brief.json` |
- | script | `ad-script-writing` | `script/script.json`, `script/copy.txt` |
- | compliance | `ad-compliance-review` | `reports/compliance.json` |
- | storyboard | `storyboard-design` | `storyboard/storyboard.json` |
- | frames | `spark-local-media-generation` | `refs/product.png` (hero still), then `frames/shot_NNN.png` anchored to it |
- | qa | `shot-quality-gate` | `reports/qa_N.json` |
- | clips | `spark-local-media-generation` | `clips/shot_NNN.mp4` |
- | cut | `final-cut-assembly` | end card, titles, voice and music, `cut/final.mp4`, `reports/delivery.md` |
+ ## The standard
- When the user supplies a reference ad, run `ad-reference-breakdown` before `storyboard`.
- Before `frames` and before `clips`, check memory with `spark-model-scheduler`.
+ Every film, every line of code, every skill and every sentence of documentation is held to the standard of a Hollywood
+ production and a top Chinese studio. The purpose is commercial: Cinefoundry is built to win paying clients and
+ investors, so nothing ships that a top agency, studio or engineering team would send back.
+ **Films.** Picture, performance, dialogue, sound, music, edit, grade and subtitles meet broadcast and platform
+ specifications (`docs/research/film-shortvideo-drama-standards.md`) and read as shot by a real crew, not generated.
+ A frame or a line that fails its gate is redone, and whatever is kept after the limit is reported as an open item.
+
+ **Code and engine.** Clear module boundaries (engine / crafts / pipelines / lib), typed interfaces, every rule that can
+ be checked is a validator with a test, every failure path leaves the project record truthful. Behaviour changes ship
+ with tests and the whole suite green (`npx tsc -p . --noEmit && npx vitest run`).
+
+ **Skills.** One skill per real production role, grounded in industry practice, concrete enough to act on, consistent
+ with the code that runs it (rules the code enforces are marked *checked*). Adding or removing a skill updates the
+ README's Agent Skills badge and skill list in the same change.
+
+ **Words.** README, GitHub About, docs and commit messages are written as a finished, professional product: precise,
+ confident, no filler. They state only what is true and measured: no unmeasured number, no claim the code does not
+ deliver, no development-status notes, no history of former names in the README.
+
+ ## Working on this repository
+
+ - Measure, don't estimate: timings come from run logs, memory from `cinefoundry mem status`.
+ - One film at a time on the GPU; never start a run while another holds `projects/.harness.lock`.
+ - Faces and voices are designed, never a real person's; every deliverable carries the explicit AI label and the implicit AIGC metadata, never removable.
+ - Outward-facing actions (pushing, publishing, renaming the repository, editing the GitHub About) follow the owner's instruction for that change.
+ - License: BUSL-1.1, source-available. Never describe the project as open source.
+
## Rules
- - Copy that fails compliance with a `block` finding never reaches media generation. Rewrite, rescan, then continue.
- - The product is decided once: a gated hero still, and every frame is generated from it. Never describe the product again per shot.
+ - Copy, screenplays and dialogue that fail compliance with a `block` finding never reach media generation. Rewrite, rescan, then continue.
+ - What must stay the same is decided once and every frame is generated from it: the product's gated hero still in an ad, each character's locked reference portrait in a narrative film. Never describe the product or a character's face again per shot.
- The image model never draws captions. All on-screen text is typeset in the cut, in a font checked to contain every character.
- - A frame that fails the quality gate is regenerated, at most twice per shot. After that, keep the best attempt, mark the shot in `delivery.md`, and move on.
+ - A frame that fails the quality gate is regenerated within its limit. After that, keep the best attempt, report it as an open item, and move on.
+ - Characters are adults. Dialogue is shot single - the speaker alone facing camera, or over the listener's shoulder - and every line fits one 5-second shot.
- Generation is local by default. Never send user material to a cloud service unless the user asked for it in this conversation; if they did, record the asset with `execution: cloud`.
- One diffusion family in memory at a time; release at every phase boundary.
- Report measured numbers only: seconds from the CLI output, memory from `cinefoundry mem status`. Never estimate a timing.
- - Ask the user only for what blocks the brief: the product, the audience, the one message. Decide the rest and state your choice.
- - When subagents are available, give each one a single stage with its inputs and the file it must write. Keep compliance and the quality gate with a different agent than the one that produced the work being checked.
+ - Ask the user only for what blocks the work: for an ad the product, the audience and the one message; for a story, the premise. Decide the rest and state your choice.
+ - When subagents are available, give each one a single stage with its inputs and the file it must write. Keep compliance and the quality gates with a different agent than the one that produced the work being checked.