@interf/compiler 0.5.1 → 0.6.3

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 (353) hide show
  1. package/README.md +160 -201
  2. package/builtin-workflows/interf/README.md +22 -10
  3. package/builtin-workflows/interf/compile/stages/shape/SKILL.md +8 -5
  4. package/builtin-workflows/interf/compile/stages/structure/SKILL.md +3 -0
  5. package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -2
  6. package/builtin-workflows/interf/improve/SKILL.md +4 -4
  7. package/builtin-workflows/interf/use/query/SKILL.md +1 -1
  8. package/builtin-workflows/interf/workflow.json +19 -5
  9. package/builtin-workflows/interf/{compiled.schema.json → workflow.schema.json} +10 -3
  10. package/dist/bin.js +2 -28
  11. package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
  12. package/dist/{commands → cli/commands}/check-draft.js +13 -13
  13. package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
  14. package/dist/{commands → cli/commands}/compile-controller.js +39 -44
  15. package/dist/cli/commands/compile.d.ts +33 -0
  16. package/dist/{commands → cli/commands}/compile.js +107 -33
  17. package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
  18. package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
  19. package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +20 -2
  20. package/dist/cli/commands/create-workflow-wizard.js +288 -0
  21. package/dist/{commands → cli/commands}/create.d.ts +2 -2
  22. package/dist/cli/commands/create.js +166 -0
  23. package/dist/cli/commands/dataset-selection.d.ts +6 -0
  24. package/dist/cli/commands/dataset-selection.js +11 -0
  25. package/dist/{commands → cli/commands}/default.js +5 -5
  26. package/dist/{commands → cli/commands}/doctor.js +12 -13
  27. package/dist/{commands → cli/commands}/executor-flow.d.ts +2 -2
  28. package/dist/{commands → cli/commands}/executor-flow.js +17 -17
  29. package/dist/cli/commands/init.d.ts +11 -0
  30. package/dist/{commands → cli/commands}/init.js +202 -109
  31. package/dist/{commands → cli/commands}/list.js +9 -6
  32. package/dist/{commands → cli/commands}/reset.js +5 -5
  33. package/dist/{commands → cli/commands}/source-config-wizard.d.ts +10 -5
  34. package/dist/{commands → cli/commands}/source-config-wizard.js +202 -95
  35. package/dist/{commands → cli/commands}/status.js +20 -11
  36. package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
  37. package/dist/{commands → cli/commands}/test-flow.js +30 -26
  38. package/dist/cli/commands/test.d.ts +14 -0
  39. package/dist/{commands → cli/commands}/test.js +48 -40
  40. package/dist/{commands → cli/commands}/verify.js +4 -4
  41. package/dist/cli/index.d.ts +21 -0
  42. package/dist/cli/index.js +33 -0
  43. package/dist/index.d.ts +22 -11
  44. package/dist/index.js +15 -6
  45. package/dist/lib/agent-args.d.ts +1 -3
  46. package/dist/lib/agent-args.js +1 -42
  47. package/dist/lib/agent-constants.d.ts +1 -5
  48. package/dist/lib/agent-constants.js +1 -28
  49. package/dist/lib/agent-detection.d.ts +1 -7
  50. package/dist/lib/agent-detection.js +1 -65
  51. package/dist/lib/agent-execution.d.ts +1 -2
  52. package/dist/lib/agent-execution.js +1 -242
  53. package/dist/lib/agent-logs.d.ts +1 -2
  54. package/dist/lib/agent-logs.js +1 -17
  55. package/dist/lib/agent-preflight.d.ts +1 -7
  56. package/dist/lib/agent-preflight.js +1 -76
  57. package/dist/lib/agent-render.d.ts +1 -8
  58. package/dist/lib/agent-render.js +1 -218
  59. package/dist/lib/agent-shells.d.ts +1 -44
  60. package/dist/lib/agent-shells.js +1 -847
  61. package/dist/lib/agent-status.d.ts +1 -3
  62. package/dist/lib/agent-status.js +1 -58
  63. package/dist/lib/agent-types.d.ts +1 -30
  64. package/dist/lib/agent-types.js +1 -1
  65. package/dist/lib/agents.d.ts +1 -6
  66. package/dist/lib/agents.js +1 -5
  67. package/dist/lib/builtin-compiled-workflow.d.ts +1 -129
  68. package/dist/lib/builtin-compiled-workflow.js +1 -153
  69. package/dist/lib/compiled-compile.d.ts +1 -52
  70. package/dist/lib/compiled-compile.js +1 -274
  71. package/dist/lib/compiled-paths.d.ts +1 -39
  72. package/dist/lib/compiled-paths.js +3 -103
  73. package/dist/lib/compiled-raw.d.ts +1 -49
  74. package/dist/lib/compiled-raw.js +3 -102
  75. package/dist/lib/compiled-reset.d.ts +1 -1
  76. package/dist/lib/compiled-reset.js +3 -44
  77. package/dist/lib/compiled-schema.d.ts +1 -27
  78. package/dist/lib/compiled-schema.js +1 -110
  79. package/dist/lib/discovery.d.ts +1 -1
  80. package/dist/lib/discovery.js +2 -2
  81. package/dist/lib/execution-profile.d.ts +1 -17
  82. package/dist/lib/execution-profile.js +1 -84
  83. package/dist/lib/executors.d.ts +1 -32
  84. package/dist/lib/executors.js +1 -43
  85. package/dist/lib/interf-bootstrap.d.ts +1 -3
  86. package/dist/lib/interf-bootstrap.js +3 -18
  87. package/dist/lib/interf-detect.d.ts +1 -33
  88. package/dist/lib/interf-detect.js +3 -176
  89. package/dist/lib/interf-scaffold.d.ts +1 -2
  90. package/dist/lib/interf-scaffold.js +3 -121
  91. package/dist/lib/interf-workflow-package.d.ts +1 -20
  92. package/dist/lib/interf-workflow-package.js +1 -276
  93. package/dist/lib/interf.d.ts +1 -5
  94. package/dist/lib/interf.js +3 -4
  95. package/dist/lib/local-workflows.d.ts +1 -53
  96. package/dist/lib/local-workflows.js +1 -399
  97. package/dist/lib/package-root.d.ts +1 -0
  98. package/dist/lib/package-root.js +1 -0
  99. package/dist/lib/project-paths.d.ts +1 -11
  100. package/dist/lib/project-paths.js +3 -32
  101. package/dist/lib/runtime-acceptance.d.ts +1 -9
  102. package/dist/lib/runtime-acceptance.js +1 -257
  103. package/dist/lib/runtime-contracts.d.ts +1 -2
  104. package/dist/lib/runtime-contracts.js +1 -47
  105. package/dist/lib/runtime-inventory.d.ts +1 -7
  106. package/dist/lib/runtime-inventory.js +1 -29
  107. package/dist/lib/runtime-paths.d.ts +1 -7
  108. package/dist/lib/runtime-paths.js +1 -23
  109. package/dist/lib/runtime-prompt.d.ts +1 -2
  110. package/dist/lib/runtime-prompt.js +1 -46
  111. package/dist/lib/runtime-reconcile.d.ts +1 -2
  112. package/dist/lib/runtime-reconcile.js +1 -156
  113. package/dist/lib/runtime-runs.d.ts +1 -11
  114. package/dist/lib/runtime-runs.js +1 -250
  115. package/dist/lib/runtime-types.d.ts +1 -43
  116. package/dist/lib/runtime-types.js +1 -1
  117. package/dist/lib/runtime.d.ts +1 -6
  118. package/dist/lib/runtime.js +1 -5
  119. package/dist/lib/schema.d.ts +4 -1016
  120. package/dist/lib/schema.js +6 -539
  121. package/dist/lib/source-config.d.ts +1 -39
  122. package/dist/lib/source-config.js +3 -293
  123. package/dist/lib/state-artifacts.d.ts +1 -8
  124. package/dist/lib/state-artifacts.js +1 -13
  125. package/dist/lib/state-health.d.ts +1 -4
  126. package/dist/lib/state-health.js +1 -132
  127. package/dist/lib/state-io.d.ts +1 -10
  128. package/dist/lib/state-io.js +1 -76
  129. package/dist/lib/state-paths.d.ts +1 -4
  130. package/dist/lib/state-paths.js +1 -13
  131. package/dist/lib/state-view.d.ts +1 -4
  132. package/dist/lib/state-view.js +1 -103
  133. package/dist/lib/state.d.ts +1 -6
  134. package/dist/lib/state.js +1 -5
  135. package/dist/lib/test-execution.d.ts +1 -14
  136. package/dist/lib/test-execution.js +3 -525
  137. package/dist/lib/test-matrices.d.ts +1 -90
  138. package/dist/lib/test-matrices.js +3 -96
  139. package/dist/lib/test-paths.d.ts +1 -12
  140. package/dist/lib/test-paths.js +3 -59
  141. package/dist/lib/test-profile-presets.d.ts +1 -57
  142. package/dist/lib/test-profile-presets.js +3 -50
  143. package/dist/lib/test-sandbox.d.ts +1 -11
  144. package/dist/lib/test-sandbox.js +3 -105
  145. package/dist/lib/test-specs.d.ts +1 -7
  146. package/dist/lib/test-specs.js +3 -114
  147. package/dist/lib/test-targets.d.ts +1 -5
  148. package/dist/lib/test-targets.js +3 -38
  149. package/dist/lib/test-types.d.ts +1 -17
  150. package/dist/lib/test-types.js +3 -1
  151. package/dist/lib/test.d.ts +1 -4
  152. package/dist/lib/test.js +3 -3
  153. package/dist/lib/validate-compiled.d.ts +1 -27
  154. package/dist/lib/validate-compiled.js +1 -238
  155. package/dist/lib/validate-helpers.d.ts +1 -12
  156. package/dist/lib/validate-helpers.js +1 -41
  157. package/dist/lib/validate.d.ts +1 -19
  158. package/dist/lib/validate.js +1 -256
  159. package/dist/lib/workflow-authoring.d.ts +1 -0
  160. package/dist/lib/workflow-authoring.js +1 -0
  161. package/dist/lib/workflow-definitions.d.ts +1 -68
  162. package/dist/lib/workflow-definitions.js +1 -206
  163. package/dist/lib/workflow-edit-session.d.ts +1 -0
  164. package/dist/lib/workflow-edit-session.js +1 -0
  165. package/dist/lib/workflow-edit-utils.d.ts +1 -0
  166. package/dist/lib/workflow-edit-utils.js +1 -0
  167. package/dist/lib/workflow-helpers.d.ts +1 -38
  168. package/dist/lib/workflow-helpers.js +1 -167
  169. package/dist/lib/workflow-improvement.d.ts +1 -22
  170. package/dist/lib/workflow-improvement.js +1 -396
  171. package/dist/lib/workflow-primitives.d.ts +1 -2
  172. package/dist/lib/workflow-primitives.js +1 -5
  173. package/dist/lib/workflow-review-paths.d.ts +1 -10
  174. package/dist/lib/workflow-review-paths.js +1 -27
  175. package/dist/lib/workflow-stage-policy.d.ts +1 -0
  176. package/dist/lib/workflow-stage-policy.js +1 -0
  177. package/dist/lib/workflow-stage-runner.d.ts +1 -41
  178. package/dist/lib/workflow-stage-runner.js +1 -109
  179. package/dist/lib/workflows.d.ts +1 -15
  180. package/dist/lib/workflows.js +1 -31
  181. package/dist/packages/agents/index.d.ts +17 -0
  182. package/dist/packages/agents/index.js +15 -0
  183. package/dist/packages/agents/lib/agents.d.ts +6 -0
  184. package/dist/packages/agents/lib/agents.js +5 -0
  185. package/dist/packages/agents/lib/args.d.ts +4 -0
  186. package/dist/packages/agents/lib/args.js +52 -0
  187. package/dist/packages/agents/lib/constants.d.ts +5 -0
  188. package/dist/packages/agents/lib/constants.js +28 -0
  189. package/dist/packages/agents/lib/detection.d.ts +7 -0
  190. package/dist/packages/agents/lib/detection.js +65 -0
  191. package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
  192. package/dist/packages/agents/lib/execution-profile.js +84 -0
  193. package/dist/packages/agents/lib/execution.d.ts +2 -0
  194. package/dist/packages/agents/lib/execution.js +243 -0
  195. package/dist/packages/agents/lib/executors.d.ts +32 -0
  196. package/dist/packages/agents/lib/executors.js +45 -0
  197. package/dist/packages/agents/lib/logs.d.ts +2 -0
  198. package/dist/packages/agents/lib/logs.js +17 -0
  199. package/dist/packages/agents/lib/preflight.d.ts +7 -0
  200. package/dist/packages/agents/lib/preflight.js +77 -0
  201. package/dist/packages/agents/lib/render.d.ts +8 -0
  202. package/dist/packages/agents/lib/render.js +218 -0
  203. package/dist/packages/agents/lib/schema.d.ts +8 -0
  204. package/dist/packages/agents/lib/schema.js +7 -0
  205. package/dist/packages/agents/lib/shells.d.ts +69 -0
  206. package/dist/packages/agents/lib/shells.js +1021 -0
  207. package/dist/packages/agents/lib/status.d.ts +3 -0
  208. package/dist/packages/agents/lib/status.js +58 -0
  209. package/dist/packages/agents/lib/types.d.ts +30 -0
  210. package/dist/packages/agents/lib/types.js +1 -0
  211. package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
  212. package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
  213. package/dist/packages/compiler/compiled-compile.d.ts +48 -0
  214. package/dist/packages/compiler/compiled-compile.js +256 -0
  215. package/dist/packages/compiler/compiled-schema.d.ts +31 -0
  216. package/dist/packages/compiler/compiled-schema.js +141 -0
  217. package/dist/packages/compiler/index.d.ts +24 -0
  218. package/dist/packages/compiler/index.js +23 -0
  219. package/dist/packages/compiler/lib/schema.d.ts +684 -0
  220. package/dist/packages/compiler/lib/schema.js +361 -0
  221. package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
  222. package/dist/packages/compiler/runtime-acceptance.js +269 -0
  223. package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
  224. package/dist/packages/compiler/runtime-contracts.js +48 -0
  225. package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
  226. package/dist/packages/compiler/runtime-inventory.js +29 -0
  227. package/dist/packages/compiler/runtime-paths.d.ts +8 -0
  228. package/dist/packages/compiler/runtime-paths.js +26 -0
  229. package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
  230. package/dist/packages/compiler/runtime-prompt.js +48 -0
  231. package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
  232. package/dist/packages/compiler/runtime-reconcile.js +193 -0
  233. package/dist/packages/compiler/runtime-runs.d.ts +11 -0
  234. package/dist/packages/compiler/runtime-runs.js +262 -0
  235. package/dist/packages/compiler/runtime-types.d.ts +43 -0
  236. package/dist/packages/compiler/runtime-types.js +1 -0
  237. package/dist/packages/compiler/runtime.d.ts +6 -0
  238. package/dist/packages/compiler/runtime.js +5 -0
  239. package/dist/packages/compiler/state-artifacts.d.ts +8 -0
  240. package/dist/packages/compiler/state-artifacts.js +13 -0
  241. package/dist/packages/compiler/state-health.d.ts +4 -0
  242. package/dist/packages/compiler/state-health.js +132 -0
  243. package/dist/packages/compiler/state-io.d.ts +10 -0
  244. package/dist/packages/compiler/state-io.js +76 -0
  245. package/dist/packages/compiler/state-paths.d.ts +4 -0
  246. package/dist/packages/compiler/state-paths.js +13 -0
  247. package/dist/packages/compiler/state-view.d.ts +4 -0
  248. package/dist/packages/compiler/state-view.js +103 -0
  249. package/dist/packages/compiler/state.d.ts +7 -0
  250. package/dist/packages/compiler/state.js +12 -0
  251. package/dist/packages/compiler/validate-compiled.d.ts +27 -0
  252. package/dist/packages/compiler/validate-compiled.js +241 -0
  253. package/dist/packages/compiler/validate-helpers.d.ts +12 -0
  254. package/dist/packages/compiler/validate-helpers.js +41 -0
  255. package/dist/packages/compiler/validate.d.ts +21 -0
  256. package/dist/packages/compiler/validate.js +249 -0
  257. package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
  258. package/dist/packages/compiler/workflow-primitives.js +5 -0
  259. package/dist/packages/compiler/workflows.d.ts +15 -0
  260. package/dist/packages/compiler/workflows.js +31 -0
  261. package/dist/packages/project-model/compiled-paths.d.ts +40 -0
  262. package/dist/packages/project-model/compiled-paths.js +106 -0
  263. package/dist/packages/project-model/compiled-raw.d.ts +49 -0
  264. package/dist/packages/project-model/compiled-raw.js +102 -0
  265. package/dist/packages/project-model/compiled-reset.d.ts +2 -0
  266. package/dist/packages/project-model/compiled-reset.js +72 -0
  267. package/dist/packages/project-model/index.d.ts +11 -0
  268. package/dist/packages/project-model/index.js +10 -0
  269. package/dist/packages/project-model/interf-bootstrap.d.ts +3 -0
  270. package/dist/packages/project-model/interf-bootstrap.js +18 -0
  271. package/dist/packages/project-model/interf-detect.d.ts +33 -0
  272. package/dist/packages/project-model/interf-detect.js +176 -0
  273. package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
  274. package/dist/packages/project-model/interf-scaffold.js +124 -0
  275. package/dist/packages/project-model/interf.d.ts +5 -0
  276. package/dist/packages/project-model/interf.js +4 -0
  277. package/dist/packages/project-model/lib/schema.d.ts +125 -0
  278. package/dist/packages/project-model/lib/schema.js +62 -0
  279. package/dist/packages/project-model/project-paths.d.ts +11 -0
  280. package/dist/packages/project-model/project-paths.js +32 -0
  281. package/dist/packages/project-model/source-config.d.ts +38 -0
  282. package/dist/packages/project-model/source-config.js +297 -0
  283. package/dist/packages/testing/index.d.ts +13 -0
  284. package/dist/packages/testing/index.js +10 -0
  285. package/dist/packages/testing/lib/schema.d.ts +261 -0
  286. package/dist/packages/testing/lib/schema.js +119 -0
  287. package/dist/packages/testing/test-execution.d.ts +14 -0
  288. package/dist/packages/testing/test-execution.js +525 -0
  289. package/dist/packages/testing/test-matrices.d.ts +90 -0
  290. package/dist/packages/testing/test-matrices.js +96 -0
  291. package/dist/packages/testing/test-paths.d.ts +12 -0
  292. package/dist/packages/testing/test-paths.js +59 -0
  293. package/dist/packages/testing/test-profile-presets.d.ts +57 -0
  294. package/dist/packages/testing/test-profile-presets.js +50 -0
  295. package/dist/packages/testing/test-sandbox.d.ts +11 -0
  296. package/dist/packages/testing/test-sandbox.js +105 -0
  297. package/dist/packages/testing/test-specs.d.ts +7 -0
  298. package/dist/packages/testing/test-specs.js +114 -0
  299. package/dist/packages/testing/test-targets.d.ts +5 -0
  300. package/dist/packages/testing/test-targets.js +38 -0
  301. package/dist/packages/testing/test-types.d.ts +16 -0
  302. package/dist/packages/testing/test-types.js +1 -0
  303. package/dist/packages/testing/test.d.ts +4 -0
  304. package/dist/packages/testing/test.js +3 -0
  305. package/dist/packages/workflow-authoring/index.d.ts +4 -0
  306. package/dist/packages/workflow-authoring/index.js +4 -0
  307. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
  308. package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
  309. package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
  310. package/dist/packages/workflow-authoring/workflow-authoring.js +120 -0
  311. package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
  312. package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
  313. package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
  314. package/dist/packages/workflow-authoring/workflow-improvement.js +209 -0
  315. package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
  316. package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
  317. package/dist/packages/workflow-package/index.d.ts +9 -0
  318. package/dist/packages/workflow-package/index.js +9 -0
  319. package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
  320. package/dist/packages/workflow-package/interf-workflow-package.js +342 -0
  321. package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
  322. package/dist/packages/workflow-package/lib/package-root.js +6 -0
  323. package/dist/packages/workflow-package/local-workflows.d.ts +54 -0
  324. package/dist/packages/workflow-package/local-workflows.js +422 -0
  325. package/dist/packages/workflow-package/workflow-definitions.d.ts +78 -0
  326. package/dist/packages/workflow-package/workflow-definitions.js +203 -0
  327. package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
  328. package/dist/packages/workflow-package/workflow-helpers.js +167 -0
  329. package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
  330. package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
  331. package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
  332. package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
  333. package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
  334. package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
  335. package/package.json +44 -21
  336. package/dist/commands/compile.d.ts +0 -15
  337. package/dist/commands/create-workflow-wizard.js +0 -125
  338. package/dist/commands/create.js +0 -162
  339. package/dist/commands/init.d.ts +0 -3
  340. package/dist/commands/test.d.ts +0 -9
  341. package/dist/lib/compiled-home.d.ts +0 -5
  342. package/dist/lib/compiled-home.js +0 -32
  343. package/dist/lib/config.js +0 -9
  344. package/dist/lib/obsidian.d.ts +0 -1
  345. package/dist/lib/obsidian.js +0 -15
  346. package/dist/lib/summarize-plan.d.ts +0 -17
  347. package/dist/lib/summarize-plan.js +0 -120
  348. /package/dist/{commands → cli/commands}/default.d.ts +0 -0
  349. /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
  350. /package/dist/{commands → cli/commands}/list.d.ts +0 -0
  351. /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
  352. /package/dist/{commands → cli/commands}/status.d.ts +0 -0
  353. /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
