genesis-stack 1.4.5 → 1.4.7

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.
Files changed (37) hide show
  1. package/README.md +6 -1
  2. package/package.json +1 -1
  3. package/stacks/pieces/cpp.md +6 -0
  4. package/stacks/pieces/csharp.md +6 -0
  5. package/stacks/pieces/django-mysql.md +2 -0
  6. package/stacks/pieces/django-postgresql.md +2 -0
  7. package/stacks/pieces/django-sqlite.md +2 -0
  8. package/stacks/pieces/django.md +30 -0
  9. package/stacks/pieces/express.md +4 -0
  10. package/stacks/pieces/go.md +12 -0
  11. package/stacks/pieces/java.md +7 -0
  12. package/stacks/pieces/jskit-mysql.md +2 -0
  13. package/stacks/pieces/jskit-postgresql.md +2 -0
  14. package/stacks/pieces/jskit.md +15 -5
  15. package/stacks/pieces/kotlin.md +7 -0
  16. package/stacks/pieces/laravel-mysql.md +4 -0
  17. package/stacks/pieces/laravel-postgresql.md +4 -0
  18. package/stacks/pieces/laravel-sqlite.md +4 -0
  19. package/stacks/pieces/laravel.md +42 -0
  20. package/stacks/pieces/mysql.md +6 -0
  21. package/stacks/pieces/nextjs.md +5 -0
  22. package/stacks/pieces/nodejs.md +20 -0
  23. package/stacks/pieces/php.md +5 -0
  24. package/stacks/pieces/postgresql.md +8 -0
  25. package/stacks/pieces/python.md +6 -0
  26. package/stacks/pieces/rails-mysql.md +1 -0
  27. package/stacks/pieces/rails-postgresql.md +2 -0
  28. package/stacks/pieces/rails-sqlite.md +2 -0
  29. package/stacks/pieces/rails.md +26 -0
  30. package/stacks/pieces/ruby.md +6 -0
  31. package/stacks/pieces/rust.md +6 -0
  32. package/stacks/pieces/shell.md +5 -0
  33. package/stacks/pieces/spring-boot-mysql.md +2 -0
  34. package/stacks/pieces/spring-boot-postgresql.md +2 -0
  35. package/stacks/pieces/spring-boot.md +8 -0
  36. package/stacks/pieces/sqlite.md +4 -0
  37. package/stacks/pieces/vue.md +14 -0
package/README.md CHANGED
@@ -30,7 +30,12 @@ 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, query-side filters and parallel test
37
+ runner; it names a
38
+ framework default only where official documentation confirms it.
34
39
 
35
40
  Genesis still supports optional Agent Skills generically. A Stack piece from
36
41
  any resolvable package may declare one when selecting that piece should install
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-stack",
3
- "version": "1.4.5",
3
+ "version": "1.4.7",
4
4
  "description": "The optional curated technology Stack catalog for Genesis projects.",
5
5
  "type": "module",
