Skip to content

docs(architecture): requirements for the unified CLI engine - #128

Merged
wmadden-electric merged 18 commits into
mainfrom
cli-engine-requirements
Aug 9, 2026
Merged

docs(architecture): requirements for the unified CLI engine#128
wmadden-electric merged 18 commits into
mainfrom
cli-engine-requirements

Conversation

@wmadden-electric

Copy link
Copy Markdown
Contributor

Design constraints for the consolidated prisma CLI, agreed in design discussion with @wmadden on 2026-08-09: the product-package interface (one directly-executable vocabulary, typed operation calls, context-not-environment), structural presentation ownership, the two-tier e2e testing split, config semantics with the fail-early version marker, and pinned tandem releases. Each requirement carries its rationale. Two questions are recorded as deliberately open: command-tree ownership, and whether the engine wraps a third-party framework or is owned end to end.

🤖 Generated with Claude Code

Records the design constraints for the consolidated prisma CLI agreed
with the operator — the interface between the CLI shell and its product
packages, and why each constraint matters. Two questions stay open by
design: command-tree ownership, and third-party engine vs owned.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@wmadden-electric, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 2 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 26260b6a-4c62-435b-a2bd-1c31227e8f72

📥 Commits

Reviewing files that changed from the base of the PR and between a920cc0 and 22877f7.

📒 Files selected for processing (1)
  • biome.jsonc

Summary by CodeRabbit

  • New Features

    • Defined the planned unified Prisma CLI interface, including structured commands, configuration validation, diagnostics, events, results, and output formats.
    • Documented the initial prisma-v8 scope with authenticated whoami support.
    • Added requirements for version-marked configuration and fixture-backed testing utilities.
    • Added implementation plans covering CLI integration, conformance checks, testing, and release delivery.
  • Documentation

    • Added architecture research and design specifications for execution modes, daemon lifecycle considerations, CLI framework evaluation, and product integration.

Walkthrough

This change adds the unified Prisma CLI engine requirements, public TypeScript interface draft, execution-mode research, framework comparison, daemon-scope notes, project specification, delivery plan, and S1 vertical-slice plan. It defines typed commands, contexts, events, results, presentations, streams, configuration validation, runtime injection, product manifests, testing boundaries, and CLI construction. It also specifies the initial auth whoami vertical slice and related configuration and control API deliverables.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding architecture requirements for the unified CLI engine.
Description check ✅ Passed The description directly summarizes the CLI design requirements and open architecture questions covered by the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli-engine-requirements
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch cli-engine-requirements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai 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.