package/README.md CHANGED
@@ -1,70 +1,94 @@
1
- # Interf Compiler
1
+ # Interf
2
2
 
3
- Prepare local datasets for accurate agent use.
3
+ Interf prepares task context for your agents.
4
4
 
5
- Interf Compiler runs a local data-processing workflow over your dataset to build a file-based layer on top of your raw files that gives agents the full picture they need to answer questions accurately.
5
+ Start with the files behind a task and a few checks. Interf tests the files as-is first, shows what already works, and builds a local context folder when the current context is not good enough.
6
6
 
7
- Define truth checks for your dataset, measure a baseline on the raw files, then compile and retest the compiled dataset on the same checks.
7
+ The result is a real folder your agent can open and work from. Interf retests it on the same checks, and self-improving loops can revise the workflow and try again until it passes or reaches the loop limit.
8
8
 
9
- If it still fails, self-improving loops can revise the workflow, rebuild the compiled dataset, and rerun the same checks until it passes or reaches the loop limit.
9
+ Raw files stay the source of truth. The context folder adds task-specific structure on top of them.
10
10
 
11
- ## Why Use It
12
-
13
- Interf Compiler is built around a few simple principles:
14
-
15
- - `Explicit`: the compiled dataset is a real folder you can inspect, review, and version.
16
- - `Yours`: the dataset, workflow, compiled dataset, and test runs stay on your machine and in your control.
17
- - `File over app`: the compiled dataset is normal files and folders, not hidden app state.
18
- - `Source-backed`: your raw files stay the source of truth; the compiled dataset is a layer on top, not a replacement database.
19
- - `Bring your own agent`: the same compiled dataset can be used with different local agents and tools.
20
- - `Self-improving`: when truth checks fail, Interf can retry the workflow or revise it, rebuild the compiled dataset, and rerun the same checks.
21
-
22
- ## Example: Truth Checks
23
-
24
- Truth checks are just question-and-answer pairs you already know how to verify from the dataset.
25
-
26
- A maintained public test run in this repo uses checks like this:
27
-
28
- <!-- PUBLIC_TEST_CHECKS:START -->
29
- ```jsonc
30
- {
31
- "datasets": [
32
- {
33
- "name": "cbre-chart-sanity",
34
- "about": "Bristol historical take-up and availability chart lookup.",
35
- "checks": [
36
- {
37
- "question": "What were Bristol's annual take-up values in 2018 and 2016?",
38
- "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."
39
- },
40
- {
41
- "question": "What were Bristol's availability values in 2018 and 2016?",
42
- "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."
43
- }
44
- ]
45
- }
46
- ]
47
- }
11
+ ```bash
12
+ cd ~/my-project
13
+ interf
14
+ interf test
15
+ interf compile
16
+ interf test
48
17
  ```
49
- <!-- PUBLIC_TEST_CHECKS:END -->
50
18
 
51
- ## Example: `interf test`
19
+ The context folder Interf builds is rooted at:
52
20
 
53
- `interf test` compares files as-is and the compiled dataset on the same saved truth checks.
54
- That is the point of `interf test`: measure the same checks on both sides and keep the result honest on your own dataset, instead of relying on a frozen benchmark snapshot in the docs.
21
+ ```text
22
+ interf/<dataset>/
23
+ AGENTS.md
24
+ CLAUDE.md
25
+ raw/
26
+ <workflow-declared compiled outputs>
27
+ .interf/
28
+ interf.json
29
+ workflow/
30
+ runtime/
31
+ tests/
32
+ ```
55
33
 
56
- A recent maintained internal run on the CBRE chart sanity dataset produced:
34
+ A recent run in this repo on the CBRE chart sanity task produced:
57
35
 
58
36
  <!-- PUBLIC_BENCHMARK_TABLE:START -->
59
- | Agent | Files as-is | Compiled dataset |
37
+ | Agent | Files as-is | Context folder |
60
38
  | --- | --- | --- |
61
39
  | Codex (GPT-5.4, xhigh) | `2/2` | `2/2` |
62
40
  | Claude Code (Claude Opus 4.6, max) | `0/2` | `2/2` |
63
41
  <!-- PUBLIC_BENCHMARK_TABLE:END -->
64
42
 
65
- Use `interf test` on your own dataset to measure files as-is versus the compiled dataset on the same checks.
43
+ Those scores came from checks like:
44
+
45
+ - `What were Bristol's annual take-up values in 2018 and 2016?`
46
+ - `What were Bristol's availability values in 2018 and 2016?`
47
+
48
+ Same task. Same checks. Same local setup.
49
+
50
+ ## How It Works
51
+
52
+ 1. Start with a task and the files relevant to it.
53
+ 2. Save a few checks that tell Interf what "ready" means for that task.
54
+ 3. Run a workflow that prepares a source-backed context folder for the task.
55
+ 4. Test the result on the same checks and keep it only if it helped.
56
+
57
+ The raw baseline is still important. It shows what already works on the files as-is and which local agent performs best before you spend time improving anything.
58
+
59
+ ## Why It Exists
60
+
61
+ Local agents can open raw files and still reason badly over them. Reports, decks, transcripts, exports, PDFs, notes, and mixed folders may all be present, but they are often missing the structure a real task needs.
62
+
63
+ Interf takes the files behind a task, prepares them into a local context folder your agents can use, and then proves whether the result helped.
64
+
65
+ Interf keeps the loop honest:
66
+
67
+ - `Value first`: prepare the data for a specific task, not just dump files into another app.
68
+ - `Proof-backed`: test raw files and the prepared result on the same checks.
69
+ - `One folder`: the context folder is a real folder you can inspect, diff, review, and version.
70
+ - `Source-backed`: raw files remain the source of truth.
71
+ - `Bring your own agent`: use the context folder manually from other local agents too. Automated Interf runs currently support Claude Code and Codex.
72
+ - `Self-improving`: when checks fail, Interf can inspect the failed run, edit the workflow, and retest new workflow variations on the same checks. Retries keep the same workflow variation; loops change the workflow itself.
73
+
74
+ ## What You Get
75
+
76
+ A project with one saved setup stays simple:
77
+
78
+ ```text
79
+ your-project/
80
+ task-files/
81
+ report.pdf
82
+ notes.md
83
+ exports/
84
+ interf.json
85
+ interf/
86
+ <dataset>/
87
+ tests/
88
+ <dataset>/
89
+ ```
66
90
 
