genesis-compiler 1.2.11 → 1.2.13

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.
@@ -1,8 +1,8 @@
1
1
  # Stack components
2
2
 
3
- Genesis core knows no framework, language, database, package manager, or
4
- environment-variable name, and it ships no technology pieces. A Stack package
5
- is an ordinary npm package with one static manifest pointer:
3
+ Genesis core knows no framework, language, database, package manager, host, or
4
+ consumer operation. A Stack package is an ordinary npm package with one static
5
+ manifest pointer:
6
6
 
7
7
  ```json
8
8
  {
@@ -11,469 +11,198 @@ is an ordinary npm package with one static manifest pointer:
11
11
  }
12
12
  ```
13
13
 
14
- Each piece is one Markdown file in that declared directory. Genesis reads the
15
- manifest and Markdown only; it never imports or executes package code. Catalog
16
- names are explicit, collisions fail, and the selected package is recorded in
17
- the project's `## Stack packages` section. The first-party optional
18
- `genesis-stack` package contains the complete curated catalog; Genesis core does
19
- not depend on it. A framework contributes to that catalog rather than requiring
20
- a compiler release or a separate catalog package.
14
+ Each piece is one Markdown file in that directory. Genesis reads the manifest
15
+ and Markdown only; it never imports or executes package code. Package names are
16
+ explicit, collisions fail, and selected packages are recorded in the project's
17
+ `## Stack packages` section.
18
+
19
+ ## Piece format
20
+
21
+ A piece may use the Genesis-owned sections below:
21
22
 
22
23
  ````markdown
23
24
  # Stack piece: example
24
25
 
25
26
  ## Description
26
27
 
27
- What this component contributes.
28
+ Concise technology context.
28
29
 
29
30
  ## Requires
30
31
 
31
32
  - `nodejs`
32
33
 
34
+ ## Conflicts
35
+
36
+ - Nothing.
37
+
33
38
  ## Skill
34
39
 
35
- - Package: `@example/agent-docs`
40
+ - Package: `example-agent-docs`
36
41
  - Path: `skills/example`
37
42
 
38
43
  ## Indexers
39
44
 
40
45
  - `javascript`
41
46
 
42
- ## City regions
43
-
44
- - Ignore `**/test/**`
45
- - Ignore `**/tests/**`
46
- - Ignore `**/__tests__/**`
47
- - Ignore `**/*.test.*`
48
- - Ignore `**/*.spec.*`
49
- - Match `packages` as `Packages`: `packages/**`
50
- - Match `source` as `Source`: `src/**`
51
- - Fallback `everything-else` as `Everything else`
52
-
53
47
  ## Resources
54
48
 
55
- ```json genesis-resource
56
- {
57
- "id": "service",
58
- "kind": "example-service",
59
- "environmentAlternatives": [
60
- { "required": ["SERVICE_URL"] },
61
- { "required": ["SERVICE_HOST", "SERVICE_PORT"] }
62
- ]
63
- }
64
- ```
49
+ - Resource `database` kind `postgresql`: `DATABASE_URL` OR `DB_HOST` + `DB_NAME`
65
50
 
66
51
  ## Environment defaults
67
52
 
68
- - Default `EXAMPLE_DRIVER`: `example`
69
-
70
- ## Guidance
53
+ - Default `DB_CLIENT`: `pg`
71
54
 
72
- ### Technology-specific behavior
55
+ ## Environment files
73
56
 
74
- - Concise supplemental guidance used during implementation, explanation,
75
- review, and cleanup.
57
+ - Dotenv: `.env`
76
58
 
77
- ## Adoption
59
+ ## Verification
78
60
 
79
- - Evidence and technology-specific contracts an agent must reconcile when
80
- importing an existing application.
61
+ - Verify `application`: `npm` `run` `verify`
81
62
 
82
- ## Environment files
63
+ ## Guidance
83
64
 
84
- - Dotenv `.env`
65
+ - General project-work guidance.
85
66
 
86
- ## Workspace setup
67
+ ## Adoption
87
68
 
88
- - Prepare `Install dependencies` with `example-runtime`: `example-install` `--locked`
89
- - Prepare `Install web dependencies` with `nodejs` in `web`: `npm` `install`
69
+ - Existing-project import guidance.
90
70
 
91
71
  ## Deslop
92
72
 
