genesis-compiler 1.2.12 → 1.2.14
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 +34 -90
- package/docs/prompt-integration.md +5 -5
- package/docs/stack-components.md +119 -393
- package/package.json +1 -2
- package/plugins/genesis/.codex-plugin/plugin.json +1 -1
- package/prompts/adopt.txt +14 -23
- package/prompts/start.txt +10 -12
- package/prompts/work.txt +8 -9
- package/src/cli.js +27 -55
- package/src/index/check.js +13 -21
- package/src/index/codex-hooks.js +11 -2
- package/src/index/context.js +3 -3
- package/src/index/contracts.js +1 -3
- package/src/index/project-state.js +2 -2
- package/src/index/prompt.js +25 -10
- package/src/index/stack-catalog.js +1 -2
- package/src/index/stack-piece.js +25 -21
- package/src/index/stack-section-inspection.js +33 -0
- package/src/index/stack-section.js +82 -0
- package/src/index/stack-verification.js +54 -0
- package/src/index/stack.js +50 -84
- package/src/index/verification.js +2 -25
- package/src/index.js +3 -20
- package/docs/preview-identity-command.md +0 -113
- package/src/index/deployment.js +0 -34
- package/src/index/launch.js +0 -42
- package/src/index/stack-command.js +0 -65
- package/src/index/stack-deployment.js +0 -259
- package/src/index/stack-launch.js +0 -464
- package/src/index/stack-workspace-setup.js +0 -133
- package/src/index/workspace-setup.js +0 -156
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ interaction.
|
|
|
13
13
|
```text
|
|
14
14
|
genesis/
|
|
15
15
|
blueprint.md non-technical product intent
|
|
16
|
-
stack.md selected technology guidance,
|
|
16
|
+
stack.md selected technology guidance, verification, declarations, and opaque extensions
|
|
17
17
|
stack/ optional per-component Description, Guidance, Adoption, and Deslop customization
|
|
18
18
|
program/ concise explanations grouped into conceptual subsystems
|
|
19
19
|
.agents/skills/
|
|
@@ -73,12 +73,11 @@ genesis adopt "Optional product guidance"
|
|
|
73
73
|
|
|
74
74
|
It preserves the implementation, initializes the Genesis files and local
|
|
75
75
|
hooks, and prints the `adopt` prompt. That prompt imports the existing
|
|
76
|
-
application's factual Stack
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
explicitly approved port. “Adopt” never moves the project.
|
|
76
|
+
application's factual Stack declarations—including environment/resources,
|
|
77
|
+
verification, and consumer-owned opaque sections—then creates the first useful
|
|
78
|
+
Blueprint and Program. Give it to the agent already working in the repository.
|
|
79
|
+
Adoption edits Genesis metadata only; implementation modernization remains a
|
|
80
|
+
separate, explicitly approved port. “Adopt” never moves the project.
|
|
82
81
|
|
|
83
82
|
For a new or empty project, initialize first and write the product intent:
|
|
84
83
|
|
|
@@ -137,26 +136,6 @@ Genesis never overwrites an unmanaged skill and preserves locally modified
|
|
|
137
136
|
managed skills. Run `genesis init` after manually editing `genesis/stack.md`,
|
|
138
137
|
or use `genesis stack add`, to synchronize selected skills.
|
|
139
138
|
|
|
140
|
-
Run `genesis prepare` to execute the selected Stack's exact workspace recipe
|
|
141
|
-
directly with the caller's environment and installed toolchain. It executes
|
|
142
|
-
argument arrays without a shell, honors declared project-relative working
|
|
143
|
-
directories and conditional paths, stops on the first failure, and never
|
|
144
|
-
returns environment values. Hosts that need their own runtime, permission, or
|
|
145
|
-
process policy can instead call the public `inspectWorkspaceSetup()` API and
|
|
146
|
-
execute the same normalized recipe themselves. A concrete Stack piece may declare one exact,
|
|
147
|
-
ordered `## Workspace setup` recipe with labels, argument arrays expressed as
|
|
148
|
-
backticked tokens, abstract runtimes, and optional project-relative working
|
|
149
|
-
directories and readiness paths. A recipe whose declared project marker does
|
|
150
|
-
not exist remains unconfigured until a later inspection. The catalog's
|
|
151
|
-
`jskit` piece waits for `package.json` and then declares `npm install`; generic
|
|
152
|
-
`nodejs` and `php` deliberately declare no installer. One project section in
|
|
153
|
-
`genesis/stack.md` replaces all component defaults, including with
|
|
154
|
-
`- Nothing.`. Without that override, exactly one component recipe is used;
|
|
155
|
-
multiple component recipes are reported as ambiguous and never merged.
|
|
156
|
-
The standalone command does not provision declared resources: callers provide
|
|
157
|
-
their own database, credentials, compilers, and other infrastructure. Stack
|
|
158
|
-
resources such as database variables do not gate dependency installation.
|
|
159
|
-
|
|
160
139
|
Hosts that manage project environments can call `inspectEnvironment()`.
|
|
161
140
|
Concrete Stack integrations may declare public, non-secret Environment
|
|
162
141
|
defaults such as the database driver selected by that integration. Explicit
|
|
@@ -176,52 +155,30 @@ value-free missing-input diagnostics, and paths. It never returns supplied
|
|
|
176
155
|
environment values, writes files, stores secrets, or decides which resolved
|
|
177
156
|
host values should be materialized.
|
|
178
157
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
[`docs/stack-components.md`](docs/stack-components.md) for the v1 contract.
|
|
193
|
-
|
|
194
|
-
Hosts that publish applications can call the separate public
|
|
195
|
-
`inspectDeployment()` API. An optional readable `## Deployment` section
|
|
196
|
-
declares an ordered production recipe: project-relative workdir, abstract
|
|
197
|
-
runtimes, exact Prepare/Build/Migrate/Serve argv, and one HTTP readiness
|
|
198
|
-
predicate. A concrete component may provide the recipe; the catalog's `jskit`
|
|
199
|
-
piece declares production dependency installation, build, database preparation,
|
|
200
|
-
`npm start`, and `/api/health`. Generic language pieces do not guess. A project
|
|
201
|
-
section replaces component defaults wholesale, and `- Nothing.` explicitly
|
|
202
|
-
disables publishing.
|
|
203
|
-
|
|
204
|
-
Genesis only validates and reports this recipe and the Stack's abstract resource
|
|
205
|
-
requirements. It does not provision a database, resolve credentials, copy a
|
|
206
|
-
release, run commands, start a service, reserve a port, route traffic, issue TLS,
|
|
207
|
-
or roll back. A deployment host owns all of those operational responsibilities,
|
|
208
|
-
including the mapping from `mysql` or `postgresql` resources to its managed
|
|
209
|
-
services.
|
|
158
|
+
Consumers may define additional `##` sections in a project or component Stack.
|
|
159
|
+
Genesis composes each section by name, includes its exact text in Stack identity
|
|
160
|
+
and prompt context, and exposes it through `inspectStackSection()`. The body is
|
|
161
|
+
opaque: Genesis does not parse its commands, infer its purpose, or execute it.
|
|
162
|
+
A project section replaces a component default of the same name; competing
|
|
163
|
+
component declarations are reported mechanically instead of merged.
|
|
164
|
+
|
|
165
|
+
This is the boundary for every consumer-specific operation. The consumer that
|
|
166
|
+
names a section owns its schema, validation, runtime mapping, execution, and
|
|
167
|
+
proof of success. Genesis has no model of starting, preparing, deploying,
|
|
168
|
+
packaging, migrating, serving, probing, or supervising a project. A web host,
|
|
169
|
+
native toolchain, firmware publisher, desktop signer, or any future consumer
|
|
170
|
+
can define different sections without a Genesis compiler change.
|
|
210
171
|
|
|
211
172
|
Standalone and non-Node hosts can inspect these same normalized contracts
|
|
212
173
|
without importing the JavaScript API or parsing Markdown:
|
|
213
174
|
|
|
214
175
|
```bash
|
|
215
|
-
genesis inspect workspace --json
|
|
216
176
|
genesis inspect environment --json
|
|
217
|
-
genesis inspect
|
|
218
|
-
genesis inspect deployment --json
|
|
177
|
+
genesis inspect section 'Consumer operation' --json
|
|
219
178
|
```
|
|
220
179
|
|
|
221
180
|
Without `--json`, the commands print concise human-readable summaries. They
|
|
222
|
-
never
|
|
223
|
-
deploy. `genesis prepare` is the separate explicit command that executes only
|
|
224
|
-
the finite Workspace setup recipe.
|
|
181
|
+
never interpret or execute a consumer-owned section.
|
|
225
182
|
|
|
226
183
|
At session start, Codex receives only a short explanation of how Genesis is
|
|
227
184
|
organized. After it locates the source involved in a request, it can load the
|
|
@@ -416,10 +373,8 @@ Run the Stack's declared checks explicitly:
|
|
|
416
373
|
genesis verify
|
|
417
374
|
```
|
|
418
375
|
|
|
419
|
-
Genesis
|
|
420
|
-
|
|
421
|
-
exists, Genesis applies public Stack defaults beneath explicit environment
|
|
422
|
-
values, evaluates generic resource declarations, and runs each declared
|
|
376
|
+
Genesis applies public Stack defaults beneath explicit environment values,
|
|
377
|
+
evaluates generic resource declarations, and runs each declared Verification
|
|
423
378
|
command without a shell. A complete successful run writes only
|
|
424
379
|
`.genesis/verification.json`, recording:
|
|
425
380
|
|
|
@@ -436,7 +391,7 @@ whole-product correctness.
|
|
|
436
391
|
A project can replace component defaults in `genesis/stack.md`:
|
|
437
392
|
|
|
438
393
|
```markdown
|
|
439
|
-
##
|
|
394
|
+
## Verification
|
|
440
395
|
|
|
441
396
|
- Verify `tests`: `npm` `test`
|
|
442
397
|
- Verify `build`: `npm` `run` `build`
|
|
@@ -453,8 +408,8 @@ genesis check
|
|
|
453
408
|
- Blueprint and Stack validity;
|
|
454
409
|
- selected Agent Skill presence and structural validity;
|
|
455
410
|
- Program presence and structural validity;
|
|
456
|
-
-
|
|
457
|
-
or honestly `unconfigured`;
|
|
411
|
+
- environment declarations and consumer-owned Stack extensions as `ready`,
|
|
412
|
+
`blocked`, or honestly `unconfigured`;
|
|
458
413
|
- missing Stack-declared environment inputs (without claiming the service is
|
|
459
414
|
reachable);
|
|
460
415
|
- verification evidence as `current`, `stale`, `missing`, `invalid`, or
|
|
@@ -479,10 +434,8 @@ import {
|
|
|
479
434
|
getContext,
|
|
480
435
|
indexCodebase,
|
|
481
436
|
initialize,
|
|
482
|
-
inspectDeployment,
|
|
483
437
|
inspectEnvironment,
|
|
484
|
-
|
|
485
|
-
inspectWorkspaceSetup,
|
|
438
|
+
inspectStackSection,
|
|
486
439
|
installCodex,
|
|
487
440
|
listStackPieces,
|
|
488
441
|
verify,
|
|
@@ -497,25 +450,16 @@ codebase. `installCodex()` installs the optional global discovery plugin.
|
|
|
497
450
|
the functions already declared there, selected Stack guidance, available Agent
|
|
498
451
|
Skills, and verification commands. `indexCodebase()` regenerates or returns the
|
|
499
452
|
detailed Machine City and simple Program City projections.
|
|
500
|
-
`inspectWorkspaceSetup()` returns one normalized, shell-free workspace
|
|
501
|
-
preparation recipe—or an explicit unconfigured or ambiguous result—for a host
|
|
502
|
-
to execute with its own pinned runtimes, caches, process isolation, and
|
|
503
|
-
credentials. A configured recipe may remain unconfigured while it waits for a
|
|
504
|
-
technology-declared project marker.
|
|
505
453
|
`inspectEnvironment()` returns normalized Stack resource declarations,
|
|
506
454
|
public non-secret defaults, value-free missing-input diagnostics, and dotenv
|
|
507
455
|
projection paths without returning any supplied environment value.
|
|
508
|
-
`
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
`contract` field: `genesis.workspace-setup.v1`, `genesis.environment.v1`,
|
|
516
|
-
`genesis.launch.v1`, `genesis.deployment.v2`, or
|
|
517
|
-
`genesis.verification.v1`. Hosts validate that identity instead of
|
|
518
|
-
feature-detecting individual fields.
|
|
456
|
+
`inspectStackSection()` returns one exact consumer-owned section without
|
|
457
|
+
interpreting or executing its contents.
|
|
458
|
+
|
|
459
|
+
Normalized results identify their stable public contract in the `contract`
|
|
460
|
+
field: `genesis.environment.v1`, `genesis.stack-section.v1`, or
|
|
461
|
+
`genesis.verification.v1`. A consumer defines any schema embedded inside the
|
|
462
|
+
opaque section body.
|
|
519
463
|
|
|
520
464
|
A host such as Vibe64 can send the generated prompt to its existing agent:
|
|
521
465
|
|
|
@@ -37,7 +37,7 @@ Genesis keeps each instruction at one useful level:
|
|
|
37
37
|
workflow skill and states only that turn's edit boundary.
|
|
38
38
|
- a declared Stack package's `stacks/pieces/<component>.md` supplies concise Description, supplemental
|
|
39
39
|
Guidance, Adoption requirements, Resources, Deslop overlays, structural Indexers, verification
|
|
40
|
-
|
|
40
|
+
commands, opaque consumer sections, and an optional authoritative Agent Skill source.
|
|
41
41
|
- `genesis/blueprint.md`, `genesis/program/`, and `genesis/stack.md` are the
|
|
42
42
|
project's own intent, explanation, and selected technical composition.
|
|
43
43
|
- The generated JSON block contains current structural facts and warnings.
|
|
@@ -59,10 +59,10 @@ then creates one Blueprint and subsystem-oriented Program.
|
|
|
59
59
|
|
|
60
60
|
Adoption does not upgrade an application's technology foundation. Component
|
|
61
61
|
defaults apply only when direct source evidence matches. Older or otherwise
|
|
62
|
-
different applications receive complete project-owned
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
62
|
+
different applications receive complete project-owned environment/resource,
|
|
63
|
+
Verification, and consumer-owned opaque declarations as applicable. Genesis
|
|
64
|
+
does not interpret those opaque bodies; the consumer's schema and technology
|
|
65
|
+
skill determine what must be preserved.
|
|
66
66
|
|
|
67
67
|
Codex users can run `genesis codex install` once to install the packaged
|
|
68
68
|
Genesis discovery plugin. Its `SessionStart` hook executes before the first
|