@zenera/cli 1.1.45 → 1.1.47
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/dist/archive.js +3 -2
- package/dist/commands/export.js +4 -3
- package/dist/scaffold.js +7 -3
- package/package.json +4 -4
- package/templates/editor/.github/copilot-instructions.md +6 -7
- package/templates/editor/.github/skills/spec-edit/SKILL.md +13 -4
- package/templates/editor/.github/skills/spec-sync-project/SKILL.md +32 -80
- package/templates/editor/.github/skills/zen-review/SKILL.md +2 -2
- package/templates/editor/.github/skills/zen-spec-sync/SKILL.md +108 -29
- package/templates/project/env +3 -6
- package/templates/project/env.example +12 -0
- package/templates/project/env.test +12 -0
- package/templates/project/gitignore +2 -1
package/dist/archive.js
CHANGED
|
@@ -67,8 +67,9 @@ export function excluded(rel, isDir, opts = {}) {
|
|
|
67
67
|
}
|
|
68
68
|
// The credentials never travel, in any form and behind no flag. What the
|
|
69
69
|
// project needs is described by `.env.example`, which `export` synthesizes
|
|
70
|
-
// from the names in this file.
|
|
71
|
-
|
|
70
|
+
// from the names in this file. Its variants (`.env.test`, `.env.local`, what
|
|
71
|
+
// `ZEN_ENV_FILE` names) are credentials just the same.
|
|
72
|
+
if (rel === ENV_FILE || (rel.startsWith(`${ENV_FILE}.`) && rel !== ENV_EXAMPLE)) {
|
|
72
73
|
return 'env';
|
|
73
74
|
}
|
|
74
75
|
if (name === '.lock') {
|
package/dist/commands/export.js
CHANGED
|
@@ -41,8 +41,8 @@ export const pack = {
|
|
|
41
41
|
'',
|
|
42
42
|
'Leaves behind what belongs to this machine: sessions/, .tmp/, .git/,',
|
|
43
43
|
'node_modules/, lock files, any *.zip at the top of the project, and',
|
|
44
|
-
`.env.
|
|
45
|
-
'other end knows what to fill in.',
|
|
44
|
+
`.env and .env.test. Unless the project keeps its own ${ENV_EXAMPLE}, the names in .env`,
|
|
45
|
+
'become one with no values, so the other end knows what to fill in.',
|
|
46
46
|
'',
|
|
47
47
|
'Vectors travel by default — memory has no other source, and a rag',
|
|
48
48
|
'index without its lance/ tree looks built and cannot search.',
|
|
@@ -79,7 +79,8 @@ export const pack = {
|
|
|
79
79
|
const collected = collect(dir, { vectors, memory });
|
|
80
80
|
const extra = new Map();
|
|
81
81
|
const env = join(dir, ENV_FILE);
|
|
82
|
-
|
|
82
|
+
// A project's own `.env.example` is the curated one and travels as is.
|
|
83
|
+
if (existsSync(env) && !existsSync(join(dir, ENV_EXAMPLE))) {
|
|
83
84
|
extra.set(ENV_EXAMPLE, envExample(readFileSync(env, 'utf8')));
|
|
84
85
|
}
|
|
85
86
|
const healthy = await sound(dir, found.name, ctx.json);
|
package/dist/scaffold.js
CHANGED
|
@@ -127,13 +127,17 @@ function modelSection(ref, options) {
|
|
|
127
127
|
*
|
|
128
128
|
* `gitignore` cannot have its dot in the repository: npm strips a `.gitignore`
|
|
129
129
|
* out of a published tarball, and git would read this one as rules about
|
|
130
|
-
* `packages/cli/templates/` rather than as content. `env` cannot have
|
|
131
|
-
* for a plainer reason — this repository ignores `.env`
|
|
132
|
-
*
|
|
130
|
+
* `packages/cli/templates/` rather than as content. The `env` files cannot have
|
|
131
|
+
* their dot for a plainer reason — this repository ignores `.env` and `.env.*`
|
|
132
|
+
* everywhere, so the templates would never be committed at all. In the project
|
|
133
|
+
* `.env` and `.env.test` are ignored, being credentials; `.env.example` holds
|
|
134
|
+
* no values and is meant to be shared.
|
|
133
135
|
*/
|
|
134
136
|
const DOTFILES = {
|
|
135
137
|
gitignore: '.gitignore',
|
|
136
138
|
env: '.env',
|
|
139
|
+
'env.example': '.env.example',
|
|
140
|
+
'env.test': '.env.test',
|
|
137
141
|
};
|
|
138
142
|
/** The name a template file lands under. */
|
|
139
143
|
function target(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenera/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.47",
|
|
4
4
|
"description": "Command-line front end for @zenera/neo: agentic projects you can run, share and commit.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -54,9 +54,9 @@
|
|
|
54
54
|
"@google/genai": "^2.30.0",
|
|
55
55
|
"@inkjs/ui": "^2.0.0",
|
|
56
56
|
"@openrouter/sdk": "^1.4.25",
|
|
57
|
-
"@zenera/engine": "^1.1.
|
|
58
|
-
"@zenera/neo": "^1.1.
|
|
59
|
-
"@zenera/view": "^1.1.
|
|
57
|
+
"@zenera/engine": "^1.1.47",
|
|
58
|
+
"@zenera/neo": "^1.1.47",
|
|
59
|
+
"@zenera/view": "^1.1.47",
|
|
60
60
|
"google-auth-library": "^10.0.0",
|
|
61
61
|
"ink": "^7.1.1",
|
|
62
62
|
"openai": "^6.0.0",
|
|
@@ -58,11 +58,10 @@ code, `zen-topology` for `handoffs:` or `fork:` on any agent,
|
|
|
58
58
|
configured and already passing `zen check` is exactly the case that looks
|
|
59
59
|
finished and is not: the obligation lives in the skill, so a review that never
|
|
60
60
|
opens the skill cannot find what is missing. Outside a specification-sync pass,
|
|
61
|
-
this applies whatever prompted the change. During an incremental sync, load
|
|
62
|
-
skills for
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
the work expands beyond their eligibility rules.
|
|
61
|
+
this applies whatever prompted the change. During an incremental sync, load the
|
|
62
|
+
skills the `zen-spec-sync` pass plan names for the areas its changes reach - an
|
|
63
|
+
enabled capability no change reaches owes nothing new. A full pass still loads
|
|
64
|
+
every enabled capability's skill.
|
|
66
65
|
|
|
67
66
|
**Load `zen-instructions` before writing, editing, reviewing or deleting any
|
|
68
67
|
`agents/*instructions.md`.** They are the house rules, prepended to every
|
|
@@ -1895,8 +1894,8 @@ Run it first and read what it says. Everything else below is judgement, which is
|
|
|
1895
1894
|
why it is still a list. The `zen-review` skill has the detail.
|
|
1896
1895
|
Within a specification-sync pass, reuse its final check with
|
|
1897
1896
|
`review.sh --skip-check` instead of probing again, and apply the sync skill's
|
|
1898
|
-
|
|
1899
|
-
|
|
1897
|
+
pass plan to this checklist. Use `--skip-check no-sandbox` only when that plan
|
|
1898
|
+
does not reach the sandbox image. Independent reviews still cover the whole
|
|
1900
1899
|
checklist.
|
|
1901
1900
|
|
|
1902
1901
|
Before finishing any change here:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: spec-edit
|
|
3
|
-
description: Change SPECIFICATION.md as the request given with the command asks - written in the specification's own structure and voice, checked against what the runtime can actually do - and nothing else. Never explores the project or the environment; discovering how things work is /spec-sync-project's job.
|
|
3
|
+
description: Change SPECIFICATION.md as the request given with the command asks - written in the specification's own structure and voice, checked against what the runtime can actually do - and nothing else. SPECIFICATION.md is the only file it may edit (plus a throwaway temp file when a computation needs one). Never explores the project or the environment; discovering how things work is /spec-sync-project's job.
|
|
4
4
|
argument-hint: 'what to add, change or remove in the specification'
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
@@ -10,8 +10,14 @@ specification is the intent of the project; you are changing the intent, not
|
|
|
10
10
|
the implementation. Making the project match it is `/spec-sync-project`, which
|
|
11
11
|
runs after this.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
**The only file you may edit is `SPECIFICATION.md`.** Do not create, edit,
|
|
14
|
+
rename, move or delete any other file in the project - not `agents.yaml`, not a
|
|
15
|
+
prompt, not a skill, not a script, not `sandbox/`, not
|
|
16
|
+
`SPECIFICATION-FEEDBACK.md`, not a new notes or draft file. The one exception:
|
|
17
|
+
when a computation genuinely needs scratch space, you may use a temporary file
|
|
18
|
+
outside the project (created with `mktemp` in the system temp directory), and
|
|
19
|
+
you delete it before you finish. Anything else the request seems to need
|
|
20
|
+
changed goes into the report for `/spec-sync-project`, never into the project.
|
|
15
21
|
|
|
16
22
|
## 0. Size the edit, then read only what it needs
|
|
17
23
|
|
|
@@ -84,7 +90,8 @@ project beyond the files above. Do not open, list or search anything else in
|
|
|
84
90
|
the project: not `agents/`, `scripts/`, `sandbox/`, `resources/`, `assets/`,
|
|
85
91
|
`gym/`, examples, code or data, and not the skills' own `references/` beyond
|
|
86
92
|
the models reference. Do not run any command other than the `zen models` ones
|
|
87
|
-
above
|
|
93
|
+
above and, when a computation needs it, commands that touch only your own
|
|
94
|
+
temporary file; do not inspect environment variables, the network, running
|
|
88
95
|
processes or installed tools. A path the request names is written into the
|
|
89
96
|
specification as named; you do not read it to find out what is in it.
|
|
90
97
|
|
|
@@ -316,6 +323,8 @@ In the chat:
|
|
|
316
323
|
- anything you did not write because the runtime cannot do it
|
|
317
324
|
- every value written by role or env-var name that only the reader has, and
|
|
318
325
|
anything you would have wanted to look up but did not (§0)
|
|
326
|
+
- every change outside `SPECIFICATION.md` the request implies, left for
|
|
327
|
+
`/spec-sync-project` rather than made
|
|
319
328
|
- then, in one line: send `/spec-sync-project` to make the project match.
|
|
320
329
|
|
|
321
330
|
## 5. The request
|
|
@@ -22,31 +22,16 @@ because this pass has to make the first. Then, from the project root:
|
|
|
22
22
|
```
|
|
23
23
|
|
|
24
24
|
`status` answers `full`, `incremental` or `tampered`. Say which in the chat
|
|
25
|
-
before reading anything
|
|
26
|
-
from
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
Generated house-rule copies print as `maintenance:` and do not alone widen
|
|
36
|
-
the pass; their diffs remain visible and `zen check --fix` owns their repair.
|
|
37
|
-
|
|
38
|
-
The scope decides what you **read and edit**. It never decides what you
|
|
39
|
-
**verify** outside the skill's explicit tiers: **spec-only** and
|
|
40
|
-
**model-reference-only** narrow verification under the conditions the skill
|
|
41
|
-
sets. Choose the tier before loading capability skills. In a normal incremental
|
|
42
|
-
pass, load only skills for capabilities the diff or unresolved work reaches;
|
|
43
|
-
in a full pass, load every enabled capability's skill.
|
|
44
|
-
|
|
45
|
-
When inputs disagree - a ticked answer against a later specification edit, the
|
|
46
|
-
specification against `zen --version` - use the order of precedence in the
|
|
47
|
-
skill. The user's own message comes first. Do not use session history, file
|
|
48
|
-
timestamps or `git log` to work out why something changed. Whatever the order
|
|
49
|
-
does not settle becomes a question in `SPECIFICATION-FEEDBACK.md`.
|
|
25
|
+
before reading anything. `full` and `tampered` mean everything below as
|
|
26
|
+
written, from nothing: read the whole tree, load every enabled capability's
|
|
27
|
+
skill, run setup in full and run the full check.
|
|
28
|
+
|
|
29
|
+
On an incremental pass, the skill owns everything that makes the pass smaller:
|
|
30
|
+
the scope drawn from the diffs, precedence when inputs disagree, and the pass
|
|
31
|
+
plan that decides which capability skills to load, which setup proof and which
|
|
32
|
+
check to run. Post the scope and the plan before reading the project. Wherever a
|
|
33
|
+
section below says **the plan**, it means that plan; on a full pass, read it as
|
|
34
|
+
"everything".
|
|
50
35
|
|
|
51
36
|
## 1. Read before changing anything
|
|
52
37
|
|
|
@@ -65,9 +50,7 @@ Read, in this order, and do not edit until all of it is read:
|
|
|
65
50
|
Never read `.tmp/logs/meta.*` - those are other runs of this command, not
|
|
66
51
|
evidence - nor anything of `zen`'s own (copilot instructions §0.2).
|
|
67
52
|
|
|
68
|
-
On an incremental pass this list narrows to
|
|
69
|
-
and to the changed hunks of the specification rather than all of it. The
|
|
70
|
-
narrowing is a claim: name what you skipped and why the diff does not reach it.
|
|
53
|
+
On an incremental pass this list narrows to what the plan reaches.
|
|
71
54
|
|
|
72
55
|
If an initial diagnostic is needed, run
|
|
73
56
|
`zen check --no-models --no-sandbox` and record what it said. A project that
|
|
@@ -111,13 +94,8 @@ forward pass can see:
|
|
|
111
94
|
These are bugs whatever the specification says: fix them in place and report each
|
|
112
95
|
one. An extra that is merely unspecified is reported under `➕`, not removed.
|
|
113
96
|
|
|
114
|
-
On an incremental pass
|
|
115
|
-
|
|
116
|
-
session, or made by hand since the last pass, is exactly where a fresh
|
|
117
|
-
contradiction comes from. On a full pass it is the whole tree, as above.
|
|
118
|
-
Generated house-rule copies and the editor tree are maintained by `zen check`,
|
|
119
|
-
not audited line by line against the specification. Preserve any project policy
|
|
120
|
-
discovered in their maintenance diffs in a project-owned topic file.
|
|
97
|
+
On an incremental pass the skill says which files this reverse reading covers.
|
|
98
|
+
Generated house-rule copies and the editor tree are never read this way.
|
|
121
99
|
|
|
122
100
|
## 3. Change the smallest thing that closes the gap
|
|
123
101
|
|
|
@@ -146,6 +124,8 @@ the model to compute or remember. Specifically:
|
|
|
146
124
|
|
|
147
125
|
Never delete an **extra** without saying so. Report it, say why the
|
|
148
126
|
specification does not cover it, and leave it unless I tell you to remove it.
|
|
127
|
+
Leave it where it is, too: a line you write for a specified item does not
|
|
128
|
+
mention an extra, so removing it later stays a removal of its own lines.
|
|
149
129
|
|
|
150
130
|
Do not invent a value the specification does not state - a model id, a limit, a
|
|
151
131
|
retry count, a file path. That is an entry in `SPECIFICATION-FEEDBACK.md`, not a
|
|
@@ -397,24 +377,13 @@ Append to the existing file rather than rewriting it, keeping the numbering and
|
|
|
397
377
|
the contents list in step. Numbers are never reused: a struck question's number
|
|
398
378
|
retires with it.
|
|
399
379
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
has a box marked `[x]`, or one answer left under it, and no `✅` entry, the
|
|
403
|
-
reader answered it and never ran `/spec-apply-feedback` - implement that
|
|
404
|
-
answer, fold its text into `SPECIFICATION.md` yourself, and say so in the chat.
|
|
405
|
-
Do this unless the specification has since been edited on the same point. In
|
|
406
|
-
that case the edit supersedes the answer: strike the question, naming the line
|
|
407
|
-
that replaced it, and leave the newer text alone.
|
|
380
|
+
A question the human answered since the last pass is work to close, not a
|
|
381
|
+
question to ask again; the skill says how to implement or supersede it.
|
|
408
382
|
|
|
409
383
|
## 6. Run `scripts/_setup.sh` and watch it finish
|
|
410
384
|
|
|
411
|
-
|
|
412
|
-
until
|
|
413
|
-
or model-reference-only pass, as the `zen-spec-sync` skill defines them:
|
|
414
|
-
there `scripts/_setup.sh --check`
|
|
415
|
-
reporting every step `skipped` is enough, and anything else sends you back to
|
|
416
|
-
the full run below. For any tier, when `STEPS` is empty, one successful
|
|
417
|
-
`scripts/_setup.sh --check` is sufficient; do not run it twice to prove nothing.
|
|
385
|
+
Run setup to the proof the plan names. When it names a full run, a pass is not
|
|
386
|
+
done until `scripts/_setup.sh` has run to completion in this session, as below.
|
|
418
387
|
|
|
419
388
|
It is slow - embedding a large corpus is hours, and the progress line says how
|
|
420
389
|
many - so start it in the background and follow the logs instead of waiting
|
|
@@ -452,18 +421,14 @@ blind:
|
|
|
452
421
|
|
|
453
422
|
## 7. Verify and report
|
|
454
423
|
|
|
455
|
-
After the final edit and setup, run
|
|
456
|
-
`.github/skills/zen-review/scripts/review.sh check full --fix`
|
|
457
|
-
it names rather than working around it.
|
|
458
|
-
`
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
`.github/skills/zen-review/scripts/review.sh --skip-check` (with `no-sandbox`
|
|
462
|
-
only for that eligible tier) for the mechanical review, which verifies the
|
|
463
|
-
receipt instead of probing again. Edits after a check invalidate reuse.
|
|
464
|
-
It validates structure and says nothing about the prose, so work §9 of the
|
|
424
|
+
After the final edit and setup, re-plan, then run the check the final plan names
|
|
425
|
+
(`.github/skills/zen-review/scripts/review.sh check full --fix` on a full pass)
|
|
426
|
+
and fix whatever it names rather than working around it. Run it once; edits
|
|
427
|
+
after it invalidate it. Then run `review.sh --skip-check` in the same mode for
|
|
428
|
+
the mechanical review, which reuses the receipt instead of probing again.
|
|
429
|
+
That validates structure and says nothing about the prose, so work §9 of the
|
|
465
430
|
copilot instructions as a checklist afterwards and report each group pass or
|
|
466
|
-
fail, narrowed only by the
|
|
431
|
+
fail, narrowed only by the plan. Then report in the chat:
|
|
467
432
|
|
|
468
433
|
- what changed, file by file, and which specification item each change closes
|
|
469
434
|
- every prompt or skill line that served no specification item, and what became
|
|
@@ -474,24 +439,11 @@ fail, narrowed only by the skill's tier rules. Then report in the chat:
|
|
|
474
439
|
|
|
475
440
|
## 8. Record the pass
|
|
476
441
|
|
|
477
|
-
Last, and only once §6 and §7 have actually passed
|
|
478
|
-
with
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
unchanged specification line is not yet implemented - and then:
|
|
483
|
-
|
|
484
|
-
```sh
|
|
485
|
-
.github/skills/zen-spec-sync/scripts/snapshot.sh commit
|
|
486
|
-
```
|
|
487
|
-
|
|
488
|
-
In that order, never the other way. Moving the baseline before the pass has
|
|
489
|
-
finished records a specification as applied that was not: the next pass diffs
|
|
490
|
-
against it, sees nothing to do, and the work is never done by anybody. A pass
|
|
491
|
-
that fails with the baseline unmoved costs one repeat.
|
|
492
|
-
|
|
493
|
-
A pass that changed nothing still writes a history file and still commits. Say
|
|
494
|
-
in the chat which history file you wrote and that the baseline moved.
|
|
442
|
+
Last, and only once §6 and §7 have actually passed: write the history entry
|
|
443
|
+
with `snapshot.sh record`, including both plans and `Still open`, then
|
|
444
|
+
`snapshot.sh commit`. Never the other way round; the skill says why and how.
|
|
445
|
+
A pass that changed nothing still records and commits. Say in the chat which
|
|
446
|
+
history file you wrote and that the baseline moved.
|
|
495
447
|
|
|
496
448
|
Do not report a specification item as done unless the file that implements it
|
|
497
|
-
exists, `zen check` passes, and setup satisfies the
|
|
449
|
+
exists, `zen check` passes, and setup satisfies the plan's proof.
|
|
@@ -66,8 +66,8 @@ changing credentials, environment variables, external files, ignored scratch
|
|
|
66
66
|
inputs or remote resources: those are not certified by the receipt. Run a fresh
|
|
67
67
|
check instead. Only use reuse for a self-contained project's stable inputs.
|
|
68
68
|
|
|
69
|
-
`check no-sandbox` and `--skip-check no-sandbox` are for
|
|
70
|
-
|
|
69
|
+
`check no-sandbox` and `--skip-check no-sandbox` are for a spec-sync pass whose
|
|
70
|
+
plan does not reach the sandbox image. They still probe models. `check fast` and
|
|
71
71
|
`--skip-check fast` omit both expensive probes and are for iteration only.
|
|
72
72
|
A full receipt covers either partial mode, but a partial receipt cannot stand
|
|
73
73
|
in for a full one. If a partial check repairs or otherwise changes files, no
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zen-spec-sync
|
|
3
|
-
description: Running `/spec-sync-project` incrementally - the committed `.spec-sync` baseline, scope and precedence, spec-only and model-reference-only verification tiers,
|
|
3
|
+
description: Running `/spec-sync-project` incrementally - the committed `.spec-sync` baseline, scope and precedence, the pass plan that maps changed areas to capability skills and checks, spec-only and model-reference-only verification tiers, generated-rule maintenance, reusable validation, explicit history recording and why the baseline moves last. Load before every `/spec-sync-project`, including a project's first pass.
|
|
4
4
|
user-invocable: false
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -14,8 +14,9 @@ one already made, and re-raises questions someone has already answered.
|
|
|
14
14
|
A pass is worth repeating cheaply, so it keeps a record of **what it applied**.
|
|
15
15
|
The next pass diffs the specification against that record and works the
|
|
16
16
|
difference. What it must not do is confuse a narrow diff with a narrow
|
|
17
|
-
obligation: the record scopes what you _read and edit_. The
|
|
18
|
-
|
|
17
|
+
obligation: the record scopes what you _read and edit_. The pass plan below
|
|
18
|
+
also scopes which skills you load and which checks you run, from the areas the
|
|
19
|
+
changes reach, and grows when the work reaches further.
|
|
19
20
|
|
|
20
21
|
## What this owns
|
|
21
22
|
|
|
@@ -168,14 +169,93 @@ answers:
|
|
|
168
169
|
That is the whole of the work. A version mismatch is not a reason to look for
|
|
169
170
|
anything else.
|
|
170
171
|
|
|
171
|
-
##
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
172
|
+
## Plan the pass before loading anything
|
|
173
|
+
|
|
174
|
+
On an incremental pass, after `snapshot.sh diff` and before reading the
|
|
175
|
+
project, post a plan in the chat. Derive it from **what changed**, not from
|
|
176
|
+
what the project has turned on: a capability that is enabled and untouched owes
|
|
177
|
+
nothing it did not already owe when the last pass verified it.
|
|
178
|
+
|
|
179
|
+
1. **Classify every input into areas**, using the list below: every `changed:`
|
|
180
|
+
path, every changed top-level key in `agents.yaml`, every `SPECIFICATION.md`
|
|
181
|
+
hunk, every answered feedback question and every `Still open` item. A hunk
|
|
182
|
+
counts by what it asks for, not by the section it sits in: a _Scope_ line
|
|
183
|
+
that introduces writing scripts reaches **code**.
|
|
184
|
+
2. **Take the union** of the skills and checks those areas name. Load those
|
|
185
|
+
skills and no others. Name each skill and expensive check left out, with
|
|
186
|
+
the reason: `zen-sandbox - no sandbox/, sandbox: or pin change`. Reading
|
|
187
|
+
narrows the same way, to the files the areas reach and the changed hunks of
|
|
188
|
+
the specification. That narrowing is a claim too: name what you skip
|
|
189
|
+
reading and why no change reaches it.
|
|
190
|
+
3. **Re-plan before verifying.** After the last edit and before the final
|
|
191
|
+
check, classify again, now including this pass's own edits -
|
|
192
|
+
`snapshot.sh diff` compares the baseline with the working tree, so it shows
|
|
193
|
+
them. Run the checks the final plan names. An edit that reaches a new area
|
|
194
|
+
adds that area's skill, loaded before the edit, and its checks. A plan only
|
|
195
|
+
grows during a pass; it never drops an area it has named.
|
|
196
|
+
|
|
197
|
+
A full or tampered pass reaches every area.
|
|
198
|
+
|
|
199
|
+
### Areas
|
|
200
|
+
|
|
201
|
+
- **specification** - wording in `SPECIFICATION.md` or
|
|
202
|
+
`SPECIFICATION-FEEDBACK.md` that asks for nothing in the areas below. Skill:
|
|
203
|
+
none. Checks: baseline.
|
|
204
|
+
- **prompts and grants** - `agents/prompts/**`, `agents/skills/**`, and the
|
|
205
|
+
`tools:` and `skills:` lists of an agent. Skill: none of its own; the content
|
|
206
|
+
may reach another area. A `sandbox:*` or `files:*` grant is a tool grant, not
|
|
207
|
+
a sandbox change. Checks: baseline.
|
|
208
|
+
- **house rules** - a project-owned `agents/*instructions.md`. Skill:
|
|
209
|
+
`zen-instructions`. Checks: baseline.
|
|
210
|
+
- **memory** - a `memory:` block, a project-owned memory topic file, or what
|
|
211
|
+
agents commit to or recall from memory. Skill: `zen-memory`. Checks:
|
|
212
|
+
baseline.
|
|
213
|
+
- **code** - an agent that writes or runs code, its coding skill, or a script
|
|
214
|
+
shipped under a skill folder. Skill: `zen-code-python`. Checks: baseline.
|
|
215
|
+
- **topology** - `handoffs:`, `fork:`, or an agent added, removed or given a
|
|
216
|
+
different job. Skill: `zen-topology`. Checks: baseline.
|
|
217
|
+
- **models** - a chat model reference or `providers:`. Skill: none. Checks:
|
|
218
|
+
baseline, whose check already probes models.
|
|
219
|
+
- **index** - an embedding reference, `assets/**`, or an index the project
|
|
220
|
+
builds or searches. Skill: `zen-rag-docs` or `zen-rag-schema`. Checks:
|
|
221
|
+
setup run.
|
|
222
|
+
- **setup** - `scripts/**`. Skill: `zen-cli` when a step's commands change.
|
|
223
|
+
Checks: setup run.
|
|
224
|
+
- **sandbox image** - `sandbox/**`, the `sandbox:` block, the `@zenera/*` pin,
|
|
225
|
+
a setup step that writes into the build context, or any `sandbox.pin.*` or
|
|
226
|
+
`rules.stale` finding. Skill: `zen-sandbox`, except for a pin or
|
|
227
|
+
`rules.stale` repair alone. Checks: sandbox.
|
|
228
|
+
|
|
229
|
+
### Checks
|
|
230
|
+
|
|
231
|
+
- **baseline** - every incremental pass: after the last edit and setup,
|
|
232
|
+
`review.sh check no-sandbox`; `scripts/_setup.sh --check` reporting every
|
|
233
|
+
step `skipped` (one run when `STEPS` is empty); then
|
|
234
|
+
`review.sh --skip-check no-sandbox`.
|
|
235
|
+
- **setup run** - replaces the setup part of baseline with §6 of the prompt:
|
|
236
|
+
`scripts/_setup.sh` to completion, again to prove every step `skipped`,
|
|
237
|
+
`--check`, and `zen rag docs ready` for each index the project builds.
|
|
238
|
+
- **sandbox** - replaces `no-sandbox` with `full --fix` on the check and `full`
|
|
239
|
+
on the review.
|
|
240
|
+
|
|
241
|
+
Results add areas. `--check` reporting anything but `skipped` adds **setup**.
|
|
242
|
+
A check finding `rules.stale` or a sandbox pin, or one that would repair any
|
|
243
|
+
file, adds **sandbox image**: run `review.sh check full --fix`, because a
|
|
244
|
+
partial check that changes files issues no reusable receipt. `--no-sandbox` is
|
|
245
|
+
allowed only once git confirms the sandbox configuration, Dockerfile and build
|
|
246
|
+
context are unchanged and no setup step writes into them; if that cannot be
|
|
247
|
+
established, the pass reaches **sandbox image**.
|
|
248
|
+
|
|
249
|
+
## Choose a verification tier
|
|
250
|
+
|
|
251
|
+
The plan is the tier. Use `full` for a missing or untrusted baseline. A plan
|
|
252
|
+
whose only area is **specification** is the spec-only pass; one whose only
|
|
253
|
+
area is **models**, through a chat model reference, is the
|
|
254
|
+
model-reference-only pass. Both carry the extra conditions below. Every other
|
|
255
|
+
plan runs the normal incremental checks. Unresolved items or feedback requiring
|
|
256
|
+
other work disqualify a narrow tier. Say the tier, its scope and the omitted
|
|
257
|
+
work in the chat. Escalate as soon as the actual work exceeds that scope; a
|
|
258
|
+
small original diff is not permission to skip new work.
|
|
179
259
|
|
|
180
260
|
### The model-reference-only pass
|
|
181
261
|
|
|
@@ -224,24 +304,23 @@ re-entrancy and repeat the final check. Finish all builds before recording.
|
|
|
224
304
|
|
|
225
305
|
Outside the two narrow tiers:
|
|
226
306
|
|
|
227
|
-
1. **`zen check` passes after the last edit and setup
|
|
228
|
-
`review.sh check
|
|
229
|
-
|
|
230
|
-
`zen check --no-models --no-sandbox`; do not repeat expensive
|
|
231
|
-
and after editing. Reuse the final receipt with
|
|
232
|
-
rather than invoking a third check
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
fresh clone whose git-ignored `lance/`
|
|
240
|
-
cannot search. When `STEPS` is empty,
|
|
241
|
-
|
|
307
|
+
1. **`zen check` passes after the last edit and setup**, in the mode the final
|
|
308
|
+
plan names: `review.sh check no-sandbox` unless the plan reaches **sandbox
|
|
309
|
+
image**, then `review.sh check full --fix`. When an initial diagnostic is
|
|
310
|
+
needed, use `zen check --no-models --no-sandbox`; do not repeat expensive
|
|
311
|
+
probes before and after editing. Reuse the final receipt with
|
|
312
|
+
`review.sh --skip-check` in the same mode rather than invoking a third check
|
|
313
|
+
during review.
|
|
314
|
+
2. **Setup satisfies the plan.** `scripts/_setup.sh --check` must report every
|
|
315
|
+
step `skipped`: it makes each step's own readiness test without doing the
|
|
316
|
+
work, which is what tells a real `skipped` from a step that only looked done.
|
|
317
|
+
When the plan reaches **setup** or **index**, run `scripts/_setup.sh` to
|
|
318
|
+
completion in this session and re-run it clean first: a step that tests for a
|
|
319
|
+
committed `manifest.json` skips on a fresh clone whose git-ignored `lance/`
|
|
320
|
+
vectors are missing, and the project cannot search. When `STEPS` is empty,
|
|
321
|
+
one successful `--check` is sufficient.
|
|
242
322
|
3. **§9 of the copilot instructions, worked as a checklist**, group by group.
|
|
243
|
-
4. **The capability obligations in §0.1
|
|
244
|
-
changed requirements, files, keys or unresolved work reach that capability.
|
|
323
|
+
4. **The capability obligations in §0.1**, through the skills the plan names.
|
|
245
324
|
For a full pass, every enabled capability is in scope. `zen check` must
|
|
246
325
|
still report no `rules.stale`, whether or not its capability was in scope.
|
|
247
326
|
5. **`zen-instructions` is loaded before editing a project-owned house rule.** A pass
|
|
@@ -330,7 +409,7 @@ claims supplied to it. Run `commit` separately, only after verification.
|
|
|
330
409
|
## Scope
|
|
331
410
|
|
|
332
411
|
What drove the pass: the diff hunks, the feedback entries, what the last pass
|
|
333
|
-
left open. `full` if it was a full pass.
|
|
412
|
+
left open, and the first and final plans. `full` if it was a full pass.
|
|
334
413
|
|
|
335
414
|
## Changed
|
|
336
415
|
|
package/templates/project/env
CHANGED
|
@@ -14,15 +14,12 @@
|
|
|
14
14
|
# It is in .gitignore, and should stay there. Everything else in the project is
|
|
15
15
|
# meant to be read, copied and shared; this is the one file that is not.
|
|
16
16
|
#
|
|
17
|
+
# ZEN_ENV_FILE, set in the shell, names another file to read instead of this
|
|
18
|
+
# one — `.env.test`, say — relative to the project.
|
|
19
|
+
#
|
|
17
20
|
# A credential *file* — GOOGLE_APPLICATION_CREDENTIALS — may be named by a path
|
|
18
21
|
# relative to this directory. It is mounted into the sandbox where the agent
|
|
19
22
|
# can read it, which is worth knowing before you point at one.
|
|
20
23
|
|
|
21
|
-
# OPENAI_API_KEY=
|
|
22
24
|
# ACME_API_TOKEN=
|
|
23
25
|
# ACME_BASE_URL=https://api.example.test
|
|
24
|
-
|
|
25
|
-
# Which model `zen meta` runs the meta agent on, for this project only. A zen
|
|
26
|
-
# ref — `vertex/gemini-3.8-flash`, `openai/gpt-5.6-sol` — not a provider's wire
|
|
27
|
-
# name. `zen meta model` shows where the answer came from.
|
|
28
|
-
# ZENERA_META_MODEL=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# The names this project's environment needs, with no values.
|
|
2
|
+
#
|
|
3
|
+
# Copy it to .env and fill it in:
|
|
4
|
+
#
|
|
5
|
+
# cp .env.example .env
|
|
6
|
+
#
|
|
7
|
+
# .env is git-ignored and holds the real values; this file is committed, so it
|
|
8
|
+
# says which variables a clone has to supply without saying what they are. Add
|
|
9
|
+
# a name here whenever you add one to .env or .env.test.
|
|
10
|
+
|
|
11
|
+
# ACME_API_TOKEN=
|
|
12
|
+
# ACME_BASE_URL=
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This project's environment for test chats: the Test tab in Zenera Lite.
|
|
2
|
+
#
|
|
3
|
+
# Read instead of .env, not on top of it: Zenera Lite runs test chats with
|
|
4
|
+
# ZEN_ENV_FILE=.env.test, and only one file is ever read. So everything a test
|
|
5
|
+
# chat needs goes here — a sandbox account's token, a staging or mock base url.
|
|
6
|
+
# Edits reach the next test chat turn; nothing has to be restarted.
|
|
7
|
+
#
|
|
8
|
+
# It is in .gitignore, like .env: a test credential is still a credential.
|
|
9
|
+
# Name any variable you add here in .env.example as well.
|
|
10
|
+
|
|
11
|
+
# ACME_API_TOKEN=
|
|
12
|
+
# ACME_BASE_URL=https://staging.example.test
|
|
@@ -14,8 +14,9 @@ memory/.lock
|
|
|
14
14
|
# Scratch, inside the workspace so the sandbox can reach it.
|
|
15
15
|
.tmp/
|
|
16
16
|
|
|
17
|
-
# Credentials.
|
|
17
|
+
# Credentials, and the ones test chats use instead.
|
|
18
18
|
.env
|
|
19
|
+
.env.test
|
|
19
20
|
|
|
20
21
|
# A rag index commits everything except its vectors: they are binary, they are
|
|
21
22
|
# large, and `zen rag <subject> restore` rebuilds them from the copies of the
|