@interf/compiler 0.1.12 → 0.2.1
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 +197 -192
- package/dist/commands/benchmark.d.ts.map +1 -1
- package/dist/commands/benchmark.js +65 -84
- package/dist/commands/benchmark.js.map +1 -1
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +19 -3
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create.d.ts +3 -0
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +39 -14
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/default.d.ts.map +1 -1
- package/dist/commands/default.js +2 -0
- package/dist/commands/default.js.map +1 -1
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +8 -63
- package/dist/commands/init.js.map +1 -1
- package/dist/index.d.ts +11 -29
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -16
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-args.d.ts +4 -0
- package/dist/lib/agent-args.d.ts.map +1 -0
- package/dist/lib/agent-args.js +42 -0
- package/dist/lib/agent-args.js.map +1 -0
- package/dist/lib/agent-constants.d.ts +6 -0
- package/dist/lib/agent-constants.d.ts.map +1 -0
- package/dist/lib/agent-constants.js +29 -0
- package/dist/lib/agent-constants.js.map +1 -0
- package/dist/lib/agent-detection.d.ts +8 -0
- package/dist/lib/agent-detection.d.ts.map +1 -0
- package/dist/lib/agent-detection.js +66 -0
- package/dist/lib/agent-detection.js.map +1 -0
- package/dist/lib/agent-execution.d.ts +3 -0
- package/dist/lib/agent-execution.d.ts.map +1 -0
- package/dist/lib/agent-execution.js +207 -0
- package/dist/lib/agent-execution.js.map +1 -0
- package/dist/lib/agent-logs.d.ts +3 -0
- package/dist/lib/agent-logs.d.ts.map +1 -0
- package/dist/lib/agent-logs.js +18 -0
- package/dist/lib/agent-logs.js.map +1 -0
- package/dist/lib/agent-preflight.d.ts +8 -0
- package/dist/lib/agent-preflight.d.ts.map +1 -0
- package/dist/lib/agent-preflight.js +77 -0
- package/dist/lib/agent-preflight.js.map +1 -0
- package/dist/lib/agent-render.d.ts +9 -0
- package/dist/lib/agent-render.d.ts.map +1 -0
- package/dist/lib/agent-render.js +219 -0
- package/dist/lib/agent-render.js.map +1 -0
- package/dist/lib/agent-status.d.ts +4 -0
- package/dist/lib/agent-status.d.ts.map +1 -0
- package/dist/lib/agent-status.js +59 -0
- package/dist/lib/agent-status.js.map +1 -0
- package/dist/lib/agent-types.d.ts +31 -0
- package/dist/lib/agent-types.d.ts.map +1 -0
- package/dist/lib/agent-types.js +2 -0
- package/dist/lib/agent-types.js.map +1 -0
- package/dist/lib/agents.d.ts +7 -49
- package/dist/lib/agents.d.ts.map +1 -1
- package/dist/lib/agents.js +8 -554
- package/dist/lib/agents.js.map +1 -1
- package/dist/lib/benchmark-execution.d.ts +9 -0
- package/dist/lib/benchmark-execution.d.ts.map +1 -0
- package/dist/lib/benchmark-execution.js +488 -0
- package/dist/lib/benchmark-execution.js.map +1 -0
- package/dist/lib/benchmark-paths.d.ts +11 -0
- package/dist/lib/benchmark-paths.d.ts.map +1 -0
- package/dist/lib/benchmark-paths.js +38 -0
- package/dist/lib/benchmark-paths.js.map +1 -0
- package/dist/lib/benchmark-specs.d.ts +8 -0
- package/dist/lib/benchmark-specs.d.ts.map +1 -0
- package/dist/lib/benchmark-specs.js +115 -0
- package/dist/lib/benchmark-specs.js.map +1 -0
- package/dist/lib/benchmark-targets.d.ts +5 -0
- package/dist/lib/benchmark-targets.d.ts.map +1 -0
- package/dist/lib/benchmark-targets.js +72 -0
- package/dist/lib/benchmark-targets.js.map +1 -0
- package/dist/lib/benchmark-types.d.ts +19 -0
- package/dist/lib/benchmark-types.d.ts.map +1 -0
- package/dist/lib/benchmark-types.js +2 -0
- package/dist/lib/benchmark-types.js.map +1 -0
- package/dist/lib/benchmark.d.ts +4 -29
- package/dist/lib/benchmark.d.ts.map +1 -1
- package/dist/lib/benchmark.js +3 -324
- package/dist/lib/benchmark.js.map +1 -1
- package/dist/lib/bundled-templates.d.ts +5 -0
- package/dist/lib/bundled-templates.d.ts.map +1 -0
- package/dist/lib/bundled-templates.js +23 -0
- package/dist/lib/bundled-templates.js.map +1 -0
- package/dist/lib/config.d.ts +1 -0
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/config.js +2 -0
- package/dist/lib/config.js.map +1 -1
- package/dist/lib/eval-packs.d.ts +204 -0
- package/dist/lib/eval-packs.d.ts.map +1 -0
- package/dist/lib/eval-packs.js +177 -0
- package/dist/lib/eval-packs.js.map +1 -0
- package/dist/lib/execution-profile.d.ts +18 -0
- package/dist/lib/execution-profile.d.ts.map +1 -0
- package/dist/lib/execution-profile.js +85 -0
- package/dist/lib/execution-profile.js.map +1 -0
- package/dist/lib/interf-bootstrap.d.ts +4 -0
- package/dist/lib/interf-bootstrap.d.ts.map +1 -1
- package/dist/lib/interf-bootstrap.js +71 -68
- package/dist/lib/interf-bootstrap.js.map +1 -1
- package/dist/lib/interf-compile-plan.d.ts +12 -0
- package/dist/lib/interf-compile-plan.d.ts.map +1 -0
- package/dist/lib/interf-compile-plan.js +143 -0
- package/dist/lib/interf-compile-plan.js.map +1 -0
- package/dist/lib/interf-detect.d.ts.map +1 -1
- package/dist/lib/interf-detect.js +11 -10
- package/dist/lib/interf-detect.js.map +1 -1
- package/dist/lib/interf-scaffold.d.ts +1 -10
- package/dist/lib/interf-scaffold.d.ts.map +1 -1
- package/dist/lib/interf-scaffold.js +25 -362
- package/dist/lib/interf-scaffold.js.map +1 -1
- package/dist/lib/interf-workflow-package.d.ts +4 -0
- package/dist/lib/interf-workflow-package.d.ts.map +1 -0
- package/dist/lib/interf-workflow-package.js +131 -0
- package/dist/lib/interf-workflow-package.js.map +1 -0
- package/dist/lib/interf.d.ts +2 -1
- package/dist/lib/interf.d.ts.map +1 -1
- package/dist/lib/interf.js +2 -1
- package/dist/lib/interf.js.map +1 -1
- package/dist/lib/local-workflows.d.ts.map +1 -1
- package/dist/lib/local-workflows.js +8 -12
- package/dist/lib/local-workflows.js.map +1 -1
- package/dist/lib/logger.d.ts +4 -0
- package/dist/lib/logger.d.ts.map +1 -0
- package/dist/lib/logger.js +11 -0
- package/dist/lib/logger.js.map +1 -0
- package/dist/lib/obsidian.d.ts.map +1 -1
- package/dist/lib/obsidian.js +7 -3
- package/dist/lib/obsidian.js.map +1 -1
- package/dist/lib/parse.d.ts +2 -2
- package/dist/lib/parse.d.ts.map +1 -1
- package/dist/lib/parse.js +11 -7
- package/dist/lib/parse.js.map +1 -1
- package/dist/lib/registry.js +3 -3
- package/dist/lib/registry.js.map +1 -1
- package/dist/lib/runtime-acceptance.d.ts +4 -0
- package/dist/lib/runtime-acceptance.d.ts.map +1 -0
- package/dist/lib/runtime-acceptance.js +123 -0
- package/dist/lib/runtime-acceptance.js.map +1 -0
- package/dist/lib/runtime-contracts.d.ts +4 -0
- package/dist/lib/runtime-contracts.d.ts.map +1 -0
- package/dist/lib/runtime-contracts.js +63 -0
- package/dist/lib/runtime-contracts.js.map +1 -0
- package/dist/lib/runtime-paths.d.ts +8 -0
- package/dist/lib/runtime-paths.d.ts.map +1 -0
- package/dist/lib/runtime-paths.js +28 -0
- package/dist/lib/runtime-paths.js.map +1 -0
- package/dist/lib/runtime-prompt.d.ts +3 -0
- package/dist/lib/runtime-prompt.d.ts.map +1 -0
- package/dist/lib/runtime-prompt.js +59 -0
- package/dist/lib/runtime-prompt.js.map +1 -0
- package/dist/lib/runtime-reconcile.d.ts +6 -0
- package/dist/lib/runtime-reconcile.d.ts.map +1 -0
- package/dist/lib/runtime-reconcile.js +339 -0
- package/dist/lib/runtime-reconcile.js.map +1 -0
- package/dist/lib/runtime-runs.d.ts +12 -0
- package/dist/lib/runtime-runs.d.ts.map +1 -0
- package/dist/lib/runtime-runs.js +337 -0
- package/dist/lib/runtime-runs.js.map +1 -0
- package/dist/lib/runtime-types.d.ts +42 -0
- package/dist/lib/runtime-types.d.ts.map +1 -0
- package/dist/lib/runtime-types.js +2 -0
- package/dist/lib/runtime-types.js.map +1 -0
- package/dist/lib/runtime.d.ts +6 -58
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/runtime.js +5 -614
- package/dist/lib/runtime.js.map +1 -1
- package/dist/lib/schema.d.ts +156 -13
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +113 -4
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/source-config.d.ts +13 -0
- package/dist/lib/source-config.d.ts.map +1 -0
- package/dist/lib/source-config.js +75 -0
- package/dist/lib/source-config.js.map +1 -0
- package/dist/lib/state-artifacts.d.ts +15 -0
- package/dist/lib/state-artifacts.d.ts.map +1 -0
- package/dist/lib/state-artifacts.js +24 -0
- package/dist/lib/state-artifacts.js.map +1 -0
- package/dist/lib/state-health.d.ts +9 -0
- package/dist/lib/state-health.d.ts.map +1 -0
- package/dist/lib/state-health.js +330 -0
- package/dist/lib/state-health.js.map +1 -0
- package/dist/lib/state-io.d.ts +15 -0
- package/dist/lib/state-io.d.ts.map +1 -0
- package/dist/lib/state-io.js +219 -0
- package/dist/lib/state-io.js.map +1 -0
- package/dist/lib/state-paths.d.ts +5 -0
- package/dist/lib/state-paths.d.ts.map +1 -0
- package/dist/lib/state-paths.js +19 -0
- package/dist/lib/state-paths.js.map +1 -0
- package/dist/lib/state-view.d.ts +7 -0
- package/dist/lib/state-view.d.ts.map +1 -0
- package/dist/lib/state-view.js +147 -0
- package/dist/lib/state-view.js.map +1 -0
- package/dist/lib/state.d.ts +6 -46
- package/dist/lib/state.d.ts.map +1 -1
- package/dist/lib/state.js +5 -632
- package/dist/lib/state.js.map +1 -1
- package/dist/lib/summarize-plan.d.ts +1 -0
- package/dist/lib/summarize-plan.d.ts.map +1 -1
- package/dist/lib/summarize-plan.js +10 -0
- package/dist/lib/summarize-plan.js.map +1 -1
- package/dist/lib/user-config.js +2 -2
- package/dist/lib/user-config.js.map +1 -1
- package/dist/lib/validate-helpers.d.ts +21 -0
- package/dist/lib/validate-helpers.d.ts.map +1 -0
- package/dist/lib/validate-helpers.js +72 -0
- package/dist/lib/validate-helpers.js.map +1 -0
- package/dist/lib/validate-interface.d.ts +2 -0
- package/dist/lib/validate-interface.d.ts.map +1 -1
- package/dist/lib/validate-interface.js +103 -53
- package/dist/lib/validate-interface.js.map +1 -1
- package/dist/lib/validate-kb.d.ts +8 -0
- package/dist/lib/validate-kb.d.ts.map +1 -1
- package/dist/lib/validate-kb.js +53 -24
- package/dist/lib/validate-kb.js.map +1 -1
- package/dist/lib/validate.d.ts +1 -1
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +5 -2
- package/dist/lib/validate.js.map +1 -1
- package/dist/lib/workflow-definitions.d.ts +1 -1
- package/dist/lib/workflow-definitions.d.ts.map +1 -1
- package/dist/lib/workflow-definitions.js +90 -166
- 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 +6 -3
- package/dist/lib/workflow-helpers.js.map +1 -1
- package/dist/lib/workflow-stage-runner.d.ts +41 -0
- package/dist/lib/workflow-stage-runner.d.ts.map +1 -0
- package/dist/lib/workflow-stage-runner.js +106 -0
- package/dist/lib/workflow-stage-runner.js.map +1 -0
- package/dist/lib/workflow-starter-docs.d.ts +9 -0
- package/dist/lib/workflow-starter-docs.d.ts.map +1 -0
- package/dist/lib/workflow-starter-docs.js +18 -0
- package/dist/lib/workflow-starter-docs.js.map +1 -0
- package/dist/lib/workflows-interface-contracts.d.ts +24 -0
- package/dist/lib/workflows-interface-contracts.d.ts.map +1 -0
- package/dist/lib/workflows-interface-contracts.js +304 -0
- package/dist/lib/workflows-interface-contracts.js.map +1 -0
- package/dist/lib/workflows-interface.d.ts +3 -10
- package/dist/lib/workflows-interface.d.ts.map +1 -1
- package/dist/lib/workflows-interface.js +117 -365
- package/dist/lib/workflows-interface.js.map +1 -1
- package/dist/lib/workflows-kb.d.ts.map +1 -1
- package/dist/lib/workflows-kb.js +79 -55
- package/dist/lib/workflows-kb.js.map +1 -1
- package/dist/lib/workflows.d.ts.map +1 -1
- package/dist/lib/workflows.js +1 -1
- package/dist/lib/workflows.js.map +1 -1
- package/package.json +15 -4
- package/skills/interface/analyze/SKILL.md +79 -28
- package/skills/interface/compile/SKILL.md +27 -28
- package/skills/interface/create/SKILL.md +53 -230
- package/skills/interface/create/references/compile-plan-format.md +31 -31
- package/skills/interface/create/references/workflows.md +17 -32
- package/skills/interface/query/SKILL.md +15 -1
- package/skills/interface/retrieve/SKILL.md +32 -65
- package/skills/knowledge-base/compile/SKILL.md +59 -83
- package/skills/knowledge-base/compile/references/stage-claims.md +1 -1
- package/skills/knowledge-base/compile/references/stage-entities.md +2 -2
- package/skills/knowledge-base/query/SKILL.md +13 -1
- package/skills/knowledge-base/summarize/SKILL.md +54 -24
- package/templates/interface/README.md +13 -12
- package/templates/interface/interfaces.md +14 -11
- package/templates/knowledge-base/README.md +0 -1
- package/templates/knowledge-base/registry.md +15 -15
- package/templates/workflow-package/README.md +16 -0
- package/templates/workflow-package/create/SKILL.md +8 -0
- package/templates/workflow-package/interface-query/SKILL.md +29 -0
- package/templates/workflow-package/interface-stage/SKILL.md +13 -0
- package/templates/workflow-package/knowledge-base-query/SKILL.md +36 -0
- package/templates/workflow-package/knowledge-base-stage/SKILL.md +13 -0
- package/templates/workflow-starters/interface/interf/README.md +13 -0
- package/templates/workflow-starters/interface/interf/create/SKILL.md +15 -0
- package/templates/workflow-starters/knowledge-base/interf/README.md +13 -0
- package/templates/workflow-starters/knowledge-base/karpathy/README.md +13 -0
package/README.md
CHANGED
|
@@ -1,272 +1,277 @@
|
|
|
1
1
|
# Interf
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Interf Knowledge Compiler uses local agents such as Claude Code and Codex to run a data-processing workflow over your files.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
It creates a workspace with notes and navigation so the agent can see what is in the folder and what to retrieve.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- create focused interfaces for specific tasks
|
|
9
|
-
- run evals and benchmarks on your own files
|
|
7
|
+
Then you test that workspace on your evals.
|
|
10
8
|
|
|
11
|
-
|
|
9
|
+
- your files stay on your machine
|
|
10
|
+
- you choose the local agent
|
|
11
|
+
- you decide what must be true
|
|
12
12
|
|
|
13
|
-
|
|
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
14
|
|
|
15
|
-
|
|
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
|
|
16
20
|
|
|
17
|
-
|
|
18
|
-
- the workflow should leave proof of work on disk
|
|
19
|
-
- the method should be benchmarkable on your task
|
|
21
|
+
The workspace exists so the agent does not have to rediscover the folder from scratch on every run.
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
The point is proof on your data, not generic AI claims.
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
2. compile a knowledge base
|
|
25
|
-
3. create an interface for a job
|
|
26
|
-
4. run evals and benchmarks to see what actually works
|
|
25
|
+
The simplest way to use Interf is to compare the same task before and after compilation:
|
|
27
26
|
|
|
28
|
-
|
|
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`
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
- **Knowledge base**: `interf/{name}/`, the shared compiled layer over that folder
|
|
32
|
-
- **Interface**: `interf/{name}/interfaces/{interface-name}/`, a task-specific surface on top of one knowledge base
|
|
33
|
-
- **Workflow**: the reusable method package that defines the compile pipeline
|
|
34
|
-
- **Benchmark**: running evals across compiled knowledge bases or interfaces on the same folder
|
|
32
|
+
## Quick Start
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
Requirements:
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
- Node.js 20+
|
|
37
|
+
- a local coding agent: Claude Code or Codex
|
|
39
38
|
|
|
40
|
-
|
|
39
|
+
Install and check setup:
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- **benchmark specs**: file-based evals let you compare workflows and interfaces on the same folder
|
|
47
|
-
|
|
48
|
-
That is the core product promise:
|
|
49
|
-
|
|
50
|
-
- define what the agent should do in plain English
|
|
51
|
-
- give the agent local workspace docs and stage contracts
|
|
52
|
-
- validate the result deterministically
|
|
53
|
-
|
|
54
|
-
For workflow authors, the important surface is:
|
|
55
|
-
|
|
56
|
-
- `workflow.json`
|
|
57
|
-
- `workflow/create/`
|
|
58
|
-
- `workflow/compile/stages/<stage>/`
|
|
59
|
-
- `workflow/use/query/`
|
|
60
|
-
- [`docs/workflow-spec.md`](./docs/workflow-spec.md)
|
|
61
|
-
|
|
62
|
-
## What the agent sees
|
|
63
|
-
|
|
64
|
-
The compiled folder is the agent-facing product surface: an agent-ready workspace.
|
|
65
|
-
|
|
66
|
-
Important files in a KB or interface:
|
|
41
|
+
```bash
|
|
42
|
+
npm install -g @interf/compiler
|
|
43
|
+
interf doctor
|
|
44
|
+
```
|
|
67
45
|
|
|
68
|
-
|
|
69
|
-
- `AGENTS.md` = where to start and how to navigate
|
|
70
|
-
- `workflow/` = the editable local method package
|
|
71
|
-
- `home.md` = entry document
|
|
72
|
-
- `summaries/`, `knowledge/`, and `briefs/` = compiled outputs
|
|
46
|
+
Then run Interf in any folder:
|
|
73
47
|
|
|
74
|
-
|
|
48
|
+
```bash
|
|
49
|
+
cd ~/my-folder
|
|
50
|
+
interf init
|
|
51
|
+
interf compile
|
|
52
|
+
interf benchmark
|
|
53
|
+
```
|
|
75
54
|
|
|
76
|
-
|
|
77
|
-
- read `AGENTS.md`
|
|
78
|
-
- follow `workflow/use/query/SKILL.md`
|
|
79
|
-
- for interfaces, use local interface artifacts first, then the parent KB loop, then raw files if needed
|
|
55
|
+
That is the whole first loop:
|
|
80
56
|
|
|
81
|
-
|
|
57
|
+
- point Interf at a folder you already have
|
|
58
|
+
- compile the workspace
|
|
59
|
+
- ask the agent to use it
|
|
60
|
+
- add evals later when you want to check the result more formally
|
|
82
61
|
|
|
83
|
-
|
|
62
|
+
`interf init` chooses your local agent and can attach the current folder right away. It does not move or replace your files.
|
|
84
63
|
|
|
85
|
-
|
|
64
|
+
Fastest sample loop:
|
|
86
65
|
|
|
87
66
|
```bash
|
|
88
|
-
|
|
67
|
+
cp -r examples/benchmark-demo /tmp/interf-demo
|
|
68
|
+
cd /tmp/interf-demo
|
|
69
|
+
interf init
|
|
70
|
+
interf compile
|
|
71
|
+
interf benchmark
|
|
89
72
|
```
|
|
90
73
|
|
|
91
|
-
|
|
74
|
+
If you want a task-specific workspace for one job, add an interface:
|
|
92
75
|
|
|
93
76
|
```bash
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
77
|
+
interf create interface
|
|
78
|
+
interf compile
|
|
79
|
+
interf benchmark
|
|
97
80
|
```
|
|
98
81
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
82
|
+
## Start With One Small Eval
|
|
83
|
+
|
|
84
|
+
`interf.config.json` is where you write what must be true.
|
|
85
|
+
|
|
86
|
+
Use it for:
|
|
87
|
+
|
|
88
|
+
- broad checks on the folder as a whole
|
|
89
|
+
- task-specific checks for one interface
|
|
90
|
+
|
|
91
|
+
Example shape:
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"knowledge_base": {
|
|
96
|
+
"name": "uk-office-market-report",
|
|
97
|
+
"evals": [
|
|
98
|
+
{
|
|
99
|
+
"question": "What was Bristol annual take-up in 2018, in millions of square feet?",
|
|
100
|
+
"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."
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
"interfaces": [
|
|
105
|
+
{
|
|
106
|
+
"name": "market-briefing",
|
|
107
|
+
"about": "Prepare a short briefing from the office market report.",
|
|
108
|
+
"evals": [
|
|
109
|
+
{
|
|
110
|
+
"question": "What was Bristol availability in 2018, in millions of square feet?",
|
|
111
|
+
"answer": "About 0.6 million square feet. Accept answers between 0.5 and 0.7 if they clearly refer to Bristol availability in 2018."
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"question": "Did Bristol annual take-up rise or fall between 2016 and 2018?",
|
|
115
|
+
"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."
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
}
|
|
104
121
|
```
|
|
105
122
|
|
|
106
|
-
|
|
123
|
+
Good first evals are small and practical:
|
|
107
124
|
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
- compile the knowledge base immediately
|
|
125
|
+
- one exact number from a chart, table, or filing
|
|
126
|
+
- one short statement that should be true or false
|
|
127
|
+
- one simple comparison across years, files, or sections
|
|
112
128
|
|
|
113
|
-
Then
|
|
129
|
+
Then run:
|
|
114
130
|
|
|
115
131
|
```bash
|
|
116
|
-
interf create interface
|
|
117
132
|
interf compile
|
|
118
133
|
interf benchmark
|
|
119
134
|
```
|
|
120
135
|
|
|
121
|
-
|
|
136
|
+
If the benchmark does not show an improvement over raw files, keep iterating or move to the experiment loop described below.
|
|
122
137
|
|
|
123
|
-
|
|
124
|
-
source-folder/
|
|
125
|
-
...your files...
|
|
126
|
-
interf/
|
|
127
|
-
workflows/
|
|
128
|
-
benchmarks/
|
|
129
|
-
{knowledge-base-name}/
|
|
130
|
-
interf.json
|
|
131
|
-
AGENTS.md
|
|
132
|
-
CLAUDE.md
|
|
133
|
-
home.md
|
|
134
|
-
workflow/
|
|
135
|
-
summaries/
|
|
136
|
-
knowledge/
|
|
137
|
-
interfaces/
|
|
138
|
-
{interface-name}/
|
|
139
|
-
interf.json
|
|
140
|
-
compile-plan.md
|
|
141
|
-
AGENTS.md
|
|
142
|
-
CLAUDE.md
|
|
143
|
-
home.md
|
|
144
|
-
workflow/
|
|
145
|
-
knowledge/
|
|
146
|
-
briefs/
|
|
147
|
-
summaries/
|
|
148
|
-
```
|
|
138
|
+
## Compare Three Things
|
|
149
139
|
|
|
150
|
-
|
|
140
|
+
Compare:
|
|
151
141
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
- `interf create interface` = create an interface for the current folder's knowledge base
|
|
156
|
-
- `interf create workflow` = create a reusable workflow package
|
|
157
|
-
- `interf compile` = compile the current knowledge base or interface
|
|
158
|
-
- `interf benchmark` = compare compiled knowledge bases or interfaces with file-based evals
|
|
159
|
-
- `interf doctor` = preflight local executor setup before a real compile
|
|
160
|
-
- `interf status` = show deterministic health
|
|
161
|
-
- `interf verify <check>` = internal deterministic referee for major workflow steps
|
|
162
|
-
- `interf reset <scope>` = reset generated state while keeping source files
|
|
142
|
+
1. the raw folder
|
|
143
|
+
2. the workspace
|
|
144
|
+
3. an interface for one specific job
|
|
163
145
|
|
|
164
|
-
|
|
146
|
+
`interf benchmark` is how you compare those on the same evals.
|
|
165
147
|
|
|
166
|
-
|
|
148
|
+
That gives you one clear question:
|
|
167
149
|
|
|
168
|
-
|
|
150
|
+
- is the raw folder enough?
|
|
151
|
+
- does the workspace retrieve better?
|
|
152
|
+
- does a dedicated interface do better than both?
|
|
169
153
|
|
|
170
|
-
|
|
171
|
-
- human/agent layer: `workflow/` docs
|
|
154
|
+
## What `interf compile` Actually Does
|
|
172
155
|
|
|
173
|
-
|
|
156
|
+
`interf compile` runs a workflow over your folder.
|
|
174
157
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
SKILL.md
|
|
188
|
-
```
|
|
158
|
+
That workflow is the compilation pipeline:
|
|
159
|
+
|
|
160
|
+
- read the files
|
|
161
|
+
- write processed notes and navigation files
|
|
162
|
+
- build the workspace your agent can use
|
|
163
|
+
- optionally build an interface for one specific job
|
|
164
|
+
|
|
165
|
+
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.
|
|
166
|
+
|
|
167
|
+
## Experiment Loop
|
|
168
|
+
|
|
169
|
+
Interf Knowledge Compiler also supports an experiment loop above compile + benchmark.
|
|
189
170
|
|
|
190
|
-
|
|
171
|
+
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:
|
|
191
172
|
|
|
192
|
-
|
|
173
|
+
- the evals pass
|
|
174
|
+
- or the experiment budget is exhausted
|
|
193
175
|
|
|
194
|
-
|
|
176
|
+
In practice, that means:
|
|
195
177
|
|
|
196
|
-
|
|
178
|
+
- `retry_policy.max_attempts_per_profile` controls how many experiment attempts each compile profile gets
|
|
179
|
+
- stronger diagnostic profiles can be used only after the default ones fail
|
|
180
|
+
- the loop is still judged on the same eval truth from your folder
|
|
181
|
+
- failure summaries can be captured between attempts for diagnosis
|
|
197
182
|
|
|
198
|
-
|
|
199
|
-
- compare workflows on the same source set
|
|
200
|
-
- compare interfaces for the same business task
|
|
201
|
-
- inspect proofs, outputs, and costs locally
|
|
183
|
+
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.
|
|
202
184
|
|
|
203
|
-
|
|
185
|
+
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.
|
|
186
|
+
|
|
187
|
+
## Use It With Your Agent
|
|
188
|
+
|
|
189
|
+
If you already work through Claude Code, Codex, OpenClaw, or Hermes, the agent can run this loop for you.
|
|
190
|
+
|
|
191
|
+
Paste something like this into Claude Code, Codex, OpenClaw, or Hermes:
|
|
204
192
|
|
|
205
193
|
```text
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
194
|
+
Install @interf/compiler, run `interf init` in this folder, and use the local agent executor.
|
|
195
|
+
|
|
196
|
+
If `interf.config.json` is missing, draft evals for what must be true for this task and ask me to confirm them.
|
|
197
|
+
|
|
198
|
+
Then run `interf compile` and `interf benchmark`.
|
|
199
|
+
|
|
200
|
+
Tell me whether the processed workspace beat raw files, and only recommend it if it did.
|
|
212
201
|
```
|
|
213
202
|
|
|
214
|
-
|
|
203
|
+
That is the basic loop:
|
|
215
204
|
|
|
216
|
-
|
|
205
|
+
- the user or agent defines what must be true
|
|
206
|
+
- Interf prepares processed data for retrieval
|
|
207
|
+
- the benchmark shows whether that helped
|
|
217
208
|
|
|
218
|
-
|
|
209
|
+
## What Gets Created
|
|
219
210
|
|
|
220
|
-
|
|
221
|
-
2. [`docs/runtime-contract.md`](./docs/runtime-contract.md)
|
|
222
|
-
3. [`docs/architecture.md`](./docs/architecture.md)
|
|
211
|
+
After compile, Interf writes into `./interf/` beside your source files.
|
|
223
212
|
|
|
224
|
-
|
|
213
|
+
- `interf/<name>/` is the shared workspace over the folder
|
|
214
|
+
- `interf/<name>/interfaces/<name>/` is a task-specific workspace for one job
|
|
215
|
+
- `interf/benchmarks/runs/...` stores saved benchmark runs
|
|
225
216
|
|
|
226
|
-
|
|
217
|
+
Inside those workspaces you will see things like:
|
|
227
218
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
219
|
+
- summaries of source files
|
|
220
|
+
- navigation notes and entrypoints for agents
|
|
221
|
+
- task-specific outputs for one interface
|
|
222
|
+
- benchmark artifacts you can inspect later
|
|
231
223
|
|
|
232
|
-
|
|
224
|
+
In the CLI, the main Interf workspace is called a **knowledge base**. A task-specific workspace inside it is called an **interface**.
|
|
233
225
|
|
|
234
|
-
|
|
235
|
-
npm run test:e2e
|
|
236
|
-
npm run test:e2e:compare
|
|
237
|
-
```
|
|
226
|
+
## When To Create An Interface
|
|
238
227
|
|
|
239
|
-
|
|
228
|
+
Start with one workspace.
|
|
240
229
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
230
|
+
Create an interface when your agent needs outputs shaped for one specific job, for example:
|
|
231
|
+
|
|
232
|
+
- weekly briefing
|
|
233
|
+
- diligence on a deal room
|
|
234
|
+
- extracting chart values from research PDFs
|
|
235
|
+
- a focused research assistant for one question set
|
|
245
236
|
|
|
246
|
-
|
|
237
|
+
If that workspace is enough for the job, you do not need an interface yet.
|
|
238
|
+
|
|
239
|
+
## Custom Workflows
|
|
240
|
+
|
|
241
|
+
Interf ships with a default workflow.
|
|
242
|
+
|
|
243
|
+
If you want to change how compilation happens on your data, this is the part you customize:
|
|
247
244
|
|
|
248
245
|
```bash
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
npm run test:acceptance-cache:refresh
|
|
252
|
-
npm run test:acceptance-quick:create-interface
|
|
253
|
-
npm run test:acceptance-quick:query-interface
|
|
246
|
+
interf create workflow
|
|
247
|
+
interf verify workflow --path <path>
|
|
254
248
|
```
|
|
255
249
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
250
|
+
Then benchmark that workflow on the same folder and the same evals.
|
|
251
|
+
|
|
252
|
+
Workflow package docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
|
|
253
|
+
|
|
254
|
+
## Core Commands
|
|
255
|
+
|
|
256
|
+
- `interf init` = choose your local executor and optionally attach the current folder
|
|
257
|
+
- `interf create knowledge-base` = create the shared processed workspace for this folder
|
|
258
|
+
- `interf create interface` = create a task-specific workspace on top
|
|
259
|
+
- `interf create workflow` = create a reusable local workflow package
|
|
260
|
+
- `interf compile` = build the current workspace
|
|
261
|
+
- `interf benchmark` = compare raw files vs processed workspaces on your evals
|
|
262
|
+
- `interf doctor` = check local executor setup
|
|
263
|
+
- `interf verify <check>` = run deterministic checks on major workflow steps
|
|
264
|
+
- `interf reset <scope>` = remove generated state while keeping source files
|
|
259
265
|
|
|
260
|
-
##
|
|
266
|
+
## More Docs
|
|
261
267
|
|
|
262
|
-
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
- local control: your files stay on disk and run in your environment
|
|
268
|
+
- [docs/workflow-spec.md](./docs/workflow-spec.md) for custom workflow packages
|
|
269
|
+
- [docs/runtime-contract.md](./docs/runtime-contract.md) for the exact on-disk contract
|
|
270
|
+
- [docs/architecture.md](./docs/architecture.md) for the deeper system model
|
|
271
|
+
- [docs/eval-loop.md](./docs/eval-loop.md) for the advanced benchmark and experiment loop
|
|
267
272
|
|
|
268
|
-
|
|
273
|
+
Maintainers should use [CONTRIBUTING.md](./CONTRIBUTING.md) for test and release gates.
|
|
269
274
|
|
|
270
275
|
## License
|
|
271
276
|
|
|
272
|
-
Code is licensed under Apache 2.0. The `Interf` name and branding are reserved; see [
|
|
277
|
+
Code is licensed under Apache 2.0. The `Interf` name and branding are reserved; see [TRADEMARKS.md](./TRADEMARKS.md).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"benchmark.d.ts","sourceRoot":"","sources":["../../src/commands/benchmark.ts"],"names":[],"mappings":"
|
|
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"}
|