@interf/compiler 0.3.3 → 0.4.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.
- package/README.md +137 -243
- package/builtin-workflows/interf/README.md +19 -0
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +28 -0
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +18 -0
- package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -0
- package/builtin-workflows/interf/improve/SKILL.md +18 -0
- package/builtin-workflows/interf/use/query/SKILL.md +28 -0
- package/builtin-workflows/interf/workflow.json +120 -0
- package/builtin-workflows/interf/workspace.schema.json +75 -0
- package/dist/bin.d.ts +0 -1
- package/dist/bin.js +0 -1
- package/dist/commands/compile-controller.d.ts +14 -0
- package/dist/commands/compile-controller.js +409 -0
- package/dist/commands/compile.d.ts +8 -9
- package/dist/commands/compile.js +151 -153
- package/dist/commands/create-workflow-wizard.d.ts +4 -2
- package/dist/commands/create-workflow-wizard.js +33 -31
- package/dist/commands/create.d.ts +0 -1
- package/dist/commands/create.js +16 -12
- package/dist/commands/default.d.ts +0 -1
- package/dist/commands/default.js +1 -2
- package/dist/commands/doctor.d.ts +0 -1
- package/dist/commands/doctor.js +7 -22
- package/dist/commands/executor-flow.d.ts +0 -1
- package/dist/commands/executor-flow.js +0 -1
- package/dist/commands/init.d.ts +0 -1
- package/dist/commands/init.js +72 -15
- package/dist/commands/list.d.ts +0 -1
- package/dist/commands/list.js +0 -1
- package/dist/commands/reset.d.ts +0 -1
- package/dist/commands/reset.js +0 -1
- package/dist/commands/source-config-wizard.d.ts +28 -7
- package/dist/commands/source-config-wizard.js +159 -63
- package/dist/commands/status.d.ts +0 -1
- package/dist/commands/status.js +0 -1
- package/dist/commands/test-flow.d.ts +20 -10
- package/dist/commands/test-flow.js +89 -23
- package/dist/commands/test.d.ts +0 -1
- package/dist/commands/test.js +36 -72
- package/dist/commands/verify.d.ts +0 -1
- package/dist/commands/verify.js +0 -1
- package/dist/commands/workspace-flow.d.ts +3 -3
- package/dist/commands/workspace-flow.js +30 -12
- package/dist/index.d.ts +5 -6
- package/dist/index.js +3 -4
- package/dist/lib/agent-args.d.ts +0 -1
- package/dist/lib/agent-args.js +0 -1
- package/dist/lib/agent-constants.d.ts +0 -1
- package/dist/lib/agent-constants.js +0 -1
- package/dist/lib/agent-detection.d.ts +0 -1
- package/dist/lib/agent-detection.js +0 -1
- package/dist/lib/agent-execution.d.ts +0 -1
- package/dist/lib/agent-execution.js +47 -12
- package/dist/lib/agent-logs.d.ts +0 -1
- package/dist/lib/agent-logs.js +0 -1
- package/dist/lib/agent-preflight.d.ts +0 -1
- package/dist/lib/agent-preflight.js +1 -2
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +30 -3
- package/dist/lib/agent-shells.js +527 -63
- package/dist/lib/agent-status.d.ts +0 -1
- package/dist/lib/agent-status.js +0 -1
- package/dist/lib/agent-types.d.ts +0 -1
- package/dist/lib/agent-types.js +0 -1
- package/dist/lib/agents.d.ts +0 -9
- package/dist/lib/agents.js +0 -9
- package/dist/lib/chart-guidance.d.ts +1 -0
- package/dist/lib/chart-guidance.js +8 -0
- package/dist/lib/config.d.ts +0 -3
- package/dist/lib/config.js +0 -5
- package/dist/lib/discovery.d.ts +0 -1
- package/dist/lib/discovery.js +0 -1
- package/dist/lib/execution-profile.d.ts +0 -1
- package/dist/lib/execution-profile.js +0 -1
- package/dist/lib/executors.d.ts +0 -1
- package/dist/lib/executors.js +0 -1
- package/dist/lib/filesystem.d.ts +0 -1
- package/dist/lib/filesystem.js +0 -1
- package/dist/lib/interf-bootstrap.d.ts +0 -1
- package/dist/lib/interf-bootstrap.js +6 -2
- package/dist/lib/interf-detect.d.ts +2 -2
- package/dist/lib/interf-detect.js +25 -8
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +54 -21
- package/dist/lib/interf-workflow-package.d.ts +18 -1
- package/dist/lib/interf-workflow-package.js +164 -23
- package/dist/lib/interf.d.ts +1 -2
- package/dist/lib/interf.js +1 -2
- package/dist/lib/local-workflows.d.ts +10 -5
- package/dist/lib/local-workflows.js +208 -97
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/obsidian.d.ts +0 -1
- package/dist/lib/obsidian.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/registry.d.ts +0 -1
- package/dist/lib/registry.js +0 -1
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +1 -2
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +14 -8
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +5 -10
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +8 -23
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +7 -3
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +4 -5
- package/dist/lib/runtime-types.d.ts +0 -1
- package/dist/lib/runtime-types.js +0 -1
- package/dist/lib/runtime.d.ts +0 -1
- package/dist/lib/runtime.js +0 -1
- package/dist/lib/schema.d.ts +356 -51
- package/dist/lib/schema.js +189 -54
- package/dist/lib/source-config.d.ts +17 -8
- package/dist/lib/source-config.js +125 -11
- package/dist/lib/state-artifacts.d.ts +0 -1
- package/dist/lib/state-artifacts.js +0 -1
- package/dist/lib/state-health.d.ts +0 -1
- package/dist/lib/state-health.js +2 -3
- package/dist/lib/state-io.d.ts +1 -1
- package/dist/lib/state-io.js +9 -10
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +5 -11
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +7 -8
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/summarize-plan.d.ts +0 -1
- package/dist/lib/summarize-plan.js +3 -3
- package/dist/lib/test-execution.d.ts +14 -0
- package/dist/lib/{benchmark-execution.js → test-execution.js} +122 -120
- package/dist/lib/test-matrices.d.ts +90 -0
- package/dist/lib/test-matrices.js +96 -0
- package/dist/lib/test-paths.d.ts +12 -0
- package/dist/lib/test-paths.js +44 -0
- package/dist/lib/test-profile-presets.d.ts +57 -0
- package/dist/lib/test-profile-presets.js +50 -0
- package/dist/lib/test-sandbox.d.ts +11 -0
- package/dist/lib/{benchmark-sandbox.js → test-sandbox.js} +18 -13
- package/dist/lib/test-specs.d.ts +7 -0
- package/dist/lib/test-specs.js +114 -0
- package/dist/lib/test-targets.d.ts +5 -0
- package/dist/lib/test-targets.js +38 -0
- package/dist/lib/test-types.d.ts +17 -0
- package/dist/lib/test-types.js +1 -0
- package/dist/lib/test.d.ts +4 -0
- package/dist/lib/test.js +3 -0
- package/dist/lib/user-config.d.ts +0 -1
- package/dist/lib/user-config.js +0 -1
- package/dist/lib/util.d.ts +0 -2
- package/dist/lib/util.js +0 -2
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate-workspace.d.ts +0 -1
- package/dist/lib/validate-workspace.js +34 -25
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +55 -9
- package/dist/lib/workflow-abi.d.ts +138 -0
- package/dist/lib/workflow-abi.js +181 -0
- package/dist/lib/workflow-definitions.d.ts +26 -5
- package/dist/lib/workflow-definitions.js +105 -168
- package/dist/lib/workflow-helpers.d.ts +1 -2
- package/dist/lib/workflow-helpers.js +32 -21
- package/dist/lib/workflow-improvement.d.ts +22 -0
- package/dist/lib/workflow-improvement.js +396 -0
- package/dist/lib/workflow-review-paths.d.ts +10 -0
- package/dist/lib/workflow-review-paths.js +27 -0
- package/dist/lib/workflow-stage-runner.d.ts +1 -1
- package/dist/lib/workflow-stage-runner.js +4 -1
- package/dist/lib/workflows.d.ts +1 -2
- package/dist/lib/workflows.js +1 -2
- package/dist/lib/workspace-compile.d.ts +0 -1
- package/dist/lib/workspace-compile.js +146 -109
- package/dist/lib/workspace-home.d.ts +5 -0
- package/dist/lib/workspace-home.js +32 -0
- package/dist/lib/workspace-layout.d.ts +2 -0
- package/dist/lib/workspace-layout.js +60 -0
- package/dist/lib/workspace-paths.d.ts +41 -0
- package/dist/lib/workspace-paths.js +107 -0
- package/dist/lib/workspace-raw.d.ts +20 -2
- package/dist/lib/workspace-raw.js +6 -8
- package/dist/lib/workspace-reset.d.ts +0 -1
- package/dist/lib/workspace-reset.js +27 -5
- package/dist/lib/workspace-schema.d.ts +1 -10
- package/dist/lib/workspace-schema.js +16 -74
- package/package.json +17 -16
- package/dist/bin.d.ts.map +0 -1
- package/dist/bin.js.map +0 -1
- package/dist/commands/compile.d.ts.map +0 -1
- package/dist/commands/compile.js.map +0 -1
- package/dist/commands/create-workflow-wizard.d.ts.map +0 -1
- package/dist/commands/create-workflow-wizard.js.map +0 -1
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js.map +0 -1
- package/dist/commands/default.d.ts.map +0 -1
- package/dist/commands/default.js.map +0 -1
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js.map +0 -1
- package/dist/commands/executor-flow.d.ts.map +0 -1
- package/dist/commands/executor-flow.js.map +0 -1
- package/dist/commands/init.d.ts.map +0 -1
- package/dist/commands/init.js.map +0 -1
- package/dist/commands/list.d.ts.map +0 -1
- package/dist/commands/list.js.map +0 -1
- package/dist/commands/reset.d.ts.map +0 -1
- package/dist/commands/reset.js.map +0 -1
- package/dist/commands/source-config-wizard.d.ts.map +0 -1
- package/dist/commands/source-config-wizard.js.map +0 -1
- package/dist/commands/status.d.ts.map +0 -1
- package/dist/commands/status.js.map +0 -1
- package/dist/commands/test-flow.d.ts.map +0 -1
- package/dist/commands/test-flow.js.map +0 -1
- package/dist/commands/test.d.ts.map +0 -1
- package/dist/commands/test.js.map +0 -1
- package/dist/commands/verify.d.ts.map +0 -1
- package/dist/commands/verify.js.map +0 -1
- package/dist/commands/workspace-flow.d.ts.map +0 -1
- package/dist/commands/workspace-flow.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lib/agent-args.d.ts.map +0 -1
- package/dist/lib/agent-args.js.map +0 -1
- package/dist/lib/agent-constants.d.ts.map +0 -1
- package/dist/lib/agent-constants.js.map +0 -1
- package/dist/lib/agent-detection.d.ts.map +0 -1
- package/dist/lib/agent-detection.js.map +0 -1
- package/dist/lib/agent-execution.d.ts.map +0 -1
- package/dist/lib/agent-execution.js.map +0 -1
- package/dist/lib/agent-logs.d.ts.map +0 -1
- package/dist/lib/agent-logs.js.map +0 -1
- package/dist/lib/agent-preflight.d.ts.map +0 -1
- package/dist/lib/agent-preflight.js.map +0 -1
- package/dist/lib/agent-render.d.ts.map +0 -1
- package/dist/lib/agent-render.js.map +0 -1
- package/dist/lib/agent-shells.d.ts.map +0 -1
- package/dist/lib/agent-shells.js.map +0 -1
- package/dist/lib/agent-skills.d.ts +0 -21
- package/dist/lib/agent-skills.d.ts.map +0 -1
- package/dist/lib/agent-skills.js +0 -215
- package/dist/lib/agent-skills.js.map +0 -1
- package/dist/lib/agent-status.d.ts.map +0 -1
- package/dist/lib/agent-status.js.map +0 -1
- package/dist/lib/agent-types.d.ts.map +0 -1
- package/dist/lib/agent-types.js.map +0 -1
- package/dist/lib/agents.d.ts.map +0 -1
- package/dist/lib/agents.js.map +0 -1
- package/dist/lib/benchmark-execution.d.ts +0 -13
- package/dist/lib/benchmark-execution.d.ts.map +0 -1
- package/dist/lib/benchmark-execution.js.map +0 -1
- package/dist/lib/benchmark-paths.d.ts +0 -13
- package/dist/lib/benchmark-paths.d.ts.map +0 -1
- package/dist/lib/benchmark-paths.js +0 -44
- package/dist/lib/benchmark-paths.js.map +0 -1
- package/dist/lib/benchmark-sandbox.d.ts +0 -12
- package/dist/lib/benchmark-sandbox.d.ts.map +0 -1
- package/dist/lib/benchmark-sandbox.js.map +0 -1
- package/dist/lib/benchmark-specs.d.ts +0 -8
- package/dist/lib/benchmark-specs.d.ts.map +0 -1
- package/dist/lib/benchmark-specs.js +0 -115
- package/dist/lib/benchmark-specs.js.map +0 -1
- package/dist/lib/benchmark-targets.d.ts +0 -5
- package/dist/lib/benchmark-targets.d.ts.map +0 -1
- package/dist/lib/benchmark-targets.js +0 -38
- package/dist/lib/benchmark-targets.js.map +0 -1
- package/dist/lib/benchmark-types.d.ts +0 -18
- package/dist/lib/benchmark-types.d.ts.map +0 -1
- package/dist/lib/benchmark-types.js +0 -2
- package/dist/lib/benchmark-types.js.map +0 -1
- package/dist/lib/benchmark.d.ts +0 -5
- package/dist/lib/benchmark.d.ts.map +0 -1
- package/dist/lib/benchmark.js +0 -4
- package/dist/lib/benchmark.js.map +0 -1
- package/dist/lib/config.d.ts.map +0 -1
- package/dist/lib/config.js.map +0 -1
- package/dist/lib/discovery.d.ts.map +0 -1
- package/dist/lib/discovery.js.map +0 -1
- package/dist/lib/eval-packs.d.ts +0 -158
- package/dist/lib/eval-packs.d.ts.map +0 -1
- package/dist/lib/eval-packs.js +0 -149
- package/dist/lib/eval-packs.js.map +0 -1
- package/dist/lib/execution-profile.d.ts.map +0 -1
- package/dist/lib/execution-profile.js.map +0 -1
- package/dist/lib/executors.d.ts.map +0 -1
- package/dist/lib/executors.js.map +0 -1
- package/dist/lib/filesystem.d.ts.map +0 -1
- package/dist/lib/filesystem.js.map +0 -1
- package/dist/lib/interf-bootstrap.d.ts.map +0 -1
- package/dist/lib/interf-bootstrap.js.map +0 -1
- package/dist/lib/interf-detect.d.ts.map +0 -1
- package/dist/lib/interf-detect.js.map +0 -1
- package/dist/lib/interf-scaffold.d.ts.map +0 -1
- package/dist/lib/interf-scaffold.js.map +0 -1
- package/dist/lib/interf-workflow-package.d.ts.map +0 -1
- package/dist/lib/interf-workflow-package.js.map +0 -1
- package/dist/lib/interf.d.ts.map +0 -1
- package/dist/lib/interf.js.map +0 -1
- package/dist/lib/local-workflows.d.ts.map +0 -1
- package/dist/lib/local-workflows.js.map +0 -1
- package/dist/lib/logger.d.ts.map +0 -1
- package/dist/lib/logger.js.map +0 -1
- package/dist/lib/obsidian.d.ts.map +0 -1
- package/dist/lib/obsidian.js.map +0 -1
- package/dist/lib/parse.d.ts.map +0 -1
- package/dist/lib/parse.js.map +0 -1
- package/dist/lib/registry.d.ts.map +0 -1
- package/dist/lib/registry.js.map +0 -1
- package/dist/lib/runtime-acceptance.d.ts.map +0 -1
- package/dist/lib/runtime-acceptance.js.map +0 -1
- package/dist/lib/runtime-contracts.d.ts.map +0 -1
- package/dist/lib/runtime-contracts.js.map +0 -1
- package/dist/lib/runtime-paths.d.ts.map +0 -1
- package/dist/lib/runtime-paths.js.map +0 -1
- package/dist/lib/runtime-prompt.d.ts.map +0 -1
- package/dist/lib/runtime-prompt.js.map +0 -1
- package/dist/lib/runtime-reconcile.d.ts.map +0 -1
- package/dist/lib/runtime-reconcile.js.map +0 -1
- package/dist/lib/runtime-runs.d.ts.map +0 -1
- package/dist/lib/runtime-runs.js.map +0 -1
- package/dist/lib/runtime-types.d.ts.map +0 -1
- package/dist/lib/runtime-types.js.map +0 -1
- package/dist/lib/runtime.d.ts.map +0 -1
- package/dist/lib/runtime.js.map +0 -1
- package/dist/lib/schema.d.ts.map +0 -1
- package/dist/lib/schema.js.map +0 -1
- package/dist/lib/source-config.d.ts.map +0 -1
- package/dist/lib/source-config.js.map +0 -1
- package/dist/lib/state-artifacts.d.ts.map +0 -1
- package/dist/lib/state-artifacts.js.map +0 -1
- package/dist/lib/state-health.d.ts.map +0 -1
- package/dist/lib/state-health.js.map +0 -1
- package/dist/lib/state-io.d.ts.map +0 -1
- package/dist/lib/state-io.js.map +0 -1
- package/dist/lib/state-paths.d.ts.map +0 -1
- package/dist/lib/state-paths.js.map +0 -1
- package/dist/lib/state-view.d.ts.map +0 -1
- package/dist/lib/state-view.js.map +0 -1
- package/dist/lib/state.d.ts.map +0 -1
- package/dist/lib/state.js.map +0 -1
- package/dist/lib/summarize-plan.d.ts.map +0 -1
- package/dist/lib/summarize-plan.js.map +0 -1
- package/dist/lib/user-config.d.ts.map +0 -1
- package/dist/lib/user-config.js.map +0 -1
- package/dist/lib/util.d.ts.map +0 -1
- package/dist/lib/util.js.map +0 -1
- package/dist/lib/validate-helpers.d.ts.map +0 -1
- package/dist/lib/validate-helpers.js.map +0 -1
- package/dist/lib/validate-workspace.d.ts.map +0 -1
- package/dist/lib/validate-workspace.js.map +0 -1
- package/dist/lib/validate.d.ts.map +0 -1
- package/dist/lib/validate.js.map +0 -1
- package/dist/lib/workflow-definitions.d.ts.map +0 -1
- package/dist/lib/workflow-definitions.js.map +0 -1
- package/dist/lib/workflow-helpers.d.ts.map +0 -1
- package/dist/lib/workflow-helpers.js.map +0 -1
- package/dist/lib/workflow-stage-runner.d.ts.map +0 -1
- package/dist/lib/workflow-stage-runner.js.map +0 -1
- package/dist/lib/workflow-starter-docs.d.ts +0 -7
- package/dist/lib/workflow-starter-docs.d.ts.map +0 -1
- package/dist/lib/workflow-starter-docs.js +0 -3
- package/dist/lib/workflow-starter-docs.js.map +0 -1
- package/dist/lib/workflows.d.ts.map +0 -1
- package/dist/lib/workflows.js.map +0 -1
- package/dist/lib/workspace-compile.d.ts.map +0 -1
- package/dist/lib/workspace-compile.js.map +0 -1
- package/dist/lib/workspace-docs.d.ts +0 -3
- package/dist/lib/workspace-docs.d.ts.map +0 -1
- package/dist/lib/workspace-docs.js +0 -82
- package/dist/lib/workspace-docs.js.map +0 -1
- package/dist/lib/workspace-raw.d.ts.map +0 -1
- package/dist/lib/workspace-raw.js.map +0 -1
- package/dist/lib/workspace-reset.d.ts.map +0 -1
- package/dist/lib/workspace-reset.js.map +0 -1
- package/dist/lib/workspace-schema.d.ts.map +0 -1
- package/dist/lib/workspace-schema.js.map +0 -1
- package/skills/benchmark/SKILL.md +0 -122
- package/skills/workflow/create/SKILL.md +0 -141
- package/skills/workspace/shape/SKILL.md +0 -15
- package/skills/workspace/structure/SKILL.md +0 -15
- package/skills/workspace/summarize/SKILL.md +0 -15
- package/templates/workspace/README.md +0 -24
- package/templates/workspace/interfignore +0 -2
package/README.md
CHANGED
|
@@ -1,155 +1,134 @@
|
|
|
1
|
-
# Interf
|
|
1
|
+
# Interf Compiler
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Prepare local datasets for accurate agent use.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Interf Compiler runs a local data-processing workflow over your dataset to build a compiled workspace: a file-based layer on top of your raw files that gives agents the full picture of the dataset they need to answer questions accurately.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Define truth checks to measure how accurately agents answer from your dataset.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Start with a baseline on your files as-is.
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
- BYOAI: use Claude Code, Codex, OpenClaw, Hermes, or your own local setup
|
|
13
|
-
- your raw files stay the source of truth
|
|
14
|
-
- the workflow package is the reusable method
|
|
15
|
-
- the compiler runtime executes that workflow package and builds a file-based layer on top
|
|
11
|
+
Then compile the workspace and retest it on the same checks so you can measure whether it actually helps.
|
|
16
12
|
|
|
17
|
-
|
|
13
|
+
Then run self-improving loops that revise the workflow, rebuild the workspace, and rerun the same truth checks until the workspace passes or reaches the loop limit.
|
|
18
14
|
|
|
19
|
-
|
|
15
|
+
## Why Use It
|
|
20
16
|
|
|
21
|
-
Interf
|
|
17
|
+
Interf Compiler is built around a few simple principles:
|
|
22
18
|
|
|
23
|
-
- the
|
|
24
|
-
-
|
|
19
|
+
- `Local`: the dataset, workflow, workspace, and test runs stay on your machine.
|
|
20
|
+
- `File-based`: the compiled workspace is normal folders and files you can inspect, review, and version.
|
|
21
|
+
- `Source-backed`: your raw files stay the source of truth; the compiled workspace is a layer on top, not a replacement database.
|
|
22
|
+
- `Interoperable`: the same workspace can be used with different local agents and tools.
|
|
23
|
+
- `Self-improving`: when truth checks fail, Interf can retry the workflow or revise it, rebuild the workspace, and rerun the same checks.
|
|
25
24
|
|
|
26
|
-
|
|
25
|
+
## Example: Truth Checks
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Requirements:
|
|
31
|
-
|
|
32
|
-
- Node.js 20+
|
|
33
|
-
- a local coding agent: Claude Code or Codex
|
|
34
|
-
|
|
35
|
-
Install:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
npm install -g @interf/compiler
|
|
39
|
-
```
|
|
27
|
+
Truth checks are just question-and-answer pairs you already know how to verify from the dataset.
|
|
40
28
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
cd ~/my-folder
|
|
45
|
-
interf
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
If you want to see the config shape first, this is what Interf writes:
|
|
29
|
+
A maintained public test run in this repo uses checks like this:
|
|
49
30
|
|
|
31
|
+
<!-- PUBLIC_TEST_CHECKS:START -->
|
|
50
32
|
```jsonc
|
|
51
33
|
{
|
|
52
34
|
"workspaces": [
|
|
53
35
|
{
|
|
54
|
-
"name": "
|
|
55
|
-
"about": "
|
|
56
|
-
"max_attempts": 3, // rerun compile + test until this workspace passes the saved truth checks or hits this limit
|
|
36
|
+
"name": "cbre-chart-sanity",
|
|
37
|
+
"about": "Bristol historical take-up and availability chart lookup.",
|
|
57
38
|
"checks": [
|
|
58
39
|
{
|
|
59
|
-
"question": "What
|
|
60
|
-
"answer": "
|
|
40
|
+
"question": "What were Bristol's annual take-up values in 2018 and 2016?",
|
|
41
|
+
"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."
|
|
61
42
|
},
|
|
62
43
|
{
|
|
63
|
-
"question": "
|
|
64
|
-
"answer": "
|
|
44
|
+
"question": "What were Bristol's availability values in 2018 and 2016?",
|
|
45
|
+
"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."
|
|
65
46
|
}
|
|
66
47
|
]
|
|
67
48
|
}
|
|
68
49
|
]
|
|
69
50
|
}
|
|
70
51
|
```
|
|
52
|
+
<!-- PUBLIC_TEST_CHECKS:END -->
|
|
71
53
|
|
|
72
|
-
|
|
54
|
+
## Example: `interf test`
|
|
73
55
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
interf compile
|
|
77
|
-
interf test
|
|
78
|
-
```
|
|
56
|
+
`interf test` compares the raw files and the compiled workspace on the same saved truth checks.
|
|
57
|
+
The table below is synced from a real public test run in this repo.
|
|
79
58
|
|
|
80
|
-
|
|
59
|
+
<!-- PUBLIC_TEST_TABLE:START -->
|
|
60
|
+
| Runner | Files as-is | Compiled workspace |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| Codex (GPT-5.4, xhigh) | `2/2` | `2/2` |
|
|
63
|
+
| Claude Code (Claude Opus 4.6 1M, max) | `0/2` | `2/2` |
|
|
64
|
+
<!-- PUBLIC_TEST_TABLE:END -->
|
|
81
65
|
|
|
82
|
-
|
|
83
|
-
- run a baseline test on the raw files
|
|
84
|
-
- compile the workspace
|
|
85
|
-
- optionally keep compiling and retesting until it passes or reaches the attempt limit
|
|
86
|
-
- run the same test against the compiled workspace
|
|
66
|
+
That is the point of `interf test`: measure the same checks on both sides and keep the result honest, even when a compiled workspace helps one model more than another.
|
|
87
67
|
|
|
88
|
-
|
|
68
|
+
Use `interf test` on your own dataset to measure files as-is versus the compiled workspace on the same checks.
|
|
89
69
|
|
|
90
|
-
|
|
91
|
-
- `interf/benchmarks/runs/...` with the saved test result
|
|
92
|
-
- a pass/fail score on the same truth checks you wrote
|
|
70
|
+
Each run saves one comparison record under `.interf/tests/runs/`. Detailed target-specific runs and preserved sandboxes stay under `.interf/tests/targets/`.
|
|
93
71
|
|
|
94
|
-
|
|
72
|
+
## Quick Start
|
|
95
73
|
|
|
96
|
-
|
|
97
|
-
- per-question pass/fail results
|
|
98
|
-
- the saved run path under `interf/benchmarks/runs/...`
|
|
99
|
-
- the preserved sandbox path when a failed run is kept for review or you use `interf test --keep-sandboxes`
|
|
100
|
-
- executor metadata such as agent, command, model, effort, and profile when available
|
|
74
|
+
Requirements:
|
|
101
75
|
|
|
102
|
-
|
|
76
|
+
- Node.js 20+
|
|
77
|
+
- a local coding agent such as Claude Code or Codex
|
|
78
|
+
|
|
79
|
+
Install:
|
|
103
80
|
|
|
104
81
|
```bash
|
|
105
|
-
interf
|
|
82
|
+
npm install -g @interf/compiler
|
|
106
83
|
```
|
|
107
84
|
|
|
108
|
-
|
|
85
|
+
Start from the folder that already contains your dataset:
|
|
109
86
|
|
|
110
|
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
- if needed, rerun compile or use the advanced retry path until it is good enough
|
|
87
|
+
```bash
|
|
88
|
+
cd ~/my-dataset
|
|
89
|
+
interf
|
|
90
|
+
interf compile
|
|
91
|
+
interf test
|
|
92
|
+
```
|
|
117
93
|
|
|
118
|
-
|
|
94
|
+
The first run can:
|
|
119
95
|
|
|
120
|
-
|
|
96
|
+
- save a few truth checks for the dataset
|
|
97
|
+
- test your files as-is first on those same checks
|
|
98
|
+
- build the compiled workspace
|
|
99
|
+
- test the compiled workspace on the same truth checks
|
|
121
100
|
|
|
122
|
-
|
|
123
|
-
- `Local`: your dataset stays on your machine
|
|
124
|
-
- `File over app`: the output is just files, so you can use your editor, Unix tools, Obsidian, or your own software on top
|
|
125
|
-
- `BYOAI`: use Claude Code, Codex, OpenClaw, Hermes, or your own model
|
|
101
|
+
## What Interf Compiler Creates
|
|
126
102
|
|
|
127
|
-
|
|
103
|
+
After setup, the main persistent object is the compiled workspace:
|
|
128
104
|
|
|
129
|
-
|
|
105
|
+
- `interf/workspaces/<name>/` with the compiled workspace
|
|
106
|
+
- `interf/workspaces/<name>/.interf/interf.json` with the workspace-local runtime contract
|
|
107
|
+
- `interf/workspaces/<name>/.interf/tests/runs/...` with saved raw-vs-compiled test comparisons
|
|
130
108
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
interf
|
|
135
|
-
interf compile
|
|
136
|
-
interf test
|
|
137
|
-
```
|
|
109
|
+
The dataset root can also keep `interf.config.json` as bootstrap/setup for workspace names, truth checks, and compile defaults.
|
|
110
|
+
|
|
111
|
+
A compiled workspace is a folder on top of your dataset. It includes:
|
|
138
112
|
|
|
139
|
-
|
|
113
|
+
- a workspace-local `raw/` snapshot for direct evidence and verification
|
|
114
|
+
- agent-readable summaries and cross-file notes
|
|
115
|
+
- `AGENTS.md`, `CLAUDE.md`, and generated local query skills
|
|
116
|
+
- workspace method, test, and runtime state under `.interf/`
|
|
140
117
|
|
|
141
|
-
|
|
118
|
+
The compiled workspace is the folder your agent should work from.
|
|
142
119
|
|
|
143
|
-
|
|
120
|
+
## How It Works
|
|
144
121
|
|
|
145
|
-
|
|
122
|
+
1. Save a few truth checks for the dataset.
|
|
123
|
+
2. Optionally test your files as-is for a baseline.
|
|
124
|
+
3. Build the compiled workspace.
|
|
125
|
+
4. Test the compiled workspace on the same truth checks.
|
|
126
|
+
5. Optionally let Interf retry or improve the workflow until it passes or hits the configured limit.
|
|
146
127
|
|
|
147
|
-
|
|
148
|
-
- add another workspace only if you want a separate compiled setup with different truth checks
|
|
149
|
-
- each workspace carries its own `checks`
|
|
150
|
-
- each workspace can optionally carry `max_attempts` for the self-improving compile loop
|
|
128
|
+
Truth checks are simple:
|
|
151
129
|
|
|
152
|
-
|
|
130
|
+
- one question
|
|
131
|
+
- one expected answer
|
|
153
132
|
|
|
154
133
|
Good first truth checks are small and practical:
|
|
155
134
|
|
|
@@ -157,128 +136,29 @@ Good first truth checks are small and practical:
|
|
|
157
136
|
- one short statement that should be true or false
|
|
158
137
|
- one simple comparison across years, files, or sections
|
|
159
138
|
|
|
160
|
-
|
|
139
|
+
If `interf.config.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:
|
|
161
140
|
|
|
162
141
|
```bash
|
|
163
|
-
interf
|
|
164
|
-
interf test
|
|
142
|
+
interf doctor
|
|
165
143
|
```
|
|
166
144
|
|
|
167
145
|
## What `interf test` Does
|
|
168
146
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
It lets you answer a simple question:
|
|
172
|
-
|
|
173
|
-
- what is the current baseline on the raw files?
|
|
174
|
-
- does this compiled workspace improve on that baseline?
|
|
175
|
-
- which compiled workspace or workflow performs better on the same dataset?
|
|
176
|
-
- does a separate workspace with different truth checks work better for that job?
|
|
177
|
-
|
|
178
|
-
By default it loads truth checks from `interf.config.json`, can run a raw baseline in an isolated raw-files sandbox, can test eligible compiled workspaces under `interf/workspaces/`, and saves the run under `interf/benchmarks/runs/`.
|
|
147
|
+
By default, if a compiled workspace exists, it runs both sides and saves one comparison under that workspace's `.interf/tests/runs/`.
|
|
179
148
|
|
|
180
149
|
For live runs:
|
|
181
150
|
|
|
182
|
-
- raw tests execute from a sanitized raw-only
|
|
151
|
+
- raw tests execute from a sanitized raw-only shell built from `raw/`
|
|
183
152
|
- compiled-workspace tests execute from a copied workspace sandbox with embedded sanitized `raw/`
|
|
184
|
-
-
|
|
185
|
-
-
|
|
153
|
+
- both sides use the same saved truth checks from that workspace's `.interf/interf.json`
|
|
154
|
+
- neither sandbox includes the dataset control plane
|
|
155
|
+
- detailed raw/workspace target runs are kept under `.interf/tests/targets/runs/`
|
|
156
|
+
- failed test sandboxes are kept automatically under `.interf/tests/targets/sandboxes/`
|
|
186
157
|
- `interf test --keep-sandboxes` keeps every sandbox, even successful ones
|
|
187
158
|
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
- the benchmark target and mode
|
|
191
|
-
- per-question results and traces
|
|
192
|
-
- the preserved sandbox path when one was kept
|
|
193
|
-
- the executor metadata for that run
|
|
194
|
-
|
|
195
|
-
If you run `interf test` from inside a workspace, it uses that workspace's truth checks and tests that workspace. If you run it from the source folder, it lets you choose a saved workspace and then choose raw files, the compiled workspace, or both.
|
|
196
|
-
|
|
197
|
-
Live test runs use an isolated sandbox. For raw baselines, Interf gives the agent sanitized raw files only. For compiled-workspace tests, it gives the agent a copied workspace with its own embedded sanitized `raw/` fallback via `source.path`. The source-folder control plane, `interf.config.json`, and saved test runs are not part of those sandboxes.
|
|
198
|
-
|
|
199
|
-
If you need repeated isolated experiments across workflows or models, use the advanced eval-pack runner in [docs/eval-loop.md](./docs/eval-loop.md).
|
|
200
|
-
|
|
201
|
-
## What `interf compile` Does
|
|
202
|
-
|
|
203
|
-
`interf compile` runs the selected workflow package over a dataset.
|
|
204
|
-
|
|
205
|
-
By default, that means:
|
|
206
|
-
|
|
207
|
-
- summarize the source files into per-file evidence notes
|
|
208
|
-
- structure the cross-file knowledge layer into entities, claims, and indexes
|
|
209
|
-
- shape the final workspace around its saved focus and truth checks
|
|
210
|
-
|
|
211
|
-
In other words, the built-in workflow is:
|
|
212
|
-
|
|
213
|
-
1. `summarize`
|
|
214
|
-
2. `structure`
|
|
215
|
-
3. `shape`
|
|
216
|
-
|
|
217
|
-
The default workflow is built in. If you want a different method, you can define your own workflow package and test it on the same dataset.
|
|
218
|
-
|
|
219
|
-
Each workflow package combines:
|
|
220
|
-
|
|
221
|
-
- `workflow.json` for stage order, compiler API target, and deterministic contract mapping
|
|
222
|
-
- `workspace.schema.json` for the deterministic output shape of the compiled workspace
|
|
223
|
-
- stage `reads` / `writes` declarations that reference schema-defined zone ids
|
|
224
|
-
- local `SKILL.md` files as the authoring source for query and stage-execution behavior
|
|
225
|
-
|
|
226
|
-
Interf then projects that package into the native agent surfaces it actually runs:
|
|
227
|
-
|
|
228
|
-
- the compiled workspace gets a generated native query shell
|
|
229
|
-
- each compile stage gets a generated native execution shell
|
|
230
|
-
- that shell keeps its own `AGENTS.md`, `CLAUDE.md`, and native local skills
|
|
231
|
-
- schema-declared workspace zones are mounted both at their workflow-relative paths and as shell-local `inputs/<zone-id>` / `outputs/<zone-id>` aliases
|
|
232
|
-
- the workspace root itself is not linked into the shell
|
|
233
|
-
|
|
234
|
-
If a workspace has `max_attempts`, or if you run `interf compile --max-attempts <n>`, Interf can keep compiling, testing, and retrying until that workspace passes or reaches the attempt limit. If several attempts fail, Interf keeps the best-performing compiled workspace from that run.
|
|
235
|
-
|
|
236
|
-
For stage-level review:
|
|
237
|
-
|
|
238
|
-
- successful stage shells are pruned by default
|
|
239
|
-
- failed stage shells stay under `.interf/execution-shells/`
|
|
240
|
-
- `interf compile --keep-stage-shells` keeps every stage shell so you can inspect the exact native instruction surface, mounted inputs, and mounted outputs for each stage
|
|
241
|
-
|
|
242
|
-
## What Gets Created
|
|
159
|
+
From inside a workspace, `interf test` uses that workspace's `.interf/interf.json` directly. From the dataset root, `interf.config.json` only bootstraps workspace selection before the workspace-local runtime contract takes over.
|
|
243
160
|
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
- `interf/workspaces/<name>/` is a compiled workspace over the folder
|
|
247
|
-
- `interf/benchmarks/runs/...` stores saved test runs
|
|
248
|
-
|
|
249
|
-
Inside those workspaces you will see things like:
|
|
250
|
-
|
|
251
|
-
- a workspace-local `raw/` snapshot for direct evidence and verification
|
|
252
|
-
- `workflow/workspace.schema.json` describing the deterministic output shape
|
|
253
|
-
- `AGENTS.md`, `CLAUDE.md`, and generated local query skills for manual agent use
|
|
254
|
-
- summaries of source files
|
|
255
|
-
- navigation notes and entrypoints for agents
|
|
256
|
-
- cross-file knowledge notes
|
|
257
|
-
- workspace-specific outputs when you define a separate job-focused workspace
|
|
258
|
-
|
|
259
|
-
The compiled workspace is just a normal folder. Open it in your editor, in your agent, or in Obsidian if you want the graph view.
|
|
260
|
-
|
|
261
|
-
For manual use, the workspace is the native agent shell. The editable authoring source for that shell lives under `workflow/use/query/`, and Interf generates native local query skills from it inside the workspace.
|
|
262
|
-
|
|
263
|
-
If you use Obsidian, open `interf/workspaces/<name>/` as the vault for the compiled workspace.
|
|
264
|
-
|
|
265
|
-
## Terminology
|
|
266
|
-
|
|
267
|
-
Public terms:
|
|
268
|
-
|
|
269
|
-
- `dataset` = the collection of files Interf prepares
|
|
270
|
-
- `truth check` = one question plus the expected correct answer
|
|
271
|
-
- `checks` = the config field that stores those truth checks
|
|
272
|
-
- `test` = run the saved truth checks and get a score
|
|
273
|
-
- `compiled workspace` = the output Interf produces on top of a folder
|
|
274
|
-
- `workspace` = one compiled setup with its own checks
|
|
275
|
-
|
|
276
|
-
Technical terms:
|
|
277
|
-
|
|
278
|
-
- `source folder` = the dataset root Interf reads from
|
|
279
|
-
- `benchmark` = the technical alias and saved-run layer behind `interf test`
|
|
280
|
-
- `workflow package` = the saved method that defines or customizes how compile runs
|
|
281
|
-
- `.interf/` = runtime state, proofs, and health artifacts
|
|
161
|
+
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`.
|
|
282
162
|
|
|
283
163
|
## Advanced: Separate Workspaces
|
|
284
164
|
|
|
@@ -297,57 +177,66 @@ Why create another one:
|
|
|
297
177
|
- it gives that job its own compiled output under `interf/workspaces/<name>/`
|
|
298
178
|
- it lets you test that job separately
|
|
299
179
|
|
|
300
|
-
## Advanced:
|
|
180
|
+
## Advanced: Compile Loops
|
|
181
|
+
|
|
182
|
+
`max_attempts` is a retry budget for the same workflow variation.
|
|
183
|
+
|
|
184
|
+
Retries keep the target fixed:
|
|
301
185
|
|
|
302
|
-
|
|
186
|
+
- same dataset
|
|
187
|
+
- same workflow variation
|
|
188
|
+
- same truth checks
|
|
189
|
+
- same measurement
|
|
303
190
|
|
|
304
|
-
|
|
191
|
+
`max_loops` enables the self-improving workflow loop in the normal `interf compile` path.
|
|
305
192
|
|
|
306
|
-
|
|
193
|
+
In that loop, the thing that changes is the workflow itself.
|
|
307
194
|
|
|
308
|
-
|
|
195
|
+
Each loop can:
|
|
309
196
|
|
|
310
|
-
-
|
|
311
|
-
- it
|
|
312
|
-
-
|
|
313
|
-
-
|
|
314
|
-
-
|
|
197
|
+
- run the current workflow variation on the dataset
|
|
198
|
+
- test it on the same truth checks
|
|
199
|
+
- inspect the failed traces, preserved stage shells, and test artifacts
|
|
200
|
+
- review the workflow and stage docs
|
|
201
|
+
- create a new workflow variation for that dataset
|
|
202
|
+
- test the new variation on the same truth checks
|
|
315
203
|
|
|
316
|
-
|
|
204
|
+
- `max_attempts` retries the same workflow variation
|
|
205
|
+
- a self-improving loop creates and tests workflow variations
|
|
317
206
|
|
|
318
|
-
|
|
319
|
-
- `retry_policy.max_attempts_per_profile` controls how many attempts each compile profile gets in eval packs
|
|
320
|
-
- stronger diagnostic profiles can be used only after the default ones fail
|
|
321
|
-
- the truth checks stay the same across every attempt
|
|
322
|
-
- each attempt records what changed and which attempt performed best
|
|
207
|
+
The workflow is the right surface for that kind of improvement because it is:
|
|
323
208
|
|
|
324
|
-
|
|
209
|
+
- the reusable artifact
|
|
210
|
+
- the human-reviewable method
|
|
211
|
+
- the thing a future workflow-editing agent should inspect and change
|
|
212
|
+
|
|
213
|
+
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.
|
|
214
|
+
|
|
215
|
+
Example workspace config:
|
|
325
216
|
|
|
326
217
|
```jsonc
|
|
327
218
|
{
|
|
328
219
|
"workspaces": [
|
|
329
220
|
{
|
|
330
|
-
"name": "
|
|
331
|
-
"max_attempts": 3, //
|
|
221
|
+
"name": "cbre-chart-sanity",
|
|
222
|
+
"max_attempts": 3, // retry compile + test for the same workflow until this workspace passes or hits this limit
|
|
223
|
+
"max_loops": 2, // workflow-editing loops after retries fail
|
|
332
224
|
"checks": [
|
|
333
225
|
{
|
|
334
|
-
"question": "What
|
|
335
|
-
"answer": "
|
|
226
|
+
"question": "What were Bristol's annual take-up values in 2018 and 2016?",
|
|
227
|
+
"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."
|
|
336
228
|
}
|
|
337
229
|
]
|
|
338
230
|
}
|
|
339
|
-
]
|
|
340
|
-
"retry_policy": {
|
|
341
|
-
"max_attempts_per_profile": 3
|
|
342
|
-
}
|
|
231
|
+
]
|
|
343
232
|
}
|
|
344
233
|
```
|
|
345
234
|
|
|
346
|
-
Use the normal workspace retry loop first.
|
|
235
|
+
Use the normal workspace retry and loop controls first. Maintainers can use the internal repeated-test runner when they want controlled comparisons across workflows, compile profiles, or models.
|
|
347
236
|
|
|
348
237
|
## Use It With Your Agent
|
|
349
238
|
|
|
350
|
-
If you already work through
|
|
239
|
+
If you already work through a local coding agent, it can run this process for you.
|
|
351
240
|
|
|
352
241
|
Paste something like this into your agent:
|
|
353
242
|
|
|
@@ -363,9 +252,15 @@ Tell me whether the compiled workspace passes the truth checks, and only recomme
|
|
|
363
252
|
|
|
364
253
|
## Custom Workflows
|
|
365
254
|
|
|
366
|
-
Interf ships with a default workflow.
|
|
255
|
+
Interf Compiler ships with a default workflow.
|
|
256
|
+
|
|
257
|
+
The built-in `interf` workflow runs three stages:
|
|
258
|
+
|
|
259
|
+
1. `summarize`
|
|
260
|
+
2. `structure`
|
|
261
|
+
3. `shape`
|
|
367
262
|
|
|
368
|
-
If you want to change how the workflow
|
|
263
|
+
If you want to change how the workflow runs on your dataset, this is the part you customize:
|
|
369
264
|
|
|
370
265
|
```bash
|
|
371
266
|
interf create workflow
|
|
@@ -374,27 +269,26 @@ interf verify workflow --path <path>
|
|
|
374
269
|
|
|
375
270
|
Then test that workflow on the same dataset and the same truth checks.
|
|
376
271
|
|
|
377
|
-
Workflow
|
|
272
|
+
Workflow docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
|
|
378
273
|
|
|
379
274
|
## Core Commands
|
|
380
275
|
|
|
381
276
|
- `interf` = open the root-folder wizard
|
|
382
277
|
- `interf init` = alias for the root-folder wizard
|
|
383
278
|
- `interf create workspace` = create another compiled workspace when you need one
|
|
384
|
-
- `interf create workflow` = create a reusable local workflow
|
|
279
|
+
- `interf create workflow` = create a reusable local seed workflow
|
|
385
280
|
- `interf compile` = build a selected workspace for the current folder
|
|
386
|
-
- `interf test` =
|
|
387
|
-
- `interf benchmark` = alias for `interf test`
|
|
281
|
+
- `interf test` = compare the raw files and a compiled workspace on saved truth checks
|
|
388
282
|
- `interf doctor` = check local executor setup
|
|
389
283
|
- `interf verify <check>` = run deterministic checks on major workflow steps
|
|
390
284
|
- `interf reset <scope>` = remove generated state while keeping source files
|
|
391
285
|
|
|
392
286
|
## More Docs
|
|
393
287
|
|
|
394
|
-
- [docs/workflow-spec.md](./docs/workflow-spec.md) for custom
|
|
288
|
+
- [docs/workflow-spec.md](./docs/workflow-spec.md) for custom workflows
|
|
395
289
|
- [docs/runtime-contract.md](./docs/runtime-contract.md) for the exact on-disk contract
|
|
396
290
|
- [docs/architecture.md](./docs/architecture.md) for the deeper system model
|
|
397
|
-
- [docs/
|
|
291
|
+
- [docs/test-matrix.md](./docs/test-matrix.md) for the internal repeated-test matrix runner used in maintainer model/workflow comparisons
|
|
398
292
|
|
|
399
293
|
Maintainers should use [CONTRIBUTING.md](./CONTRIBUTING.md) for test and release gates.
|
|
400
294
|
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Interf Compiler (Recommended)
|
|
2
|
+
|
|
3
|
+
Interf Compiler's default methodology: summarize source-grounded evidence, structure the cross-file layer, then shape the final workspace around its focus and saved truth checks.
|
|
4
|
+
|
|
5
|
+
## Package
|
|
6
|
+
|
|
7
|
+
- `workflow.json` = stage graph, compiler API target, and compile contract mapping
|
|
8
|
+
- `workspace.schema.json` = deterministic workspace 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
|
|
12
|
+
|
|
13
|
+
## Stages
|
|
14
|
+
|
|
15
|
+
- `summarize` — Turn source files into per-file summaries. (workspace-file-evidence; reads: raw, runtime; writes: summaries)
|
|
16
|
+
- `structure` — Build the cross-file knowledge structure from the summaries. (workspace-knowledge-structure; reads: summaries, runtime; writes: knowledge-entities, knowledge-claims, knowledge-indexes)
|
|
17
|
+
- `shape` — Shape the final workspace around the saved focus and truth checks. (workspace-query-shape; reads: raw, summaries, knowledge-entities, knowledge-claims, knowledge-indexes, runtime; writes: knowledge-indexes, home)
|
|
18
|
+
|
|
19
|
+
This package is the built-in seed for `interf`. Interf Compiler copies or materializes it into `.interf/workflow/` and runs that workspace-local package directly.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Shape
|
|
2
|
+
|
|
3
|
+
Shape the final workspace around the saved focus and truth checks.
|
|
4
|
+
|
|
5
|
+
Contract type: `workspace-query-shape`
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Use the workspace focus plus saved truth-check question text to shape `home.md` and retrieval routes.
|
|
10
|
+
- Rewrite `home.md` into a real entrypoint note. Do not leave the scaffold `Not yet compiled.` placeholder in place.
|
|
11
|
+
- When a chart-derived value is approximate, use a bounded range instead of a pseudo-exact number.
|
|
12
|
+
- Match the granularity of the visible axis labels or bands. Do not invent finer precision than the chart supports.
|
|
13
|
+
- Keep the answer inside the visible tick band unless the chart supports a tighter bound.
|
|
14
|
+
- Use an upper-half or lower-half band only when the mark clearly sits there.
|
|
15
|
+
- If a mark touches or nearly touches a labeled gridline, anchor the answer at that gridline or the immediately adjacent half-band.
|
|
16
|
+
- Do not widen a chart-derived range across multiple visible bands unless the chart genuinely supports that uncertainty.
|
|
17
|
+
- 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 workspace.
|
|
19
|
+
|
|
20
|
+
## Notes
|
|
21
|
+
|
|
22
|
+
- Use the workspace focus and saved truth checks to bias the final workspace toward the job it should be especially good at.
|
|
23
|
+
- Do not copy expected answers into the final workspace just because the checks imply them.
|
|
24
|
+
- Prefer the saved summary evidence and structured notes when they already preserve the bounded chart/table reads plus provenance you need.
|
|
25
|
+
- 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
|
+
- 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.
|
|
27
|
+
- Prefer better routing, prioritization, and focused navigation over speculative synthesis.
|
|
28
|
+
- Any wikilinks you add to `home.md` or indexes must resolve to real workspace note basenames or explicit relative paths.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Structure
|
|
2
|
+
|
|
3
|
+
Build the cross-file knowledge structure from the summaries.
|
|
4
|
+
|
|
5
|
+
Contract type: `workspace-knowledge-structure`
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
8
|
+
|
|
9
|
+
- Treat the knowledge layer as retrieval structure, not final truth.
|
|
10
|
+
- Prefer durable entity, claim, and index notes over one giant catch-all file.
|
|
11
|
+
|
|
12
|
+
## Notes
|
|
13
|
+
|
|
14
|
+
- Bias structure toward canonical entities, claims, timelines, and stable indexes.
|
|
15
|
+
- Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.
|
|
16
|
+
- For small datasets, prefer a minimal stable substrate over exhaustive graph sprawl.
|
|
17
|
+
- When you add wikilinks, target real workspace 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.
|
|
18
|
+
- For summary references, prefer explicit links like `[[summaries/<file-stem>]]` or plain code paths. For knowledge notes, prefer the final filename stem under `knowledge/`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Summarize
|
|
2
|
+
|
|
3
|
+
Turn source files into per-file summaries.
|
|
4
|
+
|
|
5
|
+
Contract type: `workspace-file-evidence`
|
|
6
|
+
|
|
7
|
+
## Requirements
|
|
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.
|
|
11
|
+
- Do not skip the abstract just because the overview section is present.
|
|
12
|
+
|
|
13
|
+
## Notes
|
|
14
|
+
|
|
15
|
+
- Favor conservative, source-grounded summaries that preserve evidence tiers and leave broader synthesis for later stages.
|
|
16
|
+
- For large reports or decks, capture scope, headline evidence, and chart/table routing in one light pass.
|
|
17
|
+
- As soon as one report summary can state scope, headline metrics, and chart/table routing, stop reading and write the summary batch plus runtime artifacts immediately.
|
|
18
|
+
- Keep scratch extraction commands single-purpose and non-destructive.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Workflow Improvement
|
|
2
|
+
|
|
3
|
+
Workflow: interf
|
|
4
|
+
|
|
5
|
+
This file is the editable authoring source for Interf Compiler's generated native workflow-improver shell.
|
|
6
|
+
The improver edits this workspace-local package directly.
|
|
7
|
+
|
|
8
|
+
Default loop:
|
|
9
|
+
1. Read the loop context first.
|
|
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 workspace to create a better workflow variation for this dataset.
|
|
12
|
+
4. Keep `workflow.json`, `workspace.schema.json`, and any changed stage docs aligned.
|
|
13
|
+
|
|
14
|
+
Guardrails:
|
|
15
|
+
- do not edit truth checks, test specs, or raw dataset files
|
|
16
|
+
- do not hardcode expected answers into workflow docs
|
|
17
|
+
- keep this package standalone; do not add or rely on runtime `extends` or fallback behavior
|
|
18
|
+
- prefer small, defensible workflow changes over random churn
|