@zenera/cli 1.1.41 → 1.1.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenera/cli",
3
- "version": "1.1.41",
3
+ "version": "1.1.42",
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.41",
58
- "@zenera/neo": "^1.1.41",
59
- "@zenera/view": "^1.1.41",
57
+ "@zenera/engine": "^1.1.42",
58
+ "@zenera/neo": "^1.1.42",
59
+ "@zenera/view": "^1.1.42",
60
60
  "google-auth-library": "^10.0.0",
61
61
  "ink": "^7.1.1",
62
62
  "openai": "^6.0.0",
@@ -55,7 +55,10 @@ code, `zen-topology` for `handoffs:` or `fork:` on any agent,
55
55
  configured and already passing `zen check` is exactly the case that looks
56
56
  finished and is not: the obligation lives in the skill, so a review that never
57
57
  opens the skill cannot find what is missing. This applies whatever prompted the
58
- change - a task scoped to `SPECIFICATION.md` does not narrow it.
58
+ change - a task scoped to `SPECIFICATION.md` does not narrow it. There is one
59
+ exception: a `/spec-sync-project` pass that the `zen-spec-sync` skill classes as
60
+ **spec-only**. It touches no agent, prompt, skill or wiring, so there is no
61
+ obligation for it to meet.
59
62
 
60
63
  **Load `zen-instructions` before writing, editing, reviewing or deleting any
61
64
  `agents/*instructions.md`.** They are the house rules, prepended to every
@@ -1990,8 +1993,9 @@ candidates; these are the judgements to make about each one)**
1990
1993
  and says so honestly - an unchanged specification line is not evidence
1991
1994
  that anything implements it
1992
1995
  - [ ] No question in `SPECIFICATION-FEEDBACK.md` has a box marked `[x]`, or
1993
- exactly one answer left under it, without a matching `✅ Answered` entry -
1994
- that is an answer given and never folded into the specification
1996
+ exactly one answer left under it, without a matching `✅ Answered` entry
1997
+ or a strike naming the specification line that superseded it - that is
1998
+ an answer given and never folded into the specification
1995
1999
  - [ ] `.spec-sync/` is committed and `.tmp/` is not
1996
2000
 
1997
2001
  ---
@@ -32,7 +32,14 @@ accounted for against the specification.
32
32
 
33
33
  The scope decides what you **read and edit**. It never decides what you
34
34
  **verify**: §6, §7 and the five checks in the skill run at full size on every
35
- pass, however small the diff.
35
+ pass, however small the diff. The one exception is the skill's **spec-only
36
+ pass**, and only under the conditions the skill sets.
37
+
38
+ When inputs disagree - a ticked answer against a later specification edit, the
39
+ specification against `zen --version` - use the order of precedence in the
40
+ skill. The user's own message comes first. Do not use session history, file
41
+ timestamps or `git log` to work out why something changed. Whatever the order
42
+ does not settle becomes a question in `SPECIFICATION-FEEDBACK.md`.
36
43
 
37
44
  ## 1. Read before changing anything
38
45
 
@@ -121,7 +128,9 @@ the model to compute or remember. Specifically:
121
128
  the host on the next image build; a stale pin leaves the container holding an
122
129
  older `zen` than the session outside it. `zen check` reports both, as
123
130
  `sandbox.pin.absent` and `sandbox.pin.stale`, but will not repair either - the
124
- Dockerfile is the project's file, so this edit is yours to make.
131
+ Dockerfile is the project's file, so this edit is yours to make. The pin
132
+ follows `zen --version` even when `SPECIFICATION.md` names another number.
133
+ The `zen-spec-sync` skill gives the one question to raise in that case.
125
134
 
126
135
  Never delete an **extra** without saying so. Report it, say why the
127
136
  specification does not cover it, and leave it unless I tell you to remove it.
@@ -379,11 +388,17 @@ since the last pass is work to close, not a question to ask again. If a question
379
388
  has a box marked `[x]`, or one answer left under it, and no `✅` entry, the
380
389
  reader answered it and never ran `/spec-apply-feedback` - implement that
381
390
  answer, fold its text into `SPECIFICATION.md` yourself, and say so in the chat.
