@interf/compiler 0.2.4 → 0.3.0

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 (240) hide show
  1. package/README.md +194 -148
  2. package/dist/commands/benchmark.d.ts.map +1 -1
  3. package/dist/commands/benchmark.js +60 -351
  4. package/dist/commands/benchmark.js.map +1 -1
  5. package/dist/commands/compile.d.ts.map +1 -1
  6. package/dist/commands/compile.js +43 -110
  7. package/dist/commands/compile.js.map +1 -1
  8. package/dist/commands/create-workflow-wizard.d.ts +4 -25
  9. package/dist/commands/create-workflow-wizard.d.ts.map +1 -1
  10. package/dist/commands/create-workflow-wizard.js +29 -214
  11. package/dist/commands/create-workflow-wizard.js.map +1 -1
  12. package/dist/commands/create.d.ts +2 -11
  13. package/dist/commands/create.d.ts.map +1 -1
  14. package/dist/commands/create.js +72 -455
  15. package/dist/commands/create.js.map +1 -1
  16. package/dist/commands/default.d.ts.map +1 -1
  17. package/dist/commands/default.js +16 -28
  18. package/dist/commands/default.js.map +1 -1
  19. package/dist/commands/init.d.ts.map +1 -1
  20. package/dist/commands/init.js +71 -337
  21. package/dist/commands/init.js.map +1 -1
  22. package/dist/commands/list.d.ts.map +1 -1
  23. package/dist/commands/list.js +12 -22
  24. package/dist/commands/list.js.map +1 -1
  25. package/dist/commands/reset.d.ts.map +1 -1
  26. package/dist/commands/reset.js +27 -124
  27. package/dist/commands/reset.js.map +1 -1
  28. package/dist/commands/source-config-wizard.d.ts +13 -6
  29. package/dist/commands/source-config-wizard.d.ts.map +1 -1
  30. package/dist/commands/source-config-wizard.js +93 -59
  31. package/dist/commands/source-config-wizard.js.map +1 -1
  32. package/dist/commands/status.d.ts.map +1 -1
  33. package/dist/commands/status.js +60 -56
  34. package/dist/commands/status.js.map +1 -1
  35. package/dist/commands/verify.d.ts.map +1 -1
  36. package/dist/commands/verify.js +59 -98
  37. package/dist/commands/verify.js.map +1 -1
  38. package/dist/index.d.ts +7 -7
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +4 -6
  41. package/dist/index.js.map +1 -1
  42. package/dist/lib/agent-constants.js +1 -1
  43. package/dist/lib/agent-constants.js.map +1 -1
  44. package/dist/lib/benchmark-execution.d.ts.map +1 -1
  45. package/dist/lib/benchmark-execution.js +7 -16
  46. package/dist/lib/benchmark-execution.js.map +1 -1
  47. package/dist/lib/benchmark-targets.d.ts +3 -4
  48. package/dist/lib/benchmark-targets.d.ts.map +1 -1
  49. package/dist/lib/benchmark-targets.js +9 -55
  50. package/dist/lib/benchmark-targets.js.map +1 -1
  51. package/dist/lib/benchmark-types.d.ts +2 -3
  52. package/dist/lib/benchmark-types.d.ts.map +1 -1
  53. package/dist/lib/benchmark.d.ts +1 -1
  54. package/dist/lib/benchmark.d.ts.map +1 -1
  55. package/dist/lib/benchmark.js +1 -1
  56. package/dist/lib/benchmark.js.map +1 -1
  57. package/dist/lib/config.d.ts +1 -2
  58. package/dist/lib/config.d.ts.map +1 -1
  59. package/dist/lib/config.js +2 -4
  60. package/dist/lib/config.js.map +1 -1
  61. package/dist/lib/discovery.d.ts +1 -1
  62. package/dist/lib/discovery.d.ts.map +1 -1
  63. package/dist/lib/discovery.js +7 -2
  64. package/dist/lib/discovery.js.map +1 -1
  65. package/dist/lib/eval-packs.d.ts +6 -52
  66. package/dist/lib/eval-packs.d.ts.map +1 -1
  67. package/dist/lib/eval-packs.js +11 -39
  68. package/dist/lib/eval-packs.js.map +1 -1
  69. package/dist/lib/interf-bootstrap.d.ts +3 -5
  70. package/dist/lib/interf-bootstrap.d.ts.map +1 -1
  71. package/dist/lib/interf-bootstrap.js +10 -57
  72. package/dist/lib/interf-bootstrap.js.map +1 -1
  73. package/dist/lib/interf-detect.d.ts +13 -11
  74. package/dist/lib/interf-detect.d.ts.map +1 -1
  75. package/dist/lib/interf-detect.js +59 -45
  76. package/dist/lib/interf-detect.js.map +1 -1
  77. package/dist/lib/interf-scaffold.d.ts +2 -5
  78. package/dist/lib/interf-scaffold.d.ts.map +1 -1
  79. package/dist/lib/interf-scaffold.js +98 -235
  80. package/dist/lib/interf-scaffold.js.map +1 -1
  81. package/dist/lib/interf-workflow-package.d.ts +1 -2
  82. package/dist/lib/interf-workflow-package.d.ts.map +1 -1
  83. package/dist/lib/interf-workflow-package.js +94 -90
  84. package/dist/lib/interf-workflow-package.js.map +1 -1
  85. package/dist/lib/interf.d.ts +4 -5
  86. package/dist/lib/interf.d.ts.map +1 -1
  87. package/dist/lib/interf.js +3 -6
  88. package/dist/lib/interf.js.map +1 -1
  89. package/dist/lib/local-workflows.d.ts +9 -8
  90. package/dist/lib/local-workflows.d.ts.map +1 -1
  91. package/dist/lib/local-workflows.js +42 -94
  92. package/dist/lib/local-workflows.js.map +1 -1
  93. package/dist/lib/obsidian.d.ts +1 -5
  94. package/dist/lib/obsidian.d.ts.map +1 -1
  95. package/dist/lib/obsidian.js +11 -165
  96. package/dist/lib/obsidian.js.map +1 -1
  97. package/dist/lib/registry.d.ts +6 -17
  98. package/dist/lib/registry.d.ts.map +1 -1
  99. package/dist/lib/registry.js +36 -50
  100. package/dist/lib/registry.js.map +1 -1
  101. package/dist/lib/runtime-contracts.d.ts +2 -3
  102. package/dist/lib/runtime-contracts.d.ts.map +1 -1
  103. package/dist/lib/runtime-contracts.js +10 -9
  104. package/dist/lib/runtime-contracts.js.map +1 -1
  105. package/dist/lib/runtime-reconcile.d.ts +2 -5
  106. package/dist/lib/runtime-reconcile.d.ts.map +1 -1
  107. package/dist/lib/runtime-reconcile.js +23 -176
  108. package/dist/lib/runtime-reconcile.js.map +1 -1
  109. package/dist/lib/runtime-runs.d.ts.map +1 -1
  110. package/dist/lib/runtime-runs.js +52 -57
  111. package/dist/lib/runtime-runs.js.map +1 -1
  112. package/dist/lib/runtime-types.d.ts +5 -6
  113. package/dist/lib/runtime-types.d.ts.map +1 -1
  114. package/dist/lib/runtime.d.ts +2 -2
  115. package/dist/lib/runtime.d.ts.map +1 -1
  116. package/dist/lib/runtime.js +1 -1
  117. package/dist/lib/runtime.js.map +1 -1
  118. package/dist/lib/schema.d.ts +53 -312
  119. package/dist/lib/schema.d.ts.map +1 -1
  120. package/dist/lib/schema.js +39 -206
  121. package/dist/lib/schema.js.map +1 -1
  122. package/dist/lib/source-config.d.ts +7 -7
  123. package/dist/lib/source-config.d.ts.map +1 -1
  124. package/dist/lib/source-config.js +55 -62
  125. package/dist/lib/source-config.js.map +1 -1
  126. package/dist/lib/state-artifacts.d.ts +5 -11
  127. package/dist/lib/state-artifacts.d.ts.map +1 -1
  128. package/dist/lib/state-artifacts.js +8 -18
  129. package/dist/lib/state-artifacts.js.map +1 -1
  130. package/dist/lib/state-health.d.ts +4 -8
  131. package/dist/lib/state-health.d.ts.map +1 -1
  132. package/dist/lib/state-health.js +27 -223
  133. package/dist/lib/state-health.js.map +1 -1
  134. package/dist/lib/state-io.d.ts +7 -12
  135. package/dist/lib/state-io.d.ts.map +1 -1
  136. package/dist/lib/state-io.js +26 -93
  137. package/dist/lib/state-io.js.map +1 -1
  138. package/dist/lib/state-view.d.ts +4 -6
  139. package/dist/lib/state-view.d.ts.map +1 -1
  140. package/dist/lib/state-view.js +62 -101
  141. package/dist/lib/state-view.js.map +1 -1
  142. package/dist/lib/state.d.ts +5 -5
  143. package/dist/lib/state.d.ts.map +1 -1
  144. package/dist/lib/state.js +4 -4
  145. package/dist/lib/state.js.map +1 -1
  146. package/dist/lib/summarize-plan.d.ts +2 -2
  147. package/dist/lib/summarize-plan.d.ts.map +1 -1
  148. package/dist/lib/summarize-plan.js +13 -13
  149. package/dist/lib/summarize-plan.js.map +1 -1
  150. package/dist/lib/{validate-kb.d.ts → validate-workspace.d.ts} +8 -8
  151. package/dist/lib/validate-workspace.d.ts.map +1 -0
  152. package/dist/lib/{validate-kb.js → validate-workspace.js} +44 -46
  153. package/dist/lib/validate-workspace.js.map +1 -0
  154. package/dist/lib/validate.d.ts +5 -7
  155. package/dist/lib/validate.d.ts.map +1 -1
  156. package/dist/lib/validate.js +6 -19
  157. package/dist/lib/validate.js.map +1 -1
  158. package/dist/lib/workflow-definitions.d.ts +14 -50
  159. package/dist/lib/workflow-definitions.d.ts.map +1 -1
  160. package/dist/lib/workflow-definitions.js +74 -349
  161. package/dist/lib/workflow-definitions.js.map +1 -1
  162. package/dist/lib/workflow-helpers.d.ts +3 -4
  163. package/dist/lib/workflow-helpers.d.ts.map +1 -1
  164. package/dist/lib/workflow-helpers.js +15 -49
  165. package/dist/lib/workflow-helpers.js.map +1 -1
  166. package/dist/lib/workflow-stage-runner.d.ts +1 -2
  167. package/dist/lib/workflow-stage-runner.d.ts.map +1 -1
  168. package/dist/lib/workflow-stage-runner.js +4 -6
  169. package/dist/lib/workflow-stage-runner.js.map +1 -1
  170. package/dist/lib/workflow-starter-docs.d.ts +3 -5
  171. package/dist/lib/workflow-starter-docs.d.ts.map +1 -1
  172. package/dist/lib/workflow-starter-docs.js +2 -17
  173. package/dist/lib/workflow-starter-docs.js.map +1 -1
  174. package/dist/lib/workflows.d.ts +9 -14
  175. package/dist/lib/workflows.d.ts.map +1 -1
  176. package/dist/lib/workflows.js +13 -30
  177. package/dist/lib/workflows.js.map +1 -1
  178. package/dist/lib/workspace-compile.d.ts +50 -0
  179. package/dist/lib/workspace-compile.d.ts.map +1 -0
  180. package/dist/lib/{workflows-kb.js → workspace-compile.js} +81 -89
  181. package/dist/lib/workspace-compile.js.map +1 -0
  182. package/package.json +9 -9
  183. package/skills/benchmark/SKILL.md +16 -24
  184. package/skills/workflow/create/SKILL.md +7 -14
  185. package/templates/workspace/README.md +23 -0
  186. package/templates/workspace/interfignore +2 -0
  187. package/dist/lib/bundled-templates.d.ts +0 -5
  188. package/dist/lib/bundled-templates.d.ts.map +0 -1
  189. package/dist/lib/bundled-templates.js +0 -23
  190. package/dist/lib/bundled-templates.js.map +0 -1
  191. package/dist/lib/interf-compile-plan.d.ts +0 -12
  192. package/dist/lib/interf-compile-plan.d.ts.map +0 -1
  193. package/dist/lib/interf-compile-plan.js +0 -143
  194. package/dist/lib/interf-compile-plan.js.map +0 -1
  195. package/dist/lib/validate-interface.d.ts +0 -79
  196. package/dist/lib/validate-interface.d.ts.map +0 -1
  197. package/dist/lib/validate-interface.js +0 -535
  198. package/dist/lib/validate-interface.js.map +0 -1
  199. package/dist/lib/validate-kb.d.ts.map +0 -1
  200. package/dist/lib/validate-kb.js.map +0 -1
  201. package/dist/lib/workflows-interface-contracts.d.ts +0 -24
  202. package/dist/lib/workflows-interface-contracts.d.ts.map +0 -1
  203. package/dist/lib/workflows-interface-contracts.js +0 -304
  204. package/dist/lib/workflows-interface-contracts.js.map +0 -1
  205. package/dist/lib/workflows-interface.d.ts +0 -72
  206. package/dist/lib/workflows-interface.d.ts.map +0 -1
  207. package/dist/lib/workflows-interface.js +0 -377
  208. package/dist/lib/workflows-interface.js.map +0 -1
  209. package/dist/lib/workflows-kb.d.ts +0 -50
  210. package/dist/lib/workflows-kb.d.ts.map +0 -1
  211. package/dist/lib/workflows-kb.js.map +0 -1
  212. package/skills/interface/analyze/SKILL.md +0 -191
  213. package/skills/interface/compile/SKILL.md +0 -152
  214. package/skills/interface/compile/references/output-format.md +0 -48
  215. package/skills/interface/create/SKILL.md +0 -87
  216. package/skills/interface/create/references/compile-plan-format.md +0 -109
  217. package/skills/interface/create/references/workflows.md +0 -35
  218. package/skills/interface/query/SKILL.md +0 -48
  219. package/skills/interface/retrieve/SKILL.md +0 -133
  220. package/skills/knowledge-base/compile/SKILL.md +0 -196
  221. package/skills/knowledge-base/compile/references/output-format.md +0 -48
  222. package/skills/knowledge-base/compile/references/stage-claims.md +0 -60
  223. package/skills/knowledge-base/compile/references/stage-entities.md +0 -46
  224. package/skills/knowledge-base/query/SKILL.md +0 -45
  225. package/skills/knowledge-base/summarize/SKILL.md +0 -152
  226. package/templates/interface/README.md +0 -159
  227. package/templates/interface/interfaces.md +0 -102
  228. package/templates/knowledge-base/README.md +0 -137
  229. package/templates/knowledge-base/interfignore +0 -19
  230. package/templates/knowledge-base/registry.md +0 -118
  231. package/templates/workflow-package/README.md +0 -16
  232. package/templates/workflow-package/create/SKILL.md +0 -8
  233. package/templates/workflow-package/interface-query/SKILL.md +0 -29
  234. package/templates/workflow-package/interface-stage/SKILL.md +0 -13
  235. package/templates/workflow-package/knowledge-base-query/SKILL.md +0 -36
  236. package/templates/workflow-package/knowledge-base-stage/SKILL.md +0 -13
  237. package/templates/workflow-starters/interface/interf/README.md +0 -13
  238. package/templates/workflow-starters/interface/interf/create/SKILL.md +0 -15
  239. package/templates/workflow-starters/knowledge-base/interf/README.md +0 -13
  240. package/templates/workflow-starters/knowledge-base/karpathy/README.md +0 -13