67
- Each dataset keeps one latest comparison under `interf/tests/<dataset>/latest.json`. Target-specific runs stay under `interf/tests/<dataset>/file-as-is/runs/` and `interf/tests/<dataset>/compiled/runs/`.
91
+ The context folder is the folder your agents should work from after Interf prepares the data for the task.
68
92
 
69
93
  ## Quick Start
70
94
 
@@ -79,161 +103,129 @@ Install:
79
103
  npm install -g @interf/compiler
80
104
  ```
81
105
 
82
- Start from a project folder that contains one or more dataset folders:
83
-
84
- ```bash
85
- cd ~/my-interf-project
86
- interf
87
- interf test
88
- interf compile
89
- interf test
90
- ```
106
+ Start from a project folder that contains one or more source folders for the task.
91
107
 
92
108
  The first run can:
93
109
 
94
110
  - draft `interf.json`
95
- - auto-create a draft set of truth checks for a dataset folder, or let you add them manually
96
- - test your files as-is first on those same checks
97
- - build the compiled dataset
98
- - test the compiled dataset on the same truth checks
99
-
100
- ## What Interf Compiler Creates
101
-
102
- After setup, the project root stays simple:
103
-
104
- - `interf.json` at the root holds your saved dataset entries and truth checks
105
- - `interf/` is created only when Interf has artifacts to save
106
- - `interf/<dataset>/` is the compiled dataset
107
- - `interf/tests/<dataset>/` is the saved comparison history for that dataset
111
+ - let you choose the source folder for the task
112
+ - default the dataset id from that folder name, then let you change it
113
+ - help you create checks for the task, or let you add them manually
114
+ - run a files-as-is baseline on those checks so you can see what already works
115
+ - build the context folder that stores the compiled context
116
+ - let you test the context folder on the same checks
108
117
 
109
- A compiled dataset is a folder on top of your dataset. It includes:
118
+ If Interf cannot find your local executor setup, run:
110
119
 
111
- - a local `raw/` snapshot for direct evidence and verification
112
- - agent-readable summaries and cross-file notes
113
- - `AGENTS.md`, `CLAUDE.md`, and generated local query skills
114
- - workflow, test, and runtime state under `.interf/`
115
-
116
- The compiled dataset is the folder your agent should work from.
117
-
118
- ## How It Works
120
+ ```bash
121
+ interf doctor --live
122
+ ```
119
123
 
120
- 1. Save a few truth checks for a dataset in `interf.json`.
121
- 2. Optionally test the files as-is for a baseline.
122
- 3. Build the compiled dataset for that dataset.
123
- 4. Test the compiled dataset on the same truth checks.
124
- 5. Optionally let Interf retry or improve the workflow until it passes or hits the configured limit.
124
+ ## Checks
125
125
 
126
- Truth checks are simple:
126
+ Checks are the questions and expected answers Interf uses to prove whether the prepared result is good enough for this task.
127
127
 
128
- - one question
129
- - one expected answer
128
+ They are just question-and-answer pairs you already know how to verify from the files behind the task.
130
129
 
131
- Good first truth checks are small and practical:
130
+ Good first checks are small and practical:
132
131
 
133
132
  - one exact number from a chart, table, or filing
134
133
  - one short statement that should be true or false
135
134
  - one simple comparison across years, files, or sections
136
135
 
137
- If `interf.json` is missing, `interf` or `interf init` can draft it with you before the first compile. If the compiler cannot find your local agent or compile setup, run:
136
+ A maintained public test run in this repo uses checks like this:
138
137
 
139
- ```bash
140
- interf doctor
138
+ <!-- PUBLIC_TEST_CHECKS:START -->
139
+ ```jsonc
140
+ {
141
+ "datasets": [
142
+ {
143
+ "name": "cbre-chart-sanity",
144
+ "path": "./task-files",
145
+ "about": "Bristol historical take-up and availability chart lookup.",
146
+ "checks": [
147
+ {
148
+ "question": "What were Bristol's annual take-up values in 2018 and 2016?",
149
+ "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."
150
+ },
151
+ {
152
+ "question": "What were Bristol's availability values in 2018 and 2016?",
153
+ "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."
154
+ }
155
+ ]
156
+ }
157
+ ]
158
+ }
141
159
  ```
