@exellix/ai-tasks 8.5.2 → 8.6.1

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.
@@ -1,301 +1,213 @@
1
1
  # `@x12i/funcx` — built-in functions for xynthesis **pre-actions** and **post-actions**
2
2
 
3
3
  **Filed by:** `@exellix/ai-tasks` + `@exellix/xynthesis`
4
- **Blocks:** Catalox-only sidekick path (`runXynthesisAiAction`), ai-tasks audit/polish migration off inline templates
5
- **Related:** [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md), [funcx-catalog-hosting-checklist.md](../funcx-catalog-hosting-checklist.md)
4
+ **Baseline:** `@x12i/funcx` **4.4.0** execution/research generics **shipped**; pre/post ids below are **not** in registry yet
5
+ **Blocks:** `XYNTHESIS_FUNCX_SIDEKICK=1` production use, ai-tasks audit/polish off Handlebars
6
+ **Related:** [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) (4.4.0 baseline + execution FRs)
6
7
 
7
8
  ---
8
9
 
9
10
  ## 0. Problem
10
11
 
11
- Today xynthesis **pre-actions** (synthesis) and **post-actions** (audit, fix, pick-best, craft-final) load prompts from:
12
+ **Shipped in FuncX 4.4.0:** `run("execution/plan" | "execution/evaluate-result" | "research/plan-questions", GenericExecutionEnvelope)` with Catalox content under `genericExecutionResearch` seed.
12
13
 
13
- 1. On-disk `xynthesis/templates/{actionType}/`, or
14
- 2. Catalox catalogs `pre-actions` / `post-actions` (same template bodies, seeded from disk).
14
+ **Not shipped:** Sidekick pre/post capabilities (`pre/synthesize`, `post/audit`, …). Today:
15
15
 
16
- The LLM hop uses **`FuncxInvoker.ask(systemPrompt, userPrompt)`** — a **transport-only** use of FuncX. Prompt text is assembled in xynthesis (`sidekickPromptTemplate.ts` + rendrix), **not** resolved from a FuncX **function id** via `run(functionId, envelope)`.
16
+ 1. xynthesis loads `xynthesis/templates/{actionType}/` or Catalox `pre-actions` / `post-actions` (same bodies).
17
+ 2. LLM hop = **`FuncxInvoker.ask(systemPrompt, userPrompt)`** (transport only).
18
+ 3. ai-tasks often builds its **own** audit/polish prompts (`loadAuditTemplates`, `DEFAULT_SYSTEM`).
17
19
 
18
- **ai-tasks** often bypasses even that path: it loads **its own** audit/polish templates and calls `executeXynthesisAction` with pre-built prompts.
19
-
20
- **Target:** Each sidekick action has a **first-class FuncX function** (like `execution/plan`). xynthesis calls `run(functionId, envelope, runOptions)`; Catalox `pre-actions` / `post-actions` items **reference** the same `functionId` for content overrides, not duplicate template hosting.
20
+ **Target:** Register pre/post built-ins like execution family `run(functionId, SidekickGenericEnvelope, runOptions)`; Catalox items keep `funcx.functionId` for overrides only.
21
21
 
22
22
  ---
23
23
 
24
- ## 1. Canonical mapping (FuncX Catalox ↔ sidekick)
24
+ ## 1. Consumer mapping (shipped in xynthesis)
25
+
26
+ **Source:** `xynthesis/src/catalog/sidekickFuncxCatalogMap.ts`
27
+ **Envelopes:** `xynthesis/src/sidekickFuncxEnvelope.ts`
28
+ **Flag:** `XYNTHESIS_FUNCX_SIDEKICK=1` (`isSidekickFuncxEnabled()`)
25
29
 
