Back to Prisma

Brief: S5-D2 — author the skill and open the PR

projects/agent-native/slices/mongodb-upgrade-skill/briefs/d2-r1.md

7.9.0-dev.173.9 KB
Original Source

Brief: S5-D2 — author the skill and open the PR

Task

Author the prisma-mongodb-upgrade skill in a prisma/skills clone from your D1 fact table, add the cross-links and README row, validate by branch-ref install, and open the PR.

Setup

Clone prisma/skills to a scratch path (e.g. /tmp/prisma-skills); read its AGENTS.md (contributor conventions: kebab-case dir prefixed prisma-, exact SKILL.md name, frontmatter shape, references/{category}-{rule}.md naming, priority tables) and skim prisma-upgrade-v7 as the exemplar. Branch prisma-mongodb-upgrade-skill from main.

Content requirements (from the slice spec + your D1 verdict)

  • Lead: stay-on-v6-first. Production MongoDB stays on v6 deliberately today (POC roadmap status, pre-1.0 churn, no façade transactions); the migrate-now branch is real and mechanically detailed for greenfield/EA-tolerant teams. Decision table with explicit no-go signals (façade transactions required; pre-1.0 upgrade aversion) and stay-hygiene (pin versions, track advisories, revisit cadence).
  • SKILL.md router: version landscape (v6 = terminal classic-ORM major for MongoDB; v7 never ships the connector; Next = the path), decision table, pointers into references.
  • References (names per repo convention): decision framing; schema mapping (provider, @db.ObjectId/@map("_id"), composite types → Next contract, storage-name keys, no schema-layer polymorphism → explicit discriminator); client API mapping — map names, never assume parity: $runCommandRaw/findRaw/aggregateRawmongoRaw(...) lane; no ORM aggregate/groupBy → pipeline builder; transactions: v6-on-replica-sets → raw driver sessions in Next; migrations story — v6 db push-only vs Next's first-class plan/migrate/verify/sign (+ db update push-style alternative), _prisma_migrations collection marker, DDL not transactional; verification checklist (no data moves; same DB; indexes; staged round-trip).
  • Every behavioral claim carries its citation from the D1 fact table (Next side pinned to a2791c5dd59d...; v6 side the verified docs URLs). State the verified-against Next commit/version and MongoDB 8.0 floor + mongodb@^7 peer dep.
  • Hand-off rule: after switching, run prisma-next's own skill installation; this skill is the discovery bridge, not a duplicate of Next's cluster. Verify-before-acting note (EA surface moves).
  • Frontmatter: name: prisma-mongodb-upgrade, description, license: MIT, metadata: {author: prisma, version: "0.1.0"} (working position — flag the version semantics question in the PR body for maintainers).
  • Cross-links: short "Using MongoDB? This guide does not apply — see prisma-mongodb-upgrade" block in prisma-upgrade-v7/SKILL.md; a MongoDB routing note in prisma-database-setup; README skill-table row (add ours only; do not tidy the missing prisma-postgres-setup row).

Completed when

  • Skill + cross-links + README row committed (explicit staging; conventional style if the repo's log uses it — check).
  • Branch-ref install capture: in a scratch dir, npx --yes [email protected] add 'prisma/skills#prisma-mongodb-upgrade-skill' --skill prisma-mongodb-upgrade -y lands the skill with intact frontmatter (capture the placement listing).
  • Branch pushed; PR opened against prisma/skills main, body for cold maintainers: why the skill exists (the stranded cohort; agents mis-advising v7), the stay-first/migrate-branch structure and why (roadmap POC status — cite), the version-metadata question, and the install capture. Return the PR URL.

Constraints (terse)

Heartbeats as usual; no force-push. Time-box: 50 minutes. Halt conditions: repo conventions contradict the spec's layout materially (surface); push/PR denied by the permission system (fall back to committing the branch content as a patch in your report and say so — do not fail the dispatch).

Same return shape. Begin.