160
+ <!-- PUBLIC_TEST_CHECKS:END -->
142
161
 
143
- ## What `interf test` Does
162
+ ## What `interf test` Proves
144
163
 
145
- By default, if a compiled dataset exists, it runs both sides and saves one latest comparison under `interf/tests/<dataset>/latest.json`.
164
+ `interf test` compares files as-is and the context folder on the same checks.
146
165
 
147
- You can also select one or more detected local agents in the CLI and compare them in one table.
166
+ That comparison is the product record:
148
167
 
149
- For live runs:
168
+ - same task
169
+ - same checks
170
+ - same local agent setup
171
+ - raw files on one side
172
+ - compiled context on the other
150
173
 
151
- - files-as-is tests execute from a sanitized raw-only shell built from the selected dataset folder
152
- - compiled-dataset tests execute from a copied compiled sandbox with embedded sanitized `raw/`
153
- - both sides use the same saved truth checks from `interf.json`
154
- - neither sandbox includes the project control plane
155
- - detailed dataset-visible runs are kept under `interf/tests/<dataset>/file-as-is/runs/` and `interf/tests/<dataset>/compiled/runs/`
156
- - local detailed target runs and preserved sandboxes stay under `.interf/tests/targets/`
157
- - failed test sandboxes are kept automatically
158
- - `interf test --keep-sandboxes` keeps every sandbox, even successful ones
174
+ Use `interf test` on your own files instead of trusting a frozen benchmark snapshot in the docs.
159
175
 
