genesis-compiler 1.10.19 → 1.10.20
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 +38 -4
- package/docs/prompt-integration.md +6 -0
- package/docs/stack-components.md +19 -3
- package/package.json +4 -1
- package/plugins/genesis/.codex-plugin/plugin.json +1 -1
- package/prompts/data-pass.txt +21 -0
- package/prompts/identity-pass.txt +23 -0
- package/prompts/quality-pass.txt +21 -0
- package/skills/genesis-data-pass/SKILL.md +163 -0
- package/skills/genesis-data-pass/agents/openai.yaml +4 -0
- package/skills/genesis-deslop/SKILL.md +5 -0
- package/skills/genesis-identity-pass/SKILL.md +259 -0
- package/skills/genesis-identity-pass/agents/openai.yaml +4 -0
- package/skills/genesis-project/references/sanity-checks.md +6 -1
- package/skills/genesis-quality-pass/SKILL.md +166 -0
- package/skills/genesis-quality-pass/agents/openai.yaml +4 -0
- package/skills/genesis-ui-pass/SKILL.md +5 -0
- package/src/cli-commands.js +10 -1
- package/src/cli.js +21 -4
- package/src/index/agent-skills.js +6 -4
- package/src/index/assets.js +3 -2
- package/src/index/contracts.js +1 -0
- package/src/index/pass-record.js +61 -0
- package/src/index/passes.js +59 -0
- package/src/index/project-inspection.js +2 -1
- package/src/index/prompt.js +56 -11
- package/src/index/stack-piece.js +13 -12
- package/src/index/stack.js +2 -2
- package/src/index.js +11 -1
package/README.md
CHANGED
|
@@ -27,8 +27,9 @@ genesis/
|
|
|
27
27
|
collaboration.md project-wide communication choices and authored requirements
|
|
28
28
|
engineering.md selected engineering profile and project-specific requirements
|
|
29
29
|
stack.md selected components, resources, verification, and project-owned operation contracts
|
|
30
|
-
stack/ optional per-component Description, Guidance, Adoption, Post-change,
|
|
30
|
+
stack/ optional per-component Description, Guidance, Adoption, Post-change, and pass customization
|
|
31
31
|
subsystems.md authored responsibilities, Program membership, and data ownership/use
|
|
32
|
+
passes.json when each pass last finished, written by its last step (absent until one does)
|
|
32
33
|
program/ concise public-operation explanations
|
|
33
34
|
.agents/skills/
|
|
34
35
|
genesis-* Genesis workflow skills
|
|
@@ -187,11 +188,12 @@ type a command. It never runs adoption without approval and does nothing in an
|
|
|
187
188
|
empty or already-adopted project.
|
|
188
189
|
|
|
189
190
|
`genesis init` creates an empty Blueprint, a focused engineering approach, an
|
|
190
|
-
empty optional Stack, the current `genesis/version`,
|
|
191
|
+
empty optional Stack, the current `genesis/version`, seven project Agent Skills,
|
|
191
192
|
and project-local guidance adapters for Codex, Claude Code and OpenCode. The skills are ordinary
|
|
192
193
|
[Agent Skills](https://agentskills.io): `genesis-project`, `genesis-program`,
|
|
193
|
-
`genesis-deslop
|
|
194
|
-
|
|
194
|
+
and one for each pass (`genesis-deslop`, `genesis-ui-pass`, `genesis-identity-pass`,
|
|
195
|
+
`genesis-quality-pass` and `genesis-data-pass`), each with standard `SKILL.md` and
|
|
196
|
+
`agents/openai.yaml` metadata. Open `/hooks` once in Codex to review and trust the guidance hook;
|
|
195
197
|
Claude Code loads its project hooks and OpenCode discovers its local project plugin automatically. All three use the same
|
|
196
198
|
Genesis-owned operating guide for new sessions and after compaction. When the
|
|
197
199
|
optional first-party catalog is installed beside Genesis, that guide includes
|
|
@@ -253,10 +255,12 @@ files alone does not refresh its existing context.
|
|
|
253
255
|
| `genesis stack list` | Lists technology components from the installed Stack catalog. |
|
|
254
256
|
| `genesis stack add <piece...>` | Resolves component dependencies/conflicts, records the selection, materializes missing project contracts, synchronizes declared skills, and prints the one-time preparation prompt. It does not install application packages or run an agent. |
|
|
255
257
|
| `genesis skills sync` | Refreshes selected, unmodified managed skills while preserving customized and unmanaged copies. |
|
|
258
|
+
| `genesis passes done <pass>` | Records in `genesis/passes.json` that a pass finished now; every pass prompt ends with it. |
|
|
256
259
|
| `genesis context <path...>` | Returns path-focused Program explanations, indexed functions, selected technology guidance, exact project contracts, and relevant skills. |
|
|
257
260
|
| `genesis index [--call-web] [function-or-path...]` | Regenerates the derived code indexes and optionally searches the existing function/method inventory. `--call-web` also writes the derived function call web. |
|
|
258
261
|
| `genesis inspect environment` | Reports declared resources, public defaults, missing input names, and environment-file paths without returning secret values. |
|
|
259
262
|
| `genesis inspect skills` | Reports selected skill freshness and ownership without changing files. |
|
|
263
|
+
| `genesis inspect passes` | Lists every pass with its title, description, recommendation hint, Stack guidance and last run. |
|
|
260
264
|
| `genesis inspect section <name>` | Returns one exact consumer-owned Stack section without interpreting or executing it. |
|
|
261
265
|
| `genesis prompt [request...]` | Generates the ordinary implementation prompt. Use `--task` for opening, adoption, Deslop, explanation, review, and other explicit prompt tasks. |
|
|
262
266
|
| `genesis verify` | Executes only the ordered finite commands in `## Verification` and records exact evidence. |
|
|
@@ -628,6 +632,36 @@ prose of the selected Stack components, which names the technology's design
|
|
|
628
632
|
rules and method. Defects become findings; screenshots at 390, 768 and 1280
|
|
629
633
|
pixels in light and dark are the evidence. See [docs/ui-pass.md](docs/ui-pass.md).
|
|
630
634
|
|
|
635
|
+
### Identity, quality and data passes
|
|
636
|
+
|
|
637
|
+
Three more passes run only when asked, over the whole app unless the request
|
|
638
|
+
names a section or your changes:
|
|
639
|
+
|
|
640
|
+
```text
|
|
641
|
+
Give the app its visual identity
|
|
642
|
+
Quality pass
|
|
643
|
+
Data pass the Orders section
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
```bash
|
|
647
|
+
genesis prompt --task identity-pass
|
|
648
|
+
genesis prompt --task quality-pass
|
|
649
|
+
genesis prompt --task data-pass "Data pass the Orders section"
|
|
650
|
+
genesis inspect passes --json
|
|
651
|
+
```
|
|
652
|
+
|
|
653
|
+
The identity pass gives the software a look of its own: one seed colour, art
|
|
654
|
+
drawn in code for each kind of content, a logo, empty states, a loading screen
|
|
655
|
+
and sign-in. The quality pass makes loading, empty, error and refused states,
|
|
656
|
+
edge cases and accessibility hold up, proved by using the software. The data
|
|
657
|
+
pass makes queries, constraints, migrations and indexes hold up at real sizes,
|
|
658
|
+
proved by counts. Each skill holds the portable method and points at the
|
|
659
|
+
sanity checks guide; selected Stack components add where each piece lives in
|
|
660
|
+
their technology. `genesis inspect passes` lists every pass, Deslop and the UI
|
|
661
|
+
pass included, for a host to offer, with when each last finished: a pass's last
|
|
662
|
+
step, `genesis passes done <pass>`, records that in the committed
|
|
663
|
+
`genesis/passes.json`. See [docs/passes.md](docs/passes.md).
|
|
664
|
+
|
|
631
665
|
Projects can customize a selected technology through its matching file, such
|
|
632
666
|
as `genesis/stack/jskit.md`:
|
|
633
667
|
|
|
@@ -307,6 +307,12 @@ generates the canonical `ui-pass` prompt once, like Deslop's. A host offers it
|
|
|
307
307
|
only when `inspectPromptTasks()` reports Stack guidance for `ui-pass`; see
|
|
308
308
|
[UI pass](ui-pass.md).
|
|
309
309
|
|
|
310
|
+
The identity, quality and data passes are explicit prompt tasks of the same
|
|
311
|
+
family, whose default scope is the whole app. A host lists every pass, with its
|
|
312
|
+
title, description, recommendation hint and last run, through `inspectPasses()`
|
|
313
|
+
or `genesis inspect passes --json`, instead of naming them itself; see
|
|
314
|
+
[Passes](passes.md).
|
|
315
|
+
|
|
310
316
|
Once Codex identifies relevant source, `genesis context <path...>` returns only
|
|
311
317
|
Program modules citing those paths plus the effective engineering approach,
|
|
312
318
|
concise selected Stack guidance, exact project-owned Stack contracts, the
|
package/docs/stack-components.md
CHANGED
|
@@ -100,6 +100,21 @@ Concise technology context.
|
|
|
100
100
|
- The design rules and per-scope method for a UI pass, usually a pointer to
|
|
101
101
|
the technology's own guidance.
|
|
102
102
|
|
|
103
|
+
## Identity pass
|
|
104
|
+
|
|
105
|
+
- Where the theme, content colours, artwork, logo, loading screen and sign-in
|
|
106
|
+
live in this technology, usually a pointer to its own guidance.
|
|
107
|
+
|
|
108
|
+
## Quality pass
|
|
109
|
+
|
|
110
|
+
- How this technology shows loading, empty, error and refused states and how
|
|
111
|
+
to drive the software to see them.
|
|
112
|
+
|
|
113
|
+
## Data pass
|
|
114
|
+
|
|
115
|
+
- The data owner layer, query counter, migration mechanics and database
|
|
116
|
+
differences of this technology.
|
|
117
|
+
|
|
103
118
|
## Consumer operation
|
|
104
119
|
|
|
105
120
|
```json example.consumer-operation.v1
|
|
@@ -110,8 +125,8 @@ Concise technology context.
|
|
|
110
125
|
```
|
|
111
126
|
````
|
|
112
127
|
|
|
113
|
-
`Description`, `Guidance`, `Adoption`, `Post-change`,
|
|
114
|
-
are prose.
|
|
128
|
+
`Description`, `Guidance`, `Adoption`, `Post-change`, and each pass's section
|
|
129
|
+
(`Deslop`, `UI pass`, `Identity pass`, `Quality pass`, `Data pass`) are prose.
|
|
115
130
|
`Requires` and `Conflicts` define component selection. `Skill` names one
|
|
116
131
|
complete authoritative Agent Skill directory. `Indexers` selects installed
|
|
117
132
|
structural adapters.
|
|
@@ -261,7 +276,8 @@ A selected component may have one prose-only customization at
|
|
|
261
276
|
```
|
|
262
277
|
|
|
263
278
|
Customizations may add or override only Description, Guidance, Adoption,
|
|
264
|
-
Post-change,
|
|
279
|
+
Post-change, and the pass sections (Deslop, UI pass, Identity pass, Quality pass
|
|
280
|
+
and Data pass). They cannot mutate selection, resources, environment
|
|
265
281
|
declarations, Verification, Agent Skill ownership, indexers, or opaque consumer
|
|
266
282
|
sections.
|
|
267
283
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "genesis-compiler",
|
|
3
|
-
"version": "1.10.
|
|
3
|
+
"version": "1.10.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "An agent-independent prompt, multi-language code-index, cleanup, and verification companion with project agent guidance.",
|
|
6
6
|
"repository": {
|
|
@@ -33,6 +33,9 @@
|
|
|
33
33
|
"prompts/describe.txt",
|
|
34
34
|
"prompts/deslop.txt",
|
|
35
35
|
"prompts/ui-pass.txt",
|
|
36
|
+
"prompts/identity-pass.txt",
|
|
37
|
+
"prompts/quality-pass.txt",
|
|
38
|
+
"prompts/data-pass.txt",
|
|
36
39
|
"prompts/program.txt",
|
|
37
40
|
"prompts/review.txt",
|
|
38
41
|
"prompts/start.txt",
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
This data pass task has already been rendered by Genesis. Do not generate
|
|
2
|
+
another data pass prompt. Read and follow
|
|
3
|
+
`.agents/skills/genesis-data-pass/SKILL.md` completely.
|
|
4
|
+
|
|
5
|
+
This is an explicitly requested data pass. With no stated scope it covers the
|
|
6
|
+
whole app. A named section, your own changes, or an explicit commit,
|
|
7
|
+
first-parent count, or range in USER REQUEST narrows it. Establish ownership of
|
|
8
|
+
your own changes from task and edit history; the entire dirty diff is not
|
|
9
|
+
automatically yours. A dirty worktree is allowed: preserve unrelated edits and
|
|
10
|
+
existing staging, and leave the pass as ordinary uncommitted work for review.
|
|
11
|
+
|
|
12
|
+
Apply the selected Stack data pass guidance and applicable technology skills in
|
|
13
|
+
addition to the Genesis data pass contract. Stack guidance names its data owner
|
|
14
|
+
layer, query counter, migration mechanics and what differs between databases;
|
|
15
|
+
it cannot broaden the resolved scope or change what the data means. Measure on
|
|
16
|
+
test databases only, never on a development or production database.
|
|
17
|
+
|
|
18
|
+
Report the resolved scope, the data map, each path's counts before and after at
|
|
19
|
+
a few rows and at a realistic size, the constraints, migrations and indexes
|
|
20
|
+
added with their evidence, files changed, checks actually run, and any defect
|
|
21
|
+
or gap deliberately left for follow-up.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
This identity pass task has already been rendered by Genesis. Do not generate
|
|
2
|
+
another identity pass prompt. Read and follow
|
|
3
|
+
`.agents/skills/genesis-identity-pass/SKILL.md` completely.
|
|
4
|
+
|
|
5
|
+
This is an explicitly requested visual identity pass. With no stated scope it
|
|
6
|
+
covers the whole app. A named section, your own changes, or an explicit commit,
|
|
7
|
+
first-parent count, or range in USER REQUEST narrows it; a narrower scope
|
|
8
|
+
extends the app's existing identity rather than inventing another. Establish
|
|
9
|
+
ownership of your own changes from task and edit history; the entire dirty diff
|
|
10
|
+
is not automatically yours. A dirty worktree is allowed: preserve unrelated
|
|
11
|
+
edits and existing staging, and leave the pass as ordinary uncommitted work for
|
|
12
|
+
review.
|
|
13
|
+
|
|
14
|
+
Apply the selected Stack identity pass guidance and applicable technology
|
|
15
|
+
skills in addition to the Genesis identity pass contract. Stack guidance names
|
|
16
|
+
where the theme, the colour module, the artwork, the logo, the loading screen
|
|
17
|
+
and sign-in live in its technology; it cannot broaden the resolved scope or
|
|
18
|
+
turn this into a feature change.
|
|
19
|
+
|
|
20
|
+
Report the resolved scope, the look spec (style option, seed, content kinds
|
|
21
|
+
and their motifs), what changed, files changed, the checks, contrast figures
|
|
22
|
+
and screenshots actually taken, and any defect or gap deliberately left for
|
|
23
|
+
follow-up.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
This quality pass task has already been rendered by Genesis. Do not generate
|
|
2
|
+
another quality pass prompt. Read and follow
|
|
3
|
+
`.agents/skills/genesis-quality-pass/SKILL.md` completely.
|
|
4
|
+
|
|
5
|
+
This is an explicitly requested quality pass. With no stated scope it covers
|
|
6
|
+
the whole app. A named section, your own changes, or an explicit commit,
|
|
7
|
+
first-parent count, or range in USER REQUEST narrows it. Establish ownership of
|
|
8
|
+
your own changes from task and edit history; the entire dirty diff is not
|
|
9
|
+
automatically yours. A dirty worktree is allowed: preserve unrelated edits and
|
|
10
|
+
existing staging, and leave the pass as ordinary uncommitted work for review.
|
|
11
|
+
|
|
12
|
+
Apply the selected Stack quality pass guidance and applicable technology skills
|
|
13
|
+
in addition to the Genesis quality pass contract. Stack guidance names how its
|
|
14
|
+
technology shows loading, empty, error and refused states and how to drive the
|
|
15
|
+
software; it cannot broaden the resolved scope or turn this into a feature
|
|
16
|
+
change. Prove the result by using the software through its real interface.
|
|
17
|
+
|
|
18
|
+
Report the resolved scope, the states listed for each screen or flow with what
|
|
19
|
+
was missing and what changed, the edge cases tried, the refusals reworded, the
|
|
20
|
+
accessibility checks, files changed, the screenshots and tests actually taken
|
|
21
|
+
and run, and any defect or gap deliberately left for follow-up.
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genesis-data-pass
|
|
3
|
+
description: Make a project's data hold up at real sizes through an explicitly requested data pass over the whole app, a named section, or the agent's own changes, covering queries that grow with the rows read, no per-row lookups, filters and limits in the query, every constraint enforced and tried, safe migrations, indexes for the filters the app really runs, and tests at realistic sizes. Use when asked for a data pass, or to check data access, scale, constraints, migrations or indexes.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genesis data pass
|
|
7
|
+
|
|
8
|
+
Make the software's data access correct and affordable at the sizes it will
|
|
9
|
+
really hold, and prove it with counts. A data pass is explicit: never run it
|
|
10
|
+
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 data pass request may arrive as a complete Genesis-generated prompt or as a
|
|
42
|
+
direct request such as `Data pass` or `Data pass the Orders section`.
|
|
43
|
+
|
|
44
|
+
If the current task already contains `GENESIS CONTEXT` whose task is
|
|
45
|
+
`data-pass`, continue with it directly. Do not generate another prompt.
|
|
46
|
+
|
|
47
|
+
Otherwise, before resolving scope, run the Genesis `prompt --task data-pass`
|
|
48
|
+
operation once using the invocation rule above. For a bare `Data pass` request,
|
|
49
|
+
pass no request argument. When the user names a section, commits or your own
|
|
50
|
+
changes, pass that exact request as one safely quoted argument. Treat the
|
|
51
|
+
printed prompt as the instructions for this same turn; do not dispatch it to
|
|
52
|
+
another agent and do not generate it again. This step composes the selected
|
|
53
|
+
Stack's data pass guidance and any project customization with the portable
|
|
54
|
+
contract below.
|
|
55
|
+
|
|
56
|
+
## Resolve the scope
|
|
57
|
+
|
|
58
|
+
Inspect `git status --short` and the staged and unstaged diffs before editing.
|
|
59
|
+
A dirty worktree is allowed. Preserve the existing index and unrelated work; do
|
|
60
|
+
not stage, stash, commit, or discard changes as a prerequisite.
|
|
61
|
+
|
|
62
|
+
- **The whole app (default).** Every table, collection or store, and every
|
|
63
|
+
path that reads or writes them.
|
|
64
|
+
- **A section.** A named area (a module, a subsystem, a set of tables): its
|
|
65
|
+
stores and every path through them, touched or not.
|
|
66
|
+
- **The changes.** Your own changes for the current task, or explicit commits,
|
|
67
|
+
established and resolved as for Deslop: the stores and paths they create or
|
|
68
|
+
change.
|
|
69
|
+
|
|
70
|
+
If the scope is ambiguous, ask which section or changes.
|
|
71
|
+
|
|
72
|
+
## Map the data first
|
|
73
|
+
|
|
74
|
+
Read the engineering approach's rules on query counts and realistic tests, and
|
|
75
|
+
these sections of the sanity checks guide
|
|
76
|
+
(`.agents/skills/genesis-project/references/sanity-checks.md`): "Never do
|
|
77
|
+
these", "Data: one owner per table", "Data: one source for each fact", "Data:
|
|
78
|
+
loading a dataset", "Data: each read asks for the rows it uses", "Data: saves,
|
|
79
|
+
batches and background work" and "Inputs and access". They describe what good
|
|
80
|
+
looks like; this pass applies them across the whole scope and fixes what they
|
|
81
|
+
find.
|
|
82
|
+
|
|
83
|
+
Then list, for the scope: each table, collection or store with its one owner
|
|
84
|
+
(`genesis/subsystems.md` records data ownership), who reads and writes it, its
|
|
85
|
+
constraints and its indexes; and each list, batch, write and background path
|
|
86
|
+
with the filters, sorts and joins it runs. A query, a constraint or an index
|
|
87
|
+
can only be judged against the data it serves.
|
|
88
|
+
|
|
89
|
+
## Measure before changing
|
|
90
|
+
|
|
91
|
+
Seed realistic sizes in a test database: hundreds of rows in each list, long
|
|
92
|
+
histories per person, and more rows than any cap. Never use a development or
|
|
93
|
+
production database. Count each path's queries or storage calls at a few rows
|
|
94
|
+
and at the realistic size, and keep the statements captured. A handful of rows
|
|
95
|
+
hides per-row work, and these counts are the figures the report compares.
|
|
96
|
+
|
|
97
|
+
## Apply the data contract
|
|
98
|
+
|
|
99
|
+
1. **Counts follow the rows read.** Fix each path whose count grows with the
|
|
100
|
+
rows or with a person's history, as "Data: loading a dataset" describes:
|
|
101
|
+
related rows in one batch per related table, and no lookup, single-record
|
|
102
|
+
read or access check inside a loop.
|
|
103
|
+
2. **The query narrows.** Move each filter, sort, limit, existence check and
|
|
104
|
+
count that code applies to returned rows into the query, as "Data: each read
|
|
105
|
+
asks for the rows it uses" describes; a list that can grow is paged, and a
|
|
106
|
+
capped read is never used as if complete.
|
|
107
|
+
3. **Every constraint enforced, and each one tried.** Every rule the data must
|
|
108
|
+
keep (required, unique, unique within an owner, a reference to another row,
|
|
109
|
+
an allowed range or set) is enforced by the store where it can express it,
|
|
110
|
+
and by the data's owner otherwise. A test sends one value that breaks each
|
|
111
|
+
and sees it refused, with a message the person can act on. Before adding a
|
|
112
|
+
constraint, count the existing rows that break it; never delete or rewrite
|
|
113
|
+
them to make it fit: ask the person what the data should say.
|
|
114
|
+
4. **Safe migrations.** Each change is a new migration; one that has run
|
|
115
|
+
anywhere is never edited. Prefer additive steps: add, backfill in bounded
|
|
116
|
+
chunks, then constrain or switch over, and remove the old shape in a later
|
|
117
|
+
change. Know how long each step holds its locks at the real size, and use
|
|
118
|
+
the database's online forms for large tables. A step that cannot be undone,
|
|
119
|
+
or that may lose data, needs the person's agreement first. Run the migration
|
|
120
|
+
on a copy at realistic size, and keep replaying the full history from empty
|
|
121
|
+
as its own check.
|
|
122
|
+
5. **Indexes for the filters the app really runs.** From the captured
|
|
123
|
+
statements, list each filter, sort and join, and give each one an index that
|
|
124
|
+
serves it, its columns in the order the query uses them; index the columns
|
|
125
|
+
that reference other rows when the app filters or joins by them. Read the
|
|
126
|
+
query plan to see each index used. Add no speculative index: each one slows
|
|
127
|
+
every write and takes space. Remove an index only when you can show nothing
|
|
128
|
+
uses it.
|
|
129
|
+
6. **Tests at realistic sizes.** Each list, batch and write path keeps a test
|
|
130
|
+
comparing its count at a few rows and at a realistic number, never a fixed
|
|
131
|
+
ceiling tuned until it passes; each constraint keeps the test that trips it;
|
|
132
|
+
each owner keeps a test that another owner's rows stay unseen and unchanged.
|
|
133
|
+
|
|
134
|
+
## Boundaries
|
|
135
|
+
|
|
136
|
+
- The pass changes how data is read, written, constrained and indexed, never
|
|
137
|
+
what it means: no product rule change, no dropped column or row, and no data
|
|
138
|
+
rewritten without the person's agreement. A missing feature is a follow-up
|
|
139
|
+
finding, left unchanged.
|
|
140
|
+
- Tests and measurements use test databases the run creates and drops; never a
|
|
141
|
+
development or production database or its configuration.
|
|
142
|
+
- The selected Stack's data pass guidance names its owner layer, its query
|
|
143
|
+
counter, its migration mechanics and what differs between databases; follow
|
|
144
|
+
it.
|
|
145
|
+
- **Fix at the owner.** When the framework or a library blocks a correct
|
|
146
|
+
query, report the exact change it needs instead of working around it in the
|
|
147
|
+
app.
|
|
148
|
+
- Do not edit `.genesis/`, Git metadata, dependency directories, generated
|
|
149
|
+
build output, retained migration history (add new migrations instead), or
|
|
150
|
+
external resources.
|
|
151
|
+
|
|
152
|
+
Leave the pass as ordinary uncommitted work for review and a later normal
|
|
153
|
+
commit. Never amend or rewrite selected commits. Summarize the resolved scope,
|
|
154
|
+
the data map, each path's counts before and after at both sizes, the
|
|
155
|
+
constraints added with the test that trips each, the migrations with their
|
|
156
|
+
lock and time notes, the indexes with the query each serves and the plan that
|
|
157
|
+
uses it, the tests added, files changed, checks actually run, and follow-up
|
|
158
|
+
findings left unchanged.
|
|
159
|
+
|
|
160
|
+
Once the pass has finished, end with the prompt's `PASS RECORD` step: the
|
|
161
|
+
Genesis `passes done data-pass` operation records it in `genesis/passes.json`, an
|
|
162
|
+
uncommitted change that lands in the pass's own commit. A pass that stopped
|
|
163
|
+
early, was abandoned or still has failing checks is not recorded.
|
|
@@ -146,3 +146,8 @@ useful. Final declared checks remain available through the Genesis `verify`
|
|
|
146
146
|
operation. Summarize the resolved scope and any selected commit identities,
|
|
147
147
|
what became simpler, the behaviors checked before and after, files changed,
|
|
148
148
|
checks actually run, and follow-up findings left unchanged.
|
|
149
|
+
|
|
150
|
+
Once the pass has finished, end with the prompt's `PASS RECORD` step: the
|
|
151
|
+
Genesis `passes done deslop` operation records it in `genesis/passes.json`, an
|
|
152
|
+
uncommitted change that lands in the pass's own commit. A pass that stopped
|
|
153
|
+
early, was abandoned or still has failing checks is not recorded.
|