@interf/compiler 0.9.1 → 0.9.4
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 +9 -9
- package/agent-skills/interf-actions/SKILL.md +3 -0
- package/agent-skills/interf-actions/references/cli.md +13 -13
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +2 -2
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +4 -4
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +2 -2
- package/dist/cli/commands/check-draft.d.ts +6 -6
- package/dist/cli/commands/check-draft.js +5 -5
- package/dist/cli/commands/compile-controller.d.ts +7 -7
- package/dist/cli/commands/compile-controller.js +35 -38
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +23 -21
- package/dist/cli/commands/compiled-flow.d.ts +11 -11
- package/dist/cli/commands/compiled-flow.js +33 -30
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/{create-workflow-wizard.js → create-method-wizard.js} +153 -163
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +44 -45
- package/dist/cli/commands/default.js +1 -1
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +1 -1
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +139 -118
- package/dist/cli/commands/list.js +11 -10
- package/dist/cli/commands/preparation-selection.d.ts +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +9 -9
- package/dist/cli/commands/source-config-wizard.js +43 -43
- package/dist/cli/commands/status.js +36 -9
- package/dist/cli/commands/test-flow.d.ts +15 -15
- package/dist/cli/commands/test-flow.js +29 -219
- package/dist/cli/commands/test.d.ts +2 -2
- package/dist/cli/commands/test.js +50 -51
- package/dist/cli/commands/verify.js +7 -7
- package/dist/cli/commands/web.js +41 -28
- package/dist/compiler-ui/404.html +1 -0
- package/dist/compiler-ui/__next.__PAGE__.txt +10 -0
- package/dist/compiler-ui/__next._full.txt +20 -0
- package/dist/compiler-ui/__next._head.txt +5 -0
- package/dist/compiler-ui/__next._index.txt +5 -0
- package/dist/compiler-ui/__next._tree.txt +5 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/{apps/compiler-ui/.next/static/chunks/0fgt_8knmicoz.js → dist/compiler-ui/_next/static/chunks/0d~8t0zm6545p.js} +15 -21
- package/dist/compiler-ui/_next/static/chunks/0xnel.ax9a.2c.css +3 -0
- package/{apps/compiler-ui/.next/static/chunks/turbopack-109rtik40vwh5.js → dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js} +1 -1
- package/dist/compiler-ui/_not-found/__next._full.txt +15 -0
- package/dist/compiler-ui/_not-found/__next._head.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._index.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.__PAGE__.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._not-found.txt +5 -0
- package/dist/compiler-ui/_not-found/__next._tree.txt +2 -0
- package/dist/compiler-ui/_not-found.html +1 -0
- package/dist/compiler-ui/_not-found.txt +15 -0
- package/{apps/compiler-ui/.next/server/app → dist/compiler-ui}/index.html +1 -1
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +5 -3
- package/dist/packages/agents/index.d.ts +1 -1
- package/dist/packages/agents/lib/args.d.ts +2 -2
- package/dist/packages/agents/lib/compiled-bootstrap.js +7 -6
- package/dist/packages/agents/lib/execution-profile.d.ts +5 -5
- package/dist/packages/agents/lib/execution-profile.js +7 -6
- package/dist/packages/agents/lib/executors.d.ts +13 -13
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/shells.d.ts +25 -24
- package/dist/packages/agents/lib/shells.js +161 -154
- package/dist/packages/agents/lib/types.d.ts +2 -2
- package/dist/packages/compiler/artifact-counts.d.ts +1 -0
- package/dist/packages/compiler/artifact-counts.js +30 -0
- package/dist/packages/compiler/compiled-paths.d.ts +4 -7
- package/dist/packages/compiler/compiled-paths.js +9 -15
- package/dist/packages/compiler/compiled-pipeline.d.ts +11 -12
- package/dist/packages/compiler/compiled-pipeline.js +22 -22
- package/dist/packages/compiler/compiled-schema.d.ts +20 -20
- package/dist/packages/compiler/compiled-schema.js +29 -29
- package/dist/packages/compiler/compiled-stage-plan.d.ts +4 -4
- package/dist/packages/compiler/compiled-stage-plan.js +8 -8
- package/dist/packages/compiler/compiled-stage-runner.d.ts +5 -5
- package/dist/packages/compiler/compiled-stage-runner.js +7 -7
- package/dist/packages/compiler/compiled-target.d.ts +5 -5
- package/dist/packages/compiler/compiled-target.js +5 -5
- package/dist/packages/compiler/index.d.ts +3 -3
- package/dist/packages/compiler/index.js +2 -2
- package/dist/packages/compiler/lib/schema.d.ts +62 -247
- package/dist/packages/compiler/lib/schema.js +56 -174
- package/dist/packages/compiler/{workflows.d.ts → method-runs.d.ts} +4 -4
- package/dist/packages/compiler/{workflows.js → method-runs.js} +4 -3
- package/dist/packages/compiler/raw-snapshot.d.ts +0 -7
- package/dist/packages/compiler/raw-snapshot.js +0 -1
- package/dist/packages/compiler/reset.js +3 -3
- package/dist/packages/compiler/runtime-acceptance.js +9 -16
- package/dist/packages/compiler/runtime-contracts.js +9 -9
- package/dist/packages/compiler/runtime-prompt.js +4 -4
- package/dist/packages/compiler/runtime-reconcile.d.ts +2 -2
- package/dist/packages/compiler/runtime-reconcile.js +3 -3
- package/dist/packages/compiler/runtime-runs.js +9 -9
- package/dist/packages/compiler/runtime-types.d.ts +8 -7
- package/dist/packages/compiler/state-health.js +26 -35
- package/dist/packages/compiler/state-view.js +6 -6
- package/dist/packages/compiler/validate-compiled.d.ts +5 -5
- package/dist/packages/compiler/validate-compiled.js +56 -64
- package/dist/packages/compiler/validate.d.ts +2 -2
- package/dist/packages/compiler/validate.js +22 -14
- package/dist/packages/contracts/index.d.ts +2 -0
- package/dist/packages/contracts/index.js +1 -0
- package/dist/packages/contracts/lib/schema.d.ts +205 -0
- package/dist/packages/contracts/lib/schema.js +101 -0
- package/dist/packages/execution/index.d.ts +2 -2
- package/dist/packages/execution/index.js +1 -1
- package/dist/packages/execution/lib/schema.d.ts +80 -83
- package/dist/packages/execution/lib/schema.js +25 -48
- package/dist/packages/local-service/action-values.d.ts +1 -1
- package/dist/packages/local-service/action-values.js +1 -1
- package/dist/packages/local-service/client.d.ts +4 -4
- package/dist/packages/local-service/client.js +4 -4
- package/dist/packages/local-service/index.d.ts +3 -3
- package/dist/packages/local-service/index.js +2 -2
- package/dist/packages/local-service/lib/schema.d.ts +540 -974
- package/dist/packages/local-service/lib/schema.js +44 -160
- package/dist/packages/local-service/run-observability.d.ts +6 -0
- package/dist/packages/local-service/run-observability.js +592 -0
- package/dist/packages/local-service/runtime.d.ts +19 -23
- package/dist/packages/local-service/runtime.js +349 -913
- package/dist/packages/local-service/server.d.ts +1 -0
- package/dist/packages/local-service/server.js +25 -20
- package/dist/packages/method-authoring/index.d.ts +4 -0
- package/dist/packages/method-authoring/index.js +4 -0
- package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.d.ts → method-authoring/lib/method-edit-utils.d.ts} +3 -3
- package/dist/packages/method-authoring/method-authoring.d.ts +24 -0
- package/dist/packages/method-authoring/method-authoring.js +116 -0
- package/dist/packages/method-authoring/method-edit-session.d.ts +18 -0
- package/dist/packages/method-authoring/method-edit-session.js +125 -0
- package/dist/packages/method-authoring/method-improvement.d.ts +23 -0
- package/dist/packages/{workflow-authoring/workflow-improvement.js → method-authoring/method-improvement.js} +63 -63
- package/dist/packages/{workflow-package/builtin-compiled-workflow.d.ts → method-package/builtin-compiled-method.d.ts} +1 -1
- package/dist/packages/{workflow-package/builtin-compiled-workflow.js → method-package/builtin-compiled-method.js} +17 -17
- package/dist/packages/{workflow-package → method-package}/context-interface.d.ts +12 -12
- package/dist/packages/{workflow-package → method-package}/context-interface.js +19 -19
- package/dist/packages/method-package/index.d.ts +11 -0
- package/dist/packages/method-package/index.js +11 -0
- package/dist/packages/method-package/interf-method-package.d.ts +31 -0
- package/dist/packages/{workflow-package/interf-workflow-package.js → method-package/interf-method-package.js} +145 -145
- package/dist/packages/{workflow-package → method-package}/lib/package-root.js +1 -1
- package/dist/packages/method-package/local-methods.d.ts +64 -0
- package/dist/packages/method-package/local-methods.js +466 -0
- package/dist/packages/method-package/method-definitions.d.ts +83 -0
- package/dist/packages/method-package/method-definitions.js +205 -0
- package/dist/packages/{workflow-package/workflow-helpers.d.ts → method-package/method-helpers.d.ts} +10 -10
- package/dist/packages/{workflow-package/workflow-helpers.js → method-package/method-helpers.js} +22 -26
- package/dist/packages/method-package/method-review-paths.d.ts +10 -0
- package/dist/packages/{workflow-package/workflow-review-paths.js → method-package/method-review-paths.js} +4 -4
- package/dist/packages/{workflow-package/workflow-stage-runner.d.ts → method-package/method-stage-runner.d.ts} +12 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +6 -6
- package/dist/packages/methods/index.d.ts +2 -0
- package/dist/packages/methods/index.js +2 -0
- package/dist/packages/methods/method-resolution.d.ts +6 -0
- package/dist/packages/methods/method-resolution.js +7 -0
- package/dist/packages/project-model/index.d.ts +1 -4
- package/dist/packages/project-model/index.js +0 -3
- package/dist/packages/project-model/interf-detect.d.ts +1 -5
- package/dist/packages/project-model/interf-detect.js +7 -18
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +38 -39
- package/dist/packages/project-model/interf.d.ts +1 -2
- package/dist/packages/project-model/interf.js +1 -2
- package/dist/packages/project-model/lib/schema.d.ts +2 -66
- package/dist/packages/project-model/lib/schema.js +5 -23
- package/dist/packages/project-model/project-paths.d.ts +9 -10
- package/dist/packages/project-model/project-paths.js +14 -17
- package/dist/packages/project-model/source-config.d.ts +11 -18
- package/dist/packages/project-model/source-config.js +42 -60
- package/dist/packages/project-model/source-folders.d.ts +4 -4
- package/dist/packages/project-model/source-folders.js +10 -10
- package/dist/packages/testing/index.d.ts +2 -2
- package/dist/packages/testing/index.js +1 -1
- package/dist/packages/testing/lib/schema.d.ts +11 -11
- package/dist/packages/testing/lib/schema.js +8 -9
- package/dist/packages/testing/readiness-check-run.d.ts +67 -0
- package/dist/packages/testing/readiness-check-run.js +258 -0
- package/dist/packages/testing/test-execution.d.ts +3 -3
- package/dist/packages/testing/test-execution.js +5 -5
- package/dist/packages/testing/test-paths.js +6 -6
- package/dist/packages/testing/test-profile-presets.js +2 -2
- package/dist/packages/testing/test-sandbox.js +10 -11
- package/dist/packages/testing/test-targets.d.ts +1 -1
- package/dist/packages/testing/test-targets.js +8 -7
- package/dist/packages/testing/test-types.d.ts +1 -1
- package/package.json +16 -33
- package/apps/compiler-ui/.next/static/chunks/0ti_66mx7~w2-.js +0 -5
- package/apps/compiler-ui/.next/static/chunks/13g~4mamjft.c.css +0 -3
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -76
- package/dist/packages/project-model/compiled-paths.d.ts +0 -1
- package/dist/packages/project-model/compiled-paths.js +0 -1
- package/dist/packages/project-model/compiled-raw.d.ts +0 -1
- package/dist/packages/project-model/compiled-raw.js +0 -1
- package/dist/packages/project-model/compiled-reset.d.ts +0 -1
- package/dist/packages/project-model/compiled-reset.js +0 -1
- package/dist/packages/shared/index.d.ts +0 -7
- package/dist/packages/shared/index.js +0 -7
- package/dist/packages/shared/util.d.ts +0 -3
- package/dist/packages/shared/util.js +0 -3
- package/dist/packages/testing/test-matrices.d.ts +0 -90
- package/dist/packages/testing/test-matrices.js +0 -96
- package/dist/packages/workflow-authoring/index.d.ts +0 -4
- package/dist/packages/workflow-authoring/index.js +0 -4
- package/dist/packages/workflow-authoring/workflow-authoring.d.ts +0 -24
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -82
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -18
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -91
- package/dist/packages/workflow-authoring/workflow-improvement.d.ts +0 -23
- package/dist/packages/workflow-package/index.d.ts +0 -11
- package/dist/packages/workflow-package/index.js +0 -11
- package/dist/packages/workflow-package/interf-workflow-package.d.ts +0 -31
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -457
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -211
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +0 -0
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/03~yq9q893hmn.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/06z~l3kwb891e.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08g7lvje.te.u.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/08m7vf5asqlsm.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0_i-3_5l9t2qe.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b-ywny_j0g~0.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0b52v41o1gixx.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0gpzgsv0w.q~m.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0ilwfezfvu6~-.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0n51hrfoufc7g.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0xxmf45eskdt~.css +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/0y5z3t-z1c8ks.js.map +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/14wtz~vq25~qq.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-10e~t1yzi4svj.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_buildManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_clientMiddlewareManifest.js +0 -0
- /package/{apps/compiler-ui/.next/static/XWKL548yXD_UOG4ID9G3J → dist/compiler-ui/_next/static/j7pdoqWrl4YJrJUVnksbl}/_ssgManifest.js +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- /package/{apps/compiler-ui/.next → dist/compiler-ui/_next}/static/media/worker.102zas1s52_pf.js +0 -0
- /package/dist/packages/compiler/{workflow-primitives.d.ts → method-primitives.d.ts} +0 -0
- /package/dist/packages/compiler/{workflow-primitives.js → method-primitives.js} +0 -0
- /package/dist/packages/{workflow-authoring/lib/workflow-edit-utils.js → method-authoring/lib/method-edit-utils.js} +0 -0
- /package/dist/packages/{workflow-package → method-package}/lib/package-root.d.ts +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.d.ts → method-package/method-stage-policy.d.ts} +0 -0
- /package/dist/packages/{workflow-package/workflow-stage-policy.js → method-package/method-stage-policy.js} +0 -0
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ Requires Node.js 20+ and a local coding agent such as Claude Code or Codex. Run
|
|
|
83
83
|
7. Run `interf test` to check readiness.
|
|
84
84
|
8. If agents pass more checks with portable context, point your agent at `interf/<preparation>/`.
|
|
85
85
|
|
|
86
|
-
If you want a baseline before preparing, run `interf test --target
|
|
86
|
+
If you want a baseline before preparing, run `interf test --target source-files`. It is optional proof, not the main path.
|
|
87
87
|
|
|
88
88
|
`interf init` sets up the local Interf Workspace, saves `interf/interf.json`, and copies the built-in Method to `interf/methods/interf-default/`. It does not create a Preparation until you choose to add one. The Method is stored as a Method package you can inspect, edit, or fork with `interf create method`.
|
|
89
89
|
|
|
@@ -119,8 +119,8 @@ A Method tells Interf how to process your files for the job agents need to do. W
|
|
|
119
119
|
|
|
120
120
|
```text
|
|
121
121
|
interf/methods/interf-default/
|
|
122
|
-
|
|
123
|
-
|
|
122
|
+
method.json # Method: source data, stages, and processing rules
|
|
123
|
+
method.schema.json # output contract: required portable-context files and folders
|
|
124
124
|
README.md # what this Method is for, for humans and agents
|
|
125
125
|
compile/
|
|
126
126
|
stages/
|
|
@@ -132,13 +132,13 @@ interf/methods/interf-default/
|
|
|
132
132
|
improve/ # how Interf revises this Method if readiness checks still fail
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
- `
|
|
136
|
-
- `
|
|
135
|
+
- `method.json` describes the Method: source data, stages, and how the files should be processed.
|
|
136
|
+
- `method.schema.json` describes the output contract: what the portable context must contain. Interf enforces it when you run `interf compile`.
|
|
137
137
|
- `compile/stages/<stage>/` is where you author one folder per stage — a small, specific phase like `summarize` or `structure`. You write the instructions; Interf runs them during compile.
|
|
138
138
|
- `use/query/` holds the instructions agents follow when they read the portable context for live agent work.
|
|
139
139
|
- `improve/` holds the instructions Interf follows when the first build misses and the Method itself needs editing.
|
|
140
140
|
|
|
141
|
-
A Method defines the stages, output contract, proof requirements, and improvement instructions Interf runs on your files. Technically, each Method is stored as a Method package with `
|
|
141
|
+
A Method defines the stages, output contract, proof requirements, and improvement instructions Interf runs on your files. Technically, each Method is stored as a Method package with `method.json` and `method.schema.json`. The result is portable context your agents can read.
|
|
142
142
|
|
|
143
143
|
## Method Improvement
|
|
144
144
|
|
|
@@ -152,7 +152,7 @@ Interf saves every readiness-check run under `interf/<preparation>/.interf/tests
|
|
|
152
152
|
|
|
153
153
|
Readiness is one `ready` / `not ready` status, not a separate score. Interf builds it from evidence primitives: stage/Method acceptance criteria, proof records, file coverage, artifact validation, and readiness checks.
|
|
154
154
|
|
|
155
|
-
`interf web` starts the local Interf service and serves Interf UI. The UI reads local-service resources: Preparations, Methods, runs, stages, proof, artifacts, readiness checks, and whether portable context is `ready` or `not ready`. It renders local compiler state; it does not own compiler, Method, or readiness semantics.
|
|
155
|
+
`interf web` starts the local Interf service and serves Interf Compiler UI. The UI reads local-service resources: Preparations, Methods, runs, stages, proof, artifacts, readiness checks, and whether portable context is `ready` or `not ready`. It renders local compiler state; it does not own compiler, Method, or readiness semantics.
|
|
156
156
|
|
|
157
157
|
Maintainer package boundaries live in [src/packages/README.md](./src/packages/README.md).
|
|
158
158
|
|
|
@@ -206,7 +206,7 @@ A maintained readiness example in this repo uses one market report, two readines
|
|
|
206
206
|
| Claude Code (Claude Opus 4.6, max) | `0/2` | `2/2` |
|
|
207
207
|
<!-- PUBLIC_BENCHMARK_TABLE:END -->
|
|
208
208
|
|
|
209
|
-
Codex passed from the
|
|
209
|
+
Codex passed from the Source Folder files; Claude Code only passed when working from Interf's portable context. Both numbers come from the same readiness-check pass. That is evidence about whether this Preparation is `ready` for this agent work.
|
|
210
210
|
|
|
211
211
|
A maintained public test example in this repo stores them like this:
|
|
212
212
|
|
|
@@ -244,7 +244,7 @@ A maintained public test example in this repo stores them like this:
|
|
|
244
244
|
## Useful Commands
|
|
245
245
|
|
|
246
246
|
- `interf` or `interf init` — set up the Interf Workspace or manage Preparations
|
|
247
|
-
- `interf web` — start Interf UI and the local API for this Workspace
|
|
247
|
+
- `interf web` — start Interf Compiler UI and the local API for this Workspace
|
|
248
248
|
- `interf compile` — build portable context agents can use
|
|
249
249
|
- `interf test` — run readiness checks against source files and/or portable context
|
|
250
250
|
- `interf create method` — draft a reusable Method
|
|
@@ -27,6 +27,7 @@ In Interf Compiler UI proposal mode, do not run CLI commands. Use `references/cl
|
|
|
27
27
|
- Do not invent readiness checks, Method ids, paths, or executor names.
|
|
28
28
|
- If the local service is running, `interf compile` and `interf test` submit visible runs to Interf Compiler UI.
|
|
29
29
|
- Propose the command first and wait for approval before running commands that write files, start runs, create Method packages, build portable context, or run readiness checks.
|
|
30
|
+
- If the request names an existing Preparation and asks to prepare, build, or refresh portable context, use `interf compile --preparation <name>`. The saved Preparation and selected Method are the source of truth.
|
|
30
31
|
- If the request is ambiguous, ask one concise clarification instead of guessing.
|
|
31
32
|
|
|
32
33
|
## Interf Compiler UI Proposal Mode
|
|
@@ -44,6 +45,8 @@ Use these action types:
|
|
|
44
45
|
|
|
45
46
|
Use `preparation-setup` when no Preparation is saved yet or when the user asks to initialize/add a source folder. Set `values.path` to a visible source folder path such as `./Reports`, set `preparation` or `values.name` to the Preparation id, and set `values.about` to the agent work the source folder should support. CLI equivalent: `interf init` or `interf create preparation`.
|
|
46
47
|
|
|
48
|
+
Use `compile` when the user asks to prepare, build, or refresh portable context for an existing Preparation. Do not ask what "prepare" means when the Preparation exists. Set `preparation` to the selected or mentioned Preparation id. CLI equivalent: `interf compile --preparation <name>`.
|
|
49
|
+
|
|
47
50
|
For a readiness-check proposal, set `values.mode` to:
|
|
48
51
|
|
|
49
52
|
- `raw` for source files only
|
|
@@ -10,16 +10,16 @@ This snapshot is bundled with the `interf-actions` skill. The installed `interf`
|
|
|
10
10
|
interf
|
|
11
11
|
|
|
12
12
|
Commands:
|
|
13
|
-
interf init
|
|
14
|
-
interf compile
|
|
15
|
-
interf test
|
|
16
|
-
interf create [type]
|
|
17
|
-
interf doctor
|
|
18
|
-
interf list
|
|
19
|
-
interf status
|
|
20
|
-
interf verify <check> Run deterministic verification checks
|
|
21
|
-
interf web
|
|
22
|
-
interf reset <scope>
|
|
13
|
+
interf init Set up Interf or open the Preparation wizard
|
|
14
|
+
interf compile Prepare files and write Portable Context agents can use
|
|
15
|
+
interf test Run readiness checks against source files and Portable Context
|
|
16
|
+
interf create [type] Create a Preparation or reusable Method
|
|
17
|
+
interf doctor Check local executor configuration before a real local run
|
|
18
|
+
interf list List saved Preparations in this Source Folder
|
|
19
|
+
interf status Show deterministic health for the Portable Context agents use
|
|
20
|
+
interf verify <check> [stageId] Run deterministic verification checks
|
|
21
|
+
interf web Start Interf UI and the local Interf API
|
|
22
|
+
interf reset <scope> Reset generated Portable Context state while keeping source files and the local Method package
|
|
23
23
|
|
|
24
24
|
Options:
|
|
25
25
|
--help Show help [boolean]
|
|
@@ -96,7 +96,7 @@ Options:
|
|
|
96
96
|
--timeout-ms Interrupt the local executor after this much inactivity [number]
|
|
97
97
|
--preparation Preparation id to check when this Source Folder has more than one Preparation [string]
|
|
98
98
|
--target Check source files, Portable Context, or both. Default: both when Portable Context exists, otherwise source files.
|
|
99
|
-
|
|
99
|
+
[choices: "both", "source-files", "portable-context"]
|
|
100
100
|
--keep-sandboxes Keep every readiness-check sandbox for review instead of pruning successful ones [boolean] [default: false]
|
|
101
101
|
--agents Comma-separated local agents to use for readiness checks, or `all`. Example: --agents claude-code,codex [string]
|
|
102
102
|
```
|
|
@@ -159,12 +159,12 @@ Options:
|
|
|
159
159
|
## interf verify
|
|
160
160
|
|
|
161
161
|
```text
|
|
162
|
-
interf verify <check>
|
|
162
|
+
interf verify <check> [stageId]
|
|
163
163
|
|
|
164
164
|
Run deterministic verification checks
|
|
165
165
|
|
|
166
166
|
Positionals:
|
|
167
|
-
check Check to run (`stage`, `
|
|
167
|
+
check Check to run (`stage`, `portable-context`, or `method`) [string] [required]
|
|
168
168
|
stageId Stage id when using `verify stage <stage-id>` [string]
|
|
169
169
|
|
|
170
170
|
Options:
|
|
@@ -26,6 +26,6 @@ Built-in file-processing Method: summarize source-grounded evidence, structure c
|
|
|
26
26
|
## Why `home.md` exists here
|
|
27
27
|
|
|
28
28
|
This built-in Method creates `home.md` as the main agent entrypoint for the portable context.
|
|
29
|
-
That is behavior of the `interf` Method, not a compiler-wide rule.
|
|
29
|
+
That is behavior of the `interf-default` Method, not a compiler-wide rule.
|
|
30
30
|
|
|
31
|
-
This package is the built-in seed for `interf`.
|
|
31
|
+
This package is the built-in seed for `interf-default`.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Method Improvement
|
|
2
|
+
|
|
3
|
+
Method: interf-default
|
|
4
|
+
|
|
5
|
+
This file is the editable authoring source for Interf's generated native Method-improver shell.
|
|
6
|
+
The improver edits this 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 Method package for this portable context to create a better Method variation for this task.
|
|
12
|
+
4. Keep `method.json`, `method.schema.json`, and any changed stage docs aligned.
|
|
13
|
+
|
|
14
|
+
Guardrails:
|
|
15
|
+
- do not edit checks, test specs, or raw source files
|
|
16
|
+
- do not hardcode expected answers into Method docs
|
|
17
|
+
- keep this package standalone; do not rely on runtime inheritance
|
|
18
|
+
- prefer small, defensible Method changes over random churn
|
package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json}
RENAMED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "interf",
|
|
2
|
+
"id": "interf-default",
|
|
3
3
|
"type": "compiled",
|
|
4
4
|
"compiler_api": {
|
|
5
5
|
"kind": "compiled",
|
|
6
6
|
"version": 1
|
|
7
7
|
},
|
|
8
8
|
"purpose": {
|
|
9
|
-
"label": "Built-in portable-context
|
|
9
|
+
"label": "Built-in portable-context Method for agent use",
|
|
10
10
|
"task_hint": "Compile mixed raw files into evidence-backed summaries, cross-file structure, and a usable entrypoint for agents running the readiness checks this task depends on."
|
|
11
11
|
},
|
|
12
|
-
"label": "Built-in Interf
|
|
13
|
-
"hint": "Built-in file-processing
|
|
12
|
+
"label": "Built-in Interf Method",
|
|
13
|
+
"hint": "Built-in file-processing Method: summarize source-grounded evidence, structure cross-file connections, and shape portable context around the saved readiness checks.",
|
|
14
14
|
"stages": [
|
|
15
15
|
{
|
|
16
16
|
"id": "summarize",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { MethodExecutor } from "../../packages/agents/lib/executors.js";
|
|
2
2
|
import type { SourceReadinessCheck } from "../../packages/project-model/lib/schema.js";
|
|
3
3
|
export declare function buildReadinessCheckDraftPrompt(options: {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
preparationName: string;
|
|
5
|
+
sourceFolderPath: string;
|
|
6
6
|
about?: string;
|
|
7
7
|
outputPath: string;
|
|
8
8
|
targetCount: number;
|
|
9
9
|
}): string;
|
|
10
10
|
export declare function draftReadinessChecks(options: {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
preparationName: string;
|
|
12
|
+
sourceFolderPath: string;
|
|
13
13
|
about?: string;
|
|
14
|
-
executor:
|
|
14
|
+
executor: MethodExecutor;
|
|
15
15
|
targetCount?: number;
|
|
16
16
|
onStatus?: (line: string) => void;
|
|
17
17
|
}): Promise<{
|
|
@@ -25,8 +25,8 @@ export function buildReadinessCheckDraftPrompt(options) {
|
|
|
25
25
|
"Do not ask follow-up questions.",
|
|
26
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
|
-
`Preparation id: ${options.
|
|
29
|
-
`Source Folder: ${options.
|
|
28
|
+
`Preparation id: ${options.preparationName}`,
|
|
29
|
+
`Source Folder: ${options.sourceFolderPath}`,
|
|
30
30
|
...taskLines,
|
|
31
31
|
"",
|
|
32
32
|
`Write exactly one JSON array to ${JSON.stringify(options.outputPath)}.`,
|
|
@@ -57,15 +57,15 @@ export async function draftReadinessChecks(options) {
|
|
|
57
57
|
const outputPath = join(tempDir, "checks.json");
|
|
58
58
|
const promptPath = join(tempDir, "prompt.txt");
|
|
59
59
|
const prompt = buildReadinessCheckDraftPrompt({
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
preparationName: options.preparationName,
|
|
61
|
+
sourceFolderPath: options.sourceFolderPath,
|
|
62
62
|
about: options.about,
|
|
63
63
|
outputPath,
|
|
64
64
|
targetCount: options.targetCount ?? 4,
|
|
65
65
|
});
|
|
66
66
|
writeFileSync(promptPath, `${prompt}\n`);
|
|
67
67
|
try {
|
|
68
|
-
const code = await options.executor.execute(options.
|
|
68
|
+
const code = await options.executor.execute(options.sourceFolderPath, prompt, {
|
|
69
69
|
completionCheck: () => existsSync(outputPath),
|
|
70
70
|
onStatus: options.onStatus,
|
|
71
71
|
});
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
3
|
-
import type { StageShellRetentionMode } from "../../packages/compiler/
|
|
1
|
+
import type { MethodExecutionProfile, MethodExecutor } from "../../packages/agents/lib/executors.js";
|
|
2
|
+
import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
|
|
3
|
+
import type { StageShellRetentionMode } from "../../packages/compiler/method-runs.js";
|
|
4
4
|
import type { RunEventSink } from "../../packages/execution/events.js";
|
|
5
5
|
export declare function runConfiguredCompiledCompile(options: {
|
|
6
|
-
executor:
|
|
7
|
-
testExecutor?:
|
|
6
|
+
executor: MethodExecutor;
|
|
7
|
+
testExecutor?: MethodExecutor | null;
|
|
8
8
|
compiledPath: string;
|
|
9
9
|
sourcePath: string;
|
|
10
|
-
compiledConfig:
|
|
11
|
-
executionProfile?:
|
|
10
|
+
compiledConfig: SourcePreparationConfig | null;
|
|
11
|
+
executionProfile?: MethodExecutionProfile;
|
|
12
12
|
maxAttemptsOverride: number | null;
|
|
13
13
|
maxLoopsOverride: number | null;
|
|
14
14
|
preserveStageShells?: StageShellRetentionMode;
|
|
@@ -3,25 +3,31 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { dirname, join } from "node:path";
|
|
4
4
|
import chalk from "chalk";
|
|
5
5
|
import { readInterfConfig } from "../../packages/project-model/interf.js";
|
|
6
|
-
import { clearCompiledRuntimeDerivedArtifacts,
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { stageExecutionShellsRoot,
|
|
6
|
+
import { clearCompiledRuntimeDerivedArtifacts, } from "../../packages/compiler/reset.js";
|
|
7
|
+
import { formatActiveCompiledMethodStageStep, resolveRequiredCompiledMethodFromConfig, } from "../../packages/method-package/method-definitions.js";
|
|
8
|
+
import { loadCompiledPreparationConfig, resolvePreparationCompileMaxAttempts, resolvePreparationCompileMaxLoops, } from "../../packages/project-model/source-config.js";
|
|
9
|
+
import { runMethodImprovementLoop } from "../../packages/method-authoring/method-improvement.js";
|
|
10
|
+
import { stageExecutionShellsRoot, methodPackagePathForCompiled, } from "../../packages/compiler/compiled-paths.js";
|
|
11
11
|
import { readCompiledSchemaFile } from "../../packages/compiler/compiled-schema.js";
|
|
12
12
|
import { initializeCompiledRuntimeState } from "../../packages/compiler/state.js";
|
|
13
13
|
import { compileCompiledWithReporter } from "./compiled-flow.js";
|
|
14
14
|
import { printSavedTestOutcome, readinessPassRate, runSavedCompiledTest, } from "./test-flow.js";
|
|
15
15
|
function printCompileFailure(compiledPath, failedStage) {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
resolveRequiredCompiledMethodFromConfig(readInterfConfig(compiledPath), `.interf/interf.json for ${compiledPath}`);
|
|
17
|
+
let failedStageLabel = failedStage ? `Stage "${failedStage}"` : "Compile";
|
|
18
|
+
try {
|
|
19
|
+
failedStageLabel = formatActiveCompiledMethodStageStep(compiledPath, failedStage ?? "compile");
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
// Keep the original failure visible even when the failure is outside a declared Method stage.
|
|
23
|
+
}
|
|
18
24
|
console.log(chalk.red(` ${failedStageLabel} failed.`));
|
|
19
25
|
}
|
|
20
26
|
function testScore(outcome) {
|
|
21
27
|
return (outcome.result.passedCases * 1000) + outcome.result.passedChecks;
|
|
22
28
|
}
|
|
23
29
|
function bestVariationRestorePaths(compiledPath) {
|
|
24
|
-
const schema = readCompiledSchemaFile(
|
|
30
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
25
31
|
const zonePaths = (schema?.zones ?? [])
|
|
26
32
|
.filter((zone) => zone.id !== "raw" && zone.kind !== "runtime")
|
|
27
33
|
.map((zone) => zone.path);
|
|
@@ -65,7 +71,7 @@ function restoreCompiledBestState(snapshotPath, compiledPath) {
|
|
|
65
71
|
clearCompiledRuntimeDerivedArtifacts(compiledPath);
|
|
66
72
|
initializeCompiledRuntimeState(compiledPath);
|
|
67
73
|
}
|
|
68
|
-
async function
|
|
74
|
+
async function runMethodVariation(options) {
|
|
69
75
|
let bestOutcome = null;
|
|
70
76
|
let bestSnapshotPath = null;
|
|
71
77
|
let bestAttempt = 0;
|
|
@@ -73,14 +79,6 @@ async function runWorkflowVariation(options) {
|
|
|
73
79
|
try {
|
|
74
80
|
for (let attempt = 1; attempt <= options.maxAttempts; attempt += 1) {
|
|
75
81
|
attemptsRun = attempt;
|
|
76
|
-
if (attempt > 1 || (attempt === 1 && options.resetBeforeFirstAttempt)) {
|
|
77
|
-
console.log();
|
|
78
|
-
const resetTarget = attempt > 1
|
|
79
|
-
? `attempt ${attempt}/${options.maxAttempts}`
|
|
80
|
-
: options.variationLabel;
|
|
81
|
-
console.log(chalk.dim(` Resetting generated Portable Context state before ${resetTarget}...`));
|
|
82
|
-
resetCompiledGeneratedState(options.compiledPath, "compile");
|
|
83
|
-
}
|
|
84
82
|
const result = await compileCompiledWithReporter(options.executor, options.compiledPath, {
|
|
85
83
|
heading: options.maxAttempts > 1
|
|
86
84
|
? `Building Portable Context (${options.variationLabel}, attempt ${attempt}/${options.maxAttempts})...`
|
|
@@ -111,7 +109,7 @@ async function runWorkflowVariation(options) {
|
|
|
111
109
|
}
|
|
112
110
|
const outcome = await runSavedCompiledTest({
|
|
113
111
|
sourcePath: options.sourcePath,
|
|
114
|
-
|
|
112
|
+
preparationConfig: options.compiledConfig,
|
|
115
113
|
executor: options.testExecutor,
|
|
116
114
|
executionProfile: options.executionProfile,
|
|
117
115
|
compiledPath: options.compiledPath,
|
|
@@ -179,7 +177,7 @@ async function runWorkflowVariation(options) {
|
|
|
179
177
|
};
|
|
180
178
|
}
|
|
181
179
|
}
|
|
182
|
-
function
|
|
180
|
+
function summarizeMethodVariation(options) {
|
|
183
181
|
const passedChecks = options.result.bestOutcome?.result.passedCases ?? 0;
|
|
184
182
|
const totalChecks = options.result.bestOutcome?.result.totalCases ?? options.defaultTotalChecks;
|
|
185
183
|
const summary = options.result.passed
|
|
@@ -229,7 +227,7 @@ function printPostCompileNextStep(options) {
|
|
|
229
227
|
function formatVariationReadinessSummary(summary) {
|
|
230
228
|
return `${summary.passed_questions}/${summary.total_questions}`;
|
|
231
229
|
}
|
|
232
|
-
function
|
|
230
|
+
function printMethodVariationSummary(summaries) {
|
|
233
231
|
if (summaries.length === 0)
|
|
234
232
|
return;
|
|
235
233
|
console.log();
|
|
@@ -241,18 +239,18 @@ function printWorkflowVariationSummary(summaries) {
|
|
|
241
239
|
console.log(` | ${summary.variation} | ${summary.kind} | \`${formatVariationReadinessSummary(summary)}\` | ${summary.passed ? "pass" : "fail"} |`);
|
|
242
240
|
}
|
|
243
241
|
}
|
|
244
|
-
function
|
|
242
|
+
function printCompiledLocalMethodOwnership(compiledPath, bestVariation) {
|
|
245
243
|
if (bestVariation <= 1)
|
|
246
244
|
return;
|
|
247
245
|
console.log();
|
|
248
|
-
console.log(chalk.dim(` Best Method variation now lives in: ${
|
|
246
|
+
console.log(chalk.dim(` Best Method variation now lives in: ${methodPackagePathForCompiled(compiledPath)}`));
|
|
249
247
|
console.log(chalk.dim(" The project-level Method selection was not changed automatically."));
|
|
250
248
|
console.log(chalk.dim(" Recompiling this existing Portable Context reuses that local Method draft."));
|
|
251
249
|
}
|
|
252
250
|
export async function runConfiguredCompiledCompile(options) {
|
|
253
251
|
const preserveStageShells = options.preserveStageShells ?? "on-failure";
|
|
254
|
-
const configuredMaxAttempts =
|
|
255
|
-
const maxLoops =
|
|
252
|
+
const configuredMaxAttempts = resolvePreparationCompileMaxAttempts(options.compiledConfig ?? { max_attempts: undefined }, options.maxAttemptsOverride);
|
|
253
|
+
const maxLoops = resolvePreparationCompileMaxLoops(options.compiledConfig ?? { max_loops: undefined }, options.maxLoopsOverride);
|
|
256
254
|
const maxAttempts = configuredMaxAttempts ?? (maxLoops != null ? 1 : null);
|
|
257
255
|
const loopEnabled = maxAttempts != null;
|
|
258
256
|
const checks = options.compiledConfig?.checks ?? [];
|
|
@@ -300,10 +298,10 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
300
298
|
const improvementRunId = `${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 8)}`;
|
|
301
299
|
try {
|
|
302
300
|
const compiledConfig = options.compiledConfig
|
|
303
|
-
??
|
|
301
|
+
?? loadCompiledPreparationConfig(options.compiledPath)
|
|
304
302
|
?? {
|
|
305
303
|
name: readInterfConfig(options.compiledPath)?.name ?? "compiled",
|
|
306
|
-
path: "./
|
|
304
|
+
path: "./source-folder",
|
|
307
305
|
checks: [],
|
|
308
306
|
};
|
|
309
307
|
const adoptVariationBest = (variation, result) => {
|
|
@@ -322,7 +320,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
322
320
|
result.bestSnapshotPath = null;
|
|
323
321
|
}
|
|
324
322
|
};
|
|
325
|
-
const baseline = await
|
|
323
|
+
const baseline = await runMethodVariation({
|
|
326
324
|
executor: options.executor,
|
|
327
325
|
testExecutor: options.testExecutor,
|
|
328
326
|
compiledPath: options.compiledPath,
|
|
@@ -341,14 +339,14 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
341
339
|
return false;
|
|
342
340
|
}
|
|
343
341
|
adoptVariationBest(1, baseline);
|
|
344
|
-
previousVariations.push(
|
|
342
|
+
previousVariations.push(summarizeMethodVariation({
|
|
345
343
|
variation: 1,
|
|
346
344
|
kind: "baseline",
|
|
347
345
|
result: baseline,
|
|
348
346
|
defaultTotalChecks: checks.length,
|
|
349
347
|
}));
|
|
350
348
|
if (baseline.passed) {
|
|
351
|
-
|
|
349
|
+
printMethodVariationSummary(previousVariations);
|
|
352
350
|
printPostCompileNextStep({
|
|
353
351
|
compiledPath: options.compiledPath,
|
|
354
352
|
checks: checks.length,
|
|
@@ -360,10 +358,10 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
360
358
|
for (let loopIndex = 1; loopIndex <= maxLoops; loopIndex += 1) {
|
|
361
359
|
console.log();
|
|
362
360
|
console.log(chalk.dim(` Self-improving loop ${loopIndex}/${maxLoops}: reviewing failed runs and editing the Method.`));
|
|
363
|
-
const improvement = await
|
|
361
|
+
const improvement = await runMethodImprovementLoop({
|
|
364
362
|
executor: options.executor,
|
|
365
363
|
compiledPath: options.compiledPath,
|
|
366
|
-
|
|
364
|
+
methodId: resolveRequiredCompiledMethodFromConfig(readInterfConfig(options.compiledPath), `.interf/interf.json for ${options.compiledPath}`),
|
|
367
365
|
compiledConfig,
|
|
368
366
|
runId: improvementRunId,
|
|
369
367
|
loopIndex,
|
|
@@ -381,7 +379,7 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
381
379
|
console.log(chalk.yellow(` ${improvement.summary}`));
|
|
382
380
|
continue;
|
|
383
381
|
}
|
|
384
|
-
const variation = await
|
|
382
|
+
const variation = await runMethodVariation({
|
|
385
383
|
executor: options.executor,
|
|
386
384
|
testExecutor: options.testExecutor,
|
|
387
385
|
compiledPath: options.compiledPath,
|
|
@@ -391,7 +389,6 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
391
389
|
preserveStageShells,
|
|
392
390
|
maxAttempts,
|
|
393
391
|
variationLabel: `Method variation ${loopIndex + 1}`,
|
|
394
|
-
resetBeforeFirstAttempt: true,
|
|
395
392
|
runId: options.runId,
|
|
396
393
|
events: options.events,
|
|
397
394
|
});
|
|
@@ -401,15 +398,15 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
401
398
|
return false;
|
|
402
399
|
}
|
|
403
400
|
adoptVariationBest(loopIndex + 1, variation);
|
|
404
|
-
previousVariations.push(
|
|
401
|
+
previousVariations.push(summarizeMethodVariation({
|
|
405
402
|
variation: loopIndex + 1,
|
|
406
403
|
kind: "edited",
|
|
407
404
|
result: variation,
|
|
408
405
|
defaultTotalChecks: checks.length,
|
|
409
406
|
}));
|
|
410
407
|
if (variation.passed) {
|
|
411
|
-
|
|
412
|
-
|
|
408
|
+
printMethodVariationSummary(previousVariations);
|
|
409
|
+
printCompiledLocalMethodOwnership(options.compiledPath, bestVariation);
|
|
413
410
|
printPostCompileNextStep({
|
|
414
411
|
compiledPath: options.compiledPath,
|
|
415
412
|
checks: checks.length,
|
|
@@ -426,8 +423,8 @@ export async function runConfiguredCompiledCompile(options) {
|
|
|
426
423
|
}
|
|
427
424
|
process.exitCode = 1;
|
|
428
425
|
console.log();
|
|
429
|
-
|
|
430
|
-
|
|
426
|
+
printMethodVariationSummary(previousVariations);
|
|
427
|
+
printCompiledLocalMethodOwnership(options.compiledPath, bestVariation);
|
|
431
428
|
if (maxLoops != null) {
|
|
432
429
|
console.log(chalk.red(` Portable Context did not pass after ${maxAttempts} attempt${maxAttempts === 1 ? "" : "s"} per variation and ${maxLoops} Method-improvement loop${maxLoops === 1 ? "" : "s"}.`));
|
|
433
430
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as p from "@clack/prompts";
|
|
2
2
|
import { detectInterf } from "../../packages/project-model/interf.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { SourcePreparationConfig } from "../../packages/project-model/lib/schema.js";
|
|
4
4
|
import type { CommandModule } from "yargs";
|
|
5
5
|
import { chooseCompiledConfigToBuild, ensureCompiledFromConfig } from "./compiled-flow.js";
|
|
6
6
|
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
@@ -23,11 +23,11 @@ export interface CompileCommandResult {
|
|
|
23
23
|
export declare function runCompileCommand(argv?: Record<string, unknown>, deps?: Partial<CompileCommandDeps>): Promise<CompileCommandResult | null>;
|
|
24
24
|
export declare function resolveInteractiveCompileLoopOverrides(options: {
|
|
25
25
|
compiledPath: string;
|
|
26
|
-
compiledConfig:
|
|
26
|
+
compiledConfig: SourcePreparationConfig | null;
|
|
27
27
|
maxAttemptsOverride: number | null;
|
|
28
28
|
maxLoopsOverride: number | null;
|
|
29
29
|
}): Promise<{
|
|
30
|
-
compiledConfig:
|
|
30
|
+
compiledConfig: SourcePreparationConfig | null;
|
|
31
31
|
maxAttemptsOverride: number | null;
|
|
32
32
|
maxLoopsOverride: number | null;
|
|
33
33
|
} | null>;
|