26
- | Phase | Sidekick `actionType` | Catalox catalog | Catalox item id | Proposed FuncX `functionId` | Hyphen alias |
27
- |-------|----------------------|-----------------|-----------------|----------------------------|--------------|
28
- | PRE | `synthesis` | `pre-actions` | `synthesis` | `pre/synthesize` | `pre-synthesize` |
29
- | PRE | `execution-plan` | `pre-actions` | `execution-plan` | `execution/plan` | `execution-plan` |
30
- | PRE | `plan-web-scope-questions` | `pre-actions` | `plan-web-scope-questions` | `research/plan-questions` | `research-plan-questions` |
31
- | POST | `audit` | `post-actions` | `audit` | `post/audit` | `post-audit` |
32
- | POST | `fix` | `post-actions` | `fix` | `post/fix` | `post-fix` |
33
- | POST | `pick-best` | `post-actions` | `pick-best` | `post/pick-best` | `post-pick-best` |
34
- | POST | `craft-final` | `post-actions` | `craft-final` | `post/craft-final` | `post-craft-final` |
35
- | POST | `execution-evaluate-result` | `post-actions` | `execution-evaluate-result` | `execution/evaluate-result` | `execution-evaluate-result` |
30
+ | Phase | Sidekick `actionType` | Catalox catalog | Item id | FuncX `functionId` | Hyphen alias (router) | In FuncX 4.4 registry? |
31
+ |-------|----------------------|-----------------|---------|-------------------|----------------------|-------------------------|
32
+ | PRE | `synthesis` | `pre-actions` | `synthesis` | `pre/synthesize` | `pre-synthesize` | **No** |
33
+ | PRE | `execution-plan` | `pre-actions` | `execution-plan` | `execution/plan` | `execution-plan` | **Yes** |
34
+ | PRE | `plan-web-scope-questions` | `pre-actions` | `plan-web-scope-questions` | `research/plan-questions` | `research-plan-questions` | **Yes** |
35
+ | POST | `audit` | `post-actions` | `audit` | `post/audit` | `post-audit` | **No** |
36
+ | POST | `fix` | `post-actions` | `fix` | `post/fix` | `post-fix` | **No** |
37
+ | POST | `pick-best` | `post-actions` | `pick-best` | `post/pick-best` | `post-pick-best` | **No** |
38
+ | POST | `craft-final` | `post-actions` | `craft-final` | `post/craft-final` | `post-craft-final` | **No** |
39
+ | POST | `execution-evaluate-result` | `post-actions` | `execution-evaluate-result` | `execution/evaluate-result` | `execution-evaluate-result` | **Yes** |
36
40
 
37
- **ai-tasks pipeline audit (weighted checks, markdown output)** — separate from sidekick JSON audit until unified:
41
+ **ai-tasks-only POST pipeline** (not `SidekickActionType` today):
38
42
 
39
- | Capability | Proposed FuncX id | Catalox (optional) |
40
- |------------|-------------------|-------------------|
41
- | Checklist audit evaluator | `post/audit-checklist` | `post-actions` item `audit-checklist` |
42
- | Audit-cycle synthesis merge | `post/audit-merge` | `post-actions` item `audit-merge` or reuse `pre/synthesize` with `args.profile: "audit-merge"` |
43
+ | Capability | FuncX id | Catalox item | Envelope builder | In registry? |
44
+ |------------|----------|--------------|------------------|--------------|
45
+ | Checklist audit | `post/audit-checklist` | `audit-checklist` | `ai-tasks/.../auditChecklistFuncxEnvelope.ts` | **No** |
46
+ | Audit merge | `post/audit-merge` | `audit-merge` | same module | **No** |
43
47
 
44
- Constants and envelope builders live in xynthesis: `src/catalog/sidekickFuncxCatalogMap.ts`, `src/sidekickFuncxEnvelope.ts`.
48
+ Catalox seed writes `funcx: { functionId, contentVersion: "0.0.0-pending-funcx" }` on every mapped sidekick item (`buildXynthesisSeedPayloads.ts`).
45
49
 
46
50
  ---
47
51
 
48
- ## 2. Wire contract — sidekick generic envelope
52
+ ## 2. Wire contract — `SidekickGenericEnvelope`
49
53
 
