@zenera/cli 1.2.9 → 1.3.2

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.
Files changed (112) hide show
  1. package/README.md +11 -3
  2. package/dist/command.d.ts +19 -0
  3. package/dist/command.js +5 -9
  4. package/dist/commands/index.d.ts +1 -1
  5. package/dist/commands/index.js +13 -3
  6. package/dist/commands/key.js +15 -1
  7. package/dist/commands/open.js +6 -1
  8. package/dist/commands/version.d.ts +11 -0
  9. package/dist/commands/version.js +129 -19
  10. package/dist/{completion.d.ts → complete.d.ts} +1 -1
  11. package/dist/{completion.js → complete.js} +14 -4
  12. package/dist/{meta/editor.js → editor.js} +7 -1
  13. package/dist/lib.d.ts +19 -1
  14. package/dist/lib.js +35 -0
  15. package/dist/main.js +1 -1
  16. package/dist/scaffold.js +7 -1
  17. package/package.json +6 -7
  18. package/templates/editor/.github/copilot-instructions.md +12 -48
  19. package/templates/editor/.github/skills/project-review/SKILL.md +8 -73
  20. package/templates/editor/.github/skills/zen-cli/references/meta.md +7 -0
  21. package/templates/editor/.github/skills/zen-cli/references/projects.md +7 -2
  22. package/templates/editor/.github/skills/zen-review/SKILL.md +164 -53
  23. package/templates/editor/.github/skills/zen-review/scripts/review.sh +53 -27
  24. package/dist/commands/meta.d.ts +0 -6
  25. package/dist/commands/meta.js +0 -1088
  26. package/dist/meta/finetune/analyze-brief.d.ts +0 -26
  27. package/dist/meta/finetune/analyze-brief.js +0 -131
  28. package/dist/meta/finetune/apply-brief.d.ts +0 -23
  29. package/dist/meta/finetune/apply-brief.js +0 -247
  30. package/dist/meta/finetune/brief.d.ts +0 -45
  31. package/dist/meta/finetune/brief.js +0 -158
  32. package/dist/meta/finetune/children.d.ts +0 -8
  33. package/dist/meta/finetune/children.js +0 -76
  34. package/dist/meta/finetune/command.d.ts +0 -30
  35. package/dist/meta/finetune/command.js +0 -516
  36. package/dist/meta/finetune/cost.d.ts +0 -46
  37. package/dist/meta/finetune/cost.js +0 -105
  38. package/dist/meta/finetune/dataset/anchors.d.ts +0 -41
  39. package/dist/meta/finetune/dataset/anchors.js +0 -239
  40. package/dist/meta/finetune/dataset/changes.d.ts +0 -36
  41. package/dist/meta/finetune/dataset/changes.js +0 -319
  42. package/dist/meta/finetune/dataset/command.d.ts +0 -17
  43. package/dist/meta/finetune/dataset/command.js +0 -1011
  44. package/dist/meta/finetune/dataset/drift.d.ts +0 -33
  45. package/dist/meta/finetune/dataset/drift.js +0 -71
  46. package/dist/meta/finetune/dataset/export.d.ts +0 -26
  47. package/dist/meta/finetune/dataset/export.js +0 -51
  48. package/dist/meta/finetune/dataset/index.d.ts +0 -2
  49. package/dist/meta/finetune/dataset/index.js +0 -2
  50. package/dist/meta/finetune/dataset/sample.d.ts +0 -50
  51. package/dist/meta/finetune/dataset/sample.js +0 -197
  52. package/dist/meta/finetune/dataset/schema.d.ts +0 -33
  53. package/dist/meta/finetune/dataset/schema.js +0 -216
  54. package/dist/meta/finetune/dataset/store.d.ts +0 -35
  55. package/dist/meta/finetune/dataset/store.js +0 -177
  56. package/dist/meta/finetune/dataset/types.d.ts +0 -127
  57. package/dist/meta/finetune/dataset/types.js +0 -39
  58. package/dist/meta/finetune/failure.d.ts +0 -15
  59. package/dist/meta/finetune/failure.js +0 -26
  60. package/dist/meta/finetune/feedback.d.ts +0 -57
  61. package/dist/meta/finetune/feedback.js +0 -104
  62. package/dist/meta/finetune/improvements.d.ts +0 -98
  63. package/dist/meta/finetune/improvements.js +0 -501
  64. package/dist/meta/finetune/index.d.ts +0 -2
  65. package/dist/meta/finetune/index.js +0 -2
  66. package/dist/meta/finetune/journal.d.ts +0 -35
  67. package/dist/meta/finetune/journal.js +0 -135
  68. package/dist/meta/finetune/live.d.ts +0 -84
  69. package/dist/meta/finetune/live.js +0 -272
  70. package/dist/meta/finetune/loop.d.ts +0 -3
  71. package/dist/meta/finetune/loop.js +0 -163
  72. package/dist/meta/finetune/memories.d.ts +0 -47
  73. package/dist/meta/finetune/memories.js +0 -171
  74. package/dist/meta/finetune/recheck.d.ts +0 -58
  75. package/dist/meta/finetune/recheck.js +0 -311
  76. package/dist/meta/finetune/report.d.ts +0 -40
  77. package/dist/meta/finetune/report.js +0 -1397
  78. package/dist/meta/finetune/retry.d.ts +0 -24
  79. package/dist/meta/finetune/retry.js +0 -96
  80. package/dist/meta/finetune/sampler.d.ts +0 -18
  81. package/dist/meta/finetune/sampler.js +0 -47
  82. package/dist/meta/finetune/system.d.ts +0 -27
  83. package/dist/meta/finetune/system.js +0 -132
  84. package/dist/meta/finetune/train.d.ts +0 -43
  85. package/dist/meta/finetune/train.js +0 -425
  86. package/dist/meta/finetune/tui.d.ts +0 -16
  87. package/dist/meta/finetune/tui.js +0 -316
  88. package/dist/meta/finetune/tuning.d.ts +0 -193
  89. package/dist/meta/finetune/tuning.js +0 -308
  90. package/dist/meta/finetune/usage.d.ts +0 -66
  91. package/dist/meta/finetune/usage.js +0 -260
  92. package/dist/meta/finetune/view.d.ts +0 -9
  93. package/dist/meta/finetune/view.js +0 -27
  94. package/dist/meta/host.d.ts +0 -16
  95. package/dist/meta/host.js +0 -22
  96. package/dist/meta/index.d.ts +0 -11
  97. package/dist/meta/index.js +0 -11
  98. package/dist/meta/launch.d.ts +0 -81
  99. package/dist/meta/launch.js +0 -288
  100. package/dist/meta/model.d.ts +0 -61
  101. package/dist/meta/model.js +0 -146
  102. package/dist/meta/prompts.d.ts +0 -23
  103. package/dist/meta/prompts.js +0 -84
  104. package/dist/meta/relay.d.ts +0 -20
  105. package/dist/meta/relay.js +0 -123
  106. package/dist/meta/tokens.d.ts +0 -52
  107. package/dist/meta/tokens.js +0 -226
  108. package/dist/meta/window.d.ts +0 -61
  109. package/dist/meta/window.js +0 -198
  110. package/dist/meta/wire.d.ts +0 -51
  111. package/dist/meta/wire.js +0 -159
  112. /package/dist/{meta/editor.d.ts → editor.d.ts} +0 -0
