@zenera/cli 1.1.43 → 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/dist/commands/completion.d.ts +1 -1
- package/dist/commands/completion.js +4 -4
- package/dist/commands/meta.js +10 -10
- package/dist/completion.js +1 -1
- package/dist/meta/editor.js +43 -3
- package/dist/meta/finetune/command.js +2 -2
- package/dist/meta/finetune/improvements.js +1 -1
- package/dist/meta/prompts.d.ts +8 -3
- package/dist/meta/prompts.js +42 -19
- package/dist/usage.d.ts +1 -1
- package/dist/usage.js +1 -1
- package/package.json +4 -4
- package/templates/editor/.github/copilot-instructions.md +35 -22
- package/templates/editor/.github/{prompts/analyze.prompt.md → skills/analyze/SKILL.md} +6 -3
- package/templates/editor/.github/{prompts/dataset.prompt.md → skills/dataset/SKILL.md} +6 -3
- package/templates/editor/.github/{prompts/finetune.prompt.md → skills/finetune/SKILL.md} +7 -4
- package/templates/editor/.github/{prompts/new-agent.prompt.md → skills/new-agent/SKILL.md} +3 -1
- package/templates/editor/.github/{prompts/new-skill.prompt.md → skills/new-skill/SKILL.md} +3 -1
- package/templates/editor/.github/{prompts/project-review.prompt.md → skills/project-review/SKILL.md} +6 -0
- package/templates/editor/.github/{prompts/spec-apply-feedback.prompt.md → skills/spec-apply-feedback/SKILL.md} +2 -0
- package/templates/editor/.github/skills/spec-edit/SKILL.md +324 -0
- package/templates/editor/.github/{prompts/spec-sync-project.prompt.md → skills/spec-sync-project/SKILL.md} +41 -15
- package/templates/editor/.github/skills/zen-analyze-run/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-cli/SKILL.md +21 -20
- package/templates/editor/.github/skills/zen-cli/references/finetune.md +1 -1
- package/templates/editor/.github/skills/zen-cli/references/meta.md +2 -2
- package/templates/editor/.github/skills/zen-code-python/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-dataset/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-finetune/SKILL.md +2 -1
- package/templates/editor/.github/{prompts/finetune-apply.prompt.md → skills/zen-finetune-apply/SKILL.md} +7 -4
- package/templates/editor/.github/skills/zen-inspect/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-inspect-ask/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-instructions/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-memory/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-memory-warmup/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-rag-docs/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-rag-schema/SKILL.md +1 -0
- package/templates/editor/.github/skills/zen-review/SKILL.md +34 -0
- package/templates/editor/.github/skills/zen-review/scripts/check-paths.sh +1 -1
- package/templates/editor/.github/skills/zen-review/scripts/check-receipt.mjs +95 -0
- package/templates/editor/.github/skills/zen-review/scripts/review.sh +27 -2
- package/templates/editor/.github/skills/zen-sandbox/SKILL.md +2 -1
- package/templates/editor/.github/skills/zen-sandbox-capacity/SKILL.md +2 -1
- package/templates/editor/.github/skills/zen-spec-sync/SKILL.md +115 -20
- package/templates/editor/.github/skills/zen-spec-sync/scripts/snapshot.sh +83 -2
- package/templates/editor/.github/skills/zen-topology/SKILL.md +1 -0
- package/templates/project/agents/prompts/default.md.tmpl +3 -3
- package/templates/editor/.github/prompts/spec-edit.prompt.md +0 -250
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: zen-topology
|
|
3
3
|
description: 'Use when designing, reviewing or auditing how a Zenera project divides work between agents - whether to hand off, fork one branch to delegate, fan out several branches, or keep the work in one conversation; which fork `context` to pick; what each choice costs in tokens, prompt cache and elapsed time; and how to read a recorded run for topology mistakes (missed fan-out, a forked sequence, an early or looping hand-off, a delegation that cost more than it saved). Load before adding or changing `handoffs:` or `fork:` in agents.yaml, before writing a prompt line that says when to delegate, and before grading Delegation or Forking in a run audit.'
|
|
4
|
+
user-invocable: false
|
|
4
5
|
---
|
|
5
6
|
|
|
6
7
|
# Agent topology
|
|
@@ -60,9 +60,9 @@ To find out more, `--help` works on every command and subcommand:
|
|
|
60
60
|
|
|
61
61
|
- `zen meta --help` lists everything the meta agent can do: `run`,
|
|
62
62
|
`prompts`, `resume`, `model`, `dataset` and `finetune`, with examples.
|
|
63
|
-
- `zen meta run --help` lists the options for a run and the
|
|
64
|
-
|
|
65
|
-
`zen meta prompts` lists the
|
|
63
|
+
- `zen meta run --help` lists the options for a run and the `/<name>`
|
|
64
|
+
commands used above.
|
|
65
|
+
`zen meta prompts` lists the commands on their own.
|
|
66
66
|
- `zen meta dataset --help` and `zen meta finetune --help` cover building an
|
|
67
67
|
evaluation dataset and tuning the project against it.
|
|
68
68
|
- `zen meta run "<question>"` asks the meta agent anything about the project,
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Change SPECIFICATION.md as the request after the command asks - written in the specification's own structure and voice, checked against what the runtime can actually do - and nothing else.
|
|
3
|
-
argument-hint: what to add, change or remove in the specification
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
Edit `SPECIFICATION.md` the way the request after this command asks. The
|
|
7
|
-
specification is the intent of the project; you are changing the intent, not
|
|
8
|
-
the implementation. Making the project match it is `/spec-sync-project`, which
|
|
9
|
-
runs after this.
|
|
10
|
-
|
|
11
|
-
You change one file: `SPECIFICATION.md`. Not `agents.yaml`, not a prompt, not a
|
|
12
|
-
skill, not `SPECIFICATION-FEEDBACK.md`.
|
|
13
|
-
|
|
14
|
-
## 0. Everything you need is already attached
|
|
15
|
-
|
|
16
|
-
These files are attached to this prompt so the work starts without a round of
|
|
17
|
-
reads. Use them as they are; do not read them again with a tool.
|
|
18
|
-
|
|
19
|
-
The project:
|
|
20
|
-
|
|
21
|
-
- [SPECIFICATION.md](../../SPECIFICATION.md) - the file you are editing.
|
|
22
|
-
- [SPECIFICATION-FEEDBACK.md](../../SPECIFICATION-FEEDBACK.md) - the questions
|
|
23
|
-
still open against it, and the ones already answered. It may not exist; that
|
|
24
|
-
only means nothing is open.
|
|
25
|
-
|
|
26
|
-
What the runtime can do, so that what you write is something it can build:
|
|
27
|
-
|
|
28
|
-
- [zen-cli](../skills/zen-cli/SKILL.md) - every `zen` command, and
|
|
29
|
-
[its models reference](../skills/zen-cli/references/models.md) - how to find
|
|
30
|
-
which models this machine can actually use.
|
|
31
|
-
- [zen-instructions](../skills/zen-instructions/SKILL.md) - house rules: what
|
|
32
|
-
every agent is told, and what belongs there rather than in a prompt.
|
|
33
|
-
- [zen-topology](../skills/zen-topology/SKILL.md) - one agent or several,
|
|
34
|
-
hand-off or fork, and what each costs.
|
|
35
|
-
- [zen-memory](../skills/zen-memory/SKILL.md) - what memory is, who may read and
|
|
36
|
-
write it, and what a strategy for it has to say.
|
|
37
|
-
- [zen-rag-docs](../skills/zen-rag-docs/SKILL.md) - an index over a folder of
|
|
38
|
-
markdown documents.
|
|
39
|
-
- [zen-rag-schema](../skills/zen-rag-schema/SKILL.md) - an index over an OpenAPI
|
|
40
|
-
description.
|
|
41
|
-
- [zen-sandbox](../skills/zen-sandbox/SKILL.md) - the container: what it mounts,
|
|
42
|
-
what it can reach, what persists.
|
|
43
|
-
- [zen-code-python](../skills/zen-code-python/SKILL.md) - reusable scripts as
|
|
44
|
-
tools, where they live, and which agents own them.
|
|
45
|
-
|
|
46
|
-
If any of these did not arrive attached - your editor does not resolve links in
|
|
47
|
-
prompt files - read all of them in **one** batch of parallel reads before doing
|
|
48
|
-
anything else, `SPECIFICATION-FEEDBACK.md` included if it exists. Never one at a
|
|
49
|
-
time, and never skip one because the request seems not to need it: a request
|
|
50
|
-
about an agent's job can still decide what that agent may remember.
|
|
51
|
-
|
|
52
|
-
In the same first step, run once from the project root and keep the output:
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
zen models && zen models ls --chat && zen models ls --embeddings
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
That is the list of models with a credential on this machine - the only ones a
|
|
59
|
-
**Models** line may name. A model the request names that is not in it: run
|
|
60
|
-
`zen models search <name>` once; if it is still absent, say so in the chat and
|
|
61
|
-
do not write it.
|
|
62
|
-
|
|
63
|
-
If there is no request after the command, ask what to change and stop.
|
|
64
|
-
|
|
65
|
-
## 1. Understand the request against what is there
|
|
66
|
-
|
|
67
|
-
Before writing a line, work out:
|
|
68
|
-
|
|
69
|
-
- **Whether this is defining the project from the initial scaffold or editing an
|
|
70
|
-
existing domain specification.** A freshly initialised `SPECIFICATION.md` is a
|
|
71
|
-
generic placeholder ("Carry out work inside a workspace on request…",
|
|
72
|
-
"Currently: no steps", "the only agent; nobody to hand work to") written as
|
|
73
|
-
meta-commentary about what each section does. When the request asks to make or
|
|
74
|
-
define a specification for a project or domain on top of that scaffold, it
|
|
75
|
-
reaches **every** section: replace all generic template sentences and
|
|
76
|
-
meta-explanations with a complete, concrete specification for that domain.
|
|
77
|
-
When `SPECIFICATION.md` already describes a real domain project and the
|
|
78
|
-
request asks for a specific change, keep the pass narrow and touch only the
|
|
79
|
-
sections the change implicates.
|
|
80
|
-
- **Which sections the request touches.** Usually more than the one it names: a
|
|
81
|
-
new agent changes **Agents**, **Tools and boundaries** and **Done means**; an
|
|
82
|
-
index changes **Setup**, **Knowledge** and **Environment**.
|
|
83
|
-
- **What it contradicts.** A sentence already in the specification that the
|
|
84
|
-
request makes false is part of the edit - change it too, and report it.
|
|
85
|
-
- **What it settles in the feedback file.** An open question the request
|
|
86
|
-
answers, or an answered one it reverses. Do not edit the feedback file; say
|
|
87
|
-
which questions in the chat.
|
|
88
|
-
- **Whether the runtime can do it.** Check the request against the skills above.
|
|
89
|
-
Something no tool, agent setting or script can provide is not written into the
|
|
90
|
-
specification as if it could be: say so in the chat, offer the nearest thing
|
|
91
|
-
the runtime does do, and write that only if the request leaves no doubt it is
|
|
92
|
-
wanted.
|
|
93
|
-
|
|
94
|
-
## 2. The structure of a specification
|
|
95
|
-
|
|
96
|
-
Keep the sections the file already has, in its order. Add a section only when
|
|
97
|
-
the request needs one, at its place in this order, and leave out any section
|
|
98
|
-
that would be empty:
|
|
99
|
-
|
|
100
|
-
```markdown
|
|
101
|
-
# Specification
|
|
102
|
-
|
|
103
|
-
## Purpose
|
|
104
|
-
|
|
105
|
-
## Scope
|
|
106
|
-
|
|
107
|
-
## Models
|
|
108
|
-
|
|
109
|
-
## Setup
|
|
110
|
-
|
|
111
|
-
## Agents
|
|
112
|
-
|
|
113
|
-
## Tools and boundaries
|
|
114
|
-
|
|
115
|
-
## Knowledge
|
|
116
|
-
|
|
117
|
-
## Memory
|
|
118
|
-
|
|
119
|
-
## Environment
|
|
120
|
-
|
|
121
|
-
## Testing
|
|
122
|
-
|
|
123
|
-
## Done means
|
|
124
|
-
|
|
125
|
-
## Out of scope
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
What each one answers:
|
|
129
|
-
|
|
130
|
-
- **Purpose** - what the system produces, and for whom, in one paragraph.
|
|
131
|
-
- **Scope** - what one request covers, what is in and what is not, hard numeric
|
|
132
|
-
bounds (when a request is refused with a count rather than truncated), and
|
|
133
|
-
what has to happen before the system acts.
|
|
134
|
-
- **Models** - every chat and embedding model by its full id from `zen models`,
|
|
135
|
-
and which agent or job uses which. Keep the chat model already in
|
|
136
|
-
`SPECIFICATION.md` unless the request asks to change it; add an embedding
|
|
137
|
-
model from `zen models ls --embeddings` whenever the specification uses
|
|
138
|
-
`memory/`, `assets/docs-db`, or `assets/schema-db`.
|
|
139
|
-
- **Setup** - what has to exist before a run: OpenAPI specs or reference
|
|
140
|
-
documents fetched, a `zen rag schema` index built in `assets/schema-db`, a
|
|
141
|
-
`zen rag docs` index built in `assets/docs-db`, or reference files generated.
|
|
142
|
-
Each is a named step `scripts/_setup.sh` runs in order; say what it produces,
|
|
143
|
-
from what inputs, and where it lands.
|
|
144
|
-
- **Agents** - one entry per agent: its name, its one job, who it hands to or
|
|
145
|
-
forks, and the behaviours that are specific to it. Use **zen-topology** to
|
|
146
|
-
choose the right shape: split into focused agents (for example, a lead
|
|
147
|
-
coordinator/analyst, a dedicated quantitative/code agent, and a read-only
|
|
148
|
-
research agent) when tasks have distinct tool boundaries or heavy code
|
|
149
|
-
execution (**zen-code-python**), and specify `fork` (`context: none`) when a
|
|
150
|
-
request compares multiple independent items or runs independent research
|
|
151
|
-
tracks in parallel.
|
|
152
|
-
- **Tools and boundaries** - what each agent may reach for (files, shell,
|
|
153
|
-
reusable scripts in `/workspace/scripts/`, web search/read, memory, indexes,
|
|
154
|
-
external APIs), what is read-only, how transient network/API errors are
|
|
155
|
-
retried and fallen back from, and what nothing may reach. Every capability
|
|
156
|
-
named here has an agent that holds it.
|
|
157
|
-
- **Knowledge** - each index (`assets/schema-db`, `assets/docs-db`), each skill
|
|
158
|
-
under `agents/skills/` (naming the skill and the concrete procedure, formulas,
|
|
159
|
-
API conventions, or `rag_search` rules it holds), and the concrete external
|
|
160
|
-
APIs or data sources the project queries (naming specific zero-key primary
|
|
161
|
-
APIs and endpoints, required headers and rate limits, optional free-tier
|
|
162
|
-
keyed APIs, and fallback order).
|
|
163
|
-
- **Memory** - what is worth remembering (reusable scripts as `file` nodes,
|
|
164
|
-
verified identifiers/mappings, API schemas, workflows) and what is not (or
|
|
165
|
-
how time-sensitive facts are bounded), who may read and write, and when an
|
|
166
|
-
agent recalls before working and commits after it - see **zen-memory**.
|
|
167
|
-
- **Environment** - the sandbox (`sandbox/Dockerfile`, persistence, network),
|
|
168
|
-
the exact languages, CLI tools, and libraries pre-installed in the image so
|
|
169
|
-
agents never install packages at run time, where scripts and data outputs
|
|
170
|
-
live under `/workspace`, and optional environment variables or credentials by
|
|
171
|
-
name - see **zen-sandbox**.
|
|
172
|
-
- **Testing** - how a change to the project is checked: `zen check`,
|
|
173
|
-
`scripts/_setup.sh --check`, `scripts/_setup.sh` run twice in a row reporting
|
|
174
|
-
`skipped` the second time, and a concrete verification request the project
|
|
175
|
-
must handle end-to-end.
|
|
176
|
-
- **Done means** - how a finished job is told from an unfinished one, written as
|
|
177
|
-
concrete acceptance tests in prose that a reviewer could check against a run
|
|
178
|
-
(exact attribution fields, script-computed numbers, verified page reads,
|
|
179
|
-
reusable script paths, and required sections).
|
|
180
|
-
- **Out of scope** - what the runtime could do that this project deliberately
|
|
181
|
-
does not, so nobody adds it because it seemed useful.
|
|
182
|
-
|
|
183
|
-
## 3. How to write it
|
|
184
|
-
|
|
185
|
-
- **Replace scaffold boilerplate on a greenfield request; change the smallest
|
|
186
|
-
thing on an incremental edit.** When `SPECIFICATION.md` is still the initial
|
|
187
|
-
`zen init` scaffold or the request asks to make a specification for a new
|
|
188
|
-
project, rewrite every section for that domain and remove the scaffold's
|
|
189
|
-
generic meta-commentary ("What the work always needs belongs in the image…",
|
|
190
|
-
"Currently: no steps…", "The reply names what changed, file by file…"). When
|
|
191
|
-
editing an already-written domain specification, leave every sentence the
|
|
192
|
-
request does not reach as it is.
|
|
193
|
-
- **Write in a direct, declarative voice.** Match the clean heading and list
|
|
194
|
-
structure of the specification, stating concrete project rules rather than
|
|
195
|
-
abstract explanations of how Zenera works.
|
|
196
|
-
- **Say what and why, never raw config syntax.** The specification is not
|
|
197
|
-
`agents.yaml` in prose. Name the agents, skills, setup steps, indexes, APIs,
|
|
198
|
-
packages, paths, and behavioural rules clearly, without pasting raw YAML
|
|
199
|
-
snippets or shell implementation internals that `/spec-sync-project` derives.
|
|
200
|
-
- **Turn high-level domain requests into concrete architectural choices.** When
|
|
201
|
-
a request asks to design a project in broad terms (for example, "make a
|
|
202
|
-
specification for financial analytics using open APIs"), do not repeat vague
|
|
203
|
-
phrases like "open APIs" or "packages for data analysis". Make the concrete
|
|
204
|
-
domain choices upfront so `/spec-sync-project` can build a working system
|
|
205
|
-
without guessing:
|
|
206
|
-
- Name specific, working zero-key public APIs and endpoints as primary
|
|
207
|
-
sources (with required headers such as `User-Agent` and rate limits),
|
|
208
|
-
optional keyed free-tier APIs as secondary sources with clean zero-key
|
|
209
|
-
fallback when keys are absent, and `web_search` / `web_read` rules.
|
|
210
|
-
- Name the concrete setup steps (`scripts/<name>.sh`), indexes
|
|
211
|
-
(`assets/schema-db`, `assets/docs-db`), and domain skills under
|
|
212
|
-
`agents/skills/`.
|
|
213
|
-
- Name the exact Python/system libraries to pre-install in
|
|
214
|
-
`sandbox/Dockerfile` and the `/workspace/scripts/` and `/workspace/data/`
|
|
215
|
-
conventions from **zen-code-python**.
|
|
216
|
-
- State explicit numeric limits (such as the maximum entities/tickers per
|
|
217
|
-
request before refusing with a count), retry/fallback rules, and required
|
|
218
|
-
citation fields.
|
|
219
|
-
- **Be specific where a reader could decide either way.** A limit is a number,
|
|
220
|
-
a model is an id, a failure has a stated outcome. "Handles large inputs" is
|
|
221
|
-
not implementable; "a request over 25 tickers is refused with a count, never
|
|
222
|
-
truncated" is.
|
|
223
|
-
- **Never invent a model id or a user-owned secret.** Keep the model already in
|
|
224
|
-
`SPECIFICATION.md` unless the request asks to change it, and take any new
|
|
225
|
-
chat or embedding model strictly from the `zen models` output on this machine,
|
|
226
|
-
never from memory. Ask before editing only when a required value belongs
|
|
227
|
-
exclusively to the user (such as a private server URL or proprietary rule)
|
|
228
|
-
and cannot be satisfied by a standard public default.
|
|
229
|
-
- **Make it checkable.** Every behaviour the request adds gets a line under
|
|
230
|
-
**Done means** that a reviewer could verify against a recorded run.
|
|
231
|
-
- **Name what is now excluded.** When the request narrows the system, the thing
|
|
232
|
-
it rules out goes under **Out of scope**.
|
|
233
|
-
- **Say it once.** If the rule already lives in another section, change it
|
|
234
|
-
there rather than stating it a second time somewhere new.
|
|
235
|
-
|
|
236
|
-
## 4. Report
|
|
237
|
-
|
|
238
|
-
In the chat:
|
|
239
|
-
|
|
240
|
-
- every section you changed, with each new or changed line quoted
|
|
241
|
-
- every edit the request did not name but made necessary, and why
|
|
242
|
-
- every open question in `SPECIFICATION-FEEDBACK.md` the change settles or
|
|
243
|
-
reopens, by number
|
|
244
|
-
- anything you did not write because the runtime cannot do it, or because it
|
|
245
|
-
needs a value only the reader has
|
|
246
|
-
- then, in one line: send `/spec-sync-project` to make the project match.
|
|
247
|
-
|
|
248
|
-
## 5. User Request:
|
|
249
|
-
|
|
250
|
-
Following is the user request that the specification should address (if any):
|