@zenera/cli 1.1.25 → 1.1.26
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 +13 -1
- package/dist/catalog.d.ts +20 -0
- package/dist/catalog.js +60 -0
- package/dist/commands/index.js +2 -0
- package/dist/commands/inspect.d.ts +5 -1
- package/dist/commands/inspect.js +54 -14
- package/dist/commands/memory.js +28 -3
- package/dist/commands/meta.js +24 -5
- package/dist/commands/models.js +2 -1
- package/dist/commands/sandbox.js +73 -3
- package/dist/commands/view.d.ts +8 -0
- package/dist/commands/view.js +114 -0
- package/dist/engine.d.ts +3 -1
- package/dist/engine.js +6 -0
- package/dist/eventlog.d.ts +5 -0
- package/dist/eventlog.js +25 -1
- package/dist/liveness.js +20 -2
- package/dist/main.js +0 -0
- package/dist/meta/editor.d.ts +1 -1
- package/dist/meta/editor.js +4 -21
- package/dist/meta/finetune/analyze-brief.d.ts +26 -0
- package/dist/meta/finetune/analyze-brief.js +131 -0
- package/dist/meta/finetune/apply-brief.d.ts +23 -0
- package/dist/meta/finetune/apply-brief.js +247 -0
- package/dist/meta/finetune/brief.d.ts +45 -0
- package/dist/meta/finetune/brief.js +158 -0
- package/dist/meta/finetune/command.d.ts +1 -1
- package/dist/meta/finetune/command.js +224 -46
- package/dist/meta/finetune/cost.d.ts +46 -0
- package/dist/meta/finetune/cost.js +105 -0
- package/dist/meta/finetune/dataset/types.d.ts +3 -1
- package/dist/meta/finetune/feedback.d.ts +14 -2
- package/dist/meta/finetune/feedback.js +22 -3
- package/dist/meta/finetune/guard.d.ts +29 -0
- package/dist/meta/finetune/guard.js +104 -0
- package/dist/meta/finetune/improvements.d.ts +50 -3
- package/dist/meta/finetune/improvements.js +290 -33
- package/dist/meta/finetune/live.d.ts +17 -7
- package/dist/meta/finetune/live.js +56 -10
- package/dist/meta/finetune/loop.js +59 -10
- package/dist/meta/finetune/recheck.d.ts +58 -0
- package/dist/meta/finetune/recheck.js +311 -0
- package/dist/meta/finetune/report.d.ts +9 -2
- package/dist/meta/finetune/report.js +551 -438
- package/dist/meta/finetune/sampler.js +8 -2
- package/dist/meta/finetune/train.d.ts +6 -2
- package/dist/meta/finetune/train.js +55 -21
- package/dist/meta/finetune/tui.d.ts +3 -3
- package/dist/meta/finetune/tui.js +37 -12
- package/dist/meta/finetune/tuning.d.ts +27 -1
- package/dist/meta/finetune/tuning.js +21 -2
- package/dist/meta/finetune/usage.d.ts +4 -0
- package/dist/meta/finetune/usage.js +35 -0
- package/dist/meta/finetune/view.d.ts +9 -0
- package/dist/meta/finetune/view.js +27 -0
- package/dist/meta/host.d.ts +2 -1
- package/dist/meta/host.js +2 -1
- package/dist/meta.d.ts +291 -0
- package/dist/meta.js +981 -0
- package/dist/resources.d.ts +215 -0
- package/dist/resources.js +856 -0
- package/dist/scaffold.d.ts +3 -4
- package/dist/scaffold.js +21 -9
- package/dist/trace.d.ts +5 -0
- package/dist/trace.js +54 -5
- package/dist/tui/app.js +19 -5
- package/dist/tui/links.d.ts +27 -0
- package/dist/tui/links.js +142 -0
- package/dist/tui/models.d.ts +3 -1
- package/dist/tui/models.js +65 -7
- package/dist/tui/sandbox.d.ts +10 -0
- package/dist/tui/sandbox.js +131 -0
- package/package.json +3 -2
- package/templates/editor/.github/copilot-instructions.md +29 -43
- package/templates/editor/.github/prompts/analyze.prompt.md +3 -1
- package/templates/editor/.github/prompts/finetune-apply.prompt.md +221 -42
- package/templates/editor/.github/prompts/project-review.prompt.md +1 -1
- package/templates/editor/.github/skills/zen-analyze-run/SKILL.md +162 -57
- package/templates/editor/.github/skills/zen-cli/references/finetune.md +74 -14
- package/templates/editor/.github/skills/zen-cli/references/inspect.md +16 -2
- package/templates/editor/.github/skills/zen-cli/references/projects.md +4 -6
- package/templates/editor/.github/skills/zen-cli/references/sandbox.md +25 -13
- package/templates/editor/.github/skills/zen-finetune/SKILL.md +74 -33
- package/templates/editor/.github/skills/zen-inspect/SKILL.md +14 -1
- package/templates/editor/.github/skills/zen-inspect-ask/SKILL.md +4 -3
- package/templates/editor/.github/skills/zen-instructions/SKILL.md +4 -12
- package/templates/editor/.github/skills/zen-memory/SKILL.md +64 -39
- package/templates/editor/.github/skills/zen-review/SKILL.md +6 -31
- package/templates/editor/.github/skills/zen-review/scripts/check-paths.sh +1 -2
- package/templates/editor/.github/skills/zen-review/scripts/review.sh +3 -12
- package/templates/editor/.github/skills/zen-sandbox/SKILL.md +2 -1
- package/templates/editor/.github/skills/zen-spec-sync/SKILL.md +2 -4
- package/templates/project/agents/fork-instructions.md +78 -28
- package/templates/project/agents/memory-instructions.md +222 -493
- package/templates/project/agents/tools-instructions.md +7 -0
- package/templates/editor/.github/skills/zen-memory/scripts/check-instructions.sh +0 -116
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
These rules are about _how_ tools are called, and hold for every agent.
|
|
4
4
|
|
|
5
|
+
- Call a tool only by the exact name it has in your tool list. A name in
|
|
6
|
+
backticks in your instructions - an agent, a skill, a command - is not a tool
|
|
7
|
+
unless your tool list has it. To hand the conversation to another agent, call
|
|
8
|
+
its `transfer_to_<agent>` tool, never a tool named `<agent>` alone. The name
|
|
9
|
+
goes in unchanged, `-` and `_` as written: an agent named `<my-agent>` is
|
|
10
|
+
reached by `transfer_to_<my-agent>`, not `transfer_to_<my_agent>`. If your
|
|
11
|
+
list has no `transfer_to_` tool, you cannot hand off.
|
|
5
12
|
- Say what you are about to do in one sentence before each turn of tool calls.
|
|
6
13
|
When several calls go out together, one sentence covers them all.
|
|
7
14
|
- Send every call you can already write in the same turn. A call waits for an
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
#
|
|
3
|
-
# Whether this project's memory house rules are still the rules.
|
|
4
|
-
#
|
|
5
|
-
# check-instructions.sh diff the copy against the reference
|
|
6
|
-
# check-instructions.sh diff the same, showing every differing line
|
|
7
|
-
# check-instructions.sh fix overwrite the copy from the reference
|
|
8
|
-
#
|
|
9
|
-
# `agents/memory-instructions.md` is a *copy* of the `zen-memory` skill's
|
|
10
|
-
# `references/memory-instructions.md`, and the reference is rewritten by every
|
|
11
|
-
# `zen init` and `zen open`. So the copy goes stale silently, and it drifts by
|
|
12
|
-
# trailing whitespace inside tables, which no one can see by reading. That is
|
|
13
|
-
# the whole reason this is a script and not a checklist line.
|
|
14
|
-
#
|
|
15
|
-
# Run it from anywhere; it finds the project root from its own location.
|
|
16
|
-
|
|
17
|
-
set -eu
|
|
18
|
-
cd "$(dirname "$0")/../../../.."
|
|
19
|
-
|
|
20
|
-
COPY=agents/memory-instructions.md
|
|
21
|
-
REFERENCE=.github/skills/zen-memory/references/memory-instructions.md
|
|
22
|
-
REMEDY="cp $REFERENCE $COPY"
|
|
23
|
-
|
|
24
|
-
if [ ! -f "$REFERENCE" ]; then
|
|
25
|
-
echo "check-instructions.sh: no $REFERENCE in $PWD" >&2
|
|
26
|
-
echo "check-instructions.sh: run \`zen open\` to rewrite the .github tree" >&2
|
|
27
|
-
exit 2
|
|
28
|
-
fi
|
|
29
|
-
|
|
30
|
-
# The project turns memory on when something declares it — the top-level block
|
|
31
|
-
# or an agent's binding — so any `memory:` key in the configuration counts.
|
|
32
|
-
# The config is found by name, in the order a run finds it.
|
|
33
|
-
config() {
|
|
34
|
-
for file in agents.yaml agents.yml agents/agents.yaml agents/agents.yml; do
|
|
35
|
-
if [ -f "$file" ]; then
|
|
36
|
-
echo "$file"
|
|
37
|
-
return 0
|
|
38
|
-
fi
|
|
39
|
-
done
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
uses_memory() {
|
|
43
|
-
# `|| true` because no configuration at all is an answer, not a failure.
|
|
44
|
-
conf="$(config || true)"
|
|
45
|
-
if [ -z "$conf" ]; then
|
|
46
|
-
return 1
|
|
47
|
-
fi
|
|
48
|
-
grep -Eq '^[[:space:]]*(-[[:space:]]+)?memory:' "$conf"
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
# The file with every line's trailing whitespace removed. Two of these being
|
|
52
|
-
# equal is the drift nobody can see by reading, named as such.
|
|
53
|
-
trimmed() {
|
|
54
|
-
sed 's/[[:space:]]*$//' "$1"
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
report() {
|
|
58
|
-
if uses_memory; then
|
|
59
|
-
echo "memory: on"
|
|
60
|
-
else
|
|
61
|
-
echo "memory: off"
|
|
62
|
-
fi
|
|
63
|
-
|
|
64
|
-
if [ ! -f "$COPY" ]; then
|
|
65
|
-
if uses_memory; then
|
|
66
|
-
echo "missing: $COPY"
|
|
67
|
-
echo "remedy: $REMEDY"
|
|
68
|
-
return 1
|
|
69
|
-
fi
|
|
70
|
-
echo "ok: no copy, and nothing needs one"
|
|
71
|
-
return 0
|
|
72
|
-
fi
|
|
73
|
-
|
|
74
|
-
if cmp -s "$REFERENCE" "$COPY"; then
|
|
75
|
-
if ! uses_memory; then
|
|
76
|
-
# Harmless, but it is rules for a capability nothing turned on.
|
|
77
|
-
echo "note: the copy is current, but no agent has a memory: binding"
|
|
78
|
-
fi
|
|
79
|
-
echo "ok: $COPY is the reference, byte for byte"
|
|
80
|
-
return 0
|
|
81
|
-
fi
|
|
82
|
-
|
|
83
|
-
echo "drift: $COPY differs from the reference"
|
|
84
|
-
# Said out loud because it is invisible on screen, and is the usual cause:
|
|
85
|
-
# a trailing space inside a table, or a lost final newline.
|
|
86
|
-
if [ "$(trimmed "$REFERENCE")" = "$(trimmed "$COPY")" ]; then
|
|
87
|
-
echo "drift: trailing whitespace only — nothing you could have seen"
|
|
88
|
-
fi
|
|
89
|
-
echo "remedy: $REMEDY"
|
|
90
|
-
return 1
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
show_diff() {
|
|
94
|
-
report || true
|
|
95
|
-
# `-L` names the two sides, since both files are called the same thing.
|
|
96
|
-
diff -u -L reference -L "$COPY" "$REFERENCE" "$COPY" || true
|
|
97
|
-
# The report's verdict, not the diff's.
|
|
98
|
-
report >/dev/null
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
fix() {
|
|
102
|
-
cp "$REFERENCE" "$COPY"
|
|
103
|
-
echo "wrote: $COPY"
|
|
104
|
-
echo "note: project policy belongs in agents/memory-policy-instructions.md,"
|
|
105
|
-
echo " which must open with '---' / 'requires: [memory]' / '---'"
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
case "${1:-status}" in
|
|
109
|
-
status) report ;;
|
|
110
|
-
diff) show_diff ;;
|
|
111
|
-
fix) fix ;;
|
|
112
|
-
*)
|
|
113
|
-
echo "usage: check-instructions.sh [status|diff|fix]" >&2
|
|
114
|
-
exit 2
|
|
115
|
-
;;
|
|
116
|
-
esac
|