Actionable comments posted: 8

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/cli-engine-requirements.md`:
- Around line 58-62: Clarify R4 to distinguish prohibited direct access to
engine-owned configuration, environment variables, and TTY state from approved
user-module loading required by R9. Document that the engine provides the
supported loader or capability for Composer to import user modules during
command execution, and state that product code must use this mechanism rather
than reading engine-owned data directly.
- Around line 58-62: Update the R4 “output surface” contract and the runtime
flow around createProgram so product handlers receive only a typed result or
event sink, with no writable stdout, stderr, raw write, or exit operations. Keep
process streams private to the engine while preserving engine-owned rendering,
JSON envelopes, streaming, and exit-code handling.
- Around line 109-111: Update the execution flow around runCli and executeCli so
exit status is stored in the engine instance or returned execution result rather
than process.exitCode. Remove reads and writes to global exit state from the
reusable engine, and have only the top-level binary adapter assign
process.exitCode after execution completes.
- Around line 138-146: Update the R10 configuration-loading flow to catch import
and evaluation failures before marker or section validation, converting them
into a typed diagnostic that includes the config path. Ensure malformed or
classic Prisma 7 configs return this diagnostic rather than propagating an
exception or stack trace, while preserving the existing validator diagnostics
for successfully evaluated configs.
- Around line 143-146: Expand the version-marker contract in the CLI engine
requirements around the defineConfig discussion: specify the marker field,
accepted values, owning package, and exact engine behavior for missing, unknown,
mismatched, and future versions. Identify the typed error corresponding to each
rejection case and state that unmarked files are rejected rather than read
best-effort, including classic Prisma 7 configs using the same filename.
- Around line 124-128: Clarify R9’s “static tree” wording to permit normal
startup instantiation of the command tree, including per-engine construction
through createProgram(runtime) and addCommand(create...Command(runtime)).
Replace the broader “no runtime tree construction” phrase with “no dynamic or
discovery-driven tree construction,” while preserving the requirement that
command definitions load at startup and heavy dependencies remain lazy inside
handlers.
- Around line 100-104: Update the CLI engine API around runCli and createProgram
to expose a product-only entry point that accepts a product command registry or
command subset instead of always registering the full command set. Document how
product repositories use this API for argv-in/bytes-out tests without mounting
the full shell, while preserving the existing production path.
- Around line 87-98: Update runCli’s CommanderError handling so expected parser
failures under --json are converted into the shared ok: false error envelope and
written through the JSON output path, while preserving exit code 2 and existing
help behavior. Ensure unknown-command and similar parser errors do not bypass
JSON handling or write a bare stderr message; alternatively, explicitly revise
the documented contract to exempt parser/help failures.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: ddbab10e-c70d-41b0-8dcb-4ba897c4bbae

📥 Commits

Reviewing files that changed from the base of the PR and between 35099da and a5079b5.

📒 Files selected for processing (1)
  • docs/architecture/cli-engine-requirements.md

Comment thread docs/architecture/cli-engine-requirements.md Outdated
Comment thread docs/architecture/cli-engine-requirements.md
Comment thread docs/architecture/cli-engine-requirements.md
Comment thread docs/architecture/cli-engine-requirements.md
Comment thread docs/architecture/cli-engine-requirements.md Outdated
Comment thread docs/architecture/cli-engine-requirements.md Outdated
Comment thread docs/architecture/cli-engine-requirements.md Outdated
wmadden-electric and others added 4 commits August 9, 2026 12:24
…ager behavior

R12: the shell owns the command tree — paths are cosmetic to products
(the real invocation is the command and its arguments) and structural
to the shell; the tree's six months of cross-product design is the
evidence. R13: the CLI never installs anything — optional peer
dependencies plus a structured missing-dependency error replace the
old self-installing submodule approach.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…; no global flags

R5 constrains who owns rendering, not how it is built: the engine may
adopt its internal framework's renderer where the output meets the
Style Guide. And there are no global flags — per-command declaration
with a shared flag-set for uniformity.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Resolves the document's one open question. Clipanion passes the rubric's
nine technical criteria but fails maintenance (23 months without a
publish, 4.x in RC for three years at decision time); stricli passes
all ten, and its known limitations are neutralized by this document's
own rules. Fully hidden per R3, so the internals remain replaceable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…t extensions

Common fields are engine-owned and mandatory-first; product extension
data is product-published API the engine passes through; recurring
extension shapes get promoted into the vocabulary.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@coderabbitai coderabbitai 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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/cli-engine-requirements.md`:
- Around line 213-224: Expand the R14 event-vocabulary section to define the
event-extension contract: specify the extension field name, permitted
JSON-serializable shape, product namespace requirements, reserved engine keys,
collision behavior, and that human rendering ignores extensions while --json
passes them through unchanged. Ensure the rules are explicit enough to implement
and test without altering the existing engine-defined event fields.
- Around line 242-244: Update the research reference in the surrounding
architecture decision text to point to the correct repository and exact
commander-friction-points document path, removing the erroneous directory-space
artifact; if the record is external, use an explicit URL with a revision or
other stable reference.
- Around line 242-251: Update the architecture decision record near the
Stricli/Clipanion evaluation to include the evaluation date, exact `@stricli/core`
and Clipanion versions, published artifact revisions or digests, and
confirmation of whether the selected `@stricli/core` version is pinned in
packages/cli/package.json and pnpm-lock.yaml. Use the existing decision record
context and preserve the documented rationale.
- Around line 247-254: Update the architecture’s Stricli limitation discussion
to reflect the actual Commander-based shell and its existing help-layout
replacement. Remove the claim that R5’s engine-owned rendering neutralizes
Stricli’s fixed help limitation, or instead define the required engine hook and
add an end-to-end test covering the mandated help output.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1691f4ac-db46-40c0-a0c0-cd847b171984

📥 Commits

Reviewing files that changed from the base of the PR and between a5079b5 and f7ea6e8.

📒 Files selected for processing (1)
  • docs/architecture/cli-engine-requirements.md

