@zenera/cli 1.1.34 → 1.1.35
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 +3 -3
- package/templates/editor/.github/copilot-instructions.md +20 -0
- package/templates/editor/.github/prompts/spec-sync-project.prompt.md +13 -2
- package/templates/editor/.github/skills/zen-cli/references/rag.md +2 -2
- package/templates/editor/.github/skills/zen-rag-docs/SKILL.md +18 -14
- package/templates/editor/.github/skills/zen-rag-schema/SKILL.md +12 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenera/cli",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.35",
|
|
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,8 +54,8 @@
|
|
|
54
54
|
"@google/genai": "^2.30.0",
|
|
55
55
|
"@inkjs/ui": "^2.0.0",
|
|
56
56
|
"@openrouter/sdk": "^1.4.25",
|
|
57
|
-
"@zenera/neo": "^1.1.
|
|
58
|
-
"@zenera/view": "^1.1.
|
|
57
|
+
"@zenera/neo": "^1.1.35",
|
|
58
|
+
"@zenera/view": "^1.1.35",
|
|
59
59
|
"google-auth-library": "^10.0.0",
|
|
60
60
|
"ink": "^7.1.1",
|
|
61
61
|
"openai": "^6.0.0",
|
|
@@ -139,6 +139,26 @@ not do, and a `.spec-sync/baseline/` whose `manifest.txt` no longer matches its
|
|
|
139
139
|
files. Both are reported, not quietly repaired - rewriting the manifest asserts
|
|
140
140
|
a pass that never happened.
|
|
141
141
|
|
|
142
|
+
### 0.2 `zen` is a black box
|
|
143
|
+
|
|
144
|
+
`zen` is the tool you drive, not the code you are working on. What it does is
|
|
145
|
+
what the `zen-cli` skill and its own output say it does. So:
|
|
146
|
+
|
|
147
|
+
- Never read, list or search `zen`'s installed code or data: the `@zenera/*`
|
|
148
|
+
packages under `$(npm root -g)`, and `~/.zenera`.
|
|
149
|
+
- Never read `.tmp/logs/meta.*`. Those are other runs of the meta agent -
|
|
150
|
+
earlier ones, or one still going - not evidence about this project.
|
|
151
|
+
- Never probe a model provider or gateway yourself: no `curl` at its endpoint,
|
|
152
|
+
no `node -e` against an SDK, no throughput test. `zen models test <ref>` is
|
|
153
|
+
the probe.
|
|
154
|
+
- A slow command is not a failed one. It has failed when it exits non-zero, or
|
|
155
|
+
when its log has not grown for 10 minutes. Embedding a large corpus takes
|
|
156
|
+
hours, and the progress line says how many.
|
|
157
|
+
- When a `zen` command fails, or does something its skill does not describe,
|
|
158
|
+
quote the command and the line it printed in your answer - and in
|
|
159
|
+
`SPECIFICATION-FEEDBACK.md` during a `/spec-sync-project` pass - then go on
|
|
160
|
+
with the next step. Do not look for the cause.
|
|
161
|
+
|
|
142
162
|
---
|
|
143
163
|
|
|
144
164
|
## 1. Mental model
|
|
@@ -48,6 +48,9 @@ Read, in this order, and do not edit until all of it is read:
|
|
|
48
48
|
6. `SPECIFICATION-FEEDBACK.md`, if it exists - do not re-raise something already
|
|
49
49
|
open there.
|
|
50
50
|
|
|
51
|
+
Never read `.tmp/logs/meta.*` - those are other runs of this prompt, not
|
|
52
|
+
evidence - nor anything of `zen`'s own (copilot instructions §0.2).
|
|
53
|
+
|
|
51
54
|
On an incremental pass this list narrows to the artefacts the scope implicates,
|
|
52
55
|
and to the changed hunks of the specification rather than all of it. The
|
|
53
56
|
narrowing is a claim: name what you skipped and why the diff does not reach it.
|
|
@@ -382,10 +385,14 @@ answer, fold its text into `SPECIFICATION.md` yourself, and say so in the chat.
|
|
|
382
385
|
After `zen check` passes, run `scripts/_setup.sh` yourself. A pass is not done
|
|
383
386
|
until it has run to completion in this session.
|
|
384
387
|
|
|
385
|
-
It is slow -
|
|
386
|
-
background and follow the logs instead of waiting
|
|
388
|
+
It is slow - embedding a large corpus is hours, and the progress line says how
|
|
389
|
+
many - so start it in the background and follow the logs instead of waiting
|
|
390
|
+
blind:
|
|
387
391
|
|
|
388
392
|
- Tail `.tmp/logs/setup-*.log` and check the output artefact is still growing.
|
|
393
|
+
- **Slow is not failed.** A step has failed when it exits non-zero, or when its
|
|
394
|
+
log has not grown for 10 minutes. A long estimate is the answer to how long
|
|
395
|
+
the step takes, not a problem to investigate.
|
|
389
396
|
- **Wait in a loop, never in one long sleep.** Sleep at most 30 seconds at a
|
|
390
397
|
time, then check the log and say what it shows, and repeat until the step
|
|
391
398
|
finishes. A single long block makes the run unwatchable and hides a failure
|
|
@@ -397,6 +404,10 @@ background and follow the logs instead of waiting blind:
|
|
|
397
404
|
- On failure, read that step's log, fix the cause, and run `scripts/_setup.sh`
|
|
398
405
|
again - re-running is the fix path, not a reset. If the same step fails twice
|
|
399
406
|
for the same reason, stop and raise it in `SPECIFICATION-FEEDBACK.md`.
|
|
407
|
+
- The cause you fix is in the project: the step's script, its inputs,
|
|
408
|
+
`agents.yaml`. When the log points inside `zen` itself, do not go looking -
|
|
409
|
+
quote the command and the line in `SPECIFICATION-FEEDBACK.md`, report the step
|
|
410
|
+
as failed, and go on to §7.
|
|
400
411
|
- Prove re-entrancy: once it has succeeded, run `scripts/_setup.sh` once more and
|
|
401
412
|
check that every step reports `skipped` rather than rebuilding.
|
|
402
413
|
- Prove the dry run: `scripts/_setup.sh --check` must then report every step
|
|
@@ -26,7 +26,7 @@ zen rag schema index <spec...> [--embedding <ref>] [-o <dir>] [--batch <n>]
|
|
|
26
26
|
| ------------------- | ------------- | ------------------------------------------------------------ |
|
|
27
27
|
| `--embedding <ref>` | - | Which embedder makes the vectors. Omit it to see the choices |
|
|
28
28
|
| `-o`, `--out <dir>` | `./schema-db` | Where the index goes; `$ZEN_SCHEMA_DB` if set |
|
|
29
|
-
| `--batch <n>` |
|
|
29
|
+
| `--batch <n>` | model's own | Texts per embedding request. `gemini-embedding-*` takes 1 |
|
|
30
30
|
| `--no-sources` | - | Keep no copy of the documents in the index |
|
|
31
31
|
| `--quiet` | - | No narration |
|
|
32
32
|
|
|
@@ -385,7 +385,7 @@ zen rag docs index <path...> [--embedding <ref>] [-o <dir>] [--chunk-tokens <n>]
|
|
|
385
385
|
| -------------------- | ----------- | ------------------------------------------------------------ |
|
|
386
386
|
| `--embedding <ref>` | - | Which embedder makes the vectors. Omit it to see the choices |
|
|
387
387
|
| `-o`, `--out <dir>` | `./docs-db` | Where the index goes; `$ZEN_DOCS_DB` if set |
|
|
388
|
-
| `--batch <n>` |
|
|
388
|
+
| `--batch <n>` | model's own | Texts per embedding request. `gemini-embedding-*` takes 1 |
|
|
389
389
|
| `--chunk-tokens <n>` | `384` | Target chunk size |
|
|
390
390
|
| `--quiet` | - | No narration |
|
|
391
391
|
|
|
@@ -22,16 +22,16 @@ hits for `limit` are not an answer; the eight lines around one of them are.
|
|
|
22
22
|
zen rag docs <index|restore|ready|search|list|grep|show|stats> [path...]
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
| Command | Answers | Embedder? | Typical
|
|
26
|
-
| --------- | ------------------------------------------ | --------- |
|
|
27
|
-
| `index` | builds the thing | yes | minutes |
|
|
28
|
-
| `restore` | _put the vectors back_ | **yes** | minutes |
|
|
29
|
-
| `ready` | _can this index answer at all?_ | no | instant
|
|
30
|
-
| `search` | _where does this corpus talk about X?_ | **yes** | seconds
|
|
31
|
-
| `list` | _what documents/headings/tables are here?_ | no | instant
|
|
32
|
-
| `grep` | _does the string X appear anywhere?_ | no | instant
|
|
33
|
-
| `show` | _print this section, verbatim_ | no | instant
|
|
34
|
-
| `stats` | _what is in this index?_ | no | instant
|
|
25
|
+
| Command | Answers | Embedder? | Typical |
|
|
26
|
+
| --------- | ------------------------------------------ | --------- | ---------------- |
|
|
27
|
+
| `index` | builds the thing | yes | minutes to hours |
|
|
28
|
+
| `restore` | _put the vectors back_ | **yes** | minutes to hours |
|
|
29
|
+
| `ready` | _can this index answer at all?_ | no | instant |
|
|
30
|
+
| `search` | _where does this corpus talk about X?_ | **yes** | seconds |
|
|
31
|
+
| `list` | _what documents/headings/tables are here?_ | no | instant |
|
|
32
|
+
| `grep` | _does the string X appear anywhere?_ | no | instant |
|
|
33
|
+
| `show` | _print this section, verbatim_ | no | instant |
|
|
34
|
+
| `stats` | _what is in this index?_ | no | instant |
|
|
35
35
|
|
|
36
36
|
Only `search` ranks, and only `search` costs a network round trip - it embeds
|
|
37
37
|
the query before it can compare anything. The other four read `outline.json`
|
|
@@ -199,7 +199,7 @@ would land on the same name are deduped rather than merged.
|
|
|
199
199
|
| -------------------- | ----------- | ------------------------------------------------------------ |
|
|
200
200
|
| `--embedding <ref>` | - | Which embedder makes the vectors. Omit it to see the choices |
|
|
201
201
|
| `-o`, `--out <dir>` | `./docs-db` | Where the index goes; `$ZEN_DOCS_DB` if that is set |
|
|
202
|
-
| `--batch <n>` |
|
|
202
|
+
| `--batch <n>` | model's own | Texts per embedding request. `gemini-embedding-*` takes 1 |
|
|
203
203
|
| `--chunk-tokens <n>` | `384` | Target chunk size. Leave it alone unless you have a reason |
|
|
204
204
|
| `--quiet` | - | No narration |
|
|
205
205
|
|
|
@@ -210,9 +210,13 @@ a real environment variable always wins.
|
|
|
210
210
|
### What it prints
|
|
211
211
|
|
|
212
212
|
A per-document table (lines, sections, tables, chunks) with a total row, a line
|
|
213
|
-
per skipped file with the reason, then a progress line
|
|
214
|
-
|
|
215
|
-
|
|
213
|
+
per skipped file with the reason, then a progress line every few seconds:
|
|
214
|
+
`embedded 22416/242175 · 9% · 8m50s · ~1h26m left`. **That estimate is how
|
|
215
|
+
long the build takes, not a sign that it is stuck.** Time is chunks divided by
|
|
216
|
+
throughput, and a `gemini-embedding-*` model takes one text per request, so a
|
|
217
|
+
corpus of a few hundred thousand chunks is hours. **stdout is the output
|
|
218
|
+
directory and nothing else**, so `DIR=$(zen rag docs index …)` works; everything
|
|
219
|
+
else is stderr.
|
|
216
220
|
|
|
217
221
|
This is the one command here that spends money and time: it embeds every chunk.
|
|
218
222
|
While it runs, the output directory narrates itself - `README.md` is a live
|
|
@@ -21,17 +21,17 @@ word "password" appears in forty places that are not the one you want.
|
|
|
21
21
|
zen rag schema <index|restore|ready|search|list|grep|trace|show|stats> [spec...]
|
|
22
22
|
```
|
|
23
23
|
|
|
24
|
-
| Command | Answers | Embedder? | Typical
|
|
25
|
-
| --------- | -------------------------------------- | --------- |
|
|
26
|
-
| `index` | builds the thing | yes | minutes |
|
|
27
|
-
| `restore` | _put the vectors back_ | **yes** | minutes |
|
|
28
|
-
| `ready` | _can this index answer at all?_ | no | instant
|
|
29
|
-
| `search` | _what is this API's way to do X?_ | **yes** | seconds
|
|
30
|
-
| `list` | _what methods/types/fields are there?_ | no | instant
|
|
31
|
-
| `grep` | _does the string X appear anywhere?_ | no | instant
|
|
32
|
-
| `trace` | _which call can reach this field?_ | no | instant
|
|
33
|
-
| `show` | _print exactly these things_ | no | instant
|
|
34
|
-
| `stats` | _what is in this index?_ | no | instant
|
|
24
|
+
| Command | Answers | Embedder? | Typical |
|
|
25
|
+
| --------- | -------------------------------------- | --------- | ---------------- |
|
|
26
|
+
| `index` | builds the thing | yes | minutes to hours |
|
|
27
|
+
| `restore` | _put the vectors back_ | **yes** | minutes to hours |
|
|
28
|
+
| `ready` | _can this index answer at all?_ | no | instant |
|
|
29
|
+
| `search` | _what is this API's way to do X?_ | **yes** | seconds |
|
|
30
|
+
| `list` | _what methods/types/fields are there?_ | no | instant |
|
|
31
|
+
| `grep` | _does the string X appear anywhere?_ | no | instant |
|
|
32
|
+
| `trace` | _which call can reach this field?_ | no | instant |
|
|
33
|
+
| `show` | _print exactly these things_ | no | instant |
|
|
34
|
+
| `stats` | _what is in this index?_ | no | instant |
|
|
35
35
|
|
|
36
36
|
Only `search` ranks, and only `search` costs a network round trip - it embeds
|
|
37
37
|
the query before it can compare anything. The other five read `graph.json` off
|
|
@@ -163,7 +163,7 @@ zen rag schema index <spec...> [--embedding <ref>] [-o <dir>] [--batch <n>]
|
|
|
163
163
|
| ------------------- | ------------- | ---------------------------------------------------------------------------------------------- |
|
|
164
164
|
| `--embedding <ref>` | - | Which embedder makes the vectors. Omit it to see the choices |
|
|
165
165
|
| `-o`, `--out <dir>` | `./schema-db` | Where the index goes; `$ZEN_SCHEMA_DB` if that is set |
|
|
166
|
-
| `--batch <n>` |
|
|
166
|
+
| `--batch <n>` | model's own | Texts per embedding request. `gemini-embedding-*` takes 1 |
|
|
167
167
|
| `--no-sources` | - | Keep no copy of the documents; `show --source` rebuilds them, and `restore` becomes impossible |
|
|
168
168
|
| `--quiet` | - | No narration |
|
|
169
169
|
|