genesis-compiler 1.0.0 → 1.1.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.
Files changed (70) hide show
  1. package/.agents/plugins/marketplace.json +20 -0
  2. package/README.md +423 -0
  3. package/bin/genesis.js +15 -0
  4. package/docs/assurance-model.md +26 -0
  5. package/docs/prompt-integration.md +92 -0
  6. package/docs/stack-components.md +269 -0
  7. package/package.json +56 -7
  8. package/plugins/genesis/.codex-plugin/plugin.json +19 -0
  9. package/plugins/genesis/hooks.json +18 -0
  10. package/prompts/blueprint.txt +9 -0
  11. package/prompts/describe.txt +17 -0
  12. package/prompts/deslop.txt +14 -0
  13. package/prompts/program.txt +12 -0
  14. package/prompts/reconcile.txt +12 -0
  15. package/prompts/review.txt +12 -0
  16. package/prompts/work.txt +21 -0
  17. package/skills/genesis-deslop/SKILL.md +36 -0
  18. package/skills/genesis-deslop/agents/openai.yaml +4 -0
  19. package/skills/genesis-program/SKILL.md +66 -0
  20. package/skills/genesis-program/agents/openai.yaml +4 -0
  21. package/skills/genesis-project/SKILL.md +53 -0
  22. package/skills/genesis-project/agents/openai.yaml +4 -0
  23. package/src/cli.js +276 -0
  24. package/src/index/agent-skills.js +425 -0
  25. package/src/index/assets.js +18 -0
  26. package/src/index/blueprint.js +38 -0
  27. package/src/index/check.js +102 -0
  28. package/src/index/code-index.js +283 -0
  29. package/src/index/code-indexers/ast-grep.js +414 -0
  30. package/src/index/codex-hooks.js +367 -0
  31. package/src/index/codex-plugin.js +73 -0
  32. package/src/index/context.js +137 -0
  33. package/src/index/errors.js +26 -0
  34. package/src/index/git.js +26 -0
  35. package/src/index/init.js +48 -0
  36. package/src/index/launch.js +34 -0
  37. package/src/index/paths.js +10 -0
  38. package/src/index/process.js +78 -0
  39. package/src/index/program.js +181 -0
  40. package/src/index/project-files.js +24 -0
  41. package/src/index/project-state.js +87 -0
  42. package/src/index/prompt.js +239 -0
  43. package/src/index/stack-catalog.js +72 -0
  44. package/src/index/stack-command.js +65 -0
  45. package/src/index/stack-composition.js +38 -0
  46. package/src/index/stack-launch.js +428 -0
  47. package/src/index/stack-piece.js +277 -0
  48. package/src/index/stack-preflight.js +25 -0
  49. package/src/index/stack-process.js +25 -0
  50. package/src/index/stack-workspace-setup.js +117 -0
  51. package/src/index/stack.js +272 -0
  52. package/src/index/utils.js +85 -0
  53. package/src/index/verification.js +77 -0
  54. package/src/index/workspace-setup.js +30 -0
  55. package/src/index.js +97 -0
  56. package/stacks/pieces/cpp.md +22 -0
  57. package/stacks/pieces/csharp.md +22 -0
  58. package/stacks/pieces/go.md +22 -0
  59. package/stacks/pieces/java.md +22 -0
  60. package/stacks/pieces/jskit-mysql.md +37 -0
  61. package/stacks/pieces/jskit.md +66 -0
  62. package/stacks/pieces/kotlin.md +22 -0
  63. package/stacks/pieces/mysql.md +18 -0
  64. package/stacks/pieces/nodejs.md +25 -0
  65. package/stacks/pieces/php.md +23 -0
  66. package/stacks/pieces/python.md +23 -0
  67. package/stacks/pieces/ruby.md +22 -0
  68. package/stacks/pieces/rust.md +22 -0
  69. package/stacks/pieces/shell.md +23 -0
  70. package/stacks/pieces/vue.md +19 -0