160
- From inside a compiled dataset, `interf test` uses that dataset's `.interf/interf.json` directly. From the project root, `interf.json` bootstraps dataset selection and the same saved truth checks are mirrored into the compiled dataset runtime contract.
176
+ Interf saves the latest comparison plus detailed raw-side and context-folder runs under `interf/tests/` in the same folder.
161
177
 
162
- Maintainers can use the internal repeated-test matrix runner in [docs/test-matrix.md](./docs/test-matrix.md) for controlled workflow or model comparisons. Normal users should stay on `interf test`.
178
+ ## The Core Loop
163
179
 
164
- ## Advanced: Multiple Datasets
180
+ 1. Save a few checks for the task in `interf.json`.
181
+ 2. Optionally run `interf test` to see how the raw files do first.
182
+ 3. Run `interf compile` to prepare the data into a context folder.
183
+ 4. Run `interf test` again on the same checks.
184
+ 5. If loops are enabled, let Interf retry the same workflow variation or edit the workflow and test the new variation.
165
185
 
166
- Most projects only need one dataset entry.
186
+ The project root stores the source-folder setup and checks. The context folder carries the local compiled context needed for repeat runs.
167
187
 
168
- Add another only when you want a different dataset folder, focus, or set of truth checks, for example:
188
+ ## Workflows
169
189
 