50
- Extend (or sibling-type) **`GenericExecutionEnvelope`** for sidekick actions:
54
+ **Defined in xynthesis** (not exported from `@x12i/funcx` 4.4.0). FuncX `run()` should accept this object as the **request** body (same as passing `GenericExecutionEnvelope` for execution ids).
51
55
 
52
56
  ```ts
53
57
  type SidekickGenericEnvelope = {
54
- /** Directive: question / objective / instruction (maps to SidekickInput.task). */
55
- goal: string;
56
- /** Action-specific payload (see §3 per function). */
57
- input: Record<string, unknown>;
58
- /** Shared sidekick context. */
58
+ goal: string; // SidekickInput.task
59
+ input: Record<string, unknown>; // action-specific (§3)
59
60
  context: {
60
61
  templateCores: string[];
61
62
  taskType?: string;
62
63
  metadata?: Record<string, unknown>;
63
- /** Optimizer-only / evaluate-only fields when applicable. */
64
- result?: unknown;
64
+ result?: unknown; // optimizer context when needed
65
65
  iterationIndex?: number;
66
+ identity?: ActivityRunContext;
66
67
  };
67
- /** Template customization NOT merged into LLM attribution tags by default. */
68
- args?: {
69
- templateMode?: "structured" | "markdown";
70
- customGuidelines?: string;
71
- synthesisPromptOverride?: string;
72
- /** Checklist audit: passNumber, cycle, maxCycles, … */
73
- [key: string]: unknown;
74
- };
75
- attribution?: GenericFuncxAttribution;
68
+ args?: Record<string, unknown>; // templateMode, customGuidelines,
69
+ attribution?: SidekickFuncxAttribution;
76
70
  };
77
71
  ```
78
72
 
79
- **Template context tokens** (FR-GEN-1 superset) — FuncX must render from envelope, matching xynthesis rendrix vars today:
80
-
81
- | Token | Envelope source |
82
- |-------|-----------------|
83
- | `task`, `question` | `goal` (both aliases for synthesis compat) |
84
- | `local_raw` | `input.localRaw` stringified |
85
- | `supporting_raw` | `input.supportingRaw` stringified |
86
- | `rendered_downstream_instructions` | `input.renderedInstructions` |
87
- | `rendered_downstream_prompt` | `input.renderedPrompt` |
88
- | `ai_output` | `input.aiOutput` |
89
- | `used_instructions` | `input.usedInstructions` |
90
- | `used_prompt` | `input.usedPrompt` |
91
- | `prior_audit_json` | `JSON.stringify(input.priorAudit)` |
92
- | `candidates_json` | `JSON.stringify(input.candidates)` |
93
- | `prior_context` | `input.priorContext` |
94
- | `metadata_json` | `JSON.stringify(context.metadata ?? {})` |
95
- | `template_cores_json` | `JSON.stringify(context.templateCores)` |
96
- | `goal`, `input_json`, `context_json`, `args_json` | FR-GEN-1 generic tokens (execution-strategy family) |
97
-
98
- **Ask (FuncX):** export `buildSidekickTemplateContext(envelope): Record<string, string>` alongside `buildGenericExecutionTemplateContext`.
99
-
100
- ---
101
-
102
- ## 3. Per-function specifications
103
-
104
- ### FR-PRE-1 — `pre/synthesize` (PRE synthesis)
105
-
106
- **Canonical content:** `xynthesis/templates/synthesis/system-structured.md` + `user-structured.md` (and markdown variants).
107
-
108
- **Envelope `input`:**
73
+ **Builders (shipped):**
109
74
 
110
- | Field | Type | Required |
111
- |-------|------|----------|
112
- | `localRaw` | any | no |
113
- | `supportingRaw` | any | no |
114
- | `renderedInstructions` | string | no |
115
- | `renderedPrompt` | string | no |
75
+ - `buildSidekickGenericEnvelope(input, options?)` synthesis, audit, fix, pick-best, craft-final
76
+ - `buildExecutionStrategyGenericEnvelope(req)` — planner / optimizer / web-scope (merges `strategyArgs` → `args`)
116
77
 