Comment thread docs/architecture/cli-engine-requirements.md
Comment thread docs/architecture/cli-engine-requirements.md Outdated
Comment thread docs/architecture/cli-engine-requirements.md Outdated
Comment thread docs/architecture/cli-engine-requirements.md Outdated
wmadden-electric and others added 3 commits August 9, 2026 18:17
…ord, briefs

The prisma-cli-v8 project's Drive artifacts, committed so parallel
agent sessions across repos share one canonical record: the project
spec (DoD: a publishable prisma@8.0.0-rc1 on the settled design, all
three command families ported), the design-notes index, the engine
interface design (v8 + full v1-v7 history + five review-round
artifacts + the output-modes survey + the stricli decision record +
the parked daemon-library notes), and the paused 1b/1c hand-off
briefs.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Seven slices: engine + one vertical command; platform family port with
the auth extraction and commander-shell retirement; Composer as the
first cross-repo consumer (config sections, sessions, the child-status
passthrough, tandem releases); the ADR 239 amendment in parallel; ORM
last (diagnostics model, lsp, exit-code reconciliation); the
three-check conformance tool; the release pipeline ending at a
publishable prisma@8.0.0-rc1. Includes the coverage ledger mapping
every engine surface to the slice that proves it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…i vertical

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@coderabbitai coderabbitai 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.

Actionable comments posted: 22

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.drive/projects/prisma-cli-v8/assets/briefs/1b-leftovers-prisma-prisma.md:
- Around line 9-18: Rewrite the config API requirements in
.drive/projects/prisma-cli-v8/assets/briefs/1b-leftovers-prisma-prisma.md:9-18
and .drive/projects/prisma-cli-v8/assets/briefs/1c-leftovers-composer.md:9-17 to
use ConfigSection, LoadedConfig.sections, and the v8 top-level
diagnostic-section representation instead of { config, diagnostics } and
meta.section. Update .drive/projects/prisma-cli-v8/design-notes.md:47-57 to mark
both briefs non-actionable until those rewrites are complete; no direct code
changes are required elsewhere.

In @.drive/projects/prisma-cli-v8/assets/briefs/1c-leftovers-composer.md:
- Around line 19-25: Scope the DEPS.EFFECT_VERSION_CONFLICT diagnostic produced
by the effect-resolution preflight to the executor-required section in the v8
LoadedConfig diagnostics flow, rather than using section: null. Preserve the
existing preflight timing and diagnostic code so executor commands fail early
while help and config inspection remain available.

In @.drive/projects/prisma-cli-v8/assets/engine/daemon-library-notes.md:
- Around line 24-32: Update stop(name) to revalidate the recorded daemon’s
identity under the registry lock before sending SIGTERM or SIGKILL, preventing
stale entries or PID reuse from signaling unrelated processes. Before each
signal, require the ownership check to match; remove the registry entry only
when ownership remains valid.

In @.drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v1.ts:
- Around line 171-179: Run the repository formatter against
engine-interface-draft-v1.ts so the FlagSpec and PositionalSpec interface
declarations match formatter output, or add the drafts directory to the
formatter ignore configuration if these historical artifacts must remain
byte-frozen.

In @.drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft.ts:
- Around line 769-803: The CLI inputs do not define how mounted commands resolve
to their owning products, leaving foreign-section validation and docs URL
derivation ambiguous. In
.drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft.ts lines
769-803, update the ProductManifest and createCli documentation to specify a
resolution rule, including docsBaseUrl behavior for engine-raised diagnostics
without a product; use either object-identity matching or a
product-plus-command-name mount structure. Apply the same rule in
.drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v7.ts lines
767-789, or explicitly state that v7 is superseded by v8 for this behavior.
- Around line 82-90: The packaging ruling near the protocol types must document
the self-reference requirements for the import used by
engine-interface-draft.ts: declare the package name as `@prisma/cli-engine`,
expose ./protocol in its exports, and require TypeScript moduleResolution
node16, nodenext, or bundler. Mention a relative import as the alternative when
these constraints are not desired.

In @.drive/projects/prisma-cli-v8/assets/engine/output-modes-survey.md:
- Around line 614-623: Use one authoritative daemon boundary across all three
documents: in .drive/projects/prisma-cli-v8/assets/engine/output-modes-survey.md
lines 614-623, describe daemon coupling as a product capability or straddler
rather than an engine mode; in
.drive/projects/prisma-cli-v8/assets/engine/daemon-library-notes.md lines 11-16,
preserve the zero-engine-surface ruling and reference the survey terminology;
and in .drive/projects/prisma-cli-v8/design-notes.md lines 41-45, state that
daemon behavior remains in product control clients.