170
- - general folder understanding
171
- - finance reporting
172
- - board prep
173
- - diligence review
190
+ A workflow tells Interf how to prepare and structure the files for a task before your agent uses them.
174
191
 
175
- Why add another:
192
+ Interf ships with a built-in `interf` workflow for the common case. If you need a different method, create one locally:
176
193
 
177
- - it keeps a separate set of truth checks
178
- - it gives that dataset its own compiled output under `interf/<dataset>/`
179
- - it lets you test that dataset separately
194
+ ```bash
195
+ interf create workflow
196
+ ```
197
+
198
+ Workflow creation supports two paths:
180
199
 
181
- ## Advanced: Compile Loops
200
+ - draft a workflow from the current project with a local agent
201
+ - copy an existing workflow and edit stage guidance directly
202
+
203
+ After assignment, build the context folder with `interf compile` and run `interf test` on the same checks.
204
+
205
+ ## Compile Loops
182
206
 
183
207
  `max_attempts` is a retry budget for the same workflow variation.
184
208
 
185
209
  Retries keep the target fixed:
186
210
 
187
- - same dataset
211
+ - same configured dataset
188
212
  - same workflow variation
189
- - same truth checks
213
+ - same checks
190
214
  - same measurement
191
215
 
192
- `max_loops` enables the self-improving workflow loop in the normal `interf compile` path.
216
+ `max_loops` enables self-improving workflow edits in the normal `interf compile` path.
193
217
 
194
218
  In that loop, the thing that changes is the workflow itself.
195
219
 
196
220
  Each loop can:
197
221
 
198
- - run the current workflow variation on the dataset
199
- - test it on the same truth checks
200
- - inspect the failed traces, preserved stage shells, and test artifacts
201
- - review the workflow and stage docs
202
- - create a new workflow variation for that dataset
203
- - test the new variation on the same truth checks
204
-
205
- - `max_attempts` retries the same workflow variation
206
- - a self-improving loop creates and tests workflow variations
207
-
208
- The workflow is the right surface for that kind of improvement because it is:
222
+ - run the current workflow variation on the same configured dataset
223
+ - test it on the same checks
224
+ - inspect failed traces, preserved stage shells, and test artifacts
225
+ - edit the workflow
226
+ - build and test the next workflow variation
209
227
 
210
- - the reusable artifact
211
- - the human-reviewable method
212
- - the thing a future workflow-editing agent should inspect and change
213
-
214
- Interf Compiler preserves the workflow-improvement shell, the workflow-before / workflow-after snapshots, the failed stage shells, and the saved test runs from each loop so you can inspect exactly what the loop reviewed and changed.
215
-
216
- Example `interf.json`:
217
-
218
- ```jsonc
219
- {
220
- "datasets": [
221
- {
222
- "name": "cbre-chart-sanity",
223
- "max_attempts": 3, // retry compile + test for the same workflow until this dataset passes or hits this limit
224
- "max_loops": 2, // workflow-editing loops after retries fail
225
- "checks": [
226
- {
227
- "question": "What were Bristol's annual take-up values in 2018 and 2016?",
228
- "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."
229
- }
230
- ]
231
- }
232
- ]
233
- }
234
- ```
235
-
236
- Use the normal retry and loop controls first. Maintainers can use the internal repeated-test runner when they want controlled comparisons across workflows, compile profiles, or models.
228
+ Interf preserves workflow-improvement shells, workflow-before / workflow-after snapshots, failed stage shells, and test runs from each loop so you can inspect exactly what changed.
237
229
 
238
230
  ## Use It With Your Agent
239
231
 
