genesis-compiler 1.2.27 → 1.2.28
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 +326 -55
- package/docs/prompt-integration.md +35 -15
- package/docs/stack-components.md +65 -23
- package/package.json +1 -1
- package/plugins/genesis/.codex-plugin/plugin.json +1 -1
- package/prompts/adopt.txt +5 -4
- package/prompts/deslop.txt +3 -1
- package/prompts/start.txt +48 -18
- package/prompts/work.txt +11 -3
- package/skills/genesis-deslop/SKILL.md +17 -0
- package/skills/genesis-project/SKILL.md +48 -9
- package/src/cli.js +19 -2
- package/src/index/codex-hooks.js +3 -1
- package/src/index/context.js +20 -0
- package/src/index/migration.js +12 -3
- package/src/index/project-format.js +1 -1
- package/src/index/session-context.js +18 -0
- package/src/index/stack-catalog.js +11 -0
- package/src/index/stack-project-contracts.js +205 -0
- package/src/index/stack-section.js +2 -2
- package/src/index/stack.js +91 -57
package/README.md
CHANGED
|
@@ -8,6 +8,16 @@ user request into a complete prompt for the coding agent you already use.
|
|
|
8
8
|
Genesis outputs text. The agent or host you already use owns execution and
|
|
9
9
|
interaction.
|
|
10
10
|
|
|
11
|
+
The useful mental model is:
|
|
12
|
+
|
|
13
|
+
- **Genesis describes** the product, selected technology, project operations,
|
|
14
|
+
existing code, and checks.
|
|
15
|
+
- **Your coding agent implements** the application and follows the prompts
|
|
16
|
+
Genesis returns.
|
|
17
|
+
- **The relevant tool or host executes** setup, run, preview, deployment, and
|
|
18
|
+
other consumer-owned operations. Genesis itself executes only the commands
|
|
19
|
+
explicitly listed under `## Verification`.
|
|
20
|
+
|
|
11
21
|
## Project files
|
|
12
22
|
|
|
13
23
|
```text
|
|
@@ -15,7 +25,7 @@ genesis/
|
|
|
15
25
|
version project-file format version used for deterministic migrations
|
|
16
26
|
blueprint.md non-technical product intent
|
|
17
27
|
engineering.md selected engineering profile and project-specific requirements
|
|
18
|
-
stack.md selected
|
|
28
|
+
stack.md selected components, resources, verification, and project-owned operation contracts
|
|
19
29
|
stack/ optional per-component Description, Guidance, Adoption, Post-change, and Deslop customization
|
|
20
30
|
program/ concise explanations grouped into conceptual subsystems
|
|
21
31
|
.agents/skills/
|
|
@@ -50,7 +60,7 @@ prove it current. Program omits incidental framework glue, generated files,
|
|
|
50
60
|
tests, fixtures, and migrations. It is useful documentation, not proof that it
|
|
51
61
|
completely or correctly explains the implementation.
|
|
52
62
|
|
|
53
|
-
##
|
|
63
|
+
## Quick start
|
|
54
64
|
|
|
55
65
|
Genesis requires Node.js 22 or newer and Git.
|
|
56
66
|
|
|
@@ -66,6 +76,67 @@ The catalog is static Markdown and contains the complete curated set of
|
|
|
66
76
|
language, database, UI, and framework pieces. A host may supply another catalog
|
|
67
77
|
through the same contract.
|
|
68
78
|
|
|
79
|
+
### Try a new project with Codex or OpenCode
|
|
80
|
+
|
|
81
|
+
Create an ordinary empty Git repository:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
mkdir genesis-jskit-test
|
|
85
|
+
cd genesis-jskit-test
|
|
86
|
+
git init
|
|
87
|
+
genesis init
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Start Codex or OpenCode in that directory. For a useful discovery test, begin
|
|
91
|
+
with a deliberately incomplete request:
|
|
92
|
+
|
|
93
|
+
> I want to build something with JSKIT.
|
|
94
|
+
|
|
95
|
+
The agent should not start surveying frameworks or creating source. It should
|
|
96
|
+
first ask what is being built, who or what will use it, and the first useful
|
|
97
|
+
observable outcome. When it recognizes `jskit` in the live Stack catalog, it
|
|
98
|
+
should ask before adding it.
|
|
99
|
+
|
|
100
|
+
For a faster end-to-end test, give it the important product facts directly:
|
|
101
|
+
|
|
102
|
+
> Build a private contact manager with JSKIT and MySQL. Signed-in people can
|
|
103
|
+
> create, edit, search, and delete their own contacts. The first useful outcome
|
|
104
|
+
> is registering, signing in, and saving one contact.
|
|
105
|
+
|
|
106
|
+
The agent should propose the matching Stack selection and wait for confirmation.
|
|
107
|
+
After you answer yes, it should run `genesis stack add`, receive the preparation
|
|
108
|
+
prompt as command output, and continue that prompt in the same task. There is no
|
|
109
|
+
synthetic follow-up turn.
|
|
110
|
+
|
|
111
|
+
If you prefer to drive the CLI yourself, the equivalent shortest selection is:
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
genesis stack list
|
|
115
|
+
genesis stack add jskit-mysql
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
`jskit-mysql` brings in its declared dependencies: `mysql`, `jskit`, and
|
|
119
|
+
`nodejs`. The second command changes `genesis/stack.md`, synchronizes any
|
|
120
|
+
component-declared Agent Skills, and prints one preparation prompt. Genesis
|
|
121
|
+
does not execute that prompt or start an AI. Paste it into your agent if you ran
|
|
122
|
+
the command yourself; if the agent ran the command, it already has the output.
|
|
123
|
+
|
|
124
|
+
Review the resulting source and contracts, then inspect and verify them:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git diff
|
|
128
|
+
genesis check
|
|
129
|
+
genesis inspect environment
|
|
130
|
+
genesis inspect section Outputs
|
|
131
|
+
genesis verify
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
`check` reports structure and recorded evidence. `verify` runs only the finite
|
|
135
|
+
commands recorded under the project's `## Verification` section; neither
|
|
136
|
+
command claims that the whole product is correct.
|
|
137
|
+
|
|
138
|
+
### Adopt an existing codebase
|
|
139
|
+
|
|
69
140
|
For an existing codebase, `adopt` is the direct entry point:
|
|
70
141
|
|
|
71
142
|
```bash
|
|
@@ -82,15 +153,9 @@ Blueprint and Program. Give it to the agent already working in the repository.
|
|
|
82
153
|
Adoption edits Genesis metadata only; implementation modernization remains a
|
|
83
154
|
separate, explicitly approved port. “Adopt” never moves the project.
|
|
84
155
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
cd my-project
|
|
89
|
-
git init # if needed
|
|
90
|
-
genesis init
|
|
91
|
-
vi genesis/blueprint.md
|
|
92
|
-
codex
|
|
93
|
-
```
|
|
156
|
+
You may write `genesis/blueprint.md` yourself, but normal new-project use can
|
|
157
|
+
let the opening conversation establish it from your answers before source is
|
|
158
|
+
created.
|
|
94
159
|
|
|
95
160
|
Codex users may also install Genesis's optional discovery plugin once:
|
|
96
161
|
|
|
@@ -114,12 +179,17 @@ and project-local guidance adapters for Codex and OpenCode. The skills are ordin
|
|
|
114
179
|
and `genesis-deslop`, each with standard `SKILL.md` and `agents/openai.yaml`
|
|
115
180
|
metadata. Open `/hooks` once in Codex to review and trust the guidance hook;
|
|
116
181
|
OpenCode discovers its local project plugin automatically. Both use the same
|
|
117
|
-
Genesis-owned operating guide for new sessions and after compaction.
|
|
118
|
-
|
|
182
|
+
Genesis-owned operating guide for new sessions and after compaction. When the
|
|
183
|
+
optional first-party catalog is installed beside Genesis, that guide includes
|
|
184
|
+
only its current component ids. If a named technology exactly matches an
|
|
185
|
+
unselected component, the agent asks before selecting it, then loads its Stack
|
|
186
|
+
context and any skill it declares. No technology is assumed until you confirm
|
|
187
|
+
Stack selection:
|
|
119
188
|
|
|
120
189
|
```bash
|
|
121
|
-
genesis stack add
|
|
122
|
-
# or
|
|
190
|
+
genesis stack add nodejs
|
|
191
|
+
# or, with dependencies resolved automatically:
|
|
192
|
+
genesis stack add jskit-mysql
|
|
123
193
|
```
|
|
124
194
|
|
|
125
195
|
Genesis does not install substitute generic `nodejs`, `vue`, `php`, or similar
|
|
@@ -141,6 +211,32 @@ Genesis never overwrites an unmanaged skill and preserves locally modified
|
|
|
141
211
|
managed skills. Run `genesis init` after manually editing `genesis/stack.md`,
|
|
142
212
|
or use `genesis stack add`, to synchronize selected skills.
|
|
143
213
|
|
|
214
|
+
## Commands at a glance
|
|
215
|
+
|
|
216
|
+
| Command | What it does |
|
|
217
|
+
| --- | --- |
|
|
218
|
+
| `genesis init` | Initializes Genesis files, workflow skills, code indexes, and local Codex/OpenCode guidance in a new or current-format project. It selects no technology. |
|
|
219
|
+
| `genesis adopt [guidance...]` | Initializes an existing codebase and prints the prompt for describing its real product and operational contracts without moving or modernizing source. |
|
|
220
|
+
| `genesis codex install` | Installs the optional Codex discovery plugin that recommends adoption for nonempty projects without Genesis. |
|
|
221
|
+
| `genesis engineering list` | Lists the installed engineering profiles. |
|
|
222
|
+
| `genesis engineering show [profile]` | Shows one profile, or the current project profile when omitted. |
|
|
223
|
+
| `genesis engineering set <profile>` | Records the selected engineering profile while preserving project-specific requirements. |
|
|
224
|
+
| `genesis stack list` | Lists technology components from the installed Stack catalog. |
|
|
225
|
+
| `genesis stack add <piece...>` | Resolves component dependencies/conflicts, records the selection, materializes missing project contracts, synchronizes declared skills, and prints the one-time preparation prompt. It does not install application packages or run an agent. |
|
|
226
|
+
| `genesis context <path...>` | Returns path-focused Program explanations, indexed functions, selected technology guidance, exact project contracts, and relevant skills. |
|
|
227
|
+
| `genesis index [function-or-path...]` | Regenerates the derived code indexes and optionally searches the existing function/method inventory. |
|
|
228
|
+
| `genesis inspect environment` | Reports declared resources, public defaults, missing input names, and environment-file paths without returning secret values. |
|
|
229
|
+
| `genesis inspect section <name>` | Returns one exact consumer-owned Stack section without interpreting or executing it. |
|
|
230
|
+
| `genesis prompt [request...]` | Generates the ordinary implementation prompt. Use `--task` for opening, adoption, Deslop, explanation, review, and other explicit prompt tasks. |
|
|
231
|
+
| `genesis verify` | Executes only the ordered finite commands in `## Verification` and records exact evidence. |
|
|
232
|
+
| `genesis check` | Performs a read-only structural check of project format, Blueprint, Stack, skills, Program, resources, and verification evidence. |
|
|
233
|
+
| `genesis migrate` | Advances recognized older Genesis project files deterministically and refreshes managed skills, hooks, and indexes. |
|
|
234
|
+
|
|
235
|
+
Project-scoped options follow the command, for example
|
|
236
|
+
`genesis check --project-root /path/to/project`. Commands support `--json` when
|
|
237
|
+
a host or script needs the normalized result. Run `genesis --help` for the
|
|
238
|
+
compact CLI synopsis.
|
|
239
|
+
|
|
144
240
|
## Engineering approach
|
|
145
241
|
|
|
146
242
|
Every profile inherits one universal rule: implementation must remain easy to
|
|
@@ -190,30 +286,35 @@ approach. A project upgraded from an older Genesis release safely uses
|
|
|
190
286
|
records the file.
|
|
191
287
|
|
|
192
288
|
Hosts that manage project environments can call `inspectEnvironment()`.
|
|
193
|
-
Concrete Stack integrations may
|
|
194
|
-
defaults such as the database driver selected by that integration.
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
289
|
+
Concrete Stack integrations may propose public, non-secret Environment
|
|
290
|
+
defaults such as the database driver selected by that integration. `genesis
|
|
291
|
+
stack add` copies those proposals into the project's `## Environment defaults`
|
|
292
|
+
contract; explicit host or user values still take precedence. The catalog's
|
|
293
|
+
JSKIT MySQL and PostgreSQL pieces propose `DB_CLIENT=mysql2` and
|
|
294
|
+
`DB_CLIENT=pg`. Laravel database integrations also propose their conventional
|
|
295
|
+
connection, host, port, database, and username while leaving passwords and
|
|
296
|
+
other secrets unset.
|
|
297
|
+
A project may edit its complete `## Resources` and `## Environment defaults`
|
|
298
|
+
sections in `genesis/stack.md` so an imported C++, PHP, Python, older, or
|
|
299
|
+
deliberately customized application keeps its real names and public constants.
|
|
203
300
|
An optional readable `## Environment files` section declares safe
|
|
204
|
-
project-relative dotenv projections such as `.env`.
|
|
205
|
-
|
|
206
|
-
|
|
301
|
+
project-relative dotenv projections such as `.env`. Selection materializes
|
|
302
|
+
the component proposal once, after which the project declaration is
|
|
303
|
+
authoritative and may use `- Nothing.`. Genesis reports public defaults, resource declarations,
|
|
207
304
|
value-free missing-input diagnostics, and paths. It never returns supplied
|
|
208
305
|
environment values, writes files, stores secrets, or decides which resolved
|
|
209
306
|
host values should be materialized.
|
|
210
307
|
|
|
211
|
-
Consumers may define additional `##` sections in a project
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
308
|
+
Consumers may define additional `##` sections in a project Stack, while Stack
|
|
309
|
+
components may propose initial bodies for them. Selection materializes each
|
|
310
|
+
unambiguous proposal into `genesis/stack.md` and returns one preparation prompt
|
|
311
|
+
that asks the current agent to make every heading true. Existing project
|
|
312
|
+
sections are preserved and identified for evidence-based review. Thereafter
|
|
313
|
+
the exact project text is durable across catalog upgrades, participates in
|
|
314
|
+
Stack identity and prompt context, and is exposed through
|
|
315
|
+
`inspectStackSection()`. The body is opaque: Genesis does not parse its
|
|
316
|
+
commands, infer its purpose, or execute it. Competing proposals are reported
|
|
317
|
+
mechanically unless the project already records its decision.
|
|
217
318
|
|
|
218
319
|
This is the boundary for every consumer-specific operation. The consumer that
|
|
219
320
|
names a section owns its schema, validation, runtime mapping, execution, and
|
|
@@ -249,6 +350,19 @@ genesis index normalizeNote
|
|
|
249
350
|
genesis index src/notes
|
|
250
351
|
```
|
|
251
352
|
|
|
353
|
+
This is not merely a README suggestion. The new-session and post-compaction
|
|
354
|
+
guide, generated work prompts, and the installed `genesis-project` skill tell
|
|
355
|
+
the agent to run `genesis context` after locating relevant source and to run
|
|
356
|
+
`genesis index` before adding another helper or public operation. Genesis
|
|
357
|
+
cannot force a model to obey a prompt, so this is not a hidden command gate.
|
|
358
|
+
The delivered prompt is tested, and the transcript plus ordinary Git review
|
|
359
|
+
remain the way to confirm that a particular agent followed it.
|
|
360
|
+
|
|
361
|
+
`genesis index` answers a structural question—what indexed functions or methods
|
|
362
|
+
already exist by name or path. It does not prove semantic equivalence. The
|
|
363
|
+
agent must still inspect the implementation and direct call sites before
|
|
364
|
+
reusing or consolidating behavior.
|
|
365
|
+
|
|
252
366
|
`genesis index` regenerates two deterministic projections. Machine City is the
|
|
253
367
|
detailed physical view: indexed files, line and byte weights, public and
|
|
254
368
|
internal functions or methods, signatures, source/test role, language, and
|
|
@@ -280,6 +394,44 @@ amending history. Genesis supplies the behavior-preserving boundary and Git
|
|
|
280
394
|
scope rules. Selected Stack components add technology-specific Deslop guidance
|
|
281
395
|
without weakening or broadening that contract.
|
|
282
396
|
|
|
397
|
+
### Deslop committed work
|
|
398
|
+
|
|
399
|
+
Inside Codex, OpenCode, or another skill-aware coding agent, ask directly:
|
|
400
|
+
|
|
401
|
+
```text
|
|
402
|
+
Deslop
|
|
403
|
+
Deslop the last 5 commits
|
|
404
|
+
Deslop commit a1b2c3d
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
The installed `genesis-deslop` skill generates the canonical project prompt
|
|
408
|
+
once when the request was not already generated by Genesis. It follows that
|
|
409
|
+
prompt in the same agent turn; it does not start another agent or create a
|
|
410
|
+
synthetic follow-up turn.
|
|
411
|
+
|
|
412
|
+
For a host integration, shell workflow, or agent without automatic skill
|
|
413
|
+
selection, generate the same complete prompt explicitly:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
genesis prompt --task deslop
|
|
417
|
+
genesis prompt --task deslop "Deslop the last 5 commits"
|
|
418
|
+
genesis prompt --task deslop "Deslop commit a1b2c3d"
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
Give the printed prompt to the coding agent that has access to the repository.
|
|
422
|
+
Genesis packages four relevant layers: the explicit scope request; the
|
|
423
|
+
portable behavior-preserving contract from `genesis-deslop`; the selected
|
|
424
|
+
engineering approach; and the effective `Deslop` prose from every selected
|
|
425
|
+
Stack component. Project additions or overrides from
|
|
426
|
+
`genesis/stack/<component>.md` are applied before that Stack prose is composed.
|
|
427
|
+
The main `genesis/stack.md` records component selection and durable project
|
|
428
|
+
operations; it intentionally does not duplicate installed guidance bodies.
|
|
429
|
+
|
|
430
|
+
Deslop refuses to mix cleanup with an existing dirty worktree. Its result is a
|
|
431
|
+
normal uncommitted diff for review and a later commit. It never amends the
|
|
432
|
+
selected commit, silently fixes newly discovered defects, or runs as an
|
|
433
|
+
automatic completion phase.
|
|
434
|
+
|
|
283
435
|
Projects can customize a selected technology through its matching file, such
|
|
284
436
|
as `genesis/stack/jskit.md`:
|
|
285
437
|
|
|
@@ -363,10 +515,11 @@ genesis prompt --task review # compare intent, code, and
|
|
|
363
515
|
|
|
364
516
|
The eight task types are deliberately explicit:
|
|
365
517
|
|
|
366
|
-
- `start` opens the project conversation. For a new project it
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
518
|
+
- `start` opens the project conversation. For a new project it establishes what
|
|
519
|
+
is being built, who or what will use or invoke it, and the first useful
|
|
520
|
+
observable outcome before presenting relevant choices from the live Stack
|
|
521
|
+
catalog. A partial reply resolves only what it explicitly answers. For an
|
|
522
|
+
existing project it asks what the person wants to understand or change.
|
|
370
523
|
- `adopt` imports an existing application's factual operational and product
|
|
371
524
|
contracts into Genesis metadata. It composes technology-specific Adoption
|
|
372
525
|
requirements from the selected Stack and does not change application code.
|
|
@@ -398,19 +551,77 @@ object.
|
|
|
398
551
|
List and select pieces from the installed optional catalog:
|
|
399
552
|
|
|
400
553
|
```bash
|
|
401
|
-
genesis stack list
|
|
402
|
-
genesis stack add
|
|
554
|
+
genesis stack list
|
|
555
|
+
genesis stack add jskit jskit-mysql
|
|
403
556
|
```
|
|
404
557
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
558
|
+
### What `stack add` actually does
|
|
559
|
+
|
|
560
|
+
`genesis stack add` is deterministic project preparation, not an application
|
|
561
|
+
installer. It:
|
|
562
|
+
|
|
563
|
+
1. reads the explicitly installed Stack catalog;
|
|
564
|
+
2. resolves requested components, declared dependencies, and conflicts;
|
|
565
|
+
3. records the owning Stack package and complete resolved component selection;
|
|
566
|
+
4. copies every missing operation proposal into `genesis/stack.md` as a
|
|
567
|
+
project-owned contract;
|
|
568
|
+
5. synchronizes any authoritative Agent Skill explicitly declared by those
|
|
569
|
+
components; and
|
|
570
|
+
6. prints one heading-by-heading preparation prompt.
|
|
571
|
+
|
|
572
|
+
That final prompt asks the current agent to make the materialized contracts
|
|
573
|
+
true: create the necessary source and scripts for a new project, or replace a
|
|
574
|
+
complete project section when existing source proves that a proposal is wrong.
|
|
575
|
+
Genesis does not execute the prompt. If the agent ran `stack add`, the prompt is
|
|
576
|
+
already visible as its command result and the Genesis project instructions tell
|
|
577
|
+
it to continue in the same task. If a person ran the command, they give the
|
|
578
|
+
printed prompt to their agent. Repeating an already-complete selection prints no
|
|
579
|
+
second preparation prompt.
|
|
580
|
+
|
|
581
|
+
`stack add` itself does **not** run `npm install`, Composer, CMake, a database
|
|
582
|
+
migration, a development server, or deployment. Those operations belong to the
|
|
583
|
+
application and the consumer named by the relevant project contract.
|
|
584
|
+
|
|
585
|
+
For the ordinary naked CLI, an explicitly installed first-party
|
|
586
|
+
`genesis-stack` package bootstraps an unconfigured project without exposing
|
|
587
|
+
catalog package plumbing to the agent. Genesis enumerates component ids from
|
|
588
|
+
that package; it does not hard-code technology names or scan arbitrary npm
|
|
589
|
+
packages. A host can instead supply another catalog explicitly with
|
|
590
|
+
`--stack-package`. Once a selection records its owning package in
|
|
591
|
+
`genesis/stack.md`, ordinary commands use that recorded package directly.
|
|
592
|
+
|
|
593
|
+
`genesis/stack.md` records the owning Stack package, component ids, and the
|
|
594
|
+
project-owned operation contracts proposed during selection. After the first
|
|
595
|
+
selection, ordinary commands resolve the recorded package without another
|
|
596
|
+
flag, but later catalog releases never silently rewrite those contracts.
|
|
597
|
+
Selecting no components is valid. `genesis-stack` currently contains C/C++,
|
|
598
|
+
C#, Go, Java, Kotlin, Node.js, PHP, Python, Ruby, Rust, and Shell, plus Vue,
|
|
599
|
+
MySQL, PostgreSQL, JSKIT, JSKIT database integrations, Laravel, and Laravel
|
|
600
|
+
database integrations.
|
|
601
|
+
|
|
602
|
+
### Why `genesis/stack.md` is deliberately small
|
|
603
|
+
|
|
604
|
+
The project Stack is a durable contract, not a copy of every framework manual.
|
|
605
|
+
It contains only:
|
|
606
|
+
|
|
607
|
+
- the catalog package that owns the selected component definitions;
|
|
608
|
+
- the resolved component ids;
|
|
609
|
+
- Genesis-owned `Resources`, `Environment defaults`, `Environment files`, and
|
|
610
|
+
`Verification` contracts that are relevant to this project; and
|
|
611
|
+
- exact consumer-owned sections such as `Workspace setup`, `Outputs`, or
|
|
612
|
+
`Deployment` when selected components propose them.
|
|
613
|
+
|
|
614
|
+
Concise technology Guidance, Adoption, Post-change, and Deslop prose stays in
|
|
615
|
+
the installed catalog, while larger authoritative instructions remain in
|
|
616
|
+
technology-owned Agent Skills or official documentation. Genesis composes the
|
|
617
|
+
relevant guidance into prompts and path-focused context on demand. Application
|
|
618
|
+
source remains the authority for what actually exists.
|
|
619
|
+
|
|
620
|
+
Selection copies operation proposals once. From that point onward, the complete
|
|
621
|
+
project sections in `genesis/stack.md` win: upgrading `genesis-stack` can improve
|
|
622
|
+
guidance for future work but cannot silently change how this application is
|
|
623
|
+
installed, checked, run, or deployed.
|
|
408
624
|
|
|
409
|
-
`genesis/stack.md` records the owning Stack package, component ids, and optional
|
|
410
|
-
project verification commands. After the first selection, ordinary commands
|
|
411
|
-
resolve the recorded package without another flag. Selecting no components is
|
|
412
|
-
valid. `genesis-stack` contains the eleven common language families listed
|
|
413
|
-
above, plus Vue, MySQL, PostgreSQL, JSKIT, and JSKIT database integrations.
|
|
414
625
|
Components may contribute:
|
|
415
626
|
|
|
416
627
|
- a concise description and supplemental Guidance used across relevant tasks;
|
|
@@ -422,6 +633,13 @@ Components may contribute:
|
|
|
422
633
|
- structural code indexers used by Machine City and function lookup;
|
|
423
634
|
- default verification commands.
|
|
424
635
|
|
|
636
|
+
Resources, environment declarations, Verification, and opaque consumer
|
|
637
|
+
sections are proposals, not live inherited behavior. `genesis stack add`
|
|
638
|
+
materializes them into `genesis/stack.md`, prints a one-time
|
|
639
|
+
heading-by-heading preparation prompt, and expects the implementation or the
|
|
640
|
+
complete project section to be made truthful in that same task. Repeating the
|
|
641
|
+
same selection emits no second preparation prompt.
|
|
642
|
+
|
|
425
643
|
Technology-specific supplemental rules intentionally remain in Stack pieces.
|
|
426
644
|
General `Guidance` enriches implementation, review, Program, description, and
|
|
427
645
|
cleanup tasks; `Adoption` adds import-only requirements; `Post-change` adds
|
|
@@ -433,6 +651,58 @@ upstream skill contains every rule Genesis needs.
|
|
|
433
651
|
Genesis core contains no Stack pieces and no database, framework, language, or
|
|
434
652
|
platform dependency. See [Stack components](docs/stack-components.md).
|
|
435
653
|
|
|
654
|
+
### The current JSKIT command contract
|
|
655
|
+
|
|
656
|
+
Selecting `jskit` currently proposes the following operations. These are the
|
|
657
|
+
only commands in the base JSKIT Stack proposal; an application may deliberately
|
|
658
|
+
add or replace complete project sections when its real scripts differ.
|
|
659
|
+
|
|
660
|
+
| Project contract | Command or probe | Purpose | Executor |
|
|
661
|
+
| --- | --- | --- | --- |
|
|
662
|
+
| `Workspace setup` | `npm install` | Install development dependencies when `package.json` exists. | The operator or host preparing a workspace, such as Vibe64. |
|
|
663
|
+
| `Outputs` | `npm run develop` | Start the interactive development web application. | The operator or output host. |
|
|
664
|
+
| `Outputs` readiness | `GET /api/health` → `200` | Decide when the development output is ready; preferred port is `3000`. | The output host. |
|
|
665
|
+
| `Verification` | `npm run verify` | Run the application's finite declared checks. | `genesis verify` executes this one directly. |
|
|
666
|
+
| `Deployment` prepare | `npm ci` | Recreate production dependencies from the lockfile. | The deployment consumer. |
|
|
667
|
+
| `Deployment` build | `npm run build` | Produce the deployable application build. | The deployment consumer. |
|
|
668
|
+
| `Deployment` serve | `npm start` | Start the built production application. | The deployment consumer. |
|
|
669
|
+
| `Deployment` readiness | `GET /api/health` → `200` | Prove that the deployed service is ready. | The deployment consumer. |
|
|
670
|
+
|
|
671
|
+
The JSKIT proposal also declares `.env` as its environment projection and says
|
|
672
|
+
that inactive deployment workspaces may recreate `node_modules`; it deliberately
|
|
673
|
+
does not mark built output disposable.
|
|
674
|
+
|
|
675
|
+
Selecting `jskit-mysql` additionally selects `mysql`, `jskit`, and `nodejs`,
|
|
676
|
+
sets the public default `DB_CLIENT=mysql2`, and declares either
|
|
677
|
+
`DB_HOST`/`DB_PORT`/`DB_NAME`/`DB_USER`/`DB_PASSWORD` or `DATABASE_URL` as the
|
|
678
|
+
database input contract, with optional `TEST_DB_NAME`. It does **not** invent a
|
|
679
|
+
database-preparation command. If the application implements a real migration or
|
|
680
|
+
seed script, the agent records that exact command in the complete project
|
|
681
|
+
sections whose consumers need it. Local authentication similarly requires the
|
|
682
|
+
application to declare `AUTH_LOCAL_SESSION_SECRET` without committing its
|
|
683
|
+
value.
|
|
684
|
+
|
|
685
|
+
### How the Stack contract is enforced
|
|
686
|
+
|
|
687
|
+
Enforcement deliberately stops at ownership boundaries:
|
|
688
|
+
|
|
689
|
+
- Genesis strictly parses component ids, dependencies, conflicts, resources,
|
|
690
|
+
public defaults, environment-file paths, and Verification commands.
|
|
691
|
+
- Current-format projects must contain every project-owned section required by
|
|
692
|
+
their selected components. Missing materialized contracts make Stack reads
|
|
693
|
+
and `genesis check` invalid instead of falling back to a newer catalog.
|
|
694
|
+
- `genesis check` validates structure, reports missing declared input names, and
|
|
695
|
+
reports verification evidence as current, stale, missing, or unconfigured.
|
|
696
|
+
- `genesis verify` executes only the exact argv recorded under
|
|
697
|
+
`## Verification`, without a shell, and records the passing code and Stack
|
|
698
|
+
identity.
|
|
699
|
+
- Consumer-owned sections are intentionally opaque to Genesis. The consumer
|
|
700
|
+
that names `Workspace setup`, `Outputs`, `Deployment`, packaging, signing, or
|
|
701
|
+
another operation owns its grammar, execution, and proof.
|
|
702
|
+
- The one-time preparation prompt tells the agent to make every heading true,
|
|
703
|
+
but prompt compliance is not mechanical proof. Source, focused tests, the
|
|
704
|
+
consumer's validator, runtime behavior, and Git review remain the evidence.
|
|
705
|
+
|
|
436
706
|
## Verification
|
|
437
707
|
|
|
438
708
|
Run the Stack's declared checks explicitly:
|
|
@@ -456,7 +726,7 @@ Agent Skill, and Deslop prose do not rewrite what an already-run command proved.
|
|
|
456
726
|
A failed verification removes prior passing evidence before running.
|
|
457
727
|
Verification does not claim whole-product correctness.
|
|
458
728
|
|
|
459
|
-
|
|
729
|
+
The project owns the commands in `genesis/stack.md`:
|
|
460
730
|
|
|
461
731
|
```markdown
|
|
462
732
|
## Verification
|
|
@@ -500,12 +770,13 @@ files to the running CLI's project format:
|
|
|
500
770
|
genesis migrate
|
|
501
771
|
```
|
|
502
772
|
|
|
503
|
-
Migration is deterministic and forward-only.
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
773
|
+
Migration is deterministic and forward-only. The format 2 migration snapshots
|
|
774
|
+
the previously effective Stack operations into project-owned sections before
|
|
775
|
+
removing component-runtime fallback. Migration also synchronizes managed skills
|
|
776
|
+
and hooks, regenerates derived indexes, and then returns a fresh `check`
|
|
777
|
+
result. A newer project is never downgraded. Every project-scoped CLI
|
|
778
|
+
invocation warns when the recorded format does not match the running CLI, and
|
|
779
|
+
ordinary project operations stop until the migration is resolved.
|
|
509
780
|
|
|
510
781
|
## Public API
|
|
511
782
|
|
|
@@ -36,8 +36,8 @@ Genesis keeps each instruction at one useful level:
|
|
|
36
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
|
- a declared Stack package's `stacks/pieces/<component>.md` supplies concise Description, supplemental
|
|
39
|
-
Guidance, Adoption requirements,
|
|
40
|
-
|
|
39
|
+
Guidance, Adoption requirements, initial operation proposals, Deslop overlays,
|
|
40
|
+
structural Indexers, 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
|
- `profiles/engineering/*.md` owns the installed versioned engineering
|
|
@@ -57,17 +57,18 @@ composed without creating a colliding generic skill.
|
|
|
57
57
|
`genesis adopt [product guidance...]` is the explicit starting point for a
|
|
58
58
|
nonempty project. It preserves source, calls the same idempotent initialization
|
|
59
59
|
used by `genesis init`, and prints an `adopt` prompt for the current agent to
|
|
60
|
-
follow. Adoption first records observed Stack components,
|
|
61
|
-
their technology-specific `##
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
60
|
+
follow. Adoption first records observed Stack components, follows the
|
|
61
|
+
preparation prompt returned by selection so their technology-specific `##
|
|
62
|
+
Adoption` requirements and proposed project contracts are visible, translates
|
|
63
|
+
those contracts to match the application's evidenced reality, and then creates
|
|
64
|
+
one Blueprint and subsystem-oriented Program.
|
|
65
|
+
|
|
66
|
+
Adoption does not upgrade an application's technology foundation. Materialized
|
|
67
|
+
component proposals are starting candidates, not evidence. Older or otherwise
|
|
67
68
|
different applications receive complete project-owned environment/resource,
|
|
68
|
-
Verification, and consumer-owned opaque declarations
|
|
69
|
-
does not interpret those opaque bodies; the consumer's schema and
|
|
70
|
-
skill determine what must be preserved.
|
|
69
|
+
Verification, and consumer-owned opaque declarations that match source reality.
|
|
70
|
+
Genesis does not interpret those opaque bodies; the consumer's schema and
|
|
71
|
+
technology skill determine what must be preserved.
|
|
71
72
|
|
|
72
73
|
Codex users can run `genesis codex install` once to install the packaged
|
|
73
74
|
Genesis discovery plugin. Its `SessionStart` hook executes before the first
|
|
@@ -87,16 +88,35 @@ requests another model turn. Selected `Post-change` contributions are included
|
|
|
87
88
|
in the original implementation prompt, whose project skill also keeps
|
|
88
89
|
intentional Blueprint and affected Program changes aligned.
|
|
89
90
|
|
|
91
|
+
The operating guide dynamically lists only the component ids in the currently
|
|
92
|
+
available Stack catalogs. The naked CLI uses an explicitly installed
|
|
93
|
+
first-party `genesis-stack` package as its initial catalog without exposing the
|
|
94
|
+
package name to the agent or scanning arbitrary packages. When the user names
|
|
95
|
+
an unselected technology that exactly matches a listed component, the agent
|
|
96
|
+
confirms before adding it. A confirmed selection uses the ordinary `stack add`
|
|
97
|
+
operation, applies dependency closure, synchronizes any component-declared
|
|
98
|
+
skill, materializes missing operation proposals into the project Stack, and
|
|
99
|
+
prints a one-time preparation prompt. The agent follows that prompt in the same
|
|
100
|
+
task, satisfying every heading or replacing a complete section with evidenced
|
|
101
|
+
reality. It then uses `genesis context` for exact project contracts and
|
|
102
|
+
path-local guidance. Genesis never infers an install command from a component
|
|
103
|
+
id. A declined or unmatched choice continues with authoritative technology
|
|
104
|
+
documentation.
|
|
105
|
+
|
|
90
106
|
Deslop is an explicit prompt task available to any host or command-line user.
|
|
91
107
|
It resolves the latest commit by default, a requested first-parent count, or an
|
|
92
108
|
exact commit/range; requires a clean worktree; and leaves cleanup as ordinary
|
|
93
109
|
uncommitted work. Genesis owns that invariant contract. Selected Stack
|
|
94
110
|
`Deslop` prose and applicable technology skills enrich the cleanup without
|
|
95
|
-
changing its scope or behavior-preserving boundary.
|
|
111
|
+
changing its scope or behavior-preserving boundary. When the installed Deslop
|
|
112
|
+
skill is invoked by a direct agent request, it generates this canonical prompt
|
|
113
|
+
once in the same turn so those effective Stack instructions are present. A
|
|
114
|
+
prompt whose Genesis context already identifies the Deslop task is followed
|
|
115
|
+
directly and never generated recursively.
|
|
96
116
|
|
|
97
117
|
Once Codex identifies relevant source, `genesis context <path...>` returns only
|
|
98
|
-
Program modules citing those paths plus the effective engineering approach
|
|
99
|
-
concise selected Stack
|
|
118
|
+
Program modules citing those paths plus the effective engineering approach,
|
|
119
|
+
concise selected Stack guidance, exact project-owned Stack contracts, the
|
|
100
120
|
functions structurally indexed in those paths, available Agent Skill catalog,
|
|
101
121
|
and verification commands. `genesis index <name-or-path>` searches the complete
|
|
102
122
|
current function inventory and refreshes `.genesis/machine-city.json` and
|