@evomap/evolver 1.69.12 → 1.69.13
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/assets/gep/candidates.jsonl +6 -9
- package/assets/gep/events.jsonl +3 -0
- package/assets/gep/genes.json +54 -1
- package/package.json +1 -1
- package/src/evolve.js +1 -1
- package/src/gep/.integrity +0 -0
- package/src/gep/a2aProtocol.js +1 -1
- package/src/gep/candidateEval.js +1 -1
- package/src/gep/candidates.js +1 -1
- package/src/gep/contentHash.js +1 -1
- package/src/gep/crypto.js +1 -1
- package/src/gep/curriculum.js +1 -1
- package/src/gep/deviceId.js +1 -1
- package/src/gep/envFingerprint.js +1 -1
- package/src/gep/explore.js +1 -1
- package/src/gep/hubReview.js +1 -1
- package/src/gep/hubSearch.js +1 -1
- package/src/gep/hubVerify.js +1 -1
- package/src/gep/integrityCheck.js +1 -1
- package/src/gep/learningSignals.js +1 -1
- package/src/gep/memoryGraph.js +1 -1
- package/src/gep/memoryGraphAdapter.js +1 -1
- package/src/gep/mutation.js +1 -1
- package/src/gep/narrativeMemory.js +1 -1
- package/src/gep/personality.js +1 -1
- package/src/gep/policyCheck.js +1 -1
- package/src/gep/prompt.js +1 -1
- package/src/gep/reflection.js +1 -1
- package/src/gep/selector.js +1 -1
- package/src/gep/shield.js +1 -1
- package/src/gep/skill2gep.js +62 -8
- package/src/gep/skillDistiller.js +1 -1
- package/src/gep/skillPublisher.js +49 -4
- package/src/gep/solidify.js +1 -1
- package/src/gep/strategy.js +1 -1
|
@@ -110,18 +110,51 @@ function geneToSkillMd(gene) {
|
|
|
110
110
|
if (gene.strategy && gene.strategy.length > 0) {
|
|
111
111
|
lines.push('## Strategy');
|
|
112
112
|
lines.push('');
|
|
113
|
-
|
|
113
|
+
var stepIdx = 0;
|
|
114
|
+
gene.strategy.forEach(function (step) {
|
|
114
115
|
var text = String(step);
|
|
116
|
+
// Defensive: legacy genes may still carry "AVOID: ..." steps from
|
|
117
|
+
// pre-2026-04-21 distillations. Skip them from Strategy -- the dedicated
|
|
118
|
+
// "## Avoid" section below renders them correctly.
|
|
119
|
+
if (/^\s*AVOID\s*[:\-]/i.test(text)) return;
|
|
120
|
+
stepIdx += 1;
|
|
115
121
|
var verb = extractStepVerb(text);
|
|
116
122
|
if (verb) {
|
|
117
|
-
lines.push(
|
|
123
|
+
lines.push(stepIdx + '. **' + verb + '** -- ' + stripLeadingVerb(text));
|
|
118
124
|
} else {
|
|
119
|
-
lines.push(
|
|
125
|
+
lines.push(stepIdx + '. ' + text);
|
|
120
126
|
}
|
|
121
127
|
});
|
|
122
128
|
lines.push('');
|
|
123
129
|
}
|
|
124
130
|
|
|
131
|
+
// -- Avoid (anti-patterns, pitfalls, hard "do not" rules) --
|
|
132
|
+
// Prefer the top-level `avoid` field (post-2026-04-21 genes). Fall back to
|
|
133
|
+
// legacy "AVOID: ..." steps embedded in strategy so pre-existing genes still
|
|
134
|
+
// surface their anti-patterns in the right section.
|
|
135
|
+
var avoidItems = [];
|
|
136
|
+
if (Array.isArray(gene.avoid)) {
|
|
137
|
+
gene.avoid.forEach(function (a) {
|
|
138
|
+
var s = String(a || '').trim();
|
|
139
|
+
if (s) avoidItems.push(s);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
if (avoidItems.length === 0 && Array.isArray(gene.strategy)) {
|
|
143
|
+
gene.strategy.forEach(function (step) {
|
|
144
|
+
var text = String(step);
|
|
145
|
+
var m = text.match(/^\s*AVOID\s*[:\-]\s*(.+)$/i);
|
|
146
|
+
if (m) avoidItems.push(m[1].trim());
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
if (avoidItems.length > 0) {
|
|
150
|
+
lines.push('## Avoid');
|
|
151
|
+
lines.push('');
|
|
152
|
+
avoidItems.forEach(function (a) {
|
|
153
|
+
lines.push('- ' + a);
|
|
154
|
+
});
|
|
155
|
+
lines.push('');
|
|
156
|
+
}
|
|
157
|
+
|
|
125
158
|
// -- Constraints --
|
|
126
159
|
if (gene.constraints) {
|
|
127
160
|
lines.push('## Constraints');
|
|
@@ -171,11 +204,23 @@ function geneToSkillMd(gene) {
|
|
|
171
204
|
* e.g. "Verify Cursor CLI installation" -> "Verify"
|
|
172
205
|
* "Run `npm test` to check" -> "Run"
|
|
173
206
|
* "Configure non-interactive mode" -> "Configure"
|
|
207
|
+
*
|
|
208
|
+
* Excludes anti-pattern markers ("AVOID", "DON'T", "NEVER", ...) so they never
|
|
209
|
+
* get bolded as if they were real action verbs. These should be rendered as
|
|
210
|
+
* anti-pattern list items in the dedicated "## Avoid" section instead.
|
|
174
211
|
*/
|
|
175
212
|
function extractStepVerb(step) {
|
|
213
|
+
var ANTI_PATTERN_MARKERS = /^(AVOID|DO|DON'?T|NEVER|NOT|STOP|SKIP|IGNORE|FORBIDDEN|WARN|WARNING|CAUTION|NOTE)\b/i;
|
|
214
|
+
if (ANTI_PATTERN_MARKERS.test(step)) return '';
|
|
176
215
|
// Only match a capitalized verb at the very start (no leading backtick/special chars)
|
|
177
216
|
var match = step.match(/^([A-Z][a-z]+)/);
|
|
178
|
-
|
|
217
|
+
if (!match) return '';
|
|
218
|
+
// Extra safety: do not treat single-capital-letter + no-lowercase abbreviations
|
|
219
|
+
// (already filtered by the [a-z]+ requirement) or common non-verbs like
|
|
220
|
+
// "The", "This", "These", "Those" as verbs.
|
|
221
|
+
var DETERMINERS = new Set(['The', 'This', 'These', 'Those', 'That', 'A', 'An']);
|
|
222
|
+
if (DETERMINERS.has(match[1])) return '';
|
|
223
|
+
return match[1];
|
|
179
224
|
}
|
|
180
225
|
|
|
181
226
|
/**
|