doctrine-architect

doctrine-architect is an agent for coding agents from dev-toolings/superpowers-symfony. It costs 46 tokens per session (633 once invoked), scanned A, original, MIT.

A planning guide for Doctrine ORM, the Symfony tool that maps database records to PHP objects. It designs entities, their relationships, and database migration steps without writing the code.

In plain words
What is it for?
Use it to review a Symfony data model, plan new entities and relationships, and prepare an approved migration strategy.
Why use it?
It helps prevent schema changes that conflict with existing entities, queries, constraints, or migration history.

Agent

Part of the superpowers-symfony plugin — 44 skills, 13 commands, 7 agents, 1 hook shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dev-toolings/superpowers-symfony/doctrine-architect
Clone the repo
git clone --depth 1 https://github.com/dev-toolings/superpowers-symfony

Or install superpowers-symfony, the plugin that ships this one along with the rest of its 44 skills, 13 commands, 7 agents, 1 hook.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doctrine-architect

README.md
[![agentmods](https://agentmods.dev/badge/agents/dev-toolings/superpowers-symfony/doctrine-architect.svg)](https://agentmods.dev/agents/dev-toolings/superpowers-symfony/doctrine-architect)
Your own site
<a href="https://agentmods.dev/agents/dev-toolings/superpowers-symfony/doctrine-architect"><img src="https://agentmods.dev/badge/agents/dev-toolings/superpowers-symfony/doctrine-architect.svg" alt="Measured on agentmods" height="20"></a>
Per session 46 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00046 $0.00633
Opus 5 $0.00023 $0.00316
Sonnet 5 $0.00009 $0.00127
Haiku 4.5 $0.00005 $0.00063

Measured 6d ago against content hash 988a811ef85c, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

doctrine-architect scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/doctrine-architect.md · 71 lines

How it starts

The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are a Doctrine ORM architect for Symfony projects. You analyze and design entity schemas.

Rules

  • Propose, never implement. You are read-only. Present your design for approval before any code is written.
  • Always analyze existing entities first: read src/Entity/ to understand the current schema.
  • Check migrations/ to understand the migration history and naming conventions.
  • Be Doctrine ORM 3 aware: EntityManager::transactional()/Query#iterate()/partial objects are removed (use wrapInTransaction(), toIterable(), DTO hydration); event subscribers are replaced by #[AsDoctrineListener]/#[AsEntityListener]; migrations lib is 4.x.

Analysis workflow

  1. Scan existing entities — Read all files in src/Entity/, identify current relationships, mapped superclasses, traits.
  2. Check migration history — Read recent migrations to understand evolution patterns.
  3. Identify constraints — Check for unique constraints, indexes, lifecycle callbacks.
  4. Review repository methods — Scan src/Repository/ for custom queries that reveal usage patterns.

Design output

Present your proposal as a structured document:

Entity diagram (ASCII)

User (1) ──── (N) Order
                    │
               OrderItem (N) ──── (1) Product

Relationship details

For each relationship, specify:

  • Type: OneToMany, ManyToOne, ManyToMany, OneToOne
  • Owning side vs inverse side
  • Cascade operations: persist, remove (justify each)
  • Fetch mode: LAZY (default) or EAGER (only with justification)
  • orphanRemoval: yes/no with rationale

Migration strategy

  • Is the migration additive (safe) or destructive (requires data migration)?
  • Can it run with zero downtime? If not, what steps are needed?
  • Suggest doctrine:schema:validate and doctrine:migrations:diff commands to run.

Risks and trade-offs

  • N+1 query risks with the proposed relationships
  • Index recommendations for frequently queried fields
  • Data integrity constraints (unique, not null, check constraints)

Read the full file on GitHub · 71 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 71 lines · 46 tokens per session scan A 988a811ef85c

Subscribe to this mod's changes

doctrine-architect is an agent published in the GitHub repository dev-toolings/superpowers-symfony (208 stars, last pushed 5d ago), licensed MIT. It adds 46 tokens to every session and 633 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other agents, from other repositories

infrastructure-agent

Creates infrastructure layer artifacts for a NestJS bounded context — Prisma repositories, in-memory repositories, model mappers, NestJS module wiring, adapters, and event handler infrastructure. Dispatched by create-subdomain workflow or triggered by "prisma repo", "module wiring", "create adapter".

Softtor/nestjs-hexagonal · 61 tokens

doctrine-architect

Designs Doctrine entity schemas, relationships, and migration paths for API Platform 4.3 + Symfony 7.4+ projects. Analyzes existing entities, proposes schema changes, and plans migration paths before any code lands. Always proposes — never edits. Use for entity design, relationship modeling, identifier strategy (UUID…

gerard-labs/superpowers-api-platform · 101 tokens

data-model-architect

Use when an orchestrator needs a Dataverse data model proposed (existing-table reuse, new tables in dependency-tier order, Mermaid ER diagram) for embedding in native-app-plan.md. Read-only — proposes, never mutates. Called by native-app-planner and /edit-app; not invoked directly by users.

microsoft/power-platform-skills · 67 tokens

data-engineer

Adversarial data and database engineer who assumes the design is mis-normalized and indexed for a workload that does not exist. Audits schemas, migrations, queries, ORM code, document shapes, stream contracts, and pipelines against normalization, dimensional modeling, key-value access patterns, columnar and…

testdouble/han · 216 tokens

d1-query-optimizer

Performance analysis agent that identifies slow queries, missing indexes, and optimization opportunities in Cloudflare D1 databases using metrics, insights, and query plan analysis. Use when encountering slow queries, high latency, or performance degradation.

secondsky/claude-skills · 49 tokens

kv-debugger

This agent should be used when the user asks about "kv error", "KVERROR", "429 rate limit", "kv not working", "eventual consistency", "kv namespace not found", "kv timeout", or mentions debugging, troubleshooting, or fixing issues with Cloudflare Workers KV. The agent diagnoses common KV errors, validates…

secondsky/claude-skills · 82 tokens