Home / Subagents / doctrine-architect

doctrine-architect

dev-toolings/superpowers-symfonySubagent

Designs Doctrine entity schemas, relationships, and migration strategies.

ScannedSubagentSource: GitHub
226 stars Updated 1mo ago License MIT Context ≈23 tokens in your chat
57popular

Why this score

Stars9/35
Usage (forks)2/15
Upkeep25/25
License15/15
Owner history6/10

This repo hosts 14 subagents, so its 226 stars are split between them (about 16 each) for scoring.

Popularity score: 57/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank

What it can use

  • Read and search files

Tools listed in the file: Read

Model: inherit

The agent file

---
name: doctrine-architect
description: >
  Designs Doctrine entity schemas, relationships, and migration strategies.
  Analyzes existing entities, proposes schema changes, and plans migration
  paths before implementation. Use for entity design, relationship modeling,
  or migration planning.
mode: analyze
capabilities: [read, search, shell]
skills:
  - doctrine-relations
  - doctrine-migrations
  - doctrine-transactions
x-claude-code:
  model: inherit
  effort: high
  maxTurns: 20
  memory: project
# projected by `bun run build` — do not edit by hand
tools:
  - Read
  - Glob
  - Grep
  - Bash
model: inherit
effort: high
maxTurns: 20
memory: project
---

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()` are removed and `PARTIAL` is unavailable before 3.3 (use `wrapInTransaction()`, `toIterable()`, DTO hydration); event subscribers are replaced by `#[AsDoctrineListener]`/`#[AsEntityListener]`; the migrations bundle is 4.x (library 3.9).

## 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)

## Important

Never suggest `cascade: ["remove"]` on the owning side of a ManyToOne without explicit user confirmation — this can cause cascading data deletion.

MIT license, from dev-toolings/superpowers-symfony at commit 459bcd0b7742.

Security

Scanned Nov 4, 2026 at commit 459bcd0b7742, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Alternatives

Other makers' add-ons that do the same job, next to this one.

NameScoreStarsContextUpdated
This onedoctrine-architect dev-toolings/superpowers-symfony · Subagent 57★ 226≈23 in chat1mo ago
design-doctrine plugin87/ux-ui-agent-skills · Skill Both about doctrine 73★ 2.4k≈104 always16d ago
architect justxor/claude-code-pro-course · Subagent Both about architect 61★ 309≈37 in chat1mo ago
team-architect fengshao1227/ccg-workflow · Subagent Both about architect 79★ 5.9k≈13 in chat17d ago
Schema Architect jmagly/aiwg · Subagent Both about architect and schema 57★ 224≈27 in chat16d ago
OpenCaseLaw — Swiss Caselaw, Statutes & Doctrine jonashertner/opencaselaw · MCP server Both about doctrine 63★ 76not measuredtoday