/luismc-project-setup:tech-stack-setupfrom luismc-project-setup
Pick a coherent tech stack and generate a repo that conforms to STACKSPEC, or audit a repo for drift. Use to start a new product, pick a stack, scaffold or bootstrap a conforming repo, set up the tech stack, check conformance, or on /luismc-project-setup:tech-stack-setup. Not for auth.
Ships in luismc-project-setup. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill does two things:
STACKSPEC (the version in references/stackspec.md), the binding
invariants specification at the plugin's references/stackspec.md.STACKSPEC contains no technology names. It specifies properties:
contract-first APIs, atomic enqueue, adapter boundaries, retention and erasure,
consent-gated analytics, three-tier promotion. These hold whether the product is
TypeScript on Vercel or Rust in a container.
The technology knowledge lives in assets/catalog/, which is data, not
requirements. Nothing in the catalog is graded. STACKSPEC §0.2 defines a
fourth requirement level, CHOICE, for this purpose. A CHOICE is reported
as recorded or unrecorded, never as conforming or violating.
Read the spec before acting on it. Read the sections a step needs. Do not work from this file's summary, and do not generate against a clause you have not read.
It does not build authentication. AUTHSPEC is a separate binding spec owned
by the sibling auth-setup skill. This split exists to stop running both in one
pass. A user who asked to "set up the stack" got a full auth stack that they had
not asked for and could not review in one sitting.
AUTHSPEC §2.1 resolves the stack by finding a declared stack document in the
project, and the Stack Profile this skill writes is that document. So the
order is not a preference: auth-setup has nothing to resolve against until this
skill has finished.
Phase 9 asks whether to run it. Never start it automatically, not even if the user said "set up the whole thing" at the beginning.
A product MUST NOT contain a copy of the spec (§2.1, §16). The spec lives
here, versioned with this plugin. A product carries a Stack Profile instead:
assets/stack-profile.md, deployed to docs/architecture/stack-profile.md (STACKSPEC §18; a repo that still has it at docs/specs/stack-profile.md is read there until it moves), naming the
spec version it conforms to (the spec's **Version:** line) plus its selections, capability gaps and deviations.
A vendored copy becomes a second, competing authority. No CI check can compare it against the original. The profile's version reference is the only thing that can go stale in a way that can be detected.
pnpm install, the hooks), what it changes outside the repository (new cloud projects and buckets from the provisioning ledger), what needs the owner (a yes, a sign-in, a production secret) and about how long it takes. Ask for one yes. Phase 6 questions stay.pnpm install, the git hooks, dev provisioning where a CLI exists, and the checks of Phase 8. Leave to the owner only what you cannot do: production secrets (run with the ! prefix), a web-only setting, a sign-in. Give each an exact step and check it afterwards.pnpm dev starts the apps, pnpm test runs the tests, python3 scripts/delivery/branch_gate.py --no-publish runs the branch gate, /luismc-project-setup:auth-setup builds authentication, /luismc-project-setup:tech-stack-setup in Mode 2 checks conformance).STACKSPEC is prescriptive enough to generate from directly. There is no
template repository.
Confirm the working directory, that it is a git repo (git rev-parse --show-toplevel; offer git init if not), and that it is empty or nearly so.
If it already holds a product, switch to Mode 2. Do not generate over existing
code.
Then show the fixed foundation and ask nothing about it. From
assets/catalog/roles.yaml, the fixed: block:
| Layer | Fixed |
|---|---|
| Repo | Git, monorepo apps/ + packages/, docs/specs + docs/notes |
| CI | GitHub Actions, path-filtered, twelve required gates (§13.1), gated E2E (§11.2), a default-branch run that skips a tree already tested |
| Delivery | a branch gate with a verifiable result, a pre-push guard hook, a merge script and a CI watcher (§13.5, §13.6) |
| Promotion | preview per PR, staging on merge, production on release (§13.2) |
| Security | gitleaks pre-commit + CI over full history, dependency scanning |
| Contract | One machine-readable contract, authored first, all clients generated from it (§4.1) — the format is chosen in Phase 3 |
| Secrets | three tiers, one validated config schema, value-free example env |
Everything else is chosen. Say that explicitly. It sets the expectation for the next eight phases.
Six questions, none about technology, from roles.yaml's profile: block:
team expertise · cost posture · ops appetite · compliance and residency ·
lock-in tolerance · does mobile ship.
Mobile has the largest cascade of the six. It forces generated Swift and Kotlin clients, push credentials and store declarations, and it makes hypermedia web approaches cost double. Ask it even when the answer seems obvious.
A seventh question is asked only when something other than "web plus API" is
possible: does any part of the product run on a user's or operator's machine?
Offer: none, a command-line tool (CLI), a host service (installer helper,
background service, tray), or a native library inside the JS app (napi or WASM).
Any answer but none opens the native_components role in Phase 3. None is the
default. Do not ask about a hot path or a memory ceiling here; the reason is
written down in Phase 3.
Two answers are worth reacting to immediately:
none → the free bundle is eliminated outright.
Free tiers rarely offer a DPA and often pin no region. Say so now, not later.Three ways in, not two:
| Path | What it does |
|---|---|
| Recommend me a stack | Derive 2–3 complete candidates from Phase 1 and present them side by side. Most users should take this. |
| Infrastructure first | Host constrains language. |
| Language first | Language constrains host. |
The two ordered paths are the same solver with a different binding order —
roles.yaml's entry_paths: holds both orders.
Work the chosen order. For each role:
conflicts, requires and hosting scores in the catalog files.Server language largely determines which hosting is viable. From
tech/hosting.yaml:
§4.1's generated
client is the seam, and it already has to exist.Ask this role only when the Phase 1 machine-side question was not "none". The
role is native_components (multi-select, default none). Rust is a component
beside any API language and any host. The host elimination above applies to the
API language only. For each pick, the wizard binds one component with these
fields: id, parts, reason, build_matrix, cross_compile,
licence_note, targets, windows_runner.
cli, host-service, library-napi, library-wasm.
worker and media are later_parts: do not offer them. Add them only when
the project asks.reason_prompt and write the answer as a plain
sentence in the Stack Profile. A written reason is enough. Do not ask for a
measured number or a profile. No reason means no component; the default is to
stay in the main language.targets.library-napi part needs a prebuilt binary for each
OS and CPU. Ask which pairs to build and record them in build_matrix. On
Vercel the Linux pair must be in it; warn if it is not.cross_compile and write a
licence_note: the cross tool downloads the Microsoft CRT and SDK, and the
project accepts that licence once. Record who accepted it and when.cargo-xwin on Linux (needs the licence note above), or a Windows runner
(set windows_runner). If the owner accepts neither, the Windows target is
deferred, not dropped silently.Run check_stack.py on the result. It warns on a Rust component with no
recorded reason, a napi addon with no build matrix, and a cross-compile target
with no licence note.
What not to change for Rust:
§20).requires_reason.Every provider (database engine and host, cache, storage, mail, error tracking)
is a CHOICE. None produces a deviation. Say out loud why this is safe:
§3.3 confines each vendor SDK to exactly one adapter module. That turns
"we picked the wrong provider" into a change to one file. That rule is what
allows the freedom. Mention it when the user hesitates over a vendor.
No role is closed, but four carry a property the candidate must satisfy. The
spec names no technology anywhere (§20 makes doing so a defect). Present these
as a bar to clear, not a list to pick from:
| Role | The property (§) | What falls out, and why |
|---|---|---|
| Contract format | Maintained generators for every client language (§4.1) | Anything without a Swift or Kotlin generator, when mobile ships |
Authenticated bounce/complaint feedback into a suppression list (§8.1) | Bare SMTP with no event channel — SMTP plus a feedback source conforms | |
| Push | Device tokens never disclosed outside the §10.4 register (§8.3) | Nothing. A push vendor is priced, not banned — it adds a register entry |
| Analytics | Non-essential events gated on server-side consent at an ingestion point you control (§10.3) | Any SDK reporting to a backend you don't control |
Users argue with the analytics property. It excludes Vercel Web Analytics, Cloudflare Web Analytics, CloudWatch RUM, Pinpoint and GA, but on architecture, not brand. An SDK that reports to a vendor backend cannot be gated on consent state that the backend never sees. A vendor that offers consent-gated ingestion under your control passes the clause. Say it that way: "not allowed" invites a fight, and "here is the bar" does not.
State the consequence too. With first-party collection, §14's field-vitals
budgets need web-vitals reporting to your own endpoint, which is real work.
Do not ask these. Compute and state them:
| Derived | From | Source |
|---|---|---|
| Queue substrate | db_engine | tech/data.yaml → queue_derivation |
| Data access + migrations | language + db_engine | tech/data.yaml → engine data_access |
| Package manager, task runner, lint, test, boundary check | language | tech/languages.yaml → derives |
Explain the queue derivation, do not just state it. If the engine supports
transactional enqueue, the queue is a table in the product's own datastore and
enqueue happens inside the business transaction. If it does not, an outbox with a
relay is mandatory, and that is a §18 item 14 capability gap.
Say what is counter-intuitive: an external queue is not an upgrade. Where the engine supports transactional enqueue, moving the queue out adds a sub-processor and brings back the dual-write problem that the outbox then has to solve.
Show the complete stack on one screen. Then run the validator:
python3 "${CLAUDE_PLUGIN_ROOT}/scripts/check_stack.py" --selection <selections.yaml>
It reports errors (combinations that cannot be built) and warnings
(capability gaps that STACKSPEC requires to be recorded). Do not skip it
because the reasoning "already checked". A wizard that reasons its way to "Go on
Vercel" in a long session is the failure the script exists to make
impossible.
For each warning, capture a one-line reason and the compensating control. These
become §18 item 14. Pushback rules, from roles.yaml:
| Situation | Action |
|---|---|
| Hard conflict | Block. Offer the nearest working alternative. |
| Weakens an invariant | Explain, capture a reason, record it |
| Ordinary tradeoff | State it once, proceed. No ceremony. |
For every external service in the stack, ask three things: do you have an account? → do you have the dev credential? → should I provision it now?
Three outcomes per row: have it, provision now, defer with a placeholder and a TODO.
Dev is automatic, production is manual. This split is deliberate:
neonctl projects create, wrangler r2 bucket create, supabase projects create, fly secrets set, …). Write values to a git-ignored .env.local.! prefix, so production secrets never enter the transcript. If a value is
read into a tool call it lands in conversation history and possibly in logs.Four rules for this phase:
.env.example gets key names and descriptions only (§15).§15). Dev, staging, production, with
separate credentials. A single list invites sharing one.docs/architecture/stack-profile.md, else the old docs/specs/stack-profile.md) item 6 with
statuses only, never values, so a later run picks up the deferred rows.Generate .env.example, the config-validation schema (§15's "one schema,
validated at startup") and the CI secret list from the ledger, so the three
cannot drift.
Build in dependency order. Each step is a precondition of the next: Print one line for each step as it runs.
| Step | Owner |
|---|---|
1. Repository skeleton, workspace, CI, hooks, secret scanning, branch gate and delivery scripts — copy the hooks, linters and guards from assets/tooling/shared/ and assets/tooling/<track>/ (see references/phase-7-generate.md); the CI and delivery files come from luismc-delivery's installer (see the same file) | this skill and luismc-delivery |
2. core, then the data module with initial schema and migration runner | this skill |
3. contract — the OpenAPI document and generators | this skill |
| 4. (auth) | auth-setup — skip entirely |
5. apps/api — skeleton, health route, error envelope, route-coverage test harness, non-auth routes only | split |
6. jobs + apps/worker with §7.4's required job set | this skill |
7. Adapters: mail, storage, notify, observability | this skill |
8. tokens and the UI module | this skill |
9. apps/web, apps/admin | this skill |
10. apps/ios, apps/android — whenever wanted | this skill |
| 11. Stack Profile, runbooks, conformance run | this skill |
Read references/phase-7-generate.md before step 1. It holds what step 1 copies where, the delivery installer call, the Rust workspace addition, and the seam at steps 4 and 5.
Run Mode 2 against what you generated. A generation that has not been checked is
not finished. Expect and ignore auth-shaped absences. They are the declared gap,
not findings. Also run the branch gate once (python3 scripts/delivery/branch_gate.py --no-publish) so the first result is a real one. Fix gate.json if a step
cannot run.
Report: what was generated · what was deferred and why · every profile field the user still has to fill · every open ledger row · the Mode 2 findings.
Give the report as three parts, in this order, with these headings: Done (what was generated and deferred, with paths), Left for you (every profile field and open ledger row, as numbered steps with the exact command, each checked afterwards), What you can do now (see "Setup pattern").
Authentication is absent by design. Say so plainly, then ask:
The stack is set up and authentication is not part of it.
auth-setupbuildspackages/authagainstAUTHSPEC, a separate binding spec. Want to run it now, or later?
Do not start it without an answer, and do not treat an earlier "set up the whole thing" as that answer. Two binding specs in one unreviewable pass is the failure this split exists to prevent. If the user says later, say what to run and stop.
Read references/mode-2-conformance.md when the target already holds a product (Phase 0), and in Phase 8 to check what was generated. It holds the whole check, the version upgrade notes, the divergence classes and the repair pass.
Read references/catalog-and-tooling.md before Phase 3, and before you edit assets/catalog/ or assets/tooling/. It holds the catalog file table, how to keep the catalog honest, and the three properties every track's tooling must keep.
STACKSPEC itselfNot part of using this skill. The spec is maintained in the dev-standards
repository, which gates every edit with the luismc-docs spec-check skill (skills/spec-check/assets/spec_check.py) and documents the
process in its README. A product never edits its copy, because it never has one.
Two governance rules worth knowing before proposing a change (§20):
MUST is a major version only when it breaks a conforming product (§20).CHOICE to a SHOULD or MUST is always a major version, and naming a
vendor anywhere in the spec is a defect, not an edit. A promotion always grades
products that were conforming. Technology belongs in
the catalog.assets/catalog/bundles.yaml (opens in a new tab)assets/catalog/roles.yaml (opens in a new tab)assets/catalog/tech/data.yaml (opens in a new tab)assets/catalog/tech/frameworks.yaml (opens in a new tab)assets/catalog/tech/hosting.yaml (opens in a new tab)assets/catalog/tech/languages.yaml (opens in a new tab)assets/catalog/tech/services.yaml (opens in a new tab)assets/stack-profile.md (opens in a new tab)assets/tooling/README.md (opens in a new tab)assets/tooling/dotnet/tests/Guards/Guards.csproj (opens in a new tab)assets/tooling/dotnet/tests/Guards/NoConflictMarkersGuard.cs (opens in a new tab)assets/tooling/go/guards/conflict_markers_guard_test.go (opens in a new tab)assets/tooling/rust/Cargo.toml (opens in a new tab)assets/tooling/rust/crates/guards/Cargo.toml (opens in a new tab)assets/tooling/rust/crates/guards/src/lib.rs (opens in a new tab)assets/tooling/rust/crates/guards/tests/guard_conflict_markers.rs (opens in a new tab)assets/tooling/rust/deny.toml (opens in a new tab)assets/tooling/rust/rust-toolchain.toml (opens in a new tab)assets/tooling/rust/rustfmt.toml (opens in a new tab)assets/tooling/ts/e2e/quarantine.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
opusmedium3 skills in this plugin
/auth-setupAuth setup — build and checkBuild or audit authentication per AUTHSPEC in a repo set up by tech-stack-setup. Use to add authentication, login, signup, sessions, passkeys, MFA or admin access, for an auth audit, or on /luismc-project-setup:auth-setup. Refuses a repo that tech-stack-setup has not set up./claude-setupClaude setupApply the Claude Code config (statusline, settings, model split, rules, CLAUDE.md, the luismc plugins) to a project or ~/.claude/, then offer the dev-standards setups. Use to set up Claude, configure the statusline, fix Claude settings, add a CLAUDE.md, or on /luismc-project-setup:claude-setup.Other plugins' skills for the same job
npx claudepluginhub luis-mc/dev-standards --plugin luismc-project-setup