genesis-compiler 1.2.23 → 1.2.25

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 CHANGED
@@ -108,10 +108,10 @@ empty or already-adopted project.
108
108
 
109
109
  `genesis init` creates an empty Blueprint, a focused engineering approach, an
110
110
  empty optional Stack, the current `genesis/version`, three project Agent Skills,
111
- and project-local Codex hooks. The skills are ordinary
111
+ and one project-local Codex guidance hook. The skills are ordinary
112
112
  [Agent Skills](https://agentskills.io): `genesis-project`, `genesis-program`,
113
113
  and `genesis-deslop`, each with standard `SKILL.md` and `agents/openai.yaml`
114
- metadata. Open `/hooks` once in Codex to review and trust the hooks. After
114
+ metadata. Open `/hooks` once in Codex to review and trust the guidance hook. After
115
115
  that, use Codex normally. No technology is assumed until you explicitly select
116
116
  Stack components:
117
117
 
@@ -127,12 +127,12 @@ complete directory into `.agents/skills/`, including its `references/`,
127
127
  `scripts/`, `assets/`, and agent metadata. Every relative Markdown link and image
128
128
  must resolve within that same Skill directory after relocation; a missing
129
129
  target or path that escapes the Skill root makes the Skill invalid. The agent
130
- loads valid resources only when the Skill requires them. For example, the
131
- `genesis-stack` catalog's JSKIT piece installs the JSKIT package's own `jskit`
132
- skill. A piece's optional
133
- `## Guidance` is concise
134
- supplemental project-work guidance; it does not create or replace a generic
135
- technology skill.
130
+ loads valid resources only when the Skill requires them. A technology does not
131
+ need a Skill to be selectable: the curated JSKIT piece, like ordinary framework
132
+ pieces, links its authoritative framework documentation through Stack prose and
133
+ declares no Skill. A piece's optional `## Guidance` is concise supplemental
134
+ project-work guidance; it does not create or replace a generic technology
135
+ skill.
136
136
 
137
137
  `.agents/skills/.genesis-managed.json` records only copies Genesis owns.
138
138
  Genesis never overwrites an unmanaged skill and preserves locally modified
@@ -182,7 +182,7 @@ People may edit `## Project requirements` to name obligations the presets do
182
182
  not capture, including a specific organizational, compliance, cryptographic,
183
183
  or scale constraint. `genesis engineering set` changes only the profile and
184
184
  preserves those requirements. Generated prompts, path-focused context, Codex
185
- session guidance, Post-change work, and Deslop all receive the effective
185
+ session guidance, implementation Post-change work, and Deslop all receive the effective
186
186
  approach. A project upgraded from an older Genesis release safely uses
187
187
  `focused.v1` until `genesis init` or `genesis engineering set focused.v1`
188
188
  records the file.
@@ -263,27 +263,19 @@ Python, Java, C#, C/C++, PHP, Go, Rust, Ruby, Kotlin, and Shell. A future techno
263
263
  adds its adapter through its Stack piece rather than teaching Genesis prompts
264
264
  to parse that language.
265
265
 
266
- Before changing project files for a user-requested implementation, Codex runs
267
- `genesis hook authorize`. At the end of an authorized turn that changed
268
- Git-visible project files, the Stop hook asks Codex for bounded follow-up turns.
269
- Unmarked turns finish normally even if another process changes the same
270
- checkout. When the selected Stack contributes `Post-change` work, all
271
- contributions compose deterministically into one optional code-changing turn.
272
- Genesis then reconciles the Blueprint and affected Program explanations from
273
- the complete changed-path set and actual Git diff, and refreshes both City
274
- projections. A focused, behavior-preserving Deslop pass runs before both Cities
275
- are refreshed again; its response is the concise user-facing completion. A
276
- project with no selected Stack uses only the `genesis-deslop` skill. Selected
277
- Stack components enrich Post-change work, reconciliation, and cleanup with
278
- general Guidance, and enrich cleanup further with technology-specific Deslop
279
- guidance.
280
-
281
- The hook never starts another Codex process. Its small per-session phase is
282
- limited to `implementation -> optional post-change -> reconcile -> deslop ->
283
- done`, so it cannot keep continuing recursively. The Stop after Deslop clears
284
- the sequence rather than scheduling another model turn. Empty Post-change
285
- content is skipped rather than producing an empty turn. Question, explanation,
286
- review, diagnosis-only, and unchanged turns finish normally.
266
+ The project Codex hook injects a short operating guide at startup, resume,
267
+ clear, and compaction. It records no turn state, blocks no Stop, and requests no
268
+ follow-up turn. Implementation prompts compose selected Stack `Post-change`
269
+ guidance into the original implementation turn, and the project skill keeps
270
+ intentional Blueprint and affected Program changes aligned there.
271
+
272
+ Deslop runs only when explicitly requested. With no stated scope it reviews the
273
+ latest commit; “the last N commits” reviews the net surviving first-parent
274
+ range, and a named commit or range is honored exactly. It requires a clean
275
+ worktree and leaves ordinary uncommitted cleanup for review rather than
276
+ amending history. Genesis supplies the behavior-preserving boundary and Git
277
+ scope rules. Selected Stack components add technology-specific Deslop guidance
278
+ without weakening or broadening that contract.
287
279
 
288
280
  Projects can customize a selected technology through its matching file, such
289
281
  as `genesis/stack/jskit.md`:
@@ -303,7 +295,7 @@ Additional project-specific context about how JSKIT is used here.
303
295
 
304
296
  ### Post-change
305
297
 
306
- - Additional project-specific work to perform once after implementation.
298
+ - Additional project-specific work to perform before the implementation turn completes.
307
299
 
308
300
  ### Deslop
309
301
 
@@ -321,7 +313,7 @@ A replacement for the installed JSKIT description.
321
313
 
322
314
  ### Post-change
323
315
 
324
- - Replacement installed post-change work.
316
+ - Replacement installed post-change work for the implementation turn.
325
317
 
326
318
  ### Deslop
327
319
 
@@ -357,8 +349,9 @@ genesis prompt # implementation work
357
349
  genesis prompt --task start # open a new or existing project conversation
358
350
  genesis prompt --task adopt # import an existing project's complete contract
359
351
  genesis prompt "Add filtering by note title"
360
- genesis prompt --task deslop # explicit cleanup
361
- genesis prompt --task deslop "Only review billing"
352
+ genesis prompt --task deslop # clean up the latest commit
353
+ genesis prompt --task deslop "Deslop the last 5 commits"
354
+ genesis prompt --task deslop "Deslop commit a1b2c3d"
362
355
  genesis prompt --task program # refresh explanation
363
356
  genesis prompt --task blueprint "Start on notes" # update product intent
364
357
  genesis prompt --task describe # create/refresh Blueprint and complete Program
@@ -377,8 +370,9 @@ The eight task types are deliberately explicit:
377
370
  - `work` implements the Blueprint and optional request using current code,
378
371
  Program, the selected engineering approach, selected Stack context, and
379
372
  progressively loaded Agent Skills.
380
- - `deslop` requests cleanup explicitly. Codex projects also receive a bounded
381
- automatic Deslop turn after their separate explanatory reconciliation turn.
373
+ - `deslop` requests behavior-preserving cleanup of committed work explicitly.
374
+ It defaults to the latest commit, accepts a first-parent commit count or exact
375
+ commit/range, requires a clean worktree, and leaves its result uncommitted.
382
376
  - `program` edits only `genesis/program/` to explain the code that exists, with
383
377
  selected Stack guidance available for technology-specific correctness.
384
378
  - `blueprint` edits only `genesis/blueprint.md` from explicit user intent. It
@@ -418,19 +412,20 @@ Components may contribute:
418
412
 
419
413
  - a concise description and supplemental Guidance used across relevant tasks;
420
414
  - existing-project Adoption requirements used only while importing a codebase;
421
- - optional Post-change work composed once after a code-changing implementation;
415
+ - optional Post-change work composed into the original implementation turn;
422
416
  - one authoritative Agent Skill directory when the component owns one;
423
417
  - generic external-resource requirements;
424
- - cleanup advice used by explicit and automatic Deslop prompts;
418
+ - cleanup advice composed on top of the core explicit Deslop contract;
425
419
  - structural code indexers used by Machine City and function lookup;
426
420
  - default verification commands.
427
421
 
428
422
  Technology-specific supplemental rules intentionally remain in Stack pieces.
429
423
  General `Guidance` enriches implementation, review, Program, description, and
430
- cleanup tasks; `Adoption` adds import-only requirements; `Post-change` composes
431
- one optional code-changing continuation before explanation; `Deslop` adds
432
- cleanup-only rules. None shadows an official generic technology skill or
433
- assumes that an upstream skill contains every rule Genesis needs.
424
+ cleanup tasks; `Adoption` adds import-only requirements; `Post-change` adds
425
+ work to finish in the original implementation turn; `Deslop` adds
426
+ technology-specific cleanup rules to Genesis's invariant behavior-preserving
427
+ contract. None shadows an official generic technology skill or assumes that an
428
+ upstream skill contains every rule Genesis needs.
434
429
 
435
430
  Genesis core contains no Stack pieces and no database, framework, language, or
436
431
  platform dependency. See [Stack components](docs/stack-components.md).
@@ -34,8 +34,7 @@ project. It creates ordinary project files with mode `0666`, directories and
34
34
  executable skill files with mode `0777`, and lets the invoking process umask
35
35
  and the destination directory's inherited ACL establish the effective mode and
36
36
  group. Atomic replacements are created beside their destination so they inherit
37
- the same filesystem policy before becoming visible. Private hook continuation
38
- state remains explicitly `0600`.
37
+ the same filesystem policy before becoming visible.
39
38
 
40
39
  This keeps ordinary single-user projects conventional while allowing a managed
41
40
  host to require shared-group writes and no access for other users. The host is
@@ -46,10 +46,11 @@ Genesis keeps each instruction at one useful level:
46
46
  selected profile in every implementation and cleanup path.
47
47
  - The generated JSON block contains current structural facts and warnings.
48
48
 
49
- Detailed technology manuals belong in the technology skill's `references/`
50
- directory. Concise rules Genesis needs beyond that skill belong in Stack
51
- `Guidance`; they are composed into relevant prompts without creating a
52
- colliding generic skill.
49
+ Detailed technology manuals belong to the technology's authoritative
50
+ documentation, which Stack prose may link directly. A technology may also
51
+ offer a separately installable Skill with its own `references/` directory.
52
+ Concise rules needed in project prompts belong in Stack `Guidance`; they are
53
+ composed without creating a colliding generic skill.
53
54
 
54
55
  ## Existing projects
55
56
 
@@ -76,22 +77,19 @@ does not perform adoption automatically. If the user accepts, Codex runs the
76
77
  command itself and follows its returned prompt in the same conversation. Other
77
78
  hosts can call `adoptProject()` and send its `prompt` directly.
78
79
 
79
- Codex can instead use the project-local hooks installed by `genesis init`.
80
- Those hooks inject a short operating guide and record the Git-visible state when
81
- each user prompt begins. Before editing for an explicit user implementation
82
- request, Codex marks that turn with `genesis hook authorize`. Only an authorized
83
- turn whose project files changed can request bounded continuations; unmarked
84
- turns finish normally even if another process changes the checkout. Selected
85
- `Post-change` contributions compose into one optional code-changing turn;
86
- Genesis then reconciles Blueprint and affected Program explanations from the
87
- complete Git-visible change set and Deslops the implementation. The Deslop
88
- response is the concise user-facing completion. The hooks invoke the same
89
- Genesis project operations and never start another agent process. A per-session
90
- phase permits only `implementation -> optional post-change -> reconcile ->
91
- deslop -> done`. Empty Post-change content skips that phase. Genesis refreshes
92
- both City projections after reconciliation so Deslop sees the current
93
- explanation and function inventory, then refreshes them again after Deslop in
94
- case cleanup changed the implementation map.
80
+ Codex can instead use the project-local hook installed by `genesis init`.
81
+ That hook injects a short operating guide at startup, resume, clear, and
82
+ compaction. It does not record user turns, authorize edits, intercept Stop, or
83
+ request another model turn. Selected `Post-change` contributions are included
84
+ in the original implementation prompt, whose project skill also keeps
85
+ intentional Blueprint and affected Program changes aligned.
86
+
87
+ Deslop is an explicit prompt task available to any host or command-line user.
88
+ It resolves the latest commit by default, a requested first-parent count, or an
89
+ exact commit/range; requires a clean worktree; and leaves cleanup as ordinary
90
+ uncommitted work. Genesis owns that invariant contract. Selected Stack
91
+ `Deslop` prose and applicable technology skills enrich the cleanup without
92
+ changing its scope or behavior-preserving boundary.
95
93
 
96
94
  Once Codex identifies relevant source, `genesis context <path...>` returns only
97
95
  Program modules citing those paths plus the effective engineering approach and
@@ -112,7 +110,6 @@ user-installed generic technology skills independent.
112
110
  Matching files under `genesis/stack/<component>.md` may add to or override that
113
111
  selected component's Description, Guidance, Adoption, Post-change, and Deslop
114
112
  fields. Effective Guidance is used by work, review, Program, describe, Deslop,
115
- and path-context generation. The Codex continuation flow also carries it into
116
- Post-change work, reconciliation, and cleanup; effective Post-change work runs
117
- once before reconciliation, while Deslop guidance remains cleanup-only. Effective Adoption
118
- guidance is included only in the adoption workflow.
113
+ and path-context generation. Effective Post-change work is composed into the
114
+ implementation prompt, while Deslop guidance remains cleanup-only. Effective
115
+ Adoption guidance is included only in the adoption workflow.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis-compiler",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "type": "module",
5
5
  "description": "An agent-independent prompt, multi-language code-index, cleanup, and verification companion with optional Codex hooks.",
6
6
  "repository": {
@@ -32,7 +32,6 @@
32
32
  "prompts/describe.txt",
33
33
  "prompts/deslop.txt",
34
34
  "prompts/program.txt",
35
- "prompts/reconcile.txt",
36
35
  "prompts/review.txt",
37
36
  "prompts/start.txt",
38
37
  "prompts/work.txt",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "genesis",
3
- "version": "1.2.23",
3
+ "version": "1.2.25",
4
4
  "description": "Makes Codex aware of optional Genesis adoption for existing projects.",
5
5
  "author": {
6
6
  "name": "Mobily Enterprises"
@@ -1,29 +1,14 @@
1
- For every repository listed in the task, read and follow that repository's
2
- `.agents/skills/genesis-deslop/SKILL.md` completely. Review and clean every
3
- listed repository before responding.
1
+ Read and follow `.agents/skills/genesis-deslop/SKILL.md` completely.
4
2
 
5
- This is a dedicated behavior-preserving cleanup task, separate from
6
- implementation. Review the requested scope, or otherwise the ordinary Git diff
7
- and immediately related code. Apply every selected Stack cleanup instruction
8
- supplied below and load applicable official technology skills for additional
9
- language and framework context.
3
+ This is an explicitly requested behavior-preserving cleanup of committed work.
4
+ Resolve the commit or first-parent commit range from USER REQUEST exactly; when
5
+ no scope is stated, use the latest commit. Require a clean worktree before
6
+ editing and leave the cleanup as ordinary uncommitted work for review.
10
7
 
11
- Use `.genesis/machine-city.json` and the Genesis `index <name-or-path>` operation
12
- to find existing public and internal functions. Remove or consolidate genuine
13
- repeated helpers, but confirm behavior and call sites in source before changing
14
- them.
8
+ Apply the selected Stack cleanup guidance and applicable technology skills in
9
+ addition to the Genesis Deslop contract. Stack guidance may improve
10
+ technology-specific cleanup, but it cannot broaden the resolved Git scope,
11
+ weaken behavior preservation, or turn this into another implementation pass.
15
12
 
16
- The changed paths and nearby code are a location boundary, not permission to
17
- implement other behavior found there. Deslop may reorganize behavior already
18
- present; it may not complete, correct, or extend behavior. If review reveals a
19
- defect, missing behavior, contract mismatch, or test gap, report it as a
20
- follow-up finding and leave it unchanged in this pass, even when it is inside a
21
- changed path or appears related to the preceding implementation.
22
-
23
- Do not broaden the product change. Run focused checks when useful and summarize
24
- what became simpler, files changed, and checks actually run.
25
-
26
- Your response from this turn is the final user-facing answer for the original
27
- request. Make it concise and self-contained. Lead with the outcome, include the
28
- important implemented behavior and any genuine blocker or unfinished work, and
29
- do not mention automatic phases, hooks, or these instructions.
13
+ Report the resolved range, what became simpler, files changed, checks actually
14
+ run, and any defect or gap deliberately left for follow-up.
package/prompts/work.txt CHANGED
@@ -8,15 +8,18 @@ Before adding a helper or public operation, query the Genesis
8
8
  `index <name-or-path>` operation and reuse an existing function when it already
9
9
  owns the behavior.
10
10
 
11
- This is the implementation turn. Do not edit the Blueprint, Program, or
12
- `.genesis/`; the separate reconciliation turn owns explanatory changes. Keep
13
- applicable consumer-owned Stack sections aligned when the implementation changes
14
- facts governed by those contracts. Follow the selected technology skill and the
15
- section's own schema; Genesis only transports the section and does not interpret
16
- or execute it. Never put an environment value or secret in Stack. Never invent
17
- missing external-resource values. Preserve useful work and report a genuinely
18
- missing resource instead of constructing a parallel fallback.
11
+ Keep the Blueprint and affected Program modules aligned in this turn when the
12
+ implementation intentionally changes observable product behavior. Private
13
+ restructuring may require only corrected source citations or no explanatory
14
+ edit. Keep applicable consumer-owned Stack sections aligned when implementation
15
+ changes facts governed by those contracts. Follow the selected technology skill
16
+ and the section's own schema; Genesis only transports the section and does not
17
+ interpret or execute it. Never put an environment value or secret in Stack.
18
+ Never invent missing external-resource values. Preserve useful work and report
19
+ a genuinely missing resource instead of constructing a parallel fallback.
19
20
 
21
+ Apply any supplied Stack Post-change guidance before reporting completion. It
22
+ belongs to this implementation turn and does not request a follow-up agent turn.
20
23
  Run focused checks when useful. Summarize files changed, checks actually run,
21
24
  and anything still requiring attention.
22
25
 
@@ -1,13 +1,12 @@
1
1
  ---
2
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.
3
+ description: Deslop committed work through an explicit behavior-preserving cleanup pass. Use when asked to Deslop a commit or recent commits, simplify completed work, remove repeated helpers, clarify ownership, or align changed code with established project and technology patterns.
4
4
  ---
5
5
 
6
6
  # Genesis Deslop
7
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.
8
+ Review and simplify committed work without changing product behavior. Deslop is
9
+ explicit: never run it merely because implementation finished.
11
10
 
12
11
  When this repository is Genesis itself or has `genesis-compiler` installed
13
12
  locally, invoke every Genesis CLI operation through the project-pinned package:
@@ -16,6 +15,28 @@ package. Otherwise use `genesis <arguments>` only when that executable is
16
15
  already available on `PATH`. Never install or update Genesis merely to satisfy
17
16
  a workflow instruction.
18
17
 
18
+ ## Resolve the committed scope
19
+
20
+ Before reading or editing the selected change, require a clean worktree and
21
+ index with `git status --short`. Stop and report the existing paths when it is
22
+ not clean; do not stash, commit, discard, or mix them into Deslop.
23
+
24
+ Resolve the user's scope as follows:
25
+
26
+ - With no stated scope, use the latest commit.
27
+ - “The last N commits” means the net surviving change from the first parent
28
+ before those N commits through `HEAD`.
29
+ - A named commit means that commit against its first parent.
30
+ - An explicit commit range means exactly that range.
31
+ - A root commit uses Git's root-diff form because it has no parent.
32
+
33
+ Inspect the resolved commit identities and changed paths before editing. Review
34
+ the committed diff, current source, direct call sites, relevant tests, and the
35
+ affected Program and Stack context. Do not substitute the ordinary working-tree
36
+ diff for the selected committed scope.
37
+
38
+ ## Apply the cleanup contract
39
+
19
40
  Apply the engineering approach supplied with the task. If this skill is invoked
20
41
  directly, read `genesis/engineering.md` as well as the relevant project context.
21
42
  Cleanup must reduce or preserve complexity, never introduce unapproved
@@ -26,7 +47,7 @@ operation to find existing public and internal functions before introducing or
26
47
  consolidating an abstraction. Confirm every apparent duplicate in source and
27
48
  its call sites.
28
49
 
29
- Within the preceding implementation's intended behavior and scope, leave no
50
+ Within the selected commits' intended behavior and scope, leave no
30
51
  repeated helpers, no code that is unclear or hard to reason about, and no code
31
52
  that goes against established patterns in the codebase. Remove unnecessary
32
53
  wrappers, abandoned scaffolding, parallel framework plumbing, and speculative
@@ -34,7 +55,7 @@ abstractions. Consolidate ownership where one clear module is enough. Do not
34
55
  optimize for tiny files or indirection; optimize for a small, obvious design
35
56
  that a junior programmer can follow.
36
57
 
37
- Cleanup is not a second implementation pass. A changed path limits where cleanup
58
+ Cleanup is not a second implementation pass. A committed path limits where cleanup
38
59
  may occur; it does not authorize different behavior in that file. Deslop may
39
60
  reorganize behavior already present; it may not complete, correct, or extend
40
61
  behavior. If review reveals a defect, missing behavior, contract mismatch, or
@@ -43,15 +64,22 @@ is inside a changed path or appears related to the preceding implementation. Do
43
64
  not implement the finding or alter tests to accommodate it during Deslop.
44
65
 
45
66
  Apply every technology-specific Deslop instruction supplied by the selected
46
- Stack. Load applicable official technology skills for additional framework and
47
- language context, but do not expect them to contain Genesis's cleanup policy.
67
+ Stack and load applicable official technology skills for framework and language
68
+ context. Stack guidance enriches this contract; it cannot weaken the
69
+ behavior-preserving boundary, change the selected Git scope, or authorize
70
+ unrelated implementation.
48
71
 
49
72
  You may edit or delete implementation and test files when that is the clearest
50
- behavior-preserving cleanup. Do not edit `genesis/`, `.genesis/`, Git metadata,
51
- dependency directories, generated build output, retained migration history, or
52
- external resources. Do not weaken tests, public behavior, or data guarantees.
53
- Do not create a second architecture or perform unrelated rewrites.
54
-
55
- Run focused checks when useful. Final declared checks remain available through
56
- the Genesis `verify` operation. Summarize what became simpler, files changed,
57
- and checks actually run.
73
+ behavior-preserving cleanup. If moving or renaming selected source makes an
74
+ affected Program citation stale, update only that citation or informational
75
+ Implementation map. Do not change the Blueprint or a Program public contract to
76
+ excuse cleanup behavior. Do not edit `.genesis/`, Git metadata, dependency
77
+ directories, generated build output, retained migration history, or external
78
+ resources. Do not weaken tests, public behavior, or data guarantees. Do not
79
+ create a second architecture or perform unrelated rewrites.
80
+
81
+ Leave the cleanup as ordinary uncommitted work for review and a later normal
82
+ commit. Never amend or rewrite the selected commits. Run focused checks when
83
+ useful. Final declared checks remain available through the Genesis `verify`
84
+ operation. Summarize the resolved commit range, what became simpler, files
85
+ changed, checks actually run, and follow-up findings left unchanged.
@@ -1,4 +1,4 @@
1
1
  interface:
2
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."
3
+ short_description: "Clean up committed work without behavior drift"
4
+ default_prompt: "Use $genesis-deslop to Deslop the latest commit."
@@ -65,19 +65,25 @@ Neither is authority or proof; both may be regenerated with the Genesis
65
65
  tradeoff. Never silently override the engineering approach.
66
66
  - Work directly in the current Git tree and leave useful edits visible in the
67
67
  ordinary diff.
68
- - Do not edit the Blueprint, Program, or `.genesis/` during implementation; the
69
- separate reconciliation turn owns explanatory updates. Keep exact
68
+ - Keep the Blueprint and affected Program modules aligned in this same turn
69
+ when implementation intentionally changes observable product behavior.
70
+ Private restructuring may require only corrected Sources or an informational
71
+ Implementation map, and may require no explanatory edit. Keep exact
70
72
  consumer-owned operation declarations, such as Vibe64 `## Outputs`, aligned
71
73
  when implementation intentionally changes the corresponding commands or
72
74
  capabilities. Record only capability metadata and environment-variable names
73
75
  there, never values or secrets; do not infer or execute the section as
74
- Genesis behavior.
76
+ Genesis behavior. Treat `.genesis/` as replaceable derived navigation data,
77
+ not authored product intent.
75
78
  - Follow established project and technology seams instead of creating parallel
76
79
  frameworks, persistence layers, transports, validators, or UI systems.
77
80
  - Never invent unavailable external-resource values or pass literal
78
81
  environment-variable names as data. Report the missing resource and preserve
79
82
  useful work.
80
- - Keep the implementation direct and cohesive. Run focused checks when useful.
83
+ - Keep the implementation direct and cohesive. Apply any supplied Stack
84
+ Post-change guidance before reporting completion; it is part of this
85
+ implementation turn, not a request for another agent turn. Run focused checks
86
+ when useful.
81
87
 
82
88
  ## Verify and report
83
89
 
package/src/cli.js CHANGED
@@ -20,12 +20,8 @@ import {
20
20
  verify,
21
21
  } from './index.js';
22
22
  import {
23
- authorizeCodexTurn,
24
23
  codexAdoptionRecommendation,
25
24
  codexSessionContext,
26
- completeCodexTurn,
27
- discardCodexTurn,
28
- recordCodexTurn,
29
25
  } from './index/codex-hooks.js';
30
26
  import { engineeringProfile, readEngineeringBaseline } from './index/engineering.js';
31
27
  import { asDiagnostic, fail } from './index/errors.js';
@@ -138,8 +134,8 @@ function parseCommand(argv) {
138
134
  'Command inspect requires environment or section <name>.',
139
135
  );
140
136
  }
141
- } else if (command === 'hook' && (operands.length !== 1 || !['authorize', 'begin', 'discover', 'end', 'session', 'stop'].includes(operands[0]))) {
142
- fail('CLI_HOOK_ACTION_REQUIRED', 'Command hook requires exactly one of: discover, session, begin, authorize, stop, end.');
137
+ } else if (command === 'hook' && (operands.length !== 1 || !['discover', 'session'].includes(operands[0]))) {
138
+ fail('CLI_HOOK_ACTION_REQUIRED', 'Command hook requires exactly one of: discover, session.');
143
139
  } else if (!['adopt', 'context', 'hook', 'index', 'inspect', 'prompt'].includes(command) && operands.length > 0) {
144
140
  fail('CLI_EXTRA_ARGUMENT', `Command ${command} accepts no arguments.`);
145
141
  }
@@ -266,8 +262,6 @@ function writeResult(command, result) {
266
262
  }
267
263
  if (command === 'hook') {
268
264
  if (['discover', 'session'].includes(result.kind) && result.output) line(process.stdout, result.output);
269
- else if (result.kind === 'authorize') line(process.stdout, `authorize: ${result.status}`);
270
- else if (result.kind === 'stop') line(process.stdout, JSON.stringify(result.output));
271
265
  return;
272
266
  }
273
267
  if (command === 'stack' && Array.isArray(result.pieces)) {
@@ -292,20 +286,6 @@ function writeResult(command, result) {
292
286
  line(process.stdout, `${command}: ${result.status}`);
293
287
  }
294
288
 
295
- async function hookInput() {
296
- if (process.stdin.isTTY) fail('CODEX_HOOK_INPUT_INVALID', 'Codex hook input must be supplied on stdin.');
297
- const chunks = [];
298
- let bytes = 0;
299
- for await (const chunk of process.stdin) {
300
- bytes += chunk.length;
301
- if (bytes > 1024 * 1024) fail('CODEX_HOOK_INPUT_INVALID', 'Codex hook input exceeds 1 MiB.');
302
- chunks.push(chunk);
303
- }
304
- try { return JSON.parse(Buffer.concat(chunks).toString('utf8')); } catch (error) {
305
- fail('CODEX_HOOK_INPUT_INVALID', `Codex hook input is invalid JSON: ${error.message}.`);
306
- }
307
- }
308
-
309
289
  async function execute({ command, operands, options }, { signal } = {}) {
310
290
  const projectRoot = options.projectRoot || process.cwd();
311
291
  const stackPackages = options.stackPackages || [];
@@ -382,20 +362,7 @@ async function execute({ command, operands, options }, { signal } = {}) {
382
362
  if (operands[0] === 'discover') {
383
363
  return { kind: 'discover', ...await codexAdoptionRecommendation({ projectRoot }) };
384
364
  }
385
- if (operands[0] === 'session') {
386
- return { kind: 'session', ...await codexSessionContext({ projectRoot }) };
387
- }
388
- if (operands[0] === 'authorize') {
389
- return { kind: 'authorize', ...await authorizeCodexTurn({ projectRoot }) };
390
- }
391
- const input = await hookInput();
392
- if (operands[0] === 'begin') {
393
- return { kind: 'begin', ...await recordCodexTurn({ input, projectRoot }) };
394
- }
395
- if (operands[0] === 'end') {
396
- return { kind: 'end', ...await discardCodexTurn({ input, projectRoot }) };
397
- }
398
- return { kind: 'stop', status: 'ready', output: await completeCodexTurn({ input, projectRoot }) };
365
+ return { kind: 'session', ...await codexSessionContext({ projectRoot }) };
399
366
  }
400
367
  if (command === 'verify') {
401
368
  return verify({
@@ -6,7 +6,6 @@ const assets = {
6
6
  adopt: new URL('prompts/adopt.txt', root),
7
7
  work: new URL('prompts/work.txt', root),
8
8
  describe: new URL('prompts/describe.txt', root),
9
- reconcile: new URL('prompts/reconcile.txt', root),
10
9
  deslop: new URL('prompts/deslop.txt', root),
11
10
  program: new URL('prompts/program.txt', root),
12
11
  blueprint: new URL('prompts/blueprint.txt', root),