93
- - Concise technology-specific cleanup guidance.
73
+ - Technology-specific cleanup guidance.
94
74
 
95
- ## Commands
75
+ ## Consumer operation
96
76
 
97
- - Verify `tests`: `npm` `test`
77
+ ```json example.consumer-operation.v1
78
+ {
79
+ "version": 1,
80
+ "data": "owned entirely by the consumer"
81
+ }
82
+ ```
83
+ ````
98
84
 
99
- ## Launch
85
+ `Description`, `Guidance`, `Adoption`, and `Deslop` are prose. `Requires` and
86
+ `Conflicts` define component selection. `Skill` names one complete authoritative
87
+ Agent Skill directory. `Indexers` selects installed structural adapters.
88
+ `Resources`, `Environment defaults`, `Environment files`, and `Verification`
89
+ use the small Genesis grammars documented below. Every other `##` section is an
90
+ opaque extension.
100
91
 
101
- ### Target `app`: Run app
92
+ ## Genesis-owned declarations
102
93
 
103
- - Default.
104
- - Workdir: `.`
105
- - Preferred port: `3000`
106
- - URL path: `/`
107
- - Ready when: `GET` `/api/health` returns `200`
108
- - Runtimes: `nodejs`
109
- - Prepare `Build`: `npm` `run` `build`
110
- - Serve `Start`: `npm` `run` `server` `--` `--host` `{host}` `--port` `{port}`
94
+ Resources describe required external inputs as alternatives of environment
95
+ variable names. Genesis can report which names are absent, but never reads a
96
+ service, provisions infrastructure, or returns a supplied value. A project
97
+ `## Resources` section replaces all component resource defaults.
111
98
 
112
- #### Preview identity
99
+ Environment defaults are public, non-secret constants. Component defaults
100
+ compose by variable name; identical values collapse and conflicting values
101
+ fail. A project `## Environment defaults` section replaces component defaults.
102
+ Explicit process values always win.
113
103
 
114
- - Command: `tools/preview-identity`
115
- - Protocol: `genesis.preview-identity.command.v1`
116
- - Identity types: `email` `login` `user-id`
117
- - Enabled environment: `APP_PREVIEW_IDENTITY_ENABLED`
118
- - Secret environment: `APP_PREVIEW_IDENTITY_SECRET`
119
- - Runtimes: `nodejs`
120
- - Timeout ms: `10000`
121
- ````
104
+ Environment files describe safe project-relative dotenv projection paths.
105
+ Genesis returns only the format and path. It does not materialize the file,
106
+ choose which values belong there, or store secrets. A project declaration
107
+ replaces component declarations; otherwise paths compose.
122
108
 