@@ -2,17 +2,21 @@
2
2
  #
3
3
  # Every check a review can make without judgement, in the order it makes them.
4
4
  #
5
- # review.sh zen check, then paths and the spec-sync record
6
- # review.sh fast the same, with `zen check --no-models --no-sandbox`
5
+ # review.sh fast seconds, offline: `zen check --no-models --no-sandbox`,
6
+ # the path sweep, the setup dry run, the sandbox hint
7
+ # review.sh slow [--fix] minutes: the full `zen check` alone - sandbox image
8
+ # build and model probes - saved as a receipt
9
+ # review.sh both halves in one blocking go
7
10
  # review.sh check [full|no-sandbox|fast] [--fix] check and save a receipt
8
11
  # review.sh --skip-check [full|no-sandbox|fast] verify and reuse that receipt
9
12
  #
10
- # What it prints is findings. What it cannot see — whether an agent has one job,
11
- # whether a description is a condition, whether a fact belongs in a skill — is
12
- # the rest of /project-review, and the reason that prompt still exists.
13
+ # What it prints is findings, each with the command that addresses it. What it
14
+ # cannot see - whether an agent has one job, whether a description is a
15
+ # condition, whether a fact belongs in a skill - is the judgement half of the
16
+ # zen-review skill.
13
17
  #
14
18
  # Every step runs even when an earlier one fails: a review that stops at the
15
- # first problem is one somebody has to run three times. The exit code is 1 if
19
+ # first problem is one somebody has to run twice. The exit code is 1 if
16
20
  # anything wants attention, 0 if nothing does.
17
21
  #
18
22
  # Run it from anywhere; it finds the project root from its own location.
@@ -32,6 +36,16 @@ if [ "${1:-}" = check ]; then
32
36
  fi
33
37
  exec node "$RECEIPT" run "$@"
34
38
  fi
39
+ if [ "${1:-}" = slow ]; then
40
+ shift
41
+ if [ "$#" -gt 1 ] || { [ "$#" -eq 1 ] && [ "$1" != --fix ]; }; then
42
+ echo "usage: review.sh slow [--fix]" >&2
43
+ exit 2
44
+ fi
45
+ echo "review.sh slow: building the sandbox image and probing every model - this can take several minutes" >&2
46
+ printf '\n--- zen check %s(sandbox build + model probes) ---\n' "${1:+$1 }"
47
+ exec node "$RECEIPT" run full "$@"
48
+ fi
35
49
  if [ "${1:-}" = --skip-check ]; then
36
50
  REUSE=1
37
51
  shift
@@ -42,7 +56,7 @@ case "${1:-full}" in
42
56
  no-sandbox) CHECK_FLAGS="--no-sandbox" ;;
43
57
  fast) CHECK_FLAGS="--no-models --no-sandbox" ;;
44
58
  *)