package/README.md CHANGED
@@ -1,33 +1,19 @@
1
1
  # Interf
2
2
 
3
- Interf Knowledge Compiler uses local agents such as Claude Code and Codex to run a data-processing workflow over your files.
3
+ Open-source knowledge compiler for your files.
4
4
 
5
- It creates a workspace with notes and navigation so the agent can see what is in the folder and what to retrieve.
5
+ Interf measures and improves how accurately local agents answer questions from your files.
6
6
 
7
- Then you test that workspace on your evals.
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
+
9
+ Interf lets you write a few questions and expected answers about your files, build a compiled workspace on top of those files, and see whether the result actually passes.
8
10
 
9
11
  - your files stay on your machine
10
12
  - you choose the local agent
11
- - you decide what must be true
12
-
13
- Agents start missing things when a task spans PDFs, charts, and several files in one folder. That usually shows up when the job depends on:
14
-
15
- - reading reports and filings
16
- - extracting a number from a chart
17
- - understanding what is inside a folder before doing work
18
- - pulling context together across several files
19
- - checking the raw source when the answer has to be exact
20
-
21
- The workspace exists so the agent does not have to rediscover the folder from scratch on every run.
13
+ - your raw files stay the source of truth
14
+ - Interf adds a file-based layer on top
22
15
 
