← Back to Pull requests

docs(adr): ADR-0050 records that Composer runs as prisma deploy and prisma dev; ADR-0049 gains its rejected alternatives #347

Closed
unknown closed this pull request without merging on Oct 08, 2026 15:05 UTC
View on GitHub
unknown unknown commented on Oct 08, 2026 07:39 UTC
Author

A reader of ADR-0003 today is told:

prisma-composer deploy src/module.ts

That command no longer exists. What actually runs is:

prisma deploy src/module.ts       # deploy
prisma dev src/module.ts          # run locally
# teardown and logs: the destroy and log operations from @prisma/composer/control, called from a script

Decision

This PR adds ADR-0050: Composer runs as prisma deploy and prisma dev; it has no binary of its own. It records a decision that was already implemented in #331 but never written down, and amends the ADRs that still describe the old binary. Separately, it adds to ADR-0049's alternatives the rejected ways to keep a Composer-owned effect check, marked as an amendment.

What the ADR records

1. @prisma/composer-cli declares no bin. It ships only the command family that the prisma CLI (prisma/prisma-cli) mounts. The prisma CLI mounts exactly two Composer commands: prisma deploy <entry> and prisma dev <entry>.
2. deploy and dev are mounted at the root as bare verbs on purpose, like prisma init, rather than under a noun (prisma project deploy). Most prisma commands are noun then verb (prisma auth login).
3. destroy and log have no command. They stay as operations on @prisma/composer/control, and the guides show a short script for each. A teardown script needs PRISMA_SERVICE_TOKEN and PRISMA_WORKSPACE_ID; it cannot use the prisma auth login session.
4. Mounting destroy was rejected. The CLI's destructive verb is delete, and no Composer command takes --production (prisma deploy targets production by leaving out --stage). Where teardown and logs belong in the prisma command tree is not decided; that is tracked in TML-3521. Until then agents, like users, need a script to read prisma dev logs, and the ADR records that cost against the Agent-first principle.
5. Inside this repository, examples and CI run the published prisma CLI with a root pnpm override pointing @prisma/composer-cli at the workspace. CI teardown is scripts/composer-destroy.ts. The example destroy scripts keep --production / --stage; those flags only name the operation's two targets for this repository's scripts and are not a public command grammar. The ADR records that this was accepted.
6. scripts/lint-retired-binary-name.mjs fails CI on the old binary name in user-facing files. docs/design/ is not scanned, so ADRs can keep their history.

What else changes

  • Amendment notes under the title of ADR-0003, ADR-0006, ADR-0007, ADR-0024, ADR-0041 and ADR-0043, as ADR-0017 carries for ADR-0049. Inline notes stay only where the old text would otherwise mislead: ADR-0006 (--name), ADR-0024 (the "destroy names its target" rule) and ADR-0043 (the CLI renders two of the four operations). History in the bodies is untouched.

  • ADR index: a new ADR-0050 entry, and amendment annotations on the entries for ADR-0003, 0006, 0007, 0024, 0041 and 0043.

  • ADR-0049 alternatives, marked with an amendment note under its title: adds the rejected alternatives to failing fast on a broken effect tree (an engine veto hook, Composer loading the config itself, an import-time check in @prisma/composer/config, lazy Alchemy imports in the /control entries), and states the exit code (2) of CLI.CONFIG_UNREADABLE.

  • Domain docs (deploy-cli.md, local-dev.md, 10-domains/README.md, core-model.md, module-composition.md, glossary.md): command names updated to prisma deploy / prisma dev, and destroy / log described as operations. These are living docs, so they are edited in place. Every remaining description of prisma-composer.config.ts as Composer's config file, in deploy-cli.md, core-model.md and module-composition.md, now says the composer section of prisma.config.ts, per ADR-0049. No doc under docs/design/ outside the ADR bodies still names the old file. deploy-cli.md also lists all four deploy flags and the CONFIG.FIELD_RETIRED / CONFIG.FILE_RETIRED errors. local-dev.md now gives log's real tail default (0), drops a claimed pointer from dev to log that the code does not print, and describes local Postgres as the @prisma/dev servers the emulator hosts, not the ORM CLI's prisma dev command.
  • Docs only. Checks: pnpm lint (exit 0; existing warnings only), pnpm lint:retired-binary-name (clean), and a relative-link check over the changed docs (no new broken links).

    Alternatives considered

  • Amend the ADRs without a new ADR: rejected. The retirement and the resulting command surface are a durable decision with their own reasoning (why deploy and dev are bare, why destroy has no command). This repository's rule is that a decision future readers need to understand gets an ADR (docs/design/90-decisions/README.md).

  • Rewrite the old ADRs' examples to the new commands: rejected. ADRs are append-only; amendment notes keep the record honest about what was decided when.
  • Refs: TML-3340, TML-3521 (where teardown and logs go in the command tree). Related: prisma/composer#331 (binary removed), prisma/prisma-cli#330 (first pinned the host to Composer 0.26.0, the first version without the binary; the host now pins 0.28.0).

    Agent: saruman-38

    🤖 Generated with Claude Code

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: wmadden-electric Review duration: 445m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.75) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.75 · 650 lines diff across 8 files
    0.75
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Sensitive Paths sensitive_paths
    0.075
    Real PR Conversation Timeline
    1 comments
    "Review active on #347"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed sensitive_module
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 75.2% (HIGH) · Higher = larger blast radius
    75.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 29.7% · Safe to merge
    29.7%