@interf/compiler 0.18.0 → 0.21.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 (129) hide show
  1. package/README.md +87 -73
  2. package/dist/cli/commands/mcp.d.ts +0 -34
  3. package/dist/cli/commands/mcp.js +246 -45
  4. package/dist/cli/commands/method.js +261 -15
  5. package/dist/cli/commands/prep.js +61 -16
  6. package/dist/cli/commands/runs.js +103 -9
  7. package/dist/cli/commands/status.js +4 -2
  8. package/dist/cli/commands/test.d.ts +10 -0
  9. package/dist/cli/commands/{verify.js → test.js} +16 -18
  10. package/dist/cli/commands/web.js +82 -8
  11. package/dist/cli/commands/wizard.js +36 -37
  12. package/dist/cli/index.d.ts +2 -2
  13. package/dist/cli/index.js +3 -3
  14. package/dist/compiler-ui/404.html +1 -1
  15. package/dist/compiler-ui/__next.__PAGE__.txt +5 -5
  16. package/dist/compiler-ui/__next._full.txt +13 -12
  17. package/dist/compiler-ui/__next._head.txt +3 -3
  18. package/dist/compiler-ui/__next._index.txt +5 -4
  19. package/dist/compiler-ui/__next._tree.txt +4 -3
  20. package/dist/compiler-ui/_next/static/chunks/01646j7yi.w5a.css +1 -0
  21. package/dist/compiler-ui/_next/static/chunks/{0n51hrfoufc7g.js → 02f_.8.ebn556.js} +1 -1
  22. package/dist/compiler-ui/_next/static/chunks/02r7siaw-_p5w.js +1 -0
  23. package/dist/compiler-ui/_next/static/chunks/{08m7vf5asqlsm.js → 04d0ly-7xb~-j.js} +10 -10
  24. package/dist/compiler-ui/_next/static/chunks/0fhs9psnxqd8s.js +1 -0
  25. package/dist/compiler-ui/_next/static/chunks/0mssmhpbifj15.css +2 -0
  26. package/dist/compiler-ui/_next/static/chunks/0nypu~ddwxari.js +116 -0
  27. package/dist/compiler-ui/_next/static/chunks/0p3s8iyhgcww2.js +31 -0
  28. package/dist/compiler-ui/_next/static/chunks/0tjf-vu_rz8s0.css +1 -0
  29. package/dist/compiler-ui/_next/static/chunks/0u6p3fpbbfgtl.js +1 -0
  30. package/dist/compiler-ui/_next/static/chunks/0wpx5..8dnh0w.js +1 -0
  31. package/dist/compiler-ui/_next/static/chunks/0y0uj160p0ts~.js +1 -0
  32. package/dist/compiler-ui/_next/static/chunks/10t8l~_oenf.c.js +1 -0
  33. package/dist/compiler-ui/_next/static/chunks/13gz9e7z~imx1.js +5 -0
  34. package/dist/compiler-ui/_next/static/chunks/156xed-b6czaw.js +1 -0
  35. package/dist/compiler-ui/_next/static/chunks/{turbopack-0.uq1k8c0j4s..js → turbopack-02-3e_c-yz~5g.js} +1 -1
  36. package/dist/compiler-ui/_next/static/chunks/{turbopack-10e~t1yzi4svj.js → turbopack-0apv8vb-nczuy.js} +1 -1
  37. package/dist/compiler-ui/_not-found/__next._full.txt +10 -9
  38. package/dist/compiler-ui/_not-found/__next._head.txt +3 -3
  39. package/dist/compiler-ui/_not-found/__next._index.txt +5 -4
  40. package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +2 -2
  41. package/dist/compiler-ui/_not-found/__next._not-found.txt +3 -3
  42. package/dist/compiler-ui/_not-found/__next._tree.txt +3 -2
  43. package/dist/compiler-ui/_not-found.html +1 -1
  44. package/dist/compiler-ui/_not-found.txt +10 -9
  45. package/dist/compiler-ui/index.html +1 -1
  46. package/dist/compiler-ui/index.txt +13 -12
  47. package/dist/packages/contracts/lib/schema.d.ts +4 -0
  48. package/dist/packages/contracts/lib/schema.js +2 -1
  49. package/dist/packages/engine/action-definitions.d.ts +174 -13
  50. package/dist/packages/engine/action-definitions.js +125 -122
  51. package/dist/packages/engine/action-planner.js +4 -11
  52. package/dist/packages/engine/agents/lib/shells.d.ts +3 -1
  53. package/dist/packages/engine/agents/lib/shells.js +8 -4
  54. package/dist/packages/engine/agents/role-executors.js +1 -1
  55. package/dist/packages/engine/compile/compiled-paths.js +6 -6
  56. package/dist/packages/engine/connection-config.js +1 -1
  57. package/dist/packages/engine/execution/lib/schema.d.ts +10 -0
  58. package/dist/packages/engine/instance-paths.d.ts +15 -9
  59. package/dist/packages/engine/instance-paths.js +15 -9
  60. package/dist/packages/engine/lib/schema.d.ts +686 -30
  61. package/dist/packages/engine/lib/schema.js +48 -21
  62. package/dist/packages/engine/native-run-handlers.js +10 -8
  63. package/dist/packages/engine/preparation-store.d.ts +9 -13
  64. package/dist/packages/engine/preparation-store.js +12 -0
  65. package/dist/packages/engine/requested-artifacts.d.ts +5 -0
  66. package/dist/packages/engine/requested-artifacts.js +36 -0
  67. package/dist/packages/engine/routes.d.ts +1 -1
  68. package/dist/packages/engine/routes.js +1 -1
  69. package/dist/packages/engine/run-observability.js +3 -2
  70. package/dist/packages/engine/runtime-proposal-helpers.d.ts +2 -2
  71. package/dist/packages/engine/runtime-proposal-helpers.js +5 -7
  72. package/dist/packages/engine/runtime-resource-builders.d.ts +5 -0
  73. package/dist/packages/engine/runtime-resource-builders.js +13 -2
  74. package/dist/packages/engine/runtime.d.ts +3 -1
  75. package/dist/packages/engine/runtime.js +146 -21
  76. package/dist/packages/engine/server.js +104 -52
  77. package/dist/packages/engine/verify/verify-execution.js +1 -1
  78. package/dist/packages/engine/wire-schemas.d.ts +5 -1
  79. package/dist/packages/engine/wire-schemas.js +1 -1
  80. package/dist/packages/methods/authoring/method-authoring.d.ts +3 -1
  81. package/dist/packages/methods/authoring/method-authoring.js +5 -36
  82. package/dist/packages/methods/package/builtin-compiled-method.js +1 -1
  83. package/dist/packages/methods/package/local-methods.d.ts +1 -0
  84. package/dist/packages/methods/package/local-methods.js +19 -4
  85. package/dist/packages/methods/package/method-definitions.js +1 -1
  86. package/dist/packages/project/interf-detect.js +6 -6
  87. package/dist/packages/project/lib/schema.d.ts +193 -0
  88. package/dist/packages/project/lib/schema.js +46 -1
  89. package/dist/packages/project/source-config.js +4 -0
  90. package/dist/packages/project/source-folders.js +1 -1
  91. package/package.json +7 -8
  92. package/public-repo/CONTRIBUTING.md +47 -0
  93. package/public-repo/LICENSE.md +1 -0
  94. package/public-repo/README.md +325 -0
  95. package/public-repo/SECURITY.md +67 -0
  96. package/public-repo/TRADEMARKS.md +8 -0
  97. package/{builtin-methods → public-repo/methods}/interf-default/README.md +4 -0
  98. package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/shape/SKILL.md +4 -8
  99. package/{builtin-methods → public-repo/methods}/interf-default/method.json +1 -1
  100. package/public-repo/methods/interf-default/use/query/SKILL.md +23 -0
  101. package/public-repo/plugins/README.md +9 -0
  102. package/public-repo/plugins/interf/.claude-plugin/plugin.json +21 -0
  103. package/public-repo/plugins/interf/.mcp.json +12 -0
  104. package/public-repo/plugins/interf/README.md +29 -0
  105. package/public-repo/plugins/interf/skills/interf/SKILL.md +477 -0
  106. package/public-repo/skills/interf/SKILL.md +477 -0
  107. package/agent-skills/interf-actions/SKILL.md +0 -185
  108. package/agent-skills/interf-actions/references/cli.md +0 -243
  109. package/builtin-methods/interf-default/use/query/SKILL.md +0 -28
  110. package/dist/cli/commands/verify.d.ts +0 -10
  111. package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +0 -5
  112. package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +0 -1
  113. package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +0 -1
  114. package/dist/compiler-ui/_next/static/chunks/0_c_tvh-cukjz.css +0 -3
  115. package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +0 -1
  116. package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +0 -1
  117. package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +0 -1
  118. package/dist/compiler-ui/_next/static/chunks/0f_geuwdesg_c.js +0 -114
  119. package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +0 -31
  120. package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +0 -1
  121. package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +0 -1
  122. package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +0 -1
  123. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_buildManifest.js +0 -0
  124. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_clientMiddlewareManifest.js +0 -0
  125. /package/dist/compiler-ui/_next/static/{6qyE1u9m_oBUkvAhhoCmO → tYHMLL9oKds1yDoNYgkPV}/_ssgManifest.js +0 -0
  126. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/structure/SKILL.md +0 -0
  127. /package/{builtin-methods → public-repo/methods}/interf-default/compile/stages/summarize/SKILL.md +0 -0
  128. /package/{builtin-methods → public-repo/methods}/interf-default/improve/SKILL.md +0 -0
  129. /package/{builtin-methods → public-repo/methods}/interf-default/method.schema.json +0 -0