23
- The point is proof on your data, not generic AI claims.
24
-
25
- The simplest way to use Interf is to compare the same task before and after compilation:
26
-
27
- - run the task on the raw folder
28
- - compile the folder with Interf
29
- - run the same task again from the workspace
30
- - if you want a recorded pass/fail result, add evals and run `interf benchmark`
16
+ It runs local data-processing pipelines 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.
31
17
 
32
18
  ## Quick Start
33
19
 
@@ -36,95 +22,104 @@ Requirements:
36
22
  - Node.js 20+
37
23
  - a local coding agent: Claude Code or Codex
38
24
 
39
- Install and check setup:
25
+ Install:
40
26
 
41
27
  ```bash
42
28
  npm install -g @interf/compiler
43
- interf doctor
44
29
  ```
45
30
 
46
- Then run Interf in any folder:
31
+ Start by writing a few questions and expected answers in `interf.config.json`:
32
+
33
+ ```json
34
+ {
35
+ "workspaces": [
36
+ {
37
+ "name": "default",
38
+ "about": "General compiled workspace for the quarterly results folder.",
39
+ "checks": [
40
+ {
41
+ "question": "What full-year revenue range did the company maintain?",
42
+ "answer": "$4.8B to $5.0B in revenue."
43
+ },
44
+ {
45
+ "question": "Did gross margin improve or decline year over year?",
46
+ "answer": "Gross margin declined year over year."
47
+ }
48
+ ]
49
+ }
50
+ ]
51
+ }
52
+ ```
53
+
54
+ Then run Interf in that folder:
47
55
 