In @.drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r2.md:
- Around line 11-12: Correct the round-1 disposition summary to reflect all 26
findings in the table: 15 Resolved, 9 Partial, and 2 Open/untouched. Update both
the opening summary and the repeated totals at the referenced later statement,
and ensure the round-3 baseline in code-review-r3.md uses the corrected figures.

In @.drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r3.md:
- Line 113: Correct the round-2 disposition summary counts in the referenced
review document: change Partial from 3 to 2 while preserving Resolved 14, Open
4, and Regressed 1.
- Around line 3-4: Update the round-3 finding range in the document header from
P01–P11 to P01–P14, preserving the existing reviewer-pass wording.

In @.drive/projects/prisma-cli-v8/assets/engine/reviews/code-review.md:
- Line 639: Fix the dangling F26 reference in the findings documentation by
either promoting the R13 optional-dependency-probe item to a numbered F26
finding or changing the reference in the R4 row to the existing R13
acceptance-table entry. Preserve the summary counts and ensure cross-round
traceability with code-review-r2.md and code-review-r3.md.

In
@.drive/projects/prisma-cli-v8/assets/engine/reviews/envelope-collections-analysis.md:
- Around line 103-116: Define and export a serializable diagnostic type
containing the documented code, severity, and remediation fields, then replace
diagnostics: readonly unknown[] with readonly Diagnostic[] in both envelope
interfaces. Preserve the existing distinction that error diagnostics require a
non-zero outcomeCode while warn/info diagnostics remain advisory.
- Around line 199-212: Correct the migration compatibility claim in the
“Migration cost for the shipped sites” section: do not describe the envelope
changes as additive or non-breaking while removing warnings and nextSteps.
Either scope the migration explicitly to the new engine only, or document the
required envelope versioning and compatibility adapter; update the surrounding
claims about existing envelopes consistently.
- Line 51: Escape the pipe separators in the inline discriminated-union text in
the table row describing ORM init DB probe soft-failures, preserving the union
in a single Markdown table cell with the intended two-column layout.

In
@.drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review-r3.md:
- Around line 228-234: Keep createTestCli.config typed as LoadedConfig rather
than broadening it to a raw config union, and add a factory that constructs both
valid and intentionally invalid loaded states for testing ConfigSection
validation. Preserve Runtime’s typed configuration contract while enabling
coverage of the invalid-section path required by R10.
- Around line 360-365: Revise the Verdict section and the corresponding
conclusion around the referenced outcome-code discussion so the review remains
conditional rather than declaring a clean pass. Reconcile the ADR 239 and v4
exit-code and envelope-level dotted-code contracts in the requirements,
selecting one consistent outcome contract before allowing a final pass verdict.
- Around line 40-43: Define and document a deterministic stdout contract for
`output` events with `channel: 'data'` and `presentation.stdout`, either by
specifying their ordering or prohibiting their combination. Update the relevant
command/output handling symbols to enforce that contract, and add an end-to-end
test proving machine consumers receive the expected stdout sequence.
- Around line 238-240: Define an explicit merge order for `nextActions`, stating
whether aggregated `remediation` events or `presentation.next` entries come
first, and establish the action fields used as the deduplication key. Update the
completed-path design around `nextActions` to apply that stable ordering and
retain only the first occurrence of duplicates, then add coverage for duplicate
actions and ordering.
- Around line 14-17: Resolve the C4 prompt-input gap before marking the
interface implementation-ready: either extend the prompt input contract beyond
AsyncIterable<string> to support the keypress-driven raw input required by §4a
and add tests, or revise §4a to require only supported input. Update the
readiness/verdict language to reflect the chosen resolution.

In @.drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review.md:
- Around line 109-113: Update the finding cross-reference in the boundary
discussion so the config-section analysis points to finding A13 instead of A12;
leave the surrounding description and the separate Ui finding reference
unchanged.

In @.drive/projects/prisma-cli-v8/design-notes.md:
- Around line 17-20: Keep the framework decision provisional: in
.drive/projects/prisma-cli-v8/design-notes.md lines 17-20, describe
`@stricli/core` as provisional pending the comparative spike rather than settled.
In .drive/projects/prisma-cli-v8/assets/engine/stricli-vs-clipanion.md lines
17-32, label the result as a candidate evaluation and retain the required spike
gates.

