agentleFS
Galbaz1Galbaz1/video-research-mcp/AGENTS.md

video-research-mcp

AGENTS.md23 starsChanged 38 days agoMITView on GitHub

Fausto explicitly narrowed this delivery at 15:08:23 UTC. Deliver the API-first RC6 successor (vrm-0e8.14.23) from this worktree. Local models, local-model qualification, optional feature expansion, and full-programme integrated, comparative and held-out acceptance are outside this release. Preserve their work, frozen evaluations and failures as deferred backlog; do not mark them accepted. Ship only supported behavior and describe unqualified routes clearly. Hard stop: 2026-10-07 21:08:23 UTC (23:08:23 Europe/Amsterdam). Stop all owned execution and review lanes by then and report the verified delivered…

  • Reads credentials

The file

We split this AGENTS.md into the rules it gives an agent

6 rules. About 0 are common, 4 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    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:

    Test-specific guidance lives in tests/AGENTS.md.

    line 32
  2. Very specific:

    Use scripts/detect_review_scope.py --json before review/audit/check requests and after major git-state transitions.

    line 63
  3. Distinctive:

    Do not mix review scopes in one pass unless explicitly requested.

    line 70
  4. Distinctive:

    Every tool must have:

    line 105
  5. Distinctive:

    Remove obsolete compatibility workarounds

    line 137
  6. Distinctive:

    Use the current production skills as the canonical workflows.

    line 175

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

<!-- fausto-project-instructions/v1 modules: delegation@1 source: /Users/fausto_home/.codex/instruction-modules.md selection: adapted for Herdr execution in this project -->

Current release scope and hard stop — 7 October 2026

Fausto explicitly narrowed this delivery at 15:08:23 UTC. Deliver the API-first RC6 successor (vrm-0e8.14.23) from this worktree. Local models, local-model qualification, optional feature expansion, and full-programme integrated, comparative and held-out acceptance are outside this release. Preserve their work, frozen evaluations and failures as deferred backlog; do not mark them accepted. Ship only supported behavior and describe unqualified routes clearly.

Hard stop: 2026-10-07 21:08:23 UTC (23:08:23 Europe/Amsterdam). Stop all owned execution and review lanes by then and report the verified delivered result and remaining work. No further work after that deadline without a new user instruction. Finish reviewed source/docs, required CI/package checks, actual native installation/restart/upgrade/removal, main/dev reconciliation, and authorized publication with exact registry/artifact readback. Reuse current checks where bytes are unchanged. Avoid new gates, frameworks or options.

Scope

Codex project instructions equivalent to this repo's Claude setup.

  • Root guidance lives here.
  • Source-code specific guidance lives in src/AGENTS.md.
  • Test-specific guidance lives in tests/AGENTS.md.