48
56
  ```bash
49
57
  cd ~/my-folder
50
58
  interf init
59
+ interf create workspace
51
60
  interf compile
52
61
  interf benchmark
53
62
  ```
54
63
 
55
- That is the whole first loop:
64
+ That first run gives you three concrete things:
65
+
66
+ - `interf/workspaces/default/` with the compiled workspace for your files
67
+ - `interf/benchmarks/runs/...` with the saved benchmark result
68
+ - a pass/fail score on the same questions and expected answers you wrote
69
+
70
+ If `interf.config.json` is missing, `interf init` can draft it with you before the first compile. If Interf cannot find your local agent or compile setup, run:
71
+
72
+ ```bash
73
+ interf doctor
74
+ ```
75
+
76
+ The first flow is:
77
+
78
+ - 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 `interf create workspace` and `interf compile` to build the compiled workspace
81
+ - run `interf benchmark` to see whether that compiled workspace passes the checks
82
+ - add another workspace only when one recurring context needs a narrower setup
83
+ - if needed, rerun compile or use the advanced retry path until it is good enough
56
84
 
57
- - point Interf at a folder you already have
58
- - let `interf init` write the first evals in `interf.config.json`
59
- - compile the workspace
60
- - ask the agent to use it
61
- - run `interf benchmark` to compare raw vs compiled
85
+ ## Why This Approach
62
86
 