6
6
  "repository": {
@@ -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
 
@@ -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
 
@@ -98,6 +98,36 @@ 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
+ - Narrow on the queryset (`filter()`, `exclude()`, `exists()`, `count()`, a
115
+ slice taken before it is evaluated), never in Python: a comprehension or
116
+ loop over fetched rows, `len()` or `if queryset:` loads every row.
117
+ - Django runs tests one at a time unless asked: run
118
+ `manage.py test --parallel auto`, which clones the test database once per
119
+ process, so the database user needs permission to create databases. Add
120
+ `--durations 10` (Python 3.12+) to list the slowest tests, `--timing` for
121
+ database setup time and `--shuffle` to prove order independence. Keep
122
+ `--failfast` for diagnosis runs.
123
+ - Tests build the database by running migrations. Locally, `--keepdb` keeps
124
+ the migrated test database between runs; `"TEST": {"MIGRATE": False}`
125
+ builds it from the models instead, skipping data migrations, so the full
126
+ migration run stays as its own check. `TestCase` wraps each test in a
127
+ transaction.
128
+ - `startproject` writes `DEBUG = True`; this piece reads `DJANGO_DEBUG` and
129
+ defaults it off. `SECURE_HSTS_SECONDS` defaults to `0`, so HSTS is off until
130
+ set.
101
131
 
102
132
  ## Adoption
103
133
 
@@ -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
 
@@ -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
 
@@ -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
 
@@ -82,12 +82,22 @@ https://mobily-enterprises.github.io/jskit-ai/
82
82
  Routine browser-test startup reuses the isolated test schema, applies only
83
83
  pending migrations and resets fixtures deterministically; it does not drop or
84
84
  rebuild the database or run a production frontend build per check. Keep
85
- fresh-schema migration checks separate. Integration tests restore
86
- `TEST_DB_NAME` from a stored schema snapshot keyed by a digest of the
87
- migration sources, as
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
88
92
  `https://mobily-enterprises.github.io/jskit-ai/guide/app-setup/database-layer#integration-test-databases`
89
- describes; list, batch and write paths keep the query budgets of
90
- `https://mobily-enterprises.github.io/jskit-ai/guide/framework/typed-features#budgets-at-realistic-counts`.
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. A read narrows in its query, with the filters the resource's
97
+ `searchSchema` maps (a field, an id list, `q`), never with `filter`, `find`
98
+ or `slice` on rows a query returned; a list's Search box and a lookup field's
99
+ autocomplete send `q` to the server, which narrows only where that resource
100
+ maps `searchSchema.q`.
91
101
 
92
102
  - When application integrations are requested or `integrations.json` exists,
93
103
  treat that file as the application-owned configuration used by both editor
@@ -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
 
@@ -87,6 +87,48 @@ 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
+ - Narrow in the query builder (`where`, local scopes, `whereHas`,
108
+ `exists()`, `count()`), never with a Collection's `filter()`, `where()` or
109
+ `first()` on fetched rows: `$post->comments()->where(...)` is a query,
110
+ while `$post->comments->where(...)` loads every comment and filters in PHP.
111
+ - Laravel runs tests one at a time in one process. Add `brianium/paratest`
112
+ as a development dependency and run `php artisan test --parallel`: each
113
+ process gets its own `<database>_test_<token>` database, which Laravel
114
+ creates, so the database user needs permission to create databases, and
115
+ `ParallelTesting::token()` names per-process ports and directories. After a
116
+ run, read `php artisan test --profile` (the ten slowest tests). Keep
117
+ `--stop-on-failure` for diagnosis runs.
118
+ - Feature tests use `RefreshDatabase`, which migrates only when the schema is
119
+ stale and wraps each test in a transaction. Keep preparation from replaying
120
+ the whole history: run `php artisan schema:dump`, for the testing
121
+ connection too, and commit `database/schema/`. `WithCachedConfig` loads
122
+ configuration once per run.
123
+ - Tests never use `.env`'s database: `phpunit.xml` and `.env.testing` name a
124
+ test database for `APP_ENV=testing`.
125
+ - Keep `config/app.php`'s fail-closed defaults (`APP_ENV` falls back to
126
+ `production`, `APP_DEBUG` to `false`), and never deploy `APP_DEBUG=true`.
127
+ - Authorization runs only where it is called: `Gate::authorize`, the `can`
128
+ middleware or `$user->can`. Policy discovery only finds the policy class.
129
+ Test each action with a user who must be refused.
130
+ - The starter kits throttle sign-in. A hand-written sign-in adds a rate
131
+ limiter and a test that expects 429.
90
132
 
91
133
  ## Adoption
92
134
 
@@ -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
 
@@ -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
 
@@ -56,6 +56,26 @@ 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.
76
+ - Narrow in the database client's query (its `where`, `limit` and count),
77
+ never with an array's `filter`, `find`, `some` or `slice` on rows already
78
+ read.
59
79
 
60
80
  ## Adoption
61
81
 
@@ -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
 
@@ -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
 
@@ -120,6 +120,32 @@ 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
+ - Narrow on the relation (`where`, scopes, `limit`, `exists?`, `count`),
136
+ never on loaded records: `length` and the block forms of `select`, `find`
137
+ and `any?` load every record and work in Ruby.
138
+ - Keep the generated `parallelize(workers: :number_of_processors)` in
139
+ `test/test_helper.rb`. Rails parallelizes from 50 tests up and creates a
140
+ database for each worker, so the database user needs permission to create
141
+ databases; never drop to one worker to hide a collision.
142
+ - Keep `db/schema.rb` (or `structure.sql`) committed: tests load it instead of
143
+ migrating (`maintain_test_schema` defaults to `true`), and each test runs
144
+ in a transaction.
145
+ - Never edit a migration that has run anywhere; add a new one.
146
+ - Keep the authentication generator's `rate_limit to: 10, within: 3.minutes`
147
+ on sign-in and test the refusal. Default security headers are on; the
148
+ Content Security Policy initializer is the app's to configure.
123
149
 
124
150
  ## Adoption
125
151
 
@@ -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
 
@@ -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
 
@@ -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,14 @@ 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. Narrow in the
106
+ repository query (a derived `findBy`, `existsBy` or `countBy` method,
107
+ `@Query`, a `Specification`), never with a stream `filter` over `findAll()`.
100
108
 
101
109
  ## Adoption
102
110
 
@@ -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
 
@@ -35,6 +35,20 @@ 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.
48
+ - A picker, lookup or autocomplete over stored records sends the typed search
49
+ to the server and shows what it returns, never a loaded list filtered in a
50
+ `computed`. Vuetify's `v-autocomplete` filters only the items it holds:
51
+ give it `no-filter` and load its items on `update:search`.
38
52
 
39
53
  ### Reactive state hydration
40
54