@interf/compiler 0.6.6 → 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.
Files changed (2) hide show
  1. package/README.md +85 -192
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -3,30 +3,30 @@
3
3
  Interf prepares context for your agents.
4
4
  Use it to check whether your files are ready for the work you want your agents to do.
5
5
 
6
- Tell Interf what you need from those files. It can compare how your local agents do on the source files. If the files alone are not enough, it builds portable context and keeps improving that context until more questions pass.
6
+ **Files alone are not automatically ready for agent work.**
7
7
 
8
- Interf Compiler builds that portable context as a local folder next to your files.
9
- Your source files stay the source of truth. Interf builds on them; it does not replace them.
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.
10
9
 
11
- For the built-in `interf` workflow, portable context for your agents includes:
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
+
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.
12
13
 
13
14
  ```text
14
- interf/market-report/
15
- AGENTS.md # how your agent should use this folder
16
- CLAUDE.md # same guidance for Claude Code
17
- home.md # top-level map for the work
18
- summaries/ # file-by-file summaries
19
- knowledge/ # linked notes built from those files
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
20
25
  ```
21
26
 
22
- That is one example. Different workflows can build different folders. In every case, your agent starts from one local folder.
23
-
24
- One public example from a PDF market report uses checks like:
27
+ ## What a run looks like
25
28
 
26
- - `What were Bristol's annual take-up values in 2018 and 2016?`
27
- - `What were Bristol's availability values in 2018 and 2016?`
28
-
29
- On those same checks, one recent public comparison produced:
29
+ A recent public run one PDF market report, two questions, two agents on the same setup — produced:
30
30
 
31
31
  <!-- PUBLIC_BENCHMARK_TABLE:START -->
32
32
  | Agent | Source files | Portable context |
@@ -35,114 +35,78 @@ On those same checks, one recent public comparison produced:
35
35
  | Claude Code (Claude Opus 4.6, max) | `0/2` | `2/2` |
36
36
  <!-- PUBLIC_BENCHMARK_TABLE:END -->
37
37
 
38
- That means:
39
-
40
- - Codex already passed on the source files.
41
- - Claude Code needed the portable context to pass.
42
-
43
- That gives you a readiness signal for the work and a fair comparison on the same files.
44
-
45
- Same work. Same checks. Same local setup.
46
-
47
- ## How It Works
48
-
49
- 1. Pick the files for the work.
50
- 2. Tell Interf what you need from them.
51
- 3. Review or edit the questions.
52
- 4. Run a source-files baseline if you want to check readiness first.
53
- 5. Build the portable context for your agents.
54
- 6. Run `interf test` on the same questions.
55
-
56
- Check the source files first if you want the baseline. If the files already pass, keep them. If the portable context does better, use it.
57
-
58
- ## Why It Exists
59
-
60
- Raw files are often not enough.
61
-
62
- Local agents can open reports, decks, transcripts, exports, PDFs, notes, and mixed folders. They can still miss the structure the work needs.
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.
63
39
 
64
- Interf checks the source files first. If they are already enough, keep them. If they are not, Interf builds a local context layer next to those files and checks whether it helped.
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.
65
41
 
66
- Interf is built around a few simple rules:
42
+ ## The loop
67
43
 
68
- - Explicit: the preparation stays on disk in a local folder you can inspect, diff, review, and version.
69
- - File over app: the result lives next to the source files.
70
- - Bring your own AI: use Claude Code, Codex, or another local agent. Automated Interf runs currently support Claude Code and Codex.
71
- - Proof over vibes: check source files and portable context on the same work.
72
- - Source files stay the source of truth.
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.
73
50
 
74
- ## Folder Layout
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.
75
52
 
76
- If your folder already contains the files for the work, Interf adds a small local structure around them:
53
+ ## Install
77
54
 
78
- ```text
79
- your-folder/
80
- market-report/
81
- report.pdf
82
- notes.md
83
- exports/
84
- interf.json
85
- interf/
86
- market-report/
87
- tests/
88
- market-report/
55
+ ```bash
56
+ npm install -g @interf/compiler
57
+ interf # opens the setup wizard in the current folder
89
58
  ```
90
59
 
91
- `market-report` is just the work name. Interf reuses it under `interf/` and `interf/tests/`.
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.
92
61
 
93
- When Interf finishes, point your agents at `interf/market-report/` first. Go back to the source files whenever you need to verify something.
62
+ ## Core commands
94
63
 
95
- ## Quick Start
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
96
74
 
97
- Requirements:
75
+ ## Portable context
98
76
 
99
- - Node.js 20+
100
- - a local coding agent such as Claude Code or Codex
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:
101
78
 
102
- Install:
103
-
104
- ```bash
105
- npm install -g @interf/compiler
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
106
87
  ```
107
88
 
108
- Then run Interf in a project folder that already contains the files for the work:
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.
109
90
 
110
- ```bash
111
- interf
112
- ```
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.
113
92
 
114
- The first run opens the setup wizard for that folder. It can:
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.
115
94
 
116
- - draft `interf.json`
117
- - let you choose the source folder for the work
118
- - ask what work you need help with
119
- - recommend questions you can verify from the files, or let you add them manually
120
- - run a source-files baseline so you can see whether the files are already enough
121
- - build the portable context your agents will use for that work
122
- - check that portable context on the same questions
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>/`.
123
96
 
124
- If Interf cannot find your local executor setup, run:
97
+ ## Questions
125
98
 
126
- ```bash
127
- interf doctor --live
128
- ```
99
+ Interf runs question-and-answer checks.
129
100
 