117
- **Output JSON** (matches `parseAndValidateSynthesizedPromptPayload` / `SynthesisPayload`):
78
+ **Attribution:** `buildSidekickFuncxAttribution({ funcxFunctionId, jobId, taskId, agentId })` align with FuncX `buildAskAttribution(implId, envelope)`.
118
79
 
119
- - `templateCores`, `task`, `synthesized` (`SynthesizedContext`), optional `notes`, `unknowns`, `assumptions`
80
+ ### 2.1 Template tokens (for Catalox instructions)
120
81
 
121
- **`args`:** `templateMode`, `customGuidelines`, `synthesisPromptOverride`, `maxItemsPerSide`, `maxItemContentChars`
82
+ FuncX 4.4 renders instructions with `input` = **full envelope**. For parity with xynthesis rendrix disk templates, implement **FR-GEN-1** `envelopeToTemplateVariables` (see generic hosting doc).
122
83
 
123
- **Response format:** `json_object`
84
+ | xynthesis rendrix (disk) | FuncX / rendrix on envelope (`input` = envelope) |
85
+ |--------------------------|--------------------------------------------------|
86
+ | `goal` | `input.goal` |
87
+ | `task`, `question` | `input.goal` (aliases in sidekick templates) |
88
+ | `local_raw`, `supporting_raw` | `input.local_raw`, `input.supporting_raw` (strings; builders stringify) |
89
+ | `rendered_downstream_instructions` | `input.renderedInstructions` |
90
+ | `rendered_downstream_prompt` | `input.renderedPrompt` |
91
+ | `ai_output` | `input.aiOutput` |
92
+ | `used_instructions`, `used_prompt` | `input.usedInstructions`, `input.usedPrompt` |
93
+ | `prior_audit_json` | stringify `input.priorAudit` |
94
+ | `candidates_json` | stringify `input.candidates` |
95
+ | `metadata_json` | stringify `context.metadata` |
96
+ | `template_cores_json` | stringify `context.templateCores` |
97
+ | `goal`, `input_json`, `context_json`, `args_json` | execution family (§3.6) |
124
98
 
125
99
  ---
126
100
 
127
- ### FR-POST-1 `post/audit` (sidekick JSON audit)
128
-
129
- **Canonical content:** `xynthesis/templates/audit/*`
101
+ ## 3. Per-function specifications (to implement in FuncX)
130
102
 
131
- **Envelope `input`:**
103
+ Register in router + `content-seed/functions/` (new bundle or extend `genericExecutionResearch` / dedicated `xynthesisSidekick.seed.json`). Follow **4.4.0 patterns**: `meta.json`, IO schemas, `executeFuncxFromContent`, `buildAskAttribution`, `responseFormat: json_object` where noted.
132
104
 
133
- | Field | Type | Required |
134
- |-------|------|----------|
135
- | `aiOutput` | string | yes |
136
- | `usedInstructions` | string | no |
137
- | `usedPrompt` | string | no |
105
+ ### FR-PRE-POST-1 `pre/synthesize` (P0)
138
106
 
139
- **Output JSON** (matches `parseAuditPayload`):
107
+ **Canonical content:** `xynthesis/templates/synthesis/system-structured.md`, `user-structured.md` (+ markdown pair).
140
108
 
141
- - `verdict`: `"pass" | "fail" | "mixed"`
142
- - `findings[]`: `{ id, label, content, severity? }`
143
- - plus sidekick base fields (`notes`, `unknowns`, `assumptions`, …)
109
+ **`input`:** `localRaw`, `supportingRaw`, `renderedInstructions`, `renderedPrompt`, plus string mirrors `local_raw`, `supporting_raw`.
144
110
 
145
- ---
111
+ **Output:** matches `parseAndValidateSynthesizedPromptPayload` / `SynthesisPayload` (`templateCores`, `task`, `synthesized`, `notes`, `unknowns`, `assumptions`).
146
112
 
