@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.
- package/README.md +160 -201
- package/builtin-workflows/interf/README.md +22 -10
- package/builtin-workflows/interf/compile/stages/shape/SKILL.md +8 -5
- package/builtin-workflows/interf/compile/stages/structure/SKILL.md +3 -0
- package/builtin-workflows/interf/compile/stages/summarize/SKILL.md +18 -2
- package/builtin-workflows/interf/improve/SKILL.md +4 -4
- package/builtin-workflows/interf/use/query/SKILL.md +1 -1
- package/builtin-workflows/interf/workflow.json +19 -5
- package/builtin-workflows/interf/{compiled.schema.json → workflow.schema.json} +10 -3
- package/dist/bin.js +2 -28
- package/dist/{commands → cli/commands}/check-draft.d.ts +2 -2
- package/dist/{commands → cli/commands}/check-draft.js +13 -13
- package/dist/{commands → cli/commands}/compile-controller.d.ts +3 -3
- package/dist/{commands → cli/commands}/compile-controller.js +39 -44
- package/dist/cli/commands/compile.d.ts +33 -0
- package/dist/{commands → cli/commands}/compile.js +107 -33
- package/dist/{commands → cli/commands}/compiled-flow.d.ts +3 -4
- package/dist/{commands → cli/commands}/compiled-flow.js +9 -14
- package/dist/{commands → cli/commands}/create-workflow-wizard.d.ts +20 -2
- package/dist/cli/commands/create-workflow-wizard.js +288 -0
- package/dist/{commands → cli/commands}/create.d.ts +2 -2
- package/dist/cli/commands/create.js +166 -0
- package/dist/cli/commands/dataset-selection.d.ts +6 -0
- package/dist/cli/commands/dataset-selection.js +11 -0
- package/dist/{commands → cli/commands}/default.js +5 -5
- package/dist/{commands → cli/commands}/doctor.js +12 -13
- package/dist/{commands → cli/commands}/executor-flow.d.ts +2 -2
- package/dist/{commands → cli/commands}/executor-flow.js +17 -17
- package/dist/cli/commands/init.d.ts +11 -0
- package/dist/{commands → cli/commands}/init.js +202 -109
- package/dist/{commands → cli/commands}/list.js +9 -6
- package/dist/{commands → cli/commands}/reset.js +5 -5
- package/dist/{commands → cli/commands}/source-config-wizard.d.ts +10 -5
- package/dist/{commands → cli/commands}/source-config-wizard.js +202 -95
- package/dist/{commands → cli/commands}/status.js +20 -11
- package/dist/{commands → cli/commands}/test-flow.d.ts +13 -4
- package/dist/{commands → cli/commands}/test-flow.js +30 -26
- package/dist/cli/commands/test.d.ts +14 -0
- package/dist/{commands → cli/commands}/test.js +48 -40
- package/dist/{commands → cli/commands}/verify.js +4 -4
- package/dist/cli/index.d.ts +21 -0
- package/dist/cli/index.js +33 -0
- package/dist/index.d.ts +22 -11
- package/dist/index.js +15 -6
- package/dist/lib/agent-args.d.ts +1 -3
- package/dist/lib/agent-args.js +1 -42
- package/dist/lib/agent-constants.d.ts +1 -5
- package/dist/lib/agent-constants.js +1 -28
- package/dist/lib/agent-detection.d.ts +1 -7
- package/dist/lib/agent-detection.js +1 -65
- package/dist/lib/agent-execution.d.ts +1 -2
- package/dist/lib/agent-execution.js +1 -242
- package/dist/lib/agent-logs.d.ts +1 -2
- package/dist/lib/agent-logs.js +1 -17
- package/dist/lib/agent-preflight.d.ts +1 -7
- package/dist/lib/agent-preflight.js +1 -76
- package/dist/lib/agent-render.d.ts +1 -8
- package/dist/lib/agent-render.js +1 -218
- package/dist/lib/agent-shells.d.ts +1 -44
- package/dist/lib/agent-shells.js +1 -847
- package/dist/lib/agent-status.d.ts +1 -3
- package/dist/lib/agent-status.js +1 -58
- package/dist/lib/agent-types.d.ts +1 -30
- package/dist/lib/agent-types.js +1 -1
- package/dist/lib/agents.d.ts +1 -6
- package/dist/lib/agents.js +1 -5
- package/dist/lib/builtin-compiled-workflow.d.ts +1 -129
- package/dist/lib/builtin-compiled-workflow.js +1 -153
- package/dist/lib/compiled-compile.d.ts +1 -52
- package/dist/lib/compiled-compile.js +1 -274
- package/dist/lib/compiled-paths.d.ts +1 -39
- package/dist/lib/compiled-paths.js +3 -103
- package/dist/lib/compiled-raw.d.ts +1 -49
- package/dist/lib/compiled-raw.js +3 -102
- package/dist/lib/compiled-reset.d.ts +1 -1
- package/dist/lib/compiled-reset.js +3 -44
- package/dist/lib/compiled-schema.d.ts +1 -27
- package/dist/lib/compiled-schema.js +1 -110
- package/dist/lib/discovery.d.ts +1 -1
- package/dist/lib/discovery.js +2 -2
- package/dist/lib/execution-profile.d.ts +1 -17
- package/dist/lib/execution-profile.js +1 -84
- package/dist/lib/executors.d.ts +1 -32
- package/dist/lib/executors.js +1 -43
- package/dist/lib/interf-bootstrap.d.ts +1 -3
- package/dist/lib/interf-bootstrap.js +3 -18
- package/dist/lib/interf-detect.d.ts +1 -33
- package/dist/lib/interf-detect.js +3 -176
- package/dist/lib/interf-scaffold.d.ts +1 -2
- package/dist/lib/interf-scaffold.js +3 -121
- package/dist/lib/interf-workflow-package.d.ts +1 -20
- package/dist/lib/interf-workflow-package.js +1 -276
- package/dist/lib/interf.d.ts +1 -5
- package/dist/lib/interf.js +3 -4
- package/dist/lib/local-workflows.d.ts +1 -53
- package/dist/lib/local-workflows.js +1 -399
- package/dist/lib/package-root.d.ts +1 -0
- package/dist/lib/package-root.js +1 -0
- package/dist/lib/project-paths.d.ts +1 -11
- package/dist/lib/project-paths.js +3 -32
- package/dist/lib/runtime-acceptance.d.ts +1 -9
- package/dist/lib/runtime-acceptance.js +1 -257
- package/dist/lib/runtime-contracts.d.ts +1 -2
- package/dist/lib/runtime-contracts.js +1 -47
- package/dist/lib/runtime-inventory.d.ts +1 -7
- package/dist/lib/runtime-inventory.js +1 -29
- package/dist/lib/runtime-paths.d.ts +1 -7
- package/dist/lib/runtime-paths.js +1 -23
- package/dist/lib/runtime-prompt.d.ts +1 -2
- package/dist/lib/runtime-prompt.js +1 -46
- package/dist/lib/runtime-reconcile.d.ts +1 -2
- package/dist/lib/runtime-reconcile.js +1 -156
- package/dist/lib/runtime-runs.d.ts +1 -11
- package/dist/lib/runtime-runs.js +1 -250
- package/dist/lib/runtime-types.d.ts +1 -43
- package/dist/lib/runtime-types.js +1 -1
- package/dist/lib/runtime.d.ts +1 -6
- package/dist/lib/runtime.js +1 -5
- package/dist/lib/schema.d.ts +4 -1016
- package/dist/lib/schema.js +6 -539
- package/dist/lib/source-config.d.ts +1 -39
- package/dist/lib/source-config.js +3 -293
- package/dist/lib/state-artifacts.d.ts +1 -8
- package/dist/lib/state-artifacts.js +1 -13
- package/dist/lib/state-health.d.ts +1 -4
- package/dist/lib/state-health.js +1 -132
- package/dist/lib/state-io.d.ts +1 -10
- package/dist/lib/state-io.js +1 -76
- package/dist/lib/state-paths.d.ts +1 -4
- package/dist/lib/state-paths.js +1 -13
- package/dist/lib/state-view.d.ts +1 -4
- package/dist/lib/state-view.js +1 -103
- package/dist/lib/state.d.ts +1 -6
- package/dist/lib/state.js +1 -5
- package/dist/lib/test-execution.d.ts +1 -14
- package/dist/lib/test-execution.js +3 -525
- package/dist/lib/test-matrices.d.ts +1 -90
- package/dist/lib/test-matrices.js +3 -96
- package/dist/lib/test-paths.d.ts +1 -12
- package/dist/lib/test-paths.js +3 -59
- package/dist/lib/test-profile-presets.d.ts +1 -57
- package/dist/lib/test-profile-presets.js +3 -50
- package/dist/lib/test-sandbox.d.ts +1 -11
- package/dist/lib/test-sandbox.js +3 -105
- package/dist/lib/test-specs.d.ts +1 -7
- package/dist/lib/test-specs.js +3 -114
- package/dist/lib/test-targets.d.ts +1 -5
- package/dist/lib/test-targets.js +3 -38
- package/dist/lib/test-types.d.ts +1 -17
- package/dist/lib/test-types.js +3 -1
- package/dist/lib/test.d.ts +1 -4
- package/dist/lib/test.js +3 -3
- package/dist/lib/validate-compiled.d.ts +1 -27
- package/dist/lib/validate-compiled.js +1 -238
- package/dist/lib/validate-helpers.d.ts +1 -12
- package/dist/lib/validate-helpers.js +1 -41
- package/dist/lib/validate.d.ts +1 -19
- package/dist/lib/validate.js +1 -256
- package/dist/lib/workflow-authoring.d.ts +1 -0
- package/dist/lib/workflow-authoring.js +1 -0
- package/dist/lib/workflow-definitions.d.ts +1 -68
- package/dist/lib/workflow-definitions.js +1 -206
- package/dist/lib/workflow-edit-session.d.ts +1 -0
- package/dist/lib/workflow-edit-session.js +1 -0
- package/dist/lib/workflow-edit-utils.d.ts +1 -0
- package/dist/lib/workflow-edit-utils.js +1 -0
- package/dist/lib/workflow-helpers.d.ts +1 -38
- package/dist/lib/workflow-helpers.js +1 -167
- package/dist/lib/workflow-improvement.d.ts +1 -22
- package/dist/lib/workflow-improvement.js +1 -396
- package/dist/lib/workflow-primitives.d.ts +1 -2
- package/dist/lib/workflow-primitives.js +1 -5
- package/dist/lib/workflow-review-paths.d.ts +1 -10
- package/dist/lib/workflow-review-paths.js +1 -27
- package/dist/lib/workflow-stage-policy.d.ts +1 -0
- package/dist/lib/workflow-stage-policy.js +1 -0
- package/dist/lib/workflow-stage-runner.d.ts +1 -41
- package/dist/lib/workflow-stage-runner.js +1 -109
- package/dist/lib/workflows.d.ts +1 -15
- package/dist/lib/workflows.js +1 -31
- package/dist/packages/agents/index.d.ts +17 -0
- package/dist/packages/agents/index.js +15 -0
- package/dist/packages/agents/lib/agents.d.ts +6 -0
- package/dist/packages/agents/lib/agents.js +5 -0
- package/dist/packages/agents/lib/args.d.ts +4 -0
- package/dist/packages/agents/lib/args.js +52 -0
- package/dist/packages/agents/lib/constants.d.ts +5 -0
- package/dist/packages/agents/lib/constants.js +28 -0
- package/dist/packages/agents/lib/detection.d.ts +7 -0
- package/dist/packages/agents/lib/detection.js +65 -0
- package/dist/packages/agents/lib/execution-profile.d.ts +17 -0
- package/dist/packages/agents/lib/execution-profile.js +84 -0
- package/dist/packages/agents/lib/execution.d.ts +2 -0
- package/dist/packages/agents/lib/execution.js +243 -0
- package/dist/packages/agents/lib/executors.d.ts +32 -0
- package/dist/packages/agents/lib/executors.js +45 -0
- package/dist/packages/agents/lib/logs.d.ts +2 -0
- package/dist/packages/agents/lib/logs.js +17 -0
- package/dist/packages/agents/lib/preflight.d.ts +7 -0
- package/dist/packages/agents/lib/preflight.js +77 -0
- package/dist/packages/agents/lib/render.d.ts +8 -0
- package/dist/packages/agents/lib/render.js +218 -0
- package/dist/packages/agents/lib/schema.d.ts +8 -0
- package/dist/packages/agents/lib/schema.js +7 -0
- package/dist/packages/agents/lib/shells.d.ts +69 -0
- package/dist/packages/agents/lib/shells.js +1021 -0
- package/dist/packages/agents/lib/status.d.ts +3 -0
- package/dist/packages/agents/lib/status.js +58 -0
- package/dist/packages/agents/lib/types.d.ts +30 -0
- package/dist/packages/agents/lib/types.js +1 -0
- package/dist/{lib → packages/agents/lib}/user-config.d.ts +1 -0
- package/dist/{lib → packages/agents/lib}/user-config.js +3 -2
- package/dist/packages/compiler/compiled-compile.d.ts +48 -0
- package/dist/packages/compiler/compiled-compile.js +256 -0
- package/dist/packages/compiler/compiled-schema.d.ts +31 -0
- package/dist/packages/compiler/compiled-schema.js +141 -0
- package/dist/packages/compiler/index.d.ts +24 -0
- package/dist/packages/compiler/index.js +23 -0
- package/dist/packages/compiler/lib/schema.d.ts +684 -0
- package/dist/packages/compiler/lib/schema.js +361 -0
- package/dist/packages/compiler/runtime-acceptance.d.ts +9 -0
- package/dist/packages/compiler/runtime-acceptance.js +269 -0
- package/dist/packages/compiler/runtime-contracts.d.ts +2 -0
- package/dist/packages/compiler/runtime-contracts.js +48 -0
- package/dist/packages/compiler/runtime-inventory.d.ts +7 -0
- package/dist/packages/compiler/runtime-inventory.js +29 -0
- package/dist/packages/compiler/runtime-paths.d.ts +8 -0
- package/dist/packages/compiler/runtime-paths.js +26 -0
- package/dist/packages/compiler/runtime-prompt.d.ts +2 -0
- package/dist/packages/compiler/runtime-prompt.js +48 -0
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -0
- package/dist/packages/compiler/runtime-reconcile.js +193 -0
- package/dist/packages/compiler/runtime-runs.d.ts +11 -0
- package/dist/packages/compiler/runtime-runs.js +262 -0
- package/dist/packages/compiler/runtime-types.d.ts +43 -0
- package/dist/packages/compiler/runtime-types.js +1 -0
- package/dist/packages/compiler/runtime.d.ts +6 -0
- package/dist/packages/compiler/runtime.js +5 -0
- package/dist/packages/compiler/state-artifacts.d.ts +8 -0
- package/dist/packages/compiler/state-artifacts.js +13 -0
- package/dist/packages/compiler/state-health.d.ts +4 -0
- package/dist/packages/compiler/state-health.js +132 -0
- package/dist/packages/compiler/state-io.d.ts +10 -0
- package/dist/packages/compiler/state-io.js +76 -0
- package/dist/packages/compiler/state-paths.d.ts +4 -0
- package/dist/packages/compiler/state-paths.js +13 -0
- package/dist/packages/compiler/state-view.d.ts +4 -0
- package/dist/packages/compiler/state-view.js +103 -0
- package/dist/packages/compiler/state.d.ts +7 -0
- package/dist/packages/compiler/state.js +12 -0
- package/dist/packages/compiler/validate-compiled.d.ts +27 -0
- package/dist/packages/compiler/validate-compiled.js +241 -0
- package/dist/packages/compiler/validate-helpers.d.ts +12 -0
- package/dist/packages/compiler/validate-helpers.js +41 -0
- package/dist/packages/compiler/validate.d.ts +21 -0
- package/dist/packages/compiler/validate.js +249 -0
- package/dist/packages/compiler/workflow-primitives.d.ts +2 -0
- package/dist/packages/compiler/workflow-primitives.js +5 -0
- package/dist/packages/compiler/workflows.d.ts +15 -0
- package/dist/packages/compiler/workflows.js +31 -0
- package/dist/packages/project-model/compiled-paths.d.ts +40 -0
- package/dist/packages/project-model/compiled-paths.js +106 -0
- package/dist/packages/project-model/compiled-raw.d.ts +49 -0
- package/dist/packages/project-model/compiled-raw.js +102 -0
- package/dist/packages/project-model/compiled-reset.d.ts +2 -0
- package/dist/packages/project-model/compiled-reset.js +72 -0
- package/dist/packages/project-model/index.d.ts +11 -0
- package/dist/packages/project-model/index.js +10 -0
- package/dist/packages/project-model/interf-bootstrap.d.ts +3 -0
- package/dist/packages/project-model/interf-bootstrap.js +18 -0
- package/dist/packages/project-model/interf-detect.d.ts +33 -0
- package/dist/packages/project-model/interf-detect.js +176 -0
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -0
- package/dist/packages/project-model/interf-scaffold.js +124 -0
- package/dist/packages/project-model/interf.d.ts +5 -0
- package/dist/packages/project-model/interf.js +4 -0
- package/dist/packages/project-model/lib/schema.d.ts +125 -0
- package/dist/packages/project-model/lib/schema.js +62 -0
- package/dist/packages/project-model/project-paths.d.ts +11 -0
- package/dist/packages/project-model/project-paths.js +32 -0
- package/dist/packages/project-model/source-config.d.ts +38 -0
- package/dist/packages/project-model/source-config.js +297 -0
- package/dist/packages/testing/index.d.ts +13 -0
- package/dist/packages/testing/index.js +10 -0
- package/dist/packages/testing/lib/schema.d.ts +261 -0
- package/dist/packages/testing/lib/schema.js +119 -0
- package/dist/packages/testing/test-execution.d.ts +14 -0
- package/dist/packages/testing/test-execution.js +525 -0
- package/dist/packages/testing/test-matrices.d.ts +90 -0
- package/dist/packages/testing/test-matrices.js +96 -0
- package/dist/packages/testing/test-paths.d.ts +12 -0
- package/dist/packages/testing/test-paths.js +59 -0
- package/dist/packages/testing/test-profile-presets.d.ts +57 -0
- package/dist/packages/testing/test-profile-presets.js +50 -0
- package/dist/packages/testing/test-sandbox.d.ts +11 -0
- package/dist/packages/testing/test-sandbox.js +105 -0
- package/dist/packages/testing/test-specs.d.ts +7 -0
- package/dist/packages/testing/test-specs.js +114 -0
- package/dist/packages/testing/test-targets.d.ts +5 -0
- package/dist/packages/testing/test-targets.js +38 -0
- package/dist/packages/testing/test-types.d.ts +16 -0
- package/dist/packages/testing/test-types.js +1 -0
- package/dist/packages/testing/test.d.ts +4 -0
- package/dist/packages/testing/test.js +3 -0
- package/dist/packages/workflow-authoring/index.d.ts +4 -0
- package/dist/packages/workflow-authoring/index.js +4 -0
- package/dist/packages/workflow-authoring/lib/workflow-edit-utils.d.ts +10 -0
- package/dist/packages/workflow-authoring/lib/workflow-edit-utils.js +39 -0
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +26 -0
- package/dist/packages/workflow-authoring/workflow-authoring.js +120 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +16 -0
- package/dist/packages/workflow-authoring/workflow-edit-session.js +57 -0
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +23 -0
- package/dist/packages/workflow-authoring/workflow-improvement.js +209 -0
- package/dist/packages/workflow-package/builtin-compiled-workflow.d.ts +38 -0
- package/dist/packages/workflow-package/builtin-compiled-workflow.js +94 -0
- package/dist/packages/workflow-package/index.d.ts +9 -0
- package/dist/packages/workflow-package/index.js +9 -0
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +25 -0
- package/dist/packages/workflow-package/interf-workflow-package.js +342 -0
- package/dist/{lib/config.d.ts → packages/workflow-package/lib/package-root.d.ts} +0 -1
- package/dist/packages/workflow-package/lib/package-root.js +6 -0
- package/dist/packages/workflow-package/local-workflows.d.ts +54 -0
- package/dist/packages/workflow-package/local-workflows.js +422 -0
- package/dist/packages/workflow-package/workflow-definitions.d.ts +78 -0
- package/dist/packages/workflow-package/workflow-definitions.js +203 -0
- package/dist/packages/workflow-package/workflow-helpers.d.ts +38 -0
- package/dist/packages/workflow-package/workflow-helpers.js +167 -0
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +10 -0
- package/dist/packages/workflow-package/workflow-review-paths.js +27 -0
- package/dist/packages/workflow-package/workflow-stage-policy.d.ts +5 -0
- package/dist/packages/workflow-package/workflow-stage-policy.js +31 -0
- package/dist/packages/workflow-package/workflow-stage-runner.d.ts +41 -0
- package/dist/packages/workflow-package/workflow-stage-runner.js +109 -0
- package/package.json +44 -21
- package/dist/commands/compile.d.ts +0 -15
- package/dist/commands/create-workflow-wizard.js +0 -125
- package/dist/commands/create.js +0 -162
- package/dist/commands/init.d.ts +0 -3
- package/dist/commands/test.d.ts +0 -9
- package/dist/lib/compiled-home.d.ts +0 -5
- package/dist/lib/compiled-home.js +0 -32
- package/dist/lib/config.js +0 -9
- package/dist/lib/obsidian.d.ts +0 -1
- package/dist/lib/obsidian.js +0 -15
- package/dist/lib/summarize-plan.d.ts +0 -17
- package/dist/lib/summarize-plan.js +0 -120
- /package/dist/{commands → cli/commands}/default.d.ts +0 -0
- /package/dist/{commands → cli/commands}/doctor.d.ts +0 -0
- /package/dist/{commands → cli/commands}/list.d.ts +0 -0
- /package/dist/{commands → cli/commands}/reset.d.ts +0 -0
- /package/dist/{commands → cli/commands}/status.d.ts +0 -0
- /package/dist/{commands → cli/commands}/verify.d.ts +0 -0
|
@@ -5,8 +5,12 @@
|
|
|
5
5
|
"kind": "compiled",
|
|
6
6
|
"version": 1
|
|
7
7
|
},
|
|
8
|
-
"
|
|
9
|
-
|
|
8
|
+
"purpose": {
|
|
9
|
+
"label": "General compiled context workflow for agent use",
|
|
10
|
+
"task_hint": "Compile mixed raw files into evidence-backed summaries, cross-file structure, and a usable entrypoint for agents answering the questions this task depends on."
|
|
11
|
+
},
|
|
12
|
+
"label": "Interf (Built-in)",
|
|
13
|
+
"hint": "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.",
|
|
10
14
|
"stages": [
|
|
11
15
|
{
|
|
12
16
|
"id": "summarize",
|
|
@@ -31,6 +35,15 @@
|
|
|
31
35
|
"markdown_frontmatter_valid_zones": [
|
|
32
36
|
"summaries"
|
|
33
37
|
],
|
|
38
|
+
"frontmatter_required_keys_in_zones": {
|
|
39
|
+
"summaries": [
|
|
40
|
+
"source",
|
|
41
|
+
"source_kind",
|
|
42
|
+
"evidence_tier",
|
|
43
|
+
"truth_mode",
|
|
44
|
+
"state"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
34
47
|
"markdown_abstract_valid_zones": [
|
|
35
48
|
"summaries"
|
|
36
49
|
]
|
|
@@ -69,7 +82,7 @@
|
|
|
69
82
|
{
|
|
70
83
|
"id": "shape",
|
|
71
84
|
"label": "Shape",
|
|
72
|
-
"description": "Shape the final
|
|
85
|
+
"description": "Shape the final context folder around the saved task focus and checks.",
|
|
73
86
|
"contract_type": "compiled-query-shape",
|
|
74
87
|
"skill_dir": "shape",
|
|
75
88
|
"reads": [
|
|
@@ -118,11 +131,12 @@
|
|
|
118
131
|
"Use taxonomy and ontology only as means to improve retrieval, navigation, and evidence tracking.",
|
|
119
132
|
"For small datasets, prefer a minimal stable substrate over exhaustive graph sprawl.",
|
|
120
133
|
"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.",
|
|
134
|
+
"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.",
|
|
121
135
|
"For summary references, prefer explicit links like `[[summaries/<file-stem>]]` or plain code paths. For knowledge notes, prefer the final filename stem under `knowledge/`."
|
|
122
136
|
],
|
|
123
137
|
"shape": [
|
|
124
|
-
"Use the
|
|
125
|
-
"Do not copy expected answers into the final
|
|
138
|
+
"Use the saved task focus and checks to bias the final context folder toward the job it should be especially good at.",
|
|
139
|
+
"Do not copy expected answers into the final context folder just because the checks imply them.",
|
|
126
140
|
"If a saved truth check depends on chart-derived or table-derived values, verify the needed evidence in `raw/` while shaping and write focused notes that preserve bounded values plus provenance.",
|
|
127
141
|
"Prefer better routing, prioritization, and focused navigation over speculative synthesis.",
|
|
128
142
|
"Any wikilinks you add to `home.md` or indexes must resolve to real compiled note basenames or explicit relative paths."
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
|
-
"kind": "
|
|
2
|
+
"kind": "workflow-schema",
|
|
3
3
|
"version": 1,
|
|
4
4
|
"target_type": "compiled",
|
|
5
|
-
"label": "Interf
|
|
5
|
+
"label": "Interf built-in workflow schema",
|
|
6
6
|
"zones": [
|
|
7
7
|
{
|
|
8
8
|
"id": "raw",
|
|
9
|
+
"role": "input",
|
|
9
10
|
"path": "raw",
|
|
10
11
|
"kind": "directory",
|
|
11
12
|
"required": true,
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
},
|
|
15
16
|
{
|
|
16
17
|
"id": "summaries",
|
|
18
|
+
"role": "working",
|
|
17
19
|
"path": "summaries",
|
|
18
20
|
"kind": "directory",
|
|
19
21
|
"required": true,
|
|
@@ -24,6 +26,7 @@
|
|
|
24
26
|
},
|
|
25
27
|
{
|
|
26
28
|
"id": "knowledge-entities",
|
|
29
|
+
"role": "output",
|
|
27
30
|
"path": "knowledge/entities",
|
|
28
31
|
"kind": "directory",
|
|
29
32
|
"required": true,
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
},
|
|
35
38
|
{
|
|
36
39
|
"id": "knowledge-claims",
|
|
40
|
+
"role": "output",
|
|
37
41
|
"path": "knowledge/claims",
|
|
38
42
|
"kind": "directory",
|
|
39
43
|
"required": true,
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
},
|
|
45
49
|
{
|
|
46
50
|
"id": "knowledge-indexes",
|
|
51
|
+
"role": "output",
|
|
47
52
|
"path": "knowledge/indexes",
|
|
48
53
|
"kind": "directory",
|
|
49
54
|
"required": true,
|
|
@@ -55,16 +60,18 @@
|
|
|
55
60
|
},
|
|
56
61
|
{
|
|
57
62
|
"id": "home",
|
|
63
|
+
"role": "output",
|
|
58
64
|
"path": "home.md",
|
|
59
65
|
"kind": "file",
|
|
60
66
|
"required": true,
|
|
61
67
|
"owned_by": [
|
|
62
68
|
"shape"
|
|
63
69
|
],
|
|
64
|
-
"description": "Primary entrypoint note for agents using the
|
|
70
|
+
"description": "Primary entrypoint note for agents using the context folder."
|
|
65
71
|
},
|
|
66
72
|
{
|
|
67
73
|
"id": "runtime",
|
|
74
|
+
"role": "runtime",
|
|
68
75
|
"path": ".interf/runtime",
|
|
69
76
|
"kind": "runtime",
|
|
70
77
|
"required": true,
|
package/dist/bin.js
CHANGED
|
@@ -1,29 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
import { initCommand } from "./commands/init.js";
|
|
5
|
-
import { createCommand } from "./commands/create.js";
|
|
6
|
-
import { compileCommand } from "./commands/compile.js";
|
|
7
|
-
import { testCommand } from "./commands/test.js";
|
|
8
|
-
import { doctorCommand } from "./commands/doctor.js";
|
|
9
|
-
import { listCommand } from "./commands/list.js";
|
|
10
|
-
import { statusCommand } from "./commands/status.js";
|
|
11
|
-
import { resetCommand } from "./commands/reset.js";
|
|
12
|
-
import { defaultCommand } from "./commands/default.js";
|
|
13
|
-
import { verifyCommand } from "./commands/verify.js";
|
|
14
|
-
yargs(hideBin(process.argv))
|
|
15
|
-
.scriptName("interf")
|
|
16
|
-
.command(defaultCommand)
|
|
17
|
-
.command(initCommand)
|
|
18
|
-
.command(compileCommand)
|
|
19
|
-
.command(testCommand)
|
|
20
|
-
.command(createCommand)
|
|
21
|
-
.command(doctorCommand)
|
|
22
|
-
.command(listCommand)
|
|
23
|
-
.command(statusCommand)
|
|
24
|
-
.command(verifyCommand)
|
|
25
|
-
.command(resetCommand)
|
|
26
|
-
.strict()
|
|
27
|
-
.help()
|
|
28
|
-
.version()
|
|
29
|
-
.parse();
|
|
2
|
+
import { runCli } from "./cli/index.js";
|
|
3
|
+
await runCli();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { WorkflowExecutor } from "
|
|
2
|
-
import type { SourceTruthCheck } from "
|
|
1
|
+
import type { WorkflowExecutor } from "../../packages/agents/lib/executors.js";
|
|
2
|
+
import type { SourceTruthCheck } from "../../packages/project-model/lib/schema.js";
|
|
3
3
|
export declare function buildTruthCheckDraftPrompt(options: {
|
|
4
4
|
datasetName: string;
|
|
5
5
|
datasetPath: string;
|
|
@@ -12,27 +12,27 @@ export function buildTruthCheckDraftPrompt(options) {
|
|
|
12
12
|
const taskLines = normalizedAbout
|
|
13
13
|
? [
|
|
14
14
|
`Primary task: ${normalizedAbout}`,
|
|
15
|
-
"Draft checks that directly measure whether a local agent
|
|
15
|
+
"Draft checks that directly measure whether a local agent can answer the key questions from the data behind that task.",
|
|
16
16
|
"Prefer checks that would make a human confident the dataset is useful for that exact job.",
|
|
17
17
|
]
|
|
18
18
|
: [
|
|
19
19
|
"No primary task was provided.",
|
|
20
|
-
"Prefer broad, representative checks that reflect the most useful questions this
|
|
20
|
+
"Prefer broad, representative checks that reflect the most useful questions a human would verify from this source folder.",
|
|
21
21
|
];
|
|
22
22
|
return [
|
|
23
|
-
"You are drafting Interf
|
|
23
|
+
"You are drafting Interf checks for a local source folder.",
|
|
24
24
|
"Read the files in this folder and draft a small set of checks that a human can verify from the source material.",
|
|
25
25
|
"Do not ask follow-up questions.",
|
|
26
|
-
"Keep the checks concrete, explicit, and useful for measuring agent
|
|
26
|
+
"Keep the checks concrete, explicit, and useful for measuring whether an agent can reason correctly over the files in this source folder.",
|
|
27
27
|
"",
|
|
28
|
-
`
|
|
29
|
-
`
|
|
28
|
+
`Setup id: ${options.datasetName}`,
|
|
29
|
+
`Source folder: ${options.datasetPath}`,
|
|
30
30
|
...taskLines,
|
|
31
31
|
"",
|
|
32
32
|
`Write exactly one JSON array to ${JSON.stringify(options.outputPath)}.`,
|
|
33
|
-
`Draft ${options.targetCount} checks unless the
|
|
33
|
+
`Draft ${options.targetCount} checks unless the source folder is too small; in that case write fewer.`,
|
|
34
34
|
"Each array item must be an object with exactly these keys:",
|
|
35
|
-
'- "question": a plain-English question answerable from this
|
|
35
|
+
'- "question": a plain-English question answerable from this source folder',
|
|
36
36
|
'- "answer": the expected correct answer in plain English',
|
|
37
37
|
"",
|
|
38
38
|
"Quality bar:",
|
|
@@ -72,8 +72,8 @@ export async function draftTruthChecks(options) {
|
|
|
72
72
|
return {
|
|
73
73
|
checks: null,
|
|
74
74
|
error: code === 0
|
|
75
|
-
? "The local agent finished without writing draft
|
|
76
|
-
: "The local agent did not produce draft
|
|
75
|
+
? "The local agent finished without writing draft checks."
|
|
76
|
+
: "The local agent did not produce draft checks.",
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
let parsed;
|
|
@@ -83,15 +83,15 @@ export async function draftTruthChecks(options) {
|
|
|
83
83
|
catch (error) {
|
|
84
84
|
return {
|
|
85
85
|
checks: null,
|
|
86
|
-
error: `Draft
|
|
86
|
+
error: `Draft checks were not valid JSON: ${error instanceof Error ? error.message : String(error)}`,
|
|
87
87
|
};
|
|
88
88
|
}
|
|
89
89
|
const validated = DraftTruthChecksSchema.safeParse(parsed);
|
|
90
90
|
if (!validated.success) {
|
|
91
|
-
const detail = validated.error.issues[0]?.message ?? "invalid draft
|
|
91
|
+
const detail = validated.error.issues[0]?.message ?? "invalid draft checks";
|
|
92
92
|
return {
|
|
93
93
|
checks: null,
|
|
94
|
-
error: `Draft
|
|
94
|
+
error: `Draft checks did not match the required shape: ${detail}`,
|
|
95
95
|
};
|
|
96
96
|
}
|
|
97
97
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { WorkflowExecutionProfile, WorkflowExecutor } from "
|
|
2
|
-
import type { SourceDatasetConfig } from "
|
|
3
|
-
import type { StageShellRetentionMode } from "
|
|
1
|
+
import type { WorkflowExecutionProfile, WorkflowExecutor } from "../../packages/agents/lib/executors.js";
|
|
2
|
+
import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
|
|
3
|
+
import type { StageShellRetentionMode } from "../../packages/compiler/workflows.js";
|
|
4
4
|
export declare function runConfiguredCompiledCompile(options: {
|
|
5
5
|
executor: WorkflowExecutor;
|
|
6
6
|
testExecutor?: WorkflowExecutor | null;
|
|
@@ -2,13 +2,14 @@ import { cpSync, existsSync, mkdirSync, mkdtempSync, rmSync } from "node:fs";
|
|
|
2
2
|
import { tmpdir } from "node:os";
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
|
-
import { readInterfConfig } from "
|
|
6
|
-
import { resetCompiledGeneratedState } from "
|
|
7
|
-
import { formatActiveCompiledWorkflowStageStep, resolveRequiredCompiledWorkflowFromConfig, } from "
|
|
8
|
-
import { resolveDatasetCompileMaxAttempts, resolveDatasetCompileMaxLoops, } from "
|
|
9
|
-
import { runWorkflowImprovementLoop } from "
|
|
10
|
-
import { stageExecutionShellsRoot, workflowPackagePathForCompiled, } from "
|
|
11
|
-
import { readCompiledSchemaFile } from "
|
|
5
|
+
import { readInterfConfig } from "../../packages/project-model/interf.js";
|
|
6
|
+
import { clearCompiledRuntimeDerivedArtifacts, resetCompiledGeneratedState, } from "../../packages/project-model/compiled-reset.js";
|
|
7
|
+
import { formatActiveCompiledWorkflowStageStep, resolveRequiredCompiledWorkflowFromConfig, } from "../../packages/workflow-package/workflow-definitions.js";
|
|
8
|
+
import { loadCompiledDatasetConfig, resolveDatasetCompileMaxAttempts, resolveDatasetCompileMaxLoops, } from "../../packages/project-model/source-config.js";
|
|
9
|
+
import { runWorkflowImprovementLoop } from "../../packages/workflow-authoring/workflow-improvement.js";
|
|
10
|
+
import { stageExecutionShellsRoot, workflowPackagePathForCompiled, } from "../../packages/project-model/compiled-paths.js";
|
|
11
|
+
import { readCompiledSchemaFile } from "../../packages/compiler/compiled-schema.js";
|
|
12
|
+
import { initializeCompiledRuntimeState } from "../../packages/compiler/state.js";
|
|
12
13
|
import { compileCompiledWithReporter } from "./compiled-flow.js";
|
|
13
14
|
import { printSavedTestOutcome, questionPassRate, runSavedCompiledTest, } from "./test-flow.js";
|
|
14
15
|
function printCompileFailure(compiledPath, failedStage) {
|
|
@@ -19,14 +20,6 @@ function printCompileFailure(compiledPath, failedStage) {
|
|
|
19
20
|
function testScore(outcome) {
|
|
20
21
|
return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
|
|
21
22
|
}
|
|
22
|
-
const BEST_VARIATION_RUNTIME_RESTORE_PATHS = [
|
|
23
|
-
".interf/runtime/state.json",
|
|
24
|
-
".interf/runtime/health.json",
|
|
25
|
-
".interf/runtime/view-spec.json",
|
|
26
|
-
".interf/runtime/inventory.json",
|
|
27
|
-
".interf/runtime/run.json",
|
|
28
|
-
".interf/runtime/raw-snapshot.json",
|
|
29
|
-
];
|
|
30
23
|
function bestVariationRestorePaths(compiledPath) {
|
|
31
24
|
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(compiledPath));
|
|
32
25
|
const zonePaths = (schema?.zones ?? [])
|
|
@@ -39,10 +32,8 @@ function bestVariationRestorePaths(compiledPath) {
|
|
|
39
32
|
".codex",
|
|
40
33
|
".agents",
|
|
41
34
|
".cursor",
|
|
42
|
-
".obsidian",
|
|
43
35
|
".interf/interf.json",
|
|
44
36
|
".interf/workflow",
|
|
45
|
-
...BEST_VARIATION_RUNTIME_RESTORE_PATHS,
|
|
46
37
|
...zonePaths,
|
|
47
38
|
];
|
|
48
39
|
}
|
|
@@ -71,6 +62,8 @@ function restoreCompiledBestState(snapshotPath, compiledPath) {
|
|
|
71
62
|
rmSync(join(compiledPath, relativePath), { recursive: true, force: true });
|
|
72
63
|
copyRelativePathIfPresent(snapshotPath, compiledPath, relativePath);
|
|
73
64
|
}
|
|
65
|
+
clearCompiledRuntimeDerivedArtifacts(compiledPath);
|
|
66
|
+
initializeCompiledRuntimeState(compiledPath);
|
|
74
67
|
}
|
|
75
68
|
async function runWorkflowVariation(options) {
|
|
76
69
|
let bestOutcome = null;
|
|
@@ -85,16 +78,16 @@ async function runWorkflowVariation(options) {
|
|
|
85
78
|
const resetTarget = attempt > 1
|
|
86
79
|
? `attempt ${attempt}/${options.maxAttempts}`
|
|
87
80
|
: options.variationLabel;
|
|
88
|
-
console.log(chalk.dim(` Resetting generated compiled state before ${resetTarget}...`));
|
|
81
|
+
console.log(chalk.dim(` Resetting generated compiled-context state before ${resetTarget}...`));
|
|
89
82
|
resetCompiledGeneratedState(options.compiledPath, "compile");
|
|
90
83
|
}
|
|
91
84
|
const result = await compileCompiledWithReporter(options.executor, options.compiledPath, {
|
|
92
85
|
heading: options.maxAttempts > 1
|
|
93
|
-
? `Building compiled
|
|
94
|
-
: `Building compiled
|
|
86
|
+
? `Building compiled context (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
|
|
87
|
+
: `Building compiled context (${options.variationLabel})...`,
|
|
95
88
|
successMessage: options.maxAttempts > 1
|
|
96
|
-
? `Compiled
|
|
97
|
-
: `Compiled
|
|
89
|
+
? `Compiled context ready for ${options.variationLabel}, attempt ${attempt}.`
|
|
90
|
+
: `Compiled context ready for ${options.variationLabel}.`,
|
|
98
91
|
preserveStageShells: options.preserveStageShells,
|
|
99
92
|
});
|
|
100
93
|
if (!result.ok) {
|
|
@@ -130,7 +123,7 @@ async function runWorkflowVariation(options) {
|
|
|
130
123
|
bestOutcome,
|
|
131
124
|
bestSnapshotPath,
|
|
132
125
|
bestAttempt,
|
|
133
|
-
fatalError: "Could not run the saved compiled-
|
|
126
|
+
fatalError: "Could not run the saved compiled-context check after compile.",
|
|
134
127
|
};
|
|
135
128
|
}
|
|
136
129
|
console.log();
|
|
@@ -145,7 +138,7 @@ async function runWorkflowVariation(options) {
|
|
|
145
138
|
}
|
|
146
139
|
if (outcome.result.ok) {
|
|
147
140
|
console.log();
|
|
148
|
-
console.log(chalk.green(` Compiled passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
|
|
141
|
+
console.log(chalk.green(` Compiled context passed on ${options.variationLabel}, attempt ${attempt}/${options.maxAttempts}.`));
|
|
149
142
|
printStageShellReviewHint(options.compiledPath, options.preserveStageShells, "success");
|
|
150
143
|
return {
|
|
151
144
|
passed: true,
|
|
@@ -188,9 +181,9 @@ function summarizeWorkflowVariation(options) {
|
|
|
188
181
|
const passedQuestions = options.result.bestOutcome?.result.passedCases ?? 0;
|
|
189
182
|
const totalQuestions = options.result.bestOutcome?.result.totalCases ?? options.defaultTotalQuestions;
|
|
190
183
|
const summary = options.result.passed
|
|
191
|
-
? `Passed ${passedQuestions}/${totalQuestions}
|
|
184
|
+
? `Passed ${passedQuestions}/${totalQuestions} checks.`
|
|
192
185
|
: options.result.bestOutcome
|
|
193
|
-
? `Best result: ${passedQuestions}/${totalQuestions}
|
|
186
|
+
? `Best result: ${passedQuestions}/${totalQuestions} checks passed.`
|
|
194
187
|
: options.result.failedStage
|
|
195
188
|
? `Compile failed at stage ${options.result.failedStage} before any test result.`
|
|
196
189
|
: "Workflow variation did not produce a passing result.";
|
|
@@ -220,16 +213,16 @@ function printStageShellReviewHint(compiledPath, preserveStageShells, result) {
|
|
|
220
213
|
}
|
|
221
214
|
}
|
|
222
215
|
function printPostCompileNextStep(options) {
|
|
223
|
-
console.log(chalk.dim(`
|
|
216
|
+
console.log(chalk.dim(` Context folder: ${options.compiledPath}`));
|
|
224
217
|
if (options.checks === 0) {
|
|
225
|
-
console.log(chalk.dim(" Next: run `interf` to add
|
|
218
|
+
console.log(chalk.dim(" Next: run `interf` to add checks, then `interf test`."));
|
|
226
219
|
return;
|
|
227
220
|
}
|
|
228
221
|
if (options.testedDuringCompile) {
|
|
229
|
-
console.log(chalk.dim(" Next: inspect the compiled
|
|
222
|
+
console.log(chalk.dim(" Next: inspect the compiled context, or run `interf test` if you also want a raw-versus-compiled-context comparison."));
|
|
230
223
|
return;
|
|
231
224
|
}
|
|
232
|
-
console.log(chalk.dim(" Next: run `interf test` to compare the raw files and the compiled
|
|
225
|
+
console.log(chalk.dim(" Next: run `interf test` to compare the raw files and the compiled context."));
|
|
233
226
|
}
|
|
234
227
|
function formatVariationQuestionSummary(summary) {
|
|
235
228
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
@@ -240,7 +233,7 @@ function printWorkflowVariationSummary(summaries) {
|
|
|
240
233
|
console.log();
|
|
241
234
|
console.log(chalk.bold(" Workflow variation summary"));
|
|
242
235
|
console.log();
|
|
243
|
-
console.log(" | Variation | Kind |
|
|
236
|
+
console.log(" | Variation | Kind | Checks | Result |");
|
|
244
237
|
console.log(" | --- | --- | --- | --- |");
|
|
245
238
|
for (const summary of summaries) {
|
|
246
239
|
console.log(` | ${summary.variation} | ${summary.kind} | \`${formatVariationQuestionSummary(summary)}\` | ${summary.passed ? "pass" : "fail"} |`);
|
|
@@ -252,7 +245,7 @@ function printCompiledLocalWorkflowOwnership(compiledPath, bestVariation) {
|
|
|
252
245
|
console.log();
|
|
253
246
|
console.log(chalk.dim(` Best workflow variation now lives in: ${workflowPackagePathForCompiled(compiledPath)}`));
|
|
254
247
|
console.log(chalk.dim(" The project-level workflow selection was not changed automatically."));
|
|
255
|
-
console.log(chalk.dim(" Recompiling this existing compiled
|
|
248
|
+
console.log(chalk.dim(" Recompiling this existing compiled context reuses that local workflow draft."));
|
|
256
249
|
}
|
|
257
250
|
export async function runConfiguredCompiledCompile(options) {
|
|
258
251
|
const preserveStageShells = options.preserveStageShells ?? "on-failure";
|
|
@@ -262,19 +255,19 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
262
255
|
const loopEnabled = maxAttempts != null;
|
|
263
256
|
const checks = options.compiledConfig?.checks ?? [];
|
|
264
257
|
if (loopEnabled && checks.length === 0) {
|
|
265
|
-
console.log(chalk.yellow(" Retry and self-improving modes need
|
|
258
|
+
console.log(chalk.yellow(" Retry and self-improving modes need checks. Building once without those loops."));
|
|
266
259
|
}
|
|
267
260
|
else if (loopEnabled) {
|
|
268
261
|
if (maxAttempts > 1) {
|
|
269
262
|
console.log(chalk.dim(` Retry mode: up to ${maxAttempts} compile attempts.`));
|
|
270
|
-
console.log(chalk.dim(" Interf
|
|
263
|
+
console.log(chalk.dim(" Interf will rerun the same workflow variation, test the compiled context, and stop early if it passes."));
|
|
271
264
|
}
|
|
272
265
|
else {
|
|
273
266
|
console.log(chalk.dim(" Compile mode: 1 attempt per workflow variation."));
|
|
274
267
|
}
|
|
275
268
|
if (maxLoops != null) {
|
|
276
269
|
console.log(chalk.dim(` Self-improving loops: up to ${maxLoops} workflow edits after retries fail.`));
|
|
277
|
-
console.log(chalk.dim(" Interf
|
|
270
|
+
console.log(chalk.dim(" Interf will review failed runs, edit the workflow, and test new workflow variations."));
|
|
278
271
|
}
|
|
279
272
|
}
|
|
280
273
|
if (!loopEnabled || checks.length === 0) {
|
|
@@ -302,11 +295,13 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
302
295
|
const previousVariations = [];
|
|
303
296
|
const improvementRunId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
304
297
|
try {
|
|
305
|
-
const compiledConfig = options.compiledConfig
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
298
|
+
const compiledConfig = options.compiledConfig
|
|
299
|
+
?? loadCompiledDatasetConfig(options.compiledPath)
|
|
300
|
+
?? {
|
|
301
|
+
name: readInterfConfig(options.compiledPath)?.name ?? "compiled",
|
|
302
|
+
path: "./dataset",
|
|
303
|
+
checks: [],
|
|
304
|
+
};
|
|
310
305
|
const adoptVariationBest = (variation, result) => {
|
|
311
306
|
if (result.bestOutcome && result.bestSnapshotPath && (!bestOutcome || testScore(result.bestOutcome) > testScore(bestOutcome))) {
|
|
312
307
|
if (bestSnapshotPath) {
|
|
@@ -419,20 +414,20 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
419
414
|
if (bestSnapshotPath && bestVariation > 0) {
|
|
420
415
|
restoreCompiledBestState(bestSnapshotPath, options.compiledPath);
|
|
421
416
|
console.log();
|
|
422
|
-
console.log(chalk.dim(` Restored the best-performing compiled
|
|
417
|
+
console.log(chalk.dim(` Restored the best-performing compiled context from variation ${bestVariation}, attempt ${bestAttempt}.`));
|
|
423
418
|
}
|
|
424
419
|
process.exitCode = 1;
|
|
425
420
|
console.log();
|
|
426
421
|
printWorkflowVariationSummary(previousVariations);
|
|
427
422
|
printCompiledLocalWorkflowOwnership(options.compiledPath, bestVariation);
|
|
428
423
|
if (maxLoops != null) {
|
|
429
|
-
console.log(chalk.red(` Compiled did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} workflow-improvement loop${maxLoops === 1 ? "" : "s"}.`));
|
|
424
|
+
console.log(chalk.red(` Compiled context did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} workflow-improvement loop${maxLoops === 1 ? "" : "s"}.`));
|
|
430
425
|
}
|
|
431
426
|
else {
|
|
432
|
-
console.log(chalk.red(` Compiled did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
|
|
427
|
+
console.log(chalk.red(` Compiled context did not pass within ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"}.`));
|
|
433
428
|
}
|
|
434
429
|
if (bestOutcome) {
|
|
435
|
-
console.log(chalk.dim(` Best attempt
|
|
430
|
+
console.log(chalk.dim(` Best attempt check pass rate: ${questionPassRate(bestOutcome)}%.`));
|
|
436
431
|
}
|
|
437
432
|
printStageShellReviewHint(options.compiledPath, preserveStageShells, "failure");
|
|
438
433
|
return false;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as p from "@clack/prompts";
|
|
2
|
+
import { detectInterf } from "../../packages/project-model/interf.js";
|
|
3
|
+
import type { SourceDatasetConfig } from "../../packages/project-model/lib/schema.js";
|
|
4
|
+
import type { CommandModule } from "yargs";
|
|
5
|
+
import { chooseCompiledConfigToBuild, ensureCompiledFromConfig } from "./compiled-flow.js";
|
|
6
|
+
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
7
|
+
import { runConfiguredCompiledCompile } from "./compile-controller.js";
|
|
8
|
+
export { runConfiguredCompiledCompile } from "./compile-controller.js";
|
|
9
|
+
export declare const compileCommand: CommandModule;
|
|
10
|
+
interface CompileCommandDeps {
|
|
11
|
+
chooseCompiledConfigToBuild: typeof chooseCompiledConfigToBuild;
|
|
12
|
+
confirm: typeof p.confirm;
|
|
13
|
+
detectInterf: typeof detectInterf;
|
|
14
|
+
ensureCompiledFromConfig: typeof ensureCompiledFromConfig;
|
|
15
|
+
resolveInteractiveCompileLoopOverrides: typeof resolveInteractiveCompileLoopOverrides;
|
|
16
|
+
resolveOrConfigureLocalExecutor: typeof resolveOrConfigureLocalExecutor;
|
|
17
|
+
runConfiguredCompiledCompile: typeof runConfiguredCompiledCompile;
|
|
18
|
+
}
|
|
19
|
+
export interface CompileCommandResult {
|
|
20
|
+
compiledPath: string;
|
|
21
|
+
testedDuringCompile: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function runCompileCommand(argv?: Record<string, unknown>, deps?: Partial<CompileCommandDeps>): Promise<CompileCommandResult | null>;
|
|
24
|
+
export declare function resolveInteractiveCompileLoopOverrides(options: {
|
|
25
|
+
compiledPath: string;
|
|
26
|
+
compiledConfig: SourceDatasetConfig | null;
|
|
27
|
+
maxAttemptsOverride: number | null;
|
|
28
|
+
maxLoopsOverride: number | null;
|
|
29
|
+
}): Promise<{
|
|
30
|
+
compiledConfig: SourceDatasetConfig | null;
|
|
31
|
+
maxAttemptsOverride: number | null;
|
|
32
|
+
maxLoopsOverride: number | null;
|
|
33
|
+
} | null>;
|