nex-code 0.4.30 → 0.4.32
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/benchmark.js +1235 -0
- package/dist/nex-code.js +473 -473
- package/dist/skills/autoresearch.js +12 -8
- package/package.json +2 -2
|
@@ -133,14 +133,18 @@ module.exports = {
|
|
|
133
133
|
When the user starts an autoresearch loop with /autoresearch <goal>, follow this cycle:
|
|
134
134
|
|
|
135
135
|
1. **Setup branch** using skill_ar_setup_branch to create a dedicated autoresearch/<tag> branch
|
|
136
|
-
2. **Baseline**: run
|
|
136
|
+
2. **Baseline**: run the measurement command with skill_ar_run_experiment, then use skill_ar_extract_metric with the metric_pattern that matches the output (e.g. {"runtime_ms": "runtime_ms:\\\\s*([\\\\d.]+)"})
|
|
137
137
|
3. **Hypothesize** a specific, small change to ONE file
|
|
138
138
|
4. **Commit checkpoint** using skill_ar_checkpoint before making changes
|
|
139
139
|
5. **Edit** the code — make the change immediately, do not investigate further
|
|
140
|
-
6. **Run experiment** using skill_ar_run_experiment with the
|
|
141
|
-
7. **
|
|
142
|
-
8. **
|
|
143
|
-
9. **
|
|
140
|
+
6. **Run experiment** using skill_ar_run_experiment with the SAME measurement command and output_file
|
|
141
|
+
7. **Extract metric** using skill_ar_extract_metric with the SAME pattern as baseline
|
|
142
|
+
8. **Log result** using skill_ar_log_experiment with the measured metric value
|
|
143
|
+
9. **Decide**:
|
|
144
|
+
- If metric IMPROVED: keep the change, move to next experiment
|
|
145
|
+
- If metric SAME or WORSE: call skill_ar_revert IMMEDIATELY, then move to next experiment
|
|
146
|
+
- You MUST call skill_ar_revert for every failed experiment — never skip the revert
|
|
147
|
+
10. **Repeat** from step 3 — do NOT stop unless the user interrupts
|
|
144
148
|
|
|
145
149
|
## CRITICAL: Move Fast, Investigate Less
|
|
146
150
|
|
|
@@ -179,10 +183,10 @@ Use ar_run_experiment with output_file to redirect, then ar_extract_metric to re
|
|
|
179
183
|
- Always create a checkpoint before making changes
|
|
180
184
|
- Always run the experiment after editing
|
|
181
185
|
- Always log the result (even failures and crashes)
|
|
182
|
-
-
|
|
183
|
-
- NEVER STOP: keep running experiments until the user interrupts — they may be away
|
|
186
|
+
- **ALWAYS call skill_ar_revert when metric does not improve** — this is mandatory, not optional. A "discard" without revert leaves broken code in the working tree
|
|
187
|
+
- NEVER STOP: keep running experiments until the user interrupts — they may be away. Do not print summary tables mid-loop. Do not say "I'll stop now". Just keep experimenting.
|
|
184
188
|
- If you run out of ideas, re-read the code for new angles, try combining previous near-misses, or try more radical changes
|
|
185
|
-
-
|
|
189
|
+
- Do NOT print summary tables during the loop — the user can check /ar-status anytime. Focus on running experiments, not reporting.`,
|
|
186
190
|
|
|
187
191
|
commands: [
|
|
188
192
|
{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nex-code",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.32",
|
|
4
4
|
"description": "Run 400B+ open coding models on your codebase without the hardware bill. Ollama Cloud first — OpenAI, Anthropic, and Gemini when you need them.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"nex-code": "./dist/nex-code.js"
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"scripts": {
|
|
18
18
|
"start": "node dist/nex-code.js",
|
|
19
|
-
"build": "esbuild bin/nex-code.js --bundle --platform=node --target=node18 --outfile=dist/nex-code.js --minify --external:axios --external:dotenv --external:playwright && rm -rf dist/skills && cp -r cli/skills dist/skills",
|
|
19
|
+
"build": "esbuild bin/nex-code.js --bundle --platform=node --target=node18 --outfile=dist/nex-code.js --minify --external:axios --external:dotenv --external:playwright && esbuild cli/benchmark.js --bundle --platform=node --target=node18 --outfile=dist/benchmark.js --minify --external:axios --external:dotenv --external:playwright && rm -rf dist/skills && cp -r cli/skills dist/skills",
|
|
20
20
|
"dev": "esbuild bin/nex-code.js --bundle --platform=node --target=node18 --outfile=dist/nex-code.js --external:axios --external:dotenv --external:playwright --watch",
|
|
21
21
|
"test": "jest --forceExit",
|
|
22
22
|
"test:orchestrator": "jest tests/orchestrator.test.js --forceExit",
|