genesis-compiler 1.2.0 → 1.2.1

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 CHANGED
@@ -98,7 +98,7 @@ that, use Codex normally. No technology is assumed until you explicitly select
98
98
  Stack components:
99
99
 
100
100
  ```bash
101
- genesis stack add nodejs # or jskit jskit-mysql
101
+ genesis stack add nodejs # or jskit jskit-mysql / jskit-postgresql
102
102
  ```
103
103
 
104
104
  Genesis does not install substitute generic `nodejs`, `vue`, `php`, or similar
@@ -300,13 +300,13 @@ List and select the built-in Stack components:
300
300
 
301
301
  ```bash
302
302
  genesis stack list
303
- genesis stack add jskit jskit-mysql
303
+ genesis stack add jskit jskit-mysql # or jskit-postgresql
304
304
  ```
305
305
 
306
306
  `genesis/stack.md` records component ids and optional project verification
307
307
  commands. Selecting no components is valid. Built-in components include the
308
- eleven common language families listed above, plus Vue, MySQL, JSKIT, and JSKIT
309
- with MySQL. Components may contribute:
308
+ eleven common language families listed above, plus Vue, MySQL, PostgreSQL,
309
+ JSKIT, and JSKIT database integrations. Components may contribute:
310
310
 
311
311
  - a concise description and supplemental Guidance used across relevant tasks;
312
312
  - one authoritative Agent Skill directory when the component owns one;
@@ -321,7 +321,7 @@ cleanup tasks; `Deslop` adds cleanup-only rules. Neither shadows an official
321
321
  generic technology skill nor assumes that an upstream skill contains every rule
322
322
  Genesis needs.
323
323
 
324
- Genesis core contains no MySQL, JSKIT, Vue, Laravel, or other platform-specific
324
+ Genesis core contains no database, framework, language, or platform-specific
325
325
  controller behavior. See [Stack components](docs/stack-components.md).
326
326
 
327
327
  ## Verification
@@ -29,6 +29,7 @@ What this component contributes.
29
29
  ```json genesis-resource
30
30
  {
31
31
  "id": "service",
32
+ "kind": "example-service",
32
33
  "environmentAlternatives": [
33
34
  { "required": ["SERVICE_URL"] },
34
35
  { "required": ["SERVICE_HOST", "SERVICE_PORT"] }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-compiler",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "type": "module",
5
5
  "description": "An agent-independent prompt, multi-language code-index, cleanup, and verification companion with optional Codex hooks.",
6
6
  "repository": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Makes Codex aware of optional Genesis adoption for existing projects.",
5
5
  "author": {
6
6
  "name": "Mobily Enterprises"
@@ -165,10 +165,12 @@ function resources(all, piecePath) {
165
165
  !resource
166
166
  || typeof resource.id !== 'string'
167
167
  || !STACK_PIECE_ID_PATTERN.test(resource.id)
168
+ || typeof resource.kind !== 'string'
169
+ || !STACK_PIECE_ID_PATTERN.test(resource.kind)
168
170
  || !Array.isArray(resource.environmentAlternatives)
169
171
  || resource.environmentAlternatives.length === 0
170
172
  ) {
171
- invalid(piecePath, 'A Stack resource needs an id and at least one environment alternative.');
173
+ invalid(piecePath, 'A Stack resource needs an id, kind, and at least one environment alternative.');
172
174
  }
173
175
  const environmentAlternatives = resource.environmentAlternatives.map((alternative) => {
174
176
  const required = alternative?.required;
@@ -189,7 +191,7 @@ function resources(all, piecePath) {
189
191
  ) invalid(piecePath, `Stack resource ${resource.id} has an invalid environment alternative.`);
190
192
  return { required: [...required], allowEmpty: [...allowEmpty] };
191
193
  });
192
- return { id: resource.id, environmentAlternatives };
194
+ return { id: resource.id, kind: resource.kind, environmentAlternatives };
193
195
  });
194
196
  if (new Set(parsed.map(({ id }) => id)).size !== parsed.length) {
195
197
  invalid(piecePath, '## Resources contains a duplicate resource id.');
@@ -9,11 +9,16 @@ JSKIT MySQL runtime, live-schema CRUD generation, and persistence conventions.
9
9
  - `jskit`
10
10
  - `mysql`
11
11
 
12
+ ## Conflicts
13
+
14
+ - `jskit-postgresql`
15
+
12
16
  ## Resources
13
17
 
14
18
  ```json genesis-resource
15
19
  {
16
20
  "id": "database",
21
+ "kind": "mysql",
17
22
  "environmentAlternatives": [
18
23
  {
19
24
  "required": ["DATABASE_URL"]
@@ -0,0 +1,42 @@
1
+ # Stack piece: jskit-postgresql
2
+
3
+ ## Description
4
+
5
+ JSKIT PostgreSQL runtime, live-schema CRUD generation, and persistence conventions.
6
+
7
+ ## Requires
8
+
9
+ - `jskit`
10
+ - `postgresql`
11
+
12
+ ## Conflicts
13
+
14
+ - `jskit-mysql`
15
+
16
+ ## Resources
17
+
18
+ ```json genesis-resource
19
+ {
20
+ "id": "database",
21
+ "kind": "postgresql",
22
+ "environmentAlternatives": [
23
+ {
24
+ "required": ["DATABASE_URL"]
25
+ },
26
+ {
27
+ "required": ["DB_CLIENT", "DB_HOST", "DB_PORT", "DB_NAME", "DB_USER", "DB_PASSWORD"],
28
+ "allowEmpty": ["DB_PASSWORD"]
29
+ }
30
+ ]
31
+ }
32
+ ```
33
+
34
+ ## Deslop
35
+
36
+ - Use the installed JSKIT database runtime and generated resource/repository
37
+ seams; do not add a second client, connection factory, CRUD transport, or
38
+ file-persistence fallback.
39
+ - Keep environment normalization, transactions, row mapping, and database
40
+ error translation at one established persistence boundary.
41
+ - Never compete with or rewrite a generator-owned baseline migration. Preserve
42
+ retained migration history and data semantics.
@@ -0,0 +1,18 @@
1
+ # Stack piece: postgresql
2
+
3
+ ## Description
4
+
5
+ PostgreSQL persistence and migration conventions.
6
+
7
+ ## Requires
8
+
9
+ - Nothing.
10
+
11
+ ## Deslop
12
+
13
+ - Keep connection configuration, transaction ownership, and database error
14
+ translation at one persistence boundary.
15
+ - Use the selected integration's client and migration lifecycle instead of
16
+ adding parallel connection factories or schema-management code.
17
+ - Preserve migration history and data semantics. Deslop is not permission for
18
+ destructive schema changes.