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.
- package/README.md +40 -93
- package/docs/prompt-integration.md +5 -5
- package/docs/stack-components.md +119 -390
- package/package.json +2 -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/agent-skills.js +88 -2
- package/src/index/check.js +13 -21
- 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 +1 -1
- 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
|
|
|
@@ -122,9 +121,12 @@ Genesis does not install substitute generic `nodejs`, `vue`, `php`, or similar
|
|
|
122
121
|
skills. Official, user, or host skills retain their normal names. A Stack piece
|
|
123
122
|
may instead name one authoritative technology skill; Genesis copies that
|
|
124
123
|
complete directory into `.agents/skills/`, including its `references/`,
|
|
125
|
-
`scripts/`, `assets/`, and agent metadata.
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
`scripts/`, `assets/`, and agent metadata. Every relative Markdown link and image
|
|
125
|
+
must resolve within that same Skill directory after relocation; a missing
|
|
126
|
+
target or path that escapes the Skill root makes the Skill invalid. The agent
|
|
127
|
+
loads valid resources only when the Skill requires them. For example, the
|
|
128
|
+
`genesis-stack` catalog's JSKIT piece installs the JSKIT package's own `jskit`
|
|
129
|
+
skill. A piece's optional
|
|
128
130
|
`## Guidance` is concise
|
|
129
131
|
supplemental project-work guidance; it does not create or replace a generic
|
|
130
132
|
technology skill.
|
|
@@ -134,26 +136,6 @@ Genesis never overwrites an unmanaged skill and preserves locally modified
|
|
|
134
136
|
managed skills. Run `genesis init` after manually editing `genesis/stack.md`,
|
|
135
137
|
or use `genesis stack add`, to synchronize selected skills.
|
|
136
138
|
|
|
137
|
-
Run `genesis prepare` to execute the selected Stack's exact workspace recipe
|
|
138
|
-
directly with the caller's environment and installed toolchain. It executes
|
|
139
|
-
argument arrays without a shell, honors declared project-relative working
|
|
140
|
-
directories and conditional paths, stops on the first failure, and never
|
|
141
|
-
returns environment values. Hosts that need their own runtime, permission, or
|
|
142
|
-
process policy can instead call the public `inspectWorkspaceSetup()` API and
|
|
143
|
-
execute the same normalized recipe themselves. A concrete Stack piece may declare one exact,
|
|
144
|
-
ordered `## Workspace setup` recipe with labels, argument arrays expressed as
|
|
145
|
-
backticked tokens, abstract runtimes, and optional project-relative working
|
|
146
|
-
directories and readiness paths. A recipe whose declared project marker does
|
|
147
|
-
not exist remains unconfigured until a later inspection. The catalog's
|
|
148
|
-
`jskit` piece waits for `package.json` and then declares `npm install`; generic
|
|
149
|
-
`nodejs` and `php` deliberately declare no installer. One project section in
|
|
150
|
-
`genesis/stack.md` replaces all component defaults, including with
|
|
151
|
-
`- Nothing.`. Without that override, exactly one component recipe is used;
|
|
152
|
-
multiple component recipes are reported as ambiguous and never merged.
|
|
153
|
-
The standalone command does not provision declared resources: callers provide
|
|
154
|
-
their own database, credentials, compilers, and other infrastructure. Stack
|
|
155
|
-
resources such as database variables do not gate dependency installation.
|
|
156
|
-
|
|
157
139
|
Hosts that manage project environments can call `inspectEnvironment()`.
|
|
158
140
|
Concrete Stack integrations may declare public, non-secret Environment
|
|
159
141
|
defaults such as the database driver selected by that integration. Explicit
|
|
@@ -173,52 +155,30 @@ value-free missing-input diagnostics, and paths. It never returns supplied
|
|
|
173
155
|
environment values, writes files, stores secrets, or decides which resolved
|
|
174
156
|
host values should be materialized.
|
|
175
157
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
[`docs/stack-components.md`](docs/stack-components.md) for the v1 contract.
|
|
190
|
-
|
|
191
|
-
Hosts that publish applications can call the separate public
|
|
192
|
-
`inspectDeployment()` API. An optional readable `## Deployment` section
|
|
193
|
-
declares an ordered production recipe: project-relative workdir, abstract
|
|
194
|
-
runtimes, exact Prepare/Build/Migrate/Serve argv, and one HTTP readiness
|
|
195
|
-
predicate. A concrete component may provide the recipe; the catalog's `jskit`
|
|
196
|
-
piece declares production dependency installation, build, database preparation,
|
|
197
|
-
`npm start`, and `/api/health`. Generic language pieces do not guess. A project
|
|
198
|
-
section replaces component defaults wholesale, and `- Nothing.` explicitly
|
|
199
|
-
disables publishing.
|
|
200
|
-
|
|
201
|
-
Genesis only validates and reports this recipe and the Stack's abstract resource
|
|
202
|
-
requirements. It does not provision a database, resolve credentials, copy a
|
|
203
|
-
release, run commands, start a service, reserve a port, route traffic, issue TLS,
|
|
204
|
-
or roll back. A deployment host owns all of those operational responsibilities,
|
|
205
|
-
including the mapping from `mysql` or `postgresql` resources to its managed
|
|
206
|
-
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.
|
|
207
171
|
|
|
208
172
|
Standalone and non-Node hosts can inspect these same normalized contracts
|
|
209
173
|
without importing the JavaScript API or parsing Markdown:
|
|
210
174
|
|
|
211
175
|
```bash
|
|
212
|
-
genesis inspect workspace --json
|
|
213
176
|
genesis inspect environment --json
|
|
214
|
-
genesis inspect
|
|
215
|
-
genesis inspect deployment --json
|
|
177
|
+
genesis inspect section 'Consumer operation' --json
|
|
216
178
|
```
|
|
217
179
|
|
|
218
180
|
Without `--json`, the commands print concise human-readable summaries. They
|
|
219
|
-
never
|
|
220
|
-
deploy. `genesis prepare` is the separate explicit command that executes only
|
|
221
|
-
the finite Workspace setup recipe.
|
|
181
|
+
never interpret or execute a consumer-owned section.
|
|
222
182
|
|
|
223
183
|
At session start, Codex receives only a short explanation of how Genesis is
|
|
224
184
|
organized. After it locates the source involved in a request, it can load the
|
|
@@ -413,10 +373,8 @@ Run the Stack's declared checks explicitly:
|
|
|
413
373
|
genesis verify
|
|
414
374
|
```
|
|
415
375
|
|
|
416
|
-
Genesis
|
|
417
|
-
|
|
418
|
-
exists, Genesis applies public Stack defaults beneath explicit environment
|
|
419
|
-
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
|
|
420
378
|
command without a shell. A complete successful run writes only
|
|
421
379
|
`.genesis/verification.json`, recording:
|
|
422
380
|
|
|
@@ -433,7 +391,7 @@ whole-product correctness.
|
|
|
433
391
|
A project can replace component defaults in `genesis/stack.md`:
|
|
434
392
|
|
|
435
393
|
```markdown
|
|
436
|
-
##
|
|
394
|
+
## Verification
|
|
437
395
|
|
|
438
396
|
- Verify `tests`: `npm` `test`
|
|
439
397
|
- Verify `build`: `npm` `run` `build`
|
|
@@ -450,8 +408,8 @@ genesis check
|
|
|
450
408
|
- Blueprint and Stack validity;
|
|
451
409
|
- selected Agent Skill presence and structural validity;
|
|
452
410
|
- Program presence and structural validity;
|
|
453
|
-
-
|
|
454
|
-
or honestly `unconfigured`;
|
|
411
|
+
- environment declarations and consumer-owned Stack extensions as `ready`,
|
|
412
|
+
`blocked`, or honestly `unconfigured`;
|
|
455
413
|
- missing Stack-declared environment inputs (without claiming the service is
|
|
456
414
|
reachable);
|
|
457
415
|
- verification evidence as `current`, `stale`, `missing`, `invalid`, or
|
|
@@ -476,10 +434,8 @@ import {
|
|
|
476
434
|
getContext,
|
|
477
435
|
indexCodebase,
|
|
478
436
|
initialize,
|
|
479
|
-
inspectDeployment,
|
|
480
437
|
inspectEnvironment,
|
|
481
|
-
|
|
482
|
-
inspectWorkspaceSetup,
|
|
438
|
+
inspectStackSection,
|
|
483
439
|
installCodex,
|
|
484
440
|
listStackPieces,
|
|
485
441
|
verify,
|
|
@@ -494,25 +450,16 @@ codebase. `installCodex()` installs the optional global discovery plugin.
|
|
|
494
450
|
the functions already declared there, selected Stack guidance, available Agent
|
|
495
451
|
Skills, and verification commands. `indexCodebase()` regenerates or returns the
|
|
496
452
|
detailed Machine City and simple Program City projections.
|
|
497
|
-
`inspectWorkspaceSetup()` returns one normalized, shell-free workspace
|
|
498
|
-
preparation recipe—or an explicit unconfigured or ambiguous result—for a host
|
|
499
|
-
to execute with its own pinned runtimes, caches, process isolation, and
|
|
500
|
-
credentials. A configured recipe may remain unconfigured while it waits for a
|
|
501
|
-
technology-declared project marker.
|
|
502
453
|
`inspectEnvironment()` returns normalized Stack resource declarations,
|
|
503
454
|
public non-secret defaults, value-free missing-input diagnostics, and dotenv
|
|
504
455
|
projection paths without returning any supplied environment value.
|
|
505
|
-
`
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
`contract` field: `genesis.workspace-setup.v1`, `genesis.environment.v1`,
|
|
513
|
-
`genesis.launch.v1`, `genesis.deployment.v2`, or
|
|
514
|
-
`genesis.verification.v1`. Hosts validate that identity instead of
|
|
515
|
-
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.
|
|
516
463
|
|
|
517
464
|
A host such as Vibe64 can send the generated prompt to its existing agent:
|
|
518
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
|