genesis-compiler 1.0.0 → 1.2.0
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/.agents/plugins/marketplace.json +20 -0
- package/README.md +443 -0
- package/bin/genesis.js +15 -0
- package/docs/assurance-model.md +26 -0
- package/docs/prompt-integration.md +98 -0
- package/docs/stack-components.md +304 -0
- package/package.json +57 -7
- package/plugins/genesis/.codex-plugin/plugin.json +19 -0
- package/plugins/genesis/hooks.json +18 -0
- package/prompts/blueprint.txt +9 -0
- package/prompts/describe.txt +17 -0
- package/prompts/deslop.txt +14 -0
- package/prompts/program.txt +12 -0
- package/prompts/reconcile.txt +12 -0
- package/prompts/review.txt +12 -0
- package/prompts/start.txt +30 -0
- package/prompts/work.txt +28 -0
- package/skills/genesis-deslop/SKILL.md +36 -0
- package/skills/genesis-deslop/agents/openai.yaml +4 -0
- package/skills/genesis-program/SKILL.md +66 -0
- package/skills/genesis-program/agents/openai.yaml +4 -0
- package/skills/genesis-project/SKILL.md +53 -0
- package/skills/genesis-project/agents/openai.yaml +4 -0
- package/src/cli.js +276 -0
- package/src/index/agent-skills.js +425 -0
- package/src/index/assets.js +19 -0
- package/src/index/blueprint.js +38 -0
- package/src/index/check.js +102 -0
- package/src/index/code-index.js +283 -0
- package/src/index/code-indexers/ast-grep.js +414 -0
- package/src/index/codex-hooks.js +367 -0
- package/src/index/codex-plugin.js +73 -0
- package/src/index/context.js +137 -0
- package/src/index/environment-files.js +19 -0
- package/src/index/errors.js +26 -0
- package/src/index/git.js +26 -0
- package/src/index/init.js +48 -0
- package/src/index/launch.js +34 -0
- package/src/index/paths.js +10 -0
- package/src/index/process.js +89 -0
- package/src/index/program.js +181 -0
- package/src/index/project-files.js +24 -0
- package/src/index/project-state.js +87 -0
- package/src/index/prompt.js +347 -0
- package/src/index/stack-catalog.js +72 -0
- package/src/index/stack-command.js +65 -0
- package/src/index/stack-composition.js +38 -0
- package/src/index/stack-environment-files.js +83 -0
- package/src/index/stack-launch.js +428 -0
- package/src/index/stack-piece.js +283 -0
- package/src/index/stack-preflight.js +25 -0
- package/src/index/stack-process.js +25 -0
- package/src/index/stack-workspace-setup.js +129 -0
- package/src/index/stack.js +302 -0
- package/src/index/utils.js +85 -0
- package/src/index/verification.js +77 -0
- package/src/index/workspace-setup.js +55 -0
- package/src/index.js +102 -0
- package/stacks/pieces/cpp.md +22 -0
- package/stacks/pieces/csharp.md +22 -0
- package/stacks/pieces/go.md +22 -0
- package/stacks/pieces/java.md +22 -0
- package/stacks/pieces/jskit-mysql.md +37 -0
- package/stacks/pieces/jskit.md +70 -0
- package/stacks/pieces/kotlin.md +22 -0
- package/stacks/pieces/mysql.md +18 -0
- package/stacks/pieces/nodejs.md +25 -0
- package/stacks/pieces/php.md +23 -0
- package/stacks/pieces/python.md +23 -0
- package/stacks/pieces/ruby.md +22 -0
- package/stacks/pieces/rust.md +22 -0
- package/stacks/pieces/shell.md +23 -0
- package/stacks/pieces/vue.md +19 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
# Stack components
|
|
2
|
+
|
|
3
|
+
Genesis core knows no framework, language, database, package manager, or
|
|
4
|
+
environment-variable name. A built-in component is one Markdown file at
|
|
5
|
+
`stacks/pieces/<id>.md`.
|
|
6
|
+
|
|
7
|
+
````markdown
|
|
8
|
+
# Stack piece: example
|
|
9
|
+
|
|
10
|
+
## Description
|
|
11
|
+
|
|
12
|
+
What this component contributes.
|
|
13
|
+
|
|
14
|
+
## Requires
|
|
15
|
+
|
|
16
|
+
- `nodejs`
|
|
17
|
+
|
|
18
|
+
## Skill
|
|
19
|
+
|
|
20
|
+
- Package: `@example/agent-docs`
|
|
21
|
+
- Path: `skills/example`
|
|
22
|
+
|
|
23
|
+
## Indexers
|
|
24
|
+
|
|
25
|
+
- `javascript`
|
|
26
|
+
|
|
27
|
+
## Resources
|
|
28
|
+
|
|
29
|
+
```json genesis-resource
|
|
30
|
+
{
|
|
31
|
+
"id": "service",
|
|
32
|
+
"environmentAlternatives": [
|
|
33
|
+
{ "required": ["SERVICE_URL"] },
|
|
34
|
+
{ "required": ["SERVICE_HOST", "SERVICE_PORT"] }
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Guidance
|
|
40
|
+
|
|
41
|
+
### Technology-specific behavior
|
|
42
|
+
|
|
43
|
+
- Concise supplemental guidance used during implementation, explanation,
|
|
44
|
+
review, and cleanup.
|
|
45
|
+
|
|
46
|
+
## Environment files
|
|
47
|
+
|
|
48
|
+
- Dotenv `.env`
|
|
49
|
+
|
|
50
|
+
## Workspace setup
|
|
51
|
+
|
|
52
|
+
- Prepare `Install dependencies` with `example-runtime`: `example-install` `--locked`
|
|
53
|
+
- Prepare `Install web dependencies` with `nodejs` in `web`: `npm` `install`
|
|
54
|
+
|
|
55
|
+
## Deslop
|
|
56
|
+
|
|
57
|
+
- Concise technology-specific cleanup guidance.
|
|
58
|
+
|
|
59
|
+
## Commands
|
|
60
|
+
|
|
61
|
+
- Verify `tests`: `npm` `test`
|
|
62
|
+
|
|
63
|
+
## Launch
|
|
64
|
+
|
|
65
|
+
### Target `app`: Run app
|
|
66
|
+
|
|
67
|
+
- Default.
|
|
68
|
+
- Workdir: `.`
|
|
69
|
+
- Preferred port: `3000`
|
|
70
|
+
- URL path: `/`
|
|
71
|
+
- Runtimes: `nodejs`
|
|
72
|
+
- Prepare `Build`: `npm` `run` `build`
|
|
73
|
+
- Serve `Start`: `npm` `run` `server` `--` `--host` `{host}` `--port` `{port}`
|
|
74
|
+
|
|
75
|
+
#### Preview identity
|
|
76
|
+
|
|
77
|
+
- Command: `.vibe64/bin/preview-identity`
|
|
78
|
+
- Protocol: `vibe64.preview-identity.command.v1`
|
|
79
|
+
- Identity types: `email` `login` `user-id`
|
|
80
|
+
- Enabled environment: `APP_PREVIEW_IDENTITY_ENABLED`
|
|
81
|
+
- Secret environment: `APP_PREVIEW_IDENTITY_SECRET`
|
|
82
|
+
- Runtimes: `nodejs`
|
|
83
|
+
- Timeout ms: `10000`
|
|
84
|
+
````
|
|
85
|
+
|
|
86
|
+
`Description` and `Requires` are the only required sections. `Requires` forms
|
|
87
|
+
dependency closure. Optional `Conflicts` uses the same list format. `Skill`
|
|
88
|
+
selects one complete [Agent Skills](https://agentskills.io) directory, either
|
|
89
|
+
from Genesis or from the declared npm package. Its `SKILL.md`, `references/`,
|
|
90
|
+
`scripts/`, `assets/`, and `agents/` metadata are copied together to
|
|
91
|
+
`.agents/skills/<skill-name>/`; the agent loads them progressively instead of
|
|
92
|
+
Genesis expanding every manual into every prompt. `Resources` declares generic
|
|
93
|
+
alternative environment-name sets reported by prompt generation and checked
|
|
94
|
+
before verification. `allowEmpty` may name a required variable whose empty
|
|
95
|
+
string is valid. `Guidance` is supplemental prose used by work, review, Program,
|
|
96
|
+
description, and cleanup prompts, as well as path-focused context. `Deslop`
|
|
97
|
+
adds cleanup-only prose to explicit cleanup and the automatic Codex cleanup
|
|
98
|
+
continuation. With no selected component, only the `genesis-deslop` skill
|
|
99
|
+
applies. `Commands` accepts only argument-safe `Verify` entries and runs only
|
|
100
|
+
through `genesis verify`.
|
|
101
|
+
|
|
102
|
+
`Workspace setup` is an optional exact, ordered recipe for a host preparing a
|
|
103
|
+
fresh workspace. Each entry uses this readable, shell-free form:
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
- Prepare `label` with `runtime` `another-runtime` in `optional/workdir` when `optional/marker` exists: `command` `argument`
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
Every command and argument is a separate backticked value and is returned as
|
|
110
|
+
an `argv` array. Runtime names are opaque technology ids. Omitted `in` means
|
|
111
|
+
the project root; otherwise the working directory must be canonical and
|
|
112
|
+
project-relative. The optional `when` path is also canonical and
|
|
113
|
+
project-relative. Until it exists, inspection reports the recipe as
|
|
114
|
+
`unconfigured`; this lets a host safely re-inspect after an agent creates a
|
|
115
|
+
technology substrate without knowing that technology's filenames. `- Nothing.`
|
|
116
|
+
is valid only as the entire section and lets a
|
|
117
|
+
project explicitly disable component setup. Genesis validates and reports the
|
|
118
|
+
recipe but never chooses a runtime, runs a command, installs a dependency, or
|
|
119
|
+
infers a package manager. Generic language pieces such as `nodejs` and `php`
|
|
120
|
+
therefore declare no installer; a concrete piece such as `jskit` may declare
|
|
121
|
+
one.
|
|
122
|
+
|
|
123
|
+
Precedence is intentionally small and deterministic:
|
|
124
|
+
|
|
125
|
+
1. A project `## Workspace setup` section in `genesis/stack.md` replaces every
|
|
126
|
+
selected component default.
|
|
127
|
+
2. Without a project section, exactly one selected component recipe is used.
|
|
128
|
+
3. With no declaration the result is `unconfigured`; with several component
|
|
129
|
+
recipes it is `blocked` as ambiguous. Genesis never merges them.
|
|
130
|
+
|
|
131
|
+
General Stack resources do not gate Workspace setup. In particular, missing
|
|
132
|
+
database variables do not prevent an otherwise independent dependency install.
|
|
133
|
+
|
|
134
|
+
`Environment files` optionally declares project-relative dotenv projections a
|
|
135
|
+
host may materialize from its own resolved project environment. Genesis
|
|
136
|
+
validates and returns only the format and path; it never reads environment
|
|
137
|
+
values, writes a file, stores a secret, or chooses which variables belong in a
|
|
138
|
+
projection. A project `## Environment files` section in `genesis/stack.md`
|
|
139
|
+
replaces component declarations, including with `- Nothing.`. Without a
|
|
140
|
+
project section, component declarations compose and identical paths collapse.
|
|
141
|
+
The declaration is useful independently of Launch and Workspace setup.
|
|
142
|
+
|
|
143
|
+
`Launch` is an optional readable declarative recipe for hosts that need to
|
|
144
|
+
offer a preview without guessing how a concrete technology starts. Repeat a
|
|
145
|
+
``### Target `id`: label`` block to declare several targets. Default, Workdir,
|
|
146
|
+
Preferred port, URL path, and Runtimes are optional; their normalized defaults
|
|
147
|
+
are false, `.`, null, `/`, and no runtime requirements. Every Prepare or Serve
|
|
148
|
+
command and argument is a separate backticked value returned as an `argv`
|
|
149
|
+
array, never a shell program. A target has exactly one final Serve step; any
|
|
150
|
+
earlier steps must be Prepare steps. Workdir is canonical and project-relative,
|
|
151
|
+
Preferred port is only a hint from 1024 through 65535, and URL path is an
|
|
152
|
+
application path rather than a URL. The only substitutions are `{host}` and
|
|
153
|
+
`{port}`, supplied by the host. A project can use `- Nothing.` as its complete
|
|
154
|
+
Launch section to disable component targets.
|
|
155
|
+
|
|
156
|
+
Genesis validates and reports Launch data but does not select a runtime,
|
|
157
|
+
reserve a port, start a process, decide readiness, or control a browser.
|
|
158
|
+
|
|
159
|
+
The optional `#### Preview identity` block is specific to hosts that implement
|
|
160
|
+
the declared `vibe64.preview-identity.command.v1` protocol. Its executable is a
|
|
161
|
+
committed, application-owned file immediately below `.vibe64/bin`; the
|
|
162
|
+
normalized command is an argv array, not a shell program. Identity types may
|
|
163
|
+
contain `email`, `login`, and `user-id`. Enabled environment and Secret
|
|
164
|
+
environment are optional variable
|
|
165
|
+
names the application recognizes; Genesis validates and returns names only and
|
|
166
|
+
never reads or returns their values. Runtimes lists opaque runtimes required
|
|
167
|
+
to execute this command, independently of the server target requirements, and
|
|
168
|
+
Timeout ms defaults to 10000 with a maximum of 30000. Genesis does not execute
|
|
169
|
+
the command, select identities, provide secrets, authenticate users, or control
|
|
170
|
+
the browser. Those remain host responsibilities.
|
|
171
|
+
|
|
172
|
+
`runtimeRequirements` contains opaque technology ids. A host explicitly maps
|
|
173
|
+
the ids it supports to its own pinned runtime packs; for example, it may map
|
|
174
|
+
`nodejs` to its Node 26 pack. Genesis never chooses versions, expands
|
|
175
|
+
dependencies such as `composer`, or treats an unknown id as something similar.
|
|
176
|
+
Declare each independently required runtime. Generic language pieces such as
|
|
177
|
+
`nodejs` and `php` provide no Launch recipe. A concrete piece such as `jskit`
|
|
178
|
+
may declare one; Genesis does not invent missing targets.
|
|
179
|
+
|
|
180
|
+
`Indexers` selects installed structural adapters for the derived Machine City.
|
|
181
|
+
The shared ast-grep engine owns traversal, bounds, diagnostics, JSON, and
|
|
182
|
+
queries; each adapter owns only language extensions, callable syntax, names,
|
|
183
|
+
containers, signatures, and public/internal visibility. Several Stack pieces
|
|
184
|
+
may contribute indexers, and duplicates are collapsed. Index output is
|
|
185
|
+
navigation data, not proof that every dynamic callable or framework edge was
|
|
186
|
+
discovered.
|
|
187
|
+
|
|
188
|
+
Do not create a Genesis-owned generic skill merely because a component is
|
|
189
|
+
named `nodejs`, `php`, or another common technology. Official, user, and host
|
|
190
|
+
skills with those names must coexist normally. Use `## Skill` only for an
|
|
191
|
+
authoritative directory this Stack component selects; put concise supplemental
|
|
192
|
+
rules in `## Guidance` and cleanup-only additions in `## Deslop`.
|
|
193
|
+
|
|
194
|
+
A selected component may have one project customization at
|
|
195
|
+
`genesis/stack/<id>.md`:
|
|
196
|
+
|
|
197
|
+
```markdown
|
|
198
|
+
# Stack customization: example
|
|
199
|
+
|
|
200
|
+
## Add
|
|
201
|
+
|
|
202
|
+
### Description
|
|
203
|
+
|
|
204
|
+
Additional project context.
|
|
205
|
+
|
|
206
|
+
### Guidance
|
|
207
|
+
|
|
208
|
+
- Additional implementation, explanation, review, and cleanup guidance.
|
|
209
|
+
|
|
210
|
+
### Deslop
|
|
211
|
+
|
|
212
|
+
- Additional cleanup guidance.
|
|
213
|
+
|
|
214
|
+
## Override
|
|
215
|
+
|
|
216
|
+
### Description
|
|
217
|
+
|
|
218
|
+
Replacement component description.
|
|
219
|
+
|
|
220
|
+
### Guidance
|
|
221
|
+
|
|
222
|
+
- Replacement installed general guidance.
|
|
223
|
+
|
|
224
|
+
### Deslop
|
|
225
|
+
|
|
226
|
+
- Replacement cleanup guidance.
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Each field is optional. `Override` replaces only that installed field; `Add`
|
|
230
|
+
then follows the installed or overridden value. These files cannot alter
|
|
231
|
+
dependencies, conflicts, Agent Skill source, indexers, resources, environment
|
|
232
|
+
files, commands, Workspace setup, or Launch declarations.
|
|
233
|
+
`genesis stack add` preserves the files and composes their effective prose after
|
|
234
|
+
dependency resolution.
|
|
235
|
+
|
|
236
|
+
A project may select component ids in `genesis/stack.md`, replace component
|
|
237
|
+
environment-file declarations, replace component Workspace setup defaults
|
|
238
|
+
with one project recipe, replace component Verify defaults with its own
|
|
239
|
+
`## Commands`, and replace every component Launch target with one project
|
|
240
|
+
`## Launch` contract. With no project Launch section, selected component
|
|
241
|
+
targets compose; duplicate ids or multiple defaults are rejected rather than
|
|
242
|
+
guessed. `genesis stack add` preserves existing project Environment files,
|
|
243
|
+
Workspace setup, and Launch sections. Adding another language, framework,
|
|
244
|
+
database, or integration is therefore an isolated Stack/indexer contribution
|
|
245
|
+
rather than a prompt or controller special case.
|
|
246
|
+
|
|
247
|
+
Description, Guidance, Agent Skill, and Deslop prose are instructions, not
|
|
248
|
+
verification evidence. Changes to them do not stale an exact successful
|
|
249
|
+
verification record; selected component ids, resources, environment files,
|
|
250
|
+
Workspace setup, launch targets, and verification commands remain part of the
|
|
251
|
+
Stack identity.
|
|
252
|
+
|
|
253
|
+
Hosts inspect normalized environment requirements independently:
|
|
254
|
+
|
|
255
|
+
```js
|
|
256
|
+
import { inspectEnvironment } from 'genesis-compiler';
|
|
257
|
+
|
|
258
|
+
const projectEnvironment = await inspectEnvironment({ environment, projectRoot });
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
The result has `status` (`ready`, `missing-inputs`, or `unconfigured`),
|
|
262
|
+
`stackHash`, selected `components`, declared `resources`, value-free
|
|
263
|
+
`diagnostics`, and normalized `files`. Each file contains `format`, `path`, and
|
|
264
|
+
`source`. Environment values never cross this API boundary.
|
|
265
|
+
|
|
266
|
+
Fresh-workspace hosts read setup from the package root:
|
|
267
|
+
|
|
268
|
+
```js
|
|
269
|
+
import { inspectWorkspaceSetup } from 'genesis-compiler';
|
|
270
|
+
|
|
271
|
+
const setup = await inspectWorkspaceSetup({ projectRoot, environment });
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The setup result has `status` (`ready`, `blocked`, or `unconfigured`),
|
|
275
|
+
`stackHash`, an exact ready-recipe `recipeHash`, selected `components`, its `source`, distinct
|
|
276
|
+
`runtimeRequirements`, normalized ordered `steps`, and `diagnostics`. Each step
|
|
277
|
+
contains `label`, `argv`, `runtimeRequirements`, `workdir`, and an optional
|
|
278
|
+
`readyWhen` project path. `blocked` means component recipes conflict, not that
|
|
279
|
+
an unrelated Stack resource is absent. An absent `readyWhen` marker produces
|
|
280
|
+
the unconfigured diagnostic `STACK_WORKSPACE_SETUP_WAITING`, never a failed or
|
|
281
|
+
blocked result.
|
|
282
|
+
The optional environment object is accepted for a consistent host inspection
|
|
283
|
+
boundary, but Workspace setup v1 neither reads nor returns its values.
|
|
284
|
+
|
|
285
|
+
Preview hosts read the normalized Launch contract independently:
|
|
286
|
+
|
|
287
|
+
```js
|
|
288
|
+
import { inspectLaunch } from 'genesis-compiler';
|
|
289
|
+
|
|
290
|
+
const launch = await inspectLaunch({ projectRoot, environment });
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
The result has `status` (`ready`, `blocked`, or `unconfigured`), `stackHash`,
|
|
294
|
+
selected `components`, distinct `runtimeRequirements`, declared `resources`,
|
|
295
|
+
normalized `targets`, and resource `diagnostics`. Each target reports its
|
|
296
|
+
`source`, `available`, and `disabledReason`, plus its normalized
|
|
297
|
+
`previewIdentity` declaration when present. Environment values are inspected
|
|
298
|
+
but never returned. Here, `available` means only that the Stack's declared
|
|
299
|
+
resource inputs are present: the host must still reject runtime requirements it
|
|
300
|
+
cannot map. `unconfigured` means there are no targets, `blocked` means declared
|
|
301
|
+
resource inputs are missing, and `ready` means neither condition applies. The
|
|
302
|
+
caller still owns exact runtimes, port allocation, process lifecycle, readiness
|
|
303
|
+
and proxy policy, identity selection and command execution, secrets, browser
|
|
304
|
+
binaries, Git, and credentials.
|
package/package.json
CHANGED
|
@@ -1,12 +1,62 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesis-compiler",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "An agent-independent prompt, multi-language code-index, cleanup, and verification companion with optional Codex hooks.",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/mobily-enterprises/genesis-compiler.git"
|
|
9
|
+
},
|
|
10
|
+
"bugs": {
|
|
11
|
+
"url": "https://github.com/mobily-enterprises/genesis-compiler/issues"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://github.com/mobily-enterprises/genesis-compiler#readme",
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=22"
|
|
16
|
+
},
|
|
17
|
+
"bin": {
|
|
18
|
+
"genesis": "bin/genesis.js"
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
".": "./src/index.js",
|
|
22
|
+
"./cli": "./src/cli.js"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
".agents/plugins/marketplace.json",
|
|
26
|
+
"bin",
|
|
27
|
+
"docs/assurance-model.md",
|
|
28
|
+
"docs/stack-components.md",
|
|
29
|
+
"docs/prompt-integration.md",
|
|
30
|
+
"prompts/blueprint.txt",
|
|
31
|
+
"prompts/describe.txt",
|
|
32
|
+
"prompts/deslop.txt",
|
|
33
|
+
"prompts/program.txt",
|
|
34
|
+
"prompts/reconcile.txt",
|
|
35
|
+
"prompts/review.txt",
|
|
36
|
+
"prompts/start.txt",
|
|
37
|
+
"prompts/work.txt",
|
|
38
|
+
"plugins/genesis",
|
|
39
|
+
"skills",
|
|
40
|
+
"src",
|
|
41
|
+
"stacks/pieces"
|
|
42
|
+
],
|
|
9
43
|
"scripts": {
|
|
10
|
-
"test": "
|
|
44
|
+
"test": "node --test test/*.test.js"
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"@ast-grep/lang-bash": "^0.0.8",
|
|
48
|
+
"@ast-grep/lang-c": "^0.0.6",
|
|
49
|
+
"@ast-grep/lang-cpp": "^0.0.6",
|
|
50
|
+
"@ast-grep/lang-csharp": "^0.0.6",
|
|
51
|
+
"@ast-grep/lang-go": "^0.0.6",
|
|
52
|
+
"@ast-grep/lang-java": "^0.0.7",
|
|
53
|
+
"@ast-grep/lang-kotlin": "^0.0.7",
|
|
54
|
+
"@ast-grep/lang-php": "^0.0.7",
|
|
55
|
+
"@ast-grep/lang-python": "^0.0.6",
|
|
56
|
+
"@ast-grep/lang-ruby": "^0.0.7",
|
|
57
|
+
"@ast-grep/lang-rust": "^0.0.7",
|
|
58
|
+
"@ast-grep/napi": "^0.45.1",
|
|
59
|
+
"@jskit-ai/agent-docs": "0.1.131",
|
|
60
|
+
"yaml": "^2.9.0"
|
|
11
61
|
}
|
|
12
62
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "genesis",
|
|
3
|
+
"version": "1.2.0",
|
|
4
|
+
"description": "Makes Codex aware of optional Genesis adoption for existing projects.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Mobily Enterprises"
|
|
7
|
+
},
|
|
8
|
+
"interface": {
|
|
9
|
+
"displayName": "Genesis",
|
|
10
|
+
"shortDescription": "Discover and adopt Genesis project explanations.",
|
|
11
|
+
"longDescription": "Recommends the optional Genesis explanatory layer when Codex opens an existing project that has not adopted it.",
|
|
12
|
+
"developerName": "Mobily Enterprises",
|
|
13
|
+
"category": "Productivity",
|
|
14
|
+
"capabilities": ["Read"],
|
|
15
|
+
"defaultPrompt": [
|
|
16
|
+
"Adopt Genesis in this existing project"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"SessionStart": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "^(startup|resume)$",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "if command -v genesis >/dev/null 2>&1; then genesis hook discover; fi",
|
|
10
|
+
"commandWindows": "genesis hook discover",
|
|
11
|
+
"timeout": 3,
|
|
12
|
+
"additionalContextLimit": 1200
|
|
13
|
+
}
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-program/SKILL.md` completely, operating
|
|
2
|
+
in Blueprint-only mode.
|
|
3
|
+
|
|
4
|
+
Update `genesis/blueprint.md` from the explicit user intent supplied below.
|
|
5
|
+
Preserve existing intent unless the user changes it. Edit no other file. Do not
|
|
6
|
+
infer product requirements from accidental implementation behavior. Keep one
|
|
7
|
+
short, cohesive, non-technical Blueprint rather than a change log.
|
|
8
|
+
|
|
9
|
+
When finished, summarize the intent that changed.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-program/SKILL.md` completely, operating
|
|
2
|
+
in initial-description mode.
|
|
3
|
+
|
|
4
|
+
Create or refresh the complete explanatory Blueprint and useful Program for the
|
|
5
|
+
codebase that exists now. Read implementation, tests, user-facing documentation,
|
|
6
|
+
current Blueprint, and current Program. Prefer explicit user guidance; otherwise
|
|
7
|
+
infer conservatively from observable behavior supported by code and tests.
|
|
8
|
+
Use Machine City as a navigation aid when available, but verify relevant source
|
|
9
|
+
directly rather than treating the derived index as authority.
|
|
10
|
+
|
|
11
|
+
If the codebase is too large for one careful pass, use subagents as you judge
|
|
12
|
+
appropriate, reconcile their findings, and remain responsible for one coherent
|
|
13
|
+
result. Identify anything not inspected or genuinely uncertain.
|
|
14
|
+
|
|
15
|
+
Edit only `genesis/blueprint.md` and explanatory Markdown below
|
|
16
|
+
`genesis/program/`. Summarize every explanatory file created, updated, or
|
|
17
|
+
removed.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-deslop/SKILL.md` completely.
|
|
2
|
+
|
|
3
|
+
This is a dedicated behavior-preserving cleanup task, separate from
|
|
4
|
+
implementation. Review the requested scope, or otherwise the ordinary Git diff
|
|
5
|
+
and immediately related code. Apply every selected Stack cleanup instruction
|
|
6
|
+
supplied below and load applicable official technology skills for additional
|
|
7
|
+
language and framework context.
|
|
8
|
+
|
|
9
|
+
Use `.genesis/machine-city.json` and `genesis index <name-or-path>` to find
|
|
10
|
+
existing public and internal functions. Remove or consolidate genuine repeated
|
|
11
|
+
helpers, but confirm behavior and call sites in source before changing them.
|
|
12
|
+
|
|
13
|
+
Do not broaden the product change. Run focused checks when useful and summarize
|
|
14
|
+
what became simpler, files changed, and checks actually run.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-program/SKILL.md` completely, operating
|
|
2
|
+
in complete Program-refresh mode.
|
|
3
|
+
|
|
4
|
+
Explain the code that currently exists using the smallest useful
|
|
5
|
+
subsystem-oriented Program. Read implementation, tests, Blueprint, and current
|
|
6
|
+
Program material. Use Machine City as a navigation aid, then verify relevant
|
|
7
|
+
source directly. Edit only explanatory Markdown below `genesis/program/`.
|
|
8
|
+
Delete stale or duplicate modules and do not edit code, tests, configuration,
|
|
9
|
+
Blueprint, Stack, or `.genesis/`.
|
|
10
|
+
|
|
11
|
+
When finished, summarize Program files created, updated, or removed and report
|
|
12
|
+
genuine ambiguity.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-program/SKILL.md` completely, operating
|
|
2
|
+
in focused post-change reconciliation mode.
|
|
3
|
+
|
|
4
|
+
Use the preceding implementation turn, listed changed paths, actual Git diff or
|
|
5
|
+
history, and relevant tests. Update Blueprint only for intentional observable
|
|
6
|
+
product behavior. Update only affected Program modules. Private restructuring
|
|
7
|
+
may require only Sources or an informational Implementation map, and may require
|
|
8
|
+
no explanatory edit at all.
|
|
9
|
+
|
|
10
|
+
Do not simplify or edit implementation, tests, configuration, dependencies,
|
|
11
|
+
Stack, or `.genesis/` during this turn. Do not run Deslop yet. Summarize every
|
|
12
|
+
explanatory change and genuine ambiguity.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Read `.agents/skills/genesis-project/SKILL.md` and
|
|
2
|
+
`.agents/skills/genesis-program/SKILL.md` completely, then perform a read-only
|
|
3
|
+
review.
|
|
4
|
+
|
|
5
|
+
Compare Blueprint intent, observable implementation, tests, Program public
|
|
6
|
+
contracts, informational implementation maps, and recorded verification in both
|
|
7
|
+
directions. Identify missing or contradictory behavior, misleading explanation,
|
|
8
|
+
unnecessarily difficult public shape, and verification gaps. Distinguish direct
|
|
9
|
+
evidence from inference and state questions that require human intent.
|
|
10
|
+
|
|
11
|
+
Do not edit any file. Return a concise report ordered by impact with exact file
|
|
12
|
+
references, the evidence inspected, and the smallest sensible correction.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-project/SKILL.md` completely.
|
|
2
|
+
|
|
3
|
+
This is the project-opening conversation. Do not begin implementation until
|
|
4
|
+
the product direction and any technology choice needed for the first useful
|
|
5
|
+
step are clear.
|
|
6
|
+
|
|
7
|
+
When `projectKind` is `new`, first ask what the app is about. Ask up to three
|
|
8
|
+
concise, high-impact questions at a time. Use `availableStackPieces` to present
|
|
9
|
+
only the relevant choices, explain them in product language, and let the user
|
|
10
|
+
decide. Never silently select a technology. After an explicit choice, use
|
|
11
|
+
`genesis stack add <piece...>`; do not edit `genesis/stack.md` by hand. Establish
|
|
12
|
+
the non-technical Blueprint from the user's answers before implementation.
|
|
13
|
+
If the product direction becomes clear while Stack is still empty, do not end
|
|
14
|
+
the turn after only writing or summarizing the Blueprint: present the relevant
|
|
15
|
+
Stack choices in that same turn and ask the user to select one explicitly.
|
|
16
|
+
|
|
17
|
+
When `projectKind` is `existing`, ask what the user wants to understand or
|
|
18
|
+
change. Use the current Blueprint, Stack, Program, and code index when present.
|
|
19
|
+
If the existing implementation is not yet explained, recommend the Genesis
|
|
20
|
+
description/adoption path instead of pretending its intent is known.
|
|
21
|
+
|
|
22
|
+
When `projectKind` is `existing-uninitialized`, ask what the user wants to
|
|
23
|
+
understand or change and strongly recommend `genesis adopt` before substantial
|
|
24
|
+
work. Explain that adoption preserves the implementation and prepares the
|
|
25
|
+
Blueprint and Program prompt. Do not run it without the user's approval. If the
|
|
26
|
+
user declines, continue normally and do not repeat the recommendation.
|
|
27
|
+
|
|
28
|
+
If the request already contains an unambiguous product description and an
|
|
29
|
+
explicit Stack choice, you may apply that choice and establish the Blueprint.
|
|
30
|
+
Otherwise this is a conversational turn: ask, listen, and preserve the source.
|
package/prompts/work.txt
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Read and follow `.agents/skills/genesis-project/SKILL.md` completely, then
|
|
2
|
+
implement the request in the ordinary local Git tree.
|
|
3
|
+
|
|
4
|
+
Load the applicable official or project technology skills listed below. Use
|
|
5
|
+
their normal generators, commands, packages, and established seams. Do not
|
|
6
|
+
search package internals or unrelated manuals merely to reconfirm an exact lane.
|
|
7
|
+
Before adding a helper or public operation, query `genesis index <name-or-path>`
|
|
8
|
+
and reuse an existing function when it already owns the behavior.
|
|
9
|
+
|
|
10
|
+
This is the implementation turn. Do not edit the Blueprint, Program, or
|
|
11
|
+
`.genesis/`; the separate reconciliation turn owns explanatory changes. Keep an
|
|
12
|
+
exact Stack `## Launch` declaration aligned when the implementation establishes
|
|
13
|
+
or intentionally changes how the project is started or how Vibe64 may request
|
|
14
|
+
an application preview identity. Declare only command paths, protocol, supported
|
|
15
|
+
identity types, environment variable names, runtimes, and timeout policy; never
|
|
16
|
+
put an environment value or secret in Stack. Never invent missing external-resource
|
|
17
|
+
values. Preserve useful work and report a genuinely missing resource instead of
|
|
18
|
+
constructing a parallel fallback.
|
|
19
|
+
|
|
20
|
+
Run focused checks when useful. Summarize files changed, checks actually run,
|
|
21
|
+
and anything still requiring attention.
|
|
22
|
+
|
|
23
|
+
If no Stack components are selected, continue the project-opening
|
|
24
|
+
conversation instead of guessing a technology. Use `genesis stack list` for
|
|
25
|
+
the current catalog, present relevant choices, wait for an explicit decision,
|
|
26
|
+
and add the selection with `genesis stack add <piece...>` before relying on
|
|
27
|
+
technology-specific setup or launch behavior. Do not end after only updating
|
|
28
|
+
or summarizing the Blueprint while the Stack remains empty.
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-deslop
|
|
3
|
+
description: Perform a separate behavior-preserving cleanup pass after implementation. Use when asked to Deslop, simplify, remove repeated helpers, clarify ownership, or align changed code with established project and technology patterns.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genesis Deslop
|
|
7
|
+
|
|
8
|
+
Review and simplify the current local codebase without changing product
|
|
9
|
+
behavior. Start with the requested scope, or otherwise the ordinary Git diff
|
|
10
|
+
and the code immediately around it.
|
|
11
|
+
|
|
12
|
+
Consult `.genesis/machine-city.json` or run `genesis index <name-or-path>` to
|
|
13
|
+
find existing public and internal functions before introducing or consolidating
|
|
14
|
+
an abstraction. Confirm every apparent duplicate in source and its call sites.
|
|
15
|
+
|
|
16
|
+
Leave no repeated helpers, no code that is unclear or hard to reason about, no
|
|
17
|
+
obviously wrong code, and no code that goes against best practices or
|
|
18
|
+
established patterns in the codebase. Remove unnecessary wrappers, abandoned
|
|
19
|
+
scaffolding, parallel framework plumbing, and speculative abstractions.
|
|
20
|
+
Consolidate ownership where one clear module is enough. Do not optimize for tiny
|
|
21
|
+
files or indirection; optimize for a small, obvious design that a junior
|
|
22
|
+
programmer can follow.
|
|
23
|
+
|
|
24
|
+
Apply every technology-specific Deslop instruction supplied by the selected
|
|
25
|
+
Stack. Load applicable official technology skills for additional framework and
|
|
26
|
+
language context, but do not expect them to contain Genesis's cleanup policy.
|
|
27
|
+
|
|
28
|
+
You may edit or delete implementation and test files when that is the clearest
|
|
29
|
+
behavior-preserving cleanup. Do not edit `genesis/`, `.genesis/`, Git metadata,
|
|
30
|
+
dependency directories, generated build output, retained migration history, or
|
|
31
|
+
external resources. Do not weaken tests, public behavior, or data guarantees.
|
|
32
|
+
Do not create a second architecture or perform unrelated rewrites.
|
|
33
|
+
|
|
34
|
+
Run focused checks when useful. Final declared checks remain available through
|
|
35
|
+
`genesis verify`. Summarize what became simpler, files changed, and checks
|
|
36
|
+
actually run.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-program
|
|
3
|
+
description: Create, reconcile, or review the explanatory Blueprint and subsystem-oriented Program of a Genesis project. Use when adopting a codebase, documenting public operations, or updating explanations after implementation changes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genesis Blueprint and Program
|
|
7
|
+
|
|
8
|
+
Blueprint and Program are maintained explanations, not proof, ownership, or an
|
|
9
|
+
exhaustive semantic model.
|
|
10
|
+
|
|
11
|
+
## Blueprint
|
|
12
|
+
|
|
13
|
+
`genesis/blueprint.md` is a short, cohesive, non-technical description of what
|
|
14
|
+
the product should do. Prefer explicit user intent. Do not mention frameworks,
|
|
15
|
+
packages, route spellings, schemas, source files, implementation plans, tests,
|
|
16
|
+
or private architecture.
|
|
17
|
+
|
|
18
|
+
Update Blueprint after implementation only when the change intentionally adds,
|
|
19
|
+
removes, or alters observable product behavior. Never turn an accident, bug,
|
|
20
|
+
private design choice, or ambiguity into product intent.
|
|
21
|
+
|
|
22
|
+
## Program
|
|
23
|
+
|
|
24
|
+
Organize Program beneath conceptual subsystem directories:
|
|
25
|
+
|
|
26
|
+
```text
|
|
27
|
+
genesis/program/billing/invoices.md
|
|
28
|
+
genesis/program/authentication/sessions.md
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Create one module for each meaningful public operation provided by a subsystem,
|
|
32
|
+
regardless of language or source layout. Public operations include exported
|
|
33
|
+
functions or methods, API actions, commands, UI operations, and other observable
|
|
34
|
+
entry points. Do not mirror source files or document every helper.
|
|
35
|
+
|
|
36
|
+
Each module contains:
|
|
37
|
+
|
|
38
|
+
```markdown
|
|
39
|
+
# Human-readable boundary name
|
|
40
|
+
|
|
41
|
+
One short explanation of why the boundary exists.
|
|
42
|
+
|
|
43
|
+
## Sources
|
|
44
|
+
|
|
45
|
+
- `exact/authored/source/path`
|
|
46
|
+
|
|
47
|
+
## Public contract
|
|
48
|
+
|
|
49
|
+
Meaningful inputs, outputs, effects, failures, and guarantees.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
An optional `## Implementation map` may name only private helpers or seams that
|
|
53
|
+
materially help a future agent change, trace, or debug the operation. It is
|
|
54
|
+
informational, not a public guarantee. Tests are evidence and never
|
|
55
|
+
implementation Sources.
|
|
56
|
+
|
|
57
|
+
Prefer fewer, clearer modules. Remove stale and duplicate explanations. A
|
|
58
|
+
source may support several operations; helper and glue files may appear in no
|
|
59
|
+
Program module.
|
|
60
|
+
|
|
61
|
+
## Task boundaries
|
|
62
|
+
|
|
63
|
+
The caller determines whether this is initial description, complete Program
|
|
64
|
+
refresh, focused post-change reconciliation, Blueprint-only work, or read-only
|
|
65
|
+
review. Respect the caller's edit boundary. Report ambiguity rather than
|
|
66
|
+
inventing intent.
|