genesis-stack 1.4.4 → 1.4.6
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/README.md +5 -1
- package/package.json +1 -1
- package/stacks/pieces/cpp.md +6 -0
- package/stacks/pieces/csharp.md +6 -0
- package/stacks/pieces/django-mysql.md +2 -0
- package/stacks/pieces/django-postgresql.md +2 -0
- package/stacks/pieces/django-sqlite.md +2 -0
- package/stacks/pieces/django.md +27 -0
- package/stacks/pieces/express.md +4 -0
- package/stacks/pieces/go.md +12 -0
- package/stacks/pieces/java.md +7 -0
- package/stacks/pieces/jskit-mysql.md +2 -0
- package/stacks/pieces/jskit-postgresql.md +2 -0
- package/stacks/pieces/jskit.md +37 -4
- package/stacks/pieces/kotlin.md +7 -0
- package/stacks/pieces/laravel-mysql.md +4 -0
- package/stacks/pieces/laravel-postgresql.md +4 -0
- package/stacks/pieces/laravel-sqlite.md +4 -0
- package/stacks/pieces/laravel.md +38 -0
- package/stacks/pieces/mysql.md +6 -0
- package/stacks/pieces/nextjs.md +5 -0
- package/stacks/pieces/nodejs.md +17 -0
- package/stacks/pieces/php.md +5 -0
- package/stacks/pieces/postgresql.md +8 -0
- package/stacks/pieces/python.md +6 -0
- package/stacks/pieces/rails-mysql.md +1 -0
- package/stacks/pieces/rails-postgresql.md +2 -0
- package/stacks/pieces/rails-sqlite.md +2 -0
- package/stacks/pieces/rails.md +23 -0
- package/stacks/pieces/ruby.md +6 -0
- package/stacks/pieces/rust.md +6 -0
- package/stacks/pieces/shell.md +5 -0
- package/stacks/pieces/spring-boot-mysql.md +2 -0
- package/stacks/pieces/spring-boot-postgresql.md +2 -0
- package/stacks/pieces/spring-boot.md +6 -0
- package/stacks/pieces/sqlite.md +4 -0
- package/stacks/pieces/vue.md +24 -0
package/README.md
CHANGED
|
@@ -30,7 +30,11 @@ the established project operations.
|
|
|
30
30
|
The package contains static Markdown declarations and a JSON starter catalogue,
|
|
31
31
|
and has no framework dependencies. Genesis reads its manifest and Stack pieces; it never imports or
|
|
32
32
|
executes catalog code. Framework pieces such as JSKIT and Vue link to their
|
|
33
|
-
authoritative documentation in ordinary Stack guidance.
|
|
33
|
+
authoritative documentation in ordinary Stack guidance. Each piece's
|
|
34
|
+
"Sanity checks with <stack>" guidance says how to apply Genesis's
|
|
35
|
+
stack-neutral sanity checks with that stack's own tools, such as its strict
|
|
36
|
+
loading mode, query-count assertion and parallel test runner; it names a
|
|
37
|
+
framework default only where official documentation confirms it.
|
|
34
38
|
|
|
35
39
|
Genesis still supports optional Agent Skills generically. A Stack piece from
|
|
36
40
|
any resolvable package may declare one when selecting that piece should install
|
package/package.json
CHANGED
package/stacks/pieces/cpp.md
CHANGED
|
@@ -51,6 +51,12 @@ C and C++ translation-unit, header, callable, ownership, build, and test convent
|
|
|
51
51
|
dependency's sources come from the connected checkout rather than a
|
|
52
52
|
`_deps/*-src` download. The project owns the repository-to-dependency name
|
|
53
53
|
mapping.
|
|
54
|
+
- Sanity checks with C++. Apply the checks in
|
|
55
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
56
|
+
project's own build and test driver, as its official documentation describes
|
|
57
|
+
it: tests run in parallel, each with its own temporary directory and a
|
|
58
|
+
system-picked port, and the slowest tests are read after each run. CTest
|
|
59
|
+
runs tests one at a time unless given `--parallel <n>`.
|
|
54
60
|
|
|
55
61
|
## Adoption
|
|
56
62
|
|
package/stacks/pieces/csharp.md
CHANGED
|
@@ -47,6 +47,12 @@ C# namespace, public type, dependency, lifecycle, and test conventions.
|
|
|
47
47
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
48
48
|
ASP.NET Core: call `UseForwardedHeaders` with the loopback addresses in
|
|
49
49
|
`KnownProxies`, and take the listen URL from `ASPNETCORE_URLS` or `--urls`.
|
|
50
|
+
- Sanity checks with C#. Apply the checks in
|
|
51
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
52
|
+
project's own test framework and data-access tools, as their official
|
|
53
|
+
documentation describes them: count a list's queries at a few rows and at a
|
|
54
|
+
realistic number, let independent test collections run in parallel with a
|
|
55
|
+
database each, and read the slowest tests after each run.
|
|
50
56
|
|
|
51
57
|
## Connected development
|
|
52
58
|
|
|
@@ -69,6 +69,8 @@ https://docs.djangoproject.com/en/stable/ref/databases/
|
|
|
69
69
|
- When `TEST_DB_NAME` is supplied, set `DATABASES["default"]["TEST"]["NAME"]`
|
|
70
70
|
to it and run tests with `--keepdb`; Django reuses the existing database.
|
|
71
71
|
Without it, the user needs permission to create `test_<NAME>`.
|
|
72
|
+
- Sanity checks with Django and MySQL: the django and mysql pieces' checks
|
|
73
|
+
apply.
|
|
72
74
|
|
|
73
75
|
## Adoption
|
|
74
76
|
|
|
@@ -68,6 +68,8 @@ https://docs.djangoproject.com/en/stable/ref/databases/
|
|
|
68
68
|
role needs `CREATEDB`.
|
|
69
69
|
- Keep schema changes in Django migrations; avoid raw SQL schema edits
|
|
70
70
|
outside `RunSQL` operations committed with the app.
|
|
71
|
+
- Sanity checks with Django and PostgreSQL: the django and postgresql pieces'
|
|
72
|
+
checks apply.
|
|
71
73
|
|
|
72
74
|
## Adoption
|
|
73
75
|
|
|
@@ -47,6 +47,8 @@ https://docs.djangoproject.com/en/stable/ref/databases/#sqlite-notes
|
|
|
47
47
|
- SQLite allows one writer at a time. Keep Gunicorn to a small worker count
|
|
48
48
|
and short transactions, and consider `"OPTIONS": {"transaction_mode": "IMMEDIATE"}`
|
|
49
49
|
with a `timeout` when concurrent writes report "database is locked".
|
|
50
|
+
- Sanity checks with Django and SQLite: the django and sqlite pieces' checks
|
|
51
|
+
apply.
|
|
50
52
|
|
|
51
53
|
## Adoption
|
|
52
54
|
|
package/stacks/pieces/django.md
CHANGED
|
@@ -98,6 +98,33 @@ https://docs.djangoproject.com/
|
|
|
98
98
|
sections with that tool's equivalent.
|
|
99
99
|
- Select `django-postgresql`, `django-mysql` or `django-sqlite` for the
|
|
100
100
|
database settings; it owns the engine and environment names.
|
|
101
|
+
- Sanity checks with Django. Apply the checks in
|
|
102
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Django's
|
|
103
|
+
own tools:
|
|
104
|
+
- Related rows load only when asked: `select_related()` for foreign keys and
|
|
105
|
+
one-to-one relations, `prefetch_related()` for many.
|
|
106
|
+
- On Django 6.1+, a queryset or manager chooses its fetch mode with
|
|
107
|
+
`fetch_mode()`; no project-wide setting is documented. Make the managers
|
|
108
|
+
that lists read use `models.FETCH_RAISE` under tests, so a lazy fetch
|
|
109
|
+
raises there. The production mode is the app's choice: `FETCH_ONE` (the
|
|
110
|
+
default) or `FETCH_PEERS`, which batches a lazy fetch across the loaded
|
|
111
|
+
rows.
|
|
112
|
+
- `assertNumQueries` asserts a given number. Use it to compare a few rows
|
|
113
|
+
with a realistic number, never as a fixed ceiling.
|
|
114
|
+
- Django runs tests one at a time unless asked: run
|
|
115
|
+
`manage.py test --parallel auto`, which clones the test database once per
|
|
116
|
+
process, so the database user needs permission to create databases. Add
|
|
117
|
+
`--durations 10` (Python 3.12+) to list the slowest tests, `--timing` for
|
|
118
|
+
database setup time and `--shuffle` to prove order independence. Keep
|
|
119
|
+
`--failfast` for diagnosis runs.
|
|
120
|
+
- Tests build the database by running migrations. Locally, `--keepdb` keeps
|
|
121
|
+
the migrated test database between runs; `"TEST": {"MIGRATE": False}`
|
|
122
|
+
builds it from the models instead, skipping data migrations, so the full
|
|
123
|
+
migration run stays as its own check. `TestCase` wraps each test in a
|
|
124
|
+
transaction.
|
|
125
|
+
- `startproject` writes `DEBUG = True`; this piece reads `DJANGO_DEBUG` and
|
|
126
|
+
defaults it off. `SECURE_HSTS_SECONDS` defaults to `0`, so HSTS is off until
|
|
127
|
+
set.
|
|
101
128
|
|
|
102
129
|
## Adoption
|
|
103
130
|
|
package/stacks/pieces/express.md
CHANGED
|
@@ -103,6 +103,10 @@ documentation: https://expressjs.com/
|
|
|
103
103
|
same environment variables. A command started without that environment loads
|
|
104
104
|
the ignored dotenv the host generates with `process.loadEnvFile()` rather than
|
|
105
105
|
falling back to a different database file or connection.
|
|
106
|
+
- Sanity checks with Express. Apply the checks in
|
|
107
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
108
|
+
`nodejs` piece's test tools, and read a production build's response headers
|
|
109
|
+
and mode as the "Production settings" section describes.
|
|
106
110
|
|
|
107
111
|
## Adoption
|
|
108
112
|
|
package/stacks/pieces/go.md
CHANGED
|
@@ -45,6 +45,18 @@ Go package, exported callable, interface, concurrency, resource, and test conven
|
|
|
45
45
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
46
46
|
Take the listen address from an argument or environment variable rather than
|
|
47
47
|
hard-coding it.
|
|
48
|
+
- Sanity checks with Go. Apply the checks in
|
|
49
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Go's own
|
|
50
|
+
tools:
|
|
51
|
+
- `go test ./...` runs packages in parallel (`-p` defaults to GOMAXPROCS),
|
|
52
|
+
but a package's tests run one at a time unless they call `t.Parallel()`.
|
|
53
|
+
Mark independent slow tests parallel; a test that uses `t.Setenv` cannot
|
|
54
|
+
be.
|
|
55
|
+
- Release what a test starts with `t.Cleanup` and `t.TempDir`, which run when
|
|
56
|
+
the test and its subtests complete, and listen on `127.0.0.1:0`.
|
|
57
|
+
- `-timeout` (10 minutes per test binary by default) bounds a hang; never
|
|
58
|
+
raise it to make slow tests pass. `-shuffle=on` proves order independence
|
|
59
|
+
and is off by default. Keep `-failfast` for diagnosis runs.
|
|
48
60
|
|
|
49
61
|
## Connected development
|
|
50
62
|
|
package/stacks/pieces/java.md
CHANGED
|
@@ -47,6 +47,13 @@ Java package, public type, dependency, lifecycle, and test conventions.
|
|
|
47
47
|
- Running a web process: bind the supplied listen host and port, trust forwarded
|
|
48
48
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
49
49
|
For Spring Boot select `spring-boot`; its piece owns the framework traps.
|
|
50
|
+
- Sanity checks with Java. Apply the checks in
|
|
51
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
52
|
+
project's own build, test runner and data-access tools, as their official
|
|
53
|
+
documentation describes them: count a list's queries at a few rows and at a
|
|
54
|
+
realistic number, run test classes in parallel, and read the slowest tests
|
|
55
|
+
after each run. JUnit Jupiter runs tests in one thread until
|
|
56
|
+
`junit.jupiter.execution.parallel.enabled` is `true`.
|
|
50
57
|
|
|
51
58
|
## Connected development
|
|
52
59
|
|
|
@@ -70,6 +70,8 @@ JSKIT MySQL runtime, live-schema CRUD generation, and persistence conventions.
|
|
|
70
70
|
existing migration and transaction owner. Test scoped uniqueness, duplicate
|
|
71
71
|
webhooks and concurrent credit debits on this driver before claiming database
|
|
72
72
|
correctness; provider calls and app authorization remain outside the database.
|
|
73
|
+
- Sanity checks with JSKIT and MySQL: the jskit and mysql pieces' checks
|
|
74
|
+
apply.
|
|
73
75
|
|
|
74
76
|
## Deslop
|
|
75
77
|
|
|
@@ -66,6 +66,8 @@ JSKIT PostgreSQL runtime, live-schema CRUD generation, and persistence conventio
|
|
|
66
66
|
existing migration and transaction owner. Test scoped uniqueness, duplicate
|
|
67
67
|
webhooks and concurrent credit debits on this driver before claiming database
|
|
68
68
|
correctness; provider calls and app authorization remain outside the database.
|
|
69
|
+
- Sanity checks with JSKIT and PostgreSQL: the jskit and postgresql pieces'
|
|
70
|
+
checks apply.
|
|
69
71
|
|
|
70
72
|
## Deslop
|
|
71
73
|
|
package/stacks/pieces/jskit.md
CHANGED
|
@@ -43,7 +43,8 @@ https://mobily-enterprises.github.io/jskit-ai/
|
|
|
43
43
|
surfaces are public or login-required and expose
|
|
44
44
|
`AUTH_LOCAL_SESSION_SECRET` as a required environment name in the project's
|
|
45
45
|
established environment contract and committed environment example. Never
|
|
46
|
-
commit or invent its value
|
|
46
|
+
commit or invent its value; the proposed Deployment lists it as a generated
|
|
47
|
+
secret, so the deployment consumer supplies its production value.
|
|
47
48
|
- An application with accounts always has the host's browser-preview login,
|
|
48
49
|
without waiting to be asked: when adding authentication, add the
|
|
49
50
|
`auth/auth-surface` pattern's executable `tools/preview-identity` and copy its
|
|
@@ -82,6 +83,17 @@ https://mobily-enterprises.github.io/jskit-ai/
|
|
|
82
83
|
pending migrations and resets fixtures deterministically; it does not drop or
|
|
83
84
|
rebuild the database or run a production frontend build per check. Keep
|
|
84
85
|
fresh-schema migration checks separate.
|
|
86
|
+
- Sanity checks with JSKIT. Apply the engineering baseline's checks and
|
|
87
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with JSKIT's
|
|
88
|
+
mechanics, described at
|
|
89
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/sanity-checks`.
|
|
90
|
+
Integration tests restore `TEST_DB_NAME` from a stored schema snapshot keyed
|
|
91
|
+
by a digest of the migration sources, as
|
|
92
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/app-setup/database-layer#integration-test-databases`
|
|
93
|
+
describes; list, batch and write paths compare their query counts at
|
|
94
|
+
realistic sizes, as
|
|
95
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#query-counts-at-realistic-sizes`
|
|
96
|
+
describes.
|
|
85
97
|
|
|
86
98
|
- When application integrations are requested or `integrations.json` exists,
|
|
87
99
|
treat that file as the application-owned configuration used by both editor
|
|
@@ -144,9 +156,13 @@ https://mobily-enterprises.github.io/jskit-ai/
|
|
|
144
156
|
application has been running in development mode. Add it only when the
|
|
145
157
|
production environment already holds every value the application's source
|
|
146
158
|
requires in production mode (for example real email, payment or storage
|
|
147
|
-
providers instead of simulated ones, and `AUTH_LOCAL_SESSION_SECRET`
|
|
148
|
-
next deployment then starts in production
|
|
149
|
-
it from starting.
|
|
159
|
+
providers instead of simulated ones, and `AUTH_LOCAL_SESSION_SECRET` unless
|
|
160
|
+
the Deployment generates it); the next deployment then starts in production
|
|
161
|
+
mode, and a missing value stops it from starting.
|
|
162
|
+
- When an established Deployment lacks the proposal's
|
|
163
|
+
``- Generated secrets: `AUTH_LOCAL_SESSION_SECRET` `` entry, add it (keeping
|
|
164
|
+
any names it already lists), so the deployment consumer supplies the
|
|
165
|
+
production session secret the application never commits.
|
|
150
166
|
- Inspect existing setup and database preparation for both migration discovery
|
|
151
167
|
and an app-owned idempotent seed. Never infer `db:prepare` from the selected
|
|
152
168
|
component when the script or preparation file does not exist.
|
|
@@ -253,6 +269,7 @@ https://mobily-enterprises.github.io/jskit-ai/
|
|
|
253
269
|
|
|
254
270
|
- Runtimes: `nodejs`
|
|
255
271
|
- Recreate on restore: `node_modules`
|
|
272
|
+
- Generated secrets: `AUTH_LOCAL_SESSION_SECRET`
|
|
256
273
|
- Ready when: `GET` `/api/health` returns `200`
|
|
257
274
|
- Prepare `Install dependencies`: `npm` `ci`
|
|
258
275
|
- Build `Build`: `npm` `run` `build`
|
|
@@ -289,6 +306,22 @@ https://mobily-enterprises.github.io/jskit-ai/
|
|
|
289
306
|
- Remove pass-through wrappers and abandoned scaffold code only when doing so
|
|
290
307
|
preserves routes, placements, baseline tests, and observable behavior.
|
|
291
308
|
|
|
309
|
+
## UI pass
|
|
310
|
+
|
|
311
|
+
- Read JSKIT's Material 3 rules at
|
|
312
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
|
|
313
|
+
and its UI pass method at
|
|
314
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-pass`
|
|
315
|
+
completely, then follow the method for the resolved scope: the changes, a
|
|
316
|
+
section, or the whole app.
|
|
317
|
+
- Navigation and Up are must-fix at every scope (#241): plain
|
|
318
|
+
`npx jskit check`, which `npm run verify` runs, fails on every `nav/*` rule.
|
|
319
|
+
- Run `npx jskit check m3` on the scope (the changed UI files, the section's
|
|
320
|
+
directory, or no paths for the whole app) until it reports nothing, and
|
|
321
|
+
`npx jskit check` until it passes.
|
|
322
|
+
- The checks cannot see layout, spacing or contrast; look at every screenshot
|
|
323
|
+
for those.
|
|
324
|
+
|
|
292
325
|
## Verification
|
|
293
326
|
|
|
294
327
|
- Verify `application`: `npm` `run` `verify`
|
package/stacks/pieces/kotlin.md
CHANGED
|
@@ -46,6 +46,13 @@ Kotlin package, public callable, coroutine, nullability, build, and test convent
|
|
|
46
46
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
47
47
|
Spring Boot: set `server.address`/`server.port` from the supplied values and
|
|
48
48
|
`server.forward-headers-strategy=framework`.
|
|
49
|
+
- Sanity checks with Kotlin. Apply the checks in
|
|
50
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
51
|
+
project's own build, test runner and data-access tools, as their official
|
|
52
|
+
documentation describes them: count a list's queries at a few rows and at a
|
|
53
|
+
realistic number, run test classes in parallel, and read the slowest tests
|
|
54
|
+
after each run. Gradle runs one test process unless `maxParallelForks` is
|
|
55
|
+
raised. For Spring Boot, its piece adds the framework's view.
|
|
49
56
|
|
|
50
57
|
## Connected development
|
|
51
58
|
|
|
@@ -63,6 +63,10 @@ Laravel MySQL connection, migration, Eloquent, and database environment conventi
|
|
|
63
63
|
existing migration and transaction owner. Test scoped uniqueness, duplicate
|
|
64
64
|
webhooks and concurrent credit debits on this driver before claiming database
|
|
65
65
|
correctness; provider calls and app authorization remain outside the database.
|
|
66
|
+
- Sanity checks with Laravel and MySQL: the laravel and mysql pieces' checks
|
|
67
|
+
apply. Run `php artisan schema:dump` for the MySQL testing connection as
|
|
68
|
+
well, so test preparation loads the dumped schema instead of replaying every
|
|
69
|
+
migration.
|
|
66
70
|
|
|
67
71
|
## Adoption
|
|
68
72
|
|
|
@@ -63,6 +63,10 @@ Laravel PostgreSQL connection, migration, Eloquent, and database environment con
|
|
|
63
63
|
existing migration and transaction owner. Test scoped uniqueness, duplicate
|
|
64
64
|
webhooks and concurrent credit debits on this driver before claiming database
|
|
65
65
|
correctness; provider calls and app authorization remain outside the database.
|
|
66
|
+
- Sanity checks with Laravel and PostgreSQL: the laravel and postgresql
|
|
67
|
+
pieces' checks apply. Run `php artisan schema:dump` for the PostgreSQL
|
|
68
|
+
testing connection as well, so test preparation loads the dumped schema
|
|
69
|
+
instead of replaying every migration.
|
|
66
70
|
|
|
67
71
|
## Adoption
|
|
68
72
|
|
|
@@ -52,6 +52,10 @@ Laravel SQLite connection, migration, and database filename conventions.
|
|
|
52
52
|
(see laravel); do not regenerate keys as routine preparation.
|
|
53
53
|
- Consult the installed Laravel version's SQLite configuration documentation at
|
|
54
54
|
`https://laravel.com/docs/database#sqlite-configuration`.
|
|
55
|
+
- Sanity checks with Laravel and SQLite: the laravel and sqlite pieces' checks
|
|
56
|
+
apply. Run `php artisan schema:dump` for the SQLite testing connection as
|
|
57
|
+
well, so test preparation loads the dumped schema instead of replaying every
|
|
58
|
+
migration.
|
|
55
59
|
|
|
56
60
|
## Adoption
|
|
57
61
|
|
package/stacks/pieces/laravel.md
CHANGED
|
@@ -87,6 +87,44 @@ conventions. Authoritative framework documentation: https://laravel.com/docs/
|
|
|
87
87
|
`COMPOSER=<derived manifest> composer update <connected packages>`. The
|
|
88
88
|
tracked `composer.json` and `composer.lock` stay unchanged. Verify checks
|
|
89
89
|
`InstalledVersions::getInstallPath()` against each source root.
|
|
90
|
+
- Sanity checks with Laravel. Apply the checks in
|
|
91
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Laravel's
|
|
92
|
+
own tools:
|
|
93
|
+
- Outside production, make Eloquent strict in `AppServiceProvider::boot()`:
|
|
94
|
+
`Model::shouldBeStrict(! app()->isProduction());`. Strict mode is off by
|
|
95
|
+
default; it makes a lazy load, a silently discarded attribute and a
|
|
96
|
+
missing attribute fail instead of passing in silence. A lazy load then
|
|
97
|
+
throws `LazyLoadingViolationException`: fix the read with `with()` or
|
|
98
|
+
`load()`.
|
|
99
|
+
- `Model::automaticallyEagerLoadRelationships()` batches lazy loads behind
|
|
100
|
+
the code's back. It hides an N+1 instead of exposing it, so it never
|
|
101
|
+
replaces counting a list's queries at a few rows and at a realistic number.
|
|
102
|
+
- `expectsDatabaseQueryCount()` asserts an exact number. Use it to compare a
|
|
103
|
+
small size with a realistic one, never as a fixed ceiling.
|
|
104
|
+
- `get()` and `all()` return every row. `paginate()` returns one page, with
|
|
105
|
+
`total` and `next_page_url` in its JSON, and never stands for every row.
|
|
106
|
+
Batches iterate with `chunkById()` or `lazyById()`.
|
|
107
|
+
- Laravel runs tests one at a time in one process. Add `brianium/paratest`
|
|
108
|
+
as a development dependency and run `php artisan test --parallel`: each
|
|
109
|
+
process gets its own `<database>_test_<token>` database, which Laravel
|
|
110
|
+
creates, so the database user needs permission to create databases, and
|
|
111
|
+
`ParallelTesting::token()` names per-process ports and directories. After a
|
|
112
|
+
run, read `php artisan test --profile` (the ten slowest tests). Keep
|
|
113
|
+
`--stop-on-failure` for diagnosis runs.
|
|
114
|
+
- Feature tests use `RefreshDatabase`, which migrates only when the schema is
|
|
115
|
+
stale and wraps each test in a transaction. Keep preparation from replaying
|
|
116
|
+
the whole history: run `php artisan schema:dump`, for the testing
|
|
117
|
+
connection too, and commit `database/schema/`. `WithCachedConfig` loads
|
|
118
|
+
configuration once per run.
|
|
119
|
+
- Tests never use `.env`'s database: `phpunit.xml` and `.env.testing` name a
|
|
120
|
+
test database for `APP_ENV=testing`.
|
|
121
|
+
- Keep `config/app.php`'s fail-closed defaults (`APP_ENV` falls back to
|
|
122
|
+
`production`, `APP_DEBUG` to `false`), and never deploy `APP_DEBUG=true`.
|
|
123
|
+
- Authorization runs only where it is called: `Gate::authorize`, the `can`
|
|
124
|
+
middleware or `$user->can`. Policy discovery only finds the policy class.
|
|
125
|
+
Test each action with a user who must be refused.
|
|
126
|
+
- The starter kits throttle sign-in. A hand-written sign-in adds a rate
|
|
127
|
+
limiter and a test that expects 429.
|
|
90
128
|
|
|
91
129
|
## Adoption
|
|
92
130
|
|
package/stacks/pieces/mysql.md
CHANGED
|
@@ -22,6 +22,12 @@ MySQL persistence and migration conventions.
|
|
|
22
22
|
- Provider calls, signature verification and authorization belong to the app's
|
|
23
23
|
runtime. Database configuration alone does not implement a provider, and the
|
|
24
24
|
editor does not acquire ownership of application billing records.
|
|
25
|
+
- Sanity checks with MySQL. Apply the checks in
|
|
26
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` at the server:
|
|
27
|
+
read `EXPLAIN` and the statement size of access-policy SQL, keep
|
|
28
|
+
`information_schema` reads off request paths and time schema helpers on a
|
|
29
|
+
server holding many databases, and have each test run drop the databases it
|
|
30
|
+
created.
|
|
25
31
|
|
|
26
32
|
## Adoption
|
|
27
33
|
|
package/stacks/pieces/nextjs.md
CHANGED
|
@@ -114,6 +114,11 @@ framework documentation: https://nextjs.org/docs
|
|
|
114
114
|
generates and discards the native project, so never commit `android/`,
|
|
115
115
|
`capacitor.config.*` or signing keys. A server-rendered app is not yet
|
|
116
116
|
supported as a phone app: it needs a separate static client first.
|
|
117
|
+
- Sanity checks with Next.js. Apply the checks in
|
|
118
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
119
|
+
`nodejs` piece's test tools, and read each route's first-load bytes and
|
|
120
|
+
request count in a production build as the "Screens in use" section
|
|
121
|
+
describes.
|
|
117
122
|
|
|
118
123
|
## Adoption
|
|
119
124
|
|
package/stacks/pieces/nodejs.md
CHANGED
|
@@ -56,6 +56,23 @@ Node.js package, command, module, dependency, and test conventions.
|
|
|
56
56
|
or the environment rather than hard-coding them, and fail if the port is
|
|
57
57
|
taken instead of silently choosing another. For Express or Next.js select
|
|
58
58
|
`express` or `nextjs`; that piece owns the framework traps.
|
|
59
|
+
- Sanity checks with Node.js. Apply the checks in
|
|
60
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Node's and
|
|
61
|
+
Playwright's own tools:
|
|
62
|
+
- `node --test` runs test files in parallel: `--test-concurrency` defaults to
|
|
63
|
+
`os.availableParallelism() - 1`, and a shared machine passes its budget as
|
|
64
|
+
`--test-concurrency=<n>`. Never force `--test-concurrency=1` to hide a
|
|
65
|
+
collision between files; fix their isolation. A file that truly cannot run
|
|
66
|
+
beside others runs in its own command, which states why.
|
|
67
|
+
- The default `--test-timeout` is `Infinity`, so a hung file never fails: set
|
|
68
|
+
one. `--test-force-exit` hides what keeps a file alive; find and release it
|
|
69
|
+
instead.
|
|
70
|
+
- Playwright runs test files in parallel on half the logical cores, and a
|
|
71
|
+
file's tests in order unless `fullyParallel` is set. Never set `workers: 1`
|
|
72
|
+
to hide a collision. Its default test timeout is 30 seconds, and
|
|
73
|
+
`maxFailures` defaults to 0, no cap: set a low cap only on a diagnosis run.
|
|
74
|
+
- Count a list's queries at a few rows and at a realistic number through the
|
|
75
|
+
database client's query event or log.
|
|
59
76
|
|
|
60
77
|
## Adoption
|
|
61
78
|
|
package/stacks/pieces/php.md
CHANGED
|
@@ -45,6 +45,11 @@ PHP package, namespace, callable, dependency, and test conventions.
|
|
|
45
45
|
- Running a web process: bind the supplied listen host and port, trust forwarded
|
|
46
46
|
headers only from a loopback proxy, and read secrets from the environment. The
|
|
47
47
|
built-in server is `php -S <host>:<port> -t public` for development only.
|
|
48
|
+
- Sanity checks with PHP. Apply the checks in
|
|
49
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with PHP's own
|
|
50
|
+
tools: PHPUnit runs tests in one process, and `brianium/paratest` runs them in
|
|
51
|
+
parallel. Keep `--stop-on-failure` for diagnosis runs. For Laravel, its piece
|
|
52
|
+
names the framework's switches.
|
|
48
53
|
|
|
49
54
|
## Connected development
|
|
50
55
|
|
|
@@ -22,6 +22,14 @@ PostgreSQL persistence and migration conventions.
|
|
|
22
22
|
- Provider calls, signature verification and authorization belong to the app's
|
|
23
23
|
runtime. Database configuration alone does not implement a provider, and the
|
|
24
24
|
editor does not acquire ownership of application billing records.
|
|
25
|
+
- Sanity checks with PostgreSQL. Apply the checks in
|
|
26
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` at the server:
|
|
27
|
+
read `EXPLAIN` and the statement size of access-policy SQL, keep
|
|
28
|
+
schema-metadata reads (`information_schema`, `pg_catalog`) off request
|
|
29
|
+
paths, and have each test run drop the databases it created. A database per
|
|
30
|
+
test worker can be copied from one prepared database with
|
|
31
|
+
`CREATE DATABASE <name> TEMPLATE <prepared>`, which needs no other session
|
|
32
|
+
connected to the template.
|
|
25
33
|
|
|
26
34
|
## Adoption
|
|
27
35
|
|
package/stacks/pieces/python.md
CHANGED
|
@@ -62,6 +62,12 @@ Python package, module, callable, dependency, and test conventions.
|
|
|
62
62
|
For Django select `django`; its piece owns the framework traps. Flask uses
|
|
63
63
|
Werkzeug's `ProxyFix`; Uvicorn uses `--proxy-headers --forwarded-allow-ips
|
|
64
64
|
127.0.0.1`.
|
|
65
|
+
- Sanity checks with Python. Apply the checks in
|
|
66
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Python's
|
|
67
|
+
own tools: pytest runs tests one at a time, and the `pytest-xdist` plugin's
|
|
68
|
+
`-n auto` runs one worker per CPU, so give each worker its own database and
|
|
69
|
+
temporary directory. `--durations=10` lists the slowest tests. For Django,
|
|
70
|
+
its piece names the test runner's flags.
|
|
65
71
|
|
|
66
72
|
## Connected development
|
|
67
73
|
|
|
@@ -72,6 +72,7 @@ Rails MySQL connection, Active Record migration, and database environment conven
|
|
|
72
72
|
integration and payment records in this database through Active Record
|
|
73
73
|
migrations and transactions; test uniqueness and concurrent updates on MySQL
|
|
74
74
|
itself.
|
|
75
|
+
- Sanity checks with Rails and MySQL: the rails and mysql pieces' checks apply.
|
|
75
76
|
|
|
76
77
|
## Adoption
|
|
77
78
|
|
|
@@ -77,6 +77,8 @@ Rails PostgreSQL connection, Active Record migration, and database environment c
|
|
|
77
77
|
integration and payment records in this database through Active Record
|
|
78
78
|
migrations and transactions; test uniqueness and concurrent updates on
|
|
79
79
|
PostgreSQL itself.
|
|
80
|
+
- Sanity checks with Rails and PostgreSQL: the rails and postgresql pieces'
|
|
81
|
+
checks apply.
|
|
80
82
|
|
|
81
83
|
## Adoption
|
|
82
84
|
|
|
@@ -51,6 +51,8 @@ Rails SQLite connection, Active Record migration, and database filename conventi
|
|
|
51
51
|
- The `sqlite3` gem normally installs a precompiled native gem; a source build
|
|
52
52
|
needs the SQLite headers. Use the inherited Rails migration and seed
|
|
53
53
|
guidance and test concurrent writes on SQLite itself.
|
|
54
|
+
- Sanity checks with Rails and SQLite: the rails and sqlite pieces' checks
|
|
55
|
+
apply.
|
|
54
56
|
|
|
55
57
|
## Adoption
|
|
56
58
|
|
package/stacks/pieces/rails.md
CHANGED
|
@@ -120,6 +120,29 @@ Authoritative framework documentation: https://guides.rubyonrails.org/
|
|
|
120
120
|
`jsbundling-rails`, `cssbundling-rails` or another `package.json` build, add
|
|
121
121
|
`nodejs` to its Runtimes and a Prepare `npm ci` step before
|
|
122
122
|
`assets:precompile`.
|
|
123
|
+
- Sanity checks with Rails. Apply the checks in
|
|
124
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Rails's
|
|
125
|
+
own tools:
|
|
126
|
+
- In `config/environments/development.rb` and `test.rb`, set
|
|
127
|
+
`config.active_record.strict_loading_by_default = true` (it defaults to
|
|
128
|
+
`false`), or `config.active_record.strict_loading_mode = :n_plus_one_only`
|
|
129
|
+
for N+1 loads only. A violation raises by default. The Bullet gem is an
|
|
130
|
+
opt-in alternative.
|
|
131
|
+
- `assert_queries_count` asserts an exact count. Use it to compare a few rows
|
|
132
|
+
with a realistic number, never as a fixed ceiling.
|
|
133
|
+
- `Model.all` has no `LIMIT`; batches iterate with `find_each`, 1,000 rows at
|
|
134
|
+
a time.
|
|
135
|
+
- Keep the generated `parallelize(workers: :number_of_processors)` in
|
|
136
|
+
`test/test_helper.rb`. Rails parallelizes from 50 tests up and creates a
|
|
137
|
+
database for each worker, so the database user needs permission to create
|
|
138
|
+
databases; never drop to one worker to hide a collision.
|
|
139
|
+
- Keep `db/schema.rb` (or `structure.sql`) committed: tests load it instead of
|
|
140
|
+
migrating (`maintain_test_schema` defaults to `true`), and each test runs
|
|
141
|
+
in a transaction.
|
|
142
|
+
- Never edit a migration that has run anywhere; add a new one.
|
|
143
|
+
- Keep the authentication generator's `rate_limit to: 10, within: 3.minutes`
|
|
144
|
+
on sign-in and test the refusal. Default security headers are on; the
|
|
145
|
+
Content Security Policy initializer is the app's to configure.
|
|
123
146
|
|
|
124
147
|
## Adoption
|
|
125
148
|
|
package/stacks/pieces/ruby.md
CHANGED
|
@@ -46,6 +46,12 @@ Ruby module, class, callable, dependency, lifecycle, and test conventions.
|
|
|
46
46
|
- Running a web process: bind the supplied listen host and port, trust forwarded
|
|
47
47
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
48
48
|
For Rails select `rails`; its piece owns the framework traps.
|
|
49
|
+
- Sanity checks with Ruby. Apply the checks in
|
|
50
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with the
|
|
51
|
+
project's own test runner, as its official documentation describes it: run
|
|
52
|
+
test files in parallel with a database and temporary directory each, and
|
|
53
|
+
read the slowest tests after each run. For Rails, its piece names the
|
|
54
|
+
framework's switches.
|
|
49
55
|
|
|
50
56
|
## Connected development
|
|
51
57
|
|
package/stacks/pieces/rust.md
CHANGED
|
@@ -46,6 +46,12 @@ Rust module, public item, ownership, error, async, Cargo, and test conventions.
|
|
|
46
46
|
headers only from a loopback proxy, and read secrets from the environment.
|
|
47
47
|
Take the listen address from an argument or environment variable rather than
|
|
48
48
|
hard-coding it.
|
|
49
|
+
- Sanity checks with Rust. Apply the checks in
|
|
50
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Cargo's
|
|
51
|
+
test runner and the project's data-access tools, as their official
|
|
52
|
+
documentation describes them: tests run beside each other, so each gets its
|
|
53
|
+
own temporary directory and a system-picked port, and a list's queries are
|
|
54
|
+
counted at a few rows and at a realistic number.
|
|
49
55
|
|
|
50
56
|
## Connected development
|
|
51
57
|
|
package/stacks/pieces/shell.md
CHANGED
|
@@ -33,6 +33,11 @@ Shell script function, process, environment, portability, and test conventions.
|
|
|
33
33
|
explicit `custom` type with a project-defined script. When a project selects
|
|
34
34
|
several languages, its own complete `## Connected development` section
|
|
35
35
|
chooses the one default.
|
|
36
|
+
- Sanity checks with shell. Apply the checks in
|
|
37
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` to test and
|
|
38
|
+
preparation scripts: a script reports failure through its exit status, a
|
|
39
|
+
preparation step that fails stops the run instead of letting the tests run
|
|
40
|
+
on, and each script's own time and output size are read after a run.
|
|
36
41
|
|
|
37
42
|
## Deslop
|
|
38
43
|
|
|
@@ -65,6 +65,8 @@ environment conventions.
|
|
|
65
65
|
`spring.datasource.url` to the same JDBC URL with `${TEST_DB_NAME}` in place
|
|
66
66
|
of `${DB_NAME}`. Flyway migrates that existing database; the database user
|
|
67
67
|
may lack permission to create databases. Never point tests at `DB_NAME`.
|
|
68
|
+
- Sanity checks with Spring Boot and MySQL: the spring-boot and mysql pieces'
|
|
69
|
+
checks apply.
|
|
68
70
|
|
|
69
71
|
## Adoption
|
|
70
72
|
|
|
@@ -60,6 +60,8 @@ environment conventions.
|
|
|
60
60
|
`spring.datasource.url` to the same JDBC URL with `${TEST_DB_NAME}` in place
|
|
61
61
|
of `${DB_NAME}`. Flyway migrates that existing database; the database role
|
|
62
62
|
may lack permission to create databases. Never point tests at `DB_NAME`.
|
|
63
|
+
- Sanity checks with Spring Boot and PostgreSQL: the spring-boot and
|
|
64
|
+
postgresql pieces' checks apply.
|
|
63
65
|
|
|
64
66
|
## Adoption
|
|
65
67
|
|
|
@@ -97,6 +97,12 @@ https://docs.spring.io/spring-boot/
|
|
|
97
97
|
`./gradlew` `bootRun` `--args=--server.address={host} --server.port={port}`,
|
|
98
98
|
`./gradlew` `test`, and `./gradlew` `bootJar` with
|
|
99
99
|
`bootJar { archiveFileName = 'app.jar' }` serving `build/libs/app.jar`.
|
|
100
|
+
- Sanity checks with Spring Boot. Apply the checks in
|
|
101
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Spring's
|
|
102
|
+
and the persistence layer's own tools, as their official documentation
|
|
103
|
+
describes them: count a list's statements at a few rows and at a realistic
|
|
104
|
+
number, run test classes in parallel with a database each, and prepare test
|
|
105
|
+
databases without replaying every migration per test class.
|
|
100
106
|
|
|
101
107
|
## Adoption
|
|
102
108
|
|
package/stacks/pieces/sqlite.md
CHANGED
|
@@ -39,6 +39,10 @@ SQLite file-backed persistence, migrations, and backup conventions.
|
|
|
39
39
|
removing the original. See `https://www.sqlite.org/backup.html`.
|
|
40
40
|
- Keep test databases separate from development and production. In-memory
|
|
41
41
|
databases are useful for tests but are not persistent application resources.
|
|
42
|
+
- Sanity checks with SQLite. Apply the checks in
|
|
43
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with one
|
|
44
|
+
database file per test worker, prepared once per run rather than migrated
|
|
45
|
+
per file.
|
|
42
46
|
|
|
43
47
|
## Adoption
|
|
44
48
|
|
package/stacks/pieces/vue.md
CHANGED
|
@@ -35,6 +35,16 @@ conventions. Authoritative framework documentation: https://vuejs.org/
|
|
|
35
35
|
HMR client connects through the page's own origin. Do not set
|
|
36
36
|
`allowedHosts: true` or hard-code `server.hmr.host`, `clientPort` or `origin`
|
|
37
37
|
unless that proxy requires it.
|
|
38
|
+
- Sanity checks with Vue. Apply the checks in
|
|
39
|
+
`.agents/skills/genesis-project/references/sanity-checks.md` with Vue's and
|
|
40
|
+
Vite's own tools:
|
|
41
|
+
- Vitest runs test files in parallel (`fileParallelism` defaults to `true`).
|
|
42
|
+
Never set `fileParallelism: false` to hide a collision between files.
|
|
43
|
+
- Change a screen's props, slots, route and loaded data and see what it
|
|
44
|
+
shows follow. In development, Vue warns about recursive updates; a
|
|
45
|
+
production build has no such check, so repeat the changes there and look
|
|
46
|
+
for a frozen tab or blank region. Count the DOM nodes a long list renders
|
|
47
|
+
with realistic data.
|
|
38
48
|
|
|
39
49
|
### Reactive state hydration
|
|
40
50
|
|
|
@@ -44,6 +54,20 @@ conventions. Authoritative framework documentation: https://vuejs.org/
|
|
|
44
54
|
- Persist user-selected filters and screen context in the URL when they must survive navigation.
|
|
45
55
|
- Test stateful screens by navigating away and back with a warm query cache, including browser back/forward navigation.
|
|
46
56
|
|
|
57
|
+
## UI pass
|
|
58
|
+
|
|
59
|
+
- In a JSKIT application the `jskit` component's UI pass guidance governs.
|
|
60
|
+
- For a Vue application on Vuetify, follow JSKIT's Material 3 rules at
|
|
61
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/material-3`
|
|
62
|
+
and the scopes of its UI pass method at
|
|
63
|
+
`https://mobily-enterprises.github.io/jskit-ai/guide/framework/ui-pass`, as far
|
|
64
|
+
as they apply outside JSKIT: the Material 3 foundation, exact sizes, colour,
|
|
65
|
+
lists, records and forms, adaptive layout, and one Up arrow without
|
|
66
|
+
history-based back links. JSKIT's shell, navigation and `jskit check` apply
|
|
67
|
+
only to JSKIT applications.
|
|
68
|
+
- With another component library, keep that library and the project's design
|
|
69
|
+
system, and apply the same scopes and evidence.
|
|
70
|
+
|
|
47
71
|
## Adoption
|
|
48
72
|
|
|
49
73
|
- Identify the real client entrypoint, router, build tool, development command,
|