147
- ### FR-POST-2 `post/audit-checklist` (ai-tasks weighted audit)
113
+ **`args`:** `templateMode`, `customGuidelines`, `synthesisPromptOverride`, `maxItemsPerSide`, `maxItemContentChars`.
148
114
 
149
- **Canonical content:** migrate from ai-tasks `templates/post-steps/audit/` (Handlebars → FuncX templates with same variables).
115
+ ### FR-PRE-POST-2 `post/audit-checklist` + `post/audit-merge` (P1)
150
116
 
151
- **Envelope `input`:**
117
+ **Checklist** — migrate ai-tasks `templates/post-steps/audit/`:
152
118
 
153
- | Field | Type | Required |
154
- |-------|------|----------|
155
- | `candidateOutput` | string | yes |
156
- | `originalInput` | string | yes |
157
- | `promptContext` | string | no |
158
- | `mustChecks` | `{ check, weight }[]` | yes |
159
- | `shouldChecks` | `{ check, weight }[]` | yes |
160
- | `previousFeedback` | string | no |
119
+ **`input`:** `candidateOutput`, `originalInput`, `promptContext`, `mustChecks`, `shouldChecks`, `previousFeedback`, `previousCycle` (see `buildAuditChecklistFuncxEnvelope`).
161
120
 
162
- **Output:** structured markdown (`### Checks`, `### Overall feedback`) — parsed by ai-tasks `parseAuditOutputFromMarkdown` until FuncX ships JSON schema variant.
121
+ **Output:** markdown `### Checks` / `### Overall feedback` until JSON schema exists.
163
122
 
164
- **`args`:** `customAuditGuidelines`, `passNumber`, `cycle`, `maxCycles`
123
+ **`args`:** `customAuditGuidelines`, `passNumber`, `cycle`, `maxCycles`.
165
124
 
166
- ---
125
+ **Merge** — `buildAuditMergeFuncxEnvelope`: `input.candidateA`, `input.candidateB`, `context.task`.
167
126
 
168
- ### FR-POST-3 — `post/fix` (polish / fix)
127
+ ### FR-PRE-POST-3 — `post/audit` (P0)
169
128
 
170
- **Canonical content:** `xynthesis/templates/fix/*`
129
+ **Content:** `xynthesis/templates/audit/*`. **`input`:** `aiOutput`, `usedInstructions?`, `usedPrompt?`. **Output:** `parseAuditPayload` shape (`verdict`, `findings[]`, …).
171
130
 
172
- **Envelope `input`:** `aiOutput`, `usedInstructions?`, `usedPrompt?`, `priorAudit?` (AuditPayload)
131
+ ### FR-PRE-POST-4 `post/fix` (P0)
173
132
 
174
- **Output JSON:** `fixes[]` with `{ id, label, corrected, rationale? }` per `parseFixPayload`
133
+ **Note:** sidekick action is **`fix`** (polish), not `post/polish`. **Content:** `xynthesis/templates/fix/*`. **Output:** `parseFixPayload` (`fixes[]`).
175
134
 
176
- ---
135
+ ### FR-PRE-POST-5 — `post/pick-best`, `post/craft-final` (P0)
177
136
 
178
- ### FR-POST-4 `post/pick-best`
137
+ Per `parsePickBestPayload` / `parseCraftFinalPayload` and existing disk templates.
179
138
 
180
- **Envelope `input`:** `candidates[]` (`{ id, content }`), `usedInstructions?`
139
+ ### FR-PRE-POST-6 Execution ids (P0 wire only)
181
140
 
182
- **Output JSON:** `selected`, `rankings[]` per `parsePickBestPayload`
183
-
184
- ---
141
+ **Already in FuncX 4.4.0.** Remaining work:
185
142
 
186
- ### FR-POST-5 `post/craft-final`
143
+ - [ ] xynthesis: stop `buildExecutionStrategyPrompts` + `ask` when `XYNTHESIS_FUNCX_SIDEKICK=1`
144
+ - [ ] Call `run(resolveSidekickFuncxFunctionId(action), buildExecutionStrategyGenericEnvelope(req), runOptions)`
145
+ - [ ] Catalox `contentVersion` ≥ seed version after parity (FR-GEN-9)
187
146
 