In @.drive/projects/prisma-cli-v8/spec.md:
- Around line 64-71: Update FR6 in the specification to explicitly resolve the
project command-tree collision: assign the project group to a single product
owner or define distinct path roots for Composer and Cloud/platform commands.
Ensure the chosen partition is consistent with R12 and createCli, which reject
group/tree collisions.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0877ab06-a332-47fd-8607-48cd6a9387e9

📥 Commits

Reviewing files that changed from the base of the PR and between f7ea6e8 and 4851431.

📒 Files selected for processing (24)
  • .drive/projects/prisma-cli-v8/assets/briefs/1b-leftovers-prisma-prisma.md
  • .drive/projects/prisma-cli-v8/assets/briefs/1c-leftovers-composer.md
  • .drive/projects/prisma-cli-v8/assets/engine/daemon-library-notes.md
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v1.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v2.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v3.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v4.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v5.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v6.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v7.ts
  • .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft.ts
  • .drive/projects/prisma-cli-v8/assets/engine/output-modes-survey.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r2.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r3.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r4-closure.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/code-review-r5-delta.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/code-review.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/envelope-collections-analysis.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review-r2.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review-r3.md
  • .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review.md
  • .drive/projects/prisma-cli-v8/assets/engine/stricli-vs-clipanion.md
  • .drive/projects/prisma-cli-v8/design-notes.md
  • .drive/projects/prisma-cli-v8/spec.md

Comment thread .drive/projects/prisma-cli-v8/assets/engine/daemon-library-notes.md
Comment thread .drive/projects/prisma-cli-v8/assets/engine/engine-interface-draft-v1.ts Outdated
Comment thread .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review-r3.md Outdated
Comment thread .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review-r3.md Outdated
Comment thread .drive/projects/prisma-cli-v8/assets/engine/reviews/system-design-review.md Outdated
Comment thread .drive/projects/prisma-cli-v8/design-notes.md
Comment thread .drive/projects/prisma-cli-v8/spec.md
wmadden-electric and others added 2 commits August 9, 2026 18:39
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
… drafts

Code review artifacts are never committed; the compile-verified claims survive as the permanent type-test suite in @prisma/cli-engine. Only the current normative engine-interface-draft.ts remains. References updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@coderabbitai coderabbitai 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.

Actionable comments posted: 5

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.drive/projects/prisma-cli-v8/plan.md:
- Around line 41-52: Add an explicit S3 cross-repository publication gate to the
plan, covering release order between the engine, composer, and prisma-cli; the
exact published engine version and ./protocol pin; tarball integrity
verification; ownership of pin updates; and the rollback procedure if
publication or consumption fails. Update the S3 section while preserving its
existing scope and tandem-release requirements.
- Around line 90-96: Update the fenced ASCII dependency graph in the plan
section containing the S1–S7 diagram by adding the text language tag to its
opening fence, using a matching closing fence and leaving the graph content
unchanged.

In @.drive/projects/prisma-cli-v8/plans/s1-engine-vertical.md:
- Around line 60-77: Resolve the undefined --quiet requirement in the S1
contract: either add --quiet to the engine option definitions, including its
behavior for streams and StreamEvent emission across D3/D4, or remove --quiet
from the S1 acceptance criteria. Keep the documented acceptance options and
behavior consistent across the referenced sections.

In @.drive/projects/prisma-cli-v8/specs/s1-engine-vertical.md:
- Around line 37-44: The Runtime.config loader specification must define failure
behavior when evaluating prisma.config.ts throws, rather than returning a
successful LoadedConfig. Specify the failed module result for both the
unversioned defineConfig marker path and the unparseable or evaluation-failed
path, and add a test covering a classic Prisma 7 config that throws during
evaluation.
- Around line 50-58: The `auth whoami` specification must preserve the existing
unauthenticated success behavior: update the `needs.credentials` scenario to
return a completed `auth.whoami` success envelope with `nextSteps` directing the
user to login. Do not require credentials or introduce an `AUTH_REQUIRED` error
unless the controller and shell behavior are intentionally changed.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 2643eab4-47fb-4c85-8296-ef0c859e709f

📥 Commits

Reviewing files that changed from the base of the PR and between 4851431 and 6c00a6b.

