(capabilities, signals)
| 50 | } |
| 51 | |
| 52 | function _buildGene(capabilities, signals) { |
| 53 | const caps = Array.isArray(capabilities) && capabilities.length > 0 |
| 54 | ? capabilities.slice(0, 8) |
| 55 | : ['general']; |
| 56 | const sig = Array.isArray(signals) && signals.length > 0 |
| 57 | ? signals.slice(0, 8) |
| 58 | : ['atp_task']; |
| 59 | const gene = { |
| 60 | type: 'Gene', |
| 61 | schema_version: '1.0.0', |
| 62 | id: 'gene_atp_answer_' + caps.sort().join('_').slice(0, 40), |
| 63 | summary: 'Deliver an ATP task answer for capabilities: ' + caps.join(', '), |
| 64 | signals_match: sig, |
| 65 | category: 'innovate', |
| 66 | strategy: [ |
| 67 | 'Read the buyer question carefully and identify the requested capability.', |
| 68 | 'Produce a concrete, actionable answer addressing the question directly.', |
| 69 | 'Return the answer as Capsule content for verifiable delivery.', |
| 70 | ], |
| 71 | // gep-sdk Gene schema requires `constraints`; an ATP answer edits no |
| 72 | // files, so the blast radius is empty rather than left unbounded. |
| 73 | constraints: { max_files: 0, forbidden_paths: [] }, |
| 74 | validation: [ |
| 75 | 'Answer is non-empty and directly addresses the buyer question.', |
| 76 | 'Answer references the requested capabilities where relevant.', |
| 77 | ], |
| 78 | }; |
| 79 | gene.asset_id = computeAssetId(gene); |
| 80 | return gene; |
| 81 | } |
| 82 | |
| 83 | function _buildCapsule({ gene, answer, summary, orderId, taskId, capabilities, signals }) { |
| 84 | const caps = Array.isArray(capabilities) ? capabilities.slice(0, 8) : []; |
no outgoing calls
no test coverage detected