@zenera/cli 1.1.21 → 1.1.22
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 +3 -3
- package/dist/banner.d.ts +33 -24
- package/dist/banner.js +25 -6
- package/dist/commands/check.js +1 -0
- package/dist/commands/init.js +1 -0
- package/dist/commands/inspect.js +1 -0
- package/dist/commands/key.js +1 -0
- package/dist/commands/list.js +1 -0
- package/dist/commands/memory.js +1 -0
- package/dist/commands/open.js +1 -0
- package/dist/commands/run.js +3 -0
- package/dist/commands/sandbox.js +1 -0
- package/dist/commands/version.js +1 -0
- package/dist/lib.d.ts +2 -1
- package/dist/lib.js +2 -1
- package/dist/meta.d.ts +1 -1
- package/dist/meta.js +5 -28
- package/dist/resolve.js +19 -12
- package/dist/sandbox.js +1 -0
- package/dist/scaffold.js +3 -1
- package/dist/term.d.ts +2 -0
- package/dist/term.js +2 -0
- package/dist/tui/markdown.d.ts +16 -0
- package/dist/tui/markdown.js +259 -0
- package/dist/tui/theme.js +1 -1
- package/dist/tui/wrap.d.ts +1 -1
- package/dist/validate.js +82 -3
- package/package.json +2 -2
- package/templates/editor/.github/copilot-instructions.md +62 -33
- package/templates/editor/.github/prompts/spec-sync-project.prompt.md +31 -1
- package/templates/editor/.github/skills/zen-cli/SKILL.md +15 -15
- package/templates/editor/.github/skills/zen-cli/references/projects.md +1 -0
- package/templates/editor/.github/skills/zen-cli/references/rag.md +37 -3
- package/templates/editor/.github/skills/zen-cli/references/sandbox.md +30 -2
- package/templates/editor/.github/skills/zen-instructions/SKILL.md +232 -0
- package/templates/editor/.github/skills/zen-memory-warmup/SKILL.md +554 -0
- package/templates/editor/.github/skills/zen-rag-docs/SKILL.md +56 -23
- package/templates/editor/.github/skills/zen-rag-schema/SKILL.md +55 -28
- package/templates/editor/.github/skills/zen-review/SKILL.md +17 -1
- package/templates/editor/.github/skills/zen-sandbox/SKILL.md +257 -0
- package/templates/editor/.github/skills/zen-spec-sync/SKILL.md +15 -3
- package/templates/editor/.vscode/agents.schema.json +8 -3
- package/templates/project/SPECIFICATION.md.tmpl +2 -1
- package/templates/project/agents/files-instructions.md +86 -0
- package/templates/project/agents/fork-instructions.md +17 -0
- package/templates/project/agents/memory-instructions.md +37 -0
- package/templates/project/agents.yaml.tmpl +3 -3
- package/templates/project/gitignore +12 -1
- package/templates/project/scripts/_setup.sh +19 -4
|
@@ -248,6 +248,23 @@ for it, or a fact with nothing that acts on it, is a memory nobody can use. Refs
|
|
|
248
248
|
resolve only within a single `memory_commit`, so a subgraph split across calls
|
|
249
249
|
arrives without its links.
|
|
250
250
|
|
|
251
|
+
**Use `ref` (not `id`) for new nodes.** A new node uses `ref` as its local name
|
|
252
|
+
(for example, `"ask"`, `"script"`), and edges connect them using those refs:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"nodes": [
|
|
257
|
+
{ "ref": "ask", "kind": "task", "text": "audit firewall rules for risky ports" },
|
|
258
|
+
{ "ref": "script", "kind": "file", "text": "risk report generator", "file": "report.py" }
|
|
259
|
+
],
|
|
260
|
+
"edges": [{ "from": "ask", "to": "script", "relation": "PRODUCED" }]
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
Use `id` only when updating an existing node that is already in memory from a
|
|
265
|
+
previous search or load. Never pass `id` when creating a new node, and do not
|
|
266
|
+
pass both `ref` and `id` on the same node.
|
|
267
|
+
|
|
251
268
|
**Do not re-commit what a search already returned.** A node that says what one
|
|
252
269
|
already in memory says is folded into it, and its existing id comes back under
|
|
253
270
|
your ref - so the links you asked for still land, on the memory that was already
|
|
@@ -285,6 +302,26 @@ costs nothing until a `memory_load` asks for it, and comes back at
|
|
|
285
302
|
`/memory/<id>.<ext>` to be read or run. Commit a node with no file only when the
|
|
286
303
|
whole of what you know is one line long.
|
|
287
304
|
|
|
305
|
+
**The file must exist in the workspace first.** `memory_commit` copies an
|
|
306
|
+
existing file from the workspace; it is not an upload channel and does not
|
|
307
|
+
write file contents from raw arguments. Write the file to the workspace first
|
|
308
|
+
(using `write_file`, `apply_patch`, or a command saving under `/workspace`),
|
|
309
|
+
then pass its workspace path (e.g. `"file": "report.py"` or
|
|
310
|
+
`"file": "/workspace/report.py"`).
|
|
311
|
+
|
|
312
|
+
| Which files to commit | What belongs in them |
|
|
313
|
+
| ---------------------- | -------------------------------------------------------------------------- |
|
|
314
|
+
| Working scripts | A script, query or invocation that can be re-run directly |
|
|
315
|
+
| Configurations & specs | Self-contained config files, schemas or request templates |
|
|
316
|
+
| Rendered findings | A table of findings or structured report produced by an investigation |
|
|
317
|
+
| Pinned reference text | Verbatim passages from released specs or versioned docs that cannot change |
|
|
318
|
+
| Assembled answers | Synthesised conclusions from multiple sources with a provenance header |
|
|
319
|
+
| Specimen responses | An API response shape to reproduce against (never raw secrets) |
|
|
320
|
+
|
|
321
|
+
Do not commit files from the living codebase (use a pointer with file and line
|
|
322
|
+
ranges instead - copies go stale silently), raw ephemeral command logs, or
|
|
323
|
+
anything outside the workspace.
|
|
324
|
+
|
|
288
325
|
**Name the sources inside the file as well as in the text.** The two halves
|
|
289
326
|
arrive separately - a recollection shows the text, and only a later
|
|
290
327
|
`memory_load` opens the file - so a file read on its own is an assertion with
|
|
@@ -44,14 +44,14 @@ agents:
|
|
|
44
44
|
# store at all.
|
|
45
45
|
memory: true
|
|
46
46
|
#
|
|
47
|
-
# workspace:* is every file tool at once, sandbox:* is
|
|
48
|
-
# them one by one to be narrower, or subtract: [
|
|
47
|
+
# files:* (alias: workspace:*) is every file tool at once, sandbox:* is
|
|
48
|
+
# the shell. Name them one by one to be narrower, or subtract: [files:*, -delete_file]
|
|
49
49
|
#
|
|
50
50
|
# sandbox:* runs commands in a container, not on this machine, so it
|
|
51
51
|
# needs podman — `zen run` installs and starts what it can on its own,
|
|
52
52
|
# and `zen sandbox status` says where that got to. Drop the line if you
|
|
53
53
|
# would rather this agent never reached a shell.
|
|
54
54
|
tools:
|
|
55
|
-
-
|
|
55
|
+
- files:*
|
|
56
56
|
- sandbox:*
|
|
57
57
|
{{exa}}
|
|
@@ -12,4 +12,15 @@ memory/.lock
|
|
|
12
12
|
.tmp/
|
|
13
13
|
|
|
14
14
|
# Credentials.
|
|
15
|
-
.env
|
|
15
|
+
.env
|
|
16
|
+
|
|
17
|
+
# A rag index commits everything except its vectors: they are binary, they are
|
|
18
|
+
# large, and `zen rag <subject> restore` rebuilds them from the copies of the
|
|
19
|
+
# documents the index already carries — which is why this is safe to ignore and
|
|
20
|
+
# `memory/` above is not. A clone therefore holds an index that looks built and
|
|
21
|
+
# cannot search until a setup step restores it. `zen rag <subject> ready` is the
|
|
22
|
+
# test for that; `[ -f manifest.json ]` is not, because the manifest is here.
|
|
23
|
+
assets/**/lance/
|
|
24
|
+
|
|
25
|
+
.DS_Store
|
|
26
|
+
**/.DS_Store
|
|
@@ -20,6 +20,13 @@
|
|
|
20
20
|
# - writes under .tmp/ and moves the result into place, so an interrupted run
|
|
21
21
|
# never leaves half an artefact behind
|
|
22
22
|
#
|
|
23
|
+
# A step decides it has nothing to do by testing for something that SURVIVES A
|
|
24
|
+
# CLONE. Files that are git-ignored do not: a vector index commits its manifest
|
|
25
|
+
# and ignores `lance/`, so `[ -f .../manifest.json ]` is true on a fresh
|
|
26
|
+
# checkout that cannot search at all, and every step reports `skipped` until the
|
|
27
|
+
# first search fails for a reason nobody connects to setup. Ask the tool instead
|
|
28
|
+
# of guessing at files — `zen rag docs ready` answers exactly that question.
|
|
29
|
+
#
|
|
23
30
|
# Running this twice has to be safe, and the second run is what proves it: every
|
|
24
31
|
# step should report `skipped`.
|
|
25
32
|
|
|
@@ -45,15 +52,23 @@ LOGS=.tmp/logs
|
|
|
45
52
|
#
|
|
46
53
|
# set -eu
|
|
47
54
|
# cd "$(dirname "$0")/.."
|
|
48
|
-
#
|
|
49
|
-
#
|
|
55
|
+
# OUT=assets/docs-db
|
|
56
|
+
#
|
|
57
|
+
# if [ "${FORCE:-0}" = 0 ] && zen rag docs ready --dir "$OUT" --quiet; then
|
|
58
|
+
# echo "$OUT is already built"
|
|
50
59
|
# exit 3
|
|
51
60
|
# fi
|
|
61
|
+
# # Committed index, git-ignored vectors: re-embed from the copies the index
|
|
62
|
+
# # already holds rather than indexing the documents over again.
|
|
63
|
+
# if [ "${FORCE:-0}" = 0 ] && [ -f "$OUT/manifest.json" ]; then
|
|
64
|
+
# zen rag docs restore --dir "$OUT"
|
|
65
|
+
# exit 0
|
|
66
|
+
# fi
|
|
52
67
|
# rm -rf .tmp/docs-db
|
|
53
68
|
# zen rag docs index assets/docs \
|
|
54
69
|
# --embedding openai:text-embedding-3-small --out .tmp/docs-db
|
|
55
|
-
# rm -rf
|
|
56
|
-
# mv .tmp/docs-db
|
|
70
|
+
# rm -rf "$OUT"
|
|
71
|
+
# mv .tmp/docs-db "$OUT"
|
|
57
72
|
#
|
|
58
73
|
STEPS=""
|
|
59
74
|
|