45
- echo "usage: review.sh [check|--skip-check] [full|no-sandbox|fast] [--fix (check only)]" >&2
59
+ echo "usage: review.sh [fast|slow [--fix]|full] | [check|--skip-check] [full|no-sandbox|fast] [--fix (check only)]" >&2
46
60
  exit 2
47
61
  ;;
48
62
  esac
@@ -67,27 +81,28 @@ step() {
67
81
  printf '\n--- %s ---\n' "$1"
68
82
  }
69
83
 
70
- step 'zen check'
84
+ CHECK_CMD="zen check${CHECK_FLAGS:+ $CHECK_FLAGS}"
85
+ step "$CHECK_CMD"
71
86
  if [ "$REUSE" -eq 1 ]; then
72
87
  node "$RECEIPT" verify "${1:-full}"
73
88
  rc=$?
74
- verdict 'zen check' "receipt exit $rc" "$rc"
89
+ verdict "$CHECK_CMD" "receipt exit $rc" "$rc"
75
90
  elif command -v zen >/dev/null 2>&1; then
76
91
  # Unquoted on purpose: empty means no flags rather than one empty argument.
77
92
  # shellcheck disable=SC2086
78
93
  zen check $CHECK_FLAGS
79
94
  rc=$?
80
95
  if [ "$rc" -eq 0 ]; then
81
- verdict 'zen check' 'ok' 0
96
+ verdict "$CHECK_CMD" 'ok' 0
82
97
  else
83
- verdict 'zen check' "exit $rc — nothing below matters until this passes" 1
98
+ verdict "$CHECK_CMD" "exit $rc - nothing below matters until this passes" 1
84
99
  fi
85
100
  else
86
- echo "zen is not on PATH — install it, or run the other two alone"
87
- verdict 'zen check' 'not run' 1
101
+ echo "zen is not on PATH - install it, or run check-paths.sh alone"
102
+ verdict "$CHECK_CMD" 'not run' 1
88
103
  fi
89
104
 
90
- step 'paths'
105
+ step 'paths (check-paths.sh)'
91
106
  "$SKILLS/zen-review/scripts/check-paths.sh"
92
107
  rc=$?
93
108
  if [ "$rc" -eq 0 ]; then
@@ -96,23 +111,34 @@ else
96
111
  verdict 'paths' 'candidates to explain or fix' 1
97
112
  fi
98
113
 
99
- step 'spec-sync'
100
- if [ -f SPECIFICATION.md ]; then
101
- # `status` reports a tampered baseline rather than failing on one, so the
102
- # verdict has to read what it said.
103
- state="$("$SKILLS/zen-spec-sync/scripts/snapshot.sh" status)"
114
+ step 'setup (scripts/_setup.sh --check)'
115
+ if [ -f scripts/_setup.sh ]; then
116
+ bash scripts/_setup.sh --check
104
117
  rc=$?
105
- printf '%s\n' "$state"
106
- if [ "$rc" -ne 0 ]; then
107
- verdict 'spec-sync' "exit $rc" 1
108
- elif printf '%s' "$state" | grep -q 'mode: tampered'; then
109
- verdict 'spec-sync' 'the baseline does not match its own manifest' 1
118
+ if [ "$rc" -eq 0 ]; then
119
+ verdict 'setup' 'ok' 0
120
+ else
121
+ verdict 'setup' 'not done - run scripts/_setup.sh to build what is missing (indexes, generated files)' 1
122
+ fi
123
+ else
124
+ echo "no scripts/_setup.sh - this project builds nothing before it runs"
125
+ verdict 'setup' 'not applicable' 0
126
+ fi
127
+
128
+ step 'sandbox (changes since the last commit)'
129
+ if [ -d sandbox ] && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
130
+ changed="$(git status --porcelain -- sandbox 2>/dev/null)"
131
+ if [ -n "$changed" ]; then
132
+ printf '%s\n' "$changed"
133
+ # A hint, not a failure: the files may be fine, the image is what is behind.
134
+ verdict 'sandbox' 'sandbox/ changed - run review.sh slow to prove it builds, then zen sandbox pull to rebuild the image runs use' 0
110
135
  else
111
- verdict 'spec-sync' "$(printf '%s' "$state" | sed -n 's/^mode: /mode /p')" 0
136
+ echo "sandbox/ unchanged since the last commit"
137
+ verdict 'sandbox' 'unchanged' 0
112
138
  fi
113
139
  else
114
- echo "no SPECIFICATION.md — this project keeps no spec-sync record"
115
- verdict 'spec-sync' 'not applicable' 0
140
+ echo "no sandbox/ under version control - nothing to compare"
141
+ verdict 'sandbox' 'not applicable' 0
116
142
  fi
117
143
 
118
144
  step 'summary'
@@ -1,6 +0,0 @@
1
- import { type Candidate } from '../candidates.ts';
2
- import type { Command } from '../command.ts';
3
- export declare const meta: Command;
4
- /** `args` is what came after `meta`, without the word being completed. */
5
- export declare function completeMeta(args: readonly string[], cur: string, cwd: string): Promise<Candidate[]>;
6
- //# sourceMappingURL=meta.d.ts.map