63
- `interf init` chooses your local agent, can draft `interf.config.json` if it is missing, and can attach the current folder right away. It does not move or replace your files.
87
+ Interf is built around a few simple design principles:
64
88
 
65
- Fastest sample loop:
89
+ - `Explicit`: the output is visible and inspectable, not hidden memory
90
+ - `Local`: your files stay on your machine
91
+ - `File over app`: the output is just files, so you can use your editor, Unix tools, Obsidian, or your own software on top
92
+ - `BYOAI`: use Claude Code, Codex, OpenClaw, Hermes, or your own model
93
+
94
+ Interf does not replace your data with an opaque store. It keeps the raw files in place and adds a file-based layer on top for agents.
95
+
96
+ Sample flow:
66
97
 
67
98
  ```bash
68
99
  cp -r examples/benchmark-demo /tmp/interf-demo
69
100
  cd /tmp/interf-demo
70
101
  interf init
102
+ interf create workspace
71
103
  interf compile
72
104
  interf benchmark
73
105
  ```
74
106
 
75
- If you want a task-specific workspace for one job, add an interface:
107
+ ## Start With A Few Questions
76
108
 
77
- ```bash
78
- interf create interface
79
- interf compile
80
- interf benchmark
81
- ```
109
+ `interf.config.json` is where you write the questions and expected answers for a folder.
82
110
 
83
- ## Start With One Small Eval
111
+ That file uses one `workspaces` array:
84
112
 
85
- `interf.config.json` is where you write what must be true.
113
+ - the first workspace is the default compiled workspace for the folder
114
+ - later workspaces are optional and only exist when one recurring context needs a narrower setup
115
+ - each workspace carries its own `checks`
86
116
 
87
117
  If the file is missing, `interf init` can draft it with you before the first compile. You can edit it any time.
88
118
 
