@exellix/ai-tasks 9.1.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (252) hide show
  1. package/CHANGELOG.md +34 -4
  2. package/README.md +2 -2
  3. package/RUNTASK_REQUEST.md +32 -17
  4. package/dist/builders/task-request-builder.d.ts.map +1 -1
  5. package/dist/builders/task-request-builder.js +2 -1
  6. package/dist/builders/task-request-builder.js.map +1 -1
  7. package/dist/compile/compileTaskConfiguration.d.ts.map +1 -1
  8. package/dist/compile/compileTaskConfiguration.js +3 -0
  9. package/dist/compile/compileTaskConfiguration.js.map +1 -1
  10. package/dist/core/task-sdk.d.ts.map +1 -1
  11. package/dist/core/task-sdk.js +148 -180
  12. package/dist/core/task-sdk.js.map +1 -1
  13. package/dist/errors/runTaskExecutionError.d.ts.map +1 -1
  14. package/dist/errors/runTaskExecutionError.js +0 -2
  15. package/dist/errors/runTaskExecutionError.js.map +1 -1
  16. package/dist/index.d.ts +0 -4
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +0 -4
  19. package/dist/index.js.map +1 -1
  20. package/dist/invocation/types.d.ts +1 -1
  21. package/dist/narrix/applyWebScopeToRequest.d.ts +9 -0
  22. package/dist/narrix/applyWebScopeToRequest.d.ts.map +1 -0
  23. package/dist/narrix/applyWebScopeToRequest.js +156 -0
  24. package/dist/narrix/applyWebScopeToRequest.js.map +1 -0
  25. package/dist/narrix/narrixUnitExecution.d.ts.map +1 -1
  26. package/dist/narrix/narrixUnitExecution.js +8 -3
  27. package/dist/narrix/narrixUnitExecution.js.map +1 -1
  28. package/dist/node-execution/buildRequestFromNodePlan.d.ts +6 -0
  29. package/dist/node-execution/buildRequestFromNodePlan.d.ts.map +1 -1
  30. package/dist/node-execution/buildRequestFromNodePlan.js +4 -16
  31. package/dist/node-execution/buildRequestFromNodePlan.js.map +1 -1
  32. package/dist/node-execution/compileProfessionalAnswerRequest.d.ts +2 -0
  33. package/dist/node-execution/compileProfessionalAnswerRequest.d.ts.map +1 -0
  34. package/dist/node-execution/compileProfessionalAnswerRequest.js +4 -0
  35. package/dist/node-execution/compileProfessionalAnswerRequest.js.map +1 -0
  36. package/dist/node-execution/createNodeExecutionHost.d.ts.map +1 -1
  37. package/dist/node-execution/createNodeExecutionHost.js +97 -26
  38. package/dist/node-execution/createNodeExecutionHost.js.map +1 -1
  39. package/dist/node-execution/dispatchExecutionUnit.d.ts.map +1 -1
  40. package/dist/node-execution/dispatchExecutionUnit.js +4 -2
  41. package/dist/node-execution/dispatchExecutionUnit.js.map +1 -1
  42. package/dist/node-execution/orchestration/runPostOrchestration.d.ts +11 -0
  43. package/dist/node-execution/orchestration/runPostOrchestration.d.ts.map +1 -0
  44. package/dist/node-execution/orchestration/runPostOrchestration.js +123 -0
  45. package/dist/node-execution/orchestration/runPostOrchestration.js.map +1 -0
  46. package/dist/node-execution/orchestration/runPreOrchestration.d.ts +3 -0
  47. package/dist/node-execution/orchestration/runPreOrchestration.d.ts.map +1 -0
  48. package/dist/node-execution/orchestration/runPreOrchestration.js +110 -0
  49. package/dist/node-execution/orchestration/runPreOrchestration.js.map +1 -0
  50. package/dist/node-execution/orchestration/shardContext.d.ts +12 -0
  51. package/dist/node-execution/orchestration/shardContext.d.ts.map +1 -0
  52. package/dist/node-execution/orchestration/shardContext.js +71 -0
  53. package/dist/node-execution/orchestration/shardContext.js.map +1 -0
  54. package/dist/node-execution/orchestration/types.d.ts +21 -0
  55. package/dist/node-execution/orchestration/types.d.ts.map +1 -0
  56. package/dist/node-execution/orchestration/types.js +2 -0
  57. package/dist/node-execution/orchestration/types.js.map +1 -0
  58. package/dist/node-execution/rejectForbiddenWireFields.d.ts +2 -0
  59. package/dist/node-execution/rejectForbiddenWireFields.d.ts.map +1 -1
  60. package/dist/node-execution/rejectForbiddenWireFields.js +42 -7
  61. package/dist/node-execution/rejectForbiddenWireFields.js.map +1 -1
  62. package/dist/observability/classifyRunTaskFailure.d.ts.map +1 -1
  63. package/dist/observability/classifyRunTaskFailure.js +4 -3
  64. package/dist/observability/classifyRunTaskFailure.js.map +1 -1
  65. package/dist/observability/logRunTaskFailure.d.ts.map +1 -1
  66. package/dist/observability/logRunTaskFailure.js +0 -2
  67. package/dist/observability/logRunTaskFailure.js.map +1 -1
  68. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts +19 -3
  69. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.d.ts.map +1 -1
  70. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js +7 -1
  71. package/dist/post-steps/audit/auditChecklistFuncxEnvelope.js.map +1 -1
  72. package/dist/post-steps/audit/loadAuditTemplates.d.ts +2 -55
  73. package/dist/post-steps/audit/loadAuditTemplates.d.ts.map +1 -1
  74. package/dist/post-steps/audit/loadAuditTemplates.js +3 -38
  75. package/dist/post-steps/audit/loadAuditTemplates.js.map +1 -1
  76. package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts +8 -0
  77. package/dist/post-steps/audit/parseAuditFuncxOutput.d.ts.map +1 -0
  78. package/dist/post-steps/audit/parseAuditFuncxOutput.js +62 -0
  79. package/dist/post-steps/audit/parseAuditFuncxOutput.js.map +1 -0
  80. package/dist/post-steps/audit/parseAuditOutput.d.ts +2 -0
  81. package/dist/post-steps/audit/parseAuditOutput.d.ts.map +1 -1
  82. package/dist/post-steps/audit/parseAuditOutput.js +56 -0
  83. package/dist/post-steps/audit/parseAuditOutput.js.map +1 -1
  84. package/dist/post-steps/audit/runAudit.d.ts.map +1 -1
  85. package/dist/post-steps/audit/runAudit.js +53 -113
  86. package/dist/post-steps/audit/runAudit.js.map +1 -1
  87. package/dist/post-steps/audit/runAuditFuncxCall.d.ts +18 -0
  88. package/dist/post-steps/audit/runAuditFuncxCall.d.ts.map +1 -0
  89. package/dist/post-steps/audit/runAuditFuncxCall.js +59 -0
  90. package/dist/post-steps/audit/runAuditFuncxCall.js.map +1 -0
  91. package/dist/synthesis/resolveSourceMaterial.d.ts.map +1 -1
  92. package/dist/synthesis/resolveSourceMaterial.js +14 -0
  93. package/dist/synthesis/resolveSourceMaterial.js.map +1 -1
  94. package/dist/synthesis/runStructuredSynthesisRobust.d.ts.map +1 -1
  95. package/dist/synthesis/runStructuredSynthesisRobust.js +24 -4
  96. package/dist/synthesis/runStructuredSynthesisRobust.js.map +1 -1
  97. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts +3 -0
  98. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.d.ts.map +1 -1
  99. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js +28 -4
  100. package/dist/task-strategies/buildTaskStrategyCatalogDescriptor.js.map +1 -1
  101. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts +4 -4
  102. package/dist/task-strategies/canonicalInputExecutionStrategies.d.ts.map +1 -1
  103. package/dist/task-strategies/canonicalInputExecutionStrategies.js +2 -1
  104. package/dist/task-strategies/canonicalInputExecutionStrategies.js.map +1 -1
  105. package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts +42 -0
  106. package/dist/task-strategies/canonicalOrchestrationStrategies.d.ts.map +1 -0
  107. package/dist/task-strategies/canonicalOrchestrationStrategies.js +47 -0
  108. package/dist/task-strategies/canonicalOrchestrationStrategies.js.map +1 -0
  109. package/dist/task-strategies/canonicalTaskStrategies.d.ts +2 -1
  110. package/dist/task-strategies/canonicalTaskStrategies.d.ts.map +1 -1
  111. package/dist/task-strategies/canonicalTaskStrategies.js +2 -1
  112. package/dist/task-strategies/canonicalTaskStrategies.js.map +1 -1
  113. package/dist/task-strategies/constants.d.ts +9 -1
  114. package/dist/task-strategies/constants.d.ts.map +1 -1
  115. package/dist/task-strategies/constants.js +9 -1
  116. package/dist/task-strategies/constants.js.map +1 -1
  117. package/dist/task-strategies/index.d.ts +5 -3
  118. package/dist/task-strategies/index.d.ts.map +1 -1
  119. package/dist/task-strategies/index.js +4 -3
  120. package/dist/task-strategies/index.js.map +1 -1
  121. package/dist/task-strategies/listAiTaskStrategies.d.ts +10 -1
  122. package/dist/task-strategies/listAiTaskStrategies.d.ts.map +1 -1
  123. package/dist/task-strategies/listAiTaskStrategies.js +17 -2
  124. package/dist/task-strategies/listAiTaskStrategies.js.map +1 -1
  125. package/dist/types/task-types.d.ts +4 -11
  126. package/dist/types/task-types.d.ts.map +1 -1
  127. package/dist/utils/bridgeRunSkillGatewayMemory.d.ts.map +1 -1
  128. package/dist/utils/bridgeRunSkillGatewayMemory.js +1 -0
  129. package/dist/utils/bridgeRunSkillGatewayMemory.js.map +1 -1
  130. package/dist/utils/executionMemoryInputRecord.d.ts +12 -0
  131. package/dist/utils/executionMemoryInputRecord.d.ts.map +1 -0
  132. package/dist/utils/executionMemoryInputRecord.js +28 -0
  133. package/dist/utils/executionMemoryInputRecord.js.map +1 -0
  134. package/dist/utils/resolveAiProfileModel.d.ts +1 -1
  135. package/dist/utils/resolveAiProfileModel.d.ts.map +1 -1
  136. package/dist/utils/resolveRunTaskModelReferences.d.ts.map +1 -1
  137. package/dist/utils/resolveRunTaskModelReferences.js +0 -32
  138. package/dist/utils/resolveRunTaskModelReferences.js.map +1 -1
  139. package/dist/utils/runTaskRequestShape.d.ts.map +1 -1
  140. package/dist/utils/runTaskRequestShape.js +4 -26
  141. package/dist/utils/runTaskRequestShape.js.map +1 -1
  142. package/dist/utils/skillTemplateVariables.d.ts +3 -2
  143. package/dist/utils/skillTemplateVariables.d.ts.map +1 -1
  144. package/dist/utils/skillTemplateVariables.js +3 -2
  145. package/dist/utils/skillTemplateVariables.js.map +1 -1
  146. package/dist/validation/validateProfessionalAnswerContract.d.ts +8 -0
  147. package/dist/validation/validateProfessionalAnswerContract.d.ts.map +1 -0
  148. package/dist/validation/validateProfessionalAnswerContract.js +45 -0
  149. package/dist/validation/validateProfessionalAnswerContract.js.map +1 -0
  150. package/dist/validation/validateRunTaskConfig.d.ts.map +1 -1
  151. package/dist/validation/validateRunTaskConfig.js +3 -66
  152. package/dist/validation/validateRunTaskConfig.js.map +1 -1
  153. package/documenations/record-and-template-variables.md +21 -13
  154. package/documenations/run-task-execution-flow.md +1 -1
  155. package/documenations/skill-orchestration-strategy-cr-fr.md +147 -0
  156. package/documenations/upstream-feature-requests/README.md +9 -5
  157. package/documenations/upstream-feature-requests/ai-skills-orchestrator-invoke-contract-5.9.md +1 -1
  158. package/documenations/upstream-feature-requests/funcx-4.9.13-open-items.md +62 -0
  159. package/documenations/upstream-feature-requests/funcx-gap-analysis-cr-fr.md +401 -0
  160. package/documenations/upstream-feature-requests/funcx-pre-post-sidekick-actions.md +1 -0
  161. package/documenations/upstream-feature-requests/graph-engine-runtask-contract-alignment-investigation.md +370 -0
  162. package/documenations/upstream-feature-requests/xynthesis-ai-profiles-2.1-import-break.md +2 -2
  163. package/documenations/upstream-feature-requests/xynthesis-openrouter-wire-model-double-prefix-bug.md +1 -1
  164. package/documenations/upstream-feature-requests/xynthesis-orchestrator-invoke-contract-4.2.md +1 -1
  165. package/package.json +10 -9
  166. package/.docs/DOWNSTREAM_ENV.md +0 -42
  167. package/.docs/FEEDBACK_TO_CLIENT_DOWNSTREAM_FIXES.md +0 -64
  168. package/.docs/INTERMEDIATE_STEPS.md +0 -82
  169. package/.docs/activity-structure.md +0 -31
  170. package/.docs/ai-task-ai-scoping-spec.md +0 -338
  171. package/.docs/ai-tasks-model-profile-aliases-7x.md +0 -96
  172. package/.docs/blockers-and-issues.md +0 -346
  173. package/.docs/building-runTask-sdk.md +0 -659
  174. package/.docs/building-skill-execution-orchestrator.md +0 -968
  175. package/.docs/code-used-before/run-task.txt +0 -39
  176. package/.docs/code-used-before/task-executor.ts.old +0 -57
  177. package/.docs/code-used-before/test-run-task.ts.old +0 -42
  178. package/.docs/code-used-before/types.txt +0 -23
  179. package/.docs/env-ready-policy.md +0 -40
  180. package/.docs/flow-io/flow-README.md +0 -76
  181. package/.docs/flow-io/narrix.md +0 -124
  182. package/.docs/flow-io/web-scoping.md +0 -135
  183. package/.docs/flow-io/xynthesis-post.md +0 -154
  184. package/.docs/flow-io/xynthesis-pre.md +0 -181
  185. package/.docs/gap-analysis.md +0 -201
  186. package/.docs/integration-facts-ai-tasks.md +0 -109
  187. package/.docs/investigation/ai-skills.md +0 -170
  188. package/.docs/investigation/external-packages-assignments.md +0 -66
  189. package/.docs/investigation/integration-summary.md +0 -20
  190. package/.docs/investigation/narrix-catalox.md +0 -29
  191. package/.docs/investigation/workplan-close-graph-engine-gaps.md +0 -101
  192. package/.docs/logging-stack.md +0 -30
  193. package/.docs/memory-narrix-adapter-developer-guide.md +0 -402
  194. package/.docs/memory-narrix-adapter-requirements.md +0 -112
  195. package/.docs/narrix-context-consumption-gap.md +0 -184
  196. package/.docs/narrix-context-downstream-report.md +0 -30
  197. package/.docs/narrix-ingest-and-packs-library-spec.md +0 -240
  198. package/.docs/narrix-record-input-current-design.md +0 -48
  199. package/.docs/pacakge.md +0 -48
  200. package/.docs/possible-components/README.md +0 -11
  201. package/.docs/possible-components/integration/README.md +0 -10
  202. package/.docs/possible-components/integration/gaps-when-merging.md +0 -16
  203. package/.docs/possible-components/integration/platform.md +0 -54
  204. package/.docs/possible-components/integration/reintegrate-into-ai-tasks.md +0 -26
  205. package/.docs/possible-components/integration/roadmap-and-checklists.md +0 -54
  206. package/.docs/possible-components/post-component/README.md +0 -18
  207. package/.docs/possible-components/post-component/builder-guide.md +0 -175
  208. package/.docs/possible-components/post-component/gaps-and-artifacts.md +0 -52
  209. package/.docs/possible-components/post-component/handler-audit.md +0 -47
  210. package/.docs/possible-components/post-component/handler-polish.md +0 -41
  211. package/.docs/possible-components/post-component/unified-protocol.md +0 -59
  212. package/.docs/possible-components/pre-component/README.md +0 -22
  213. package/.docs/possible-components/pre-component/builder-guide.md +0 -127
  214. package/.docs/possible-components/pre-component/gaps-and-artifacts.md +0 -35
  215. package/.docs/possible-components/pre-component/handler-ai-scoping.md +0 -45
  216. package/.docs/possible-components/pre-component/handler-narrix-preprocessor.md +0 -49
  217. package/.docs/possible-components/pre-component/handler-narrix-system2.md +0 -35
  218. package/.docs/possible-components/pre-component/handler-synthesized-context.md +0 -65
  219. package/.docs/possible-components/pre-component/handler-web-scope.md +0 -29
  220. package/.docs/possible-components/pre-component/unified-protocol.md +0 -89
  221. package/.docs/prefer-openrouter-routing-policy.md +0 -114
  222. package/.docs/questions-for-ai-skills.md +0 -123
  223. package/.docs/realtime-narrixing-gap-analysis.md +0 -40
  224. package/.docs/realtime-narrixing.md +0 -433
  225. package/.docs/run-context-object.md +0 -32
  226. package/.docs/session-id-usage.md +0 -26
  227. package/.docs/skill-library-spec.md +0 -249
  228. package/.docs/synthesized-context-strategy-spec.md +0 -906
  229. package/.docs/upstream-issue/2026-03-21_woroces-ai-tasks_ISSUE-006_web-scope-question-from-cni-entity.md +0 -46
  230. package/.docs/web-scopper-embed.md +0 -93
  231. package/.docs/xynthesis-wiring-and-io.md +0 -12
  232. package/documenations/activix-feature-request-identity.md +0 -123
  233. package/documenations/bug-report-xynthesis-and-synthesis-call.md +0 -217
  234. package/documenations/feature-request-ai-skills-raw-template-access.md +0 -82
  235. package/documenations/feature-request-athenix-core-directive.md +0 -145
  236. package/documenations/feature-request-athenix-token-extraction.md +0 -124
  237. package/documenations/funcx-upstream-github-issues-draft.md +0 -153
  238. package/documenations/identity-metadata-contract.md +0 -165
  239. package/documenations/run-task-single-run-checklist.md +0 -109
  240. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-1-no-concrete-wire-in-graph-plans.md +0 -93
  241. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-2-skillModel-profile-only-at-storage.md +0 -88
  242. package/documenations/sessions/2026-06-08-subnets-model-resolution/CR-3-reject-concrete-models-in-catalog-rows.md +0 -76
  243. package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-1-suggested-profile-in-catalogs.md +0 -96
  244. package/documenations/sessions/2026-06-08-subnets-model-resolution/FR-2-graph-engine-failure-phase-attribution.md +0 -92
  245. package/documenations/sessions/2026-06-08-subnets-model-resolution/INVESTIGATION-original-bug.md +0 -182
  246. package/documenations/sessions/2026-06-08-subnets-model-resolution/PROBLEM.md +0 -236
  247. package/documenations/sessions/2026-06-08-subnets-model-resolution/README.md +0 -11
  248. package/documenations/sessions/2026-06-08-subnets-model-resolution/funcx-test-resolveModel.cheapDefaultWireSlug.test.ts +0 -117
  249. package/documenations/upstream-feature-requests/ai-tasks-wrap-up-after-upstream.md +0 -129
  250. package/documenations/upstream-feedback-request-shape-clarification.md +0 -101
  251. package/documenations/web-context-precedence.md +0 -33
  252. package/documenations/xynthesis-activix-telemetry.md +0 -28
