Skip to content

docs(design): ADR-0059 — a place the app runs is an environment, not a stage or a branch - #385

Merged
wmadden merged 7 commits into
mainfrom
docs/adr-stage-not-branch
Oct 27, 2026
Merged

wmadden merged 7 commits into
mainfrom
docs/adr-stage-not-branch

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor
prisma deploy module.ts                        # the environment production
prisma deploy module.ts --environment staging  # the environment named staging
prisma dev module.ts                           # the environment dev, on this machine

This ADR records Composer's word for a place the app runs: environment. It replaces "stage" on every public surface (the flag, destroy's target, guides, errors, the agent skill), and it rejects "branch".

An environment is a concept of Composer's core, and the same module graph deploys unchanged to any of them. A deployment target decides what an environment becomes on its platform. On Prisma Cloud, production is the Branch the platform marks as the Project's default (created as main), and any other environment is the Branch of that gitName. dev under prisma dev has no Branch at all. Every environment has a name and none is special: prisma deploy defaults to production and prisma dev to dev, as parameter defaults, not as a privileged environment.

"Branch" stays rejected: it is one target's term, it brings a git workflow with it, production's Branch is called main, and local development can never be a Branch. "Stage" goes because it is unnatural; "environment" is what users already say, and it matches the dotenv convention Composer's config adapters follow.

The ADR also rewrites the glossary's Stage entry as Environment and updates the ADR index.

Numbering: ADR-0057 is claimed by other PRs, so this takes 0059. The custom-domains design in #386 (ADR-0060 to ADR-0062) links to this ADR by its file name.

Agent: ptah-43

🤖 Generated with Claude Code

…ranch

Records that "stage" is Composer's target-neutral term for a deploy-time
environment, used on every public surface. Prisma Cloud maps a stage to a
Branch; "branch" stays target vocabulary. Renaming --stage to --branch is
rejected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c3777cf1-3fb9-4041-a641-583f13561f59
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@prisma-gizmo

prisma-gizmo Bot commented Oct 23, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed 29fd604 — posted 0 inline comment(s) this pass.

Open findings: none

Change walkthrough

This incremental pass reviews the final polish on ADR-0059, the decision that Composer's word for a place the app runs is environment (replacing "stage" on every public surface and rejecting "branch"). The delta fixes the last dangling thread of the rename: a leftover "stage" in the glossary and a stale heading anchor in the ADR.

Glossary (docs/design/03-domain-model/glossary.md:279) — The "Container — Project / Branch" entry was the last glossary text still saying "a stage resolves to". It now speaks of an environment and sharpens the Branch resolution rule: production gets the Project's default Branch, any other environment gets the Branch found by gitName or created. That matches both the Environment entry immediately above and ADR-0059's mapping table, and it replaces the vaguer "for a named stage" phrasing that predated the ADR's explicit treatment of the default environment.

ADR-0059 (docs/design/90-decisions/ADR-0059-a-deployment-environment-is-called-an-environment.md:56) — The Related section's glossary link now points at #environment-formerly-stage, the correct GitHub slug for the renamed "### Environment (formerly Stage)" heading, instead of the dead #stage anchor left from before the heading was rewritten.

I verified with a repo-wide search that ADR-0059's link is the only cross-document anchor into the glossary's Stage/Environment section, and that no stale #stage anchors remain anywhere in docs/, skills/, skills-contrib/, or website/. The ADR index in docs/design/90-decisions/README.md already carries the ADR-0059 entry from the earlier pass, and the file sequence (ADR-0057 → ADR-0059, no ADR-0058) is consistent with the numbering claims described in the PR.

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No Gizmo finding is open and the head commit has been reviewed. Approving.

A stage names any environment the app runs in, including prisma dev's,
which can never be a Branch. Adds that to the reasoning and to the
rejected --branch alternative.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No Gizmo finding is open and the head commit has been reviewed. Approving.

wmadden-electric and others added 2 commits October 23, 2026 18:18
…anch

# Conflicts:
#	docs/design/90-decisions/README.md
Every stage is an independent environment. A command's default --stage
value is a parameter default, not a special environment, so the ADR no
longer describes a nameless default stage.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: 🟡 1 minor · trace

The ADR records the term only. A deploy without --stage still resolves
as ADR-0024 describes, and the index entry no longer implies every stage
is matched by gitName.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No Gizmo finding is open and the head commit has been reviewed. Approving.

Records the rename from stage to environment agreed in the custom-domains
discussion, with the reasons branch stays rejected, and updates the
glossary and index entries.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric wmadden-electric changed the title docs(design): ADR-0059 — a deployment environment is a stage, not a branch docs(design): ADR-0059 — a place the app runs is an environment, not a stage or a branch Oct 27, 2026

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: 🟡 2 minor · trace

Comment thread docs/design/03-domain-model/glossary.md Resolved
…e ADR-0059 glossary anchor

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

No Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden
wmadden merged commit e2eece2 into main Oct 27, 2026
36 of 38 checks passed
@wmadden
wmadden deleted the docs/adr-stage-not-branch branch October 27, 2026 16:46
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.

2 participants