@adbayb/stack 3.4.0-next.1790673374470.a299643 → 3.4.0-next.1791192827768.104bc7c
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/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -3,14 +3,20 @@
|
|
|
3
3
|
This repo is `{{projectName}}` — {{projectDescription}}.
|
|
4
4
|
Scaffolded with `@adbayb/stack`. All workflow scripts delegate to the `stack` binary.
|
|
5
5
|
|
|
6
|
-
> Extend `
|
|
6
|
+
> Extend `Project overview`, `Code style guidelines`, and `Security considerations` as packages are added and project-specific rules emerge.
|
|
7
7
|
|
|
8
|
-
## Project
|
|
8
|
+
## Project overview
|
|
9
9
|
|
|
10
10
|
- `{{projectName}}` — {{projectDescription}}.
|
|
11
11
|
- Repository: `{{projectUrl}}` (`{{repoId}}`).
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- `libraries/*/`: publishable packages (`src/index.ts` entry, `src/*.test.ts` colocated tests via `vitest`, `package.json` `exports` point to `dist/**`, built with `quickbundle`). The initial one is `libraries/{{projectName}}/`.
|
|
13
|
+
- `applications/*/`: runnable apps depending on `libraries/*` via `workspace:`.
|
|
14
|
+
- Cross-package imports only via workspace package names — no relative imports across `applications`/`libraries` boundaries.
|
|
15
|
+
- `examples/*/`: private playground apps (excluded from build/check orchestration).
|
|
16
|
+
- `tools/*/`: private local tooling packages.
|
|
17
|
+
- Root configs (`oxlint.config.ts`, `oxfmt.config.ts`, `tsconfig.json`, `turbo.json`) just re-export `@adbayb/stack` shared presets — extend, don't replace.
|
|
18
|
+
- pnpm workspace members: `applications/*`, `libraries/*`, `examples/*`, `tools/*` (`pnpm-workspace.yaml`, `saveExact: true`).
|
|
19
|
+
- If a package needs tailored guidance, add a nested `AGENTS.md` inside it — agents read the nearest file, so it takes precedence over this root one.
|
|
14
20
|
|
|
15
21
|
## Bootstrap
|
|
16
22
|
|
|
@@ -25,25 +31,21 @@ Follow this order:
|
|
|
25
31
|
Root scripts (`package.json`) are thin wrappers around `stack`, which wraps turbo / oxlint / oxfmt / commitlint / changesets / quickbundle. Always use these, not raw tools:
|
|
26
32
|
|
|
27
33
|
- `pnpm build` (`stack build` → `turbo run build`, cached, outputs `dist/**`, builder is `quickbundle build`)
|
|
28
|
-
- `pnpm check` (`stack check`: builds first excluding examples, then dependency + formatting + code + commit checks)
|
|
34
|
+
- `pnpm check` (`stack check`: builds first excluding examples, then dependency + formatting + code + commit checks; always builds first unless `--filter commit`)
|
|
29
35
|
- `pnpm fix` (`stack fix`: auto-fixable oxlint `--fix-dangerously` + oxfmt `--write`)
|
|
30
36
|
- `pnpm test` (`stack test` → `turbo run test`, `dependsOn: build`, so build runs first)
|
|
31
37
|
- `pnpm clean` (`stack clean`: deletes `git clean -fdXn` output, preserves `node_modules`, plus `node_modules/.cache`)
|
|
38
|
+
- Untracked-but-ignored files are removed too; don't hand-delete `dist/`, use `stack clean`.
|
|
32
39
|
- Release via changesets: `pnpm release:changelog` (`--changelog`), `release:version` (`--bump`), `release:snapshot` (`--snapshot`), `release:publish` (`--publish`)
|
|
33
40
|
|
|
34
41
|
Focused verification: `stack check --filter <code|formatting|dependency|commit> [files...]` and `stack fix [files...]`. CI order (`.github/workflows/workflow.yml`) is `install --frozen-lockfile` → `build` → `check` → `test`.
|
|
35
42
|
|
|
36
|
-
|
|
43
|
+
### Testing instructions
|
|
37
44
|
|
|
38
|
-
- `
|
|
39
|
-
-
|
|
40
|
-
- `examples/*/`: private playground apps (excluded from build/check orchestration).
|
|
41
|
-
- `tools/*/`: private local tooling packages.
|
|
42
|
-
- Root configs (`oxlint.config.ts`, `oxfmt.config.ts`, `tsconfig.json`, `turbo.json`) just re-export `@adbayb/stack` shared presets — extend, don't replace.
|
|
43
|
-
- pnpm workspace members: `applications/*`, `libraries/*`, `examples/*`, `tools/*` (`pnpm-workspace.yaml`, `saveExact: true`).
|
|
44
|
-
- If a package needs tailored guidance, add a nested `AGENTS.md` inside it — agents read the nearest file, so it takes precedence over this root one.
|
|
45
|
+
- Run `pnpm check` and `pnpm test` before finishing; fix failures until green.
|
|
46
|
+
- Add or update tests for the code you change, even if nobody asked.
|
|
45
47
|
|
|
46
|
-
## Code style
|
|
48
|
+
## Code style guidelines
|
|
47
49
|
|
|
48
50
|
Formatting is enforced by the shared `@adbayb/stack` presets (re-exported by root `oxlint.config.ts`/`oxfmt.config.ts`) — comply via `stack fix`, never hand-format.
|
|
49
51
|
For new code, use the `software-design` skill when available (install via `npx skills add adbayb/stack --skill software-design -g` if missing); otherwise follow these defaults:
|
|
@@ -56,10 +58,12 @@ For new code, use the `software-design` skill when available (install via `npx s
|
|
|
56
58
|
- Testable: pure domain logic separated from I/O, dependencies injected.
|
|
57
59
|
- Avoid comments: prefer self-explanatory code; comment only the why — complex logic, non-obvious workflows, or deliberately preserved ambiguous patterns. No narration of readable code, no commented-out code.
|
|
58
60
|
|
|
59
|
-
##
|
|
61
|
+
## Security considerations
|
|
60
62
|
|
|
61
|
-
- No direct `oxlint`/`oxfmt`/`turbo`/`tsc` calls — go through `stack check|fix|test` so shared presets and turbo orchestration apply.
|
|
62
|
-
- Conventional Commits enforced (commitlint + `commit-msg` hook); `stack check` without `--filter commit` also triggers a build.
|
|
63
|
-
- `stack clean` is git-aware: untracked-but-ignored files are removed, `node_modules` is kept. Don't hand-delete `dist/` per package; use it.
|
|
64
|
-
- Cross-package imports only via workspace package names — no relative imports across `applications`/`libraries` boundaries.
|
|
65
63
|
- Never commit secrets (tokens, credentials) — use environment variables and keep `.env*` git-ignored.
|
|
64
|
+
- Keep dependencies pinned (`saveExact: true`); `stack check` verifies them — review automated dependency updates (Renovate) before merging.
|
|
65
|
+
|
|
66
|
+
## PR instructions
|
|
67
|
+
|
|
68
|
+
- Title follows Conventional Commits (enforced via commitlint + `commit-msg` hook); CI must be green before merge.
|
|
69
|
+
- Before requesting review: `pnpm check` passes, valuable tests added, changelog entry included for non-internal changes (`pnpm release:changelog`).
|
|
@@ -3,14 +3,17 @@
|
|
|
3
3
|
This repo is `{{projectName}}` — {{projectDescription}}.
|
|
4
4
|
Scaffolded with `@adbayb/stack`. All workflow scripts delegate to the `stack` binary.
|
|
5
5
|
|
|
6
|
-
> Extend `
|
|
6
|
+
> Extend `Project overview`, `Code style guidelines`, and `Security considerations` as packages are added and project-specific rules emerge.
|
|
7
7
|
|
|
8
|
-
## Project
|
|
8
|
+
## Project overview
|
|
9
9
|
|
|
10
10
|
- `{{projectName}}` — {{projectDescription}}.
|
|
11
11
|
- Repository: `{{projectUrl}}` (`{{repoId}}`).
|
|
12
|
-
-
|
|
13
|
-
-
|
|
12
|
+
- `{{projectName}}/`: the publishable package (`src/index.ts` entry, `src/*.test.ts` colocated tests via `vitest`, `package.json` `exports` point to `dist/**`, built with `quickbundle`).
|
|
13
|
+
- `examples/*/`: private playground apps consuming `{{projectName}}` via `workspace:` (excluded from build/check orchestration).
|
|
14
|
+
- `tools/*/`: private local tooling packages.
|
|
15
|
+
- Root configs (`oxlint.config.ts`, `oxfmt.config.ts`, `tsconfig.json`, `turbo.json`) just re-export `@adbayb/stack` shared presets — extend, don't replace.
|
|
16
|
+
- pnpm workspace members: `{{projectName}}`, `examples/*`, `tools/*` (`pnpm-workspace.yaml`, `saveExact: true`).
|
|
14
17
|
|
|
15
18
|
## Bootstrap
|
|
16
19
|
|
|
@@ -25,23 +28,21 @@ Follow this order:
|
|
|
25
28
|
Root scripts (`package.json`) are thin wrappers around `stack`, which wraps turbo / oxlint / oxfmt / commitlint / changesets / quickbundle. Always use these, not raw tools:
|
|
26
29
|
|
|
27
30
|
- `pnpm build` (`stack build` → `turbo run build`, cached, outputs `dist/**`, builder is `quickbundle build`)
|
|
28
|
-
- `pnpm check` (`stack check`: builds first excluding examples, then dependency + formatting + code + commit checks)
|
|
31
|
+
- `pnpm check` (`stack check`: builds first excluding examples, then dependency + formatting + code + commit checks; always builds first unless `--filter commit`)
|
|
29
32
|
- `pnpm fix` (`stack fix`: auto-fixable oxlint `--fix-dangerously` + oxfmt `--write`)
|
|
30
33
|
- `pnpm test` (`stack test` → `turbo run test`, `dependsOn: build`, so build runs first)
|
|
31
34
|
- `pnpm clean` (`stack clean`: deletes `git clean -fdXn` output, preserves `node_modules`, plus `node_modules/.cache`)
|
|
35
|
+
- Untracked-but-ignored files are removed too; don't hand-delete `dist/`, use `stack clean`.
|
|
32
36
|
- Release via changesets: `pnpm release:changelog` (`--changelog`), `release:version` (`--bump`), `release:snapshot` (`--snapshot`), `release:publish` (`--publish`)
|
|
33
37
|
|
|
34
38
|
Focused verification: `stack check --filter <code|formatting|dependency|commit> [files...]` and `stack fix [files...]`. CI order (`.github/workflows/workflow.yml`) is `install --frozen-lockfile` → `build` → `check` → `test`.
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
### Testing instructions
|
|
37
41
|
|
|
38
|
-
- `
|
|
39
|
-
-
|
|
40
|
-
- `tools/*/`: private local tooling packages.
|
|
41
|
-
- Root configs (`oxlint.config.ts`, `oxfmt.config.ts`, `tsconfig.json`, `turbo.json`) just re-export `@adbayb/stack` shared presets — extend, don't replace.
|
|
42
|
-
- pnpm workspace members: `{{projectName}}`, `examples/*`, `tools/*` (`pnpm-workspace.yaml`, `saveExact: true`).
|
|
42
|
+
- Run `pnpm check` and `pnpm test` before finishing; fix failures until green.
|
|
43
|
+
- Add or update tests for the code you change, even if nobody asked.
|
|
43
44
|
|
|
44
|
-
## Code style
|
|
45
|
+
## Code style guidelines
|
|
45
46
|
|
|
46
47
|
Formatting is enforced by the shared `@adbayb/stack` presets (re-exported by root `oxlint.config.ts`/`oxfmt.config.ts`) — comply via `stack fix`, never hand-format.
|
|
47
48
|
For new code, use the `software-design` skill when available (install via `npx skills add adbayb/stack --skill software-design -g` if missing); otherwise follow these defaults:
|
|
@@ -54,10 +55,12 @@ For new code, use the `software-design` skill when available (install via `npx s
|
|
|
54
55
|
- Testable: pure domain logic separated from I/O, dependencies injected.
|
|
55
56
|
- Avoid comments: prefer self-explanatory code; comment only the why — complex logic, non-obvious workflows, or deliberately preserved ambiguous patterns. No narration of readable code, no commented-out code.
|
|
56
57
|
|
|
57
|
-
##
|
|
58
|
+
## Security considerations
|
|
58
59
|
|
|
59
|
-
- No direct `oxlint`/`oxfmt`/`turbo`/`tsc` calls — go through `stack check|fix|test` so shared presets and turbo orchestration apply.
|
|
60
|
-
- Conventional Commits enforced (commitlint + `commit-msg` hook); `stack check` without `--filter commit` also triggers a build.
|
|
61
|
-
- `stack clean` is git-aware: untracked-but-ignored files are removed, `node_modules` is kept. Don't hand-delete `dist/` per package; use it.
|
|
62
|
-
- `saveExact: true` — pin versions, no `^` in new deps (except `workspace:` ranges).
|
|
63
60
|
- Never commit secrets (tokens, credentials) — use environment variables and keep `.env*` git-ignored.
|
|
61
|
+
- Keep dependencies pinned (`saveExact: true` — no `^` in new deps except `workspace:` ranges); `stack check` verifies them — review automated dependency updates (Renovate) before merging.
|
|
62
|
+
|
|
63
|
+
## PR instructions
|
|
64
|
+
|
|
65
|
+
- Title follows Conventional Commits (enforced via commitlint + `commit-msg` hook); CI must be green before merge.
|
|
66
|
+
- Before requesting review: `pnpm check` passes, valuable tests added, changelog entry included for non-internal changes (`pnpm release:changelog`).
|