391
+ Do this unless the specification has since been edited on the same point. In
392
+ that case the edit supersedes the answer: strike the question, naming the line
393
+ that replaced it, and leave the newer text alone.
382
394
 
383
395
  ## 6. Run `scripts/_setup.sh` and watch it finish
384
396
 
385
397
  After `zen check` passes, run `scripts/_setup.sh` yourself. A pass is not done
386
- until it has run to completion in this session.
398
+ until it has run to completion in this session. The exception is a spec-only
399
+ pass, as the `zen-spec-sync` skill defines it: there `scripts/_setup.sh --check`
400
+ reporting every step `skipped` is enough, and anything else sends you back to
401
+ the full run below.
387
402
 
388
403
  It is slow - embedding a large corpus is hours, and the progress line says how
389
404
  many - so start it in the background and follow the logs instead of waiting
@@ -36,8 +36,12 @@ NOISE='^(and/or|he/she|his/her|input/output|read/write|w/o|n/a|N/A|24/7|km/h)$|^
36
36
  # A url, stripped before tokenising rather than filtered after it — the token
37
37
  # regex reads `https://acme.dev/docs` as `//acme.dev` *and* `/docs`, and the
38
38
  # second half is indistinguishable from a real absolute path once it is alone.
39
+ #
40
+ # A meta agent command, `zen meta run /spec-edit`, goes the same way: its
41
+ # `/<name>` is a stored prompt, not a file the running agent is told to open.
39
42
  strip_urls() {
40
- sed -E 's#[a-zA-Z][a-zA-Z0-9+.-]*://[^][ )"'"'"'`>]*##g' "$1"
43
+ sed -E -e 's#[a-zA-Z][a-zA-Z0-9+.-]*://[^][ )"'"'"'`>]*##g' \
44
+ -e 's#(zen meta run( [A-Za-z0-9_.-]+)?) /[A-Za-z0-9_-]+#\1#g' "$1"
41
45
  }
42
46
 
43
47
  # The three trees §2.5 names, prose only: a skill's own script is code the
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: zen-spec-sync
3
- description: Running `/spec-sync-project` as an incremental pass - the committed `.spec-sync` baseline of what the last pass applied, how to scope a pass from the specification and feedback diffs and from what moved in the project itself, the five checks a narrow pass may never skip, which skills a pass must load before editing (`zen-instructions` for any house rule it touches), the iteration history format, and why the baseline is written last. Load before every `/spec-sync-project`, including the first one on a project that has no baseline yet.
3
+ description: Running `/spec-sync-project` as an incremental pass - the committed `.spec-sync` baseline of what the last pass applied, how to scope a pass from the specification and feedback diffs and from what moved in the project itself, which input wins when they disagree, the five checks a narrow pass may never skip, which skills a pass must load before editing (`zen-instructions` for any house rule it touches), the iteration history format, and why the baseline is written last. Load before every `/spec-sync-project`, including the first one on a project that has no baseline yet.
4
4
  ---
5
5
 
6
6
  # Syncing a project with its specification, one change at a time
@@ -103,9 +103,64 @@ editing anything, and report it in the chat as the pass's scope.
103
103
  covers it, and you say which line, or it does not, and it is an **extra**
104
104
  reported under `➕`.
105
105
 
