genesis-compiler 1.10.20 → 1.10.22
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 +74 -16
- package/docs/prompt-integration.md +19 -5
- package/docs/stack-components.md +22 -5
- package/package.json +11 -1
- package/plugins/genesis/.codex-plugin/plugin.json +1 -1
- package/prompts/deslop.txt +3 -0
- package/prompts/master-pass.txt +17 -0
- package/prompts/pass-deep.txt +77 -0
- package/prompts/pass-report.txt +15 -0
- package/prompts/review.txt +2 -1
- package/prompts/security-pass.txt +26 -0
- package/prompts/speed-pass.txt +28 -0
- package/prompts/ui-pass.txt +3 -1
- package/prompts/ux-pass.txt +25 -0
- package/skills/genesis-data-pass/SKILL.md +29 -4
- package/skills/genesis-deslop/SKILL.md +47 -6
- package/skills/genesis-identity-pass/SKILL.md +29 -4
- package/skills/genesis-master-pass/SKILL.md +132 -0
- package/skills/genesis-master-pass/agents/openai.yaml +4 -0
- package/skills/genesis-quality-pass/SKILL.md +30 -4
- package/skills/genesis-review/SKILL.md +120 -0
- package/skills/genesis-review/agents/openai.yaml +4 -0
- package/skills/genesis-security-pass/SKILL.md +297 -0
- package/skills/genesis-security-pass/agents/openai.yaml +4 -0
- package/skills/genesis-speed-pass/SKILL.md +351 -0
- package/skills/genesis-speed-pass/agents/openai.yaml +4 -0
- package/skills/genesis-ui-pass/SKILL.md +38 -7
- package/skills/genesis-ux-pass/SKILL.md +276 -0
- package/skills/genesis-ux-pass/agents/openai.yaml +4 -0
- package/src/cli-commands.js +3 -1
- package/src/cli.js +14 -4
- package/src/index/agent-skills.js +53 -29
- package/src/index/assets.js +4 -1
- package/src/index/code-index.js +2 -1
- package/src/index/contracts.js +2 -0
- package/src/index/master-pass.js +76 -0
- package/src/index/pass-record.js +124 -22
- package/src/index/pass-support.js +71 -0
- package/src/index/passes.js +92 -5
- package/src/index/project-files.js +2 -1
- package/src/index/prompt.js +306 -28
- package/src/index/source-size.js +62 -0
- package/src/index.js +6 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: genesis-deslop
|
|
3
|
-
description: Deslop the agent's own task changes
|
|
3
|
+
description: Deslop the agent's own task changes, explicitly selected commits or the whole app through a behavior-preserving cleanup pass. Use when asked to Deslop, simplify current work, remove repeated helpers, clarify ownership, or align changed code with established project and technology patterns.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Genesis Deslop
|
|
@@ -46,12 +46,19 @@ continue with it directly. Do not generate another prompt.
|
|
|
46
46
|
Otherwise, before resolving Git scope, run the Genesis
|
|
47
47
|
`prompt --task deslop` operation once using the invocation rule above. For a
|
|
48
48
|
bare `Deslop` request, pass no request argument. When the user names a count,
|
|
49
|
-
commit, or range, pass that exact request as one safely quoted argument.
|
|
49
|
+
commit, or range, pass that exact request as one safely quoted argument. When
|
|
50
|
+
the user asks for the Deslop pass or the whole app, pass Deslop's own pass
|
|
51
|
+
request, `Deslop the whole app.`, exactly; Genesis then adds the pass's `PASS RUN`
|
|
52
|
+
and `PASS RECORD` steps. Treat
|
|
50
53
|
the printed prompt as the instructions for this same turn; do not dispatch it
|
|
51
54
|
to another agent and do not generate it again. This step composes the selected
|
|
52
55
|
Stack's technology-specific Deslop guidance and any project customization with
|
|
53
56
|
the portable contract below.
|
|
54
57
|
|
|
58
|
+
When the user asks for a deep run of this pass, pass its Deep request,
|
|
59
|
+
`Deslop the whole app deeply.`, exactly;
|
|
60
|
+
Genesis then adds the run's `DEEP RUN` section.
|
|
61
|
+
|
|
55
62
|
## Resolve the cleanup scope
|
|
56
63
|
|
|
57
64
|
Inspect `git status --short` and the staged and unstaged diffs before editing.
|
|
@@ -59,6 +66,13 @@ A dirty worktree is allowed; a prior commit is not required. Preserve the
|
|
|
59
66
|
existing index and unrelated work. Do not stage, stash, commit, or discard
|
|
60
67
|
changes as a prerequisite or as part of cleanup.
|
|
61
68
|
|
|
69
|
+
When the prompt has a `PASS RUN` section, the request is one of the pass's own
|
|
70
|
+
runs (the whole app, the changes since its last completed run judged against
|
|
71
|
+
the whole app, or a deep run) or a run over the changes since a base commit the
|
|
72
|
+
request names, and its scope is the one that section states, whatever the
|
|
73
|
+
defaults below say. A deep run's prompt also has a `DEEP RUN`
|
|
74
|
+
section; follow it with "Deep run" below.
|
|
75
|
+
|
|
62
76
|
Resolve the user's scope as follows:
|
|
63
77
|
|
|
64
78
|
- With no stated scope, select only your own changes for the current task,
|
|
@@ -73,6 +87,14 @@ Resolve the user's scope as follows:
|
|
|
73
87
|
deslop; do not silently select the latest commit or somebody else's work.
|
|
74
88
|
- An explicit commit, first-parent count, or range takes precedence over the
|
|
75
89
|
default, regardless of who authored those changes.
|
|
90
|
+
- The whole app, which Deslop's pass request `Deslop the whole app.` names, is
|
|
91
|
+
the project's own source: every file the project writes and maintains, in
|
|
92
|
+
every subsystem, whoever changed it and whenever. It never includes generated
|
|
93
|
+
output or build artifacts, vendored or copied third-party code, dependency
|
|
94
|
+
directories or lockfiles, retained migration history, or Genesis-derived
|
|
95
|
+
files under `.genesis/`. Ownership does not narrow this scope, but uncommitted
|
|
96
|
+
edits by the user or other agents stay as they are. Work through it one
|
|
97
|
+
subsystem at a time, using the Program's subsystem map.
|
|
76
98
|
- “The last commit” means `HEAD` against its first parent.
|
|
77
99
|
- “The last N commits” means the net surviving change from the first parent
|
|
78
100
|
before those N commits through `HEAD`.
|
|
@@ -147,7 +169,26 @@ operation. Summarize the resolved scope and any selected commit identities,
|
|
|
147
169
|
what became simpler, the behaviors checked before and after, files changed,
|
|
148
170
|
checks actually run, and follow-up findings left unchanged.
|
|
149
171
|
|
|
150
|
-
|
|
151
|
-
Genesis `passes done deslop` operation records it in `genesis/passes.json`,
|
|
152
|
-
uncommitted change that lands in the pass's own commit.
|
|
153
|
-
|
|
172
|
+
When the prompt ends with a `PASS RECORD` step, take it once the pass has
|
|
173
|
+
finished: the Genesis `passes done deslop` operation records it in `genesis/passes.json`,
|
|
174
|
+
an uncommitted change that lands in the pass's own commit. Genesis adds that
|
|
175
|
+
step only to the pass's own runs, whose requests it writes itself, so a Deslop
|
|
176
|
+
of your own changes, a section or commits is never recorded as the pass;
|
|
177
|
+
neither is a pass that stopped early, was abandoned or still has failing
|
|
178
|
+
checks.
|
|
179
|
+
|
|
180
|
+
## Deep run
|
|
181
|
+
|
|
182
|
+
When the prompt has a `DEEP RUN` section, follow it: it says how the checklist,
|
|
183
|
+
evidence, chunks, commits and report work for every pass. This pass adds to the
|
|
184
|
+
checklist:
|
|
185
|
+
|
|
186
|
+
- each file read in full for code harder to follow than it needs to be, parts
|
|
187
|
+
grown too big to hold in mind at once, and logic that does one job in
|
|
188
|
+
different words, each tick naming the behaviours checked before and after;
|
|
189
|
+
- the cross-subsystem item: helpers and logic duplicated across subsystems,
|
|
190
|
+
including one job written in different words, and a pattern one subsystem
|
|
191
|
+
follows that another ignores.
|
|
192
|
+
|
|
193
|
+
Deslop's limits hold in a deep run: behaviour stays as it is, and a defect
|
|
194
|
+
found stays a follow-up finding, left unchanged.
|
|
@@ -52,12 +52,23 @@ as the instructions for this same turn; do not dispatch it to another agent and
|
|
|
52
52
|
do not generate it again. This step composes the selected Stack's identity pass
|
|
53
53
|
guidance and any project customization with the portable contract below.
|
|
54
54
|
|
|
55
|
+
When the user asks for a deep run of this pass, pass its Deep request,
|
|
56
|
+
`Give the whole app its visual identity deeply.`, exactly;
|
|
57
|
+
Genesis then adds the run's `DEEP RUN` section.
|
|
58
|
+
|
|
55
59
|
## Resolve the scope
|
|
56
60
|
|
|
57
61
|
Inspect `git status --short` and the staged and unstaged diffs before editing.
|
|
58
62
|
A dirty worktree is allowed. Preserve the existing index and unrelated work; do
|
|
59
63
|
not stage, stash, commit, or discard changes as a prerequisite.
|
|
60
64
|
|
|
65
|
+
When the prompt has a `PASS RUN` section, the request is one of the pass's own
|
|
66
|
+
runs (the whole app, the changes since its last completed run judged against
|
|
67
|
+
the whole app, or a deep run) or a run over the changes since a base commit the
|
|
68
|
+
request names, and its scope is the one that section states, whatever the
|
|
69
|
+
defaults below say. A deep run's prompt also has a `DEEP RUN`
|
|
70
|
+
section; follow it with "Deep run" below.
|
|
71
|
+
|
|
61
72
|
- **The whole app (default).** Every screen or view a person sees, the shell,
|
|
62
73
|
sign-in, the loading screen, the logo and the icons. An identity is
|
|
63
74
|
app-wide, so this is the scope when none is stated.
|
|
@@ -253,7 +264,21 @@ the look spec (style option, seed, content kinds and their motifs), what
|
|
|
253
264
|
changed, files changed, the checks, contrast figures and screenshots actually
|
|
254
265
|
taken (with their paths), and follow-up findings left unchanged.
|
|
255
266
|
|
|
256
|
-
|
|
257
|
-
Genesis `passes done identity-pass` operation records it in `genesis/passes.json`,
|
|
258
|
-
uncommitted change that lands in the pass's own commit.
|
|
259
|
-
|
|
267
|
+
When the prompt ends with a `PASS RECORD` step, take it once the pass has
|
|
268
|
+
finished: the Genesis `passes done identity-pass` operation records it in `genesis/passes.json`,
|
|
269
|
+
an uncommitted change that lands in the pass's own commit. Genesis adds that
|
|
270
|
+
step only to the pass's own runs, whose requests it writes itself, so an
|
|
271
|
+
identity pass of a section, commits or your own changes is never recorded as
|
|
272
|
+
the pass; neither is a pass that stopped early, was abandoned or still has
|
|
273
|
+
failing checks.
|
|
274
|
+
|
|
275
|
+
## Deep run
|
|
276
|
+
|
|
277
|
+
When the prompt has a `DEEP RUN` section, follow it: it says how the checklist,
|
|
278
|
+
evidence, chunks, commits and report work for every pass. This pass adds to the
|
|
279
|
+
checklist:
|
|
280
|
+
|
|
281
|
+
- every screen, every kind of content, each empty state, the loading screen,
|
|
282
|
+
sign-in, the logo and the icons;
|
|
283
|
+
- the cross-subsystem item: colours, artwork or type defined outside the one
|
|
284
|
+
module and theme, and any screen the identity has not reached.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-master-pass
|
|
3
|
+
description: Run the project's passes deeply, one after another, through an explicitly requested Master pass over the whole app or the changes since its last completed run, every pass or the ones named, each as that pass's own Deep run, committed and tested before the next starts, with a ledger that lets an interrupted Master pass continue and one combined report. Use when asked for a Master pass, to run every pass, or to run several passes deeply in turn.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genesis Master pass
|
|
7
|
+
|
|
8
|
+
Run the selected passes deeply, one after another, so the software comes out of
|
|
9
|
+
each one committed and tested before the next starts. A Master pass is
|
|
10
|
+
explicit: never run it merely because implementation finished.
|
|
11
|
+
|
|
12
|
+
Resolve the invocation before running the first Genesis operation. Do not use a
|
|
13
|
+
Genesis operation or `genesis --version` as an availability probe.
|
|
14
|
+
|
|
15
|
+
1. Read the repository-root `package.json`. Treat Genesis as project-pinned only
|
|
16
|
+
when that manifest's `name` is `genesis-compiler`, or its `dependencies`,
|
|
17
|
+
`devDependencies`, or `optionalDependencies` contain the exact
|
|
18
|
+
`genesis-compiler` key.
|
|
19
|
+
2. For a project-pinned repository, invoke every Genesis CLI operation with
|
|
20
|
+
`npm exec --no -- genesis <arguments>`. This runs without fetching another
|
|
21
|
+
package. If the declared package is not installed, report that the project's
|
|
22
|
+
dependencies are not prepared; do not fall back to another Genesis version.
|
|
23
|
+
3. Otherwise, do not try `npm exec`. Run `command -v genesis` (or the current
|
|
24
|
+
shell's equivalent `PATH` lookup). When it resolves an executable, invoke
|
|
25
|
+
`genesis <arguments>` directly.
|
|
26
|
+
4. When neither source is available, stop and report that Genesis is
|
|
27
|
+
unavailable. Never install or update Genesis merely to satisfy a workflow
|
|
28
|
+
instruction.
|
|
29
|
+
|
|
30
|
+
Successful invocation resolution is routine. Do not narrate whether Genesis is
|
|
31
|
+
project-pinned or on `PATH`, and never describe direct `PATH` use as a fallback.
|
|
32
|
+
Mention how the invocation was selected only when resolution fails or the user
|
|
33
|
+
explicitly asks.
|
|
34
|
+
|
|
35
|
+
Follow the configured Collaboration approach for user-facing updates, including
|
|
36
|
+
its technical depth and response length. Report concrete progress,
|
|
37
|
+
findings, or blockers; do not announce that you are following guidance.
|
|
38
|
+
|
|
39
|
+
## Load the effective project instructions once
|
|
40
|
+
|
|
41
|
+
A Master pass request may arrive as a complete Genesis-generated prompt or as a
|
|
42
|
+
direct request such as `Master pass` or `Master pass (security, data, deslop)
|
|
43
|
+
the whole app.`
|
|
44
|
+
|
|
45
|
+
If the current task already contains `GENESIS CONTEXT` whose task is
|
|
46
|
+
`master-pass`, continue with it directly. Do not generate another prompt.
|
|
47
|
+
|
|
48
|
+
Otherwise, run the Genesis `prompt --task master-pass` operation once using the
|
|
49
|
+
invocation rule above. For a bare `Master pass`, pass no request argument: it
|
|
50
|
+
runs every pass the project offers over the whole app. When the user names
|
|
51
|
+
passes, pass `Master pass (<their names>) the whole app.` with the names
|
|
52
|
+
separated by commas; a pass's id or title works, with or without "pass". When
|
|
53
|
+
the user asks for the changes since the last completed Master pass, pass that
|
|
54
|
+
run's request from `genesis inspect passes --json` exactly. Genesis refuses a
|
|
55
|
+
name it offers no pass for and names the passes it does; tell the user. Treat
|
|
56
|
+
the printed prompt as the instructions for this same turn and do not generate
|
|
57
|
+
it again.
|
|
58
|
+
|
|
59
|
+
## What the Master pass adds, and what it does not
|
|
60
|
+
|
|
61
|
+
The prompt's `MASTER PASS` section lists the passes to run, in order, each with
|
|
62
|
+
the exact request of its own Deep run. Run them in that order, whatever order
|
|
63
|
+
they were named in: the review first, so every later pass starts from tested
|
|
64
|
+
work, then security, so later passes build on the access it fixes, and Deslop
|
|
65
|
+
last, so it cleans up after what the others changed. If you see a reason in
|
|
66
|
+
this project for another order, say so in the report rather than changing it.
|
|
67
|
+
|
|
68
|
+
Each pass runs as that pass's own Deep run, from its own prompt. Its `DEEP RUN`
|
|
69
|
+
section says how the checklist, evidence, chunks, agents, commits and report
|
|
70
|
+
work, and its skill says what its lens adds and what it may change. The Master
|
|
71
|
+
pass never restates, shortens or loosens that guidance; it adds only the order,
|
|
72
|
+
the checkpoint between passes, the ledger and the combined report.
|
|
73
|
+
|
|
74
|
+
## Keep the Master ledger
|
|
75
|
+
|
|
76
|
+
Before the first pass, write the Master ledger at the path the `MASTER PASS`
|
|
77
|
+
section names. It lives in Git's own directory, outside the project's tracked
|
|
78
|
+
files, so an interrupted Master pass finds it again. Record the request, the
|
|
79
|
+
commit it starts from, and each listed pass with its status (to do, running,
|
|
80
|
+
done or skipped), the path of its checklist (the one its `DEEP RUN` names), its
|
|
81
|
+
commits and its checklist count. Update it as each pass starts and finishes.
|
|
82
|
+
|
|
83
|
+
When a ledger for the same request is already there and not finished, continue
|
|
84
|
+
from it: passes marked done stay done, and a pass marked running continues its
|
|
85
|
+
own checklist from its first unticked item. Any other ledger is replaced.
|
|
86
|
+
|
|
87
|
+
## Run each pass
|
|
88
|
+
|
|
89
|
+
For each listed pass, in order:
|
|
90
|
+
|
|
91
|
+
1. Mark it running in the ledger.
|
|
92
|
+
2. Generate its prompt with the Genesis `prompt` operation and the exact
|
|
93
|
+
request listed for it, for example `prompt --task security-pass "Security
|
|
94
|
+
pass the whole app deeply."`, and follow that prompt in full as this pass's
|
|
95
|
+
instructions, through its own `PASS RECORD` step, which records the pass on
|
|
96
|
+
its own so its next run since its last completed one starts there.
|
|
97
|
+
3. Where the host can run several agents, the pass gives its chunks to them as
|
|
98
|
+
its `DEEP RUN` says, as many as the host's test budget and limits allow, and
|
|
99
|
+
you coordinate them. The passes themselves run one after another, never at
|
|
100
|
+
the same time, because each one starts from the tree the last one committed.
|
|
101
|
+
4. Checkpoint before the next pass starts: every change of this pass is
|
|
102
|
+
committed, in small commits of one checklist item or concern each with
|
|
103
|
+
messages that say what changed and why; nothing is left uncommitted; and the
|
|
104
|
+
pass's final whole-suite run passed on the committed tree. Record its
|
|
105
|
+
commits and checklist count in the ledger and mark it done.
|
|
106
|
+
|
|
107
|
+
A pass that cannot finish, such as one whose failing checks it cannot fix,
|
|
108
|
+
stops the Master pass there: report where it stopped and why, and do not start
|
|
109
|
+
the next pass on a broken tree.
|
|
110
|
+
|
|
111
|
+
Skip a pass that does not apply to this software, such as the UI or identity
|
|
112
|
+
pass where the software has no screens, and write the reason in the ledger and
|
|
113
|
+
the report. Never skip a pass because it is long or hard.
|
|
114
|
+
|
|
115
|
+
## Record and report
|
|
116
|
+
|
|
117
|
+
Once every listed pass is done or skipped, take the prompt's `PASS RECORD` step:
|
|
118
|
+
the Genesis `passes done master-pass <pass id...>` operation, naming the passes
|
|
119
|
+
it ran and leaving out those it skipped, records the Master pass in
|
|
120
|
+
`genesis/passes-added.json`; commit that change as its last commit, so nothing is
|
|
121
|
+
left uncommitted and its next run since the last one starts there.
|
|
122
|
+
|
|
123
|
+
End with one combined report. Open with the passes run and skipped, and how the
|
|
124
|
+
work was split across agents (or that it ran as one agent). Then, for each pass
|
|
125
|
+
in order: its checklist count and how many ticks rest on each kind of evidence,
|
|
126
|
+
what changed, its commits, its unticked items and the findings left unchanged.
|
|
127
|
+
A pass that changes behaviour on purpose, such as the security, data or
|
|
128
|
+
quality pass, states plainly what now behaves differently; a pass that keeps
|
|
129
|
+
behaviour, such as Deslop, states that behaviour is unchanged and how that was
|
|
130
|
+
proven. For a run since the last Master pass, say which files each pass read in
|
|
131
|
+
full and which it only searched against the whole app. Close with the final
|
|
132
|
+
whole-suite run on the committed tree.
|
|
@@ -53,12 +53,23 @@ to another agent and do not generate it again. This step composes the selected
|
|
|
53
53
|
Stack's quality pass guidance and any project customization with the portable
|
|
54
54
|
contract below.
|
|
55
55
|
|
|
56
|
+
When the user asks for a deep run of this pass, pass its Deep request,
|
|
57
|
+
`Quality pass the whole app deeply.`, exactly;
|
|
58
|
+
Genesis then adds the run's `DEEP RUN` section.
|
|
59
|
+
|
|
56
60
|
## Resolve the scope
|
|
57
61
|
|
|
58
62
|
Inspect `git status --short` and the staged and unstaged diffs before editing.
|
|
59
63
|
A dirty worktree is allowed. Preserve the existing index and unrelated work; do
|
|
60
64
|
not stage, stash, commit, or discard changes as a prerequisite.
|
|
61
65
|
|
|
66
|
+
When the prompt has a `PASS RUN` section, the request is one of the pass's own
|
|
67
|
+
runs (the whole app, the changes since its last completed run judged against
|
|
68
|
+
the whole app, or a deep run) or a run over the changes since a base commit the
|
|
69
|
+
request names, and its scope is the one that section states, whatever the
|
|
70
|
+
defaults below say. A deep run's prompt also has a `DEEP RUN`
|
|
71
|
+
section; follow it with "Deep run" below.
|
|
72
|
+
|
|
62
73
|
- **The whole app (default).** Every screen, command and flow a person uses.
|
|
63
74
|
- **A section.** A named area (a module, a route subtree, a set of screens or
|
|
64
75
|
commands): every screen and flow in it, touched or not.
|
|
@@ -160,7 +171,22 @@ changed, the edge cases tried and their results, the refusals reworded, the
|
|
|
160
171
|
accessibility checks, the screenshots and tests actually taken and run (with
|
|
161
172
|
their paths), files changed, and follow-up findings left unchanged.
|
|
162
173
|
|
|
163
|
-
|
|
164
|
-
Genesis `passes done quality-pass` operation records it in `genesis/passes.json`,
|
|
165
|
-
uncommitted change that lands in the pass's own commit.
|
|
166
|
-
|
|
174
|
+
When the prompt ends with a `PASS RECORD` step, take it once the pass has
|
|
175
|
+
finished: the Genesis `passes done quality-pass` operation records it in `genesis/passes.json`,
|
|
176
|
+
an uncommitted change that lands in the pass's own commit. Genesis adds that
|
|
177
|
+
step only to the pass's own runs, whose requests it writes itself, so a quality
|
|
178
|
+
pass of a section, commits or your own changes is never recorded as the pass;
|
|
179
|
+
neither is a pass that stopped early, was abandoned or still has failing
|
|
180
|
+
checks.
|
|
181
|
+
|
|
182
|
+
## Deep run
|
|
183
|
+
|
|
184
|
+
When the prompt has a `DEEP RUN` section, follow it: it says how the checklist,
|
|
185
|
+
evidence, chunks, commits and report work for every pass. This pass adds to the
|
|
186
|
+
checklist:
|
|
187
|
+
|
|
188
|
+
- every screen and flow, with each of its states (loading, empty, partial,
|
|
189
|
+
failed, refused, offline, first use) as an item of its own, and every
|
|
190
|
+
refusal message;
|
|
191
|
+
- the cross-subsystem item: the same state or refusal handled or worded
|
|
192
|
+
differently in different places.
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-review
|
|
3
|
+
description: Review the work against what the software should do through an explicitly requested review over the whole app, the changes since its last completed run, a named section or the current work, judging the tests (each changed behavior has one that would fail without it; none weakened or skipped), the gaps between intent, code and explanation, and costs that grow with the data, writing only tests and reporting everything else. Use when asked for a review, a review pass, or to check the tests and the work against the Blueprint.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genesis review
|
|
7
|
+
|
|
8
|
+
Judge the work against what the software should do, and the tests against the
|
|
9
|
+
work, and say plainly what was and was not verified. A review is explicit:
|
|
10
|
+
never run it merely because implementation finished.
|
|
11
|
+
|
|
12
|
+
Resolve the invocation before running the first Genesis operation. Do not use a
|
|
13
|
+
Genesis operation or `genesis --version` as an availability probe.
|
|
14
|
+
|
|
15
|
+
1. Read the repository-root `package.json`. Treat Genesis as project-pinned only
|
|
16
|
+
when that manifest's `name` is `genesis-compiler`, or its `dependencies`,
|
|
17
|
+
`devDependencies`, or `optionalDependencies` contain the exact
|
|
18
|
+
`genesis-compiler` key.
|
|
19
|
+
2. For a project-pinned repository, invoke every Genesis CLI operation with
|
|
20
|
+
`npm exec --no -- genesis <arguments>`. This runs without fetching another
|
|
21
|
+
package. If the declared package is not installed, report that the project's
|
|
22
|
+
dependencies are not prepared; do not fall back to another Genesis version.
|
|
23
|
+
3. Otherwise, do not try `npm exec`. Run `command -v genesis` (or the current
|
|
24
|
+
shell's equivalent `PATH` lookup). When it resolves an executable, invoke
|
|
25
|
+
`genesis <arguments>` directly.
|
|
26
|
+
4. When neither source is available, stop and report that Genesis is
|
|
27
|
+
unavailable. Never install or update Genesis merely to satisfy a workflow
|
|
28
|
+
instruction.
|
|
29
|
+
|
|
30
|
+
Successful invocation resolution is routine. Do not narrate whether Genesis is
|
|
31
|
+
project-pinned or on `PATH`, and never describe direct `PATH` use as a fallback.
|
|
32
|
+
Mention how the invocation was selected only when resolution fails or the user
|
|
33
|
+
explicitly asks.
|
|
34
|
+
|
|
35
|
+
Follow the configured Collaboration approach for user-facing updates, including
|
|
36
|
+
its technical depth and response length. Report concrete progress,
|
|
37
|
+
findings, or blockers; do not announce that you are following guidance.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Load the effective project instructions once
|
|
41
|
+
|
|
42
|
+
A review request may arrive as a complete Genesis-generated prompt or as a
|
|
43
|
+
direct request such as `Review` or `Review the Orders section`.
|
|
44
|
+
|
|
45
|
+
If the current task already contains `GENESIS CONTEXT` whose task is `review`,
|
|
46
|
+
continue with it directly. Do not generate another prompt.
|
|
47
|
+
|
|
48
|
+
Otherwise, before resolving scope, run the Genesis `prompt --task review`
|
|
49
|
+
operation once using the invocation rule above. For a bare `Review` request,
|
|
50
|
+
pass no request argument. When the user names a section, commits or the
|
|
51
|
+
current work, pass that exact request as one safely quoted argument. Treat the
|
|
52
|
+
printed prompt as the instructions for this same turn; do not dispatch it to
|
|
53
|
+
another agent and do not generate it again.
|
|
54
|
+
|
|
55
|
+
When the user asks for a deep run of this pass, pass its Deep request,
|
|
56
|
+
`Review the whole app deeply.`, exactly;
|
|
57
|
+
Genesis then adds the run's `DEEP RUN` section.
|
|
58
|
+
|
|
59
|
+
## Resolve the scope
|
|
60
|
+
|
|
61
|
+
Inspect `git status --short` and the staged and unstaged diffs before editing.
|
|
62
|
+
A dirty worktree is allowed. Preserve the existing index and unrelated work; do
|
|
63
|
+
not stage, stash, commit, or discard changes as a prerequisite.
|
|
64
|
+
|
|
65
|
+
When the prompt has a `PASS RUN` section, the request is one of the pass's own
|
|
66
|
+
runs (the whole app, the changes since its last completed run judged against
|
|
67
|
+
the whole app, or a deep run) or a run over the changes since a base commit the
|
|
68
|
+
request names, and its scope is the one that section states, whatever the
|
|
69
|
+
defaults below say. A deep run's prompt also has a `DEEP RUN`
|
|
70
|
+
section; follow it with "Deep run" below.
|
|
71
|
+
|
|
72
|
+
- **The work (default).** The relationship between the Blueprint, the code, the
|
|
73
|
+
Program and the tests as they stand now.
|
|
74
|
+
- **The whole app.** Every behavior the project's own source exposes and the
|
|
75
|
+
tests that prove it.
|
|
76
|
+
- **A section or the changes.** A named area, explicit commits, or the current
|
|
77
|
+
task's changes: the behavior they create or change and its tests.
|
|
78
|
+
|
|
79
|
+
If the scope is ambiguous, ask which section or changes.
|
|
80
|
+
|
|
81
|
+
## Boundaries
|
|
82
|
+
|
|
83
|
+
- The prompt says what a review judges. It edits only tests: it adds or updates
|
|
84
|
+
the tests changed behavior lacks and changes no product code, Blueprint,
|
|
85
|
+
Program, Stack or other file. Every other finding is reported with the
|
|
86
|
+
smallest sensible correction, left unchanged.
|
|
87
|
+
- Run the tests relevant to the scope; report what actually ran and what was not
|
|
88
|
+
verified, and never report an unrun check as passing.
|
|
89
|
+
|
|
90
|
+
Leave the review as ordinary uncommitted work for a later normal commit. Never
|
|
91
|
+
amend or rewrite selected commits.
|
|
92
|
+
|
|
93
|
+
When the prompt ends with a `PASS RECORD` step, take it once the review has
|
|
94
|
+
finished: the Genesis `passes done review` operation records it in `genesis/passes-added.json`,
|
|
95
|
+
an uncommitted change that lands in the review's own commit. Genesis adds that
|
|
96
|
+
step only to the pass's own runs, whose requests it writes itself, so a review
|
|
97
|
+
of a section, commits, a base or the current work is never recorded as the
|
|
98
|
+
pass; neither is a review that stopped early, was abandoned or still has
|
|
99
|
+
failing checks.
|
|
100
|
+
|
|
101
|
+
## Deep run
|
|
102
|
+
|
|
103
|
+
When the prompt has a `DEEP RUN` section, follow it: it says how the checklist,
|
|
104
|
+
evidence, chunks, commits and report work for every pass. This pass adds to the
|
|
105
|
+
checklist:
|
|
106
|
+
|
|
107
|
+
- every behavior the source exposes (operation, screen, command or job), each
|
|
108
|
+
with the test that would fail without it, or the missing test written or
|
|
109
|
+
reported;
|
|
110
|
+
- every test file: whether it runs in the whole suite, what it proves, what it
|
|
111
|
+
costs, and any test weakened, skipped or loosened;
|
|
112
|
+
- every list, batch and write path, with its query or call counts at a few rows
|
|
113
|
+
and at a realistic number;
|
|
114
|
+
- the Blueprint, Program and `genesis/subsystems.md` entries against the code;
|
|
115
|
+
- the cross-subsystem item: the same behavior tested in different ways or not
|
|
116
|
+
at all, a table with more than one owner, and work over a whole population
|
|
117
|
+
done inside a request.
|
|
118
|
+
|
|
119
|
+
Review's limits hold in a deep run: it writes only tests, and every other
|
|
120
|
+
finding is reported and left unchanged.
|