@@ -0,0 +1,269 @@
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
+ ## Workspace setup
47
+
48
+ - Prepare `Install dependencies` with `example-runtime`: `example-install` `--locked`
49
+ - Prepare `Install web dependencies` with `nodejs` in `web`: `npm` `install`
50
+
51
+ ## Deslop
52
+
53
+ - Concise technology-specific cleanup guidance.
54
+
55
+ ## Commands
56
+
57
+ - Verify `tests`: `npm` `test`
58
+
59
+ ## Launch
60
+
61
+ ### Target `app`: Run app
62
+
63
+ - Default.
64
+ - Workdir: `.`
65
+ - Preferred port: `3000`
66
+ - URL path: `/`
67
+ - Runtimes: `nodejs`
68
+ - Prepare `Build`: `npm` `run` `build`
69
+ - Serve `Start`: `npm` `run` `server` `--` `--host` `{host}` `--port` `{port}`
70
+
71
+ #### Preview identity
72
+
73
+ - Command: `.vibe64/bin/preview-identity`
74
+ - Protocol: `vibe64.preview-identity.command.v1`
75
+ - Identity types: `email` `login` `user-id`
76
+ - Enabled environment: `APP_PREVIEW_IDENTITY_ENABLED`
77
+ - Secret environment: `APP_PREVIEW_IDENTITY_SECRET`
78
+ - Runtimes: `nodejs`
79
+ - Timeout ms: `10000`
80
+ ````
81
+
82
+ `Description` and `Requires` are the only required sections. `Requires` forms
83
+ dependency closure. Optional `Conflicts` uses the same list format. `Skill`
84
+ selects one complete [Agent Skills](https://agentskills.io) directory, either
85
+ from Genesis or from the declared npm package. Its `SKILL.md`, `references/`,
86
+ `scripts/`, `assets/`, and `agents/` metadata are copied together to
87
+ `.agents/skills/<skill-name>/`; the agent loads them progressively instead of
88
+ Genesis expanding every manual into every prompt. `Resources` declares generic
89
+ alternative environment-name sets reported by prompt generation and checked
90
+ before verification. `allowEmpty` may name a required variable whose empty
91
+ string is valid. `Guidance` is supplemental prose used by work, review, Program,
92
+ description, and cleanup prompts, as well as path-focused context. `Deslop`
93
+ adds cleanup-only prose to explicit cleanup and the automatic Codex cleanup
94
+ continuation. With no selected component, only the `genesis-deslop` skill
95
+ applies. `Commands` accepts only argument-safe `Verify` entries and runs only
96
+ through `genesis verify`.
97
+
98
+ `Workspace setup` is an optional exact, ordered recipe for a host preparing a
99
+ fresh workspace. Each entry uses this readable, shell-free form:
100
+
101
+ ```markdown
102
+ - Prepare `label` with `runtime` `another-runtime` in `optional/workdir`: `command` `argument`
103
+ ```
104
+
105
+ Every command and argument is a separate backticked value and is returned as
106
+ an `argv` array. Runtime names are opaque technology ids. Omitted `in` means
107
+ the project root; otherwise the working directory must be canonical and
108
+ project-relative. `- Nothing.` is valid only as the entire section and lets a
109
+ project explicitly disable component setup. Genesis validates and reports the
110
+ recipe but never chooses a runtime, runs a command, installs a dependency, or
111
+ infers a package manager. Generic language pieces such as `nodejs` and `php`
112
+ therefore declare no installer; a concrete piece such as `jskit` may declare
113
+ one.
114
+
115
+ Precedence is intentionally small and deterministic:
116
+
117
+ 1. A project `## Workspace setup` section in `genesis/stack.md` replaces every
118
+ selected component default.
119
+ 2. Without a project section, exactly one selected component recipe is used.
120
+ 3. With no declaration the result is `unconfigured`; with several component
121
+ recipes it is `blocked` as ambiguous. Genesis never merges them.
122
+
123
+ General Stack resources do not gate Workspace setup. In particular, missing
124
+ database variables do not prevent an otherwise independent dependency install.
125
+
126
+ `Launch` is an optional readable declarative recipe for hosts that need to
127
+ offer a preview without guessing how a concrete technology starts. Repeat a
128
+ ``### Target `id`: label`` block to declare several targets. Default, Workdir,
129
+ Preferred port, URL path, and Runtimes are optional; their normalized defaults
130
+ are false, `.`, null, `/`, and no runtime requirements. Every Prepare or Serve
131
+ command and argument is a separate backticked value returned as an `argv`
132
+ array, never a shell program. A target has exactly one final Serve step; any
133
+ earlier steps must be Prepare steps. Workdir is canonical and project-relative,
134
+ Preferred port is only a hint from 1024 through 65535, and URL path is an
135
+ application path rather than a URL. The only substitutions are `{host}` and
136
+ `{port}`, supplied by the host. A project can use `- Nothing.` as its complete
137
+ Launch section to disable component targets.
138
+
139
+ Genesis validates and reports Launch data but does not select a runtime,
140
+ reserve a port, start a process, decide readiness, or control a browser.
141
+
142
+ The optional `#### Preview identity` block is specific to hosts that implement
143
+ the declared `vibe64.preview-identity.command.v1` protocol. Its executable is a
144
+ committed, application-owned file immediately below `.vibe64/bin`; the
145
+ normalized command is an argv array, not a shell program. Identity types may
146
+ contain `email`, `login`, and `user-id`. Enabled environment and Secret
147
+ environment are optional variable
148
+ names the application recognizes; Genesis validates and returns names only and
149
+ never reads or returns their values. Runtimes lists opaque runtimes required
150
+ to execute this command, independently of the server target requirements, and
151
+ Timeout ms defaults to 10000 with a maximum of 30000. Genesis does not execute
152
+ the command, select identities, provide secrets, authenticate users, or control
153
+ the browser. Those remain host responsibilities.
154
+
155
+ `runtimeRequirements` contains opaque technology ids. A host explicitly maps
156
+ the ids it supports to its own pinned runtime packs; for example, it may map
157
+ `nodejs` to its Node 26 pack. Genesis never chooses versions, expands
158
+ dependencies such as `composer`, or treats an unknown id as something similar.
159
+ Declare each independently required runtime. Generic language pieces such as
160
+ `nodejs` and `php` provide no Launch recipe. A concrete piece such as `jskit`
161
+ may declare one; Genesis does not invent missing targets.
162
+
163
+ `Indexers` selects installed structural adapters for the derived Machine City.
164
+ The shared ast-grep engine owns traversal, bounds, diagnostics, JSON, and
165
+ queries; each adapter owns only language extensions, callable syntax, names,
166
+ containers, signatures, and public/internal visibility. Several Stack pieces
167
+ may contribute indexers, and duplicates are collapsed. Index output is
168
+ navigation data, not proof that every dynamic callable or framework edge was
169
+ discovered.
170
+
171
+ Do not create a Genesis-owned generic skill merely because a component is
172
+ named `nodejs`, `php`, or another common technology. Official, user, and host
173
+ skills with those names must coexist normally. Use `## Skill` only for an
174
+ authoritative directory this Stack component selects; put concise supplemental
175
+ rules in `## Guidance` and cleanup-only additions in `## Deslop`.
176
+
177
+ A selected component may have one project customization at
178
+ `genesis/stack/<id>.md`:
179
+
180
+ ```markdown
181
+ # Stack customization: example
182
+
183
+ ## Add
184
+
185
+ ### Description
186
+
187
+ Additional project context.
188
+
189
+ ### Guidance
190
+
191
+ - Additional implementation, explanation, review, and cleanup guidance.
192
+
193
+ ### Deslop
194
+
195
+ - Additional cleanup guidance.
196
+
197
+ ## Override
198
+
199
+ ### Description
200
+
201
+ Replacement component description.
202
+
203
+ ### Guidance
204
+
205
+ - Replacement installed general guidance.
206
+
207
+ ### Deslop
208
+
209
+ - Replacement cleanup guidance.
210
+ ```
211
+
212
+ Each field is optional. `Override` replaces only that installed field; `Add`
213
+ then follows the installed or overridden value. These files cannot alter
214
+ dependencies, conflicts, Agent Skill source, indexers, resources, commands,
215
+ Workspace setup, or Launch declarations.
216
+ `genesis stack add` preserves the files and composes their effective prose after
217
+ dependency resolution.
218
+
219
+ A project may select component ids in `genesis/stack.md`, replace component
220
+ Workspace setup defaults with one project recipe, replace component Verify
221
+ defaults with its own `## Commands`, and replace every component Launch target
222
+ with one project `## Launch` contract. With no project Launch section, selected
223
+ component targets compose; duplicate ids or multiple defaults are rejected
224
+ rather than guessed. `genesis stack add` preserves existing project Workspace
225
+ setup and Launch sections. Adding another language, framework, database, or
226
+ integration is therefore an isolated Stack/indexer contribution rather than a
227
+ prompt or controller special case.
228
+
229
+ Description, Guidance, Agent Skill, and Deslop prose are instructions, not
230
+ verification evidence. Changes to them do not stale an exact successful
231
+ verification record; selected component ids, resources, Workspace setup,
232
+ launch targets, and verification commands remain part of the Stack identity.
233
+
234
+ Fresh-workspace hosts read setup from the package root:
235
+
236
+ ```js
237
+ import { inspectWorkspaceSetup } from 'genesis-compiler';
238
+
239
+ const setup = await inspectWorkspaceSetup({ projectRoot, environment });
240
+ ```
241
+
242
+ The setup result has `status` (`ready`, `blocked`, or `unconfigured`),
243
+ `stackHash`, an exact ready-recipe `recipeHash`, selected `components`, its `source`, distinct
244
+ `runtimeRequirements`, normalized ordered `steps`, and `diagnostics`. Each step
245
+ contains `label`, `argv`, `runtimeRequirements`, and `workdir`. `blocked` means
246
+ component recipes conflict, not that an unrelated Stack resource is absent.
247
+ The optional environment object is accepted for a consistent host inspection
248
+ boundary, but Workspace setup v1 neither reads nor returns its values.
249
+
250
+ Preview hosts read the normalized Launch contract independently:
251
+
252
+ ```js
253
+ import { inspectLaunch } from 'genesis-compiler';
254
+
255
+ const launch = await inspectLaunch({ projectRoot, environment });
256
+ ```
257
+
258
+ The result has `status` (`ready`, `blocked`, or `unconfigured`), `stackHash`,
259
+ selected `components`, distinct `runtimeRequirements`, declared `resources`,
260
+ normalized `targets`, and resource `diagnostics`. Each target reports its
261
+ `source`, `available`, and `disabledReason`, plus its normalized
262
+ `previewIdentity` declaration when present. Environment values are inspected
263
+ but never returned. Here, `available` means only that the Stack's declared
264
+ resource inputs are present: the host must still reject runtime requirements it
265
+ cannot map. `unconfigured` means there are no targets, `blocked` means declared
266
+ resource inputs are missing, and `ready` means neither condition applies. The
267
+ caller still owns exact runtimes, port allocation, process lifecycle, readiness
268
+ and proxy policy, identity selection and command execution, secrets, browser
269
+ binaries, Git, and credentials.
package/package.json CHANGED
@@ -1,12 +1,61 @@
1
1
  {
2
2
  "name": "genesis-compiler",
3
- "version": "1.0.0",
4
- "description": "",
5
- "license": "ISC",
6
- "author": "",
7
- "type": "commonjs",
8
- "main": "index.js",
3
+ "version": "1.1.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/work.txt",
37
+ "plugins/genesis",
38
+ "skills",
39
+ "src",
40
+ "stacks/pieces"
41
+ ],
9
42
  "scripts": {
10
- "test": "echo \"Error: no test specified\" && exit 1"
43
+ "test": "node --test test/*.test.js"
44
+ },
45
+ "dependencies": {
46
+ "@ast-grep/lang-bash": "^0.0.8",
47
+ "@ast-grep/lang-c": "^0.0.6",
48
+ "@ast-grep/lang-cpp": "^0.0.6",
49
+ "@ast-grep/lang-csharp": "^0.0.6",
50
+ "@ast-grep/lang-go": "^0.0.6",
51
+ "@ast-grep/lang-java": "^0.0.7",
52
+ "@ast-grep/lang-kotlin": "^0.0.7",
53
+ "@ast-grep/lang-php": "^0.0.7",
54
+ "@ast-grep/lang-python": "^0.0.6",
55
+ "@ast-grep/lang-ruby": "^0.0.7",
56
+ "@ast-grep/lang-rust": "^0.0.7",
57
+ "@ast-grep/napi": "^0.45.1",
58
+ "@jskit-ai/agent-docs": "0.1.131",
59
+ "yaml": "^2.9.0"
11
60
  }
12
61
  }
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "genesis",
3
+ "version": "1.1.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,21 @@
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.
@@ -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,4 @@
1
+ interface:
2
+ display_name: "Genesis Deslop"
3
+ short_description: "Simplify changed code without behavior drift"
4
+ default_prompt: "Use $genesis-deslop for a separate behavior-preserving cleanup pass over the current changes."
@@ -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.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Genesis Program"
3
+ short_description: "Explain product intent and public operations"
4
+ default_prompt: "Use $genesis-program to reconcile the Blueprint and subsystem Program with this codebase."
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: genesis-project
3
+ description: Work safely in a Genesis-enriched codebase using its Blueprint, Stack, subsystem Program, path-focused context, and concrete verification. Use for implementation or review in a repository containing genesis/blueprint.md.
4
+ ---
5
+
6
+ # Genesis project work
7
+
8
+ Genesis is an explanatory and verification companion. It does not replace the
9
+ codebase, tests, Git review, or the coding agent.
10
+
11
+ ## Establish context
12
+
13
+ 1. Read `genesis/blueprint.md` for non-technical product intent.
14
+ 2. Read `genesis/stack.md` for the selected technical composition, resources,
15
+ and verification commands.
16
+ 3. Locate the source involved in the request.
17
+ 4. Run `genesis index <name-or-path>` before adding a helper or public operation.
18
+ Reuse an existing function when it already owns the behavior.
19
+ 5. Run `genesis context <path...>` for the relevant Program explanations and
20
+ selected Stack context.
21
+ 6. Load applicable technology skills from `.agents/skills/` or from the
22
+ agent's own installed skill catalog.
23
+
24
+ Program is concise, fallible explanation. Its Sources and optional
25
+ Implementation maps aid navigation but never substitute for reading code,
26
+ tests, and runtime behavior.
27
+
28
+ `.genesis/machine-city.json` is a derived detailed file/function map.
29
+ `.genesis/program-city.json` is a derived simpler subsystem/operation map.
30
+ Neither is authority or proof; both may be regenerated with `genesis index`.
31
+
32
+ ## Implement ordinary local work
33
+
34
+ - Work directly in the current Git tree and leave useful edits visible in the
35
+ ordinary diff.
36
+ - Do not edit the Blueprint, Program, or `.genesis/` during implementation; the
37
+ separate reconciliation turn owns explanatory updates. Keep an exact Stack
38
+ `## Launch` declaration aligned when the implementation establishes or
39
+ intentionally changes how the project is started or how Vibe64 may request
40
+ an application preview identity. Record only capability metadata and
41
+ environment variable names there, never environment values or secrets.
42
+ - Follow established project and technology seams instead of creating parallel
43
+ frameworks, persistence layers, transports, validators, or UI systems.
44
+ - Never invent unavailable external-resource values or pass literal
45
+ environment-variable names as data. Report the missing resource and preserve
46
+ useful work.
47
+ - Keep the implementation direct and cohesive. Run focused checks when useful.
48
+
49
+ ## Verify and report
50
+
51
+ Use `genesis verify` for the Stack's declared final checks. Report files
52
+ changed, checks actually run, and anything still requiring attention. Never
53
+ claim that an unrun check passed or that passing checks prove the whole product.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Genesis Project"
3
+ short_description: "Work safely in a Genesis project"
4
+ default_prompt: "Use $genesis-project to make this change with the project Blueprint, Program, Stack, and verification context."