123
- `Description` and `Requires` are the only required sections. `Requires` forms
124
- dependency closure. Optional `Conflicts` uses the same list format. `Skill`
125
- selects one complete [Agent Skills](https://agentskills.io) directory, either
126
- from Genesis or from the declared npm package. Its `SKILL.md`, `references/`,
127
- `scripts/`, `assets/`, and `agents/` metadata are copied together to
128
- `.agents/skills/<skill-name>/`; the agent loads them progressively instead of
129
- Genesis expanding every manual into every prompt. `Resources` declares generic
130
- alternative environment-name sets reported by prompt generation and checked
131
- before verification. `allowEmpty` may name a required variable whose empty
132
- string is valid. `Environment defaults` declares public non-secret constants
133
- owned by a concrete integration; explicit host values take precedence.
134
- `Guidance` is supplemental prose used by work, review, Program,
135
- description, and cleanup prompts, as well as path-focused context. `Adoption`
136
- adds technology-specific evidence and contract requirements to the dedicated
137
- existing-application import prompt. `Deslop`
138
- adds cleanup-only prose to explicit cleanup and the automatic Codex cleanup
139
- continuation. With no selected component, only the `genesis-deslop` skill
140
- applies. `Commands` accepts only argument-safe `Verify` entries and runs only
141
- through `genesis verify`.
142
-
143
- A project may own a complete `## Resources` section in `genesis/stack.md` using
144
- the same fenced `json genesis-resource` objects, or `- Nothing.` to declare
145
- none. Its presence replaces every selected component Resource declaration.
146
- This lets an existing application preserve its real queue, database, mail,
147
- object-storage, or service environment names rather than inherit a framework's
148
- vocabulary. Without a project section, component Resources compose as before.
149
-
150
- `Workspace setup` is an optional exact, ordered recipe for a host preparing a
151
- fresh workspace. Each entry uses this readable, shell-free form:
109
+ Verification contains exact argv tokens:
152
110
 
153
111
  ```markdown
154
- - Prepare `label` with `runtime` `another-runtime` in `optional/workdir` when `optional/marker` exists: `command` `argument`
112
+ ## Verification
113
+
114
+ - Verify `tests`: `npm` `test`
115
+ - Verify `build`: `npm` `run` `build`
155
116
  ```
156
117
 
157
- Every command and argument is a separate backticked value and is returned as
158
- an `argv` array. Runtime names are opaque technology ids. Omitted `in` means
159
- the project root; otherwise the working directory must be canonical and
160
- project-relative. The optional `when` path is also canonical and
161
- project-relative. Until it exists, inspection reports the recipe as
162
- `unconfigured`; this lets a host safely re-inspect after an agent creates a
163
- technology substrate without knowing that technology's filenames. `- Nothing.`
164
- is valid only as the entire section and lets a
165
- project explicitly disable component setup. Genesis validates and reports the
166
- recipe but never chooses a runtime, runs a command, installs a dependency, or
167
- infers a package manager. Generic language pieces such as `nodejs` and `php`
168
- therefore declare no installer; a concrete piece such as `jskit` may declare
169
- one.
170
-
171
- Precedence is intentionally small and deterministic:
172
-
173
- 1. A project `## Workspace setup` section in `genesis/stack.md` replaces every
174
- selected component default.
175
- 2. Without a project section, exactly one selected component recipe is used.
176
- 3. With no declaration the result is `unconfigured`; with several component
177
- recipes it is `blocked` as ambiguous. Genesis never merges them.
178
-
179
- General Stack resources do not gate Workspace setup. In particular, missing
180
- database variables do not prevent an otherwise independent dependency install.
181
-
182
- Each `Environment defaults` entry is one `Default` bullet with a backticked
183
- environment name and value. Selected
184
- component defaults compose by name; identical declarations collapse and
185
- different values fail rather than silently choosing one. Defaults participate
186
- in Stack identity, resource preflight, prompt context, Launch inspection, and
187
- verification execution. The `genesis-stack` JSKIT database integrations use this contract for
188
- their deterministic `DB_CLIENT` driver ids; generic database pieces do not.
189
- Secrets and deployment-specific connection values remain host inputs and must
190
- never be declared as defaults.
191
-
192
- A project `## Environment defaults` section in `genesis/stack.md` likewise
193
- replaces every component default and accepts `- Nothing.` as a complete empty
194
- declaration. It is the complete declaration of public, non-secret constants
195
- expected by the actual application; Genesis never keeps a framework default
196
- beside it implicitly. `genesis stack add` preserves both project-owned sections
197
- while changing component selection.
198
-
199
- `Environment files` optionally declares project-relative dotenv projections a
200
- host may materialize from its own resolved project environment. Genesis
201
- validates and returns only the format and path; it never reads environment
202
- values, writes a file, stores a secret, or chooses which variables belong in a
203
- projection. A project `## Environment files` section in `genesis/stack.md`
204
- replaces component declarations, including with `- Nothing.`. Without a
205
- project section, component declarations compose and identical paths collapse.
206
- The declaration is useful independently of Launch and Workspace setup.
207
-
208
- `Launch` is an optional readable declarative recipe for hosts that need to
209
- offer a preview without guessing how a concrete technology starts. Repeat a
210
- ``### Target `id`: label`` block to declare several targets. Default, Workdir,
211
- Preferred port, URL path, and Runtimes are optional; their normalized defaults
212
- are false, `.`, null, `/`, and no runtime requirements. Every target declares
213
- one HTTP readiness predicate with a project path and an exact successful status
214
- from 200 through 399. Every Prepare or Serve command and argument is a separate backticked value returned as an `argv`
215
- array, never a shell program. A target has exactly one final Serve step; any
216
- earlier steps must be Prepare steps. Workdir is canonical and project-relative,
217
- Preferred port is only a hint from 1024 through 65535, and URL path is an
218
- application path rather than a URL. The only substitutions are `{host}` and
219
- `{port}`, supplied by the host. A project can use `- Nothing.` as its complete
220
- Launch section to disable component targets.
221
-
222
- Genesis validates and reports Launch data but does not select a runtime,
223
- reserve a port, start a process, probe readiness, or control a browser. The host
224
- executes the declared predicate and owns its timeout and retry policy.
225
-
226
- The optional `#### Preview identity` block is specific to hosts that implement
227
- the declared `genesis.preview-identity.command.v1` protocol. Its executable is
228
- a committed, application-owned project-relative file; the
229
- normalized command is an argv array, not a shell program. Identity types may
230
- contain `email`, `login`, and `user-id`. Enabled environment and Secret
231
- environment are optional variable
232
- names the application recognizes; Genesis validates and returns names only and
233
- never reads or returns their values. Runtimes lists opaque runtimes required
234
- to execute this command, independently of the server target requirements, and
235
- Timeout ms defaults to 10000 with a maximum of 30000. Genesis does not execute
236
- the command, select identities, provide secrets, authenticate users, or control
237
- the browser. Those remain host responsibilities. The complete transport
238
- contract is defined in
239
- [`preview-identity-command.md`](preview-identity-command.md).
240
-
241
- `runtimeRequirements` contains opaque technology ids. A host explicitly maps
242
- the ids it supports to its own pinned runtime packs; for example, it may map
243
- `nodejs` to its Node 26 pack. Genesis never chooses versions, expands
244
- dependencies such as `composer`, or treats an unknown id as something similar.
245
- Declare each independently required runtime. Generic language pieces such as
246
- `nodejs` and `php` provide no Launch recipe. A concrete piece such as `jskit`
247
- may declare its app-owned `npm run develop` command; Genesis does not invent
248
- missing targets or supervise framework-specific subprocesses.
249
-
250
- `Deployment` is a separate optional readable production recipe. It must not be
251
- inferred from Launch because preview preparation and production publication have
252
- different safety, dependency, migration, artifact, and rollback concerns. Its
253
- complete form is:
118
+ Genesis is the consumer of this section. `genesis verify` runs the declared
119
+ commands directly without a shell after generic resource preflight and records
120
+ the exact successful code, Stack, and command hashes. A project Verification
121
+ section replaces component defaults.
254
122
 
255
- ```markdown
256
- ## Deployment
257
-
258
- - Workdir: `.`
259
- - Runtimes: `nodejs`
260
- - Recreate on restore: `node_modules`
261
- - Ready when: `GET` `/api/health` returns `200`
262
- - Prepare `Install production dependencies`: `npm` `install` `--omit=dev`
263
- - Build `Build`: `npm` `run` `build`
264
- - Migrate `Prepare database`: `npm` `run` `db:prepare`
265
- - Serve `Start`: `npm` `start`
266
- ```
123
+ ## Opaque extensions
267
124
 
268
- Every command and argument is a separate backticked value returned as an argv
269
- array; shell source is rejected. Workdir is canonical and project-relative.
270
- Prepare, Build, and Migrate steps are optional and retain their declared order.
271
- There is exactly one final Serve step and one exact HTTP readiness predicate
272
- whose successful status is from 200 through 399. Runtime ids remain abstract.
273
-
274
- `Recreate on restore` lists project-relative paths that a host may remove when
275
- retaining an inactive release. Every listed path must be completely recreated
276
- by the Deployment Prepare steps, which a host runs after restoring the release
277
- and before Serve. Declaring these paths without a Prepare step is invalid.
278
- An entry without `/` matches that path segment at every depth, so
279
- `node_modules` covers root and nested workspace dependency trees. `*` stays
280
- within one segment and `**` may cross path separators. A matched directory
281
- includes its complete subtree.
282
- This is application and Stack knowledge: for example, JSKIT declares
283
- `node_modules`, while compiled output such as `dist` remains part of the
284
- artifact because Prepare does not rebuild it. Genesis normalizes the paths but
285
- does not remove, archive, restore, or reconstruct anything itself.
286
-
287
- A project `## Deployment` section replaces every component recipe as one unit,
288
- including with `- Nothing.`. Without a project section, exactly one selected
289
- component recipe may apply; several are blocked as ambiguous and never merged.
290
- Genesis returns the Stack's existing resource declarations with the recipe but
291
- does not check production values, provision services, execute commands, package
292
- artifacts, start processes, probe health, route traffic, manage TLS, or retain
293
- releases. Those are host responsibilities. This keeps the same project portable:
294
- Genesis alone explains the production requirements, while a host such as Vibe64
295
- Online can map `mysql` or `postgresql` to a pinned managed service.
296
-
297
- `Indexers` selects installed structural adapters for the derived Machine City.
298
- The shared ast-grep engine owns traversal, bounds, diagnostics, JSON, and
299
- queries; each adapter owns only language extensions, callable syntax, names,
300
- containers, signatures, and public/internal visibility. Several Stack pieces
301
- may contribute indexers, and duplicates are collapsed. Index output is
302
- navigation data, not proof that every dynamic callable or framework edge was
303
- discovered.
304
-
305
- `City regions` is an optional complete presentation contract for Machine City.
306
- Leading `Ignore` entries are canonical project-relative glob patterns using
307
- only `*` within a path segment and `**` across segments. Genesis excludes their
308
- matching files before it emits Machine City buildings or functions. This keeps
309
- test/spec source out of the product City without requiring a host-side filter.
310
- Each subsequent ordered `Match` entry declares one canonical project-relative
311
- `path/**` prefix, stable id, and human title. Exactly one final `Fallback` entry
312
- owns every remaining indexed path. Ignore patterns, ids, and prefixes must be
313
- unique, prefixes must not overlap, and no more than one selected component may
314
- declare the contract. Genesis resolves every indexed file and structural
315
- district to a region and a campus while generating
316
- `.genesis/machine-city.json`; a City renderer consumes those emitted facts and
317
- must not reclassify or filter paths. Under a matched prefix, the first directory
318
- is a campus, while files directly below the prefix belong to the prefix campus.
319
- Under the fallback, each top-level directory is a campus and project-root files
320
- belong to the project-root campus. The `genesis-stack` JSKIT piece excludes exact
321
- `test`, `tests`, and `__tests__` path segments plus `*.test.*` and `*.spec.*`
322
- files, then declares `Packages`, `Source`, and `Everything else`.
323
-
324
- Do not create a Genesis-owned generic skill merely because a component is
325
- named `nodejs`, `php`, or another common technology. Official, user, and host
326
- skills with those names must coexist normally. Use `## Skill` only for an
327
- authoritative directory this Stack component selects; put concise supplemental
328
- rules in `## Guidance`, existing-project import requirements in `## Adoption`,
329
- and cleanup-only additions in `## Deslop`.
330
-
331
- A selected component may have one project customization at
332
- `genesis/stack/<id>.md`:
125
+ Any other `##` heading is consumer-owned data. Genesis validates only the
126
+ section name and composition. It does not parse the body, infer its purpose,
127
+ validate a private schema, map runtimes, execute commands, or prove success.
333
128
 
334
- ```markdown
335
- # Stack customization: example
129
+ Composition is intentionally small:
336
130
 
337
- ## Add
131
+ 1. A project section replaces component declarations with the same name.
132
+ 2. Without a project section, one component declaration is returned unchanged.
133
+ 3. Competing component declarations produce `STACK_SECTION_AMBIGUOUS`; Genesis
134
+ never merges their bodies.
338
135
 
339
- ### Description
136
+ Call `inspectStackSection({ name, projectRoot })` or:
340
137
 
341
- Additional project context.
138
+ ```bash
139
+ genesis inspect section 'Consumer operation' --json
140
+ ```
342
141
 
343
- ### Guidance
142
+ The result uses `genesis.stack-section.v1` and contains the exact lines,
143
+ content, source, section hash, Stack hash, and generic composition diagnostics.
144
+ The named consumer then owns all interpretation and action. This boundary works
145
+ equally for web applications, libraries, command-line tools, native programs,
146
+ firmware, desktop software, and future systems Genesis has never seen.
344
147
 
345
- - Additional implementation, explanation, review, and cleanup guidance.
148
+ ## Selection and identity
346
149
 
347
- ### Adoption
150
+ `genesis stack add` records selected packages and component dependency closure
151
+ without discarding project declarations. Stack identity includes component ids,
152
+ resources, environment declarations, Verification commands, City presentation,
153
+ and every opaque extension body. Changing any executable or consumer-owned
154
+ contract therefore stales prior Genesis verification evidence even though
155
+ Genesis does not interpret the extension.
348
156
 
349
- - Additional existing-project import requirements.
157
+ Prose and Agent Skill contents are instructions rather than verification
158
+ evidence. Changes to Description, Guidance, Adoption, Deslop, or the installed
159
+ Skill do not rewrite what an already-run command proved.
350
160
 
351
- ### Deslop
161
+ `City regions` and `Indexers` control only the derived structural maps. Indexers
162
+ identify language adapters. City regions can exclude test/spec paths and group
163
+ indexed files into deterministic regions and campuses. Both projections are
164
+ navigation data, not proof of complete runtime behavior.
352
165
 
353
- - Additional cleanup guidance.
166
+ ## Project customization
354
167
 
355
- ## Override
168
+ A selected component may have one prose-only customization at
169
+ `genesis/stack/<id>.md`:
356
170
 
357
- ### Description
171
+ ```markdown
172
+ # Stack customization: example
358
173
 
359
- Replacement component description.
174
+ ## Add
360
175
 
361
176
  ### Guidance
362
177
 
363
- - Replacement installed general guidance.
178
+ - Additional project guidance.
364
179
 
365
- ### Adoption
366
-
367
- - Replacement existing-project import requirements.
180
+ ## Override
368
181
 
369
182
  ### Deslop
370
183
 
371
184
  - Replacement cleanup guidance.
372
185
  ```
373
186
 
374
- Each field is optional. `Override` replaces only that installed field; `Add`
375
- then follows the installed or overridden value. These customization files
376
- cannot alter dependencies, conflicts, Agent Skill source, indexers, resources,
377
- environment defaults, environment files, commands, Workspace setup, or Launch declarations.
378
- `genesis stack add` preserves the files and composes their effective prose after
379
- dependency resolution.
380
-
381
- A project may select component ids in `genesis/stack.md`; replace component
382
- Resources and Environment defaults with complete application-owned contracts;
383
- replace component environment-file declarations; replace component Workspace
384
- setup defaults with one project recipe; replace component Verify defaults with
385
- its own `## Commands`; and replace every component Launch target with one
386
- project `## Launch` contract. With no corresponding project section, selected
387
- component declarations compose; conflicts are rejected rather than guessed.
388
- `genesis stack add` preserves every existing project-owned contract section.
389
- Adding another language, framework, database, or integration is therefore an
390
- isolated Stack/indexer contribution rather than a prompt or controller special
391
- case.
392
-
393
- Description, Guidance, Adoption, Agent Skill, and Deslop prose are instructions, not
394
- verification evidence. Changes to them do not stale an exact successful
395
- verification record; selected component ids, resources, environment files,
396
- environment defaults, Workspace setup, launch targets, and verification
397
- commands remain part of the Stack identity.
398
-
399
- Hosts inspect normalized environment requirements independently:
400
-
401
- ```js
402
- import { inspectEnvironment } from 'genesis-compiler';
403
-
404
- const projectEnvironment = await inspectEnvironment({ environment, projectRoot });
405
- ```
406
-
407
- The result has `status` (`ready`, `missing-inputs`, or `unconfigured`),
408
- `stackHash`, selected `components`, public non-secret `environmentDefaults`,
409
- declared `resources`, value-free `diagnostics`, and normalized `files`. Each default has
410
- `name`, `value`, and component `sources`; each file contains `format`, `path`,
411
- and `source`. Supplied environment values never cross this API boundary.
412
-
413
- Shell and non-Node hosts can inspect the same normalized contracts without
414
- importing the JavaScript API or parsing Markdown:
415
-
416
- ```bash
417
- genesis inspect environment --json
418
- genesis inspect workspace --json
419
- genesis inspect launch --json
420
- genesis inspect deployment --json
421
- ```
422
-
423
- These are projections of the same public inspectors. They do not create a
424
- second parser or take ownership of execution.
425
-
426
- Fresh-workspace hosts read setup from the package root:
427
-
428
- ```js
429
- import { inspectWorkspaceSetup } from 'genesis-compiler';
430
-
431
- const setup = await inspectWorkspaceSetup({ projectRoot, environment });
432
- ```
433
-
434
- The setup result has `status` (`ready`, `blocked`, or `unconfigured`),
435
- `stackHash`, an exact ready-recipe `recipeHash`, selected `components`, its `source`, distinct
436
- `runtimeRequirements`, normalized ordered `steps`, and `diagnostics`. Each step
437
- contains `label`, `argv`, `runtimeRequirements`, `workdir`, and an optional
438
- `readyWhen` project path. `blocked` means component recipes conflict, not that
439
- an unrelated Stack resource is absent. An absent `readyWhen` marker produces
440
- the unconfigured diagnostic `STACK_WORKSPACE_SETUP_WAITING`, never a failed or
441
- blocked result.
442
- The optional environment object is accepted for a consistent host inspection
443
- boundary, but Workspace setup v1 neither reads nor returns its values.
444
-
445
- Standalone users may execute the same normalized recipe with their own
446
- environment and installed toolchain:
447
-
448
- ```bash
449
- genesis prepare
450
- ```
187
+ Customizations may add or override only Description, Guidance, Adoption, and
188
+ Deslop. They cannot mutate selection, resources, environment declarations,
189
+ Verification, Agent Skill ownership, indexers, or opaque consumer sections.
451
190
 
452
- `genesis prepare` runs each declared argv directly without a shell, in order,
453
- and stops at the first failure. It honors project-relative workdirs and
454
- conditional paths. It does not provision databases, compilers, credentials,
455
- runtimes, or other resources. Managed hosts remain free to consume
456
- `inspectWorkspaceSetup()` and enforce their own execution, identity, runtime,
457
- and permission policies.
191
+ ## Public inspection
458
192
 
459
- Preview hosts read the normalized Launch contract independently:
193
+ Hosts may inspect Genesis-owned environment declarations separately:
460
194
 
461
195
  ```js
462
- import { inspectLaunch } from 'genesis-compiler';
196
+ import { inspectEnvironment, inspectStackSection } from 'genesis-compiler';
463
197
 
464
- const launch = await inspectLaunch({ projectRoot, environment });
198
+ const environment = await inspectEnvironment({ projectRoot });
199
+ const operation = await inspectStackSection({
200
+ name: 'Consumer operation',
201
+ projectRoot,
202
+ });
465
203
  ```
466
204
 
467
- The result has `status` (`ready`, `blocked`, or `unconfigured`), `stackHash`,
468
- selected `components`, public `environmentDefaults`, distinct
469
- `runtimeRequirements`, declared `resources`,
470
- normalized `targets`, and resource `diagnostics`. Each target reports its
471
- `source`, `available`, and `disabledReason`, plus its normalized
472
- `previewIdentity` declaration when present. Supplied environment values are
473
- inspected but never returned. Here, `available` means only that the Stack's declared
474
- resource inputs are present: the host must still reject runtime requirements it
475
- cannot map. `unconfigured` means there are no targets, `blocked` means declared
476
- resource inputs are missing, and `ready` means neither condition applies. The
477
- caller still owns exact runtimes, port allocation, process lifecycle, readiness
478
- and proxy policy, identity selection and command execution, secrets, browser
479
- binaries, Git, and credentials.
205
+ `inspectEnvironment()` uses `genesis.environment.v1` and never returns supplied
206
+ values. `inspectStackSection()` uses `genesis.stack-section.v1` and never
207
+ interprets the section. There is no generic Genesis API that executes an opaque
208
+ operation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-compiler",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
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": {
@@ -25,7 +25,6 @@
25
25
  ".agents/plugins/marketplace.json",
26
26
  "bin",
27
27
  "docs/assurance-model.md",
28
- "docs/preview-identity-command.md",
29
28
  "docs/stack-components.md",
30
29
  "docs/prompt-integration.md",
31
30
  "prompts/blueprint.txt",
@@ -57,6 +56,7 @@
57
56
  "@ast-grep/lang-ruby": "^0.0.7",
58
57
  "@ast-grep/lang-rust": "^0.0.7",
59
58
  "@ast-grep/napi": "^0.45.1",
59
+ "mdast-util-from-markdown": "^2.0.3",
60
60
  "yaml": "^2.9.0"
61
61
  }
62
62
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis",
3
- "version": "1.2.11",
3
+ "version": "1.2.13",
4
4
  "description": "Makes Codex aware of optional Genesis adoption for existing projects.",
5
5
  "author": {
6
6
  "name": "Mobily Enterprises"