89
- Use it for:
90
-
91
- - top-level `evals` for shared baseline checks
92
- - `interfaces[].evals` for task-specific additional checks
93
-
94
- Both live in the same root `interf.config.json`.
95
-
96
- Example shape:
97
-
98
- Top-level `evals` are shared baseline checks for the workspace and every interface. Each entry in `interfaces` adds extra checks for one dedicated job.
99
-
100
- ```json
101
- {
102
- "evals": [
103
- {
104
- "question": "What was Bristol annual take-up in 2018, in millions of square feet?",
105
- "answer": "About 0.5 million square feet. Accept answers between 0.3 and 0.6 if they clearly refer to Bristol annual take-up in 2018."
106
- }
107
- ],
108
- "interfaces": [
109
- {
110
- "name": "market-briefing",
111
- "about": "Prepare a short briefing from the office market report.",
112
- "evals": [
113
- {
114
- "question": "What was Bristol availability in 2018, in millions of square feet?",
115
- "answer": "About 0.6 million square feet. Accept answers between 0.5 and 0.7 if they clearly refer to Bristol availability in 2018."
116
- },
117
- {
118
- "question": "Did Bristol annual take-up rise or fall between 2016 and 2018?",
119
- "answer": "It fell. The chart shows roughly 0.7 to 0.8 million square feet in 2016 and about 0.5 million square feet in 2018."
120
- }
121
- ]
122
- }
123
- ]
124
- }
125
- ```
119
+ That example is just `interf.config.json`.
120
+ Advanced retry settings do not live there.
126
121
 
127
- Good first evals are small and practical:
122
+ Good first checks are small and practical:
128
123
 
129
124
  - one exact number from a chart, table, or filing
130
125
  - one short statement that should be true or false
@@ -133,136 +128,187 @@ Good first evals are small and practical:
133
128
  Then run:
134
129
 
135
130
  ```bash
131
+ interf create workspace
136
132
  interf compile
137
133
  interf benchmark
138
134
  ```
139
135
 
140
- If the benchmark does not show an improvement over raw files, keep iterating or move to the experiment loop described below.
136
+ ## What `interf benchmark` Compares
141
137
 
142
- ## Compare Three Things
138
+ `interf benchmark` compares compiled workspaces, not raw chat sessions.
143
139
 
144
- Compare:
140
+ It lets you answer a simple question:
145
141
 
146
- 1. the raw folder
147
- 2. the workspace
148
- 3. an interface for one specific job
142
+ - does this compiled workspace pass the checks?
143
+ - which compiled workspace or workflow performs better on the same folder?
144
+ - does another workspace help more on a narrower recurring context?
149
145
 
150
- `interf benchmark` is how you compare those on the same evals.
146
+ By default it loads checks from `interf.config.json`, discovers eligible compiled workspaces under `interf/workspaces/`, and saves the run under `interf/benchmarks/runs/`.
151
147
 
152
- That gives you one clear question:
148
+ If you run `interf benchmark` from inside a workspace, it uses that workspace's checks. If you run it from the source folder, it uses the default workspace checks.
153
149
 
154
- - is the raw folder enough?
155
- - does the workspace retrieve better?
156
- - does a dedicated interface do better than both?
150
+ If you need raw-file probes too, use the advanced eval-pack runner in [docs/eval-loop.md](./docs/eval-loop.md).
157
151
 
158
- ## What `interf compile` Actually Does
152
+ ## What `interf compile` Does
159
153
 
160
- `interf compile` runs a workflow over your folder.
154
+ `interf compile` runs the Interf data-processing pipeline over your files.
161
155
 
162
- That workflow is the compilation pipeline:
156
+ By default, that means:
163
157
 
164
158
  - read the files
165
- - write processed notes and navigation files
166
- - build the workspace your agent can use
167
- - optionally build an interface for one specific job
159
+ - write summaries and navigation docs
160
+ - organize cross-file knowledge
161
+ - build the compiled workspace for the folder
162
+ - optionally build additional workspaces for recurring contexts you care about
163
+
164
+ In public docs, `pipeline` is the thing Interf runs. `workflow` is the saved method that defines or customizes that pipeline.
168
165
 
169
166
  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.
170
167
 
171
- ## Experiment Loop
168
+ ## What Gets Created
172
169
 
173
- Interf Knowledge Compiler also supports an experiment loop above compile + benchmark.
170
+ After compile, Interf writes into `./interf/` beside your source files.
174
171
 
175
- It runs controlled experiments against the same folder and the same evals. Each attempt reruns the compilation workflow, reruns the benchmark, and records what changed. It stops when:
172
+ - `interf/workspaces/<name>/` is a compiled workspace over the folder
173
+ - `interf/benchmarks/runs/...` stores saved benchmark runs
176
174
 
177
- - the evals pass
178
- - or the experiment budget is exhausted
175
+ Inside those workspaces you will see things like:
179
176
 
180
- In practice, that means:
177
+ - summaries of source files
178
+ - navigation notes and entrypoints for agents
179
+ - cross-file knowledge notes
180
+ - workspace-specific outputs for one recurring context
181
+ - benchmark artifacts you can inspect later
181
182
 