106
+ ## When the inputs disagree
107
+
108
+ Two inputs can ask for different things - a ticked answer and a later edit to
109
+ the same specification line, say. Decide by this order, highest first, and do
110
+ not weigh them again:
111
+
112
+ 1. **The user's message that started this pass**, where it says more than the
113
+ command name. It is the newest and most direct statement of intent there is.
114
+ 2. **`SPECIFICATION.md` as it stands now.** An edit to the specification is
115
+ made on purpose and after the questions were written, so it outranks them.
116
+ 3. **An answer ticked in `SPECIFICATION-FEEDBACK.md`** and not yet folded in.
117
+ 4. **What the last pass left open.**
118
+
119
+ A ticked answer that the current specification text contradicts was
120
+ **superseded**, not ignored: do not fold its text back in over the newer line.
121
+ Strike the question with one line naming the specification line that replaced
122
+ it, and say in the chat that you did.
123
+
124
+ Facts outrank all four. `zen --version` decides the sandbox pin (below); a
125
+ specification line asking for something impossible is a question, not an order.
126
+ Where the order above does not decide, build what the higher-ranked input asks
127
+ for, write **one** question in `SPECIFICATION-FEEDBACK.md`, and carry on.
128
+
129
+ ### Do not reconstruct intent
130
+
131
+ The diffs say what changed. The order above says what wins. A feedback question
132
+ covers whatever is left. Do not use anything else to work out _why_ somebody
133
+ changed something: no session history or chat transcripts, no file timestamps,
134
+ no `git log` or `git blame`, no older history entries beyond the one `applied:`
135
+ names. If a pass catches itself guessing at what the human meant, that guess is
136
+ the text of a question, and the pass moves on.
137
+
138
+ ### The `zen` version in the specification
139
+
140
+ The `@zenera/cli` and `@zenera/rag` pin in `sandbox/Dockerfile` always follows
141
+ `zen --version` - `zen check` warns on any other number, older or newer. Nothing
142
+ outranks that, not a specification line and not the user's message: the image
143
+ cannot hold a `zen` other than the one building it. If a version was asked for
144
+ that is not the one in hand, say so in the chat - `zen` has to be upgraded on the
145
+ host first.
146
+
147
+ When `SPECIFICATION.md` names an exact version other than `zen --version`, pin
148
+ the Dockerfile to `zen --version` and keep **one** `✏️` question open for that
149
+ line. If one is already open, update it instead of adding another. Offer these
150
+ answers:
151
+
152
+ - State the pin without a number - "pinned to the `zen` version that builds the
153
+ image" - so the next upgrade does not raise the question again
154
+ _(recommended)_.
155
+ - Replace the number with the one `zen --version` reports.
156
+ - Keep the number, upgrade `zen` on the host to it, and run the pass again.
157
+
158
+ That is the whole of the work. A version mismatch is not a reason to look for
159
+ anything else.
160
+
106
161
  ## The five checks a narrow pass may never skip
107
162
 
108
- However small the diff:
163
+ However small the diff - with the one narrowing for a spec-only pass below:
109
164
 
110
165
  1. **`zen check` passes.** Run it before the first edit and again after the
111
166
  last.
@@ -131,6 +186,28 @@ However small the diff:
131
186
  it, the history entry claims it, and the baseline records it as applied.
132
187
  Specification-driven rules go in a topic file of the project's own beside it.
133
188
 
189
+ ### The spec-only pass
190
+
191
+ A pass qualifies when **all** of the following hold:
192
+
193
+ - the implementation diff (input 4) is empty
194
+ - the pass edits nothing except `SPECIFICATION.md`, `SPECIFICATION-FEEDBACK.md`
195
+ and the `@zenera/*` pin in `sandbox/Dockerfile`
196
+ - no changed specification hunk names an agent, tool, model, embedding, skill,
197
+ house rule, handoff, memory, index, asset or setup step
198
+
199
+ A pass like that changes nothing an agent reads, so it has no capability
200
+ obligation to re-check. Checks 4 and 5 drop out: load no capability skill and no
201
+ `zen-instructions`. `zen check` still runs before and after, and it still
202
+ reports `rules.stale`. Check 2 shrinks to `scripts/_setup.sh --check`, which
203
+ must report every step `skipped`. If it reports anything else, run
204
+ `scripts/_setup.sh` in full as written. Check 3 shrinks to the §9
205
+ **Specification** group and the groups covering any file the pass edited.
206
+
207
+ Decide this before loading anything, and say it in the chat - "spec-only pass:"
208
+ followed by the reason. If any edit turns out to reach further, the pass is no
209
+ longer spec-only: run all five checks.
210
+
134
211
  A narrow diff narrows reading and editing. It does not narrow verification.
135
212
 
136
213
  ## What else an incremental pass still owes
@@ -26,6 +26,20 @@ Search before starting work that costs more than one cheap read or call:
26
26
  Do not repeat the same search in different words. Search again only when the
27
27
  question has changed.
28
28
 
