video-workbench/AGENTS.md

90 lines
5.3 KiB
Markdown

# Video Workbench Agent Rules
## Text Encoding
All local project documents are UTF-8 unless a file explicitly declares another encoding.
When reading Markdown, JSON, YAML, text, handoff, prompt, or discussion files from PowerShell, use explicit UTF-8 by default:
```powershell
Get-Content -LiteralPath <path> -Encoding UTF8
Select-String -Path <path> -Pattern <pattern> -Encoding UTF8
```
When writing text files, preserve UTF-8. Do not rely on PowerShell encoding defaults for Chinese Markdown.
## CCPE Interface
The default external CCPE entrypoint is:
```text
C:\Users\wangq\Documents\Codex\ccpe-system\Interface.md
```
For CCPE setup or invocation work, read that file first, then follow it to:
```text
C:\Users\wangq\Documents\Codex\ccpe-system\runtimes\hybrid\ccpe-agent-consumer-setup.md
```
Do not hardcode old Agent, Lite, Skill, Runtime, or protocol paths as default CCPE entrypoints. Read narrower CCPE artifacts only when the consumer setup contract, a project-local registry, or the active task requires them.
Formal CCPE participant output requires a project-local registry, an invocation packet, a real participant carrier, and returned output saved only after the participant returns. Main-session roleplay is not formal CCPE output.
## Image Prompt Workflow
All image-generation prompts in this repository must be produced through the `gpt-image-2` Skill workflow. Do not draft final image prompts directly from memory or from a derived project skeleton alone.
Before writing any project-bound image prompt, run the Skill mode check and follow the resulting mode:
```powershell
node C:\Users\wangq\.agents\skills\gpt-image-2\scripts\check-mode.js --json
```
- Mode A: use the Skill's Garden generation/edit scripts and save prompt/image traces under `garden-gpt-image-2/`.
- Mode B: use the Skill as a prompt-engineering workflow, save the rendered prompt, then pass it to the host image tool only after user approval.
- Mode C / Advisor: use the Skill as a high-quality prompt advisor, save the rendered prompt, and do not claim an image was generated.
Current default success path for project-bound image generation:
1. Generate the final prompt/spec with the `gpt-image-2` Skill Advisor workflow.
2. When image references are needed, load the real reference image into the conversation context before generation.
3. Use the host `image_gen` tool with the loaded reference image assigned an explicit role such as `Image 1`.
Use this successful channel now and for future work. Do not switch normal Video Workbench image generation to API/Garden paths unless the user explicitly changes this policy.
For every project-bound image prompt document:
- Read the relevant `gpt-image-2` Skill template or reference file before drafting.
- Record the Skill mode, template/reference path, and source files actually read.
- Treat accepted `intake/` files and user-provided references as primary sources; use derived files such as `visual-system.md`, `execution-plan.md`, or `slides/slides.md` only as execution control summaries.
- If a prompt was drafted without the Skill workflow, label it as a non-generation-ready draft and rebuild it through the Skill before any image generation.
- When a local image outside the workspace is used, label its role explicitly as identity reference, edit target, or supporting reference, and do not proceed if the file cannot be read or approved.
- For near / identity-heavy shots, prefer a relevant crop reference. For distant / landscape-led shots, prefer the accepted anchor board or project-approved distant reference. Do not repeatedly re-ask whether references can work; the verified route is Skill Advisor prompt plus loaded reference image plus host `image_gen`.
Project-bound image generation must remain approval-gated: save the prompt/spec first, wait for user approval, then execute generation only when explicitly requested. A task-level user instruction that records the running mode and slide scope counts as explicit generation approval for that task scope. If the task mode is `prompt only`, do not generate images.
## Slide Task Workflow
For long slide / video production work, use the local slide task orchestration workflow:
```text
docs/workflows/slide-task-orchestration.md
docs/workflows/slide-task-templates.md
```
Rules:
- Use `projects/<project>/tasks/<task-id>/` for local orchestration records.
- The main session talks with the user and defines worker profile, running mode, slide scope, and review expectations.
- Child sessions write per-slide briefs and may handle at most 3 slides by default.
- A slide agent handles exactly 1 slide per invocation.
- The default worker profile for current MV / video work is `video-slide-production`.
- Reserved future profile `ppt-page-production` may use `docs/cases/`, but must be designed when the first real PPT task needs it.
- `visual-system/` is the production authority for slide work.
- Style continuity must use `visual-system/style/style-prompt-master.md`.
- Character continuity must use `visual-system/characters/character-reference-registry.md` and active character image references.
- Visible character identity cannot be generated from text-only prompts when identity matters.
- Slide prompts must use the `gpt-image-2` Skill Advisor / host-native workflow.
- Review defaults to local-only. Do not call Minimax MCP or other external vision/review services unless the user explicitly authorizes that task.