agentleFS
Google CloudKnown publisherGoogleCloudPlatform/genmedia-creative-studio/AGENTS.md

genmedia-creative-studio

AGENTS.md1.2k starsChanged 6 months agoApache-2.0View on GitHub

This document provides guidelines for AI agents working on the GenMedia Creative Studio codebase. This project uses bd (beads) for issue tracking. Run bd prime for workflow context, or install hooks (bd hooks install) for auto-injection. Quick reference: - bd ready - Find unblocked work - bd create "Title" --type task --priority 2 - Create issue - bd close <id> - Complete work - bd dolt push - Sync with git (run at session end) For full workflow details: bd…

  • Commits and pushes

Trending

Steady talk.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 0 mentionsMar 2026: 0 mentionsApr 2026: 0 mentionsMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 0 mentionsAug 2026: 2 mentionsSep 2026: 1 mentionOct 2026: 1 mentionNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the GoogleCloudPlatform/genmedia-creative-studio repository that our weekly crawl found: only 4 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

The file

Show its rules and text

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

30 rules. About 0 are common, 10 are distinctive, and 20 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 20

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Prefer using shared styles from components/styles.py for common UI elements and layout structures.

    line 11
  2. Very specific:

    All interactions with GCS for storing media or other assets should use the store_to_gcs utility function located in common/storage.py.

    line 16
  3. Distinctive:

    When adding a new generative model capability (e.g., a new type of image model, a different video model):

    line 37
  4. Very specific:

    Add model interaction logic (API calls, request/response handling) to a new file in the models/ directory (e.g., models/new_model_name.py).

    line 38
  5. Very specific:

    Create UI components for controlling the new model in a subdirectory under components/ (e.g., …

    line 39
  6. Very specific:

    Create a new page for the model in pages/ (e.g., pages/new_model_name.py), utilizing the page scaffold and new components.

    line 40
  7. Very specific:

    Add relevant configurations to config/default.py.

    line 42
  8. Very specific:

    Update navigation in config/navigation.json.

    line 43
  9. Very specific:

    When storing metadata for generated media, use the MediaItem dataclass from common/metadata.py and the add_media_item_to_firestore function.

    line 47
  10. Very specific:

    Ensure all relevant fields in MediaItem are populated.

    line 48
  11. Distinctive:

    Write unit tests for utility functions and model interaction logic.

    line 52
  12. Very specific:

    Use pytest as the testing framework.

    line 54
  13. Very specific:

    Use ruff for code formatting and linting.

    line 58
  14. Very specific:

    Run bd prime for workflow context, or install hooks (bd hooks install) for auto-injection.

    line 63
  15. Very specific:

    When working with issues using the bd (beads) command-line tool, adhere to the following tactical guidelines:

    line 77
  16. Very specific:

    Continuous Synchronization: Always run bd dolt push at the beginning of a session to ensure your local issue tracker is aligned with the …

    line 79
  17. Very specific:

    State Awareness: When analyzing a bug or feature request, first run bd ready to check if there is already an existing, unblocked issue …

    line 80
  18. Very specific:

    Atomic Updates: When you complete a task or fix a bug, immediately close the corresponding issue (bd close <id>) in the same commit or PR …

    line 81
  19. Very specific:

    Clear Descriptions: If you discover a new bug during your workflow that is out of scope for your current task, log it immediately using bd …

    line 82
  20. Distinctive:

    Trigger: When a Pull Request is opened.

    line 95
  21. Distinctive:

    Trigger: When a new Issue is opened.

    line 103
  22. Distinctive:

    File issues for remaining work: - Create issues for anything that needs follow-up

    line 144
  23. Distinctive:

    Verify: - All changes committed AND pushed

    line 155
  24. Distinctive:

    NEVER stop before pushing - that leaves work stranded locally

    line 160
  25. Distinctive:

    NEVER say "ready to push when you are" - YOU must push

    line 161
  26. Distinctive:

    If push fails, resolve and retry until it succeeds

    line 162
  27. Distinctive:

    SSH PASSPHRASE: If a git push command hangs or fails asking for an SSH passphrase, ABORT the automated push attempt and explicitly instruct …

    line 163
  28. Very specific:

    Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists

    line 181
  29. Very specific:

    Run bd prime for detailed command reference and session close protocol

    line 182
  30. Very specific:

    Use bd remember for persistent knowledge — do NOT use MEMORY.md files

    line 183

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 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

Agent Guidelines for Vertex AI GenMedia Creative Studio

This document provides guidelines for AI agents working on the GenMedia Creative Studio codebase.

Scope of Work

  • Do not modify code within the experiments/ directory when refactoring or updating the main application. If a global change (like a model deprecation) impacts an experiment, add an inline # TODO: or // TODO: comment near the affected code in the experiment rather than attempting to refactor its logic.

Styling

  • Prefer using shared styles from components/styles.py for common UI elements and layout structures.
  • Page-specific or component-specific styles that are not reusable can be defined locally within those files.

Google Cloud Storage (GCS)

  • All interactions with GCS for storing media or other assets should use the store_to_gcs utility function located in common/storage.py.
  • This function is configurable via config/default.py for bucket names.

Configuration

  • Application-level configuration values, such as model IDs, API keys (though avoid hardcoding keys directly), GCS bucket names, and feature flags, should be defined in config/default.py.
  • Access these configurations by importing cfg = Default() from config.default.

State Management

  • Global application state (e.g., theme, user information) is managed in state/state.py.
  • Page-specific UI state should be defined in corresponding files within the state/ directory (e.g., state/imagen_state.py, state/veo_state.py).

Error Handling

  • For errors that occur during media generation processes and need to be communicated to the user, use the GenerationError custom exception defined in common/error_handling.py.
  • Display these errors to the user via dialogs or appropriate UI elements.
  • Log detailed errors to the console/server logs for debugging.

Adding New Generative Models

  • When adding a new generative model capability (e.g., a new type of image model, a different video model):
    • Add model interaction logic (API calls, request/response handling) to a new file in the models/ directory (e.g., models/new_model_name.py).
    • Create UI components for controlling the new model in a subdirectory under components/ (e.g., components/new_model_name/generation_controls.py).
    • Create a new page for the model in pages/ (e.g., pages/new_model_name.py), utilizing the page scaffold and new components.
    • Define any page-specific state in state/new_model_name_state.py.
    • Add relevant configurations to config/default.py.
    • Update navigation in config/navigation.json.

Metadata

  • When storing metadata for generated media, use the MediaItem dataclass from common/metadata.py and the add_media_item_to_firestore function.
  • Ensure all relevant fields in MediaItem are populated.

Testing

  • Write unit tests for utility functions and model interaction logic.
  • Aim to mock external API calls during unit testing.
  • Use pytest as the testing framework.

Code Quality

  • Use ruff for code formatting and linting. Ensure code is formatted (ruff format .) and linted (ruff check --fix .) before submitting changes.

Issue Tracking

This project uses bd (beads) for issue tracking. Run bd prime for workflow context, or install hooks (bd hooks install) for auto-injection.

Quick reference:

  • bd ready - Find unblocked work
  • bd create "Title" --type task --priority 2 - Create issue
  • bd close <id> - Complete work
  • bd dolt push - Sync with git (run at session end)

For full workflow details: bd prime

Issue Tracking with Beads (bd)

When working with issues using the bd (beads) command-line tool, adhere to the following tactical guidelines:

  • Continuous Synchronization: Always run bd dolt push at the beginning of a session to ensure your local issue tracker is aligned with the remote git repository. Run bd dolt push again at the very end of your session before your final git push.
  • State Awareness: When analyzing a bug or feature request, first run bd ready to check if there is already an existing, unblocked issue tracking the work. Do not create duplicate issues.
  • Atomic Updates: When you complete a task or fix a bug, immediately close the corresponding issue (bd close <id>) in the same commit or PR as the fix. Do not leave issues dangling.
  • Clear Descriptions: If you discover a new bug during your workflow that is out of scope for your current task, log it immediately using bd create "Title" --type bug --priority <level>. Ensure the description clearly outlines the reproduction steps and the context in which it was found.
  • Force-Syncing JSONL to Database: In sandbox or CLI-restricted environments, the Beads auto-import process (which parses .beads/issues.jsonl on startup) only triggers if it detects the database is completely empty. If the database state falls out of sync with .beads/issues.jsonl due to consecutive automated writes or interrupted sessions, you must explicitly run bd import to sync the disk-based JSONL state back into the Dolt database. If you need to clean up or recover from a bad tracking state, you can surgically edit the .beads/issues.jsonl file directly on disk, and then execute bd import to cleanly refresh the tracking system.

🤖 GitHub Automation Agents

This repository uses Google's Gemini CLI to automate software engineering tasks. Our AI agents assist with code reviews, issue triage, and general maintenance to keep the project moving efficiently.

Automatic Behaviors

These agents run automatically based on events in the repository.

🔎 Code Reviewer

  • Trigger: When a Pull Request is opened.
  • Action: The agent reviews the code changes (diff), looking for bugs, security issues, and style improvements.
  • Output: It posts review comments directly on the PR.
  • Note: The agent focuses on the diff only and provides constructive feedback. It does not replace human review.

📋 Issue Triage

  • Trigger: When a new Issue is opened.
  • Action: The agent analyzes the title and body of the issue.
  • Output: It automatically applies relevant Labels (e.g., bug, enhancement, question) to help organize the backlog.

Maintainer Commands

Project maintainers (Owners, Members, Collaborators) can manually invoke the agents using comment commands.

CommandDescription
@gemini-cli /reviewManually triggers a full code review on the current Pull Request.
@gemini-cli /triageManually triggers label analysis on the current Issue or PR.
@gemini-cli [question]Ask the agent a question about the codebase or request a specific task.

Example: @gemini-cli Explain how the authentication flow works. |

Note: These commands are restricted to project maintainers to prevent abuse and manage costs.


Workflow Architecture

The automation is built on GitHub Actions using a "Router-Worker" pattern:

  1. Dispatch Router (gemini-dispatch.yml): The entry point. It listens for events, validates permissions, and routes the request to the correct worker.
  2. Worker Workflows:
    • gemini-review.yml: Handles code analysis.
    • gemini-triage.yml: Handles labeling.
    • gemini-invoke.yml: Handles general Q&A.

This system is powered by the Gemini CLI action.

Landing the Plane (Session Completion)

When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.

MANDATORY WORKFLOW:

  1. File issues for remaining work - Create issues for anything that needs follow-up
  2. Run quality gates (if code changed) - Tests, linters, builds
  3. Update issue status - Close finished work, update in-progress items
  4. PUSH TO REMOTE - This is MANDATORY:
    git pull --rebase
    bd dolt push
    git push
    git status  # MUST show "up to date with origin"
  5. Clean up - Clear stashes, prune remote branches
  6. Verify - All changes committed AND pushed
  7. Hand off - Provide context for next session

CRITICAL RULES:

  • Work is NOT complete until git push succeeds
  • NEVER stop before pushing - that leaves work stranded locally
  • NEVER say "ready to push when you are" - YOU must push
  • If push fails, resolve and retry until it succeeds
  • SSH PASSPHRASE: If a git push command hangs or fails asking for an SSH passphrase, ABORT the automated push attempt and explicitly instruct the user to execute the push manually.
<!-- BEGIN BEADS INTEGRATION v:1 profile:minimal hash:ca08a54f -->

Beads Issue Tracker

This project uses bd (beads) for issue tracking. Run bd prime to see full workflow context and commands.

Quick Reference

bd ready              # Find available work
bd show <id>          # View issue details
bd update <id> --claim  # Claim work
bd close <id>         # Complete work

Rules

  • Use bd for ALL task tracking — do NOT use TodoWrite, TaskCreate, or markdown TODO lists
  • Run bd prime for detailed command reference and session close protocol
  • Use bd remember for persistent knowledge — do NOT use MEMORY.md files

Session Completion

When ending a work session, you MUST complete ALL steps below. Work is NOT complete until git push succeeds.

MANDATORY WORKFLOW:

  1. File issues for remaining work - Create issues for anything that needs follow-up
  2. Run quality gates (if code changed) - Tests, linters, builds
  3. Update issue status - Close finished work, update in-progress items
  4. PUSH TO REMOTE - This is MANDATORY:
    git pull --rebase
    bd dolt push
    git push
    git status  # MUST show "up to date with origin"
  5. Clean up - Clear stashes, prune remote branches
  6. Verify - All changes committed AND pushed
  7. Hand off - Provide context for next session

CRITICAL RULES:

  • Work is NOT complete until git push succeeds
  • NEVER stop before pushing - that leaves work stranded locally
  • NEVER say "ready to push when you are" - YOU must push
  • If push fails, resolve and retry until it succeeds
  • SSH PASSPHRASE: If a git push command hangs or fails asking for an SSH passphrase, ABORT the automated push attempt and explicitly instruct the user to execute the push manually.
<!-- END BEADS INTEGRATION -->

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.