@interf/compiler 0.6.5 → 0.6.7
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 +85 -172
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,33 +1,32 @@
|
|
|
1
1
|
# Interf
|
|
2
2
|
|
|
3
3
|
Interf prepares context for your agents.
|
|
4
|
+
Use it to check whether your files are ready for the work you want your agents to do.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
**Files alone are not automatically ready for agent work.**
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
Your agents can use it directly. Interf can check it on those same questions.
|
|
8
|
+
Coding agents now run real work from folders of PDFs, exports, notes, and transcripts. Those folders can still be missing the structure that work needs.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
A chart buried inside a market-report PDF can be obvious to a human analyst and easy for an agent to miss. Interf checks the source files first, then builds portable context when the raw files are not enough.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
`Interf Compiler` is the local, open-source runtime behind that loop. It uses your local agent to organize the files for one piece of work and build portable context next to them. `interf test` scores the source files and the portable context on the same questions.
|
|
13
13
|
|
|
14
14
|
```text
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
your-folder/
|
|
16
|
+
market-report/
|
|
17
|
+
report.pdf
|
|
18
|
+
notes.md
|
|
19
|
+
exports/
|
|
20
|
+
interf.json # saved setup and questions for this work
|
|
21
|
+
interf/
|
|
22
|
+
market-report/ # portable context your agent starts from
|
|
23
|
+
tests/
|
|
24
|
+
market-report/ # source-files vs portable-context scores
|
|
21
25
|
```
|
|
22
26
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
This repo includes a small PDF example with questions like:
|
|
27
|
+
## What a run looks like
|
|
26
28
|
|
|
27
|
-
|
|
28
|
-
- `What were Bristol's availability values in 2018 and 2016?`
|
|
29
|
-
|
|
30
|
-
On those same questions, a recent run in this repo produced:
|
|
29
|
+
A recent public run — one PDF market report, two questions, two agents on the same setup — produced:
|
|
31
30
|
|
|
32
31
|
<!-- PUBLIC_BENCHMARK_TABLE:START -->
|
|
33
32
|
| Agent | Source files | Portable context |
|
|
@@ -36,107 +35,78 @@ On those same questions, a recent run in this repo produced:
|
|
|
36
35
|
| Claude Code (Claude Opus 4.6, max) | `0/2` | `2/2` |
|
|
37
36
|
<!-- PUBLIC_BENCHMARK_TABLE:END -->
|
|
38
37
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
- Codex already passed on the source files.
|
|
42
|
-
- Claude Code needed the portable context to pass.
|
|
38
|
+
Codex passed on the raw files; Claude Code only passed after Interf prepared the portable context. Both numbers come from `interf test`, which scores the same questions against the source files and the portable context.
|
|
43
39
|
|
|
44
|
-
|
|
40
|
+
The table is a sample, not a leaderboard. Run it on your own files. If you run more than one local agent, the same pass gives you a fair comparison between them on the same files.
|
|
45
41
|
|
|
46
|
-
##
|
|
42
|
+
## The loop
|
|
47
43
|
|
|
48
|
-
1.
|
|
49
|
-
2.
|
|
50
|
-
3.
|
|
51
|
-
4.
|
|
52
|
-
5.
|
|
44
|
+
1. Drop the files for one piece of work under a folder.
|
|
45
|
+
2. Run `interf` and describe the work. Interf recommends a few questions you can verify from the files.
|
|
46
|
+
3. `interf test --target raw` scores the source files.
|
|
47
|
+
4. `interf compile` builds portable context next to the files.
|
|
48
|
+
5. `interf test` scores the portable context on the same questions.
|
|
49
|
+
6. Use whichever side did better.
|
|
53
50
|
|
|
54
|
-
|
|
51
|
+
Step 3 is optional. It is the honest first check: sometimes the files are already enough, and Interf will say so instead of building something you do not need.
|
|
55
52
|
|
|
56
|
-
##
|
|
53
|
+
## Install
|
|
57
54
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
Interf builds a local folder for that work and checks whether it helped.
|
|
63
|
-
|
|
64
|
-
Interf is built around a few simple rules:
|
|
65
|
-
|
|
66
|
-
- Start from the files you already have.
|
|
67
|
-
- Check source files and portable context on the same questions.
|
|
68
|
-
- Keep the result in a local folder you can inspect, diff, review, and version.
|
|
69
|
-
- Keep source files as the source of truth.
|
|
70
|
-
- Use the portable context manually from Claude Code, Codex, or another local agent. Automated Interf runs currently support Claude Code and Codex.
|
|
71
|
-
- If the first pass is not enough, let Interf retry the same workflow or improve the workflow itself.
|
|
72
|
-
|
|
73
|
-
## What You Get
|
|
74
|
-
|
|
75
|
-
A small project can stay simple:
|
|
76
|
-
|
|
77
|
-
```text
|
|
78
|
-
your-project/
|
|
79
|
-
task-files/
|
|
80
|
-
report.pdf
|
|
81
|
-
notes.md
|
|
82
|
-
exports/
|
|
83
|
-
interf.json
|
|
84
|
-
interf/
|
|
85
|
-
<dataset>/
|
|
86
|
-
tests/
|
|
87
|
-
<dataset>/
|
|
55
|
+
```bash
|
|
56
|
+
npm install -g @interf/compiler
|
|
57
|
+
interf # opens the setup wizard in the current folder
|
|
88
58
|
```
|
|
89
59
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
## Quick Start
|
|
60
|
+
Requires Node.js 20+ and a local coding agent such as Claude Code or Codex. Run `interf doctor --live` if the executor is not detected.
|
|
93
61
|
|
|
94
|
-
|
|
62
|
+
## Core commands
|
|
95
63
|
|
|
96
|
-
-
|
|
97
|
-
-
|
|
64
|
+
- `interf` or `interf init` — open the wizard for the current folder
|
|
65
|
+
- `interf compile` — build portable context for your agents
|
|
66
|
+
- `interf test` — score source files and portable context on the same questions
|
|
67
|
+
- `interf create workflow` — draft or copy a reusable workflow
|
|
68
|
+
- `interf create dataset` — add another piece of work to this project
|
|
69
|
+
- `interf list` — list the pieces of work in this project
|
|
70
|
+
- `interf status` — show deterministic health
|
|
71
|
+
- `interf doctor` — check the local agent executor
|
|
72
|
+
- `interf verify <check>` — deterministic verification for automation
|
|
73
|
+
- `interf reset <scope>` — reset generated state while keeping source files
|
|
98
74
|
|
|
99
|
-
|
|
75
|
+
## Portable context
|
|
100
76
|
|
|
101
|
-
|
|
102
|
-
npm install -g @interf/compiler
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
Then run Interf in a project folder that already contains the files for the work:
|
|
77
|
+
`interf/<work>/` is the folder your agent starts from when the raw files are not enough. For the built-in `interf` workflow, it includes:
|
|
106
78
|
|
|
107
|
-
```
|
|
108
|
-
interf
|
|
79
|
+
```text
|
|
80
|
+
interf/market-report/
|
|
81
|
+
AGENTS.md # how to use this folder
|
|
82
|
+
CLAUDE.md # same guidance for Claude Code
|
|
83
|
+
raw/ # snapshot of the source files for this work
|
|
84
|
+
home.md # top-level map for the work
|
|
85
|
+
summaries/ # per-file summaries
|
|
86
|
+
knowledge/ # linked notes built from the files
|
|
109
87
|
```
|
|
110
88
|
|
|
111
|
-
|
|
89
|
+
Interf builds next to the source files; it does not replace them. The portable context is a sibling folder you can version, inspect line-by-line, or hand to a different agent.
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
- let you choose the source folder for the work
|
|
115
|
-
- ask what work you need help with
|
|
116
|
-
- recommend questions to check accuracy, or let you add them manually
|
|
117
|
-
- run a source-files baseline so you can see what already works
|
|
118
|
-
- build the portable context your agents will use for that work
|
|
119
|
-
- check that portable context on the same questions
|
|
91
|
+
It carries its own `raw/` snapshot for verification. Any CLI that reads a local directory — Claude Code, Codex, your own — can work from it.
|
|
120
92
|
|
|
121
|
-
|
|
93
|
+
The method that builds the portable context is a workflow. In plain language, it is how Interf summarizes the files, extracts structure, and links notes for agent use.
|
|
122
94
|
|
|
123
|
-
|
|
124
|
-
interf doctor --live
|
|
125
|
-
```
|
|
95
|
+
Technically, the workflow is a workflow package; the folder shape it writes is the context interface; the built folder is the compiled context. Run `interf create workflow` if the built-in method is not enough for your work. Most users only touch `interf/<work>/`.
|
|
126
96
|
|
|
127
97
|
## Questions
|
|
128
98
|
|
|
129
|
-
Interf
|
|
99
|
+
Interf runs question-and-answer checks.
|
|
130
100
|
|
|
131
|
-
|
|
101
|
+
In the flow, they feel like plain questions. In `interf.json`, they live under `checks[]` — small facts that define what "good enough" means for this work.
|
|
102
|
+
|
|
103
|
+
They should be small, verifiable facts you already know from the files:
|
|
132
104
|
|
|
133
105
|
- one exact number from a chart, table, or filing
|
|
134
106
|
- one short statement that should be true or false
|
|
135
|
-
- one
|
|
136
|
-
|
|
137
|
-
Interf can recommend a starting set from the files and the work description. You can confirm, edit, or replace them.
|
|
107
|
+
- one comparison across years, files, or sections
|
|
138
108
|
|
|
139
|
-
|
|
109
|
+
Interf proposes an initial set from the files and the work description. You confirm, edit, or replace them.
|
|
140
110
|
|
|
141
111
|
A maintained public test example in this repo stores them like this:
|
|
142
112
|
|
|
@@ -164,92 +134,35 @@ A maintained public test example in this repo stores them like this:
|
|
|
164
134
|
```
|
|
165
135
|
<!-- PUBLIC_TEST_CHECKS:END -->
|
|
166
136
|
|
|
167
|
-
##
|
|
168
|
-
|
|
169
|
-
`interf test` compares the source files and the portable context your agents would use on the same questions.
|
|
170
|
-
|
|
171
|
-
That comparison is the proof step:
|
|
172
|
-
|
|
173
|
-
- same work
|
|
174
|
-
- same questions
|
|
175
|
-
- same local agent setup
|
|
176
|
-
- source files on one side
|
|
177
|
-
- portable context your agents use on the other
|
|
178
|
-
|
|
179
|
-
If the portable context does not help, keep the source files.
|
|
180
|
-
|
|
181
|
-
Use `interf test` on your own files instead of trusting a frozen benchmark snapshot in the docs.
|
|
182
|
-
|
|
183
|
-
Interf saves the latest comparison plus the underlying source-files and portable-context runs under `interf/tests/` in the same project.
|
|
184
|
-
|
|
185
|
-
## The Core Loop
|
|
186
|
-
|
|
187
|
-
1. Save a few questions for the work in `interf.json`.
|
|
188
|
-
2. Check the source files first if you want the baseline.
|
|
189
|
-
3. Run `interf compile` to build the portable context your agents can use.
|
|
190
|
-
4. Run `interf test` on the same questions.
|
|
191
|
-
5. If loops are enabled, let Interf retry the same workflow variation or improve the workflow and test again.
|
|
192
|
-
|
|
193
|
-
The project root stores the source-folder setup and saved questions. Technically, that portable context is the compiled context Interf reuses for repeat runs.
|
|
194
|
-
|
|
195
|
-
## Workflows
|
|
196
|
-
|
|
197
|
-
A workflow is the method Interf uses to prepare files for a kind of work.
|
|
198
|
-
|
|
199
|
-
A context interface is the folder shape that workflow builds for your agent.
|
|
200
|
-
|
|
201
|
-
Technically, a workflow package defines that context interface: the zones, paths, and stage ownership of the compiled context Interf will build for that work.
|
|
202
|
-
|
|
203
|
-
Interf ships with a built-in `interf` workflow for the common case. If you need a different method, create one locally:
|
|
137
|
+
## Self-improving loops
|
|
204
138
|
|
|
205
|
-
|
|
206
|
-
interf create workflow
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Workflow creation supports two paths:
|
|
210
|
-
|
|
211
|
-
- draft a workflow from the current project with a local agent
|
|
212
|
-
- copy an existing workflow and edit stage guidance directly
|
|
213
|
-
|
|
214
|
-
After assignment, build the portable context for your agents with `interf compile` and run `interf test` on the same questions.
|
|
215
|
-
|
|
216
|
-
## Compile Loops
|
|
217
|
-
|
|
218
|
-
`max_attempts` is a retry budget for the same workflow variation.
|
|
219
|
-
|
|
220
|
-
`max_loops` lets Interf improve the workflow itself between retry batches.
|
|
139
|
+
One compile pass is not always enough. If the portable context still fails some questions, Interf can revise the workflow and compile again: same files, same questions, different preparation.
|
|
221
140
|
|
|
222
|
-
|
|
141
|
+
Each loop edits the workflow between attempts. Interf keeps every scored run under `interf/tests/<work>/`, so you can diff why one version did better than the next.
|
|
223
142
|
|
|
224
|
-
|
|
143
|
+
## Design choices
|
|
225
144
|
|
|
226
|
-
|
|
145
|
+
- `Explicit`: portable context is a folder on disk you can inspect, diff, and version.
|
|
146
|
+
- `File over app`: Interf builds next to the source files.
|
|
147
|
+
- `Bring your own AI`: use Claude Code, Codex, or another local agent.
|
|
148
|
+
- `Proof over vibes`: `interf test` scores source files and portable context on the same questions.
|
|
149
|
+
- `Source files stay the source of truth`: Interf builds next to them; it does not replace them.
|
|
227
150
|
|
|
228
|
-
##
|
|
229
|
-
|
|
230
|
-
If you already work through a local coding agent, hand it the whole flow:
|
|
231
|
-
|
|
232
|
-
Paste something like this into your agent:
|
|
233
|
-
|
|
234
|
-
```text
|
|
235
|
-
Install `@interf/compiler`, run `interf` in this folder, and use the local agent executor.
|
|
236
|
-
|
|
237
|
-
If `interf.json` is missing, draft one dataset entry for this work. Ask what I need from the selected files. Recommend a few questions I can verify from those files, and add the expected answers for me to confirm under `checks[]`.
|
|
238
|
-
|
|
239
|
-
Run a source-files baseline if useful. Build the portable context for my agents for that work. Then run `interf test` on the same questions.
|
|
240
|
-
|
|
241
|
-
Only recommend the portable context if it passes those questions. If you also ran the source-files baseline, tell me whether it did better than the source files.
|
|
242
|
-
```
|
|
151
|
+
## What Interf is not
|
|
243
152
|
|
|
244
|
-
|
|
153
|
+
- Not a second brain or memory product. One folder per piece of work; nothing global.
|
|
154
|
+
- Not a vector store or RAG server. The portable context is plain files.
|
|
155
|
+
- Not a hosted context layer. Interf runs locally and `interf/` is yours.
|
|
156
|
+
- Not an agent harness. Interf prepares the folder; your existing agent reads it.
|
|
157
|
+
- Not a public leaderboard. Every score comes from your files, your questions, and your agent.
|
|
245
158
|
|
|
246
|
-
|
|
247
|
-
- [src/packages/compiler/PACKAGE.md](./src/packages/compiler/PACKAGE.md) for compiler primitives and the runtime ABI
|
|
248
|
-
- [src/packages/workflow-package/PACKAGE.md](./src/packages/workflow-package/PACKAGE.md) for the workflow package model
|
|
249
|
-
- [src/packages/workflow-authoring/PACKAGE.md](./src/packages/workflow-authoring/PACKAGE.md) for workflow authoring and self-improving loops
|
|
159
|
+
## Docs
|
|
250
160
|
|
|
251
|
-
|
|
161
|
+
- [src/packages/README.md](./src/packages/README.md) — system map
|
|
162
|
+
- [src/packages/compiler/PACKAGE.md](./src/packages/compiler/PACKAGE.md) — compiler primitives and runtime contract
|
|
163
|
+
- [src/packages/workflow-package/PACKAGE.md](./src/packages/workflow-package/PACKAGE.md) — workflow package model
|
|
164
|
+
- [src/packages/workflow-authoring/PACKAGE.md](./src/packages/workflow-authoring/PACKAGE.md) — workflow authoring and self-improving loops
|
|
252
165
|
|
|
253
|
-
|
|
166
|
+
Contributors: see [CONTRIBUTING.md](./CONTRIBUTING.md).
|
|
254
167
|
|
|
255
|
-
Code
|
|
168
|
+
Code: Apache 2.0. Name and branding: see [TRADEMARKS.md](./TRADEMARKS.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@interf/compiler",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.7",
|
|
4
4
|
"description": "Interf prepares context for your agents by checking your files first, building a local folder when needed, and using self-improving loops until more questions pass.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\" && tsc && chmod 755 dist/bin.js",
|
|
45
45
|
"dev": "tsc --watch",
|
|
46
|
+
"setup:local-skills": "bash scripts/setup-local-skills.sh",
|
|
46
47
|
"refresh:bootstrap-mirror": "node scripts/docs/sync-bootstrap-mirror.mjs",
|
|
47
48
|
"docs:sync-public-test-example": "npm run build && node scripts/docs/sync-public-test-example.mjs",
|
|
48
49
|
"test:matrix": "npm run build && node scripts/matrix/run.mjs",
|