@@ -242,54 +234,21 @@ If you already work through a local coding agent, it can run this process for yo
242
234
  Paste something like this into your agent:
243
235
 
244
236
  ```text
245
- Install @interf/compiler, run `interf` in this folder, and use the local agent executor.
246
-
247
- If `interf.json` is missing, draft one dataset entry with a few truth checks this agent should be able to answer from the selected dataset and add the expected answers for me to confirm.
248
-
249
- Then run a files-as-is baseline if helpful, compile the dataset, and run `interf test`.
250
-
251
- Tell me whether the compiled dataset passes the truth checks, and only recommend it if it does.
252
- ```
253
-
254
- ## Custom Workflows
237
+ Install `@interf/compiler`, run `interf` in this folder, and use the local agent executor.
255
238
 
256
- Interf Compiler ships with a default workflow.
239
+ If `interf.json` is missing, draft one dataset entry for this task with a few checks this agent should be able to answer from the selected files and add the expected answers for me to confirm.
257
240
 
258
- The built-in `interf` workflow runs three stages:
241
+ Then run a files-as-is baseline if helpful, compile the context folder to prepare the data for that task, and run `interf test`.
259
242
 
260
- 1. `summarize`
261
- 2. `structure`
262
- 3. `shape`
263
-
264
- If you want to change how the workflow runs on your dataset, this is the part you customize:
265
-
266
- ```bash
267
- interf create workflow
268
- interf verify workflow --path <path>
243
+ Tell me whether the context folder passes the checks, and only recommend it if it does.
269
244
  ```
270
245
 
271
- Then test that workflow on the same dataset and the same truth checks.
272
-
273
- Workflow docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
274
-
275
- ## Core Commands
276
-
277
- - `interf` = open the project-root wizard
278
- - `interf init` = alias for the project-root wizard
279
- - `interf create dataset` = add another dataset entry when you need one
280
- - `interf create workflow` = create a reusable local seed workflow
281
- - `interf compile` = build a selected compiled dataset for the current project
282
- - `interf test` = compare files as-is and a compiled dataset on saved truth checks
283
- - `interf doctor` = check local executor setup
284
- - `interf verify <check>` = run deterministic checks on major workflow steps
285
- - `interf reset <scope>` = remove generated state while keeping source files
286
-
287
246
  ## More Docs
288
247
 
289
- - [docs/workflow-spec.md](./docs/workflow-spec.md) for custom workflows
290
- - [docs/runtime-contract.md](./docs/runtime-contract.md) for the exact on-disk contract
291
- - [docs/architecture.md](./docs/architecture.md) for the deeper system model
292
- - [docs/test-matrix.md](./docs/test-matrix.md) for the internal repeated-test matrix runner used in maintainer model/workflow comparisons
248
+ - [src/packages/README.md](./src/packages/README.md) for the short system map
249
+ - [src/packages/compiler/PACKAGE.md](./src/packages/compiler/PACKAGE.md) for compiler primitives and the runtime ABI
250
+ - [src/packages/workflow-package/PACKAGE.md](./src/packages/workflow-package/PACKAGE.md) for the workflow package model
251
+ - [src/packages/workflow-authoring/PACKAGE.md](./src/packages/workflow-authoring/PACKAGE.md) for workflow authoring and self-improving loops
293
252
 
294
253
  Maintainers should use [CONTRIBUTING.md](./CONTRIBUTING.md) for test and release gates.
295
254
 
@@ -1,19 +1,31 @@
1
- # Interf Compiler (Recommended)
1
+ # Interf (Built-in Workflow)
2
2
 
3
- Interf Compiler's default methodology: summarize source-grounded evidence, structure the cross-file layer, then shape the final compiled dataset around its focus and saved truth checks.
3
+ Interf's built-in workflow: summarize source-grounded evidence, structure the cross-file layer, then shape the final context folder around its task focus and checks.
4
4
 
5
- ## Package
5
+ ## Purpose
6
6
 
7
- - `workflow.json` = stage graph, compiler API target, and compile contract mapping
8
- - `compiled.schema.json` = deterministic compiled-dataset output shape
9
- - `improve/`, `compile/stages/`, and `use/query/` = human-readable authoring docs
10
- - Portable workflow packages are standalone: explicit stages, schema, and docs live together in this folder
11
- - Interf Compiler projects native agent shells from these docs for query use, stage execution, and workflow-improvement loops
7
+ - General compiled context workflow for agent use
8
+ - Compile mixed raw files into evidence-backed summaries, cross-file structure, and a usable entrypoint for agents answering the questions this task depends on.
9
+
10
+ ## Zones
11
+
12
+ - `raw` — input directory at `raw`
13
+ - `summaries` — working directory at `summaries`
14
+ - `knowledge-entities` — output directory at `knowledge/entities`
15
+ - `knowledge-claims` — output directory at `knowledge/claims`
16
+ - `knowledge-indexes` — output directory at `knowledge/indexes`
17
+ - `home` — output file at `home.md` used as the primary entrypoint for this workflow
18
+ - `runtime` — runtime zone at `.interf/runtime`
12
19
 
13
20
  ## Stages
14
21
 
15
22
  - `summarize` — Turn source files into per-file summaries. (compiled-file-evidence; reads: raw, runtime; writes: summaries)
16
23
  - `structure` — Build the cross-file knowledge structure from the summaries. (compiled-knowledge-structure; reads: summaries, runtime; writes: knowledge-entities, knowledge-claims, knowledge-indexes)
17
- - `shape` — Shape the final compiled dataset around the saved focus and truth checks. (compiled-query-shape; reads: raw, summaries, knowledge-entities, knowledge-claims, knowledge-indexes, runtime; writes: knowledge-indexes, home)
24
+ - `shape` — Shape the final context folder around the saved task focus and checks. (compiled-query-shape; reads: raw, summaries, knowledge-entities, knowledge-claims, knowledge-indexes, runtime; writes: knowledge-indexes, home)
25
+
26
+ ## Why `home.md` exists here
27
+
28
+ This built-in workflow creates `home.md` as the main agent entrypoint for the context folder.
29
+ That is behavior of the `interf` workflow, not a compiler-wide rule.
18
30
 
19
- This package is the built-in seed for `interf`. Interf Compiler copies or materializes it into `.interf/workflow/` and runs that local package directly.
31
+ This package is the built-in seed for `interf`.
@@ -1,13 +1,16 @@
1
1
  # Shape
2
2
 
3
- Shape the final compiled dataset around the saved focus and truth checks.
3
+ Shape the final context folder around the saved task focus and checks.
4
4
 