182
- - `retry_policy.max_attempts_per_profile` controls how many experiment attempts each compile profile gets
183
- - stronger diagnostic profiles can be used only after the default ones fail
184
- - the loop is still judged on the same eval truth from your folder
185
- - failure summaries can be captured between attempts for diagnosis
183
+ 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.
186
184
 
187
- Today that advanced path is configured through eval packs and explained in the deeper docs. The workflow is the part you change. The experiment loop is the controller that runs those experiments against the same evals with a fixed attempt budget.
185
+ If you use Obsidian, open `interf/workspaces/<name>/` as the vault for the compiled workspace.
188
186
 
189
- Use the simple loop first. Use the experiment loop when you want to test workflow or profile changes against the same evals until one passes or the attempt budget runs out.
187
+ ## Terminology
190
188
 
191
- ## Use It With Your Agent
189
+ Public terms:
192
190
 
193
- If you already work through Claude Code, Codex, OpenClaw, or Hermes, the agent can run this loop for you.
191
+ - `your files` = the source folder Interf reads from
192
+ - `questions and expected answers` = the checks you want your agent to pass
193
+ - `checks` = the pass/fail questions each workspace should satisfy
194
+ - `benchmark` = score compiled workspaces on the same checks
195
+ - `compiled workspace` = the output Interf produces on top of a folder
196
+ - `workspace` = an optional additional compiled workspace for one recurring context
194
197
 
195
- Paste something like this into Claude Code, Codex, OpenClaw, or Hermes:
198
+ Technical terms:
196
199
 
197
- ```text
198
- Install @interf/compiler, run `interf init` in this folder, and use the local agent executor.
200
+ - `source folder` = the raw files Interf reads from
201
+ - `workflow` = the saved method that defines or customizes the pipeline
202
+ - `.interf/` = runtime state, proofs, and health artifacts
199
203
 
200
- If `interf.config.json` is missing, draft evals for what must be true for this task and ask me to confirm them.
204
+ ## Advanced: Additional Workspaces
201
205
 
202
- Then run `interf compile` and `interf benchmark`.
206
+ Start with the default compiled workspace first.
203
207
 
204
- Tell me whether the processed workspace beat raw files, and only recommend it if it did.
205
- ```
208
+ Most folders only need one compiled workspace.
206
209
 
207
- That is the basic loop:
210
+ Create another workspace only when one recurring context needs a narrower setup.
208
211
 
209
- - the user or agent defines what must be true
210
- - Interf prepares processed data for retrieval
211
- - the benchmark shows whether that helped
212
+ Use the default compiled workspace for broad questions such as:
212
213
 
213
- ## What Gets Created
214
+ - what is in this folder?
215
+ - what changed?
216
+ - where is the source evidence?
214
217
 
215
- After compile, Interf writes into `./interf/` beside your source files.
218
+ Create another workspace when that broad layer is no longer enough and the work becomes a repeatable context, for example:
216
219
 
217
- - `interf/<name>/` is the shared workspace over the folder
218
- - `interf/<name>/interfaces/<name>/` is a task-specific workspace for one job
219
- - `interf/benchmarks/runs/...` stores saved benchmark runs
220
+ - operator briefings
221
+ - board prep
222
+ - finance reporting
223
+ - diligence review
224
+ - chart extraction for a report set
225
+ - one recurring research set
220
226
 
221
- Inside those workspaces you will see things like:
227
+ Why create one:
222
228
 
223
- - summaries of source files
224
- - navigation notes and entrypoints for agents
225
- - task-specific outputs for one interface
226
- - benchmark artifacts you can inspect later
229
+ - it narrows what the agent should retrieve for that context
230
+ - it prepares guidance and structure on top of the raw folder for that recurring context
231
+ - it lets you benchmark that context separately
227
232
 
228
- In the CLI, the main Interf workspace is called a **knowledge base**. A task-specific workspace inside it is called an **interface**.
233
+ If the default compiled workspace is already enough, do not create another workspace yet.
229
234
 
230
- ## When To Create An Interface
235
+ ## Advanced: Keep Improving Until It Passes
231
236
 
232
- Start with one workspace.
237
+ Interf also supports an advanced experiment path above the normal build + benchmark flow.
233
238
 
234
- Create an interface when your agent needs outputs shaped for one specific job, for example:
239
+ Give it the same folder and the same checks. Interf can keep rerunning compile + benchmark attempts until the benchmark passes or the attempt budget runs out.
235
240
 