📒 Files selected for processing (4)
  • .drive/projects/prisma-cli-v8/design-notes.md
  • .drive/projects/prisma-cli-v8/plan.md
  • .drive/projects/prisma-cli-v8/plans/s1-engine-vertical.md
  • .drive/projects/prisma-cli-v8/specs/s1-engine-vertical.md

Comment thread .drive/projects/prisma-cli-v8/plan.md
Comment thread .drive/projects/prisma-cli-v8/plan.md Outdated
Comment thread .drive/projects/prisma-cli-v8/plans/s1-engine-vertical.md
Comment thread .drive/projects/prisma-cli-v8/specs/s1-engine-vertical.md
Comment thread .drive/projects/prisma-cli-v8/specs/s1-engine-vertical.md
wmadden-electric and others added 7 commits August 9, 2026 23:22
R4 read as a blanket ban on reading disk, which R9 (Composer importing
the user's modules at execution time) contradicts. Limit the prohibition
to engine-owned state reached around the context, state that the output
surface is a typed result and event sink with no writable streams or
exit, and say product-domain disk access inside handlers is allowed.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…iation

'No runtime tree construction' could be read as forbidding building the
tree at startup, which is exactly what createCli does. Say instead: no
dynamic or discovery-driven tree construction; each engine instance
builds its tree once at startup from statically defined structure.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
R10 promised 'never a crash' but only constrained validators; a config
that fails to import or evaluate crashes earlier. Require the engine to
catch load and evaluation failures and surface them as typed file-level
diagnostics naming the config path, matching the shipped loader.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Name the mechanism instead of gesturing at it: the engine package owns
both sides — defineConfig stamps the $prismaConfig field, the loader
checks it first — and each failure mode has its typed diagnostic:
CLI.CONFIG_MISSING_MARKER for unmarked files, CLI.CONFIG_INVALID for
unsupported (including future) versions, CLI.CONFIG_UNREADABLE for
files that fail to evaluate. Matches the shipped loader.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The path looked like a typo but is real: prisma/prisma has a directory
literally named 'architecture docs'. Link the explicit GitHub URL and
note the space so readers stop tripping over it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
The zero-dependency, no-process.exit and stale-release-line claims are
version-specific. Record them: @stricli/core 1.3.0 (published
2026-07-16, now exact-pinned by the engine) versus Clipanion 4.0.0-rc.4
(2024-09-06; latest stable 3.2.1, June 2023).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
markdownlint MD040 flags fences without a language.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@coderabbitai coderabbitai 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.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/architecture/cli-engine-requirements.md (1)

269-285: 📐 Maintainability & Code Quality | 🔵 Trivial

Pin the framework evidence to an immutable revision.

The research link targets main, but this section relies on version-specific claims about @stricli/core and Clipanion. Pin the linked document to the commit used for the evaluation so later edits cannot change the basis of this decision.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/cli-engine-requirements.md` around lines 269 - 285, Update
the research reference in this decision section to use the immutable commit URL
corresponding to the evaluation, replacing the current main-branch link while
preserving the linked document path and surrounding framework evidence.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/architecture/cli-engine-requirements.md`:
- Around line 172-182: Update the version-marker contract section to explicitly
require this order: evaluate the module, return the file-level
CLI.CONFIG_UNREADABLE diagnostic on evaluation failure, then read and validate
the exported $prismaConfig marker before validating any config sections. State
the literal accepted marker value and require defineConfig to stamp that exact
value, while preserving CLI.CONFIG_MISSING_MARKER for absent markers and
CLI.CONFIG_INVALID for unsupported versions.

---

Outside diff comments:
In `@docs/architecture/cli-engine-requirements.md`:
- Around line 269-285: Update the research reference in this decision section to
use the immutable commit URL corresponding to the evaluation, replacing the
current main-branch link while preserving the linked document path and
surrounding framework evidence.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a9d43840-1ef2-4ebf-a50e-5686c438bb3e

📥 Commits

Reviewing files that changed from the base of the PR and between 6c00a6b and a920cc0.

📒 Files selected for processing (2)
  • .drive/projects/prisma-cli-v8/plan.md
  • docs/architecture/cli-engine-requirements.md

Comment thread docs/architecture/cli-engine-requirements.md
wmadden
wmadden previously approved these changes Aug 9, 2026
The committed design drafts deliberately use erased types that trip
error-severity lint rules; they are design prose, not shipped code.
Same exclusion the s1-engine-vertical branch already carries.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@coderabbitai coderabbitai 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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/architecture/cli-engine-requirements.md (1)

269-285: 🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Framework ownership is closed in the documents but open in the PR objective.

The requirements and delivery plan both force @stricli/core, while the PR objective deliberately leaves third-party wrapping versus end-to-end ownership open. Align the architecture scope before implementation proceeds.

  • docs/architecture/cli-engine-requirements.md#L269-L285: move the framework decision to non-binding research, or update the PR objective.
  • .drive/projects/prisma-cli-v8/plan.md#L18-L24: remove the exact-pinned @stricli/core requirement until framework ownership is decided.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/architecture/cli-engine-requirements.md` around lines 269 - 285, The
architecture decision is binding while the PR objective leaves framework
ownership unresolved. In docs/architecture/cli-engine-requirements.md lines
269-285, either make the framework evaluation non-binding or update the PR
objective to commit to `@stricli/core`; in .drive/projects/prisma-cli-v8/plan.md
lines 18-24, remove the exact-pinned `@stricli/core` requirement until that
ownership decision is aligned.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@docs/architecture/cli-engine-requirements.md`:
- Around line 269-285: The architecture decision is binding while the PR
objective leaves framework ownership unresolved. In
docs/architecture/cli-engine-requirements.md lines 269-285, either make the
framework evaluation non-binding or update the PR objective to commit to
`@stricli/core`; in .drive/projects/prisma-cli-v8/plan.md lines 18-24, remove the
exact-pinned `@stricli/core` requirement until that ownership decision is aligned.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3765457f-cd4e-4733-a438-511efe112b52

📥 Commits

Reviewing files that changed from the base of the PR and between 6c00a6b and a920cc0.

📒 Files selected for processing (2)
  • .drive/projects/prisma-cli-v8/plan.md
  • docs/architecture/cli-engine-requirements.md

@wmadden-electric

Copy link
Copy Markdown
Contributor Author

Round-2 triage of the review bodies. Every finding in the five review summaries was read and decided; nothing was dismissed in bulk.

Review of 10:13 (8 findings, docs/architecture/cli-engine-requirements.md) — all addressed on this branch or answered on the thread: R4 scoping and the output surface (5e3da1f), R10 load/evaluation failures (911f452), the version-marker contract (7c9b183), R9 static-tree wording (e8c99af). Exit status already lives in the engine and the product-only test entry point is already covered by R7 and R8. The CommanderError point was withdrawn after the operator confirmed Commander is not retained.

Review of 11:20 (4 findings) — the event-extension contract is already in R14; the research reference was fixed in 0c34b78 and the evaluated versions and date recorded in 1899416. The Stricli help-layout point is not actionable: R5 makes the engine render all output, so Stricli's help layout is never reached, and the Commander shell this PR replaces is not the subject.

Review of 16:24 (22 findings, .drive design assets) — thirteen of them target files removed by 6c00a6b (the closed review rounds and superseded interface drafts v1–v7); those records document what each round found at the time, so there is nothing left to correct. The createCli product-linkage point is resolved in the slice-S1 draft, where ProductManifest became CommandFamily, a family carries its own commands and docs base URL, and foreign-section references fail construction. The parked leftover briefs, the daemon notes, and the output-modes survey stay as written — they are research records for later slices, not live specifications. The framework choice is a dated decision, not a provisional note. The FR6 project split is answered by the 2026-08-10 operator ruling (Composer parks under composer, the platform keeps project).

Review of 18:10 (5 findings) — the fence tag landed in a920cc0; --quiet, the config-evaluation failure path, and the unauthenticated auth whoami envelope are already specified in the S1 documents. The S3 cross-repository release mechanics are out of scope for the project plan and will be shaped with S3.

Review of 21:30 (2 findings) — the marker-order point is answered on its thread. The outside-diff request to pin the research link to a commit is not actionable: the version-specific claims are already stated inline with their evidence (decision date, @stricli/core 1.3.0 published 2026-07-16 and verified against the published artifact, Clipanion 4.0.0-rc.4 and 3.2.1), and the link points at the rubric, which stays useful as it evolves.

@wmadden-electric
wmadden-electric merged commit 6abc20f into main Aug 9, 2026
10 checks passed
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