29
+ When a request involves several distinct subjects, search for all of them in
30
+ parallel: send one `memory_search` per subject in the same turn rather than one
31
+ after another. Likewise, load every node you need in the same turn. Parallel
32
+ searches must ask different questions, not rephrase one.
33
+
34
+ ### Call memory tools silently
35
+
36
+ You MUST NOT write any text before a `memory_*` call. Do not announce, explain,
37
+ or summarize memory calls, such as "I'm going to check for prior work". The
38
+ tool call is shown to the user on its own. This overrides the general rule to
39
+ say what you are about to do before tool calls: when a turn contains only
40
+ `memory_*` calls, write nothing; when it mixes them with other tools, describe
41
+ only the other calls.
42
+
29
43
  ### Choose the retrieval tool
30
44
 
31
45
  | Need | Tool |
@@ -17,3 +17,63 @@ Anything under `/assets` is reference material: read it, search it, and do not
17
17
  try to change it.
18
18
 
19
19
  Say what you changed.
20
+
21
+ <!-- ===== BEGIN: unconfigured-agent disclaimer (delete this block once the agent is configured) ===== -->
22
+
23
+ ## This agent is not configured yet
24
+
25
+ This agent has not been set up for any specific task yet. It only has the
26
+ generic defaults above, so it is not expected to do anything particularly
27
+ useful on its own.
28
+
29
+ When the user greets you ("hi", "hello"), asks what you can do, asks who you
30
+ are, or asks how to get started, tell them plainly:
31
+
32
+ - This agent is not configured yet to do anything useful.
33
+ - To teach it specific tasks, they should use the **Zenera Meta Agent**,
34
+ which can configure this agent's prompts, tools, knowledge and workflows.
35
+ It ships with the `zen` CLI:
36
+ - What it is and how it works:
37
+ https://github.com/zenera-ai/ZeneraNeo#what-is-the-meta-agent
38
+ - The CLI and its commands:
39
+ https://github.com/zenera-ai/ZeneraNeo/tree/main/packages/cli
40
+ - The project home: https://zenera.ai
41
+
42
+ Then give them these steps to get started. The commands run in a terminal on
43
+ their machine, from the project directory, not here:
44
+
45
+ 1. Pick the model the meta agent uses (once per machine):
46
+ `zen meta model --pick`
47
+ 2. Describe what this agent should do in `SPECIFICATION.md`: its purpose,
48
+ models, agents, tools, knowledge and memory. Edit the file by hand, or have
49
+ the meta agent write it from a plain request:
50
+ `zen meta run /spec-edit "<what to add, change or remove>"`
51
+ 3. Have the meta agent build the system from the specification:
52
+ `zen meta run /spec-sync-project`
53
+ 4. If the meta agent has questions, it writes them to
54
+ `SPECIFICATION-FEEDBACK.md`. Answer them there, then apply the answers:
55
+ `zen meta run /spec-apply-feedback`
56
+ 5. Validate the project and try it: `zen check`, then `zen run "<request>"`.
57
+ Review a run with `zen inspect`.
58
+
59
+ To find out more, `--help` works on every command and subcommand:
60
+
61
+ - `zen meta --help` lists everything the meta agent can do: `run`,
62
+ `prompts`, `resume`, `model`, `dataset` and `finetune`, with examples.
63
+ - `zen meta run --help` lists the options for a run and the stored prompts,
64
+ the `/<name>` commands used above.
65
+ `zen meta prompts` lists the stored prompts on their own.
66
+ - `zen meta dataset --help` and `zen meta finetune --help` cover building an
67
+ evaluation dataset and tuning the project against it.
68
+ - `zen meta run "<question>"` asks the meta agent anything about the project,
69
+ for example `zen meta run "what does this project do?"`.
70
+
71
+ For teams that need more, mention **ZeneraLab**, Zenera's enterprise-grade
72
+ platform (https://zenera.ai). It has all of this built into a UI, where users
73
+ can build enterprise-grade agentic solutions, integrate them with any legacy
74
+ system, and train, fine-tune, optimize, test and monitor their agents.
75
+
76
+ Keep that answer short and friendly. You can still help with simple requests
77
+ in the workspace if asked directly.
78
+
79
+ <!-- ===== END: unconfigured-agent disclaimer ===== -->