236
- - weekly briefing
237
- - diligence on a deal room
238
- - extracting chart values from research PDFs
239
- - a focused research assistant for one question set
241
+ In practice:
240
242
 
241
- If that workspace is enough for the job, you do not need an interface yet.
243
+ - `retry_policy.max_attempts_per_profile` controls how many attempts each compile profile gets
244
+ - stronger diagnostic profiles can be used only after the default ones fail
245
+ - the checks stay the same across every attempt
246
+ - each attempt records what changed
247
+
248
+ Example eval-pack shape:
249
+
250
+ ```jsonc
251
+ {
252
+ "workspaces": [
253
+ {
254
+ "name": "default",
255
+ "checks": [
256
+ {
257
+ "question": "What full-year revenue range did the company maintain?",
258
+ "answer": "$4.8B to $5.0B in revenue."
259
+ }
260
+ ]
261
+ }
262
+ ],
263
+ // Advanced only: retry settings live in eval packs, not in interf.config.json.
264
+ "retry_policy": {
265
+ "max_attempts_per_profile": 3
266
+ }
267
+ }
268
+ ```
269
+
270
+ Today this lives in the advanced eval-pack runner, not in `interf.config.json` and not in a top-level `interf compile --max-retries` flag.
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.
273
+
274
+ ## Use It With Your Agent
275
+
276
+ If you already work through Claude Code, Codex, OpenClaw, or Hermes, the agent can run this process for you.
277
+
278
+ Paste something like this into your agent:
279
+
280
+ ```text
281
+ Install @interf/compiler, run `interf init` in this folder, and use the local agent executor.
282
+
283
+ If `interf.config.json` is missing, draft a default 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
+
285
+ Then run `interf create workspace`, `interf compile`, and `interf benchmark`.
286
+
287
+ Tell me whether the compiled workspace passes the checks, and only recommend it if it does.
288
+ ```
242
289
 
243
290
  ## Custom Workflows
244
291
 
245
292
  Interf ships with a default workflow.
246
293
 
247
- If you want to change how compilation happens on your data, this is the part you customize:
294
+ If you want to change how the data-processing pipeline runs on your files, this is the part you customize:
248
295
 
249
296
  ```bash
250
297
  interf create workflow
251
298
  interf verify workflow --path <path>
252
299
  ```
253
300
 
254
- Then benchmark that workflow on the same folder and the same evals.
301
+ Then benchmark that workflow on the same folder and the same checks.
255
302
 
256
303
  Workflow package docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
257
304
 
258
305
  ## Core Commands
259
306
 
260
- - `interf init` = choose your local executor and optionally attach the current folder
261
- - `interf create knowledge-base` = create the shared processed workspace for this folder
262
- - `interf create interface` = create a task-specific workspace on top
307
+ - `interf init` = choose your local executor and draft checks
308
+ - `interf create workspace` = create a compiled workspace for this folder
263
309
  - `interf create workflow` = create a reusable local workflow package
264
- - `interf compile` = build the current workspace
265
- - `interf benchmark` = compare raw files vs processed workspaces on your evals
310
+ - `interf compile` = build the current compiled workspace
311
+ - `interf benchmark` = score compiled workspaces on your checks
266
312
  - `interf doctor` = check local executor setup
267
313
  - `interf verify <check>` = run deterministic checks on major workflow steps
268
314
  - `interf reset <scope>` = remove generated state while keeping source files
@@ -272,7 +318,7 @@ Workflow package docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
272
318
  - [docs/workflow-spec.md](./docs/workflow-spec.md) for custom workflow packages
273
319
  - [docs/runtime-contract.md](./docs/runtime-contract.md) for the exact on-disk contract
274
320
  - [docs/architecture.md](./docs/architecture.md) for the deeper system model
275
- - [docs/eval-loop.md](./docs/eval-loop.md) for the advanced benchmark and experiment loop
321
+ - [docs/eval-loop.md](./docs/eval-loop.md) for advanced eval-pack experiments across workflows and models
276
322
 
277
323
  Maintainers should use [CONTRIBUTING.md](./CONTRIBUTING.md) for test and release gates.
278
324
 
@@ -1 +1 @@
1
- {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/commands/benchmark.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA2W3C,eAAO,MAAM,gBAAgB,EAAE,aA8D9B,CAAC"}
1
+ {"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/commands/benchmark.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA6B3C,eAAO,MAAM,gBAAgB,EAAE,aA2E9B,CAAC"}