@@ -0,0 +1,401 @@
1
+ # `@x12i/funcx` — gap analysis (CRs & FRs for upstream)
2
+
3
+ **Filed by:** `@exellix/ai-tasks` + `@exellix/xynthesis`
4
+ **Baseline validated:** `@x12i/funcx` **4.9.13** (live OpenRouter, 2026-06-12)
5
+ **Evidence:** `temp/funcx-functions/` live runs, `instructions-comparison.md`, `live-run-summary.md`
6
+
7
+ **Related docs:**
8
+
9
+ - [**funcx-4.9.9-residual-upstream-cr-fr.md**](../../../archived/ai-tasks/documenations/upstream-feature-requests/superseded/funcx-4.9.9-residual-upstream-cr-fr.md) — **file these to `x12i/funcx`** (copy-paste GitHub issues; blocks deleting consumer workarounds)
10
+ - [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) — envelope / `run()` baseline
11
+ - [funcx-pre-post-sidekick-actions.md](./funcx-pre-post-sidekick-actions.md) — per-function sidekick specs
12
+ - [funcx-upstream-github-issues-draft.md](../funcx-upstream-github-issues-draft.md) — GitHub issue templates
13
+ - Consumer specs: `temp/funcx-functions/*/instructions-template.md`, `input-object.md`, `output-object.md`
14
+
15
+ ---
16
+
17
+ ## 0. Executive summary
18
+
19
+ | Area | 4.9.9 status | FuncX work left? |
20
+ |------|--------------|------------------|
21
+ | **Registry** — 10 mapped ids callable via `run()` | **Done** | No |
22
+ | **Prompt content** — match xynthesis / ai-tasks disk templates | **Done** (FR-GEN-1, CR-FUNCX-1) | CI only (FR-GEN-9) |
23
+ | **Output contracts** — especially audit-checklist markdown | **Done @ 4.9.11** | No (CR-FUNCX-2 closed) |
24
+ | **Envelope richness** — audit-merge full template fields | **Done @ 4.9.11** (plain text merge output) | Monitor rich-envelope prompt parity (FR-GEN-11) |
25
+ | **Orchestrator ergonomics** — sampling on `run()` | **Done** (`temperature`, `topP`, `reasoningEffort`) | No |
26
+ | **Types / schemas exported** | **Done** (`SidekickGenericEnvelope`, `getFuncx*Schema`) | FR-GEN-3 publish polish |
27
+
28
+ **Mono-repo wiring** (FuncX `run()` only in gateway — no flag) — **shipped** in xynthesis + ai-tasks audit (2026-06). See §7.
29
+
30
+ ---
31
+
32
+ ## 1. What FuncX 4.9.8 already delivered (closed items)
33
+
34
+ Update prior trackers that still say “Open @ 4.4.0”:
35
+
36
+ | Id | Topic | Status @ 4.9.8 |
37
+ |----|--------|----------------|
38
+ | **FR-PRE-POST-1** | `pre-synthesize` built-in | **Shipped** (alias; `pre/synthesize` normalizes) |
39
+ | **FR-PRE-POST-3** | `post-audit` | **Shipped** |
40
+ | **FR-PRE-POST-4** | `post-fix` | **Shipped** |
41
+ | **FR-PRE-POST-5** | `post-pick-best`, `post-craft-final` | **Shipped** |
42
+ | **FR-PRE-POST-2** (registry only) | `post-audit-checklist`, `post-audit-merge` | **Shipped** (callable; content/contract gaps remain) |
43
+ | **FR-GEN-0** | `run()`, `getRunJsonResult`, `buildAskAttribution`, execution/research generics | **Shipped** |
44
+ | **FR-GEN-6** (registry) | Checklist / merge ids | **Shipped** → content in CR-FUNCX-2 / FR-GEN-11 |
45
+ | **FR-GEN-8** | `strategyArgs` on wire | **Closed (consumer merges into `args`)** |
46
+
47
+ **Live proof:** `temp/funcx-functions` — 10/10 `run()` success on 4.9.8 (2 transient `fetch failed` on first batch; retries OK).
48
+
49
+ ---
50
+
51
+ ## 2. Gap taxonomy
52
+
53
+ | Kind | Meaning | File to FuncX as |
54
+ |------|---------|------------------|
55
+ | **CR** | Shipped built-in behaves differently from documented consumer contract | Bug / contract fix |
56
+ | **FR** | New capability or content not yet meeting consumer spec | Enhancement |
57
+
58
+ ---
59
+
60
+ ## 3. Change requests (CR) — fix shipped behavior
61
+
62
+ ### CR-FUNCX-1 — Built-ins use generic prompts, not Catalox / consumer templates
63
+
64
+ **Priority:** P0
65
+ **Affects:** All 10 mapped functions
66
+ **Evidence:** `temp/funcx-functions/instructions-comparison.md`; FuncX `dist/functions/index.js` uses one-line system + full envelope JSON dump for execution/research; post/pre same pattern on 4.9.8.
67
+
68
+ **Today:**
69
+
70
+ ```
71
+ System: "Produce execution planning output only."
72
+ User: "You implement the FuncX built-in execution/plan… Payload (JSON): { … }"
73
+ ```
74
+
75
+ **Expected:** Content-backed built-ins render Catalox `fx/{id}/` instructions equivalent to:
76
+
77
+ - `xynthesis/templates/{actionType}/system-structured.md` + `user-structured.md`
78
+ - `ai-tasks/templates/post-steps/audit/system.md` + `user.txt` / `synthesis.md`
79
+
80
+ **Consumer spec:** `temp/funcx-functions/*/instructions-template.md`
81
+
82
+ **Acceptance:**
83
+
84
+ - [ ] Each of the 10 ids loads Catalox content (not hard-coded generic stub) when `content:primitives:sync` is deployed.
85
+ - [ ] Rendered system+user prompt byte-matches normalized disk template for golden fixture envelopes (FR-GEN-9).
86
+ - [ ] `model` on envelope body still honored.
87
+
88
+ **Depends on:** FR-GEN-1 (template variable mapping).
89
+
90
+ ---
91
+
92
+ ### CR-FUNCX-2 — `post/audit-checklist` output is JSON; consumer requires markdown
93
+
94
+ **Priority:** P0
95
+ **Affects:** `post/audit-checklist`
96
+ **Evidence:** Live 4.9.8 returned `{ checks: [{ check, kind, passed, feedback }], overall_feedback }`. ai-tasks expects markdown with `### Checks` and `### Overall feedback` (`templates/post-steps/audit/system.md`).
97
+
98
+ **Expected output (markdown):**
99
+
100
+ ```markdown
101
+ ### Checks
102
+ - **Check:** (echo check text)
103
+ - **Kind:** must | should
104
+ - **Passed:** yes | no
105
+ - **Feedback:** …
106
+
107
+ ### Overall feedback
108
+
109
+ ```
110
+
111
+ **Acceptance:**
112
+
113
+ - [ ] Built-in `responseFormat` / instructions enforce markdown sections above (not JSON checklist array).
114
+ - [ ] Or: documented canonical JSON schema + explicit `outputMode: "markdown"|"json"` on envelope `args` with default `markdown` for ai-tasks compatibility.
115
+ - [ ] Golden test vs `ai-tasks/templates/post-steps/audit/` fixtures.
116
+
117
+ **Related FR:** FR-GEN-3 (publish output schema).
118
+
119
+ ---
120
+
121
+ ### CR-FUNCX-3 — `research/plan-questions` schema vs disk template drift
122
+
123
+ **Priority:** P1
124
+ **Affects:** `research/plan-questions`
125
+ **Evidence:** Disk template requires `"source": "ai-driven"` per question; FuncX schema uses optional `sourceType` (string). Live 4.9.8 sometimes omits both; call still validates.
126
+
127
+ **Expected (disk / xynthesis):**
128
+
129
+ ```json
130
+ { "question": "…", "reason": "…", "source": "ai-driven" }
131
+ ```
132
+
133
+ **Acceptance (pick one and document):**
134
+
135
+ - [ ] **A:** Schema requires `source` literal `"ai-driven"` (match disk).
136
+ - [ ] **B:** Schema standardizes on `sourceType`; export migration note; xynthesis adapter updated (consumer change).
137
+
138
+ **Consumer spec:** `temp/funcx-functions/research-plan-questions/instructions-template.md`
139
+
140
+ ---
141
+
142
+ ### CR-FUNCX-4 — `execution/plan` prompt vs output schema mismatch
143
+
144
+ **Priority:** P1
145
+ **Affects:** `execution/plan`
146
+ **Evidence:** Live 4.9.6 runs failed `ERR_SCHEMA_INVALID` when model returned `confidence: "high"` and `suggestedContext: {}`. Schema requires `confidence: number`, `suggestedContext: string[]`. Disk template text does not mention these fields.
147
+
148
+ **Acceptance:**
149
+
150
+ - [ ] Catalox instructions explicitly require `confidence` (0–1 number) and `suggestedContext` (string array, may be empty `[]`).
151
+ - [ ] Or: relax schema for optional fields with sensible defaults (document in FR-GEN-3).
152
+ - [ ] Fewer than 5% schema failures on golden envelopes with `cheap/default`.
153
+
154
+ **Consumer spec:** `temp/funcx-functions/execution-plan/output-object.md`
155
+
156
+ ---
157
+
158
+ ### CR-FUNCX-5 — Transient `fetch failed` loses `error.cause`
159
+
160
+ **Priority:** P2
161
+ **Affects:** All `run()` OpenRouter hops
162
+ **Evidence:** Batch live run 8/10 + 2× `fetch failed`; retries succeeded. Error surface is only `message: "fetch failed"`.
163
+
164
+ **Acceptance:**
165
+
166
+ - [ ] `run()` / `askJson` errors preserve `cause` (`ECONNRESET`, `ETIMEDOUT`, etc.) on thrown/rejected errors.
167
+ - [ ] Optional retry policy documented for embedders (exponential backoff on transport failures).
168
+
169
+ ---
170
+
171
+ ## 4. Feature requests (FR) — new upstream capability
172
+
173
+ ### FR-GEN-1 — `envelopeToTemplateVariables` (P0)
174
+
175
+ **Status:** Open
176
+ **Blocks:** CR-FUNCX-1, FR-GEN-9
177
+
178
+ **Ask:**
179
+
180
+ ```ts
181
+ export function envelopeToTemplateVariables(
182
+ envelope: GenericExecutionEnvelope | SidekickGenericEnvelope
183
+ ): Record<string, string>;
184
+ ```
185
+
186
+ **Minimum keys** (sidekick + execution):
187
+
188
+ | Token | Source |
189
+ |-------|--------|
190
+ | `goal`, `question`, `task` | `envelope.goal` |
191
+ | `input_json`, `context_json`, `args_json`, `result_json` | `JSON.stringify(...)` |
192
+ | `strategy_args_json`, `iteration_index` | execution family |
193
+ | `ai_output`, `used_instructions`, `used_prompt` | post sidekick `input` |
194
+ | `local_raw`, `supporting_raw`, `rendered_downstream_*` | pre/synthesize `input` |
195
+ | `candidates_json`, `prior_audit_json`, `metadata_json` | post sidekick |
196
+ | Checklist: `originalInput`, `promptContext`, `candidateOutput`, `mustChecks`, `shouldChecks` | audit-checklist `input` |
197
+
198
+ Also support nested `input.goal` style for existing `renderInstructionTemplate`.
199
+
200
+ **Acceptance:** Used by all content-backed xynthesis built-ins before `callAI`.
201
+
202
+ ---
203
+
204
+ ### FR-GEN-9 — Catalox seed ↔ consumer template parity CI (P0)
205
+
206
+ **Status:** Open
207
+ **Depends on:** FR-GEN-1
208
+
209
+ **Ask:**
210
+
211
+ 1. Seed bundle `xynthesisSidekick.seed.json` (or extend `genericExecutionResearch.seed.json`) with all 10 ids.
212
+ 2. CI job: for each id, render Catalox instructions with golden envelope → compare hash to xynthesis rendrix / Handlebars output.
213
+ 3. Source files listed in `temp/funcx-functions/instructions-comparison.md`.
214
+
215
+ **Acceptance:** CI fails on prompt drift; `contentVersion` bumped on intentional changes.
216
+
217
+ ---
218
+
219
+ ### FR-GEN-3 — Published output JSON Schema artifacts (P1)
220
+
221
+ **Status:** Open
222
+
223
+ **Ask:** Versioned JSON Schema per built-in id, co-located with FuncX package, matching xynthesis parsers:
224
+
225
+ - `parseAuditPayload`, `parseFixPayload`, `parsePickBestPayload`, `parseCraftFinalPayload`
226
+ - `adaptExecutionPlanResult`, `adaptEvaluateResultResponse`, `adaptResearchPlanQuestionsResult`
227
+ - audit-checklist markdown contract OR JSON schema (per CR-FUNCX-2 resolution)
228
+
229
+ **Acceptance:** `@exellix/xynthesis` / `@exellix/ai-tasks` can import schemas without duplicating types.
230
+
231
+ ---
232
+
233
+ ### FR-GEN-4 — `RunOptions` sampling passthrough (P1)
234
+
235
+ **Status:** Open
236
+
237
+ **Ask:** Add to `run()` options: `temperature`, `topP`, `reasoningEffort` (forwarded to nested `ask()` / OpenRouter).
238
+
239
+ **Why:** xynthesis `FuncxInvoker.ask()` passes `temperature: 0.2` today; `run()` path cannot match without envelope hacks.
240
+
241
+ **Acceptance:** Parity test: same sampling on `run()` vs direct `ask()`.
242
+
243
+ ---
244
+
245
+ ### FR-GEN-11 — Rich audit-merge envelope + template (P1)
246
+
247
+ **Status:** Open (extends FR-PRE-POST-2)
248
+
249
+ **Ask:** FuncX built-in + Catalox template for `post/audit-merge` accepts full fields from `ai-tasks/templates/post-steps/audit/synthesis.md`:
250
+
251
+ - `originalInput`, `promptContext`
252
+ - `candidateA` / `candidateB` with `cycle`, `score`, `output`, `failedChecks[]`, `passedChecks[]`
253
+ - `customSynthesisGuidelines` (from `args`)
254
+
255
+ **Consumer envelope builder:** `ai-tasks/src/post-steps/audit/auditChecklistFuncxEnvelope.ts` (expand merge builder).
256
+
257
+ **Acceptance:** Merge output quality golden test vs Handlebars `synthesis.md` path.
258
+
259
+ ---
260
+
261
+ ### FR-PRE-POST-7 — Sidekick template context helper (P2)
262
+
263
+ **Status:** Open
264
+ **Alternative to:** FR-GEN-1 if FuncX prefers a named helper.
265
+
266
+ **Ask:** `buildSidekickTemplateContext(envelope)` wrapping FR-GEN-1 for sidekick ids only.
267
+
268
+ ---
269
+
270
+ ### FR-PRE-POST-8 — Export `SidekickGenericEnvelope` type (P2)
271
+
272
+ **Status:** Open
273
+
274
+ **Ask:** Export from `@x12i/funcx/functions` (or `@x12i/funcx/contracts`) matching `xynthesis/src/sidekickFuncxEnvelope.ts`.
275
+
276
+ **Acceptance:** ai-tasks / xynthesis stop duplicating structural types.
277
+
278
+ ---
279
+
280
+ ### FR-GEN-2 — Per-function `args` JSON Schema in `meta.json` (P2)
281
+
282
+ **Status:** Open (partial by convention)
283
+
284
+ **Ask:** Document and validate `args` per id: `templateMode`, `customGuidelines`, `maxQuestions`, `allowSkip`, `iterationIndex`, `customAuditGuidelines`, etc.
285
+
286
+ ---
287
+
288
+ ### FR-GEN-5 — `runGenericExecution` embedder helper (P2)
289
+
290
+ **Status:** Open
291
+
292
+ **Ask:** Thin wrapper: content resolve → render (FR-GEN-1) → `askJson` → `getRunJsonResult` → `{ value, usage, model }`.
293
+
294
+ ---
295
+
296
+ ### FR-GEN-10 — Deprecate legacy hyphen ids (P3)
297
+
298
+ **Status:** Open
299
+
300
+ **Ask:** Mark `ai-tasks-plan-task`, `ai-tasks-optimizer-evaluate` deprecated; alias to `execution-plan`, `execution-evaluate-result`.
301
+
302
+ ---
303
+
304
+ ### FR-GEN-12 — Golden fixtures package (P2)
305
+
306
+ **Status:** Open
307
+
308
+ **Ask:** `@x12i/funcx/fixtures` or export from package: golden envelopes + expected prompt hashes + expected JSON outputs for 10 ids (sourced from `temp/funcx-functions`).
309
+
310
+ ---
311
+
312
+ ## 5. Per-function FuncX checklist
313
+
314
+ | functionId | Registry 4.9.8 | CR / FR to close parity |
315
+ |------------|----------------|-------------------------|
316
+ | `pre/synthesize` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 |
317
+ | `execution/plan` | OK | CR-FUNCX-1, CR-FUNCX-4, FR-GEN-1, FR-GEN-9 |
318
+ | `research/plan-questions` | OK | CR-FUNCX-1, CR-FUNCX-3, FR-GEN-1, FR-GEN-9 |
319
+ | `execution/evaluate-result` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 |
320
+ | `post/audit` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 |
321
+ | `post/fix` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 (+ `metadata_json` in user template) |
322
+ | `post/pick-best` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 (+ `metadata_json`) |
323
+ | `post/craft-final` | OK | CR-FUNCX-1, FR-GEN-1, FR-GEN-9 (+ `metadata_json`) |
324
+ | `post/audit-checklist` | OK | **CR-FUNCX-2**, FR-GEN-1, FR-GEN-3, FR-GEN-9 |
325
+ | `post/audit-merge` | OK | CR-FUNCX-1, **FR-GEN-11**, FR-GEN-1, FR-GEN-9 |
326
+
327
+ ---
328
+
329
+ ## 6. Suggested FuncX release slices
330
+
331
+ ### 4.9.9 / 4.10.0 — P0 (production parity blockers)
332
+
333
+ 1. **FR-GEN-1** — `envelopeToTemplateVariables`
334
+ 2. **CR-FUNCX-1** — Catalox content for all 10 ids (seed + sync)
335
+ 3. **CR-FUNCX-2** — audit-checklist markdown output
336
+ 4. **FR-GEN-9** — parity CI
337
+
338
+ ### 4.10.x — P1
339
+
340
+ 5. **CR-FUNCX-3**, **CR-FUNCX-4** — schema / template alignment
341
+ 6. **FR-GEN-3** — published output schemas
342
+ 7. **FR-GEN-4** — RunOptions sampling
343
+ 8. **FR-GEN-11** — audit-merge full template
344
+
345
+ ### 4.11.x — P2/P3
346
+
347
+ 9. FR-PRE-POST-8, FR-GEN-2, FR-GEN-5, FR-GEN-10, FR-GEN-12, CR-FUNCX-5
348
+
349
+ ---
350
+
351
+ ## 7. Mono-repo owner (wired @ 4.9.13 cutover)
352
+
353
+ | Item | Owner | Status |
354
+ |------|--------|--------|
355
+ | FuncX `run()` in `sidekickGateway.ts`, `runExecutionStrategyAction.ts` | xynthesis | **Done** — `invokeFuncxRun.ts`; no `XYNTHESIS_FUNCX_SIDEKICK` flag |
356
+ | ai-tasks audit checklist/merge via FuncX envelopes | ai-tasks | **Done** — `runAuditFuncxCall.ts`; Handlebars templates removed |
357
+ | Expand `buildAuditMergeFuncxEnvelope` for rich merge fields | ai-tasks | **Done** |
358
+ | Catalox seed from `@x12i/funcx/content-seed` (`contentVersion: 4.9.13`) | xynthesis | **Done** |
359
+ | FR-GEN-9 consumer parity CI before deleting disk templates | xynthesis | **Done** — `sidekickFuncxPromptParity.unit.ts` in `npm test` |
360
+ | Structured-only PRE synthesis (no markdown path) | ai-tasks | **Done** |
361
+ | `parseAuditChecklistOutput` (markdown + JSON object) | ai-tasks | **Done** — `parseAuditOutput.ts` |
362
+ | Live golden e2e with OpenRouter | both | **Out of repo CI** — run `test:integration` / `RUN_SYNTHESIS_E2E=1` locally |
363
+
364
+ ---
365
+
366
+ ## 8. How to file in GitHub (`x12i/funcx`)
367
+
368
+ | Upstream item | Suggested GitHub label |
369
+ |---------------|------------------------|
370
+ | CR-FUNCX-1 … CR-FUNCX-5 | `bug` or `contract` |
371
+ | FR-GEN-1, FR-GEN-9 | `enhancement`, `P0` |
372
+ | FR-GEN-11, CR-FUNCX-2 | `enhancement`, `ai-tasks-integration` |
373
+
374
+ Copy bodies from this doc + link `temp/funcx-functions/{folder}/live-run.md` as evidence.
375
+
376
+ ---
377
+
378
+ ## 9. Version note (update peer docs)
379
+
380
+ | Package | Version | Notes |
381
+ |---------|---------|-------|
382
+ | `@x12i/funcx` | **4.9.9** | Content-backed sidekicks; 9/10 live (transient fetch on `pre/synthesize`) |
383
+ | `@exellix/xynthesis` | **^4.9.9** dep | `invokeFuncxRun` + gateway flag wiring |
384
+ | `@exellix/ai-tasks` | **^4.9.9** dep | Audit FuncX path behind same flag |
385
+
386
+ ---
387
+
388
+ ## 10. Recheck log (4.9.11 → 4.9.13)
389
+
390
+ **Latest:** `@x12i/funcx` **4.9.13** live OpenRouter, 2026-06-12 (`temp/funcx-functions`)
391
+
392
+ | Id | Status @ 4.9.13 | Notes |
393
+ |----|-----------------|-------|
394
+ | **CR-FUNCX-5** | **Closed** | `error.cause` on transport errors (4.9.9); embedder retry docs (4.9.12); `RunOptions.transportRetries` (4.9.13). `pre/synthesize` OK with `transportRetries: 2`. |
395
+ | **FR-GEN-3** | **Closed** | `getFuncxOutputSchema` CI (4.9.12); checklist/merge `outputSchemaType: "string"` in fixtures manifest. |
396
+ | **FR-GEN-9** | **Closed** | `sidekickPromptParity.test.ts` + `@x12i/funcx/fixtures` hashes. Consumer parity CI in mono-repo **done** (`sidekickFuncxPromptParity.unit.ts`). |
397
+ | **FR-GEN-11** | **Closed** | Rich merge `prompt.md` + `post-audit-merge-envelope.json` golden fixture with checks arrays. |
398
+ | **CR-FUNCX-2** | **Closed** | Markdown checklist @ 4.9.11+ — unchanged @ 4.9.13. |
399
+ | **CR-FUNCX-1, FR-GEN-1, FR-GEN-4, FR-GEN-12, CR-FUNCX-3, CR-FUNCX-4** | **Closed** | Unchanged. |
400
+
401
+ **Mono-repo cutover complete @ 4.9.13.** See [funcx-4.9.13-open-items.md](./funcx-4.9.13-open-items.md).
@@ -2,6 +2,7 @@
2
2
 
3
3
  **Filed by:** `@exellix/ai-tasks` + `@exellix/xynthesis`
4
4
  **Baseline:** `@x12i/funcx` **4.4.0** — execution/research generics **shipped**; pre/post ids below are **not** in registry yet
5
+ **Updated:** See [funcx-gap-analysis-cr-fr.md](./funcx-gap-analysis-cr-fr.md) for **4.9.8** status (10/10 registered; content parity CRs/FRs open).
5
6
  **Blocks:** `XYNTHESIS_FUNCX_SIDEKICK=1` production use, ai-tasks audit/polish off Handlebars
6
7
  **Related:** [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) (4.4.0 baseline + execution FRs)
7
8