@interf/compiler 0.7.3 → 0.9.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 +124 -90
- package/TRADEMARKS.md +1 -1
- package/agent-skills/interf-actions/SKILL.md +74 -0
- package/agent-skills/interf-actions/references/cli.md +190 -0
- package/{builtin-workflows/interf → builtin-methods/interf-default}/README.md +9 -9
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/shape/SKILL.md +4 -4
- package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/structure/SKILL.md +1 -1
- package/builtin-methods/interf-default/improve/SKILL.md +18 -0
- package/{builtin-workflows/interf/workflow.json → builtin-methods/interf-default/method.json} +9 -9
- package/{builtin-workflows/interf/workflow.schema.json → builtin-methods/interf-default/method.schema.json} +3 -3
- package/{builtin-workflows/interf → builtin-methods/interf-default}/use/query/SKILL.md +1 -1
- package/dist/cli/commands/check-draft.d.ts +11 -10
- package/dist/cli/commands/check-draft.js +21 -20
- package/dist/cli/commands/compile-controller.d.ts +10 -7
- package/dist/cli/commands/compile-controller.js +84 -79
- package/dist/cli/commands/compile.d.ts +3 -3
- package/dist/cli/commands/compile.js +101 -43
- package/dist/cli/commands/compiled-flow.d.ts +14 -11
- package/dist/cli/commands/compiled-flow.js +38 -33
- package/dist/cli/commands/control-path.d.ts +11 -0
- package/dist/cli/commands/control-path.js +72 -0
- package/dist/cli/commands/create-method-wizard.d.ts +76 -0
- package/dist/cli/commands/create-method-wizard.js +465 -0
- package/dist/cli/commands/create.d.ts +3 -3
- package/dist/cli/commands/create.js +81 -68
- package/dist/cli/commands/default.js +4 -3
- package/dist/cli/commands/doctor.js +5 -5
- package/dist/cli/commands/executor-flow.d.ts +6 -6
- package/dist/cli/commands/executor-flow.js +2 -2
- package/dist/cli/commands/init.d.ts +2 -2
- package/dist/cli/commands/init.js +415 -144
- package/dist/cli/commands/list.js +16 -14
- package/dist/cli/commands/preparation-selection.d.ts +6 -0
- package/dist/cli/commands/preparation-selection.js +11 -0
- package/dist/cli/commands/reset.js +3 -3
- package/dist/cli/commands/source-config-wizard.d.ts +12 -11
- package/dist/cli/commands/source-config-wizard.js +206 -228
- package/dist/cli/commands/status.js +152 -17
- package/dist/cli/commands/test-flow.d.ts +16 -16
- package/dist/cli/commands/test-flow.js +53 -243
- package/dist/cli/commands/test.d.ts +6 -2
- package/dist/cli/commands/test.js +136 -100
- package/dist/cli/commands/verify.js +13 -13
- package/dist/cli/commands/web.d.ts +11 -0
- package/dist/cli/commands/web.js +386 -0
- package/dist/cli/index.d.ts +2 -1
- package/dist/cli/index.js +3 -1
- 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/03~yq9q893hmn.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/06yhdspx~ca5-.js +5 -0
- package/dist/compiler-ui/_next/static/chunks/06z~l3kwb891e.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08g7lvje.te.u.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/08m7vf5asqlsm.js +91 -0
- package/dist/compiler-ui/_next/static/chunks/0_i-3_5l9t2qe.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b-ywny_j0g~0.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0b52v41o1gixx.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0c9mu7yldxyyg.css +3 -0
- package/dist/compiler-ui/_next/static/chunks/0gpzgsv0w.q~m.js +31 -0
- package/dist/compiler-ui/_next/static/chunks/0ilwfezfvu6~-.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0n51hrfoufc7g.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/0xxmf45eskdt~.css +1 -0
- package/dist/compiler-ui/_next/static/chunks/0y5z3t-z1c8ks.js.map +5 -0
- package/dist/compiler-ui/_next/static/chunks/14wtz~vq25~qq.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/15mks7ry_cupt.js +118 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-0.uq1k8c0j4s..js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-10e~t1yzi4svj.js +1 -0
- package/dist/compiler-ui/_next/static/chunks/turbopack-worker-0sjn--fhq~1cg.js +1 -0
- package/dist/compiler-ui/_next/static/media/GeistMono_Variable.p.17jn9btb_52pq.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/Geist_Variable-s.p.0-te~ja_gpvcf.woff2 +0 -0
- package/dist/compiler-ui/_next/static/media/worker.102zas1s52_pf.js +109 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_buildManifest.js +11 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_clientMiddlewareManifest.js +1 -0
- package/dist/compiler-ui/_next/static/pIZnDsV3Je6hdC3cOsGdK/_ssgManifest.js +1 -0
- 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/dist/compiler-ui/index.html +1 -0
- package/dist/compiler-ui/index.txt +20 -0
- package/dist/index.d.ts +11 -7
- package/dist/index.js +8 -4
- 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/execution.js +4 -2
- package/dist/packages/agents/lib/executors.d.ts +14 -13
- package/dist/packages/agents/lib/executors.js +1 -0
- package/dist/packages/agents/lib/preflight.d.ts +1 -0
- package/dist/packages/agents/lib/preflight.js +32 -9
- package/dist/packages/agents/lib/render.d.ts +2 -2
- package/dist/packages/agents/lib/render.js +10 -9
- package/dist/packages/agents/lib/shells.d.ts +27 -34
- package/dist/packages/agents/lib/shells.js +191 -235
- package/dist/packages/agents/lib/types.d.ts +3 -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 +5 -5
- package/dist/packages/compiler/compiled-paths.js +10 -10
- package/dist/packages/compiler/compiled-pipeline.d.ts +18 -12
- package/dist/packages/compiler/compiled-pipeline.js +34 -23
- 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 +11 -11
- package/dist/packages/compiler/compiled-stage-runner.d.ts +10 -5
- package/dist/packages/compiler/compiled-stage-runner.js +56 -8
- 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 +68 -93
- package/dist/packages/compiler/lib/schema.js +57 -89
- 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 +3 -3
- 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 +9 -9
- 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 +12 -9
- package/dist/packages/compiler/runtime-types.d.ts +9 -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 -62
- 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/adapters.d.ts +15 -0
- package/dist/packages/execution/adapters.js +1 -0
- package/dist/packages/execution/events.d.ts +8 -0
- package/dist/packages/execution/events.js +16 -0
- package/dist/packages/execution/index.d.ts +9 -0
- package/dist/packages/execution/index.js +6 -0
- package/dist/packages/execution/lib/schema.d.ts +1551 -0
- package/dist/packages/execution/lib/schema.js +296 -0
- package/dist/packages/local-service/action-values.d.ts +22 -0
- package/dist/packages/local-service/action-values.js +30 -0
- package/dist/packages/local-service/client.d.ts +119 -0
- package/dist/packages/local-service/client.js +356 -0
- package/dist/packages/local-service/index.d.ts +15 -0
- package/dist/packages/local-service/index.js +11 -0
- package/dist/packages/local-service/lib/schema.d.ts +6917 -0
- package/dist/packages/local-service/lib/schema.js +519 -0
- package/dist/packages/local-service/routes.d.ts +27 -0
- package/dist/packages/local-service/routes.js +32 -0
- 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 +130 -0
- package/dist/packages/local-service/runtime.js +2263 -0
- package/dist/packages/local-service/server.d.ts +18 -0
- package/dist/packages/local-service/server.js +577 -0
- 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} +65 -64
- 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 +20 -20
- 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/method-package/interf-method-package.js +496 -0
- 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} +27 -27
- 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} +13 -11
- package/dist/packages/{workflow-package/workflow-stage-runner.js → method-package/method-stage-runner.js} +8 -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 +2 -4
- package/dist/packages/project-model/index.js +1 -3
- package/dist/packages/project-model/interf-detect.d.ts +3 -3
- package/dist/packages/project-model/interf-detect.js +18 -14
- package/dist/packages/project-model/interf-scaffold.d.ts +2 -2
- package/dist/packages/project-model/interf-scaffold.js +40 -38
- 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 +24 -14
- package/dist/packages/project-model/lib/schema.js +22 -30
- 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 +19 -17
- package/dist/packages/project-model/source-config.js +144 -145
- package/dist/packages/project-model/source-folders.d.ts +11 -0
- package/dist/packages/project-model/source-folders.js +110 -0
- 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 +8 -8
- package/dist/packages/testing/test-paths.js +7 -9
- 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 +29 -30
- package/builtin-workflows/interf/improve/SKILL.md +0 -18
- package/dist/cli/commands/create-workflow-wizard.d.ts +0 -70
- package/dist/cli/commands/create-workflow-wizard.js +0 -361
- package/dist/cli/commands/dataset-selection.d.ts +0 -6
- package/dist/cli/commands/dataset-selection.js +0 -11
- 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 +0 -1
- 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 +0 -1
- package/dist/lib/agent-render.d.ts +0 -1
- package/dist/lib/agent-render.js +0 -1
- package/dist/lib/agent-shells.d.ts +0 -1
- package/dist/lib/agent-shells.js +0 -1
- 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 -1
- package/dist/lib/agents.js +0 -1
- package/dist/lib/builtin-compiled-workflow.d.ts +0 -1
- package/dist/lib/builtin-compiled-workflow.js +0 -1
- package/dist/lib/chart-guidance.d.ts +0 -1
- package/dist/lib/chart-guidance.js +0 -1
- package/dist/lib/compiled-compile.d.ts +0 -1
- package/dist/lib/compiled-compile.js +0 -1
- package/dist/lib/compiled-paths.d.ts +0 -1
- package/dist/lib/compiled-paths.js +0 -3
- package/dist/lib/compiled-raw.d.ts +0 -1
- package/dist/lib/compiled-raw.js +0 -3
- package/dist/lib/compiled-reset.d.ts +0 -1
- package/dist/lib/compiled-reset.js +0 -3
- package/dist/lib/compiled-schema.d.ts +0 -1
- package/dist/lib/compiled-schema.js +0 -1
- 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 +0 -3
- package/dist/lib/interf-detect.d.ts +0 -1
- package/dist/lib/interf-detect.js +0 -3
- package/dist/lib/interf-scaffold.d.ts +0 -1
- package/dist/lib/interf-scaffold.js +0 -3
- package/dist/lib/interf-workflow-package.d.ts +0 -1
- package/dist/lib/interf-workflow-package.js +0 -1
- package/dist/lib/interf.d.ts +0 -1
- package/dist/lib/interf.js +0 -3
- package/dist/lib/local-workflows.d.ts +0 -1
- package/dist/lib/local-workflows.js +0 -1
- package/dist/lib/logger.d.ts +0 -1
- package/dist/lib/logger.js +0 -1
- package/dist/lib/package-root.d.ts +0 -1
- package/dist/lib/package-root.js +0 -1
- package/dist/lib/parse.d.ts +0 -1
- package/dist/lib/parse.js +0 -1
- package/dist/lib/project-paths.d.ts +0 -1
- package/dist/lib/project-paths.js +0 -3
- package/dist/lib/runtime-acceptance.d.ts +0 -1
- package/dist/lib/runtime-acceptance.js +0 -1
- package/dist/lib/runtime-contracts.d.ts +0 -1
- package/dist/lib/runtime-contracts.js +0 -1
- package/dist/lib/runtime-inventory.d.ts +0 -1
- package/dist/lib/runtime-inventory.js +0 -1
- package/dist/lib/runtime-paths.d.ts +0 -1
- package/dist/lib/runtime-paths.js +0 -1
- package/dist/lib/runtime-prompt.d.ts +0 -1
- package/dist/lib/runtime-prompt.js +0 -1
- package/dist/lib/runtime-reconcile.d.ts +0 -1
- package/dist/lib/runtime-reconcile.js +0 -1
- package/dist/lib/runtime-runs.d.ts +0 -1
- package/dist/lib/runtime-runs.js +0 -1
- 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 +0 -4
- package/dist/lib/schema.js +0 -6
- package/dist/lib/source-config.d.ts +0 -1
- package/dist/lib/source-config.js +0 -3
- 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 +0 -1
- package/dist/lib/state-io.d.ts +0 -1
- package/dist/lib/state-io.js +0 -1
- package/dist/lib/state-paths.d.ts +0 -1
- package/dist/lib/state-paths.js +0 -1
- package/dist/lib/state-view.d.ts +0 -1
- package/dist/lib/state-view.js +0 -1
- package/dist/lib/state.d.ts +0 -1
- package/dist/lib/state.js +0 -1
- package/dist/lib/test-execution.d.ts +0 -1
- package/dist/lib/test-execution.js +0 -3
- package/dist/lib/test-matrices.d.ts +0 -1
- package/dist/lib/test-matrices.js +0 -3
- package/dist/lib/test-paths.d.ts +0 -1
- package/dist/lib/test-paths.js +0 -3
- package/dist/lib/test-profile-presets.d.ts +0 -1
- package/dist/lib/test-profile-presets.js +0 -3
- package/dist/lib/test-sandbox.d.ts +0 -1
- package/dist/lib/test-sandbox.js +0 -3
- package/dist/lib/test-specs.d.ts +0 -1
- package/dist/lib/test-specs.js +0 -3
- package/dist/lib/test-targets.d.ts +0 -1
- package/dist/lib/test-targets.js +0 -3
- package/dist/lib/test-types.d.ts +0 -1
- package/dist/lib/test-types.js +0 -3
- package/dist/lib/test.d.ts +0 -1
- package/dist/lib/test.js +0 -3
- package/dist/lib/util.d.ts +0 -1
- package/dist/lib/util.js +0 -1
- package/dist/lib/validate-compiled.d.ts +0 -1
- package/dist/lib/validate-compiled.js +0 -1
- package/dist/lib/validate-helpers.d.ts +0 -1
- package/dist/lib/validate-helpers.js +0 -1
- package/dist/lib/validate.d.ts +0 -1
- package/dist/lib/validate.js +0 -1
- package/dist/lib/workflow-authoring.d.ts +0 -1
- package/dist/lib/workflow-authoring.js +0 -1
- package/dist/lib/workflow-definitions.d.ts +0 -1
- package/dist/lib/workflow-definitions.js +0 -1
- package/dist/lib/workflow-edit-session.d.ts +0 -1
- package/dist/lib/workflow-edit-session.js +0 -1
- package/dist/lib/workflow-edit-utils.d.ts +0 -1
- package/dist/lib/workflow-edit-utils.js +0 -1
- package/dist/lib/workflow-helpers.d.ts +0 -1
- package/dist/lib/workflow-helpers.js +0 -1
- package/dist/lib/workflow-improvement.d.ts +0 -1
- package/dist/lib/workflow-improvement.js +0 -1
- package/dist/lib/workflow-primitives.d.ts +0 -1
- package/dist/lib/workflow-primitives.js +0 -1
- package/dist/lib/workflow-review-paths.d.ts +0 -1
- package/dist/lib/workflow-review-paths.js +0 -1
- package/dist/lib/workflow-stage-policy.d.ts +0 -1
- package/dist/lib/workflow-stage-policy.js +0 -1
- package/dist/lib/workflow-stage-runner.d.ts +0 -1
- package/dist/lib/workflow-stage-runner.js +0 -1
- package/dist/lib/workflows.d.ts +0 -1
- package/dist/lib/workflows.js +0 -1
- 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 -26
- package/dist/packages/workflow-authoring/workflow-authoring.js +0 -123
- package/dist/packages/workflow-authoring/workflow-edit-session.d.ts +0 -16
- package/dist/packages/workflow-authoring/workflow-edit-session.js +0 -60
- 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 -25
- package/dist/packages/workflow-package/interf-workflow-package.js +0 -389
- package/dist/packages/workflow-package/local-workflows.d.ts +0 -64
- package/dist/packages/workflow-package/local-workflows.js +0 -441
- package/dist/packages/workflow-package/workflow-definitions.d.ts +0 -82
- package/dist/packages/workflow-package/workflow-definitions.js +0 -210
- package/dist/packages/workflow-package/workflow-review-paths.d.ts +0 -10
- /package/{builtin-workflows/interf → builtin-methods/interf-default}/compile/stages/summarize/SKILL.md +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
|
@@ -3,12 +3,12 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { basename, dirname, join, relative } from "node:path";
|
|
4
4
|
import { CHART_APPROXIMATION_NOTES } from "./chart-guidance.js";
|
|
5
5
|
import { projectRawSnapshot } from "../../compiler/raw-snapshot.js";
|
|
6
|
-
import {
|
|
7
|
-
import { CONTEXT_INTERFACE_FILE as
|
|
8
|
-
import { stageExecutionShellsRoot,
|
|
6
|
+
import { METHOD_PACKAGE_DIR } from "../../project-model/interf-detect.js";
|
|
7
|
+
import { CONTEXT_INTERFACE_FILE as METHOD_SCHEMA_FILE, contextInterfaceZoneAbsolutePath as compiledZoneAbsolutePath, readContextInterface as readCompiledSchemaFile, resolveContextInterfacePath as resolveMethodSchemaPath, } from "../../method-package/context-interface.js";
|
|
8
|
+
import { stageExecutionShellsRoot, methodImprovementLoopRoot, methodPackagePathForCompiled, compiledInterfConfigPath, compiledRuntimeRoot, } from "../../compiler/compiled-paths.js";
|
|
9
9
|
import { ensureCompiledZoneTargets } from "../../compiler/compiled-schema.js";
|
|
10
10
|
import { listFilesRecursive } from "../../shared/filesystem.js";
|
|
11
|
-
import {
|
|
11
|
+
import { resolveMethodImprovementReviewSourcePaths } from "../../method-package/method-review-paths.js";
|
|
12
12
|
const LOCAL_SKILL_ROOTS = [
|
|
13
13
|
".claude/skills",
|
|
14
14
|
".codex/skills",
|
|
@@ -24,19 +24,19 @@ export function writeNativeAgentSurface(rootPath, agentsContent, skillName, skil
|
|
|
24
24
|
return changed;
|
|
25
25
|
}
|
|
26
26
|
function compiledQuerySkillSourcePath(compiledPath) {
|
|
27
|
-
return join(
|
|
27
|
+
return join(methodPackagePathForCompiled(compiledPath), "use", "query", "SKILL.md");
|
|
28
28
|
}
|
|
29
29
|
function compiledZoneSummaryLines(compiledPath) {
|
|
30
|
-
const schema = readCompiledSchemaFile(
|
|
30
|
+
const schema = readCompiledSchemaFile(methodPackagePathForCompiled(compiledPath));
|
|
31
31
|
if (!schema)
|
|
32
|
-
return ["- No
|
|
32
|
+
return ["- No Method schema is available yet."];
|
|
33
33
|
return schema.zones
|
|
34
34
|
.filter((zone) => zone.kind !== "runtime")
|
|
35
35
|
.map((zone) => `- \`${zone.id}\` -> \`${zone.path}\` (${zone.role} ${zone.kind})`);
|
|
36
36
|
}
|
|
37
|
-
export function renderCompiledAgents(compiledPath, name,
|
|
38
|
-
const
|
|
39
|
-
const
|
|
37
|
+
export function renderCompiledAgents(compiledPath, name, methodId, about, options = {}) {
|
|
38
|
+
const methodOriginSelected = options.methodOriginSelected ?? methodId;
|
|
39
|
+
const methodLocalDraft = options.methodLocalDraft === true;
|
|
40
40
|
const zoneLines = compiledZoneSummaryLines(compiledPath);
|
|
41
41
|
return [
|
|
42
42
|
`# ${name}`,
|
|
@@ -53,36 +53,36 @@ export function renderCompiledAgents(compiledPath, name, workflowId, about, opti
|
|
|
53
53
|
"## How to use this portable context",
|
|
54
54
|
"",
|
|
55
55
|
"1. Use the local native `interf-query` skill that Interf generated for this portable context.",
|
|
56
|
-
"2. Let the
|
|
56
|
+
"2. Let the Method docs and declared output zones guide retrieval instead of assuming a fixed note layout.",
|
|
57
57
|
"3. Use `raw/` when you need direct quotes, exact chart values, table lookups, or verification.",
|
|
58
58
|
"",
|
|
59
59
|
"## How this portable context works",
|
|
60
60
|
"",
|
|
61
|
-
"- The
|
|
62
|
-
"- `.interf/interf.json` points to the local `raw/` snapshot via `source.path` and back to the
|
|
63
|
-
`-
|
|
64
|
-
...(
|
|
65
|
-
? ["- This portable context now carries a local
|
|
61
|
+
"- The Method package defines the context interface this portable context implements on disk.",
|
|
62
|
+
"- `.interf/interf.json` points to the local `raw/` snapshot via `source.path` and back to the Interf Workspace via `source.control_path`.",
|
|
63
|
+
`- Method seed: \`${methodOriginSelected}\`.`,
|
|
64
|
+
...(methodLocalDraft
|
|
65
|
+
? ["- This portable context now carries a local Method draft improved from that seed. Recompiling this portable context reuses the local `.interf/method/` package."]
|
|
66
66
|
: []),
|
|
67
|
-
`- Active local
|
|
68
|
-
"- `.interf/
|
|
69
|
-
`- \`.interf/
|
|
70
|
-
"- `.interf/
|
|
71
|
-
"- `.interf/
|
|
72
|
-
"- `.interf/
|
|
67
|
+
`- Active local Method id: \`${methodId}\`.`,
|
|
68
|
+
"- `.interf/method/` is the local editable Method package for this portable context.",
|
|
69
|
+
`- \`.interf/method/${METHOD_SCHEMA_FILE}\` is the deterministic context interface for this portable context.`,
|
|
70
|
+
"- `.interf/method/improve/` is the editable source for Method-improvement loops.",
|
|
71
|
+
"- `.interf/method/use/query/` is the editable source for the generated native query shell.",
|
|
72
|
+
"- `.interf/method/compile/stages/` defines stage-specific docs that Interf projects into native execution shells for automated runs.",
|
|
73
73
|
"- Native local query skills are generated under local agent skill directories such as `.claude/skills/` and `.codex/skills/`.",
|
|
74
74
|
"- `raw/` contains the local raw snapshot used for evidence and verification.",
|
|
75
|
-
`-
|
|
75
|
+
`- Method zones are declared in \`.interf/method/${METHOD_SCHEMA_FILE}\`.`,
|
|
76
76
|
...zoneLines,
|
|
77
77
|
"- `.interf/runtime/` holds runtime artifacts written by Interf.",
|
|
78
|
-
"- `.interf/tests/` mirrors the latest saved
|
|
78
|
+
"- `.interf/tests/` mirrors the latest saved readiness-check run and keeps detailed target runs plus preserved sandboxes.",
|
|
79
79
|
"- `.interf/tests/targets/` holds detailed raw and compiled target runs plus preserved test sandboxes.",
|
|
80
80
|
"",
|
|
81
81
|
"## Manual query rules",
|
|
82
82
|
"",
|
|
83
|
-
"- Prefer the
|
|
84
|
-
"- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/
|
|
85
|
-
"- Treat `.interf/` as method/runtime metadata, not answer evidence, unless explicitly asked to inspect
|
|
83
|
+
"- Prefer the Method-declared context outputs before `raw/`.",
|
|
84
|
+
"- Use the generated native `interf-query` skill for manual querying. The editable source lives at `.interf/method/use/query/SKILL.md`.",
|
|
85
|
+
"- Treat `.interf/` as method/runtime metadata, not answer evidence, unless explicitly asked to inspect Method or test history.",
|
|
86
86
|
"- Use `raw/` for quotes, verification, ambiguity, or evidence the portable context does not expose well.",
|
|
87
87
|
"- If exact chart, table, or image-derived evidence matters, inspect the raw source and say whether the answer was text-derived, table-derived, or chart-derived.",
|
|
88
88
|
"",
|
|
@@ -91,8 +91,8 @@ export function renderCompiledAgents(compiledPath, name, workflowId, about, opti
|
|
|
91
91
|
"```",
|
|
92
92
|
"interf compile build this portable context",
|
|
93
93
|
"interf test run checks against this portable context",
|
|
94
|
-
"interf verify stage <id> verify one
|
|
95
|
-
"interf verify
|
|
94
|
+
"interf verify stage <id> verify one Method stage",
|
|
95
|
+
"interf verify portable-context verify the full portable context output",
|
|
96
96
|
"interf status show deterministic health",
|
|
97
97
|
"```",
|
|
98
98
|
"",
|
|
@@ -111,16 +111,16 @@ export function renderCompiledQuerySkill() {
|
|
|
111
111
|
"This file is the editable authoring source for the generated native local `interf-query` skill.",
|
|
112
112
|
"",
|
|
113
113
|
"Default loop:",
|
|
114
|
-
"1. Read
|
|
115
|
-
`2. Use the
|
|
114
|
+
"1. Read `.interf/method/README.md` and this file first.",
|
|
115
|
+
`2. Use the Method zones declared in \`.interf/method/${METHOD_SCHEMA_FILE}\` before consulting \`raw/\`.`,
|
|
116
116
|
"3. Use `raw/` for direct quotes, verification, exact lookups, and cases where the portable context is missing the needed evidence or is ambiguous.",
|
|
117
117
|
"",
|
|
118
118
|
"Answering rule:",
|
|
119
119
|
"- do not modify files under `raw/`",
|
|
120
|
-
"- treat the
|
|
120
|
+
"- treat the Method as the portable-context contract and use its zones as the working retrieval surface",
|
|
121
121
|
"- say explicitly when an answer depends on approximation, bounded inference, or a raw-source re-check",
|
|
122
122
|
"- use `raw/` to confirm source page, metric family, provenance, or exact wording when the portable context is missing the needed evidence or is ambiguous",
|
|
123
|
-
"- do not invent navigation or note structure beyond what this
|
|
123
|
+
"- do not invent navigation or note structure beyond what this Method declares",
|
|
124
124
|
"- when the portable context is insufficient, verify in `raw/` and then answer",
|
|
125
125
|
"",
|
|
126
126
|
"You can edit this file to bias manual question-answering behavior for this portable context.",
|
|
@@ -133,7 +133,7 @@ function renderRawTestAgents() {
|
|
|
133
133
|
"# Raw Test Shell",
|
|
134
134
|
"",
|
|
135
135
|
"This is an isolated raw-files test shell generated by Interf.",
|
|
136
|
-
"There is no
|
|
136
|
+
"There is no portable context in this shell.",
|
|
137
137
|
"",
|
|
138
138
|
"## How to use this shell",
|
|
139
139
|
"",
|
|
@@ -144,7 +144,7 @@ function renderRawTestAgents() {
|
|
|
144
144
|
"## Rules",
|
|
145
145
|
"",
|
|
146
146
|
"- Answer only from the files under `raw/`.",
|
|
147
|
-
"- There is no
|
|
147
|
+
"- There is no portable context here, so do not assume any portable-context output zones exist.",
|
|
148
148
|
"- Do not treat hidden runtime files or test artifacts as evidence.",
|
|
149
149
|
...chartNotes,
|
|
150
150
|
"- Write the requested answer and trace files, then stop.",
|
|
@@ -158,7 +158,7 @@ function renderRawTestQuerySkill() {
|
|
|
158
158
|
"name: interf-query",
|
|
159
159
|
"description: >",
|
|
160
160
|
" Native local query skill for an Interf raw test shell. Use it only",
|
|
161
|
-
" to answer
|
|
161
|
+
" to answer source-files readiness checks directly from `raw/`.",
|
|
162
162
|
"---",
|
|
163
163
|
"",
|
|
164
164
|
"# Interf Raw Test Query",
|
|
@@ -169,19 +169,19 @@ function renderRawTestQuerySkill() {
|
|
|
169
169
|
"1. Read `raw/` directly.",
|
|
170
170
|
"2. Verify exact claims against the raw files before answering strongly.",
|
|
171
171
|
...chartNotes,
|
|
172
|
-
"8. Do not rely on
|
|
172
|
+
"8. Do not rely on portable-context artifacts because they do not exist in this shell.",
|
|
173
173
|
"",
|
|
174
174
|
].join("\n");
|
|
175
175
|
}
|
|
176
176
|
function readCompiledQuerySkillSource(compiledPath) {
|
|
177
177
|
const filePath = compiledQuerySkillSourcePath(compiledPath);
|
|
178
178
|
if (!existsSync(filePath)) {
|
|
179
|
-
throw new Error(`Missing compiled query skill source at ${filePath}. Interf compile runs the local
|
|
179
|
+
throw new Error(`Missing compiled query skill source at ${filePath}. Interf compile runs the local Method package directly, so reseed or repair this portable context instead of auto-healing query docs.`);
|
|
180
180
|
}
|
|
181
181
|
return readFileSync(filePath, "utf8").trim();
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
return join(shellRoot,
|
|
183
|
+
function stageShellMethodRoot(shellRoot) {
|
|
184
|
+
return join(shellRoot, METHOD_PACKAGE_DIR);
|
|
185
185
|
}
|
|
186
186
|
function shellInputZonePath(shellRoot, zoneId) {
|
|
187
187
|
return join(shellRoot, "inputs", zoneId);
|
|
@@ -230,10 +230,10 @@ function linkRelativePath(targetPath, linkPathname) {
|
|
|
230
230
|
symlinkSync(relative(dirname(linkPathname), targetPath), linkPathname);
|
|
231
231
|
}
|
|
232
232
|
function loadCompiledSchema(compiledPath) {
|
|
233
|
-
const
|
|
234
|
-
const schema = readCompiledSchemaFile(
|
|
233
|
+
const methodRoot = methodPackagePathForCompiled(compiledPath);
|
|
234
|
+
const schema = readCompiledSchemaFile(methodRoot);
|
|
235
235
|
if (!schema) {
|
|
236
|
-
throw new Error(`Missing
|
|
236
|
+
throw new Error(`Missing Method schema at ${join(methodRoot, METHOD_SCHEMA_FILE)}`);
|
|
237
237
|
}
|
|
238
238
|
return schema;
|
|
239
239
|
}
|
|
@@ -243,7 +243,7 @@ function zoneMap(schema) {
|
|
|
243
243
|
function zoneOrThrow(zones, zoneId) {
|
|
244
244
|
const zone = zones.get(zoneId);
|
|
245
245
|
if (!zone) {
|
|
246
|
-
throw new Error(`Missing
|
|
246
|
+
throw new Error(`Missing Method schema zone "${zoneId}" for stage shell projection.`);
|
|
247
247
|
}
|
|
248
248
|
return zone;
|
|
249
249
|
}
|
|
@@ -298,21 +298,21 @@ function ensureShellLocalProjection(sourcePath, targetPath, zone) {
|
|
|
298
298
|
}
|
|
299
299
|
function ensureCompiledExecutionSurface(compiledPath) {
|
|
300
300
|
mkdirSync(compiledRuntimeRoot(compiledPath), { recursive: true });
|
|
301
|
-
mkdirSync(
|
|
301
|
+
mkdirSync(methodPackagePathForCompiled(compiledPath), { recursive: true });
|
|
302
302
|
const schema = loadCompiledSchema(compiledPath);
|
|
303
303
|
ensureCompiledZoneTargets(compiledPath, schema);
|
|
304
304
|
return schema;
|
|
305
305
|
}
|
|
306
306
|
function readStageMethodDoc(compiledPath, stage) {
|
|
307
|
-
const path = join(
|
|
307
|
+
const path = join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir, "SKILL.md");
|
|
308
308
|
if (!existsSync(path))
|
|
309
309
|
return null;
|
|
310
310
|
return readFileSync(path, "utf8").trim();
|
|
311
311
|
}
|
|
312
|
-
function
|
|
313
|
-
return join(
|
|
312
|
+
function stageMethodDocsPath(compiledPath, stage) {
|
|
313
|
+
return join(methodPackagePathForCompiled(compiledPath), "compile", "stages", stage.skillDir);
|
|
314
314
|
}
|
|
315
|
-
function renderStageExecutionAgents(compiledName,
|
|
315
|
+
function renderStageExecutionAgents(compiledName, methodId, stage) {
|
|
316
316
|
return [
|
|
317
317
|
`# ${compiledName} — ${stage.label} Execution Shell`,
|
|
318
318
|
"",
|
|
@@ -331,16 +331,16 @@ function renderStageExecutionAgents(compiledName, workflowId, stage) {
|
|
|
331
331
|
"- `inputs/<zone-id>/` = read mounts for the current stage.",
|
|
332
332
|
"- `outputs/<zone-id>/` = write mounts for the current stage.",
|
|
333
333
|
"- For file zones, `runtime/paths.json` points to the exact file path inside those mount roots.",
|
|
334
|
-
"- declared compiled zone paths are also projected at the shell root so
|
|
334
|
+
"- declared compiled zone paths are also projected at the shell root so Method-relative contract paths stay valid.",
|
|
335
335
|
"- `runtime/` = stage contract and machine-readable path map for this shell.",
|
|
336
|
-
"- `
|
|
336
|
+
"- `method/` = Method metadata, `method.schema.json`, and docs for the current stage only.",
|
|
337
337
|
"",
|
|
338
338
|
"## Boundaries",
|
|
339
339
|
"",
|
|
340
|
-
`-
|
|
340
|
+
`- Method: \`${methodId}\`.`,
|
|
341
341
|
`- Contract type: \`${stage.contractType}\`.`,
|
|
342
|
-
"- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the
|
|
343
|
-
"- The
|
|
342
|
+
"- This shell has its own AGENTS/CLAUDE/native skills. It does not inherit the portable-context query shell.",
|
|
343
|
+
"- The portable context root itself is not linked into this shell.",
|
|
344
344
|
"- Do not switch into query mode or act like a user-facing assistant.",
|
|
345
345
|
"- Do not modify files under `inputs/` unless the same zone is also mounted under `outputs/`.",
|
|
346
346
|
"",
|
|
@@ -381,7 +381,7 @@ function renderStageExecutionSkill(stage, stageMethodDoc) {
|
|
|
381
381
|
`- contract type: \`${stage.contractType}\``,
|
|
382
382
|
`- reads: ${stage.reads.join(", ")}`,
|
|
383
383
|
`- writes: ${stage.writes.join(", ")}`,
|
|
384
|
-
`- editable source: \`
|
|
384
|
+
`- editable source: \`method/compile/stages/${stage.skillDir}/SKILL.md\``,
|
|
385
385
|
"",
|
|
386
386
|
...(stageMethodDoc
|
|
387
387
|
? [
|
|
@@ -399,38 +399,38 @@ function renderCompiledQueryNativeSkill(querySkillContent) {
|
|
|
399
399
|
"name: interf-query",
|
|
400
400
|
"description: >",
|
|
401
401
|
" Native local query skill for this portable context built by Interf.",
|
|
402
|
-
" Use it for manual questions against the portable context and raw
|
|
402
|
+
" Use it for manual questions against the portable context and source files under raw/.",
|
|
403
403
|
"---",
|
|
404
404
|
"",
|
|
405
405
|
"# Interf Query",
|
|
406
406
|
"",
|
|
407
407
|
"This is the native local query skill for portable context built by Interf.",
|
|
408
408
|
"Use it when reading this portable context manually.",
|
|
409
|
-
"Editable source: `.interf/
|
|
409
|
+
"Editable source: `.interf/method/use/query/SKILL.md`.",
|
|
410
410
|
"",
|
|
411
411
|
querySkillContent.trim(),
|
|
412
412
|
"",
|
|
413
413
|
].join("\n");
|
|
414
414
|
}
|
|
415
|
-
function
|
|
416
|
-
const
|
|
417
|
-
mkdirSync(join(
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
if (existsSync(
|
|
421
|
-
linkPath(
|
|
415
|
+
function projectMethodMetadata(compiledPath, shellRoot, stage) {
|
|
416
|
+
const shellMethodRoot = stageShellMethodRoot(shellRoot);
|
|
417
|
+
mkdirSync(join(shellMethodRoot, "compile", "stages"), { recursive: true });
|
|
418
|
+
const compiledMethodRoot = methodPackagePathForCompiled(compiledPath);
|
|
419
|
+
const methodJsonPath = join(compiledMethodRoot, "method.json");
|
|
420
|
+
if (existsSync(methodJsonPath)) {
|
|
421
|
+
linkPath(methodJsonPath, join(shellMethodRoot, "method.json"));
|
|
422
422
|
}
|
|
423
|
-
const compiledSchemaPath =
|
|
423
|
+
const compiledSchemaPath = resolveMethodSchemaPath(compiledMethodRoot);
|
|
424
424
|
if (compiledSchemaPath) {
|
|
425
|
-
linkPath(compiledSchemaPath, join(
|
|
425
|
+
linkPath(compiledSchemaPath, join(shellMethodRoot, METHOD_SCHEMA_FILE));
|
|
426
426
|
}
|
|
427
|
-
const readmePath = join(
|
|
427
|
+
const readmePath = join(compiledMethodRoot, "README.md");
|
|
428
428
|
if (existsSync(readmePath)) {
|
|
429
|
-
linkPath(readmePath, join(
|
|
429
|
+
linkPath(readmePath, join(shellMethodRoot, "README.md"));
|
|
430
430
|
}
|
|
431
|
-
const stageDocsPath =
|
|
431
|
+
const stageDocsPath = stageMethodDocsPath(compiledPath, stage);
|
|
432
432
|
if (existsSync(stageDocsPath)) {
|
|
433
|
-
linkPath(stageDocsPath, join(
|
|
433
|
+
linkPath(stageDocsPath, join(shellMethodRoot, "compile", "stages", stage.skillDir));
|
|
434
434
|
}
|
|
435
435
|
}
|
|
436
436
|
function projectCompiledSchemaZones(compiledPath, shellRoot, schema, zoneIds, materializedZoneIds) {
|
|
@@ -481,11 +481,11 @@ function projectStageZoneMountAliases(shellRoot, stage, schema) {
|
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
function writeExecutionShellPathsFile(shellRoot,
|
|
484
|
+
function writeExecutionShellPathsFile(shellRoot, methodId, stage, mounts) {
|
|
485
485
|
const paths = {
|
|
486
486
|
kind: "interf-execution-shell",
|
|
487
487
|
version: 1,
|
|
488
|
-
|
|
488
|
+
method: methodId,
|
|
489
489
|
stage: stage.id,
|
|
490
490
|
reads: mounts.reads,
|
|
491
491
|
writes: mounts.writes,
|
|
@@ -655,135 +655,103 @@ function freezePreservedShell(rootPath, shellType) {
|
|
|
655
655
|
}
|
|
656
656
|
export function renderClaudeBootstrap(content) {
|
|
657
657
|
return [
|
|
658
|
-
"<!-- Generated
|
|
658
|
+
"<!-- Generated mirror of AGENTS.md. Interf may rewrite this file. -->",
|
|
659
659
|
"",
|
|
660
660
|
content.trimEnd(),
|
|
661
661
|
"",
|
|
662
662
|
].join("\n");
|
|
663
663
|
}
|
|
664
|
-
function
|
|
664
|
+
function renderMethodAuthoringAgents(options) {
|
|
665
665
|
return [
|
|
666
|
-
`# ${options.label} —
|
|
666
|
+
`# ${options.label} — Method Authoring Shell`,
|
|
667
667
|
"",
|
|
668
|
-
"This is an automated
|
|
669
|
-
"It exists to create
|
|
668
|
+
"This is an automated Method-authoring shell generated by Interf.",
|
|
669
|
+
"It exists to create one standalone Method package from the source data, desired portable-context outputs, and proof requirements in this task.",
|
|
670
670
|
"",
|
|
671
671
|
"## Start Here",
|
|
672
672
|
"",
|
|
673
673
|
"1. Read `runtime/authoring-context.json` now.",
|
|
674
|
-
`2. Read \`
|
|
675
|
-
"3. Review `artifacts/source-
|
|
676
|
-
"4. Use the local native `interf-
|
|
674
|
+
`2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
|
|
675
|
+
"3. Review `artifacts/source-folder/raw/`.",
|
|
676
|
+
"4. Use the local native `interf-method-author` skill now.",
|
|
677
677
|
"",
|
|
678
678
|
"## Boundaries",
|
|
679
679
|
"",
|
|
680
|
-
`- New
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
"-
|
|
680
|
+
`- New Method package id: \`${options.methodId}\`.`,
|
|
681
|
+
"- Authoring mode: from scratch.",
|
|
682
|
+
...(options.referenceMethodId
|
|
683
|
+
? [`- Reference Method package id: \`${options.referenceMethodId}\` (context only, not a seed).`]
|
|
684
|
+
: []),
|
|
685
|
+
"- Edit only files under `method/`.",
|
|
686
|
+
"- Do not edit source artifacts.",
|
|
687
|
+
"- Keep the Method package valid for the current compiler API and `method.schema.json`.",
|
|
688
|
+
"- Use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids. Never use underscores.",
|
|
689
|
+
"- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
|
|
690
|
+
"- For file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`.",
|
|
686
691
|
"- Prefer direct file-reading and search tools over shell commands for routine file inspection.",
|
|
687
692
|
"- Do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files.",
|
|
688
693
|
"",
|
|
689
694
|
"## Goal",
|
|
690
695
|
"",
|
|
691
|
-
"- produce one standalone
|
|
696
|
+
"- produce one standalone Method package tuned to the source data, desired outputs, and checks in this task",
|
|
697
|
+
"- replace the neutral scaffold topology with the stage graph this agent work needs",
|
|
692
698
|
"- define output zones and stage proof so Interf can show whether the data is ready",
|
|
693
699
|
"- preserve deterministic stage and context-interface contracts",
|
|
694
|
-
"- stop once the
|
|
700
|
+
"- stop once the Method edits are complete",
|
|
695
701
|
"",
|
|
696
702
|
].join("\n");
|
|
697
703
|
}
|
|
698
|
-
function
|
|
704
|
+
function renderMethodAuthoringSkill() {
|
|
699
705
|
return [
|
|
700
706
|
"---",
|
|
701
|
-
"name: interf-
|
|
707
|
+
"name: interf-method-author",
|
|
702
708
|
"description: >",
|
|
703
|
-
" Native local
|
|
709
|
+
" Native local Method-authoring skill for an automated Interf Method draft run.",
|
|
704
710
|
"---",
|
|
705
711
|
"",
|
|
706
|
-
"# Interf
|
|
712
|
+
"# Interf Method Authoring",
|
|
707
713
|
"",
|
|
708
714
|
"Read `runtime/authoring-context.json` first.",
|
|
709
|
-
"Then review the
|
|
715
|
+
"Then review the neutral Method package scaffold under `method/` and the raw snapshot under `artifacts/source-folder/raw/`.",
|
|
710
716
|
"",
|
|
711
717
|
"Rules:",
|
|
712
|
-
"- edit only `
|
|
713
|
-
`- keep \`
|
|
718
|
+
"- edit only `method/`",
|
|
719
|
+
`- keep \`method.json\`, \`${METHOD_SCHEMA_FILE}\`, and any changed stage docs aligned`,
|
|
714
720
|
"- use `zone_counts_at_least` for numeric fixed minimums; use `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`",
|
|
715
|
-
"-
|
|
716
|
-
"-
|
|
717
|
-
"-
|
|
721
|
+
"- for file output zones that replace scaffold files, add `artifacts_must_not_contain` entries that reject `Not yet compiled.` placeholder text; its keys must be artifact paths like `home.md`, not zone ids like `home`",
|
|
722
|
+
"- design the stage graph from the source data and preparation-and-evidence brief",
|
|
723
|
+
"- use kebab-case ids everywhere: stage ids, skill_dir values, zone ids, reads/writes values, and package ids; never use underscores",
|
|
724
|
+
"- replace the placeholder `prepare` stage unless that exact stage is truly the final method",
|
|
725
|
+
"- keep the package standalone; do not introduce runtime inheritance or hidden source-package assumptions",
|
|
726
|
+
"- do not introduce wikilinks unless the Method also creates the target note by exact basename or explicit relative path",
|
|
718
727
|
"- respect stage boundaries: do not make structure outputs link to notes or entrypoints first created by later stages",
|
|
719
728
|
"- prefer conservative routing changes over speculative note sprawl",
|
|
720
729
|
"- prefer direct file-reading and search tools over shell commands for routine file inspection",
|
|
721
730
|
"- do not use shell helpers like `cat`, `sed`, `ls`, or `find` when a native read/search tool can inspect the same files",
|
|
722
|
-
"- do not hardcode
|
|
723
|
-
"- do not edit
|
|
731
|
+
"- do not hardcode readiness-check answers into Method docs",
|
|
732
|
+
"- do not edit source artifacts",
|
|
724
733
|
"",
|
|
725
734
|
].join("\n");
|
|
726
735
|
}
|
|
727
|
-
function
|
|
728
|
-
|
|
729
|
-
return;
|
|
730
|
-
mkdirSync(dirname(targetPath), { recursive: true });
|
|
731
|
-
cpSync(sourcePath, targetPath, {
|
|
732
|
-
recursive: true,
|
|
733
|
-
force: true,
|
|
734
|
-
errorOnExist: false,
|
|
735
|
-
preserveTimestamps: true,
|
|
736
|
-
});
|
|
737
|
-
}
|
|
738
|
-
function projectCompiledPreviewSnapshot(previewCompiledPath, shellRoot) {
|
|
739
|
-
const previewRoot = join(shellRoot, "artifacts", "preview-compiled");
|
|
740
|
-
mkdirSync(previewRoot, { recursive: true });
|
|
741
|
-
authoringCopyIfExists(join(previewCompiledPath, "AGENTS.md"), join(previewRoot, "AGENTS.md"));
|
|
742
|
-
authoringCopyIfExists(join(previewCompiledPath, "CLAUDE.md"), join(previewRoot, "CLAUDE.md"));
|
|
743
|
-
const schema = readCompiledSchemaFile(workflowPackagePathForCompiled(previewCompiledPath));
|
|
744
|
-
for (const zone of schema?.zones ?? []) {
|
|
745
|
-
if (zone.kind === "runtime" || zone.role === "input")
|
|
746
|
-
continue;
|
|
747
|
-
const absolutePath = compiledZoneAbsolutePath(previewCompiledPath, zone);
|
|
748
|
-
if (!existsSync(absolutePath))
|
|
749
|
-
continue;
|
|
750
|
-
authoringCopyIfExists(absolutePath, join(previewRoot, zone.path));
|
|
751
|
-
}
|
|
736
|
+
function improvementMethodDocsPath(compiledPath) {
|
|
737
|
+
return join(methodPackagePathForCompiled(compiledPath), "improve");
|
|
752
738
|
}
|
|
753
|
-
function
|
|
754
|
-
const
|
|
755
|
-
mkdirSync(targetRoot, { recursive: true });
|
|
756
|
-
const runtimeRoot = compiledRuntimeRoot(previewCompiledPath);
|
|
757
|
-
for (const artifactName of [
|
|
758
|
-
"run.json",
|
|
759
|
-
"state.json",
|
|
760
|
-
"health.json",
|
|
761
|
-
"view-spec.json",
|
|
762
|
-
"raw-snapshot.json",
|
|
763
|
-
"execution-shells",
|
|
764
|
-
"logs",
|
|
765
|
-
]) {
|
|
766
|
-
authoringCopyIfExists(join(runtimeRoot, artifactName), join(targetRoot, artifactName));
|
|
767
|
-
}
|
|
768
|
-
}
|
|
769
|
-
function improvementWorkflowDocsPath(compiledPath) {
|
|
770
|
-
return join(workflowPackagePathForCompiled(compiledPath), "improve");
|
|
771
|
-
}
|
|
772
|
-
export function createWorkflowAuthoringShell(options) {
|
|
773
|
-
const shellRoot = mkdtempSync(join(tmpdir(), `interf-workflow-author-${options.workflowId}-`));
|
|
739
|
+
export function createMethodAuthoringShell(options) {
|
|
740
|
+
const shellRoot = mkdtempSync(join(tmpdir(), `interf-method-author-${options.methodId}-`));
|
|
774
741
|
mkdirSync(join(shellRoot, "runtime"), { recursive: true });
|
|
775
742
|
mkdirSync(join(shellRoot, "artifacts"), { recursive: true });
|
|
776
743
|
mkdirSync(join(shellRoot, "logs"), { recursive: true });
|
|
777
744
|
const context = {
|
|
778
|
-
kind: "interf-
|
|
745
|
+
kind: "interf-method-authoring",
|
|
779
746
|
version: 1,
|
|
780
747
|
generated_at: new Date().toISOString(),
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
748
|
+
authoring_mode: "from-scratch",
|
|
749
|
+
method_id: options.methodId,
|
|
750
|
+
method_label: options.label,
|
|
751
|
+
...(options.referenceMethodId ? { reference_method_id: options.referenceMethodId } : {}),
|
|
784
752
|
task_prompt: options.taskPrompt,
|
|
785
|
-
|
|
786
|
-
|
|
753
|
+
preparation: {
|
|
754
|
+
source_folder_path: options.sourceFolderPath,
|
|
787
755
|
checks: {
|
|
788
756
|
count: options.checks.length,
|
|
789
757
|
questions: options.checks.map((check, index) => ({
|
|
@@ -792,104 +760,93 @@ export function createWorkflowAuthoringShell(options) {
|
|
|
792
760
|
})),
|
|
793
761
|
},
|
|
794
762
|
},
|
|
795
|
-
preview: options.preview
|
|
796
|
-
? {
|
|
797
|
-
prepared: true,
|
|
798
|
-
compile_ok: options.preview.compileResult.ok,
|
|
799
|
-
failed_stage: options.preview.compileResult.failedStage,
|
|
800
|
-
}
|
|
801
|
-
: {
|
|
802
|
-
prepared: false,
|
|
803
|
-
compile_ok: null,
|
|
804
|
-
failed_stage: null,
|
|
805
|
-
},
|
|
806
763
|
};
|
|
807
764
|
writeFileSync(join(shellRoot, "runtime", "authoring-context.json"), `${JSON.stringify(context, null, 2)}\n`);
|
|
808
765
|
projectRawSnapshot({
|
|
809
|
-
sourcePath: options.
|
|
810
|
-
destinationPath: join(shellRoot, "artifacts", "source-
|
|
766
|
+
sourcePath: options.sourceFolderPath,
|
|
767
|
+
destinationPath: join(shellRoot, "artifacts", "source-folder", "raw"),
|
|
811
768
|
compiledPath: shellRoot,
|
|
812
769
|
mode: "copy",
|
|
813
770
|
prune: true,
|
|
814
771
|
preserveTimestamps: true,
|
|
815
772
|
});
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
writeNativeAgentSurface(shellRoot,
|
|
822
|
-
|
|
773
|
+
copyResolvedTree({
|
|
774
|
+
sourcePath: options.methodPath,
|
|
775
|
+
targetPath: join(shellRoot, "method"),
|
|
776
|
+
shellType: "method-authoring",
|
|
777
|
+
});
|
|
778
|
+
writeNativeAgentSurface(shellRoot, renderMethodAuthoringAgents({
|
|
779
|
+
methodId: options.methodId,
|
|
823
780
|
label: options.label,
|
|
824
|
-
|
|
825
|
-
}), "interf-
|
|
781
|
+
referenceMethodId: options.referenceMethodId ?? null,
|
|
782
|
+
}), "interf-method-author", renderMethodAuthoringSkill());
|
|
826
783
|
return {
|
|
827
784
|
rootPath: shellRoot,
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
promptLogPath: join(shellRoot, "logs", "
|
|
831
|
-
eventLogPath: join(shellRoot, "logs", "
|
|
832
|
-
statusLogPath: join(shellRoot, "logs", "
|
|
785
|
+
methodBeforePath: join(shellRoot, "artifacts", "method-before"),
|
|
786
|
+
methodAfterPath: join(shellRoot, "artifacts", "method-after"),
|
|
787
|
+
promptLogPath: join(shellRoot, "logs", "method-author.prompt.txt"),
|
|
788
|
+
eventLogPath: join(shellRoot, "logs", "method-author.events.ndjson"),
|
|
789
|
+
statusLogPath: join(shellRoot, "logs", "method-author.status.log"),
|
|
833
790
|
};
|
|
834
791
|
}
|
|
835
|
-
function
|
|
792
|
+
function renderMethodImprovementAgents(compiledName, methodId, loopIndex) {
|
|
836
793
|
return [
|
|
837
|
-
`# ${compiledName} —
|
|
794
|
+
`# ${compiledName} — Method Improvement Shell`,
|
|
838
795
|
"",
|
|
839
|
-
"This is an automated
|
|
840
|
-
"It exists to review failed compile/test runs and edit the
|
|
796
|
+
"This is an automated Method-improvement shell generated by Interf.",
|
|
797
|
+
"It exists to review failed compile/test runs and edit the Method package for the next variation.",
|
|
841
798
|
"",
|
|
842
799
|
"## Start Here",
|
|
843
800
|
"",
|
|
844
801
|
"1. Read `runtime/loop-context.json` now.",
|
|
845
|
-
`2. Read \`
|
|
846
|
-
"3. Read `
|
|
847
|
-
"4. Use the local native `interf-
|
|
802
|
+
`2. Read \`method/README.md\`, \`method/method.json\`, and \`method/${METHOD_SCHEMA_FILE}\` now.`,
|
|
803
|
+
"3. Read `method/improve/SKILL.md` now.",
|
|
804
|
+
"4. Use the local native `interf-method-improver` skill now.",
|
|
848
805
|
"",
|
|
849
806
|
"## Boundaries",
|
|
850
807
|
"",
|
|
851
|
-
`-
|
|
808
|
+
`- Method: \`${methodId}\`.`,
|
|
852
809
|
`- Improvement loop: ${loopIndex}.`,
|
|
853
|
-
"- Edit only files under `
|
|
810
|
+
"- Edit only files under `method/`.",
|
|
854
811
|
"- Do not edit checks, test specs, raw files, or generated context outputs.",
|
|
855
812
|
"- Review context outputs under `artifacts/compiled-view/` and test/runtime evidence under `artifacts/`.",
|
|
856
|
-
"- Keep the
|
|
857
|
-
"- For acceptance
|
|
813
|
+
"- Keep the Method package valid for the current compiler API and `method.schema.json`.",
|
|
814
|
+
"- For acceptance criteria, use `zone_counts_at_least` for numeric fixed minimums and `zone_counts_at_least_counts` only for runtime count-key strings such as `source_total`.",
|
|
858
815
|
"",
|
|
859
816
|
"## Goal",
|
|
860
817
|
"",
|
|
861
|
-
"- create a better
|
|
862
|
-
"- preserve deterministic
|
|
863
|
-
"- stop after the
|
|
818
|
+
"- create a better Method variation for this kind of agent work",
|
|
819
|
+
"- preserve deterministic portable-context structure",
|
|
820
|
+
"- stop after the Method edits are complete",
|
|
864
821
|
"",
|
|
865
822
|
].join("\n");
|
|
866
823
|
}
|
|
867
|
-
function
|
|
868
|
-
const path = join(
|
|
824
|
+
function readMethodImprovementDoc(compiledPath) {
|
|
825
|
+
const path = join(improvementMethodDocsPath(compiledPath), "SKILL.md");
|
|
869
826
|
if (!existsSync(path))
|
|
870
827
|
return null;
|
|
871
828
|
return readFileSync(path, "utf8").trim();
|
|
872
829
|
}
|
|
873
|
-
function
|
|
830
|
+
function renderMethodImprovementSkill(methodId, loopIndex, improvementDoc) {
|
|
874
831
|
return [
|
|
875
832
|
"---",
|
|
876
|
-
"name: interf-
|
|
833
|
+
"name: interf-method-improver",
|
|
877
834
|
"description: >",
|
|
878
|
-
" Native local
|
|
879
|
-
" Use it only inside an automated
|
|
835
|
+
" Native local Method-improvement skill for this Interf run.",
|
|
836
|
+
" Use it only inside an automated Method-improvement shell.",
|
|
880
837
|
"---",
|
|
881
838
|
"",
|
|
882
|
-
`# Interf
|
|
839
|
+
`# Interf Method Improvement — ${methodId}`,
|
|
883
840
|
"",
|
|
884
|
-
"This local native skill exists for automated
|
|
841
|
+
"This local native skill exists for automated Method-improvement loops.",
|
|
885
842
|
"Read `runtime/loop-context.json` first.",
|
|
886
|
-
"Then review the linked
|
|
843
|
+
"Then review the linked Method package, `artifacts/compiled-view/`, preserved stage shells, runtime logs, and saved test outputs before editing `method/`.",
|
|
887
844
|
"",
|
|
888
845
|
"## Current Loop",
|
|
889
846
|
"",
|
|
890
|
-
`-
|
|
847
|
+
`- method: \`${methodId}\``,
|
|
891
848
|
`- loop index: ${loopIndex}`,
|
|
892
|
-
"- editable source: `
|
|
849
|
+
"- editable source: `method/improve/SKILL.md`",
|
|
893
850
|
"",
|
|
894
851
|
...(improvementDoc
|
|
895
852
|
? [
|
|
@@ -913,15 +870,10 @@ function projectCompiledReviewArtifactsSnapshot(compiledPath, shellRoot, schema)
|
|
|
913
870
|
copyResolvedTree({
|
|
914
871
|
sourcePath,
|
|
915
872
|
targetPath: join(compiledViewRoot, zone.path),
|
|
916
|
-
shellType: "
|
|
873
|
+
shellType: "method-improvement",
|
|
917
874
|
});
|
|
918
875
|
}
|
|
919
876
|
}
|
|
920
|
-
function linkIfExists(targetPath, linkPathname) {
|
|
921
|
-
if (!existsSync(targetPath))
|
|
922
|
-
return;
|
|
923
|
-
linkPath(targetPath, linkPathname);
|
|
924
|
-
}
|
|
925
877
|
function copyIfExists(sourcePath, targetPath, shellType) {
|
|
926
878
|
if (!existsSync(sourcePath))
|
|
927
879
|
return;
|
|
@@ -945,21 +897,21 @@ function projectCompiledRuntimeArtifacts(compiledPath, shellRoot) {
|
|
|
945
897
|
"logs",
|
|
946
898
|
];
|
|
947
899
|
for (const artifactName of artifactNames) {
|
|
948
|
-
copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "
|
|
900
|
+
copyIfExists(join(runtimeRoot, artifactName), join(runtimeTarget, artifactName), "method-improvement");
|
|
949
901
|
}
|
|
950
902
|
}
|
|
951
903
|
export function pruneStageExecutionShells(compiledPath) {
|
|
952
904
|
rmSync(stageExecutionShellsRoot(compiledPath), { recursive: true, force: true });
|
|
953
905
|
}
|
|
954
|
-
export function projectCompiledQueryShell(compiledPath, compiledName,
|
|
955
|
-
const agentsContent = renderCompiledAgents(compiledPath, compiledName,
|
|
906
|
+
export function projectCompiledQueryShell(compiledPath, compiledName, methodId, about, options) {
|
|
907
|
+
const agentsContent = renderCompiledAgents(compiledPath, compiledName, methodId, about, options);
|
|
956
908
|
const querySkillContent = readCompiledQuerySkillSource(compiledPath);
|
|
957
909
|
return writeNativeAgentSurface(compiledPath, agentsContent, "interf-query", renderCompiledQueryNativeSkill(querySkillContent));
|
|
958
910
|
}
|
|
959
911
|
export function projectRawTestQueryShell(rootPath) {
|
|
960
912
|
return writeNativeAgentSurface(rootPath, renderRawTestAgents(), "interf-query", renderRawTestQuerySkill());
|
|
961
913
|
}
|
|
962
|
-
export function createStageExecutionShell(compiledPath, compiledName,
|
|
914
|
+
export function createStageExecutionShell(compiledPath, compiledName, methodId, stage, writeArtifacts = []) {
|
|
963
915
|
const schema = ensureCompiledExecutionSurface(compiledPath);
|
|
964
916
|
const materializedZones = stageMaterializedZoneSet(schema, stage, writeArtifacts);
|
|
965
917
|
const shellsRoot = stageExecutionShellsRoot(compiledPath);
|
|
@@ -971,10 +923,10 @@ export function createStageExecutionShell(compiledPath, compiledName, workflowId
|
|
|
971
923
|
linkPath(compiledInterfConfigPath(compiledPath), join(shellRoot, "interf.json"));
|
|
972
924
|
linkPath(join(compiledRuntimeRoot(compiledPath), "stage-contract.json"), shellRuntimePath(shellRoot, "stage-contract.json"));
|
|
973
925
|
projectCompiledSchemaZones(compiledPath, shellRoot, schema, new Set([...stage.reads, ...stage.writes]), materializedZones);
|
|
974
|
-
|
|
926
|
+
projectMethodMetadata(compiledPath, shellRoot, stage);
|
|
975
927
|
projectStageZoneMountAliases(shellRoot, stage, schema);
|
|
976
|
-
writeExecutionShellPathsFile(shellRoot,
|
|
977
|
-
const agentsContent = renderStageExecutionAgents(compiledName,
|
|
928
|
+
writeExecutionShellPathsFile(shellRoot, methodId, stage, buildStageZoneMounts(compiledPath, shellRoot, stage, schema));
|
|
929
|
+
const agentsContent = renderStageExecutionAgents(compiledName, methodId, stage);
|
|
978
930
|
writeNativeAgentSurface(shellRoot, agentsContent, "interf-stage", renderStageExecutionSkill(stage, readStageMethodDoc(compiledPath, stage)));
|
|
979
931
|
return {
|
|
980
932
|
rootPath: shellRoot,
|
|
@@ -983,9 +935,9 @@ export function createStageExecutionShell(compiledPath, compiledName, workflowId
|
|
|
983
935
|
export function freezeStageExecutionShell(rootPath) {
|
|
984
936
|
return freezePreservedShell(rootPath, "stage-execution");
|
|
985
937
|
}
|
|
986
|
-
export function
|
|
938
|
+
export function createMethodImprovementShell(options) {
|
|
987
939
|
const schema = ensureCompiledExecutionSurface(options.compiledPath);
|
|
988
|
-
const loopRootPath =
|
|
940
|
+
const loopRootPath = methodImprovementLoopRoot(options.compiledPath, options.runId, options.loopIndex);
|
|
989
941
|
const shellRoot = join(loopRootPath, "shell");
|
|
990
942
|
mkdirSync(shellRoot, { recursive: true });
|
|
991
943
|
mkdirSync(join(shellRoot, "runtime"), { recursive: true });
|
|
@@ -993,34 +945,38 @@ export function createWorkflowImprovementShell(options) {
|
|
|
993
945
|
mkdirSync(join(loopRootPath, "logs"), { recursive: true });
|
|
994
946
|
writeFileSync(join(shellRoot, "runtime", "loop-context.json"), `${JSON.stringify(options.context, null, 2)}\n`);
|
|
995
947
|
projectCompiledReviewArtifactsSnapshot(options.compiledPath, shellRoot, schema);
|
|
996
|
-
|
|
997
|
-
|
|
948
|
+
copyResolvedTree({
|
|
949
|
+
sourcePath: methodPackagePathForCompiled(options.compiledPath),
|
|
950
|
+
targetPath: join(shellRoot, "method"),
|
|
951
|
+
shellType: "method-improvement",
|
|
952
|
+
});
|
|
953
|
+
copyIfExists(compiledInterfConfigPath(options.compiledPath), join(shellRoot, "interf.json"), "method-improvement");
|
|
998
954
|
projectCompiledRuntimeArtifacts(options.compiledPath, shellRoot);
|
|
999
|
-
const reviewSources =
|
|
955
|
+
const reviewSources = resolveMethodImprovementReviewSourcePaths(options.compiledPath);
|
|
1000
956
|
if (reviewSources.executionShells) {
|
|
1001
|
-
copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "
|
|
957
|
+
copyIfExists(reviewSources.executionShells, join(shellRoot, "artifacts", "execution-shells"), "method-improvement");
|
|
1002
958
|
}
|
|
1003
959
|
if (reviewSources.testComparisons) {
|
|
1004
|
-
copyIfExists(reviewSources.testComparisons, join(shellRoot, "artifacts", "test-comparisons"), "
|
|
960
|
+
copyIfExists(reviewSources.testComparisons, join(shellRoot, "artifacts", "test-comparisons"), "method-improvement");
|
|
1005
961
|
}
|
|
1006
962
|
if (reviewSources.targetTestRuns) {
|
|
1007
|
-
copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "
|
|
963
|
+
copyIfExists(reviewSources.targetTestRuns, join(shellRoot, "artifacts", "test-runs"), "method-improvement");
|
|
1008
964
|
}
|
|
1009
965
|
if (reviewSources.targetTestSandboxes) {
|
|
1010
|
-
copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "
|
|
966
|
+
copyIfExists(reviewSources.targetTestSandboxes, join(shellRoot, "artifacts", "test-sandboxes"), "method-improvement");
|
|
1011
967
|
}
|
|
1012
|
-
const agentsContent =
|
|
1013
|
-
writeNativeAgentSurface(shellRoot, agentsContent, "interf-
|
|
968
|
+
const agentsContent = renderMethodImprovementAgents(options.compiledName, options.methodId, options.loopIndex);
|
|
969
|
+
writeNativeAgentSurface(shellRoot, agentsContent, "interf-method-improver", renderMethodImprovementSkill(options.methodId, options.loopIndex, readMethodImprovementDoc(options.compiledPath)));
|
|
1014
970
|
return {
|
|
1015
971
|
rootPath: shellRoot,
|
|
1016
972
|
loopRootPath,
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
promptLogPath: join(loopRootPath, "logs", "
|
|
1020
|
-
eventLogPath: join(loopRootPath, "logs", "
|
|
1021
|
-
statusLogPath: join(loopRootPath, "logs", "
|
|
973
|
+
methodBeforePath: join(loopRootPath, "method-before"),
|
|
974
|
+
methodAfterPath: join(loopRootPath, "method-after"),
|
|
975
|
+
promptLogPath: join(loopRootPath, "logs", "method-improver.prompt.txt"),
|
|
976
|
+
eventLogPath: join(loopRootPath, "logs", "method-improver.events.ndjson"),
|
|
977
|
+
statusLogPath: join(loopRootPath, "logs", "method-improver.status.log"),
|
|
1022
978
|
};
|
|
1023
979
|
}
|
|
1024
|
-
export function
|
|
1025
|
-
return freezePreservedShell(rootPath, "
|
|
980
|
+
export function freezeMethodImprovementShell(rootPath) {
|
|
981
|
+
return freezePreservedShell(rootPath, "method-improvement");
|
|
1026
982
|
}
|