130
- ## Checks
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.
131
102
 
132
- Interf uses question-and-answer checks.
133
- They are small questions that tell you whether the work is actually covered.
134
-
135
- Interf runs the same checks on the source files and on the portable context. That gives you a source-files baseline and a portable-context comparison on the same task.
136
-
137
- Good first checks are small and easy to verify from the files:
103
+ They should be small, verifiable facts you already know from the files:
138
104
 
139
105
  - one exact number from a chart, table, or filing
140
106
  - one short statement that should be true or false
141
- - one simple comparison across years, files, or sections
142
-
143
- 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
144
108
 
145
- In the CLI, you mostly see them as questions. In `interf.json`, they live under the technical field `checks[]`.
109
+ Interf proposes an initial set from the files and the work description. You confirm, edit, or replace them.
146
110
 
147
111
  A maintained public test example in this repo stores them like this:
148
112
 
@@ -170,106 +134,35 @@ A maintained public test example in this repo stores them like this:
170
134
  ```
171
135
  <!-- PUBLIC_TEST_CHECKS:END -->
172
136
 
173
- ## What `interf test` Measures
174
-
175
- `interf test` compares the source files and the portable context your agents would use on the same questions.
176
-
177
- That makes it a small benchmark for the work at hand:
178
-
179
- - same work
180
- - same checks
181
- - same local agent setup
182
- - source files on one side
183
- - portable context your agents use on the other
184
-
185
- If you run more than one local agent, it also gives you a fair comparison between them on the same files.
186
-
187
- If the portable context does not help, keep the source files.
188
-
189
- Use `interf test` on your own files instead of trusting a frozen benchmark snapshot in the docs.
190
-
191
- Interf saves the latest comparison plus the underlying source-files and portable-context runs under `interf/tests/` in the same project.
192
-
193
- ## The Compile And Check Loop
194
-
195
- 1. Save a few checks for the work in `interf.json`.
196
- 2. Run `interf test --target raw` if you want the source-files baseline.
197
- 3. Run `interf compile`.
198
- 4. Run `interf test`.
199
- 5. If self-improving loops are enabled, let Interf revise the workflow and try again on the same work and checks.
200
-
201
- `interf.json` stores the saved setup and checks. Technically, that portable context is the compiled context Interf reuses for repeat runs.
202
-
203
- ## Workflows
204
-
205
- A workflow is the preparation method Interf runs on your files.
206
-
207
- In plain language, it is the method that organizes and structures those files for agent use.
208
-
209
- It can summarize files, extract structure, and build the local context layer your agent starts from.
210
-
211
- Interf runs that method with your local coding agent and builds the result on disk as portable context.
212
-
213
- The folder shape it produces for the agent is the context interface. The reusable method itself is the workflow package.
137
+ ## Self-improving loops
214
138
 
215
- Publicly, you mostly care about the portable context it produces. Technically, that portable context is the compiled context.
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.
216
140
 
217
- Interf ships with a built-in `interf` workflow for the common case. If you need a different method, create one locally:
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.
218
142
 
219
- ```bash
220
- interf create workflow
221
- ```
222
-
223
- Workflow creation supports two paths:
224
-
225
- - draft a workflow from the current project with a local agent
226
- - copy an existing workflow and edit stage guidance directly
227
-
228
- After assignment, build the portable context for your agents with `interf compile` and run `interf test` on the same questions.
229
-
230
- ## Self-Improving Loops
231
-
232
- Interf can do more than one compile pass.
233
-
234
- If the first portable context is still weak, Interf can revise the workflow and compile again.
235
-
236
- Each loop keeps the work and the checks fixed. The thing that changes is the preparation method.
237
-
238
- If self-improving loops are enabled, Interf can:
143
+ ## Design choices
239
144
 
240
- - build the current portable context
241
- - run the same checks
242
- - inspect failures and traces
243
- - revise the workflow
244
- - build and test the next version
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.
245
150
 
246
- Lower-level retry budgets live in `interf.json` and the technical package docs.
247
-
248
- ## Use It With Your Agent
249
-
250
- If you already work through a local coding agent, hand it the whole flow:
251
-
252
- Paste something like this into your agent:
253
-
254
- ```text
255
- Install `@interf/compiler`, run `interf` in this folder, and use the local agent executor.
256
-
257
- 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[]`.
258
-
259
- 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.
260
-
261
- 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.
262
- ```
151
+ ## What Interf is not
263
152
 
264
- ## More Docs
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.
265
158
 
266
- - [src/packages/README.md](./src/packages/README.md) for the short system map
267
- - [src/packages/compiler/PACKAGE.md](./src/packages/compiler/PACKAGE.md) for compiler primitives and the runtime contract
268
- - [src/packages/workflow-package/PACKAGE.md](./src/packages/workflow-package/PACKAGE.md) for the workflow package model
269
- - [src/packages/workflow-authoring/PACKAGE.md](./src/packages/workflow-authoring/PACKAGE.md) for workflow authoring and self-improving loops
159
+ ## Docs
270
160
 
271
- Maintainers should use [CONTRIBUTING.md](./CONTRIBUTING.md) for test and release gates.
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
272
165
 
273
- ## License
166
+ Contributors: see [CONTRIBUTING.md](./CONTRIBUTING.md).
274
167
 
275
- Code is licensed under Apache 2.0. The `Interf` name and branding are reserved; see [TRADEMARKS.md](./TRADEMARKS.md).
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.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": {