Skip to content

Ship the prisma-platform-core-concepts skill in the prisma package - #245

Open
tylerhogarth wants to merge 2 commits into
mainfrom
platform-core-concepts-skill
Open

Ship the prisma-platform-core-concepts skill in the prisma package#245
tylerhogarth wants to merge 2 commits into
mainfrom
platform-core-concepts-skill

Conversation

@tylerhogarth

Copy link
Copy Markdown

The prisma package now ships an agent skill defining the Prisma Platform's core concepts, the same way @prisma/composer and the ORM anchor packages ship theirs. Consumers receive it through prisma skills sync.

Changes

  1. Skill: skills/prisma-platform-core-concepts/SKILL.md covers structures, hierarchies, relationships, and workflows: the workspace/project/branch model, branches as preview environments, the two deploy paths (GitHub app recommended, CLI deploy --stage), services and versions, the Compute sleep model, Prisma Postgres, object storage, the env-var class/scope model, and the local development stack. It is deliberately not a CLI reference; it routes command surfaces to --help. skills/README.md records the authoring rules.
  2. Packaging: scripts/stage-skills.mjs stages skills into the package at prepack, selected by each skill's metadata.library frontmatter. packages/prisma adds skills to files; the staged copy is gitignored.
  3. Version stamping: scripts/set-version.ts now stamps metadata.library_version in every skill on a lockstep bump, via the new scripts/skill-frontmatter.ts helpers.
  4. Verification: scripts/check-skill-packaging.mjs (root script check:skill-packaging, new pr-quality job) packs the package the way publish does and checks the tarball carries the skill, stamped with the packed version and byte-identical to the tracked source.
  5. Allowlist: prisma joins SKILL_SOURCE_PACKAGES in packages/cli/src/lib/skills/allowlist.ts, the deliberate per-package trust decision that lets sync install from it.

Why

Staging is frontmatter-driven rather than a hardcoded table so the skill list has one source of truth, and it runs at prepack rather than build so a stale turbo cache can never produce a tarball without it. The tarball check exists because none of the failure modes (missing files entry, failed staging, hand-edited stamp) show up in unit tests; they show up in what npm uploads. The pattern is a direct port of the one proven in prisma/composer.

🤖 Generated with Claude Code

The prisma package now carries an agent skill covering the platform:
the workspace/project/branch model, preview environments, the two
deploy paths, services and versions, the Compute runtime, Prisma
Postgres, object storage, environment variables, and the local
development stack.

Packaging follows the composer pattern: the tracked source lives in
skills/, stage-skills.mjs stages it into the tarball at prepack,
set-version.ts stamps metadata.library_version on every bump, and
check-skill-packaging.mjs (wired into pr-quality) packs the package
and verifies the stamp and byte equality against the source. The
prisma package joins the skills-sync allowlist so consumers receive
the skill via prisma skills sync.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 19f7b5a3-a80e-4b38-bd1f-da5e07233733

📥 Commits

Reviewing files that changed from the base of the PR and between f96661e and dd37242.

📒 Files selected for processing (11)
  • .github/workflows/pr-quality.yml
  • .gitignore
  • package.json
  • packages/cli/src/lib/skills/allowlist.ts
  • packages/prisma/package.json
  • scripts/check-skill-packaging.mjs
  • scripts/set-version.ts
  • scripts/skill-frontmatter.ts
  • scripts/stage-skills.mjs
  • skills/README.md
  • skills/prisma-platform-core-concepts/SKILL.md

Included review availability: 3 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.


Important

Approval pending

CodeRabbit has no unresolved comments, but it could not review the latest commit because the review limit was reached. Follow the review guidance in this comment to continue.

Summary by CodeRabbit

  • New Features

    • Added the Prisma Platform core concepts skill, covering platform resources, deployments, workflows, services, local development, and troubleshooting.
    • Prisma packages now include applicable skills when published.
    • Skill metadata is automatically versioned during releases.
  • Documentation

    • Added guidance for installing, synchronizing, authoring, and maintaining skills.
  • Quality Improvements

    • Added automated validation to confirm packaged skills contain the correct files, ownership metadata, and release versions.

Walkthrough

The PR adds the prisma-platform-core-concepts skill and documentation. It adds frontmatter helpers that read ownership metadata and stamp release versions. Package prepack now stages Prisma-owned skills, publishes the skills directory, and recognizes the Prisma package as an approved source. A packaging checker compares packed skills with repository sources. A package script and required CI job run this validation.

Merge Risk: ⚪ Minimal · up to dd372

This change adds and packages a Prisma Platform concepts skill without any identified merge-blocking correctness, security, availability, or deployment risk; it is ready to merge after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. (6 skipped: 6… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: shipping the prisma-platform-core-concepts skill in the prisma package.
Description check ✅ Passed The description directly explains the skill, packaging, version stamping, verification, and allowlist changes in the pull request.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 62.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 5 files. (6 skipped: 6 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch platform-core-concepts-skill
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch platform-core-concepts-skill

Comment @coderabbitai help to get the list of available commands.

@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

npx https://pkg.pr.new/@prisma/cli@245
npx https://pkg.pr.new/@prisma/cli-engine@245

commit: c04e111

Comment thread skills/prisma-platform-core-concepts/SKILL.md Outdated
Review ruling on #245: the CLI is self-documenting and a command table
risks giving the agent context that conflicts with the shipped surface.
The skill routes to --help instead.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

1 participant