188
- **Envelope `input`:** `aiOutput`, `usedInstructions?`, `usedPrompt?`, `priorContext?`
189
-
190
- **Output JSON:** per `parseCraftFinalPayload` (`finalOutput`, `rationale?`, …)
147
+ No new FuncX function definitions required if `fx/execution-plan/*` matches xynthesis templates.
191
148
 
192
149
  ---
193
150
 
194
- ### FR-PRE-POST-6 Execution-strategy ids (already exist wire only)
195
-
196
- **No new FuncX content required** if seeds match xynthesis templates (FR-GEN-9). xynthesis must **stop** re-rendering `executionStrategyPromptTemplate.ts` and call:
197
-
198
- - `run("execution/plan", envelope)`
199
- - `run("execution/evaluate-result", envelope)`
200
- - `run("research/plan-questions", envelope)`
201
-
202
- Catalox `pre-actions` / `post-actions` items for these actions gain `funcx.functionId` pointing at built-ins; templates in Catalox become **overrides** only.
151
+ ## 4. Catalox catalog shape (consumershipped)
203
152
 
204
- ---
205
-
206
- ## 4. Catalox catalog shape (consumer-side, after FuncX ships)
207
-
208
- Each `XynthesisActionItem` in `pre-actions` / `post-actions` should include:
209
-
210
- ```json
211
- {
212
- "actionType": "audit",
213
- "funcx": {
214
- "functionId": "post/audit",
215
- "contentVersion": "1.0.0"
216
- },
217
- "templates": { "structured": { "system": "...", "user": "..." } },
218
- "actionOutputDefaults": { ... },
219
- "outputIntent": { ... }
220
- }
153
+ ```ts
154
+ // XynthesisActionItem (cataloxXynthesisBootstrap.ts)
155
+ funcx?: {
156
+ functionId: string; // slash form from sidekickFuncxCatalogMap
157
+ contentVersion?: string; // "0.0.0-pending-funcx" until FuncX seed synced
158
+ };
221
159
  ```
222
160
 
223
- **Resolution order (xynthesis):**
161
+ **Resolution order (target):**
224
162
 
225
- 1. If `XYNTHESIS_FUNCX_SIDEKICK=1` (new flag): `run(item.funcx.functionId, buildSidekickGenericEnvelope(input), runOptions)`.
226
- 2. Else if `XYNTHESIS_CATALOX_ACTIONS=1`: Catalox templates + rendrix (today).
227
- 3. Else: disk templates (dev/tests).
163
+ 1. `XYNTHESIS_FUNCX_SIDEKICK=1` `run(item.funcx.functionId, envelope, runOptions)` — prompts from FuncX/Catalox only.
164
+ 2. `XYNTHESIS_CATALOX_ACTIONS=1` Catalox templates + rendrix (**today**).
165
+ 3. Else disk templates (dev/tests).
228
166
 
229
- When (1) is active, Catalox `templates` are **ignored for prompt text** unless FuncX catalog points at Catalox-hosted function content (FuncX content-seed parity).
167
+ When (1) is on, Catalox `templates` are **fallback overrides** only if FuncX resolver supports content overrides (same as other `fx/*` functions).
230
168
 
231
169
  ---
232
170
 
233
- ## 5. FuncX package asks (summary tracker)
171
+ ## 5. FuncX package tracker (pre/post only)
234
172
 
235
- | FR id | Topic | Priority |
236
- |-------|--------|----------|
237
- | **FR-PRE-POST-1** | Register **`pre/synthesize`**, **`post/audit`**, **`post/fix`**, **`post/pick-best`**, **`post/craft-final`** built-ins | **P0** |
238
- | **FR-PRE-POST-2** | Register **`post/audit-checklist`**, **`post/audit-merge`** for ai-tasks POST pipeline | **P1** |
239
- | **FR-PRE-POST-3** | **`buildSidekickTemplateContext(envelope)`** export | **P0** |
240
- | **FR-PRE-POST-4** | Output JSON schemas = xynthesis parser contracts (§3) | **P0** |
241
- | **FR-PRE-POST-5** | `runSidekickGeneric(opts)` or extend FR-GEN-5 `runGenericExecution` for sidekick envelope | **P1** |
242
- | **FR-PRE-POST-6** | Content-seed from `xynthesis/templates/{synthesis,audit,fix,...}` + CI drift vs Catalox | **P1** |
243
- | **FR-PRE-POST-7** | Wire existing **`execution/*`** + **`research/plan-questions`** as canonical for pre/post catalog items (deprecate xynthesis duplicate render path) | **P0** |
173
+ Depends on [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) **FR-GEN-1, FR-GEN-4, FR-GEN-5** for shared template + `run()` ergonomics.
244
174
 
245
- Depends on [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) **FR-GEN-1–5** for `RunOptions`, usage return shape, and generic template context.
175
+ | FR id | Topic | Status @ 4.4.0 |
176
+ |-------|--------|----------------|
177
+ | **FR-PRE-POST-1** | `pre/synthesize` built-in + seed | **Open** |
178
+ | **FR-PRE-POST-2** | `post/audit-checklist`, `post/audit-merge` | **Open** (envelope **shipped** in ai-tasks) |
179
+ | **FR-PRE-POST-3** | `post/audit` | **Open** |
180
+ | **FR-PRE-POST-4** | `post/fix` | **Open** |
181
+ | **FR-PRE-POST-5** | `post/pick-best`, `post/craft-final` | **Open** |
182
+ | **FR-PRE-POST-6** | Wire execution/* + research/plan-questions from xynthesis | **Open** (built-ins **shipped**) |
183
+ | **FR-PRE-POST-7** | `buildSidekickTemplateContext` or FR-GEN-1 covering sidekick | **Open** |
184
+ | **FR-PRE-POST-8** | Export `SidekickGenericEnvelope` type from `@x12i/funcx/functions` (optional) | **Open** |
246
185
 
247
186
  ---
248
187
 
249
- ## 6. Acceptance criteria (end-to-end)
188
+ ## 6. Acceptance criteria
250
189
 
251
- - [ ] With `XYNTHESIS_FUNCX_SIDEKICK=1`, `runSidekickGatewayCall` never calls `loadSidekickTemplates` for registered actions; prompts come from FuncX `run()`.
252
- - [ ] Catalox `pre-actions` / `post-actions` items include `funcx.functionId`; validation fails if missing when FuncX mode enabled.
253
- - [ ] ai-tasks `runAuditPostStep` builds `post/audit-checklist` envelope no `loadAuditTemplates` / `DEFAULT_SYSTEM`.
254
- - [ ] ai-tasks PRE structured synthesis uses `pre/synthesize` via xynthesis (not local template load + `executeXynthesisAction`).
255
- - [ ] Golden fixture: same envelope FuncX rendered prompts hash-equal to current xynthesis rendrix output (FR-GEN-9 parity).
256
- - [ ] `sidekickAction` on Activix / `InvokeAttemptSummary` records FuncX `functionId`, not only transport `ask`.
190
+ - [ ] `XYNTHESIS_FUNCX_SIDEKICK=1` `runSidekickGatewayCall` / `runExecutionPlan` use `run()`, not `loadSidekickTemplates`.
191
+ - [ ] Catalox items keep `funcx.functionId`; validator fails if missing when FuncX mode required.
192
+ - [ ] ai-tasks `runAuditPostStep` uses `post/audit-checklist` envelope (no `loadAuditTemplates` / `DEFAULT_SYSTEM`).
193
+ - [ ] Golden: FR-GEN-1 normalized prompt hash matches current xynthesis rendrix output.
194
+ - [ ] `InvokeAttemptSummary` / Activix record FuncX `functionId`, not only transport `xynthesis/synthesis` on `ask`.
257
195
 
258
196
  ---
259
197
 
260
- ## 7. Convergence (mermaid)
261
-
262
- ```mermaid
263
- flowchart TB
264
- subgraph ai_tasks
265
- AT[buildSidekick envelope data]
266
- end
267
- subgraph xynthesis
268
- XY[runSidekickGatewayCall / runXynthesisAiAction]
269
- MAP[sidekickFuncxCatalogMap]
270
- ENV[buildSidekickGenericEnvelope]
271
- end
272
- subgraph funcx
273
- RUN["run(functionId, envelope)"]
274
- TPL[Catalox / content-seed templates]
275
- end
276
- subgraph catalox
277
- PRE[pre-actions catalog]
278
- POST[post-actions catalog]
279
- end
280
- AT --> XY
281
- XY --> MAP
282
- MAP --> ENV
283
- ENV --> RUN
284
- RUN --> TPL
285
- PRE -.->|funcx.functionId + optional override| MAP
286
- POST -.->|funcx.functionId + optional override| MAP
287
- ```
198
+ ## 7. Non-goals
288
199
 
289
- ---
290
-
291
- ## 8. Non-goals
292
-
293
- - ai-skills MAIN gateway (`instructions` / `prompt` on `RunTaskRequest`).
294
- - Moving template **cores** (`{{core:analysis}}`) into FuncX — still rendrix/ai-skills concern; synthesis **input** may include pre-rendered downstream blocks only.
200
+ - ai-skills MAIN gateway.
201
+ - FuncX ownership of template **cores** — cores stay rendrix; synthesis `input` may include pre-rendered downstream text only.
295
202
 
296
203
  ---
297
204
 
298
- ## 9. Version note
205
+ ## 8. Version note
206
+
207
+ | Package | Version |
208
+ |---------|---------|
209
+ | `@x12i/funcx` | **4.4.0** — implement FR-PRE-POST-1..5 in **4.5.x** (suggested) |
210
+ | `@exellix/xynthesis` | **4.4.3** — map + envelopes shipped; gateway wiring pending |
211
+ | `@exellix/ai-tasks` | **8.5.2** — checklist envelopes shipped |
299
212
 
300
- - **@x12i/funcx** **4.4.0** (xynthesis dep): `run`, `getRunJsonResult`, `GenericExecutionEnvelope`, `Client.ask`.
301
- - New built-ins require FuncX release + content-seed; xynthesis gates behind **`XYNTHESIS_FUNCX_SIDEKICK=1`** until parity tests pass.
213
+ Implement **pre/post content** in FuncX *after* reading §1 of [funcx-generic-xynthesis-hosting.md](./funcx-generic-xynthesis-hosting.md) (do not re-invent envelope / attribution / `getRunJsonResult`).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exellix/ai-tasks",
3
- "version": "8.5.2",
3
+ "version": "8.6.1",
4
4
  "description": "Task orchestration for the Exellix stack: runTask() with local handlers or LLM-backed execution, task-scoped memory/context enrichment, and executor dispatch via @exellix/ai-skills. ERC-compliant.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -60,7 +60,7 @@
60
60
  "node": ">=20"
61
61
  },
62
62
  "dependencies": {
63
- "@exellix/ai-skills": "^6.0.0",
63
+ "@exellix/ai-skills": "^6.1.0",
64
64
  "@exellix/memorix-narrix-adapter": "^2.0.0",
65
65
  "@exellix/narrix-adapter-chat": "^2.0.0",
66
66
  "@exellix/narrix-adapter-docs": "^2.0.0",
@@ -72,7 +72,7 @@
72
72
  "@exellix/narrix-ingest": "^2.0.0",
73
73
  "@exellix/narrix-runner": "^2.0.0",
74
74
  "@exellix/narrix-web-scoper": "^2.0.0",
75
- "@exellix/xynthesis": "^4.4.3",
75
+ "@exellix/xynthesis": "^4.4.5",
76
76
  "@x12i/activix": "^8.5.0",
77
77
  "@x12i/ai-profiles": "^2.1.0",
78
78
  "@x12i/catalox": "^5.1.3",