@interf/compiler 0.3.0 → 0.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.
- package/README.md +120 -83
- package/dist/bin.js +3 -3
- package/dist/bin.js.map +1 -1
- package/dist/commands/compile.d.ts +11 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +216 -70
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create-workflow-wizard.d.ts.map +1 -1
- package/dist/commands/create-workflow-wizard.js +17 -8
- package/dist/commands/create-workflow-wizard.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +44 -45
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/default.d.ts.map +1 -1
- package/dist/commands/default.js +27 -31
- package/dist/commands/default.js.map +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/executor-flow.d.ts +11 -0
- package/dist/commands/executor-flow.d.ts.map +1 -0
- package/dist/commands/executor-flow.js +104 -0
- package/dist/commands/executor-flow.js.map +1 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +374 -64
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +1 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/reset.d.ts.map +1 -1
- package/dist/commands/reset.js +2 -18
- package/dist/commands/reset.js.map +1 -1
- package/dist/commands/source-config-wizard.d.ts +6 -7
- package/dist/commands/source-config-wizard.d.ts.map +1 -1
- package/dist/commands/source-config-wizard.js +151 -78
- package/dist/commands/source-config-wizard.js.map +1 -1
- package/dist/commands/test-flow.d.ts +22 -0
- package/dist/commands/test-flow.d.ts.map +1 -0
- package/dist/commands/test-flow.js +129 -0
- package/dist/commands/test-flow.js.map +1 -0
- package/dist/commands/test.d.ts +4 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +133 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +7 -3
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/workspace-flow.d.ts +21 -0
- package/dist/commands/workspace-flow.d.ts.map +1 -0
- package/dist/commands/workspace-flow.js +90 -0
- package/dist/commands/workspace-flow.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-detection.js +4 -4
- package/dist/lib/agent-detection.js.map +1 -1
- package/dist/lib/agent-skills.js +6 -6
- package/dist/lib/agent-skills.js.map +1 -1
- package/dist/lib/benchmark-execution.d.ts.map +1 -1
- package/dist/lib/benchmark-execution.js +39 -17
- package/dist/lib/benchmark-execution.js.map +1 -1
- package/dist/lib/benchmark-sandbox.d.ts +10 -0
- package/dist/lib/benchmark-sandbox.d.ts.map +1 -0
- package/dist/lib/benchmark-sandbox.js +75 -0
- package/dist/lib/benchmark-sandbox.js.map +1 -0
- package/dist/lib/benchmark-targets.d.ts +1 -0
- package/dist/lib/benchmark-targets.d.ts.map +1 -1
- package/dist/lib/benchmark-targets.js +12 -0
- package/dist/lib/benchmark-targets.js.map +1 -1
- package/dist/lib/benchmark-types.d.ts +1 -1
- package/dist/lib/benchmark-types.d.ts.map +1 -1
- package/dist/lib/benchmark.d.ts +1 -1
- package/dist/lib/benchmark.d.ts.map +1 -1
- package/dist/lib/benchmark.js +1 -1
- package/dist/lib/benchmark.js.map +1 -1
- package/dist/lib/interf-scaffold.d.ts.map +1 -1
- package/dist/lib/interf-scaffold.js +2 -1
- package/dist/lib/interf-scaffold.js.map +1 -1
- package/dist/lib/interf-workflow-package.d.ts.map +1 -1
- package/dist/lib/interf-workflow-package.js +7 -2
- package/dist/lib/interf-workflow-package.js.map +1 -1
- package/dist/lib/local-workflows.d.ts.map +1 -1
- package/dist/lib/local-workflows.js +24 -8
- package/dist/lib/local-workflows.js.map +1 -1
- package/dist/lib/runtime-contracts.d.ts +3 -1
- package/dist/lib/runtime-contracts.d.ts.map +1 -1
- package/dist/lib/runtime-contracts.js +115 -0
- package/dist/lib/runtime-contracts.js.map +1 -1
- package/dist/lib/runtime-reconcile.d.ts +2 -1
- package/dist/lib/runtime-reconcile.d.ts.map +1 -1
- package/dist/lib/runtime-reconcile.js +71 -15
- package/dist/lib/runtime-reconcile.js.map +1 -1
- package/dist/lib/runtime-runs.js +12 -3
- package/dist/lib/runtime-runs.js.map +1 -1
- package/dist/lib/runtime-types.d.ts +11 -0
- package/dist/lib/runtime-types.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts +1 -1
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/runtime.js.map +1 -1
- package/dist/lib/schema.d.ts +36 -9
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +29 -7
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/source-config.d.ts +4 -1
- package/dist/lib/source-config.d.ts.map +1 -1
- package/dist/lib/source-config.js +23 -4
- package/dist/lib/source-config.js.map +1 -1
- package/dist/lib/state-health.d.ts +2 -2
- package/dist/lib/state-health.d.ts.map +1 -1
- package/dist/lib/state-health.js +34 -19
- package/dist/lib/state-health.js.map +1 -1
- package/dist/lib/state-io.d.ts.map +1 -1
- package/dist/lib/state-io.js +6 -0
- package/dist/lib/state-io.js.map +1 -1
- package/dist/lib/validate-workspace.d.ts +41 -0
- package/dist/lib/validate-workspace.d.ts.map +1 -1
- package/dist/lib/validate-workspace.js +152 -4
- package/dist/lib/validate-workspace.js.map +1 -1
- package/dist/lib/validate.d.ts +2 -2
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +17 -2
- package/dist/lib/validate.js.map +1 -1
- package/dist/lib/workflow-definitions.d.ts.map +1 -1
- package/dist/lib/workflow-definitions.js +42 -20
- package/dist/lib/workflow-definitions.js.map +1 -1
- package/dist/lib/workflow-helpers.d.ts.map +1 -1
- package/dist/lib/workflow-helpers.js +4 -2
- package/dist/lib/workflow-helpers.js.map +1 -1
- package/dist/lib/workflows.d.ts +2 -2
- package/dist/lib/workflows.d.ts.map +1 -1
- package/dist/lib/workflows.js +3 -1
- package/dist/lib/workflows.js.map +1 -1
- package/dist/lib/workspace-compile.d.ts +4 -3
- package/dist/lib/workspace-compile.d.ts.map +1 -1
- package/dist/lib/workspace-compile.js +199 -100
- package/dist/lib/workspace-compile.js.map +1 -1
- package/dist/lib/workspace-reset.d.ts +2 -0
- package/dist/lib/workspace-reset.d.ts.map +1 -0
- package/dist/lib/workspace-reset.js +21 -0
- package/dist/lib/workspace-reset.js.map +1 -0
- package/package.json +1 -1
- package/skills/benchmark/SKILL.md +4 -3
- package/skills/workflow/create/SKILL.md +4 -1
- package/skills/workspace/shape/SKILL.md +15 -0
- package/skills/workspace/structure/SKILL.md +15 -0
- package/skills/workspace/summarize/SKILL.md +15 -0
- package/dist/commands/benchmark.d.ts +0 -3
- package/dist/commands/benchmark.d.ts.map +0 -1
- package/dist/commands/benchmark.js +0 -83
- package/dist/commands/benchmark.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
# Interf
|
|
2
2
|
|
|
3
|
-
Open-source knowledge compiler for
|
|
3
|
+
Open-source knowledge compiler for local agents.
|
|
4
4
|
|
|
5
5
|
Interf measures and improves how accurately local agents answer questions from your files.
|
|
6
6
|
|
|
7
7
|
If you use Claude Code, Codex, OpenClaw, Hermes, or your own local agent setup on folders full of PDFs, docs, spreadsheets, and notes, the failure often shows up late: missed evidence, shallow analysis, bad comparisons, or answers that sound confident but are wrong.
|
|
8
8
|
|
|
9
|
-
Interf lets you
|
|
9
|
+
Interf lets you define a few checks over your files, measure the raw baseline first if you want it, compile a workspace on top of those files, and see whether the result actually passes.
|
|
10
10
|
|
|
11
11
|
- your files stay on your machine
|
|
12
12
|
- you choose the local agent
|
|
13
13
|
- your raw files stay the source of truth
|
|
14
14
|
- Interf adds a file-based layer on top
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
`interf compile` runs a local data-processing pipeline with your agents as executors and produces a compiled workspace: a file-based layer on top of your raw files that agents can navigate, inspect, and work from.
|
|
17
|
+
|
|
18
|
+
In the advanced looped mode, Interf can keep rerunning that pipeline, testing the result, and trying improved preparation attempts until it finds the best-performing workspace within the attempt budget.
|
|
17
19
|
|
|
18
20
|
## Quick Start
|
|
19
21
|
|
|
@@ -28,7 +30,14 @@ Install:
|
|
|
28
30
|
npm install -g @interf/compiler
|
|
29
31
|
```
|
|
30
32
|
|
|
31
|
-
|
|
33
|
+
The quickest start is the wizard:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
cd ~/my-folder
|
|
37
|
+
interf
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
If you want to see the config shape first, this is what Interf writes:
|
|
32
41
|
|
|
33
42
|
```json
|
|
34
43
|
{
|
|
@@ -36,6 +45,9 @@ Start by writing a few questions and expected answers in `interf.config.json`:
|
|
|
36
45
|
{
|
|
37
46
|
"name": "default",
|
|
38
47
|
"about": "General compiled workspace for the quarterly results folder.",
|
|
48
|
+
"retry_policy": {
|
|
49
|
+
"max_attempts": 3
|
|
50
|
+
},
|
|
39
51
|
"checks": [
|
|
40
52
|
{
|
|
41
53
|
"question": "What full-year revenue range did the company maintain?",
|
|
@@ -51,23 +63,36 @@ Start by writing a few questions and expected answers in `interf.config.json`:
|
|
|
51
63
|
}
|
|
52
64
|
```
|
|
53
65
|
|
|
54
|
-
|
|
66
|
+
The root-level flow is:
|
|
55
67
|
|
|
56
68
|
```bash
|
|
57
|
-
|
|
58
|
-
interf init
|
|
59
|
-
interf create workspace
|
|
69
|
+
interf
|
|
60
70
|
interf compile
|
|
61
|
-
interf
|
|
71
|
+
interf test
|
|
62
72
|
```
|
|
63
73
|
|
|
64
|
-
|
|
74
|
+
The first guided run can:
|
|
75
|
+
|
|
76
|
+
- save a few questions and expected answers for this folder
|
|
77
|
+
- run a baseline test on the raw files
|
|
78
|
+
- compile the workspace
|
|
79
|
+
- optionally keep compiling and retesting until it passes or reaches the attempt limit
|
|
80
|
+
- run the same test against the compiled workspace
|
|
81
|
+
|
|
82
|
+
That gives you three concrete things:
|
|
65
83
|
|
|
66
84
|
- `interf/workspaces/default/` with the compiled workspace for your files
|
|
67
|
-
- `interf/benchmarks/runs/...` with the saved
|
|
85
|
+
- `interf/benchmarks/runs/...` with the saved test result
|
|
68
86
|
- a pass/fail score on the same questions and expected answers you wrote
|
|
69
87
|
|
|
70
|
-
|
|
88
|
+
Saved test runs keep the details you need later:
|
|
89
|
+
|
|
90
|
+
- whether the run tested `raw`, `workspace`, or both
|
|
91
|
+
- per-question pass/fail results
|
|
92
|
+
- the saved run path under `interf/benchmarks/runs/...`
|
|
93
|
+
- executor metadata such as agent, command, model, effort, and profile when available
|
|
94
|
+
|
|
95
|
+
If `interf.config.json` is missing, `interf` or `interf init` can draft it with you before the first compile. If Interf cannot find your local agent or compile setup, run:
|
|
71
96
|
|
|
72
97
|
```bash
|
|
73
98
|
interf doctor
|
|
@@ -76,10 +101,11 @@ interf doctor
|
|
|
76
101
|
The first flow is:
|
|
77
102
|
|
|
78
103
|
- write down a few questions your agent should be able to answer from your files
|
|
79
|
-
- let `interf init` save those checks in `interf.config.json`
|
|
80
|
-
- run
|
|
81
|
-
- run `interf
|
|
82
|
-
-
|
|
104
|
+
- let `interf` or `interf init` save those checks in `interf.config.json`
|
|
105
|
+
- optionally run a baseline test on the raw files
|
|
106
|
+
- run `interf compile` to build the compiled workspace
|
|
107
|
+
- run `interf test` to test the raw files, the compiled workspace, or both
|
|
108
|
+
- only create another workspace if you want a separate compiled setup with its own checks
|
|
83
109
|
- if needed, rerun compile or use the advanced retry path until it is good enough
|
|
84
110
|
|
|
85
111
|
## Why This Approach
|
|
@@ -98,27 +124,26 @@ Sample flow:
|
|
|
98
124
|
```bash
|
|
99
125
|
cp -r examples/benchmark-demo /tmp/interf-demo
|
|
100
126
|
cd /tmp/interf-demo
|
|
101
|
-
interf
|
|
102
|
-
interf create workspace
|
|
127
|
+
interf
|
|
103
128
|
interf compile
|
|
104
|
-
interf
|
|
129
|
+
interf test
|
|
105
130
|
```
|
|
106
131
|
|
|
107
|
-
## Start With
|
|
132
|
+
## Start With Your Own Checks
|
|
133
|
+
|
|
134
|
+
Start with your own checks over the files: questions where you already know the correct answer from the dataset.
|
|
108
135
|
|
|
109
|
-
`interf.config.json` is where you
|
|
136
|
+
`interf.config.json` is where you save those checks for a folder.
|
|
110
137
|
|
|
111
138
|
That file uses one `workspaces` array:
|
|
112
139
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
140
|
+
- most folders only need one workspace
|
|
141
|
+
- add another workspace only if you want a separate compiled setup with different checks
|
|
115
142
|
- each workspace carries its own `checks`
|
|
143
|
+
- each workspace can optionally carry `retry_policy.max_attempts` for the self-improving compile loop
|
|
116
144
|
|
|
117
145
|
If the file is missing, `interf init` can draft it with you before the first compile. You can edit it any time.
|
|
118
146
|
|
|
119
|
-
That example is just `interf.config.json`.
|
|
120
|
-
Advanced retry settings do not live there.
|
|
121
|
-
|
|
122
147
|
Good first checks are small and practical:
|
|
123
148
|
|
|
124
149
|
- one exact number from a chart, table, or filing
|
|
@@ -128,26 +153,34 @@ Good first checks are small and practical:
|
|
|
128
153
|
Then run:
|
|
129
154
|
|
|
130
155
|
```bash
|
|
131
|
-
interf create workspace
|
|
132
156
|
interf compile
|
|
133
|
-
interf
|
|
157
|
+
interf test
|
|
134
158
|
```
|
|
135
159
|
|
|
136
|
-
## What `interf
|
|
160
|
+
## What `interf test` Does
|
|
137
161
|
|
|
138
|
-
`interf
|
|
162
|
+
`interf test` scores either the raw files, a compiled workspace, or both on the same saved checks.
|
|
139
163
|
|
|
140
164
|
It lets you answer a simple question:
|
|
141
165
|
|
|
142
|
-
-
|
|
166
|
+
- what is the current baseline on the raw files?
|
|
167
|
+
- does this compiled workspace improve on that baseline?
|
|
143
168
|
- which compiled workspace or workflow performs better on the same folder?
|
|
144
|
-
- does
|
|
169
|
+
- does a separate workspace with different checks work better for that job?
|
|
170
|
+
|
|
171
|
+
By default it loads checks from `interf.config.json`, can run a raw baseline in an isolated raw-files sandbox, can test eligible compiled workspaces under `interf/workspaces/`, and saves the run under `interf/benchmarks/runs/`.
|
|
172
|
+
|
|
173
|
+
Each saved run includes:
|
|
145
174
|
|
|
146
|
-
|
|
175
|
+
- the benchmark target and mode
|
|
176
|
+
- per-question results and traces
|
|
177
|
+
- the executor metadata for that run
|
|
147
178
|
|
|
148
|
-
If you run `interf
|
|
179
|
+
If you run `interf test` from inside a workspace, it uses that workspace's checks and tests that workspace. If you run it from the source folder, it lets you choose a saved workspace and then choose raw files, the compiled workspace, or both.
|
|
149
180
|
|
|
150
|
-
|
|
181
|
+
Live test runs use an isolated sandbox. For raw baselines, Interf gives the agent sanitized raw files only. For compiled-workspace tests, it gives the agent a copied workspace plus sanitized raw files. The source-folder control plane, `interf.config.json`, and saved test runs are not part of those sandboxes.
|
|
182
|
+
|
|
183
|
+
If you need repeated isolated experiments across workflows or models, use the advanced eval-pack runner in [docs/eval-loop.md](./docs/eval-loop.md).
|
|
151
184
|
|
|
152
185
|
## What `interf compile` Does
|
|
153
186
|
|
|
@@ -155,30 +188,35 @@ If you need raw-file probes too, use the advanced eval-pack runner in [docs/eval
|
|
|
155
188
|
|
|
156
189
|
By default, that means:
|
|
157
190
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
191
|
+
- summarize the source files into per-file evidence notes
|
|
192
|
+
- structure the cross-file knowledge layer into entities, claims, and indexes
|
|
193
|
+
- shape the final workspace around its saved focus and questions
|
|
194
|
+
|
|
195
|
+
In other words, the built-in workflow is:
|
|
196
|
+
|
|
197
|
+
1. `summarize`
|
|
198
|
+
2. `structure`
|
|
199
|
+
3. `shape`
|
|
163
200
|
|
|
164
201
|
In public docs, `pipeline` is the thing Interf runs. `workflow` is the saved method that defines or customizes that pipeline.
|
|
165
202
|
|
|
166
203
|
The default workflow is built in. If you want a different method, you can define your own workflow package and benchmark it on the same folder.
|
|
167
204
|
|
|
205
|
+
If a workspace has `retry_policy.max_attempts`, or if you run `interf compile --max-attempts <n>`, Interf can keep compiling, testing, and retrying until that workspace passes or reaches the attempt limit. If several attempts fail, Interf keeps the best-performing compiled workspace from that run.
|
|
206
|
+
|
|
168
207
|
## What Gets Created
|
|
169
208
|
|
|
170
209
|
After compile, Interf writes into `./interf/` beside your source files.
|
|
171
210
|
|
|
172
211
|
- `interf/workspaces/<name>/` is a compiled workspace over the folder
|
|
173
|
-
- `interf/benchmarks/runs/...` stores saved
|
|
212
|
+
- `interf/benchmarks/runs/...` stores saved test runs
|
|
174
213
|
|
|
175
214
|
Inside those workspaces you will see things like:
|
|
176
215
|
|
|
177
216
|
- summaries of source files
|
|
178
217
|
- navigation notes and entrypoints for agents
|
|
179
218
|
- cross-file knowledge notes
|
|
180
|
-
- workspace-specific outputs
|
|
181
|
-
- benchmark artifacts you can inspect later
|
|
219
|
+
- workspace-specific outputs when you define a separate job-focused workspace
|
|
182
220
|
|
|
183
221
|
The compiled workspace is just a normal folder. Open it in your editor, in your agent, or in Obsidian if you want the graph view.
|
|
184
222
|
|
|
@@ -191,59 +229,56 @@ Public terms:
|
|
|
191
229
|
- `your files` = the source folder Interf reads from
|
|
192
230
|
- `questions and expected answers` = the checks you want your agent to pass
|
|
193
231
|
- `checks` = the pass/fail questions each workspace should satisfy
|
|
194
|
-
- `
|
|
232
|
+
- `test` = run the saved questions and get a score
|
|
195
233
|
- `compiled workspace` = the output Interf produces on top of a folder
|
|
196
|
-
- `workspace` =
|
|
234
|
+
- `workspace` = one compiled setup with its own checks
|
|
197
235
|
|
|
198
236
|
Technical terms:
|
|
199
237
|
|
|
200
238
|
- `source folder` = the raw files Interf reads from
|
|
239
|
+
- `benchmark` = the technical alias and saved-run layer behind `interf test`
|
|
201
240
|
- `workflow` = the saved method that defines or customizes the pipeline
|
|
202
241
|
- `.interf/` = runtime state, proofs, and health artifacts
|
|
203
242
|
|
|
204
|
-
## Advanced:
|
|
205
|
-
|
|
206
|
-
Start with the default compiled workspace first.
|
|
207
|
-
|
|
208
|
-
Most folders only need one compiled workspace.
|
|
209
|
-
|
|
210
|
-
Create another workspace only when one recurring context needs a narrower setup.
|
|
211
|
-
|
|
212
|
-
Use the default compiled workspace for broad questions such as:
|
|
243
|
+
## Advanced: Separate Workspaces
|
|
213
244
|
|
|
214
|
-
|
|
215
|
-
- what changed?
|
|
216
|
-
- where is the source evidence?
|
|
245
|
+
Most folders only need one workspace.
|
|
217
246
|
|
|
218
|
-
Create another
|
|
247
|
+
Create another only when you want a different compiled setup with different checks, for example:
|
|
219
248
|
|
|
220
|
-
-
|
|
221
|
-
- board prep
|
|
249
|
+
- general folder understanding
|
|
222
250
|
- finance reporting
|
|
251
|
+
- board prep
|
|
223
252
|
- diligence review
|
|
224
|
-
- chart extraction for a report set
|
|
225
|
-
- one recurring research set
|
|
226
253
|
|
|
227
|
-
Why create one:
|
|
254
|
+
Why create another one:
|
|
228
255
|
|
|
229
|
-
- it
|
|
230
|
-
- it
|
|
231
|
-
- it lets you
|
|
232
|
-
|
|
233
|
-
If the default compiled workspace is already enough, do not create another workspace yet.
|
|
256
|
+
- it keeps a separate set of questions and expected answers
|
|
257
|
+
- it gives that job its own compiled output under `interf/workspaces/<name>/`
|
|
258
|
+
- it lets you test that job separately
|
|
234
259
|
|
|
235
260
|
## Advanced: Keep Improving Until It Passes
|
|
236
261
|
|
|
237
|
-
Interf also supports
|
|
262
|
+
Interf also supports a deeper loop above the normal compile + test flow.
|
|
263
|
+
|
|
264
|
+
The normal workspace flow already supports `retry_policy.max_attempts` inside `interf.config.json` or `interf compile --max-attempts <n>`.
|
|
238
265
|
|
|
239
|
-
Give it the same folder and the same checks. Interf can keep rerunning compile +
|
|
266
|
+
Give it the same folder and the same checks. Interf can keep rerunning compile + test attempts until the test passes or the attempt budget runs out.
|
|
267
|
+
|
|
268
|
+
That loop is the self-improving part of the product:
|
|
269
|
+
|
|
270
|
+
- it reruns the local data-processing pipeline over the same files
|
|
271
|
+
- it keeps the checks fixed, so the target does not move
|
|
272
|
+
- it can vary the compile profile and follow-up diagnostics
|
|
273
|
+
- it records which attempt performed best on the same saved test
|
|
240
274
|
|
|
241
275
|
In practice:
|
|
242
276
|
|
|
243
|
-
- `retry_policy.
|
|
277
|
+
- `retry_policy.max_attempts` controls how many total attempts a normal workspace compile gets
|
|
278
|
+
- `retry_policy.max_attempts_per_profile` controls how many attempts each compile profile gets in eval packs
|
|
244
279
|
- stronger diagnostic profiles can be used only after the default ones fail
|
|
245
280
|
- the checks stay the same across every attempt
|
|
246
|
-
- each attempt records what changed
|
|
281
|
+
- each attempt records what changed and which attempt performed best
|
|
247
282
|
|
|
248
283
|
Example eval-pack shape:
|
|
249
284
|
|
|
@@ -252,6 +287,9 @@ Example eval-pack shape:
|
|
|
252
287
|
"workspaces": [
|
|
253
288
|
{
|
|
254
289
|
"name": "default",
|
|
290
|
+
"retry_policy": {
|
|
291
|
+
"max_attempts": 3
|
|
292
|
+
},
|
|
255
293
|
"checks": [
|
|
256
294
|
{
|
|
257
295
|
"question": "What full-year revenue range did the company maintain?",
|
|
@@ -260,16 +298,13 @@ Example eval-pack shape:
|
|
|
260
298
|
]
|
|
261
299
|
}
|
|
262
300
|
],
|
|
263
|
-
// Advanced only: retry settings live in eval packs, not in interf.config.json.
|
|
264
301
|
"retry_policy": {
|
|
265
302
|
"max_attempts_per_profile": 3
|
|
266
303
|
}
|
|
267
304
|
}
|
|
268
305
|
```
|
|
269
306
|
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
Use the normal benchmark flow first. Use this advanced path when you want Interf to keep improving the local preparation workflow until the workspace is good enough for your task or the attempt budget runs out. It spends more tokens, so use it when that extra spend is worth the accuracy target.
|
|
307
|
+
Use the normal workspace retry loop first. Use the eval-pack path when you want Interf to compare multiple compile profiles, add diagnostics, or keep iterating in a more controlled experiment loop. It spends more tokens, so use it when that extra spend is worth the accuracy target.
|
|
273
308
|
|
|
274
309
|
## Use It With Your Agent
|
|
275
310
|
|
|
@@ -278,11 +313,11 @@ If you already work through Claude Code, Codex, OpenClaw, or Hermes, the agent c
|
|
|
278
313
|
Paste something like this into your agent:
|
|
279
314
|
|
|
280
315
|
```text
|
|
281
|
-
Install @interf/compiler, run `interf
|
|
316
|
+
Install @interf/compiler, run `interf` in this folder, and use the local agent executor.
|
|
282
317
|
|
|
283
|
-
If `interf.config.json` is missing, draft
|
|
318
|
+
If `interf.config.json` is missing, draft one workspace with a few checks this agent should be able to answer from these files and add the expected answers for me to confirm.
|
|
284
319
|
|
|
285
|
-
Then run
|
|
320
|
+
Then run a raw baseline if helpful, compile the workspace, and run `interf test`.
|
|
286
321
|
|
|
287
322
|
Tell me whether the compiled workspace passes the checks, and only recommend it if it does.
|
|
288
323
|
```
|
|
@@ -304,11 +339,13 @@ Workflow package docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
|
|
|
304
339
|
|
|
305
340
|
## Core Commands
|
|
306
341
|
|
|
307
|
-
- `interf
|
|
308
|
-
- `interf
|
|
342
|
+
- `interf` = open the root-folder wizard
|
|
343
|
+
- `interf init` = alias for the root-folder wizard
|
|
344
|
+
- `interf create workspace` = create another compiled workspace when you need one
|
|
309
345
|
- `interf create workflow` = create a reusable local workflow package
|
|
310
|
-
- `interf compile` = build the current
|
|
311
|
-
- `interf
|
|
346
|
+
- `interf compile` = build a selected workspace for the current folder
|
|
347
|
+
- `interf test` = test the raw files, a compiled workspace, or both on saved checks
|
|
348
|
+
- `interf benchmark` = alias for `interf test`
|
|
312
349
|
- `interf doctor` = check local executor setup
|
|
313
350
|
- `interf verify <check>` = run deterministic checks on major workflow steps
|
|
314
351
|
- `interf reset <scope>` = remove generated state while keeping source files
|
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@ import { hideBin } from "yargs/helpers";
|
|
|
4
4
|
import { initCommand } from "./commands/init.js";
|
|
5
5
|
import { createCommand } from "./commands/create.js";
|
|
6
6
|
import { compileCommand } from "./commands/compile.js";
|
|
7
|
-
import {
|
|
7
|
+
import { testCommand } from "./commands/test.js";
|
|
8
8
|
import { doctorCommand } from "./commands/doctor.js";
|
|
9
9
|
import { listCommand } from "./commands/list.js";
|
|
10
10
|
import { statusCommand } from "./commands/status.js";
|
|
@@ -15,9 +15,9 @@ yargs(hideBin(process.argv))
|
|
|
15
15
|
.scriptName("interf")
|
|
16
16
|
.command(defaultCommand)
|
|
17
17
|
.command(initCommand)
|
|
18
|
-
.command(createCommand)
|
|
19
18
|
.command(compileCommand)
|
|
20
|
-
.command(
|
|
19
|
+
.command(testCommand)
|
|
20
|
+
.command(createCommand)
|
|
21
21
|
.command(doctorCommand)
|
|
22
22
|
.command(listCommand)
|
|
23
23
|
.command(statusCommand)
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACzB,UAAU,CAAC,QAAQ,CAAC;KACpB,OAAO,CAAC,cAAc,CAAC;KACvB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,cAAc,CAAC;KACvB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,YAAY,CAAC;KACrB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,OAAO,EAAE;KACT,KAAK,EAAE,CAAC"}
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
import type { WorkflowExecutionProfile, WorkflowExecutor } from "../lib/executors.js";
|
|
2
|
+
import type { SourceWorkspaceConfig } from "../lib/schema.js";
|
|
1
3
|
import type { CommandModule } from "yargs";
|
|
2
4
|
export declare const compileCommand: CommandModule;
|
|
5
|
+
export declare function runCompileCommand(argv?: Record<string, unknown>): Promise<void>;
|
|
6
|
+
export declare function runConfiguredWorkspaceCompile(options: {
|
|
7
|
+
executor: WorkflowExecutor;
|
|
8
|
+
workspacePath: string;
|
|
9
|
+
sourcePath: string;
|
|
10
|
+
workspaceConfig: SourceWorkspaceConfig | null;
|
|
11
|
+
executionProfile?: WorkflowExecutionProfile;
|
|
12
|
+
maxAttemptsOverride: number | null;
|
|
13
|
+
}): Promise<boolean>;
|
|
3
14
|
//# sourceMappingURL=compile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAMtF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAM9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAa3C,eAAO,MAAM,cAAc,EAAE,aAa5B,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CA+EzF;AA6CD,wBAAsB,6BAA6B,CACjD,OAAO,EAAE;IACP,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC9C,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;IAC5C,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,GACA,OAAO,CAAC,OAAO,CAAC,CA+GlB"}
|