5
5
  Contract type: `compiled-query-shape`
6
6
 
7
7
  ## Requirements
8
8
 
9
- - Use the compiled focus plus saved truth-check question text to shape `home.md` and retrieval routes.
9
+ - Use the compiled task focus plus saved truth-check question text to shape `home.md` and retrieval routes.
10
10
  - Rewrite `home.md` into a real entrypoint note. Do not leave the scaffold `Not yet compiled.` placeholder in place.
11
+ - When you add wikilinks, target real compiled notes by exact basename or explicit relative path.
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
+ - Prefer direct file-reading and search tools over shell commands for routine file inspection.
11
14
  - When a chart-derived value is approximate, use a bounded range instead of a pseudo-exact number.
12
15
  - Match the granularity of the visible axis labels or bands. Do not invent finer precision than the chart supports.
13
16
  - Keep the answer inside the visible tick band unless the chart supports a tighter bound.
@@ -15,12 +18,12 @@ Contract type: `compiled-query-shape`
15
18
  - If a mark touches or nearly touches a labeled gridline, anchor the answer at that gridline or the immediately adjacent half-band.
16
19
  - Do not widen a chart-derived range across multiple visible bands unless the chart genuinely supports that uncertainty.
17
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.
18
- - Do not copy expected answers into the compiled dataset.
21
+ - Do not copy expected answers into the context folder.
19
22
 
20
23
  ## Notes
21
24
 
22
- - Use the dataset focus and saved truth checks to bias the final compiled dataset toward the job it should be especially good at.
23
- - Do not copy expected answers into the final compiled dataset just because the checks imply them.
25
+ - Use the saved task focus and checks to bias the final context folder toward the job it should be especially good at.
26
+ - Do not copy expected answers into the final context folder just because the checks imply them.
24
27
  - Prefer the saved summary evidence and structured notes when they already preserve the bounded chart/table reads plus provenance you need.
25
28
  - Reopen `raw/` 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.
26
29
  - If a saved truth 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 raw.
@@ -8,6 +8,8 @@ Contract type: `compiled-knowledge-structure`
8
8
 
9
9
  - Treat the knowledge layer as retrieval structure, not final truth.
10
10
  - Prefer durable entity, claim, and index notes over one giant catch-all file.
11
+ - Keep structure-stage links stage-local: prefer linking only to summaries or knowledge notes that are already meaningful by the end of this stage. Avoid relying on `home.md` or other shape-stage routes as the main navigation surface.
12
+ - Prefer direct file-reading and search tools over shell commands for routine file inspection.
11
13
 
12
14
  ## Notes
13
15
 
@@ -15,4 +17,5 @@ Contract type: `compiled-knowledge-structure`
15
17
  - Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.
16
18
  - For small datasets, prefer a minimal stable substrate over exhaustive graph sprawl.
17
19
  - When you add wikilinks, target real compiled notes by exact basename or explicit relative path. Do not invent title-style links unless that exact title is also a declared note label or alias.
20
+ - Do not add wikilinks in structure outputs to files that the shape stage creates later. If a route belongs in `home.md` or a later shaped note, leave plain text now and let the later stage add the link.
18
21
  - For summary references, prefer explicit links like `[[summaries/<file-stem>]]` or plain code paths. For knowledge notes, prefer the final filename stem under `knowledge/`.
@@ -6,8 +6,24 @@ Contract type: `compiled-file-evidence`
6
6
 
7
7
  ## Requirements
8
8
 
9
- - Each summary must use JSON frontmatter and include `source`, `source_kind`, `evidence_tier`, `truth_mode`, `state`, and a non-empty `abstract`.
10
- - Include a clear abstract block in the body so a human can skim the summary quickly.
9
+ - Each summary must start with literal JSON frontmatter between `---` lines, not a fenced code block.
10
+ - Required opening shape:
11
+ - `---`
12
+ - `{`
13
+ - ` "source": "raw/example.md",`
14
+ - ` "source_kind": "markdown",`
15
+ - ` "evidence_tier": "primary",`
16
+ - ` "truth_mode": "source-grounded",`
17
+ - ` "state": "complete"`
18
+ - `}`
19
+ - `---`
20
+ - Do not wrap that JSON in triple backticks or emit ```json anywhere in the summary file.
21
+ - Prefer direct file-reading and search tools over shell commands for routine file inspection.
22
+ - Include a clear abstract either in frontmatter or under a markdown `## Abstract` heading so a human can skim the summary quickly.
23
+ - Valid abstract forms for deterministic validation are:
24
+ - frontmatter key `"abstract"` with a real sentence, or
25
+ - a markdown heading `## Abstract` followed by at least one sentence
26
+ - A bare `Abstract` label without markdown heading syntax does not count.
11
27
  - Do not skip the abstract just because the overview section is present.
12
28
 
13
29
  ## Notes
@@ -2,17 +2,17 @@
2
2
 
3
3
  Workflow: interf
4
4
 
5
- This file is the editable authoring source for Interf Compiler's generated native workflow-improver shell.
5
+ This file is the editable authoring source for Interf's generated native workflow-improver shell.
6
6
  The improver edits this local package directly.
7
7
 
8
8
  Default loop:
9
9
  1. Read the loop context first.
10
10
  2. Review preserved stage shells, runtime logs, and saved test runs from failed attempts.
11
- 3. Edit only the local workflow package for this compiled dataset to create a better workflow variation for this dataset.
12
- 4. Keep `workflow.json`, `compiled.schema.json`, and any changed stage docs aligned.
11
+ 3. Edit only the local workflow package for this context folder to create a better workflow variation for this task.
12
+ 4. Keep `workflow.json`, `workflow.schema.json`, and any changed stage docs aligned.
13
13
 
14
14
  Guardrails:
15
- - do not edit truth checks, test specs, or raw dataset files
15
+ - do not edit checks, test specs, or raw source files
16
16
  - do not hardcode expected answers into workflow docs
17
17
  - keep this package standalone; do not add or rely on runtime `extends` or fallback behavior
18
18
  - prefer small, defensible workflow changes over random churn
@@ -25,4 +25,4 @@ Answering rule:
25
25
  - if multiple compiled notes mention the same chart read, keep the answer consistent with the most focused compiled note rather than synthesizing a new midpoint or shifted band
26
26
  - when the compiled layer is insufficient, verify in `raw/` and then answer
27
27
 
28
- You can edit this file to bias manual question-answering behavior for this compiled dataset.
28
+ You can edit this file to bias manual question-answering behavior for this context folder.