Skip to content

refactor: rename template.yaml to trinity.yaml with backward compatibility #570

Open

Description

@vybe

Summary

Rename the agent metadata file `template.yaml` to `trinity.yaml` across all Trinity-compatible agents. The current name (`template`) reflects where the file came from (GitHub template repositories) rather than what it does (configure a Trinity deployment). Renaming makes the file's purpose immediately clear to agent authors and reduces confusion when agents contain other `*.yaml` files.

Context

Surfaced during a discussion about standardizing Trinity-specific configuration files in agent repositories. The agent guide at `docs/TRINITY_COMPATIBLE_AGENT_GUIDE.md` lists several Trinity-specific files (`template.yaml`, `dashboard.yaml`, `.trinity/`). Of these, `template.yaml` is the most ambiguous name — a first-time agent author reading the repo might not know it's the platform configuration file.

The file is read in multiple places: `template_service.py` (gallery fetch), `agent_service/crud.py` (deploy), `agent_server/routers/info.py` (runtime), and the avatar router. All of these need to fall back gracefully.

Acceptance Criteria

  • Backend reads `trinity.yaml` first, falls back to `template.yaml` for backward compatibility (no hard break for existing deployed agents)
  • Agent server (`docker/base-image/agent_server/`) updated with the same fallback
  • `template_service.py` GitHub fetch updated to try `trinity.yaml` then `template.yaml`
  • `startup.sh` copies `trinity.yaml` (or whichever exists) to the workspace correctly
  • `docs/TRINITY_COMPATIBLE_AGENT_GUIDE.md` updated: all references to `template.yaml` updated to `trinity.yaml`, backward-compat note added
  • All local test fixture directories under `src/backend/config/agent-templates/` renamed from `template.yaml` → `trinity.yaml`
  • Known public agents in `abilityai/` org updated (Cornelius and any others with `template.yaml`) — file renamed, PR opened

Technical Notes

  • Fallback order everywhere: check for `trinity.yaml`, if missing check `template.yaml`, if neither found return existing "no template found" behavior.
  • The `read_only.py` service has `"template.yaml" in its protected-paths allowlist — add \"trinity.yaml"` alongside it.
  • `dashboard.yaml` is intentionally kept separate (agent writes it dynamically at runtime); this rename does not touch it.
  • `create-agent` wizards in `abilityai/abilities` will also need updating in a follow-on PR to that repo.

Activity

  1. added
    priority-p3
    type-refactor
    on Apr 28, 2026
  2. added
    complexity-low
    theme-devex
    on Jun 3, 2026
  3. added
    status-incubating
    on Jun 14, 2026
  4. added
    complexity-medium
    and removed
    complexity-low
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    complexity-mediumpriority-p3status-incubatingtheme-devextype-refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions