scale-stack 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.0.2
4
+
5
+ Patch release with generator and template refinements after the first stable baseline.
6
+
7
+ ### Added
8
+
9
+ - Utility library selection support in CLI config, generated technology guidance, package baselines, and sync-managed targets.
10
+ - Utility library Agent Skills templates for date-fns, Motion, ts-pattern, and usehooks.
11
+ - Shared app layout generator helpers and broader unit coverage for generated route/layout behavior.
12
+
13
+ ### Changed
14
+
15
+ - Improved i18n template locale handling for stronger type safety and runtime validation.
16
+ - Refined generator feature predicates and conditional execution across selected stack combinations.
17
+ - Updated AI assistant guidance, dependency fragments, and generated technology inventory to reflect the active stack more accurately.
18
+ - Removed OpenTelemetry from generated technology guidance where it is not emitted by the current baseline.
19
+
3
20
  ## 0.0.1
4
21
 
5
22
  First stable release of the Scale Stack CLI.
package/README.md CHANGED
@@ -1,87 +1,68 @@
1
1
  # Scale Stack
2
2
 
3
- An opinionated scaffolding engine for Next.js projects. Scale Stack automates the setup of a colocation-first architecture, type-safe data layers, and an AI-native development environment — and keeps existing projects current via a `sync` command.
3
+ Most starters give you a repo that compiles on day one.
4
+ Scale Stack gives you a Next.js app that stays sharp on day one hundred.
4
5
 
5
- Status: **0.0.1 stable** first public baseline for `scale-stack init` and `scale-stack sync`. Some advertised Smart-Fittings remain coming-soon placeholders and are called out below.
6
+ It starts with an AI-native, colocation-first Next.js 16 project: strict config, typed env, shadcn/Tailwind, safe actions, forms, Docker, agent rules, and the optional fittings teams usually wire by hand. Then `scale-stack sync` keeps the boring-but-critical standards fresh without trampling your code.
6
7
 
7
- ## What's in the box
8
+ Status: **0.0.2 stable** for `init` and `sync`. A few fittings are visible early and clearly skipped until implemented.
8
9
 
9
- - **`scale-stack init`** — interactive or headless project generator. Shells out to `create-next-app@16.2.6` with a deterministic flag set, then layers Scale Stack overlays (strict `tsconfig.json`, `next.config.ts` with React Compiler / view transitions / typed routes / cache components, ESLint + Prettier, agent skills, …). See [PRD.md](PRD.md) for the full stack and [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) for phase status.
10
- - **`scale-stack sync`** — patches tracked config files (`tsconfig.json`, `package.json`, `next.config.ts`, `eslint.config.mjs`, `.prettierrc`) against the current Scale Stack baseline. Conflict detection, dry-run mode, snapshot-based rollback, and a version guard are all built in (PRD §2.2).
11
-
12
- ## Quick start
10
+ ## Start Fast
13
11
 
14
12
  ```bash
15
- # Interactive
13
+ # Pick your stack interactively
16
14
  npx scale-stack init my-app
17
15
 
18
- # Headless skip all prompts, accept defaults
16
+ # Script it in CI or docs
19
17
  npx scale-stack init --name my-app -y
20
18
 
21
- # Generate a kitchen-sink project
22
- npx scale-stack init my-app --orm --auth --chat --i18n --ci github --analytics plausible --pre-commit -y
19
+ # Go full-stack from the first commit
20
+ npx scale-stack init my-app --orm --auth --chat --i18n --utility-libs --ci github --analytics plausible --pre-commit -y
23
21
 
24
- # Preview changes to an existing project without writing
22
+ # Keep a generated app current
25
23
  cd my-app
26
24
  npx scale-stack sync --dry-run
27
25
  ```
28
26
 
27
+ ## Why It Feels Different
28
+
29
+ Scale Stack is not a frozen template. It is a living baseline for teams building with Next.js and AI coding agents.
30
+
31
+ - **Agents understand the project immediately.** Generated apps include agent guidance, skills, MCP wiring, and framework context so Cursor, Claude Code, and other MCP-capable tools can work with the architecture instead of guessing.
32
+ - **The architecture has a spine.** Route-owned components, hooks, state, actions, and AI artifacts live beside the pages that use them, keeping growth readable.
33
+ - **Upgrades are a workflow, not a rewrite.** `scale-stack sync` previews diffs, detects conflicts, snapshots before writes, and patches managed config keys while preserving user-owned choices.
34
+
29
35
  ## Commands
30
36
 
31
37
  ### `scale-stack init [name]`
32
38
 
33
- Assembles a new generated Next.js project. Run without `-y` for the interactive picker, or pass flags for headless generation.
34
-
35
- Supported flags:
39
+ Creates a new generated Next.js app. Run it interactively, or pass flags for a repeatable headless setup.
36
40
 
37
41
  - `--name <name>` — project name; overrides the positional argument
38
- - `--orm` — enable Prisma
39
- - `--auth` — enable Better Auth
40
- - `--chat` — scaffold the AI chat route
41
- - `--i18n` — opt into internationalization Smart-Fitting
42
- - `--a11y`, `--api-client` — accepted as coming-soon placeholders; currently skipped
43
- - `--ci [provider]` — CI provider; bare `--ci` defaults to GitHub
44
- - `--analytics [provider]` — analytics provider; bare `--analytics` defaults to Plausible
45
- - `--pre-commit` — enable prek hooks
46
- - `--jobs` — accepted for forward compatibility; currently skipped
42
+ - `--orm` — Prisma
43
+ - `--auth` — Better Auth; stateful with Prisma, stateless without it
44
+ - `--chat` — AI chat route and UI scaffold
45
+ - `--i18n` — next-intl routing and messages
46
+ - `--utility-libs` — Motion, date-fns, es-toolkit, useHooks, ts-pattern, and matching agent guidance
47
+ - `--ci [github|circleci|none]` — bare `--ci` defaults to GitHub; CircleCI is accepted but coming soon
48
+ - `--analytics [plausible|posthog|none]` — bare `--analytics` defaults to Plausible; PostHog is accepted but coming soon
49
+ - `--pre-commit` — prek hooks for lint, format, and typecheck
50
+ - `--jobs`, `--a11y`, `--api-client` — accepted coming-soon fittings; currently skipped
47
51
  - `-y, --yes` — skip prompts and accept defaults
48
- - `--dry-run` — preview generated file changes without writing
52
+ - `--dry-run` — preview generated changes without writing
49
53
 
50
54
  ### `scale-stack sync`
51
55
 
52
- Updates a generated project against the current Scale Stack baseline while preserving user-owned config keys.
56
+ Updates a generated project against the current Scale Stack baseline while protecting user changes.
53
57
 
54
- Supported flags:
55
-
56
- - `--dry-run` — print diffs without writing files
58
+ - `--dry-run` — print diffs without writing
57
59
  - `--force` — overwrite user-modified managed keys with Scale Stack baselines
58
60
  - `--keep-backup` — retain `.scale-stack/pre-sync-backup/` after success
59
61
 
60
- ## Repository layout
61
-
62
- This repository contains the **Scale Stack CLI** — the scaffolding engine, DAG runner, generators, and `sync` command. Running the CLI produces a **generated application template** (a standalone Next.js project) with optional modules layered on via CLI flags.
63
-
64
- ```
65
- src/
66
- cli/ # Commander entrypoint, commands, @clack/prompts flows, UI
67
- engine/ # DAG runner, virtual FS, EJS template engine, logger
68
- sync/ # `scale-stack sync` — config patcher + conflict detector
69
- config/ # Canonical managed slices + baselines (shared by sync + generators)
70
- lib/merge/ # Managed JSON / text merge engine
71
- generators/ # DAG nodes — one module per generator
72
- types/ # Shared TypeScript contracts
73
- tests/ # Vitest (mirrors src/)
74
- templates/ # EJS templates, organized by generator
75
- ```
76
-
77
- See [IMPLEMENTATION_PLAN.md](IMPLEMENTATION_PLAN.md) for the DAG, current phase coverage, and what's still to do.
78
-
79
- ## Release verification
80
-
81
- Before publishing a release, run:
62
+ ## Maintainers
82
63
 
83
64
  ```bash
84
- pnpm install --frozen-lockfile
65
+ pnpm install
85
66
  pnpm lint
86
67
  pnpm test
87
68
  pnpm build
@@ -89,17 +70,4 @@ pnpm test:e2e
89
70
  npm pack --dry-run
90
71
  ```
91
72
 
92
- The E2E suite generates the supported init matrix in temporary directories, runs `pnpm install && pnpm build` for each generated project, and covers `scale-stack sync` against a previously generated project.
93
-
94
- ## Development
95
-
96
- ```bash
97
- pnpm install
98
- pnpm build # bundle dist/index.js
99
- pnpm test # fast Vitest suite
100
- pnpm test:e2e # build CLI, generate tmp projects, run install/build checks
101
- pnpm lint # eslint + prettier --check
102
- pnpm cli -- init --name tmp -y # run the CLI from source via tsx
103
- ```
104
-
105
- See [.cursor/rules/](.cursor/rules/) for the TypeScript conventions, generator contract, and sync-managed-keys rules that the codebase follows.
73
+ `pnpm test:e2e` builds the CLI, generates the supported init matrix in temporary directories, verifies generated projects with `pnpm install && pnpm build`, and covers `scale-stack sync` against a generated app.