genesis-compiler 1.2.3 → 1.2.4
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 +46 -16
- package/docs/assurance-model.md +1 -1
- package/docs/preview-identity-command.md +113 -0
- package/docs/prompt-integration.md +22 -14
- package/docs/stack-components.md +68 -22
- package/package.json +3 -1
- package/plugins/genesis/.codex-plugin/plugin.json +1 -1
- package/prompts/adopt.txt +62 -0
- package/prompts/start.txt +17 -4
- package/prompts/work.txt +1 -1
- package/skills/genesis-project/SKILL.md +9 -1
- package/src/cli.js +53 -3
- package/src/index/assets.js +1 -0
- package/src/index/codex-hooks.js +3 -2
- package/src/index/prompt.js +58 -1
- package/src/index/stack-catalog.js +1 -0
- package/src/index/stack-environment-defaults.js +2 -0
- package/src/index/stack-launch.js +5 -6
- package/src/index/stack-piece.js +28 -11
- package/src/index/stack.js +39 -2
- package/src/index.js +2 -2
- package/stacks/pieces/cpp.md +12 -0
- package/stacks/pieces/jskit-mysql.md +10 -0
- package/stacks/pieces/jskit-postgresql.md +10 -0
- package/stacks/pieces/jskit.md +23 -0
- package/stacks/pieces/mysql.md +11 -0
- package/stacks/pieces/nodejs.md +11 -0
- package/stacks/pieces/postgresql.md +12 -0
- package/stacks/pieces/vue.md +9 -0
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ interaction.
|
|
|
14
14
|
genesis/
|
|
15
15
|
blueprint.md non-technical product intent
|
|
16
16
|
stack.md selected technology guidance, checks, setup, launch, and deployment data
|
|
17
|
-
stack/ optional per-component Description, Guidance, and Deslop customization
|
|
17
|
+
stack/ optional per-component Description, Guidance, Adoption, and Deslop customization
|
|
18
18
|
program/ concise explanations grouped into conceptual subsystems
|
|
19
19
|
.agents/skills/
|
|
20
20
|
genesis-* Genesis workflow skills
|
|
@@ -60,11 +60,13 @@ genesis adopt "Optional product guidance"
|
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
It preserves the implementation, initializes the Genesis files and local
|
|
63
|
-
hooks, and prints the `
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
hooks, and prints the `adopt` prompt. That prompt imports the existing
|
|
64
|
+
application's factual Stack contract—including setup, environment/resources,
|
|
65
|
+
database preparation and seed, Launch/readiness, Preview identity,
|
|
66
|
+
verification, and deployment—then creates the first useful Blueprint and
|
|
67
|
+
Program. Give it to the agent already working in the repository. Adoption edits
|
|
68
|
+
Genesis metadata only; implementation modernization remains a separate,
|
|
69
|
+
explicitly approved port. “Adopt” never moves the project.
|
|
68
70
|
|
|
69
71
|
For a new or empty project, initialize first and write the product intent:
|
|
70
72
|
|
|
@@ -83,10 +85,12 @@ genesis codex install
|
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
When Codex opens a nonempty Git project without `genesis/blueprint.md`, the
|
|
86
|
-
plugin's `SessionStart` hook runs before the first user prompt and
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
88
|
+
plugin's `SessionStart` hook runs before the first user prompt and asks the
|
|
89
|
+
assistant to recommend preparing the existing project for guided editing in
|
|
90
|
+
product language. Codex cannot display an ordinary assistant reply until the
|
|
91
|
+
user speaks, so the recommendation appears in its first reply. If approved, the
|
|
92
|
+
assistant runs `genesis adopt`; the person need not know Genesis terminology or
|
|
93
|
+
type a command. It never runs adoption without approval and does nothing in an
|
|
90
94
|
empty or already-adopted project.
|
|
91
95
|
|
|
92
96
|
`genesis init` creates an empty Blueprint, an empty optional Stack, three
|
|
@@ -143,6 +147,10 @@ host or user values take precedence. The built-in JSKIT MySQL and PostgreSQL
|
|
|
143
147
|
pieces respectively declare `DB_CLIENT=mysql2` and `DB_CLIENT=pg`, so users
|
|
144
148
|
provide connection values rather than restating a deterministic technology
|
|
145
149
|
choice.
|
|
150
|
+
A project may instead declare complete `## Resources` and
|
|
151
|
+
`## Environment defaults` sections in `genesis/stack.md`; their presence
|
|
152
|
+
replaces component declarations so an imported C++, PHP, Python, or older
|
|
153
|
+
application keeps its own real names and public constants.
|
|
146
154
|
An optional readable `## Environment files` section declares safe
|
|
147
155
|
project-relative dotenv projections such as `.env`. A project declaration
|
|
148
156
|
replaces component defaults, including with `- Nothing.`; otherwise component
|
|
@@ -182,6 +190,20 @@ or roll back. A deployment host owns all of those operational responsibilities,
|
|
|
182
190
|
including the mapping from `mysql` or `postgresql` resources to its managed
|
|
183
191
|
services.
|
|
184
192
|
|
|
193
|
+
Standalone and non-Node hosts can inspect these same normalized contracts
|
|
194
|
+
without importing the JavaScript API or parsing Markdown:
|
|
195
|
+
|
|
196
|
+
```bash
|
|
197
|
+
genesis inspect workspace --json
|
|
198
|
+
genesis inspect environment --json
|
|
199
|
+
genesis inspect launch --json
|
|
200
|
+
genesis inspect deployment --json
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Without `--json`, the commands print concise human-readable summaries. They
|
|
204
|
+
never execute setup, start a process, probe a server, materialize environment
|
|
205
|
+
files, or deploy.
|
|
206
|
+
|
|
185
207
|
At session start, Codex receives only a short explanation of how Genesis is
|
|
186
208
|
organized. After it locates the source involved in a request, it can load the
|
|
187
209
|
specific explanatory and technology context with:
|
|
@@ -290,6 +312,7 @@ genesis prompt "Add filtering by note title"
|
|
|
290
312
|
```bash
|
|
291
313
|
genesis prompt # implementation work
|
|
292
314
|
genesis prompt --task start # open a new or existing project conversation
|
|
315
|
+
genesis prompt --task adopt # import an existing project's complete contract
|
|
293
316
|
genesis prompt "Add filtering by note title"
|
|
294
317
|
genesis prompt --task deslop # explicit cleanup
|
|
295
318
|
genesis prompt --task deslop "Only review billing"
|
|
@@ -299,12 +322,15 @@ genesis prompt --task describe # create/refresh Blueprint a
|
|
|
299
322
|
genesis prompt --task review # compare intent, code, and explanation
|
|
300
323
|
```
|
|
301
324
|
|
|
302
|
-
The
|
|
325
|
+
The eight task types are deliberately explicit:
|
|
303
326
|
|
|
304
327
|
- `start` opens the project conversation. For a new project it asks what the
|
|
305
328
|
app is about, presents relevant choices from the live Stack catalog, and
|
|
306
329
|
waits for the person to select technology. For an existing project it asks
|
|
307
330
|
what the person wants to understand or change.
|
|
331
|
+
- `adopt` imports an existing application's factual operational and product
|
|
332
|
+
contracts into Genesis metadata. It composes technology-specific Adoption
|
|
333
|
+
requirements from the selected Stack and does not change application code.
|
|
308
334
|
- `work` implements the Blueprint and optional request using current code,
|
|
309
335
|
Program, selected Stack context, and progressively loaded Agent Skills.
|
|
310
336
|
- `deslop` requests cleanup explicitly. Codex projects also receive a bounded
|
|
@@ -341,6 +367,7 @@ eleven common language families listed above, plus Vue, MySQL, PostgreSQL,
|
|
|
341
367
|
JSKIT, and JSKIT database integrations. Components may contribute:
|
|
342
368
|
|
|
343
369
|
- a concise description and supplemental Guidance used across relevant tasks;
|
|
370
|
+
- existing-project Adoption requirements used only while importing a codebase;
|
|
344
371
|
- one authoritative Agent Skill directory when the component owns one;
|
|
345
372
|
- generic external-resource requirements;
|
|
346
373
|
- cleanup advice used by explicit and automatic Deslop prompts;
|
|
@@ -349,9 +376,9 @@ JSKIT, and JSKIT database integrations. Components may contribute:
|
|
|
349
376
|
|
|
350
377
|
Technology-specific supplemental rules intentionally remain in Stack pieces.
|
|
351
378
|
General `Guidance` enriches implementation, review, Program, description, and
|
|
352
|
-
cleanup tasks; `
|
|
353
|
-
|
|
354
|
-
Genesis needs.
|
|
379
|
+
cleanup tasks; `Adoption` adds import-only requirements; `Deslop` adds
|
|
380
|
+
cleanup-only rules. None shadows an official generic technology skill or
|
|
381
|
+
assumes that an upstream skill contains every rule Genesis needs.
|
|
355
382
|
|
|
356
383
|
Genesis core contains no database, framework, language, or platform-specific
|
|
357
384
|
controller behavior. See [Stack components](docs/stack-components.md).
|
|
@@ -376,7 +403,7 @@ command without a shell. A complete successful run writes only
|
|
|
376
403
|
- the commands that passed.
|
|
377
404
|
|
|
378
405
|
The evidence becomes stale when code, selected components, declared resources,
|
|
379
|
-
or verification commands change. Description, Guidance, Agent Skill, and Deslop
|
|
406
|
+
or verification commands change. Description, Guidance, Adoption, Agent Skill, and Deslop
|
|
380
407
|
prose do not rewrite what an already-run command proved. A failed verification
|
|
381
408
|
removes prior passing evidence before running. Verification does not claim
|
|
382
409
|
whole-product correctness.
|
|
@@ -425,6 +452,7 @@ import {
|
|
|
425
452
|
getContext,
|
|
426
453
|
indexCodebase,
|
|
427
454
|
initialize,
|
|
455
|
+
inspectDeployment,
|
|
428
456
|
inspectEnvironment,
|
|
429
457
|
inspectLaunch,
|
|
430
458
|
inspectWorkspaceSetup,
|
|
@@ -436,7 +464,7 @@ import {
|
|
|
436
464
|
|
|
437
465
|
`initialize()` installs the project files, Genesis workflow skills, selected
|
|
438
466
|
Stack skills, and local Codex hooks.
|
|
439
|
-
`adoptProject()` also returns the initial `
|
|
467
|
+
`adoptProject()` also returns the initial `adopt` prompt for an existing
|
|
440
468
|
codebase. `installCodex()` installs the optional global discovery plugin.
|
|
441
469
|
`getContext()` resolves source paths to the Program modules that cite them,
|
|
442
470
|
the functions already declared there, selected Stack guidance, available Agent
|
|
@@ -453,6 +481,8 @@ projection paths without returning any supplied environment value.
|
|
|
453
481
|
`inspectLaunch()` returns a validated, normalized Stack launch declaration for
|
|
454
482
|
a host to execute with its own runtime, port, process, readiness probe, preview
|
|
455
483
|
identity, secret, and browser policy.
|
|
484
|
+
`inspectDeployment()` returns the separate normalized production recipe without
|
|
485
|
+
executing or provisioning it.
|
|
456
486
|
|
|
457
487
|
A host such as Vibe64 can send the generated prompt to its existing agent:
|
|
458
488
|
|
package/docs/assurance-model.md
CHANGED
|
@@ -17,7 +17,7 @@ Genesis reports only facts it can establish mechanically:
|
|
|
17
17
|
City projects the Program modules and source citations that exist. Neither
|
|
18
18
|
proves semantic equivalence, complete dynamic dispatch, or true duplication.
|
|
19
19
|
|
|
20
|
-
Prompt text, Stack Description/Guidance/Deslop prose, Program prose, Agent Skill
|
|
20
|
+
Prompt text, Stack Description/Guidance/Adoption/Deslop prose, Program prose, Agent Skill
|
|
21
21
|
content, and agent output are not assurance evidence. Genesis does not claim
|
|
22
22
|
that product intent and code have converged, that Program is complete or
|
|
23
23
|
semantically current, or that passing checks prove the whole product correct.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# Preview identity command protocol
|
|
2
|
+
|
|
3
|
+
`genesis.preview-identity.command.v1` lets an application expose its ordinary
|
|
4
|
+
development sign-in and sign-out behavior to any preview host. It is language-
|
|
5
|
+
and framework-neutral: `tools/preview-identity` may be a native C/C++ binary, a
|
|
6
|
+
script, or another committed executable supported by the target's declared
|
|
7
|
+
runtimes.
|
|
8
|
+
|
|
9
|
+
Genesis only validates and reports the declaration. The preview host resolves
|
|
10
|
+
the command beneath the project root, rejects traversal and symlinks, supplies
|
|
11
|
+
the declared runtime and environment policy, enforces the declared timeout,
|
|
12
|
+
and controls the browser. The application owns user lookup and its normal
|
|
13
|
+
session cookies.
|
|
14
|
+
|
|
15
|
+
## Invocation
|
|
16
|
+
|
|
17
|
+
The host runs the exact declared argv with the project root as the working
|
|
18
|
+
directory. Standard input contains exactly one UTF-8 JSON object followed by a
|
|
19
|
+
newline and EOF. Standard output contains exactly one JSON object; diagnostic
|
|
20
|
+
logs belong on standard error. There is no streaming or multi-message framing.
|
|
21
|
+
|
|
22
|
+
The host supplies a fresh opaque `requestId`. A sign-in request is:
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"protocol": "genesis.preview-identity.command.v1",
|
|
27
|
+
"requestId": "opaque-request-id",
|
|
28
|
+
"operation": "login-as",
|
|
29
|
+
"subject": {
|
|
30
|
+
"kind": "selector",
|
|
31
|
+
"selector": {
|
|
32
|
+
"type": "email",
|
|
33
|
+
"value": "person@example.com"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"target": {
|
|
37
|
+
"href": "http://127.0.0.1:4100/home",
|
|
38
|
+
"origin": "http://127.0.0.1:4100"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
`subject.selector.type` must be one of the identity types advertised by the
|
|
44
|
+
Launch declaration: `email`, `login`, or `user-id`. The application treats the
|
|
45
|
+
selector as an existing application identity; a preview host does not create
|
|
46
|
+
users, memberships, roles, or seed data.
|
|
47
|
+
|
|
48
|
+
Sign-out uses the same envelope with `operation` set to `logout` and omits
|
|
49
|
+
`subject`.
|
|
50
|
+
|
|
51
|
+
## Responses
|
|
52
|
+
|
|
53
|
+
Every protocol response repeats the exact `protocol` and `requestId` and exits
|
|
54
|
+
with status zero. A successful sign-in response is:
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"protocol": "genesis.preview-identity.command.v1",
|
|
59
|
+
"requestId": "opaque-request-id",
|
|
60
|
+
"ok": true,
|
|
61
|
+
"signedOut": false,
|
|
62
|
+
"identity": {
|
|
63
|
+
"displayName": "Person",
|
|
64
|
+
"email": "person@example.com",
|
|
65
|
+
"userId": "42"
|
|
66
|
+
},
|
|
67
|
+
"setCookie": [
|
|
68
|
+
"app_session=opaque; Path=/; HttpOnly; SameSite=Lax"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`identity` contains at least one non-empty application identifier. Supported
|
|
74
|
+
descriptive fields are `displayName`, `email`, `login`, `userId`, and
|
|
75
|
+
`username`. `setCookie` contains the application's ordinary Set-Cookie header
|
|
76
|
+
values. Cookies must contain no CR/LF or `Domain` attribute; the host may reject
|
|
77
|
+
additional cookie names reserved by its own preview transport.
|
|
78
|
+
|
|
79
|
+
A successful logout sets `signedOut` to true, omits `identity`, and returns the
|
|
80
|
+
cookie expirations needed to clear the application's session. A structured
|
|
81
|
+
application rejection still exits zero and uses:
|
|
82
|
+
|
|
83
|
+
```json
|
|
84
|
+
{
|
|
85
|
+
"protocol": "genesis.preview-identity.command.v1",
|
|
86
|
+
"requestId": "opaque-request-id",
|
|
87
|
+
"ok": false,
|
|
88
|
+
"code": "user_not_found",
|
|
89
|
+
"error": "User not found.",
|
|
90
|
+
"statusCode": 404,
|
|
91
|
+
"signedOut": true,
|
|
92
|
+
"setCookie": []
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`statusCode` is an integer from 400 through 599. A malformed request, command
|
|
97
|
+
crash, timeout, nonzero exit, invalid JSON, mismatched request ID, oversized
|
|
98
|
+
output, or invalid cookie is a command/transport failure rather than an
|
|
99
|
+
application rejection. Hosts should bound output to 512 KiB, at most 64
|
|
100
|
+
cookies, and at most 16 KiB per cookie.
|
|
101
|
+
|
|
102
|
+
## Environment and safety
|
|
103
|
+
|
|
104
|
+
The optional Enabled and Secret environment entries in the Launch declaration
|
|
105
|
+
are application-owned variable names, never values. A host that offers identity
|
|
106
|
+
switching supplies `true` through the enabled name and a fresh launch-scoped
|
|
107
|
+
secret through the secret name. The helper and any private application endpoint
|
|
108
|
+
it calls must remain disabled unless those values are present and valid.
|
|
109
|
+
|
|
110
|
+
The command is a development-preview control, not a production sign-in API.
|
|
111
|
+
Genesis does not store selectors, generate credentials, materialize environment
|
|
112
|
+
files, execute the helper, or decide which identities a host is allowed to
|
|
113
|
+
offer.
|
|
@@ -15,7 +15,7 @@ const work = await generatePrompt({
|
|
|
15
15
|
await currentAgent.send(work.prompt);
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
Tasks are `start`, `work`, `deslop`, `program`, `blueprint`, `describe`, and `review`.
|
|
18
|
+
Tasks are `start`, `adopt`, `work`, `deslop`, `program`, `blueprint`, `describe`, and `review`.
|
|
19
19
|
`start` is the host-independent first conversation: it classifies an initialized
|
|
20
20
|
project from current Genesis facts, asks what a new app is about, exposes the
|
|
21
21
|
live Stack catalog for an explicit user choice, or asks what the person wants
|
|
@@ -33,10 +33,10 @@ Genesis keeps each instruction at one useful level:
|
|
|
33
33
|
- `skills/genesis-project/`, `skills/genesis-program/`, and
|
|
34
34
|
`skills/genesis-deslop/` are the reusable workflow sources copied into each
|
|
35
35
|
project's `.agents/skills/` directory.
|
|
36
|
-
- `prompts/<task>.txt` is a
|
|
36
|
+
- `prompts/<task>.txt` is a task launcher. It selects the relevant
|
|
37
37
|
workflow skill and states only that turn's edit boundary.
|
|
38
38
|
- `stacks/pieces/<component>.md` supplies concise Description, supplemental
|
|
39
|
-
Guidance, Resources, Deslop overlays, structural Indexers, verification
|
|
39
|
+
Guidance, Adoption requirements, Resources, Deslop overlays, structural Indexers, verification
|
|
40
40
|
Commands, 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.
|
|
@@ -51,19 +51,26 @@ colliding generic skill.
|
|
|
51
51
|
|
|
52
52
|
`genesis adopt [product guidance...]` is the explicit starting point for a
|
|
53
53
|
nonempty project. It preserves source, calls the same idempotent initialization
|
|
54
|
-
used by `genesis init`, and prints
|
|
55
|
-
follow.
|
|
56
|
-
|
|
57
|
-
|
|
54
|
+
used by `genesis init`, and prints an `adopt` prompt for the current agent to
|
|
55
|
+
follow. Adoption first records observed Stack components, regenerates itself so
|
|
56
|
+
their technology-specific `## Adoption` requirements are present, translates
|
|
57
|
+
the application's real operational contracts into project Stack sections, and
|
|
58
|
+
then creates one Blueprint and subsystem-oriented Program.
|
|
59
|
+
|
|
60
|
+
Adoption does not upgrade an application's technology foundation. Component
|
|
61
|
+
defaults apply only when direct source evidence matches. Older or otherwise
|
|
62
|
+
different applications receive complete project-owned declarations for setup,
|
|
63
|
+
environment/resources, Launch and Preview identity, verification, and
|
|
64
|
+
deployment as applicable, so a host never executes a newly selected
|
|
65
|
+
component's current command against source that does not provide it.
|
|
58
66
|
|
|
59
67
|
Codex users can run `genesis codex install` once to install the packaged
|
|
60
68
|
Genesis discovery plugin. Its `SessionStart` hook executes before the first
|
|
61
69
|
user prompt. In a nonempty Git repository without `genesis/blueprint.md`, it
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
directly.
|
|
70
|
+
asks the assistant to recommend project preparation in product language. It
|
|
71
|
+
does not perform adoption automatically. If the user accepts, Codex runs the
|
|
72
|
+
command itself and follows its returned prompt in the same conversation. Other
|
|
73
|
+
hosts can call `adoptProject()` and send its `prompt` directly.
|
|
67
74
|
|
|
68
75
|
Codex can instead use the project-local hooks installed by `genesis init`.
|
|
69
76
|
Those hooks inject a short operating guide, record whether the current turn
|
|
@@ -92,7 +99,8 @@ This follows Agent Skills progressive disclosure and keeps official or
|
|
|
92
99
|
user-installed generic technology skills independent.
|
|
93
100
|
|
|
94
101
|
Matching files under `genesis/stack/<component>.md` may add to or override that
|
|
95
|
-
selected component's Description, Guidance, and Deslop fields. Effective
|
|
102
|
+
selected component's Description, Guidance, Adoption, and Deslop fields. Effective
|
|
96
103
|
Guidance is used by work, review, Program, describe, Deslop, and path-context
|
|
97
104
|
generation. The Codex continuation flow also carries it into reconciliation and
|
|
98
|
-
cleanup; effective Deslop guidance remains cleanup-only.
|
|
105
|
+
cleanup; effective Deslop guidance remains cleanup-only. Effective Adoption
|
|
106
|
+
guidance is included only in the adoption workflow.
|
package/docs/stack-components.md
CHANGED
|
@@ -59,6 +59,11 @@ What this component contributes.
|
|
|
59
59
|
- Concise supplemental guidance used during implementation, explanation,
|
|
60
60
|
review, and cleanup.
|
|
61
61
|
|
|
62
|
+
## Adoption
|
|
63
|
+
|
|
64
|
+
- Evidence and technology-specific contracts an agent must reconcile when
|
|
65
|
+
importing an existing application.
|
|
66
|
+
|
|
62
67
|
## Environment files
|
|
63
68
|
|
|
64
69
|
- Dotenv `.env`
|
|
@@ -91,8 +96,8 @@ What this component contributes.
|
|
|
91
96
|
|
|
92
97
|
#### Preview identity
|
|
93
98
|
|
|
94
|
-
- Command:
|
|
95
|
-
- Protocol: `
|
|
99
|
+
- Command: `tools/preview-identity`
|
|
100
|
+
- Protocol: `genesis.preview-identity.command.v1`
|
|
96
101
|
- Identity types: `email` `login` `user-id`
|
|
97
102
|
- Enabled environment: `APP_PREVIEW_IDENTITY_ENABLED`
|
|
98
103
|
- Secret environment: `APP_PREVIEW_IDENTITY_SECRET`
|
|
@@ -112,12 +117,21 @@ before verification. `allowEmpty` may name a required variable whose empty
|
|
|
112
117
|
string is valid. `Environment defaults` declares public non-secret constants
|
|
113
118
|
owned by a concrete integration; explicit host values take precedence.
|
|
114
119
|
`Guidance` is supplemental prose used by work, review, Program,
|
|
115
|
-
description, and cleanup prompts, as well as path-focused context. `
|
|
120
|
+
description, and cleanup prompts, as well as path-focused context. `Adoption`
|
|
121
|
+
adds technology-specific evidence and contract requirements to the dedicated
|
|
122
|
+
existing-application import prompt. `Deslop`
|
|
116
123
|
adds cleanup-only prose to explicit cleanup and the automatic Codex cleanup
|
|
117
124
|
continuation. With no selected component, only the `genesis-deslop` skill
|
|
118
125
|
applies. `Commands` accepts only argument-safe `Verify` entries and runs only
|
|
119
126
|
through `genesis verify`.
|
|
120
127
|
|
|
128
|
+
A project may own a complete `## Resources` section in `genesis/stack.md` using
|
|
129
|
+
the same fenced `json genesis-resource` objects, or `- Nothing.` to declare
|
|
130
|
+
none. Its presence replaces every selected component Resource declaration.
|
|
131
|
+
This lets an existing application preserve its real queue, database, mail,
|
|
132
|
+
object-storage, or service environment names rather than inherit a framework's
|
|
133
|
+
vocabulary. Without a project section, component Resources compose as before.
|
|
134
|
+
|
|
121
135
|
`Workspace setup` is an optional exact, ordered recipe for a host preparing a
|
|
122
136
|
fresh workspace. Each entry uses this readable, shell-free form:
|
|
123
137
|
|
|
@@ -160,6 +174,13 @@ their deterministic `DB_CLIENT` driver ids; generic database pieces do not.
|
|
|
160
174
|
Secrets and deployment-specific connection values remain host inputs and must
|
|
161
175
|
never be declared as defaults.
|
|
162
176
|
|
|
177
|
+
A project `## Environment defaults` section in `genesis/stack.md` likewise
|
|
178
|
+
replaces every component default and accepts `- Nothing.` as a complete empty
|
|
179
|
+
declaration. It is the complete declaration of public, non-secret constants
|
|
180
|
+
expected by the actual application; Genesis never keeps a framework default
|
|
181
|
+
beside it implicitly. `genesis stack add` preserves both project-owned sections
|
|
182
|
+
while changing component selection.
|
|
183
|
+
|
|
163
184
|
`Environment files` optionally declares project-relative dotenv projections a
|
|
164
185
|
host may materialize from its own resolved project environment. Genesis
|
|
165
186
|
validates and returns only the format and path; it never reads environment
|
|
@@ -188,8 +209,8 @@ reserve a port, start a process, probe readiness, or control a browser. The host
|
|
|
188
209
|
executes the declared predicate and owns its timeout and retry policy.
|
|
189
210
|
|
|
190
211
|
The optional `#### Preview identity` block is specific to hosts that implement
|
|
191
|
-
the declared `
|
|
192
|
-
committed, application-owned file
|
|
212
|
+
the declared `genesis.preview-identity.command.v1` protocol. Its executable is
|
|
213
|
+
a committed, application-owned project-relative file; the
|
|
193
214
|
normalized command is an argv array, not a shell program. Identity types may
|
|
194
215
|
contain `email`, `login`, and `user-id`. Enabled environment and Secret
|
|
195
216
|
environment are optional variable
|
|
@@ -198,7 +219,9 @@ never reads or returns their values. Runtimes lists opaque runtimes required
|
|
|
198
219
|
to execute this command, independently of the server target requirements, and
|
|
199
220
|
Timeout ms defaults to 10000 with a maximum of 30000. Genesis does not execute
|
|
200
221
|
the command, select identities, provide secrets, authenticate users, or control
|
|
201
|
-
the browser. Those remain host responsibilities.
|
|
222
|
+
the browser. Those remain host responsibilities. The complete transport
|
|
223
|
+
contract is defined in
|
|
224
|
+
[`preview-identity-command.md`](preview-identity-command.md).
|
|
202
225
|
|
|
203
226
|
`runtimeRequirements` contains opaque technology ids. A host explicitly maps
|
|
204
227
|
the ids it supports to its own pinned runtime packs; for example, it may map
|
|
@@ -273,7 +296,8 @@ Do not create a Genesis-owned generic skill merely because a component is
|
|
|
273
296
|
named `nodejs`, `php`, or another common technology. Official, user, and host
|
|
274
297
|
skills with those names must coexist normally. Use `## Skill` only for an
|
|
275
298
|
authoritative directory this Stack component selects; put concise supplemental
|
|
276
|
-
rules in `## Guidance
|
|
299
|
+
rules in `## Guidance`, existing-project import requirements in `## Adoption`,
|
|
300
|
+
and cleanup-only additions in `## Deslop`.
|
|
277
301
|
|
|
278
302
|
A selected component may have one project customization at
|
|
279
303
|
`genesis/stack/<id>.md`:
|
|
@@ -291,6 +315,10 @@ Additional project context.
|
|
|
291
315
|
|
|
292
316
|
- Additional implementation, explanation, review, and cleanup guidance.
|
|
293
317
|
|
|
318
|
+
### Adoption
|
|
319
|
+
|
|
320
|
+
- Additional existing-project import requirements.
|
|
321
|
+
|
|
294
322
|
### Deslop
|
|
295
323
|
|
|
296
324
|
- Additional cleanup guidance.
|
|
@@ -305,30 +333,35 @@ Replacement component description.
|
|
|
305
333
|
|
|
306
334
|
- Replacement installed general guidance.
|
|
307
335
|
|
|
336
|
+
### Adoption
|
|
337
|
+
|
|
338
|
+
- Replacement existing-project import requirements.
|
|
339
|
+
|
|
308
340
|
### Deslop
|
|
309
341
|
|
|
310
342
|
- Replacement cleanup guidance.
|
|
311
343
|
```
|
|
312
344
|
|
|
313
345
|
Each field is optional. `Override` replaces only that installed field; `Add`
|
|
314
|
-
then follows the installed or overridden value. These files
|
|
315
|
-
dependencies, conflicts, Agent Skill source, indexers, resources,
|
|
316
|
-
defaults, environment files, commands, Workspace setup, or Launch declarations.
|
|
346
|
+
then follows the installed or overridden value. These customization files
|
|
347
|
+
cannot alter dependencies, conflicts, Agent Skill source, indexers, resources,
|
|
348
|
+
environment defaults, environment files, commands, Workspace setup, or Launch declarations.
|
|
317
349
|
`genesis stack add` preserves the files and composes their effective prose after
|
|
318
350
|
dependency resolution.
|
|
319
351
|
|
|
320
|
-
A project may select component ids in `genesis/stack.md
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
`##
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
database, or integration is therefore an
|
|
329
|
-
rather than a prompt or controller special
|
|
330
|
-
|
|
331
|
-
|
|
352
|
+
A project may select component ids in `genesis/stack.md`; replace component
|
|
353
|
+
Resources and Environment defaults with complete application-owned contracts;
|
|
354
|
+
replace component environment-file declarations; replace component Workspace
|
|
355
|
+
setup defaults with one project recipe; replace component Verify defaults with
|
|
356
|
+
its own `## Commands`; and replace every component Launch target with one
|
|
357
|
+
project `## Launch` contract. With no corresponding project section, selected
|
|
358
|
+
component declarations compose; conflicts are rejected rather than guessed.
|
|
359
|
+
`genesis stack add` preserves every existing project-owned contract section.
|
|
360
|
+
Adding another language, framework, database, or integration is therefore an
|
|
361
|
+
isolated Stack/indexer contribution rather than a prompt or controller special
|
|
362
|
+
case.
|
|
363
|
+
|
|
364
|
+
Description, Guidance, Adoption, Agent Skill, and Deslop prose are instructions, not
|
|
332
365
|
verification evidence. Changes to them do not stale an exact successful
|
|
333
366
|
verification record; selected component ids, resources, environment files,
|
|
334
367
|
environment defaults, Workspace setup, launch targets, and verification
|
|
@@ -348,6 +381,19 @@ declared `resources`, value-free `diagnostics`, and normalized `files`. Each def
|
|
|
348
381
|
`name`, `value`, and component `sources`; each file contains `format`, `path`,
|
|
349
382
|
and `source`. Supplied environment values never cross this API boundary.
|
|
350
383
|
|
|
384
|
+
Shell and non-Node hosts can inspect the same normalized contracts without
|
|
385
|
+
importing the JavaScript API or parsing Markdown:
|
|
386
|
+
|
|
387
|
+
```bash
|
|
388
|
+
genesis inspect environment --json
|
|
389
|
+
genesis inspect workspace --json
|
|
390
|
+
genesis inspect launch --json
|
|
391
|
+
genesis inspect deployment --json
|
|
392
|
+
```
|
|
393
|
+
|
|
394
|
+
These are projections of the same public inspectors. They do not create a
|
|
395
|
+
second parser or take ownership of execution.
|
|
396
|
+
|
|
351
397
|
Fresh-workspace hosts read setup from the package root:
|
|
352
398
|
|
|
353
399
|
```js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesis-compiler",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.4",
|
|
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,9 +25,11 @@
|
|
|
25
25
|
".agents/plugins/marketplace.json",
|
|
26
26
|
"bin",
|
|
27
27
|
"docs/assurance-model.md",
|
|
28
|
+
"docs/preview-identity-command.md",
|
|
28
29
|
"docs/stack-components.md",
|
|
29
30
|
"docs/prompt-integration.md",
|
|
30
31
|
"prompts/blueprint.txt",
|
|
32
|
+
"prompts/adopt.txt",
|
|
31
33
|
"prompts/describe.txt",
|
|
32
34
|
"prompts/deslop.txt",
|
|
33
35
|
"prompts/program.txt",
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-project/SKILL.md` and
|
|
2
|
+
`.agents/skills/genesis-program/SKILL.md` completely.
|
|
3
|
+
|
|
4
|
+
This is an existing-project adoption turn. Import the codebase's factual
|
|
5
|
+
product and operational contracts into Genesis without changing application
|
|
6
|
+
behavior. The user has already approved adoption; do not ask them to approve
|
|
7
|
+
Genesis again or require them to understand Genesis terminology.
|
|
8
|
+
|
|
9
|
+
Application source, dependencies, migrations, runtime behavior, and deployment
|
|
10
|
+
files are read-only in this turn. You may edit `genesis/blueprint.md`,
|
|
11
|
+
`genesis/stack.md`, explanatory Markdown below `genesis/program/`, and
|
|
12
|
+
Genesis-managed skills/indexes produced by `genesis stack add` or Genesis
|
|
13
|
+
inspection commands. Do not install dependencies, prepare a database, run
|
|
14
|
+
migrations or seeds, start a server, deploy, or add compatibility code.
|
|
15
|
+
|
|
16
|
+
If Stack has no components, inspect direct evidence such as manifests,
|
|
17
|
+
lockfiles, build files, entrypoints, package scripts, tests, configuration,
|
|
18
|
+
database and migration code, and existing project-tool metadata. Record only
|
|
19
|
+
technologies the implementation already uses with `genesis stack add
|
|
20
|
+
<piece...>`; this is factual import, not a new-technology choice. Ask a concise
|
|
21
|
+
product-language question only when evidence is genuinely ambiguous. Then run
|
|
22
|
+
`genesis prompt --task adopt "Continue the approved existing-project import."`
|
|
23
|
+
and follow the regenerated prompt so every selected Stack piece contributes its
|
|
24
|
+
Adoption requirements.
|
|
25
|
+
|
|
26
|
+
Read every selected technology skill named by the regenerated prompt and its
|
|
27
|
+
relevant existing-application migration reference. Apply all SELECTED STACK
|
|
28
|
+
ADOPTION GUIDANCE. Component defaults describe current foundations and are
|
|
29
|
+
hypotheses until they match this source. They do not upgrade an older project.
|
|
30
|
+
|
|
31
|
+
Build one evidence-backed import inventory covering, where applicable:
|
|
32
|
+
|
|
33
|
+
- package manager, install/build commands, runtimes, workdirs, and generated
|
|
34
|
+
prerequisites;
|
|
35
|
+
- environment files, public defaults, required resources, and alternative
|
|
36
|
+
environment names, without reading or returning secret values;
|
|
37
|
+
- database engine, migration ownership and ledger, preparation command,
|
|
38
|
+
idempotent seed behavior, and fresh versus existing-database safety;
|
|
39
|
+
- every long-running target's exact argv, host/port placeholders, URL path,
|
|
40
|
+
readiness predicate, and shutdown ownership;
|
|
41
|
+
- application-owned Preview identity helper, protocol, supported selectors,
|
|
42
|
+
environment names, runtime, and timeout when authenticated preview exists;
|
|
43
|
+
- concrete verification commands, browser-test assumptions, and deployment
|
|
44
|
+
preparation/build/migration/serve/readiness declarations.
|
|
45
|
+
|
|
46
|
+
Translate observed contracts into exact project-owned Stack sections whenever
|
|
47
|
+
the selected components' defaults differ. A project section replaces the
|
|
48
|
+
component declaration for that concern, so it must be complete. Inspect retired
|
|
49
|
+
or tool-specific manifests as evidence and carry every still-valid fact into
|
|
50
|
+
Genesis; never add a permanent legacy reader or shim. Do not delete an old
|
|
51
|
+
manifest until all of its live facts have been accounted for.
|
|
52
|
+
|
|
53
|
+
Create the non-technical Blueprint and useful subsystem-oriented Program from
|
|
54
|
+
current source and tests. Do not cite archive internals or Git object storage as
|
|
55
|
+
implementation source; Program sources must be current Git-visible files.
|
|
56
|
+
|
|
57
|
+
Run `genesis check` only for structural validation. Missing environment values,
|
|
58
|
+
workspace markers, commands, helpers, seeds, or readiness evidence are honest
|
|
59
|
+
import findings, not permission to invent or execute them. Finish with a clear
|
|
60
|
+
inventory of what was imported, what remains unconfigured or blocked, and what
|
|
61
|
+
would require a separately approved implementation port. Never claim the
|
|
62
|
+
project is ready merely because Stack components were selected.
|
package/prompts/start.txt
CHANGED
|
@@ -23,12 +23,25 @@ When `projectKind` is `existing`, ask what the user wants to understand or
|
|
|
23
23
|
change. Use the current Blueprint, Stack, Program, and code index when present.
|
|
24
24
|
If the existing implementation is not yet explained, recommend the Genesis
|
|
25
25
|
description/adoption path instead of pretending its intent is known.
|
|
26
|
+
When an existing implementation has no selected Stack yet, inspect its actual
|
|
27
|
+
package scripts, build files, setup commands, server entrypoint, and readiness
|
|
28
|
+
route before recording the user's technology choice. Component Workspace setup
|
|
29
|
+
and Launch declarations describe that component's current foundation; selecting
|
|
30
|
+
the component does not port an older implementation to it. If the existing
|
|
31
|
+
commands differ, add exact project-owned `## Workspace setup` and `## Launch`
|
|
32
|
+
sections that replace the component defaults and match the code that exists.
|
|
33
|
+
Never report the inherited setup or Launch as usable merely because the
|
|
34
|
+
component was selected, and never add compatibility implementation without the
|
|
35
|
+
user asking for a port.
|
|
26
36
|
|
|
27
37
|
When `projectKind` is `existing-uninitialized`, ask what the user wants to
|
|
28
|
-
understand or change and strongly recommend
|
|
29
|
-
work. Explain
|
|
30
|
-
|
|
31
|
-
|
|
38
|
+
understand or change and strongly recommend preparing the existing project for
|
|
39
|
+
guided editing before substantial work. Explain in product language that this
|
|
40
|
+
preserves the implementation while importing its current setup, run, database,
|
|
41
|
+
preview, verification, and product context. Do not require the user to know
|
|
42
|
+
Genesis terminology or type a command. If they approve, run `genesis adopt`
|
|
43
|
+
yourself and follow its adoption prompt. If they decline, continue normally and
|
|
44
|
+
do not repeat the recommendation.
|
|
32
45
|
|
|
33
46
|
If the request already contains an unambiguous product description and an
|
|
34
47
|
explicit Stack choice, you may apply that choice and establish the Blueprint.
|