@@ -0,0 +1,47 @@
1
+ # Contributing
2
+
3
+ This public surface contains the files users and agent hosts need to inspect:
4
+ the README, license and security docs, bundled Skills, plugin manifests, and
5
+ public Method packages.
6
+
7
+ The Interf engine source is private. Do not add private source paths,
8
+ maintainer docs, or internal repo instructions here.
9
+
10
+ ## What To Change Here
11
+
12
+ - Public product docs: `README.md`, `SECURITY.md`, `TRADEMARKS.md`.
13
+ - Agent Skills: `skills/interf/`.
14
+ - Host plugin bundles: `plugins/`.
15
+ - Public Method packages: `methods/`.
16
+
17
+ ## Public Method Packages
18
+
19
+ Method packages are inspectable folders. Keep them standalone:
20
+
21
+ - `method.json` declares the Build Plan stages and Artifact outputs.
22
+ - `method.schema.json` declares the output contract.
23
+ - `compile/stages/<stage>/SKILL.md` contains stage instructions.
24
+ - `use/query/SKILL.md` tells agents how to read the portable context.
25
+ - `improve/SKILL.md` tells Interf how to revise the plan when checks fail.
26
+
27
+ For the shipped default Method, edit `methods/interf-default/`.
28
+
29
+ ## Agent Skills And Plugins
30
+
31
+ Keep `skills/interf/SKILL.md` as the canonical Skill.
32
+
33
+ Plugin bundles should stay thin:
34
+
35
+ - host manifest
36
+ - copied Interf Skill when the host requires a local copy
37
+ - MCP configuration that launches `interf mcp`
38
+
39
+ The MCP server implementation ships inside `@interf/compiler`.
40
+
41
+ ## Before Opening A PR
42
+
43
+ Check that public docs do not reference private paths such as internal source
44
+ trees, maintainer-only docs, or local machine paths.
45
+
46
+ If you changed a Method package, test it with an installed `@interf/compiler`
47
+ runtime before submitting the change.
@@ -0,0 +1 @@
1
+ © 2026 Interf Inc. All rights reserved. Use is subject to Interf's [Commercial Terms of Service](https://interf.com/legal/commercial-terms).
@@ -0,0 +1,325 @@
1
+ # Interf
2
+
3
+ **Context compiler for agents.**
4
+
5
+ Interf prepares data for agent work by compiling source files into verifiable Artifacts and writing portable context that agents can read, so agents work from a verified full picture instead of guessing.
6
+
7
+ **Hallucinations aren't an agent problem. They're a data preparation problem.**
8
+
9
+ When agents start from source files, they have to discover the full picture while they work. That discovery is hidden: you cannot see which files were processed, which evidence was used, or which connections were found.
10
+
11
+ Interf replaces that hidden discovery with visible compilation. Your agent can ask for the Artifacts it needs — an atlas, index, timeline, summaries, or a custom file — and Interf drafts a Build Plan for you to review before compile. The draft says what should be built; the compile run proves what was actually processed. Under the hood, Interf saves that request as a Preparation, runs a Build Plan locally, records source references, and writes verifiable Artifacts agents can read. Today a Build Plan is implemented by a Method package.
12
+
13
+ ```text
14
+ Source files Portable context agents read
15
+
16
+ bristol-office-market/ <portable-context-locator>/
17
+ q4-market-report.pdf AGENTS.md
18
+ lease-comps.xlsx .interf/runtime/source-snapshot.json
19
+ planning-notes.md home.md
20
+ exports/availability.csv summaries/
21
+ knowledge/
22
+ ```
23
+
24
+ ## What a Compile Run Produces
25
+
26
+ A compile run produces portable context plus proof of work. The portable context is the folder agents read. The proof shows which source files were assigned, which Build Plan stages ran, what each stage wrote, and whether required artifacts exist.
27
+
28
+ For the built-in `interf-default` Build Plan, a compile run looks like this:
29
+
30
+ ```text
31
+ Source: bristol-office-market
32
+ Build Plan: interf-default
33
+ Requested Artifacts: atlas, summaries, knowledge, claims, indexes
34
+
35
+ compile run
36
+ record source references
37
+ summarize -> summaries/
38
+ structure -> knowledge/
39
+ shape -> home.md and agent entrypoints
40
+ record proof -> processed files, stage outputs, required artifacts
41
+
42
+ portable context
43
+ locator -> { kind: "local-path", value: "<local-path-returned-by-interf>" }
44
+ ```
45
+
46
+ The output is not an answer. It is a prepared local folder with routes, artifacts, source snapshots, and agent instructions. Your runtime agent reads that folder when it does the actual agent work.
47
+
48
+ ## Design Choices
49
+
50
+ - `Preparation-scoped`: every Preparation starts from a specific Source, requested Artifacts, and agent job, not a generic index over all your files.
51
+ - `Deterministic`: Interf runs each stage, an ordered phase of a Build Plan, and shows stage-by-stage proof of work: which files were processed, what each stage produced, and whether required outputs exist. Agents do not have to rebuild the full picture while they work.
52
+ - `Local-first and private`: your files, readiness checks, and agent runs stay on your machine. No cloud, no uploads, no telemetry.
53
+ - `Bring your own AI`: use Claude Code, Codex, or another local agent.
54
+ - `File over app`: the portable context is a local folder owned by the instance — no hidden store, no hidden index. Inspect it, diff it, version it.
55
+ - `Readiness checks you control`: every build can be checked against gates you wrote from the files. If the portable context is `not ready`, `interf test` shows the readiness evidence behind that status.
56
+
57
+ ## Why Not Just Ask Your Agent?
58
+
59
+ You can. Interf can use Claude Code, Codex, or another local agent while it builds the portable context.
60
+
61
+ A one-off preprocessing prompt gives you another agent answer to trust. Interf puts that work inside a Build Plan you can inspect: requested artifacts, declared stages, stage-by-stage proof of work, and readiness checks that decide whether the portable context is `ready` or `not ready`.
62
+
63
+ The agent can still execute the stages. Interf shows what ran, which files were processed, what artifacts and evidence were produced, and whether the result is ready for the agent work.
64
+
65
+ ## Install
66
+
67
+ ```bash
68
+ npm install -g @interf/compiler
69
+ interf # opens the wizard; start or connect an engine when needed
70
+ ```
71
+
72
+ 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.
73
+
74
+ ## Quick Start
75
+
76
+ ```bash
77
+ interf web # terminal 1: start the local engine
78
+ interf prep create bristol \ # terminal 2: save the source + requested Artifacts
79
+ --source ./bristol-office-market \
80
+ --about "Bristol annual take-up and availability chart lookup" \
81
+ --requested-artifacts-json '[{"title":"Guide to the report","checks":["Every page or file is listed.","Pages about Bristol and annual take-up are marked."]},{"title":"Annual take-up figures","checks":["Every figure has a source reference."]}]'
82
+ interf method draft bristol \ # draft the Build Plan for review
83
+ --task "Bristol annual take-up and availability chart lookup"
84
+ interf compile bristol # build portable context, returns the locator
85
+ interf test bristol # check readiness
86
+ ```
87
+
88
+ `interf web` starts the engine in the foreground and writes the active
89
+ connection record so subsequent CLI commands can connect. Agents can use
90
+ `interf web start` for an explicit managed background engine, then
91
+ `interf web stop` when their work is done. Mutating commands never implicitly
92
+ auto-start an engine — if no instance is connected, they exit with a hint
93
+ pointing at `interf web` / `interf web start` (local) or `interf login`
94
+ (future cloud).
95
+
96
+ `interf compile` returns the artifact locator on success — for a local
97
+ engine that's a `local-path` you can open with any tool. Point your agent at
98
+ that path. There's no `--out` flag, no implicit copy, no hidden store: the
99
+ instance owns the bytes and the API tells you where they are.
100
+
101
+ If you want a baseline before compile, run `interf test bristol --target source-files`. It is optional proof, not the main path.
102
+
103
+ ## Portable Context
104
+
105
+ The portable context is the local folder Interf writes from your files. Do not hardcode its location. The API returns a typed locator (`{ kind: "local-path" | "remote-url", value }`); your agent reads from there.
106
+
107
+ It gives agents evidence, structure, and cross-file connections for navigating the files. It is not a replacement for your files. For the built-in `interf-default`, it includes:
108
+
109
+ ```text
110
+ <portable-context-locator>/
111
+ AGENTS.md # agent-facing entry point and source-checking rules
112
+ CLAUDE.md # same guidance for Claude Code
113
+ .interf/
114
+ runtime/
115
+ source-snapshot.json # source references captured for the latest run
116
+ stages/ # per-stage source input lists
117
+ home.md # overview and routes for agents
118
+ summaries/ # one note per source file
119
+ knowledge/ # linked notes built from the files
120
+ ```
121
+
122
+ The source files stay the source of truth. Interf writes portable context inside the instance's data dir; it does not modify the source.
123
+
124
+ `AGENTS.md` tells agents how to use the portable context: start from the prepared outputs, follow the prepared routes, and use the recorded source references when exact source evidence matters.
125
+
126
+ Interf also records stage-by-stage proof of work: which files were processed, what each stage produced, and whether required outputs were created.
127
+
128
+ The portable context carries source references, not a mandatory copy of every source file. The source files remain where you keep them; Interf records which sources were assigned and what artifacts were produced from them.
129
+
130
+ ## Build Plans and Method Packages
131
+
132
+ A Build Plan tells Interf how to compile requested Artifacts from your source files for the job agents need to do. It can start as a draft inside one Preparation, based on the user's instructions, the agent goal, and the described Source. If it works, save it as a Method package and reuse it on another Source.
133
+
134
+ Today saved Build Plans are implemented as Method packages. The built-in `interf-default` Method package ships with `@interf/compiler`. Install your own with `interf method install <path>`; draft new ones with `interf method draft <prep-id>`.
135
+
136
+ ```text
137
+ <method-package>/
138
+ method.json # Build Plan: artifacts, stages, compile rules
139
+ method.schema.json # output contract: required portable-context files and folders
140
+ README.md # what this Build Plan is for
141
+ compile/
142
+ stages/
143
+ summarize/ # stage instructions Interf runs during compile
144
+ structure/
145
+ shape/
146
+ use/
147
+ query/ # how agents read the portable context
148
+ improve/ # how Interf revises this plan if readiness checks still fail
149
+ ```
150
+
151
+ - `method.json` describes the Build Plan: source data, requested artifacts, stages, and how the files should be compiled.
152
+ - `method.schema.json` describes the output contract: what the portable context must contain. Interf enforces it when you run `interf compile`.
153
+ - `compile/stages/<stage>/` is where you author one folder per stage — a small, specific phase like `summarize` or `structure`. You write the instructions; Interf runs them during compile.
154
+ - `use/query/` holds the instructions agents follow when they read the portable context for live agent work.
155
+ - `improve/` holds the instructions Interf follows when the first build misses and the Build Plan itself needs editing.
156
+
157
+ A Build Plan defines the stages, output contract, proof requirements, and improvement instructions Interf runs on your files. Technically, a saved/reusable Build Plan is stored as a Method package with `method.json` and `method.schema.json`. The result is portable context your agents can read.
158
+
159
+ ## Build Plan Improvement
160
+
161
+ When the first compile run still misses readiness checks, Interf edits the Build Plan and compiles again. Same files, same checks, improved plan and portable context. Run `interf method improve <prep-id>` to invoke that loop manually.
162
+
163
+ Interf saves every readiness-check run inside the preparation's portable context under `.interf/tests/`. You can inspect what changed and why a later compile run did better.
164
+
165
+ ## How Interf Compiles
166
+
167
+ You don't need to think about roles. By default Interf uses your active agent for every stage of every compile run, the same way 0.14 did. Roles are available for advanced users who want different agents per stage; defaults are good and stable.
168
+
169
+ Interf treats connected agents as a first-class primitive and uses a small role taxonomy internally to route stages between them. The default behavior is single-active-agent — one installed agent runs everything — but you can opt into per-role specialization without changing any Build Plan.
170
+
171
+ ```text
172
+ Connected agents Role map (per-instance)
173
+ claude-code (active) extractor → claude-code
174
+ codex summarizer → claude-code
175
+ pdf-extract (custom) structurer → claude-code
176
+ verifier → claude-code
177
+ general → claude-code
178
+
179
+ A Build Plan compile run
180
+ for each stage in the Build Plan
181
+ look up the stage's role in the role map
182
+ invoke the mapped agent on the prepared shell
183
+ record which agent ran which stage
184
+ ```
185
+
186
+ Build Plans declare an optional `role` per stage — one of `extractor`, `summarizer`, `structurer`, `verifier`, or `general`. Custom role names are allowed; unknown roles fall through to `general`.
187
+
188
+ The role map lives in the instance's agent settings. On a fresh install with one agent installed, every role maps to that agent and you get the same single-active-agent behavior 0.14 had. To change which agent runs which role:
189
+
190
+ ```bash
191
+ interf agents ls
192
+ interf agents register opencode --command "opencode --prompt"
193
+ interf agents map structurer codex
194
+ interf agents use claude-code # set the active agent
195
+ interf agents unmap structurer # fall back to active
196
+ ```
197
+
198
+ Or use the **Agents** tab in Interf Compiler UI. Either surface mutates the same instance agent settings through the local service.
199
+
200
+ Readiness-check runs always resolve to the `verifier` role. Build Plan authoring runs ask the authoring agent to propose a `role` per stage based on the prompt content; missing roles default to `general`.
201
+
202
+ ## How the Pieces Fit
203
+
204
+ The instance owns preparation state. A preparation declares a source binding (`{ kind: "local-folder", locator: <path> }`), requested artifacts, and a selected Build Plan. The current local engine still stores the selected Build Plan as `method_id` while the schema catches up. It stores preparation state and generated bytes in the instance data directory. A compile run processes the selected source files and produces the artifact locator the API returns. `interf test` checks source files and portable context against the same readiness checks.
205
+
206
+ Readiness is one `ready` / `not ready` status, not a separate score. Interf builds it from evidence primitives: Build Plan Artifact checks, proof records, file coverage, artifact validation, and readiness checks.
207
+
208
+ `interf web` runs the local Interf instance and serves Interf Compiler UI. The UI reads local-service resources: Source, Preparations, Build Plans, Method packages, compile runs, stages, proof, artifacts, readiness checks, and whether portable context is `ready` or `not ready`. It renders local instance state; it does not own compiler, Build Plan, Method-package, or readiness semantics.
209
+
210
+ Everywhere Interf shows a resource — Source, portable context, Build Plan files, run artifacts — the API returns a single locator shape: `{ kind, value }`. `local-path` means the engine has filesystem access to the same host as the user; `remote-url` is a signed URL the UI opens in a browser tab; `api-served` is a relative API route the UI fetches and renders inline. Local engines today return `local-path`; the same shape carries forward unchanged when a remote instance fronts the API.
211
+
212
+ ## CLI Connection
213
+
214
+ The CLI is a thin authorized client of one connected instance. It carries one active connection record:
215
+
216
+ ```text
217
+ {
218
+ "url": "http://127.0.0.1:4873",
219
+ "auth_token": null
220
+ }
221
+ ```
222
+
223
+ `interf web` and `interf web start` write that record on startup. `interf login --url <remote>` writes a remote one (the cloud backend ships in a future release; the wire shape and config layer ship now). `interf logout` clears it.
224
+
225
+ If the connection is unreachable, every mutating command exits non-zero with:
226
+
227
+ ```text
228
+ Not connected to any Interf instance.
229
+ Start one with `interf web` or `interf web start`, or set --url / `interf login` for a remote one.
230
+ ```
231
+
232
+ There is no implicit auto-start. There is no per-folder pointer file. One mental model: client connects to instance, explicitly starts one, or doesn't.
233
+
234
+ ## Readiness Checks
235
+
236
+ There are two checks in the system, and they answer different questions.
237
+
238
+ Build Plan Artifact checks check the build: did the plan produce the files, folders, Artifacts, and stage outputs it promised? Interf checks those while it compiles.
239
+
240
+ Readiness checks check the portable context: is this Preparation good enough for the specific agent work? They are the confidence layer on top of the portable context, not the product output.
241
+
242
+ In the setup flow, readiness checks often look like plain question-and-answer pairs. On the API, they live under each preparation's `checks[]`. They help define whether the portable context is `ready` or `not ready`. A check should be a small, verifiable fact or condition you already know from the files:
243
+
244
+ - one exact number from a chart, table, or filing
245
+ - one short statement that should be true or false
246
+ - one comparison across years, files, or sections
247
+
248
+ Interf proposes an initial set from the files and the description of the job agents need to do. You confirm, edit, or replace them. `interf test` runs those checks through the configured local agent against source files, portable context, or both. The portable context itself does not answer; the agent answers while using it.
249
+
250
+ A maintained readiness example in this repo uses one market report, two readiness checks, and two agents:
251
+
252
+ <!-- PUBLIC_BENCHMARK_TABLE:START -->
253
+ | Agent | Source files | Portable context |
254
+ | --- | --- | --- |
255
+ | Codex (GPT-5.4, xhigh) | `2/2` | `2/2` |
256
+ | Claude Code (Claude Opus 4.6, max) | `0/2` | `2/2` |
257
+ <!-- PUBLIC_BENCHMARK_TABLE:END -->
258
+
259
+ Codex passed from the source files; Claude Code only passed when working from Interf's portable context. Both numbers come from the same readiness-check pass. That is evidence about whether this portable context is `ready` for this agent work.
260
+
261
+ A maintained public test example uses this preparation:
262
+
263
+ <!-- PUBLIC_TEST_CHECKS:START -->
264
+ ```text
265
+ {
266
+ "id": "cbre-chart-sanity",
267
+ "source": { "kind": "local-folder", "locator": "./task-files" },
268
+ "method_id": "interf-default",
269
+ "about": "Bristol historical take-up and availability chart lookup.",
270
+ "requested_artifacts": [
271
+ {
272
+ "title": "Guide to the report",
273
+ "checks": ["Every page is listed.", "Pages about Bristol charts are marked."]
274
+ },
275
+ {
276
+ "title": "Annual take-up and availability figures",
277
+ "checks": ["Every figure has a page reference.", "Approximate chart-derived reads are labelled."]
278
+ }
279
+ ],
280
+ "checks": [
281
+ {
282
+ "question": "What were Bristol's annual take-up values in 2018 and 2016?",
283
+ "answer": "Around half a million sq ft in 2018, roughly 0.45 to 0.6 million sq ft, and about 0.7 to 0.8 million sq ft in 2016. These are approximate chart-derived reads."
284
+ },
285
+ {
286
+ "question": "What were Bristol's availability values in 2018 and 2016?",
287
+ "answer": "About 0.55 to 0.6 million sq ft in 2018 and about 1.2 to 1.3 million sq ft in 2016. These are approximate chart-derived reads."
288
+ }
289
+ ]
290
+ }
291
+ ```
292
+ <!-- PUBLIC_TEST_CHECKS:END -->
293
+
294
+ ## What Interf Is Not
295
+
296
+ - Not a second brain or memory product. One preparation per agent job; nothing global.
297
+ - Not a vector store or RAG server. The portable context is plain files.
298
+ - Not a hosted data platform. The local instance runs on your machine; your bytes never leave it.
299
+ - Not an agent harness. Interf compiles the context; your existing agent reads the portable context.
300
+
301
+ ## Useful Commands
302
+
303
+ - `interf web` — run the local engine in the foreground (Compiler UI + API)
304
+ - `interf web start` — start a managed background local engine for agent sessions
305
+ - `interf web stop` — kill the running local engine
306
+ - `interf prep ls / create / show / rm` — manage preparations
307
+ - `interf compile <prep-id>` — build portable context, returns the artifact locator
308
+ - `interf test <prep-id>` — run readiness checks against source files and/or portable context
309
+ - `interf method ls / show / install / draft / improve` — manage Build Plans / Method packages
310
+ - `interf agents ls / use / register / unregister / map / unmap` — manage connected agents and the role map
311
+ - `interf runs ls / status / cancel / fetch` — inspect runs
312
+ - `interf login / logout` — manage the active connection record (remote backend ships in a future release)
313
+ - `interf status` — show the active connection and a preparation summary
314
+ - `interf doctor --live` — check the local executor
315
+
316
+ ## Public Assets
317
+
318
+ - [skills/interf](./skills/interf/) — bundled agent Skill for Interf.
319
+ - [plugins/interf](./plugins/interf/) — local MCP host bundle for agents that support local MCP servers.
320
+ - [methods/interf-default](./methods/interf-default/) — default Method package that ships with `@interf/compiler`.
321
+
322
+ Contributors: see [CONTRIBUTING.md](./CONTRIBUTING.md).
323
+
324
+ License: see [LICENSE.md](./LICENSE.md). © 2026 Interf Inc. All rights reserved.
325
+ Name and branding: see [TRADEMARKS.md](./TRADEMARKS.md).
@@ -0,0 +1,67 @@
1
+ # Security Policy
2
+
3
+ We take security issues seriously. Thank you for helping keep Interf safe for the people who use it.
4
+
5
+ ## Supported Versions
6
+
7
+ Only the latest published release of `@interf/compiler` on npm and the current `main` branch of [`interf-labs/compiler`](https://github.com/interf-labs/compiler) receive security fixes.
8
+
9
+ ## Reporting a Vulnerability
10
+
11
+ **Please do not open a public GitHub issue for undisclosed security problems.**
12
+
13
+ Preferred disclosure paths, in order:
14
+
15
+ 1. **Email**: [security@interf.com](mailto:security@interf.com) — primary contact for any security report
16
+ 2. **GitHub Security Advisories**: use [private vulnerability reporting](https://github.com/interf-labs/compiler/security/advisories/new) on the `interf-labs/compiler` repository
17
+ 3. **PGP**: encrypted reports accepted on request via the email above
18
+
19
+ Please include:
20
+
21
+ - affected version
22
+ - impact (what could an attacker do)
23
+ - reproduction steps or proof-of-concept
24
+ - any suggested mitigation
25
+
26
+ ## Response Commitment
27
+
28
+ - We will acknowledge your report within **72 hours**
29
+ - We will provide an initial assessment within **7 days**
30
+ - We will work with you on coordinated disclosure timing — typically a fix released before public disclosure
31
+
32
+ ## Safe Harbor
33
+
34
+ We support good-faith security research. We will not pursue legal action or law-enforcement investigation against researchers who:
35
+
36
+ - Make a good-faith effort to avoid privacy violations, data destruction, or service interruption
37
+ - Only interact with their own accounts or test environments
38
+ - Report vulnerabilities promptly and do not exploit them beyond what is necessary to demonstrate impact
39
+ - Give us reasonable time to fix issues before public disclosure
40
+
41
+ ## Scope
42
+
43
+ Security reports are especially relevant for:
44
+
45
+ - npm package publish integrity
46
+ - unsafe filesystem writes or path traversal
47
+ - command execution boundaries (subprocess, agent shell-out)
48
+ - accidental leakage of private local files or runtime artifacts
49
+ - authentication or authorization bypasses on `interf web` / `/v1/*` endpoints
50
+ - test or workflow files causing unintended code execution
51
+ - supply-chain risks in dependencies
52
+
53
+ ## Bug Bounty Program
54
+
55
+ Interf does not currently run a paid bug bounty program. We will introduce one when scale and product maturity justify it. In the meantime, we publicly acknowledge security researchers who responsibly disclose valid issues (with your permission).
56
+
57
+ ## Trust Center
58
+
59
+ For our compliance posture, control attestations, and policy documentation see [trust.interf.com](https://trust.interf.com). The Trust Center is the canonical source for SOC 2 status, control implementations, and security questionnaire responses.
60
+
61
+ ## Contact
62
+
63
+ - Security reports: [security@interf.com](mailto:security@interf.com)
64
+ - General inquiries: [info@interf.com](mailto:info@interf.com)
65
+ - Trust Center: [trust.interf.com](https://trust.interf.com)
66
+ - Trademark questions: see [TRADEMARKS.md](./TRADEMARKS.md)
67
+ </content>
@@ -0,0 +1,8 @@
1
+ # Trademarks
2
+
3
+ `Interf`, the Interf word mark, and related logos are trademarks of Interf Inc.
4
+
5
+ The Interf marks are not licensed for public use. Public visibility of any
6
+ Interf code, docs, or package does not grant trademark or branding rights.
7
+
8
+ If you need official brand usage permission, contact Interf Inc.
@@ -17,6 +17,10 @@ Built-in file-processing Method: summarize source-grounded evidence, structure c
17
17
 
18
18
  ## Stages
19
19
 
20
+ Each stage is a folder with a `SKILL.md` file. Interf creates the stage shell,
21
+ attaches source references and runtime context, runs the agent against that
22
+ plain-text Skill, and records proof of what the stage wrote.
23
+
20
24
  - `summarize` — Turn source files into per-file summaries. (compiled-file-evidence; reads: none; writes: summaries)
21
25
  - `structure` — Build the cross-file knowledge structure from the summaries. (compiled-knowledge-structure; reads: summaries; writes: knowledge-entities, knowledge-claims, knowledge-indexes)
22
26
  - `shape` — Shape the final portable context around the saved task focus and readiness checks. (compiled-query-shape; reads: summaries, knowledge-entities, knowledge-claims, knowledge-indexes; writes: knowledge-indexes, atlas)
@@ -11,13 +11,9 @@ Contract type: `compiled-query-shape`
11
11
  - When you add wikilinks, target real compiled notes by exact basename or explicit relative path.
12
12
  - If you introduce a new note name in `home.md` or another shaped output, the same stage must also create that note file.
13
13
  - Prefer direct file-reading and search tools over shell commands for routine file inspection.
14
- - When a chart-derived value is approximate, use a bounded range instead of a pseudo-exact number.
15
- - Match the granularity of the visible axis labels or bands. Do not invent finer precision than the chart supports.
16
- - Keep the answer inside the visible tick band unless the chart supports a tighter bound.
17
- - Use an upper-half or lower-half band only when the mark clearly sits there.
18
- - If a mark touches or nearly touches a labeled gridline, anchor the answer at that gridline or the immediately adjacent half-band.
19
- - Do not widen a chart-derived range across multiple visible bands unless the chart genuinely supports that uncertainty.
20
- - When you settle on a bounded chart read, keep that same band consistent across `home.md`, focused indexes, and claim/entity notes for that metric and year.
14
+ - When a source value is approximate, preserve it as a bounded range and say why it is approximate.
15
+ - Do not invent finer precision than the source supports.
16
+ - Keep approximate values consistent across `home.md`, focused indexes, and claim/entity notes.
21
17
  - Do not copy expected answers into the portable context.
22
18
 
23
19
  ## Notes
@@ -26,6 +22,6 @@ Contract type: `compiled-query-shape`
26
22
  - Do not copy expected answers into the final portable context just because the checks imply them.
27
23
  - Prefer the saved summary evidence and structured notes when they already preserve the bounded chart/table reads plus provenance you need.
28
24
  - Reopen source references during shaping only when the compiled layer is missing the needed value, the metric family is ambiguous, or the earlier bounded read is clearly inconsistent.
29
- - If a saved readiness check depends on chart-derived or table-derived values, carry the final bounded reads forward into focused notes with provenance instead of repeatedly recomputing them from source files.
25
+ - If a saved readiness check depends on source-derived values, carry the final bounded values into focused notes with provenance instead of repeatedly recomputing them from source files.
30
26
  - Prefer better routing, prioritization, and focused navigation over speculative synthesis.
31
27
  - Any wikilinks you add to `home.md` or indexes must resolve to real compiled note basenames or explicit relative paths.
@@ -82,7 +82,7 @@
82
82
  "shape": [
83
83
  "Use the saved task focus and readiness checks to bias the final portable context toward the job it should be especially good at.",
84
84
  "Do not copy expected answers into the final portable context just because the checks imply them.",
85
- "If a saved readiness check depends on chart-derived or table-derived values, verify the needed evidence through source references while shaping and write focused notes that preserve bounded values plus provenance.",
85
+ "If a saved readiness check depends on source-derived values that may be approximate, preserve the stated range, limits, and provenance.",
86
86
  "Prefer better routing, prioritization, and focused navigation over speculative synthesis.",
87
87
  "Any wikilinks you add to `home.md` or indexes must resolve to real compiled note basenames or explicit relative paths."
88
88
  ]
@@ -0,0 +1,23 @@
1
+ # Manual Query Loop
2
+
3
+ This file is the editable authoring source for the generated native local `interf-query` skill.
4
+
5
+ Default loop:
6
+ 1. Read `home.md` first.
7
+ 2. Browse `knowledge/` before source re-checks.
8
+ 3. Use `summaries/` for source-grounded evidence.
9
+ 4. Use `.interf/runtime/source-snapshot.json` for direct quotes, verification, and exact source lookups.
10
+
11
+ Answering rule:
12
+ - do not modify source files while answering
13
+ - when a number is approximate or source-derived from a visual, say that explicitly
14
+ - if the compiled layer already contains a bounded value for the exact metric and period the user asked about, answer from that compiled value first
15
+ - use source references to confirm the source page, metric family, or provenance, not to replace a good compiled bounded read with a mismatched range
16
+ - when the compiled layer preserves a bounded range, keep that bounded range in the answer instead of collapsing it to a midpoint or pseudo-exact single value
17
+ - match the source granularity and do not invent finer precision than the source supports
18
+ - when reading visuals, verify you are on the correct metric family and period before answering
19
+ - keep annual, quarterly, sector, and snapshot metrics separate unless the source explicitly connects them
20
+ - if multiple compiled notes mention the same value, keep the answer consistent with the most focused compiled note rather than synthesizing a new midpoint or shifted range
21
+ - when the compiled layer is insufficient, verify against source references and then answer
22
+
23
+ You can edit this file to bias manual question-answering behavior for this portable context.
@@ -0,0 +1,9 @@
1
+ # Plugins
2
+
3
+ Host plugin bundles for agent-first Interf use.
4
+
5
+ This directory is the source of truth for package-shipped plugin assets.
6
+
7
+ Each plugin should stay thin: a host manifest, the canonical Interf Skill, and
8
+ configuration that starts `interf mcp`. The MCP server itself ships inside
9
+ `@interf/compiler`.
@@ -0,0 +1,21 @@
1
+ {
2
+ "$schema": "https://json.schemastore.org/claude-code-plugin-manifest.json",
3
+ "name": "interf",
4
+ "version": "0.1.0",
5
+ "description": "Prepare source files for agent work with Interf Compiler.",
6
+ "author": {
7
+ "name": "Interf Inc.",
8
+ "url": "https://interf.com"
9
+ },
10
+ "homepage": "https://interf.com",
11
+ "repository": "https://github.com/interf-labs/compiler",
12
+ "license": "SEE LICENSE IN LICENSE.md",
13
+ "keywords": [
14
+ "interf",
15
+ "agents",
16
+ "data-preparation",
17
+ "portable-context"
18
+ ],
19
+ "skills": "./skills/",
20
+ "mcpServers": "./.mcp.json"
21
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "mcpServers": {
3
+ "interf": {
4
+ "command": "npx",
5
+ "args": [
6
+ "-y",
7
+ "@interf/compiler@latest",
8
+ "mcp"
9
+ ]
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,29 @@
1
+ # Interf MCP Integration
2
+
3
+ This bundle packages Interf for agent hosts that can launch a local MCP server.
4
+ It is not a standalone Interf engine and it should not be treated as a verified
5
+ marketplace plugin format for every host.
6
+
7
+ It contains:
8
+
9
+ - the same `/interf` Skill available at [`skills/interf`](../../skills/interf/)
10
+ - a local MCP server definition that runs `interf mcp`
11
+
12
+ The Skill teaches the agent when to use Interf and how to propose requested
13
+ Artifacts. The MCP server gives the host agent tools for Preparations, Build
14
+ Plans, runs, and portable context.
15
+
16
+ If the host launches this MCP server on the user's device, the MCP tools can
17
+ call `web_start` to start the local Interf engine and then connect to
18
+ `127.0.0.1:4873`. If the host only runs inside a remote sandbox and does not
19
+ launch a local MCP server, it cannot reach the user's local engine; the user
20
+ must start Interf locally, use a host-provided local connector, or connect to a
21
+ future remote Interf instance.
22
+
23
+ You can also start the local engine manually with:
24
+
25
+ ```sh
26
+ interf web start
27
+ ```
28
+
29
+ or connect a remote Interf instance before using the MCP tools.