This layout mirrors .claude/rules/*.md path scoping using Codex's directory-based AGENTS discovery.

Herdr account routing — current user instruction, 2026-10-07

User routing 2026-10-07 revokes the 2026-10-06 account2-only override. Codex account1, account2 and Claude are available through real Herdr. Balance useful independent work by task fit and verified live capacity, with exclusive ownership and bounded allocations; verify effective account/home. Existing credits allowed; no purchase, reset, auth copy or new API billing. API-first delivery; stop expanding local options. Independent Codex account2 review is required before claiming full review; installed Claude/Anthropic security reviewer remains unauthorized on this coordinator route.

What This Is

A monorepo with three separately launched MCP servers:

  1. video-research-mcp (root) — research, media analysis, source ingestion, knowledge retrieval, and optional provider adapters. Uses the configured Gemini models (google-genai) and YouTube Data API v3.
  2. video-explainer-mcp (packages/video-explainer-mcp/) — explainer planning, generation, durable rendering, and assembly of existing materials. Upstream CLI and configured renderer routes have separate prerequisites.
  3. video-agent-mcp (packages/video-agent-mcp/) — bounded scene-text generation via Claude Agent SDK.

Python >= 3.11.

Commands

uv sync --locked --extra dev
uv run --locked pytest tests/ -v
uv run --locked pytest tests/ -k "video_analyze" -v
uv run --locked ruff check src/ tests/
GEMINI_API_KEY=... uv run --locked video-research-mcp
scripts/detect_review_scope.py --json

Code Review Trigger Protocol

Use scripts/detect_review_scope.py --json before review/audit/check requests and after major git-state transitions.

Priority when multiple states apply:

  1. uncommitted
  2. pr
  3. commits

Do not mix review scopes in one pass unless explicitly requested.

Architecture

server.py mounts sub-servers onto FastMCP("video-research"):

  • tools/video.py: video analysis/session/batch tools
  • tools/youtube.py: metadata/comments/playlist tools
  • tools/research.py: deep research/planning/evidence + deferred registration for research_document and research_web* tools
  • tools/research_web.py: Deep Research Agent tools (research_web, status/follow-up/cancel)
  • tools/content.py: content analyze/extract + content_batch_analyze (via deferred import)
  • tools/search.py: web search tool
  • tools/infra.py: infra/cache/config tools
  • tools/knowledge/: knowledge tools

These are the core domains. server.py also mounts media, image/vision, audio, jobs, memory, ingestion, live, and other workflow servers. Use its imports and mount calls for the current inventory; optional runtime registration does not establish provider availability. The companion servers are launched separately.

Supporting modules: video_cache.py, video_batch.py, research_document_file.py (File API upload + URL download).

Core project patterns:

  • Instruction-driven tools (instruction + optional output_schema)
  • Generative output via GeminiClient.generate_structured(...); deterministic operations validate typed inputs/results without Gemini
  • Tools catch operational errors with make_tool_error() in their published dictionary or native CallToolResult envelope
  • Selected workflows write through to Weaviate when configured (non-fatal)
  • Context caching with prewarm + session reuse
  • MLflow tracing via @trace() decorator on all tools (no-op when mlflow not installed)
  • Knowledge search with optional Cohere reranking + Flash summarization

Conventions

New Tools

Every tool must have:

  1. ToolAnnotations on the decorator
  2. Annotated[...] params with Field(...)
  3. Google-style docstring
  4. An explicit result contract: generative output via GeminiClient.generate_structured(...), or direct typed validation for deterministic operations

Native media tools may use mcp.types.CallToolResult with typed structuredContent, a JSON text block, and bounded ImageContent. Declare success/error output schemas and offer the same metadata without images. Preserve existing return contracts; follow the native exception in src/AGENTS.md.

Shared types belong in types.py.

Docstrings

Google-style docstrings are required on modules, public classes/functions/methods, and non-obvious private helpers. Keep docstrings concise and factual.

File Size

Aim for ~300 lines of executable production code per file (excluding docstrings/comments/blanks). Test files may go to ~500 lines.

Dependency Policy

Pin to the major version actually used. Do not use cross-major constraints where APIs differ.

The current API-major constraints live in pyproject.toml; exact tested versions live in each package's uv.lock. Use uv sync --locked --extra dev. Do not maintain an independently editable version table here.

When updating dependencies:

  1. Update pyproject.toml
  2. Re-resolve deps
  3. Remove obsolete compatibility workarounds
  4. Run full tests

Testing Summary

Tests are unit-level with mocked Gemini. No tests should hit real APIs.

Primary fixtures and patterns are documented in tests/conftest.py and docs/tutorials/WRITING_TESTS.md.

Plugin Installer Context

Two-package architecture:

  • npm package copies commands/skills/agents to ~/.claude/
  • PyPI package runs MCP server via uvx

See docs/PLUGIN_DISTRIBUTION.md for details.

Environment Variables

Canonical source: config.py:ServerConfig.

Main variables:

  • GEMINI_API_KEY (required)
  • GEMINI_MODEL (default gemini-3.8-flash)
  • GEMINI_FLASH_MODEL (default gemini-3.8-flash)
  • GEMINI_THINKING_LEVEL (default medium)
  • DEEP_RESEARCH_AGENT (default deep-research-preview-04-2026)
  • WEAVIATE_URL (empty disables knowledge store)
  • WEAVIATE_API_KEY
  • GEMINI_SESSION_DB (empty means in-memory sessions)
  • COHERE_API_KEY (auto-enables reranker when set)
  • RERANKER_ENABLED (override: true/false)
  • FLASH_SUMMARIZE (default true)
  • GEMINI_TRACING_ENABLED (default false)
  • MLFLOW_TRACKING_URI, MLFLOW_EXPERIMENT_NAME

Media Production Skills

Use the current production skills as the canonical workflows; verify provider availability and the installed tool surface before generation. The research MCP does not provide image, TTS, or clip-generation tools. Companion wrappers depend on a separately installed upstream video_explainer checkout.

  • TTS production and audio recipes
  • FFmpeg production and platform presets
  • Video generation and provider capabilities
  • Video production and chaining patterns
  • Image generation
  • Plugin maintenance for a bounded update loop

Provider model IDs and capabilities belong in dated skill references and runtime configuration rather than duplicated instructions. Generating an artifact, verifying its quality, publishing source and installing a registry version are separate acceptance claims.

Key Docs

  • docs/ARCHITECTURE.md
  • docs/DIAGRAMS.md
  • docs/tutorials/GETTING_STARTED.md
  • docs/tutorials/ADDING_A_TOOL.md
  • docs/tutorials/WRITING_TESTS.md
  • docs/tutorials/KNOWLEDGE_STORE.md
  • docs/CODE_REVIEW_AUTOMATION.md
  • docs/PLUGIN_DISTRIBUTION.md
  • docs/PUBLISHING.md
  • docs/RELEASE_CHECKLIST.md

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.