Skip to content

feat: add prisma-mongodb-upgrade skill#20

Merged
aqrln merged 4 commits into
mainfrom
prisma-mongodb-upgrade-skill
Jul 10, 2026
Merged

feat: add prisma-mongodb-upgrade skill#20
aqrln merged 4 commits into
mainfrom
prisma-mongodb-upgrade-skill

Conversation

@tensordreams

Copy link
Copy Markdown
Contributor

Why this skill exists

MongoDB projects are the one Prisma cohort with no road into Prisma 7: v6 is the terminal classic-ORM major for MongoDB, and v7 never ships a MongoDB connector. Agents encountering these projects routinely mis-advise them — recommending an impossible "upgrade to Prisma 7" (the prisma-upgrade-v7 guide reads as generally applicable) or, worse, silently rewriting the app onto a SQL database. This skill gives agents the real decision to relay: stay on the latest v6 deliberately, or migrate to Prisma Next.

Structure: stay-on-v6 lead, with a real migrate-now branch

The skill leads with stay-on-v6 as the production default, because Prisma Next's own roadmap classifies its MongoDB target as a POC ("validating that non-SQL targets work within the framework") and excludes it from the current Early Access and GA target sets (prisma-next ROADMAP.md), the package line is pre-1.0 with breaking changes between minors, and the Next Mongo façade does not yet expose db.transaction(...).

The migrate-now branch is nonetheless real and mechanically detailed — Next's MongoDB implementation is deep (full ORM + pipeline builder + raw lane + first-class plan/migrate/verify/sign migrations, tested against real in-memory MongoDB) — with explicit no-go signals (façade transactions required; pre-1.0 upgrade aversion) and a no-data-moves cutover checklist.

Contents: SKILL.md router + 5 references (decision framing, schema/contract mapping, client API mapping, migrations mapping, cutover verification). Cross-links: a MongoDB routing block in prisma-upgrade-v7, a routing note in prisma-database-setup, and a README entry.

Every behavioral claim carries a citation: Prisma Next claims are pinned to prisma/prisma-next @ a2791c5dd59d579b4b3052942ae7f8fe5e2ee852 (stated in the skill, with a verify-before-acting note since Next is Early Access); v6 claims cite the released v6 docs (URLs with anchors verified at authoring time).

Open question for maintainers: metadata.version semantics

Existing ORM skills carry the targeted ORM version (e.g. prisma-upgrade-v7 is "7.6.0"), but this skill spans v6 → Prisma Next and targets no single ORM version. Working position: the skill is versioned as itself, starting at "0.1.0", with the verified prisma-next commit named in the body. Happy to adopt whatever convention you prefer.

Validation

Branch-ref install into a scratch dir:

$ npx --yes skills@1.5.14 add 'prisma/skills#prisma-mongodb-upgrade-skill' --skill prisma-mongodb-upgrade -y
✓ ./.agents/skills/prisma-mongodb-upgrade   (SKILL.md + 5 references; frontmatter parsed intact)

MongoDB projects are the one Prisma cohort with no path to Prisma 7
(v6 is the terminal classic-ORM major for MongoDB; v7 ships no
connector). Agents routinely mis-advise these projects: recommending
an impossible v7 upgrade or silently rewriting apps onto SQL. This
skill frames the real decision — stay on the latest v6 deliberately
(the default for production today) or migrate to Prisma Next — and
carries the migration mechanics: schema-to-contract mapping, client
API mapping including the raw lanes and the transactions gap,
migrations story, and a no-data-moves cutover checklist.

Prisma Next claims are verified against prisma/prisma-next at commit
a2791c5dd59d579b4b3052942ae7f8fe5e2ee852; v6 claims cite released v6
documentation. Cross-links added: prisma-upgrade-v7 and
prisma-database-setup now route MongoDB version questions to this
skill, and the README gains the skill entry.

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
tensordreams added a commit to prisma/prisma that referenced this pull request Jul 6, 2026
The mongodb-upgrade-skill slice (adopted work TML-2973) closed the gap
the operator surfaced: probe verdict recorded (Next MongoDB = present
but partial, POC status), skill authored stay-on-v6-first with cited
migrate-now branch, PR open on prisma/skills. Scoreboard 9 PASS,
findings log still empty.
@aqrln
aqrln marked this pull request as draft July 6, 2026 12:38
Comment thread prisma-mongodb-upgrade/SKILL.md Outdated
Comment thread prisma-mongodb-upgrade/SKILL.md Outdated
Comment thread prisma-mongodb-upgrade/SKILL.md Outdated
Comment thread prisma-mongodb-upgrade/references/client-api-mapping.md Outdated
Comment thread prisma-mongodb-upgrade/references/client-api-mapping.md
Comment thread prisma-mongodb-upgrade/references/decision-stay-or-migrate.md Outdated
Comment thread prisma-mongodb-upgrade/references/decision-stay-or-migrate.md Outdated
Comment thread prisma-mongodb-upgrade/references/decision-stay-or-migrate.md Outdated
Comment thread prisma-mongodb-upgrade/references/decision-stay-or-migrate.md Outdated
Comment thread prisma-mongodb-upgrade/references/migrations-mapping.md Outdated
Correct the maturity framing per review: MongoDB support in Prisma
Next is Early Access with GA planned after Postgres, and migrating is
the encouraged path for MongoDB users; staying on v6 remains a
legitimate choice where hard blockers apply, stated without
discouraging framing. Blocker questions become agent self-checks
(grep for $transaction instead of asking the user). Transactions
guidance now states affirmatively that the underlying mongodb driver
is directly available for sessions today, with the facade wrapper
expected soon. Internal prisma-next source paths removed from
user-facing prose in favor of Prisma Next's own skills.

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
Comment thread prisma-mongodb-upgrade/references/decision-stay-or-migrate.md Outdated
Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@aqrln
aqrln marked this pull request as ready for review July 6, 2026 15:42
@aqrln
aqrln requested a review from AmanVarshney01 July 6, 2026 15:43
Comment thread prisma-upgrade-v7/SKILL.md Outdated
AmanVarshney01
AmanVarshney01 previously approved these changes Jul 8, 2026

@AmanVarshney01 AmanVarshney01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄

Signed-off-by: Alexey Orlenko's AI Agent <robot@aqrln.net>
@aqrln

aqrln commented Jul 9, 2026

Copy link
Copy Markdown
Member

@AmanVarshney01 please take another look

@AmanVarshney01 AmanVarshney01 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Time to merge is now 🎉

@aqrln
aqrln merged commit 72aa5e3 into main Jul 10, 2026
4 checks passed
@aqrln
aqrln deleted the prisma-mongodb-upgrade-skill branch July 10, 2026 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants