Integration planning
Inspect package-authored application requirements and ejectable wiring before a repository generator writes code.
Playstack packages declare the application work needed to compose a capability in playstack.integration.json. The package remains authoritative for its framework requirements and templates; the repository tool decides where reviewed application-owned files belong.
Inspect the selected closure
npx playstack add rate-limit \
--api=apps/api \
--adapter=redis \
--dry-run \
--jsonThe report declares writes: false and contains both the selected package closure and normalized integrationRequirements. Exact surface, adapter:<name>, and package conditions remove irrelevant requirements before the plan reaches Megamono.
| Requirement | What it communicates |
|---|---|
| Templates | Integrity-checked, ejectable source plus the suggested application target. |
| Module imports and provider tokens | Framework registration and dependency-injection boundaries. |
| Routes | Endpoint method, path purpose, and handler contract. |
| Environment | Semantic key, suggested names, whether it is required, and whether it is secret. |
| Database artifacts | Schema requirements tied to the selected named database target. |
| Framework configuration | Raw-body, proxy, cache, or other host-framework changes. |
| Health checks | Bounded readiness checks expected for the selected provider. |
| Required tests | Contract, integration, and application-policy checks to retain. |
| Decisions | Product-specific questions that automation cannot safely answer. |
Keep generation application-owned
Dry runs now expose integrationCoverage separately from requirements: dependencyValidation is declared-ranges-only and applicationVerification is not-run. Each inspected package reports manifest availability, selected templates and required tests; applicationPersistence lists application-owned adapter work. Missing integration declarations can be appropriate for utilities, but a successful installation plan is not completed wiring or a passing integration suite.
Playstack does not apply the JSON report or write routes and modules itself. Megamono consumes the plan with its Nx-aware project inventory, resolves destinations, reports conflicts, and materializes reviewed templates as application code. A repository without Megamono can copy or adapt the same package-owned templates manually.
Generated wiring is intentionally ejectable. Once materialized, the application owns authorization, credentials, route names, infrastructure lifecycle, deployment topology, and product policy. Managed database and other security-critical artifacts remain under Playstack's separate artifact synchronization contract.
Published contracts are verified
Every integration manifest is validated against a shared schema before a package is published, and each referenced template ships with its SHA-256 hash, so a dry-run plan is executable however the package was installed.
Manifests cover adoption-focused surfaces including rate limiting, cache, queues (now including Cloudflare Worker templates), auth, accounts, billing, storage, webhooks, AT Protocol and localization. Some declare requirements without templates. Use the selected plan's coverage rather than treating this list as a universal wiring guarantee.
Existing workspace discovery
playstack init --survey recognizes project.json, package-manifest Nx declarations, and npm/Yarn/pnpm workspace patterns and exclusions. Dual declarations merge by project root, with project.json taking precedence; duplicate names and conflicts are reported. Generated/symlinked directories are excluded, and root dependencies alone do not turn a source-less tooling project into a Next/Nest app.
This remains static discovery, not execution of Nx inference plugins. Review ambiguous projects and explicit surfaces, or use Megamono's richer project inventory. A survey does not authorize changing deployment targets or existing CI.
Separate planning from installation
Review the JSON plan before running the corresponding mutation:
npx playstack add rate-limit \
--api=apps/api \
--adapter=redis \
--yesThe CLI re-resolves package and peer ranges during installation. An existing dependency counts as compatible only when its declared range fits the verified adapter range; presence by package name alone is insufficient.
When a declaration is refused, the error identifies the package manifest to
review. A range such as >=4.1 <5 permits versions outside a required ^4.6.5,
even if the current lockfile resolves 4.6.5. Explicitly align the declaration
to the reported range or a compatible narrower range, review the lockfile, then
rerun the original command with the same surface, adapter and package-source
options. Unverifiable workspace/source declarations need their own review;
the CLI does not rewrite them or accept an installed version as a substitute.
Select native Nest or OpenAPI validation
pnpm exec playstack add validation --web=apps/web --dry-run --json
pnpm exec playstack add validation --api=apps/api --dry-run --json
pnpm exec playstack add validation --api=apps/api --adapter=openapi --dry-run --jsonPortable and web-only profiles select no Nest packages. The API profile selects
the native @playstack/validation/nest/pipe requirements. Add the explicit
openapi adapter for the complete DTO/serializer/OpenAPI bridge at /nest;
that adapter requires an API target. Native adoption does not select Swagger,
nestjs-zod or Scarf. Existing dependencies remain in place, so review your
application's imports before removing old framework packages yourself.
Review dependency build decisions
For pnpm, inspect pnpmBuildDecisions (actual boolean additions to workspace
allowBuilds) and pnpmBuildPolicies (effective decisions, existing/planned source
and reasons). Review these alongside the dependency commands:
pnpm exec playstack add queues \
--adapter=bullmq \
--local-packages=yalc \
--tag=0.1.0-beta.5 \
--dry-run --jsonScarf telemetry and optional MessagePack native acceleration default to denied.
Existing explicit boolean decisions are preserved. Selected Argon2 native builds
require an allowance; an existing denial or ignoreScripts: true stops planning
rather than being overwritten. Placeholders and policy whose effective permission cannot be
established must be reviewed before installing.
The CLI rechecks the workspace policy and writes reviewed decisions before any Yalc copy or package-manager command, preserving comments and unrelated settings. It does not disable script protections globally. Child install targets must use the reviewed root workspace; a nearer nested workspace is refused before writes. Unknown transitive scripts can still require owner review, and package-manager side effects are not transactional. A failed command reports completed steps and the reviewed retry; successful installation is not native/runtime qualification.
Use the installed CLI through pnpm exec playstack after dependency installation.
A bare Yalc-store payload is not a self-contained executable distribution:
node <store>/dist/bin.js fails because its runtime dependencies are not installed.
For a reviewed version available from the configured registry, pnpm dlx @playstack/cli@<version> <command> installs them. To bootstrap from an unpublished
local payload before the CLI is a project dependency, name the exact payload:
pnpm dlx file:$HOME/.yalc/packages/@playstack/cli/<version> add queues --dry-run
npx --package=./playstack-cli-<version>.tgz playstack add queues --dry-runpnpm installs the payload's public runtime dependencies into a temporary environment and leaves the store directory unchanged; npm accepts the packed tarball, not the store directory. Neither selects a version for you or records it.