@zenera/cli 1.1.44 → 1.1.45
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.
|
|
3
|
+
"version": "1.1.45",
|
|
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.45",
|
|
58
|
+
"@zenera/neo": "^1.1.45",
|
|
59
|
+
"@zenera/view": "^1.1.45",
|
|
60
60
|
"google-auth-library": "^10.0.0",
|
|
61
61
|
"ink": "^7.1.1",
|
|
62
62
|
"openai": "^6.0.0",
|
|
@@ -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.
|
|
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.
|
|
4
4
|
argument-hint: 'what to add, change or remove in the specification'
|
|
5
5
|
disable-model-invocation: true
|
|
6
6
|
---
|
|
@@ -13,72 +13,101 @@ runs after this.
|
|
|
13
13
|
You change one file: `SPECIFICATION.md`. Not `agents.yaml`, not a prompt, not a
|
|
14
14
|
skill, not `SPECIFICATION-FEEDBACK.md`.
|
|
15
15
|
|
|
16
|
-
## 0.
|
|
16
|
+
## 0. Size the edit, then read only what it needs
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
If no request was given with the command, ask what to change and stop.
|
|
19
|
+
|
|
20
|
+
### Decide the kind of edit first
|
|
21
|
+
|
|
22
|
+
From the request and `SPECIFICATION.md` alone, before reading anything else:
|
|
23
|
+
|
|
24
|
+
- **Greenfield** - `SPECIFICATION.md` is still the `zen init` scaffold (generic
|
|
25
|
+
placeholders such as "Carry out work inside a workspace on request…",
|
|
26
|
+
"Currently: no steps", "the only agent; nobody to hand work to"), or the
|
|
27
|
+
request asks to define or make a specification for a project or domain.
|
|
28
|
+
- **Incremental** - anything else: the specification already describes a real
|
|
29
|
+
project and the request asks for a specific change.
|
|
20
30
|
|
|
21
|
-
|
|
31
|
+
Then decide which sections the request touches (§1), because that decides
|
|
32
|
+
which skills you read.
|
|
33
|
+
|
|
34
|
+
### Read in one batch
|
|
35
|
+
|
|
36
|
+
Always:
|
|
22
37
|
|
|
23
38
|
- [SPECIFICATION.md](../../../SPECIFICATION.md) - the file you are editing.
|
|
24
39
|
- [SPECIFICATION-FEEDBACK.md](../../../SPECIFICATION-FEEDBACK.md) - the questions
|
|
25
40
|
still open against it, and the ones already answered. It may not exist; that
|
|
26
41
|
only means nothing is open.
|
|
27
42
|
|
|
28
|
-
What the runtime can do, so that what you write is something it can build
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- [zen-topology](../zen-topology/SKILL.md) - one agent or several,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- [zen-sandbox](../zen-sandbox/SKILL.md) - the container: what it mounts,
|
|
44
|
-
what it can reach, what persists.
|
|
45
|
-
- [zen-code-python](../zen-code-python/SKILL.md) - reusable scripts as
|
|
46
|
-
tools, where they live, and which agents own them.
|
|
43
|
+
What the runtime can do, so that what you write is something it can build. On
|
|
44
|
+
a **greenfield** edit read all of them. On an **incremental** edit read only the
|
|
45
|
+
ones for the sections the request touches; when unsure whether a section is
|
|
46
|
+
touched, read its skill:
|
|
47
|
+
|
|
48
|
+
| Section touched | Skill |
|
|
49
|
+
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
50
|
+
| **Agents** (split, hand-off, fork) | [zen-topology](../zen-topology/SKILL.md) - one agent or several, hand-off or fork, and what each costs |
|
|
51
|
+
| **Tools and boundaries** (scripts, writing or running code) | [zen-code-python](../zen-code-python/SKILL.md) - reusable scripts as tools, where they live, and which agents own them |
|
|
52
|
+
| **Knowledge** / **Setup** (index over OpenAPI) | [zen-rag-schema](../zen-rag-schema/SKILL.md) - an index over an OpenAPI description |
|
|
53
|
+
| **Knowledge** / **Setup** (index over documents) | [zen-rag-docs](../zen-rag-docs/SKILL.md) - an index over a folder of markdown documents |
|
|
54
|
+
| **Memory** | [zen-memory](../zen-memory/SKILL.md) - what memory is, who may read and write it, and what a strategy for it has to say |
|
|
55
|
+
| **Environment** (image, packages, network, persistence) | [zen-sandbox](../zen-sandbox/SKILL.md) - the container: what it mounts, what it can reach, what persists |
|
|
56
|
+
| Rules every agent is told | [zen-instructions](../zen-instructions/SKILL.md) - house rules, and what belongs there rather than in a prompt |
|
|
57
|
+
| **Models** | [zen-cli](../zen-cli/SKILL.md) and [its models reference](../zen-cli/references/models.md) - how to find which models this machine can actually use |
|
|
47
58
|
|
|
48
59
|
Any of these already in your context - attached, or loaded as a skill - you
|
|
49
|
-
need not read again. Read the rest in **one** batch of parallel reads
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
60
|
+
need not read again. Read the rest in **one** batch of parallel reads, never
|
|
61
|
+
one at a time.
|
|
62
|
+
|
|
63
|
+
### Models
|
|
53
64
|
|
|
54
|
-
|
|
65
|
+
Run this once from the project root, in the same batch, only when the edit is
|
|
66
|
+
greenfield, the request names or changes a model, or the specification will use
|
|
67
|
+
`memory/`, `assets/docs-db` or `assets/schema-db` and **Models** has no
|
|
68
|
+
embedding model yet:
|
|
55
69
|
|
|
56
70
|
```sh
|
|
57
71
|
zen models && zen models ls --chat && zen models ls --embeddings
|
|
58
72
|
```
|
|
59
73
|
|
|
60
74
|
That is the list of models with a credential on this machine - the only ones a
|
|
61
|
-
**Models** line may name. A model the request names that is not in it: run
|
|
75
|
+
new **Models** line may name. A model the request names that is not in it: run
|
|
62
76
|
`zen models search <name>` once; if it is still absent, say so in the chat and
|
|
63
|
-
do not write it.
|
|
77
|
+
do not write it. A model already in `SPECIFICATION.md` that the request does not
|
|
78
|
+
mention is kept as it is and not checked.
|
|
64
79
|
|
|
65
|
-
|
|
80
|
+
### What you never read
|
|
81
|
+
|
|
82
|
+
This command changes intent, not implementation, so it needs nothing from the
|
|
83
|
+
project beyond the files above. Do not open, list or search anything else in
|
|
84
|
+
the project: not `agents/`, `scripts/`, `sandbox/`, `resources/`, `assets/`,
|
|
85
|
+
`gym/`, examples, code or data, and not the skills' own `references/` beyond
|
|
86
|
+
the models reference. Do not run any command other than the `zen models` ones
|
|
87
|
+
above, and do not inspect environment variables, the network, running
|
|
88
|
+
processes or installed tools. A path the request names is written into the
|
|
89
|
+
specification as named; you do not read it to find out what is in it.
|
|
90
|
+
|
|
91
|
+
What you would have looked up - an endpoint, an auth scheme, a base URL, a
|
|
92
|
+
file layout, how an existing script works - is either stated by role in the
|
|
93
|
+
specification (§3, "Unknowns are named, not researched") or settled later by
|
|
94
|
+
`/spec-sync-project`, which reads the project.
|
|
95
|
+
|
|
96
|
+
### Then edit
|
|
97
|
+
|
|
98
|
+
Once that one batch is read, your next action is the edit to
|
|
99
|
+
`SPECIFICATION.md`. If you feel the need to read something more, do not: put it
|
|
100
|
+
in the report as an open question instead.
|
|
66
101
|
|
|
67
102
|
## 1. Understand the request against what is there
|
|
68
103
|
|
|
69
|
-
Before writing a line, work out
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
define a specification for a project or domain on top of that scaffold, it
|
|
77
|
-
reaches **every** section: replace all generic template sentences and
|
|
78
|
-
meta-explanations with a complete, concrete specification for that domain.
|
|
79
|
-
When `SPECIFICATION.md` already describes a real domain project and the
|
|
80
|
-
request asks for a specific change, keep the pass narrow and touch only the
|
|
81
|
-
sections the change implicates.
|
|
104
|
+
Before writing a line, work out - from the request, `SPECIFICATION.md`, the
|
|
105
|
+
feedback file and the skills you read, nothing else:
|
|
106
|
+
|
|
107
|
+
- **How far the edit reaches.** A **greenfield** edit (§0) reaches **every**
|
|
108
|
+
section: replace all generic template sentences and meta-explanations with a
|
|
109
|
+
complete, concrete specification for that domain. An **incremental** edit
|
|
110
|
+
stays narrow: touch only the sections the change implicates.
|
|
82
111
|
- **Which sections the request touches.** Usually more than the one it names: a
|
|
83
112
|
new agent changes **Agents**, **Tools and boundaries** and **Done means**; an
|
|
84
113
|
index changes **Setup**, **Knowledge** and **Environment**.
|
|
@@ -87,11 +116,35 @@ Before writing a line, work out:
|
|
|
87
116
|
- **What it settles in the feedback file.** An open question the request
|
|
88
117
|
answers, or an answered one it reverses. Do not edit the feedback file; say
|
|
89
118
|
which questions in the chat.
|
|
90
|
-
- **Whether the runtime can do it.** Check the request against the skills
|
|
91
|
-
Something no tool, agent setting or script can provide is not written
|
|
92
|
-
specification as if it could be: say so in the chat, offer the
|
|
93
|
-
the runtime does do, and write that only if the request leaves
|
|
94
|
-
wanted.
|
|
119
|
+
- **Whether the runtime can do it.** Check the request against the skills you
|
|
120
|
+
read. Something no tool, agent setting or script can provide is not written
|
|
121
|
+
into the specification as if it could be: say so in the chat, offer the
|
|
122
|
+
nearest thing the runtime does do, and write that only if the request leaves
|
|
123
|
+
no doubt it is wanted.
|
|
124
|
+
|
|
125
|
+
### Example: a narrow incremental request
|
|
126
|
+
|
|
127
|
+
Request: _"let the agent write code against our appliance's REST API, index the
|
|
128
|
+
API specs in `resources/apis/*.yaml`, and add a skill on how to write code for
|
|
129
|
+
that API"_, on a specification that already describes the project.
|
|
130
|
+
|
|
131
|
+
- Kind: incremental.
|
|
132
|
+
- Sections: **Agents** (which agent writes and runs the code), **Tools and
|
|
133
|
+
boundaries** (scripts in `/workspace/scripts/`, the API it may call, what
|
|
134
|
+
stays read-only), **Setup** and **Knowledge** (a `zen rag schema` index over
|
|
135
|
+
`resources/apis/*.yaml` in `assets/schema-db`, and the new skill under
|
|
136
|
+
`agents/skills/` with what it holds), **Environment** (the libraries and the
|
|
137
|
+
network access the code needs, credentials by env-var name), **Models** only
|
|
138
|
+
if no embedding model is listed yet, **Done means** (one checkable line per
|
|
139
|
+
new behaviour).
|
|
140
|
+
- Skills read: zen-topology, zen-code-python, zen-rag-schema, zen-sandbox -
|
|
141
|
+
plus zen-cli only if an embedding model has to be added.
|
|
142
|
+
- Not read: the API spec files, existing scripts, agents, examples, the
|
|
143
|
+
environment.
|
|
144
|
+
- In the report: the base URL, auth scheme and any other value only the reader
|
|
145
|
+
has, written into the specification by role and env-var name.
|
|
146
|
+
|
|
147
|
+
Once these are worked out, your next action is the edit.
|
|
95
148
|
|
|
96
149
|
## 2. The structure of a specification
|
|
97
150
|
|
|
@@ -169,8 +222,9 @@ What each one answers:
|
|
|
169
222
|
- **Environment** - the sandbox (`sandbox/Dockerfile`, persistence, network),
|
|
170
223
|
the exact languages, CLI tools, and libraries pre-installed in the image so
|
|
171
224
|
agents never install packages at run time, where scripts and data outputs
|
|
172
|
-
live under `/workspace`, and
|
|
173
|
-
name - see
|
|
225
|
+
live under `/workspace`, and the environment variables or credentials the
|
|
226
|
+
project itself needs (an external API, a service) by name - see
|
|
227
|
+
**zen-sandbox**. Never the credentials of chat or embedding models (§3).
|
|
174
228
|
- **Testing** - how a change to the project is checked: `zen check`,
|
|
175
229
|
`scripts/_setup.sh --check`, `scripts/_setup.sh` run twice in a row reporting
|
|
176
230
|
`skipped` the second time, and a concrete verification request the project
|
|
@@ -199,12 +253,13 @@ What each one answers:
|
|
|
199
253
|
`agents.yaml` in prose. Name the agents, skills, setup steps, indexes, APIs,
|
|
200
254
|
packages, paths, and behavioural rules clearly, without pasting raw YAML
|
|
201
255
|
snippets or shell implementation internals that `/spec-sync-project` derives.
|
|
202
|
-
- **
|
|
203
|
-
a request asks to design a project in broad
|
|
204
|
-
specification for financial analytics using open
|
|
205
|
-
phrases like "open APIs" or "packages for data
|
|
206
|
-
domain choices upfront
|
|
207
|
-
|
|
256
|
+
- **On a greenfield request, turn high-level domain requests into concrete
|
|
257
|
+
architectural choices.** When a request asks to design a project in broad
|
|
258
|
+
terms (for example, "make a specification for financial analytics using open
|
|
259
|
+
APIs"), do not repeat vague phrases like "open APIs" or "packages for data
|
|
260
|
+
analysis". Make the concrete domain choices upfront, from what you know of
|
|
261
|
+
public APIs and libraries and from the skills you read, so
|
|
262
|
+
`/spec-sync-project` can build a working system without guessing:
|
|
208
263
|
- Name specific, working zero-key public APIs and endpoints as primary
|
|
209
264
|
sources (with required headers such as `User-Agent` and rate limits),
|
|
210
265
|
optional keyed free-tier APIs as secondary sources with clean zero-key
|
|
@@ -218,6 +273,16 @@ What each one answers:
|
|
|
218
273
|
- State explicit numeric limits (such as the maximum entities/tickers per
|
|
219
274
|
request before refusing with a count), retry/fallback rules, and required
|
|
220
275
|
citation fields.
|
|
276
|
+
- **On an incremental request, write what the request states.** Add what it
|
|
277
|
+
asks for, plus the changes it forces in other sections (§1), in the same
|
|
278
|
+
level of detail the specification already uses. Do not design beyond it.
|
|
279
|
+
- **Unknowns are named, not researched.** A value the request and the
|
|
280
|
+
specification do not give - an endpoint, a base URL, an auth scheme, a
|
|
281
|
+
credential, a file layout - is written by role and env-var name (for example
|
|
282
|
+
"the appliance base URL from `APPLIANCE_URL`, credentials from
|
|
283
|
+
`APPLIANCE_USER` and `APPLIANCE_PASSWORD`") and listed in the report as a
|
|
284
|
+
value only the reader has. Never look for it in the project or the
|
|
285
|
+
environment, and do not stop to ask for it.
|
|
221
286
|
- **Be specific where a reader could decide either way.** A limit is a number,
|
|
222
287
|
a model is an id, a failure has a stated outcome. "Handles large inputs" is
|
|
223
288
|
not implementable; "a request over 25 tickers is refused with a count, never
|
|
@@ -225,9 +290,14 @@ What each one answers:
|
|
|
225
290
|
- **Never invent a model id or a user-owned secret.** Keep the model already in
|
|
226
291
|
`SPECIFICATION.md` unless the request asks to change it, and take any new
|
|
227
292
|
chat or embedding model strictly from the `zen models` output on this machine,
|
|
228
|
-
never from memory.
|
|
229
|
-
|
|
230
|
-
|
|
293
|
+
never from memory.
|
|
294
|
+
- **Never name a model provider's credential.** `OPENAI_API_KEY`,
|
|
295
|
+
`ANTHROPIC_API_KEY`, `GOOGLE_APPLICATION_CREDENTIALS` and the like live in
|
|
296
|
+
the zen keyring and reach every run, setup step and sandbox without the
|
|
297
|
+
specification saying so. A **Models** line names the model id, not the key
|
|
298
|
+
behind it; **Environment** and the report list only the credentials of
|
|
299
|
+
external services the project calls. If `SPECIFICATION.md` already names a
|
|
300
|
+
model key, remove it as part of any edit to that section.
|
|
231
301
|
- **Make it checkable.** Every behaviour the request adds gets a line under
|
|
232
302
|
**Done means** that a reviewer could verify against a recorded run.
|
|
233
303
|
- **Name what is now excluded.** When the request narrows the system, the thing
|
|
@@ -243,8 +313,9 @@ In the chat:
|
|
|
243
313
|
- every edit the request did not name but made necessary, and why
|
|
244
314
|
- every open question in `SPECIFICATION-FEEDBACK.md` the change settles or
|
|
245
315
|
reopens, by number
|
|
246
|
-
- anything you did not write because the runtime cannot do it
|
|
247
|
-
|
|
316
|
+
- anything you did not write because the runtime cannot do it
|
|
317
|
+
- every value written by role or env-var name that only the reader has, and
|
|
318
|
+
anything you would have wanted to look up but did not (§0)
|
|
248
319
|
- then, in one line: send `/spec-sync-project` to make the project match.
|
|
249
320
|
|
|
250
321
|
## 5. The request
|
|
@@ -227,7 +227,9 @@ not a paragraph of instructions for a human.
|
|
|
227
227
|
Deleting `.tmp/` must leave the project runnable and `scripts/_setup.sh`
|
|
228
228
|
re-runnable.
|
|
229
229
|
- Steps that need credentials run on the host, not in the sandbox. Read keys
|
|
230
|
-
from the environment or `.env`; never inline one into a script.
|
|
230
|
+
from the environment or `.env`; never inline one into a script. Model
|
|
231
|
+
provider keys are not among them: `zen` supplies those from its keyring, so
|
|
232
|
+
no step checks for, requires or documents one.
|
|
231
233
|
- Anything the sandbox always needs belongs in `sandbox/Dockerfile`, not in a
|
|
232
234
|
setup script that installs it again on every run.
|
|
233
235
|
|